Most voted questions
150,413 questions
Sort by count of
-
10
votes6
answers896
viewsRewrite and close array of a file
How do I open a configuration file, rewrite the value of an array, and close and save the file? Example: config.php return Array { 'DB_TYPE' => 'mysql', 'DB_USER' => 'root' } config.php (After…
phpasked 9 years, 5 months ago user28062 -
10
votes5
answers860
viewsWhy is a variable with no value considered uninitiated?
I realized that PHP returns that a variable has not been started if it has no value assigned to it. In my opinion, it makes no sense because the variable has already been started and awaits a value.…
-
10
votes3
answers694
viewsWhat best practices when implementing requests?
When implementing calls to a webservice I have been working with the following scheme: I implement a class that extends AsynkTask and within the method doInBackground() make the call to my service.…
-
10
votes3
answers15565
viewsWhich regular expression can I use to remove double spaces in Javascript or PHP?
What regular expression can I use to remove excess white space? I mean, leave them with the amount of normalized spaces. Example Of: $string = 'Estou no Stack Overflow em Português '; To: $string =…
-
10
votes3
answers420
viewsjava.util.Map, best implementation considering just get(Object key)
I would like to know which class to implement java.util.Map contains the get(Object key) faster. The intention is to make a mini data cache, the volume of information will be approximately 2 to 10…
javaasked 9 years, 5 months ago David Schrammel 2,310 -
10
votes1
answer12629
viewsWhy should we use "IS NOT NULL" instead of "<> NULL"?
I’ve always wondered why we should use IS NOT NULL instead of <> NULL? For when I do as in the second case, no result is found. Example: SELECT * FROM tabela WHERE campo IS NOT NULL Displays…
-
10
votes3
answers11643
viewsHow to convert code block into single line?
I need to convert certain blocks of code into a single line. How can I do that? I’m using Notepad++
-
10
votes5
answers11633
viewsHow to do a LIKE ignoring accentuation?
I need to make queries in a database of registered users. However, I need this survey to be done by the name of the user, through the LIKE, and this should ignore the encoding UTF-8 present in the…
-
10
votes2
answers2727
views -
10
votes2
answers1835
viewsWhat is the difference between 'string' and r'string in Python?
I was taking a look at Django’s code, framework in Python, and I came across the following code in the file urls.py. urlpatterns = [ url(r'^articles/2003/$', views.special_case_2003),…
-
10
votes2
answers11475
viewsWhat is the git diff command for?
I asked that question a little while ago here at SOPT. Some doubts arose, and then the user @Anthonyaccioly recommended me to ask this question. What is the command for git diff?…
gitasked 9 years, 5 months ago Wallace Maxters 102,340 -
10
votes1
answer882
viewscomparison of floats
This program allows you to check which of the three floats is the largest, only it is ignoring the decimal places. For example if I put the values 1.4, 1.6 and 1.5, the program tells me that the…
casked 9 years, 5 months ago kingwarrior05 617 -
10
votes2
answers16161
viewsWhat types of data exist in Mysql for text?
What kind of data exists in Mysql? What’s best for storing long texts? (HTML-shaped document for example) Why?
-
10
votes2
answers1042
viewsHow to make the use instructions screen when starting an app
When we download an app, it often presents a screen (or several) of instructions to use the app itself?! I would like to know how to do that. If you can’t put some code address or tutorial, at least…
androidasked 9 years, 6 months ago Tairone Dias 318 -
10
votes3
answers129
viewsHow to create mandatory exceptions in C#?
Is there any way to make a method make an exception that must be dealt with when the method is invoked? I used the throw new Exception("mensagem de erro") but the treatment is still optional when…
-
10
votes6
answers4502
viewsHow to use two CSS attributes at the same time?
The code: <!DOCTYPE html> <html> <body> <h1 style="color:#CC0099">Um dia eu aprendo</h1> <p style="color:red">This is a paragraph.</p> </body>…
-
10
votes2
answers470
viewsIs it necessary to bar " " at the beginning of native functions when using namespace?
I noticed that some libraries use in functions native of PHP the \, for example: echo \str_replace('foo', 'test', $string); I’ve been testing within a class just with namespace this: public function…
-
10
votes3
answers7520
viewsWhat is void in javascript?
I could contemplate a javascript code that had the following code: if (context === void 0) { // faça algo } I don’t understand what that chunk of code means or what it does. The one time I used the…
javascriptasked 9 years, 6 months ago Wallace Maxters 102,340 -
10
votes1
answer2093
viewsOWIN and Oauth What are they and how to use them?
I am seeing Webapi tutorials with authentication/ authorization and I came across these two concepts, although explained in the tutorials the settings are not clear. Even searching the web, the…
-
10
votes3
answers2338
viewsSplash Screen loading with application
My application, when starting, does the first search in the database. How I use the Hibernate, this first connection is a little more time consuming as it assembles the entire bank mapping. I’m…
-
10
votes4
answers25170
viewsFormat a CPF string?
I have a problem, in an app the user type the CPF, but only the numbers because it is very complicated to create mask on Windows Phone, and this CPF will be 'drawn' in a picture of a card, and to…
-
10
votes2
answers1094
viewsWhat does content:" f0ed" mean?
I am developing a site from a ready template, when inspecting element and check which image to swap found the Css as follows. .fa-cloud-download:before { content:"\f0ed" } What does that mean Css?…
-
10
votes5
answers26385
viewsWhat is the best practice to know if an Row exists in a SELECT in Mysql?
For example, when we check if a user is already registered in the table, we do not need any data return by query, just check if the number of Rows is greater than 0 (num_rows > 0). Us scripts and…
-
10
votes3
answers10155
viewsUppercase in the first letter of every word in a column in Mysql
How do I get first letter of all words in a specific column be converted to capital letter using Mysql pure? Example: gustavo silva Guilherme souza joão Silva maria souza To: Gustavo Silva Guilherme…
mysqlasked 9 years, 7 months ago Gustavo Piucco 2,401 -
10
votes3
answers387
viewsHow does semantics/indexing work with Angularjs?
I always wonder, Angularjs is a framework that is being used constantly. But I have a question about how it works for the crawlers (googlebot example). They even run the javascript and interpret the…
-
10
votes1
answer3855
viewsReceiving data via serial connection C#
I need to do a program that has to send a command to a radio connected via serial port and this returns your ID. The connection to the port and the sending of data is ok, when I send something the…
-
10
votes2
answers476
viewsCopyright and crack
Cracking a software is illegal, everyone already knows. But I would like to know the following: Is it illegal to use/distribute/create an old cracked product? One that is not even sold by the…
-
10
votes1
answer398
viewsDoubt about mapping in Entity Framework 6. "readonly" properties
I have three tables in my bank: TB_COLABORADOR TB_JORNADA TB_JORNADA_COLABORADOR To TB_JORNADA_COLABORADOR makes the association of employees with the journey and vice versa through the fields…
-
10
votes2
answers124
viewsMinified pages and processing for each request
If I want to minify an HTML page from PHP I will be more winning or losing? More clearly: I want to keep the formatting and practicality for when editing the page, preserving the edentation. But I…
-
10
votes4
answers844
viewsHow to create properties dynamically in C#?
In Javascript it is easy to create an object with new properties. var obj = { "propriedade1" : "valor", "propriedade2" : "valor" } It is possible to do something similar in C#? var lista = new…
-
10
votes1
answer479
viewsValidate array type attribute in an annotation
When using the annotation Ordem would like to make your attribute valores mandatory. By mandatory I mean that the value of your attribute should not accept an empty array, or an array with an empty…
-
10
votes3
answers1812
viewsQuestions about Latex
My experience of 2 days writing this markup language has given me to understand so far to be certainly very limited in various appendices, although I do not know and know how to expand directly with…
latexasked 9 years, 8 months ago Murilo Man 439 -
10
votes2
answers256
viewsRecursion in CUDA and Opencl
It is possible to work with recursiveness in parallel when working with unique technologies for parelelism (Multithread) using the graphics card as an instrument CUDA and OpenCL? if yes how is done…
-
10
votes1
answer383
viewsValidation configuration in dynamic fields
I have a problem which is this, I have the fields: Name, Age and Text; In a part of the system I register that the Text field will only appear if the Name field is equal to PH and the Age field have…
-
10
votes1
answer2239
viewsIs it worth developing in Javafx for Web, Mobile and Desktop?
I’d like to know how Javafx is going, if it’s already consolidated, if it’s still a gamble.. I really liked the look and the "Write Once, run Verywhere".
-
10
votes1
answer1417
viewsProtect automated access web pages
How can I protect my web pages so that they are not accessed in an automated way? By search bots Engines like Googlebot (I think the basic form was the metatag with noindex and nofollow). By…
-
10
votes2
answers973
viewsEnable Proguard on Android app
I did an example project, using SQLCipher, and I’m trying to obfuscate the code with the Proguard, however, after exporting and signing the application, and converting the.Dex classes with the…
-
10
votes4
answers11586
viewsText that you type little by little?
Guys, I see an effect on the sites. The Text will appear (as if someone were typing it). Automatically I related to Mom, but the effect is not cool. You know how to do?
-
10
votes1
answer164
viewsGood Practices (Refactoring) - Best way to treat one method with for within another
Personal using good Java practice how should I convert this method? I must break into various methods and within each of them do the go? public void salvarObjetos(Objeto objeto){ for(Objeto1 obj :…
-
10
votes1
answer339
viewsjQuery code works on http://jsfiddle.net but does not work on https://jsfiddle.net
I built the jQuery code in jsFiddle.net to test and it worked properly, however when sending the link, provided by jsFiddle, with https, the code stopped working. Can anyone explain why? I’m using…
-
10
votes3
answers32528
viewsSelected date comparison with current JS date
I’ve searched the internet and right here on the site, but could not find any clean way and that works to do this. I need JS to compare the date indicated in the field (which will be in a format…
javascriptasked 9 years, 8 months ago Andrey Hartung 1,763 -
10
votes1
answer3061
viewsWhen to use Interfaces
I always had the following question: When should I really use an interface instead of inheritance and what advantages can I get ?
-
10
votes2
answers14697
viewsWhy does the address of some sites contain number after www?
Why are there urls that contain some number after www? (www1, www3, www12) What does this influence? It is possible to create a link like this? Ex: http://www1.folha.uol.com.br…
-
10
votes2
answers1019
viewsHow to avoid HTML Injection and XSS on . JSP pages?
In the PHP have seen uses of htmlspecialchars and mysqli. But in Java there is some way to avoid XSS and HTML Injection? I would also like to know what would be the best way (the safest): Escaping…
-
10
votes3
answers1471
viewsUse Command Line with C#
In my work I use the command line, and wanted to improve the work in my company. To do this, I thought of creating a program in C# for people who do not know how to work with command line. I thought…
-
10
votes3
answers1001
viewsUse OR operator in a PHP CASE
How to use the operator or in a control structure switch? Example switch ($options) { case 1 || case 2: echo "Valor de opção 1 e 2"; break; case 3: echo "Valor de opção 3"; break; }…
-
10
votes3
answers3406
viewsStoring representative values of a user’s 'sex' in databases
I have some doubts about the representation of some fields in the database. How should I store fields such as "sex" in tables in the database? In the literal form "male" and "female" or through…
-
10
votes4
answers1233
viewsWhat is the difference between OO and DDD?
I read about Domain Driven Design, it seems to use the concepts of object orientation but is based more on business rules. Is there nothing else that actually differentiates OO from DDD? If it is…
-
10
votes2
answers397
viewsIs support for users who do not use Javascript running out?
Yes, obviously it’s important, but I see many sites that simply nay work if Javascript is turned off. It’s more for curiosity, but nowadays it’s almost mandatory to use Javascript on a large site,…
-
10
votes2
answers1689
viewsFind <tr> Element of a certain content
I would like to know how to find a certain element <tr> in a numbered table. For example: In a table where each row <tr> has its cells <td> numbered 1-5, containing 4 lines…