Most voted questions
150,413 questions
Sort by count of
-
6
votes2
answers2720
viewsDifferences in the use of $this, self, Static and Parent
I have a question about the "proper" use of $this, self, Static and Parent in some specific scenarios. I know the meaning and theoretical use of each: $this: basically references the object…
phpasked 7 years ago Fábio Jânio 3,407 -
6
votes2
answers272
viewsFocus() event does not work on the browser console
Whenever I want to test something through the web I end up using the console browser (F12 > Console) to check some behaving, especially in the case of javascript. However, I recently noticed that…
-
6
votes3
answers364
viewsDrag and Change Position of a Groupbox at Runtime
I have a groupbox that I wish the user could drag and change the position at runtime, someone imagines some way to do this?
-
6
votes2
answers503
viewsDifference Location.href or Location.assign
What’s the difference between location.href = url and the location.assign(url)? Is it something in Javascript memory consumption? Is there any official recommendation which one to use? I consider…
javascriptasked 7 years ago Luiz Santos 3,162 -
6
votes2
answers1008
viewsHow to scroll in Javascript?
I am at the beginning of the studies on JS, however, I am with a project, and I had the idea to make a bar Progress, however, this effect of the bar Progress will only happen, when the scroll…
-
6
votes1
answer96
viewsDate conversion
I have a date in this format "2017-10-13T18:15:41.143Z" And I would like a date in this format 10/06/2017 01:42:34 PM (-0300) How can I make the conversion?…
-
6
votes1
answer204
viewsHow to make the arrow rotate several times until it stops by itself after clicking the button?
In the question "How to rotate an arrow inside a circle using Java2d?", i managed to learn how to make the arrow rotate within the circle. Only I need to make the arrow rotate like a casino…
-
6
votes2
answers593
viewsAND operator in regex
I have the following date/time format: 25/01/2017às11:53:37 And the following regex: REGX_DATAHORA_DISTRIBUICAO = "(?<data>\d{1,2}\/\d{1,2}\/\d{4})|(?<hora>\d{1,2}:\d{1,2}:\d{1,2})"…
-
6
votes1
answer3485
viewsCPF generator in Javascript
I made a CPF generator in Javascript and, I wanted to know if my code is good or what I can improve on it? Function that will be called by the event onsubmit function gerarCpf() { var cpf =…
-
6
votes3
answers2842
viewsSwap the image on smaller screens
I have the following code: <div class="container-fluid"> <h1> Áreas de Atuação </h1> <div id="hr-atuacao"> <hr> <div class="card-columns"> <div…
-
6
votes3
answers4625
viewstoLocaleString R$ Brazilian
I have a simple question about toLocaleString, I didn’t know this prototype and I was testing it instead of doing the good old split and replace var a = 10000.50 var b = a.toLocaleString('pt-BR')…
javascriptasked 7 years ago Jackson 853 -
6
votes1
answer3666
viewsWhat is an automated test?
Looking over the top, the term in question seems to me essential in the development routine, so simply, what is an automated test and what are the advantages? if possible a practical example of how…
testingasked 7 years ago Felipe Duarte 6,284 -
6
votes1
answer958
viewsHow to clear a 301 redirect that has already been stored in the browser cache?
To make it easy to understand the problem, I will call the site that had the redirect "A" and the destination "B" A 301 redirect (instead of 302) was carried out from site A to site B without any…
htaccessasked 7 years ago Renan Cavalieri 2,748 -
6
votes1
answer221
viewsWhat is a T-SQL query?
In the Stack Exchange Data Explorer, specifically in the first line it says: Click the Compose Query button up there and start Typing your T-SQL query [...] That in free translation would be: Click…
-
6
votes1
answer5709
viewsHow to use $broadcast(), $Emit() and $on() in Angularjs
I understood that the $emit() and the $broadcast are emitters and the $on is an event manager. I am working with unit tests and am unable to access the following function: eventHandler.service.js…
-
6
votes1
answer610
viewsWhat is the difference between REPLACE INTO or ON DUPLICATE KEY UPDATE
I am with the following doubt what is the difference between using REPLACE INTO or ON DUPLICATE KEY UPDATE in mysql, do not both serve the same purpose to make a change to a field or more in the…
-
6
votes3
answers1105
viewsApp being recognized as potentially dangerous
I usually copy the exe of the way: C: Users Username source Chatwinforms Appname bin Debug Appname.exe But when sending it to my colleagues for testing, the browser says that the file is usually…
-
6
votes2
answers930
viewsRemoval of excess whitespace
How to remove white spaces inside a string? It would be in the sense of removing spaces from a text string, with the exception of simple spaces between words. As the Excel "tidy" function.…
-
6
votes3
answers2216
viewsHow to reverse an integer?
Note this statement: /* * Faça um programa que peça um numero inteiro positivo e em seguida mostre * este numero invertido. Exemplo: * o 12376489 * => 98467321 * */ Console.Write("Informe um…
-
6
votes2
answers765
viewsHelp with jQuery. on calculation of plots!
Guys, I have a slightly complicated question for myself that I’m a beginner.. I’m developing a system where the user can select the amount of installments they want to split their purchase.. until…
-
6
votes1
answer571
viewsVBA Regular Expressions - Extract substring
In the text below, I would like a regular Pattern Expression, compatible with VBA, to extract the text located between the equal sign "=" and the first line break (highlighted in bold): Client = CON…
-
6
votes1
answer143
viewsSign + before function in Jquery? what does it mean?
I will finish a system started by another colleague who was disconnected from the company and I am in doubt about the use of + before starting the function, and I would like to know the impact of…
-
6
votes2
answers168
viewsWhat is Pushnotification really?
I’ve been wondering now about Pushnotification and if it really is what I want. To solve my problem I need to Pushnotification? See, what I want is this: When the user(seller) changes the flag of…
-
6
votes1
answer793
viewsWhat is the use of Task.Yield?
The documentation of this method says: Method Task.Yield() - adapted from English Creates a task suitable which returns asynchronously to the current context when awaited. I read the his source code…
-
6
votes1
answer210
viewsWhat is a static website generator?
Recently I came across this theme, more precisely the tool Hugo, that basically builds sites from themes and Apis reminding a lot of Ruby on Rails. I ran a test on build of an application that uses…
hugoasked 7 years, 1 month ago Felipe Duarte 6,284 -
6
votes2
answers319
viewsIs it possible to create a website without markup language?
Is it possible to create a website without any markup language, programming only, for example Javascript? In general, how?
-
6
votes2
answers1240
viewsWhat is the purpose of the Recyclerview.Adapter class when using Recyclerview?
To use the Recylerview Android we need to create a class CustomAdapter extending from the abstract class RecyclerView.Adapter then implement three methods that are: onCreateViewHolder…
-
6
votes2
answers245
viewsHow to fire multiple exceptions?
foreach (Foo el in arr) { // ... Validate(el); // ... } In the example code, when the foreach is executed, an exception can be triggered from the function Validate which will be treated on who…
-
6
votes3
answers8795
viewsHow to round a number to the highest value in Mysql?
I was doing some tests on Mysql and then the need arose to have to round a number to the largest. It would be something like: if($numero == 1.5){ $numero = 2; } Even though I could do it like this,…
-
6
votes3
answers342
viewsHow to escape characters in Windows Batch?
I have the following script: start "" "https://site.com.br/app/index.jsf?username=nomecabuloso&token=tokenzera" But when I do, it’s only index.jsf, it opens the following url:…
-
6
votes3
answers500
viewsPython 3 Negative Indices
So, guys. I’m new to python and I wanted to know the following: Is there any way to know the negative input of an item in a list? For example, I have the following code: lista = ['a', 'b', 'c', 'd',…
python-3.xasked 7 years, 1 month ago RafaCRz 61 -
6
votes1
answer844
viewsHow to define the order in which components will receive focus through TAB?
To organize the component focus selection order up to version 1.4 of java, we used the method setNextFocusableComponent(). However, it was discontinued from the aforementioned version. I would like…
-
6
votes1
answer185
viewsHow to concatenate conditions into multiple lines?
I am working with a legacy system and it has some IF’s with many conditions, with the intention of improving the readability of the code tried to break these conditions in several lines.. If rs(0) =…
aspasked 7 years, 1 month ago Caique Romero 7,039 -
6
votes1
answer1224
viewsWhat is the best implementation of 'Mergesort Algorithm'?
I know the Quick Sort algorithm, but at the moment I want to analyze Merge Sort. I found two types of Merge Sort implementation on the Internet. But when I compare them to the Insertion algorithm,…
-
6
votes1
answer100
viewsWhat is the use of default interface methods?
I was seeing some features proposed for C# 8 and came across the default interface methods. Add support for virtual Extension methods - methods in interfaces with Concrete implementations. From what…
-
6
votes2
answers216
viewsHow to select only the characters I want from a font?
I would like to decrease the font disk size so that the page loads faster. It is the font of Font Awesome icons. I want to know if there is any tool so I can remove the characters I don’t use and…
-
6
votes3
answers1479
viewsWhat is this "Could not find method schedule(View) in" error?
I’m calling a method, when I click the button and this error appears, but I don’t know what it means: java.lang.Illegalstateexception: Could not find method to schedule(View) in a Parent or Ancestor…
-
6
votes2
answers120
viewsDivision greater than R$999.00 results in Nan. How to format correctly
Division less than R$999.00 works correctly. However, more than R$999.00 results in Nan. How to revolve this? I’ve already put a replace and nothing! $(document).ready(function() { var demo1 =…
-
6
votes2
answers1675
viewsTranslating Identity in English
I’m using the Identity on my application MVC 5.2.3 Microsoft.AspNet.Identity.Core 2.2.1 also installed the translation package of the same Microsoft.AspNet.Identity.Core.pt-br 2.2.1…
-
6
votes1
answer705
viewsHow to extract information from an HTTP header with Python?
We know that in the HTTP protocol, the end of the header is indicated by "\r\n\r\n". Example: It may be that, for some reason, the customer does not send the "\r\n\r\n" to the server (could be an…
-
6
votes1
answer81
viewsJava type relationship or other language with processor architecture
Java has the primitive types: int and float, that store at most 32 bits of information, and we also have the types long and double that store 64 bits of information. Does this have or might have…
-
6
votes2
answers6436
viewsClass, Superclass and Subclass
Regarding inheritance by code reuse in C# I have the following doubt: What’s the difference between classes, superclasses and subclasses? This changes something when doing code reuse? Additional…
-
6
votes1
answer1124
viewsDoes Angular 2 replace jQuery and AJAX?
With the use of Angular 2, it is still necessary to use jQuery and AJAX or Angular to replace 100% of these 2 technologies?
-
6
votes4
answers4160
viewsCopy from txt file to other
int main(void) { void copiaConteudo(FILE *arquivo, FILE *arquivo1); FILE *arquivo = fopen("tmp/exercicio.txt","r"); if (arquivo == NULL) { printf ("Não foi possível abrir o arquivo"); return 1; }…
-
6
votes1
answer720
viewsSOAP WCF request in PHP
I am trying to consume a web service from a shipping company. However, PHP is not mounting the request correctly. Request in PHP: <?php $client = new…
-
6
votes1
answer1588
viewsHow to obtain value [[Promisevalue]]?
I’m having trouble getting value [[PromiseValue]] Below is an example of the image in Debugger mode: Follows code: Html: <img id="new_profile_photo" alt="Perfil"> JS:…
javascriptasked 7 years, 1 month ago Matheus Miranda 5,375 -
6
votes1
answer597
viewsHow to understand the required requests in Curl?
Yesterday I opened a question I was obliged to delete it, because I could not ask correctly. This question I will try to explain it in parts, come on. 1 - I monitored Twitter, following a person, I…
-
6
votes1
answer857
viewsAny CPU or x64?
I searched for compilation on Any CPU and x64, but found nothing regarding performance and file size. There is difference between these two in this question when the machine is x64? Website using C#…
visual-studio performance compilation x64 jitasked 7 years, 1 month ago Fernando Augusto De Almeida Ba 91 -
6
votes1
answer735
viewsHow to turn an asynchronous function into synchronous?
I have an asynchronous function and I would like it to become synchronous, because being asynchronous she is sending the data to the client before even completing the necessary steps, follows code:…
-
6
votes3
answers957
viewsRandom numbers are always the same
Why is this code always displaying the same random number results of a given? // Figura 6.9: fig06_09.cpp // Lança um dado de seis lados 6.000.000 de vezes. #include <iostream> using…