Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer649
viewsDo I need to close the connection in each query?
Currently I have a web application that queries multiple databases in the same controller. For each database I request a connection at the server startup and keep them in a static class where the…
-
7
votes4
answers147
viewsI cannot use Boundary( b) to validate a word starting with "@"
In the case of / b@MYVAR b/i, I cannot use Boundary, See: https://regex101.com/r/4bFElA/1 I need to validate a string that contains a @MYVAR word (Example). Are there any restrictions on this…
regexasked 7 years, 3 months ago LeonanCarvalho 3,527 -
7
votes4
answers17451
viewsHow to check Postgresql logs?
I have a legacy database that when doing certain action in the system that has access to it, several tables are modified, I was able to identify at least 04 tables being changed. My question is…
-
7
votes2
answers2995
viewsHow the Parallel hint works
One of the first things I see a crowd suggest to boost the performance of a query in the Oracle is the use of hint Parallel. What benefits/risks the use of this hint can bring, I may have problems…
-
7
votes4
answers1193
viewsWhich DBMS to use so that it can be installed on the client’s computer to run a C#application?
I am developing a small C# system that will be implemented on client computers in the future, accessing a local database. Initially I was going to use SQL Server, but I would have to install it next…
-
7
votes2
answers252
viewsApply immutability effect to objects in a Javascript class ECMA6
To illustrate, I have the following class: class LavarCarro { constructor(cor, placa, data_entrada) { this._cor = cor; this._placa = placa; this._data_entrada = data_entrada; Object.freeze(this); //…
-
7
votes1
answer352
viewsHow to allocate an immense amount of memory?
I created an Onfly encryption algorithm that encrypts bytes without the need to copy them to a new copy of those same bytes. This is both to encrypt and to decrypt these byte lists. As in the scheme…
-
7
votes1
answer871
viewsHow to instruct your browser to cache my Javascript and CSS via web.config
I reviewed my new website on Google Pagespeed Insights, I made some fixes, and now I need to cache some files (CSS and JS) in the browser. I looked for some articles/questions in Stack Overflow but…
-
7
votes2
answers227
viewsHow to convert byte to Boolean[8] and convert back?
I need to record some booleans in a File, and then retrieve them. I can record and read one or more bytes with the Classes java.io.FileInputStream and java.io.FileOutputStream, so I need to convert…
-
7
votes1
answer699
viewsWhat are function-oriented metrics?
Reading a little bit about Software Engineering, in one of the paragraphs, cites a little bit about function-oriented metrics or functionality, but nothing in-depth. There’s even a question in this…
-
7
votes2
answers91
viewsHow to shorten the process of creating an array without the need to write all indexes?
For example, if I need to create an array with 20 spaces, I need to always do so? $teste = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19); Or have some way to shorten that process, that 0 to…
-
7
votes2
answers412
viewsWhat is the Demetrius Law about?
In a contest, I found the following question: In Object-Oriented Programming, the law of Demetrius (Law of Demeter) says that a method m of an O object should not invoke methods of following object…
-
7
votes2
answers605
viewsWhy do I need './' to run Unix commands?
I noticed that every executable that I Gero I need for a ./ to run it on both Linux and Macos (Unix/Unix systems-like). For example, to compile a C file with GCC and run it right away, I do the…
-
7
votes4
answers1249
viewsWhat is the <canvas> tag for?
I was researching some information and saw that there is a tag called <canvas> in HTML5. What does the canvas tag? It only serves to make geometric shapes? If possible and feasible, could give…
-
7
votes8
answers955
viewssplit/regex only on the first vertical bar "|"
I want to share the string in 2 parts (will always be a array divide into two parts - or two elements) each time a vertical bar | (only in the first case). For example: I have a string var string =…
-
7
votes2
answers758
viewsWhat does the return of the INSERT 0 1 bank mean?
When I perform commands in the bank I have returns to and execution of the same. Doubt What does the 0 in INSERT 0 1? Example CREATE TABLE test( id SERIAL, name VARCHAR(50), PRIMARY KEY (id) );…
-
7
votes2
answers229
viewsIf I can do everything with structural programming, why did you create object-oriented?
In the question about - Everything I can do in POO I can do in PE? - the answer accepted and better voted says: Yes, any programming language can do anything. Now, each paradigm has its own way of…
-
7
votes3
answers340
viewsPosition caption above div
I am using the bootstrap Carousel with caption. Between the slide image and the caption there is a div with the image of an orange triangle. I need the caption to be above the triangle. I’ve used…
-
7
votes1
answer332
viewsGoogle Maps Information Box with JS
How do I display an information box when I click on Mark? I tried following the documentation, but when I click, the box appears but not the information inside it. //Center var mapProp = { center:…
-
7
votes3
answers12428
viewsWhat’s the difference between Cast and Convert?
In a Transact-SQL (Ramalho Series) book it is said: CAST AND CONVERT It implicitly converts one expression of data types to another. CAST is synonymous with CONVERT. What do you mean by CAST is…
-
7
votes4
answers4690
viewsCaesar cipher - problem with letters and spaces
I’m doing an exercise on the figure of the table below: #include <stdio.h> #include <string.h> main(){ char frase[200]; printf("String: "); gets(frase); for(int i=0; i <…
-
7
votes2
answers351
viewsReadability of javascript codes
When writing a code you must do it so that the time required for your understanding is minimal. This is the most important metric to have a readable code and is the foundation of the fundamental…
-
7
votes2
answers298
viewsWhat is the difference of use between mouseClicked and actionPerformed?
What is the difference between these two events: mouseClicked() and actionPerformed()? What differs in their execution and when they will be executed?
javaasked 7 years, 4 months ago UzumakiArtanis 9,534 -
7
votes1
answer3710
viewsWhy use static python methods
I’m studying about the subject of the title and I can’t get the idea with the explanation on video and the Stk I found, so when and why we use static method @staticmethod in python, one has some…
-
7
votes1
answer803
viewsHow can a WEB application that uses Oauth for authentication manage the user session?
Usually sessions are used to keep data of a particular user after they have logged into the WEB application, and it is the WEB application that is responsible for controlling and managing that data…
-
7
votes2
answers2792
viewsWhat status code to use when there is no database record to return on an HTTP request?
I own an endpoint that returns a list of products. Therefore, if there is data from this list I set the HTTP status code to 200, and if there is not, I return only a json saying that no record has…
-
7
votes1
answer249
viewsEverything I can do in POO I can do in PE?
Can I do everything or change anything? I have limits in structured programming where in POO I don’t have?
-
7
votes3
answers4993
viewsPython Virtual Assistant - Efficiency
I’m creating a virtual assistant in Python, and I want it to be more "human". I want her to interpret my request, and not just compare what I said to a string. So my question is: To cover all…
pythonasked 7 years, 4 months ago Denis Callau 306 -
7
votes3
answers1068
viewsHow to implement a "scroll Hijacking"
I have noticed in several modern pages a scroll behavior that goes up to certain interest part of the content, researching, I found that this type of behavior is called "Hijacking". The term…
-
7
votes2
answers93
viewsSyntax error jquery
Hello I’m having a problem with the use of this code. I want inside the div with class output to show the following html code, this code is inside a for so I used the append, here is giving syntax…
-
7
votes2
answers1292
viewsWhat are the differences between client-side and "Rendering" server-side?
Lately I’ve seen a lot of the term server-side rendering, especially with the popularization of some frameworks and libraries, but I still can’t understand what improvements this can bring to a…
-
7
votes6
answers49406
viewshow to search for an element in a list that is inside another list?
I have the following list composed of lists. [['julian', '0', '5'], ['ana', '10', '4']] and I need to use a function that tells me the position of any element within that list, I tried to use:…
-
7
votes3
answers1044
viewsHow to edit and load class only for a single element
I have the following HTML structure below. However, when clicking on one of the "items" the class (editing) is displayed for both elements. What should I do to make it happen only in the clicked…
angularjsasked 7 years, 4 months ago lucasbento 856 -
7
votes3
answers4863
viewsInstall with PIP through the Resets.txt file inside Virtualenv?
I learned these days that through command pip freeze > requirements.txt, i can generate a list of dependencies of a specific project where I am using VirtualEnv. How do I install all the…
-
7
votes1
answer4407
viewsWhat is the difference between Traffic Light and Monitor?
I have a doubt in the concept of these two structures. What would be the difference between them? Which is faster? And which is easier to use? Could you give me a basic example of each?…
-
7
votes1
answer1874
viewsWhat are the differences between properties and attributes in HTML?
When trying to use this code: $(document).ready(function(){ $("#selectAllBoxes").on("click", function(){ if(this.checked){ $('.checkBoxes').each(function(){ $(this).attr("checked", true); }); } else…
-
7
votes2
answers4736
viewsHow to print text in the same line in Python
list = open("list.txt", "w") list = list.readlines() for i in list: print i I would like to Print the value of i in the same line, without going down. Type replacing the current word.…
pythonasked 7 years, 5 months ago Jonatan Santos 103 -
7
votes8
answers29160
viewsDuplicate visual line studio
Is there a hot key that replicates the action (Ctrl c + Ctrl v)? Besides having to copy press enter or click on the bottom line and paste, I can duplicate this line with some shortcut?
visual-studio-2015asked 7 years, 5 months ago Jhonatan Jorge de Lima 1,012 -
7
votes1
answer222
viewsWhy is there no Lookbehind in Javascript?
I hear there’s no such thing as group Construct lookbehind in Regex’s made in Javascript then I appeared some doubts as: Because there is no? Is there any reason that makes it incompatible c/the…
-
7
votes1
answer1523
viewsPython. pyc file function
If the Python language is interpreted, why are there . pyc files that are compiled bytecodes?
-
7
votes1
answer3178
viewsWhat is the difference between package and module in Python?
Is there a difference between a package and a module in Python? If there is a difference, it is possible to give examples of packages and modules?
pythonasked 7 years, 5 months ago Thiago Krempser 1,878 -
7
votes1
answer982
viewsUpdating application(C#) in real time with Database (Mysql)
I am creating a server client application, the application would run on several machines using the same database(mysql) on an online server. I would like that once the data of a table were changed,…
-
7
votes2
answers157
viewsWhat does the expression "a+t" mean in the second parameter of fopen in C?
I was coming across a code here and I was curious about this excerpt: FILE *fp = fopen("Agenda.txt","a+t"); What’s the point of "a+t"?
-
7
votes2
answers2154
viewsHow do I convert a date into American format in Angular?
I’m using a Json No Laravel 5 response, where I use Angular to display this data. The date in Laravel is returned in format 2017-05-17 15:56:46. When trying to use filter date at the angle,…
-
7
votes3
answers68693
viewsHow to create a python array
I want to create an array where the user specifies the number of rows and the number of columns. Initially an empty matrix was given: matrix = [] The codes must start from there the code below was…
-
7
votes1
answer1008
viewsWhat are the most common types of databases for web applications?
Some databases store objects, relational structure of tables, hierarchies, etc. What are all these types (models)? When is each application indicated (besides, of course, the developer’s…
-
7
votes3
answers227
viewsEF Core - Partitioning Filter
I am working in a database that has the following feature, 90% a clustered index that integrates two columns.: FilialID and DataCriacao. These tables are partitioned by FilialID, the simple creation…
-
7
votes1
answer3139
viewsPython integration with C#
Is there any way to integrate C# and Python 3? I need to create graphical application in a practical and fast way. Currently, I have the scripts in Python working 100%, now what I need is to take…
-
7
votes1
answer4174
viewsHow to concatenate lines?
How to concatenate all the results of a query in SQL Server in order to return all information in one variable? For example, considering a table cliente with the following composition:…
-
7
votes1
answer311
viewsWhen to use Supertype or Subtype when returning the method?
Suppose I have a method called "meuMetodo()" that returns an Object of Type ArrayList<String>, i can make this method declare that returns more concrete or more abstract types: public…