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
C 語言的末日 (UNIX 的末日?) | |
2038年 | |
1970年開始 到 2038年的時候 time_t 會 overflow | |
Myth | |
NULL == 0 ? | |
null pointer | |
type is (void*) |
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
投影片 http://j.mp/mosky-pwp (後來上課後講者有稍做修改 所以可能不太一樣) | |
pipy - commit your python project | |
project - a blog system | |
Dynamic typing, Static typing, Functor, Closure 我還不熟的東西 | |
Python 2 or 3 ? |
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
今日投影片 j.mp/mosky-python | |
最新版投影片 j.mp/mosky-py | |
print 'Print', 'multiple' # Print 和 multiple 中間會有空白 | |
# 在 python2 裏面拿不掉 | |
# 可以用 sys 裏面的 write 代替 就沒有空白 | |
print #印一個新行 |
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
TITLE MASM Template (main.asm) | |
INCLUDE Irvine32.inc | |
.data | |
screenColumns DWORD 80 | |
screenLeftBoundry BYTE 0 | |
screenRightBoundry BYTE 79 | |
QuitFlag BYTE 0 | |
CaptionString BYTE "Student Name: ",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
#include <iostream> | |
using namespace std; | |
int main (void) | |
{ | |
int n; | |
while (cin >> n) | |
{ | |
if (n == 0) break; | |
else if (n == 1) cout << "1" << endl; |
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
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int main(void) | |
{ | |
while (true) | |
{ | |
int n, x, y, z, d; | |
int x1 = 0, y1 = 0, z1 = 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
#include <iostream>; | |
#include <cstdlib>; | |
using namespace std; | |
int f(int n) | |
{ | |
int sum = 0; | |
while (n) | |
{ | |
sum += n%10; |
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
#include <cstdio> | |
#include <cstring> | |
int main (void) | |
{ | |
char s[11]; | |
while ( scanf("%s", s) != EOF && s[0] != '0' ) | |
{ | |
while ( strlen(s) != 1 ) |
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
2013.06.05 21:24 | |
$ history | awk '{CMD[$2]++;count++;} END { for (a in CMD )print CMD[ a ]" " CMD[ a ]/count*100 "% " a}' | grep -v "./" | column -c 3 -s " " -t | sort -nr | nl | head -n 10 | |
1 611 12.22% ls | |
2 585 11.7% sudo | |
3 519 10.38% cd | |
4 453 9.06% vim | |
5 214 4.28% ping | |
6 133 2.66% telnet | |
7 115 2.3% ip | |
8 100 2% rm |
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 find_gpa(grade): | |
if 100 >= grade >= 90: | |
return [grade, 'A+', 4.3] | |
elif 89 >= grade >= 85: | |
return [grade, 'A', 4.0] | |
elif 84 >= grade >= 80: | |
return [grade, 'A-', 3.7] | |
elif 79 >= grade >= 77: |
OlderNewer