Saturday, November 27

Hi 5?

I sent out some Gmail invitations and Wallop invitations and Huminity invitations, and now I got invited into Hi 5 too. There're too many SNS(Social Network Service)s right now, and I'm sick of it. Actually, I didn't answer the invitation of Hi 5, and I quitted the Huminity. They are good societies, but you can't just stay on-line all day long to make friends in the Virual Network, you got to go out and play soccer sometimes.


Friday, November 26

学生会跟校报干起来了

晚上去Gym,拿起一份校报 The Lance 看了起来,第一个新闻当然是校园警察的罢工;只要他们还继续罢工,我们就可以免费泊车。然后,发现学生会UWSA和校报干起来了。

有多少学生知道UWSA重新选举了一遍?10月底选举之后有人投诉投票那天有些管票箱的人没有检查学生证就让别人投票,这样会导致重复选票;还有一个票箱对举棋不定的投票者说:你选谁谁谁吧。要知道投票当天是不能拉选票的。所以UWSA不得不重新选举一次。The Lance 第19页的文章就说:这次重新选举有没有采取什么措施避免这些事情发生呢?上次总结教训说是监督的人员不够,但是这次难道派多一些人了吗?这次选举又用掉$4000,多浪费啊。

看到这里还正常,只是对学校问题的讨论而已;翻下一页,发现三篇文章是对上期The Lance中Mrs. Julia Cambell一篇文章的反驳,那篇文章说The Lance "lack of accountablity",所以UWSA不应该从每个学生交来的钱中拨$5块钱给这份免费赠送的报纸。
这三篇文章中,Sean Sutton说:Mrs. Cambell没有说她自己是UWSA的主席;既然她说 The Lance, 让我们来看看UWSA怎么样吧:1, 本学年初由于沟通问题, Campus Compass 的样本没有检查好就给出去了,后来不得不重新做一遍,浪费了我们学生的$2000。2, (上面提到的)重新选举,又浪费了$4000。3, UWSA声称它给出$10,000的奖学金,但是这些奖学金的标准是什么呢?然后含沙射影的说会不会把这些奖金都给了UWSA内部的人。
另一篇文章的作者就是UWSA的Senator,也是反对Mrs. Cambell的。
第三篇文章的标题特过瘾: The Lance and the UWSA are a match made in hell.

说实在的,学生会主席攻击校报这个唯一校内广泛散发的新闻媒体,真是不明智。

让我们看看事情会怎样发展。

Continue Reading...

话语权问题

好几件事连接出现。

中午上csdn逛逛,发现这里正推荐大家去一个“中国BBS社区100强”填选票。过去看看,好家伙!CNN, BBC...



难道他就不怕真正的 CNN(Cable News Network) , BBC (British Broadcasting Corporation)






找上门来?佩服佩服。itox自己做自己的网站,自然无可挑剔,但是CSDN还要凑上来,就掉价了。


前两天有个兄弟在MSN上找上我,说是可以开一个网站,只要来访的人多,就可以做广告挣钱了。他所建议的网站有点像 Discloser

照我看,这些东西都是在争夺话语权,希望能够一呼百应,金钱滚滚进来。


中国blog的目的是争夺话语权么?Blogger们正在讨论的Dan Gillmor的中国blog调查,也是围绕这个题目。当年blog在国内刚刚出现的时候,方兴东和姜奇平大力扯起“N代革命”的大旗,让我很反感,这就是我迟迟没有开始blog的原因。Blog本来是很私人,很自由的事情,没必要背上一个历史使命。

Thursday, November 25

阳春白雪

前段时间这里一直是10度左右,昨天下了一整天雨,晚上我听着雨点打在窗户上的声音不对,跑出去一看,发现现在正在下冰碴!地上已积了厚厚的一层,走上去咯吱咯吱响。

现在早上8点,阳光明媚,和绿色草地地上残存的冰粒相映耀,就是MM最喜欢的






阳 春 白 雪 !







(White Snow in Early Spring)

Wednesday, November 24

Getting start with LaTeX

Yesterday I decided to install LateX and start to use it.

Then I found, no one wants to make it clear how to download/use it. Most websites give a link to http://www.ctan.org, the Comprehensive TeX Archive Network, then you can click some link to see some files, some ftp directory, some mirrors of those files, and some links will lead you back to the CTAN again.

