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
It seems that Gist is Wonderful. Alright, let me have a try. |
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
/* gcc t.c -Wall -Werror -o test && ./test */ | |
#include <stdio.h> | |
int arr[10]; | |
int main() | |
{ | |
int n; | |
scanf("%d", &n); | |
printf("got %d\n", arr[n]); | |
return 0; | |
} |
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
/***************** | |
* cellBlockA.js * | |
***************** | |
* | |
* Good morning, Dr. Eval. | |
* | |
* It wasn't easy, but I've managed to get your computer down | |
* to you. This system might be unfamiliar, but the underlying | |
* code is still JavaScript. Just like we predicted. | |
* |
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/python3 | |
FILE='asia' | |
fin = open(FILE, 'r') | |
strings = fin.readlines() | |
strings.sort() | |
strings = [s.strip() for s in strings] | |
print(strings) |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <time.h> | |
uint32_t slow(uint32_t b) | |
{ | |
int n, i; | |
for(n=-1, i = 1; i <= b; i<<=1, n++); | |
/* not optimal */ |
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
0009:trace:mshtml:HTMLDOMNode_Release (0x1f0b18) ref=1 | |
0009:trace:mshtml:HTMLDOMNode_AddRef (0x120f9a18) ref=3 | |
0009:trace:mshtml:HTMLDOMNode_AddRef (0x120f9a18) ref=4 | |
0009:trace:mshtml:HTMLDOMNode_Release (0x120f9a18) ref=3 | |
0009:trace:mshtml:HTMLAnchorElement_handle_event CLICK | |
0009:trace:mshtml:get_target_window L"" | |
0009:trace:mshtml:HTMLWindow2_AddRef (0x1eed70) ref=3 | |
0009:trace:mshtml:nsURI_AddRef (0x1f1838) ref=5 | |
0009:Call msvcrt.memcmp(10448388,6b28876c,00000021) ret=6b06a143 | |
0009:Ret msvcrt.memcmp() retval=00000000 ret=6b06a143 |
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
<endle> 你为什么不用 int 呢? | |
<StarBrilliant> 不是表示运算用的整数不要用int | |
<StarBrilliant> 只有用来运算的时候才用int | |
<StarBrilliant> 比如,如果是表示内存中一个东西的大小 | |
<StarBrilliant> 用 size_t | |
<StarBrilliant> 如果是表示时间的秒数用 clock_t | |
<StarBrilliant> 表示字符用 wchar_t | |
<StarBrilliant> 这些都是等价的整数 | |
<StarBrilliant> 但是不是 int | |
<endle> 哦,明白你的意思了 |
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
def expand_dict(record, new_nodes, dist): | |
'''record is a dict showes previous distance | |
now_nodes is a set for the nodes we found | |
dist is a number, showes the distance for new_nodes | |
return a dict(record1) | |
''' | |
new_dict = {i:dist for i in new_nodes} | |
#more beautiful assert needed | |
assert(set(new_dict.keys()).intersection(set(record.keys())) == set()) | |
new_record = {a:b for a,b in list(new_dict.items()) + list(record.items())} |
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
/home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `exec': No such file or directory - /usr/local/bin/pygmentize (Errno::ENOENT) | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `block in popen4' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `call' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `block in do_popen' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `fork' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `do_popen' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:34:in `popen4' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:63:in `execute' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:70:in `colorize' | |
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/lib/makers-mark/genera |
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
.file "sample.c" | |
.def ___main; .scl 2; .type 32; .endef | |
.section .rdata,"dr" | |
LC0: | |
.ascii "C:\\sample.txt\0" | |
.text | |
.globl _main | |
.def _main; .scl 2; .type 32; .endef | |
_main: | |
leal 4(%esp), %ecx |
OlderNewer