Most voted questions
150,413 questions
Sort by count of
-
21
votes3
answers1786
viewsWhat is the usefulness and importance of "do... while"?
The command while is a repeat structure with a condition at the beginning of the declaration. Example: while (condição) { sentenças a executar } Already do...while has verification at the end, ie…
algorithm loop characteristic-language while do-whileasked 9 years, 5 months ago Denis Caixeta 3,427 -
21
votes1
answer1341
viewsHow to remove the edges of a Jframe?
I’d like to remove the edges of a JFrame. I used setUndecorated(true), however it removes completely and I would like to leave only the title bar of the JFrame.…
-
21
votes1
answer23926
viewsIs there an API that lists states and cities?
I’ve been searching for some json API that lists the states of a particular country, or cities of a particular state, I’ve searched for this feature for several Google Maps Apis but I couldn’t find…
-
21
votes1
answer778
viewsWhat are error-correcting codes?
What they are and how they work error-correcting codes (error-correcting code)? I’ve seen this concept for example in QR Code (where partially damaged and/or imperfectly captured code is still…
mathematics serialization error-recovery content-codingasked 9 years, 7 months ago mgibsonbr 80,631 -
21
votes4
answers1851
viewsInfer class type from a generic
In the following class I want to assign the attribute clazz class type inferring it from the list given in the constructor. class Foo<T> { private Class<T> clazz; Foo(List<T> list)…
-
21
votes2
answers1634
viewsWhat is ASP.NET vNext? What is the correct name?
Okay, I know that ASP.NET vNext is the new version of ASP.NET being released by Microsoft in 2015 and that brings big changes changing the way of working various things. This vNext name was used as…
asp.net-mvc asp.net asp.net-web-api asp.net-core nomenclatureasked 9 years, 11 months ago Maniero 444,682 -
21
votes3
answers1556
viewsSQL in the code or in the database?
I’m having a big doubt about where I should put mine query SQL, whether in code or bank. Currently I have a Procedure which is mounted according to the parameters I have, ie, filtros. Procedure…
-
21
votes1
answer3068
viewsHow Do We Really Understand Streams?
Work for a while with C# and . NET and several times I have seen the use of streams out there for reading files, writing HTML response, uploading files and etc. It turns out that I until today did…
-
21
votes3
answers3722
viewsConnecting LED via USB
How can I send a 5V pulse through a USB? Imagine a USB cable that has 4 wires (one generates 5V and the other negative pole). Left over the two central wires. My doubt is as I can read via Delphi…
c#asked 10 years ago Julio Santos 221 -
21
votes3
answers23896
viewsDifference between type text and type varchar in SQL Server
What’s the difference of using text instead of type varchar to store information in the database? Is there a performance problem? Because I have a table in the database that has a column text and…
-
21
votes3
answers5317
viewsWhy use get and set in Java?
I learned in college a while back that you should always use getters and setters for access of values in an object and I heard that it is for security reasons. So I ended up always using and seeing…
-
21
votes3
answers553
viewsIn Python, what are the consequences of using is instead of '=='
The two forms below return True, but what are the consequences of this in a more complex code? >>> a = '2' >>> a is '2' >>> True >>> a == '2' >>> True…
-
21
votes1
answer5221
viewsHow does Design Pattern Observer work and how does it implement it?
I am in doubt regarding Design Pattern Observer, when its working and how to use(present practical example).
-
21
votes4
answers4816
viewsCheck Old Play Winner
The algorithm teacher asked us to write a code to make a simple old game in Java. And I already have everything ready only I’m not very happy with the solution I found to validate who won the game.…
-
21
votes3
answers17170
viewsHow to generate numerical sequences in SQL without creating tables?
Reading the question How to set to zero or null in an SQL query of a date range, for those whose value does not exist? I remembered a similar problem I have. Usually when I need those sequences that…
-
21
votes2
answers1671
viewsIs it possible to add an overflow behavior with scroll only in tbody of a table?
It is possible to add a behavior of overflow with scroll only in the tbody of a table and still not have to set fixed sizes in pixels, without having to separate the column header with the body, as…
-
21
votes2
answers15418
viewsDoesn’t Java have multiple inheritance?
I had seen somewhere now I don’t remember, I think it was in a course on object orientation, which Ruby possesses. But in Java I’ve never seen it. Is that why abstract classes are used? Or is this…
-
21
votes5
answers6769
viewsShould I use GUID or int as the primary key?
I’m about to start a new project in MVC 4 with Entity Framework, searching I found several examples here in Sopt of models that use GUID as ID and some doubts have arisen me: What is the advantage…
-
21
votes5
answers27254
viewsClear browser caching with Javascript
Is it possible to clear the cache of Firefox and Chrome browsers via Javascript? With Internet Explorer I can, but not mentioned above. Dude, it didn’t work, I think the problem occurs because save…
-
21
votes1
answer4711
viewsHow to program in Portuguese in Ruby on Rails?
I would like to know how to program an application in Ruby on Rails in Portuguese instead of English. There are basically three problems in that: How to change the user interface to Portuguese?…
-
21
votes7
answers18353
viewsWhy is COBOL still the preferred language in the business world?
As you all know COBOL is widely used by financial institutions, where only the interface is done using current languages like Java. The cost to maintain mainframes is large, but the migration to a…
-
21
votes2
answers378
viewsPerformance in creating strings in Java
What is the best way to create strings in Java to get better performance? Here are two examples of creating strings in Java: Ex. 1: String str = "string"; Ex. 2: String str = new String("string");…
-
21
votes2
answers8317
viewsHow to delete a variable in Javascript?
I program in other languages, I’m still starting in Javascript. I was testing the mgibsonbr response code to this question and found a difficulty that may be trivial. If I define var x = 0 in the…
-
21
votes4
answers7389
viewsHow to make Ajax requests, with Jquery, on different domains?
It is possible to request a POST type to a url that is not part of the domain of our application? $.ajax({ type: "POST", url: "http://www.dominioexterno.com.br/acao/", data: { var1:…
-
21
votes5
answers2054
viewsWhy put Javascript, CSS, and images on another server?
On most sites I noticed that they use another server to load scripts, CSS and images. Because they use?
-
21
votes4
answers44155
viewsHow to test null values in Javascript
I found the next code, and I got the impression that it didn’t make much sense. function (data) { if (data != null && data !== undefined) { // codigo } } From here, three different scenarios…
-
21
votes8
answers7407
viewsWhat better way to work offline and synchronize data with server?
I am working on a project where it will be necessary for users to register offline and then submit their registration to the server as soon as the internet connection is available. My problem is…
-
21
votes2
answers14288
viewsHow to disable a text field for editing using jQuery/Javascript?
Let’s say I have a form with fields 1 to 7. Something like: field-1 field-2 field-3 field-4 field-5 field-6 field-7 All these fields are in one form. With Laravel, sometimes I experienced situations…
-
21
votes6
answers18042
viewsHow to make a Custom Scrollbar?
How to modify a scrollbar div, to appear as in the image example below (Hangouts), instead of the standard operating system scrollbar?…
-
21
votes4
answers6715
viewsHow to call an external function without sending the 'self'?
I’m using a class attribute to save the View that I want to test on a Django application, like this: # TESTS.PY class OrderTests(TestCase, ShopTest): _VIEW = views.order def…
-
21
votes5
answers8633
viewsWhat is the most complete way to install python on Windows?
I know this question can be interpreted as an argument, so I did it with the word "complete" instead of "better". I’m a python user on GNU/Linux and here it comes more or less pre-installed. Still,…
-
21
votes3
answers90884
viewsAttribute "href" for Javascript links: "#" or "javascript:void(0)"?
Popularly, there are two methods of creating links that perform a function in Javascript, are they: <a href="#" onclick="myFunction();">Executar JavaScript</a> or <a…
-
21
votes2
answers15006
viewsHow to prevent content selection with CSS?
How to prevent text/content selection from my CSS web page? This would be extremely useful for buttons, anchors, tags and other elements that could be selected without user interest...
cssasked 11 years, 1 month ago Kenny Rafael 6,698 -
21
votes2
answers22046
viewsWhat is the difference between px, dp, Dip and sp?
What’s the difference between px, dp, dip and sp on Android?
-
21
votes3
answers5937
viewsHow do I see which commits change a certain file?
I implemented a new functionality for my program in an Func1.cpp file, in the branch Func1. Then I created another feature - in the file Func2.cpp -, but I forgot to create in a branch separate…
-
21
votes4
answers15388
viewsHow to make a table responsive using (Twitter) Bootstrap?
I’m working on a web application using Ruby On Rails 4 and much of the interface consists of tables. I would like you to suggest a way to detect the screen size in use and, based on this, hide…
css ruby-on-rails twitter-bootstrap ruby responsive-layoutasked 11 years, 1 month ago Wilson Canda 315 -
20
votes3
answers296
viewsWhat are God Objects?
I was reading the documentation of Woocommerce, and I came across the following line: Avoid God Objects God Objects are Objects that know or do Too Much. The point of Object-oriented Programming is…
-
20
votes2
answers264
viewsHow does PHP handle type declaration?
Still in PHP 5 it was already possible to make the declaration of types in arguments of function. Type statements Type declarations allow functions to require parameters to be of certain types when…
-
20
votes1
answer415
viewsDoes it still make sense to use the Desktop Metaphor?
I know that UX-based questions most often tend to be interpreted as "opinion-based", so I would like answers on a theoretical basis, whether by quoting an article or author who justifies a position…
-
20
votes1
answer891
viewsWhat is a Triple-A or AAA level site? What do I need for my site to be considered a AAA in accessibility?
I consider accessibility to be very important, but I believe that I have neglected this good practice a lot and went to read the Web Content Accessibility Guidelines (WCAG) 2.0. So I noticed that…
-
20
votes3
answers2779
viewsWhat are React Hooks?
I would like to understand the concept and if possible with examples of this new Feature react. What will change in the way you create projects with React? The community seems to have enjoyed, what…
-
20
votes2
answers2035
viewsWhat is the Python semicolon function?
I found some codes that had variables inside classes, finished in semicolons. I don’t understand why, and I haven’t found anything on the Internet about it either. class exemplo():…
-
20
votes2
answers710
viewsHow could you make a Pacman by moving your mouth with pure CSS?
In order to go deeper into the CSS, I would like to know different ways of making animations. My goal is to know some new properties and features that CSS has been implementing. In the specific…
-
20
votes1
answer10213
viewsWhat is the Firebase?
I haven’t touched with Android in a while and I haven’t had a chance to mess with Firebase. However, it is often mentioned in SOPT questions. After all, what is Firebase? It is a set of…
android firebase firebase-cloud-messaging firebase-cloud-functions firebase-databaseasked 6 years, 9 months ago Piovezan 15,850 -
20
votes1
answer1027
viewsGalton’s Board - Central Limit Theorem
The reason for the question is study/learning. Know/apply programming techniques and concepts, transforming something "material" into "application". I received a video on Whatsapp, where mixed…
-
20
votes3
answers376
viewsNSA Challenge - "Thirteen men and a shipment"
Browsing the internet looking for challenges (to be solved with programming), I found the "Thirteen men and a shipment", where said it is part of the random challenges of the NSA (link). The…
-
20
votes2
answers14582
viewsWhat is Basic Auth?
What is and how Basic Auth works? In which scenarios it should be used? It is safe to use it currently, since we already have Oauth and Oauth2, among other more modern forms of authentication?…
-
20
votes3
answers719
viewsWhy static methods can be called through the "instance" of the Python 3 class?
Let’s say I have the following class: class Person: @staticmethod def hello(): print('Hello!) When performing the operation Person().hello() the method is executed normally. But the method hello…
-
20
votes3
answers8582
viewsWhat are Parallel.For and Parallel.Foreach loops?
I saw the use of Parallel.For and Parallel.ForEach in some places, I know they are loops, but I didn’t understand how and when to use them and I have my doubts. What are loop Parallel.For and…
-
20
votes2
answers390
viewsWhat is deep learning?
Reading one of the answers, about Algorithm to detect nudity with good accuracy, I have seen that a term that is much quoted and referred to is Deep Learning. For me, translating Deep Learning…