All Questions

1
answer

How to calculate the difference between two dates ignoring the weekends in Java without using loop

I was looking for a solution to this problem but I did not find a satisfactory algorithm, so I decided to create the algorithm. Hope it works for someone. public int betweenDaysIgnoreWeekends(DateTime startDate, DateTime endDate) { //Um nu...
asked on 29.08.2014 / 11:52
3
answers

Convert rows to columns (Pivot?)

I have a table with 33 million phone records with the structure below: ccpf_cnpj ddd telefone tipo origem 11111111111 83 81021111 M SERASA 11111111111 83 87472222 M SERASA 11111111111 83 81023333 M TRANSUNION 11111111...
asked on 11.02.2016 / 13:05
1
answer

What is PJAX and how to detect a PJAX call on the backend?

I've been reading some things about PJAX , but it's a bit confusing for its framework-independent operation, I've seen articles but all focused on YUI or plugins for jQuery, . If I understand the PJAX it is the DOM interaction (via javascr...
asked on 02.05.2016 / 01:47
2
answers

What is the difference between using [CDATA []] inside a tag script?

What is the difference between using or not using the script contents with this CDATA? <script type="text/javascript"> //<![CDATA ... //]] </script>     
asked on 11.12.2015 / 17:34
1
answer

Is it true (yet?) that each router in Tor maintains a connection to each other router? Because? [closed]

original article describing #    Each onion router ) maintains a TLS connection with every other onion router. The paper is ten years ago (2004), when there were a much smaller number of relays in the Tor network. There are more than 50...
asked on 04.04.2014 / 20:03
2
answers

Can I integrate PayPal into my site without the user signing in or creating an account?

I was looking for and reading about it, but what I see most is just put the button to pay with PayPal, which requires that who is buying to log in to Paypal. Can you do this, some example code light? Because I saw that it is possible, but where...
asked on 12.06.2016 / 00:52
3
answers

How do I get the current position of a div by its class?

For example: <div class="container"> <div class="position"></div> <!-- Essa tinha que ser position [0]--> <div class="position"></div> <!-- Essa tinha que ser position [1]--> <div class="other...
asked on 20.02.2014 / 20:19
1
answer

Select with prepared statements MySQLi

//// The connection is of type MySqli was passed by the constructor method and assigned the variable $ db; public function getById($id) { $query = $this -> db -> prepare("SELECT * FROM tabela WHERE id = ?"); $query -> bin...
asked on 18.10.2015 / 00:44
2
answers

What's the difference between SOME, IN and ANY?

What is the difference between SOME , IN and ANY in MySql and when should I use them? Do they perform poorly if used many times in the same SELECT ?     
asked on 16.04.2015 / 22:01
1
answer

What is the purpose of "&" in the generic type declaration?

In this code , the author creates a class as follows: public abstract class GlyphIcon<T extends Enum<T> & GlyphIcons> extends Text { /* ... */ } My question is to understand the meaning of this & in the followi...
asked on 20.02.2016 / 09:56