Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer241
viewsOnkeydown event does not work in full-screen (F11) mode in Chrome
I have a page that has a header. I would like when clicking the F11 button (which leaves the browser in Full Screen mode) the header to be hidden from the page and when I click again, the header…
-
4
votes0
answers150
viewsWhat is Trunk Based Development?
I was recently introduced to an article in Medium on Trunk Based Development (TBD). The title was totally provocative, You don’t need Feature Branches anymore... ("You no longer need Feature…
-
4
votes2
answers88
viewsWhen compiling the code, both numero1 and numero2 display the same value even having an increment
public class IncrementoDecremento{ public static void main(String[] args) { Integer numero1 = 10; Integer numero2 = ++numero1; System.out.println("numero: " + numero1 + ", numero2: " + numero2); } }…
-
4
votes1
answer57
viewsGenerate component at angular
When I execute the command ng generate component configure-notification/configure-notification-edit --module app he gives the following error: /usr/bin/ng: line 40: exec: generate: not found before…
-
4
votes2
answers290
viewsHow to search whether a string array contains in another string array. Using complete and incomplete words
How to search in an array of strings using complete and incomplete orders, similar to what the phonebook does. Example: List array1 = ['Escola','Estadual','José','da','silva']; Lista busca =…
-
4
votes2
answers197
viewsWhen to use Factory in abstract classes?
Abstract classes are classes that cannot be instantiated and their implementation depends on other classes, but using the keyword Factory can "instantiate" an abstract class. So, how and when to use…
-
4
votes6
answers491
viewsOptimize code in Python
I made the code below but I have the feeling that it can be improved and that maybe I’m turning it too much. It is a code in which I have a text input and if it is not written in all uppercase…
-
4
votes1
answer67
viewsWhat is the difference between sanitizers and validators in PHP
What’s the difference between FILTER_VALIDATE And FILTER_SANITIZE, in PHP.
-
4
votes1
answer363
viewsR - How to turn values into percentages using Data.table?
I own a data.table() with the columns Region, year and Quantity. The amount is in total value, I would like to make them in percentage per year. What do I have: Região ano Quantidade Norte 2017 252…
-
4
votes0
answers35
viewsHow is the degree of authority of a website calculated?
Can anyone explain to me how is measured the degree of authority of a website? Today on http://www.meets.com.br We have a 28 degree of authority Ubersuggest. On other sites we have a lower grade and…
seoasked 4 years, 9 months ago Tavares CMA 41 -
4
votes1
answer97
viewsDoubt with While
I’m a beginner and I’m having second thoughts While / Do…While, follows the doubt in which question. I have an exercise to follow that the teacher solved with the command Do…While, I was trying to…
-
4
votes2
answers516
viewsCan I run a Reactive Native app on Iphone through Windows?
Well, I have an Iphone Xr and I want to develop an app in Reactive Native and test it using my Iphone(by USB, no need for emulators), but my computer is a windows 10, not a mac. Even not being a…
-
4
votes3
answers61
viewsHow to specify the files I want to add to the Stage area?
For example, I’m working on an x branch. I changed the following files 1,2,3,4. I checked the git status all right. So far so good! If I rotate the git add . will add the 04 files. How would you add…
gitasked 4 years, 9 months ago Sena Oliveira 364 -
4
votes1
answer188
viewsWhat is the maximum millisecond interval that can be used in the Javascript setInterval?
I would like to know the maximum range that can be used in the method setInterval javascript. I ask this, because I used setInterval the way below and it did not execute. I don’t know if it’s…
javascriptasked 4 years, 9 months ago Gato de Schrödinger 2,367 -
4
votes0
answers94
viewsModule Pattern Javascript
I don’t know if I’m applying the concept of modular javascript correctly, so I need help! I sorted the files js for responsibilities. Each file will be assigned to a certain function. I’m uploading…
javascriptasked 4 years, 9 months ago Wagner Fillio 1,328 -
4
votes1
answer71
viewsIn pubspec.lock, what is a "direct main" dependency?
In Dart, we specify dependencies through pubspec.yaml through indicators of the desired version (similar to gemfile for Ruby or the composer.json for PHP). From this list of dependencies and…
-
4
votes2
answers207
viewsUse of multiple keys in Tkinter
Okay, I edited the question, this is the most simplified example, I wish that while the '6' key is being pressed, even using the '8' key, it continues to interact with the program, while '8' only…
-
4
votes1
answer60
viewsWhat are content categories for?
Recently I discovered that in HTML5 there are categories that are called Content Categories (content categories) and are they: Metadata content Flow content Sectioning content Heading content…
htmlasked 4 years, 9 months ago joão batista 161 -
4
votes2
answers61
viewsCan someone help me change the image by using Javascript?
I’m trying to change the image as the value of the variable in a change. For example, from 0 to 100 is an image, from 101 to 200 is another and so on. I put any number from 0 to 100 and it returns…
javascriptasked 4 years, 9 months ago Asp3cTy 41 -
4
votes1
answer217
viewsHow to set default in parameters when specifying the type of the object?
When defining functions, I usually use the feature of specifying the type of object that can be used as argument and which object the function should return. See example below: def…
-
4
votes1
answer95
viewsIs it possible to add properties to the css file created by the angular build?
My angular build generates a stylesheet addition in the index.html as follows: <link rel="stylesheet" href="style-1.css"> <link rel="stylesheet" href="style-2.css"> You can configure it…
-
4
votes2
answers129
viewsWhat is the difference between LINQ research forms with Datetime.Now?
I am running two code snippets and they are giving different results. Does anyone know why? This code shows coupons only that have the validity of the current date and time + 3h (I don’t know why):…
-
4
votes1
answer55
viewsDo I need to declare all classes in your files?
My question is whether the way I’m planning to do it is the right one: create a class with all my other classes instantiated in it, it works? class Instancias { public $Instancias; public $CRUD;…
phpasked 4 years, 9 months ago AprendizProgramador 43 -
4
votes2
answers528
viewsWhat is the difference between tag and element and html document and page?
I would like to know the differences between an element for a tag in HTML. Example 1 The example below is an element or a tag? <p></p> Example 2 And in the example below is tag or…
htmlasked 4 years, 9 months ago joão batista 75 -
4
votes2
answers318
views"-" operator cannot be applied to a string
I’m trying to make some changes to a ready code, but I came across a problem with a line of code written in C#: string[] textArray1 = new string[] { -899253461.ToString() }; In this case, Visual…
-
4
votes2
answers115
viewsConcept of blocking directories in robots.txt
I have a question regarding the blocking of files and directories through robots.txt. The structure of my site is composed of directories with backend files (models, controllers and classes), that…
-
4
votes1
answer77
viewsHow do the methods used within classes work?
It is very common in Ruby to use methods within classes, such as attr_accessor, or even libraries, such as validates_presence_of, ruby on Rails. I would like to create: class Person add_name_getter…
rubyasked 4 years, 10 months ago Luiz Felipe 32,886 -
4
votes1
answer91
viewsError reading Jsonobject inside an array
I have the following JSON: { "setor":6, "tipo":"S", "filial":1, "peso":0, "doca":1, "operacao":1, "usuario":1, "empresa":1, "movimento":23, "local":4, "ativos":[ "{\"ativo\":1,\"quantidade\":25}",…
-
4
votes1
answer463
viewsHow to schedule a task and run only once independent of the number of instances?
My application has a scheduled method to run every 5 minutes with the @Scheduled of Spring, but I would like to rise more than one instance of implementation and that this task should not be carried…
-
4
votes3
answers329
viewsWhy does my "Try" in Python not work?
x = int(input("Por favor, insira um número: ")) try: print(x != int) except ValueError: print("Somente números.") The mistake that gives is: ValueError: invalid literal for int() with base 10: 'x' I…
-
4
votes0
answers38
viewsWhat is the best way to implement Schema in HTML?
Giving a search on the internet I saw that Google recommends the implementation of Schema via JSON/LD. As much as I’ve done a lot of research, I haven’t found any answers that specific. My first…
-
4
votes1
answer89
viewsIs it possible to replicate a Union in Java?
As unionthe ones I’m talking about are the same as C/C++. The goal of union is to save memory using the same region of it to store different data at different times. It’s like a hotel room.…
-
4
votes3
answers1081
viewsHow to put a <p> on the same line as <hr>
It is possible to place the element <hr> in front of an element <p>? hr{ border-top: 1px solid red; } <p>Colocar a tag <b>hr</b> em frente do <b>p</b>…
-
4
votes3
answers2923
viewsIntl to format date in Javascript?
I’m studying the component Intl Javascript and need to format a field date who comes from the database to the Brazilian format. Format in Mysql: 2019-12-12 And I need to turn it into 12/12/2019. The…
-
4
votes1
answer101
viewsGenerics <? super T> and <? extends T>
In the coding below, because the Box<? extends T> extends and the EqualityComparator<? super T> super T? uses so as to make part of the code println true return? public boolean…
javaasked 4 years, 10 months ago Pirategull 659 -
4
votes1
answer79
viewsChange another selection option when a selection is triggered, using jquery-Chosen
I want to change another selection when a selection is triggered. I am using Jquery Chosen. Example with pure Jquery here At the moment I’ve done: <form method="post" id="form"> <div…
-
4
votes1
answer113
viewsIs it possible to add icone to a program by creating in NET.core (Windows)?
I’ve only used the line commands dotnet, both to generate projects and to generate solutions (.sln), however I do not know if it is possible to use resource.rc directly with dotnet with something…
-
4
votes1
answer317
viewsHow to change default Composer installation folder?
Is there any way to change where Composer installs the dependencies? Composer always installs in the folder vendor, but would have to change to another folder?
-
4
votes1
answer214
viewsHow to document CSS?
I was documenting the typescript of my Angular project using Jsdoc basing myself in this question, and I was left with the following doubt. How can I document my CSS classes and components of my…
-
4
votes2
answers166
viewsWhat does the double-dash stand for in a Bash command?
There is a little time that I use Linux and I know that some commands have arguments that use the - at the beginning of a word. Example: ls -la And some others use two traits, so: php artisan --help…
-
4
votes1
answer150
viewsHow to transform an English standard date into a Brazilian standard date in R?
Suppose I have a date in the standard English format year-month-day (ymd): data = Sys.Date() print(data) [1] "2019-12-03" But I really need this date to be in the Brazilian standard day/month/year…
-
4
votes0
answers83
viewsWhat is the best way to do a very large and repetitive task?
I need to take the duration of 18000+ audios, using the library audioread for each audio it takes right 300ms, ie at least 25~30 minutes of processing. Using a system of Queue and Process, using all…
-
4
votes1
answer204
views"Close" DLL opened
I created a dll to run in Runtime a class: var classe = "using System; " + "public static class CSharp" + "{" + "public static double Executar()" + "{" + "return 0;" + "}" + "}"; var compilation =…
c#asked 4 years, 11 months ago LeoHenrique 954 -
4
votes1
answer49
viewsAverage by classes after excluding MIN and MAX
I found some similar questions, but none with the same problem I’m facing. I need to calculate the average by class, but before calculating each average, I would like to exclude the MAX and MIN…
-
4
votes2
answers123
viewsHow far should we follow OCP?
When developing a screen for a certain part of a system, I come across a classic situation of owning some ifs to determine what action should be taken. I then linked this case to examples of OCP…
-
4
votes2
answers131
viewsHow to load Lightbox2 when entering the page
I am trying for some time to resolve a situation I have, I need that when entering the site an advertisement is displayed and for that I am trying to use the plugin Lightbox2 but in the…
-
4
votes2
answers435
viewsHow to join repeated values of an object array, only in an object of the same array?
I have the following exit: [ { rank: 1, item: { userName: 'Rafaela', score: 600 } }, { rank: 2, item: { userName: 'Carla', score: 410 } }, { rank: 2, item: { userName: 'Yuri', score: 410 } }, {…
-
4
votes2
answers163
viewsHow to pass numbers between "{ }" in the url?
I’m having a dumb doubt in some exercises using Spring Boot. The exercise requires that I receive the list of numbers as follows: http://localhost:8080/listaDecrescente?lista={12,55,70,22} And…
-
4
votes2
answers245
viewsNested data class built from a dictionary
Consider the following: implementation: from abc import ABC # Base class DictModel(ABC): def __init__(self, model=None): if model: for k, v in model.items(): if isinstance(v,dict): setattr(self, k,…
-
4
votes1
answer528
viewsHow do I use the same id more than once with getElementById()?
Hey, guys. All right? I have a chronometer that is in javascript and I want it to appear more than once on a specific page. The problem is that it works only the first time it appears on the page. I…