Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
class Transaction(object): | |
def __init__(self, db): | |
self.db = db | |
def __enter__(self): | |
return self.db.session | |
def __exit__(self, type, value, traceback): |
#!/bin/bash | |
#[email protected] | |
USER='uname' | |
PWD='password' | |
DBNAME='dbname' | |
DATE=`date +%y%m%d.%H%M` | |
#backup db | |
mysqldump --default-character-set="UTF8" --extended-insert=FALSE -u$USER -p$PWD $DBNAME | gzip > $DATE.stage.sql.gz |
page.meta.keywords.data = register:newsKeywords // field : keywords // levelfield:-1,keywords,slide | |
page.meta.description.data = register:newsSubheader // field : description // levelfield:-1,description,slide | |
#add in localconf.php | |
$TYPO3_CONF_VARS['FE']['addRootLineFields'] = ',description,keywords'; |
python -c "import platform; print platform.mac_ver()" |
virtualenv -p /usr/bin/python sfvirtualenv | |
cd sfvirtualevn | |
source bin/activate | |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
server { | |
# Hier die eigene VHost-Konfiguration einfügen | |
# listen, server_name, root, access_log, error_log, index | |
# OXID eShop Rewrite Regeln | |
set $script_name $fastcgi_script_name; | |
set $fcgi_php 127.0.0.1:9000; | |
# Im Admin und Setup wird kein Rewrite auf die oxseo.php benötigt. | |
location ~ ^/(setup|admin)/?$ { |
fastcgi_param SCRIPT_FILENAME $document_root$script_name; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_NAME $script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; |
public function getShopUrl(){ | |
return $this->getConfig()->getShopUrl(); | |
} | |
public function setSpeakingUrl($speakingUrl) | |
{ | |
$this->_speakingUrl = $speakingUrl; | |
} |
$this->getViewConfig()->getOxConfigParameter('name'); | |
#new | |
oxConfig::getInstance()->getConfigParam('name'); | |
in config.inc.php or local conf | |
$this->name = 'value'; |