Most voted questions
150,413 questions
Sort by count of
-
8
votes1
answer299
viewsPrepared statements with Mysqli does not require validation of data entry?
I was studying here about security in PHP & Mysqli, and I was left with a question: if I am using prepared statments, still need to validate data entry? For example, I have a field in the form:…
-
8
votes2
answers1697
viewsControl view component visibility in the ASP.NET MVC 5 controller
I am refactoring a project in ASP.NET MVC 5, implementing some good practices and researching, it was mentioned that the use of if na view(Razor) is not the best practice, only that I use it to show…
-
8
votes2
answers678
viewsMixing Javascript libraries in a project
I wonder if it is not good practice to load several different Javascript libraries in one application. For example, the project has an X deadline for delivery, but should be done in Angularjs but…
-
8
votes1
answer438
viewsReturn value processed in Javascript to the Managed bean
Is it possible to return processed value in Javascript to the Managed bean? What’s different in this process is that I run the JS method on the bean, like this:…
-
8
votes2
answers1853
viewsHow to convert an html string to jQuery object?
How to convert a string HTML in a jQuery object? var objeto = '<div id="minhaDiv"><span id="meuSpan">Span</span></div>';
-
8
votes1
answer153
viewsHow do branches in GIT work in relation to SVN?
It is known that in the SVN, when one creates a branch (or even a tag), a copy of all the files of trunk to the folder inside the directory branches. Little by little I’ve been using git and I…
-
8
votes5
answers8758
viewsHow to remove line that has Missing?
I have a database that has some missings (NA’s), but only one variable (one column), and I need to remove the entire row that has Missing.
rasked 9 years, 1 month ago Wagner Jorge 1,377 -
8
votes4
answers3477
viewsPrinciple of Delegation, what is it?
What Means Delegation Principle in Object-Oriented Programming? After some research, I found a definition about this principle: Principle of Delegation: way to make the composition as powerful for…
-
8
votes3
answers3818
viewsUpdate an item from a generic list to a specific item
How do I update a specific element of a generic list by locating by ID and passing an updated object in its place, updating the name and email? class Program { static void Main(string[] args) {…
-
8
votes2
answers233
viewsHow do I display the customer name of a particular sale? I’m not getting the name with get
sales list code I’m having trouble presenting the customer name of each sale and product name of each sale tbm! I don’t know what I’m doing wrong <?php include_once("Sessao.php");…
-
8
votes3
answers178
viewsValidate a Form
How do I display a alert() if the person has not completed a textarea, and a alert() that the comment was saved? Javascript: function saveTextAsFile() { var textToWrite =…
javascriptasked 9 years, 1 month ago Karina 137 -
8
votes3
answers1426
viewsHow to take data from a tag and calculate?
It is possible I get a value within a tag <span></span>? Ex: <span> 5% </span> and calculate a discount at a value? Example: I want to get the value of 5% that is in the tag…
-
8
votes4
answers1166
viewsHow to sort the data of a query by predefined values?
Using as an example, I have a certain user table, where that user’s city is, is a reference to another table. I need to order these users in a query according to the location of the current logged…
-
8
votes3
answers2984
viewsThe ideal way to build forms is to use table or div?
I have a form to develop, will be 100 questions divided into blocks (will have to be invisible, will have forward and back button, block validation etc), probably the form page will be very large.…
-
8
votes1
answer7864
viewsFunction to generate random alphanumeric characters
I need a C# function that manages a String of random alphabetic and numerical characters of size N.
-
8
votes1
answer255
viewsHow to show an element for a few seconds and then hide it?
Is there any way I can inform a visible : true for time? I want it to be true only for a few seconds then come back to false.
-
8
votes5
answers19908
views.NET C# IIS Request cancelled: Failed to create secure channel for SSL/TLS
Gentlemen, I am trying to communicate with the recipe/SEFAZ server using an A1 certificate through an MVC5 C# application on an IIS 8 server, in the pool with my user identity. The certificate is…
-
8
votes2
answers339
viewsWhere to put Data Annotation? View Model or Model?
Using Entity Framework Code First, with view model and model. To create a column with varchar(2), need to put the MaxLength(2) in the model and in the view model?…
-
8
votes3
answers2089
viewsHow to implement business rules or system rules using Domain Driven Design in C#?
I’m having doubts on how to separate business rules from system rules with the DDD. If I have for example a Class Usuario with id,nome,login,senha as properties. A domain rule would require a…
-
8
votes3
answers1242
viewsLINQ with Where condition using variable
I have the following table: USUARIO Nome | Idade João | 21 Maria | 18 I want to do in only one consultation return all users, or return only users of specific age based on a C variable#. Also by…
-
8
votes1
answer122
viewsA bit mask can/should be typed?
In most programming languages, when you want to create a bit mask you usually use an integer type and operations bitwise (and, or, xor, not, shift left, shift right...). However, although nothing…
language-designasked 9 years, 2 months ago mgibsonbr 80,631 -
8
votes2
answers1212
viewsWhat does the application gain by using Type Hint?
In PHP 5 we know that the hinting type and now we can declare and force the type of parameter a function will receive. I believe it will help in the processing of the data more precisely, but what…
-
8
votes3
answers31605
viewsCheck if the element exists in Arraylist and, if not, add it
I created a state class with name, acronym and capital and a country with name, capital and states - an Arraylist of the type State. I want to create an input methodState(and status) that before…
-
8
votes2
answers2503
viewsJavascript, action on a selected text
People would like to know how to do an action on a selected text in the textarea, for example I selected the word 'hi' and when I click a button with Onlick, change the text to 'bye''. I await the…
-
8
votes3
answers464
viewsIDE - Divergence between Ides relative to tab [to Enter]
On grounds of hadware, I am the only one in my team that is using Sublime Text 3, the others are using Eclipse Luna or Mars, until there is nothing more. However since the exchange I’ve had some…
-
8
votes3
answers446
viewsCould someone explain to me the term "Specification Pattern", applied in Javascript?
I did some research on the net, I found this website with valuable information. I work a lot with conditionals using javascript, see an excerpt of my function that receives radiogroup as a parameter…
-
8
votes2
answers282
viewsWhat are isomorphic applications?
In several articles and methods of developing modern applications, I come across isomorphic Applications. But what is it really? They usually define it as "the best of client/server side together".…
-
8
votes2
answers1596
viewsCreate Javascript Library
I would like to know how to create my own javascript library, ie, create functions that can be reused in various projects and with easy customization. I know that there are already several libraries…
-
8
votes1
answer189
viewsDifferent connectionstring for different builds
I have two Connection string, one when I am in development that uses my local bank and the other for when I deploy the application in Azure. I want the app to know which one to use depending on the…
-
8
votes2
answers11564
viewsDigital Certificate with PHP
I am developing a system in which I need to implement the use of A3 digital certificate so that the documents attached to the system have legal value. How is this done? Is it possible to do it in…
-
8
votes2
answers456
viewsError in include JSP
I have the following situation: Servlet instantiated at the root /Minhaservlet Jsp instantiated in a folder inside the root: /folder/file.jsp Inside that file I have the following <img…
-
8
votes2
answers15912
viewsHow do I join a list in Python?
When I want to unite a array in PHP, I use the function array_merge Thus: $a = [1, 2, 3]; $b = [4, 5, 6]; array_merge($a, $b); Upshot: [1, 2, 3, 4, 5, 6] And how could I do that in Python in a list…
-
8
votes1
answer147
viewsShould license comments on CSS or Javascript files be maintained or not?
This question arises when I finalize a mechanism to realize a Bundle of CSS and JS files with consequent cache. In many projects we all use mechanisms that allow reducing the size of CSS and JS…
-
8
votes2
answers188
viewsSaas System Traffic Collection
I wonder if the tráfego consumed by Search Bots, is accounted for along with users in a system SaaS. Or the charge is made only by genuine navigation via browser? Some platforms SaaS charge for…
-
8
votes1
answer823
viewsPSR-4 on an MVC project or not?
I have two codes, the first one uses spl_autoload_register and the other does not, however the second loads "automatically the class" also. With spl_autoload_register Uses namespaces to split MVC…
-
8
votes3
answers4527
viewsRemove currency formatting and take only the PHP number
i write in the database the values of the products in this way: For example: R$ 5.000,00 How do I do in PHP to make this number stay 5000? That is to say "shape"? Do you have a function that fits…
-
8
votes1
answer564
viewsCardinality of the index does not update
I am creating a program that connects to a Mysql database online, and when starting it it creates a table with an index if it does not exist. To check if everything is ok I am analyzing the database…
-
8
votes1
answer2706
viewsHow to count the number of tables in Mysql?
I am trying to count the number of existing tables in a Mysql database. I tried to do it the way below, but returned a syntax error: SELECT COUNT(SHOW TABLES) How can I do that?…
-
8
votes1
answer138
viewsHow to extract values from the statistics calculated by the linhom function (L-Function for inhomogeneous Spatial point processes)?
I have to analyze the spatial pattern of some cactus distributions in the field, and since they are heterogeneous, I cannot use Ripley’s K-function (and corresponding L-function) for stationary…
-
8
votes2
answers157
viewsWhy copy the prototype method instead of using directly?
I was confused when I saw a certain javascript library code - the undescore.js. I don’t really remember the code part, but it was something like what I saw. var filter = Array.prototype.filter; var…
-
8
votes2
answers528
viewsWhat is the difference between new Function and Eval?
What’s the difference between new Function and eval, since the two seem to be doing the same thing? Example with eval: eval('1 + 1'); // 2 Example with new Function: new Function('', 'return…
-
8
votes2
answers1999
viewsWhy can’t I declare a variable with a numeric before the name?
I’m curious to know why I can’t create variables with a number before the name. I did some tests in Javascript, Actionscript and C#. var 4teste:String = "teste"; //ActionScript, erro! var 4teste =…
-
8
votes2
answers1854
viewsPagination C# MVC Asp . NET
I have a problem with paging performance with Entity Framework and SQL SERVER, first it does getAll and then list the pagination var bdPergunta = new PerguntaRepositorioEF(contexto); var pergunta =…
-
8
votes1
answer331
viewsJava Point 2d code, does not display the distance correctly
package OrientacaoObjetos; public class Ponto2D { //campos publicos: nao existem restricoes p/ valores de x e y public double x, y; //constr. default: ponto definido na origem(0, 0) public Ponto2D()…
-
8
votes2
answers161
viewsHow do I manage my messaging flow?
I have this Javascript code that represents my connection to the Websockets server, where it receives and sends messages to the server: var connection = new WebSocket('ws://127.0.0.1:2333');…
javascriptasked 9 years, 3 months ago Elaine 2,770 -
8
votes1
answer50369
viewsHow do I get current Javascript url?
I am using jQuery. How do I get the path from the current and complete URL, I want to assign it to the variable url_atual. $("#id_ativo").change(function(){ $.ajax({ type: "POST", url: url_atual,…
-
8
votes2
answers7119
viewsHow popular a Dropdownlist from another Dropdownlist
I need to know how to popular a Dropdownlist from another Dropdownlist. Example: I have a Dropdownlist called Project that takes information from my DB. When I select for example "Project 1" I need…
-
8
votes1
answer374
viewsHow to assign an Activity to open by clicking on the Actionbar Tab?
Context I have an application that contains a Activity calling for MapActivity (of which is a Map activity you inherit from the Googlemaps api), and another Activity which will serve as a search…
android android-fragment actionbar android-adapterasked 9 years, 3 months ago Paulo Roberto Rosa 8,979 -
8
votes2
answers742
viewsWhat’s a destroyer for?
In some languages, classes have methods destructors. In the ones I’ve seen, he’s declared a builder with the sign ~ in front. Something like: public class Foo { public ~Foo() { //Fazer algo } } What…
-
8
votes3
answers1766
viewsAjax cross Domain
Hello a while ago I asked this question: Grab content from another page by javascript or jquery Fellow @Sneepsninja made the following algorithm that worked. $(document).ready(function(){…