Internship in C++

#include
#include
#include

class Internship{
public:
template
Internship operator( good_mood_type& good_mood , bad_mood_type& bad_mood) {

void get_stress_level (bad mood) {

int stress_counter = 0;
if ( "supervisor calls me for nothing")
stress_counter++; // kan cheong!!

else if ( "supervisor asks to do something that I never learned before")
stress_counter +3; // usually I have to master it in 1 - 2 days

else if ( "supervisor asks me to go back and check a certain myself when I told him I don't understand") // knn, he hardly explains
stress_counter +5;

else if ( stress_counter > 50 ) // which likely to happen everyday
std::cerr << __FILE__<<__LINE__<<
" Compilation ERROR. The intern is suffering from depression. Please try the program again on the next day."<< std::endl;
throw;
}

void get_fun_level ( good mood, bad mood) {

int siokness, kns;
siokness = 0; kns = 0;

while ( in BII building ) {

for ( double time = 8.30am ; time < 6.00pm; time +30mins)
if ( time > 8.30am && time < 10am)
siokness +2; // breakfast, read manga, check mails time

else if ( time > 10am && time < 12.30pm)
siokness-- ; // serious programming time,usually head cracking time
kns ++; // if only when the supervisor comes and asks me for progress

else if ( time > 12.30pm && time < 1pm)
siokness+3: // 1hour flexible lunch time will usually end up to be a 1.5 hours one LOL
kns ++ ; // if it is raining at the lunch time and we have to have our lunch at the damn expensive canteen

else if ( time > 1pm && time < 5pm )
siokness -2;
knst +5; // programming time, when I always have to do something I never heard before

else if ( time > 5pm && time < 6pm)
siokness ++; // increases gradually because it is gonna be the 'bang gang' time!

else if ( time > 6pm) // where I had my OT today dammit
siokness = 0;
kns +++++++++++++++;
}
}

void test() {

if ( "supervisor sees this post")
std::cerr << __FILE__<<__LINE__<< " Gosh, YOU ARE FIRED!" < else std ::cout << " HENG arh!! Neh worry.." << std::endl;
}


std::cout << " --------------------------------------------------------------------------------------------------------------------------" <
END OF STUPID POST
DUE TO THE BO LIAO-NESS IN COMPANY

Imaging

Wootz~
Finally, I finished my assignments before "bang gang" just now!! ;p
It's sorta like a great achievement for finishing this by myself

I was wondering if C++ can read image and even manipulate images
when my supervisor was telling me about the tasks.
Ranting like mad since yesterday because I didnt have any idea on how to do it.
But then, chiang chiang...
*shareshare*
although these are just the kacang in this imaging field
Below are the manipulated images with c++ in Linux

original scenery image


By using the thresholding method, I could change the colours of the pixels into just black and white, with the threshold value of 128 in 8-bit system. chim leh ;p



Image erosion with structuring element of [0,1,0,1,1,1,0,1,0]3x3.
Erosion is one of the two basic operators in the area of mathematical morphology, the other being dilation. It is typically applied to binary images, but there are versions that work on greyscale images. The basic effect of the operator on a binary image is to erode away the boundaries of regions of foreground pixels(i.e. white pixels, typically). Thus areas of foreground pixels shrink in size, and holes within those areas become larger.


Image dilation with structuring element of [0,1,0,1,1,1,0,1,0]3x3.

Dilation is one of the two basic operators in the area of mathematical morphology, The basic effect of the operator on a binary image is to gradually enlarge the boundaries of regions of foreground pixels (i.e. white pixels, typically). Thus areas of foreground pixels grow in size while holes within those regions become smaller.

Convolution method.

Basically it's of the same concept with dilation and erosion. The difference is that it has a weightage kernel where all the elements in the kernel have a total up to 1. Instead of having all the boolean numbers/binary which are only 1 or 0.

I couldn't really imagine that these simple functions in photoshop are actually consuming like hundreds of command lines.

Yea, I did learn something in this internship.
Will SHOW OFF more of my projects soon. ^^

3rd day of internship



My workspace in BII
It's an Ubuntu 8.04 OS and I have to learn everything
as in programming in Linux and also C++ in Linux

3rd day of internship, Internet resumed!!
and I've already gotten my 1st 3 ASSIGNMENTS!!

to read and manipulate image in C++ (wth?what's that?!)
to read and erode the image(......)
to read and then dilate the image(....................)
to apply a kernel on an image in order to erode and dilate it (kill me babe)

when I actually looked for the tutorial in those online forums
they are saying that to read and display an image in c++ is not easy
some even said that these are their phD assignments sia....

STRESSED STRESSED....

but no due date la,
supervisor asked us to take our own sweet time to finish it

矛盾的思绪

夜深人静,也该静吧
我想也没有人会像我这样无聊
这么夜了都还不睡
况且等下还是第一天上班


在想念 我们无所不谈的时候
不懂当时的执著到底是为了什么

在想念 隔着千里也能每晚对着荧幕的欢笑
检讨着当时那坚决的态度是否对错

在想念 一大清早被电话吵醒的时刻
想念着那另一边的声音
回忆着朦胧中和你乱搭话的对白
回忆着那份对我来说带有细细的甜蜜

现在 和 之前 有差了
不懂当时为何要扮得 好像一切都无所谓
也不懂为何当时要那么细挑谁的对错

不懂能否再回到过去
就算。。。允许。。。
那一切一切的问题 也还是都会存在着。。。吧!

曾经想过要放弃的感觉
现在却可以肯定地 直接地说
它 没变质

不过
现在的情况 对你我来说
也不失为是一个较好的解决方案

考试后的这几天

话说
在亚洲的一个小小岛
经历了他X的一整个星期超级炎热的天气后
终于 昨天 在一阵的小雨后 天气转凉了
而我在考完试后 也得到了盼望已久的

自然醒 的特许 *感动*

凉爽的天气加上无限期睡觉的自由
哇噢 这简直就是仅次于人间仙境的享受
想到都会偷笑一两下 做梦也做得爽一点
哪知 真的!
当我还在我美梦里时
突然 一阵阵的凉意 吹拂到我大腿还有大腿内侧
不会真的让我这么爽到吧?! *好鬼舒服啊*
不过 越吹就越觉得不对劲
结果一张开眼 果然!!
我那房门开到最尽! very the max...!!!!!!!!!!!!!!! *无言*


*夜晚版*今早我应该是在这种情况下睡了蛮久吧* 靠!

p/s : 这门的门锁坏了!!!
那该死的roommate又...听着 是 忘了锁门
我靠。。。愤怒 抓狂 他祖宗 三字经 都同一时间涌上心头
他祖宗和三字经还不时从嘴里掉出来
他怎么那么不爱锁门啊! 又不是没向他提过 *抓狂*
要是有一天 手提电脑 电话 PSP 还有色相什么的都被偷了
那该怨谁??? 吊!
好心情一整个都被破坏掉了 还什么人间仙境的享受

惟有醒了
看看anime 和准备做工去
到了图书馆 就平常一样收拾和整理书籍
好不容易忍耐了那三个小时
当怀着解脱的心情放工之时 supervisor就当着我面走来
一定没好康 结果 马票买都没那么准
“ 俊宏 来 多做一个小时 帮我设计一个notice template”
*一整个人直接显掉* 怎么不早点找我弄啊!*
没办法 只好 心不甘 情不愿 的乱设计一通

结果 哇哈哈
她看了之后好不喜欢
一直拿着那暗淡的设计说
“不错不错 颜色配得很好 看起来很舒服”
“有你我就放心”
这时我就真的哭笑不得 乱搞一通还被称赞 哈哈
请叫我 师奶杀手!!!

当然 她还有ultimate啦 接着就说
“好啦 酱你明天九点来这边 把B1 和 B3 的template都弄好 早点来早点做完”
*整个人又傻掉, 明天应该是做两点到七点*
“emm ... errr... 我可以迟些才来吗, 就不要九点” 我说
“噢 你要睡迟些是吗 那好咯 你十点来” *纳闷*
九和十会差很多吗? 又抓狂。。。
过后还有一些小纠纷 懒得详细的说了
总之到最后都还得要十点做工

前几天去了BII 上 Internship Orientation
公司在Biopolis 到了那就好喜欢那个地方
那简直就像一个繁忙的小镇 感觉好不错
也好高科技(第一次用了比较高科技的电梯)
就BII大厦的电梯来说
用了吃奶的力来按了电梯里七号钮都还不亮的我
在停着的电梯内傻傻地呆了超过30秒
想不通。。。最后只好开电梯门出去

在这时刚好有一位“安娣"走了进来
用了蛮疑惑的眼神看了我一下
(这时的我只是在想 要不要出去呢?还是看看这安娣怎么操作电梯吧)
只见她用她的员工卡在电梯内扫了两扫
然后再按钮 竟然按得着!!
(神奇叻... 才怪!原来如此。。那里的电梯是要用员工卡才能操作的 好noob啊)
我也按了按七号钮 然后再回头看那安娣时
只见她疑惑的眼神变成了鄙视的眼神
就像很看不起我这堂堂前途无量的年轻人
糗爆了 被安娣看不起啊!好愚啊。。。 杀了我吧
没办法 没用过高科技电梯 仲noob过安娣

在BII上班算是蛮flexible的
午餐时间自由 当然是限制在一小时内。。。
上班不要太过分的迟到是没关系的 (HR说的 哈哈)
最重要的是 上班不用穿formal attire!! 爽死了
可以省下这笔钱买其它东东 ;P
蛮期待这个实习的经验 好好干一场吧