Most voted questions
150,413 questions
Sort by count of
-
11
votes3
answers17994
viewsWhat is the Difference Between HTML.Actionlink vs Url.Action?
Reading some tutorials of ASP.NET MVC I found these two helpers being used to do basically the same thing, which was to direct the user to a new view. So I wonder if there’s any more remarkable…
-
11
votes2
answers440
viewsWhy is it not possible to modify local variables when accessed within anonymous classes?
When trying to access a local variable from a method of an anonymous class in java, we usually get a syntax error if we try to modify its content. Some Fdis suggest that we turn the variable into…
javaasked 7 years, 10 months ago user28595 -
11
votes2
answers435
viewsWhat characterizes a database?
What makes a data collection to be called a database? For example, if I have a file pessoas.txt as follows: Vinicius João Maria José And I write, read and update the data there, it is considered a…
-
11
votes2
answers2648
viewsWhat is a shebang?
Since in many languages the character # represents a committal, what is the sense of using it? He has some special sense?
-
11
votes3
answers179
viewsWhy does CSS work with "fake" HTML elements?
I saw some examples like this on the internet, showing that html elements with custom names work in relation to the application of css styles. elementofake { color:red; font-size:30px;…
-
11
votes1
answer1183
viewsWhat is a collation?
I never knew exactly what it meant. I know it has to do with the coding of the data that will be entered in the table, but in addition, there is some more specific reason to select a collation? I…
-
11
votes1
answer780
viewsWhat is Feature Envy?
What is Feature Envy? Why is it considered a bad smell of code (code Smell)? What are the advantages of avoiding it? She must always be avoided?
-
11
votes2
answers6306
viewsWhat is salt when it comes to password encryption?
Searching on cryptography, in some cases is used salt, as some people probably know. In English translation I know it is salt, but within the scope of software development I did not understand very…
-
11
votes2
answers1385
viewsWhen to use "inline"?
Everybody says you don’t have to use inline functions since the compiler knows what to do better than the programmer. But if it has in the language it should serve for something. Is it useful in any…
-
11
votes3
answers1813
viewsHow to map 1:N (one to many) in Dapper?
I’m using the Dapper which is a micro ORM used to map objects according to the database tables following the relational model. Therefore, I have some doubts regarding the mapping and the structure…
-
11
votes2
answers1804
viewsFormat String "28122016" for "2016-12-28" date
I know it’s a very simple question, but I’ve done a lot of research and I’m not finding a simple solution. I need to create a function that receives a date in the format "28122016" and convert her…
-
11
votes2
answers44856
viewsHow to get ip from a user using php?
I’m using the function getenv("REMOTE_ADDR"), to catch the ip users who enter a particular page of my site and then I made a if to redirect that ip which is not equal to the variable of ip allowed.…
-
11
votes3
answers3123
viewsformat ľ%d' expects argument of type ěint', but argument 2 has type ěchar *' - What is it? How to tidy up?
Code: #include <stdio.h> int main(void) { char caractere, *caractere_ptr = &caractere; printf("Caractere: foi alocado %zu byte\n", sizeof(caractere)); printf("Endereço: %d",…
-
11
votes2
answers239
viewsWhat could justify the jump of a number in a versioning system?
I realized that the long-dreamed PHP 6 has been canceled. Then, mysteriously, from version 5 jumped directly to version 7. I then had a doubt about the development of libraries and their respective…
versioningasked 8 years ago Wallace Maxters 102,340 -
11
votes2
answers1625
viewsLambda Groupby by year and month
I have a list of events, and I’d like to group them by year and month, for example [Year 2017] Month January { Event 1, Event 2, Event 2 } Month February { Event 3 } [Year 2018] Month January {…
-
11
votes2
answers23324
viewsCount the number of occurrences of a value in a list
I have a list with the following values: numeros = [5, 3, 1, 2, 3, 4, 5, 5, 5] In Python would have some function to count how many times some value repeats? For example: I want to know how many…
-
11
votes3
answers218
viewsDoubt javascript Function t(n,t,i,r)
I usually see the source code of the pages and I never understood that. function dt(n,t,i,r) What do those letters mean?
javascriptasked 8 years ago vinibudd 455 -
11
votes2
answers6367
viewsOpen, edit and save a binary file in Python3
It is possible to open a binary file and read its bits in Python3, edit and save a new binary. If possible, such as?
-
11
votes4
answers1313
viewsCapture user-typed input with PHP Shell
How can I redeem input data. Example: > Qual seu nome? ...Usuário digita o seu nome... > Olá, $nome-digitado How can I do that Shell Script in PHP.…
-
11
votes4
answers843
viewsHow to limit the generation of pseudo-random numbers to non-zero and non-repeating numbers?
I would like the figures not to repeat themselves and be different from zero. import random Sort1 = int(60 * random.random()) Sort2 = int(60 * random.random()) Sort3 = int(60 * random.random())…
-
11
votes3
answers24684
viewsHow to browse an object in Javascript?
How to navigate the object below with Javascript? var obj = { "column01": "Coluna 01", "column02": "Coluna 02", "column03": "Coluna 03", "column04": "Coluna 04", "column05": "Coluna 05", "column06":…
javascriptasked 8 years, 1 month ago Raphael Ribeiro 953 -
11
votes3
answers347
viewsDifference between validation and mask
I am making form validations. As for validation, everything goes well, but how to format the fields according to the data entered? Example: in a date field, bars are added automatically, in a phone…
-
11
votes1
answer1523
viewsWhat is the purpose of the "use" command and what is its relation to anonymous functions?
I am doing some tests with a Restful API that I am creating using the Slim micro-framework, and in one of these routines that is responsible for executing a certain action caught my attention a…
-
11
votes1
answer125
viewsApplication C# Windows Forms Slow on certain machines
Good afternoon, I performed the migration of an application that ran in a windows ce to desktop, the Application uses Sql Server Compact 4.0. and runs very well in the development environment, I…
-
11
votes3
answers935
viewsWhy does Javascript allow using variables without declaring?
I was doing a test on Jsfiddle, with the code below. In it I did not declare the variable i, but still, I can use it normally. Is that intentional or is it a flaw? So, I can just go out using…
-
11
votes2
answers502
viewsWhat is the difference between "String(1)" and "new String(1)" in Javascript?
Why in Javascript it is possible to call String as a function and also instantiating? Take the example: var str1 = new String(1) var str2 = String(1) console.log("Valor é %s e o tipo é %s", str1,…
-
11
votes1
answer8640
viewsLimit and Offset for Web Paging in SQL Server
I am working with PHP and have about 8000 records currently on DB. As it is for a web page, I need to make a pagination to be able to read the data. From what I understand, I have to do something…
-
11
votes2
answers4778
viewsHow to load default image if src="" does not find?
Is there any way to upload a standard image, using only HTML, case the first src="" can’t find the file? <img src="ola_mundo.png" alt="Olá Mundo"> // Existe algum atributo para isso?…
-
11
votes1
answer2240
viewsWhat is the purpose of the "assert()" function and when should we use it?
According to the PHP manual assert - Check whether a statement is FALSE Or assert() checks the informed assertion and takes appropriate action if its result is FALSE. And there’s this example of…
-
11
votes2
answers536
viewsExternal and internal memory sorting algorithms
I was researching the difference between memory sorting algorithms external and internal and found the following answer in Quora : "In cases where we have to classify more data than can fit into…
-
11
votes1
answer1208
viewsWhy String objects are immutable?
Up to the latest stable version, Java 8, type objects String are immutable. That is, any change in a String causes the creation of a new object String. This is not harmful from a performance point…
-
11
votes2
answers359
views -
11
votes1
answer165
viewsLike, when and why use "Securestring" in C#?
I once heard about the class SecureString from C# and it seemed interesting to me, so I think it’s interesting content that can yield good answers from more experienced professionals. Some questions…
-
11
votes1
answer3066
viewsIs Ionic development for Ios in a windows or linux environment possible?
I was wondering if there is any way to create iOS applications when our operating system is windows or linux. According to this Cordova, we would have to have an iOS operating system. Is there any…
-
11
votes2
answers325
viewsAre DDD and Entity Framework mutually exclusive?
I was exchanging comments with two users here at SOPT about DDD and Entity Framework. I said that DDD and Entity Framework are not mutually exclusive. Or are they? References: What is really the…
-
11
votes2
answers283
viewsWhat is the difference between using a comparison with >= or simply >?
Imagine the following scenario. int i = 2; if(i >= 2) { //.... } When we could just summarize to; int i = 2; if(i > 1) { //.... } My doubts with these two expressions are as follows:: When a…
-
11
votes3
answers981
viewsWhat do the two dots in a row (.) mean in a file path?
I still don’t understand what this means. Why should I put these two points? Example: ..\Images/Logo.png
-
11
votes2
answers8954
viewsCalculate distance between two points by latitude and longitude
I need to calculate the distance in kilometer(Km) between two points through their latitude and longitude. I have not found an effective way to do. The latitudes and longitudes I have are formatted…
-
11
votes2
answers8134
viewsWhat is the right approach to get the click/position in Recyclerview?
What is the right approach to click on Recyclerview? 1 - Inside onBindViewHolder use position, even if within setOnClickListener methods, which turns the position variable into FINAL; 2 - Inside…
-
11
votes2
answers10914
viewsData type for latitude and longitude
I am working on a new project where I will need to save the coordinates (latitude and longitude) of an address in the database. There is an ideal data type for this? I searched and saw some decimal…
-
11
votes2
answers309
viewsWhat’s the difference between Savechanges and Submitchanges?
Within the context Entity Framework what is the difference between SaveChanges and SubmitChanges? When I should wear one or the other?
-
11
votes3
answers2766
viewsCount or Count()
Having a list, what better way to know the number of items on this list and what the difference? if (minhaLista.Count > 0) ; or if (minhaLista.Count() > 0) ;…
-
11
votes2
answers5134
viewsWhat makes Join() so superior compared to other concatenation techniques?
It is common to read that the method of concatenation join() is a lot superior what other techniques in Python (such as + or +=). Starting from this point, I ask some questions: What does the join()…
-
11
votes2
answers12313
viewsHow to convert binary to decimal?
I had to make a huge equation to convert a binary number to decimal. What is the best way to make such a conversion? For example 0011 1011 0101 = 949 At the suggestion of Jorge B., I am putting my…
-
11
votes3
answers1181
viewsHow to create a filter from the words/phrases of interest to filter a particular wave from a "List"?
In my example I have two classes that are SetorInteresse and Vaga, below follows the structure of the two: Setorinteresse class: public class SetorInteresse { private List<String> setores;…
-
11
votes2
answers3452
viewsInstantiating interface - What’s the point?
I learned in college and in all the materials I saw that the interface serves to define a pattern that classes should follow and interfaces CANNOT be instantiated. However I came across projects…
-
11
votes2
answers2875
viewsWhen should I use disabled, read-only or hidden fields?
If I have a form where some fields are fixed, what is the best way to present these fields to the user, from the UX point of view? A common field, disabled: <label>Foo: <select name="foo"…
-
11
votes7
answers52205
viewsIs there a way to print everything without breaking the line?
I have this code: print "t" print "e" print "s" print "t" print "e" He’s got a way out: t e s t e What I find very boring these "\n". There is a way to print everything without line break?…
-
11
votes1
answer1156
viewsDifference between Pipes, Fork and Threads
From of that question, I was curious to learn more about the subject, so researching further, I came across more doubt on the subject. Because I saw that there is a string of ways to use Threads. We…
-
11
votes1
answer15048
viewsUnderstanding the concept of Threads in practice (in Python)
from threading import Thread import time def carrinho(velocidade,nome): distancia = 0 while distancia <= 1000: print("Carrinho :",nome,distancia) distancia += velocidade time.sleep(0.3) carrinho1…