All Questions

5
answers

Use JS to relieve PHP

Well, I have a PHP file that generates a document (I get through AJAX). This document goes through some functions (that I did in PHP), for example, convert a string to code, add fields .. Well, for organization purposes, I did everything with...
asked on 09.05.2015 / 20:18
2
answers

"margin-top" and "margin-bottom" overlapping, why?

I have three elements div : HTML <div class="wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> CSS .box { background-color...
asked on 07.01.2014 / 17:33
3
answers

Why local variables are avoided in Arduino?

In several code examples for the Arduino, I note that there is almost no use of locally scoped variables. One of the examples in the IDE: Analog > AnalogInput : int sensorPin = A0; int ledPin = 13; int sensorValue = 0; void setup()...
asked on 24.12.2013 / 14:21
2
answers

Operator "| "In Java

I can not find any material on the internet explaining the utility of the "|" operator in Java. I know there is the "||" (or) used to test conditions. if(foo == 'a' || foo == 'b') But what about the "|" operator? How useful is it? My...
asked on 29.09.2014 / 20:46
1
answer

What is a "stateless protocol" such as HTTP?

Lately I've read a lot of web stuff and I always see someone mentioning that HTTP is a stateless protocol . Here's a snippet of RFC 2616 my emphasis    The Hypertext Transfer Protocol (HTTP) is an application-level      protocol for di...
asked on 22.03.2016 / 23:51
2
answers

Which one to use in Ajax, success or done?

Sometimes I see using success , sometimes I see .done , to handle the response obtained in the request. Which one should I use? Is there a difference between the two? What? Same thing for .error and .fail . I...
asked on 04.07.2017 / 22:18
3
answers

Is a subquery in the SELECT calculated for each of the results or only once?

Based on this example, where the result will be used to calculate the percentage of occurrence of each 'type' , which approach is more efficient / faster? Use a subquery in SELECT to calculate total records: SELECT tipo, COUNT(*) AS Par...
asked on 08.05.2015 / 17:30
2
answers

How to get the list of devices connected to the network

I need to find the devices connected to the network where my program runs. It's a WiFi network (I do not know if that changes the difficulty of the thing), where I know there are at least two devices connected to the router. Does anyone know...
asked on 30.08.2014 / 18:38
4
answers

What is the difference between the find and filter of jQuery?

I remembered that there is a function in jQuery called filter . I already know find , but I want to know if there is any difference between them or if they are the same thing.     
asked on 05.02.2014 / 00:53
5
answers

How to test null values in JavaScript

I found the following code, and I got the impression that it did not make much sense. function (data) { if (data != null && data !== undefined) { // codigo } } From here, three different scenarios can happen: Th...
asked on 25.02.2014 / 22:34