In blog world, people keep talking about blog/RSS/Blogroll/WIKI/flickr, but actually no one knows what they're talking, and they don't want you to know either.

Then I went back to http://www.latex-project.org/, the official LaTeX project website, and followed the links to http://www.fptex.org/fptexli2.html, because I'm using Windows system. Gees, the method to download the program is toooo Unix:
Download wget.exe
Download getfptex.bat
run getfptex.bat in DOS console. It took me 3 hours to download 460M bytes files.
Then you downloaded it, then you run a "TeXSetup.exe" . Is that all? No!

After installation, you can see this in your Start Menu:


But it is still not clear how to use it.

Follow those links in Google, I was induced to install WinEdt before I found it was ONLY an editor, so I uninstalled it, went back to my favorite editor: EditPlus.

To make the long story short, I only tell you how to make a "Hello Word" in LaTeX:

In any editor, create a txt file with this:


\documentclass[a4paper,12pt]{article}
\begin{document}

Hello World!
$$\sum_{p\rm\;prime}f(p) = \int_{t>1}f(t)d\pi(t).$$

\end{document}

then go to DOS Commend Console, go to the folder where you saved your file and type in

latex filename.txt


LaTeX.exe is supposed to be in your path after you install those 460M files. So in the same folder it will create a filename.DVI, which can be read by the "DVI Viewer" from the Start Menu:



(The LaTeX source of beautiful equation is copied from http://learn.tsinghua.edu.cn/homepage/2001315450/tex_frame.html, a pretty good LaTeX tutorial in Chinese Language)

But I'm waiting to see the PDF, not DVI... What a mess!


Continue Reading...

It might be easier to use Winedt (a software) to edit .tex files. You need to download MiTex before installing Winedt. If interested to learn what they are, google will give you answers.. Good luck!
 
Thank you, vv. I installed WinEdt before TeX, so I don't see anything new from this editor. After I read your comment, I installed it again, and I found it's useful. It's a hybrid software between Unix and Windows... It's not WYSIWYG software like Windows, but it's not commend line software either.

Thanks for your recommendation.
 

Friday, November 19

My answer for the Prime Ring


// Problem A: Prime Ring

#include 〈 stdio.h>
#include 〈 math.h>
int ring[16];
int m;

bool NotInRing(int iPos, int iNum)
{
int i;
for(i=0; i〈 iPos; i++){
if (iNum == ring[i]){
return false;
}
}
return true;
}

int GetNumber(int iPos, int iNumber)
{
int i;
for(i=iNumber+1; i〈 =m; i++){
if (NotInRing(iPos, i))
return i;
}
return 0;


}

bool IsPrime(int iNum)
{
int i;
for (i=2; i〈 =sqrt((double)iNum); i++) //sqr/sqrt
{
if (iNum == ((int)iNum/i)*i) // (inum%i == 0)
return false;
}
return true;
}


bool FindNumber(int iPos)
{
int iNumberTwo, iTotal;
if(iPos〈 1)
return false;

if (iPos == m)
{
iTotal = ring[iPos-1] + ring[0];
if (IsPrime(iTotal))
{
for(int j=0; j〈 m; j++){
printf("%d ", ring[j]);
}
printf("\n");
return true;
}
else
return false;
}


iNumberTwo = GetNumber(iPos, 0);
while(iNumberTwo != 0){
ring[iPos] = iNumberTwo;
iTotal = ring[iPos]+ring[iPos-1];
if (IsPrime(iTotal)){

// printf("Now in %d, try %d, and %d is prime\n", iPos, ring[iPos], iTotal);
// for(int i=0; i〈 =iPos; i++)
// printf("%d ", ring[i]);
// printf("\n\n");

if (FindNumber(iPos+1) == true){
// iPos --;
}
}
iNumberTwo = GetNumber(iPos, iNumberTwo);
}
return false;
}

main()
{
int i, j, k;
// int ring[16];
ring[0] = 1;

while (scanf("%d", &m)){
if (m == 0)
break;

// printf("Get %d\n", m);
if (FindNumber(1) == true)
{
for(j=0; j〈 m; j++){
printf("%d ", ring[j]);
}
printf("\n");
}
}// end while.
}



Labels: ,

Thursday, November 18

Gmail Invitation

I have 5 gmail invitations left. Anyone wants to get one can send email to me:
BenInCampus AT gmail

Happy gooooogling!


btw: If you want to try wallop, you can also send email to me. I got it from Keso, and I found it's pretty cool. You can share music, picture, and blog. It's better than the Huminity. It will be more powerful if the MSN is integrated, which I think it will be.

But the wallop is NOT Mozilla-friendly. I can't upload my picture from Mozilla 1.4.2 / Redhat 9.
Also, this flash website used up my 100% CPU time, in Windows and in Redhat.



on linux, flash support is not as good as in IE. in firefox on my lab computer with debian, everything is cool and smooth. in my laptop in home with debian, text does not show at all.

its interface is supercool although it is not stronger the google's orkut so far.

anyway, if you still have more invitation, i'd like you can send me one.

PS: welcome to My Blog (li zhao)
 
forgot, my email is lizhao.ok(at)gmail.com
 
I wonder if you're asking for Gmail invitation or Wallop invitation, then I saw you're already using your gmail account, so I sent a Wallop invitation to you :)
 
