Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer52
viewsPublishing packages in the NPM repository
How to publish a package I made in the npm repository for other programmers to test ?
-
5
votes1
answer157
viewsError converting varchar to integer
By performing the following UPDATE through my API (.NET Core): UPDATE Aula SET WHATEVER = WHATEVER WHERE ID_AULA = @examID Code: string query = builder .AppendLine("UPDATE Aula") .AppendLine("SET…
-
5
votes1
answer77
viewsQuery to find if value is between "1|3"
I have a table units that represents the number of dormitories of the buildings: id| dorm 1 | 1|3 In this case above means that id 1 has units with 1 or 3 dormitories. Then I have a search using…
-
5
votes2
answers817
viewsOverlay graphics in R with ggplot
Hello, consider two data frames: df = the number of students who answered items A,B,C,D and E of a 6-question test ITENS <-c("A","B","C","D","E") Q.1 <-c(10,20,10,40,10) Q.2…
-
5
votes4
answers1156
viewsLogin condition with user or email in the same field
I am creating a system for schools, where the teacher when registering enters data such as name, email, user and password. So far the teacher can log in with email, but I wish you could login with…
-
5
votes3
answers690
viewsCheck whether html form numeric field has a maximum of 6 numbers with PHP
I need to test if field is filled and if it is composed of up to 6 numbers using the PHP language
-
5
votes1
answer94
viewsWhy does the print_r print before the echo?
I got the following array: $array = array(10,20,30); print_r($array); Exit: Array ( [0] => 10 [1] => 20 [2] => 30 ) If I print with echo before the print_r: echo 'primeiro: ';…
-
5
votes2
answers319
viewsWhat is considered when ordering a varchar field? Being filled in by numbers
I have a table with the birthday of the month, for a reason of use here we should store this as varchar. When using it it is necessary to sort by date from the most recent to the oldest, the same…
-
5
votes2
answers107
viewsWhat is the function of this "=&" operator in PHP?
If I have the code below: $x = 1; $y = 1; if($x =& $y){ echo "ok"; }else{ echo "não"; } No matter what value I put in $x or $y, always falls in the echo "ok". Now if I don’t define one of the…
-
5
votes2
answers675
viewsSearch for files by extension
In a Windows Forms application I would like to know how to search all the files that exist and contain the word teste in the file extension. For example, when opening a folder in Windows and typing…
-
5
votes4
answers1248
viewsHelp with exercise
Can anyone help me correct this exercise? I am trying to finish these lines and I cannot: module.exports = function restaurantBill(bill) { /* 1. Crie uma variável chamada tax (imposto em inglês) e…
javascriptasked 6 years, 9 months ago Yra Rodrigues 71 -
5
votes2
answers131
viewsFuncionameto Iterator
I’m having an absurd doubt with use of Iterator, I’m doing an exercise in which I have a Data class that checks the existence of the date, this is working perfectly,in my main I make an array of…
-
5
votes1
answer497
viewsWhere and how to save the API authentication token?
Hello, I’m with an angular application, which will consume a API. For that to happen, I must send one POST to another API, which serves only to generate a token that I will pass on all other…
-
5
votes3
answers5180
viewsHow to generate random numbers in javascript, differently
I need to generate random in javascript, so that they are only generated 5 out of 5 and that it is within a limitation, for example 5 to 555. Example: 5, 355, 425, 125, 550 Multiples of 5…
javascriptasked 6 years, 9 months ago Luan pedro 609 -
5
votes2
answers1750
viewsHow to create a for in R with the indexes of a data frame
If I have a date.: > dato<-as.data.frame(matrix(1:64,8,8,T))[-3,] > dato V1 V2 V3 V4 V5 V6 V7 V8 1 1 2 3 4 5 6 7 8 2 9 10 11 12 13 14 15 16 4 25 26 27 28 29 30 31 32 5 33 34 35 36 37 38 39…
-
5
votes1
answer2602
viewsget login username with Spring Security
Hello, I come here to ask for help about Spring Security. I would like to know how I can get the username logged in. I use authentication with login and password but when I use the search method it…
-
5
votes2
answers462
viewsLaravel multitenancy with a user-only BD
I’ve been researching about Saas and Multi-tenancy but has little material in Portuguese. I saw that it is possible to make a database for each company, but my question is: You can make a unique web…
-
5
votes1
answer6927
viewsHow to change Default Encoding in Sublime Text 3
In my work, we program in PHP mainly and all the code files were made in ASCII, I’m making some inclusions of pages and I often need to open the existing files and add new things. I do this through…
character-encoding utf-8 sublime-text ascii sublime-text-3asked 6 years, 10 months ago LuisFelipe 100 -
5
votes2
answers337
viewsReal example of the use of encapsulation
I researched about encapsulation, I even read some topics here, but I haven’t seen a real example of how to use it in a way that can show me its advantages, what problems it avoids. I have an…
-
5
votes3
answers104
viewsWhy do you use a vector with a name on it?
would like to know the function of using a name within a vector? char chave[NUM_LETRAS + 1]; int frequencias[NUM_LETRAS]; int frequencias2[NUM_LETRAS]; char codificado[MAX_STR]; char…
-
5
votes3
answers10243
viewsInsert author and image description. Latex
How can I place the author below the image and a description above. As shown in the figure?…
-
5
votes2
answers134
viewsWhat is the problem of returning a local variable?
What can happen if I return a local variable? I read on the internet that it is not a good idea to return a local variable. Maybe why the variable when exiting the function is deleted? Example:…
-
5
votes2
answers4177
viewsHow does hierarchy elements work in css?
I would like to know how the hierarchy works in css, I explain: Let’s say in mine style.css i set to h1, h2, h3, h4, etc. by default font-size: 12px;, hitherto beauty... Now, if for example I insert…
-
5
votes2
answers2728
viewsHow to separate only the first word of each string from a list?
Given that list : nomes = [ " Paulo Ricardo " , " Fabio Junior " , " Roberto Carlos " ] How do I create a new list, separating the last name from the last name and only adding the last name without…
-
5
votes2
answers166
viewsReal difference between Call and Apply methods
What is the difference between the methods call and apply? I could not identify the difference where one separates the arguments and the other generates a vector for the arguments: function scope()…
javascriptasked 6 years, 10 months ago LeAndrade 8,475 -
5
votes1
answer3181
viewsDecimal places c#
I have a variable of decimal type returning me the value 270.61864847349717630804948048 how do I return with only 3 houses after the comma, in case pass 270.618 only. Thanks in advance…
-
5
votes4
answers13421
viewsQuery INSERT with WHERE condition
How can I make an Insert with a Where condition? I have the following query: INSERT INTO `registro`(`id`, `username`) values ('','USER_1'), ('','USER_2'), ('','USER_3') It will add a new user to the…
-
5
votes1
answer1239
viewsWhat is an Adjacency Matrix?
Whenever read something in relation to graph theory I stumble upon a term called Adjacency matrix, it seems to me that this is strongly related to this theory. Therefore, I would like to know more…
-
5
votes1
answer387
viewsHow to make a difference in R dates?
dataset <- structure(list(PLACA = structure(c(5L, 5L, 5L, 4L, 1L, 2L, 3L, 7L, 6L, 8L), .Label = c("DSF9652", "EFR9618", "EQW6597", "ERB1522", "EWM3539", "LOC1949", "LQQ5554", "OQT5917"), class =…
rasked 6 years, 10 months ago Diego Peliciari 319 -
5
votes3
answers87
viewsHow do I make a conditional if by comparing only the last 2 digits?
I am doing a project in Visual Basic but when the user type a string that will be 5 the maximum ex: UF052 I want to do a if where it will be compared. If textbox1 = "UF052" the Comando End if…
-
5
votes2
answers552
viewsR - Selecting elements of a data frame with a column that has the same name as a global variable with`dplyr`
Consider the following data.frame and the variable x df <- data.frame(x = c(rep(0, 10), rep(1, 10)), y = 1:20) x <- 0 I tried to use the dplyr to select column elements x equal to the global…
rasked 6 years, 10 months ago Marcos Banik 1,779 -
5
votes2
answers104
viewsIs there a performance benefit in replacing the operator "==" with the operator "=="?
I’m using the Jslint to check if the Javascript source code complies with the coding rules, and it is returning many suggestions to replace == (two signs of equals) with === (three signs of equals)…
-
5
votes2
answers9906
viewsWhat is database redundancy?
Recently in my college database discipline came up this question from which I was left with much doubt.
databaseasked 6 years, 10 months ago Danillo Santtos 51 -
5
votes1
answer531
viewsPivot T-SQL Dynamic Sequential
Breaking my head here to create a proc using pivot for this transformation: There is the possibility? *Using sql server 2008R2 EDIT: CREATE TABLE #Teste5 (name VARCHAR(50),message…
-
5
votes1
answer588
viewsHow to know which object is focused at runtime
I see you already have a question similar with mine only that is in C#. I’m doing a field check routine and when one of the date fields is empty it gives the message. I need that when one of these…
delphi delphi-10 delphi-berlin delphi-tokyo delphi-seatleasked 6 years, 10 months ago Edu Mendonça 2,564 -
5
votes1
answer292
viewsIn Winforms how do the datepicker cursor walk when typing the date?
The question is about Winforms' Datetimepicker control. When we type the date, instead of choosing the calendar, the cursor does not walk. That is, we typed the two digits of the day, and instead of…
-
5
votes1
answer759
viewsPHP with DAO + mysqli
DAO necessarily needs to be a class? Or I could create methods within a file. php without encapsulation of a class? If not possible, what is the name of the classless DAO (name of some pattern equal…
-
5
votes1
answer3287
viewsError using Mock: Wanted but not Invoked: Actually, there Were zero interactions with this mock
I’m making a list of exercises and I’m having doubts on the following: Question 3 - The Verify method, from the org.mockito.Mockito.Verify package, is used to check the amount of times a method is…
-
5
votes1
answer553
viewsHow to configure Autoload Composer?
I am facing a lot with this autoload in php, I decided to study about it, I could understand a good part, but I have only one very specific doubt. Inside the archive composer.json, in the stretch:…
-
5
votes1
answer88
viewsHow to make atomic updates with Triemap and Concurrenthashmap?
In Java ConcurrentHashMap has an interesting property. Operations such as putIfAbsent, remove, replace, computeIfAbsent, computeIfPresent, compute and merge are atomic. Example: final Map<String,…
-
5
votes2
answers211
viewsDifference in cast using "as" and "type cast"
A question arose about casting in C#, I see in many fonts using the cast in the following ways. What is the difference between one and the other, when using one way or another? public interface…
-
5
votes1
answer872
viewsGit error, can’t push
I went to give a push and this error occurred: error: src refspec master does not match any. What is the cause of this? Could someone help me?…
-
5
votes1
answer452
viewsIs it possible to compile an app using Java and Kotlin together?
Can I be part of the code in Java and another part with Kotlin? Can anyone tell me?
-
5
votes3
answers4373
viewsIf H = 1 + ½ +1/3 + ¼ + ... + 1/N, make an algorithm to calculate H, where N is typed by the user
The program is only printing 1, it’s like it doesn’t keep the value of the variable h, can anyone help? Follow the code: public class MainUmSobreH { public static void main(String[] args) { double h…
-
5
votes1
answer407
viewsAndroid - Activity destroyed when rotating the tablet
I have the following problem in my application: When the user turns off the screen on the tablet, turn the screen again, rotates to the vertical position and logs in android again, a Activity user…
-
5
votes2
answers1194
viewsWhat is an Engine?
I read an article about Razor. That article says it’s a engine view, but what comes to be a engine? According to the article Razor is a new syntax that works with CSS and HTML to make life easier…
-
5
votes3
answers167
viewsDoubt about C pointers
So guys, I got a question here. What does each of these statements mean below? *ponteiro = Valor do ponteiro ponteiro = (?) &ponteiro = Endereço de memória do ponteiro I would like someone to…
-
5
votes1
answer1177
viewsSend and pick up GET by AMIGAVEL URL
I have this tag on the index <a href="projeto">Projeto</a> Who sends me to this page localhost/project.php That I’m leaving like this localhost/project With the RewriteEngine on…
-
5
votes1
answer71
viewsConstantly increasing slowness in emulator and IDE loading
Since the installation of the Android Studio, the emulator constantly gets slower with the course of use, and it is not for lack of delete test apps, etc., also the IDE itself begins to slow down…
android-studioasked 6 years, 11 months ago rbz 9,949 -
5
votes2
answers334
viewsWhy do sets with intervals of A-z return symbols in REGEX?
Setting: const texto = 'ABC [abc] a-c 1234'; console.log(texto.match(/[A-z]/g)) Why the set of A(maiúsculo) until z(minusculo), that is to say, /[A-z]/g returned me to [ and ]? The result should not…