Saturday, December 29, 2007

sabayon

萨芭雍(Sabayon
著名的典型宫廷代 表作。它是一道充满酒香、蛋香的意大利著名甜品,尤其浓稠柔细的蛋糊,覆盖于应季水果上,再加上微微烤过后的所散发出来的焦香。冷与热,甜蜜与新鲜,微薰 与清洌之间的交揉,直叫人不饮也醉。在一片柔和的灯光下,伴随着和谐的音符,享受着萨芭雍所带来的恬静与淡雅,交杂着你的心境,你会感触萨芭雍所带来的许 多许多~~~~~。

萨芭雍 Linux(Sabayon Linux)
一款基于强大的Gentoo Linux的发行版,具有简单快捷的安装方式,强大的硬件支持,预装了3D桌面(Beryl, Compiz, Metisse),支持虚拟化技术,支持Ext4文件系统,具有漂亮的红色界面……绝对物有所值!

--
顺颂秋安
Jason, Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Friday, December 28, 2007

再接再厉

安装一个avant-window-navigator,灰常灰常的漂亮可爱。
动态的icon跳跃着,桌面显得活蹦乱跳。
在pidgin中安装awn的插件,可以在icon显示pidgin消息状态,神奇。
gnome果然是gnu network object model environment啊!

另外,离KDE 4.0发布还有13天了,哈哈

小三拿去修理,价格440元一块原装液晶屏,但愿能回复本来模样。
明天可取。

卖掉握了几个月的华夏蓝筹,买入价1.283元,卖出价1.409元,
只赚了190元钱,不够修理小三的钱。。。

--
顺颂秋安
Jason, Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Thursday, December 27, 2007

不小心把手机折断了

可怜的三星U608,由于太薄,被我不小心折断了液晶屏。
現在很苦闷,只能看到右下角一半的屏幕。

--
顺颂秋安
Jason, Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

不小心把手机折断了

可怜的三星U608,由于太薄,被我不小心折断了液晶屏。
現在很苦闷,只能看到右下角一半的屏幕。

--
顺颂秋安
Jason, Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Tuesday, December 25, 2007

归去来兮

归去来兮,田园将芜胡不归?既自以心为形役,奚惆怅而独悲。悟已往之不谏,知来者之可追。实迷途其未远,觉今是而昨非。 舟遥遥以轻飏,风飘飘而吹衣。问征夫以前路,恨晨光之熹微。
乃瞻衡宇,载欣载奔。僮仆欢迎,稚子候门。三径就荒,松菊犹存。携幼入室,有酒盈樽。引壶觞以自酌,眄庭柯以怡颜。倚南窗以寄傲,审容膝之易安。园日涉以成趣,门虽设而常关。策扶老以流憩,时矫首而遐观。云无心以出岫,鸟倦飞而知还。景翳翳以将入,抚孤松而盘桓。
归去来兮,请息交以绝游。世与我而相违,复驾言兮焉求?悦亲戚之情话,乐琴书以消忧。农人告余以春及,将有事于西畴。或命巾车,或棹孤舟。既窈窕以寻壑,亦崎岖而经丘。木欣欣以向荣,泉涓涓而始流。善万物之得时,感吾生之行休。
已矣乎!寓形宇内复几时,曷不委心任去留?胡为乎遑遑欲何之?富贵非吾愿,帝乡不可期。怀良辰以孤往,或植杖而耘耔。登东皋以舒啸,临清流而赋诗。聊乘化以归尽,乐夫天命复奚疑!

--
顺颂秋安
Jason, Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Monday, December 17, 2007

熬夜很辛苦的

大家千万不要熬夜。
另外,床很重要。人生大半时间在床上过了。
毕业了一定要物色一张好床。

--
顺颂秋安
Bisous,Jijun MA
http://jjmmma.com/
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Monday, December 10, 2007

D-Feet - a D-Bus Debugger 发布

http://www.j5live.com/?p=418
John Palmieri 同学发布了一个 D-Bus 调试工具,叫 D-Feet。





该工具是用来调试 DBus 上的程序滴。现在只是一个雏形,但是相信在不久的将来会成为一个非常有用的工具!
现在可以在 D-Feet 中查看各个 Session 和 System bus 上的信息。

当前功能:

  • 查看 session 和 system bus 上的名字
  • 导出 object, interface, method 和 signal
  • 查看 bus 上的服务命令
  • 在 bus 上执行带参数的方法,并能得到返回值

计划中的功能:

  • 添加任意地址
  • 查看,编辑和调用函数
  • 查看信号
  • 在事件上添加触发器
  • 对 D-Bus 上的调用进行分析
  • 帮助创建非同步调用链

Info

Homepage: http://hosted.fedoraproject.org/projects/d-feet/
Tarball: http://johnp.fedorapeople.org/d-feet-0.1.4.tar.gz
Fedora: yum install d-feet




--
顺颂秋安
Bisous,Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Saturday, December 8, 2007

今天递交三方协议

下午提着三方协议去NSN交给Hong MM,原来这个Hong MM就是NSN笔试的监考官,hoho,挺善良的人。
手续办齐,Hong MM寄到北京盖个章在回来。本想和sunkist MM一起回来,可惜她5点半才下班,只好先回了。
在一桥附近晃悠了个把小时,算是摸清楚那边的地形了。真是个风水宝地呀,临江而居一定很舒服很舒服。
小翟的公司就在一桥旁边,偷偷溜了进去,好大好宽敞。小翟的公司是扁平的楼群,不像我们公司,就一幢高高的楼。
下午回到寝室,查看邮件,发现收到了阿尔卡特的offer了。。。为什么,为什么很多事情总是在我抽身之后上演?
要是早点拿到阿尔卡特,我或许会考虑去那里,我想去上海。但愿不要再来Marvell,还有那些法国学校的offer了。
一个萝卜一个坑就好。晚上BG菜园子小聚外婆家海吃,拖了好久的bg,终于允现了,哈哈,终于见到了很多久仰的大人物。
本来后续活动还要去DQ和胖大妈鱿鱼,可是又有另外个场子,只好对不起菜园子的朋友们,先撤了,哈哈
ORZ,一点多了,洗漱睡去。

--
顺颂秋安
Bisous,Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Monday, December 3, 2007

找到工作了

nokia siemens networks at 滨江,杭州
今天签了

--
顺颂秋安
Bisous,Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Thursday, November 29, 2007

客串客串

最近客串当月老,忙得不亦乐乎。
先先后后调解了几对闹矛盾的两口子,
撮合了几对痴男怨女。
現在正在经手一对哥哥姐姐的牵线ing
不过呢,之前也有搭桥失败滴,失败的原因捏多种多样。
然而呢,在这些失败中,我增长了丰富的经验,教训,直觉,眼神,学会了如何辨别哪一对男女更加匹配。
hoho,继续客串月老红娘圣瓦伦丁,成人之美,哈哈

--
顺颂秋安
Bisous,Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Thursday, November 22, 2007

咱们程序员应该很喜欢这个家具



恩,括号匹配很完美。

Sunday, November 11, 2007

Wine 0.9.49 发布

Wine 0.9.49 10日发布,如下重要更新:

  • 修正很多复制保护。
  • GLSL 默认支持 Direct3D 。
  • Valgrind 改进了很多内存错误。
  • 支持TOPMOST 窗口。
  • 开始实现inetcomm dll 。
  • 修正很多 bug 。

Monday, November 5, 2007

网易笔试题目

收集一些笔试面试经验。
以下是BBS上的帖子,我的一些补充会用绿色字体表示。

发信人: strenuous (穿梭回来的感觉真好), 板面: CS
标  题: 我来做做贡献吧,回忆今天的网易笔试题目
发信站: 飘渺水云间 (Mon Nov  5 17:30:52 2007), 转信

剩下的记不清了
1 CPU高级缓存的用处
高速缓存:Cache Memory,位于CPU与内存之间的临时存储器,它的容量比内存小但交换速度快。在Cache中保存了正在运行的程序的经常执行的数据和指令,就避免了通过BUS从内存读取数据和指令的瓶颈。
一般主流的CPU片内都有L1 Cache,在紧靠CPU还有L2 Cache;也有的将L1,L2 Cache都做到CPU上,紧靠CPU的芯片上还有L3 Cache。一般L1 Cache的运行节拍和CPU一致,L2 Cache的速度也是RAM的2~3倍。与此类似,硬盘也有Cache系统,叫做Disk Cache。Disk Cache和Memory Cache的功能类似。

2 用尽量少的矩形表示一个不规则形状,写算法
原题是MFC里用矩形来模拟不规则窗口。

3 快速排序代码实现
void qsort(int a[], int left, int right)
{
  int i, k, last;
  if(left>=right)
    return;
  swap(a,left,(left+right)/2);
  last = left;
  for(i=left+1;i<=right;i++)
    {
      if(a[i]<a[left])
        swap(a,++last,i);
      for(k=left;k<right;k++)
        printf("%d ",a[k]);
      printf("\n");
    }
  swap(a,left,last);
  qsort(a,left,last-1);
  qsort(a,last+1,right);
}

class A {...} typedef A* PTR;
Void foo (const PTR aptr)
{
*aptr=A();
}
Void foo(PTR const aptr)
{
*aptr=A();
}
哪个正确? 应该都正确吧。
const指针和指向const变量的指针的区别

4 什么叫 C++ Traits?  模板类的特化实现的类库?

http://jjhou.csdn.net/programmer-6-type-traits-ddj.htm

泛型编程编出来的代码,适用於任何「吻合某种条件限制」的资料型别。这已成为撰写可复用代码时的一个重要选择。然而,总有一些时候,泛型不够好 ─ 有时候是因为不同的型别差距过大,难以产生一致的泛化实作版本。这个时候 traits 技术就变得相当重要。这种技术可以将那些需要被纳入考量的型别性质以一种 type by type 的原则,封装於一个 traits class 内,於是可以将「由於型别之间的差异,必须撰写出来以备用」的代码体积降至最低,并使泛用代码的体积提升到最高。

考虑一个例子:当我们处理字元字串(character strings)时,常见的一个操作行为就是决定「以 null 为结束符号」的字串的长度。很明显我们不可能写出一份泛型代码取代众所周知原本就存在的极有效率的解法:是的,C 标准函式 strlenwcslen 通常是以组合语言完成,如果再加上适量的硬体支援,就能够比 C++ 泛型版本有明显的速度优势。C++ 标准程式库的作者了解这一点,所以他们抽取出 charwchar_t 的性质,置於 class char_traits 内。於是,泛型代码一旦处理字元字串,便可以简单地使用 char_traits<>::length 来决定一个「以 null 为结束符号」的字串的长度,并且很安心地确知 char_traits 的特化版本将采用最适当的方法来完成任务。



5 Java题目:
interface 和 abstract的区别。如何选用。
http://mindprod.com/jgloss/interfacevsabstract.html
Interfaces vs Abstract Classes
feature interface abstract class
multiple inheritance A class may implement several interfaces. A class may extend only one abstract class.
default implementation An interface cannot provide any code at all, much less default code. An abstract class can provide complete code, default code, and/or just stubs that have to be overridden.
constants Static final constants only, can use them without qualification in classes that implement the interface. On the other paw, these unqualified names pollute the namespace. You can use them and it is not obvious where they are coming from since the qualification is optional. Both instance and static constants are possible. Both static and instance intialiser code are also possible to compute the constants.
third party convenience An interface implementation may be added to any existing third party class. A third party class must be rewritten to extend only from the abstract class.
is-a vs -able or can-do Interfaces are often used to describe the peripheral abilities of a class, not its central identity, e.g. an Automobile class might implement the Recyclable interface, which could apply to many otherwise totally unrelated objects. An abstract class defines the core identity of its descendants. If you defined a Dog abstract class then Damamation descendants are Dogs, they are not merely dogable. Implemented interfaces enumerate the general things a class can do, not the things a class is.

In a Java context, users should typically implement the Runnable interface rather than extending Thread, because they're not really interested in providing some new Thread functionality, they normally just want some code to have the capability of running independently. They want to create something that can be run in a thread, not a new kind of thread.The similar is-a vs has-a debate comes up when you decide to inherit or delegate.

multiple inheritance for further discussion of is-a vs has-a
plug-in You can write a new replacement module for an interface that contains not one stick of code in common with the existing implementations. When you implement the inteface, you start from scratch without any default implementation. You have to obtain your tools from other classes; nothing comes with the interface other than a few constants. This gives you freedom to implement a radically different internal design. You must use the abstract class as-is for the code base, with all its attendant baggage, good or bad. The abstract class author has imposed structure on you. Depending on the cleverness of the author of the abstract class, this may be good or bad.
homogeneity If all the various implementaions share is the method signatures, then an interface works best. If the various implementations are all of a kind and share a common status and behaviour, usually an abstract class works best. Another issue that's important is what I call "heterogeneous vs. homogeneous." If implementors/subclasses are homogeneous, tend towards an abstract base class. If they are heterogeneous, use an interface. (Now all I have to do is come up with a good definition of hetero/homo-geneous in this context.) If the various objects are all of-a-kind, and share a common state and behavior, then tend towards a common base class. If all they share is a set of method signatures, then tend towards an interface.
maintenance If your client code talks only in terms of an interface, you can easily change the concrete implementation behind it, using a factory method. Just like an interface, if your client code talks only in terms of an abstract class, you can easily change the concrete implementation behind it, using a factory method.
speed Slow, requires extra indirection to find the corresponding method in the actual class. Modern JVMs are discovering ways to reduce this speed penalty. Fast
terseness The constant declarations in an interface are all presumed public static final, so you may leave that part out. You can't call any methods to compute the initial values of your constants. You need not declare individual methods of an interface abstract. They are all presumed so. You can put shared code into an abstract class, where you cannot into an interface. If interfaces want to share code, you will have to write other bubblegum to arrange that. You may use methods to compute the initial values of your constants and variables, both instance and static. You must declare all the individual methods of an abstract class abstract.
adding functionality If you add a new method to an interface, you must track down all implementations of that interface in the universe and provide them with a concrete implementation of that method. If you add a new method to an abstract class, you have the option of providing a default implementation of it. Then all existing code will continue to work without change.


俩对象相等( x.equals(y)==true),则x,y有不同hash数值吗?
Equal objects must produce the same hash code as long as they are equal, however unequal objects need not produce distinct hash codes.
hashcode相同的两个对象不一定 x.equals(y)==true,但是 x.equals(y)==true的一定hashcode相等。


6 Windows题目:
如何实现QQ的魔法表情?
Gdi,gdi+,opengl,directDraw的不同,如何选用,界面开发用哪个?
MoudleState是什么?
7 linux: 如何进程间通信?

8 数据库:
什么是事务,ACID属性是?

http://technet.microsoft.com/zh-cn/library/ms190612.aspx

事务是作为单个逻辑工作单元执行的一系列操作。一个逻辑工作单元必须有四个属性,称为原子性、一致性、隔离性和持久性 (ACID) 属性,只有这样才能成为一个事务。

原子性

事务必须是原子工作单元;对于其数据修改,要么全都执行,要么全都不执行。

一致性

事务在完成时,必须使所有的数据都保持一致状态。在相关数据库中,所有规则都必须应用于事务的修改,以保持所有数据的完整性。事务结束时,所有的内部数据结构(如 B 树索引或双向链表)都必须是正确的。

隔离

由 并发事务所作的修改必须与任何其他并发事务所作的修改隔离。事务识别数据时数据所处的状态,要么是另一并发事务修改它之前的状态,要么是第二个事务修改它 之后的状态,事务不会识别中间状态的数据。这称为可串行性,因为它能够重新装载起始数据,并且重播一系列事务,以使数据结束时的状态与原始事务执行的状态 相同。

持久性

事务完成之后,它对于系统的影响是永久性的。该修改即使出现系统故障也将一直保持。


索引如何建? 建的原则是?
9 web题目:
java servlet api里的forward 和 redirect() 是?

A Controller servlet may perform either a forward or a redirect operation at the end of processing a request. It is important to understand the difference between these two cases, in particular with respect to browser reloads of web pages.

Forward

  • a forward is performed internally by the servlet
  • the browser is completely unaware that it has taken place, so its original URL remains intact
  • any browser reload of the resulting page will simple repeat the original request, with the original URL
Redirect
  • a redirect is a two step process, where the web application instructs the browser to fetch a second URL, which differs from the original
  • a browser reload of the second URL will not repeat the original request, but will rather fetch the second URL
  • redirect is marginally slower than a forward, since it requires two browser requests, not one
  • objects placed in the original request scope are not available to the second request
In general, a forward should be used if the operation can be safely repeated upon a browser reload of the resulting web page; otherwise, redirect must be used. Typically, if the operation performs an edit on the datastore, then a redirect, not a forward, is required. This is simply to avoid the possibility of inadvertently duplicating an edit to the database.

More explicitly :

  • for SELECT operations, use a forward
  • for INSERT, UPDATE, or DELETE operations, use a redirect
In HTML, a <FORM> tag can either GET or POST its data. In this context, a GET corresponds to a SELECT-then-forward, and a POST corresponds to an edit-then-redirect. It is strongly recommended that forms for the input of search criteria should use GET, while forms for editing database records should use POST.


web的各种缓存如页面缓存,服务器缓存是什么,列出两个以上的开源的服务器缓存

memcached


写一段css

--
顺颂秋安
Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

Sunday, November 4, 2007

test

test again

--
顺颂秋安
Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China

test

this is come from blogspot

--
顺颂秋安
Jijun MA
http://jjmmma.googlepages.com
Zhejiang University-Intel Technology Center
College of Computer Science, Zhejiang University, China