Tuesday, July 20, 2010

different way to PAUSE the program

in UTAR, we hv been teach how to pause a program using:
#include ‹stdio.h›
#include ‹stdlib.h›
int main()

{
printf("Pause the program!\n");


system("pause");
//Pausing the program

}

but i gona introduce u guys for different ways to pause a program, using getchar(); or scanf(); ( read dis, Things to Avoid in C/C++ -- system("pause") )
1st, we will talk abt using scan();, u juz simply type scanf("%d",&cincai); b4 ur program's exit point : for example;

#include ‹stdio.h›

int main()
{
int num;

printf("Pause the program!\n");

scanf("%d",&num); //Pausing the program

//Exit point/return 0;
}

dis approach can "pause" ur program, but the sad thing is, u hav to declare and assign a new variable (mayb u can assign to old variables when u hv multiple variables), n the executable size will b larger ( c more info on : Things to Avoid in C/C++ -- scanf )

another way is to use getchar(); , dis is much simpler as it doesnt need to assign or declare variables, it is oso "cleaner", and doesnt require extra library like system("pause");

way for doing dis is juz as simply as following:

#include ‹stdio.h›

int main()
{

printf("Pause the program!\n");

getchar(); //Pausing the program

}


dats all i hav to say abt dis topic, below is de screenshot where i cant get system("pause") do the job well, as stated in the article Things to Avoid in C/C++ -- system("pause") .

黑色U默

优大之大,大于地。但泊车位与其地之比例,却堪甚低。泊车位之比例如此低,已不在话下,如今更大方面限制脚车位,简直令人不齿!

回首上一年,除入优大之时,众脚车在 Block A, Block B 的排列,堪称金宝优大之奇观。随后,管理层以所谓的“有碍美观”,开始缩小脚车在优大的“势力范围”。优大生开始与管理层的拉锯战正式开幕,双方各施妙计,你泊我放,你放我照泊;你泊我放加我指,你放你指我仍照放;你放我就锁,你锁我放沟渠,之类的计谋策略太多,差点能比上三十六计。

但如今,管理层更将 Block D 与 Block E 的脚车位缩小,令许多脚车主人不知何去何从。为何管理层要如此决定?我至今亦只能有一点点头绪,管理层如此行事,是因为马华驾到。为免“有碍美观”,他们就重施故技。

我想,优大的管理层有点幽默,用红线划分地区,有何美观之有?脚车放得紧紧挨在一起,如同连体婴,又有何美观之有?你优大地这样大,何必要干尽杀绝?

我脚车以一轮之差,被锁。很好,长期以来对优大的不忿,有了宣泄之处。我在这里正式宣布,从今起不爽优大!我誓要将我的degree抢来,以泄我心头之恨! UTAR, F U!

Sunday, July 18, 2010

life's report

8th of July: attended a Questnet(Qnet) thingy.

10th of July: went KL to attend the mind's competition + Data comm mid term, open book,neighbour,internet,fone,copy

11th of July: mind's competition, back to kampar
12th of July: rush for midterm
13th of July: deadline of midterm

1st, i have to warn my readers, DON JOIN QUESTNET!AVOID QUESTNET!. It's not easy simple as u think.u wanna noe my story?ask me, i'm too lazy too blog it out.

2nd, attended a mind competition at UTAR PJ campus. Attended it becoz of 1. moni, 2.memory, 3.experience. 1st time take bus alone go KL, 1st time take KL LRT(my 1st 1st time of LRT gave to Singapore ^^), 1st time at different state without family members or relatives, 1st time attended such a open public event, whre dis is no limit to age,place,skol,religion,country, 1st time experience the rushing life of KL, 1st time take bus alone frm KL go to Kampar. Yes,u might say "WTF?like dis oso nvr try?", ya, i nvr tried b4, but nw i did, n i reali DON like the life of KL+SG, hope i'm nt going to work dere.

3rd, open public competition brings u lots of pressure, especially when the youngest contestant juz sit right beside u, and her paper is full of answers(but i duno wheter she simply write or nt), the more presure u get when dere's more ppl younger den u, AT LEAST FOR ME.

4th, de KL trip not as smooth as expected, many thing happened, many plans changed, but i hav to say thank you, for every1 supporting me, frm the moment i decided to attend dis competition, till i reach my Kampar's room. thanks you, for arranging places for us to stay, thank you for your time, thank you for answering my fone, thank you being my road guide, thank you thank you very much. without u all,i cant learn as much, n i might get lost in dat city.

