-
Search
Categories
-
Linux, PHP, LAMP, The Web in a blog- Android – how to develop directly on a phone
- Android drawable default icons – they are free to use
- Android how to read and write files
- Uncompress on the fly when copying a file from a remove location with scp
- Setting up an encrypted volume on an external hard drive on CentOS
- Linux bash – tar tricks
- Implement Selenium tests
- Using a downloaded package without IDE in Java
- CSS selectors optimisation
- Ubuntu Linux on Acer Aspire AO751h
Tag Cloud
alarm array backup begin button character commercial constants coppermine CSV DVD eclipse ecommerce email email server expect firefox font foreach formatting fstab ftp GMail gnome keyboard Lucene marketing memcached mount plugin profiling protect regexp scp Selenium SEO sftp split svn tar utf utf8 Vbulletin Virtual Server Web Dev Security
Category Archives: Web Development
Lucene PHP – Important Notes
*** Lucene – Use integers *** Actually the book ‘Practical Symfony’ (version jobeet-1.2-propel-en-2009-02-05) is not accurate: 1) the primary key should be defined as a Keyword $doc->addField(Zend_Search_Lucene_Field::Keyword(‘pk’, $this->getId())); 2) by default, Lucene can’t find numbers in its index [and a … Continue reading
Symfony and Eclipse – Include Library
To include Symfony library: ‘Add External Source Library’ during the creation of the project
Symfony – Admin on a Subset of Rows, Extra Criteria
In the actions.class.php, you need to override the method buildCriteria, adding the criteria you need
Posted in Symfony
Leave a comment
Propel – Sympony – Conditions in OR in Criteria
Propel: $c = new Criteria(); $cton1 = $c->getNewCriterion(AuthorPeer::FIRST_NAME, “Leo”); $cton2 = $c->getNewCriterion(AuthorPeer::LAST_NAME, array(“Tolstoy”, “Dostoevsky”, “Bakhtin”), Criteria::IN); $cton1->addOr($cton2); // add to Criteria $c->add($cton1); $authors = AuthorPeer::doSelect($c);
Posted in Symfony
Leave a comment
Selenium & PHPunit Tricks
_ -d par=val -> to pass a param _ –filter to execute just some tests from the command line _ use exit from inside a test to freeze the browser – good for debugging http://www.bitmotif.com/selenium/selenium-remote-control-for-java-a-tutorial-part-2/
VBulletin – Make Everything UTF-8
_ MySQL – database charset _ config file – database charset _ Admin -> Languages: HTML Character Set must be UTF-8 _ Check the Meta Equiv is UTF8
The Unexpected SQL Injections
http://www.webappsec.org/projects/articles/091007.shtml
Posted in PHP, Web Development
Leave a comment
MySQL Optimization
use ENUM whenever possible do not be too generous with the varchar length NULL columns take more space and make computation harder – avoid using them, use empty strings or zeros. InnoDB-specific. Use a surrogate key which is a primary … Continue reading
Posted in MySQL
Leave a comment
Custom SQL on Symfony
$c = new Criteria(); $c->addAsColumn(‘total_views’, ‘SUM(‘ . self::VIEWS . ‘)’); $c->addAsColumn(‘yearAndMonth’, ‘SUBSTR(‘ . self::TIME . ‘, 1, 7)’); $c->add(self::OFFER_ID, $offer->getId()); $c->addGroupByColumn(‘yearAndMonth’); $c->addDescendingOrderByColumn(‘yearAndMonth’); $viewsForMonths = array(); $stmt = BasePeer::doSelect($c); while($result = $stmt->fetch(PDO::FETCH_ASSOC)) { list($year, $month) = explode(‘-’, $result['yearAndMonth']); $monthString = date(‘F’, … Continue reading
Posted in Symfony
Leave a comment
Symfony – Get the Working Environment
$sf_environment = sfConfig::get(’sf_environment’);
Posted in Symfony
Leave a comment
