Archive for 02月, 2008

 
Feb
27
Posted (xurenlu) in 杂谈 on 02月-27-2008

嘿嘿…
情况A:
前同事,求网站编辑类工作… 一年以上网络编辑工作经验。
情况B:
前同事,男,PHP程序员。两年以上PHP开发经验。
情况C:
前同事,男,前端工程师。三年以上工作经验。
情况D:
前同事,女,中文系在读,求实习工作,薪水不限,有两年网站活动策划,产品设计相关实习经验。

加起来好像开个公司的各种人都全了啊。可以考虑批发…..
我的联系方式:xurenlu#126.com #请换成@

————————————-
以上各位同学已经上班了


Tag:
相关文章


     
    Feb
    23
    Posted (xurenlu) in linux/unix on 02月-23-2008

    Mono是这样一个Project:

    Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.

    翻译过来是:

    Mono为在linux/Solaris,Mac OS X,和Windows下开发和运行.NET客户端和服务程序提供了必要的软件支持。这个Mono 开源项目由Novell发起,拥有一批积极并且热心的开发者社区,希望能成为Linux 程序开发的首选。

    第一步:安装Mono.我的pc是Fedora ,因此是yum install Mono, 如果在debian/ubuntu系列,应该用apt-get .
    如果您没有类似在线包安装工具,那么您需要到http://www.go-mono.com/mono-downloads/download.html去下载并手动安装。
    第二步:开始写了…

    1. #cd Program/Mono/
    2. #vim hello.cs

    hello.cs的内容如下:

    1. class Hello{
    2.         static void Main(){
    3.                 System.Console.Write("Hello World\n");
    4.         }
    5. }

    第三步:编译:

    1. mcs hello.cs

    第四步:试运行:

    1. #mono hello.exe
    2. Hello world
    3. #

    这个hello.exe您看到了,是以exe为后缀的。没错儿!它可以直接运行在Windows下!


    Tag:
    相关文章


       
      Feb
      23
      Posted (xurenlu) in linux/unix on 02月-23-2008

      64位机器就是不方便,包的测试总是不够全面。前几天发现一个依赖性问题,昨天更新又发现问题了

      1. Missing Dependency: libx264.so.56 is needed by package mencode

      这个提示有时是

      1. Missing Dependency: libx264.so.56 is needed by package ffmpeg-libs

      反正更新多媒体播放类软件时总是出现。
      Google到了解决办法:
      先updatedb一下,然后locate libx264,找到:
      /usr/lib64/libx264.so.58
      好了,现在运行yum remove /usr/lib64/libx264.so.58,这个命令在我的机器上的实质结果是把x264删了。
      ,再运行安装命令(我之间是yum install amarok),就能成功了。这次,又顺道把libx264.so.*给我装上了。


      Tag:
      相关文章


         
        Feb
        22
        Posted (xurenlu) in linux/unix, 杂谈 on 02月-22-2008

        今天想把fedora8升级到fedora9,结果先把fedora-release*的包升级以后,发现系统fedora源已经全部变成fedora9的了,但是因几个基本包有问题,我用yum安装什么包都装不了了。
        只好回退,结果遇上这样一个问题:

        1. Cannot retrieve repository metadata (repomd.xml) for repository:/var/cache/yum/fedora/mirrorlist.txt

        到处查,都搞不懂为什么。最后只好自己查查yum的源代码,再加上我天才般的瞎猜,终于整出来了:
        记下过程:
        手工建立/var/cache/yum/fedora/和/var/cache/yum/updates两个目录。
        编辑/var/cache/yum/fedora/mirrorlist.txt为

        1. # repo = fedora-8 arch = x86_64 country = CN country = RU country = JP country = HK country = KR country = TW country = TH country = IN
        2. http://fedora.candishosting.com.cn/pub/fedora/linux/releases/8/Everything/x86_64/os
        3. http://opensource.nchc.org.tw/fedora/linux/releases/8/Everything/x86_64/os
        4. http://ftp.twaren.net/Linux/Fedora/linux/releases/8/Everything/x86_64/os
        5. http://linux.ntcu.net/ftp/dists/fedora/releases/8/Everything/x86_64/os
        6. http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/8/Everything/x86_64/os
        7. http://ftp.hostrino.com/pub/fedora/linux/releases/8/Everything/x86_64/os
        8. ftp://ftp.rhd.ru/pub/fedora/linux/releases/8/Everything/x86_64/os
        9. http://ftp.cse.yzu.edu.tw/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        10. http://ftp.chg.ru/pub/Linux/fedora/linux/releases/8/Everything/x86_64/os
        11. http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        12. http://ftp.ncnu.edu.tw/Linux/Fedora/linux/releases/8/Everything/x86_64/os
        13. http://allotter.yandex.net/fedora/linux/releases/8/Everything/x86_64/os
        14. http://ftp.kddilabs.jp/Linux/packages/fedora/releases/8/Everything/x86_64/os
        15. http://ftp.kaist.ac.kr/pub/fedora/linux/releases/8/Everything/x86_64/os
        16. ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        17. http://ftp.riken.jp/Linux/fedora/releases/8/Everything/x86_64/os
        18. http://spreader.yandex.net/fedora/linux/releases/8/Everything/x86_64/os

        编辑/var/cache/yum/updates/mirrorlist.txt为:

        1. # repo = updates-released-f8 arch = x86_64 country = RU country = JP country = HK country = CY country = SG country = TW country = TH country = IN
        2. http://spreader.yandex.net/fedora/linux/updates/8/x86_64
        3. http://ftp.kddilabs.jp/Linux/packages/fedora/updates/8/x86_64
        4. http://allotter.yandex.net/fedora/linux/updates/8/x86_64
        5. http://ftp.hostrino.com/pub/fedora/linux/updates/8/x86_64
        6. http://ftp.riken.jp/Linux/fedora/updates/8/x86_64
        7. ftp://ftp.oss.eznetsols.org/linux/fedora/updates/8/x86_64
        8. ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/updates/8/x86_64
        9. http://opensource.nchc.org.tw/fedora/linux/updates/8/x86_64
        10. http://ftp.jaist.ac.jp/pub/Linux/Fedora/updates/8/x86_64
        11. http://mirrors.cytanet.com.cy/linux/fedora/linux/updates/8/x86_64

        大功告成。
        再运行yum install mplayer,一切正常。
        原因(个人瞎猜版):
        /var/cache/yum/下是yum的缓存目录。当我运行yum clean all时,把这两个目录下的一些文件清空了。但是可能yum存在一个bug,
        /var/cache/yum/fedora/repomd.xml能重新下载生成,/var/cache/yum/fedora/mirrotlist.txt却不能正常生成。因此需要我们手工构造这个文件。
        那我是怎么构造这个文件的内容的呢?
        注意看/etc/yum.repos.d/fedora.repod文件,中有

        1. mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch

        $releasever应该是8(我用的是fedora 8),$basearch是架构的意思,我的是x86_64,替换上,访问之,得到:

        1. # repo = fedora-8 arch = x86_64 country = CN country = RU country = JP country = HK country = KR country = TW country = TH country = IN
        2. http://fedora.candishosting.com.cn/pub/fedora/linux/releases/8/Everything/x86_64/os
        3. http://opensource.nchc.org.tw/fedora/linux/releases/8/Everything/x86_64/os
        4. http://ftp.twaren.net/Linux/Fedora/linux/releases/8/Everything/x86_64/os
        5. http://linux.ntcu.net/ftp/dists/fedora/releases/8/Everything/x86_64/os
        6. http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/8/Everything/x86_64/os
        7. http://ftp.hostrino.com/pub/fedora/linux/releases/8/Everything/x86_64/os
        8. ftp://ftp.rhd.ru/pub/fedora/linux/releases/8/Everything/x86_64/os
        9. http://ftp.cse.yzu.edu.tw/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        10. http://ftp.chg.ru/pub/Linux/fedora/linux/releases/8/Everything/x86_64/os
        11. http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        12. http://ftp.ncnu.edu.tw/Linux/Fedora/linux/releases/8/Everything/x86_64/os
        13. http://allotter.yandex.net/fedora/linux/releases/8/Everything/x86_64/os
        14. http://ftp.kddilabs.jp/Linux/packages/fedora/releases/8/Everything/x86_64/os
        15. http://ftp.kaist.ac.kr/pub/fedora/linux/releases/8/Everything/x86_64/os
        16. ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/releases/8/Everything/x86_64/os
        17. http://ftp.riken.jp/Linux/fedora/releases/8/Everything/x86_64/os
        18. http://spreader.yandex.net/fedora/linux/releases/8/Everything/x86_64/os

        这就是/var/cache/yum/fedora/mirrorlist.txt的内容了。
        对应地,查看/etc/yum.repos.d/fedora-updates.repo,去访问对应的地址,取得内容写入到/var/cache/yum/updates/mirrorlist.txt.


        Tag:
        相关文章


           
          Feb
          22
          Posted (xurenlu) in 未分类 on 02月-22-2008

          今天突然发现,什么软件都号称自己重新发现了世界。
          Amarok:slogan是:Rediscover your music
          mozilla products页,主推的两个产品是:
          *
          Firefox: Rediscover the Web
          *
          Thunderbird: Reclaim Your Inbox

          一上网,发现netvibes的口号是:(Re)mix the web
          老外也这么没创意?
          照这思路,过两天IE的口号会变成ReExplorer The world,Word的口号会变成Re-write your Document…


          Tag:
          相关文章


             
            Feb
            20
            Posted (xurenlu) in js on 02月-20-2008

            1.关于prototype:这里prototype是javascript的一个特性,不是那个有名的prototype框架:

            1. <script type="text/javascript">
            2. var string="hello world";
            3. try{
            4.   alert(string.phone());
            5. }catch(e){alert(e);}
            6. String.prototype.phone=function()
            7. {
            8.   return "159-10957151";
            9. }
            10.  
            11. alert(string.phone());
            12. </script>

            2.关于变量作用域,和IE,firefox对js的不同处理,这里有几个例子,有几个是原来从别处看到的记的笔记,有的是我自己挖掘出来的.
            2.1

            1. <script type="text/javascript">
            2.   var deep_thought = {
            3.    the_answer: 42,
            4.    ask_question: function () {
            5.     return this.the_answer;
            6.    }
            7.   };
            8.  
            9.   var the_meaning = deep_thought.ask_question();
            10.   alert(the_meaning);
            11. </script>

            2.2

            1. <script type="text/javascript">
            2.   function test_this() {
            3.    return this;
            4.   }
            5.   var i_wonder_what_this_is = test_this();
            6.   alert(i_wonder_what_this_is);
            7.   // result: [object window];
            8. </script>

            2.3:

            1. <script type="text/javascript">
            2.   function click_handler() {
            3.    alert(this); // 弹出 window 对象
            4.   }
            5. </script>
            6.  ...
            7. <button id='thebutton' onclick='click_handler()'>Click me!</button>

            2.4

            1. <script type="text/javascript">
            2.   function click_handler(obj) {
            3.    alert(obj);
            4.    //result:[object HTMLButtonElement]
            5.   }
            6. </script>
            7.  ...
            8. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>

            2.5

            1. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>
            2. <script type="text/javascript">
            3.  function BigComputer(answer) {
            4.   this.the_answer = answer;
            5.   this.ask_question = function () {
            6.    alert(this.the_answer);
            7.   }
            8.  }
            9.  
            10.  function addhandler() {
            11.   var deep_thought = new BigComputer(42),
            12.    the_button = document.getElementById('thebutton');
            13.    the_button.onclick = deep_thought.ask_question;
            14.  }
            15.  
            16.  window.onload = addhandler;
            17.  
            18.  //result [undefined]
            19. </script>
            20.  ...

            2.6

            1. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>
            2. <script type="text/javascript">
            3.  function BigComputer(answer) {
            4.   var self=this;
            5.   self.the_answer = answer;
            6.   self.ask_question = function () {
            7.    alert(self.the_answer);
            8.   }
            9.  }
            10.  
            11.  function addhandler() {
            12.   var deep_thought = new BigComputer(42),
            13.    the_button = document.getElementById('thebutton');
            14.    the_button.onclick = deep_thought.ask_question;
            15.  }
            16.  window.onload = addhandler;
            17.  //result [42]
            18. </script>
            19.  ...

            2.7

            1. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>
            2. <script type="text/javascript">
            3. function btn_click(){
            4.   alert(this);
            5. }
            6.  
            7.  function addhandler() {
            8.    the_button = document.getElementById('thebutton');
            9.    the_button.onclick = btn_click;
            10.  }
            11.  
            12.  window.onload = addhandler;
            13.  
            14.  //result [undefined]
            15. </script>
            16.  ...

            2.8

            1. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>
            2. <script type="text/javascript">
            3. function real_func()
            4. {
            5.   alert(this);
            6. }
            7. function btn_click(){
            8.   setTimeout(real_func,100);
            9. }
            10.  
            11.  function addhandler() {
            12.    the_button = document.getElementById('thebutton');
            13.    the_button.onclick = btn_click;
            14.  }
            15.  
            16.  window.onload = addhandler;
            17.  
            18.  //result [undefined]
            19. </script>
            20.  ...

            2.9

            1. <button id='thebutton' onclick='click_handler(this)'>Click me!</button>
            2. <script type="text/javascript">
            3.  Function.prototype.bind = function(obj) {
            4.   var method = this,
            5.    temp = function() {
            6.     return method.apply(obj, arguments);
            7.    };
            8.  
            9.   return temp;
            10.  }
            11. var  real_func=function()
            12. {
            13.   alert(this);
            14. }
            15. function btn_click(){
            16.   setTimeout( real_func.bind(this),100);
            17. }
            18.  function addhandler() {
            19.    the_button = document.getElementById('thebutton');
            20.    the_button.onclick = btn_click;
            21.  }
            22.  window.onload = addhandler;
            23.  //result [undefined]
            24. </script>
            25.  ...

            2.10

            1. <script>
            2.   //** variables need to be defined
            3.   alert(document);          // [object HTMLdocument]
            4.   alert(window.document);   // [object HTMLdocument]
            5.  
            6.  
            7.   alert(window.face);      //pretty
            8.   var face="pretty";
            9.   alert(face);             //pretty
            10.   alert(window.face);      //pretty
            11.   alert(window.sock);      //undefined
            12.   alert(sock);              // ERROR: sock not defined
            13.  
            14. </script>

            2.11

            1. <script type="text/javascript">
            2. function method()
            3. {
            4.   var window={};
            5.   alert(window.location);
            6. }
            7.   alert(window.location);
            8.   method();
            9.   alert(window.location);
            10. </script>

            2.12

            1. <script type="text/javascript">
            2.    var window={};//ERROR:非法赋值!
            3.    // this works in IE,but throw an Exception in firefox
            4.    alert(window.location);
            5. </script>

            2.13

            1. <script type="text/javascript">
            2.   /** 这是一段很让人恼火的代码
            3.   可以禁用alert
            4.   */
            5.   window.alert("hello world");
            6.   window.alert=function(str){
            7.       document.write(str);
            8.   };
            9.   alert("hello world");
            10.   window.alert("hello world");
            11. </script>

            2.14:

            1. 注意这三个html文件的结果有什么不同.
            2. a.html:
            3. <script type="text/javascript">
            4. alert(sock);
            5. function sock()
            6. {
            7.   alert("function sock executed!");
            8. }
            9. alert(sock);
            10. </script>
            11. b.html:
            12. <script type="text/javascript">
            13. alert(sock);
            14. var sock=function()
            15. {
            16.   alert("function sock executed!");
            17. }
            18. alert(sock);
            19. </script>
            20. c.html:
            21. <script type="text/javascript">
            22. // 这里并不弹出"undefined"
            23. // 有点偏心啊!
            24. alert(sock);
            25. </script>

            2.15
            看看IE,firefox下分别运行有何不同:

            1. <script type="text/javascript">
            2. Object.prototype.hello=function(){
            3.   alert("hello");
            4. }
            5. window.hello();
            6. </script>

            Tag:
            相关文章


               
              Feb
              19
              Posted (xurenlu) in 杂谈 on 02月-19-2008

              这几天发现一些新的Fedora下的软件,马上更新了
              1.claws-mail:
              这是除开thunderbird之外的又一个outlook的替代品。
              注意,thunderbird下需要装一个插件来支持outlook的会议邀请,claws-mail下同样需要装一下,这个插件叫vclendar。
              2.avant-window-navigator,这个就是传说中装上之后能跟Mac一样炫的东东。
              3Wine升级到了0.9.55,嘿嘿 ,改进了Direct3D支持。
              4。据说openoffice2.4中的powerpoint切换时也有3D效果了…
              5.VirtualBox 也升级了,这次有中文版了,嘿嘿,innotek也被Sun收购了。同Mysql一样,刚被收购,网站上马上出来消息了。
              6.发现一个背单词的软件,reciteword.背了几天了,老婆今天还笑我,背的单词全是她会的。我反驳:别笑我,当年我可也是过了四级的….
              7.发现64位机器下很多插件用不了….


              Tag:
              相关文章


                 
                Feb
                17
                Posted (xurenlu) in 未分类 on 02月-17-2008

                1.我和几个同事下了火车,万事通覃同学一早已经打听到下火车后5分钟就能到酒店,于是从机场坐到城站火车站时,我们就在四处瞅瞅,看是否能看到红楼酒店。结果瞅来瞅去,没发现,红楼酒店就在我们背后,老大的字,我们都看不见。

                2.徐鹏同学和几个同事去西湖玩了回来,打车。车行至红星大酒店,徐鹏以为到了,下了车,发现是红星酒店,于是又招一的士,前行200米,才看到红楼。于是,买单下车。

                3.黑夜路人同学更生猛:走出火车站,便拦了一出租车,说要去红楼大酒店。师傅说,就在旁边,你走过去就行了。黑夜路人果然是极为生猛极为黑夜,大怒:你还拒载啊,我要投诉你!于是师傅让他上车,把计价器按下来,掉个头,指着红楼大酒店几个字说,这就是红楼大酒店了。车费10元,谢谢。


                Tag:
                相关文章


                   
                  Feb
                  01
                  Posted (xurenlu) in 未分类 on 02月-1-2008

                  连续几周,都在跟进一个播放器的活儿。
                  美国同事那边发邮件,我这边要第二天才能收到。然后我发的邮件,美国那边也得等上十几个小时。
                  那边同事忍无可忍,再三要求开个电话会议。
                  我深知一开电话会议,完全就露馅儿了,我那就只有短短几行的mail,也是绞尽脑汁,查了词典,才整出来的。
                  于是,每次我回邮件,就当没看到他们提出的开电话会议的要求。还振振有词:让他们说汉语的话,这个电话会议我倒是很乐意开啊。
                  但是老拖着也不是办法,最后终于在今天早上一大早,美国那边正是临下班的时候,开了个电话会议。我们这边出了一个英语最好的MM,但是实际沟通起来效果还是不好。我基本上除开最后老美一句“Thank you ,Thank you for the morning”之外,就啥都没整清楚。
                  当然会议也是相当有成效的,那就是:老美终于明白了,跟偶这样没文化的人,电话沟通就是浪费电话费。
                  当然,何MM的英语是相当不错的,至少她的听力是很棒的,虽说说的时候不顺畅,基本上还是能听个差不多。
                  看来我也确实需要好好学习下了。大学老是很得意地说,我可是相当地爱国,英语这么多年就没学进去过。内心里,也觉得英语这东西,其实也用不上。现在终于受惩罚了。


                  Tag:
                  相关文章