5th, ALL MY primary + secondary skol DREAMS CUM TRUE! u ever had a test b4, which open book, open internet,open neighbour,open notes, open copy? even let u to take home to finish it??? i had it in UTAR KAMPAR, Data communication and networking! but wtf, estimated i get 50 marks onli.....blieve it or nt, at the end of the test, our lecturer lagi mau +10 marks!! WTF!!

Sunday, June 20, 2010

6月13号

这一天星洲日报主办了一场活动,我们本来打算早起早去,却因为一人迟到,害到我们差点不用参加。到了集合地点一看,哇佬!很多人!虽说知道有一百多队参加(每队四人),但是还是吓了一下。吓,是因为怕,一百多队。。。怎样赢?

这个活动,其实是在找回一些怡保的老店,又或者是怡保的名声古迹,总之就是寻找怡保的“宝”。由于有先见之明,我们有一样秘密武器--传单。我们很快就把怡保的古迹填完了。剩下的,call了朋友查。剩下的就是专攻店名。

在路上,一直用我们的话小聪明答问题,还跟委员合照。他们真辛苦,偷拍不成,还被我们逼来拍照。哈哈!我们本来是最后出发的一组,到了加分站却是第一组。我们都被自己的速度吓倒。在玩完所有的加分题后,我们还是慢慢的拖,还跟委员们谈天,就是不交问答卷。等到差不多的时候才交了。可惜了没有机会和她们合照。

在揭晓答案的时候,我们的心都凉了一半,有些店名写错了,有些答案好像不被接受。。。就想:盼个Top 10吧,可是都到了Top 5都没有名字,再想:难道是Top 5里面?心情非常紧张,因为我想拿的是前三名,但是宣布了第三名,还是没有我们的组,只剩两组了。。。就在这时听到了我们这组!我们还懵了一下,以为听错了,当到我们确定时,那种兴奋,那种一霎间的感动,真是文字无法形容。

很开心作为最年长的参赛者,还能获得第二名,也看到我中学的学弟获得其他名额。虽然奖金比较少,但是能够有此回忆,已经是值得的了。

6月12号的回怡保之行

在6月12号当天,经过多时策划,终于赶回怡保。由于时间紧凑,在上完课后,就立即回了。但由于顺风车只顺风,不顺路,只好回到JPP。之后打了巴士,去到了Oldtown Kopitiam。在等了一个小时多,终于到了约定的时间。快快弄好之后,又蹬舵半小时才等到妈妈来载。这时大约是五点三。再匆匆地去剪头发,贵到!!算了,没有下次。回家快快冲凉,在差不多七点出门了。

几经曲折,终于去到了培南国中。一干废柴等了已久。见到了面,当然少不了互“吊”一番。在吵闹打笑了大约半小时后,培南KRS Gathering开始了!(其实开始很久了)进礼“棚”,少不了各式各样的花式鼓掌。当然,轮到吵,放眼怡保有多少学校吵得过JPP?尤其有我们这班“吵人”在坐镇。由于礼“棚”的密不透风,我们(只限废柴)多番大摇大摆的走出棚外。表演话剧的时候,哇,一美女!当时醒神。还加插一句话,令到台上的男主角千夫所指。看着那么多人配合自己,简直爽!我们这班狼,有一个被她吸引了。叫他趁人少认识她,却在那边扭扭捏捏,damn!

在话剧之后有一段空节,就跑了出去喝茶。初五时ponteng的感觉回来了~在我们回到去的时候,到了歌唱环节,虽然错失两位参赛者的表演,但还是赶得及看其他的。到了某位美女(和话剧美女同一人)歌唱的时候,我们这班狼,为了兄弟,挖破脑袋兼牺牲色相(所以我们是狼),帮他想了一个办法。办法就是:学人家上台送鲜花。但是现场没鲜花喔?没办法,就地取材,荧光棒!我们二人的送棒举动,引得全场骚动!当然啦,做傻事,有谁够“九大”傻?难怪他们只能欢呼。。。在美女下台后,众人去寻找倩影,进行下一步计划。奈何方圆50m内,都找不到了。之后碰到了我们学校的dancer,在互不认识的情况下打了招呼@@;;有一个,甚至被我们“欺负”。哈哈!在厕所的时候发现了这个!


