Posts by Maniero • 444,682 points
6,921 posts
-
2
votes3
answers226
viewsA: How to use Getsetting/Savesetting in Windows Services
What you normally want is obtained through the class Registry.Something like that: Registry.GetValue("HKEY_CURRENT_USER\\Chave", "ChaveEspecifica", 0) I put in the Github for future reference.…
-
9
votes2
answers3250
viewsA: How can I purchase HTTPS in my web application?
You should use in applications you need to protect the data you traffic. And only this data. Never use HTTPS for data that does not need to be protected as there is an extra cost to handle this…
-
89
votes6
answers24661
viewsA: What is the difference between declaring variables using Let and var?
There is a difference in scope. You should know that any variable "declared" without let, var or const has global scope, applies to all script. Maybe you know you should always use the var to make…
-
3
votes1
answer136
viewsA: Generate a random value in a range, excluding a range
The problem is that the code doesn’t even enter the loop since the initial value does not meet the condition placed. You have to perform the first time unconditionally using do ... while.…
-
4
votes4
answers1799
views -
14
votes1
answer1866
viewsA: What is the difference between printf() and print()?
The most common in Java is to use System.out.print() (or with the ln if you want to skip line, but this you already know) but if you need certain formatting the use of System.out.printf() may be…
-
3
votes1
answer794
viewsA: How to save byte array in PHP file?
You need package the array and record. Well roughly speaking since you have not given details of what you want, nor demonstrated what you have already done you can do so: foreach ($imagem as $byte)…
-
10
votes2
answers159
viewsA: "1-----1-+-1" is a valid integer value in PHP?
According to the documentation, yes. You know, it’s PHP, things are made to work more or less. And the function does what promises even if the expectation of the programmer is another: Remove all…
-
6
votes4
answers1991
views -
9
votes2
answers552
viewsA: Dividing 1/2 in C#
All right, the guy Decimal has a limited accuracy, if you want greater precision you should use another structure or create a specific one. Take a look at BigInteger. Obviously the BigInteger does…
-
11
votes2
answers1232
viewsA: Using Java together with C
If you just want to communicate between two programs, there is no great difficulty if the device provides resources for that. Programs communicate all the time and no matter what languages they are…
-
108
votes6
answers32107
viewsA: What is Vanilla JS?
You saw right, it’s pure Javascript. Perhaps the form presented to look like a framework is intended as a joke since there is criticism about the proliferation of frameworks which in general add…
-
4
votes1
answer88
viewsA: Get Rows from at least 3 days ago
Your where must be: WHERE DATE(date) < DATE_SUB(CURDATE(), INTERVAL 3 DAY) I put in the Github for future reference.…
-
20
votes3
answers13485
viewsA: Change the Datetime Timezone.
You need to convert to the desired spindle thus: TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("E. South America Standard Time")) Behold working in the .NET Fiddle. Also…
-
3
votes1
answer2262
viewsA: DER for student, discipline and course
I’ll give you an answer to give you some guidance. If this is not what you need, complicated, because we can not stay debating here until you get where you want, would be a question and an answer.…
-
1
votes2
answers607
viewsA: How to not send Target files
I don’t know Eclipse but I think you should do this manually on the command line: svn propset svn:ignore Target . svn:ignore is the property that does what you want. Use propedit if you need to…
-
1
votes2
answers908
viewsA: Pass connection string to dataset via code
It’s no secret: var connectionString = "Data Source=MSSQL;Initial Catalog=SeuBanco; Integrated Security=true;"; using (var connection = new SqlConnection()) { connection.ConnectionString =…
-
69
votes8
answers13920
viewsQ: Is <br> or <br/> or <br />right?
I see each one using a way, I even vary the shape in a few moments and all work, but what is the right one? It depends on HTML version or the browser?
-
23
votes8
answers13920
viewsA: Is <br> or <br/> or <br />right?
<br/> and <br /> are essentially the same thing. The space is usually used to facilitate visual identification of the bar and is recommended, but not required, by the XHTML…
-
8
votes2
answers15519
viewsA: Indefinite reference of functions
Try compiling with: gcc -o testit main.c geometria.c interface.c The fact that you put #include with headers does not make the codes to be included as well. Then you have to indicate to the compiler…
-
2
votes4
answers964
viewsA: How to do advanced data filtering across multiple fields?
This is a little weird and doesn’t have enough information but come on. select * from tabela where user_id = $user_id || user_group = $user_group || find_in_set($user_level, user_level) ||…
-
2
votes1
answer84
viewsA: Write only one field to the database
I would advise you not to put two pieces of information together in one ListBox. But if you want to insist on this you can have a solution. If you don’t know the size of the field you can do this:…
-
16
votes4
answers58562
viewsA: Css comments with // instead of /* */
Today cause no problem. But what about tomorrow? You should not use anything that is not in the specification precisely because it is not Future Proof. If you use this and in the future the…
-
4
votes3
answers4171
viewsA: Time in Java counting seconds in real time
According to that response in the OS you can do it like this: import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main {…
-
2
votes2
answers230
viewsA: How to verify if a file name has 16 digits?
I believe you are trying to get the file name without extension so you should use the method GetFileNameWithoutExtension(). I’ll edit it if you give me more details. foreach (var file in…
-
4
votes1
answer107
viewsA: Two different builds same source Visual Studio
First you need to create a new configuration in VS. I took some images to help in Scott Hanselman’s page. Go to the Configuration Manager: Create a new configuration on the selector you probably…
-
4
votes1
answer1297
viewsA: What would be "Server Signature" and how to turn it off?
It is the information that the HTTP server provides in some circumstances such as error pages and headers. This is not so critical as it only provides useful information for hackers. You should add:…
-
6
votes3
answers2948
viewsA: How to add contiguous numbers from an array?
Keep adding as you receive the data. import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); ArrayList<Integer> lista = new…
-
10
votes1
answer209
viewsA: Concatenate parts of variable names
You can’t do that, at least not directly. And even with the gambit you can do, it will produce one of the most bizarre codes I’ve ever seen. If you call all variables of the same name you should use…
-
5
votes3
answers205
viewsA: Problems with logic (&& or ||)
Read again looking character by character. Your reading of the code, according to the explanation you wrote below it is taking into consideration that you are seeing if both are equal 3 and 4 at the…
-
11
votes1
answer596
viewsA: How does software licensing work?
Put a plain text file or embed in the code expressing the license rules. Better yet, use a standard text from a standard license. Seek a lawyer. Enter your name and year. Example: 2015 © Sid. This…
-
17
votes1
answer511
viewsA: What is the technique of hiding components to ensure information?
The original term is Security through obscurity or security by obscurantism, in Portuguese. Contrary to what some preach, it is a very effective technique. It is something extremely used inside and…
security-guardanswered Maniero 444,682 -
15
votes2
answers189
viewsA: Are libraries downloaded multiple times?
If they are coming from the same URL and there is no indication/setting otherwise is to cache within certain policies set by browsers/users. To use what is cached a read attempt is made and must…
-
5
votes3
answers1220
viewsA: Get timestamp
It’s just a matter of formatting the content. First you can’t have the date and time so loose, probably you have as string. And then you need to separate the two contents with a blank space. var…
-
6
votes2
answers10071
viewsA: Update to clear entire column
It would be quite trivial to annul if possible and desirable: UPDATE tabela SET dt_atualizacao = null; Or put a very low value: UPDATE tabela SET dt_atualizacao = TO_DATE('0000-01-01 00:00:00',…
-
4
votes1
answer864
viewsA: Upload remote images with Base64 or URL?
No image comes by a URL or with Base64. The concepts there are confused. URL is an address and Base64 is a form of data representation. There is no dichotomy in between them. If you are going to…
-
4
votes1
answer540
views -
7
votes2
answers1012
viewsA: Does using a virtual keyboard help security?
These solutions are quite naive. When someone uses a feature like this to provide more security or doesn’t know what they’re doing or is just marketing. Virtual keyboards can be captured easily.…
-
7
votes2
answers417
viewsA: Planning of user interface
Nor will I try to add anything to what Luiz Vieira said because he understands much more of the subject than I do. I will just complement an important point for any interface and that for web…
-
6
votes1
answer650
viewsA: What is the difference between Getcurrentprocess and Getcurrentprocessid?
As the name says GetCurrentProcess() get the process itself, ie a handler for the process. You will use this handler to perform actions or get information from the process. And also as the name says…
-
8
votes2
answers420
viewsA: How to remove a variable from memory?
Depends on what you mean by "delete". If you want the value to be deleted, you can at most make it, ie do meu_byte = 0;. Whether to release memory depends on how it was allocated. In this specific…
-
10
votes2
answers2447
viewsA: What is the difference between define() and const?
Both can be used to define global constants for the application. const defines the constant at compile time, which is usually much better. It can also be used to define constants with class scope,…
-
3
votes3
answers540
viewsA: Colo allocate a memory based on the size the user typed
There are not many options. Basically you either allocate a sufficient amount for what you need or ask how much you want to allocate. The second option really is terrible. From the usability point…
-
232
votes3
answers154272
viewsA: What is REST and Restful?
It only makes sense to know what REST is, since Restful is just the ability to do REST, ie it’s a grammatical issue. The Representational State Transfer (REST), in Portuguese Representational State…
-
9
votes2
answers157
viewsA: Why are some "git" commands preceded by a dash and others by two dashes?
As you can see in their example there is a difference between them. With only one dash is the abbreviated form of a command while with two strokes is the command "in full". It is common to have both…
-
8
votes2
answers887
viewsA: Check if variable has been set
Unfortunately the question has been changed and now is asking something else completely different from the original, I will leave the original answer below I understand that you are learning but…
-
8
votes2
answers12630
viewsA: How does Java Builder Heritage work?
This makes no sense. The builder of Cliente is receiving, according to you, an address and a customer code. You are not receiving a name and date of birth. You cannot take an address and play in the…
-
5
votes3
answers50069
viewsA: How to display all the results of a SELECT in PHP?
Thus: <?php $query = "SELECT * from clientes"; $result = mysql_query($query); while($fetch = mysql_fetch_row($result)){ echo "<p>". $fetch[0] . " - " . $fetch[1] . " - " . "</p>"; }…
-
4
votes3
answers284
viewsA: Create folder and ID simultaneously using the same id number
Since you have not put other pieces of code I am considering that you are manipulating a database through the object $db. $ultimoID = $db->lastInsertId(); if ($ultimoID) { mkdir("../imagens/" .…
-
5
votes3
answers677
views