Most voted questions
150,413 questions
Sort by count of
-
15
votes4
answers28026
viewsAccent in mysql select displaying question sign " "
Today I migrated my site to hostgator and happened this problem, the accents are all with some characters The files are all with correct accent in the database My collation in the database is as:…
-
15
votes2
answers17329
viewsWhat does "!" (exclamation) mean before a code snippet?
There are many basic things I do not know, for example how to read exactly this exclamation the way it is placed in the following section: if…
-
15
votes2
answers3414
viewsWhat are the advantages and disadvantages between action-based and Component-based frameworks?
Regardless of the framework or language(php,java,c#) What are the main advantages and disadvantages between action-based and Component-based frameworks? In which environment does one or the other…
-
15
votes3
answers26168
viewsWhat is meta charset in HTML?
Can someone explain me this HTML5 code? <meta charset="utf-8"> What is this standard used for and why?
-
15
votes1
answer5340
viewsDifference between high-order and first-class functions
In functional language, what is the difference between high-order functions (high-order functions) and first-class functions (first-class functins)? In Javascript, what would be the difference…
-
15
votes5
answers41336
viewsNumber formatting (PHP)
I created a function cotacaoDolar(); who returns at the end: return str_replace(",",".",$texto_dolar); And the result, appears here: echo $i['sellingStatus'][0]['currentPrice'][0]['__value__'] *…
phpasked 10 years, 10 months ago GustavoCave 545 -
15
votes1
answer780
viewsMusical similarity from MPEG-7 descriptor patterns
I am doing research in the area of musical similarity for music recommendation and created a test database with 1,000 songs. I would like to create a playlist with 10 songs similar to a song chosen…
-
15
votes3
answers24782
viewsHow to sort an array by values?
Suppose I have the following data. Data = [3,5,1,7,3,9,10]; If I try to use the Sort method in this array the sort is done as if the data were not numerical. Data.sort() But the data type is…
javascriptasked 10 years, 10 months ago rowang 2,343 -
15
votes1
answer6546
viewsNaming conventions for variables and functions in Python?
In the R, there is a lot of freedom and variety in function names between packages. Dot names (get.this), names in camel (getThis), names in snake_case (get_this). This has its pros and cons. Why,…
python python-2.7 python-3.x nomenclature conventionsasked 10 years, 10 months ago Carlos Cinelli 16,826 -
15
votes4
answers31096
viewsWriting and reading file via Javascript
It is possible (if, how) to do the following method with Javascript? The person type in a form some arguments, by clicking submit it will run a Javascript code, in this code the function will take…
-
15
votes5
answers17754
viewsHow to solve accent problems with ASP.NET MVC?
I’m having problems with accentuation in ASP.NET MVC 5. I am using Visual Studio 2013 Professional and in the application . Net 4.5. SQL Server 2008 and Entity Framework 6. The browser is Google…
c# asp.net-mvc asp.net-mvc-5 entity-framework visual-studio-2013asked 10 years, 11 months ago user3628 -
15
votes3
answers15338
viewsHow to validate CPF with Dataannotation on Client and Server?
I need to validate CPF with Data Annotation, and check for duplicity.
-
15
votes6
answers11947
viewsHow to create a password reset link?
I am developing a site that has user registration area, the password is encrypted to increase security on the site, but when the user forget the password how will it be possible to return his…
-
15
votes6
answers90846
viewsDo I use PHP inside an HTML or an HTML inside a PHP?
I made all my site in HTML and CSS, but now I need to use PHP to send some data to a database. I’m just wondering if I modify all my documents to . php or if I use PHP inside HTML (if possible).…
-
15
votes3
answers973
views -
15
votes6
answers3343
viewsMethods to test websites in different browsers?
I would like to know methods to test sites in different browsers, without creating virtual machines.
-
15
votes4
answers6633
viewsHow to make the browser "Back" button work on an AJAX site?
I researched this topic a year ago when I made a site with features like $.load() and $.ajax() in AJAX/jQuery but did not get anything satisfactory that was not overly complex, and until today the…
-
15
votes3
answers15299
viewsAvoiding "!= null" comparison in Java
I work with Java and for countless times I have to take a test object != null on the object before accessing it to avoid Nullpointerexception However, I think this practice ends up making the code…
-
15
votes3
answers70810
viewsWhat are the appropriate data types for columns like address, email, phone and mobile phone for SQL database?
What kind of data are recommended to create the following fields: address, email, mobile number/phone?
-
15
votes2
answers2432
viewsHow to create a Date list with a specific day
I am working on ASP with MVC 4, and I hold create a list of dates from the data entered by the user. For example, the user inserts the day of the month in which a certain occurrence will be made. It…
-
15
votes4
answers1141
viewsHow to simulate "tail recursion" in C#?
No. Net, I know it is possible to make cause calls because the compiler of F#, when optimizing code, transforms a function with tail recursion into a function with a loop, thus avoiding stack…
-
15
votes5
answers29661
viewsHow do I know if a column exists in an SQL Server table?
I am trying to add a new column to an SQL Server table, and I want to know if it already exists or not. I have tried something like this: IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE…
-
15
votes3
answers8488
viewsWhat happens in a conversion from a char to an int?
How it works when you take a variable and do char-48 To transform in integer, as for example in this code I made, I used a date for example "22/05/1994" stored in a char vector and transformed in…
-
15
votes4
answers3950
viewsWhen to use ternary condition?
I particularly like the use of ternary condition, but I see many developers saying no, there is even a rule in Checkstyle when validating your code that encourages you not to use. See the example…
-
15
votes4
answers309
viewsHow to deal with a comet process?
Analyzing the linux API I noticed that an interesting structure is possible: #include <unistd.h> #include <stdlib.h> int main() { while (1) { if (fork()) exit(0); // Altera meu pid…
-
15
votes4
answers1418
viewsHow do I programmatically respond to a command on the Linux terminal?
I have a Python script that runs a certain command on the system. This command expects a password to be typed right away, the only way it works is this, it is not possible to pass the password via…
-
15
votes1
answer1873
viewsMobile App Multiplatform with Xamarin
Setting This question is more about architecture. I recently started learning Xamarin to develop Mobile Apps, Xamarin, which until then has been very flexible, has bindings for native Android and…
-
15
votes4
answers3728
viewsJava client library for REST web services
I am in a project in which it is necessary to access a web service REST and I would like to know which is the most used Java library to access this type of resource in an easy way. I know it is even…
-
15
votes1
answer205
viewsWaiting for a signal within a Qquickimageprovider
I’m creating an application using QML and the Qt 5.2. In her a ListView displays multiple items, each with an image and associated text. The image is built based on data uploaded from a server by…
-
15
votes2
answers1106
viewsUsing Laravel 4 with Microsoft SQL Server 2008
I need to connect a database SQL Server 2008 in Laravel 4. I have been researching and I did not find solution for the scenario in which I am. I’m using Laravel using the XAMPP (PHP 5.5.6…
-
15
votes2
answers1705
viewsHide widget if empty
I have a div which is used to display alerts to the user: <div id="page-alerts" style="margin:25px 0;"></div> Problem Example in Jsfiddle For reasons of formatting, it contains margins…
-
15
votes3
answers7499
viewsHow to fill in a numerical field as in internet banking (right to left)?
At Atms and internet banking sites there are numerical fields that when you type they are filled from right to left, increasing the number as you type, for example: +-----+--------------+…
-
15
votes3
answers1353
viewsArchitecture for a JSF Application with Android APP
I am in the planning part of a web application that I will develop for a Client. It will be Cruds and some report, nothing too complicated. At the moment I’m designing an architecture so that this…
-
15
votes3
answers1932
viewsIs there a more efficient way to create an array from another array dynamically, filtering the contents of the first one?
I have an array of values that can include several numpy.Nan: import numpy as np a = np.array ( [1, 2, np.nan, 4] ) And I want to iterate over your items to create a new array without np.Nan. The…
-
15
votes4
answers805
viewsHow to use Simpledateformat in concurrent environments?
The class SimpleDateFormat is not thread safe. I recently had problems with class instances SimpleDateFormat in static context being used by multiple threads concurrently in a web application.…
-
15
votes3
answers2138
viewsHow to perform unit tests on nodejs
I’d like to run unit tests on Node.js, I’m using the grunt-jasmine, but it does not recognize the variable exports, module and neither required. Is there a way to solve this or does someone suggest…
-
14
votes1
answer313
viewsWhat are the precautions to be taken when using top-level await in Javascript?
To proposal for the top-level await has just been completed, which means that this feature will soon be part of the language. As far as I know, this feature will only be available when executed in…
-
14
votes4
answers486
viewsHow would an algorithm work to prevent attempts to trick word blocks (strings)?
Let’s say I develop an application that allows the creation of arbitrary records (no matter the subject). However, for some reason, I have decided to block the use of the word batata in the title of…
-
14
votes1
answer1711
viewsIs there a pointer in Javascript?
I was programming and I found something interesting but I was left with doubt in a situation. I created an object and referenced it so: a = {a:1,b:2} And then I created another object and assigned…
-
14
votes1
answer335
viewsWhy don’t we have a 128-bit Integer?
We have 16, 32 and 64 bit integer values. short, int and long, respectively. But why don’t we have 128 integers? Or 256 integers? I ask this in case we need to keep an extremely large number that…
-
14
votes2
answers9291
viewsWhat is Overfitting and Underfitting in Machine Learning
What is Overfitting and Underfitting in Machine Learning? I am studying a little on the subject and I was curious where this applies.
machine-learningasked 5 years, 9 months ago Jeff Costa 152 -
14
votes2
answers355
viewsWhat are the main differences and advantages of using Shadow DOM and Virtual DOM?
Analyzing carefully for a better performance of an application, what are the main benefits in using one or the other and their differences? Angular for example works with the Shadow DOM approach,…
-
14
votes1
answer368
viewsWhat is abstraction and how does it influence the creation of functions?
I was reading a answer about Python user’s @Cool in which he mentions the term abstraction in relation to complexity, functions and object orientation, see: What you can do if you can’t change the…
-
14
votes1
answer356
viewsWhat would be a good hash calculation algorithm to use in a scattering table?
In the question Why String hashcode() in Java uses 31 as multiplier? There is talk of the use of the number 31 as a multiplier. There has been a controversy about the motivation of this number. In…
-
14
votes2
answers128
viewsWhat are they and when to use Anonymous Unions?
During the data structure book reading, it was briefly presented the concept of anonymous unions, which would be the definition of a union without specifying a label (name). However, I did not…
-
14
votes1
answer261
viewsWhat is the usefulness of lexical and dynamic scopes in R?
In the chapter 6 of the book Advanced R there are definitions of lexical and dynamic scopes. However, I did not understand the usefulness of knowing these concepts in r. Thus, the usefulness of the…
-
14
votes2
answers1129
viewsWhat is the purpose and how to use the "display: Contents" of the CSS?
I recently saw that there is a new kind of display in the CSS the display: contents, but I didn’t quite understand the intention of using it? https://developer.mozilla.org/en-US/docs/Web/CSS/display…
-
14
votes3
answers2334
viewsWhat are the differences between "soft, Mixed, hard" in git reset?
I would like to understand better what each type of reset in the git makes with the file(s) (s): Types: $ git reset --soft [commithash] $ git reset --mixed [commithash] $ git reset --hard…
-
14
votes0
answers398
viewsHow to make ajax calls through reverse proxy in elegant way?
I have a project that validates, in Javascript, the structure of a JSON. Here is more or less the structure I had used to rescue the structure asynchronously, as well as what would be the static…
-
14
votes2
answers2682
viewsIs it possible to declare Unknowns in Python to calculate constants of a Mathematical function?
I need to assemble a quadratic function Y = Ax² + bx + c from values of X and Y acquaintances. In this case, I’m trying to H(Q) = aq² + Bq + c (Gauge height as a function of flow rate). Where: H1 =…