All Questions

1
answer

Check if a screenshot of the screen was taken

Snapchat has a feature that notifies the user every time someone, some other user, takes a screenshot of their stories. At first I thought of checking to see if the user pressed Volume Down + Power , but nothing guarantees that screen...
asked on 03.04.2017 / 20:29
1
answer

You can use if-modified-since with "304 not modified" without PHP

Based on this solution used in this answer on SO-en I created a .htaccess and PHP script .htaccess: RewriteEngine On RewriteCond %{HTTP:if-modified-since} . RewriteCond %{HTTP:if-none-match} . RewriteRule . not_modified.php [L] not_mo...
asked on 16.12.2014 / 17:49
2
answers

What is the difference of use between KeyPressed and ActionPerformed?

I made tests to see the difference in use, and apparently both of them fire by pressing ENTER on the keyboard, as can be seen in the example below: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.T...
asked on 30.08.2017 / 16:01
1
answer

Communication between Android and USB devices

I'm developing an Android application that communicates with a USB device, printer, Arduino, or other Android device. Is it possible to read and write to Android's USB port? How do I proceed with the drivers? Does Android have libraries to wo...
asked on 25.02.2014 / 20:53
8
answers

How to know all possible combinations of 0 and 1 in Java?

What combinations can you get only with 0 and 1 numbers using 5 boxes (digits)? For example: 00000 00001 00011 ... 11111. I wanted to save all the combinations, but I do not know how to find all of them.     
asked on 17.05.2017 / 15:26
1
answer

Are there alternatives for reflection / introspection in C ++?

I have the following problem. Given any type of T : template <typename T> I need to be able to convert an object of type T to a std::unordered_map<std::string, boost::any> map containing an entry for eac...
asked on 18.08.2016 / 11:26
1
answer

Market APIPayment - REST API subscription / collection (404)

I'm having trouble trying to retrieve the subscription via Ajax. This subscription id is what appears in the URL of my MercadoPago dashboard in Tools > Subscriptions > Subscribers > Subscription. The URL is https://www.me...
asked on 29.09.2017 / 19:03
8
answers

Difference between while and for

What is the difference between while and for , if both are loop repeats, if with both I can do the same things either condition a stop or variable iterations because there are both. My question is: Is there a way to demonstrate...
asked on 05.05.2015 / 21:47
8
answers

Recognize word repetitions in String

I have text within StringBuffer and I need to check and mark the words that appear more than once. At first I used a circular queue of 10 positions, because I'm interested only in words repeated in a "ray" of 10 words. It is worth noting...
asked on 06.02.2015 / 20:19
2
answers

What is HTTP response splitting?

Reading about HTTP headers I came across a filter function that removed both invalid characters from the header field value and multiple CRLF characters. This second on the pretext of avoiding the HTTP response splitting . By what I und...
asked on 06.07.2017 / 14:37