Posts by Eduardo Mior • 525 points
29 posts
-
0
votes3
answers42
viewsA: Doubt with GROUP BY - MYSQL
Your question was unclear, I did not understand. But you can use the HAVING clause that allows you to do a type of WHERE in GROUP BY. Example SELECT sum(valor), nome_cliente FROM compras GROUP BY…
mysqlanswered Eduardo Mior 525 -
1
votes1
answer78
viewsA: How to recover a customer’s IP?
I work with golang, using EC2 and also have had similar problems. In GO I usually work with the GIN Framework to manage routes and endpoints, and to get the IP address of the request I use the…
-
-3
votes3
answers263
viewsA: What would be something "native"?
Nowadays, what is called hybrid development has become increasingly popular, whether on mobile or desktop platforms. Whenever we develop a software we choose which platforms we will develop it for…
-
1
votes1
answer117
viewsQ: Is it possible to force a class to implement a Java attribute?
It is possible to force a class to implement an attribute in Java? I know that through interfaces you can force the class to implement methods, but I would like to do this with attributes as well.…
-
0
votes1
answer40
viewsQ: What is the difference between operators <@> and <->
I was studying geometric types and coordinates in SQL, in Postgresql more specifically, and I came across two operators, the operator <@> and the operator <->. What’s the difference…
-
1
votes1
answer1116
viewsA: What is a "Postback"?
Postback is when you make a POST request for the same page, then it reloads and with the data you sent it modifies. Example: You have a page called Login.php or Login.jsp, when the user enters for…
-
2
votes4
answers254
viewsQ: Set Golang Standard Timezone
Is there any way to set a standard Timezone (Location) in Golang so you don’t have to be on time? I am currently manually setting the Timezone every time I need to work with Time using it: loc, _ :=…
-
3
votes1
answer64
viewsA: Number of methods per Java class
Yes there is a limit that is imposed by the Java JVM (Java Virtual Machine), this limit is 65535 which is the equivalent of 216 - 1, which is the highest number that can be represented by a 16-bit…
javaanswered Eduardo Mior 525 -
-1
votes3
answers781
viewsA: Problem reading UTF-8 files in PHP and right in the browser
Answering the two questions. . 1) Is there any way to force the browser to read the file in UTF-8 without the need to add BOM to the file? A: Yes, it is possible to "force" the browser to interpret…
-
3
votes2
answers1046
viewsA: What is the difference between KTS and KT extensions?
KT is a Kotlin source file, that is, a file with the source code of the application. A normal file with the source code. KTS is a Kotlin Shell Script file. A Script file. You can find more…
-
2
votes3
answers781
viewsQ: Problem reading UTF-8 files in PHP and right in the browser
I need to save a file .txt in UTF-8 in PHP. Saving the file is very simple, however, when opening the file directly in the browser (example www.site.com/file.txt) the browser cannot recognize the…
-
0
votes2
answers410
viewsA: Cassandra CQL Shell opens and closes
There are two ways to start the Database server, the first is by setting the location of the Database bin folder within the system variable PATH and just after opening the command prompt and simply…
-
0
votes5
answers628
viewsA: List keyspaces in Cassandra
To list all keyspaces in the process just use the following query: SELECT * FROM system_schema.keyspaces;
-
1
votes1
answer241
viewsQ: Where to place the @Produces and @Consumes annotation? In the method or class?
I have been studying the operation of REST Apis in Java and came across two different didactics. In one of them the teacher placed the notes in the definition of the class, this way:…
-
-1
votes1
answer511
viewsQ: Array[] in database, how to create and manipulate?
I own a array of integers, a int[]. Is it possible to save it directly to the database without having to Serialize? For example: CREATE TABLE teste( numeros integer[] ); And then use SELECT numeros…
-
0
votes1
answer51
viewsQ: Serivces on Android rebooting variables
Me developing a test application in which a Service is running in Background and is sending notifications to your phone every 10 seconds. To improve the test I created a counter that increases with…
-
-1
votes1
answer666
viewsQ: Difference between Error - Exception - Throwable within catch()
Always when I treated the catch I wore (Exception e) but a few days ago I came across an exception that did not fit the catch (Exception e) then I discovered that she is not really an exception but…
-
0
votes1
answer456
viewsA: Creating a new Object, and populating its properties, using Java Reflection
I’ve worked with reflection for a while, whenever I used reflection I used objects of type Object to pass by parameter, as you know all classes extend the Object class so thanks to the polymorphism…
-
0
votes2
answers148
viewsQ: Is it possible to extend a class via java Reflection?
I work with an API that changes the class name and package name whenever a major update comes out, however, I am required to support older versions of the API and for that I use Reflections in these…
-
0
votes1
answer143
viewsQ: Why do these two identical codes, one in C++ and the other in Java, give different results?
I’m trying to solve an issue in the URI Online Judge in Java but I’m afraid of 5% error, and what I’ve studied is being caused by the fact that the accuracy of variables in C++ and Java is…
-
-1
votes1
answer22
viewsQ: Active and root modifiers in java
My teacher passed some slides and he quoted two modifiers the root and the Active but I’ve never heard of them and from what I’ve researched they don’t exist in java, can anyone give a better…
javaasked Eduardo Mior 525 -
1
votes1
answer51
viewsA: Get full system memory and system components in java
After giving a study I managed to develop a method that does not generate errors and works perfectly using Reflection and the class OperatingSystemMXBean of java.lang private long…
-
-1
votes1
answer51
viewsQ: Get full system memory and system components in java
Is there any simple or reliable method to take the total memory of the computer and/or the components or models of the computer components? I did a lot of research and the only thing I found was…
-
4
votes1
answer99
viewsQ: Is it possible to change a String of a method at runtime?
If I have one String fixed within a method is it possible to change it using reflection or something like that? Example: public static void main(String[] args) { String nome = getName(); boolean…
-
0
votes2
answers1270
viewsQ: Is the dot and comma character (;) allowed in filenames?
The character ";" is allowed in filenames? In windows you can use the character ";" in naming files without any problem, but I do not know if the same rule is for Mac or Linux. I researched file…
-
0
votes4
answers141
viewsA: Is there performance gain using . replace() instead of . put() in a Map?
After several tests I came to a conclusion: The .replace It should only be used when you’re sure the KEY already exists. If you are not sure of the existence of KEY (like my case) is more…
-
1
votes4
answers141
viewsQ: Is there performance gain using . replace() instead of . put() in a Map?
Is there any performance gain using the method .replace() instead of using .put() in a Map. Studying Maps I noticed that the method .put() and .replace() have practically the same function. I made a…
-
8
votes3
answers374
viewsQ: "== true" is useful for something? Is it better "!" or "== false"?
Place == true is useful in checking, or is completely useless? You better use ! or == false. Example: if (pessoa.estaMorta() == false) .... if (!pessoa.estaMorta()) .... if (pessoa.estaViva() ==…
-
2
votes1
answer175
viewsQ: How to get the number of lines from a Stringlist and apply?
I have a StringList inside a file mensagens.txt, I’d like to count how many lines there are StringList contained within that file. For each line of the string 1 code will be executed within the…