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
#!/usr/bin/env python | |
import sys, os | |
from zipfile import ZipFile | |
# Given a directory of jar files and a pattern, list all files that | |
# contain matching classes, and the matching classes | |
# | |
# Usage: findclass.py <dir> <pattern> |
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 | |
# reverse a string | |
reverse () { | |
local REVERSED="" | |
ORIGINAL=$1 | |
for i in $(seq 0 $(( ${#ORIGINAL} - 1 )) ); do | |
REVERSED=${ORIGINAL:${i}:1}$REVERSED | |
done | |
echo $REVERSED |
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
package credentials; | |
import java.security.KeyException; | |
import org.ow2.proactive.authentication.crypto.CredData; | |
import org.ow2.proactive.authentication.crypto.Credentials; | |
public class Decrypt { | |
static String CRED_PATH = "config/authentication/rm.cred"; | |
static String KEY_PATH = "config/authentication/keys/priv.key"; |
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 Deadlock { | |
private static final Object pause = new Object(); | |
private static volatile boolean proceed; | |
private static class Waiting { | |
volatile boolean waiting; | |
} | |
private static class DeadlockingThread extends Thread { |
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
What is the order of growth of the worst case running time of the following code fragment as a function of N? | |
int sum = 0; | |
for (int i = 1; i <= N*N; i = i*2) | |
for (int j = 0; j < i; j++) | |
sum++; | |
The body of the innermost loop executes 1 + 2 + 4 + 8 + ... + N^2 ~ 2 N^2 times. | |
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
Russie: | |
| | fixe | mobile | | |
|-------------+-------------------------------------+---------------| | |
| freebox | 0 € | 0.22 € | | |
| free mobile | 0.08 € | 0.22 € | | |
| skype | spb, msk: 0.02 € rest: 0.043 € | 0.07 € | | |
| callwithus | spb: 0.01 lenobl: 0.02 msk: 0.015 $ | 0.04 - 0.05 $ | |
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
<?php | |
$r = json_decode(file_get_contents($argv[1])); | |
print_r($r); |
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
@font-face { | |
font-family: "DroidFont", serif, sans-serif; | |
font-weight: normal; | |
font-style: normal; | |
src: url(res:///system/fonts/DroidSerif-Regular.ttf); | |
} | |
@font-face { | |
font-family: "DroidFont", serif, sans-serif; | |
font-weight: bold; | |
font-style: normal; |
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
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8765 | |
jmap -dump:format=b,file=<path> <pid> | |
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<path> | |
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
bash ./bin/unix/jetty-launcher -A dist/war/rest.war -R dist/war/rm.war -r pamr://0 -S dist/war/scheduler.war -s pamr://1 -p 8899 -Dproactive.pamr.router.address=britany.activeeon.com -Dproactive.communication.protocol=pamr | |
curl -v -k --data 'username=demo&password=demo' -H 'Accept: */*' http://localhost:8899/rest/rest/scheduler/login | |
curl -H 'Accept: */*' -H 'sessionid: 6c33dbce13cf8aff8e17c05498e0e4741b143466c33dbce13cf8aff8e18000' http://localhost:8899/rest/rest/scheduler/jobs/2/livelog | python -m json.tool |
OlderNewer