Hello! I'm form Hong Kong ,On the Web, Most of the people talk with wallop ,I also want to see how strong with ths and the new technology of microsoft!
There's my E-mail: stephenyuen1@hotmail.com

Thank you for your attention.
 
Hi there,
Do you have any invites left? I'd love to try Wallop!

my email address is acidophilus [at] gmail [dot] com

Thank you!
 
Invitation sent.
 
hi i would like 2 have ainvitation 4 a gmail account iwill be very grateful 2 u if any one can provide me with it.
neufneuf1982@yahoo.fr
 
Hi Ben I'm interested of getting Gmail do you still have an invitation that you could send me. Thanks Dan Email: parkplace@sharpsav.com
 

Tuesday, November 16

About ACM Competition.

This year my team ranked 38 out of 131 in the 2004 ACM East Central North AmericaRegional Programming Contest. This competition is funded by IBM, and the winner will go to the 2005 ACM Final in Shanghai. There're 72 colleges and universities throughout western Pennsylvania, Ohio, Michigan, eastern Ontario, and Indiana (excluding the Greater Chicago Metropolitan Area) in this competition.

You can read the problem set I met in this competition. Usually the problems are easy to understand, but hard to solve. For example, Prime Ring is a classic ACM problem:




Prime Ring Problem

A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.



Note: the number of first circle should always be 1.

Input
n (1 -- 16)

Output
The output format is shown as sample below. Each row represents a series of circle numbers in the ring beginning from 1 clockwisely and anticlockwisely. The order of numbers must satisfy the above requirements.


You are to write a program that completes above process.

Sample Input

6
8

Sample Output

Case 1:
1 4 3 2 5 6
1 6 5 2 3 4

Case 2:
1 2 3 8 5 6 7 4
1 2 5 8 3 4 7 6
1 4 7 6 5 8 3 2
1 6 7 4 3 8 5 2



There're 8 problems in the competition, and you have 5 hours to work on them. You can use C, C++ or JAVA to solve the problems. Usually the source code of the answer is NO longer than 2 pages. You can visit a PROBLEM SET ARCHIVE at http://online-judge.uva.es/problemset/ and you can even submit your answer, and get feedback from the judges.

Every year Dr. Kobti organizes 2 seminars, in March and in September. In October, there'll be a Local Contest, and the first 2 teams can go to Oakvill for the Region Competition. If any of you are interested in the contest, you can find 2 friends and start working on it now.

You can read my answer for the Prime Ring.

Labels: ,

Congratulations! Ben
 
Thanks, Albert. When will you build your blog?
 

Wednesday, November 10

愚民政策

这段文字写得很隐晦:

互联网是由物理线路和信息资源组成的,物理线路联通后,起决定性作用的是信息资源的组织与传播。信息传播是有规律的,其规律是中央复杂,末端简单的结构。广播、电视、报纸,包括电话等都是中央复杂,末端简单的结构。信息的组织者(采编系统)非常复杂,信息的使用者通过简单的载体就可获得信息。由于技术发展的限制,互联网的发展走了一条弯路,目前的互联网实际上是一个末端复杂,中央简单(甚至没有中央,物理线路可以没有中央)的结构。目前互联网仍然处在违背信息传播规律的方向发展,各个单位建网站的积极性很大,比如,法规网站很多,但没有一个全面的(权威的),浪费了巨大资源,造成信息查找困难,搜索引擎繁多。这种违背信息传播规律的互联网正为人们所逐渐认识,小网站越来越难以生存,大的专业资源网站正在逐步形成,也就是说互联网的信息传播规律正在回归。

