Most voted questions
150,413 questions
Sort by count of
-
19
votes2
answers234
viewsHow to reference the current board
As an example, using the variable SCRIPT_FILENAME we can get the requested file, but for this problem we want to get the directory where the file is .htaccess: # Rewrite the url <IfModule…
-
19
votes3
answers1320
viewsWhat are braces {} in an SQL string for?
What are braces for {} in the following SQL string used in PHP for Mysql? $sql = "INSERT INTO {$table} ({$fields}) VALUES ({$placeholders})"
-
19
votes2
answers526
viewsWhat is two-factor authentication?
What is two-factor authentication? Or multiple-factor authentication? This expression usually comes from "associated" to large companies - such as Google, Facebook, etc - that have a login and…
-
19
votes1
answer6255
viewsAsp.Net Identity, how to use only Roles or Claims?
Returning to the same subject: ASP.NET Identity with Entityframework. Regardless of the size or planning of my project, if I need to use only the part of Roles or only the part of Claims, Is that…
-
19
votes1
answer783
viewsAlgorithm for name generation
I did a lot of research, but I couldn’t find an algorithm that would do something like banks do. For example, when you first register in a 24-hour box, the machine will generate a password. In…
algorithmasked 10 years, 4 months ago Marcony Felipe 879 -
19
votes5
answers440
viewsWhat would an Agile Development Process look like?
In the company I work, we have not adopted a final methodology to use, and we are thinking of adopting agile development in the next projects. What would an agile process look like? I need to create…
-
19
votes3
answers1755
viewsHow does the Flux architecture work?
Reactjs brought with it a new architecture, also used for Facebook and Yahoo! I wonder how it works, what exactly is a Dispatcher, Store, Action... If possible, on the basis of the MVC.…
-
19
votes6
answers2856
viewsCan not use "{ }" IF keys in PHP cause problems?
Usually for checks that modify only one line I have avoided the use of keys, because PHP accepts this method, but I rarely see codes from other programmers like this... Examples My method…
-
19
votes4
answers955
viewsHow does Current function work?
For some time I always use the function current() in PHP, to get the first element of array (which is actually not its functionality, as it returns the current pointer on which the array is) and…
-
19
votes3
answers2053
viewsWhy do 64-bit versions of programs have better performance, stability and security?
Recently, Google announced that the Dev version of Chrome is also available in 64-bit. It will probably be available also for stable versions in the future. What struck me is that Google said the…
-
19
votes4
answers9578
viewsWhat is the modern alternative to framesets?
I know that the frame that used to load some pages in a single one is no longer used, in the internet there is a vast content saying that this is obsolete. But what would be the ideal alternative to…
-
19
votes2
answers3841
viewsBest practices for sending emails and avoiding spam
Nowadays, almost every web site or web system almost inevitably needs functionalities with sending emails, whether in contact forms, password recovery, account activation, order confirmation, etc.…
-
19
votes3
answers32219
viewsFetch last 7 days data from current date
I’m making a BD query, and I want to receive results from the last 7 days from the current date. For that, I have a field data of type DATA (yyyy-mm-dd) in table. I am doing the query in php, in…
-
19
votes2
answers3085
viewsHow to do a spell check in C#?
I need to do an analysis of the words contained in a database. The analysis consists of promoting a spell check only, showing a report on the screen (gridview) with incorrect words. I never…
-
19
votes1
answer3428
viewsCommunication between Android and USB devices
I’m developing an application for Android that communicates with a USB device, a printer, an Arduino or another Android device. Is it possible to read and write on the Android USB port? How should I…
-
19
votes2
answers1202
viewsWhat is the name of this 'effect' of selecting objects and how to do it in pure JS?
I wanted to know what is the name of this 'effect' ('-') that serves to select folders and files in Windows Explorer. And if possible wanted to know how to do this with pure Javascript.…
javascriptasked 10 years, 11 months ago Iago Bruno 1,693 -
19
votes2
answers6496
viewsWhat is the difference between recursion and tail recursion?
In functional programming languages, it is said that it is possible to avoid stack bursts using "tail recursion". But what is the difference between normal recursion and tail recursion?
-
19
votes4
answers35413
viewsHow to check events between 2 dates in Mysql?
Knowing I have a table called eventos, and this table has the columns id, titulo, inicio and fim. The columns inicio and fim are of the type timestamp, where the date and time of the start and end…
-
19
votes3
answers12047
viewsWhy doesn’t C# allow multiple inheritances?
In C# we can implement several interfaces. However, because we cannot inherit from more than one base class?
-
19
votes3
answers9326
viewsIs it possible to use Sqlite as client-server?
There is any technique or tool to use Sqlite using an architecture Client-Server instead of local access? Of course you would need a client library to communicate with the server. And a server…
-
19
votes1
answer409
viewsWhy doesn’t Google Chrome allow you to copy a reference to the console.log function?
I have a method that receives a reference to a function and uses that reference to display a data (code below). The problem is that when I use the function console.log by Google Chrome, there is an…
-
19
votes2
answers5784
viewsHow to validate a Brazilian civil name?
How to validate people’s names, in Brazilian Portuguese?
validationasked 11 years ago talles 11,434 -
19
votes7
answers25439
viewsHow to convert a JSON response to a C#object?
I’m making a request and getting a JSON like this: { "id": "1000000000000000", "name": "BrunoLM", "first_name": "Bruno", "last_name": "X", "link": "http://stackoverflow.com/users/340760/brunolm",…
-
19
votes1
answer11373
viewsHow to use a specific index in a SQL Server query?
I have a non-standard table in SQL Server installed on my PC which is fed monthly by Integration Services (SSIS) from a report in an Excel spreadsheet. I mean, I’m keeping track of a certain report.…
-
19
votes4
answers1648
viewsHow to create a user interface with the same style that was used in Visual Studio, Office 2013, Github for Windows, etc?
I would like to know how to create UI as used by Visual Studio, Office 2013, Github for Windows, etc. I searched the internet and found a theme for WPF called Cosmopolitan Theme, but noting some…
visual-studio-2012 visual-studio-2013 wpf themes office-2013asked 11 years, 1 month ago Zignd 6,741 -
19
votes3
answers2369
viewsDefinition of the day of the week in the Gregoriancalendar
I have the following code which is responsible for creating a Gregoriancalendar for handling a date. TimeZone tz = TimeZone.getTimeZone("America/Sao_Paulo"); TimeZone.setDefault(tz); Calendar…
-
19
votes2
answers1037
viewsHow to use Qt translations directly with Qapplication::tr()
In an application developed in Qt I have a non-visual class (i.e., that is not inherited from a QWidget) but that handles text strings that must be presented to the user. To use the Qt translation…
-
18
votes1
answer201
viewsWhat does _ in C#mean?
I was servicing a system until I came across the following code: object auth; var authContext = HttpContext.Items.TryGetValue("SystemQueryContext", out auth); var result = await…
-
18
votes1
answer155
viewsWhat justified adding the syntax for positional-only parameters to Python version 3.8?
As stated in What’s New In Python 3.8 to PEP 570, that defines the syntax for only positional parameters, has been implemented. According to PEP 570 it will be possible to use the bar in defining…
-
18
votes3
answers4338
viewsWhat is the "line break" in a Regex?
The language I use is R. And, as the theory of Regular Expressions suggests, each language deals differently with line breaks (\n). Consider the following string: text_1 <- c('Olá, meu nome é…
-
18
votes2
answers1713
viewsWhat is a scalable code?
Scalability is linked to growth, in the context of code, I have some pertinent doubts. What is a scalable code? The scalability of code involves more than one aspect or only performance or design? A…
terminology software-engineering encoding-style scalabilityasked 5 years, 11 months ago renanvm 3,797 -
18
votes5
answers1237
viewsWhat is the difference between substr and substring?
I want to know the difference between alert("abc".substr(0,2)); and alert("abc".substring(0,2)); Both appear to produce "ab".
-
18
votes1
answer3663
viewsWhy does a return with status code 200 return before a 204?
I have noticed that every answer from Success (200) there is also an answer No Content (204). I was curious and went to search in MDN on status 200, the only thing that says that the success results…
http-statusasked 6 years, 3 months ago Marconi 17,287 -
18
votes1
answer281
viewsWhat is Python Assignment Expressions 3.8?
As assignment Expressions are defined in the PEP 572 which has been approved to be implemented in version 3.8 of Python. But what are the assignment Expressions and when they should be used? What…
-
18
votes2
answers4543
viewsWhat is an upsert?
I saw the term UPSERT in a blog and would like to better understand the functioning. It designates what type of operation? In which situations can be used? Has to do with idempotency?…
-
18
votes2
answers2025
viewsWhat is the maximum and minimum value for z-index?
I was arguing with some friends about putting 99999 in the z-index to ensure that the element has the highest priority of overlapping over another element. But when I thought about it, I got a…
cssasked 6 years, 7 months ago Wallace Maxters 102,340 -
18
votes1
answer285
viewsWebservice Registering dll
I have the following code: CoInitialize(nil); try DM_Principal.pLarWS := CreateComObject(LarWS_TLB.CLASS_WS) as IWS; except WinExec( 'regasm LarWS.dll /tlb:LarWS.tlb',SW_HIDE); Screen.Cursor :=…
-
18
votes1
answer256
viewsWhat is the difference between M.dot, responsive layout and adaptive layout?
Always when we search for responsive web development we find various ways to do the same thing. Accessing the site of the same Sopt, we can see that it has a different layout for mobile devices and…
responsive-layoutasked 6 years, 10 months ago Randrade 21,612 -
18
votes2
answers1231
viewsCan the operators ==, ==, != and !== be considered as "fuzzy logic"?
Doubt is simple and just out of curiosity, from a mathematical point of view, we have something like ratio comparators (or Fuzzy logic): Example: Depiction described: x pode ser de 1 até 100 igual a…
operatorsasked 6 years, 11 months ago AnthraxisBR 4,361 -
18
votes1
answer380
viewsTraits and mixins, what are they? When should I use them? Are there similar mechanisms in other languages?
I was curiously researching about trait here at Sopt and I realized that she is almost always associated with php. But unfortunately the research did not yield me a definitive answer to the concept…
-
18
votes2
answers837
viewsWhat is the equivalent of the equalsIgnoreCase() in Kotlin?
What is the equivalent of the method String.equalsIgnoreCase() of Java in Kotlin?
-
18
votes2
answers7922
viewsWhat is and what is the utility of the DUAL table for Oracle?
I came across this scenario during the modification of a report in the system: One of querys is returning to this such table DUAL: select * from dual But in the system there is no DUAL table, and…
-
18
votes4
answers3943
viewsCalculate mail freight for various products
I am trying to make the freight calculation of various products using the Webservice of the post office, but I am having doubts/difficulty to perform the calculation when I have several products. I…
-
18
votes1
answer8163
viewsWhat is a graph-based database?
I did not find on this site the answer to this question. So my question is basically this: What is a graph-based database?
-
18
votes2
answers445
viewsIs it wrong for me to use a static method to retouch a collection of objects?
First of all, I know that I should not go out making classes with various static methods but in this case that I bring here, I do not understand why it can be considered bad practice. Let’s say I…
-
18
votes3
answers314
viewsWhat is "Idempotency Messages", "idempotentive", "idempotency"?
I have a question on the subject here, and a article on the subject even in Wikipedia, but I still don’t understand the subject, so the questions are, What is Idempotency Messages? How and where it…
-
18
votes1
answer489
viewsWhy does the compiler require local variables to be initialized and fields not?
The question Why a variable with default value is usually declared? addresses the question of whether or not to initialize a variable before using it. However this option becomes mandatory when it…
-
18
votes8
answers2184
viewsHow to know all possible combinations of 0 and 1 in Java?
What possible combinations can I get only with numbers 0 and 1 using 5 digits (digits)? For example: 00000 00001 00011 ... 11111. I wanted to keep all the combinations, but I don’t know how to find…
-
18
votes3
answers1013
viewsWhat is blockchain and how does it work?
What is blockchain and how it works? In which contexts, outside cryptocurrencies, it can be implemented and why would it be feasible to implement it in these contexts?
-
18
votes3
answers1673
viewsWhen should I use the </img> tag or the background CSS property?
When should I use a tag </img> HTML to display an image? And background-image CSS? Factors such as accessibility and browser support can influence choice?…