This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Demonstrates the Goldbach's conjecture - Every even integer greater than 2 can be expressed as the sum of two primes | |
* | |
* author: Igor Hercowitz | |
* | |
* usage: java Goldbach <number> | |
* output: the sum of the primes list | |
* | |
* ex: | |
* > java Goldbach 100 | |
* 100 can be writen as: [97+3, 89+11, 83+17, 71+29, 59+41, 53+47] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a simple and easy approach to reuse the same | |
* navigation drawer on your other activities. Just create | |
* a base layout that conains a DrawerLayout, the | |
* navigation drawer and a FrameLayout to hold your | |
* content view. All you have to do is to extend your | |
* activities from this class to set that navigation | |
* drawer. Happy hacking :) | |
* P.S: You don't need to declare this Activity in the | |
* AndroidManifest.xml. This is just a base class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String installationId = "INSTALLATION_ID"; // replace with correct installationId | |
Map<String, String> data = new HashMap<String, String>(); | |
data.put("alert", "Hello there!"); // replace with correct message | |
Map<String, Object> params = new HashMap<String, Object>(); | |
params.put("installationId", installationId); | |
params.put("data", data); | |
ParseCloud.callFunctionInBackground("push", params, new FunctionCallback<Object>() { |