跳至主要内容

博文

doctrine2 where in的问题

$queryBuilder->select('o')-> from('Object', 'o')->where($queryBuilder-> expr()->in(' o.id ', $ids)); Where $ids = array(1, 2, 5, 6, ...). This works very well. On the other hand, the following equivalent DQL yields only 1 result: whichever id is the first in the $ids list.  $this->getEntityManager()-> createQuery('SELECT o FROM Object o '.       'WHERE  o.id  IN (:ids) ')       ->setParameter('ids', implode(', ', $ids));

jquery ui

hide tabs when loading: Tab 1 Tab 2 Tab 3 Content 1 Content 2 Content 3 然后可以如此: $( "#tabs" ).tabs({ create: function(event, ui) { //executed after tab is created. $('.tabs_content').show(); }, show: function (event, ui) { //on every tabs clicked } });

wao wao wao. lenon is right!!

The following is some words from a blog:  Lennon is right. The key to life is happiness, but what makes you happy can be completely different from what makes me or anyone else on this planet happy. I found my passion in life: photography. I love it! I’ve had a great ride in my 22 plus years (so far) and I have never regretted my choice. Specifically, most of my life I have been a photojournalist. For the last two years I’ve been a freelance photographer. Hampton Brooks, what do you love? Is it sports? Science? Movies? I can’t help but marvel at Quinten Tarantino who worked as a video store clerk because he loved movies. He was able to watch thousands of movies and later became a director because it was his passion. Follow your passion and it will lead to happiness. If your passion is sitting in front of a TV playing video games, how about a job in that world? Would it be cool to get paid to be a game tester? Whatever your passion is, find a way to make it a career. If no career ...

小说

我总觉的小说不外乎是表达感情的一种形式,所谓的感情,也就是所谓的什么道德,爱情,经历,愿望,和一些具体的感觉,比如触觉,听觉,视觉之类的。当然,一般一本小说有主要的表达对象,通过对这个对象的展开和填充,间接的表达了作者的感情。 小说就是虚拟现实的起源,其实另外一方面也说明了,生活在别处。作者通过它生活在别处,读者通过它生活在别处,我们都愿意生活在别处,这么说来,真的只有不看书的才生活在现在么?也不尽然,农民自然可以抬头望天,政客也能低头迎接民众的欢呼,或者是谩骂,妓女可以一边做爱,一边想着家里的吃的还够不够,上课的孩子们也早已学会睁着眼睛睡觉。原来,我们真的都生活在别处。 那是我们搭建的房子,那是我们充满的阳光,我们是主,我们是那羊羔。也许这就是小说的魅力吧。

swift mail

swiftmailer 在symfony2.0下面似乎有点问题,如果你有 Warning: call_user_func() expects parameter 1 to be a valid callback 这个问题,或者: Class 'Swift_Mailer' not found  的问题,参见: https://github.com/swiftmailer/swiftmailer/issues/219 需要将 app/autoload.php 的最后两行删掉,加上: require __DIR__.'/../vendor/swiftmailer/lib/swift_required.php'; 不然是不行的。好像symfony2.1就不需要这个了。