Most voted questions
150,413 questions
Sort by count of
-
15
votes2
answers3404
viewsWhat is the purpose of the third Addeventlistener parameter?
When I want to add one listener of any event in Javascript use the addEventListener. document.addEventListener('click', function (e) { alert('clicked'); }) But I realized that, in some codes, a…
javascriptasked 8 years, 5 months ago Wallace Maxters 102,340 -
15
votes1
answer2776
viewsWhat is the difference between testing and debugging?
In the book "Introduction to Software Testing" of Ammann & Offutt mentions in p.32 the 5 levels maturity models of software testing: Level 0 - No difference between testing and debugging. Level…
-
15
votes2
answers3894
viewsError message: "java.lang.Illegalstateexception: package not installed?"
Situation I’m getting this kind of mistake in mine logcat and I don’t know exactly what it could be. Although this error is not compromising the operation of the application (as far as it is…
-
15
votes4
answers15337
viewsSecurity - What is a KEY API?
I’m seeing this word in almost every service application.. What a KEY API really is and what its uses are? How it really works? Also please, if possible, explain the difference between public and…
-
15
votes2
answers6108
viewsRandom draw, but with different odds
I am implementing a system where the user clicks on a button and a draw with balls of different colors occurs, but for each color there is a probability: He has a 30% chance of catching a blue ball…
-
15
votes1
answer77173
viewsIs every HTTPS and HTTP connection always linked to port 443 and 80 respectively?
Every HTTP connection always has port 80 and every HTTPS connection always has port 443? Because I realize that browsers don’t need you to pass the port to make connections to those specific ports.…
-
15
votes2
answers1287
viewsWhat is the purpose of a static constructor?
I’ve always used builders as follows: public MinhaClasse() { //Algo ... } However I found that in C# it is possible to create a static constructor as follows: public class MinhaClasse { public…
-
15
votes2
answers7839
viewsWhat is the difference between View and Materialized View?
According to Oracle documentation, a Materialized View is a database object that contains the results of a query and a View is a logical table based on one or more tables or views and does not…
-
15
votes2
answers6768
viewsWhat is, and how it works, a Etag
I have been making socket requests to my Apache server in order to create a prototype of Framework, and for each different file that was accessed, returned a Etag in the header. What good is a Etag?…
-
15
votes2
answers5043
viewsWhat is the meaning of a "Manifest" file in programming?
I believe I’ve seen a file called manifest related to some libraries of certain programming languages. If I remember correctly, there is a manifest in Android Studio. I also remember seeing a file…
terminologyasked 8 years, 7 months ago Wallace Maxters 102,340 -
15
votes2
answers458
viewsIs there a way to create cross Platform programs in C++?
I know how to program in C and I am now learning Java, but I would love to learn C++ and I wanted to know if it is possible to create programs cross Platform, that is, that they run in any OS…
-
15
votes2
answers534
viewsCount of black pixels that have been plotted on the web image
I want the user to trace a line in a biometric image and make an automatic count of "black parts" of the digital that this line crossed. I have no idea which tool to use and where to start...…
-
15
votes2
answers8548
viewsWhat is the asymchronism?
In a question about use or not use Node Js, I ended up having to give an explanation about what is the asynchronymism. And it seems that the community would benefit in a general way from a formal…
asynchronousasked 8 years, 9 months ago Bruno Costa 5,878 -
15
votes1
answer3815
viewsWhat are the ideal use scenarios for Node.js?
The theme is broad, but I’ll try to focus on what I really need to understand. Lately I’ve been studying Node.js, and I’ve been surprised by the tool, in the comparative that I’ve seen, seems to be…
-
15
votes3
answers10756
viewsWhat is a checksum for?
I was reading a question here on the website and came across the term checksum. Several other times I have seen this term being used when talking about file transfer or some important data. After…
-
15
votes6
answers2755
viewsIs it bad practice to use only static methods in a class?
I was studying further sinking the OOP, learning more advanced concepts such as Polymorphism, Override, Classes and final methods, abstraction, namespace and etc... I learned about static methods,…
-
15
votes3
answers590
viewsDoubt about Inheritance
I have the following case: Avo.: public class Avo { public String quemEuSou(){ return this.getClass().getName(); } } Mae.java: public class Mae extends Avo{ @Override public String quemEuSou() {…
-
15
votes1
answer1975
viewsWhat good is a Fatherland ( b) in a regular expression?
A long time ago, I took a look at the use of Boundary, studying about regular expressions in PHP (PCRE Patterns). I came across the \b (which is called Boundary). What is the use of it in a regular…
regexasked 9 years ago Wallace Maxters 102,340 -
15
votes1
answer2699
viewsHow does list assignment work using range?
I was reading a documentation on the internet when I came across the following code: sys.path[:0] = new_sys_path I was curious, because I had never seen intervals used on the left side of an…
-
15
votes1
answer10056
viewsUpload images with Crop and resize, jQuery and PHP
I need a function in which the person should upload an image, and it should "crop the image", leaving it in the right size, Facebook style and then should be saved in the databank. I tried several…
-
15
votes4
answers426
viewsContest question: logic error and semantic error?
I participated in a contest and fell the following question: 33 - Analyze the algorithm and check the correct option for this algorithm. Algorithm Calculo_media: Var N1, N2, MEDIA: Inteiro Início…
-
15
votes2
answers7197
viewsAdvantages of using Object-Oriented PHP? Where to use?
Lately I did a mini social media and practically did not use object orientation, except for one class I did for CRUD with PDO and ready-made Github libraries. Would this concept be applied more to…
-
15
votes2
answers7415
viewsWhy use error_reporting with display_errors and display_startup_errors?
I’ve been using only for a long time: error_reporting(E_ALL|E_STRICT); To debug scripts (note that I use E_STRICT only to maintain compatibility with older versions of PHP), but I noticed that other…
-
15
votes4
answers332
viewsIn relation to object orientation, should queries have a class of their own or can they stay in a specific class?
What I have is this: a user class and a connection class with the bank. I need to insert a user into a database, the query "insert into usuarios values (..)" should be in my user class or in the…
-
15
votes2
answers288
viewsWhere should exceptions be handled to display to the system user?
What is the best place to handle an exception and send a message to the system user in a desktop application? In the controller, in the view or elsewhere?
-
15
votes3
answers19149
viewsLeaving Fullcalendar in the English language
Hello, I downloaded a template fullcalendar of Adan Shaw, only that the standard language is English, I would like to leave it in Portuguese. How do I make this change? Thank you.…
-
15
votes5
answers1643
viewsDifference between private and final methods
Studying methods and final classes in Deitel’s book "How to program in Java 6 ed." I came across the following proposition: The declared private methods are implicitly final because it is impossible…
-
15
votes1
answer309
viewsConvert symbol to String (%F0%9F%8C%A0)
The symbol is equal to %F0%9F%8C%A0, but how can I convert it into Delphi? I tried several Urlencoders, but none of them returned the correct result. I’m trying this way: for i := 1 to length(s) do…
-
15
votes4
answers6318
viewsHow to display combobox-related value in the textbox?
I am doing a project in C# and SQL Server, and I need the item selected in the combo to display the corresponding values in a textbox. Follow the codes I’ve tried: private void…
-
15
votes2
answers883
viewsWhat is the difference, in practice, between Session and Application?
I’m studying about Tecnologias Web, and during my class there was a topic about concepts involving Session and Application. The technology addressed during the class was C#. I didn’t quite…
-
15
votes3
answers5035
viewsWhen to use Sqlite?
When I should and should not use Sqlite? I have a project that I intend to do I have no idea how many tables will be, but I believe that more than 15 with about a thousand lines in some tables. It…
-
15
votes2
answers1239
viewsWhat is the difference between *var++ and *var += 1?
I’m writing a feature with the signature: int increment(int *val). My intention is to receive an entire pointer, increase its value in 1 and return that value. The body of my function was as…
-
15
votes1
answer736
viewsC programming using GTK
I have to make a game like college work (Scrabble). The problem is this. When the event_box of the atrial player is pressed call a callback function, so that the image that is in the event_box…
-
15
votes4
answers4258
viewsHow to prevent direct access to my PHP code?
I have a PHP application and I don’t want the user to be able to type the name of a specific file in the address bar, for example { example.com/send.php }, all my files are called by index.php, as I…
phpasked 9 years, 2 months ago Ana P. Messina 360 -
15
votes8
answers1094
viewsIs it recommended to use constants for configuring a PHP project?
It is very common to see constants in a configuration file in a PHP project, but I would like to know if this is really the best practice, because I think if I store the password of a database in a…
-
15
votes7
answers1690
viewsHexadecimal for RGB
How to convert a Hexadecimal color (#FFFFFF) for RGB (Red, GReen, BLue)? Example
-
15
votes8
answers5012
viewsPrinting a String until a space is found
I receive a String through an input and enter it into the database. When I list, I only want the person’s first name, that is, until the first space is found. Is there any function that does this?…
-
15
votes2
answers2001
viewsDocumentation in software development
I would like to ask my question on the basis of in that matter on tests. There are different ways to document a software, the ones I’ve noticed the most are: Class documentation (developer comments…
-
15
votes2
answers6497
viewsWhat is pointer to pointer?
How to use it pointer to pointer? I find it hard to tell what it is memory address and memory value when I try to use pointer to pointer, it seems mysterious to me. Someone could give me an…
-
15
votes2
answers2572
viewsMain purpose of utility classes
What is the real function of utility classes? Would only reduce maintenance and repetition of code or would go beyond these functions? Would have some way (convention) to use these classes…
-
15
votes2
answers5421
viewsHow to validate each data type received from a form?
This subject has several related topics, and generates as many back and forth, each with a different answer. In some cases we have great answers, but no specific question about this question (in the…
-
15
votes1
answer59086
viewsJavac is not recognized as an internal or external command
I am trying to compile a java class via command line (cmd), but I cannot, the error shown is: 'java is not recognized as an internal or external command, a operable program, or a batch file.…
-
15
votes2
answers22340
viewsWhat is assert in Python for?
The @Ciganomorrisonmendez gave me a reply in a previous question on Python. And as I’m a beginner in Python still, I didn’t know what the assert that he indicated in the reply. The excerpt from the…
pythonasked 9 years, 5 months ago Wallace Maxters 102,340 -
15
votes2
answers5787
viewsCut string when it reaches space
Example: I have a string "João da Maquipe", as I do to cut in space, leaving as a result: "João" or "João". whatever. In PHP I know, but in C# I have no idea.
-
15
votes3
answers2478
viewsHow do C graphic libraries work?
How graphic libraries work? For example, the standard C execution mode is the application console, as from that only text can create the graphical libraries where you understand pixel instead of…
-
15
votes2
answers716
viewsWhat is the name of => operator in PHP used in arrays?
In PHP, when we declare a array directly, we have the operator =>. I know that in PHP we have the ->, that is Separator Object, but I had to give the name to => and could not explain. What…
-
15
votes5
answers106673
viewsHow to generate random numbers in Python?
I would like to know how to generate random numbers in Python. I’m with version 3.4.
-
15
votes3
answers14534
viewsWhat is the INDEX index in Mysql for?
What is the content for INDEX in Mysql? ALTER TABLE `tabela` ADD INDEX `tabela_id_index` (`tabela_id` ASC);
-
15
votes4
answers47253
viewsHow to insert a line break inside the echo shell script?
I was wondering if there’s any way to insert a line break inside the echo of the shell script. For example, in the command: echo "Bom dia fulano" I’d like the exit to be: Bom dia fulano I know you…
-
15
votes2
answers1506
viewsHow is the algorithm of a P2P application?
There are several P2P programs, I know that the concept is that each computer is like a client and server at the same time, and that they communicate with each other. On this type of communication:…