News for the ‘Programming’ Category
Recover Dreamweaver FTP-Zugang
preg_match limit
One thing to note when working with larger texts and preg_replace() is that the matched text cannot be longer than (usually) 100 000.
I discovered this while debugging a CMS-system which wouldn’t display a certain text. Took forever to find the problem.
Thankfully the default values can be changed – but only if you have access to the server.
[not so good] programming practice
If you were ever in a hurry to fix something on a live-page you might have gotten the idea to just do something like this:
if($_SESSION["customer_id"]==’815′)
echo “new cool design – still with errors”;
else
echo “old crummy design – completely error free”;
If you so far have not found out about the disadvantages of this approach – consider yourself lucky. Because – if($_SESSION["customer_id"]==’815′) – can easily turn into something like this when you are in a hurry: if($_SESSION["customer_id"]=’815′). And that might be a major problem.
Just imagine everybody ordering on your customer account. HEYYYYYY!! What a joy! So my advice is to either test on a separate development server (good girl) or to do something ugly but handy like this (baaaad, bad girl) in a config file or a file which is included on every page:
if($_SESSION["customer_id"]==’815′)
$GLOBAL["testingMode"]=1;
Then you can go like if($GLOBAL["testingMode"]==’1′) whereever you want and if you go like if($GLOBAL["testingMode"]=’1′) you have a maximum damage of the new error-ridden design molesting the customers instead of them ordering in the name of somebody they do not know.
Convert page from latin to utf-8
If you ever had the pleasure of converting a page from iso to utf-8 and had mixed encodings in your database you will appreciate this link.
http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html
Adobe Wave Wordpress Plugin
Did you ever want to notify all your fans at once if something on your blog changes? Have them download Adobe wave and send messages directly to their desktop.
You can download the plugin here:
http://blog.grobmeier.de/2009/08/04/adobe-wave-wordpress-plugin-finished.html
Categories: Programming
Tags: adobe, automated, notification, wave
Comments: No Comments.