Most voted questions
150,413 questions
Sort by count of
-
3
votes2
answers242
viewsWhat is virtualenv for in Python?
What is virtualenv for in Python? Do you have any alternative to non-use or is it more advisable to use it?
-
3
votes1
answer133
viewsWhat is the use of "." (dot) in PHP’s ltrim, rtrim and Trim functions?
I was here doing a feature, where I needed to remove some characters from the beginning of a string, and I wasn’t really in the mood to use regex for that. I tried to use the function ltrim, since…
-
3
votes1
answer129
viewsConcatenate large python csv files
I am trying to concatenate files that reach a sum of 650MB, and is returning memory error: > MemoryError: Unable to allocate 70.3 MiB for an array with shape (3, 6143249) and data type object…
-
3
votes1
answer50
viewsCreate R column from the number of records by 2 Ids
I am starting in R and stackflow. I ask for your help. I have the following dataframe: library(lubridate) ID = c("000225", "000225", "000225", "000225", "000226", "000226", "000227", "000227",…
rasked 4 years ago Bruno Fernandes 43 -
3
votes3
answers117
viewsHow to identify output status in a bash program?
I have a bash that runs a series of scripts in other languages. When I step from one script to another I use the first form of conditional (&&) which I understand as "run the next script if…
-
3
votes1
answer41
viewsGrid on R does not work
Hello, I’m trying to create a chart with the following code: boxplot(covid_DF$obitosNovos ~ month(covid_DF$data), main="Média de obitos novos por mês no Distrito Federal", xlab="Mês",…
-
3
votes1
answer72
viewsYAML: How to use the current date in the Rmarkdown compilation?
How to automatically include the current system date in the title of the document to be compiled by R-markdown? When I try to include the system date in the field date through the YAML code: r…
-
3
votes3
answers126
viewsString to date.parse Javascript conversion problem
I’m getting in a date value variable on string and making the conversion to date, to be able to make a condition. The problem is that when the date comes as 31/12, the variable gets NaN. Follow the…
-
3
votes1
answer60
viewsHow do I create a list to save countless Numbers generated by my function in R?
Good evening dear friends! I created a script that generates several age pyramids simultaneously. In this case, the great advantage is to generate hundreds, or even thousands of pyramids in a few…
-
3
votes4
answers951
viewsHow to make a "read more" and a "read less" button in a text that comes dynamically from the database with Pure Javascript?
I would like to make a "read more" and "read less" button with Pure Javascript (no jQuery). However, this text comes dynamically from the database and I use a PHP foreach to fill the Divs with these…
-
3
votes2
answers168
viewsI need to compress several separate files with powershell
I need to assemble a script to compress log files one by one, I arrived on that line, it calls the 7zip, lists the files, but returns "The system cannot find the file specified." where the folder is…
-
3
votes1
answer119
viewsDifference between merge to Pick Herry?
What’s the difference between git Cherry-pick and git merge According to the definition in git itself git-Cherry-pick - Apply the changes introduced by some existing commits git-merge - Join two or…
gitasked 4 years ago mariele fontana 33 -
3
votes2
answers413
viewsHow to copy files from one directory to another using regex?
On the linux terminal, when I want to list files in a directory using regex, I do: #exemplo listando arquivos começando com uma letra maiúscula ls | grep -oP '^[A-Z].+' The flag oP is used for…
-
3
votes1
answer580
viewsWhat is the difference between SQL Server, Mysql and other SQL?
I would like to know more clearly what are the main differences between SQL Server, PL/SQL and Mysql, and what are their main strengths/weaknesses.
-
3
votes1
answer119
viewsMoment - problem with Timezone
I receive the service date as follows: 2020-11-05T06:15:00.000-03:00 To display to the user we use the library Moment. Example: import React from 'react'; import moment from 'moment'; var chegada =…
-
3
votes1
answer459
viewsHow to put objects in empty array with React Hooks
I have the following data set: const dados = [5, 10, 15, 20, 25, 50, 90]; const colors = [ "#52DF9A", "#FFCE1C", "#3570BD", "#3570BD", "#00B894", "#FB6B32", ]; And I’ve got the following state:…
-
3
votes1
answer1112
viewsCount number of unique records in a Data Frame
I have a base with a column custumer_id and I need to know the amount of unique records on the base. quantidade_clientes = df[['customer_id']] quantidade_clientes.count() This way I count everyone,…
-
3
votes1
answer79
viewsWhy does changing items from a list with multiple assignment not work when I use "index()" inline in assignment?
I can swap a and b with this code: lista = ['a', 'b', 'c'] item = 'a' # itens que quero localizar e trocar outro_item = 'b' # indice_item = lista.index(item) # obtenho a posição de ambos…
-
3
votes1
answer35
viewsCSS mismatch in Firefox and Chrome alignment
I’m failing to leave the same image alignment pattern Hallo-top_fd2.png in the Chrome navigator, where I’m missing? Grateful #container { display: table-row-group; position: relative; align-items:…
-
3
votes1
answer134
viewsProblems with a date validation function in C
I’m developing a system for patient registration. It’s a college project. I’m splitting function groups into different files. It turns out that I created a function to validate the date…
casked 4 years ago Rodrigo Diniz Monteiro 33 -
3
votes2
answers60
viewsExpress - Suggested experience, how to handle this type of code repetition
I’m studying the library (Express) and the language (Javascript), but this type of repetition below ends up bothering me and. I wonder what you would do in the situation to reduce the repetition of…
-
3
votes1
answer667
viewsWhat does the "git branch -M" main command do?
I’m creating a new repository and Github gives me the option to use the command: git branch -M main What does he do ?
-
3
votes1
answer92
viewsIs it possible to see the image load progress in js?
Is there any way to know the progress of image uploading? I tried to use onload and onprogress as suggested in a previous tip, but only onload works. var image = new Image(); image.onload = function…
-
3
votes2
answers921
viewsWhat is the difference between table, database and database?
Users of databases and tables that are not IT-related, especially researchers in the natural sciences and humanities, often use the terms "database", "database" and "tables" to refer to objects…
-
3
votes2
answers65
viewsFile does not appear for comitt in Smartgit
I have a persistence.xml file that is the default application, but each developer uses a different one and always has one that comita this persistence unintentionally. I was wondering if there’s a…
gitasked 4 years ago Julio Cesar Stein 33 -
3
votes1
answer107
viewsWhat is the difference between facet_wrap() and facet_grid() in ggplot?
The options facet_wrap() and facet_grid() in the ggplot have similar purposes, produce graphs with results stratified by a categorical variable. However, sometimes these options produce…
-
3
votes1
answer62
viewsFill date.frame using for output
I wanted to know how to apply the logic of R to Python. For example: If I enter the code below in R: x <- data.frame() for (i in 1:10) { x[i,1] <- i } It will create in the date.frame x a…
-
3
votes2
answers119
viewsSearch an array (list list)
Write a function called busca that receives a matrix (each row of the matrix has four entries, representing the information related to name, registration, sector and phone) and do a search by…
-
3
votes1
answer41
viewsOmit extended typescript typing
When using the Mongoose library, typing a model can be done with an interface that extends the type mongoose.Document. This approach is working according to the example below: import mongoose from…
-
3
votes1
answer65
viewsWhy is my route in React /#/?
I created a route structure with Hashrouter in React and everything works fine, but my route always http://localhost:3000/#/ + a rota. return ( <div> <HashRouter> <Switch>…
-
3
votes2
answers475
viewsConnection error with SQL Server 2012 with Python
I am trying to connect to SQL Server 2012 using Python 3.7 and Ubuntu 20.04.1 LTS as follows: import pyodbc server = 'tcp:192.168.0.7, 1433' database = 'teste' username = 'teste' password = 'teste'…
-
3
votes2
answers181
viewsCan I have multiple thead and tbody inside a single table in HTML5?
I wanted to make a table of this, but I can only have a table tag and I wanted to know if it is semantically right to put several thead and tbody within a single table.…
html5asked 4 years ago Lucas Java 39 -
3
votes2
answers275
viewsHow to write a program that fills a 10-position vector with random integers between 0 and 20?
How do I create a vector v of 10 random elements in which each element is one whole between 0 and 20? I tried to use the function np.random.random((1,10)), but the output was a vector of decimal…
-
3
votes1
answer113
viewsIs there any difference between the terms "call", "invoke" or "apply" a function?
I commonly read the term "invoke" or "call for" a function to refer to the action of executing that function. But I may also read the term "apply". In my view, all three of these terms have the same…
-
3
votes1
answer61
viewsHow to fill empty space on the Grid with Textblock?
I have the following XAML <Window x:Class="ambiente_teste.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"…
-
3
votes1
answer249
viewsHow do I "hide" the key to an API before putting the project into Github?
I’m creating a project for a website that uses the Unsplash API (which returns images). The problem is: if I add the call to the API in the remote repository, mine client_id will be exposed as the…
-
3
votes2
answers59
viewsWith CSS is there any way to put opacity in the currentColor?
I’m trying to do the box-shadow inherit the shade color in a "dynamic" way, taking the color set in the color through the currentColor. So far so good, only the color is "solid", I’m not being able…
-
3
votes2
answers639
viewsGenerate random numbers in 2d numpy array without repeating Python
Good afternoon, I’m trying to generate a 2d numpy array without repeating numbers. My code: TAMANHO = 4 tabela= np.zeros((TAMANHO, TAMANHO), dtype = int) tabela[:, 0] = np.random.randint(1, 170,…
-
3
votes1
answer67
viewsHow to count the lines of an output in the terminal?
I want to count the total outputs of the results in the terminal. For example using the cat lista_de_compras.txt: arroz feijão leite I want to receive 3…
-
3
votes4
answers744
viewsHow to get the highest and lowest number among 15 typed numbers? C++
An algorithm that reads 15 real numbers, and writes the largest and the smallest among the numbers read. I’m not getting to do the part of writing the smallest and largest of the numbers typed.…
-
3
votes1
answer66
viewsVisualg G Algorithm
Ask for a person’s name and sex. Present at the end how many people are male and how many are female. The program terminates when user type ORDER in person name. Can someone help me? Every time I…
-
3
votes1
answer318
viewsHow do I update all files from a GIT repository except one specific one?
Using git, you can create the file .gitignore, not to send specific files during the git push origin. I would like to perform the reverse, upload all files except one specific file. I checked the…
gitasked 4 years, 1 month ago Vitor Subhi 1,018 -
3
votes1
answer78
viewsHow do I distribute the content of a column to other columns in R?
I’m trying to distribute the contents of one column in another 3 columns. I have the following Data Frame: library(tidyr) df<-data.frame(Coluna= c('2237-5953', '(RE) PENSANDO DIREITO', 'B4',…
-
3
votes1
answer99
viewsWhat is the difference between ng new and ng generate application?
I know that the ng new nome-projeto creates a directory with the project inside, but I’m not able to understand the difference between it and the ng generation application. In the Angular…
-
3
votes1
answer212
viewsAngular 8 - reactive form Directive and disabled attribute
After I upgraded from Angular 7 to Angular 8 in an application the [disabled] stopped working in various parts of the template. And to load the application I needed to change to [attr.disabled]. I…
-
3
votes1
answer35
viewsHow to serialize Object for yaml in . NET?
We can serialize objects (I’ll use as an example C#) for XML, using the class System.Xml.Serialization.XmlSerializer, for example: var obj = new AlgumaClasse();…
-
3
votes3
answers351
viewsHow to access the key, by value, in python dictionary?
When filling in the name of 10 people and their respective heights, I need to show on the screen the name of the tallest person. However, I can only get the highest value. Could someone help me?…
-
3
votes1
answer73
viewsHow to place the values of the discrete Y scale in ascending order?
I want to create a histogram in ggplot but the y-axis values are getting out of order. I want to place them in ascending order on the axis. I tried to use the "reorder" function but it didn’t work.…
-
3
votes0
answers41
viewsMake procedural paradigm Javascript application for object orientation
At the beginning of my Javascript studies, I made a simple application of a supermarket stock, where the customer could search for a particular product and see if it was still in stock or had…
-
3
votes1
answer111
viewsWhat is the difference between $Dirty vs $invalid in Angularjs? For form validations?
What is the difference between $Dirty vs $invalid in Angularjs? For form validations? For example, when the form comes empty, the $invalid is true, but $Dirty is not. What is their logic?…
angularjsasked 4 years, 1 month ago Rebeca Nonato 1,163