Most voted questions
150,413 questions
Sort by count of
-
8
votes3
answers374
views"== 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() ==…
-
8
votes4
answers418
viewsIs there a difference in using HTML5 attributes with or without true/false?
There is a possibility of some kind of problem in the code when I do not assign a boolean value to the attributes disabled, readonly or required? I’m working with Java in the back end and the IDE…
-
8
votes2
answers159
viewsWhat is the "dirname" attribute in HTML for?
I saw on the Internet a code similar to this: <form action="/the-action"> First name: <input type="text" name="fname" dirname="fname.dir"> <input type="submit" value="Submit">…
htmlasked 6 years, 3 months ago Wallace Maxters 102,340 -
8
votes1
answer83
viewsIs there a property in Maven to access the "Resources" directory value?
Issue-based https://stackoverflow.com/q/9216557/4438007 I know I can use ${project.build.sourceDirectory} to access my source file directory. If I want to access the resource files directory, the…
-
8
votes4
answers320
viewsCheck if a string is only composed of 0
I want to check if for example a string "00000000" is composed only of zeros and give true, but a "0000a0e0b" is false, because I tried with ! isNaN and gives true having at least 1 number var…
javascriptasked 6 years, 4 months ago Paulo Henrique Rodrigues Grund 317 -
8
votes1
answer303
viewsWhat is an adjacent brother? In what does he differ from a brother knot?
One concept that confuses me when talking about HTML is that of adjacency, and of us brothers. What is the difference of brothers and adjacent brothers ?…
-
8
votes1
answer270
viewsResult when converting minutes to hours
I have a query where I have an example that gives the correct result and the other one does not when converting minutes to hours. 1st example in minutes: SELECT A.Colaborador, SUM(A.`Horas…
-
8
votes2
answers391
viewsC++ (basic): for, references and syntax
My teacher presented this function to us: void escala(std::vector<double> &v, double fator) { for (auto &vi:v){ vi *= fator; } } It serves to multiply all the elements of a vector by a…
-
8
votes2
answers1082
viewsCollision system for game in Html5!
I’m learning a little about games in Html5,css and js. I made a very basic game, player drive, enemy and a collision system, see: var canvas;//o elemento canvas sobre o qual desenharemos var ctx;//o…
-
8
votes3
answers1569
viewsForm completion with return of a json
I am using a webservice (viaCep) for automatic filling of the backyard, for when the user type a zip code. The webservice returns me a json with the information from the patio, and from that return…
-
8
votes1
answer975
viewsDo front-end or back-end processing?
In the client-side and server-side separation architecture, it is common to doubt who is responsible for some processing. On the one hand, processing on the client-side can be beneficial for…
web-application server-side single-page-application client-sideasked 6 years, 6 months ago vinibrsl 19,711 -
8
votes2
answers749
viewsHow to put icon on Joptionpane buttons?
How do I place an icon in the "Continue" and "Cancel" buttons that appear in the JOptionPane? The case is represented below: public void metodo(){ JPanel panel = new JPanel(); JLabel label = new…
-
8
votes1
answer198
viewsHow to implement the "evaluate()" and "successor()" method of the Slope Rise algorithm?
I’m trying to implement the algorithm Hill Climb (Hill Climbing) and this algorithm should return the sequence of cities considered good (with the shortest distance between cities) the problem of…
-
8
votes3
answers281
viewsPick up reply email content
I’m using the library of imap to log into a company account and bring in the new emails, when it’s an email reply I’d like to pick up only the new content but I can’t get it just the full…
-
8
votes1
answer1041
viewsCQRS - When to use and why to use?
What are the advantages of using the CQRS (Command/Query Responsibility Segregation) standard? What would be the disadvantages ?
-
8
votes2
answers695
viewsWhat is ASP.NET Core Blazor?
Looking at the list of novelties found in Visual Studio, I came across something talking about ASP.NET Core Blazor, and apparently there’s almost nothing talking about, I found very little material,…
-
8
votes1
answer479
viewsWhat is the difference between File Uri, Content Uri and Stringpath?
My application deals with writing and reading files, and I’m a little confused about how and when to use each of these types of Uri. I believe it would be best to understand the difference between…
-
8
votes1
answer67
viewsWhat is the difference between Class and Code File on Asp.net Core?
What is the difference between Class and Code File in Asp.net Core? There are two types of files in Asp.net core, there is some difference between one and the other? And when we should use each?…
-
8
votes2
answers22669
viewsNode.js - How to read user input from the console?
In Java: System.out.println("Diga algo: "); Scanner leitor = new Scanner(System.in); String resp = leitor.nextLine(); //ou nextInt, nextDouble, etc In C++ cout << "Diga algo: "; string name;…
-
8
votes1
answer206
viewsHow to prevent the app from being "minimized" by Appswitch(Recentapps) Xamarin Android
I need to lock the device only for one application. I use in my project a line that determines that my app becomes a launcher. So, the home screen of the device is my application and the HomeButton…
-
8
votes4
answers158
viewsJavascript pass by value
I have two objects: A and B: var A={valor:0} var B={valor:0} A=B A.valor=5 console.log(B.valor) // 5 would like to know how to pass by value, because Javascript passes by reference the objects, in…
javascriptasked 6 years, 7 months ago Thiago Outeiro Pereira Damasce 129 -
8
votes1
answer464
viewsHow to securely pass token after authentication to angular application
I am developing an Angular Addin for outlook - Office365 for a management application "Jasmin Software". The application is divided into two parts, A 1 is a javasscript application to handle…
-
8
votes1
answer162
viewsAnimations in high quality
We all know that animations on the web are a little bit eye friendly, when opening a side menu, whether in mobile or in desktop, you can only see part of your drive, giving the impression of a…
-
8
votes1
answer10401
viewsDifferent timezones in an application with Postgresql
We have a system that serves several distribution centers. A distribution center is a physical location that can be located anywhere in the country. A single customer can have several centers. Our…
-
8
votes1
answer521
viewsWhat are the differences in ". NET"?
I took a look at this reply, but did not answer my question. As far as I know, there is .NET Framework, . NET Core, ASP.NET, . NET Standart and Mono but I don’t know the difference between them and…
.net terminology .net-core cross-platform portabilityasked 6 years, 8 months ago CypherPotato 9,292 -
8
votes2
answers160
viewsLittle Python Combat Game
I’m a beginner in programming and I’m trying to make a simple little game to apply my knowledge about conditionals, repetition and the Random module, but I’m having some semantic problems. My goal…
pythonasked 6 years, 8 months ago AmadNicolas 83 -
8
votes1
answer1094
viewsWhy is jQuery becoming obsolete?
More and more, I find articles (in English or in Portuguese) that speak about it... I do wrong for continuing to use the jQuery on websites? What’s wrong with it? Is there any other framework (or…
-
8
votes2
answers333
viewsWhat is the Technological Singularity?
Every time I read one news story related to artificial intelligence I came up with the word uniqueness, and along with it comes that Singularity Technology. I have already researched the term,…
-
8
votes1
answer84
viewsIs it recommended to use loose Return in a PHP file? When?
It is good practice to give a Return in a simple PHP file example: <?php $config['teste'] = 123; return $config; I’ll explain better I have this file di/dependencias.php: <?php…
phpasked 6 years, 9 months ago Lucas Lima 773 -
8
votes3
answers605
viewsHow to give a Regex before a string? And select?
What I need to do is this: let’s assume that the string is -> :. However I want to select "only" the string before the : using the Regex. To make it clearer: "select that word: another word here"…
-
8
votes2
answers115
viewsHow to know which parole is giving true?
For example, I have the following if: if(!condicao1 || !condicao2 || !condicao3){ retorno erro com a condiçao que nao existe } When he gets into that if i wonder which of the parameters is missing…
-
8
votes0
answers6171
viewsHow to make all possible combinations to arrive at a proposed result?
Well, let’s start at the beginning, at the beginning, at the beginning. I have this program: from itertools import combinations lis = [1,2,3,4,5,6,7,8,9] for i in (3, len(lis)): for comb in…
-
8
votes2
answers5568
viewsHow to interpolate string in Python?
For example, in PHP, we can do so: $preco = 200; $unidades = 10; $texto_final = "O produto custa {$preco} reais e restam {$unidades} unidades."; You can do something similar in Python or you must…
-
8
votes4
answers662
viewsHow to improve SQL performance with IN clause?
I have this SQL here: SELECT id, nome, url FROM categorias WHERE status = 1 AND id_ls IN (SELECT id_categoria FROM cliente_categorias) GROUP BY url What he does is seek only categories that have…
-
8
votes2
answers218
viewsSEO+ techniques currently used!
I have been doing some research in some courses on SEO, because I believe it is a very promising subject in the field of the Internet but many things are still a mystery to me and maybe you can help…
-
8
votes3
answers324
viewsWhy the two points twice?
p::after What’s the 2 points twice (::)?
-
8
votes1
answer279
viewsWhat is the best type in SQL to use with Cryptocurrency?
I am developing a system where I will store transactions of Cryptocurrencies, type Bitcoin, I can not in any way have problems of conversion and rounding, in C# I checked and the best is decimal,…
-
8
votes1
answer3990
viewsDifference between Thread.Sleep and Task.Delay
I am developing a client/server communication, and using Task for asynchronous communication. Previously, I had already made another communication where I used Thread, works smoothly and consumes…
-
8
votes4
answers814
viewsWhy can’t we return a void call in a void return waiting method?
I was doing some C# tests to find out how the return issue works void. I did the following test below and realized that tests 1 and 3 work perfectly, however 2 no. Behold: public class Program {…
-
8
votes1
answer702
viewsHow to draw a straight using turtle geometry?
I’m trying to supplement my answer to a question about intersections of circles. In this answer, at a given time, I get an equation of the line in through the coefficients a,b,c: r: a*x + b*y + c =…
-
8
votes1
answer221
views -
8
votes1
answer8579
viewsIs there a Timezone for Brasilia?
I am developing an app in PHP. And I need to set Timezone for Brasilia. However in the php documentation I have: $timezones = array( 'AC' => 'America/Rio_branco', 'AL' => 'America/Maceio',…
-
8
votes2
answers690
viewsHow do I convert PNG to JPG in C#?
I’m working on an old project that uses ASP Site. I need to convert PNG image to JPG. How to do this? Note: I don’t want to rename the file, I want to transform the mime of image/png for image/jpeg.…
-
8
votes1
answer214
viewsHow to compile a Java 9 project with Lombok in Gradle?
TL;DR How to pass multiple parameters -J--add-opens=<pacote>=ALL-UNNAMED so that Gradle uses them when calling javac? Details I have a code Helloworld.java using the Lombok in Java 9: import…
-
8
votes3
answers923
viewswindow.showModalDialog does not work on Google Chrome, is there anything equivalent?
Good morning, I’m trying to open a modal on google Chrome... The current application already uses window.showModalDialog for years, it works in IE... I can not make the changes using the html 5…
-
8
votes1
answer514
viewsCount sequences of 1 within vector in R
I would like to know how to count sequences of 1 within a vector containing only 0 and 1. For example, in the vector x <- c(1, 1, 0, 0, 1, 0, 1, 1), the count would give the vector (2, 1, 2),…
-
8
votes2
answers927
viewsWhat’s the difference when creating a class libray (.net framework) and class library(.net standard) project in VS2017?
What are the differences and uses of these types of projects?…
-
8
votes1
answer707
viewsWhy use Mutationobserver instead of Mutation Events?
Well the title is the question itself, I know it’s because the Mutation Events will not be continued further, but: What is the difference between one and the other (not how to use, but the technical…
-
8
votes0
answers72
viewsSELECT to get many lines in PHP
I’m a beginner in PHP and Mysql and need to know what I do to get all users registered in a database when the number of users reaches thousands? I registered 300,000 users in my database and would…
-
8
votes2
answers430
viewsDeadlock at Conceptual Design Level, Entity-Relationship Modeling (MER)
At conceptual design level we can use the approach (relationship entity modeling (MER)) to describe the behavior of future tables that will appear in the logical project. Within that context a doubt…