Posts by WSS • 1,326 points
71 posts
-
5
votes2
answers319
viewsQ: What is considered when ordering a varchar field? Being filled in by numbers
I have a table with the birthday of the month, for a reason of use here we should store this as varchar. When using it it is necessary to sort by date from the most recent to the oldest, the same…
-
1
votes1
answer2179
viewsQ: Automate printing of files within a folder
I need to make any file that is in the folder, example c://imprimir automatically printed, check if you have something and send it to standard printer. I’ve been searching in Python but I was able…
-
0
votes1
answer1789
viewsQ: Passing id with Hidden field via $_POST
I created a form when I click the 'change' button it sends the data via $_POST and calls the page that will update. But is this a good practice? More curiosity, I’m learning some concepts yet.…
-
1
votes2
answers441
viewsQ: When I use the __Construct method do I not need to use get; set?
I have the method __construct in the class, I must create the set and get methods? <?php class Produto{ //atributos private $descricao; private $preco; //método construtor public function…
-
0
votes3
answers2778
viewsQ: Separate data from a txt file
I have a relatively large file of data, which I removed from a time-stamping machine, but it comes in the following way: 00003000527005792012635570932000219305130720170713…
-
0
votes0
answers61
viewsQ: String to float conversion error
I need to input this function and this value to make the calculation but this conversion error #1ª tentativa x0 = float(input('valor: ')) fx = float(input('função')) #Exemplo: (x0**4)^2-9*x0…
-
1
votes1
answer2590
viewsQ: Check the highest prime number - using while and if only
I’m having trouble solving an exercise in logic, I think I’m thinking wrong: What I need: Given a number N show the largest prime number up to N. The code I’ve made so far is this: def…
-
2
votes2
answers3424
viewsQ: How to clean Listbox
How to clean a ListBox? I did it this way but it didn’t work: private void LimparListBox() { //lbxResumo.Text = ""; lbxResumo.ClearSelected(); } private void btnLimparList_Click(object sender,…
-
1
votes1
answer27
viewsQ: Event validating is not working
I have this form: As the person puts the date of birth and clicks on identify category is made two checks: If the name has been filled in; If the date of birth is greater than the current date; But…
-
0
votes2
answers64
viewsA: Cellclick event, does not return Datetime value
I managed to solve the problem: The problem was in two places: 1º I wasn’t taking the selected line from DataGridView to add this code to the event Cellclick: poc = dgvOS.CurrentRow.Index; And the…
-
0
votes1
answer195
viewsQ: Report from a form with no database
My question is, can I generate a report (I don’t know if I can call it that): Report: Date of payment Client: xxxxxx xxx xxx xxxx Payment date: xx/xx/xxxx Signing It would be a very simple layout…
-
0
votes2
answers64
viewsQ: Cellclick event, does not return Datetime value
I’m recording some data on DataGridView and in the Event CellClick should fill in the DateTimePicker with the value already registered, but I’m doing something wrong. Buttons: record, edit, delete…
-
0
votes1
answer514
viewsQ: Listbox - Multiply values and move to another Listbox
I have 2 Listbox. When I pass a value to the other Listbox opens a screen to enter the amount I want of that product. That said, it will take the quantity * value and show in the other Listbox. Code…
-
1
votes3
answers569
viewsA: Listbox - how to show full product name and bring up another column of values
For knowledge purposes, I was able to implement using the ListBox also, in this way: private void frmOrdemServico_Load(object sender, EventArgs e) { string[] lineOfContents =…
-
3
votes3
answers569
viewsQ: Listbox - how to show full product name and bring up another column of values
I have this ListBox. When loaded he wears one txt file being like this: Code to load the ListBox: private void frmOrdemServico_Load(object sender, EventArgs e) { string[] d =…
-
1
votes1
answer368
viewsQ: Load two fields from a Datagrid using a txt file
How can I do this, see what I have so far: Datagrid, I need to load the comboBox and the valor unitário with values I previously saved on a txt Button save products, save name - price private void…
-
2
votes1
answer669
viewsQ: Save to txt file and recover in a combobox
This is what I need to do: Registering a customer on the form. Save the nome of clients that are registered in a txt file on the computer, example: John Marcos Willian Load these names into a…
-
0
votes1
answer276
viewsA: Datagridview - Edit by Currentrow.Index does not leave Index 1
Well, I found where the mistake was. Wrong: private void dgvClientes_CellClick(object sender, DataGridViewCellEventArgs e) { int poc = dgvClientes.CurrentRow.Index; txtNome.Text = dgvClientes[1,…
-
1
votes1
answer276
viewsQ: Datagridview - Edit by Currentrow.Index does not leave Index 1
Note: I’m learning to use Datagrid, so I’m testing some examples. I have this form: And this code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;…
-
6
votes2
answers1345
viewsQ: Change Boolean column to integer
I’m using a database that has a field called: status: boolean, but I want to store in it the values of the radio button (0,1,2) so I need to change to integer. I’ve tried to: ALTER TABLE OS ALTER…
-
0
votes1
answer287
viewsQ: Load Combobox with concatenated string
Code that loads the comboBox: private void frmAdicionarProdutos_Load(object sender, EventArgs e) { this.Load += new System.EventHandler(this.frmAdicionarProdutos_Load); string serverName =…
-
2
votes2
answers318
viewsQ: How to load values in the combobox by the form load event C#
I’m trying through this code: private void frmAdicionarProdutos_Load(object sender, EventArgs e) { string serverName = "localhost"; string port = "5432"; string userName = "postgres"; string…
-
0
votes1
answer738
viewsQ: How to return a Datareader C#
I know I’m doing it wrong. But I would like to know if it is possible within what I am trying to return a dataReader. See, I created a class called client that has the method "Searcher" the same has…
-
1
votes1
answer102
viewsQ: Executereader how to fill in the fields by searching
I’m having a problem understanding how to return the values within windows form (fill the textbox, etc). This method executes the Reader data but I don’t know how I can use it to fill in the fields.…
-
0
votes2
answers77
viewsQ: Error trying to save combobox and Masktextbox
I have a form with two fields: 1 Combobox I put the type of people (Physics or Legal); 1 Masktextbox with CPF; At first I don’t know what’s better if I keep the value of Index of the combobox or its…
-
1
votes1
answer448
viewsA: Problem connecting Access to Visualstudio
I fixed changing the extension while saving the file from: .accdb for .mdb Grateful!
-
1
votes1
answer82
viewsQ: Nullreferenceexception when trying to write to database
I have this error, when I will record the form data in the database. Error: System.Nullreferenceexception: System.NullReferenceException ocorrido HResult=0x80004003 Message=Referência de objeto não…
-
0
votes4
answers1289
viewsQ: How to write a Datetimepicker to the database
Hello, I have a form with the Datetimepicker - Short (only the date). And in the database I put DataEntrada DATE My problem is, I created an insertion method but I don’t know how to pass the…
-
0
votes1
answer69
viewsQ: Postgresql/Visualstudio database modeling
Hello. I have this form: How much the modeling of the bank there in the part of "products" I intend to load all products(name, quantity available, unit value) and when the person selects some and…
-
1
votes1
answer448
viewsQ: Problem connecting Access to Visualstudio
I created a small database in Access and I’m trying to make the connection with Visualstudio, but gives the following error message: Unrecognized database format 'c: Users wss desktop dbteste.accdb'…
-
0
votes1
answer70
viewsQ: Is it possible to create a class from a Forms opening routine? How?
I have several forms that I’m 'instantiating' by the event click on the toolstrip, but it seems that it is getting polluted since all codes do the same routine changing only the parameters. Event to…
-
0
votes1
answer45
viewsQ: Enable tab in Readonly = true fields | Visual Studio
Hello, I have this code in the Combobox event, when I select who is a Physical person it enables the relevant fields and blocks those of "Legal" person and vice versa. However it is still possible…
-
0
votes2
answers161
viewsQ: How Forms are opened - Visual Studio
Good morning, My problem is that when I start the program it gets like this: That is, the form child nor scroll bar has there cut the other options To solve, I maximize the parent form, but it looks…
-
0
votes1
answer155
viewsQ: Conflict when opening multiple screens in the menuStrip - Visual Studio
I have 3 forms. Parent Form (Main) Child Form (Services) Child Form (Suppliers) What’s happening.. I block the person from trying to open more than 1 time the same form, but when they try to open…
-
1
votes1
answer2621
viewsQ: How to call the form inside another - Visual Studio
I have the parent form with a Trip menuStrip. I’ve already set him up as isMdiContainer = True And I have another form I call Services. In the event MenuStrip > Service I put this:…
-
-1
votes2
answers94
viewsQ: Problem when receiving char values
Why the first time I pass an error char value (as if it were empty)? Then the second try works normal? After I received the initial post or shift of error and yet I gave one Writeline was with the…
-
0
votes1
answer610
viewsQ: Value comparison
I need to make two comparisons as the person enters data: Higher height; OK Shorter height; (turned bad) I cannot use vector in this case, because it is a requirement of exercise. In this case I was…
-
1
votes1
answer159
viewsQ: Problem saving Combobox data to Postgresql
First this is the bank code I’m using: CREATE TABLE perguntas ( cod_pergunta SERIAL PRIMARY KEY NOT NULL, pergunta VARCHAR(500), opcao_um VARCHAR(500), opcao_dois VARCHAR(500), opcao_tres…
-
1
votes1
answer311
viewsQ: Problem using function . Join()
What’s wrong with this code of mine, I used the function. split() to separate the string when it finds ' ; ' after separating I wanted to join back by placing spaces so I used the . Join(), but saw…
-
0
votes1
answer195
viewsQ: Error file path to run mp3
I was solving a proposed exercise in a course that consisted of running an mp3 file passing the path of it, I searched a little and I arrived at this code: from playsound import playsound…
-
2
votes6
answers1851
viewsQ: Interlink two strings into one vector
/** 5. Faça um programa que receba 2 strings (A e B) e retorne uma terceira string (C) formada pelos caracteres de A e B intercalados. Ex.: Se A='Quarta' e B='Segunda', a resposta deve ser…
-
0
votes4
answers7433
viewsA: Reverse vector position/value
I managed to resolve after the @Wtrmute give a light in my thoughts, thank you. #include <stdio.h> #include <stdlib.h> int main(){ int cc[5], inverso[5]; //conta corrente int i=0, k=0;…
-
0
votes4
answers7433
viewsQ: Reverse vector position/value
I need to reverse one vector and store in another one this way: vector[5] = [1,2,3,4,5] < I will pass the values like this inverse[5] = [5,4,3,2,1] < And accurate to invert values and…
-
7
votes4
answers4690
viewsQ: Caesar cipher - problem with letters and spaces
I’m doing an exercise on the figure of the table below: #include <stdio.h> #include <string.h> main(){ char frase[200]; printf("String: "); gets(frase); for(int i=0; i <…
-
2
votes1
answer118
viewsQ: Type of char data needs space after quotation marks in the scanf
#include <stdio.h> #include <stdlib.h> void main(){ char elevador; int cod=0, a=0, b=0, c=0; while(cod == 0){ printf("\nElevador utilizado (a/b/c)? "); scanf("%c", &elevador);…
-
1
votes1
answer98
viewsQ: Function is zeroing last vector value
#include <stdio.h> #include <stdlib.h> /** 2. Faça um programa que, a partir de um vetor de 12 posições, crie funções para: A. Digitar valores no vetor; B. Imprimir o valor somatório de…
-
2
votes2
answers71
views -
1
votes1
answer27
viewsQ: Switch command running even without being called - C
I’m solving an exercise in logic and I can’t understand the error: #include <stdio.h> #include <stdlib.h> int main(){ int TotalVinhos=0, t=0, b=0, r=0, fim = 0; //float Porc; char tipo;…
-
1
votes1
answer327
viewsQ: How many percent N item represents in the overall total - Query
Good morning, I’m creating an ABC curve report but I’m beginner and I’m still having some difficulties. I have a table called ITEMS. With fields: COD_ITEM, Quantityevenda, Valorunitario, Subtotal,…
-
1
votes3
answers3909
viewsQ: How to install pytest in windows 10 - 64 bits, python3
I need to install pytest, it was suggested that I run the command on cmd: Pip install -U pytest but of error: 'Pip' is not recognized as an internal command or external, a operable program or a…