Most voted questions
150,413 questions
Sort by count of
-
4
votes2
answers13707
viewsMask for CPF or CNPJ without using plugins
I managed to make simple mask for telephone fields, zip code, R$, etc. But I wanted a mask to detect and automatically format a field for CPF or CNPJ in the same input, but preferably pure…
-
4
votes1
answer3994
viewsReset Auto-increment SQL Server
Good morning, I created a new table in Sqlserver and I am testing some scripts to popular the table and I came across the following situation, in my tests I am doing the Insert in the table checking…
-
4
votes2
answers1245
viewsWhat is Operational Research in the Context of Computing?
In the Linear Programming subject of my faculty, the professor cites a term called Operational Research where it uses certain algorithms to solve certain types of problems. However, I was very…
-
4
votes1
answer212
viewsEntity Framework Query Many to Many
I’m starting to use the Entity Framework and I’m looking to make a query between two tables, Livroes and Autors, and their relationship is like Many to Many. I don’t know if it’s relevant but I’m…
-
4
votes2
answers350
viewsHow does PHP run time work?
I’ve always been interested in how long my code runs. The problem is that I don’t quite understand how the execution of PHP code works. Below are the questions: On the server, the PHP code is…
-
4
votes1
answer259
viewsproblem with vectors in android studio
I’m having trouble inserting vectors in android studio my project was created in api21 (5.0), I am testing on a 7.0 device and this is all ok , working perfectly, but an error occurred when running…
-
4
votes1
answer155
viewsWhat is "|>" for in Elixir?
Reading some codes from elixir I see |> be used commonly. What it means?
elixirasked 6 years, 8 months ago Yago Azedias 1,117 -
4
votes2
answers1159
viewsHow to make a "LIKE" in a DJANGO ORM query?
To make a query to get the data accurately in Django, I use the filter, thus: usuarios = Usuarios.objects.filter(nome='Jonh') This will generate an SQL similar to: SELECT * FROM usuarios wHERE nome…
-
4
votes1
answer434
viewsHow to create a random number of 5 digits starting from 1?
I have to create a bank account with some requirements, in the middle of them I need to have a 5 digit starting number of the 00001. But when putting "00001" at the time of displaying only displays…
-
4
votes2
answers947
viewsHow to convert gray image to RGB?
To convert a RGB image to grayscale is relatively easy, just do a linear( or average) combination of the 3 channels. For example : Gray = 0.3*R +0.59*G +0.11*B By the expression above you get a…
-
4
votes2
answers1556
viewsRegular expression 6 decimal places
Can anyone tell me if it is possible to create a regular expression with the following characteristics: value between 31.000000 and 43.000000 the value may have 6 decimal places, but must be in the…
regexasked 6 years, 8 months ago Joana Nóbrega 51 -
4
votes1
answer2217
viewsHow to Bring the 2 highest values of each different id - SQL
I put together a spreadsheet to facilitate the understanding of my doubt. How to select only the 2 "two" largest room house tuition? I only managed to bring the highest value of each room, I wanted…
-
4
votes4
answers3179
viewsHow do DIV fill 100% of the display?
Good afternoon I would like to create a site where the height of the first DIV is 100% of the display displayed to the user, and when giving the scroll, the other elements appear normally. I know…
-
4
votes1
answer270
viewsWhat is the difference between mixins and inheritance?
Conceptually, there is a difference between a class that extends a module by mixin and a class that inherits another class (unique inheritance)? I know why mixins, a class can extend multiple…
-
4
votes2
answers130
viewsHow to store an operator?
I wonder if you have any way to store an operator in a variable, for example a = < if 5 a 5: pass
-
4
votes1
answer6347
viewsHow to modify an element within a Python list?
I have the following list: pessoa=("Filipe", 40, True) I write the print command for each element: print(pessoa[0]) print(pessoa[1]) print(pessoa[2]) the answers are: Filipe 40 True When I try to…
-
4
votes1
answer553
viewsIs there a better way to build a graph?
I have a list of articles with their respective tags: artigo1 ['a','b','c'] artigo2 ['a','d','f'] artigo3 ['z','d','f'] ... I need to create a graph that will relate all articles by tags. In the end…
-
4
votes1
answer541
viewsI should still save files as . HTM or just as . HTML
Although the two are interpreted equally by the Browser it seems to me that the extension . HTM has fallen into disuse. I still have to save my files as . HTM or should I always choose . HTML? It…
-
4
votes2
answers1215
viewsDarken screen by clicking on the search bar
On the Americas and Submarine websites, it has an effect that by clicking on the search bar, the entire site is slightly darkened to highlight the search bar. That one I don’t know the name of the…
-
4
votes1
answer155
viewsArray and type being created
In Java, when I have the following instruction: int[] ns = new int[5]; the following doubts arise: An object of what type is created? For each value in an index, I call it an instance?…
-
4
votes3
answers964
viewsUse of 'break' in Javascript
For example, if I have the following code: var i, j; for (i = 1; i <= 3; i++) { for (j = 1; j <= 3; j++) { if (j === 3) { break; } text += "The number is " + j + "<br>"; } } When using…
javascriptasked 6 years, 9 months ago user75204 -
4
votes0
answers815
viewsIs there a natural language processing library (NLP) for Portuguese?
I have researched a lot on the interwebs, saw several libraries of NLP for Python, Java, Javascript, among others... Each of them was only for English or other languages. And since the…
artificial-intelligenceasked 6 years, 9 months ago Henrique N. Mendes 328 -
4
votes1
answer94
viewsWhy is the exit 16?
#include <iostream> int main() { int x, y = 3; x = (++y) + (++y) + (++y); std::cout << "y = " << y << std::endl; setlocale(LC_ALL, ""); std::cout << "O valor de x é "…
c++asked 6 years, 9 months ago João Victor 43 -
4
votes1
answer4901
viewsLocale p-Calendar primeng Angular
Hello! I am using the componet p-Legend of the primeng and setting its locale to en as below: <p-calendar [(ngModel)]="filtro.dataEmissaoIni" dateFormat="dd/mm/yy" name="datai" [locale]="pt"…
angularasked 6 years, 9 months ago Edison Luis Werle 101 -
4
votes1
answer2980
viewsC# Console Application. Read Json File
I have a Json file and it always gives error when I try to read it. I believe because it is an array within another array and I cannot read. Json: { "map": [ ["S", "S", "S", "S"], ["S", "S", "C",…
-
4
votes2
answers14478
viewsHTML code in the body of the e-mail
I created an HTML code to send information to the company’s clients where I work, when I send the email to the accounts *@hotmail.com or for their professional accounts *empresa.com.br everything is…
-
4
votes1
answer739
viewsReturning week number of the month
In January this year (2018) I have 5 weeks in the same, being them: 1 week: 1 to 7; 2 week: 8 to 14; 3 week: 15 to 21; 4 week: 22 to 28 and 5 week: 29 to 31 (or 29 to 04 February). When using the…
-
4
votes2
answers3752
viewsWhat is the difference between Compile and Implementation in the Android Studio build.Radle file?
Whenever I will add some library manually in the file build.Gradle (Module: app) of Android Studio 3, I use the format implementation, because this is the way that Android Studio itself uses by…
android android-studio gradle dependencies android-gradleasked 6 years, 9 months ago Chinnon Santos 349 -
4
votes1
answer850
viewsHow to integrate an Android application with a Python+DB server?
Good afternoon to you all! I am a student of Computer Science, but I haven’t had the opportunity to have a deeper experience with programming, involving the necessary integrations in applications…
-
4
votes1
answer316
viewsPredict function in GLMM
Edited When we use a traditional logistic regression and make a prediction in R for example: library(dplyr) n = 300 xx<-c("r1","r2","r3","r4","r5") xxx<-c("e1","e2","e3") p=0.3 df1 <-…
-
4
votes1
answer69
viewsoverflow Hidden with float left
Hello I’m learning now how to deal with css, and fall into a situation that I found nowhere the answer, I will be very grateful if someone can help me. .pai-com-overflow{ border: 1px solid red;…
-
4
votes2
answers793
viewsChatbot in Python with NLTK
I am beginner in python, for some time I have been interested in Text Mining and I would like to ask for a help with a doubt in a project. For some time I have been studying how to use the Python…
-
4
votes1
answer118
viewsCSS must be Shorthand or Longhand
Fine tune which is the right practice, use CSS with Shorthand or Longhand? I looked, but I couldn’t find a definitive answer... When we declare the class with Shorthand we are saying that all other…
-
4
votes1
answer73
viewsMake a matrix of origins and destinations
I need to fill a table with origins and destinations so that each cell contains the total number of people leaving from one location to another. The database has an id for each observation, as well…
-
4
votes1
answer195
viewsDifference between exporting a function and an IIFE in Javascript
Is there any difference between: module.exports = (function() { // Code. })(); And: module.exports = function() { // Code. }; Taking into account the context of exporting and importing modules?…
-
4
votes2
answers1153
viewsHow to transform integers into byte in the Python language?
I’m using the pyserial module to send serial data, so I have a list of values like: Valores = [10,20,30,40,50,60,70,80,90,100] I need to transform the values of the list into bytes to send, because…
-
4
votes1
answer460
viewsHow to install the Typescript Plugin in Sublime Text 3?
I am trying to install the plugin in Sublime Text 3, and for this I did the steps: I installed the GIT I executed the available commands here at the GIT terminal. I pressed Control+Shift+P to see if…
-
4
votes1
answer1670
viewsHow to implement methods and classes by some keyboard shortcut in visual studio?
I need to implement methods and classes "keyboard" to get a value automatically. 1: Implement UI methods in the Home class: class Inicio : Interface { } 2: Set and Get automatically: private static…
-
4
votes3
answers73
viewsWhen I click on the text it does not change (js)
I’m learning JS and I can’t understand why I don’t change H1’s text when I click on it. <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>Testes…
-
4
votes3
answers5349
viewsPython3: How to calculate the number of working days between two dates?
Friends, I would like to know how the number of working days between two dates can be calculated in Python 3. Thank you! []s
python-3.xasked 6 years, 9 months ago Lynndskyndd 41 -
4
votes1
answer2459
viewsHow to use the merge statement in sql server
I would like to know how to use the instruction MERGE. When to use and what advantages and disadvantages to use?
sql-serverasked 6 years, 9 months ago Al Unser Albuquerque 965 -
4
votes1
answer397
viewsJava Priorityqueue Comparator
I’m trying to understand why the native mode of java is not performing the comparison, I don’t know where I’m going wrong. MAIN // EXERCICIO PARA COMPARAR DOIS OBJETOS, USANDO CLASSE NATIVA DE…
-
4
votes1
answer348
viewsValidation of quantity of sessions with spring boot and spring security
I need to validate the number of sessions that may exist, so that the user cannot log into two places at the same time with the same credentials. Reading the Spring Security documentation and posts,…
-
4
votes3
answers324
viewsHow can I take each selected checkbox and put it inside an input?
I have some checkbox and I want, when clicking a button, all the names of these selected, to go to an input separated by ",". I tried to do it this way, but it didn’t work: <input type="checkbox"…
javascriptasked 6 years, 9 months ago jsnow 160 -
4
votes2
answers5911
viewsWhat is rel="Preload"?
I saw in a code snippet of a site a definition more or less like this: <link rel="preload" href="caminho/para/o/script.js" as="script"> I’ve never seen that code before. I wonder what that…
-
4
votes1
answer1410
viewsHow do I run an algorithm when the user stops touching the screen?
I would like, when the user presses the screen, to open a horizontal menu with 4 options where the option to which he drops his finger on top will be selected. The pressing event I already know.…
-
4
votes1
answer5031
viewsConversion of Website or PHP or HTML system to Android and iOS app
What is the best way to 'convert' a website or PHP or HTML system to a Android and iOS app ? I have a PHP Script with DB Mysql and HTML site , and I’ve heard that you can generate the version of the…
-
4
votes2
answers59
viewsFetch values in an object
I’m trying to access properties of an object, a dictionary. However the references are in format {String} and its concatenation through a point (.) and I’m using split() to break this {String} in a…
-
4
votes1
answer2404
viewsCan we develop a 100% Javascript/HTML/CSS web application without backend?
I am a developer backend Java and always used Javascript on frontend for the purpose of giving dynamism and better interaction to HTML pages (I have always developed corporate systems). Is there any…
-
4
votes4
answers7563
viewsHow to include and manipulate local JSON file?
I use JSON data to create the <options> of a <select>: jsonOptions.forEach(function(item) { var option = document.createElement('option'); option.text = item.description; option.value =…