Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer204
viewsDownload zip files from a link to a PC folder via R
Good afternoon I need to download the zip files from the following site ftp://ftp.bmf.com.br/MarketData/ I would like to download via R, and that the files were saved on my computer, but I do not…
rasked 5 years, 6 months ago Henrique Faria de Oliveira 725 -
5
votes1
answer393
viewsawait does not await execution of the President
I thought I understood how asynchronous function works with await. In my understanding the await was waiting for the resolve of Promise to continue to the following. To test this operation, I…
-
5
votes1
answer51
viewsHow to store the password in the R script in the package 'Encryptr'?
I did it: library(encryptr) genkeys() And I created the password: 0)]30l^8 password<-"0)]30l^8" data(gp) write.csv(gp, "gp.csv") encrypt_file("gp.csv") My problem: How to automatically enter the…
-
5
votes3
answers182
views -
5
votes1
answer133
viewsdoubts about POST method
I am learning php and would like to take a doubt if my code is vulnerable to sql Injection. In case I’m putting together a form <form method="POST" action="classes/cliente.class.php"…
-
5
votes1
answer87
viewsHow to get a list from a JSON
I am trying to make a list of currencies from a JSON text, for this I am using the API "exchangeratesapi.io". Using Javascript I achieved some success: const url =…
-
5
votes1
answer742
viewsDifficulty performing data CRUD with Fullcalendar and Django/Python
I’m trying to use the FullCalendar in my project Django and I’m having a hard time doing the data crud. I would like everything to work on the same screen, that is, when the user selects dates in…
-
5
votes2
answers1055
viewsIf, Elseif and Else with Java 8
I would like to build a method using Java 8, replacing the conditional IF, ELSE-IF and ELSE. For this, I built a sequence of code, I do not know if it is ideal and would like to hear better opinions…
-
5
votes1
answer60
viewsChange colors on the chart
Good afternoon. How do I assign different colors to each line and how to red the part of the chart above the top line and below the bottom line? a<-c(5.8, 9.8, 2.4, 4.4, 4.6, 5.6, 5.6, 7.4, 6.6,…
rasked 5 years, 6 months ago Vitor Hugo 151 -
5
votes1
answer247
viewsDisplay "emoji keyboard" using Javascript, is it possible?
In the latest versions of Google Chrome/Opera has a feature to select emoji, native browser. This can be done by the user right-clicking and clicking on "Emoji" in some typing field…
javascriptasked 5 years, 6 months ago Inkeliz 20,671 -
5
votes1
answer880
viewsWhat is the purpose of the "request" and "Response" objects of a web framework?
Many frameworks that are based on routes use two objects at the time it executes the action corresponding to the route. See an example on Slim: $app->get('/hello/{name}', function (Request…
-
5
votes2
answers62
viewsIs there a method of merging equal items into a var list in LINQ in C#?
Hello, good morning, good afternoon or good night, all right? I have a method that obtains products from a database using LINQ in C#, but on that list there are products that are repeated, so you…
-
5
votes1
answer113
viewsWhat is the best way to use threading in this example?
That is the challenge: Create a function that shows an item from a list every second. Using threads, make the program show all items as quickly as possible My code: import threading import time…
-
5
votes2
answers134
viewsComparison of array in php
I have a array of the kind array1(array(1,2,3,4,5), array(2,3,4,5,6)); and another of the kind array2(1,2,3,4,6); I need to compare array1 with array2 and pick the difference between them, but…
phpasked 5 years, 7 months ago Lucas Araujo 75 -
5
votes1
answer760
viewsUse of IIFE in ES6
In ES5 it is considered a good practice to use IIFE to force a local scope in our code. EX: (function(){ // some code })(); In ES6 this is still necessary? Once keyword has been introduced let for…
-
5
votes1
answer1295
viewsMake a DIV push the rest of the content down
Everything all right? I have a question here, but I wanted to understand, not just ask people to do what I need to do. I will try to explain: I have a button to add lines of text. Below this button,…
-
5
votes1
answer147
viewsIs it correct to leave the responsibility of freight calculation at the front end?
We all know the agility that certain code written on the front end has and makes our applications faster. It would be correct to calculate a freight at the front end of the application and send this…
-
5
votes1
answer204
viewsR how to calculate on different lines of the date.
I’m doing it this way: temp <- data.frame(ano = c(1997,1999,2001,2003,2005,2007,2009,2013,2019)) a <- (temp[2,1]-temp[1,1])+1 b <- (temp[3,1]-temp[1,1])+1 c <- (temp[4,1]-temp[1,1])+1 d…
-
5
votes4
answers197
viewsCorrect syntax way in object instance
In the instance of an object, we can: Pessoa pessoa = new Pessoa(); and we can also: Pessoa pessoa = new Pessoa(){ Nome = "Nome", Id = 0, Situacao = true }; What is the best or most correct way to…
-
5
votes1
answer173
viewsWhat is the pseudo-class :lang for?
I’ve already turned the internet upside down and always find the same thing as on the site w3schools saying it is to set special rules for languages. I know it has to put characters around the…
cssasked 5 years, 7 months ago user139915 -
5
votes1
answer268
viewsHow to make filter Blur pick up the whole element. Prevent Blur from ending before the end of the element background
I have a div who is with filter:blur(), but I noticed that the blur means it is inside the element. What I mean is that when you reach the box-model boundary the image of background begins to…
-
5
votes1
answer88
viewsWhat is the lowest number of irrigators (circles) needed to cover the surface of a foliage (rectangle)? (competitive programming)
I participated in a test and, in one of the problems, I did not get the total score of the question, one of the test cases gave Wrong Answer, but I could not identify exactly my error. The statement…
-
5
votes1
answer280
viewsWhat is the difference between "==" and "is" in Python?
Using the two lists below as an example: x = [1, 2] y = [1, 2] And testing: x == y x is y The first test gives True and the second gives False. Why the result is different in both cases?…
pythonasked 5 years, 7 months ago Thiago Krempser 1,878 -
5
votes2
answers211
viewsSelect next elements
I have a table with inputs <tr> <th>Linha X</th> <td><input type="number" name="AAA"></td> <td><input type="number" name="BBB"…
-
5
votes1
answer225
viewsAsynchronous programming C#
How would my application behave in a scenario where I perform an asynchronous query in the database and then manipulate the returned value? The application would wait for the query to be finalised…
-
5
votes1
answer137
viewsDoubt about Neural Networks
I had finished the course of Neural Networks with python, and simply after having trained my entire neural network, I had a question about the use of it. For example, after my network goes through…
-
5
votes2
answers133
viewsPrintdocument Printpageeventargs c# wpf Pagesize WPF
I have the following code: PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(arquivoImpressao); pd.DefaultPageSettings.PaperSize = new PaperSize("teste", 300, 600);…
-
5
votes1
answer5766
viewsDifference between onClick commands in React
When it comes to callback functions in Reactjs, what is the difference between the options below? onClick={() => this.onFunctionCickCall()} onClick={this.onFunctionClickCall()}…
-
5
votes1
answer1315
viewsHow to delete all files from a directory
I would like to know how to delete all files from a directory. Suppose I need to delete all files from the Test folder in C: test.
c#asked 5 years, 7 months ago Ronison Matos 313 -
5
votes3
answers1025
viewsDropdown with click
I created an HTML and CSS from a menu but I can’t create Dropdown with click, only when you hover your mouse the menu collects or expands and I would like to do it with one click. Thanks in advance…
-
5
votes1
answer211
viewsMysql use 'as' in aliases or not?
Writing a query in Mysql I came across this doubt, I made a search, however, I found nothing (or did not know how to look for), the doubt is simple, there is some difference between using or not the…
-
5
votes1
answer137
viewsWhy does FILTER_SANITIZE_EMAIL not remove some special characters?
I know how the FILTER_SANITIZE_EMAIL works, but what I can’t understand is why it doesn’t remove the following characters: ! # $% & '* + - =? ^ _ `{|} ~ @. [] . I know that in the documentation…
-
5
votes2
answers1140
viewsHow to make an Insert with columns and values coming from a select?
Imagine the following situation: Run a query in a database to acquire a particular record line, and then enter it again in the same table at the end of the records. It is possible that I can enter…
-
5
votes1
answer70
viewsHow to stream video with interval request?
I have a video saved in the database with type VARBINARY(MAX). How can I make a request range ? The following code gets the full video from the database and plays in the variable video_byte; This is…
-
5
votes2
answers804
viewsRegex for single quotes
I would like to remove the single quotes in the middle of a text, ignoring the ones at the beginning and end, if any. 1st Case: 'Texto e pala'vras' = 'Texto e palavras' 2nd Case: Texto e pala'vras =…
-
5
votes2
answers90
viewsWhat are these complex members within a struct?
I have a question in a struct on the last lines with uchar and void which is quite different from what I know. Why many programmers use underline in the names of structs, variables etc... struct…
-
5
votes1
answer78
viewsA method can access the properties of the object it belongs to when stored through a delegate?
I’m building a dictionary of the following kind: <string, delegate>, that will access a method belonging to an object of the following class: class Example{ public int Power { get; set; }…
-
5
votes1
answer142
viewsWhy do local variables not receive default values from the Java compiler or JVM?
Why the compiler assigns values default for attributes but not for local variables? public class Teste{ int a; public void metodo() { int b; System.out.println(a); System.out.println(b); } }…
-
5
votes1
answer158
viewsHas some real use when implementing non-abstract methods in an abstract class
Have some real use when implementing a method that has a field, (implemented code) in an abstract class that cannot be instantiated, since no compilation error occurs? public abstract class…
-
5
votes1
answer5532
viewsIn a file . bat (Batch) how to rename a file using variables such as %userprofile%?
I am wanting to rename a file that is found on the Desktop using batch script. The only line that’s going wrong is this: rename "%userprofile%\Desktop\Lista.xlsb" "%userprofile%\Desktop\Lista -…
-
5
votes1
answer152
viewsCreate a new template for each N *ngFor elements
Hello, I have an array items:any[] and I want to iterate in the view with the *ngfor, however, I am using a template <carousel> where for every item of that slide I call <carousel-item>,…
-
5
votes2
answers3202
viewsRegular expression for repeated characters
Does anyone know if it is possible to check if a string has all the same characters? For example, can characters followed or more than one in the same string, but not all the same: That may: $str =…
-
5
votes1
answer239
viewsWhere are the objects created in Python stored?
I made a little script to record student data where I work. I can instantiate it and I can see the data right after. But, after leaving the program, this data is lost. Are these objects only stored…
-
5
votes2
answers56
viewsScripts - Load all or split?
I have a page with several static elements, these which, load dynamic elements, basically all in body distributed in divs, via Ajax. These dynamic elements use several functions, relative to each of…
-
5
votes2
answers298
viewsHow to overlay flex items during a CSS Hover?
I have a form you received display: flex, and inside it is 3 inputs: a name, a password and a button, plus a h1 written 'login'. When I pass the mouse over the elements, the height and the width…
-
5
votes2
answers6898
viewsHow to open html files directly from visual studio to my default browser?
I use visual studio code on Ubuntu, and would like to know if you have any way to open an html file with just one click for my default browser
visual-studio-codeasked 5 years, 8 months ago x8ss 152 -
5
votes1
answer239
viewsProblem with file reading . WAV
Hi, I’m trying to read a file. 5s wav filled with "silence" to test the code in C. I was able to read the header but while trying to extract the date field where it contains the content itself (…
-
5
votes1
answer56
viewsIs it possible to reuse domain classes between different applications?
Some materials including recent cite the possibility of reusing domain classes for different applications. Example This reuse is viable? How he does in practice?…
-
5
votes1
answer73
viewsscrape news portal comments
am programming enthusiast. am trying to scrape comments from a news portal to make a cloud tag. I’m trying to do this using Beautiful Soap but have gotten a None return. Follow the code I’m using.…
-
5
votes1
answer69
viewsRelation between selects
I have a system that has 3 selects, where selecting an option in the 1st select is listed a list in the 2nd select and selecting an option in the 2nd select, is listed the items in the 3rd. The…