---中国教育和科研计算机网管理委员会副主任 李志民


但是它的意思就是说: 民可使由之不可使知之. 人民不该自己建设网站, 应该由中央建设网站,人民就可以从中央网站上获取各种知识.

Tuesday, November 9

About IBM Linux Scholars Challenge

keso: 你联结中有一个数字部落的"IBM linux奖赛", 里面提:
IBM举办了一个Linux知识大奖赛,参加者解决IBM在利用Linux时遇到的29个挑战。

我懒得在她那里注册. 这是yahoo新闻的翻译:consists of a 1,200-word essay that can describe the solution to one of 29 Linux-related challenges IBM poses as part of the competition. "Can"被翻译成"要".
但是yahoo的下一句是:aren't limited to these challenges and can suggest and solve their own problems.
而且ibm的官方网站上也只是把这29个题目叫做"examples of challenges."
所以数字部落的说法不正确.

我是关注了这个比赛一段时间,差点就报名参加了;所以看到数字部落的说法很惊讶,就想澄清一下.

Labels: ,

Sunday, November 7

The Forgotten

Friday afternoon, I went to watch movie "The Forgotten" with Eugene in Cineplex of Square One, Mississauga.

From the posting, we thought that's a scary movie. In the posting, a woman is looking forward so hopeless, with shadows of other people. "Everything you experienced never happened".
At the beginning, Telly was thinking of her 10-year old son. From an old news paper, we now know that her son was killed in an accident 1 year ago. She watched his happy video, read the photos. Her husband and her psychology doctor gave her advice to stop thinking of him, face the fact that the child is gone forever. Everything is so normal, so I told Eugene: Maybe this is only a family-movie, not a scare-movie.

Then something happened. She refused to forget her son, but one day her son's image was erased from the photos, and the video tapes were blank, and she even couldn't find the accident from newspaper in library. People told her that her son was never existed, she created that image because she thought of that too much.

She ran away from her family. She went to a drunk man(Ash)'s house because she sent her son to meet Ash's daughter who was also killed in that accident. But Ash couldn't remember his daughter either, and he called the police.

When the policemen got Telly, two NSA agents came over and said they took care of her case. At the same time, Ash walked into his daughter's room, suddenly something hit him, he remembered everything. He went after the NSA agents and saved Telly, then they ran in the city. Car-chashing, boxing, running... Now it turns into an action-movie.

Finally, it IS an alien-movie. Some outspace-aliens didn't believe the connection between mother and child, so they and NSA created the accident and erased the memory of other people, waiting Telly to forget her son. But the connection was so strong, that Telly couldn't forget him forever, so those aliens had to admit their failures and turned everything over. Telly got her son back. (Bullshit)



Thursday, November 4

Bush, Phishing

Anyway, Bush won the election.


I learned this word "phishing" yesterday. Last week in "Hacking--do the pros now rule?" of CNet, Robert Graham said:
It's not so much that they get paid to hack, but that they earn money from hacking. Take phishing attacks: It's usually the people who are running the attacks themselves that are earning money; no one is paying them to do it.

I followed the link of phishing but found it's too complicate, so I was confused.
Yesterday watching CTV I heard this word, then I totally understood. If I read it lound, I should have found out it was respell from "fishing". My blog "Spoof email trying to steal money" on Oct, 18 descriped what was phishing already.

According to Colloquialisms Dictionary of Babylon, this term has been known in the hacker culture since about 1996, but it has only hit the headlines in the mainstream press since about July, 2003. Anti-Phishing Working Group gives an astonished number:
By hijacking the trusted brands of well-known banks, online retailers and credit card companies, phishers are able to convince up to 5% of recipients to respond to them.

Yes, that kind of email is convincing.

The Anti-Phishing Working Group encourage people to report phishing email to build a Phishing Achieve, so I sent my 2 phishing emails. It's good to know that somebody is working on it.

Labels:

Wednesday, November 3

