跳至主要内容

博文

symfony2.0 to 2.1

在windows 下安装symfony标准版本的lib有问题,原因是composer装不上,有人提供了一个方法,摘自google group: a) Change into a directory in your path like  cd /usr/local/bin Get Composer  curl -s  http://getcomposer.org/ installer  | php Make the phar executable  chmod a+x composer.phar b)  $ curl -s https://getcomposer.org/ installer | php $ sudo mv composer.phar /usr/local/bin/composer c) Run  git clone  https://github.com/composer/ composer.git Download the  composer.phar  executable Run Composer to get the dependencies:  cd composer && php ../composer.phar install You can now run Composer by executing the  bin/composer  script:  php /path/to/composer/bin/composer 我在windows7下成功的用第三个方法安装了composer,然后安装symfony lib: D:\workspace\symfony_prospection>php composer.phar install 前提是这个composer.phar 是保存在symfony_prosepection里面的。

find and findby

"find" works only for a single id. If you want to query for a set of id's you can use "findBy" $em = $this->getDoctrine()->getEntityManager(); $em->getRepository('AcmeUserBundle:User').find($id); $em->getRepository('AcmeBannieresBundle:BannerCity')->findBy(array('id' =>$banners));

background-image

/* background-size is only for css3, so, ie8 do not support it. * bacdground-size contain is different from background-size: 100%, auto; or something like that, * contain will stretch the photo, with auto will not. // need to initialize the first and respond to the change. var h=$('#img_detail_hidden').height(); var w=$('#img_detail_hidden').width(); if (h>w && h>348){ $("#imagDetail").css('background-size','auto 100%'); }else if (w>h && w>342){ $("#imagDetail").css('background-size','100% auto'); }else{ $("#imagDetail").css('background-size','auto auto'); } $('#img_detail_hidden').load(function(){ var h=$(this).height(); var w=$(this).width(); if (h>w && h>348){ $("#imagDetail").css('background-size','auto 100%'); }else if (w>h && w>342){ $("#imagDetail").css(...

css table 下的div 不能继承table width

今天该spoop 的popup,发现一个很奇怪的问题, http://www.spoop.fr/Cantal-15-lanobre-5330-annonce-1,50-order,0,desc-recherche-tc,pc,pr_act,Vend,Cherche,Loue,Troque,Donne_sm,1_section,rechercher_onglet,ville 这个是一个实验,当div中有一个长的字符串并且没有空格,也就不能正常分行显示的时候,即便你设定word-wrap可以打断字符串,但是它还是显示成一行。 但是如果把这个table改成div,它的width是会被正确继承的: http://www.spoop.fr/Cantal-15-lanobre-5330-annonce-1,50-order,0,desc-recherche-tc,pc,pr_act,Vend,Cherche,Loue,Troque,Donne_sm,1_section,rechercher_onglet,ville 你说这就是哪个脑残非要用table来显示用div显示的东西,我操啊。而且即便是你给每一个td,tr加上width:100%都不行,td,tr,根本不鸟它的father。

google sitemap generator

如果遇到这样的错误: This installation updates the Apache configuration file. To find that file, the installer needs the location of the Apache binary (httpd) or control script (apachectl). The binary or control script that you specify must support the -V option. What is the location of the Apache binary or control script? [/usr/sbin/apache2] Can't determine Group directive for Apache. 但是你 /usr/sbin/apache2 -V 又是能够找到的话,用下面的命令安装: ./install.sh -g www-data -c /etc/apache2/apache2.conf -t /usr/sbin/apache2ctl