Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer174
viewsHow to Simulate Zoom Tweezers (Pinch zoom) in Chrome Dev Tools?
I am working on an interface that will be mobile. Is there any way to simulate the Zoom Tweezers (Pinch zoom) in Chrome Dev Tools? At least from version 59 or later? NOTE: For those who were in…
-
4
votes1
answer2544
viewsHow is the basic functioning of algorithm A*?
I’m reading regarding the search algorithm A* to be able to implement it in the future. I know it’s used to find a path in a graph, but I can’t visualize very well how it’s done. However, I am…
-
4
votes3
answers89
viewsOFFSET next to COUNT(*) returns nothing?
When I make a query this way are returned me the data correctly(At the moment 2 lines): SELECT * FROM noticias ORDER BY data_noticia DESC LIMIT 30 OFFSET 2 But I need to know the number of lines…
-
4
votes2
answers132
viewsSHA512 hexadecimal return
I found an example of encrypting a string with SHA512. public static string HashedString(string text) { SHA512Managed sha512 = new SHA512Managed(); byte[] hash =…
-
4
votes1
answer173
viewsApplication without Back-end
I’m doing a mini-application here at the company, where it consumes an API that uses JWT authentication (login done with email and password)... As everything I’ve done so far was with PHP, I’m a…
-
4
votes1
answer261
viewsAuto Input Fill in another browser tab via script
Is there any script that sends my input value to the page input I open ? As the example below shows, I need to send the value "12345" to the input of the XYZ page as soon as I click the link to open…
-
4
votes2
answers278
viewsAdd attribute via CSS if the following element contains x element inside
Hello! I don’t know if I could be very clear with the title of my question. But my question is with the following code: <div id="newsletter" class="col-sm-12"> <div class="news-title">…
-
4
votes2
answers58
viewsDifference between two dates with time greater than 24 hours?
I have the following query: Sqlfiddle Past 24 hours, it Zera the time and starts counting again. I need to draw the difference between the hours, as long as they have to pass 24 hours. For example,…
mysqlasked 6 years, 1 month ago Layla Comparin 553 -
4
votes1
answer384
viewsSend GET parameters to a php using the exec command
I am trying to send GET parameters to a php using the exec php command, but when I put the parameters the script does not run, it does not reach the other php, follows my code: exec.php: $cmd = 'php…
-
4
votes2
answers6030
viewsCompare dates in Python
Good afternoon ! I need to solve the following scenario in python: I have one or more files . txt in a folder, but I want to return only the files that have the modification date according to the…
-
4
votes2
answers115
viewsIntegration between Mailchimp and React Native app
I’m a beginner in React Native. I’m basically trying to accomplish the integration between my application in React Native and Mailchimp, what I want to do is: Once the user provides us with his…
-
4
votes1
answer295
viewsSlow query about Mongodb with index
I have a Mongodb collection of about 1.7 million documents, averaging 6kb per document. The bank is in a reasonable machine, with 6Gb of RAM and 4 Cpus This collection has an index on all fields of…
mongodbasked 6 years, 1 month ago Eduardo Klein 93 -
4
votes1
answer5505
viewsWhat is starvation (starvation)?
Some conditions may prevent progress in the execution of processes or threads, two of these conditions are called dead-lock and live-lock, where what I extracted from information was that, dead-lock…
-
4
votes1
answer318
viewsEntity Framework is not interpreting my settings
I have a serious problem with Entity Framework. I have two tables: Módulos and Viaturas, both with primary key name ID (Database First). A car can have a Module, but it can also be null, the…
-
4
votes3
answers82
viewsSequenced array within dropdown
Guys, I have a code that prints the arrays if I set the values, but I would like that sequence to be automatic. Let me show you so it’s clear. <?php $busca_produtos = new Produto; $produto =…
-
4
votes1
answer786
viewsWhat is an exponential backoff?
What is? What good is? In which situations to use it? There is only one or several strategy? (Example: Fibonacci backoff)
pattern-designasked 6 years, 2 months ago Gaspar 379 -
4
votes1
answer218
viewsHow does Git identify changing a file?
Example scenario I have the folder projetos on the server. On my local machine, where I have Git, I created a folder empresa, where I copied all the files from the folder projetos server. I did the…
-
4
votes1
answer4787
viewsHow do I create a project in Gitlab using git?
We can easily create a project on Gitlab and "sync it" by git: $ git clone [email protected]:user/teste.git But to do otherwise? Create folder and local project, and send as a "new" in the Gitlab?…
-
4
votes1
answer582
viewsHow to find the class that called a method another class?
I wanted to know if there is any way to get the class that called a method within that method. For example: public class A { public void metodoA() { B.metodoB(); } } public static B { public void…
javaasked 6 years, 2 months ago Felipe Avelar 9,507 -
4
votes1
answer112
viewsHow to page a query in Azure Cosmos DB?
I’m trying to pay for a consultation on Azure Cosmos DB, reading this post: Paging through query Results in Azure Documentdb, got to the code: public async Task <ICollection <TEntity>>…
-
4
votes1
answer2433
viewsPostgresql - Partial Foreign Key of Composite Primary Key
Fala galera, I need to create a structure model where all my tables have primary key composed by id and version, so I can have multiple versions for each id. Problem: CREATE TABLE table1 { id…
-
4
votes1
answer1039
viewsHow to change the color of the line below Edittext via xml
How to change the color of this line below Edittext via xml?…
-
4
votes1
answer9398
viewsAngular 6 ngFor
They can explain to me why the ngFor directive is triggering the "triggerTeste" function twice, and the array called "items" to which it is traversing only has stored 1 object type element.…
angularasked 6 years, 2 months ago Cleriston Martins Cardoso 107 -
4
votes1
answer150
viewsHow to implement an abstract method with a generic class in C#
I am creating a functional Factory where I define what is its output type and what are the required implementation methods. With this implementation, when I try to use the object obj within the…
-
4
votes2
answers37
viewsNavbar does not hide the div title when item is clicked
How do I make the fixed header not hide the elements? I’m using bootstrap 4 for a navbar. Here, for example, I have a fixed header and some Divs with titles. When I click on an item, it redirects…
-
4
votes4
answers430
viewsPrint variable inside a repeat structure
Not recognizing the variable soma because she’s inside the loop. What do I do to fix it? public static void main(String[] args) { int tipo; int restante = 0; int bim = 4; //double soma= 0; double[]…
-
4
votes2
answers1292
viewsWhat’s best to use, scanf() or get_s()?
Taking the name 'Maria da silva' as an example: scanf() just go read Maria, get_s() will read it all, correct? I’m in doubt of the best use, my college professor says we should clean the buffer to…
-
4
votes2
answers106
viewsHelp with select and repeat records
I have a postgresql database with a table like this: id_usuario | dt_atualizacao | atualizacao | outros_dados 123 | 01-01-2001 | 0 | abc 123 | 01-01-2005 | 1 | abe 123 | 01-01-2012 | 1 | acd 123 |…
-
4
votes1
answer252
viewsIs there a name for "3-state Boolean"?
But as such a "Boolean of 3 states"? It is usually used in comparing dates, where possible results are -1, 0, 1. I was in a similar situation and I was left with this doubt when I wanted to ask my…
-
4
votes1
answer134
viewsView 2 dataTextField in a Selectlist
Hello! I have a little problem to make a selectlist display 2 values in textfield. I have the following Selectlist which is stored in a viewbag: ViewBag.Account = new SelectList(new…
-
4
votes1
answer55
viewsHow to make a select based on data from another table
I have to make the following adaptation in a query: Table app_usuários: id, nome, sobrenome, hash, sexo, interesse, latitude e longitude. Table app_likes: id, user_a_id, user_b_id Briefly, I have a…
-
4
votes1
answer10088
viewsHow do I update the master branch from another branch?
I’m working on a branch calling for start/admin/status I want to bring all the changes that are in branch master because the project no longer has certain packages, how do I do this?…
gitasked 6 years, 2 months ago Romulo Sousa 569 -
4
votes1
answer5356
viewsHow to remove blank lines in VS Code?
I recently copied a file that was on a server and it came all like this, with a blank line between each line of code. I wonder if there’s a shortcut in the Visual Studio Code, or command to remove…
-
4
votes3
answers3810
viewsWhat is the difference between a View and a Stored Procedure in SQL?
I have come across SQL Views and also stored procedures. I would like to understand better, what is the difference between a view and a stored Procedure and what are its purposes? It would be…
-
4
votes1
answer784
viewsSelect the first row of each group in Mysql
Suppose I have such a table: item | group -------+-------- item a | group x item b | group y item c | group y item d | group x item e | group z And that I want to select a single item to represent…
-
4
votes2
answers116
viewsReplacing for the Lapply function in R
This is my list lista1<-list(c(1, 2, 3, 4, 5), c(6, 7, 8, 9, 10), c(11, 12, 13, 14, 15 ), c(16, 17, 18, 19, 20), c(21, 22, 23, 24, 25)) I build a new list the way below. novalista <-…
-
4
votes2
answers4332
viewsHow to identify a line break character in C?
Problem: Sometimes I get an entry like (and the entrance continues) other times as: (and the entrance continues) That is, I can receive an integer, or two, or three, and then then receive a string…
-
4
votes1
answer402
viewsHow to convert a list of Strings to an integer list
I have TXT file, and it lies like this: 01 02 03; 01 02 04; 01 03 04; 02 03 04; Well, I upload this file on ArrayList<String> as it is in the code below. How do I pass it to…
-
4
votes1
answer4550
viewsHow to zoom in on the image when the mouse hovers over it?
Like the one on that site -> https://flamengomaior.com.br/ A smooth zoom made from this site. What is the simplest way to do this? If possible in CSS/Html.…
-
4
votes1
answer43
viewsError in calculating the average from Inmet data using a Fortran program
I’m starting at Fortran, and I’ve set up the following program to get the average of the 4th column of data from an INMET data file. Since the calculated average is 0 (zero). Could someone tell me…
-
4
votes3
answers218
viewsPublic field X property
I have a string defined as "name" initially it is as private. string nome; In case I assign the methods get/set, and to stay in the pattern I change the initial letter to uppercase, getting: string…
-
4
votes1
answer398
viewsTesting Mega Sena Games
My teacher asked me to generate a mega sena bet generator. I did, and modesty part turned out pretty cool: from time import sleep from random import sample palpite = list() a = [] print('='*40)…
python-3.xasked 6 years, 2 months ago Douglas Eduardo 41 -
4
votes2
answers49
viewsPulling elements from one list to another under a R criterion
The vector below indicates the regressions I circled. regression_pairs=c("A~B", "C~D", "E~F", "G~H","I~J","K~L","M~N","O~P","Q~R") regression_pairs Below is the list where I saved the residuals of…
-
4
votes1
answer979
viewsHow to catch the date and minimum time of the day with Localdatetime
I have this dateHora in the database: 21/07/18 15:52:00,000000000 When the query passes by parameter one LocalDateTime, I want to list all the dates that start the day. How to get the minimum date…
-
4
votes1
answer385
viewsHow to PIVOT a column by concatenating strings into Sqlserver
Hello, I’m making a query in a database to identify all the columns that are primary key's of the tables of a database and also identify whether or not they are identity. For this I use the query…
-
4
votes1
answer109
viewsTrajectory of an object using canvas in javascript
The question is this, I was able to develop the exercise to a certain extent, after that, as I do not know much of javascript, if I send the square back diagonally, the square comes back earlier due…
-
4
votes2
answers353
viewsWhy does Typescript when compiled convert "Let" to "var" in variables?
If let variavel = "valor"; is also compatible with JavaScript, because in the compilation of Typescript, it turns to var variavel = "valor"? Take the test right here: function foo(){ var x = 1; let…
javascript typescript ecmascript-6 variable-declarationasked 6 years, 2 months ago Ivan Ferrer 12,096 -
4
votes1
answer99
viewsIs it possible to change a String of a method at runtime?
If I have one String fixed within a method is it possible to change it using reflection or something like that? Example: public static void main(String[] args) { String nome = getName(); boolean…
-
4
votes1
answer142
viewsSort in C++ does not show the correct input value
I made a code to read 3 values, and with the sort() it sorts the values in ascending order and just below shows the input values. For example:-14 21 7 it sorts right but the output shows -14 7 21 //…
-
4
votes1
answer115
viewsHow to identify if an item has been removed from the page in real time
How to identify with Javascript, if the user has removed a div of the page by the, or element inspector, that is to say, if the id element no longer exists on page, perform an action. Simple…
javascriptasked 6 years, 2 months ago Mark Vaaz 966