Posts by Augusto Vasques • 15,321 points
571 posts
-
1
votes3
answers1018
viewsA: Call another class (Java)
You have to instantiate the class JFrame and call the method setVisible(boolean b) with the true parameter. import javax.swing.JFrame; public class Main { public static void main(String[] args) {…
-
1
votes2
answers87
viewsA: How to pass data from select to an array
To save data from a row of an Sqldatareader in an array use the method SqlDataReader.GetValues to populate the object array with the values of the current line. SqlConnection conConexao1 =…
-
1
votes2
answers361
viewsA: Export large amount of data to Excel
You can use the Clipboard to do the operation. For this amount of data will also take a little while, but it will be much faster than copying cell by cell private void btnExportar_Click(object…
-
0
votes1
answer90
viewsA: Larger and smaller DEV problem of a value
The first problem is that you destroyed the user input value during the digit sum process, so I created an auxiliary variable that receives the input value. Then the search processes of the largest…
c++answered Augusto Vasques 15,321 -
1
votes1
answer80
viewsA: Make a personal assistant
First thing you have to do is install in python a speech recognition library, in the case of this example the library is Speechrecognition. To install: pip install SpeechRecognition After a read…
pythonanswered Augusto Vasques 15,321 -
5
votes2
answers147
viewsA: Object Array (not objects) in Java - How to use
I created three classes: Commissioned, Hourly Salaried. To simplify the example I added only one field to each class: Commissioned.name, Hourly.age Salaried.salary. I copied the ArrayList c, h and s…
-
1
votes1
answer156
viewsA: BD creation with Mysql - Mariadb - Workbench
In creating the indices fk_funcionario_cargo_idx and fk_projeunc_funcionario1_idx remove the option VISIBLE. By definition Mysql indexes are visible. If you want to change the visibility of an index…
-
3
votes1
answer59
viewsA: Parse json with struct, error passing to array - Swift 4.0
I would need to see JSON but by the way you want the result should be a Array. On the line where it’s written: let datasInativas = try decoder.decode(dataInativa.self, from: data) Replace with: let…
-
0
votes4
answers1889
viewsA: Fill vector in C
I made only two changes to your code: I changed the line that was written scanf("%f", &[i]); for scanf("%f", ¬a[i]); and implemented a loop for around the line printf("As notas digitadas…
-
2
votes3
answers685
viewsA: Prevent the CMD command interpreter from using the operators passed via parameter/argument?
̶N̶ã̶o̶ ̶s̶e̶i̶ ̶s̶e̶ ̶v̶a̶i̶ ̶l̶h̶e̶ ̶s̶e̶r̶v̶i̶r̶ ̶m̶a̶s̶ ̶e̶m̶ ̶c #̶ ̶o̶ ̶q̶u̶e̶ ̶d̶á̶ ̶p̶a̶r̶a̶ ̶f̶a̶z̶e̶r̶ ̶é̶ ̶c̶r̶i̶a̶r̶ ̶u̶m̶ ̶s̶h̶e̶l̶l̶ ̶f̶a̶l̶s̶o̶(̶F̶a̶k̶e̶ ̶S̶h̶e̶l̶l̶)̶ ̶o̶n̶d̶e̶ ̶o̶…
-
1
votes3
answers96
viewsA: Generate HTML using Javascript
When you want to add HTML to elements of a page you can manipulate the property Element.innerHTML. In this example I started with a div divTelefone empty and each time the button to add phone is…
-
4
votes3
answers485
viewsA: Aid in SELECT DISTINCT
I thought the following, as you want the latest update according to the date so you want the highest value date. So I did the same SELECT but I added a clause WHEREwho uses the function MAX() to…
-
1
votes1
answer183
viewsA: How to create transparent and tangible component - Windows Form C#
To make the Panel transparent adjust the property panel1.BackColor with the method Color.FromArgb where the alpha argument regulates the degree of transparency, Example: // Para uma cor sólida alpha…
-
1
votes1
answer71
viewsA: Read something after a C#keyword
Use the regular expression [^\\s;\\\"]+\\\"[^\\\"]+\\\" to pick up the kind of tickets <identificador>:<valor>. Separate <identificador> of <valor> with String.Split(':');…
-
0
votes2
answers1240
viewsA: By clicking the button to call function Avascript the sume button
When you use document.write() it overwrites the content of the page, so your button disappears. Create a div to receive the result and then modify the property innerHTML to change the content of…
-
0
votes2
answers582
viewsA: Is it possible to run an . EXE application from a Windows Service?
Try this: <<WARNING>> I do not know if it will work because Services have an isolation mechanism that cannot invoke windows. I don’t know if this applies to windowless processes. If a…
-
0
votes3
answers372
viewsA: Help with VBA - Excel to TXT
Not to display the save dialog, just remove the line saveFile = Application.GetSaveAsFilename(fileFilter:="Text Files (*.txt), *.txt") for the method Application.GetSaveAsFilename is who displays…
excel-vbaanswered Augusto Vasques 15,321 -
2
votes2
answers226
viewsA: Error in program c# with vectors
Two things you have to take into account. Vectors in C# has as its first index zero. Vectors in C# has as its last index Length - 1. Aware of this: public static void Main(string[] args) { int n =…
c#answered Augusto Vasques 15,321 -
5
votes1
answer245
viewsQ: Can anyone explain to me the working logic of this pattern
I am writing a compiler Scheme R6RS(school work). It is working perfectly with the exception of this standard proposed in the manual 11.19 - Macro Transformes: sintaxe-rules. I have read and reread…
-
6
votes3
answers201
viewsA: Rounding up
To round up use static method Math.Ceiling who accepts a Decimal or Double and returns the smallest integer value greater than or equal to the specified decimal number (rounds up). Example: using…
-
1
votes1
answer507
viewsA: How to install Node.js v.10 on Linux (16.04 LTS)
I installed an Ubuntu 16.04.11 with as little as possible. As root user first thing I did replicate your first command: curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - then changed…
-
1
votes1
answer825
viewsA: Bug in VS Code output terminal characters
To resolve manually modify the configuration from the Vscode terminal. "terminal.integrated.shellArgs.windows": ["/k", "chcp 850"]…
-
1
votes1
answer161
viewsA: Button pause music player
Don’t use the class System.Media.SoundPlayer this is a very limited functionality and does not have the method Pause that you need. Use the class System.Windows.Controls.MediaElement who possesses…
c#answered Augusto Vasques 15,321 -
4
votes4
answers587
viewsA: How to correctly send the value of a null variable in an INSERT?
Use a conditional expression to check if parametro2 is empty or void await b.EnviaMySQLInsert( $"INSERT INTO tabela(parametro1, parametro2) VALUES('{parametro1}', {…
-
0
votes1
answer463
viewsA: Typescript error: Cannot find module 'os'. how to resolve?
On the line that generated the error replace it with: import * as os from 'os';
-
2
votes1
answer92
viewsA: What is Syriac Language in the Assembly Context
The machine language is usually accompanied by a "readable" version called Symbolic Language or simply Assembly. Symbolic because this language is not composed of binary or hexadecimal numbers. The…
assemblyanswered Augusto Vasques 15,321 -
1
votes2
answers1749
viewsA: How to browse a dataGridView and store the values in a List or Array
First of all you have to create an elementary structure to receive your data. In this example I created a struct calling for Individuocontaining three fields nome, email and telefone. For this…
c#answered Augusto Vasques 15,321 -
2
votes2
answers1075
viewsA: Connect SQL Server database to Django
First thing to do is install the package with Django backend for Azure and SQL Server: pip install django-pyodbc-azure Then in the Django settings file(Settings.py) look up the dictionary DATABASES…
-
1
votes1
answer152
viewsA: Problem in returning Struct in C
One thing don’t use the function gets, gets is evil. Prefer scanf. Another thing you stated alunos as a two-element vector, alunos[0] and alunos[1]. Only in your code you were trying to display…
-
1
votes2
answers47
viewsA: Mysql Query with Infinite Loop in C#
In the third line you create an empty list codigosNoticiasthat is to say codigosNoticias.Count == 0 So on the fourth line you use codigosNoticias.Count to compare with i what makes the code inside…
-
2
votes2
answers67
viewsA: How to programmatically rescue a newly inserted auto increment ID in JDBC?
I don’t know if this is what you’re looking for, but you can use the method overload Connection.prepareStatement(String sql, int autogeneratekeys) that accepts a flag indicating how auto-generated…
-
0
votes2
answers64
viewsA: Index('+') works but Index('*') is not working?
In the lines in which it is written : Int32.TryParse(input.Substring(timesIndex, input.Length - timesIndex), out int number2); Replace with: Int32.TryParse(input.Substring(plusIndex + 1,…
-
1
votes3
answers517
viewsA: Take information from a Website and Label it?
The error occurs because you are trying to get 'Document' before the page is loaded. To fix just take elements on the page only after it is loaded. To know if the page has been fully loaded use the…
-
1
votes2
answers759
viewsA: Problems connecting to sql server with Visual Studio and C#
At the url Data Source use the slider backwards \. // Nào esqueça de usar a sequencia de escape \\ public DataContext() : base("Data Source=localhost\\SQLEXPRESS;Initial Catalog=DocManager;User…
-
1
votes2
answers203
viewsA: Sum of series 1+(2*3)+(4*5*6)+...+ n with iterative implementation?
Can’t make that sum up in a direct way as you’re trying to do. To solve this problem have a trick, you have to create a function that calculates the first term only instead of it returning the…
c++answered Augusto Vasques 15,321 -
1
votes2
answers49
viewsA: Optimization/correction in "Dbcontext.Savechanges()"
Excuse me you were right there was a simpler solution and it did not involve used memory count: foreach (var myObject in allObjects) { try{ dbContext.MyObject.Add(myObject); } catch…
-
0
votes1
answer68
viewsA: Windows Forms + windows service
The tool Installutil.exe is a command line utility that allows you to install and uninstall resource servers running the installation components in specified assemblies. Installutil.exe uses…
-
3
votes2
answers123
viewsA: How does a method with the same name return more than one object type?
Take a look at the signature of these objects: FilesResource.CreateMediaUpload Filesresource.Createrequest So much CreateMediaUpload and CreateRequest are functions that returns objects(Object…
-
0
votes1
answer166
viewsA: Criteriabuilder
Use the method between of the interface CriteriaBuildertesting the first expression to see if it is between the second and third expression. In the example I use your code to sum sales in April.…
-
2
votes1
answer350
viewsA: Does not contain a constructor that takes 0 arguments
You urged TelaInicio using a constructor that requires no arguments: Application.Run(new TelaInicio()); //aqui ocorre o erro But in the class declaration TelaInicio has been declared a single…
-
6
votes2
answers113
viewsA: Nullreferenceexception
You can use the null coalescence operator ?? which returns left operand if the operand is not null and otherwise it will return right operand. Using your last condition as an example: if…
c#answered Augusto Vasques 15,321 -
0
votes1
answer169
viewsA: java.lang.Nullpointerexception: Attempt to invoke virtual method 'java.util.List .adapter.Conversasadapter.getConversas()' on a null Object Reference
You forgot to initialize this instance adapter yellow dial.…
-
1
votes1
answer129
viewsA: How to make a graphical interface of a menu?
In C it is possible to make graphical interfaces yes! You have to have the headline windows.h to access the windows API. #include <windows.h> const char g_szClassName[] = "myWindowClass";…
-
0
votes1
answer50
viewsA: Error accessing C# Visual Studio database
Go to the Mysql console and connect to the database and type: SELECT Host, User FROM mysql.user; Look for the localhost line, root. If it is not present create the user 'root'@'localhost' with your…
-
2
votes1
answer220
viewsA: C# problems loading Data Grid using Datetime
Change the character of the project Defaltcellstyle.Format to the Custom time and date formatting string "dd/MM/yyyy". Supposing that your DataGridView be called dataGrid and the time/date column…
-
1
votes2
answers61
viewsA: How to update two tables
Combine the two tables with JOIN using your primary and foreign keys. The appointment will stay like this: UPDATE CLIENTE INNER JOIN CONTATO ON CLIENTE.idCliente = CONTATO.idCliente SET CLIENTE.nome…
c#answered Augusto Vasques 15,321 -
1
votes3
answers118
viewsA: Where am I going wrong to calculate age?
Hitching a ride on @hkotsubo’s reply, DateTime is misspelled, plus a few syntax errors, for example when using $this->dataNasci to refer to the parameter it is sufficient $dataNasci as it is a…
-
5
votes5
answers304
viewsA: because my class only returns NULL
Your question is: Because my class only returns NULL? Its class does not return null. Who returns null is the method getContato($nome, $sobrenome) class msgContato Let the evidence: Declared the…
phpanswered Augusto Vasques 15,321 -
1
votes1
answer235
viewsA: I’m having an error in stored Procedure , probably within IF
You have to inform which database you are using, because each system has its particularities. This syntax is looking like Mysql, on account of DELIMITER, if that’s the problem BEGIN and the end of…
-
1
votes1
answer530
viewsA: You must declare a body because it is not marked as Abstract, extern or partial
You’re trying to implement the class SendKeys? Don’t do this! SendKeys is a class that provides methods to send a keystroke to the application. When you need to use the functionality of this class…