美祺's profileEden of HexagonPhotosBlogListsMore Tools Help

Blog


    August 30

    怪病——Zonapha病症

    ZONAPHA症分为三个阶段
    第一阶段的患者,会呼吸困难,全身疼痛。有时还会引起痉挛,严重时还会陷入昏迷。缓和症状的方法,从古至今只有[逗他人一笑]
    进入第二阶段时,生体防卫机能会比第一阶段弱,随着免疫力的退化,患者很容易受到疾病侵袭。是引发并发症的时期。感染病毒,荷尔蒙失调,从心脏开始,内脏机能一一衰竭。多数患者会在此时死去。
    ZONAPHA症 真正恐怖的地方是不会笑也不会死,第二阶段不幸没有引发并发症的患者,进去第三阶段,即使想死也死不了,体温降低到一定温度,表皮和肌肉都会硬化,陷入不再新陈代谢的状态.....

    August 28

    《魔偶马戏团》完结感言(转)

    《魔偶马戏团》结束了,这不是一件容易的事情。我开始看的时候,还是个风度翩翩的留学生,每天上网、打工、滑雪和开PARTY;昨天看完了最后一话,发现镜子里的是一个大腹便便双目无神的死上班族,最大的梦想是在周末能在家睡上一觉。
     藤田的漫画长,这我自从《潮与虎》以来就知道的,但是没想到《魔偶》会这么长。对于一部部如此之长的漫画,无论如何也该表现出一些敬意才对。
    藤田和日郎的厉害之处一共有两个:一是绵密的故事编织,草蛇灰线,伏延千里;二是煽情手段,虽然读者一边看一边会骂“好他妈白烂”但看罢心中仍旧热乎乎的一阵感动。
    《魔偶》可以说把藤田的第一个能力发挥的淋漓尽致。就情节设定来说,还没见过哪部漫画有《魔偶》这样跌宕起伏却又不失精致的。就象是九连环,看似简单朴实,里面却错综复杂;玩起来似千头万绪,实则井然有条。
    我觉得《魔偶》比《潮与虎》精彩的原因是:《潮与虎》虽然是长篇,但其中很大部分篇章是独立的小故事,藤田只是把白面作为线索贯穿始终,最后捏合在一处,看起来整个故事繁密复杂,其实情节线颇为简单的。而《魔偶》却不是。
    当初朋友推荐这部漫画的时候,反复告诫我说:“无论多么不喜欢,也请坚持到10卷以后。”果然被他言中了,《魔偶》的开头可以说是白烂无比,什么肩负嘱托的少女、见义勇为的青年、身世凄惨的少年,贪婪自私的亲戚,用风息神泪家来钱的脑子想也猜的到会是个什么故事。
    在我几乎要放弃的时候,藤田“腾”地扯下白烂面具,笔锋一转,转向自动木偶与白银的对抗上。从此故事开始踏上了高速列车,如煮沸的开水一样翻滚起来。自动木偶与白银的由来、白氏兄弟的恩怨、三代弗兰西奴的境遇、柔石的下落、才贺家的渊源等,种种谜团纷迭而至,时而交错,时而分开延展,绵延两百余年,横跨欧亚大陆。当你觉得真相已经揭露的时候,藤田一个筋斗又翻出既定想象;当你以为大决战打完的时候,却发现其实这只是真正的开始;而每一个看似不相干的人物,都和主角有着极深的渊源。
    更可怕的是,藤田没有单纯只是靠硬拗来玩噱头,他的每一次转折都经过了深思熟虑,与整个背景密切相关,并成为下一个反复的伏笔所在。这家伙真是个妖孽,居然敢用足足十几卷的白烂故事作铺垫,却把包袱放在这么后面抖;看罢三分之一,我还大言不惭地说“魔偶是一部开头白烂后面精彩的漫画”,等看到白金的计划后,才知道那个白烂开头的背后居然还隐藏着这么深的历史和用心,牵涉到这么多的人物。前面的白烂立刻化腐朽为神奇,变成了生辉的妙笔。
    若是别人比如椎名、和月之流,恐怕已经死了不只十回,这位老先生却悠哉游哉不紧不慢地收着钓鱼线,象蜘蛛一样一点一点吐出真相的丝来。等到读者不耐烦惊然回首,发现自己已经置身于一张错综复杂的蜘蛛网中。
    唯一可惜的是,藤田临到结尾却失了心疯,硬加了一段才贺胜在黑贺村的修炼和战斗,让本来相当紧凑的故事变的拖沓无比,几乎拖垮了读者们的信心。我大概能明白藤田的苦心,他一定是想准备一个超越《潮与虎》的煽情结局,而一般这种结局都需要大量配角的牺牲才能营造出足够的气氛。配角需要培养出人气,才有杀掉的价值,然而人气配角们在真夜马戏团决战中死的七七八八,朝中一时无人可用。藤田不得以,只好开始重新养肥仲町马戏团的人,这需要时间。
    结果,这一后遗症直接影响了结局的气氛,甚至不及真夜马戏团大决战。那种感觉,就好像是看完孙悟空战完魔人布欧,又开始看天下第一比武大会……
    前面说了,藤田两大绝技之一是白烂煽情。当这一优点在《魔偶》表现的却不算特别成功——至少没《潮与虎》成功。
    《魔偶》的主题没什么好说的,笑嘛。日本漫画家就象是中国的高考学生们,无论什么主题,都可以发挥出一大套道理,所以漫画里的说教我都是略过去不看。我尤其讨厌在评论时还要拿漫画主题当命题作文再抒发一大段情,没意义。
    而结局,就象我刚才说的,被他那段无聊的情节给拖累了,最后不得不潦草处理。最后最关键的白金转变,转的非常生硬,就象是硬生生突然被作者洗脑一样,难以想象一个处心积虑两百多年的大BOSS,就突然这么完了。没看过的人可以想象一样,这就相当于青铜五小强历尽千辛万苦突破十二宫来到教皇厅,然后撒加说:“啊,我被你们感动了,我对不起女神”,然后自尽,全剧终………………太可笑了!
      和我看《潮与虎》时候一样,比起热血的主角,那些配角更令我感动。最后与白面大决战时,那些被人反复引用的著名台词和场面,都不能引发我的共鸣,反而是那些妖怪最后时刻的冲锋让我心头一热。《魔偶》也是,作者下了最大力气煽情的场面,我面无表情地翻过;但当我看到只剩一个头的朗拿度(可能是这个名字,我不记得了)看到白银露出笑容,然后心满意足地含笑而逝时,眼眶却没来由地湿润起来。两百年的守候啊,这些不幸的木偶只为求得弗兰西奴一笑。
           要说感动,这才是最成功的吧。
           最后我要表扬的是,决战虽然难看,当接下来的“六年后”却非常精彩,看着那一个个讨厌的小罗丽成长为成熟丰满的女性,我心花怒放。

    注:我已经下到42本了,还有43本没看到,这个作者真爽,唉,太期待藤田老师的作品了:)

    August 26

    Cultural tour to Shanghai Museum II

    It seems I've postpone the topic for some days. Now, keep on with it.
     
    After we had visited the hall with Assyria exhibition, I suggested Chinese painting and calligraphy hall for i'd like my sisiter to learn something as to prove her handwritting level----as for the writting, I have to convince all of my friend of the reason of my poor writing is that I did lack a good reference piont by famous calligraphists, then u know, right?:)
    Chinese painting, a national fine art of China, is celebrated for its long history and distinctive styles, and also above the heads of us. So, to be my sister's grandeur brother, I told my sister something historical which I quoted from the explaination label on the show window everytime we passed by  those artworks.
     
    Chinese calligraphy, the forbidden zone for me , is nearly full of fonts far-back which we can't recognize most of them, just watching and watching... At last, we strolled out of that hall, and felt at ease. Maybe those traditional rarities are much too......
     
    The rest of our activity was luch and shopping some reference books for "little overlord". Tired, but a bit proud of myself after I came back, because I succeeded to be a nice brother:)
    August 24

    Some comments with Peking University

     

    2006-8-7 星期一(Monday) 晴

    It's predeterminated that some people live happy while others live as they have to, which is always tried to balance during one's whole life by psychologists, sociologists, the colored-collar, and me as well.
    
    As heard of the scandal of the introduction of academician aboard in Peking University----of the most two famous ones with much honour in China, i have to confess that it's not a bad news ,even not above the mark of a scandal. What's a scandal? Through the psychology piont, a gossip becomes true when everyone thinks it true. So Universities and Colleges in China have been obtaining tens of millions RMB for yeas, through verious ways as defalcating, being "crying wolf",etc, while more and more graduates complain about and oppugn the quality of apparently holy and wild-expanded higher education! It's a indubitable fact that more and more so-called professors pay main focus on epibolic projects they shot for and require their graduate student half-compulsorily to join the work. No one but some instructors or assistants with low-rank will take in and teach undergraduate courses with limited academic level, some even reading books everyday----who we met long before during our days in elementary school.
    
    Qiu Cheng Tong, a world famous mathematician, flayed administrant agent of PeKing University and set out criticized comment that nearly all the persons with ability introduced aboard are learned,diploma-equiped, or regionally-superioritied hypocrite. I hope it's a beginning of all of us---parents, children, and corraletive officals to reconsider the catfaced higher education in China, wish fellows afterward could find their destiny and live substantial studying life.

    August 23

    Two fine jokes:) Please check it out.

                                         Where Is God﹖

    A couple had two little boys ages 8 and 10,who were excessively mischievous. They were always getting into trouble and their parents knew thatif any mischief occurred in their town,their sons were probably involved.
      They boys' mother heard that a clergyman in town had been successful in disciplining children, so she asked if he would speak with her boys. The clergyman agreed but asked to see them individually. So the mother sent her 8-year-old first in the morning, with the older boy to see the clergyman in the afternoon.
      The clergyman, a huge man with a booming voice,sat the younger boy down and asked him sternly″Where is God﹖″.
      They boy's mouth dropped open,but he made no response sitting there with his mouth hanging open,wide-eyed. So the clergyman repeated the question in an even sterner tone ″Where is God﹖″ Again the boy made no attempt to answer. So the clergyman raised his voice even more and shook his finger in the boy's face and bellowed ″WHERE IS GOD﹖″
    The boy screamed and bolted from the room,ran directly home and dove into his closet,slamming the door behind him. When his older brother found him in the closet he asked″What happened﹖″
    The younger brother gasping for breath replied ″We are in BIG trouble this time dude. God is missing - and they think WE did it″

     

     

     

                                          Talmudic Logic

    After months of negotiation with the Russian authorities, a Talmudist from Odessa was granted permission to visit Moscow. He boarded the train and found an empty seat.

    At the next stop a young man got on and sat next to him. The scholar looks at the young man and thinks: This fellow sur
    ely doesn't look like a peasant, and if he isn't a peasant he probably comes from this district. And If he comes from this district, then he must be Jewish because this is, after all, a Jewish district. On the other hand, if he is a Jew, where could he be going? I'm the only Jew in our district who has permission to travel to Moscow.

    Ahh? But just outside Moscow there is a little village called Samvet, and Jews don't need special permission to go there. But why would he be going to Samvet?

    He's probably going to visit one of the Jewish families there, but how many Jewish families are there in Samvet? There's Only two - there's the Bernsteins and the Steinbergs. And it couldn't be the Bernsteins that he's going to visit, because… a nice looking fellow like him must be visiting the Steinbergs. But why is he going? The Steinbergs have only daughters, so maybe he's their son-in-law.

    But then which daughter did he marry? They say that Sarah married a nice lawyer from Budapest, and Esther married a businessman from Zhitomir, so it must be Sarah's husband. Which means that his name is Alexander Cohen, if I'm not mistaken. But if he comes from Budapest, with all the anti-Semitism over there, he must have changed his name.

    What's the Hungarian equivalent of Cohen? Kovacs. But if they allowed him to change his name, he must have some special status. What could it be? A doctor from the University.

    At this point the scholar turns to the young man and says, "How do you do, Dr. Kovacs?"

    "Very well, thank you, sir." answered the startled passenger. "But how did you know my name?"

    "Oh," replied the Talmudist, "it was obvious."

     

    warriors:)

    August 22

    Cultural tour to Shanghai Museum I

    "The Exodus says that the lord will fight my case and I shall hold my peace." It's a meaningful sentence Christianism, which could stand for my frame of mind these days.
    
    Last Sunday, i had been to the Shanghai Museum with "little overlord" and "little missile"(my youngest sister in my family and my gf, both of them are expert in trouble brewing and trick-players). I was doomed to take all the food and drinks, and some other supplements, God bless me! and fortunately, I made to the destiny and was done up.
    
    We first got meeting in front of the Grand Museum, in order to wait my "little overlord" to finish her icecream which's the third one i'd bought on the way. There's a big pool with sprinkers nearby, and I let go my "little overlord" to have fun inside the forest of water column made out of the waterworks on the ground. To tell the truth, both "little missile" and I did want to join those children playing with the water like what we usually did during our childhood, but u know, growing pain always outbreaks when a person wants to deny the years passed by.
    
    After entered the gate, we quickly moved on to a large exibition hall where a lot culture relics of Assyria were on show. It's a bit too profound for my sister to catch on the produndity of those antiquated creatures with much dilapidation, and even difficulty for me and "little missile". Because I had heard a lot about the Assyrian culture, and it's one of the four oldest culture on earth, I thought it as a good chance to teach my sister a good history lesson. Finally, it proved to be a bad idea, my "little overlord" treated those costful relics as broken rocks, bowls fallen into pieces, toy badge with colorful patterns, which amused us all the time. No wonder she's the very child doted on by the whole family, my "little overlord".
    
    Well, as time limitted, it's time to go sleeping now. As for the rest of our Sunday tour, i'd complete it tomorrow. C U.

    August 21

    Celebration for my live space:)

    Since the writing function for the msn space is reopened for me , mostly with the help of space-writer, I'd like my Robbie's 《something beautiful》 to express the cheerful mood right now:)

    Cause something beautiful will come your way! 

     

    Please check it out.

    Something Beautiful
    (R.Williams/G.Chambers)
    You can't manufacture a miracle
    The silence was pitful-that day
    And love is getting too cynical
    Passion's just physical-these days
    You analyse everyong you meet
    But get no sign -the loving kind
    Every night you admit defeat
    And cry yourself blind
    If you can't wake up in the moring
    'Cause your bed lies vacant at night
    If you're lost,hurt,tired or lonely
    Can't you control it-try as you might
    May you find that love that won't leave you
    May you find it by the end of the day
    You won't be lost,hurt,tired and lonely
    Something beautiful will come your way
    The DJ said on the radio
    Life should be stereo-each day
    And the past that cast the unsuitable
    Instead of some kind of beautiful
    You just couldn't wait
    All your friends think you're satisfied
    But they can't see your soul .no .no.no
    Forgot the time feeling petrified
    When they lived alone
    If you can't wake up in the moring
    'Cause your bed lies vacant at night
    If you're lost,hurt,tired or lonely
    Can't you control it-try as you might
    May you find that love that won't leave you
    May you find it by the end of the day
    You won't be lost,hurt,tired and lonely
    Something beautiful will come your way
    (it'll come your way )
    (it'll come your way )Some kind of beautiful
    (it'll come your way )Some kind of beautiful
    (it'll come your way )Some kind of beautiful
    (it'll come your way )
    All your friends think you're satisfied
    But they can't see your soul .no .no.no
    Forgot the time feeling petrified
    When they lived alone
    If you can't wake up in the moring
    'Cause your bed lies vacant at night
    If you're lost,hurt,tired or lonely
    Can't you control it-try as you might
    May you find that love that won't leave you
    May you find it by the end of the day
    You won't be lost,hurt,tired and lonely
    Something beautiful will come your way

    终于找到了解决space的方法了!!!

    周一注定是个好日子,哈哈,同事告诉我用space writer就可以在客户端写blog了,终于。。。。我的space又能写了,不过好像还是不能从网页登上去写,算了,人要知足嘛:)

    特此庆贺!!!

    The go team, the power is on!

    2006-8-19 星期六(Saturday) 晴

    Along with the mellow singing of Ayumi, i sit before the screen and get to clean up my frame of mind of this week.
    
    As for the whole week, nearly 75% of it is spent with the operational training int SeaSky which is the company i served for. There r several teachers, who r our colleagers and some of them r in the same office with me, taught us theory of software projecting, standard of coding and unit-testing, deployment of products and the culture of SeaSky. I had to admit that some courses'r really useful for our future working and some r just for interest. Although these courses are easy to understand, it did take us 4 days on the training courses, which make me a bit constrained because i have no work or coding to do but get seated for a long time without anything to do. When i was still in college, i've heard that if a programmer has not written down even a line of codes, he'd be at grass and feel uncomfortable. Maybe i've the same problem right now.
    
    
    Swimming and playing basketball have becoming a part of my weekly schedule, and i'm happy to stand to, in order to put down my weight and keep fit. Since the summer's getting away, where can i get to swimming is the keen problem i should solve these days.
    
    OK, i've putted too much focus on my petties, then i' d change to some thoughts about Julia, who's in Vacouver, Canada right now.
    
    Last Sunday night, i've a abbrievated chat with Julia, and found she's a unclouded, diligent and thoughtful girl, but sometimes i can feel the loneliness inly. Maybe she's a student of Peking University, it's hard and impossible for her to consider things other than studying and preparing for exams like GRE, TOFEL and so on, or she just don't know how to communicate with other classmates who are introverted too, maybe it's another reason that i can imagine out. Whereas, as a friend-on-line, i do hope she would live happy and colorful life in Vacouver. I know the studying life aboard is trial and always acompanied with solitude, wish her get through and find her turn signal.
    
    Another Sunday is comming, the piano dairy will send Julia more grazioso songs played with paino, flutes:)
    
    Warriors fight for what they love forever, so the go team, the power is on!

    Oracle日期函数大礼包

    2006-8-17 星期四(Thursday) 晴

    TO_DATE格式
    Day:
    dd number 12
    dy abbreviated fri
    day spelled out friday
    ddspth spelled out, ordinal twelfth
    Month:
    mm number 03
    mon abbreviated mar
    month spelled out march
    Year:
    yy two digits 98
    yyyy four digits 1998
    
    24小时格式下时间范围为: 0:00:00 - 23:59:59....
    12小时格式下时间范围为: 1:00:00 - 12:59:59 ....
    1.
    日期和字符转换函数用法(to_date,to_char)
    
    2.
    select to_char( to_date(222,'J'),'Jsp') from dual
    
    显示Two Hundred Twenty-Two
    
    3.
    求某天是星期几
    select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day') from dual;
    星期一
    select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day','NLS_DATE_LANGUAGE = American') from dual;
    monday
    设置日期语言
    ALTER SESSION SET NLS_DATE_LANGUAGE='AMERICAN';
    也可以这样
    TO_DATE ('2002-08-26', 'YYYY-mm-dd', 'NLS_DATE_LANGUAGE = American')
    
    4.
    两个日期间的天数
    select floor(sysdate - to_date('20020405','yyyymmdd')) from dual;
    
    5. 时间为null的用法
    select id, active_date from table1
    UNION
    select 1, TO_DATE(null) from dual;
    
    注意要用TO_DATE(null)
    
    6.
    a_date between to_date('20011201','yyyymmdd') and to_date('20011231','yyyymmdd')
    那么12月31号中午12点之后和12月1号的12点之前是不包含在这个范围之内的。
    所以,当时间需要精确的时候,觉得to_char还是必要的
    7. 日期格式冲突问题
    输入的格式要看你安装的ORACLE字符集的类型, 比如: US7ASCII, date格式的类型就是: '01-Jan-01'
    alter system set NLS_DATE_LANGUAGE = American
    alter session set NLS_DATE_LANGUAGE = American
    或者在to_date中写
    select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day','NLS_DATE_LANGUAGE = American') from dual;
    注意我这只是举了NLS_DATE_LANGUAGE,当然还有很多,
    可查看
    select * from nls_session_parameters
    select * from V$NLS_PARAMETERS
    
    8.
    select count(*)
    from ( select rownum-1 rnum
    from all_objects
    where rownum <= to_date('2002-02-28','yyyy-mm-dd') - to_date('2002-
    02-01','yyyy-mm-dd')+1
    )
    where to_char( to_date('2002-02-01','yyyy-mm-dd')+rnum-1, 'D' )
    not
    in ( '1', '7' )
    
    查找2002-02-28至2002-02-01间除星期一和七的天数
    在前后分别调用DBMS_UTILITY.GET_TIME, 让后将结果相减(得到的是1/100秒, 而不是毫秒).
    
    9.
    select months_between(to_date('01-31-1999','MM-DD-YYYY'),
    to_date('12-31-1998','MM-DD-YYYY')) "MONTHS" FROM DUAL;
    1
    
    select months_between(to_date('02-01-1999','MM-DD-YYYY'),
    to_date('12-31-1998','MM-DD-YYYY')) "MONTHS" FROM DUAL;
    
    1.03225806451613
    10. Next_day的用法
    Next_day(date, day)
    
    Monday-Sunday, for format code DAY
    Mon-Sun, for format code DY
    1-7, for format code D
    
    11
    select to_char(sysdate,'hh:mi:ss') TIME from all_objects
    注意:第一条记录的TIME 与最后一行是一样的
    可以建立一个函数来处理这个问题
    create or replace function sys_date return date is
    begin
    return sysdate;
    end;
    
    select to_char(sys_date,'hh:mi:ss') from all_objects;
    12.
    获得小时数
    
    SELECT EXTRACT(HOUR FROM TIMESTAMP '2001-02-16 2:38:40') from offer
    SQL> select sysdate ,to_char(sysdate,'hh') from dual;
    
    SYSDATE TO_CHAR(SYSDATE,'HH')
    -------------------- ---------------------
    2003-10-13 19:35:21 07
    
    SQL> select sysdate ,to_char(sysdate,'hh24') from dual;
    
    SYSDATE TO_CHAR(SYSDATE,'HH24')
    -------------------- -----------------------
    2003-10-13 19:35:21 19
    
    获取年月日与此类似
    13.
    年月日的处理
    select older_date,
    newer_date,
    years,
    months,
    abs(
    trunc(
    newer_date-
    add_months( older_date,years*12+months )
    )
    ) days
    from ( select
    trunc(months_between( newer_date, older_date )/12) YEARS,
    mod(trunc(months_between( newer_date, older_date )),
    12 ) MONTHS,
    newer_date,
    older_date
    from ( select hiredate older_date,
    add_months(hiredate,rownum)+rownum newer_date
    from emp )
    )
    
    14.
    处理月份天数不定的办法
    select to_char(add_months(last_day(sysdate) +1, -2), 'yyyymmdd'),last_day(sysdate) from dual
    
    16.
    找出今年的天数
    select add_months(trunc(sysdate,'year'), 12) - trunc(sysdate,'year') from dual
    
    闰年的处理方法
    to_char( last_day( to_date('02' || :year,'mmyyyy') ), 'dd' )
    如果是28就不是闰年
    
    17.
    yyyy与rrrr的区别
    'YYYY99 TO_C
    ------- ----
    yyyy 99 0099
    rrrr 99 1999
    yyyy 01 0001
    rrrr 01 2001
    
    18.不同时区的处理
    select to_char( NEW_TIME( sysdate, 'GMT','EST'), 'dd/mm/yyyy hh:mi:ss') ,sysdate
    from dual;
    
    19.
    5秒钟一个间隔
    Select TO_DATE(FLOOR(TO_CHAR(sysdate,'SSSSS')/300) * 300,'SSSSS') ,TO_CHAR(sysdate,'SSSSS')
    from dual
    
    2002-11-1 9:55:00 35786
    SSSSS表示5位秒数
    
    20.
    一年的第几天
    select TO_CHAR(SYSDATE,'DDD'),sysdate from dual
    310 2002-11-6 10:03:51
    
    21.计算小时,分,秒,毫秒
    select
    Days,
    A,
    TRUNC(A*24) Hours,
    TRUNC(A*24*60 - 60*TRUNC(A*24)) Minutes,
    TRUNC(A*24*60*60 - 60*TRUNC(A*24*60)) Seconds,
    TRUNC(A*24*60*60*100 - 100*TRUNC(A*24*60*60)) mSeconds
    from
    (
    select
    trunc(sysdate) Days,
    sysdate - trunc(sysdate) A
    from dual
    )
    
    
    
    select * from tabname
    order by decode(mode,'FIFO',1,-1)*to_char(rq,'yyyymmddhh24miss');
    
    //
    floor((date2-date1) /365) 作为年
    floor((date2-date1, 365) /30) 作为月
    mod(mod(date2-date1, 365), 30)作为日.
    23.next_day函数
    next_day(sysdate,6)是从当前开始下一个星期五。后面的数字是从星期日开始算起。
    1 2 3 4 5 6 7
    日 一 二 三 四 五 六

    Training week in SeaSky

    2006-8-16 星期三(Wednesday) 晴

    My company'll put up training on software process and standard of CMM for 4 days, and that's a bad news for me who means I shall have nothing to do, especially coding, but take the boring courses. It's really sleepy and tedious that we freshmen had to drink more coffee to avoid dogsleeping, however, sometimes, if the tousy teacher happened to be our general manager, I’m sure and that's evident fact, no matter how long the course'll last, none of us gaped and showed our best energy and curiosity about his topic and viewpoint.
    
    It's Wednesday, and there's still one day left and the HR manager'll take the lesson. As for the courses taken, I’ve known the main commercial field of Haitian company and I’m also happy with our leaders who always told us that there's abundant room for we freshmen to develop and the atmosphere of Haitian is harmonious and friendly.
    Maybe every soldier's faithful to his arm, and that' the thought of my attitude to Haitian. Wish I’ll spend an indelible period here.

    Summary of this week and looking forward

    2006-8-12 星期六(Saturday) 晴

    As the song《eternity》of Robbie Williams, I’m sitting before the screen and witting my dairy.
    I think I’m a bit crazy for charming Robbie these days, because I’ve been reviewing his fantastic songs several years ago and found it still giving me enjoyment and large range of fancy while hearing his songs.
    
    
    This week is meaning the end of our project for the educational administration system of Art institute in Shanghai University. I had already finished my testing assignment and continued with my system of Meal Reserving----just to practice my ability in the framework of Hibernate+Spring+Java Server Faces which is the main technical in our team. Luckily, all of the fresh staff will take preliminary courses about Software process, Software testing, standard of CMM, and culture of Haitian company----I was told it's just form of vocation and wasting time.
    
    
    On Friday, I’ve discussed with Frank about projecting with CVS in order to cooperate in some little epiboly projects while both of us can communicate by internet during our working period. It's not a bad advice and I’d like to refer to some details like check-in and check-out between different workspaces in CVS and looking for excellent analysis of good requirements.
    
    Since time limited, and I’m going to studying with my java network programming :)

    Calligraphy for Peking 2008

    2006-8-10 星期四(Thursday) 晴

    Calligraphy, it's what we call as several cultrural treasures of we
    
    Chinese, while the Olympics is also treasure of people on earth----in
    
    fact, it does bring the host nation treasures as AD funds from sponsors
    
    , vendition income from correlative sports mementos, and lots of
    
    benefits in other ways. The sport label of Olypics just made out a
    
    perfect combination with both two distillates, which is concieved by a
    
    graduate student in college.
    
    It's not a bad idea that we Chinese can express some thought in our
    
    best form. But what we see most is somewhat of borrowed, western-
    
    defected things, and a certain number of us canonize it as advanced
    
    cultrue. Though i've to admit some so-called senior factors represent
    
    the progress of human, descendants of dragon should never forget where
    
    one's happiness comes from.

    A day with sun and thieves

    2006-8-8 星期二(Tuesday) 晴

    what a sunshinning and astonishing day, when i recieved a phone call from my little-missile that she's stolen her mobile phone again! it's a common sense that there'r more thieves in urban areas, especially in Shanghai.
    
    This reminds me a cell phone which is my first one as award to my enrollment in university, however, it's made away one night from a desk next to my bed. That fearless thief glided into our dormitory room and made his rush work, then hided in the building until our dorm-keeper open the gate next morning. During 2 to 3 months, news about his gallant and defiant activities became the very chat in vogue among us, which strictly undressed disadvantages of the shabby, unsecurity dorm building. Several weeks after i moved out of Dorm 9(we called it Doom 9), that thief was at last caught by some "mammoth"(guys from institution of phisical cultrue) and taken up for a certain days.
    
    I can't tell who's thief or when he'll take his action by stealth, which's a professional skill some antipicking-and-stealing police will have. As a sheep, all u've to choose is to hide urself in surness while not to show off often, and learn a lesson by heart.

    Hibernate最近使用时关于和SQL的一点小区别,参考如下

     

    2006-8-7 星期一(Monday) 晴

    HQL: Hibernate查询语言
    Hibernate配备了一种非常强大的查询语言,这种语言看上去很像SQL。但是不要被语法结构 上的相似所迷惑,HQL是非常有意识的被设计为完全面向对象的查询,它可以理解如继承、多态 和关联之类的概念。
    
    
    第 15 章 HQL: Hibernate查询语言
    Hibernate配备了一种非常强大的查询语言,这种语言看上去很像SQL。但是不要被语法结构 上的相似所迷惑,HQL是非常有意识的被设计为完全面向对象的查询,它可以理解如继承、多态 和关联之类的概念。
    
    15.1. 大小写敏感性问题
    除了Java类与属性的名称外,查询语句对大小写并不敏感。 所以 SeLeCT 与 sELEct 以及 SELECT 是相同的,但是 org.hibernate.eg.FOO 并不等价于 org.hibernate.eg.Foo 并且 foo.barSet 也不等价于 foo.BARSET。
    
    本手册中的HQL关键字将使用小写字母. 很多用户发现使用完全大写的关键字会使查询语句 的可读性更强, 但我们发现,当把查询语句嵌入到Java语句中的时候使用大写关键字比较难看。
    
    15.2. from子句
    Hibernate中最简单的查询语句的形式如下:
    
    from eg.Cat
    该子句简单的返回eg.Cat类的所有实例。 通常我们不需要使用类的全限定名, 因为 auto-import(自动引入) 是缺省的情况。 所以我们几乎只使用如下的简单写法:
    
    from Cat
    大多数情况下, 你需要指定一个别名, 原因是你可能需要 在查询语句的其它部分引用到Cat
    
    from Cat as cat
    这个语句把别名cat指定给类Cat 的实例, 这样我们就可以在随后的查询中使用此别名了。 关键字as 是可选的,我们也可以这样写:
    
    from Cat cat
    子句中可以同时出现多个类, 其查询结果是产生一个笛卡儿积或产生跨表的连接。
    
    from Formula, Parameter
    from Formula as form, Parameter as param
    查询语句中别名的开头部分小写被认为是实践中的好习惯, 这样做与Java变量的命名标准保持了一致 (比如,domesticCat)。
    
    15.3. 关联(Association)与连接(Join)
    我们也可以为相关联的实体甚至是对一个集合中的全部元素指定一个别名, 这时要使用关键字join。
    
    from Cat as cat
     inner join cat.mate as mate
     left outer join cat.kittens as kitten
    from Cat as cat left join cat.mate.kittens as kittens
    from Formula form full join form.parameter param
    受支持的连接类型是从ANSI SQL中借鉴来的。
    
    inner join(内连接)
    
    left outer join(左外连接)
    
    right outer join(右外连接)
    
    full join (全连接,并不常用)
    
    语句inner join, left outer join 以及 right outer join 可以简写。
    
    from Cat as cat
     join cat.mate as mate
     left join cat.kittens as kitten
    还有,一个"fetch"连接允许仅仅使用一个选择语句就将相关联的对象或一组值的集合随着他们的父对象的初始化而被初始化,这种方法在使用到集合的情况下尤其有用,对于关联和集合来说,它有效的代替了映射文件中的外联接 与延迟声明(lazy declarations). 查看 第 20.1 节 “ 抓取策略(Fetching strategies) ” 以获得等多的信息。
    
    from Cat as cat
     inner join fetch cat.mate
     left join fetch cat.kittens
    一个fetch连接通常不需要被指定别名, 因为相关联的对象不应当被用在 where 子句 (或其它任何子句)中。同时,相关联的对象 并不在查询的结果中直接返回,但可以通过他们的父对象来访问到他们。
    
    注意fetch构造变量在使用了scroll() 或 iterate()函数 的查询中是不能使用的。最后注意,使用full join fetch 与 right join fetch是没有意义的。
    
    如果你使用属性级别的延迟获取(lazy fetching)(这是通过重新编写字节码实现的),可以使用 fetch all properties 来强制Hibernate立即取得那些原本需要延迟加载的属性(在第一个查询中)。
    
    from Document fetch all properties order by name
    from Document doc fetch all properties where lower(doc.name) like '%cats%'
    15.4. select子句
    select 子句选择将哪些对象与属性返 回到查询结果集中. 考虑如下情况:
    
    select mate
    from Cat as cat
     inner join cat.mate as mate
    该语句将选择mates of other Cats。(其他猫的配偶) 实际上, 你可以更简洁的用以下的查询语句表达相同的含义:
    
    select cat.mate from Cat cat
    查询语句可以返回值为任何类型的属性,包括返回类型为某种组件(Component)的属性:
    
    select cat.name from DomesticCat cat
    where cat.name like 'fri%'
    select cust.name.firstName from Customer as cust
    查询语句可以返回多个对象和(或)属性,存放在 Object[]队列中,
    
    select mother, offspr, mate.name
    from DomesticCat as mother
     inner join mother.mate as mate
     left outer join mother.kittens as offspr
    或存放在一个List对象中,
    
    select new list(mother, offspr, mate.name)
    from DomesticCat as mother
     inner join mother.mate as mate
     left outer join mother.kittens as offspr
    也可能直接返回一个实际的类型安全的Java对象,
    
    select new Family(mother, mate, offspr)
    from DomesticCat as mother
     join mother.mate as mate
     left join mother.kittens as offspr
    假设类Family有一个合适的构造函数.
    
    你可以使用关键字as给“被选择了的表达式”指派别名:
    
    select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n
    from Cat cat
    这种做法在与子句select new map一起使用时最有用:
    
    select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n )
    from Cat cat
    该查询返回了一个Map的对象,内容是别名与被选择的值组成的名-值映射。
    
    15.5. 聚集函数
    HQL查询甚至可以返回作用于属性之上的聚集函数的计算结果:
    
    select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)
    from Cat cat
    受支持的聚集函数如下:
    
    avg(...), sum(...), min(...), max(...)
    
    count(*)
    
    count(...), count(distinct ...), count(all...)
    
    你可以在选择子句中使用数学操作符、连接以及经过验证的SQL函数:
    
    select cat.weight + sum(kitten.weight)
    from Cat cat
     join cat.kittens kitten
    group by cat.id, cat.weight
    select firstName||' '||initial||' '||upper(lastName) from Person
    关键字distinct与all 也可以使用,它们具有与SQL相同的语义.
    
    select distinct cat.name from Cat cat
    
    select count(distinct cat.name), count(cat) from Cat cat
    15.6. 多态查询
    一个如下的查询语句:
    
    from Cat as cat
    不仅返回Cat类的实例, 也同时返回子类 DomesticCat的实例. Hibernate 可以在from子句中指定任何 Java 类或接口. 查询会返回继承了该类的所有持久化子类 的实例或返回声明了该接口的所有持久化类的实例。下面的查询语句返回所有的被持久化的对象:
    
    from java.lang.Object o
    接口Named 可能被各种各样的持久化类声明:
    
    from Named n, Named m where n.name = m.name
    注意,最后的两个查询将需要超过一个的SQL SELECT.这表明order by子句 没有对整个结果集进行正确的排序. (这也说明你不能对这样的查询使用Query.scroll()方法.)
    
    15.7. where子句
    where子句允许你将返回的实例列表的范围缩小. 如果没有指定别名,你可以使用属性名来直接引用属性:
    
    from Cat where name='Fritz'
    如果指派了别名,需要使用完整的属性名:
    
    from Cat as cat where cat.name='Fritz'
    返回名为(属性name等于)'Fritz'的Cat类的实例。
    
    select foo
    from Foo foo, Bar bar
    where foo.startDate = bar.date
    将返回所有满足下面条件的Foo类的实例: 存在如下的bar的一个实例,其date属性等于 Foo的startDate属性。 复合路径表达式使得where子句非常的强大,考虑如下情况:
    
    from Cat cat where cat.mate.name is not null
    该查询将被翻译成为一个含有表连接(内连接)的SQL查询。如果你打算写像这样的查询语句
    
    from Foo foo
    where foo.bar.baz.customer.address.city is not null
    在SQL中,你为达此目的将需要进行一个四表连接的查询。
    
    =运算符不仅可以被用来比较属性的值,也可以用来比较实例:
    
    from Cat cat, Cat rival where cat.mate = rival.mate
    select cat, mate
    from Cat cat, Cat mate
    where cat.mate = mate
    特殊属性(小写)id可以用来表示一个对象的唯一的标识符。(

    August 20

    Space搬家公告

    不知道是不是RP问题,还是平时不给space做广告,
    害的我自从space更新后怎么都不能写也不能留言。。。
    此处不留爷,自有留爷处。
    小弟我另辟蹊径,开创了祺祺的新天地,
    大家可以去那里和我继续保持联系哦!
     
    声明: 以上文字拜托能够登陆space的好心人所留(因为祺祺自己不能写space嘛~),解释权归祺祺所有,嘿嘿~——好心人