Posts by Oralista de Sistemas • 23,115 points
435 posts
-
4
votes1
answer89
viewsQ: What is a loose object?
From time to time my versioning tool tells me there’s something loose in my branch. Fortunately the tool always tightens my loose ones, but it gets the curiosity. Why does Git loosen me objects?…
gitasked Oralista de Sistemas 23,115 -
1
votes1
answer33
viewsA: Error installing Magento on Windows 10
The answer is in the error message itself: Integrity Constraint Violation: 1062 Duplicate entry 'AD' for key 'PRIMARY' in... You have a table that has a field with uniqueness restriction ("key…
-
6
votes1
answer620
viewsA: How to make a greedy algorithm to solve the java backpack problem
You need to join a research team from some world-wide projection faculty - preferably the more technology-oriented ones like Caltech or MIT. Spend years studying, lead a multidisciplinary team, and…
javaanswered Oralista de Sistemas 23,115 -
7
votes1
answer429
viewsA: Hot key for "surround with" in Notepad++
Notepad++ does not have this capability natively. You have two options to add quotes, parentheses etc. around a selection. Record macros -> there are several sites on the internet that teach you…
-
3
votes1
answer54
viewsA: What is the cost of an update when it does not find the record?
The cost of a UPDATE that does not affect any line is the same cost of a SELECT with the corresponding search. The search to find out if the records exist may make sense in certain cases, for…
-
2
votes1
answer100
viewsA: Convert Date, time and minute to "time"
The time function does not receive parameters and indicates the number of seconds since the base date (1/1/1970). Maybe you’re interested in Datetime. This function allows you to construct a date…
phpanswered Oralista de Sistemas 23,115 -
3
votes1
answer1018
viewsA: "break" inside a chained if-lse
There is, it’s called return. You can encapsulate your logic in a function: public Categoria getCategoria(int saldo) { if (saldo < 50000) { return SILVER; } else if (saldo < 200000) { return…
javaanswered Oralista de Sistemas 23,115 -
2
votes2
answers134
viewsA: Help to simplify query sql
You can run a query on another query. For example, assuming you have these two queries, where the second is basically a copy of the first with further refinement. Raw form Transform: select foo, bar…
-
3
votes2
answers728
viewsA: How do I get Mysql to accept a 1.457.40 number?
In your favorite programming language, do something like: var numero = foo; // onde "foo" é o número quebrado; numero = (numero + '').replace('.', '').replace(',', '.');…
-
7
votes4
answers1780
viewsA: After all, why does the PHP source code not appear in the browser?
The PHP code runs on the server only. The PHP engine uses your code to generate the HTML code that is sent to those who requested the page. In general, it is not possible to determine whether an…
phpanswered Oralista de Sistemas 23,115 -
2
votes1
answer651
viewsA: Error: C# The name 'Json' does not exist in the Current context
Segui todos os passos recomendados por diversos sites, como adicionar tais referências e tal. Will be? In your code example, there are only the following namespaces: using System; using…
-
4
votes1
answer169
viewsA: Removing space at the end of a word
Call the method trim of the string before using it. Try: let foo = 'natação '; console.log(foo.trim()); The method trim removes all spaces at the end of the string, if there is more than one.…
-
6
votes3
answers127
viewsA: Make a code that brings values like this(1K, 1M or 2G)
Something like: List<string> siglas = new List<string>() { "K", // Kilo "M", // Mega "G", // Giga "T", // Tera "Y" // Yota }; long numero = 102314124; // ou qualquer outro número string…
c#answered Oralista de Sistemas 23,115 -
1
votes1
answer499
viewsA: Error saving JPEG image in database as string (Base64)
You set the image column as VARCHAR(255). In general the type varchar stores one to two bytes per character (assuming UTF-8). This means that any image you try to save with more than 123 bytes will…
-
2
votes2
answers2411
viewsA: How to find source URL
Browsers only fill in the information of referrer if the user has clicked on a link. An HTTP request by itself is an extremely simple message with few details. The only field that could…
-
0
votes3
answers98
viewsA: Error returning lower value
The problem is this line here: if(min < elemento) I believe the signal is switched. The block of this if is executed only if min for minor that compared the element, but min will never be less…
-
1
votes1
answer65
viewsA: Is there any way to get what the user is hearing?
The iOS and Android apps can’t access data or memory from each other, and the reading of the devices' output engines is very limited. You won’t be able to make an application that can pick up audio…
-
5
votes1
answer672
viewsA: Play musical note by Javascript
The API you found does 99% of the work. If you’re not going to use it, you’ll either use another API, or you’ll have to reimplement it anyway. To use your notes with the API, you would do the…
javascriptanswered Oralista de Sistemas 23,115 -
3
votes1
answer124
viewsA: Using Gplv3 tool "contaminates" my application?
Your work is a modification of a software license under Gplv3? If yes, then you’re right. According to the official documentation: If I use a Piece of software that has been obtained under the GNU…
licenseanswered Oralista de Sistemas 23,115 -
5
votes1
answer249
viewsA: Is it possible by latitude and longitude to know if the direction?
What you want is a mix of GPS with inertial navigation. Some apps like Google Maps and Waze do this to know the direction a vehicle takes, especially on devices without a compass. The technique is…
-
4
votes2
answers343
viewsA: Gmail notifies that email is usually used to steal information when I use content-type ="text/html; charset=utf-8"
If you do not want your spam sent via API to be marked as spam by Gmail, let’s see what the documentation says. And there it says, and I paraphrase: The Gmail Postmaster Tools provides senders with…
-
2
votes2
answers127
viewsA: Javascript does not take changed array before click
When you try to write a variable in the console, what goes to the console is the result of the .toString() what you’ve been through. For arrays, the result of .toString() is equivalent to the call…
-
3
votes3
answers1291
viewsA: Optimize HTML video 5
Video size should be no problem. Video format yes. I found this article that discusses this. The most important thing is this:: Here’s Where this Whole "mp4 streaming", which Works like Webm, comes…
-
1
votes1
answer187
viewsA: Intercept page redirection
Browsers tend to block this sort of thing more and more. If you try to use a function confirm at the event beforeUnload, to be more assertive for example, Chrome blocks the function call. I believe…
-
1
votes1
answer34
viewsA: Listening to an event in cookies
No, it is not possible. There is no native API for this. And in general it is bad practice to depend on communication between tabs. If you need to observe changes in cookies, maybe you can use…
-
5
votes1
answer172
viewsA: Project class library does not open. Gives error in . csproj it
It is likely that the file is corrupted. Unfortunately the best solution is to create another project from scratch and include the files. From the original project file you can see which files you…
-
5
votes1
answer577
viewsA: How to compile Less or Sass automatically?
You can install the Node.js on your machine. It serves to run various applications that you can download on NPM, among them the Gulp. Gulp automates various operations for you. Allied to Gulp-Sass,…
-
7
votes1
answer111
viewsA: Why is the latest prediction of the time series with the neuralnet package so far out of line with the rest of the predictions?
I’ll give you an answer you won’t like. Using neural networks to predict time is one treacherous business. Doesn’t mean it’s impossible - it just means it’s laborious. Neural networks are great for…
ranswered Oralista de Sistemas 23,115 -
1
votes1
answer458
viewsA: Returning Nan in function
The function parseFloat returns NaN if the input is not numerical. This is expected. The next thing to take into account is that the sum of any number with NaN results in NaN. The question then…
-
2
votes1
answer64
viewsA: Conflict of reference Google.api
You don’t need to rename namespaces, you can use aliases. A alias is a nickname you give to a namespace. Simply state as follows: using alias = namespacePropriamente dito. Your code would look like…
-
5
votes1
answer4637
viewsA: Accessing files in C: error: Access to path (...) has been denied
Use the class System.Security.AccessControl.DirectorySecurity to request access as an administrator. Applications authenticate to have administrator permissions in this way, and not just running as…
-
10
votes4
answers1634
viewsA: What does the term "atomic" mean?
The word atom comes from the Greek atoms. It is formed by the parts: to: radical indicating denial; tomos: which means divisions. Therefore, an atom is something that is impossible to divide (until…
-
7
votes4
answers2054
viewsA: What can be considered a character?
Much can be said about this, but for the good-natured, half-word. Follows representative code in some languages. C# / Java char um = '1'; I think that in the heavily typed world the discussion has…
language-independentanswered Oralista de Sistemas 23,115 -
1
votes2
answers52
viewsA: Keep the initial class of the element
If I understand correctly, you wish that by clicking on an icon: That icon has its class modified according to the current code, but that in addition... ... all other icons take on a specific class.…
-
0
votes1
answer641
viewsA: Tip on how to turn loops into recursive function
First you need to understand the structure of the PHP loop. In short, you have: for (a; b; c) d; Where: to: is an expression that is executed only once, before the loop starts; b: is a condition…
-
1
votes1
answer915
viewsA: Automatic login and password completion
I’m going to write down some things here that may seem harsh, harsh and even crude. That’s not the intention, so please don’t feel offended. It’s for your own good, and for the good of those who…
javascriptanswered Oralista de Sistemas 23,115 -
2
votes2
answers196
viewsA: Event add div javascript
André’s answer is correct, but there is one form that requires less effort. Just change the function click by function on, as follows: $(function() { $("div.input").on("click", "a", function(e) { //…
-
0
votes1
answer285
viewsA: Plugin for manipulating images with C#
The . NET platform comes with libraries to work on images. See the namespace System.Drawing. In particular, see: The class Bitmap. Despite the name, it can be used with various file formats. The…
c#answered Oralista de Sistemas 23,115 -
3
votes2
answers718
viewsA: Form behind the Windows bar
According to the questioner himself, the problem only occurs if these two situations occur simultaneously: Form is configured to start maximized; The maximize button is disabled, i.e.:…
-
6
votes1
answer636
viewsA: What is the best way to login to the app via facebook and login to a Rest(spring boot) server?
If you integrate your application authentication with Facebook, and your application is not a Facebook-specific app, then you use the Oauth protocol. There is a lot to talk about and study about…
-
0
votes3
answers227
viewsA: css dynamic change via jQuery Is it possible?
The method css jQuery can receive a Javascript object, as you propose to do. What cannot be done is to construct an object from an array the way it is in the question. But don’t worry: just create…
-
1
votes1
answer988
viewsA: Error: There are no Primary or candidate Keys in the referenced table
The primary key of your table GradeCurricular is composed. You can only make strong relationships if the two keys - primary and foreign - have the same format. Therefore, your foreign keys should be…
-
2
votes2
answers197
viewsA: How do I know if it’s past midnight or a new day has begun?
I do not know very well Java or Android, but I believe it is a matter of algorithm here. To begin with, see the response of Leonardo Lima. Your program compares the current time date with a specific…
androidanswered Oralista de Sistemas 23,115 -
1
votes2
answers754
viewsA: Method that uses a random value as parameter to swap the characters of a string
You can use Oracle’s DBMS_RANDOM package to generate random values. In addition to numbers, it also generates strings. To generate a string with a quantity n use the following syntax: SELECT…
-
7
votes1
answer145
viewsA: What are dynamic properties?
ViewBag is an object, not a class. It is a property of View which is used to mount the page. Values are passed to the View at runtime, but this does not mean that they are weakly typed. If you try…
-
5
votes2
answers334
viewsA: Is "inheritance" table a bad practice in this case?
This alone is not a bad practice. In the world of relational databases that interact with object-oriented systems (I believe this is your case), the biggest design challenge for the base is how to…
-
4
votes2
answers496
viewsA: What is the technical difference between SSL and EV SSL certificates?
The difference between the two is a bureaucratic issue. Both provide virtually the same level of security against electronic attacks. What the EV gives the most is a guarantee that the entity that…
-
34
votes2
answers539
viewsA: How does antivirus scan my program?
(...)my teacher was talking about the differences of interpreted languages and compiled languages and pointed out that interpreted languages could have their code stolen, when in compiled it does…
-
3
votes4
answers1016
viewsA: Is the use of "private" in C# classes optional?
The use of a private class makes sense if it is an inner class of another class, i.e.: public class Palmeiras { public int mundiais { get { return Palmeiras.Mundial.Contador; } } private class…
-
3
votes1
answer447
viewsA: How to split by numbers inside the string?
From what I saw, each verse is immediately followed by letter, without another separator, certain? You solve your problem in four steps: Create a regular expression to find the number of each verse:…