Posts by Monteiro • 514 points
26 posts
-
0
votes1
answer194
viewsQ: Comparison of if-Else not continuing even with Else in Java
I have two variables: int trabalhadorFormal; int dispensadoIndireta; And I’m wearing them JOptionPane.showConfirmDialog to confirm as a kind of Boolean, yes or no, for the user. trabalhadorFormal =…
-
0
votes2
answers462
viewsQ: How to open a new window through PHP with the results of a SELECT?
I have a form in which the user will be able to select several subjects, being then selected a subject, through PHP I will pull from the database by SELECT and I will show on the screen with echo…
-
2
votes1
answer69
viewsQ: How to select columns in which years are equal in Oracle?
I have a table called Clientes, and in it I have the following columns : id_cliente nm_cliente dt_nascimento I need to select and count all customers who were born in the same year. I have tried…
-
1
votes1
answer949
viewsQ: Data being repeated when using INNER JOIN on Oracle
I have three tables, which are the following : ALUNO,CLASSE and MATRICULA. PUPIL NR_RGM NM_NOME NM_PAI NM_MAE DT_NASCIMENTO ID_SEXO CLASS CD_CLASSE NR_ANOLETIVO CD_ESCOLA CD_GRAU NR_SERIE TURMA…
-
1
votes1
answer1015
viewsQ: Select two tables with different columns in ORACLE
I have three tables, one call ALUNO, a callMATRICULA and another call CLASSE and I need to select all students who are male and who belong to the same class as a student who has a specific RGM. The…
-
5
votes2
answers5974
viewsQ: How to use ALIASES in Oracle correctly?
I’m trying to select several columns from a single table, and to facilitate the process of viewing the data and making it easier to separate the columns, I decided to use aliases. But the problem is…
-
2
votes1
answer1442
viewsQ: How to do sub-query correctly in Oracle?
I need to do a sub-query of a table to find all employees who work in the same department that is part of São Paulo, but I’m not getting it. That is, I need to select from the three tables,…
-
0
votes0
answers78
viewsQ: How to correctly insert data in a Javascript queue?
I have to enter some data in a queue, and I have the following functions : Insert Rpos - which will insert the data position, Removerpos - which will remove the data position, Lerlist - which will…
-
1
votes1
answer131
viewsQ: How to row and row with separate rows in Javascript?
I have two rows, and each of these rows will be filled by 3 numbers. The user will place the numbers through the prompt, that will appear on the screen only after entering the data. Even this part…
-
2
votes1
answer709
viewsQ: Stacking and popping with javascript queue
I have to stack 3 values that are typed by the user through the prompt, and after this pop up, showing the result on the screen. The problem is that after the user enters the 3 values, it appears…
-
1
votes2
answers13323
viewsQ: How to add foreign key with Constraint and alter table in Oracle?
I have the following tables : Create table OS( nro_os number(4), data_os date , hora_os number(4) ); Create table cliente( cod_cliente number(4), nome_cliente varchar(12), endereco_cliente…
-
1
votes1
answer2740
viewsQ: How to use LIKE with OR on Oracle?
I have the following table: CREATE TABLE DEPENDENTE ( IdDependente number(6), Matricula number(6), Nome char(50) NOT NULL, dtNascimento date, constraint pk_IdDependente PRIMARY KEY(IdDependente),…
-
1
votes1
answer84
viewsA: Why is this result giving as 0 in Java?
I was able to find the error if where he skipped the verification part inside the if and returned as 0 the result because res = 0. My neat code : int n1 = 20; int n2 = 20; int res = 0; String op; op…
-
-1
votes1
answer84
viewsQ: Why is this result giving as 0 in Java?
I’m making a program where you have a small and simple calculator, basically the user will have the mathematical expressions (+,-,*,/) and you can choose between one of them and then the result will…
-
6
votes2
answers140
viewsQ: Is Array a C pointer?
I am reading a book about C pointers, but as I am new to such a language, still for me the concept of pointers is a bit complex, and when reading the following definition, I came to the question…
-
1
votes1
answer661
viewsA: Javascript - formatMoney - How to use
You can use toFixed , according to his documentation¹ he : Converts a number into a string, leaving only two decimals. But of course, you can format to more decimals if you want. Example : var valor…
javascriptanswered Monteiro 514 -
1
votes1
answer117
viewsQ: How do I output my array’s Indice in C?
I have a program that will check 9 numbers and tell which one is the biggest of all, and for this I am using vetor already filled with values, and I’m using a for to go through the whole vetor and…
-
0
votes1
answer81
viewsQ: What’s going on here on this C show?
I’m making a program where the user enters with 10 values, and at the end of this, presents a message saying the total value. My code : int rep,valor,soma; while(rep < 10) { printf("Digite um…
-
1
votes2
answers9247
viewsQ: How to check if one string is contained in another in C?
I have two variables: char s1[20]; char s2[20]; I’ll go get the input user of the two variables, and after this, I need to check whether s1 is contained in s2, even a part of it. For this I will use…
-
2
votes1
answer2788
viewsQ: How to properly use memcpy?
I’m trying to create a program where it will have two vectors : char vetor_origem[20] = "algoritmo"; char vetor_copia[20] In what can be seen, in the vetor_origem I have the word algorithm written,…
-
0
votes0
answers39
viewsQ: How to copy string from one vector to another vector in C?
I’m trying to create a program that will have a function called substring where the user will place the index position of an origin vector in which it will copy and the size of how many letters it…
-
1
votes1
answer32
viewsQ: Can’t it be used as a function?
I’m creating a program that sorts some numbers from a vector, so it’s a bubble sort. I’m using a function called trocar to exchange seat numbers when one is larger than the other, but the compiler…
-
1
votes3
answers5789
viewsQ: Check whether a date is valid in C or not?
I need to check if a date is valid or not in C, and for this I will have a function called verificarData that will be passed to it the user input and will check whether or not it is a valid date.…
-
0
votes2
answers756
viewsQ: Creating a regex for vowels in C
I need to create a regex check if a word contains vowels, and after creating this check, I will cut out the vowel parts of this word, but I don’t know how to create a regex in C. I saw some codes so…
-
0
votes2
answers397
viewsQ: bodyParser is not set error in Node.js
I am trying to create an HTTP server that you will use bodyParser() to request the part of middleware before the handlers. But when trying to use it in the code, indicates error saying that it is…
-
3
votes1
answer10220
viewsQ: Generate random numbers in C?
I need to generate 5 random numbers in a range between -10 and +10. How could I do this ? I’ve seen that one can use shuffle, malloc or even realloc, but being new in C, I don’t quite understand how…