Posts by Matheus Francisco • 650 points
29 posts
-
0
votes3
answers182
viewsA: Factor function passed with reference
#include<stdio.h> int fact(int *a,int *p) { while(*a>1){ *p*=*a; *a=*a-1; } } int main() { int num, factorial=1,c,*p; p=&factorial; printf("entre um numero:"); scanf("%d",&num);…
-
3
votes2
answers120
viewsQ: Table grouping
I have this table and would like to put together a list or another table users_ID_User Material Rating 0 A "Hey Pogo!...from citation to fulltext" 5 1 B "Hey Pogo!...from citation to fulltext" 4 2 C…
-
3
votes1
answer1217
viewsQ: Grouping table groupby pandas
I have a table in this format User Material Nota 1 youtube 5 2 facebook 4 3 facebook 3 4 facebook 5 6 youtube 2 7 orkut 3 8 twitter 4 and would like to group so that in the final table shows only…
-
0
votes0
answers58
viewsQ: Redirect with timer and localStorage
I’m trying to make a code in JS and when I enter the page index.html redirects to page teste.html and in the test I will click on a close where will return to index and in case now has to stay in…
javascriptasked Matheus Francisco 650 -
0
votes1
answer1641
viewsQ: Matplotlib python normalize y-axis
I’m trying to normalize the y axis of this Plot,when I speak normalize and leave on the same scale import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import numpy as np from…
-
1
votes1
answer28
viewsQ: Cross valdation n-fold
W1 W2 W3 W4 A/N 0 0.543405 0.278369 0.424518 0.844776 1 1 0.121569 0.670749 0.825853 0.136707 1 2 0.891322 0.209202 0.185328 0.108377 1 3 0.978624 0.811683 0.171941 0.816225 0 4 0.431704 0.940030…
-
0
votes1
answer152
viewsQ: Image Majority Algorithm Analysis
Algorithm help A vector with n images A= [1...n] has a majority image I if more than half of the vector images are equal I. You can use A[i] = A[j] to verify that the images at positions i and j are…
algorithmasked Matheus Francisco 650 -
2
votes2
answers887
viewsQ: Split double chained list with head
I have a problem with the Divide function, where I am getting a list and want to return to the right and left part of the list. Can someone give me a hand with logic. #include <inttypes.h>…
casked Matheus Francisco 650 -
2
votes1
answer2323
viewsQ: Mounting table from a csv, grouped by week, with python and pandas
I am using pandas and open the following table using the code tst = pd.read_csv('Iteracao.csv',delimiter=",") I’m trying to group as follows, where week 1 is the week of the date…
-
2
votes2
answers1093
viewsQ: Group by week
I have a table like this I’m trying to separate by week, I don’t have much knowledge in which functions I can use to check how many weeks you have between these dates, to then group. The data is in…
-
0
votes0
answers208
viewsQ: User plot per week pandas
I have a csv file that basically follows below, I’m trying to separate user iteration number per week and plot a graph for each user. Hora Nome completo 8/08/2017 19:00 Joao 8/08/2017 19:00 Joao…
-
2
votes1
answer3637
viewsQ: Align table in latex?
Hello I’m trying to align this table on a page only but I’m not getting anyone has any tips that can help me? \documentclass{article} %…
latexasked Matheus Francisco 650 -
0
votes1
answer247
viewsQ: Error in conversion from infix to posixed notation
When inserting (3+7) the result of the operation is 37+ and when placing only 3+7 without the relatives of the segmentation error and when I place (3+7)-(2+7) of the error also and I am not finding…
casked Matheus Francisco 650 -
0
votes1
answer90
viewsQ: Space spent by variables
Hello I would like to know how I do to calculate the space spent by each code variables, functions. Example I have a code to order a list double chained by Selectsort, but I want to calculate the…
casked Matheus Francisco 650 -
-1
votes1
answer316
viewsA: Quicksort with last element as pivot
**So I have this code here ** #include <stdio.h> #include <stdlib.h> #define T 5 void mostraVetor(int *v); void troca(int *a, int *b); int particionar(int *v, int inicio, int fim); void…
-
0
votes3
answers3725
viewsA: Convert "Floating" to Decimal
Sorry it took me so long to post the answer. If someone else could just send it, it would help many. In case the ai program also converts decimal float to binary, binary float to decimal...…
canswered Matheus Francisco 650 -
3
votes3
answers3725
viewsQ: Convert "Floating" to Decimal
So does anyone here know how I do to convert 1.01010101 for base 10 in the case this based on 2 "binary" the answer is that in base10 1.3320312510 . I need the logic to handle this case .. att…
casked Matheus Francisco 650 -
4
votes3
answers17331
viewsQ: Convert Fractional decimal to binary
I’m trying to convert a fractional decimal number to binary. Let’s go to the example, representing, in binary, the number 0.625. 0,625 x 2 = 1,25 , so the first fraction is 1. It remains to…
casked Matheus Francisco 650 -
0
votes2
answers280
viewsA: Check the diagonal of a specific index
I believe it is just to go through the matrix checking where the row is equal to the column and put 1 in these lines. for(i=1;i<=n;i++){ for(j=1;<=n;j++){ if( i == j){ m[i][j] = 1; } } } I…
-
3
votes1
answer169
viewsQ: Indirect sorting using index vector
Hello, I’m having trouble solving my workout and would like a help. I thought to do with max heap but it didn’t work out. That is the statement: "Indirect sorting problem". ) Write an algorithm that…
casked Matheus Francisco 650 -
4
votes1
answer233
viewsQ: Seeking Binaria and Ordination
There is some more efficient way to do that same function and do not know why on my computer is not working the code. #include <stdlib.h> #include <stdio.h> void ordena(int A[],int n);…
casked Matheus Francisco 650 -
0
votes2
answers1045
viewsA: Insertion Sorting and Recursive Insertion
void ordenacao_por_insercao(int v[], int n){ int i, chave; if(n>1) ordenacao_por_insercao(v, n-1); chave = v[n]; i = n - 1; while(i > 0 && v[i] > chave){ v[i + 1] = v[i];…
canswered Matheus Francisco 650 -
7
votes2
answers1045
viewsQ: Insertion Sorting and Recursive Insertion
I would like to change the function to a recursive function, I’m error tried so 1 se n > 1 então 2 Inserção-Rec (A, n−1) 3 x ← A[n] 4 i ← n−1 5 enquanto i > 0 e A[i] > x faça 6 A[i+1] ←…
casked Matheus Francisco 650 -
2
votes1
answer1491
viewsQ: Recursive function to remove from a headless chained list
I was looking for the minimum first to then remove it. Someone helps? /*Escreva uma função recursiva para remover de uma lista encadeada sem cabeça uma célula que contêm um valor mínimo.*/ #include…
casked Matheus Francisco 650 -
0
votes1
answer848
viewsQ: Row with circular chained list with head
Implement a queue in a circular chained list with head (do functions that implement the operations of Insertion and Removal). The first Row element is in the second cell and the last element is in…
casked Matheus Francisco 650 -
1
votes1
answer924
viewsQ: Arrange search function in double chained circular list
People have how to arrange my function to seek or give the idea of error ? I have to fetch the name of the person who is inserted in the list and remove this function with a bug vlw hug. #include…
casked Matheus Francisco 650 -
4
votes1
answer6989
viewsQ: Double chained list in C
Edited code I’m having trouble removing function #include<stdio.h> #include<stdlib.h> #define MAX_NOME 50 typedef struct pessoa{ char nome[MAX_NOME]; int idade; }Pessoa; struct celula{…
casked Matheus Francisco 650 -
3
votes1
answer877
viewsQ: Problem creating C search function
The search function takes the address of the first element of a list (p) and a string (subname). Suppose subname Francisco of the person’s name matheus francisco will return it to me instead of…
casked Matheus Francisco 650 -
4
votes1
answer2274
viewsQ: Chained list without head in c
I wonder how I create a function to remove at the top of the list headless. #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX_NOME 50 typedef struct pessoa{…