Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer1004
viewsHow to simulate load in a database?
I have an SQL Server database that recently had performance problems in production by the large amount of simultaneous users added to some implementation and architecture problems. After taking some…
-
7
votes4
answers7124
viewsAccept only numerics in input
nota = -1 while nota < 0 or nota > 10: nota = int(input("Informe a nota entre 0 e 10: ")) if nota < 0 or nota > 10: print("Valor inválido") I need to include this validation code to, if…
-
7
votes2
answers531
viewsCoding conflict using Tinker and Laravel
I’m learning how to use Laravel and grabbed on to an encoding problem. I’m trying to use the Tinker to insert data into my tables, and there I’m getting the following error when I try to include a…
-
7
votes1
answer612
viewsHow to draw an arrow using Java2d?
I’m trying to draw an arrow inside a circle (similar to a clock pointer), but I’m not able to align the arrowhead with the rest of the line. I made the "arrow" based in this reply by Soen, but I’m…
-
7
votes1
answer296
viewsC# - Maintenance of Classes generated from xsd file
I’m developing an application that uses classes generated from xsd files made available by the IRS with the xsd.exe. I use them to serialize xml files from the objects of these classes after…
-
7
votes1
answer219
viewsHow to know the number of possible occurrences found by the group() method of the Matcher class?
After the question "Why does the Matcher class not return the number of groups correctly?", it was explained that the groupCount() actually returns the number of filter groups in the regular…
-
7
votes3
answers6315
viewsHow to make an "Insert" with Dapper using a class?
I’m testing Dapper and when I try to use a class I found the error: Must declare the scalar variable Follows the code: public class Teste { public int id; public string nome; public int idade; }…
-
7
votes1
answer5651
viewsInfinite recursion (Stackoverflowerror): Error when listing products with categories and unit of measures
Good afternoon! I am trying to list the registered products, but the error happens below: Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not…
-
7
votes3
answers701
viewsWhat to do when the argument passed in the constructor is invalid?
I’m playing a card game in Java, and one of the classes is responsible for starting the game. In the builder, I get the number of players who will participate. I am doing the validation of the…
-
7
votes2
answers88
viewsHow do I detect that the headset has been plugged in?
I’ve been watching that every time I "plug" the headset in my smarphone, a notification from Deezer (a stream music) already telling to click and to open the application. According to the…
-
7
votes1
answer275
viewsI could not understand very well the encapsulation in the POO
I took a course in programming logic and now I’m doing logic OO, but it’s come to the encapsulation part and I’m having a little bit of trouble understanding. What it would be and how it’s used?…
-
7
votes1
answer182
viewsPython: is not turning my regex’s Character class into negative
I’m learning Regexes by the Automate the Boring Stuff w/ Python. In one of the titles of chapter 7, the book teaches about character classes. So far quiet. I have created Character classes for…
-
7
votes2
answers300
viewsheuristica h(n)=0 is permissible for algorithm A*
Hello folks someone can answer this question I’m in doubt. heuristic h(n)=0 is permissible for algorithm A*
artificial-intelligenceasked 7 years, 1 month ago IMoonBlackI 364 -
7
votes1
answer172
viewsWhat is the role of parameters?
I know the concept of função and procedimentos, but I’m having a little trouble understanding the role of parameters.
-
7
votes2
answers985
viewsWhat are the appropriate scenarios for graph-based databases
Lately I’ve been studying the graph-based database Neo4j. Given that the vast majority of current applications use traditional relational databases, I ask: What are the appropriate scenarios to use…
-
7
votes1
answer115
viewsWhy is the expression (double.Minvalue == double.Minvalue + 1) true?
The following code C#: public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine(double.MinValue == double.MinValue + 1); Console.WriteLine(int.MinValue…
-
7
votes3
answers24888
viewsAre the accents on my page missing?
I created a page html, however the accents are not being read, already tested the following code but does not work. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> What…
-
7
votes1
answer1962
viewsCreate a global variable in Delphi
I need to execute the following code, but the form in question is not always Uniform1. So I’m thinking of storing the name of form into a variable and replace the Uniform1 for her sake. Instead of…
delphiasked 7 years, 1 month ago user75204 -
7
votes1
answer3980
viewsIn which cases return the System Exception error.Outofmemoryexception
Which are the most frequent cases that can return this Exception?
-
7
votes2
answers3359
viewsDifference between "~" tilde and "/" bar at linux prompt?
I am starting a lower level part, where I will program the part of users, permissions and etc. My first question is ~ and / at the prompt ?
-
7
votes1
answer386
viewsWhat is and how does the repetition of the for in C#?
for (int i = 0; i < palavra.Length; i++) What does each word mean? And how each part of that code works?
-
7
votes2
answers674
viewsRemove an N amount of days on a date
How to remove an amount of N days in a date ? namespace TesteData { class Program { static void Main(string[] args) { var dataAtual = DateTime.Now.Date; // dataAtual 13/09/17 var qtdDias = 5; //Como…
-
7
votes2
answers753
viewsDaylight saving time with old dates
In my system save all dates on UTC, but in the user view I show in GMT -3. The problem is when I save a date in summer time, because in case it will no longer be made the difference of 3 hours, it…
-
7
votes1
answer223
viewsWhy hide the implementation of a class?
This is the concept I’ve worked hard to understand, but I’ve never fully achieved. I’ll take this excerpt from a Deitel book to illustrate: It is a better software engineering define member…
-
7
votes1
answer7242
viewsString matrix
How a matrix of strings? I tried it in several ways and still did not succeed, I thought it would work but it did not work. #include <stdio.h> #include <stdlib.h> int main(void){ char…
-
7
votes1
answer92
viewsCloning functions in a deep way
I would like to clone some objects in a deep way. I’ve seen this question: How to create a copy of an object in Javascript ...However, none of the answers offer a way to clone a function in a…
javascriptasked 7 years, 1 month ago Oralista de Sistemas 23,115 -
7
votes1
answer1325
viewsRecord records with the mask or remove before?
Contextualizing my question, kind of by convention of my old work environment I always recorded the records without the mask at the base, but a situation arose in my new job where they are saving…
-
7
votes4
answers865
viewsHow to separate a string when the string does not have a separator?
I have a string: String texto = "1234"; String split[] = texto.split(?); I need to separate the characters, 1-2-3-4, each number being 1 character only.
javaasked 7 years, 1 month ago Mateus Silveira 95 -
7
votes0
answers188
viewsHow to get all methods a class is using
I need to find a way to find all the methods a class is using (watch out, it’s not the methods stated in it). EX: public class Bondia{ public static void main(String[] args){…
-
7
votes2
answers1055
viewsWhat are slots and how do they work and "scoped slots" in Vue.js?
In Vue.js we can pass descendants to a component in the following way: <meu-componente> <div>Um descendente</div> <div>Outro descendente</div> </meu-componente>…
-
7
votes1
answer4713
viewsWhat’s the practical difference between a git merge and a git pull?
In day-to-day developing I always use git pull to take the changes from the main branch, where the parallel developments are merged. But some Ides like Netbeans, implement the "git merge -ff origin…
gitasked 7 years, 2 months ago LeonanCarvalho 3,527 -
7
votes3
answers590
viewsNever use inline styles is never really?
For example the tag canvas: I saw some tutorials on Youtube, and almost all of them used it like this: <canvas height="" width=""></canvas>. Then I should use it in HTML, inline, as…
-
7
votes4
answers9952
viewsHow to make Mysql return utf-8?
When I require information from my database containing special characters I receive " but in the grouping phpmyadmin is "UTF-8" and my website also has the goal of UTF-8 what can I do to return the…
mysqlasked 7 years, 2 months ago Luhan Salimena 323 -
7
votes1
answer1427
viewsIs it possible to make a line break inside a placeholder?
I would like to perform a line break within the placeholder from a textarea, for example how users can fill it. Is there any way to do that? <textarea placeholder="Excelentíssimo Senhor Professor…
-
7
votes2
answers103
viewsWhat does the expression "/ (?:(?:cats?|dog):)? /" do?
Doubt is as to the following regular expression: /^(?:(?:gatos?|cachorro):)?/ In understanding I have the following: Beginning: ^ ( ): This is a grouping, right? like (gato|cachorro|etc..)? Because…
-
7
votes1
answer128
viewsHow to integrate Jest and Flow
I know some people use the Jest together with the Flow, even more for being from Facebook, I’m with a project React, and I’m trying to do this integration, but Jest does not recognize the typing…
-
7
votes3
answers115
viewsThe logic behind how PHP interprets string and number concatenation?
I was doing a quiz questions for PHP certification and a question appeared that left me troubled: What will be the output of the following code fragment? <?php echo 'hello'. 1 + 2 . '34'; ?>…
-
7
votes2
answers2933
viewsWhat is the difference between global and superglobal variables?
I read some time ago that PHP has the vast majority of its variables declared with local scope. But I found two others concepts variables global and super-global and I didn’t quite understand the…
-
7
votes1
answer86
viewsWhat is a Circuitbreaker?
I’ve seen some definitions about Circuitbreaker, but I still don’t understand how to use it and I have my doubts. What is the best case scenario to be applied? What should be aborted to be fully…
-
7
votes1
answer1723
viewsHow to use the Mutationobserver() of the correct vein?
I know that the MutationObserver() was developed to detect HTML DOM changes. But I’d like to know how it works in practice. We create a hypothetical situation, how about? There is a <div> with…
-
7
votes1
answer610
viewsHow does the Meet-in-the-Middle attack work?
I was looking for the old 3DES and decided to search because there is no 2DES, I found little information, even because it did not "exist" in fact 2DES. Although abbreviated also as MITM, it has no…
cryptographyasked 7 years, 2 months ago Inkeliz 20,671 -
7
votes2
answers12319
viewsFormat date and time with PHP
I have this page that displays the emails received from the logged in user, along with the respective dates. I’m trying to format the date display by PHP but it’s not working as I expected. I need…
phpasked 7 years, 3 months ago goldenleticia 543 -
7
votes1
answer143
viewsBuilding new variables using dplyr
I have the following database Clientes.Dep..Gratuito.PCG Clientes.Dep..Gratuito Clientes.Dep..Não.Gratuito 0 0 0 0 0 0 25 0 0 0 0 2 0 0 79 0 0 71 Clientes.Usu..Gratuito.PCG Clientes.Usu..Gratuito…
-
7
votes2
answers1021
viewsWhat is a decision problem?
I started reading about computer theory and came across the "decision problems". What are these problems? I don’t want any highly elaborate scientific article to answer the question, just a quick…
-
7
votes1
answer586
viewsDo Java 8 streams and streams bring more benefits than concision?
The only benefits I understand in Amble and streams Java 8 is code saving and, as the case may be, better expressing the author’s intention. That’s all? Is there any example of code that uses one of…
java lambda-expressions java-8 functional-programming streamasked 7 years, 3 months ago Piovezan 15,850 -
7
votes2
answers614
viewsWhat is code golf?
Looking at the tags on the site, I come across the tag code-golf, I read the brief explanation: code-golf Use this tag when only when the question has a relation irrefutable to Code Golf Code…
-
7
votes1
answer18750
viewsHow to integrate the application with Whatsapp?
I was wondering if it is possible to integrate an application made in C# with Whatsapp?
-
7
votes1
answer542
viewsDifference between Absolute Expiration and Sliding Expiration
I am doing a POC with generic cache in C# and followed a model that shows Absolute Expiration and Sliding Expiration. Some could explain these concepts better to me? //This is for Absolute…
-
7
votes1
answer432
viewsWhat is a template engine?
Before long, I learned about the PHP template engine. By the way, I understood what it is, but I have doubts. • It is a "programming language?" I put in quotes put read this on a website: Purpose At…
-
7
votes2
answers284
viewsHow to perform the correct flow deviation in an integration with multiple systems?
We have a system, which I will call A, which serves some customers. We are now performing the first integrations with the internal systems (ERP) of these customers. When we make, for example, a…