Most voted questions
150,413 questions
Sort by count of
-
6
votes2
answers413
viewsMemory management and release
1) When I create an object in which there is arrays and large variables, defining them as null, will help in the reduction? Within a method Dispose() - before they were of some value. 2) When I call…
-
6
votes2
answers306
viewsHow does Facebook write color on the browser console?
I need to do something similar to the image below: You can see it when you enter the browser console by going to any Facebook page. I tried to insert HTML into the function console.log(), but it was…
-
6
votes1
answer272
viewsSort list by string resemblance
I have a list of string: AAA BBB CCC ABB ABC ACC ACD The user will type what he is looking for, would like to take to the first positions, the most similar. Example: String: A Upshot: AAA ABB ABC…
-
6
votes1
answer149
viewsHow do I set the file size in a Download response?
I have an application where I give an answer by downloading a certain file on the server to the client. I zip the image files that are in a folder on the server and give an answer by manipulating…
-
6
votes2
answers554
viewsHow to create a Function and call your methods without using new, similar to jQuery’s $ ?
The $ (jQuery dollar) is a Function, however it is possible to access its methods as if it were an object through the operator ".". Someone could explain, in what way I could do this in a Function…
-
6
votes1
answer324
viewsMounting a query with Laravel
I’m studying the structure of the Laravel from this example already ready => beast. In the project there is the repository userRepository with the following structure: <?php namespace…
-
6
votes3
answers31875
viewsHow to know the version of Angular installed by Angular CLI?
I wonder how I can find out the version of Angular I’m using?
-
6
votes4
answers2533
viewsHow to split a string every 2 characters?
I’m trying to split a string every two characters, but I don’t have a delimiter and I need to use the whole string. Example: String exemplo= 99E65A78 String ex1= 99 String ex2= E6 String ex3= 5A…
-
6
votes2
answers405
viewsHow do you force git to keep a directory but ignore all the files inside it?
I have a certain folder and logs which is essential to the functioning of my application. I would like to add the same in my repository, for those who replicate does not want to keep creating the…
gitasked 6 years, 11 months ago Wallace Maxters 102,340 -
6
votes3
answers469
viewsHow to remove spaces from a string in Java?
I’m having a question about how to remove spaces from a Java string by doing this through the for. I’m making a letter diamond, and I use a variable to create the space between the letters. A B B C…
-
6
votes1
answer198
viewsHow do sessions work at HTTP level?
I came across this question recently and didn’t find much about it in web. I’m used to working (and reading) on Session in PHP, but I never stopped to think what they’d be like HTTP, someone would…
-
6
votes1
answer2779
viewsWhat is Initial Commit?
I’m learning to use Git, and I wanted to understand what this initial commit line looks like in the video class I’m seeing but it’s different in my environment. I want to understand what it’s for…
gitasked 6 years, 11 months ago Giovane Machado 371 -
6
votes2
answers724
viewsmysqli_real_escape_string Prevent SQL Injection?
According to the documentation, the function: Escapes special characters in a string of characters for use in an instruction SQL, taking into account the current character set of the connection. So:…
-
6
votes1
answer3874
viewsWhat is the importance of using "track by" in "ng-repeat"?
Whenever I see any article on the internet on how to optimize the render time of ng-repeat, I see comments on the option track by. Example: <div ng-repeat="task in tasks track by…
-
6
votes1
answer230
viewsIn R, a function that reads only a few columns of a dataframe in Rda format
I have 27 txt files. Each file represents a state of brazil. In fact, each file is dataframe on labor market. The 27 files can add up to more than 20 gigs. The first thing I did to reduce this was…
-
6
votes1
answer47
viewsFX (sound effect) in UX, is it good practice for systems running on browsers?
I’m doing some finishing for a release, and I had the idea to put some sound effects, like 'crack' when closing modal, or 'pin' by warning something. Well, personally I didn’t like it, but it seemed…
uxasked 6 years, 11 months ago AnthraxisBR 4,361 -
6
votes1
answer5685
viewsHow to unlink local directory from remote repository?
I need to switch machines and unlink the local directory from the repository to use it only on another machine. How can I do this untying?
-
6
votes1
answer611
viewsGet user location without using GPS
Hello. I’m developing an application on android that you need to notify a group of users who are in a certain region. The only way I know how to get the user’s location is by using GPS. The problem…
-
6
votes1
answer498
viewsDoubt in the code in probability calculation
I’m making a calculator to estimate the probability of lottery hits. I’m using this formula: Being: to is the number of tens of the steering wheel (at Mega-sena, a = 60) b is the number of dozens…
-
6
votes2
answers202
viewsWhy do we pass an object to the statement lock?
I’m working with multithreading and fell in a competition case. More than one thread accessed an I/O operation on the same file and so an exception was triggered. To solve the problem, I did so:…
-
6
votes1
answer301
viewsVisual Studio 2017 Cordova compile apk
I’m trying to compile an apk made with HTML5 in Visual Studio 2017 but it just gives this message: 1>------ Compilação iniciada: Projeto: Relatorios, Configuração: Debug Android ------ Cordova…
-
6
votes1
answer3429
viewsUse Bundle and/or only putExtra?
To pass data between activity, have 2 forms: 1. Using Bundle: public void teste(View v) { Intent i = new Intent(this,Teste.class); Bundle bd = new Bundle(); bd.putString("site","google.com");…
-
6
votes0
answers298
views -
6
votes1
answer104
viewsWhy does the server send 2 public keys on TLS Handshake?
During the exchange of information on TLS Handshake, the server sends a public key along with the certificate. The server also sends a second public key (Server Key Exchange) if the customer accepts…
-
6
votes1
answer2388
viewsMerge data frames
I have two data frame (see below) with information on consumption and gain of animals. Consumption was collected each day and gain in larger intervals. I want to join one next to the other, having a…
rasked 6 years, 11 months ago Luciano Hauschild 431 -
6
votes3
answers3732
viewsHow to place two Ivs next to each other in Bootstrap
I’m still novice in web development and I’m having a doubt in my form to put the two lines of the form next to each other in responsive Bootstrap, knowing that each input will bring information…
-
6
votes2
answers1493
viewsSyntax difference between databases
What is the difference, in the syntax, of the following databases, for a simple query, of the type: SELECT * FROM tabela WHERE id = '1' ORDER BY nome GROUP BY nome LIMIT 1 Or, what do they differ…
-
6
votes1
answer132
viewsAre variables randomly allocated in memory?
In a book about C, in which I started studying variables, it said that variables were randomly put into memory, for example: int a; int b; printf("a = %d\n", &a); --> 5000 (endereço) (%d ao…
-
6
votes2
answers348
viewsRoot with Bigdecimal
I’m racking my brain to turn a root into a code. I know it works kind of like this: Math.pow(625, (1.0/4)) = raiz 4ª de 625 = 5 My headache is that my dice are BigDecimals Sting prazoIn =…
-
6
votes2
answers978
viewsCheck if user name is unique in real time
Hey there, you guys! Currently, to check if a username is unique, I do it in the most basic way. Sending the POST to a PHP page that checks in Mysql, only then returns the error. php.: <form…
-
6
votes5
answers2427
viewsGet clicked element position
I have a list of entries and one of the attributes of that item is a delete button. By clicking the button I want to know the position of the line clicked inside the list. When knowing the position…
-
6
votes1
answer169
viewsIs it possible to inform the size of the VARCHAR in a Namedparameter?
I’m working with a tuning of an SQL Server database. Through the query below, I can see how the bank executed some of my heaviest queries. SELECT TOP 30 deqt.TEXT AS Query, last_execution_time FROM…
-
6
votes2
answers49314
viewsCommands to update Ubuntu apt-get update or apt update sem get?
In the company we received the instruction to run the following commands every morning, but the current project manager did not know how to answer me the reason and in the internet search I did not…
-
6
votes1
answer97
viewsDoes removing a DOM element also remove your listening?
I already know the appeal of Dirt collector. My doubt is in relation to this recourse to the addEventListener. Example test.addEventListener('mouseover', function(){ test.className = 'active'; });…
-
6
votes2
answers134
viewsProblem with return of a Java method
This method is giving problem in the return. An error message is appearing with the following statement Missing Return statement. Could someone tell me a solution? public String adicionar (String…
-
6
votes1
answer430
viewsRandom always returning the same number
I have a method that its function is to return 25 random numbers on a list: static List<int> criarList() { List<int> lista = new List<int>(); for (int i = 0; i < 25; i++) {…
-
6
votes1
answer73
viewsMeaning of expression <%# "example" %>
I’m used to seeing expressions like <%= "Olá" %> but I came across a code: <asp:Image id="imagemStatusDocumento" runat="server" ImageUrl='<%# ObtemImagem(Eval("NomeTipo")) %>' />…
-
6
votes3
answers3280
viewsHow can I make an Rand() that always generates only 4 random numbers?
How can I make a rand() that at all times generate only 4 random numbers, example: 4562, 9370, 1028... My code it generates up to 4 numbers, but it comes out 3. $presenca = rand() % 4000;…
phpasked 7 years ago user89739 -
6
votes2
answers396
viewsWhy are loops slow in R? How to avoid them?
It is very common to hear (or read) that loops are not efficient in Rand should be avoided (at this link or another link or even in this). And proving this statement is simple: numeros <-…
-
6
votes5
answers2539
viewsRegex to check if string does not end with certain characters
I’m racking my brain on the website http://www.regexplanet.com/advanced/java/index.html I’m trying to make a regex that validates some .txt not containing the characters JJ or M3 at the end of the…
-
6
votes1
answer500
viewsPure CSS for circle progress
I’m trying to make a circle of progress, but I’m not making it. I want it exactly this way. I want a black circle. A gray border smaller than that circle, like 5px less. A circle that is progress. I…
cssasked 7 years ago Diego Souza 16,524 -
6
votes1
answer102
viewsHow does Visual Studio’s Edit and Continue work?
Visual Studio allows you to edit C#, VB.NET or C++ code in debug when you hit a breakpoint or click the break button (pause icon). The name of the tool is Edit and Continue. According to the…
-
6
votes1
answer1727
viewsWhat is the difference between Type-safe and Null-safe?
I’m writing an article about Kotlin, and I came across these guys, if anyone can help me. What is the difference between Type-safe and Null-safe?
-
6
votes2
answers1345
viewsChange Boolean column to integer
I’m using a database that has a field called: status: boolean, but I want to store in it the values of the radio button (0,1,2) so I need to change to integer. I’ve tried to: ALTER TABLE OS ALTER…
-
6
votes2
answers157
viewsShow launch tag when date is IS NOT NULL
I’m trying to display a release tag and what seemed to be simple has turned out to be a complication. Product registration has two fields, data_inicial and data_expiração, initially make a select to…
phpasked 7 years ago adventistapr 5,498 -
6
votes2
answers791
viewsHow does the Sort method work?
I’m starting to learn javascript and while searching for examples of Sort I came across the following code: var numeros = [1,2,3,4,5,6,7,8,9,10]; numeros.sort(function (a, b) { return (a % 2 !=0);…
javascriptasked 7 years ago Pedro Santos 141 -
6
votes2
answers1673
viewsError in program in Visualg
I’m having problems with this program, because when I put it to work and type a value greater than 18, a message appears saying that is missing a FIMSE and that there is a FIMENQUANTO without a…
-
6
votes1
answer2325
viewsExplanation about sub pub(redis)
I researched about sub pub and I didn’t find anything in Portuguese, so I decided to ask here, I wanted to understand how the pub and sub especially to be applied with the redis, I read something…
redisasked 7 years ago PerduGames 371 -
6
votes1
answer145
viewsWhat are dynamic properties?
I am studying ASP.NET and saw the following code snippet: ViewBag.QtdNovosComunicados = (from c in comunicados where c.DataCadastro > UsuarioLogado.dtUltimoAcesso select c).Count(); I understand…
-
6
votes2
answers496
viewsWhat is the technical difference between SSL and EV SSL certificates?
I am in the implementation phase of the Cielo API on my website. On the integration site there are two types of certificatesat that link, EV SSL, and SSL. Honestly I am dealing with certificate for…