I hereby claim:
- I am seanponeil on github.
- I am seanponeil (https://keybase.io/seanponeil) on keybase.
- I have a public key ASDDvmJwXIYfULVamNP0aqsGQJCIXwXqn_haFHhrGSqmxgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class Node { | |
| char data; | |
| Node next; | |
| } | |
| static Node reverse(Node root){ | |
| Node reverseRoot = null; | |
| while(root != null) { | |
| Node next = root.next; | |
| root.next = reverseRoot; |
I hereby claim:
To claim this, I am signing this object:
| public class NotificationActionReceiver extends WakefulBroadcastReceiver { | |
| @Override public void onReceive(Context context, Intent intent) { | |
| String action = intent.getStringExtra("action"); | |
| int id = intent.getIntExtra("id"); | |
| switch (action) { | |
| case "Approve": | |
| // Start service to approve transaction and hold wake lock | |
| Intent approveIntent = new Intent("com.example.app.ApproveService"); | |
| intent.putExtra("id", id); |
| public void displayNotification(String title, String message, int smallIcon, int largeIcon) { | |
| // Create PendingIntent that launches an activity | |
| Intent intent = new Intent(getContext(), LoginRequestActivity.class); | |
| PendingIntent activityIntent = PendingIntent.getActivity(getContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT); | |
| // Build the notification | |
| Notification notification = new NotificationCompat.Builder() | |
| .setContentTitle(title) | |
| .setContentText(message) | |
| .setSmallIcon(smallIcon) |
| public void displayNotification(String title, String message, int icon, int id) { | |
| // Create PendingIntent that launches an activity | |
| Intent intent = new Intent(getContext(), LoginRequestActivity.class); | |
| PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT); | |
| // Build the notification | |
| Notification notification = new NotificationCompat.Builder() | |
| .setContentTitle(title) | |
| .setContentText(message) | |
| .setSmallIcon(icon) |
| public void displayNotificationWithActions() { | |
| mNotifyBuilder = new NotificationCompat.Builder(this) | |
| .setContentTitle("New Message") | |
| .setContentText("You've received new messages.") | |
| .setSmallIcon(R.drawable.ic_notify_status); | |
| // Create Pending Intent that broadcasts an Intent | |
| Intent intent = new Intent(context.getPackageName() + ".READ_MESSAGE"); | |
| PendingIntent pendingIntent = | |
| PendingIntent.getActivity(this, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT); |
| public void displayNotification() { | |
| mNotifyBuilder = new NotificationCompat.Builder(this) | |
| .setContentTitle("New Message") | |
| .setContentText("You've received new messages.") | |
| .setSmallIcon(R.drawable.ic_notify_status) | |
| mNotificationManager.notify( | |
| notifyID, mNotifyBuilder.build()); | |
| } |
| java.lang.RuntimeException: java.lang.SecurityException: Failed to seed OpenSSL PRNG | |
| at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:231) | |
| at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) | |
| at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) | |
| at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) | |
| at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) | |
| at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) | |
| at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) | |
| at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) | |
| at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) |
| private static String parseVals(String key, String val, String prefix) throws InvalidKeyException, NoSuchAlgorithmException, IOException { | |
| long ts = System.currentTimeMillis() / 1000; | |
| String[] parts = val.split("\\|"); | |
| String u_prefix = parts[0]; | |
| String u_b64 = parts[1]; | |
| String u_sig = parts[2]; | |
| String sig = Util.hmacSign(key, u_prefix + "|" + u_b64); | |
| if (!Util.hmacSign(key, sig).equals(Util.hmacSign(key, u_sig))) { |