Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer256
viewsHow to make a Help equivalent to Microsoft Help Viewer, but in Visual Studio 2012/2013?
I wanted to do a Help for a commercial automation system that I created, that was in the style of Winrar help, and that was offline. But apparently according to the article Microsoft Help Viewer on…
visual-studio visual-studio-2012 visual-studio-2013 microsoft-help-viewerasked 10 years, 11 months ago Zignd 6,741 -
4
votes1
answer7167
viewsHow to count the cumulative number of occurrences of an element in a vector?
Suppose I have a vector in R: x <- c("a", "a", "b", "a", "b", "c") I need to determine for each position i of the vector, how many times the element x[i] appeared until then. The result for the…
rasked 10 years, 11 months ago rodrigorgs 6,635 -
4
votes2
answers323
viewsHow to disable JVM domain name resolution (hostnames)?
An application is trying to access a remote EJB. Regardless of whether the configuration uses the address servidor.empresa.com.br or an IP to access the service, an error occurs:…
-
4
votes4
answers5177
viewsHow to handle vectors in a Mysql database?
I have a supermarket box application in which after the end of the sale need to insert a record with data related to this sale in a table, in this record must be included the code of the products…
-
4
votes3
answers882
viewsHow to insert an extended value into a table in a varbinary column?
A table has a varbinary(max) column, I need it to have a 400MB input of data in this column. How I create this data? The Insert statement has to have the data in full or I can use a loop or a…
-
3
votes2
answers28
viewsCommand to create multiple columns in a data.frame conditioned to other 2 columns
If I have a date.frame formed by the vectors: V1<-c("A","B","C","D","B") V2<-c("C","D","C","B","B") V3<-c("D","D","C","A","A") V4<-c("C","B","C","A","C") G1<-c("C","C","A","A","B")…
-
3
votes3
answers40
viewsHow to turn a 2D Array into 2D Pointer in C
It is possible for a function to receive as a parameter a reference to the address of a two-dimensional array (matrix) static, and from the pointer to access the elements of this matrix. In the…
-
3
votes1
answer34
viewsCreate Moving Average column for various assets (python - finance)
would like to know how to do the media column next to each company on the list import numpy as np import pandas as pd import yfinance as yf empresas1 =…
-
3
votes1
answer42
viewsCreate a column filled with 0 or 1 based on other columns in Pandas
I have a data frame and need to fill a column with 0 or 1 based on the values of another 29 columns. If you have 1 in any of the columns 0 to 28 the column with Dor_leve receives 1, otherwise…
-
3
votes2
answers83
viewsGrab last file that entered in "Downloads" folder
How can I open the last file that was downloaded in the folder "Downloads" with Python? I saw several options with the libs os.path and os.walk but none of them makes it possible to take the last…
-
3
votes3
answers53
viewsmaximum values
how do I select the 5 highest values (km in this example) in a data set? I only know the function which() and max(), but they give only the greatest of all, not the biggest 5 for example. dados…
-
3
votes2
answers65
viewsDelete prepositions and text articles in python
I imported a file to Python where I recognized all the words and I need to get the frequency they appear in this text, but the highest frequencies are prepositions (from, to, with) and articles (a,…
pythonasked 3 years, 3 months ago Luiz Eduardo 41 -
3
votes1
answer65
viewsWhat is "Error cause" in Javascript?
It is common to have mistakes thrown and these errors have to be captured and treated in different ways, according to the context. I see (and use) the practice of creating custom classes of errors…
javascriptasked 3 years, 3 months ago Cmte Cardeal 5,299 -
3
votes0
answers54
viewsAttempt to compare values from a list in a function does not generate the expected result
I have a function that receives a list and inside it a loop of repetition in order to go through all the positions and compare the value of that particular position with the value that comes by…
-
3
votes0
answers41
viewsProblem with Assembly subtraction
My teacher sent this simple code in C, to turn it into Assembly: int num1, num2, resultado; printf("Digite o primeiro numero: \n"); scanf("%d", &num1); printf("Digite o segundo numero: \n");…
-
3
votes1
answer77
viewsWhy is it that when I use tabulation on a printf, there are cases where it doesn’t tabulate correctly?
I have this code: #include <stdio.h> void main(){ int fahr, celsius; int inicio, fim, incr; inicio = 0; fim = 300; incr = 20; fahr = inicio; while(fahr <= fim){ celsius = 5 * (fahr-32)/9;…
-
3
votes1
answer49
views"Attempt to compare string with number" when comparing in Lua
print("Qual é a sua idade") idade = io.read() if idade < 18 then print("Você é menor de idade") else print("Você é maior de idade") end He always makes that mistake : lua: aula05_parte4.lua:4:…
luaasked 3 years, 3 months ago Rogério Matheus 31 -
3
votes1
answer68
viewsPrevent the insertion by the user of the same number of CPF in three different fields
In a table I carry the number of patient, doctor and attendant. I’m trying to stop the person from scheduling the 3 with the same values. Like: INSERT INTO agenda(cpf_atendente, cpf_paciente,…
-
3
votes1
answer40
viewsStringbuilder append() converts to string automatically
Why when I use .AppendLine() it is necessary to convert the parameter to string, but when use .Append() conversion is not necessary?
-
3
votes1
answer65
viewsPygame how to make the character jump
I’m taking my first steps in pygame, and I’m trying to get the game character to jump, but I stumbled upon one mistake: the character just teleports up and down in 2 frames he did the whole move,…
-
3
votes1
answer32
viewsError E2033 Types of current and formal var Parameters must be identical. How To Troubleshoot?
I’m trying to write a Project in Delphi 10. Procedure calls a form I use to display error messages. But when I try to make things work, Delphi gives an error like: [dcc32 Error]…
-
3
votes1
answer27
viewsAdd extra spacing between dots with text-Decoration-style: dotted;
Is there any way to add extra space between the dotted inserted with text-decoration-style: dotted? I own this anchor: .anchor { text-decoration: underline; text-decoration-style: dotted;…
-
3
votes1
answer54
viewsconvert input in seconds to days, hours, minutes in seconds from day on another planet. C code
I need to convert the passage of time from another planet to days, hours, minutes and seconds on earth. The point is, I’m getting one int (variable seg) for the seconds spent on Jupiter and I need…
casked 3 years, 4 months ago Pedro Fidelis 33 -
3
votes0
answers46
viewsFloat Sum. Workaround for the Java Script 0.3 billion 0004 error
I’m making a list of exercises about Java Script and the question where you ask 05) Dealing with numbers in Javascript can give you a lot of headache. Have you seen what happens when you do the…
-
3
votes1
answer56
viewsHow to declare that a camp has the same kind of class?
I am trying to add typing to the Python code, and I came across an error when trying to annotate the type of a property that must have the same type of class in which it is declared: from typing…
-
3
votes1
answer36
viewsIf the class ofstream is to write to files, ifstream to read and fstream to both cases, why not always use fstream at once?
Even if we wanted to read, write, modify, create, delete files, or other operations, we could no longer use the class fstream? What problems could they generate if you don’t use those specific?…
-
3
votes2
answers84
viewsIs there a difference between "accuracy" and "precision" in computing contexts?
Recently, appeared on the site a question which deals with "inaccuracy" of the value returned by the method Math.toRadians Java. However, in other places (such as in the answers of this question),…
-
3
votes3
answers79
viewsSelect right line with Split in TXT
My doubt is on how after separating the lines into lists, I can also take these values and just do the append of the right line (numero_linha of function). But also, manage to catch the whole line,…
-
3
votes3
answers75
viewsStore data in DB vertically or horizontally?
I recently posted a question about number of fields in a table here: Number of Columns X performance in tables Now I am curious about the standardization in the creation of the table below, I have…
-
3
votes2
answers144
viewsWhat are the differences between constants declared with const and immutable variables declared with Let in Rust?
The declaration of immutable variables In Rust if you want to declare a variable, we use the keyword let. Example: fn main() { let site_name = "Stack Overflow em Português";…
-
3
votes2
answers57
viewsWhat is the difference between onDestroy and the function returned by onMount callback in Svelte?
Svelte provides the function onMount, which is executed just after rendering the component and takes a function per parameter: onMount(() => { console.log('hello') }) If the argument function…
-
3
votes2
answers35
viewsHow to select rows that have text searching in all columns of a data frame
I want to select only the lines that have the text "Try", similar to grep in Linux. Follow the example: my.data <- data.frame( A = c("prot trypsina catalic", "7", "123", NA, "1419", "ab", "ab",…
-
3
votes2
answers202
viewsHow to prevent a class from being instantiated in Python?
I have a mother class and want to inherit it to a daughter class. But the mother class cannot be instantiated, only inherited. In other words, the mother class should be abstract. Although Python’s…
-
3
votes2
answers127
viewsHow to detect Start Codon and Stop Codon in a nucleotide sequence using Python?
I am trying to solve an exercise in which a function with a start and a stop, where the start should occur when you find "ATG" and the stop when you find the "TAA", "TAG", "TGA". With the help of…
-
3
votes2
answers59
viewsHow to maintain a responsive daughter DIV without overriding parent DIV and without using overflow:Hidden
Guys, I’ve been trying to apply an HTML layout for a while but I’m having trouble keeping Divs responsive. Basically the layout I want is this one. However when adding more color Divs Tomato the…
-
3
votes1
answer62
viewsHow long does Developer lru_cache live?
I’m developing a Python script that needs to memorize the information (possibly a cache) of previous instances and I ended up finding the developer @functools.lru_cache, but I was left with doubts…
-
3
votes2
answers84
viewsHow to return the last character of a String in C++?
I want to make a program that shows on the screen the last character of a String. In Python it would be something like this: nome = "Teste" print(nome[-1]) Upshot: and So I tried to adapt it to C++:…
-
3
votes1
answer64
viewsWhat is the best way to check if a string has any of these words?
I have a question, consider the following: nomes_proibidos = ['Corona', 'Clorivaldo', 'Pfizernaldo', 'Hulk', 'Naruto', 'Goku', 'Cloroquina'] def verificar_nome(n): for nome in nomes_proibidos: if…
-
3
votes2
answers116
viewsHow to get the only different value inside an array in Javascript?
I saw many questions showing how to get unique values in an array, but none solved my problem. I get an array like this: [ 1, 1, 1, 2, 1, 1 ] I want to determine the unique value within it, which,…
-
3
votes1
answer55
viewsHow to change values on the y-axis
How do I change the values of the y-axis to 0,5,10,15,20? # Dados da produção da aquicultura 2013-2019 producao_aquicultura = structure(list(Valor = c(19350491, 22082777, 21063695, 20828670,…
-
3
votes2
answers73
viewsIs there documentation in the Ecmascript standard that ensures that an array when passed as a property advisor has a defined format?
The other day debugging a code here on the page I found something peculiar. Like that: let a = {}; let b = [1,2,3]; let c = [4,2,3]; a[b]= 1; a[c]= 2; console.log(a) //{ "1,2,3": 1, "4,2,3": 2 }…
javascript characteristic-language software-engineering documentation ecmascriptasked 3 years, 5 months ago Augusto Vasques 15,321 -
3
votes0
answers99
viewsHow to hide files on Github?
I want to make some of my Github projects public, but some of their files contain sensitive information (such as database access passwords). It is possible to leave these specific files hidden so…
-
3
votes1
answer74
viewsAre "Empty" values within an array not eternal?
In this code snippet: let arr = []; arr[3] = null; The following excerpt arr[3] = null; makes the array size according to the value within the array annotation []. The forEach will be used to work…
-
3
votes1
answer51
viewsIs there a way to specify a hash, version, or signature when running `npx` (from npm)?
I am creating a generator to generate some static HTML pages. However, I came across the situation of having to use the NPX to use the AMP Optimizer. I can execute the command as follows:…
-
3
votes1
answer72
viewsHow to force the user to pass a type to a generic class?
I have a generic class called Quantity<UnitType>, and in some methods of another class, I need to get an object of that class in a specific type. See the code below: interface UnitType {} enum…
-
3
votes1
answer44
viewsWhat is the CSS selector to change a particular parent class only if it has a certain daughter class
I have the following structure in HTML: <div class="panel"> ... </div> <div class="panel"> <div class="controls"> ... </div> </div> The class panel has some…
-
3
votes1
answer39
viewsHow to delete several elements from a list() at once in R?
I have the following list: x <- list("1", 1, 2, 2.1, TRUE, "yes", "necessary", 31, FALSE, "FALSE") would like to exclude from it all the elements which NAY are whole numbers and not characters,…
-
3
votes1
answer89
viewsIs it possible to apply or simulate immutability to an "object" of the Map type in Javascript?
For objects, we can leave it unchanged, so trying to re-assign a new value to a property, adding new properties, or removing properties is not possible. Of course, in case the object suffered…
-
3
votes0
answers388
viewsNon-nullable instance field '_Description' must be initialized
"Non-nullable instance field '_Description' must be initialized." As of version 2.12.0, Flutter always displays messages like this, how to solve this problem without downloading the version?…
-
3
votes1
answer58
viewsIs it recommended to use typedef in C++?
I know C++ is compatible with C, but C++ has its own way of programming and C as well, so there are legacy things from C that shouldn’t be used in C++, the typedef is one of them? If yes, what to…