Most voted questions
150,413 questions
Sort by count of
-
3
votes1
answer1163
viewsNavigation with named routes
I am trying to create some routes named in flutter. When clicking on a floating button, I should direct myself to a screen called new_flight.Dart however, I am seeing an exception: I/flutter (…
-
3
votes0
answers38
viewsSymfony/React Solving Problems with Babel
I’m new to Symfony/React and soon I come across the following problem... I cannot execute the same commands that I find in some tutorials (Destined to React) on the Web, so I understood the "plugin"…
-
3
votes1
answer1037
viewsLoad HTML file into another HTML file
I have a file index.html: <body> <div class="application"> <header class="header"></header> <main class="content"></main> <footer…
-
3
votes3
answers1422
viewsSearch for words that contain a certain letter
I need to search the library re for when I pass a letter, return the whole word containing the letter. text = "Texto de busca por palavras contendo a letra z, como por exemplo zebra, zoologico. A…
-
3
votes2
answers113
viewsIs there any difference between the two ways of making an exception?
Between the two formats below, the throw can be summed up, or create a new object, when casting exception, I just wanted to understand what the real meaning of writing this in different ways, has…
-
3
votes1
answer53
viewsHow do the width and height of an element start from the center and expand to the left and right?
<!doctype html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
-
3
votes0
answers40
viewsCreate lines from the index of a Python series or dataframe
I created this dataframe: x = [1,3,5,8,10,15,4,5,6,8,23,12,28] x = pd.DataFrame(x) I created the following dataframe: I created a new dataframe with the following code: z = [] for i in…
-
3
votes1
answer293
viewsScan an Arraylist of objects and check an attribute of an object passed as parameter with an Arraylist
I am a beginner in Java and my teacher passed a list of exercises to practice, in a question I need to create a system that registers a user only if his email has not been registered before. A part…
-
3
votes3
answers57
viewsHow to make the text inside the button not be tilted?
<!doctype html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
-
3
votes2
answers118
viewsHow to remove a class of multiple elements whose names obey a certain criterion
I need to remove all classes starting with btn-*. My script: if (document.getElementById('contato_'+id).classList.contains('btn-danger') ){…
javascriptasked 5 years ago André Cabral 811 -
3
votes1
answer81
viewsPolymorphism with list comprehension in Haskell
I have these two functions: sequenciaInt :: Int -> Int -> [Int] sequenciaInt i j |j >= i = [i..j] |otherwise = sequenciaInt j i sequenciaChar :: Char -> Char -> [Char] sequenciaChar i…
haskellasked 5 years ago Henrique Silva 95 -
3
votes1
answer82
viewsWhat are the differences in backend and frontend?
When we use async and await in the backend and frontend ? Is it better? It’s worse? Other related questions: An API, for example in C#, if all methods are async and await, I can say it’s better than…
-
3
votes3
answers102
viewsHow to call tab
I have a Navbar with some tabs (tabs) that if clicked on the link BEGINNING (for example), open a div with the main site information, if the link clicked is the GALLERY, then a new content is…
materializeasked 5 years ago Deivid Souza 407 -
3
votes2
answers389
viewsHow to return the number of elements of a document property in a collection in Mongodb
Hello, I have a collection that has the documents with the format below: { "_id" : ObjectId("..."), "checked": true, "styles": ["foo", "bar", "bin"] } I need to add the array size styles for all…
mongodbasked 5 years ago LeandroLuk 4,989 -
3
votes1
answer114
viewsHow to transform string into Date object with Typescript?
I am receiving from the HTML form a string containing the date selected in the pattern dd/mm/yyyy, and want to create an object Date from that string. The problem is that the Date only accepts…
-
3
votes2
answers249
viewsDate in Javascript with October 31st
I am trying to find the due date adding the date, but I realized that the function does not return me the day 31 October 2019. Follow the code below that returns me '1 / 11 / 2019' and should return…
-
3
votes1
answer549
viewsCS7036 error on C# calling a function
I just got into the matter of functions and methods and I’ve come across a problem that I can’t solve at all because I don’t understand why. The point is: "Create a method that takes an integer…
-
3
votes2
answers4009
viewsHow to upload an image to the backend
I have an application in React that sends an image to the backend in Ode the problem is that I can’t get the file in express. I see you have a way to use the woman, only I don’t know how to get the…
-
3
votes2
answers84
viewsConvert string.match() result to string?
How can I convert the return method match() string? For example: var value:string = ">>>> Ola" var result:string = value.match(/\w+/g) The above example gives error in variable result.…
-
3
votes2
answers402
viewsChanging lines of an array - Python Pandas
I have an array and need to change the order of the lines. array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]]) I need it like this: array([[…
-
3
votes1
answer54
viewsTkinter - set master in another script
I am creating a GUI with Tkinter and I am having problems separating functions from the main file (as it is getting too big). I created a new function file, when I try to import the creative…
-
3
votes2
answers408
viewsHow to identify if a number has been entered in the vector
Write a program that asks the user to enter 6 numbers of a lottery ticket in a vector and later check if there is the number 25 in this sequence of numbers passed by the user. I have a question, I…
-
3
votes1
answer81
viewsFunction call <Function>`<Parameter>`
I am currently studying Webcomponents, Polymer, Litelement and so I came across this feature of creating the template using Litelement that I had never seen before:…
-
3
votes1
answer137
viewsWhat is the difference between export, set and edit . bash_profile?
I currently use three ways to define environment variables on linux or Mac, because I don’t know what the difference is between 3, someone can explain to me?
-
3
votes2
answers302
viewsCounter reset every time reset
I have a contact day, hour, minute and second, from there I program for example: in 2 days (regressive), I would like when it zeroes start counting again, type 2 in 2 days, or 1 in 1, not to need…
-
3
votes1
answer33
viewsSome error bars do not appear on "sciplot" graph
There is a problem when I am making a averages chart in R using the "sciplot" package. For starters, this is the code for a part of my dataset: dados <- structure(list(Dias = structure(c(1L, 1L,…
-
3
votes1
answer122
viewsNeed to use @classmethod in __new__
I was reading about __new__ in the Python documentation and after search here on the site I saw some examples of implementation and noticed that the signature of the method is: def __new__(cls,…
python python-3.x characteristic-language objects metaclassasked 5 years, 1 month ago fernandosavio 9,013 -
3
votes1
answer341
viewsExpress with Typescript: "Element implicitly has an 'any' type"
I’m trying to dynamically generate my application routes with the Express.router() using Typescript and Node, but it doesn’t work and I’m not able to understand why. If anyone please knows what is…
-
3
votes1
answer196
viewsHow to see the cpu usage percentage of each thread of a java process
Well, I have a cpu usage problem, and I don’t know exactly which class or Thread you are consuming ( there’s no way to know externally the code ), I was wondering if you have any method that shows…
-
3
votes2
answers1134
viewsHow to get an Observable from an array item?
Working with Observable and Rxjs, I came across the following problem. At a certain point in the code, my access to the bank is done as follows: getExemplo(id: number):Observable<Exemplo>{…
-
3
votes1
answer440
viewsInclude date/time field in postgres (Zend)
I have the following code: View: { xtype: 'timefield', name: 'attendance_time', fieldLabel: 'Hora', inputWidth: 100, format: 'H:i', submitFormat: 'H:i', altFormats: 'H:i', } Model: { name:…
-
3
votes1
answer74
viewsHow does CPU cache performance work?
Recently I discovered that it is possible to get a huge performance when using the CPU cache. An example I saw was a program that reduced its runtime from 10 seconds to 200 milliseconds just using…
-
3
votes1
answer64
viewsConverting from HTML/CSS to pdf using pandoc in R
Folks I’m having trouble converting my generated html/css file into Rmarkdown. You could help me? Follow my code: My file . Rmd --- title: "Table" output: html_document: css: "test.css" --- ```{r}…
-
3
votes1
answer69
viewsComparison of index (get) in Array List not working properly
I’ve been trying to compare a string (right answer) for an alternative question as an example in a project I’m developing, but I can’t succeed in all the different ways I try. The goal is that every…
-
3
votes1
answer219
viewsWhat is the "real" meaning of the key word 'extends' in Java?
First of all, I know how to use and work the keyword extends, my real doubt lies in the meaning of that word, more precisely because extends and not inherit or something like that? The only thing…
-
3
votes1
answer294
viewsHow to convert the String "20190930120000[-3:BRT]" to Localdatetime
I got the following String: "20190930120000[-3:BRT]". I need to convert to LocalDateTime. Does anyone know the mask to be used in DateTimeFormatter.ofPattern("?????")? I’ve come this far:…
-
3
votes1
answer209
viewsDoes the operating system automatically cache PWA application icons?
I’m creating a PWA and one of the questions I have is if I need to cache all the icons that are in the manifest. Use a generator, to create all icons of different sizes and other files, the result…
-
3
votes1
answer602
viewsWhen to use map() and filter() in Python?
Good afternoon , I have a question regarding these functions I will give as an example some codes: numeros = list(map(lambda x: x-1 , [2, 3, 4, 5])) print(numbers) Output: [1, 2, 3, 4] Here in this…
pythonasked 5 years, 1 month ago Paulo Lopes 31 -
3
votes3
answers1087
viewsFunction to return letter frequencies in an array
I was trying to do the function that is in the title, but I did not succeed, looking at the solution code for such function, I could not understand, follow the code: function letter_frequency(s) {…
-
3
votes1
answer203
views -
3
votes0
answers77
viewsAre web security standards insufficient?
Well, above all, in addition to the issue I will raise here, I would also like to raise a debate, the security standards for system authentication are not insufficient? Context of the problem: I…
-
3
votes2
answers74
viewsSelect to Alias
I’m trying to establish a select to be a alias of a record. I do not know yet if there is such a possibility, could someone clarify me this doubt? ex: select 1 as (select dia_da_semana from ano…
-
3
votes1
answer1932
viewsHow to access the postgres of a Docker image?
Greeting, I just created a Docker image of the Postgresql database with some additional settings as shown in the command below: docker run -p 15432:15432 --name kwandb -e POSTGRES_USER=postgres -e…
-
3
votes2
answers838
viewsHow to check if server is available before request.urlopen in Python?
I have the following HTTP request code on my server in my python code: import urllib.request import json url= urllib.request.urlopen('http://ENDERECOIP/pasta/arquivo.php') x= url.read() y =…
-
3
votes2
answers122
viewsWhen should I use generalization in case of use?
What is the purpose of generalization in the case of use? When should I generalize? If I have 2 actors, one student and the other teacher, they are respectively users, then enter the generalization…
-
3
votes1
answer255
viewsHow to read JSON object name containing special character?
My JSON file: "locomotives" and "vacant" I can read without problems, but when I try to read "vacant" it contains the following error:: that is, because of the character " - ", it is being…
-
3
votes1
answer193
viewsSome Python codes display "__class__" when creating certain classes. What is it for?
I realized that in certain codes in Python is used a __class__. What good is the same? Example: class abstract1 (object): def __init__(self): if self.__class__ == abstract1: raise…
-
3
votes1
answer57
viewsGithub Collaborators deleting Branchs
On Github how do I set up so that my project’s collaborators do not delete the branchs? There is no restriction to delete in the project’s Settings. Thank you
-
3
votes1
answer43
viewshow to replicate jquery functions in javascript $(), Hide()
To create a site, simple in javascript more would like to automate the selection elements, and a function to hide/show the elements. But I end up getting error. But I don’t understand why. To select…
-
3
votes1
answer90
viewsWhat are considered operators in the programming language?
I was wondering if a token is considered an operator when performing an action?
characteristic-language operators syntax language-independent tokenasked 5 years, 1 month ago Hyago M. Vale 33