Most voted questions
150,413 questions
Sort by count of
-
3
votes1
answer142
viewsHow to remove scientific notation on the y-axis using matplotlib?
When generating a graph using the library matplotlib in Python language in the Jupyter Notebook, I realized that the data presented in it were "reduced" (I think that would be the term) and with a…
-
3
votes1
answer85
viewsColoring a map with differing color intensity in ggplot2
I’m trying to create the Plot of a color map of Brazil with a specific color, the "#2D3E50". However, using this color on the map to color from the smallest area (light shade) to the largest area…
-
3
votes2
answers88
viewsReplacing Nan values with the subsequent not Nan of another column
I have a Dataframe with some columns (I’m only representing two in this post). I need to fill the Nan of one column with certain values of another. See below: Creating the Test Dataframe…
-
3
votes1
answer169
viewsWhat is the difference between "test" and "spec" in automated testing?
The question and doubts below address Node.js, Typescript and Javascript. I don’t know if the concepts below apply to other programming platforms/ languages. I am studying about automated tests (AT)…
javascript node.js typescript software-engineering testingasked 3 years, 8 months ago Cmte Cardeal 5,299 -
3
votes1
answer59
viewsConvert a Double with more than 13 decimal places to String without losing values
I have in C# the following number in Double: 124.00767638369544. When I simply put valor.toString(), the value goes to: 124.007676383695, IGNORING the 0,00000000000044. The system I’m making needs…
-
3
votes1
answer95
viewsHow to delete lines from a spreadsheet after performing a filter using VBA?
I am having trouble deleting lines resulting from a text filter in a table. I recorded a macro that resulted in the following code: ActiveSheet.Range("$A$1:$K$161").AutoFilter Field:=2, Criteria1:=…
-
3
votes2
answers35
viewsError to calculate pBias
I need to calculate the pBias, but it’s a mistake. I’ve performed this calculation before and it worked, I don’t know what could be going wrong, below the code I used: #observado obs <-…
-
3
votes4
answers285
viewsSeparate data by values on the line?
In the lines of my dataframe I have an identifier with letters for each observation set. Some of the observations have more than one letter, in which case these observations are actions together of…
-
3
votes2
answers172
viewsSelect Dataframe lines based on list of values for a column
I have a Dataframe with more than 5 thousand lines and more than 20 columns. I want to select only a few rows, second column match criteria with specific values SELECT * FROM dataframe WHERE…
-
3
votes2
answers51
viewsAre Mongodb’s "id" unique among collections?
It is possible that the same ObjectId is generated for a document in two different collections in the same database?
-
3
votes2
answers107
viewsUsing do/while in Javascript to request 10 numbers from the user
My teacher passed an exercise with the following description: Make a Javascript program that asks for 10 integers and displays how many numbers are greater than 50 - use loop do while. I couldn’t…
-
3
votes1
answer72
viewsRegex how to separate by groups each occurrence
I’m trying to add attributes to a tag tag <a> from a parse of Markdown (markdown => html). In my document markdown i add parentheses and the markup I want right after declaring the links,…
-
3
votes1
answer110
viewsIs it correct to use @Mappedsuperclass instead of @Entity to not create a table in the database using JPA?
Explaining the problem, I need to consult a function in POSTGRES: SELECT * from pgr_dijkstra('SELECT gid AS id, source, target, length AS cost FROM ways', 11111, 22222); "pgr_dijkstra" is a POSTGIS…
-
3
votes1
answer32
viewsCreate conditional with counter in a column
I have a basis that I need to know which number is greater than 100, but if I have a sequence of values greater than 100 I need the column to accumulate the value of 1 in 1, I added an output figure…
rasked 3 years, 9 months ago Roney Wesley Galan 179 -
3
votes2
answers84
viewsFilter object array from a Javascript search string
I have an array of objects where sometimes a property can come null. I need to apply a filter to this array to capture objects that have the field and functionality that are passed by a string in a…
-
3
votes1
answer73
viewsError importing module in Javascript
I am having a problem importing a Javascript module. I am using a Python HTTPS server to create my websites. Filing cabinet: modules/index.js: export function soma (c,d){ return c + d } Filing…
javascriptasked 3 years, 9 months ago AlexDev 41 -
3
votes1
answer25
viewsPUT or PATCH, which one should I use in this scenario
I have a hypothetical database: CREATE TABLE person ( code integer NOT NULL, name varchar(50) NOT NULL, PRIMARY KEY (code) ); When I perform a POST, I create by sending on the body: { "code": 15,…
-
3
votes0
answers28
viewsWhat it means to declare const {service} in Javascript, NODE.js
When I started studying Node.JS I came across the following code snippet: Example with services that shows middleware Factory Advantages. ... const {service} = options; router.get('/greet', (req,…
-
3
votes1
answer685
viewsHow to get the url parameter in Nextjs
Guys, I have a question on Next JS, I have a page with name listid.js, when accessing for example http://localhost:3000/listid/10 I would like to receive id 10 as parameter on my page listid.js:…
-
3
votes3
answers45
viewsProblems centering content when working with flexbox in CSS
I’m trying to learn CSS and I came across flexbox and I’m not getting to work with the tutorials I see on the internet. The goal was to center, axis X and Y, 3 squares on the page, but I could only…
-
3
votes2
answers196
viewsonClick error in Nextjs / React js
On the first tag <Link> is making a mistake in the onClick and I don’t understand why. Please help me out: import Link from 'next/link'; import React, { useState } from 'react'; export default…
-
3
votes1
answer32
viewsHow do I put this vertical div in the top left corner of the screen?
<html> <head> <title>Impressão de Carnê</title> <style> .vertical { transform: rotate(270deg); margin-top:…
-
3
votes1
answer61
viewsDate sum with condition?
I have a base with the 3 columns and one that I created. ╔═══════════════════════════╦═════════════════════╦════════════════════════╦═══════════╗ ║ DATA ║ LATITU ║ LONGIT ║ ROW ║…
sql-serverasked 3 years, 9 months ago Carlos Gabriel 41 -
3
votes1
answer42
viewsChange color of the icon of a selected Tab
I’m developing tabs in Android Studio with com.google.android.material.tabs.Tablayout and would like to change the color of the icon, only of the selected tab. The icons are in SVG. And the text and…
androidasked 3 years, 9 months ago Denner Luan 68 -
3
votes2
answers57
viewsHow to add Hover to Bootstrap icons
I would like to know how to add Hover to Bootstrap icons. So far my code is like this: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="rgba(194, 56, 58, 1)" class="bi bi-book…
-
3
votes1
answer58
viewsHow to get all possibilities from an incomplete string
I have a string, for example, with 5 characters but I need the same to have 10 characters in total, I did the following code to try to get the 5 characters remaining to get a total of 10 characters:…
-
3
votes3
answers114
viewsReading undesirable characters - Python
A way to separate words from a string provided as in the method below: entrada = input().split(" ") Doubt: If I want to exclude more than one specific character (" ,&ˆ*!!:") not necessarily in…
-
3
votes1
answer53
viewsSubscribe button only works in the second click
I have a button for each row of a grid, which when clicked, calls an subscribe that fills the data of that code clicked inside a modal. This button until it works, but not on the first click, but on…
-
3
votes1
answer358
viewsEncoding error (Non-utf-8 code) while running script
I made a very simple program, this way, in the notebook, and saved how Somador.py: a = 1 b = 1 soma = a + b print("A soma dos números é", soma) After that I tried to run the program by cmd and gave…
-
3
votes2
answers85
viewsFormatting to number of decimals dynamically using Python
import math def formating_pi(n): a= "pi com {:c} casas decimais é {:.17}" return a.format(n, math.pi) formating_pi(5) I’d like to not put the number 17 explicitly, but rather the result of the…
-
3
votes2
answers55
viewsHow to save a dictionary to two independent objects in Python?
Consider the following dictionaries: dic1 = {'k1':'Ford','k2':'GM','k3':'Dodge'} dic2 = {'k4':'Audi','k5':'Mercedes','k6':'VW'} dic3 = {'k7':'Fiat','k8':'Mazda'} The goal is to get two new…
-
3
votes2
answers200
viewsEliminate consecutive duplicate string letters
How do I scroll through an array of strings and delete consecutive repeat letters? Incoming: String[] x = {"lleonardo", "joaoo"} Exit: String[] x = {"leonardo", "joao"} I created the function below,…
-
3
votes1
answer52
viewsApply row-to-row formula within a table in R
I have a table where I need to apply a row-to-row formula to multiple columns, and the formula is: row value - mean(all column values) / standard deviation(all column values) is a normalization of…
-
3
votes1
answer52
viewsHow to make a LIKE IN equivalent to PROCV
I have the following question (below is just an example, because I can not send the true info) I want to make a where where I find the name of the social reason by the fancy name of the…
-
3
votes2
answers128
viewsRules and Exceptions in htaccess
I’m having a hard time setting up some route rules in my .htaccess, I originally have the following (I accept suggestions for improvements): RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f…
-
3
votes1
answer90
viewsHow to limit rows per month in SQL
I have a list of products purchased with date and price, I wanted to organize in a query the ten most purchased of each month, type: mes | nome | total janeiro | arroz | 100 janeiro | feijão | 87…
-
3
votes1
answer85
viewsReplace string_concat() with equivalent
I am a beginner in Python and accepted to participate in a more or less old project, which was using Python 2.7 so far. At the beginning of the year, this version was deprecated and now I can’t…
-
3
votes1
answer34
viewsTransform 3 similar functions into one
In my project, I have very similar functions, with the same intention, however, as it is a DOM class exchange function (classList.replace), I ended up making a very repetitive code, and I’d like to…
-
3
votes2
answers58
viewsHow does the numpy Prod method work?
I’ve always used the method np.prod as a production operator. So if I want to know the factorial of 5, for example, I simply do: import numpy as np np.prod([5,4,3,2,1]) 120 It turns out I was…
-
3
votes0
answers29
viewsHow to use the onclick attribute in C# Webbrowser?
HtmlElementCollection elementButton = webBrowser1.Document.GetElementsByTagName("a"); foreach (HtmlElement elementyButton in elementButton) { if (elementyButton.GetAttribute("onclick") ==…
-
3
votes1
answer30
viewsGraph error with package ggplot2 and function sumarySE
I seek your assistance in solving some problems in constructing a graph with average and standard error in R with the ggplot2 package and summarySE function. In my work I evaluate the effect of…
-
3
votes1
answer116
viewsWhat is the difference between space-Around and space-Evenly?
I’d like to know the difference between these two properties justify-content:space-around; and justify-content:space-evenly
cssasked 3 years, 9 months ago user219508 39 -
3
votes2
answers149
viewsHow to swap the last character in a string?
I’m having a problem at the time of leaving the last null value to be inserted in a button that will erase the value that the user type, I tried to use the for to solve this problem, but did not…
-
3
votes1
answer41
viewsPivoting in Pandas
Hey there, guys. I have a table in pandas and would like to turn the values in the column DE_ANALITO into columns whose values would be what is in the column DE_RESULTADO.…
-
3
votes2
answers77
viewsProblem using Mobx and Observerlist
Hello, good afternoon! I am trying to make a checkbox list (Checkboxlisttile) using mobx, however, whenever I click on the box to mark or deselect I have to use the flutter Reload or setState to…
flutterasked 3 years, 10 months ago Alex Anderson 23 -
3
votes1
answer27
viewsFormattednumber of the Intl-React swap semicolon
Hello folks in my code is as follows const currencyFormatter = (value: string | number | ReactText[]) => { return ( <FormattedNumber value={Number(value)} style='currency' currency='BRL'…
-
3
votes1
answer39
viewsregex python delete all after the second occurrence of a whitespace
That should be very simple and I can’t find an answer. I have several strings of different sizes that have more or less the same pattern: 'Art. 1° E' 'Art. 15. As' What I want to do is delete…
-
3
votes2
answers118
viewsLogarithmic scale - Histogram R
I plotted a chart of type histogram, using the following code: hist(dados1$Prec, breaks=40 , col=rgb(0.2,0.8,0.5,0.5) , border=F , main="" , xlab="Precipitação (mm)", xlim=c(0,140), ylim =…
-
3
votes1
answer140
viewsAngular Folder Upload (not just multiple files, but the entire directory)
I’m using ngx-admin with Nebular for a Dashboard project. My following code works well to send multiple files. However an error occurs when trying to send a folder (dragging the folder to the file…
-
3
votes3
answers179
viewsBasic Python repetition - doubt in "and" and "or"
Hello, I’m learning Python. A question arose in a repetition exercise (for). The exercise is to identify all odd numbers and at the same time multiples of 3, in the range of 0 to 500. The solution…