Posts by Braian Freitas • 159 points
22 posts
-
0
votes1
answer423
viewsQ: How to run an event in Codebehind being called by jQuery?
I have this code in Aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebSite.View.Index" %> <!DOCTYPE html> <html…
-
0
votes2
answers55
viewsA: Error searching/searching for attribute in a vector
As quoted in the previous answer, the resolution was in its getters and setters, and to no longer have this problem, there is an easy way to solve. Using Eclipse, when right-clicking on your class,…
-
0
votes1
answer87
viewsQ: How to update to a column of another table automatically when doing an update using Trigger?
CREATE TABLE TB_Empregado( nome varchar(50), rg int primary key, cpf varchar (11), salario money ) --- CREATE TABLE TB_Dependente( rg_responsavel int constraint fk_TB_Dependente_Empregado references…
-
0
votes1
answer41
viewsQ: How to create a precedent that accesses a substring and calculates using the substring as parameter?
I need to create a precedent that according to the substring of a title, calculate the average price of books with the substring passed as parameter, and the average price needs to be an output…
-
2
votes1
answer56
viewsQ: How to return table values using the SUM() function?
I have the following tables CREATE TABLE tbCliente ( ClienteID INT IDENTITY(1,1) PRIMARY KEY, ClienteNome VARCHAR(50), ClienteTelefone VARCHAR(15), ClienteDataCadastro DATE) CREATE TABLE tbPagamento…
-
0
votes1
answer43
viewsQ: How to return what the customer bought/paid?
I have the following tables: using JOIN CREATE TABLE tbCliente ( ClienteID INT IDENTITY(1,1) PRIMARY KEY, ClienteNome VARCHAR(50), ClienteTelefone VARCHAR(15), ClienteDataCadastro DATE) CREATE TABLE…
-
0
votes1
answer41
viewsQ: How to use regular expression without using the Regex class?
I need to validate the input of values and strings, but I have doubts about how to use without using the Regex class, how can I get the solution? var CampoExpressao = new Regex(@"[0-9]"); Above has…
-
0
votes1
answer237
viewsQ: How to add elements in Queue (Queue) continuously?
Below I have a code that he needs to do the following: Create a thread, then start it. When starting the thread, according to the time (random time) the program adds a value in the queue, after…
-
0
votes1
answer40
viewsA: Why does the matrix get extra lines?
private void TamanhoMatriz(ref string[] mt, ref int mt2, ref int mt3) { mt = richtxtLabirinto.Text.Split('\n'); mt2 = mt[0].Length; mt3 = mt.Count(); mt2 += 2;//colunas da matriz mt3--; //linhas da…
-
0
votes1
answer40
viewsQ: Why does the matrix get extra lines?
private void abrirLabirintoToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog Abrir = new OpenFileDialog(); Abrir.ShowDialog(); string CarregaArq = null; string teste = null;…
-
0
votes4
answers3044
viewsA: Problem using Setlocale in C
#include <stdio.h> #include <locale.h> int main(){ setlocale(LC_ALL, "Portuguese"); printf("Olá Mundo"); return 0; } The first letter must be uppercase, Lacobus gave you a hint to…
-
0
votes0
answers39
viewsQ: The value change in the integer array in one index works in one case, and in another it doesn’t, why?
private void btnRodaLabirinto_Click(object sender, EventArgs e) { char[,] Lab = new char[10, 10]; int[,] Lab2 = new int[10, 10]; int I = 0, J = 0; Random NumerosRandomicos = new Random(); //abaixo,…
-
0
votes1
answer43
viewsQ: How to create an array the same size as another array without copying it?
private void InversaoString(string Texto, int Tamanho) { char[] arrChar = Texto.ToCharArray(); char arrChar2; int indice = 0; for(Tamanho = arrChar.Length-1; Tamanho>=0; Tamanho--) {…
-
1
votes1
answer323
viewsQ: How to use free in a structure variable (chained list)?
I can’t use the free() in "struct Lista *proximo". Follows my code: #include "stdafx.h" #include <stdlib.h> #include <conio.h> #include <locale.h> struct Lista { int num; struct…
-
5
votes2
answers1175
viewsQ: How to get the representation of a positive integer in binary, using recursion?
I searched several sites, and in none I could understand how to make a conversion code using recursion from a positive integer to binary. I know there’s a function itoa but the challenge of the…
-
2
votes1
answer68
viewsA: Improvement and simplification of the Code
Example of improvement: if(op==1) when making decision command, use {} is easier to understand, imagine in a program you need to use for inside for inside while, and so on, soon, the use of the keys…
-
-1
votes1
answer142
viewsQ: Even using fflush, the fscanf function is not working
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <locale.h> struct cadastro{ char nome[30]; float notas[1][4]; int…
casked Braian Freitas 159 -
1
votes1
answer131
viewsQ: I need to match a string matrix to another matrix, how do I do?
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 3 #define LEN 80 char texto[MAX][LEN]; int main(){ char string[MAX][LEN]; …
casked Braian Freitas 159 -
0
votes3
answers1680
viewsA: How to put a whole word inside a char?
On your question have 2 points to understand, come on. 1º For the declaration of a char with some characters, be they special, numbers, what you find best, it is necessary to use keys [] and a…
canswered Braian Freitas 159 -
0
votes1
answer177
viewsQ: I learned to pass a vector as parameter, I would like to change and return the vector (vector_y1) to main, is there any way to do it without allocating? Please
#include <stdio.h> #include <stdlib.h> #include <locale.h> int vetor_y1(); int main(){ setlocale(LC_ALL, "Portuguese"); int i,j; printf("Inf. o…
casked Braian Freitas 159 -
0
votes2
answers44
viewsA: How to print only values other than 0
Make it easier for you to print everything #include <stdio.h> #include <stdlib.h> int main(){ float num, num1=2.56000, num2=5.00000, num3=3.60000, num4=27.36800; printf("Informe um…
canswered Braian Freitas 159 -
0
votes3
answers1075
viewsQ: I want to pass a parameter that is in the main for a function and perform a calculation, pointer exercise and function, how do I do?
Hello, good afternoon. I have a pointer in main that points to a variable (variable "Ex1"), and I need to do with calculus with it in another function... what I have now is like this... main() {…
casked Braian Freitas 159