Posts by Shinforinpola • 430 points
23 posts
-
1
votes1
answer19
viewsQ: Problems writing converted uuid from Binary(16) to csv file
From a query in MySQL I receive lines with the field in the format binary(16) of MySQL. I do the conversion using lib uuid and try to insert into a file csv. Does not write in format uuid in the…
-
4
votes3
answers341
viewsQ: Sort a list based on two different criteria using Sorted
I have a list of tuples and I want to sort them out, but that’s two different criteria. Each tuple has the following configuration: (peso, beneficio) The ordination I want to make is as follows:…
-
4
votes2
answers98
viewsA: How do I know if a value is higher or lower than another value in a list using recursion?
To make your life easier it would be better to create a guy who represents a Monstro. So I created the following type: data Monstro = Status String Int Int deriving(Eq, Show) --Obrigatório For the…
-
1
votes2
answers205
viewsA: a Haskell function that receives with input a number n and a list and returns the number amount greater than n
To solve this problem you need to use guards, this way you can test a condition. As Haskell is a purely functional language the ideal is to use recursion. Being (x:xs) the entire list where x is the…
haskellanswered Shinforinpola 430 -
1
votes1
answer47
viewsQ: What is the difference between split(" ") and split()
I’m manipulating strings and I came across this question. I thought the semantics of the ways to use was the same, but I saw that not and it left me confused. In the case I thought with the use of…
python-3.xasked Shinforinpola 430 -
1
votes1
answer98
viewsA: While finds no match, C language
The problem is that the fgets() stores the \n at the end of string, while in the case of scanf() the \n stays in the buffer. So when the strcmp() will compare the strings he finds: musica1\n and…
-
0
votes2
answers4555
viewsA: Prime numbers in C
I think this would be an interesting basis for what you want. You do not need to test all the values, because if up N/2 is not divisible, from there it is divisible only by itself. #include…
canswered Shinforinpola 430 -
1
votes1
answer985
viewsA: How to print a string in C?
In the case of string you can’t go from one variable to another like this: maluno = aluno; You need the function strcpy library <string.h>. #include <stdio.h> #include <string.h>…
-
0
votes1
answer122
viewsA: Reference not set for "crypt" error in linkage
I’ve done a lot of research and I think I’ve found a solution to your problem. According to this website when you use a compiler ISO C, it is necessary to declare the prototype of the function. I…
-
0
votes2
answers95
viewsA: Validate fields within separate Ivs in a single form
The answer was the perfect basis for what I needed. I just made a few adaptations and I’ll leave it here in case someone needs it too. //Essa aqui é chamada no .ready pra esconder as labels dos…
-
0
votes2
answers95
viewsQ: Validate fields within separate Ivs in a single form
Within a single form I have 3 divs, that change as the user clicks on próximo. But for the user to be able to click próximo the mandatory fields of div which is currently being shown must be filled.…
-
1
votes1
answer84
viewsA: Doubt - Dynamic list
In his job List *CreateList () you allocate only one structure List containing a int and a pointer to a Node, which is your head, and nothing else. And after that you make your pointer point to…
-
2
votes1
answer127
viewsA: Recursion Problem in Python
In your code you are doing the following: #define a função nat def nat(n): if n == 50: return 0 else: return nat(n+1) #chama a função para printar o valor retornado print(nat(1)) So far so good, the…
pythonanswered Shinforinpola 430 -
0
votes1
answer70
viewsQ: Jquery Mask only alphabetical with strange behavior
I am trying to add a mask in a field to accept only alphabetic characters. Apparently I managed to find a solution. Code $(function () { $("#name").keypress( function(key) { if((key.charCode < 97…
-
0
votes1
answer26
viewsQ: I can’t add Overlayview
I need to add a OverlayView on a map in a project Ionic3. The Google tutorial was used as a basis: Add Custom Overlayview The code used is a pro adaptation TypeScript that I found researching. Code:…
-
2
votes3
answers417
viewsA: Counter of a subsequence of repeated strings in C
Your minor sequence problem is in the loop, if you haven’t modified it as Maniero suggested. You use: for(i = 0;i < (strlen(v)-1); i++) In your input case the word has 9 letters. That way you did…
-
0
votes1
answer117
viewsA: Ionic 3 problems running project [Uncaught(in Promise): cordova_not_available]
I could find it. You have to install some working tools for the Windows. Commando: npm install -g --production windows-build-tools…
-
0
votes1
answer117
viewsQ: Ionic 3 problems running project [Uncaught(in Promise): cordova_not_available]
The project was not created by me. I am unable to run the project. When trying to run the project with the command ionic server returns the message Uncaught(in promise): cordova_not_available. I…
-
0
votes1
answer1647
viewsA: How to Insert a string into the data stack
#include <stdio.h> #define STACK_MAXSIZE 5 #define STRING_MAXSIZE 10 struct pilha { char pilhaa[STACK_MAXSIZE][STRING_MAXSIZE]; int…
-
0
votes1
answer66
viewsQ: Scroll internal content div with Ionic edge
How to make the internal content of a div specific has scroll when the text is larger than the area? I was suggested to use the following code: html: <ion-content id="contrato"> <div…
-
0
votes1
answer66
viewsA: Scroll internal content div with Ionic edge
Answering my own question After searching and grieving for some time, I managed to find a satisfactory solution to my problem. html: <ion-content id="contrato"> <div class="main">…
-
3
votes1
answer279
viewsQ: Pass data CSV file to array in R (BARPLOT)
I need to plot a graph in R by importing a csv file. After importing csv and calling the barplot he accuses that the variable I imported csv is not a vector. So how do I turn it into a vector to use…
rasked Shinforinpola 430 -
2
votes2
answers1477
viewsQ: Plot Graph Multiple Variable Bars in R
I need to assemble a graph in R from a CSV table in bars as follows: The Y axis refers to the total count of each variable (column) on the X axis. Where Y is the number of people and X is the number…
rasked Shinforinpola 430