Most voted questions
150,413 questions
Sort by count of
-
14
votes1
answer2918
viewsHow to translate Android app?
I created the values-es folder, with the strings.xml file with items in the array string. However when I put the translation into Spanish on my cell phone, I open the application and nothing…
-
14
votes1
answer137
viewsRFC6530 - Check if variable contains a well formatted PHP email address
Approval adopted by the Gmail as published in Official Gmail Blog, and as defined in RFC 6530: Assuming a function valida_email() that would return boolean: echo valida_email("té[email protected]"); //…
-
14
votes5
answers2700
viewsDrawing strings from a weight array
My question is the following, I have an array with all the cities of the country,+- 5000 cities, I have a function that draws one of these cities and prints the result on the screen. I wish that the…
-
14
votes2
answers3112
viewsWhat would Win32 be?
In many places on the internet, I see the expression Win32 but never an explanation about. Applications Win32, etc. I’ve always associated with 32 bits, but I don’t think it has to do. A Windows…
-
14
votes1
answer328
viewsHow does the Javascript garbage collector work?
Simple variables Correct me if I’m wrong, but in Java the garbage collector eliminates objects that are no longer referenced: Cliente cliente = new Cliente(); cliente = null; // o coletor de lixo…
-
14
votes3
answers1073
viewsIs controller returning HTML to View wrong?
I used this solution because when trying to render a Table in a view with many records the user’s browser gave Crash, I know it is a solution not much elegant but it was the only solution that came…
-
14
votes2
answers3795
views -
14
votes1
answer287
viewsWhat is the technology behind virtual machines?
Besides Java and the environment .NET various other environments such as Python, Ruby, Moon, etc interpret bytecodes. In the first versions Java left to be desired in terms of performance, but the…
-
14
votes3
answers21251
viewsWhat is a virtual class, attributes and methods?
What is a class, attribute and virtual method? public virtual class nomeclasse { public virtual int id { get;set; } public virtual void metodo() { } } What difference? When to use?…
-
14
votes1
answer975
viewsAbout (Function(){ ... }()) and callThis()
Coffeescript compiles your files into one: (function(){ // código aqui }()).callThis(); Jsfiddle: http://jsfiddle.net/ZHrPp/ Sometimes we find on the Internet a variation: (function(){ // código…
-
14
votes1
answer441
viewsWhat is the purpose of Array and String Dereferencing implemented in PHP 5.5?
In the PHP manual, we can see New Features the functionality of Array and String literal Dereferencing. Example: echo 'string'[2]; // r echo ['stack', 'overflow'][1]; //overflow Thinking in case you…
-
14
votes4
answers9242
viewsDatetime field error message
I have a field in my application in mvc Asp.net c# to put start date and end date. [Required(ErrorMessage = "A data de início é obrigatória")] [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}",…
-
14
votes2
answers3311
viewsWhat is the difference between multi-layer and multi-tier applications?
What is the difference between multi-layer and multi-tier applications? One depends on the other?
software-architectureasked 10 years, 7 months ago Laerte 22,243 -
14
votes1
answer1965
viewsHow does the HTML5 <template> element work?
Recently I saw some news about a new HTML element called <template> specified by W3C and which has already been implemented in most modern browsers. Apparently it allows the creation of custom…
-
14
votes3
answers27590
viewsHow to encrypt and decrypt MD5 data using C#?
How to do MD5 encryption with C# of a text or file? And once it’s encrypted, how to decrypt?
-
14
votes1
answer542
viewsIs Android an OS or a stack software?
The definitions given by Google for Android "Android is an open-source software stack for a wide range of mobile Devices and a corresponding open-source project led by Google." and by American…
androidasked 10 years, 8 months ago Geison Santos 4,428 -
14
votes2
answers4380
viewsLinux C programming - IDE vs. editor + command line
I’ve been looking for a similar question here and I haven’t found anything so if you’ve already answered I’m sorry. I’m a beginner in C programming and would like to know if it is more appropriate…
-
14
votes4
answers1643
viewsIs it really necessary to define constraints in the database?
Ruby on Rails seems to have been thought of considering that it is not necessary to define constraints (as Foreign Keys) in the database, just define them via application. Usually the only…
-
14
votes2
answers3471
viewsSearch with LIKE or MATCH.. AGAINST in two columns
I have a classified system where I do a search with PHP and Mysql using LIKE in two camps: campo1 like '' or campo2 like '' The problem is when I’m looking for something like, "Green car" it doesn’t…
-
14
votes2
answers2787
viewsWhat is syntax sugar and how does it work?
I have seen in some blogs the use of that term and would like to know: 1) The real meaning of this expression and; 2) How a syntax sugar as the example below in the language java? for (Foo foo :…
-
14
votes2
answers2365
viewsSimulate javascript keystroke events
I’m looking for a way to simulate keypress of shift + 1 via javascript to create an exclamation mark ! for a series of tests (specs) in a framework in which I am involved. I have used a framework…
-
14
votes2
answers177
viewsShould I take any action regarding Heartbleed?
As a developer, I have to take some action regarding the Heartbleed? Being a problem in Openssl, I believe it is more within the scope of webmasters, server administrators, etc. But I’m not sure if…
-
14
votes3
answers333
viewsIs there any advantage in bringing together all the icons of a website in a single image?
I see on most large websites that the icons used are grouped in only one image, which leads to the download of only one file by the user. Is there some benefit in speed gains or is it just a matter…
-
14
votes3
answers337
viewsDoubt about the responsibility of a get()
It is acceptable to have a method getter that you receive a parameter to be able to have a return variation? Example: getAllNome("M"); <- retorna tudo que for masculino. getAllNome("F"); <-…
-
14
votes2
answers23232
views -
14
votes1
answer60239
viewsScript that sends Whatsapp message?
There is the possibility to send a message Whatsapp through a Script PHP? (Like a text or an e-mail) I found a class, but it’s old and no longer works (the servers changed, with the sale of Whatsapp…
-
14
votes2
answers3560
viewsHow to calculate the freight of various products
I am developing a virtual store and I need to implement the freight calculation for the purchase, I managed to make this implementation but the problem is that with a single product in the cart I…
-
14
votes5
answers141242
viewsHow to get the current date and time without using the computer clock?
I’m having trouble in the date, he takes my clock from my computer and I wanted him to actually pick the right time. The result of the following code is that the date will take from your host…
-
14
votes4
answers1700
viewsUnderstanding Node and Applications in Real-Time
Since I met the Cakephp I got used to programming with him, because I had a small learning curve and very fast development. For my recent application, I needed the data entered by users to be…
-
14
votes6
answers11304
viewsHow to get distance given the coordinates using SQL?
I’m doing a function in php, in which, given a GPS coordinate, it will search in the database the recorded locations, which are not necessarily fixed, within a certain distance. My question is, how…
-
14
votes4
answers10727
viewsWhat is the Mysql CREATE VIEW command for?
I wonder what the command is for CREATE VIEW mysql?
mysqlasked 10 years, 10 months ago Leandro Costa 2,172 -
14
votes1
answer23562
viewsShow GIF while page loads
I need a GIF to stay working while the page loads. I’ve tried a few ways but none worked. And when the page loads, the Completed!. More or less as it happens on this website.…
-
14
votes6
answers14419
viewsWhich database should I use in a small desktop application?
I read a bit about the Meta and I thought that this question does not escape much from the current rules of the site. Risking losing reputation, come on: At the moment I work in a small company that…
-
14
votes5
answers16269
viewsHow to enable a button only when all inputs are completed?
I have a <button> which is rendered as disabled(disabled) when page is initially loaded. I’d like him to stay enabled(authorised) when all data are completed in <input>'s. How could I do…
-
14
votes3
answers24198
viewsWait for Ajax return in synchronous function
I have an operation that I need to perform synchronously, but part of the information I need can only be obtained via Ajax. I tried to synchronise everything with a wait for Ajax to return. The…
-
14
votes3
answers12403
viewsGet MAC Address from application client machine
I would like to know the best way to get the MAC Address from the client of my Asp.Net Web Forms application. As it is a low level information, I believe it is not as simple as it seems.
-
14
votes2
answers817
viewsHow to create an immutable object in Javascript?
I know it is possible to "freeze" a Javascript object through the method Object.freeze: var x = { foo:"bar", complexo:[1,2,3] }; Object.freeze(x); x.foo = "baz"; // Não tem efeito…
-
14
votes4
answers17336
viewsHow do I copy commits from one branch to another?
I’m using the following workflow with git: I set a task I create a branch for her from the master Implement the task I pull on the master I merge my branch into master I push the master However, I…
-
14
votes1
answer13158
viewsDeveloping Android apps using Python
Is it possible to create Android apps with the Python language? If yes, how does it work?
-
14
votes3
answers3827
viewsHow to publish applications done in Node.js
Well, I’m new with Node.js, I was able to build an example application, I learned a lot from Node with Express, but I can’t understand how to publish the application on the linux server. Does anyone…
-
14
votes4
answers6297
viewsForm inserting twice in the bank (F5)
I have a great form that update and insert at various points when submitted. However, if in the time interval of this process the user presses F5, he duplicates the insertion record the number of…
-
14
votes4
answers44310
viewsRemove page element with javascript
I’m making an application and I came up with a question: How do I remove an element from a javascript page without using innerHTML = ''? For example, I want to remove a div (like the example below)…
javascriptasked 10 years, 12 months ago Odair 1,653 -
14
votes2
answers8665
viewsHow to clone an element in Javascript?
Is it possible to obtain an exact clone of a given HTML element? so that the clone contains all properties exactly the same? If there is, I would like to know how to proceed to perform this clone,…
-
14
votes4
answers2252
viewsWhat is the advantage of hiding the class constructor in favor of a static method (no .NET)?
My leader uses this pattern in ALL his classes (I’ll give the examples in C#, but it goes for any . NET language): public class MeuTipo { private MeuTipo() { } // esconder o construtor public static…
-
14
votes3
answers29291
viewsCreating your own header file
Someone could explain to me the utility and how to create the header file in c with an example?
casked 11 years ago Nicolas Bontempo 1,652 -
14
votes8
answers26648
viewsHow to backup Mysql Database Diaries?
Is there any free tool, or even a script (.bat) that I can use to make a backup automatic from my database? I wish that backup was generated by saving a single file .sql.…
-
14
votes3
answers184
viewsDo you have an Eclipse feature that includes "this." before any variable where this is implied?
Every time I see myself putting this. before variables that are class attributes in non-static methods. Eclipse has some option that applies this to all source files?
-
14
votes2
answers341
viewsFirst-class functions: Why should input types be counter-variants?
To demonstrate the problem I will use Scala code (although this is a rule formalized by Luca Cardelli). trait Function1[-A, +R] { def apply(x: A): R } In Scala this means that a function with an…
-
14
votes1
answer1567
viewsUse the same entity in Hibernate to write to two tables
I am using Hibernate to make the persistence in the database, and in a given case, for each update that a certain entity Consultor has, it must update in the main table called TB_Consultorand insert…
-
14
votes2
answers1581
viewsDifference between method ". attr()" and ". date()"
I notice that there is a difference between updating or applying an attribute data using the jQuery method .attr() and the method .data(). The examples below can be seen in this Jsfiddle. Apply…