Most voted questions
150,413 questions
Sort by count of
-
10
votes3
answers581
viewsWhat is the best way to load JS?
I was facing problems with the shipment of JS, mainly by IE8, and I came up with this doubt. I researched a lot, I ended up improving some things. Currently, I upload all JS files at the bottom of…
-
10
votes3
answers28595
viewsCalculator with Java Graphical Interface
I started working with the Swing framework, creating a calculator with the JOptionPane, and managed normally. Now I was launched the challenge of inserting buttons +, -, *, and / in the calculator,…
-
10
votes1
answer11955
viewsDifference between Handler and Thread
I made a test app in which I would like to see a ProgressBar updating by simulating a long-duration task. I initially tried using Handler because after some research I saw that its use was…
androidasked 10 years, 10 months ago Androiderson 1,249 -
10
votes1
answer133
viewsIs there any strategy for a "de-collapsible" database?
I’ve seen on some sites (like even Stack Exchange) a possibility to "undo" an action in the database (like in Question Edits / Answers). I’ve been thinking about some possible solutions, but I’m…
-
10
votes4
answers2357
viewsGood practices for storing logs
What information should be stored? It’s good practice to use TRIGGER in the database for storing logs or via code is something safer and easy to maintain?…
-
10
votes2
answers4750
viewsWhat are functional interfaces?
What are functional interfaces in Java? This concept already existed or emerged from version 8 of Java?
-
10
votes1
answer12693
viewsWhich DPI is recommended for images used on websites?
I have always used 72 dpi in my images, but currently this standard has low definition thanks to the variety of devices with different resolutions (notebook, tablet, smartphones and etc). What would…
-
10
votes2
answers6412
viewsWhat is the C++ copy builder for? How do I implement it?
I am a programmer Java and I am currently studying C++. In addition to the "normal" constructors (the standard constructor and the parameterized), C++ has a copy builder. I would like to know what…
-
10
votes3
answers18905
viewsAlgorithm for betting creation on Lotofácil
One of the ways to bet on Easy Bet is to choose 15 numbers from number 1 to 25. I would like an algorithm in c# that generates bets. Remembering that in each combination the numbers cannot repeat…
-
10
votes3
answers9148
viewsQuery in two tables without INNER JOIN
I would like to know, is there a difference in the performance of these two queries? in Mysql SELECT employee.*, company.name FROM company, employee WHERE employee.company_id = company.id AND…
-
10
votes5
answers844
viewsWhat is the shortest and most performative way to write Fibonnaci in Javascript?
Javascript is a language that allows you to write the same thing in several different ways. The best answer should describe the syntax resources used to reach the goal which is a shorter function…
-
10
votes2
answers7145
viewsIs it good practice to use <Summary> for documentation?
This is the best way to document code in C#? /// <summary> /// Descrição /// </summary>
-
10
votes3
answers3841
viewsWhy use relics in C#?
What are the advantages and disadvantages of using #regions in the C#? Its use really facilitates code organization? #region /* Código */ #endregion…
-
10
votes4
answers5293
viewsHow to check if the user is online?
I am developing a project in PHP and using Mysql as a database. I only have one question about how to chat: How to know which users are online at that exact moment?
-
10
votes3
answers2325
viewsHow does the rotation of Bits in C work?
I would like to know how the bit rotation works, because the content I was able to find on the Internet does not explain for sure. Note: The structure is as follows: unsigned _rotl(unsigned…
-
10
votes1
answer1271
viewsBecause the practice of "constant parameter" exists only in C
In C, there is the practice of applying the "const" modifier to function parameters when the function does not aim to change the parameter. As in this code: char process_string(const char *str);…
-
10
votes4
answers17125
viewsnet error::ERR_BLOCKED_BY_CLIENT when making Ajax request
I came across a strange error when I tried to execute an ajax request, and I was not very successful in finding solutions. That is the error: The line 199 of forms.js is the $.ajax({ in: $.ajax({…
-
10
votes3
answers5558
viewsMaster-detail in MVC C# with Razor
Guys I need to set up a master-detail record. I have already researched and seen some examples on the internet, but as I do for when the master is not registered, the details are stored temporarily…
-
10
votes5
answers1698
viewsHow can I ask the user for confirmation in a bash file?
I need to display a message in the Console and ask for a confirmation. For example, ask the user to type SIM to continue, and verify this.
-
10
votes3
answers2277
viewsHow to check if user has left the window
I would like to know a way to check if the user left the window of my page with Javascript, for example, if he changes tab (to search something in Google for example) the script changes the title of…
javascriptasked 10 years, 11 months ago Wagner' 1,211 -
10
votes3
answers640
viewsWhat is the use of nested blocks in Java?
I saw something written similar to the code below. That second block in the method method has any utility? It has to be used somehow? I ran this code and it compiled and appeared only the message…
-
10
votes2
answers418
viewsHow to make HTML5 sound available?
I would like to play an audio on a website. You probably need to use the tag <audio> with parameters, right? And then to press play?
-
10
votes1
answer17922
viewsMacro VBA search information on site
I need to search information on a real estate site and bring them to excel. I did the macro below: Sub zap() Set ie = CreateObject("InternetExplorer.Application") With ie .Navigate…
-
10
votes3
answers19566
viewsCustomize the browser message for a "required" field
With the attribute required (English), for example in a field of the text, the browser will present a balloon to the user to realize that this field is required and must be filled. The problem…
-
10
votes2
answers455
viewsWhat is the best alternative: define, enums or variables?
Recently, in a project where I have to declare many counts, I came to this doubt. Which is the best option define's, enum's or constant variables? At first I think to use enum is the best…
c++asked 10 years, 11 months ago Lucas Lima 6,714 -
10
votes4
answers1193
viewsColor loop in text
I have the following HTML structure: <font class="a">J</font> <font class="b">o</font> <font class="c">ã</font> <font class="d">o</font> <font…
-
10
votes2
answers424
viewsWhat forms of data transfer are available to Javascript?
It is common to find questions, answers and tutorials talking about AJAX, which is nothing more than the XMLHttpRequest, as a form of data transfer between two computers. I wonder if there are other…
-
10
votes8
answers7818
viewsCheck if variable contains a well formatted PHP email address
The variable receives a value that is supposed to be an email address, but doubts arise: It will be an email address, random text, or anything else? Being an email address, it is well formatted?…
-
10
votes2
answers2443
viewsHow to smooth a curve in R
The goal is to get the smoothed chart from data frame. x <- c(1e-04, 0.0014, 0.018, 0.24, 3.2, 42, 560, 7500, 1e+05) y <- c(0, 7, 10, 7, 0, -7, -10, -7, 0) df <- data.frame(x, y) The curve…
-
10
votes1
answer3615
viewsGenerate list of possible combinations
We have 4 teams: Time 1 | Time 2 | Time 3 | Time 4 I would like to know how to automatically build a list of possible combinations of games between these teams. Example: Time 1 x Time 2 | Time 1 x…
-
10
votes3
answers4291
viewsWhat is the best way to select an option by the text and not by the value in jQuery?
I have a select and would like to select a value according to the text of another field that the user clicked. For example. By clicking a "p" tag with the "April" text I want to select the "April"…
-
10
votes6
answers3344
viewsHow is an agile way to add and remove code comments in VIM?
I don’t want to remove the entire line of code in VIM, what I want is to work with the comment codes. I have 3 purpose cases: Comments with which open and close (usually multiple lines): /*…
-
10
votes1
answer450
viewsThe parachute descends head down. How do you reverse it?
I made a rocket in Unity that I can take off and land after five seconds. However, it lands that way: I want to get him to the ground with his parachute up. How can I do that by code? Code I have so…
-
10
votes1
answer541
viewsHow to install the dependencies of a Durandal project using Mimosa?
Let me explain the question. I would know the answer if the question were: "Como instalar as dependências de um projeto Laravel usando Composer?" In the world of PHP, using Composer, we can create a…
-
10
votes5
answers2656
viewsHow to manage a Sqlite connection between multiple simultaneous threads?
So I’m facing some problems with my Sqlite connection, where I’m not finding a skilled solution. Setting My scenario is this:: I synchronize the data of my application with a legacy system, through…
-
10
votes3
answers9800
viewsHow to keep a server nodejs running permanently?
I want to know how to maintain my server nodejs permanently running on my vps Ubuntu I bought without the need to run Putty and run the command node app.js. I made a REST API that will be consumed…
-
10
votes3
answers9879
viewsHow to free all memory allocated by an object - Delphi
What is the best way to free all memory allocated by creating an object for S.O. Let’s not consider: Objeto.Free; Objeto := Nil; Sysutils.FreeAndNil(Objeto); There would be more ways to free the…
-
10
votes1
answer165
viewsWhat is the difference between `for x in y` and `Enumerable#each`?
We can iterate an array/list in ruby in two ways: Using the syntax for x in y: > for x in [1,2,3] do > puts x > end 1 2 3 => [1, 2, 3] Using the method .each > [1,2,3].each do |x|…
-
10
votes2
answers19752
viewsAscending and decreasing ordination in the Clientdataset
I have to order the clientdataset 3 fields at the same time: 1 - Assets(0 or 1) 2 - date(dd/mm/yyyy) 3 - name The problem is that I need to make different ordinations for each of them, the first…
-
10
votes2
answers6917
viewsHow to clean a canvas area?
I created a function that generates random objects in the area canvas and wanted that after the end of this function the area was clean. Is there any possibility of doing that?…
-
10
votes4
answers1358
viewsConceptual database and file backup strategy
This is a conceptual question that fits into two on-topic themes of Software architecture and engineering. Concepts and practice and database question involving SQL on server. As this type of…
-
10
votes3
answers671
viewsA C program can tell which OS it is compiling?
I am developing a multi-platform C API and need to know if there is any way to know which OS is being compiled. For example, it could be a pre compilation directive #ifdef LINUX…
-
10
votes5
answers462
viewsInternet Explorer, should I still be worried about him?
Today when developing a new website, should still worry about compatibility with old versions of Internet Explorer, or we have already overcome this phase? I ask this because today I received the…
-
10
votes4
answers16962
viewsWhat do you call a "Stored Procedure"?
How to call a procedure in ASP.NET C#? Follow my simple procedure: CREATE PROCEDURE GetAdmin ( @email VARCHAR(50), @password VARCHAR (50) ) AS BEGIN SET NOCOUNT ON; SELECT * FROM Admin WHERE Email =…
-
10
votes2
answers10588
viewsSend image by selecting it and show thumbnail without refreshing the page
How do I code to send an image when selecting it during registration? And after sent appear in the form a thumbnail, so the user continue filling the rest of the form. Similar to what is done in…
-
10
votes2
answers1468
viewsEntity Framework is saving duplicate values when saving entities with relationship N to N
I have an entity called Book that has among other attributes a list of categories. In my model a book can have multiple categories and vice versa, so we have a relationship N to N. EF therefore…
-
10
votes7
answers39327
viewsHow to create input masks with Javascript?
I need to create a mask for a Javascript-only phone input (I can’t use jQuery). How can I do it?
javascriptasked 10 years, 11 months ago user3388 -
10
votes4
answers4814
viewsGet value from external HTML TAG "<link>"
I need to take the value (or values if you have more than one) from the TAG <link> of an HTML from another site. Trying: $url = 'http://localhost/teste/'; $content =…
-
10
votes4
answers4295
viewsWay to make a comparison between three variables
I need to make a comparison between three variables in my PHP code. if($a == $b == $c) { return true; } else { return false; } I have a lot of ideas on how to do that, but I want to know the best…
-
10
votes5
answers18134
viewsUsing jQuery, how to select elements with two CSS classes
I have a div that uses two CSS classes. Here is the HTML : <div class="box1"></div> <div class="box1 destaque"></div> <div class="box2"></div> <div class="box2…