Most voted questions
150,413 questions
Sort by count of
-
9
votes1
answer364
viewsIdentical sign "===" is only used in PHP? Why?
During my studies in C and Java, I always came across the sign "=" of attribution and the sign "==" being of equality. However, I am studying PHP now and came across the sign "===" of identical. My…
-
9
votes1
answer256
viewsWhat is an unrolling?
In this question I asked about optimization and performance that the compiler performs. Among the highlighted items, users commented that the compiler makes an optimization called loop unwinding or…
-
9
votes1
answer792
viewsForce Android GPS to update reading
I recently added my application to collect functionality the latitute and longitude points of the GPS at which the device is located. To do so I added the lines to Androidmanifest.xml:…
androidasked 7 years, 11 months ago Reginaldo Rigo 3,638 -
9
votes1
answer3505
viewsConversion to C++: What is the difference between static_cast, dynamic_cast, const_cast and reinterpret_cast?
What is the difference between casting present in the C++? There is the static_cast, dynamic_cast, const_cast and reinterpret_cast, what is the difference between these? When to use each? C++ also…
-
9
votes2
answers1552
viewsVue Router: prevent user from accessing login route if already logged in
I am configuring the routes of my application in Vue.js, initially this all OK, after logging in the user is redirected to the dashboard, now my question is how can I prevent the user from accessing…
-
9
votes1
answer2099
viewsHow to Catch Unix Timestamp with Javascript?
I tried it here in some ways, but it seems to be wrong. An example of what I do: var data = new Date(); var timestamp = data.getTime() / 1000; That way is right?…
javascriptasked 7 years, 11 months ago wen-dell 372 -
9
votes3
answers689
viewsphpMyAdmin is insurance against bruteforce?
Well, my question is this:: phpMyAdmin has some bruteforce security in the password? That is, at the end of x attempts, the IP gets locked or something like that? Thank you.
phpmyadminasked 7 years, 12 months ago Gonçalo 2,525 -
9
votes2
answers1527
viewsHow to search for saved records in the current week?
I’m doing a database query, and I plan to list the records for the current week. It would be something based on the question about retrieve data from last 7 days from current date, but instead of…
-
9
votes1
answer1639
viewsWhat is Access Token? What is it for?
What exactly is an Access Token? What is an Access Token for in an API application? I would like an answer addressed to Node.js, but I believe that API creation exists in several languages, so I do…
-
9
votes3
answers7003
viewsHow to make Local Storage expire?
I have a certain scenario in which I need the user to stay login and stay connected for some time. However, if inactivity is detected on the page after a while, maybe 20 min, expire the Local…
-
9
votes1
answer1438
viewsReuse/reuse of reactive Vue component
I’m trying to repurpose components in Vuejs, one of my attempts is to reuse form fields, example: I have in several forms of my site the fields login and password, so I created a component called…
-
9
votes2
answers10069
viewsWhen and why use session_start?
Certain that, in short, session_start() "starts a new session or summarizes an existing session", but some questions: The function should only be called once, after the login user’s? Why to start a…
-
9
votes5
answers4393
viewsTransforming a JSON information into a variable
I am calling a function in Node.js and it returns a JSON: { "pair": "BTCBRL", "last": 2280.0, "high": 2306.0, "low": 2205.0, "vol": 113.17267938, "vol_brl": 255658.20705113, "buy": 2263.0, "sell":…
-
9
votes2
answers16273
viewsGit push permission and error 403
I’m trying to push to my repository, but git always gives me this error: remote: Permission to danielswater/social.git denied to Michelleg-. fatal: Unable to access…
gitasked 8 years ago Daniel Swater 1,251 -
9
votes1
answer1015
viewsWhat is the purpose of __slots__?
What is this property for __slots__? Li in the documentation something about "waste of space", but ultimately I didn’t quite understand the purpose of using __slots__. What it’s for and when I…
-
9
votes2
answers298
viewsHow to check if a value is iterable by foreach in PHP?
In PHP, not just arrays are eternal, but also some specific objects. For example, objects that implement the interface Iterator or IteratorAggregate. Another example is stdClass and ArrayObject,…
-
9
votes1
answer167
viewsIs it wrong to use stab wounds in the Laravel view to present elements to the master user?
I wonder if it is problematic to do this kind of validation in the views of Laravel. Example: Only a master user can delete certain record, so I present the delete button only if the user is master…
-
9
votes1
answer542
viewsWhy do we use parentheses in a pointer statement?
What is the difference between these two statements? int* array1[10]; int (*array2)[10]; Why are there parentheses in the second?
-
9
votes2
answers7326
viewsWhat is the correct way to call Python methods?
What is the correct way to make a method call in Python? As in the example below. def __init__(self): mtd([1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) def mtd(data): for value in data: print(value)…
-
9
votes2
answers7582
viewsHow to capture the last element of a list in Python?
In PHP, to take the last element of a array I can do it like this: $array = array(1, 2, 3); echo end($array); // 3; And in Python? How could I do that with this list: arr = [1, 2, 3]…
-
9
votes1
answer450
viewsWhat’s the comma for?
The comma is what? Just a language construct? An operator? Because it exists? This question is based on what was seen in How to return or extract more than one value from a function?. return base2,…
-
9
votes1
answer855
views -
9
votes2
answers119
viewsES6 classes do not allow property declaration?
I was experimenting with the class declaration syntax ES6/ES-2015, and could not declare properties, only methods: class Teste { constructor() { } metodo() { } // não funciona: //propriedade: valor…
-
9
votes1
answer1239
viewsWhat’s the difference between #include <filename> and #include "filename"?
Why do we use #include <filename> and #include "filename" When to use each?
-
9
votes1
answer767
viewsMulti-client Web API Structure
I’m in the following situation: I have a web application that accesses the data through a C#Webapi. I need to apply the concept of multitenancy in order to allow my application to be accessed by…
-
9
votes9
answers12142
viewsSearch via ajax during input text ( autocomplete )
I did a search using ajax that when clicking a button triggers a request with the term searched and returns with data that fills a combobox html (select). So far so good. However, I found it…
-
9
votes2
answers15933
views -
9
votes2
answers1142
viewsUndefined index: PATH_INFO
I would like to recover the URL using $_SERVER['PATH_INFO'] and I had a nice surprise : Undefined index: PATH_INFO On the contrary, using the $_SERVER['REQUEST_URI'] everything works perfectly. What…
-
9
votes1
answer19086
viewsSomeone can explain to me the process of generating an apk in React Native
I can not generate an apk, I follow the steps of the documentation but right away I can not generate the keytool. Can someone explain to me how it is generated?
react-nativeasked 8 years, 1 month ago hudjoubert 109 -
9
votes1
answer503
viewsQuestions about Mysql integration with Java
I am creating a system in Netbeans, using the Java language and the Mysql database. I wrote the following code to make the connection between the program and the database: public class Conexao {…
-
9
votes2
answers300
viewsIs it possible to do this effect with CSS?
Indeed demonstrated in the video below Sony Spherize makes it seem as if the photo character is "breathing", there is some way to do it the same, or simulate something similar to CSS? Link to the…
-
9
votes5
answers4508
viewsProblem in video autoplay
I added a video right when starting the site and I wanted it to be on autoplay. I know that if I put it on the page on Html5 it would run as well as I did the test. But as it is inside this box and…
-
9
votes4
answers1246
viewsIdentify if all characters are equal
I have the following code that works perfectly. In it I possess a string and check whether all of its characters are equal or not: var numbers = '1111121111', firstNumber = numbers.substr(0,1),…
-
9
votes2
answers1049
viewsPHP 7 already has stable version for production?
I am thinking of building a new version of the current system of my company, it is with PHP in version 5.5.9. PHP 7 already has stable version to work in production? I saw many posts on the Internet…
-
9
votes2
answers1625
viewsWhen and why should we use SVG?
I’ve been developing for Android for a long time, I program natively, to be more specific. But lately I have had some doubts with the use of images in the application. One time or another we will…
-
9
votes1
answer120
viewsWhy in PHP is it possible to access the functions before the line they were declared?
Why in PHP it is possible to call a function before the line in which it was declared? echo ah(); // 'Ah!' function ah() { return 'Ah!'; } Notice that I called ah() first, then I declared. Even so,…
-
9
votes2
answers202
viewsWhich is faster to read and edit, a database or a . txt?
It would be to store and rewrite only 1 digit INT, erasing one and writing another, on the condition that when it reaches 5, go back to 1, and go on doing that loop every time someone accesses.…
-
9
votes2
answers1340
viewsSmart Query with Mysql
I’m trying to make a "smarter" query on my DB, my doubt is as? I have a query: SELECT * from publicacao where titulo like '%$busca%'; and in my DB has several publishing titles, for example:…
-
9
votes1
answer971
viewsHow do "Docker" and "containers" (LXC, LXD) work?
I saw this question Difference between VM and LXC Containers, but her focus is a comparison between VM and containers. What I’d like to know is a little more about containers like Docker, LXC and…
dockerasked 8 years, 2 months ago Guilherme Nascimento 98,651 -
9
votes1
answer677
viewsPHP works with cache?
I am noticing that my application is occurring some error, or else my browser is always storing cache, even if I perform the cleaning. I have a file .php and in it contain the function loadEvent,…
-
9
votes1
answer12115
viewsWhat is referential integrity?
I have searched several sites and so far I could not understand very well what is referential integrity. So I decided to ask here. When to use referential integrity?
-
9
votes4
answers199
viewsDifference between syntax to declare a function
Reading this answer, I realized different forms of call for a function using jQuery. The first way would be this: $('#dois').on("click", testar); function testar() { console.log('Teste Dois'); } And…
-
9
votes1
answer289
viewsWhy use a private?
I’m learning variables public and private. If it is I who create all the code of the program, what is the need to create a variable private? It is enough that I do not program a code that accesses…
-
9
votes2
answers477
viewsWhat types of resources are released in a "using" statement?
According to Microsoft documentation: The using statement provides a convenient syntax that ensures use correct of Idisposable objects. Source. That is, the interface Idisposable provides a…
-
9
votes3
answers4722
viewsHow to make a border lower than 1px?
Can I make a border with CSS lower than 1px? Because in my layout it got too thick.
-
9
votes7
answers65838
viewsHow to run a C program in Visual Studio Code
I’m trying to run a code (program) in C in Visual Studio Code, but I can’t find the necessary settings. I installed the C/C++ extension (Microsoft) Project structure: .vscode - c_cpp_properties.json…
-
9
votes2
answers687
viewsHow do I know if a class implements an interface?
In PHP, we can implement one (or more) interface in a class. Thus: interface Authenticable { // métodos } interface Model { // métodos } class Person implements Authenticable, Model { // métodos }…
-
9
votes1
answer273
viewsHow do I know that the sum of two double’s will be greater than the limit of one double?
Is there any way to know if a sum between two values in the format double will exceed the variable limit double? Example with integer: 2147483648 + 1. In this case it exceeds the limit of an…
-
9
votes1
answer510
viewsHow to make Jtable values the same as Arraylist<Pessoa>?
I have an example program that adds objects of my class type Pessoa in a JTable and also in a ArrayList<T>, this program has three basic functionalities which are as follows:: Add Alter Erase…
-
9
votes5
answers819
viewsIs the rest of the code inside Try executed after finding Exception?
The rest of the existing code within a try is executed after finding a exception or jumps right into the code inside the catch(Exception e) try{ x = 10; //alguns erro de try catch x = 20; } catch…