Kerry, Uncompresser, and English training

Who will be the winner? Kerry? Bush?

A report said Kerry was more ambiguous than Bush. Kerry is a politician, and Bush is a cow boy. The point is: Is a politician better than a cow boy?

For me, I don't like Bush. He is keen on religion, so he doesn't like science much. Most people in Information Technology industry like Bill Clinton because he made some good decisions to promote the Internet, and it turns out the Internet is a big success. So I think they might vote Kerry this time.

This morning I got up and remembered the assignment 2 of 60-141. Yesterday many students asked questions of it in my office hour. Why don't I make a Flash to show the animation? It is a question in 1995's ACM Scholastic Programming Contest Finals. So I spent 1 hour to create uncompress Flash.


Yesterday I dig out an old software I made 2 years ago. I'm not so good at English Numbers, so I created this software to train myself. Click the button, the program will create 7 random numbers and speak out loud; then I must follow the numbers quickly. It helps for me, and it might help others too. One problem is: The software is created using Microsoft Speech SDK, so if the client's computer don't have that, it won't work. I should make a package including the SDK, then it will be at least 5M to download... :(

Anyway, let's see who's interested.

Tuesday, November 2

Quote: P=NP? Knuth said:

(1995)

P=NP is the most famous unsolved problem in computer science, analogous to Fermat's Last Theorem, although the P=NP problem has only been around for about 30 years, 25 maybe. In the context of combinatorial algorithms, it says: Are we going to be able to solve problems that would require going through 2^n cases? Can we actually do those in n^10, or something like that, if we knew the best method? if P=NP, the answer would be "yes", with some polynomial: we could reduce all these exponential problems to polynomial problems. If not, the answer is "no", we'll never to able to reduce them.

I have a feeling that someone might resolve the problem in the worst possible way, which is that following. Somebody will prove that P is equal to NP because there are only finitely many obstructions to it not being equal to NP. [laughter] The result would be that there is some polynomial such that we could solve all NP problems in polynomial time. However, we won't know what the polynomial is; we'll just know that it exists. So maybe the complexity will be n to the trillionth or something like that --- but it'll be a polynomial. In such a scenario we'll never be able to figure it out because it would probably take too long to find out what the polynomial is. But it might exist. Which means that the whole question P=NP was the wrong question![laughter] It might go that way. You see, even if you have a method that takes 2^n steps and you compare it to a method that takes n^100, then at least you can use the 2^n one for n up to 20 or 30. But the n^100 you can't even do for n=2. So the degree of that polynomial is very important. There are so many algorithms out there, the task of showing that no polynomial algorithms exist is going to be very hard. Still, I really thought that Fermat's Theorem was a similar kind of thing, where it was more important to have the problem than to solve it. Therefore, my real feeling about Wiles's Theorem is that he did a marvelous wonderful piece of work, but I wish he'd solved something else! [laughter]

A lot of people think that as soon as a problem is shown to be in this class NP, they shouldn't work on it, because it means that there's probably no polynomial way to solve the problem. But before we studied NP, we had unsolvable problems --- problems for which there didn't exist any algorithms at all. No matter how long you worked, you could never solve the problem. To tell whether a given Turing machine ever stops: This problem is unsolvable by any algorithm, in general, no matter how long you give yourself. In the days before NP became famous, people would stop working on a problem as soon as it was proved to be unsolvable in general. But that was a bad strategy, because almost every problem we ever solve is a special case of some unsolvable problem.

Take calculus, for example --- the problem of taking a formula, a function of n, and saying: "Is the limit as n goes to infinity equal to zero or not?" That's an unsolvable problem. But its unsolvability doesn't imply that we shouldn't study calculus. I mean, limits of lots of useful functions do go to zero, and therefore people were able to develop calculus. But the general problem is unsolvable. I mean, you could define f of n --- it only takes a few lines to make a formula that is equal to zero if a given Turing machine is stopped at time n, and it's equal to 1 if the Turing machine is still going at time n. And so the limit is equal to zero if and only if that Turing machine stops. It's unsolvable.

A similar thing happens with NP. That is, we have lots of special cases of problems that are NP-hard that we can solve efficiently; just knowing that something is NP doesn't mean that it's a good idea to give up on it or to stop trying to get good heuristic methods for it.

Labels: ,