Most voted questions
150,413 questions
Sort by count of
-
11
votes3
answers1027
views$GLOBALS to store settings?
Hi, last week I asked what was the best way to store and read settings for a website, and I got two answers. Of those two answers, there was a lot of speculation, but none really explained why I…
-
11
votes2
answers476
viewsHow can Rule 110 be a good way to know if a language is Turing-complete? Why?
My question comes from the following implementation of Rule 110 in CSS (Yes! In CSS!). The doubt comes from the definition of Turing completeness, which says that a system is Turing-complete if it…
computer-scienceasked 9 years, 2 months ago StillBuggin 2,012 -
11
votes2
answers1359
viewsWhat changed from MVC4 to MVC5?
I have read some topics on the subject, some say that it has changed very little, others say that they were very important changes. I would like to know your opinion on the subject, currently I do…
-
11
votes2
answers384
viewsGMT returns -0306 instead of -0300, what is the reason?
Locale ptBR = new Locale("pt", "BR"); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyy", ptBR); SimpleDateFormat iso = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sssZ"); GregorianCalendar…
-
11
votes2
answers484
viewsHow to show custom page for inaccessible folders in Windows?
I used ErrorDocument to configure custom error pages, but when trying to access a folder that is only accessible with high privileges, instead of showing the custom page is displaying the default…
apache windows htaccess http-status-code-403asked 9 years, 2 months ago Guilherme Nascimento 98,651 -
11
votes1
answer147
viewsMake unhook after hookado
To make a hook I know, I do it as follows (Fictitious variables): MSGBOX:=GetProcAddress(GetModuleHandle('kernel32.dll'),'MessageBox');…
-
11
votes3
answers1147
viewsAdd and remove styles of a particular selection by clicking a button
I have a javascript function that applies a certain style in some classes, and would like to know how to take this style by clicking the same button. var botao = document.getElementById("troca");…
-
11
votes2
answers3185
viewsBinary search in chained list
How can I perform a binary search on a simple chained list with head? Also if it is possible to do this, if there is some special method. In the EP I can not count beforehand the amount of elements…
-
11
votes1
answer310
viewsHow to make a counter with zero left
I need to print values like this, with zeros on the left 00001 00002 00003 for($i = 00001; $i < 10000; $i++){ validar($i); echo $i."\n\r"; }…
-
11
votes4
answers2951
viewsWhat ways to measure the performance of an algorithm?
If I have, for example, some sorting algorithms (Merge Sort, Quick Sort, Bubble Sort...) in which way(s) I can know the efficiency of each one?
-
11
votes7
answers811
viewsHow to write variables in PHP?
I was watching the videos of Robson V.Leite and I realized that at a given moment he retrieves information from the forms to enter into the database in a different way than I use, the only way I…
-
11
votes3
answers527
viewsPrecedence of operators
I have a question regarding the precedence of operators in Java. I have the following code: int x = 2; long y = 1 + x * 4 - ++x; Viewing the Precedence Table here. In my view the expression should…
-
11
votes2
answers19595
viewsHow to use a variable contained in another PHP page?
Hey, guys, good afternoon. How do I use a variable from an X.php file on the Y.php page ? I want to do the following for example: <?php $Frase = "minha frase"; ?> On my Y page I want to get…
-
11
votes2
answers8942
viewsHow to verify if a variable is float, decimal or integer in Javascript?
I tried with typeof(), but it only returns to me if it is a number, string, etc.. It would be something like that: var x = 1.2; if (x == inteiro){ alert("x é um inteiro"); }…
-
11
votes4
answers25519
viewsThe input character string was not in an incorrect format. Operators
Hello, I’m beginner in programming and I’m trying to show the user how much RAM is being consumed at the moment, I’m using the following code that is not pointing nor an error when compiling only…
-
11
votes3
answers7119
viewsHow to see the methods or attributes of an object in Python?
Given a Python object, I can easily list which methods or attributes it has, directly in the interactive interpreter?
pythonasked 9 years, 2 months ago Leo Ribeiro 581 -
11
votes1
answer199
views"[-4:]" What is this syntax?
I have the following expression: namer = name[-4:] Where name gets a name, but what does that mean [-4:]?
-
11
votes2
answers1867
viewsDifference between VM and LXC Containers
Hello, I am looking to understand what is the difference between VM and LXC Containers? Everything I read sounds a little abstract and the end result seems to be the same.
-
11
votes2
answers3118
viewsAre REST and HTTP the same thing?
I would like to know the difference between REST and HTTP. Since a while, I have been studying these two subjects and they seem to me to be the same thing.
-
11
votes3
answers13259
viewsHow to develop user manuals?
I came across a situation here that prompted me to look for some software that would allow me to create a well done user manual. What happens is that I was tasked with developing the system user…
-
11
votes2
answers2353
viewsWhen should I inactivate or delete a record? Good database practices
I have the following doubt: When should I inactivate a record? When should I delete a record? In case you would like a good practice tip, in which tables it pays to create a STATUS column? Being the…
-
11
votes1
answer3723
viewsMethods Executereader(), Executenonquery() and Executescalar(), what are the differences and how to use them?
I’m working with a database SQL Server in C#, but I noticed that the object SqlCommand has several methods to execute a query, are they: ExecuteReader(), ExecuteNonQuery() and ExecuteScalar(). My…
-
11
votes2
answers6808
viewsWhat is the difference between Carriage Return and line feed?
There are two different ways to break a CR line (Carriage Return) and LF (line feed). What is the difference between these two? When should one or the other be used? Depends on the system? Language?…
-
11
votes2
answers604
viewsRead all the contents of a text file
I need to read all the contents of a text file and put it into a string. Usually, I do so: using(var reader = new StreamReader("arquivo.txt")) { var strBuilder = new StringBuilder(); while…
-
11
votes3
answers580
viewsProblem with the input click
I’m developing a hybrid mobile application, using HTML5 and JS. I have the following problem: when I click, for example, on Nickname, it opens the part of Sex. However, it is a very strange…
-
11
votes1
answer1271
viewsWebgl, Canvas and 3D Graphics
To Webgl (Web Graphics Library) is a Javascript API, available from the new HTML5 canvas element, which supports 2D graphics rendering and 3D graphics. Is there a difference between Webgl and Canvas…
-
11
votes1
answer2858
viewsWhen should I use the "?" operator in C?
When I should use the ternary operator ? in C? #include <stdio.h> int main(void) { int valor, resultado; printf("\nValor: "); scanf("%d", &valor); resultado = valor < 10 ? 50 : 0;…
-
11
votes2
answers220
viewsMeaning of append syntax
$("#add_city_btn2").click(function() { var city = $("#add_city2").val(); $("#cities2").append($("<option>", { text: city, selected: "selected"})).change(); $("#add_city2").val(''); return…
-
11
votes2
answers496
viewsWhat exactly is hypertext?
I searched and couldn’t find an answer on this: CSS is considered hypertext? I have this doubt because PHP, which is hypertext preprocessor, can also pre-process CSS and even JS.
-
11
votes3
answers26056
viewsHow to block special characters in the field
How not to allow the user to enter special characters such as *-/+.,:;[]{}ªº^~?<> in the field of question?
-
11
votes2
answers1641
viewsWhen to use and not use AJAX when submitting forms?
If I have a giant form of questions, sending via AJAX is the best way? <form id="formulario" method="POST"> <!--vários Questionarios aqui--> </form> Javascript: $.ajax({ type:…
-
11
votes2
answers51084
viewsSliding effect on anchor links
I have a page Onepage and the anchor links of the menus when clicked them only "jump" to the screen section further down, but I wanted them to slide smoothly up to the intended anchoring section. I…
-
11
votes5
answers1656
viewsCreate objects within a list without for/foreach C#
private List<Compra> CriarCompras(int numComprasParaGerar) { List<Compra> lstCompras = new List<Compra>(); for (int i = 0; i < numComprasParaGerar; i++) lstCompras.Add(new…
-
11
votes1
answer143
viewsWhat does " " mean in the header of C++?
I was looking at the MFC header and I don’t know what the character " " means in this context: #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ PTM_WARNING_DISABLE \
-
11
votes1
answer5003
viewsIs it correct to create a constructor method in an abstract class?
If an abstract class cannot be instantiated, can creating a constructor method for this abstract class be regarded as good practice or not? If so, why are we creating the implementation of this…
-
11
votes3
answers5016
viewsForm validation in modal using Bootstrap
I have the following question. I have a simple record and I want you to tell me when registering a new record: If the field is empty it shows me the message "Fill in the fields"; If the form field…
-
11
votes2
answers2937
viewsHow to compare intervals?
I believe that it is not difficult to do this, but as I could not do despite having tried to wonder if someone could help me. In an Excel spreadsheet I have random numbers from A1 to A6 and I would…
excelasked 9 years, 4 months ago Tatiana Andrade 113 -
11
votes1
answer3143
viewsDetect Adblock and display a message
What I’m trying to do is detect Adblock Plus and display a message.
javascriptasked 9 years, 4 months ago diogo Dsa 652 -
11
votes1
answer486
viewsPush android with Amazon SNS
I’m trying to push an android app, but I’m not getting the push in my app. Manifest.xml <?xml version="1.0" encoding="utf-8"?> <uses-permission…
-
11
votes3
answers579
viewsProgramming for the interface means programming for a super-type, why?
When we program facing an interface, does it involve programming for a super-type? What is the meaning of this?
-
11
votes3
answers887
viewsHow to print a constant in the middle of a string, without concatenating?
Is there any way to print a constant in the middle of a string, without using concatenation, as with PHP variables? Example: $nome = 'wallace'; echo "Meu nome é {$nome}"; In the case of constants, I…
-
11
votes2
answers3445
viewsHow to create a program in C and use Java/C#GUI?
I’m studying graphic interface in C, and I realized it’s very complex and tiring. So I wanted to know if there is how I create a program in C and use graphical interface of Java or C#. With use of…
-
11
votes1
answer1006
viewsUML, Use Case Diagram
I’m having a doubt regarding the use case diagram, follows the original version I assembled: However, when writing the description of use cases, I had an idea that can better represent the need of…
-
11
votes2
answers435
viewsWhat are Exceptions and how should I create and embed them in PHP
I’m creating an MVC system and I want to implement Exceptions in my system. I’ve just never particularly used it. So I wanted to know how to apply the Exceptions, since I saw here in Stackoverflow…
-
11
votes3
answers1792
viewsIs it a good idea to declare variables with accents?
I was taking a look at the PHP Handbook on the variables. There I found an excerpt of code that left me with the "foot behind". $täyte = 'mansikka'; // válido; 'ä' é um caracter ASCII (extendido)…
-
11
votes2
answers3004
viewsWhat’s the difference between using Fileinputstream and Fileoutputstream or Scanner and Printstream?
Is there any big difference between using these classes?
-
11
votes2
answers462
viewsHow to allocate dynamically when I don’t know how many positions I will use in C?
In a part of the code I need to transform an integer into binary and store it in a character array, however, I don’t know which integer I will receive to transform into binary, so I don’t know how…
-
11
votes1
answer230
viewsSoftware development: paradigms
I’ve always heard and still hear many comparisons, someone claiming to build software is assimilated to a building construction. I see that engineers are able to design buildings on time and within…
-
11
votes2
answers14331
viewsHow does Groupby work on LINQ?
I’m having trouble understanding the operator Groupby on LINQ.
-
11
votes2
answers70082
viewsHow to concatenate multiple Strings in Python?
The following method c.filtraNome(nome) carry out a consultation at the bank (sqlite3), however, I don’t know how I can group each field and return the already formatted query in the following way:…