I hereby claim:
- I am eferm on github.
- I am eferm (https://keybase.io/eferm) on keybase.
- I have a public key ASCu2pArkFUCpfnDiqJgwRjxqgF9xYbOLv9kr97I7gM5Pgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/osascript | |
| on run argv | |
| set theFilePath to POSIX file (item 1 of argv) | |
| set theFolder to theFilePath as alias | |
| tell application "Finder" to set theDocs to theFolder's items | |
| -- Avoid export privilege problem | |
| set privilegeFile to (theFolder as text) & ".permission" |
| std::pair <int, int>* slot = new std::pair <int, int>; | |
| bool overwrite = get_used_slot(_key, slot); | |
| if (!overwrite) { | |
| int length = key_length + value_length + REC_LEN; | |
| if (!pop_free_slot(length, slot)) { // reuse gaps in file | |
| slot->first = get_tail_offset(length); // append to EOF | |
| slot->second = length; | |
| } | |
| } |
| void Persistence::keep_on_writing() | |
| { | |
| while (!stop) { | |
| boost::unique_lock<boost::mutex> lock(wait_mutex); | |
| while (write_jobs.empty() && !stop) { | |
| job_arrive.wait(lock); | |
| } | |
| boost::unique_lock<boost::mutex> lock2(write_jobs_mutex); | |
| std::vector <write_job*> batch (write_jobs.size()); |
| bool Persistence::persist_write(const char* key, size_t key_length, | |
| const char* value, size_t value_length) | |
| { | |
| /* boring code removed */ | |
| write_job* job = new write_job; | |
| bool finished = false; | |
| job->buf = buf; | |
| job->slot = job_slot; |
| /** A job for the writer thread. */ | |
| struct write_job { | |
| char* buf; | |
| std::pair <int, int>* slot; | |
| bool* finished; | |
| }; |
| say -v "Bad News" 27182818 | say -v "Good News" 1 1 2 3 4 5 | say -v Deranged 161803398874989 |
| public static String explode(String ascii) { | |
| // output string dimensioned for typical output size | |
| StringBuilder output = new StringBuilder(RATIO*ascii.length()); | |
| for (int i = 0; i < ascii.length(); i++) { | |
| String num = ascii.substring(i,i+1); // number to be hidden | |
| // next occurence of num in pi at what index? | |
| int index = pi.indexOf(num, INTERVAL+output.length()); | |