摘要: Setting up cron jobs in Unix and Solariscron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris. Crontab (CRON TABle) is a file which contains the schedule of cron 阅读全文
posted @ 2011-10-11 17:13 Lux.Y 阅读(313) 评论(0) 推荐(0)
摘要: Newbie: Intro to cronDate: 30-Dec-99Author: cogNiTioN <cognition@attrition.org>CronThis file is an introduction to cron, it covers the basics of what cron does,and how to use it.What is cron?Cron is the name of program that enables unix users to execute commands orscripts (groups of commands) 阅读全文
posted @ 2011-10-11 16:23 Lux.Y 阅读(392) 评论(0) 推荐(0)
摘要: If you need to export database data as a CSV file in Symfony, try this;In the action:public function executeRegistrantsToCsv(){ $id = $this->getRequestParameter('id'); $c = new Criteria(); $c->add(RegistrantPeer::EVENT_ID, $id); $c->add(RegistrantPeer::STATUS, 1); $this->aObjReg 阅读全文
posted @ 2011-10-04 23:48 Lux.Y 阅读(760) 评论(0) 推荐(0)
摘要: You need to modify your EntityFormFilter (where Entity is your object class - Article, Book, etc.).Three easy steps1) configure functionAdd an input for each field you want to include in your filter$this->widgetSchema['name'] = new sfWidgetFormFilterInput(array('with_empty' => 阅读全文
posted @ 2011-10-04 18:40 Lux.Y 阅读(387) 评论(0) 推荐(0)
摘要: function validate(form_id,email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var address = document.forms[form_id].elements[email].value; if(reg.test(address) == false) { alert('Invalid Email Address'); return false; }}<form id="form_id" method=&qu 阅读全文
posted @ 2011-10-03 23:35 Lux.Y 阅读(431) 评论(0) 推荐(0)
摘要: In the class, add this:$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', true);$context = sfContext::createInstance($configuration);$configuration->loadHelpers('url', 'Partial');then try to call the helplers 阅读全文
posted @ 2011-09-26 17:19 Lux.Y 阅读(287) 评论(0) 推荐(0)
摘要: A symfony project is made of one or more applications. Applications share nothing, but the model classes. But sometimes, you need the ability to create links to a frontend application from a backend one. Think about a CMS backend where you want the user to edit an article and then link to the corres 阅读全文
posted @ 2011-09-20 21:27 Lux.Y 阅读(466) 评论(0) 推荐(0)
摘要: RSS feeds have become extremely popular over the past couple of years. Previously it was blogs which popularized RSS feeds, but now all major News websites, social networking websites and even forums have started providing RSS feeds. For many people RSS feed readers like Google Reader, Netvibe etc h 阅读全文
posted @ 2011-09-19 18:01 Lux.Y 阅读(819) 评论(0) 推荐(0)
摘要: 显然:UL+LI在布局上比table灵活得多。比较分两列或者多列显示:table:你需要在服务器上写一大堆代码判断是不是需要换行,或者切分是不是准确DIV:你只需要定义好css,剩下的做事情叫交给浏览器吧。最简单的代码:XML/HTML代码<style type="text/css"> .mycode{ width:300px; height:74px; float:left;} .mycode ul{ width:280px;} .mycode li{ width:100px; float:left; display:block;} </style> 阅读全文
posted @ 2011-09-16 22:51 Lux.Y 阅读(1744) 评论(2) 推荐(0)
摘要: <script type="text/javascript">function bookmarkPage(url,title) { if (!url) {url = window.location} if (!title) {title = document.title} var browser=navigator.userAgent.toLowerCase(); if (window.sidebar) { // Mozilla, Firefox, Netscape window.sidebar.addPanel(title, url,"") 阅读全文
posted @ 2011-09-16 20:53 Lux.Y 阅读(1940) 评论(0) 推荐(0)
摘要: There may be times when you want to sort the values inside of an array. For example, suppose your array values are not in alphabetical order. Like this one:$full_name = array();$full_name["Roger"] = "Waters";$full_name["Richard"] = "Wright";$full_name["Ni 阅读全文
posted @ 2011-09-15 17:18 Lux.Y 阅读(409) 评论(0) 推荐(0)
摘要: Lets consider sfWidgetFormDoctrineChoice form select object with multiple elements:$this->setWidgets(array('books' => new sfWidgetFormDoctrineChoice(array('model' => 'Book', 'expanded' => true, 'multiple' => true)),));So it will obviously take a 阅读全文
posted @ 2011-09-14 18:32 Lux.Y 阅读(394) 评论(0) 推荐(0)
摘要: 转自: http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/mysqldump is an effective tool to backup MySQL database. It creates a *.sql file with DROP table, CREATE table and INSERT into sql-statements of the source database. To restore the database, execute the *.sql f 阅读全文
posted @ 2011-09-13 18:47 Lux.Y 阅读(1184) 评论(0) 推荐(0)
摘要: 转自: http://mally.stanford.edu/~sr/computing/basic-unix.htmlBasic UNIX commandsNote: not all of these are actually part of UNIX itself, and you maynot find them on all UNIX machines. But they can all be used on turingin essentially the same way, by typing the command and hittingreturn. Note that some 阅读全文
posted @ 2011-09-12 17:51 Lux.Y 阅读(429) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2011-09-08 23:59 Lux.Y 阅读(153) 评论(0) 推荐(0)