Monday, November 27, 2006

google.com IP list

// transshipment (segment)

if you cannt visit google.com by default in China, try to modify the text file below to help you:
X:\WINDOWS\system32\drivers\etc\hosts (X is your system partition)
then add:
"216.239.63.104 www.google.com" or "64.233.171.99 www.google.com" or "216.239.53.99 www.google.com" (without the double quotation marks)
finally restart your browser and have fun :)

p.s. here's more google.com IPs:

http://216.239.37.103     http://216.239.57.99     http://64.233.187.107
http://216.239.37.105 http://216.239.59.103 http://64.233.187.89
http://216.239.37.106 http://216.239.59.104 http://64.233.187.99
http://216.239.37.107 http://216.239.59.105 http://66.102.11.104
http://216.239.39.100 http://216.239.59.106 http://66.102.11.105
http://216.239.39.102 http://216.239.59.107 http://66.102.11.106
http://216.239.39.103 http://216.239.59.147 http://66.102.11.107
http://216.239.39.106 http://216.239.59.98 http://66.102.11.99
http://216.239.39.107 http://216.239.59.99 http://66.102.7.104
http://216.239.51.100 http://216.239.63.104 http://66.102.7.105
http://216.239.51.103 http://216.239.63.91 http://66.102.7.106
http://216.239.53.102 http://216.239.63.93 http://66.102.7.107
http://216.239.53.103 http://216.239.63.99 http://66.102.7.147
http://216.239.53.104 http://64.233.161.104 http://66.102.7.18
http://216.239.53.106 http://64.233.161.105 http://66.102.7.19
http://216.239.53.107 http://64.233.161.106 http://66.102.7.89
http://216.239.53.99 http://64.233.161.107 http://66.102.7.91
http://216.239.55.102 http://64.233.161.89 http://66.102.7.95
http://216.239.57.103 http://64.233.163.104 http://66.102.7.99
http://216.239.57.104 http://64.233.163.106 http://66.102.9.104
http://216.239.57.105 http://64.233.163.99 http://66.102.9.105
http://216.239.57.106 http://64.233.183.91 http://66.102.9.106
http://216.239.57.107 http://64.233.183.93 http://66.102.9.107
http://216.239.57.147 http://64.233.183.99 http://66.102.9.147
http://216.239.57.98 http://64.233.187.104 http://66.102.9.99

......
Read More...

Breadth-First Search

// transshipment (segment)

we assume that the input graphic G(V, E) is described by adjacency table.
for each vertex u∈V, save its is-visited-flag in color[u] (white for undiscovered, gray for discovered, black for visited), save its parent vertex in π[u] (π[u] = NIL if it doesnt have parent or doesnt know who's its parent), save its distance to the start s in d[u].
a first-in-first-out queue Q is used by the algorithm to hold the set of gray vertices. head[Q] is used to describe the head of Q, Enqueue(Q,v) means to add a vertex into Q and Dequeue(Q) is a operation of removing the head of Q.
Adj[u] is the set of neighbors of u.

here's the pseudo-code:

   procedure BFS(G,S);
begin
1. for each vertex u∈V[G]-{s} do
begin
2. color[u]←White;
3. d[u]←∞;
4. π[u]←NIL;
end;

5. color[s]←Gray;
6. d[s]←0;
7. π[s]←NIL;
8. Q←{s}

9. while Q≠φ do
begin
10. u←head[Q];
11. for each vertex v∈Adj[u] do
12. if color[v]=White then
begin
13. color[v]←Gray;
14. d[v]←d[v]+1;
15. π[v]←u;
16. Enqueue(Q,v);
end;
17. Dequeue(Q);
18. color[u]←Black;
end;
end;

......
Read More...

Wednesday, November 22, 2006

blogspot come back!

let's whoop it up~~~
http://islet8.blogspot.com/

......
Read More...

Tuesday, November 07, 2006

国内用户如何访问blogger beta控制台

号外~
国内的blogger beta用户最近访问不了控制台了,导致不能发帖,曾有人推荐使用花刺代理,效果还不错,不过现在的更方便,各位国内的朋友修改以后就都能留言啦!

在bloggerspaces的google group里发了帖子,有高人指点如下:
用任何文本编辑器打开 X:\WINDOWS\system32\drivers\etc\hosts 这个文件,添加 72.14.219.190 beta.blogger.com 以后,就可以访问了:)

......
Read More...

Monday, November 06, 2006

about "explicit", one of the C++ keywords

explicit修饰的构造函数不能担任转换函数
in ANSI/ISO C++ Professional Programmer's Handbook it said,

explicit Constructors
A constructor that takes a single argument is, by default, an implicit
conversion operator, which converts its argument to an object of its class .
for example, declear such a class
class CArray
{
public:
CArray(void);
explicit CArray(int size);
......
};
the explicit is very important for this declearation. without the keyword the compiler may convert int to CArray like follows
CArray arr;
......
arr = 8;
the c++ compiler will convert 8 to an instance of class CArray with 8 elements and assign the instance to arr. actually it's wrong (though with no compile or link errors). but we'll get some compile error while using explicit in declearation and avoid it. :)

notes: explicit同样也能阻止"以赋值语法进行带有转型操作的初始化".

......
Read More...

Friday, November 03, 2006

my first game was born in Oct, 2006

it names 王牌, with folk name 三张牌
here's its face:

it include some animation such as flying jettons. i wrote it in one month based on a net-game development platform.
now i'm going to write a new game called SiGuoDaZhan (maybe say Chinese Military Chess), good luck to myself :)

......
Read More...

bloggerers, come here~

i wanted to write some word yesterday noon, but......F**K GFW! the access to blogger beta is forbidden.
"impossible is nothing", yes, now i can write blogs as usual~ is it GFW's benefaction? absolutely not! we should appreciate a freeware called ProxyThorn (花刺代理验证), it's highly recommended!
bloggerers, just write it

p.s.: i use the proxy(203.106.52.102:3128) to access to blogger beta dashboard.

p.s.2: my friends in China can visit my blog through http://inblogs.net/islet8 or http://pkblogs.com/islet8

......
Read More...

Wednesday, November 01, 2006

代码也是一件艺术品

// transshipment (segment)
//--------
偶尔和小文哥讨论一下编程心得,设计架构,小文哥对代码精益求精的精神深深教育了我,小文哥指出:
代码也是一件艺术品实现功能只是最基本的要求,能做到实现功能的人,一抓一大把
他用洁癖来形容自己编写代码的态度,他写的代码里,没有warning,没有垃圾注释,没有垃圾TODO
//--------

shouldn't we be much more religious while facing an art?

......
Read More...