到了跳舞的时候,各个学校浑身解数,看得人们眼花缭乱。我们在看的时候依然保持头脑的冷静,分析战局,顺便打开“美女雷达”,继续寻找那一位。终于舞也跳完了,到了Gathering必备节目,crazy time!就在这时,又看到了那位美女!而这位朋友又要认识人家又要拍照,却仍然扭扭捏捏。妈的,算了,我帮你打头阵!过程如下:

JM:lenglui!可以给回那支荧光棒我吗?
美女:?
JM:(指一指荧光棒)我想拿回。
美女:!(递过来)
JM:谢谢。(跑人!)

其实要说拿照片也可以了,但是兄弟已mark,就算了吧。不过自己的搭讪功力,都有番咁上下啦。之后就是高调的吵闹,低调的kacau,顺便kacau一下那位dancer。。。之后的也没什么好说的,拿不拿奖与我无关。自己拿到照片才是就重要的!趁还没回,赶快跟那位dancer合照!

之后就欢天喜地地去喝茶,回家~

Wednesday, May 5, 2010

FREE softwares to intro..

actuali i hav been looking for softwares dis 2 weeks, sum software r powerful, like USBSafelyRemove, Balsamiq Mockups, EfficientPIM, but dey r commercial..but sum software is poweful, yet they r actuali free, n sumtimes dey reali perform den those commercial 1...dis time, i'll blog abt sumthing techny, which is sum powerful+ free softwares i hav discovered, through a freewares review website ( Gismo?Gizmo?cant rmb)..

Freeware 1: PicPick

dis a screen capture software, which can actuali replace the old dumb printscreen of microsoft....it allows u to edit it juz after u hit the printscreen key, unlike the old 1...which u nid to hit the key, den paste it in paint, den edit/ save it...it oso allows u to select different printscreen option, like fullscreen capture, window capture, region capture....it is a nice tool for me...especially it's FREE...lol

Freeware 2: Amaya

dis is a WYSIWYG( wat u c is wat u get) editor for webpages...it is a powerful editor, whre u can c ur designs in a fast way, without repeatition of ctrl+s, den f5 in ur browser...don wori about the validation, becoz it is actuali developed by W3C's ppl...woot!!

Freeware 3: Dimension 4

it is a time synchronizer...which is better den microsoft's...y say so?becoz i oways failed to synchronize my time through microsoft's synchronizer, and D4 hav lots of places to let u choose whre to synchronize wif...

Freeware 4: Metalogic Finance Explorer

dis a gud personal finance software, whre it enables u to kip track whre u spent ur money...yes,dere are lot more of personal finance software dat hav better user interface, better usability, but those software : 1st, dey r commercial. 2nd. dey r nt wat i nid, i juz wan to kip track of my money, nt doing double entry. 3rd, dey confuse u wif lots of buttons..i find it useful becoz i'm a student, i jz wan to noe whre i spent my money per month, and the estimated balance, and don nid to do double entries to show to my mom...@@;; it shows it's usefulness when i don nid to find back my piece of "finance paper" jz to record my spending...LOL..

Freeware 5: Vista Services Optimizer

as the name showed, it helps u to turn off unnecessary services, which can optimize ur comp's performance, it oso hav a "switch to Game Mode" feature, whre u can increase ur game plying pleasure..it is powerful , becoz it clearly shows u the services dat can b turn off, it oso enable u to backup ur services b4 doing any harm to ur OS...it reali helps me,espcialy i hav encountered sum "kip minimizing" problem" when i open war3....nw, de problem gone when i switched to game mode,HAHA!!and once again, IT'S FREE!

Saturday, April 24, 2010

挽起袖子,弯下腰来,继续打拼。

在南洋副刊看到了这则文章,讲得很好。文章的中心就是“你要什么,就在那里弯腰......捡起来。事情就这么简单。“末了还加一句”努力不要一点点,要多一点点!"

读完了这篇文章,觉得是一个字在作怪--“心”。有“心”,千里能相聚;无“心”,一百块在你脚下也不会捡起来。
有些时候,不是我们不努力,而是不够努力。有些时候,我们有目标,却没行动,所以永远停留在对岸。

以前看过一篇文章写道:“男追女,隔重山;女追男,隔层纱。但也要男的有心去跨那山,女的有心去揭那层纱才成。“ 是呀,有心,隔着山又如何?没心,隔着纱,你还是不能得到。

愿身边的朋友,有那心去跨山,揭纱。不止爱情,事业理想亦是。