Most voted questions
150,413 questions
Sort by count of
-
8
votes5
answers833
viewsHow to calculate the date and shift code?
I have a table that specifies the starting time of a work shift and its duration in minutes: codigo descricao inicio(datetime) duracao(int) S01 PRIMEIRO 1900-01-01 05:00:00.000 540 S02 SEGUNDO…
-
8
votes2
answers971
viewsAre there static methods in Python?
Are there any static methods in Python? If there are any how do I make a static method?
pythonasked 7 years ago Matheus Grossi 321 -
8
votes4
answers3636
viewsInput date to disable the next 7 days from the current date
In a date input, how can I disable the next 7 days from the current day in the calendar? I know with JS I can do a function to disable the days before the current one with the min parameter, but how…
-
8
votes2
answers713
viewsDynamic grouping of JSON data
I have been trying for a few days to perform JSON data grouping dynamically, but without success, it is a matter of logic rather than programming itself. Given an array of objects(Users), group them…
-
8
votes2
answers671
viewsWhat is HTML Outline (HTML Outlines)?
What is the function of an HTML sketch (HTML Outlines)? How he is formed? When? Could someone give me a profound explanation on the subject?…
-
8
votes1
answer200
viewsDifference between scroll functions?
Is there any difference in using: $(window).scrollTop(_Altura_); Or window.scroll(0,_Altura_); Other than controlling the position of the horizontal axis? (consider _Altura_ as a variable)…
javascriptasked 7 years ago SuKleinkauf 83 -
8
votes2
answers2203
viewsIs a View faster than a regular Query?
When using a query of type SELECT * FROM myView is faster than SELECT * FROM (query para gerar a view acima) I have an appointment and would like to curl or make it faster, but I am in doubt if I…
-
8
votes3
answers230
viewsWhy are methods that operate pointers insecure in . NET?
Reading a bit of the . NET source code I realized that some methods have a peculiar modifier, the unsafe. [System.Security.SecuritySafeCritical] // auto-generated…
-
8
votes1
answer176
viewsIs it possible to put 3 colors on a button?
I need to divide the button into 3 "equal pieces" and each piece has a different color. For example, a button with the colors Blue, Green and Red, each occupying 33.3% space. How to do this?…
-
8
votes2
answers248
viewsAlternative to Observable and Observer in Java 9
For testing purposes, I am porting an application from version 7 to version 9 of Java. This application has some features that use Observer and Observable. I realized that both became obsolete:…
java pattern-design characteristic-language observer-pattern java-9asked 7 years ago Homer Simpson 3,001 -
8
votes2
answers2446
viewsjQuery - how to change text after "<i>" element?
Follows code: <div class="file-caption-name"> <i class="glyphicon glyphicon-file kv-caption-icon"></i> Alterar texto aqui </div> I’ve tried that way: $('div.file-caption-name…
-
8
votes1
answer179
viewsIs it possible to work with Javascript Enumerators?
Commonly used in several languages Enumerators make life easier for developers when they need to create a "list" of values within an application. Within the Javascript it is possible to use this…
-
8
votes2
answers21372
viewsWhat is a database database?
For some time I have been following issues involving the term procedure in database, then doubts: What is procedure? Where to use it, what’s the point? If possible examples of use clear the mind of…
-
8
votes3
answers643
viewsHow do I remove a "listener" that I added via addeventlistener?
I always use the function addEventListener to "listen" to some events, such as click, Websocket connection and the like. For example: var ws = new WebSocket('ws://echo.websocket.org/');…
javascriptasked 7 years ago Wallace Maxters 102,340 -
8
votes2
answers10963
viewsWhat is the difference between SET and ENUM in Mysql?
What are the differences between SET and ENUM in Mysql? And in what situations both are best applied?
-
8
votes1
answer812
viewsWhat are the terms RISC and CISC regarding software development?
My teacher mentioned the two terms RISC and CISC, they seem to me to be some kind of architecture. And software that is developed (compiled) for computers that use RISC cannot be run on CISC-type…
-
8
votes2
answers5712
views"Search refused" in Registro.br
I’m trying to direct my domain to the nameservers I just set up on Amazon’s Route53 AWS. They work correctly, but I believe they are not responding for other domains besides the root…
-
8
votes4
answers2092
viewsNull values in PHP
In PHP 7 which is the correct way to define and identify null values? Which of these is the correct way to assign null? $valor = null; $valor = ""; Which of these is the correct way to identify null…
-
8
votes1
answer2473
viewsIs it possible to create a site with HTML and C# without ASP.NET?
Is it possible to create a site only with HTML and C#, without ASP.NET? In general, as?
-
8
votes1
answer1772
viewsWhat is Viewholder Pattern?
I’m implementing a RecyclerView on Android and I noticed that it is necessary to create a class called ViewHolder. This class seems to be a design standard called Viewholder Pattern, and my doubts…
-
8
votes1
answer332
viewsNew vs Override
What would be the difference between new and override ? Examples: Override: public class ClasseBase { public virtual void Funcao () { } } public class Classe : ClasseBase { public override void…
-
8
votes1
answer89
viewsHow to avoid repetition listening to changes in the properties of a component?
When I need to react to changes in N properties for the same callback I find myself wearing something like this: watch: { propriedadeA(){ this.reagir(); }, propriedadeB(){ this.reagir(); },…
-
8
votes3
answers3452
viewsWhat is an absolute value?
Viewing the Mysql documentation you can find the mathematical function ABS(x), to which the absolute value of x. mysql> SELECT ABS(2); -> 2 mysql> SELECT ABS(-32); -> 32 What exactly is…
-
8
votes3
answers852
viewsWeb Security api: SSL?
I wonder if you have how to restrict requests to a web api specifically for a machine. My web api will be hosted on computer A. My client (at first only one) will stay on the computer B. Different…
-
8
votes1
answer424
viewsGraph of Machine Learning
I have a problem to generate a graph using Python - Machine Learning - Naive Bayes model - would plot an F1 (score) for the different values of K, below we have the classifier that gives me the…
-
8
votes2
answers150
viewsIs it worth using the W3C validator?
I ask this because it seems that he accuses things that, I think, were not to accuse. For example: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8">…
-
8
votes1
answer154
viewsDoubt with ng-repeat
I have the following code: <div id="box-1" class="box"> <div ng-repeat="task in contato " style="margin-top: 5px"> <div class="md-card md-card-hover"> <div…
-
8
votes1
answer81
viewsUser without access to resources mapped in the Security-role of the web.xml
What is the behavior of security-role of web.xml when the user does not have access to project resources? It is default for Weblogic to return a 404? This status is configurable? There is the…
-
8
votes2
answers1582
viewsVariable of the foreach loop
When we use a loop loop foreach, the local variable we create to receive the contents of the list in question is passed by value or reference? Ex: foreach (var item in listItems) { //TODO } The…
-
8
votes1
answer2502
viewsWhat are the differences between Flask and Django?
I recently started in the Python language and am currently working on a project using Flask, MariaDB and WebSockets. I see people talk a lot about Django and would like to know the differences…
-
8
votes3
answers370
viewsPrivate set of property in an interface
I’m modeling a C# interface that has a property. However, I want to ensure that all classes that implement this interface maintain the Setter as private: public interface IBar { string Id { get;…
-
8
votes3
answers8606
viewsSwitch case Kotlin
In Java I use the switch in various situations, as in the example below: public class SwitchDemo { public static void main(String[] args) { int month = 8; String monthString; switch (month) { case…
-
8
votes3
answers1585
viewsHow to generate large random numbers in C++?
I’m looking to make a random number generator of [0.4], including these, only the problem is my teacher indicated that I used 4 million to generate random numbers and what value surpasses RAND_MAX ,…
-
8
votes4
answers8025
viewsCheck if int is "null" in C#
Cannot assign on C# null at an integer value (int, nay int?). However, how can I know if an integer value (int) has not yet had an assigned value (being of the type int)? int? valor; if (valor ==…
-
8
votes1
answer2899
viewsWhat is the difference between computed properties and the methods of a Vue.js instance?
I am trying to understand the difference between the two, when using one or the other, I know that there are also the Watchers, which the correct use of them?
-
8
votes4
answers3000
viewsEquivalent to the conditional or ternary operator in Kotlin
Below I am logging on the monitor of Android Studio in JAVA a short phrase using conditional or ternary operator (?)en. Look at: Log.wtf(GOT, (valirianSteel == 0 && glassOfDragon==0) ?…
-
8
votes2
answers335
viewsHow to customize the getter in Kotlin?
When we create a variable of type val, in the case of Java, only the getter relative to it. Different when a type variable is created var, in which the getter and setter. See below for an example:…
-
8
votes2
answers776
viewsMarkup language equivalent to HTML?
Just for the sake of curiosity, I’ve been researching about and found absolutely nothing related. HTML is a text markup language, and there are others like XML which is the only one with a clear…
-
8
votes2
answers308
viewsWhy does Kotlin use a way of declaring functions and variables other than "traditional"?
Traditionally the return type and variable type are indicated at the beginning, before the name: public int soma(int a, int b){ return a + b; } In Kotlin he is named after: fun sum(a: Int, b: Int):…
function characteristic-language kotlin variable-declarationasked 7 years, 2 months ago ramaral 44,197 -
8
votes3
answers213
viewsWhat’s a Kotlin label for?
In an example of loops in kotlin documentation, we have some codes with the following excerpt: loop@ for (i in 1..100) { for (j in 1..100) { if (...) break@loop } } From what I read in the…
-
8
votes2
answers431
viewsCheck if git is installed using Node
I’m starting in a desktop application with the use of Electron however I need to check if there is Git installed on the system because it must use git As the idea is to distribute on Windows, Linux…
-
8
votes1
answer618
viewsWhy does the reduced version of git SHA1 code have 7 characters by default?
I’m studying Git and came across the command cherry-pick, who recovers a commit specific. The parameter passed for this command is the code hash generated to identify only that commit. However, in…
-
8
votes2
answers795
viewsWhat is the best way to implement a loading bar?
I have a project SPA that in each screen transition, a loading-bar (progress bar) to improve the user experience (this UX will encompass more interactivity than performance). But when researching,…
-
8
votes4
answers2743
viewsJavascript has a xor operator?
There is an xor operator in javascript and what would be the 'symbolic' form of it (for example or has || and has &&)?
javascriptasked 7 years, 3 months ago user83428 -
8
votes1
answer9340
viewsHow to tokenize English words using NLTK?
I’m having serious difficulties understanding this mechanism. In English it would just be: import nltk tag_word = nltk.word_tokenize(text) Whereas text is the English text that I would like to…
-
8
votes1
answer151
viewsWhat would MOJO be on Maven?
I use the Maven some time together with other tools, and always see something related to Mojo, what would really be a Mojo?…
mavenasked 7 years, 3 months ago Homer Simpson 3,001 -
8
votes3
answers124
viewsCallback running when loading the page
I’m taking some tests to learn more about callback in javascript and found the following difficulty: function nome_existe(element) { console.log(element.id); } window.onload = function() {…
javascriptasked 7 years, 3 months ago MagicHat 12,262 -
8
votes1
answer1237
viewsDoes the type annotation in a function not guarantee the type in Python 3?
It is known that in Python it is not necessary to define the type when declaring a variable and this is interesting, however, when creating a function, I cannot restrict the types of attributes, so…
-
8
votes1
answer231
viewsHow to use the 9th rule of Object Calisthenics in PHP?
Object Calisthenics making a translation into Portuguese means "programming exercises", and consists of 9 rules created by Jeff Bay in his book The Thoughtworks Anthology. The Object Calisthenics is…
-
8
votes0
answers437
viewsHow to change the color of the item in a listview
I have a listview which is adapted with a SimpleCursorAdapter and that within the listview has two textview, one with a number and one with a name. I wanted to do so... the listview shows in…