Posts by rafael marques • 939 points
68 posts
-
0
votes1
answer80
viewsQ: Error loading an image from a file
Well what I was trying to do, was the home page could load a file from the computer itself, and change the image on the index, however I realized that js does not find the image of the index, and…
-
-1
votes1
answer52
viewsQ: Why does my example not match the Bootstrap documentation
I’m trying to learn Scrollspy in Bootstrap, but I’m having trouble copying the same code from the documentation but I didn’t get the same result as the scrollbar, which I missed. <!doctype…
htmlasked rafael marques 939 -
2
votes3
answers4831
viewsQ: How to center this image with Bootstrap
I’m trying to center the image but I was not successful, I was able to center, but I don’t know how to put in the middle of the div <!doctype html> <html lang="pt-br"> <head>…
-
0
votes0
answers80
viewsQ: Text is not inside the div
I am doing float in html, but I had a problem typed a random text and the text did not fit inside the div, which could be, if I type something should not be inside my div ? <!DOCTYPE html>…
-
-1
votes1
answer55
viewsQ: How to format specific links?
The way I learned, is that I apply the style to all links, I wanted to know how I could do it, here are two Divs I wanted to apply the styles only in the first div with the id="links1" Html…
-
1
votes0
answers30
viewsQ: How does the compiler interpret separate files from a project?
As the modularization it has the header file, the .c and the main function, as the compiler joins all the codes and turns into the executable file?
-
1
votes1
answer51
viewsQ: Why can’t I access the data from this struct with the dot, just with the arrow?
I allotted that struct by dynamic allocation and can only access the data idade via arrow and not by point wanted to know why? #include<stdio.h> #include <stdlib.h> struct pessoa { int…
-
0
votes1
answer35
viewsQ: I am unable to change the contents of my button
I’m trying to change the text of my button when I click on it, but I’m not getting it. My code: function altera(argument) { document.getElementById('novo').innerHTML="atualizou"; } <!DOCTYPE…
-
0
votes1
answer68
viewsQ: How to show a vector without going to another page
Well I’m making a page that makes draws, I already managed to do half the work, but when I show the result of the vector it goes to another page, I wanted to know how to show what has in the vector…
-
2
votes2
answers51
viewsQ: How to show only the number of a Cpf
Well the question asks you to read a Cpf, and show it without the dots, I tried to do using a logic of C, but the javascript I think does not have it, what I have to change to have the result My…
htmlasked rafael marques 939 -
0
votes1
answer50
viewsA: Why don’t my strings concatenate correctly?
Well, I did not understand very well this problem I totally repeated it taking the ideas, well it does not accept numbers or spaces, to facilitate at the time of showing the names, I stored in an…
canswered rafael marques 939 -
3
votes1
answer135
viewsQ: Use of typedef for pointer
If I’ve already set a pointer to my structure why can’t I make the allocation of it. #include <stdio.h> #include <stdlib.h> struct ponto { int a, b; }; typedef struct ponto *Ponteiro; //…
-
0
votes0
answers30
viewsQ: Error in the algorithm ofBoyer-Moore
I’m studying how to count how many times one string appears on the other, and I found this site Website link, in it has the algorithm deBoyer-Moore, which finds number of occurrences of a in b, but…
casked rafael marques 939 -
0
votes1
answer57
viewsQ: How to improve performance in this code
I made the point The Legend of Flavious Josephus, but the time limit has expired, which I can change to decrease the time My code #include <stdio.h> void carregaVetor(int *vetor, int numero);…
casked rafael marques 939 -
1
votes1
answer42
viewsQ: Ordering With a certain condition
I made the point Who’s Going to Fail? that had the rule Students would be ordered according to the number of problems solved, with draws solved according to the alphabetical order of the names…
-
-1
votes1
answer49
viewsQ: Nullpointerexception do not know how to solve
I’m making a house class and a door class, and in the house class I’m declaring 3 doors and when I’m going to run gives Nullpointerexception, could someone give me a light class of my door package…
-
-1
votes1
answer272
viewsQ: How to generate random value pairs
I wanted to generate 6 random values in 2 pairs for example 1 1, 2 2, 3 3 My code #include <stdio.h> #include <time.h> #include <stdlib.h> int vezes(int vetor[], int tamanho, int…
-
0
votes1
answer373
viewsQ: How to calculate the difference between dates using the time. h library
I saw that has a function in the team. h calculating difference between date I went on the site Documentation link time. h, did not quite understand how to perform this calculation, for example…
casked rafael marques 939 -
-1
votes1
answer193
viewsQ: Error reading a long number in java
I am reading a vector in java and make the sum of all the elements but this saying that are incompatible type, how to solve My code package capitulo2; import java.util.Scanner; public class…
javaasked rafael marques 939 -
-1
votes2
answers71
viewsQ: I can’t seem to register a person’s name in my calendar
I’m making a very simple schedule, the numbers I managed to castrate but the names of the people I couldn’t get. My code #include <stdio.h> #include <malloc.h> #define MAX 50 typedef…
-
3
votes1
answer73
viewsQ: Is it wrong Methods to show something to the user?
Well I’m starting now in the area of Opoo, I saw in a class I’m watching on youtube that it was wrong Methods write something on the screen, and how I would show if something bad happened in a…
-
-1
votes1
answer89
viewsQ: I need help on this competitive programming issue
I’m asking the question Low Frequency I have tested the cases of Udebug but the online judge only returns me Runtime error, for what I know when this happens and when it tries to use memory position…
-
0
votes1
answer323
viewsA: How to compare two vectors and exclude equal values from the vector with the highest number of characters? In "C"
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(int argc, char** argv) { int vetor_1[] = {10, 5, 7, 8, 12}, vetor_2[] = {10,…
-
0
votes1
answer263
viewsQ: How to change a string name
I’m asking a question in Rio Tag replacement, that one has to replace one name with another but I’m not succeeding, I can only with normal names without characters My code #include <stdio.h>…
-
1
votes1
answer62
viewsA: How do I if the user type a number other than 1 and 2 he asks you to terminate the program? n[1] for yes and [2] for no
Your code is almost correct, just need some changes, the logic and this while it is different from 2 it will repeat, also would do with infinite looping but is not very cool to do Your corrected…
canswered rafael marques 939 -
-2
votes1
answer129
viewsA: Prepare a program in C that receives 6 integer numbers and then the program should present the sum of these numbers on the screen, I could only here
There’s the corrected code, any doubt I’m here #include <stdio.h> int main(int argc, char** argv) { int numero, somatorio = 0; //iniciar com zero para não ter lixo de memória for(int i = 0; i…
canswered rafael marques 939 -
0
votes1
answer69
viewsA: Doubt with C function
#include <stdio.h> int soma(int a, int b); // prototipo da função int main() { int a, b, resultado; scanf("%d %d", &a, &b); resultado = soma(a, b);…
-
0
votes3
answers407
viewsA: Check if a string is composed of digits
#include <stdio.h> #include <string.h> int verifica(char *nome); int main(int argc, char** argv) { char nomes[4][100]; int tam, resultado; for(int i =…
canswered rafael marques 939 -
1
votes1
answer165
viewsQ: Is the <openssl/bn. h> library part of the ANSI C standard?
I was looking for how to work as big numbers on and found a blog that talks that it was possible to work using the library, I wondered if it is part of the ANSI C standard ?
casked rafael marques 939 -
-2
votes1
answer66
viewsQ: Some test that this code does not pass
I’m asking the question Voice Dial, I’ve done every test possible and can’t find the error could help me in other test that my code fails My code #include <stdio.h> #include <string.h>…
-
0
votes2
answers52
viewsA: How do I display the values of a matrix one to one in C? example: line 1: 1.2 line 2: 3.4 line 3: 5.6 " " " " " " " """
Hello I just made a few changes to your code, that’s how you wanted it ? , if you want me to be able to help just say #include <stdio.h> #include <math.h> #define max 50 int main() { int…
canswered rafael marques 939 -
3
votes1
answer1364
viewsQ: How to check if two vectors have equal values quickly
The element number reaches 100000 and I have to compare with another vector of 100000, as I can do it with a very high unemployment gain How I’m comparing the vectors for(i = 0; i < teste; i++) {…
-
4
votes2
answers6881
viewsQ: How to find splitters of a number quickly
I have to ask a question that calculates the very large number dividers and needs in a fast way without being the conventional way, could help me My code #include<stdio.h> int main() { int…
-
1
votes2
answers408
viewsQ: How to make 9 potentials quickly
I’m asking a question that asks to raise the number to 9 and say the last digit I got, but the resolution seems to have passed the time because it had number 10 9, how to solve it more quickly My…
-
1
votes2
answers113
viewsQ: Qsort ordering in the wrong way
My activity is to read a sentence and ordered in alphabetical order, but is giving error #include <stdio.h> #include <stdlib.h> #include <string.h> int ordena(const void * a, const…
-
2
votes1
answer1214
viewsQ: How to copy values from one vector to another quickly
I’m making a question that the number of elements in the vector are in 10 6 and just wanted to copy certain element to it only that I did the normal way, but common, there is another possibility if…
-
1
votes2
answers177
viewsQ: Why subtract -48 from a char and turn it whole?
I saw on another forum that guy subtracted -48 from one char and the char became a whole, because it happened? #include<stdio.h> int main(){ char num='3'; printf("%d",num-48); return 0; }…
-
0
votes1
answer43
viewsQ: Doubt with the %i
I know that with %i you can read numbers in decimal, hexadecimal, and octal, but when I type 0x15, the number 21 appears, being that it was fifteen that was appear or I am mistaken ? Example below…
casked rafael marques 939 -
0
votes0
answers30
viewsQ: Error showing a String
I’m asking the question Entry and Exit with Comma, I’m doing everything the question asked but I’m leading 30% error, could help me where the error may be My code #include <stdio.h> #include…
-
0
votes1
answer193
viewsQ: How to transform a decimal number to binary using String
Well I managed using whole numbers, only the teacher wants code to accept very large number that do not fit in whole, he said he had to read as a string, only I do not know how this can be done My…
casked rafael marques 939 -
2
votes3
answers1436
viewsQ: What is the fastest way to calculate the sequence of Fibonacci
I’m asking a question that is Fibonacci de Novo! the tests give the expected result only that gives Time limit exceeded, wanted if you have a faster way to calculate My code #include <stdio.h>…
-
1
votes2
answers194
viewsQ: Table values being truncated
I made code in the declaration part of the real number that word balance that it will receive a number with 6 digits and 2 two decimal places after the comma, except that all values that I enter are…
sqlasked rafael marques 939 -
4
votes3
answers47
viewsQ: How to view a given value in a table
I’m new to the Sql language, and I wanted to show you the names of all the people who are from the RS region, how could I do that ? create database uri default character set utf8 default collate…
sqlasked rafael marques 939 -
1
votes1
answer40
viewsQ: Error counting repeated values in an array
I’m trying to ask a question that counts the number of times each value appears on the array, which I tried, only counts a repeated number, someone could help me with logic, Example of input 8 10 8…
-
0
votes0
answers1029
viewsQ: How to convert from Hexadecimal to binary
Good actually I got in brute force wanted to know, there is another way to do my code mathematically #include <stdio.h> #include <string.h> int main(int argc, char** argv) { char…
-
0
votes1
answer165
viewsQ: Error in python indentation
I already program in c, I’m mdc in Python but I’m struggling with indentation, because in c we don’t care about it, someone could help me, my code below numero = int(input()) for i in range(): x =…
pythonasked rafael marques 939 -
1
votes1
answer5093
viewsQ: How to make dynamic string allocation
Well I wanted to dynamically allocate several names in c, I already know how to do only normal but want as I show here in the code #include <stdio.h> #include <stdlib.h> int main(int…
casked rafael marques 939 -
0
votes1
answer40
viewsQ: I’m having trouble finding the highest number
Well I’m doing a program that needs to know the indexes of the highest values in the vector, but I’m not getting the code I tried. #include <stdio.h> int main(int argc, char** argv) { double…
casked rafael marques 939 -
0
votes2
answers160
viewsQ: I am unable to copy characters from one string to another
I am making a program that until the user type +, the typed string will be copied to another, for example stack+, or the copied string would only stack, I tried to make the code below only that did…
casked rafael marques 939 -
1
votes1
answer68
viewsQ: Error in the conversion of numerical bases
Well I’m asking the question 1199 Conversion of Uri bases however in some cases my test passed, only when I put a number that the staff put in the forum gave error, the number was 0x80000000 the…