Ever change the svn repository location and needed to update the old location to the new location here how you do it
that’s it kids that’s all you have to do.
Ever change the svn repository location and needed to update the old location to the new location here how you do it
that’s it kids that’s all you have to do.
ok i have been playing with zend at home to increase my knowledge, and i have run across this, i think its pretty handy, and gave me much insight in zend’s 1.8 bootstrapping method. i didnt use any of the dojo stuff, mainly because i plan to use jquery for all my dynamic javascripting needs.
/*DB setup done here.
Read configuration, create db instance & set in registry to use in other part of application.*/
public static function setupDatabase()
{
$config = self::$db;
$db = Zend_Db::factory($config["db"]["adapter"], $config["db"]["params"]);
$db->query("SET NAMES ‘utf8′");
self::$registry->database = $db;
Zend_Db_Table::setDefaultAdapter($db);
}
protected function _initView() {
// Initialize view
$view = new Zend_View ( );
//$view->doctype(‘XHTML1_STRICT’); /* Quick Change out depending on project */
$view->doctype ( ‘XHTML1_TRANSITIONAL’ ); /* Quick Change out depending on project */
$view->env = APPLICATION_ENV;
Zend_Dojo::enableView ( $view );
Zend_Dojo_View_Helper_Dojo::setUseDeclarative ();
$view->dojo ()->setLocalPath ( "/js/prod/dojo/dojo.js" )
->setDjConfigOption ( ‘usePlainJson’, true )
->setDjConfigOption ( ‘parseOnLoad’, true )
->addStylesheetModule ( ‘dijit.themes.soria’ )
->addStylesheet ( ‘/js/prod/dojox/grid/resources/soriaGrid.css’ )
->enable ();
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( ‘ViewRenderer’ );
$viewRenderer->setView ( $view );
// Return it, so that it can be stored by the bootstrap
return $view;
}
}
more can be read here i give credit to the guy who wrote this up originally and shared with the rest of the world.
when i used to work at sperka int’l a while back i wrote a block of javascript for one of our clients, discounttirecenters.com
here are my shenanigans.
it was simple old style ajax image fetcher.
shows how much i love the matrix i guess.
for some reason there are lot of tutorials coming out of the UK. this is just one of them. good read on OO javascript.
so in a previous post i put up a how to do on renaming files in a for loop and string replacing. here is another example for taking files and renaming them all with lovely counts as well.
here is the line of code. that we will execute.
lets break it down for more details.
first off here is the count, we shall start with 1, you can start with any number you wish.
your for loop, niotice we are putting the count in ${count}, now you can do this, or $count. either way is correct.
you now see this. the colon basically says im a new command in this “do” section. and the double parens basically mean treat the insides like a variable.
thats basically it.