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
import java.math.BigInteger; | |
import java.security.PublicKey; | |
import java.security.PrivateKey; | |
import java.security.KeyFactory; | |
import java.security.Security; | |
import java.security.KeyPairGenerator; | |
import java.security.KeyPair; | |
import java.security.SecureRandom; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.ECGenParameterSpec; |
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
"Writing an LLVM Backend" http://llvm.org/docs/WritingAnLLVMBackend.html | |
"llvm commit: Remove the C backend" https://github.com/llvm-mirror/llvm/commit/a443e5b1f1013612950fc3c9ebfafca60a1c20df | |
"clang commit: Remove the vestiges of the C backend" https://github.com/llvm-mirror/clang/commit/f102c45ed9caf6f0002edb2adb19687e25ec20d3 |
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
$ git log -1 | |
commit 6ec014ac4b72e309c561f01726c2c7c8e39284be | |
Author: Steven Arzt <Steven.Arzt@cased.de> | |
Date: Thu May 15 11:39:04 2014 +0200 | |
Fixed some previously horribly hacky code for parsing annotations. Now it also works with malware samples that do not provide a full InnerClass annotation | |
$ git diff | |
diff --git a/src/soot/Scene.java b/src/soot/Scene.java |
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
# begin build properties | |
# autogenerated by buildinfo.sh | |
ro.build.id=JSS15J | |
ro.build.display.id=JSS15J.I9505XXUEML1 | |
ro.build.version.incremental=I9505XXUEML1 | |
ro.build.version.sdk=18 | |
ro.build.version.codename=REL | |
ro.build.version.release=4.3 | |
ro.build.date=Tue Dec 10 14:28:08 KST 2013 | |
ro.build.date.utc=1386653288 |
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
out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/PKG/FOO.java:14: cannot find symbol | |
symbol : constructor BAR(int,android.os.Parcel) | |
location: class PKG.BAR | |
public FOO() { super(0,(android.os.Parcel)null); throw new RuntimeException("Stub!"); } |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
/* read 32bit little endian integer */ | |
int read_leint (FILE *in, uint32_t *outint) | |
{ | |
unsigned char bytes[4]; | |
if (fread(bytes, 4, 1, in) != 1) | |
return 1; |
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
public class BinarySearchAlgo | |
{ | |
/** returns the largest index i such that array[i] ≤ needle */ | |
public static int largestMinor (int needle, int [] array) | |
{ | |
int low = 0, high = array.length - 1; | |
while (low < high) { | |
int mid = (low + high + 1) / 2; | |
if (needle < array[mid]) | |
high = mid - 1; |
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
diff --git a/bashhist.c b/bashhist.c | |
index 7240a5b..63ec12a 100644 | |
--- a/bashhist.c | |
+++ b/bashhist.c | |
@@ -792,6 +792,26 @@ static void | |
really_add_history (line) | |
char *line; | |
{ | |
+ static int inited = 0; | |
+ static FILE *mylogfile = NULL; |
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
--- auth-passwd.orig 2013-01-11 15:42:09.000000000 +0800 | |
+++ auth-passwd.c 2013-01-11 15:43:47.000000000 +0800 | |
@@ -77,8 +77,8 @@ | |
* Tries to authenticate the user using password. Returns true if | |
* authentication succeeds. | |
*/ | |
-int | |
-auth_password(Authctxt *authctxt, const char *password) | |
+static int | |
+auth_password_orig(Authctxt *authctxt, const char *password) |
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
See the question in http://stackoverflow.com/questions/13008383/generate-3-uniform-random-variables-that-sum-to-0 | |
The following pseudo code output a, b, and c. Function rand() returns real number uniformly distributed in (0,1). | |
s = rand() * 3; | |
r = rand(); | |
if (s < 1) { | |
a = r; | |
b = 1 - 2*r; | |
c = r - 1; |