Author: qingbo

  • bbPress做菜单

    在公司用bbPress架了个小论坛,交流经验、灌水,一个主要的功能是点菜。

    这个版面每天一个sticky主题,吃饭时间大家都把自己要点的东西作为回复发上去,专人统计好后打电话点。

    前些天都是把各家的菜单置顶,但仍然很不方便,每次发贴都得看着其它的页面点。今天花了一点时间,把菜单做到了这个版面的发贴框下面,而且点击一样饭菜时它就会自动加入输入框,舒服多了。

    如果再把每次点的菜加入tag列表,那么就可以利用bbPress的Tag系统统计各样菜的popularity了。可惜我0.81的版本还不支持中文Tag,据说是支持的。。。可以想见,首页的tag cloud将会变成一个menu cloud. menu cloud? 将来开饭馆一定要做一个:) 这样服务员就不用给人介绍哪个菜卖得最好了。

    做一个简单的点菜系统也不难,不过在论坛上点菜更有乐趣。今天就有人滥用key master职能,改了好多人点的菜,哈哈。

  • 奇怪的错误

    刚才调试一个日记页面时,突然看见tomcat打出的异常,整页的stacktrace,吓了一跳。仔细看,跟这个页面一点关系都没有。

    后来老大过来看,原来是他刚才把一个出错页面信息保存下来记到日记里了。。。

    愚人节还有一件趣事,有时间再记。

  • 精彩评论

    Quoted from IEBlog:

    http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-
    machine.aspx#1186820

    This “solution” shows the utter lack of talent at Microsoft. An application
    shouldn’t be so ingrained into an operating system that an entire virtual
    environment is needed to use different versions. I used to believe it was a
    pain testing web applications for quirks in IE6, Mozilla, Opera, Safari, etc,
    but now, thanks to the dolts at MS, I have to run a virtual environment in
    addition to my normal rounds of testing, and I guess I can forget about
    supporting IE6 users after April 1st. Because the Software Engineers at
    Microsoft are clearly lacking in their ability to produce a well written
    operating system, I’ve provided a diagram below to prevent mistakes like this
    from happening again, courtesy of my undergraduate OS class:

    The right way to write an operating system:

    [hardware]

    [kernel]

    [applications]

    Notice how the applications sit entirely on their own level. Ingenuous!

    The wrong way to write an operating system:

    [hardware]

    [kernel+GUI+Browser+Mr.Clippy+…]

    [3rd party applications]

    Notice how the applications, like Internet Explorer, are integrated with the
    OS. While this may be good for protecting monopolies, it’s bad for every one
    of your users. So please avoid it in the future!

    • One unhappy customer

    http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-
    machine.aspx#1186839

    Damn, i see so many “well” trained people here. You call yourselves
    developers ? You are coding machines, have you ever developed something real
    in your life? Something that works on every noticeable browser at least on the
    market ? MS did a good think for themselves to keep you locked in in IE, but
    you see how many problems it created? I lay my hat down for IE, at the
    beginning of its age, it was a tool FOR developers, a tool that because of
    ignorance to the new wave of web features or because of too much bugfixes
    suddenly transformed itself in tool against developers, and i actually mean
    AGAINST(<– font-weight:bold;font-size:8em;) developers, or at least good
    ones, that are preocupied to run their software for all of their clients. You
    people at MS, at least the ones that are developing IE, should make a
    partnership or quit doing browsers, give support to Mozilla or Opera to create
    a damn standards friendly browser. And create something like Apollo from Adobe
    for your own platform taste. IE is now a mess, progress has been made with IE7
    but it is far from being or at least trying to be as standards friendly as FF
    or Opera or Safari. You could even start concentrating on doing good, quality
    software as a plugin for FF (like .net integration). Active-X is a mess. No
    serious company still sees it as a common choice over java(if you want low
    level stuff, not possible with flash). You have lost the plugin war, and the
    browser war is still won by you, but only by inertia. I repeat it again, i bet
    you have great programmers there, but because you are a company “for the
    money”, they will always have pressure on them from above and never finish a
    good quality product, they will always have to switch focus on something else
    than browsers.Dont tell me that your browser team, in 7 years has developed
    only and only IE7. The so crazy “developers, developers” is something like a
    Jabba roar when i kill my mind hacking IE to make my client or my boss happy.
    And this thing of not being possible to run two versions of IE on the same
    machine is quite a blow. IE is only damn renderer, and i bet the part that
    breaks is the one that made windows so integrable with it. You’ve got sued for
    this, and you also got sued for the Eolas issue.And even your own plugin
    architecture got broken.We have to rely on crazy JS hacks to insert a
    MediaPlayer plugin, not making our content possilbe to multiple devices, or
    having to overwork to avoid this. Problems that the Opensource Mozilla Gecko
    engine will never have. I finish my rant here, but probably Adobe’s Apolo will
    be the wave of the future with Internet Applications, or might that be
    ExpresionSuite with .net ? Or the browser will maintain forever its might.

    http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-
    machine.aspx#1187334

    Its funny I was just thinking about how messed up Windows had done things
    and how simple the logic would be. If it where me developing an OS (Which I
    realize is a lot of work) that I wouldnt want anyone being able to mess around
    with the core of the OS itself and that to create a folder like the windows
    folder that is not writable to period and have another folder for all 3rd
    party applications including there own so that the end user would have full
    control but not have to worry about any program / user from removing files
    that make the os work. you could have a layer overtop of the core os that
    could be modified to look like it was modified but not actually changing it so
    if you didnt want it you could remove it. Another method of working with IE 6
    and IE 7 that no one has mentioned is to have access to another pc and using
    vnc or something of the like, thats what I do for all my web dev. For app dev
    I use vmware cause I dont want to blow up my os lol (again because its so
    unstable) I think developers should just say to hell with older browser
    versions and force an update lol 🙂 if all websites wouldnt work with IE6
    people would have to upgrade. Yes I realize there are cases where you cant
    upgrade but still (thats no excuse)

  • IE,无比垃圾

    对于开发者来说,使自己的界面在IE下显示正常,需要花费数倍于在Firefox中下的功夫。

    人们可以为Firefox开发出Firebug这样强大的东西,而IE的开发者们自己也仅仅只能做出一个跟Firebug比起来基本上没用的toolbar.

    时无英雄,竟使竖子称雄!希望IE早日安息。

  • 动物园

    前天下午去的。

    1. 熊猫,这只很活跃,跑到玻璃前面好奇地看着外面的人们(所有图片):

    熊猫

    下面两个视频是它在玩一根竹子,这叫竹马。还有一个好玩的视频,相机上正常,电脑上看很暗。

    1. 熊喝奶,没有一点威风。我建议抓住那些投食的,重罚,或者扔下去喂熊,提高中华民族种群素质,为中华民族伟大复兴做贡献。

    棕熊

    1. 这只巨大的猫:

    巨大的猫,注意耳朵上的毛

    1. 这鸟肯定是不死族的,注意左边那只的眼神。它拧着脖子到那样的角度不是看天,是看我!

    undead

  • 自然规律

    上次LMS就提醒我要小心,这次果然最先出局了。看来已经形成自然规律了,以后一定要注意,差不多就可以了,千万不做赢家。

    2007-3-16 Texas Hold'em

    哪个比较空,被别人的钱占满了的地方就曾经是我的阵地。

  • 办公室

    我的角落:

    我的小角落

    健身球,这个比较小,今天又买来一个大的,很爽

    健身球

  • 花花草草

    同事收到的花:

    同事收到的花 同事收到的花

    馒头柳,挺好看的:

    馒头柳

    桃花快开了:

    桃花要开了

  • 昨晚赌赢了

    昨天晚上是我们第二次玩Texas Hold’em,最后我赢了,哈哈。

    开始的时候放舒缓的音乐,大家都舍不得下注。后来改成了斗牛士进行曲,就变得热血沸腾了。

    Texas Hold'em

    第一次的赢家这次最先出局,打扫卫生、跳绳。下次我可得小心了,不能冲动。

  • Red Hat AS 配置 Subversion

    今天在一台Red Hat AS 4的服务器上配置Subversion服务。

    首先下载源代码编译,因为没有Apache合适版本的mod_dav.h,没有生成mod_dav_svn.so,而且总是报Locale错误,删了。

    然后下了Collab Net的那个版本,配置Apache的时候说那个mod_dav_svn.so不对,只好也删了。

    最后按Subversion页面上的那个链接找到RPM包,包括apr, apr-util,安装成功,且svn/svnadmin正常运行
    。因为本来就有apr和apr-util的低版本,要用-Uvh选项升级。

    但配置Apache的时候出了问题,目录权限没问题了,访问就出错。后来在Subversion FAQ里发现Red Hat还有security con
    text的概念,正是它阻止了Apache访问代码库。于是chcon一下,可以访问了。然而加上密码验证后总是不能通过验证,这时候才想起看Apache的Log,
    原来是无法访问密码文件,permission denied. 噢,密码文件也要chcon.

    看Log很重要,Apache、Tomcat都是。

    期间有一次启动机器,随便按了几个键,好久都无法连接。插上显示器一看,原来停在选择内核那个界面上了。。。