This file contains hidden or 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
| Travis: I can't sleep nights. | |
| Personnel Officer: There's porno theatres for that. | |
| Travis: I know. I tried that. | |
| Personnel Officer: So whaddaya do now? | |
| Travis: I ride around nights mostly. Subways, buses. Figure you know, I'm gonna do that, I might as well get paid for it. | |
| Personnel Officer: Wanna work uptown nights - South Bronx, Harlem? | |
| Travis: I'll work any time, anywhere. | |
| Personnel Officer: Will ya work Jewish holidays? | |
| Travis: Any time, anywhere. | |
| Personnel Officer: All right. Let me see your chauffeur's license. How's your driving record? |
This file contains hidden or 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
| //------------------------------------------------------------------------ | |
| // Start compiling program. | |
| // 10/30/14 19:22:22 | |
| //------------------------------------------------------------------------ | |
| 1 PROGRAM MAIN; | |
| 2 CONST A = 2; | |
| 3 VAR B; | |
| 4 BEGIN | |
| 5 B := 5; | |
| 6 write(B); |
This file contains hidden or 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
| /* string concat update in postgresql */ | |
| /* check before submit changes: */ | |
| SELECT 'prefix' || col | |
| FROM tb | |
| WHERE id in (1, 2, 3); | |
| /* concat update */ | |
| UPDATE tb |
This file contains hidden or 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 main | |
| import "fmt" | |
| type Year uint | |
| type Month uint | |
| func (year Year) isLeap() bool { | |
| return ((year%4 == 0) && (year%100 != 0)) || (year%400 == 0) | |
| } |
This file contains hidden or 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
| # coding: utf-8 | |
| # By default, fabric will use `/bin/bash` as shell. | |
| # Which means it won't process our aliases in the `~/.bashrc` | |
| # (or `~/.bash_profile`). | |
| from fabric.api import env | |
| # We can fix this by invoking bash as a login shell: (quoted from `man bash`): |
This file contains hidden or 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
| # coding: utf-8 | |
| def chunks(seq, chunk_size): | |
| '''Split a sequence into chunks. | |
| Source: http://stackoverflow.com/a/312464/1158494 | |
| :param seq: sequence to be split. | |
| :param chunk_size: chunk size. |
This file contains hidden or 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
| /* | |
| * We said a process is a daemon when: | |
| * | |
| * - its parent process terminates, | |
| * - the daemon process attach to init (1) process. | |
| * | |
| * Usually we will close its STDIN / STDOUT / STDERR and chroot to ``/``. | |
| */ | |
| #include <fcntl.h> |
This file contains hidden or 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
| // Consider a left recursion grammar: | |
| // | |
| // exp = exp + num | num | |
| // num = 0|1|2|3|4|5|6|7|8|9 | |
| // | |
| // We can remove left recursion by employing exp': | |
| // | |
| // exp = num exp' | |
| // exp' = + num exp' | eps | |
| // |
This file contains hidden or 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
| // Store current instruction. | |
| tf->esp -= 4; | |
| *((uint *) (tf->esp)) = tf->eip; | |
| // Run alarm handler. | |
| tf->eip = (uint) proc->alarmhandler; |
This file contains hidden or 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
| vimshell% ./sf | |
| !!!vimshell: exit 1 "./sf"!!! | |
| vimshell% |