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
#!/bin/bash | |
if [ $# -eq 0 ] ; then | |
echo usage $0 '"Visualizing windows system traces"' | |
exit | |
fi | |
query=`urlencode "$1"` | |
echo liinwww.ira.uka.de: |
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 static String dexiami (String code) | |
{ | |
int i2 = Integer.parseInt(code.substring(0, 1)); | |
code = code.substring(1); | |
int i4 = code.length() / i2; | |
int i5 = code.length() % i2; | |
String [] arr = new String [i2]; | |
for (int count = 0; count < i5; count ++) | |
arr[count] = code.substring((i4 + 1) * count, (i4 + 1) * (count + 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
/* tcpsr: tcp send & receive utility | |
* 1. connect to server | |
* 2. send the data which is read from stdin | |
* 3. receive until close or timeout | |
* | |
* return status: (read code) | |
* public repo: https://gist.github.com/1170922 */ | |
#include <stdio.h> | |
#include <unistd.h> |
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
private static final char [] base64Map = | |
("ABCDEFGHIJKLMNOPQRSTUVWXYZ" + | |
"abcdefghijklmnopqrstuvwxyz" + | |
"0123456789+/").toCharArray(); | |
private static String base64Encode (byte [] bytes) | |
{ | |
if (bytes.length % 3 != 0) | |
bytes = Arrays.copyOf(bytes, bytes.length + 3 - bytes.length % 3); | |
char [] str = new char [bytes.length*4/3]; | |
for (int i = 0; i < str.length / 4; i ++) { |
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
*PPD-Adobe: "4.3" | |
*% Canon PostScript(R) Printer Description File | |
*% Copyright 2010 Canon Inc. | |
*% All Rights Reserved. | |
*% Permission is granted for redistribution of this file as | |
*% long as this copyright notice is intact and the contents | |
*% of the file is not altered in any way from its original form. | |
*% End of Copyright statement for Canon iR-ADV 6055/6065. | |
*% Copyright 2010 Canon Inc. All rights reserved. | |
*% |
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; |
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
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
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
Naive Bayes | |
Logistic Regression | |
Sequential Minimal Optimization | |
Laxy-Ibk | |
Random Committee | |
Decision Table | |
PART | |
J48 | |
LMT | |
Random Forest Tree |