<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5199583470212679285</id><updated>2011-11-28T00:34:22.778+01:00</updated><category term='arguments'/><category term='Kolb&apos;s experiential learning theory'/><category term='books'/><category term='development'/><category term='argument'/><category term='adobe'/><category term='getColumnName'/><category term='roam'/><category term='zencity'/><category term='publish-assets'/><category term='RSA'/><category term='chrome'/><category term='Kaminsky'/><category term='visual aid'/><category term='copy'/><category term='configuration'/><category term='ORM'/><category term='belt track'/><category term='notepad'/><category term='ini'/><category term='motherboard'/><category term='%time%'/><category term='write'/><category term='delims'/><category term='line'/><category term='eula'/><category term='system'/><category term='price'/><category term='doxpara'/><category term='names'/><category term='java'/><category term='schedule'/><category term='world record'/><category term='Zend'/><category term='useragent'/><category term='colortool'/><category term='UK'/><category term='pdf'/><category term='fast boot'/><category term='PEAR'/><category term='NT'/><category term='read'/><category term='Netbeans'/><category term='substring'/><category term='Firefox'/><category term='iPhone'/><category term='Internet Explorer'/><category term='network'/><category term='framework'/><category term='enabledelayedexpansion'/><category term='open source tools'/><category term='blogging'/><category term='anxcity'/><category term='label'/><category term='google'/><category term='loop'/><category term='cd /D'/><category term='cryptography'/><category term='upgrad'/><category term='file size'/><category term='search engine'/><category term='sfGuardPlugin'/><category term='IDE'/><category term='design pattern'/><category term='webkit'/><category term='plugin'/><category term='Kolb&apos;s learning styles model'/><category term='participation'/><category term='steve jobs'/><category term='animation'/><category term='xcopy'/><category term='Sotirov'/><category term='CON'/><category term='ShockwaveFlash'/><category term='e-learning'/><category term='learning'/><category term='comments'/><category term='the back of the napkin'/><category term='BOSS'/><category term='IE6'/><category term='number'/><category term='header'/><category term='files'/><category term='Flash 10'/><category term='properties'/><category term='private'/><category term='PHP'/><category term='%~dp0'/><category term='KeyCzar'/><category term='Draggable is not defined'/><category term='symfony'/><category term='film'/><category term='cheatsheet'/><category term='Europe'/><category term='problem'/><category term='%date%'/><category term='install'/><category term='subroutine'/><category term='Kolb'/><category term='DNS'/><category term='func_get_args'/><category term='REM'/><category term='databases.yml'/><category term='keys'/><category term='accentué'/><category term='RAID'/><category term='crawl'/><category term='column'/><category term='world map'/><category term='open source'/><category term='date'/><category term='sub'/><category term='XP SP2'/><category term='browser sniffer'/><category term='dsn'/><category term='encryption'/><category term='second life'/><category term='Flash'/><category term='upgrade1.2'/><category term='css'/><category term='database.yml'/><category term='DNS checker'/><category term='web 2.0'/><category term='remarks'/><category term='films of the month'/><category term='file attributes'/><category term='LinkedIn'/><category term='attributes'/><category term='Safari'/><category term='Mac'/><category term='for ... in (...) do'/><category term='current directory'/><category term='spaces'/><category term='file path'/><category term='file information'/><category term='accents'/><category term='download day'/><category term='%~z0'/><category term='notebook'/><category term='IE7'/><category term='propel'/><category term='JScrollPane'/><category term='business'/><category term='rich internet application'/><category term='CRM'/><category term='mysql'/><category term='aptivate'/><category term='Ajax is not defined'/><category term='security'/><category term='HTML forms'/><category term='site optimisation'/><category term='social search'/><category term='ActiveXObject'/><category term='exclamation'/><category term='cloud'/><category term='move'/><category term='hacker'/><category term='batch'/><category term='hidden'/><category term='gears'/><category term='edit'/><category term='IE8'/><category term='color'/><category term='directories'/><category term='ssl'/><category term='swf'/><category term='Russia'/><category term='minimum requirements'/><category term='cakePHP'/><category term='setlocal'/><category term='w3c'/><category term='sandbox'/><category term='yahoo'/><category term='object-oriented'/><category term='MVC'/><category term='public'/><category term='javascript'/><category term='XP'/><category term='apple'/><category term='Š'/><category term='hosts'/><category term='social'/><category term='crowd search'/><category term='form rendering'/><category term='youtube'/><category term='RAM'/><category term='http'/><category term='3G'/><category term='help'/><category term='Ajax'/><category term='::'/><category term='accented characters'/><category term='comparing file sizes'/><category term='decryption'/><category term='browser'/><category term='internet'/><category term='me.dium'/><category term='folders'/><category term='timestamp'/><category term='file'/><category term='default'/><category term='no valid packages found'/><category term='database'/><category term='apache'/><category term='linux'/><category term='JTable'/><category term='Republic of Ireland'/><category term='Belgium'/><category term='programming'/><category term='experience'/><category term='rename'/><category term='run path'/><category term='ASUS'/><category term='guiness record'/><category term='set /P'/><category term='delayed expansion'/><category term='blog'/><category term='time'/><category term='french'/><category term='how to train your dragon'/><category term='blogger'/><category term='virtual host'/><category term='google favicon'/><category term='automated updates'/><category term='splashtop'/><category term='search'/><category term='phar'/><category term='cuil'/><category term='iPad'/><category term='nested variables'/><category term='attrib'/><category term='black belt'/><title type='text'>The µEth Blog</title><subtitle type='html'>Quick links: &lt;a href="http://elinorhurst.blogspot.com/search/label/batch"&gt;batch&lt;/a&gt;, &lt;a href="http://elinorhurst.blogspot.com/search/label/google"&gt;Google&lt;/a&gt;, &lt;a href="http://elinorhurst.blogspot.com/search/label/java"&gt;Java&lt;/a&gt;, &lt;a href="http://elinorhurst.blogspot.com/search/label/javascript"&gt;Javascript&lt;/a&gt;, &lt;a href="http://elinorhurst.blogspot.com/search/label/search%20engine"&gt;search engine&lt;/a&gt;, &lt;a href="http://elinorhurst.blogspot.com/search/label/symfony"&gt;symfony&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>92</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2251504516000014974</id><published>2011-02-23T16:19:00.000+01:00</published><updated>2011-02-23T16:19:01.631+01:00</updated><title type='text'>Time for some new stuff</title><content type='html'>Moving on to exploring Java/JSP once more. Lots of fun to be had.&lt;br /&gt;Let's see where this leads, news soon in any event :-).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2251504516000014974?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2251504516000014974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2251504516000014974&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2251504516000014974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2251504516000014974'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2011/02/time-for-some-new-stuff.html' title='Time for some new stuff'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2363667499513862400</id><published>2010-05-26T22:29:00.002+02:00</published><updated>2010-05-26T22:29:29.102+02:00</updated><title type='text'>L'arnacoeur</title><content type='html'>Eh oui hop me suis lancée, l'Arnacoeur... il y a deux semaines certainement quelque chose comme ça. Boh. Je dirais que les Cranberries l'ont trop bien chanté pour qu'on puisse l'imiter... "Disappointment".&lt;br /&gt;&lt;br /&gt;Un peu plat tout ça...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2363667499513862400?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2363667499513862400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2363667499513862400&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2363667499513862400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2363667499513862400'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/05/larnacoeur.html' title='L&apos;arnacoeur'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-833737278215527719</id><published>2010-04-06T23:27:00.009+02:00</published><updated>2010-04-06T23:45:56.257+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPad'/><category scheme='http://www.blogger.com/atom/ns#' term='the back of the napkin'/><category scheme='http://www.blogger.com/atom/ns#' term='steve jobs'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='how to train your dragon'/><category scheme='http://www.blogger.com/atom/ns#' term='roam'/><title type='text'>Dragons, napkins and Steve Jobs's iPad in Time</title><content type='html'>At first thought I was in the wrong place at the wrong time, then thoroughly enjoyed watching How to train your dragon the film based on &lt;a href="http://www.amazon.co.uk/Hiccup-How-Train-Your-Dragon/dp/0340999071/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1270589287&amp;sr=8-1" target="_blank"&gt;"How to train your dragon" by Cassida Cowell&lt;/a&gt;. &lt;br /&gt;&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qHUhygdAZIw&amp;hl=en_US&amp;fs=1&amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qHUhygdAZIw&amp;hl=en_US&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="190"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Not sure what the books are worth. Any clues welcome.&lt;br /&gt;&lt;br /&gt;Off to bed for now absolutely shattered. Reading "The back of the napkin" and thoroughly enjoying it! &lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yTimejXbd5M/S7up78_yj9I/AAAAAAAAACo/GAKCY0KmlXU/s1600/the_back_of_the_napkin.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 300px; height: 300px;" src="http://3.bp.blogspot.com/_yTimejXbd5M/S7up78_yj9I/AAAAAAAAACo/GAKCY0KmlXU/s320/the_back_of_the_napkin.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5457142220940546002" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Already &lt;a href="http://www.thebackofthenapkin.com/" target="_blank"&gt;one book late&lt;/a&gt; mind you. So, more news about that soon. &lt;br /&gt;&lt;br /&gt;Plus, it looks like Time magazine's latest issue is all about the iPad and Steve Jobs. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_yTimejXbd5M/S7uo5vInhVI/AAAAAAAAACg/_7-upLjlbiE/s1600/time_steve_jobs.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 242px; height: 320px;" src="http://3.bp.blogspot.com/_yTimejXbd5M/S7uo5vInhVI/AAAAAAAAACg/_7-upLjlbiE/s320/time_steve_jobs.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5457141083348108626" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Must dig in to that fast :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-833737278215527719?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/833737278215527719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=833737278215527719&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/833737278215527719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/833737278215527719'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/04/dragons.html' title='Dragons, napkins and Steve Jobs&apos;s iPad in Time'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_yTimejXbd5M/S7up78_yj9I/AAAAAAAAACo/GAKCY0KmlXU/s72-c/the_back_of_the_napkin.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-9053967075868122202</id><published>2010-03-15T21:28:00.006+01:00</published><updated>2010-04-09T22:22:44.693+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='film'/><title type='text'>A couple of films</title><content type='html'>Went to see &lt;a target="_blank"  href="http://www.amazon.com/Shutter-Island-Leonardo-DiCaprio/dp/B001GCUO5M?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Shutter Island&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=themicblo-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B001GCUO5M" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt; yesterday. Not bad I felt, nice cast, good to see Michelle Williams, but a little too predictable for my liking. &lt;br /&gt;&lt;br /&gt;I take it the book is better - but it's a little late now I guess to give it a go.&lt;br /&gt;&lt;br /&gt;Also, finally got around to watching &lt;a target="_blank"  href="http://www.amazon.com/Road-Viggo-Mortenson/dp/B001FB5634?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;The Road&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=themicblo-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B001FB5634" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;... what can I say? Simply brilliantly tragic depiction of an apocalyptic world. Let's hope we never get to see anything like it. Definitely one of those films one should see but avoid on dismal days!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-9053967075868122202?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/9053967075868122202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=9053967075868122202&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9053967075868122202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9053967075868122202'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/03/couple-of-films.html' title='A couple of films'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2985672228226458787</id><published>2010-03-07T20:03:00.002+01:00</published><updated>2010-04-09T22:19:19.035+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='books'/><title type='text'>The one-minute read</title><content type='html'>When I saw the title of this book, I simply couldn't resist giving it a peak.&lt;br /&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=themicblo-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0007107927&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;I would say it is was worth the 5-10$ it cost and made for a quick, relatively entertaining read.&lt;br /&gt;The book covers three basic principles to manage anything, from your family, to your work, to your life in general: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;keep a list of understandable self-contained goals (one-minute objectives)&lt;/li&gt;&lt;li&gt;remember to praise yourself and others when things go right (one-minute praises)&lt;/li&gt;&lt;li&gt;remember to reprimand yourself and others when things go wrong (one-minute reprimands) BUT, never leave it at that: make sure to remind yourself of what actually *did* go right and that "to err is human, to forgive divine" (thanks Maggie Smith :D)&lt;/li&gt;&lt;/ol&gt;So... this is where I start rambling on about traveling the US, making it to Canada, Scotland, Ireland and many places more... go girl!! :-)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2985672228226458787?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2985672228226458787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2985672228226458787&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2985672228226458787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2985672228226458787'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/02/one-minute-read.html' title='The one-minute read'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1789025150464716712</id><published>2010-03-01T23:05:00.004+01:00</published><updated>2010-03-01T23:06:30.285+01:00</updated><title type='text'>Google AdWords</title><content type='html'>Well, hey presto that's done. Got an advert via the post and have decided to try out Google adWords to see how things pan out - for better for worse.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1789025150464716712?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1789025150464716712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1789025150464716712&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1789025150464716712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1789025150464716712'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/03/google-adwords.html' title='Google AdWords'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5875248465899422176</id><published>2010-03-01T22:02:00.012+01:00</published><updated>2010-04-09T22:17:09.694+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='films of the month'/><title type='text'>Quickie film reviews</title><content type='html'>&lt;a target="_blank"  href="http://www.amazon.com/Burn-After-Reading-Brad-Pitt/dp/B001JIE7JC?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Burn after reading&lt;/a&gt;&lt;br /&gt;If you are short on time, ignore this one. Seems slightly clumsy but does have something to it.&lt;br /&gt;&lt;a target="_blank"  href="http://www.amazon.com/11-14-Henry-Thomas/dp/B000ALM40I?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;11:14&lt;/a&gt;&lt;br /&gt;"these boots are made for walking, and that's just what they'll do... one of these days these boots are going to walk all over you" - Enjoy!&lt;br /&gt;&lt;a target="_blank"  href="http://www.amazon.com/Felon-Stephen-Dorff/dp/B001AK3S4O?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Felon&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=themicblo-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B001AK3S4O" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;Sweet, you'll probably want to watch this one...&lt;br /&gt;&lt;a target="_blank"  href="http://www.amazon.com/Valkyrie-Single-Disc-Tom-Cruise/dp/B001TUZG4K?ie=UTF8&amp;tag=themicblo-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Valkyrie&lt;/a&gt;&lt;br /&gt;"Any problem on Earth can be solved with the careful application of high explosives, the trick is not to be around when they go off" - excellent cast, particularly remarkable performances by Bill Nighy for instance, interesting film for single viewing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5875248465899422176?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5875248465899422176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5875248465899422176&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5875248465899422176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5875248465899422176'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2010/03/quickie-film-reviews.html' title='Quickie film reviews'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8029187757423994669</id><published>2009-12-05T20:23:00.042+01:00</published><updated>2009-12-05T21:07:59.057+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JTable'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='default'/><category scheme='http://www.blogger.com/atom/ns#' term='getColumnName'/><category scheme='http://www.blogger.com/atom/ns#' term='column'/><category scheme='http://www.blogger.com/atom/ns#' term='JScrollPane'/><category scheme='http://www.blogger.com/atom/ns#' term='names'/><category scheme='http://www.blogger.com/atom/ns#' term='header'/><title type='text'>JTable in JScrollPane showing default column names</title><content type='html'>Well, back to the basics of Java...&lt;br /&gt;&lt;br /&gt;Just in case anybody (that's including me ;-)) gets this problem (again) here is the solution.&lt;br /&gt;&lt;br /&gt;Basic scenario: building a JTable with a non default model class extending &lt;i&gt;AbstractTableModel&lt;/i&gt; as follows. I have omitted necessary includes and actually removed method bodies for simplification purposes.&lt;br /&gt;&lt;br /&gt;Spot the error...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class SyncOperationTableModel extends AbstractTableModel&lt;br /&gt;{&lt;br /&gt;    // attributes&lt;br /&gt;&lt;br /&gt;    public SyncOperationTableModel(ArrayList&lt;SyncOperation&gt; syncOperations)&lt;br /&gt;    {&lt;br /&gt;        super();&lt;br /&gt;        // initialize attributes&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getRowCount()&lt;br /&gt;    {&lt;br /&gt;        // return the row count based on attributes (for instance)&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getColumnCount()&lt;br /&gt;    {&lt;br /&gt;        // return column count base on attributes (for instance)&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getColumName(int column)&lt;br /&gt;    {&lt;br /&gt;        // return column name&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Object getValueAt(int row, int column)&lt;br /&gt;    {&lt;br /&gt;        // return the value, &lt;br /&gt;        // by default setValueAt is not necessary &lt;br /&gt;        // (AbstractTableModel returns false to isCellEditable method)&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Symptom? The column names (&lt;i&gt;getColumName(int column)&lt;/i&gt;) never get returned and are replaced with default names: A, B, C... At first sight this is strange, since I purposefully add the table to a JScrollPane (which should handle the table header automatically).&lt;br /&gt;&lt;br /&gt;Solution? In the above code the &lt;i&gt;getColumnName(int column)&lt;/i&gt; does not get called simply because I have created a new method named getColumName (i.e. with a missing 'n' to the 'column' part of the name). Stu-pid!&lt;br /&gt;&lt;br /&gt;New method:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public String getColumnName(int column)&lt;br /&gt;    {&lt;br /&gt;        // code&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Reaaaaally hopeless... no wonder this was impossible to find despite GIYF. Now getting on to cell rendering - it's been a while... other silly mistakes ahead I am sure.&lt;br /&gt;&lt;br /&gt;More news soon.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8029187757423994669?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8029187757423994669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8029187757423994669&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8029187757423994669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8029187757423994669'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2009/12/jtable-in-jscrollpane-showing-default.html' title='JTable in JScrollPane showing default column names'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4437047076531099979</id><published>2009-11-03T22:38:00.003+01:00</published><updated>2009-11-03T22:40:43.164+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='black belt'/><category scheme='http://www.blogger.com/atom/ns#' term='belt track'/><title type='text'>Java Belt Track</title><content type='html'>This isn't new (at all) but fun nevertheless...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.javablackbelt.com/" target="_blank"&gt;http://www.javablackbelt.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Try the belt track :)&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4437047076531099979?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4437047076531099979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4437047076531099979&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4437047076531099979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4437047076531099979'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2009/11/java-belt-track.html' title='Java Belt Track'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7889926039673418959</id><published>2009-10-25T19:47:00.004+01:00</published><updated>2009-10-25T19:47:00.157+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>10 reasons to use symfony</title><content type='html'>I have been thinking about the added value of using a good development framework and here are my top 10 benefits of using symfony as a development framework vs traditional program development. I won't be talking here about the license, which is open source MIT (which is &lt;i&gt;great&lt;/i&gt;) but specifically of the programming and features aspects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rapid Application Development&lt;/span&gt;&lt;br /&gt;Write better code faster. I know it sounds too good to be true but this is definitely the most obvious benefit of using a good application development framework.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Promote good code design and OOP&lt;/span&gt;&lt;br /&gt;Using the inbuilt MVC makes the code easier to maintain and design. The symfony documentation is full of guidelines to make code easy to use during the course of the various development steps. Also, it's built on PHP5 and is fully object-oriented. This again promotes good code design and reusability.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Concentrate on the essential&lt;/span&gt;&lt;br /&gt;When building a web application, you often find yourself doing the same things over and over again. OK, the table names change from one module to the next, as does the data structure but the logic behind managing objects is mostly the same. So, why waste precious time on the standard "common" code, when you could be spending it concentrating on the much more rewarding essentials: specific business logic, security, usability, ... since those are the things which in effect rake in the money and differenciate your product from the next?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Encourage proper code documentation&lt;/span&gt;&lt;br /&gt;Because the framework handles most of what's happening behind the scenes, it becomes much easier to document code as you go along. And, symfony integrates phpdoc by default.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Provide different environments&lt;/span&gt;&lt;br /&gt;Ever found yourself thinking "Gosh, I wish I could just switch to development for a second just to see the detailed error" or "I wonder how this will work in production?". Well, symfony provides inbuilt mechanisms which allow you to simply switch from one to the other, without ever disrupting the actual production environment. This also promotes testing and thus application stableness and scalibility.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Increase security&lt;/span&gt;&lt;br /&gt;symfony provides mechanisms, tips and suggestions for output escaping, preventing SQL injection, and CSRF attacks. You really need to read the documentation from cover to cover to take full advantage of all the options provided by the framework, but it's a worthwile read!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Abstract from database&lt;/span&gt;&lt;br /&gt;Using a database abstraction layer and ORM makes the process of accessing data completely transparent. You no longer have to worry about actually accessing the database to create, retrieve, update and delete data. All the internals are hidden. You just access the objects via the ORM layer that sits above the database abstraction layer and that's it. Did someone say KISS? :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Manage credentials&lt;/span&gt;&lt;br /&gt;Managing credentials is dead-easy as symfony provides a simple plugin that does all the nitty gritty behind-the-scenes work for you!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Internationalize and localize&lt;/span&gt;&lt;br /&gt;I guess this is probably one of the most important issues, certainly for European customers. Again, symfony creators have made this one of their key features and internationalization and localization is made easy by in-built ready-to-use mechanisms.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Join a living community&lt;/span&gt;&lt;br /&gt;symfony is big, and getting bigger. It seems everyone today will agree one of the major advantages of open source is the community that builds around the project and provides support, ideas and new features to an already growing project. Neat.&lt;br /&gt;&lt;br /&gt;Well, those are the top 10 I could think of. Of course, there are many other things like a.o. integrated Javascript frameworks (scriptaculous...), various helpers and simplified AJAX development.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What benefits do you associate with using a development framework (or symfony more specifically)?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7889926039673418959?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7889926039673418959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7889926039673418959&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7889926039673418959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7889926039673418959'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/10/10-reasons-to-use-symfony.html' title='10 reasons to use symfony'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3341637157214657239</id><published>2009-01-07T19:59:00.002+01:00</published><updated>2009-01-07T19:59:00.630+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='w3c'/><category scheme='http://www.blogger.com/atom/ns#' term='IE8'/><category scheme='http://www.blogger.com/atom/ns#' term='IE7'/><category scheme='http://www.blogger.com/atom/ns#' term='Safari'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='IE6'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Everything you know about CSS is wrong</title><content type='html'>Well, lots of people have been talking about &lt;a href="http://www.sitepoint.com/books/csswrong1/" target="_blank"&gt;this book&lt;/a&gt;.&lt;br /&gt;You can read a chapter &lt;a href="http://www.digital-web.com/articles/everything_you_know_about_CSS_Is_wrong/" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;And a review by Martin Heller &lt;a href="http://weblog.infoworld.com/stratdev/archives/2008/12/everything_you.html" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A big thumbs up for CSS tables, way to go! :)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3341637157214657239?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3341637157214657239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3341637157214657239&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3341637157214657239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3341637157214657239'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2009/01/everything-you-know-about-css-is-wrong.html' title='Everything you know about CSS is wrong'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4501335123304328059</id><published>2009-01-05T18:11:00.001+01:00</published><updated>2009-01-05T18:11:00.848+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sotirov'/><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><category scheme='http://www.blogger.com/atom/ns#' term='hacker'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Time to move on to SHA</title><content type='html'>Researches have 'broken' SSL! Ouch.&lt;br /&gt;In the following &lt;a href="http://logs.zdnet.com/security/?p=2339&amp;tag=nl.e550" target="_blank"&gt;ZDNet report&lt;/a&gt; there is some good news though: the hack is apparently very time-consuming.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4501335123304328059?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4501335123304328059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4501335123304328059&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4501335123304328059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4501335123304328059'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2009/01/time-to-move-on-to-sha.html' title='Time to move on to SHA'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-523468882144413031</id><published>2008-12-31T20:09:00.000+01:00</published><updated>2008-12-31T20:09:00.918+01:00</updated><title type='text'>Happy New Year!</title><content type='html'>(What more is there to say?!)&lt;br /&gt;&lt;br /&gt;I wish you all all the best for 2009 and look forward to 'seeing' you next year!&lt;br /&gt;&lt;br /&gt;Until then... enjoy :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-523468882144413031?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/523468882144413031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=523468882144413031&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/523468882144413031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/523468882144413031'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/12/happy-new-year.html' title='Happy New Year!'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-405803837578653518</id><published>2008-12-30T22:19:00.010+01:00</published><updated>2008-12-31T01:04:07.083+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='upgrad'/><category scheme='http://www.blogger.com/atom/ns#' term='propel'/><category scheme='http://www.blogger.com/atom/ns#' term='dsn'/><category scheme='http://www.blogger.com/atom/ns#' term='publish-assets'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='databases.yml'/><category scheme='http://www.blogger.com/atom/ns#' term='sfGuardPlugin'/><category scheme='http://www.blogger.com/atom/ns#' term='upgrade1.2'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>symfony - upgrade1.2 and Propel 1.3 DSN</title><content type='html'>Yup, I have been fiddling around with symfony some more!&lt;br /&gt;Since I installed the latest stable build of symfony (1.2.1), I decide to upgrade my projects using:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;symfony project:upgrade1.2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The command processed fine but then all hell broke loose so to speak. Basically, the whole project went kaput. So... &lt;br /&gt;I then ran the magic (that is in the non-PHP sense) command:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;symfony plugin:publish-assets&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Which fixed all my sfGuardPlugin issues!&lt;br /&gt;&lt;br /&gt;My next problem was related to propel. I had my databases.yml file configured like so:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;all:&lt;br /&gt;  propel:&lt;br /&gt;    class: sfPropelDatabase&lt;br /&gt;    param:&lt;br /&gt;      phptype: mysql&lt;br /&gt;      database: anxcity&lt;br /&gt;      dsn: 'mysql://root@localhost/anxcity' &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I kept getting an &lt;i&gt;Access denied&lt;/i&gt; error for user 'ODBC' which was strange since my DSN contained the user: root.&lt;br /&gt;&lt;br /&gt;So... I tried the long form of the databases.yml declaration like so:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;all:&lt;br /&gt;  propel:&lt;br /&gt;    class: sfPropelDatabase&lt;br /&gt;    param:&lt;br /&gt;      phptype: mysql&lt;br /&gt;      hostspec: localhost&lt;br /&gt;      database: anxcity&lt;br /&gt;      username: root&lt;br /&gt;      port: 3306&lt;br /&gt;      encoding: utf8&lt;br /&gt;      persistent: true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then the system complained it wasn't receving the DSN string as planned.&lt;br /&gt;So... I just added it:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;dsn: mysql:dbname=anxcity;user=root;host=localhost;port=3306&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;That seems really trivial BUT ... you do need to use the exact string syntax for it to actually work (which is very different to the DSN string in my original configuration file).&lt;br /&gt;And hey presto!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Edit:&lt;br /&gt;Ah yes, forgot to say I had to rebuild the model too, using:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;symfony propel:build-model&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-405803837578653518?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/405803837578653518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=405803837578653518&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/405803837578653518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/405803837578653518'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/12/symfony-upgrade12-and-propel-13-dsn.html' title='symfony - upgrade1.2 and Propel 1.3 DSN'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1348788108625369214</id><published>2008-12-28T16:43:00.006+01:00</published><updated>2008-12-28T16:49:28.627+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Draggable is not defined'/><category scheme='http://www.blogger.com/atom/ns#' term='publish-assets'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax is not defined'/><title type='text'>symfony - Ajax is not defined</title><content type='html'>I have been working on a small Ajax project using symfony - really trying to figure out how to get the nifty ajax functionalities working (using &lt;i&gt;link_to_remote&lt;/i&gt; for instance).&lt;br /&gt;&lt;br /&gt;I kept getting &lt;i&gt;Ajax is not defined&lt;/i&gt; or &lt;i&gt;Draggable is not defined&lt;/i&gt; errors and spent a couple of hours searching for &lt;b&gt;the&lt;/b&gt; solution. Anyway, I finally came across this command:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;symfony plugin:publish-assets&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This got it all working for me - it simply copied the 'assets' (js scripts) to my &lt;i&gt;/web&lt;/i&gt; folder. Simple :).&lt;br /&gt;&lt;br /&gt;More code soon...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1348788108625369214?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1348788108625369214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1348788108625369214&amp;isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1348788108625369214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1348788108625369214'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/12/symfony-ajax-is-not-defined.html' title='symfony - Ajax is not defined'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5411477146344033124</id><published>2008-12-04T18:01:00.005+01:00</published><updated>2008-12-04T18:01:01.174+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='hosts'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual host'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Installing symfony - setting up the virtual host 2</title><content type='html'>Just a quick clarification on my &lt;a href="http://elinorhurst.blogspot.com/2008/11/installing-symfony-setting-up-virtual.html"&gt;previous post about setting up virtual hosts&lt;/a&gt;, which seems to be a little misleading.&lt;br /&gt;&lt;br /&gt;You do also need to define your &lt;i&gt;localhost&lt;/i&gt; as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80&gt;&lt;br /&gt;  ServerName localhost&lt;br /&gt;  DocumentRoot "/path/to/www"&lt;br /&gt;  DirectoryIndex index.php&lt;br /&gt;&amp;lt;/VirtualHost&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;(&lt;i&gt;localhost&lt;/i&gt; should already be defined in your &lt;i&gt;hosts&lt;/i&gt; configuration file).&lt;br /&gt;This way you &lt;i&gt;can&lt;/i&gt; still access all your other applications.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5411477146344033124?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5411477146344033124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5411477146344033124&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5411477146344033124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5411477146344033124'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/12/installing-symfony-setting-up-virtual.html' title='Installing symfony - setting up the virtual host 2'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5604196182648192340</id><published>2008-11-25T18:02:00.003+01:00</published><updated>2008-11-26T11:37:35.485+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='hosts'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual host'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Installing symfony - setting up the virtual host</title><content type='html'>Well, here is another thing that I have learned using &lt;a href="http://www.symfony-project.org/" target="_blank"&gt;symfony&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The basic &lt;a href="http://www.symfony-project.org/book/1_1/03-Running-Symfony#Setting Up a Virtual Host" target="_blank"&gt;installation tutorial&lt;/a&gt; instructs you to set up a virtual host for symfony:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80&gt;&lt;br /&gt;  ServerName myapp.example.com&lt;br /&gt;  DocumentRoot "/home/steve/myproject/web"&lt;br /&gt;  DirectoryIndex index.php&lt;br /&gt;  Alias /sf /$sf_symfony_data_dir/web/sf&lt;br /&gt;  &amp;lt;Directory "/$sf_symfony_data_dir/web/sf"&gt;&lt;br /&gt;    AllowOverride All&lt;br /&gt;    Allow from All&lt;br /&gt;  &amp;lt;/Directory&gt;&lt;br /&gt;  &amp;lt;Directory "/home/steve/myproject/web"&gt;&lt;br /&gt;    AllowOverride All&lt;br /&gt;    Allow from All&lt;br /&gt;  &amp;lt;/Directory&gt;&lt;br /&gt;&amp;lt;/VirtualHost&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This was all new to me, so I set up "all" the paths correctly, and found that while it did allow me to use my symfony application properly and all the data_dir links where effectively aliased as planned, it also broke my other "localhost" links (e.g. I could no longer access http://localhost/other_app). Ouch.&lt;br /&gt;&lt;br /&gt;Now I have figured out why: I hadn't changed the ServerName. So, the issue was solved by simply creating a new ServerName like so:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ServerName symfonyappname.localhost&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To get this working the operating system must also be configured accordingly. To do this, simply add an entry to your &lt;i&gt;hosts&lt;/i&gt; file, the location of which depends on which OS you are using.&lt;br /&gt;&lt;br /&gt;Check out &lt;a href="http://practice.chatserve.com/hosts.html" target="_blank"&gt;this link&lt;/a&gt; to find out where your &lt;i&gt;hosts&lt;/i&gt; file is located. &lt;br /&gt;&lt;br /&gt;Once the &lt;i&gt;hosts&lt;/i&gt; file is properly configured (remember you may need to reboot), simply type: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;http://symfonyappname.localhost&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and magic happens :).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5604196182648192340?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5604196182648192340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5604196182648192340&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5604196182648192340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5604196182648192340'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/11/installing-symfony-setting-up-virtual.html' title='Installing symfony - setting up the virtual host'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1622104810633694823</id><published>2008-11-24T18:50:00.003+01:00</published><updated>2008-11-24T18:50:27.834+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RAID'/><category scheme='http://www.blogger.com/atom/ns#' term='visual aid'/><category scheme='http://www.blogger.com/atom/ns#' term='cheatsheet'/><title type='text'>A visual aid for RAID</title><content type='html'>Just a quick recap of how the most common RAID can be used for recovery (or not...).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_yTimejXbd5M/SSnCkVlte2I/AAAAAAAAABg/tfyS7C_SPss/s1600-h/RAID_small.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 300px; height: 243px;" src="http://2.bp.blogspot.com/_yTimejXbd5M/SSnCkVlte2I/AAAAAAAAABg/tfyS7C_SPss/s320/RAID_small.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5271958768340269922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1622104810633694823?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1622104810633694823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1622104810633694823&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1622104810633694823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1622104810633694823'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/11/visual-aid-for-raid.html' title='A visual aid for RAID'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yTimejXbd5M/SSnCkVlte2I/AAAAAAAAABg/tfyS7C_SPss/s72-c/RAID_small.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4442707555657218355</id><published>2008-11-13T18:25:00.006+01:00</published><updated>2008-11-13T18:25:00.588+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Netbeans'/><title type='text'>Netbeans support for Symfony</title><content type='html'>Now here's a nice and chewy piece of news posted by ppisl from &lt;a href="http://www.netbeans.org" target="_blank"&gt;netbeans.org&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;The news is that the Symfony support will be part of NetBeans 7.0. We are going to start work on it very soon. I hope that it will be a part of continual build this year and community can comment the support and work with us to finish it in the best possible quality and usability.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This is straight from the Netbeans "issues" site: &lt;a href="http://www.netbeans.org/issues/show_bug.cgi?id=145913" target="_blank"&gt;Issue 145913&lt;/a&gt;. You can vote to advocate Netbeans support for &lt;a href="http://www.symfony-project.org/" target="_blank"&gt;symfony&lt;/a&gt; from that &lt;a href="http://www.netbeans.org/issues/show_bug.cgi?id=145913" target="_blank"&gt;same page&lt;/a&gt;. 468 votes so far...&lt;br /&gt;&lt;br /&gt;According to the &lt;a href="http://www.netbeans.org/community/releases/roadmap.html" target="_blank"&gt;roadmap&lt;/a&gt; Netbeans 7.0 will probably be released around April 2009. It will be exciting to see how this pans out with the release of symfony 1.2 &lt;a href="http://trac.symfony-project.org/roadmap" target="_blank"&gt;due in December&lt;/a&gt; of this year.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Anyone else looking forward to this?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4442707555657218355?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4442707555657218355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4442707555657218355&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4442707555657218355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4442707555657218355'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/11/netbeans-support-for-symfony.html' title='Netbeans support for Symfony'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8896891907470962407</id><published>2008-11-01T18:30:00.001+01:00</published><updated>2008-11-02T22:23:06.755+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='color'/><category scheme='http://www.blogger.com/atom/ns#' term='colortool'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS - Choosing colors</title><content type='html'>A colleague pointed me to &lt;a href="http://www.betaversion.org/~stefano/linotype/news/169/" target="_blank"&gt;this article&lt;/a&gt; recently (no offense taken :D). In my view, there are quite a few interesting things there, but still I think using HTML tables for layout is conceptually bad, even wrong, especially today.&lt;br /&gt;&lt;br /&gt;Among the good stuff, &lt;a href="http://colorusage.arc.nasa.gov/"  target="_blank"&gt;this interesting link&lt;/a&gt; to do with colors and how to choose colors that actually work well together.&lt;br /&gt;&lt;br /&gt;They have developed a useful ColorTool applet which you can access via:&lt;br /&gt;&lt;a href="http://colorusage.arc.nasa.gov/ColorTool_appletPC.html" target="_blank"&gt;PC version&lt;/a&gt;&lt;br /&gt;&lt;a href="http://colorusage.arc.nasa.gov/ColorTool_appletMac.html" target="_blank"&gt;Mac version&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can choose the background color, then select various text colors to go with it (by clicking first on the line of text you would like to change).&lt;br /&gt;&lt;br /&gt;Rather clever.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8896891907470962407?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8896891907470962407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8896891907470962407&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8896891907470962407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8896891907470962407'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/10/css-choosing-colors.html' title='CSS - Choosing colors'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5417383938709566945</id><published>2008-10-25T21:05:00.011+02:00</published><updated>2008-10-30T13:37:48.652+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PEAR'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='no valid packages found'/><category scheme='http://www.blogger.com/atom/ns#' term='sfGuardPlugin'/><title type='text'>Plugin installation failed: No valid packages found</title><content type='html'>Well, I am still exploring &lt;a target="_blank" href="http://www.symfony-project.org/"&gt;symfony&lt;/a&gt; and its many interesting options. One of the features that really appeals to me is the ability to secure certain actions (e.g. "create", "save") for a given module (e.g. "user" module, "group" module) using user credentials (e.g. "admin", "guest"). The only catch is that this inbuilt mechanism doesn't provide login per se which means you can set credentials, but have to create the login process yourself. The most obvious way to avoid this is simply to install the &lt;a href="http://www.symfony-project.org/plugins/sfGuardPlugin" target="_blank"&gt;sfGuardPlugin&lt;/a&gt; plugin for symfony.&lt;br /&gt;&lt;br /&gt;I typed the &lt;a href="http://www.symfony-project.org/plugins/sfGuardPlugin?tab=plugin_installation" target="_blank"&gt;installation command&lt;/a&gt; but came across the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cmd&gt;&gt; symfony plugin:install sfGuardPlugin&lt;br /&gt;&lt;br /&gt;&gt;&gt; plugin    installing plugin "sfGuardPlugin"&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin downloading sfGuardPlugin-3.0.0.tgz ...&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin Starting to download sfGuardPlugin-3.0.0.tgz (18,752 bytes)&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin .&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin .&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin .&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin ...done: 18,752 bytes&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin symfony-plugins/sfGuardPlugin requires package&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin "symfony/symfony" (version &gt;= 1.2.0, version &lt;= 1.3.0,&lt;br /&gt;&gt;&gt; sfPearFrontendPlugin excluded versions: 1.3.0), installed version is 1.1.4&lt;br /&gt;&lt;br /&gt;Plugin "sfGuardPlugin" installation failed: No valid packages found&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The problem here was simply that the latest version of the package was being used. That particular version (3.0.0) is meant for symfony 1.2 which is still being developed. Since I am using the latest stable release of symfony (1.1.4), the trick is simply to specify which release to install. To work this out, simply check out the &lt;a href="http://www.symfony-project.org/plugins/sfGuardPlugin?tab=plugin_changelog" target="_blank"&gt;sfGuardPlugin changelog page&lt;/a&gt; to find the correct release version number (2.2.0).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cmd&gt;&gt; symfony plugin:install sfGuardPlugin &lt;b&gt;--release=2.2.0&lt;/b&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And hey presto, it worked! Excellent. More on symfony soon...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5417383938709566945?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5417383938709566945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5417383938709566945&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5417383938709566945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5417383938709566945'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/10/sfguardplugin-for-symfony.html' title='Plugin installation failed: No valid packages found'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5049660341452095233</id><published>2008-10-18T18:11:00.008+02:00</published><updated>2008-10-27T23:07:59.587+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash 10'/><category scheme='http://www.blogger.com/atom/ns#' term='ShockwaveFlash'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveXObject'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='browser sniffer'/><title type='text'>Adobe Flash 10 released</title><content type='html'>It looks like it's "sniffer-update" time again... quite a few sites seem to have 'broken' with this new release, at least in Internet Explorer.&lt;br /&gt;&lt;br /&gt;Here's a quick way of detecting the Flash version using ActiveXObject:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function testFlashIE() {&lt;br /&gt;        var flashMajor=0;&lt;br /&gt;        var flashInstalled=false;&lt;br /&gt; try {&lt;br /&gt;  flAXO = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");&lt;br /&gt;  flVersion = flAXO.GetVariable("$version");&lt;br /&gt;  flMajor = flVersion.substring(&lt;br /&gt;                            flVersion.indexOf(" ")+1,&lt;br /&gt;                            flVersion.indexOf(","));  &lt;br /&gt;                flashInstalled=true;&lt;br /&gt;                flashMajor=flMajor;&lt;br /&gt; }&lt;br /&gt; catch (e) {} // ignore&lt;br /&gt;&lt;br /&gt; if (!flashMajor) {&lt;br /&gt;        // here comes the usual flash detection loop &lt;br /&gt;        // for older versions&lt;br /&gt;        // ...&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;        return flashInstalled?flashMajor:null;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5049660341452095233?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5049660341452095233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5049660341452095233&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5049660341452095233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5049660341452095233'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/10/adobe-flash-10-released.html' title='Adobe Flash 10 released'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4085735913897267787</id><published>2008-10-14T18:14:00.004+02:00</published><updated>2008-10-14T18:14:00.207+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='Zend'/><category scheme='http://www.blogger.com/atom/ns#' term='design pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='cakePHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='ORM'/><title type='text'>PHP Development Frameworks</title><content type='html'>As mentioned in a couple of previous posts (&lt;a href="http://elinorhurst.blogspot.com/2008/09/symfony-sandbox-project-tutorial.html"&gt;here&lt;/a&gt; and &lt;a href="http://elinorhurst.blogspot.com/2008/08/symfony-sandbox-project.html"&gt;here&lt;/a&gt;), I have been looking into &lt;a href="http://www.symfony-project.org/"&gt;symfony&lt;/a&gt; as a PHP Framework solution and it's certainly one of the most comprehensive on the market. The &lt;a href="http://www.phpit.net/article/ten-different-php-frameworks/"&gt;following article&lt;/a&gt; at &lt;a href="http://www.phpit.net/"&gt;PHPit&lt;/a&gt; compares ten well-known PHP development frameworks including &lt;a href="http://www.zend.com/en/"&gt;Zend&lt;/a&gt;, &lt;a href="http://cakephp.org/"&gt;cakePHP&lt;/a&gt; and symfony.&lt;br /&gt;&lt;br /&gt;Although the article is most probably outdated where facts are concerned (with comments dating back to 2006), most of the criteria on which the comparison is built are still very much up-to-date. They cover inbuilt support for: PHP5, Model-View-Controller (MVC), Object Relational Mapping (ORM), Caching, Validation and filtering, Ajax, Authentication, and more.&lt;br /&gt;&lt;br /&gt;Still, I feel a development framework shouldn't simply boil down to supporting X or having inbuilt Y, and should in a sense embrace a wider philosophy as a whole.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4085735913897267787?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4085735913897267787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4085735913897267787&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4085735913897267787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4085735913897267787'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/10/php-development-frameworks.html' title='PHP Development Frameworks'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5039190993260301139</id><published>2008-09-24T18:30:00.005+02:00</published><updated>2008-10-12T17:34:59.202+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='site optimisation'/><category scheme='http://www.blogger.com/atom/ns#' term='aptivate'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Aptivate Web Design Guidelines for Low Bandwidth</title><content type='html'>The NGO &lt;a href="http://www.aptivate.org" target="_blank"&gt;Aptivate&lt;/a&gt;, Cambridge, UK, brought together some useful information about simple bandwidth optimisation techniques/issues. &lt;br /&gt;&lt;br /&gt;You can access their Web Design Guidelines for Low Bandwidth at:&lt;br /&gt;&lt;a href="http://www.aptivate.org/webguidelines/Home.html" target="_blank"&gt;http://www.aptivate.org/webguidelines/Home.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;i&gt;Don't worry about bandwidth!&lt;br /&gt;Soon we will all have infinite bandwidth for no cost.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Heard that before?&lt;br /&gt;&lt;br /&gt;In fact it is &lt;span style="font-weight:bold;"&gt;not true&lt;/span&gt; for the &lt;span style="font-weight:bold;"&gt;majority&lt;/span&gt; of the world's population. Many people in remote locations and the developing world do not have fast Internet connections and won't be getting them any time soon.&lt;br /&gt;&lt;br /&gt;This is why Aptivate has written a set of &lt;span style="font-weight:bold;"&gt;Web Design Guidelines for Low Bandwidth&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;, at a time when web site optimisation seems to be going out of fashion.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Very interesting to see the world statistics for bandwidth and Internet access costs. Just goes to show how lucky we are in Western Europe / North America!&lt;br /&gt;&lt;br /&gt;Also, here are a couple of the "tips" which particularly caught my attention:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;drop using HTML tables for layout, switch to CSS: this has been discussed over and over and over, again and again and again, and yet... well, you get my drift =);&lt;/li&gt;&lt;br /&gt;&lt;li&gt;make your site cacheable: basically, avoid getting too wild with dynamic content;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;externalise your CSS stylesheets and JS scripts: load it (them) only once for the whole site or sets of pages and let the browser subsequently use the cached version;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;minimize the use of HTTP requests: there are lots of ways to do this like client-side form validation using Javascript, making sure dynamic pages don't require looping back to the server for pulling in extra files (CSS, images, etc.), and so on and so forth.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;file and image optimisation: shrink PDF and optimise images for use on the web;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;provide some sort of support for 'old' browser versions which may have limited support for CSS, Javascript, etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;...&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;There is a lot more interesting information on &lt;a href="http://www.aptivate.org/webguidelines/Home.html" target="_blank"&gt;the site&lt;/a&gt; covering a variety of topics: high-level design, CSS, caching, compression, multimedia, browser compatibility, search, PDF optimisation, and much more. Well worth the read!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5039190993260301139?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5039190993260301139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5039190993260301139&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5039190993260301139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5039190993260301139'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/aptivate-web-design-guidelines-for-low.html' title='Aptivate Web Design Guidelines for Low Bandwidth'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7694938598070257158</id><published>2008-09-17T18:12:00.004+02:00</published><updated>2008-09-17T18:12:01.353+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='PEAR'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='phar'/><title type='text'>PHP 5.2.0 - installing PEAR</title><content type='html'>I tried to install &lt;a href="http://pear.php.net/"&gt;PEAR&lt;/a&gt; a few days ago using my PHP 5.2.0 install by double-clicking the go-pear.bat file in the php5 folder.&lt;br /&gt;&lt;br /&gt;It didn't quite go as planned however:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Initialized registry...&lt;br /&gt;PHP Warning:  Cannot use a scalar value as an array in phar://go-pear.phar/PEAR/Command.php on line 268&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;install failed&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;It seems there is a small bug in the .phar file (in the PEAR folder) which can be fixed by replacing it with the following file:&lt;br /&gt;&lt;a href="http://pear.php.net/go-pear.phar"&gt;http://pear.php.net/go-pear.phar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And you can find more information about this issue here:&lt;br /&gt;&lt;a href="http://bugs.php.net/bug.php?id=39733"&gt;http://bugs.php.net/bug.php?id=39733&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7694938598070257158?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7694938598070257158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7694938598070257158&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7694938598070257158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7694938598070257158'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/php-520-installing-pear.html' title='PHP 5.2.0 - installing PEAR'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3170665714625795514</id><published>2008-09-15T18:09:00.003+02:00</published><updated>2008-09-15T18:09:00.883+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social'/><category scheme='http://www.blogger.com/atom/ns#' term='LinkedIn'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='CRM'/><category scheme='http://www.blogger.com/atom/ns#' term='business'/><title type='text'>Finding the value in LinkedIn</title><content type='html'>I have been quite surprised by the number of people who complain about &lt;a href="http://www.linkedin.com/"&gt;LinkedIn&lt;/a&gt; being a) a complete waste of time and/or b) just a plain 'job search' application. Obviously you could make it just that but also alot more, it really depends on how much time and effort you are prepared to invest.&lt;br /&gt;&lt;br /&gt;To make an analogy, you wouldn't create a mailbox and then instantly expect to receive 300 interesting emails overnight. In fact, if you get any interesting mail at all it's because you have taken the time to advertise your email address in one form or another.&lt;br /&gt;&lt;br /&gt;So why do we expect socializing online to be any different from socializing offline? If you walk into a room full of people, grab a drink and then go and stand alone in a corner, what are your chances of engaging with people? Pretty meak; at least certainly much slimmer than for those who decide to actively engage in conversation. &lt;br /&gt;&lt;br /&gt;That's why we 'use' (sorry, bad bad word) our network of friends and relations to get introduced to other people. The same goes for LinkedIn. You need to mimick your real social network, get introduced to others by people you know and trust and move on from there.&lt;br /&gt;&lt;br /&gt;The greatest value of the network to me is being given the ability to contact hundreds of experts, people who would previously have remained unreachable, in mere seconds. &lt;br /&gt;&lt;br /&gt;A few weeks ago, I was trying to find a comprehensive, cost-effective CRM 'solution'. Now, there are lots of applications out there: &lt;a href="http://www.sugarcrm.com/"&gt;sugarCRM&lt;/a&gt;, &lt;a href="http://xrms.sourceforge.net/"&gt;XRMS&lt;/a&gt;, &lt;a href="http://www.microsoft.com/dynamics/crm/default.mspx"&gt;Microsoft Dynamics CRM&lt;/a&gt;, &lt;a href="http://www.zoho.com"&gt;Zoho&lt;/a&gt; and many more.&lt;br /&gt;&lt;br /&gt;One way to figure out which is the 'best' solution is to test each application and then try to weigh the pros and cons, and drop cost into the balance somewhere. Now, that can be pretty time-consuming and without being an expert yourself, you can't really guarantee end-result.&lt;br /&gt;&lt;br /&gt;Another way to work out the 'ideal' course of action is simply to ask the question on LinkedIn using their Q&amp;A feature. The beauty in this is you reach out to hundreds of experts who might spend let's say 1 to 10 minutes answering your question. Within 24-hours you are actually conversing with more people than you would have been able to get hold of by phone in a day.&lt;br /&gt;&lt;br /&gt;And, there is no question that the 10-minutes they spent answering, were much more valuable than my searching for information that isn't in my field of expertise. And, to top it all off, it was great fun corresponding with all the people who replied. Much like in 'offline life' we can engage in a valuable exchange of ideas and knowledge.&lt;br /&gt;&lt;br /&gt;So, IMHO, there really is much more to social (or business, as some would have it) networking than at first meets the eye.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What is your take?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3170665714625795514?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3170665714625795514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3170665714625795514&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3170665714625795514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3170665714625795514'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/finding-value-in-linkedin.html' title='Finding the value in LinkedIn'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7453285711433054488</id><published>2008-09-14T20:32:00.006+02:00</published><updated>2008-09-15T10:37:34.693+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>symfony sandbox project, tutorial updated</title><content type='html'>In a &lt;a href="http://elinorhurst.blogspot.com/2008/08/symfony-sandbox-project.html"&gt;previous post&lt;/a&gt;, I discussed a couple of issues relating to the &lt;a href="http://www.symfony-project.org/"&gt;symfony project&lt;/a&gt; &lt;a href="http://www.symfony-project.org/tutorial/1_1/my-first-project"&gt;sandbox tutorial&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It looks like the tutorial has since been updated however and I haven't really had the chance to check out the latest version but the parts that were highlighted in my post have definitely disappeared! Good news... :-)&lt;br /&gt;&lt;br /&gt;To tell you the truth, I would like to move on to creating a web application from scratch (i.e. without the sandbox) so I will be starting at square one: &lt;a href="http://www.symfony-project.org/book/1_1/"&gt;The Definitive Guide to symfony&lt;/a&gt; and hope to be sharing some of this with you in coming weeks.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7453285711433054488?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7453285711433054488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7453285711433054488&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7453285711433054488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7453285711433054488'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/symfony-sandbox-project-tutorial.html' title='symfony sandbox project, tutorial updated'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3197748050196700130</id><published>2008-09-10T18:36:00.004+02:00</published><updated>2008-09-15T10:37:01.100+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eula'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='french'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Chrome EULA update</title><content type='html'>In an &lt;a href="http://elinorhurst.blogspot.com/2008/09/google-chrome-eula.html"&gt;earlier post&lt;/a&gt; about the Google Chrome EULA I mentioned how the French version had yet to be amended.&lt;br /&gt;&lt;br /&gt;Well, I checked yesterday and all's well that ends well :-).&lt;br /&gt;&lt;br /&gt;In French...&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;11.1 Vous conservez les droits d'auteur et tous les autres droits en votre possession vis-à-vis du Contenu que vous fournissez, publiez ou affichez sur les Services ou par le biais de ces derniers.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;... and Dutch&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;11.1 U behoudt de auteursrechten en enige andere rechten die u al bezit over de inhoud die u op of via de Services inzendt, plaatst of weergeeft.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3197748050196700130?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3197748050196700130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3197748050196700130&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3197748050196700130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3197748050196700130'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/google-chrome-eula-update.html' title='Google Chrome EULA update'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5880299117683410084</id><published>2008-09-06T18:55:00.006+02:00</published><updated>2008-09-06T18:55:01.199+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='func_get_args'/><title type='text'>PHP Fatal error:  func_get_args(): Can't be used as a function parameter</title><content type='html'>Well, I was a little surprised about this message but then reading the documentation it all made sense.&lt;br /&gt;&lt;br /&gt;The only way around this is to place the result of func_get_args() in a variable and then pass that variable to the function you were calling in the first place instead of func_get_args().&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WON'T WORK:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;my_func(func_get_args());&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WILL WORK:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$func_args=func_get_args();&lt;br /&gt;my_func($func_args);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is because the func_get_args() function must get called in the right context to return the right values as explained in the PHP documentation (&lt;a href="http://be.php.net/manual/en/function.func-get-args.php"&gt;PHP.net func_get_args&lt;/a&gt;):&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; Because this function depends on the current scope to determine parameter details, it cannot be used as a function parameter. If this value must be passed, the results should be assigned to a variable, and that variable should be passed.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Interesting.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5880299117683410084?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5880299117683410084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5880299117683410084&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5880299117683410084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5880299117683410084'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/php-fatal-error-funcgetargs-cant-be.html' title='PHP Fatal error:  func_get_args(): Can&apos;t be used as a function parameter'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-600583335432941599</id><published>2008-09-05T18:10:00.018+02:00</published><updated>2008-09-05T18:10:00.479+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='useragent'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='browser sniffer'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Google Chrome - user-agent (UA)</title><content type='html'>For anyone interested in browser detection, here is &lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt;'s "useragent" string:&lt;br /&gt;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13&lt;br /&gt;&lt;br /&gt;You can get it by simply typing "about:" in the omnibox ("address" bar)&lt;br /&gt;or alternatively by adding the following to your &amp;lt;head&amp;gt; section.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;function showUA()&lt;br /&gt;{&lt;br /&gt; userAgent = navigator.userAgent;&lt;br /&gt; alert("UserAgent: " + userAgent);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;window.onload=showUA;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So something similar to the following could be used to detect which browser you are using:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;    function setBrowser()&lt;br /&gt;    {&lt;br /&gt;      var browser="unknown";&lt;br /&gt;      var userAgent = navigator.userAgent.toLowerCase();&lt;br /&gt;      if (userAgent.indexOf("opera") &amp;gt; -1)&lt;br /&gt;        browser="Opera";&lt;br /&gt;      else if (userAgent.indexOf("konqueror") &amp;gt; -1)&lt;br /&gt;        browser="Konqueror";&lt;br /&gt;      else if (userAgent.indexOf("firefox") &amp;gt; -1)&lt;br /&gt;        browser="Firefox";&lt;br /&gt;      else if (userAgent.indexOf("netscape") &amp;gt; -1)&lt;br /&gt;        browser="Netscape";&lt;br /&gt;      else if (userAgent.indexOf("msie") &amp;gt; -1)&lt;br /&gt;        browser="Internet Explorer";&lt;br /&gt;      else if (userAgent.indexOf("chrome") &gt; -1)&lt;br /&gt;        browser="Chrome";&lt;br /&gt;      else if (userAgent.indexOf("safari") &amp;gt; -1)&lt;br /&gt;        browser="Safari";&lt;br /&gt;&lt;br /&gt;      var brDiv=document.getElementById("browser");&lt;br /&gt;      brDiv.innerHTML="&amp;lt;b&amp;gt;" + browser + "&amp;lt;/b&amp;gt;";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    window.onload=setBrowser;&lt;br /&gt;  &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  You are using: &lt;br /&gt;  &amp;lt;div id="browser"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If you are using one of those popular browsers its name should show up in the empty "browser" div in the body section. Note that the order of the tests is critical. For instance, both Opera and Netscape useragent strings contain "msie" so it is necessary to test for those browsers before testing for Internet Explorer.&lt;br /&gt;&lt;br /&gt;Of course the above script is certainly very basic and we could take things a step further and not only retrieve browser name but also browser version for instance, or test for other things like whether the browser is Java-enabled, which Javascript version is available, which Flash Player version is installed or which operating system is being used.&lt;br /&gt;&lt;br /&gt;Let me just share a couple of links which cover this more comprehensive approach to Javascript browser sniffing:&lt;br /&gt;-&amp;nbsp;&lt;a href="http://www.howtocreate.co.uk/tutorials/jsexamples/sniffer.html"&gt;Browser sniffing&lt;/a&gt;: takes an in-depth look at how to sniff all major and lots of minor browsers.&lt;br /&gt;-&amp;nbsp;&lt;a href="http://www.webreference.com/tools/browser/javascript.html"&gt;JavaScript Browser Sniffer&lt;/a&gt;: the "ultimate" mainstream browser detection script.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-600583335432941599?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/600583335432941599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=600583335432941599&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/600583335432941599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/600583335432941599'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/google-chrome-ua.html' title='Google Chrome - user-agent (UA)'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1155902820257331155</id><published>2008-09-04T18:07:00.008+02:00</published><updated>2008-09-11T12:03:01.783+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eula'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Chrome EULA</title><content type='html'>As you have probably already heard, there has been huge concern that the Google Chrome EULA was too invasive with regard to intellectual property rights. Google has since changed the English version at: &lt;a href="http://www.google.com/chrome/eula.html?hl=en"&gt;http://www.google.com/chrome/eula.html?hl=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Google apparently blamed a hasty copy/paste for the mistake but it is a little worrying to think this may have been intentional, and how many people have actually already agreed to the EULA in question.&lt;br /&gt;&lt;br /&gt;[EDIT: I take it the change will have retro-active effect.]&lt;br /&gt;&lt;br /&gt;Here is the Ars Technica article describing the whole chain of events:&lt;br /&gt;&lt;a href="http://arstechnica.com/news.ars/post/20080903-google-on-chrome-eula-controversy-our-bad-well-change-it.html"&gt;http://arstechnica.com/news.ars/post/20080903-google-on-chrome-eula-controversy-our-bad-well-change-it.html&lt;/a&gt;,&lt;br /&gt;and how Google has promised to change its terms and conditions for the new browser.&lt;br /&gt;&lt;br /&gt;The French version (&lt;a href="http://www.google.com/chrome/eula.html?hl=fr"&gt;http://www.google.com/chrome/eula.html?hl=fr&lt;/a&gt;) doesn't seem to have been amended at the time of writing:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;En fournissant, publiant ou affichant le contenu, vous accordez à Google une licence permanente, irrévocable, mondiale, gratuite et non exclusive permettant de reproduire, adapter, modifier, traduire, publier, présenter en public et distribuer tout Contenu que vous avez fourni, publié ou affiché sur les Services ou par le biais de ces derniers.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Something to keep an eye on...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;[Update: Check out the &lt;a href="http://elinorhurst.blogspot.com/2008/09/google-chrome-eula-update.html"&gt;follow-up post&lt;/a&gt; regarding the Google Chrome EULA]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1155902820257331155?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1155902820257331155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1155902820257331155&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1155902820257331155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1155902820257331155'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/google-chrome-eula.html' title='Google Chrome EULA'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-761225790331226620</id><published>2008-09-03T18:45:00.014+02:00</published><updated>2008-09-03T23:37:41.492+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Experimenting with Google Chrome</title><content type='html'>(Thank God for work and the XP box there!)&lt;br /&gt;&lt;br /&gt;I have downloaded, installed and survived the &lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt; experience. &lt;br /&gt;&lt;br /&gt;As far as I can tell it really lives up to expectations: on first impression its user interface is very nice and crisp, the browser &lt;i&gt;is&lt;/i&gt; fast and renders nicely. &lt;br /&gt;&lt;br /&gt;It's definitely usable "as-is" and despite being beta could probably replace any browser for day-to-day browsing except perhaps in some rather specific cases which some have been reporting. &lt;br /&gt;&lt;br /&gt;Feature-wise, you can seamlessly extract a tab to a new window or reassemble tabs located in separate windows into a single window.&lt;br /&gt;&lt;br /&gt;The developer tools are another cool feature. It would be really nice if you could snap them into your current tab though (or have the "snap-in" appear in every tab once you open it). For the moment, the tools open in an new window which stays on top of everything you are doing in the browser and I found it was a major distraction (compared to using &lt;a href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt; in &lt;a href="http://www.mozilla.com/"&gt;Firefox&lt;/a&gt; for instance).&lt;br /&gt;&lt;br /&gt;Last but not least, the "omnibox" in every tab is a really nice feature which I shall probably learn to miss in other browsers.&lt;br /&gt;&lt;br /&gt;Well, that's it for now. As you can tell I didn't really have the chance to take it for an in-depth test run and look at security features for instance. &lt;br /&gt;&lt;br /&gt;It will be interesting to see whether Google's new approach actually causes any disruption on the browser market.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What do you think?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-761225790331226620?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/761225790331226620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=761225790331226620&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/761225790331226620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/761225790331226620'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/experimenting-with-google-chrome.html' title='Experimenting with Google Chrome'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2087461660228866498</id><published>2008-09-02T21:21:00.004+02:00</published><updated>2008-09-02T21:40:44.716+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Aaaaaaaaaargh</title><content type='html'>Just one simple question... (*sobs despairingly*)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;When (if ever) will &lt;a href="http://www.google.com/chrome/"&gt;Google Chrome&lt;/a&gt; become available to Win2k users?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2087461660228866498?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2087461660228866498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2087461660228866498&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2087461660228866498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2087461660228866498'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/aaaaaaaaaargh.html' title='Aaaaaaaaaargh'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1966155599529118258</id><published>2008-09-02T19:34:00.003+02:00</published><updated>2008-09-03T12:11:26.187+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='webkit'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='gears'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Google Chrome</title><content type='html'>So Google has been at it again with this new very engaging project: Google Chrome, an open source web-browser with lots of impressive ideas with regard to stability, speed, security, standards and much, much more.&lt;br /&gt;&lt;br /&gt;I have heard the site to keep an eye on today for a fresh copy is:&lt;br /&gt;&lt;a href="http://www.google.com/chrome"&gt;http://www.google.com/chrome&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are interested, there is an nifty explanatory comic book by &lt;a href="http://www.scottmccloud.com/"&gt;Scott McCloud&lt;/a&gt; at:&lt;br /&gt;&lt;a href="http://blogoscoped.com/google-chrome/"&gt;http://blogoscoped.com/google-chrome/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In it, the Google Chrome project is detailed from several angles, plus you get to 'meet' lots of people who are working on the project. Their take was basically to create a browser which would be more in line with today's web applications (coming at it from a very different angle than when browsers were used to process plain web pages, with little or no: DOM manipulation, AJAX scripts, etc.).&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Stability, testing and multi-process architecture: &lt;br /&gt;Using processes instead of threads to improve stability and prevent memory bloat as well as building on other Google tools to improve test efficiency.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Speed: Webkit and V8:&lt;br /&gt;Increasing speed and efficiency by using &lt;a href="http://webkit.org/"&gt;Webkit&lt;/a&gt; and a high-performance javascript virtual machine called V8.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Search and user experience:&lt;br /&gt;Changing the tab controls and their uses; introducing the omnibox, elegant inline completion and improved popup handling; improving user experience with a compelling "new tab" page which holds the most visited pages and search sites.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Security, sandboxing and safe browsing:&lt;br /&gt;Preventing attacks by sandboxing (jailing) each separate process and helping users to avoid phishing scams using up-to-date blacklists of harmful sites.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Gears, standards and open source:&lt;br /&gt;Using &lt;a href="http://gears.google.com/"&gt;gears&lt;/a&gt; to improve developer experience, complying with standards (and perhaps setting new ones?), and of course &lt;i&gt;sharing&lt;/i&gt;.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;All of this really sounds very impressive, it seems Google is simply always that one step ahead of everyone else!&lt;br /&gt;&lt;br /&gt;More news about whether this was all too good to be true, once I actually get to try it out, which I hope will be very soon :-)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts for now?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1966155599529118258?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1966155599529118258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1966155599529118258&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1966155599529118258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1966155599529118258'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/09/google-chrome.html' title='Google Chrome'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-213898636948398054</id><published>2008-08-22T18:53:00.001+02:00</published><updated>2008-08-22T19:08:53.875+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='hidden'/><category scheme='http://www.blogger.com/atom/ns#' term='xcopy'/><category scheme='http://www.blogger.com/atom/ns#' term='copy'/><category scheme='http://www.blogger.com/atom/ns#' term='file attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='rename'/><category scheme='http://www.blogger.com/atom/ns#' term='folders'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='move'/><category scheme='http://www.blogger.com/atom/ns#' term='system'/><category scheme='http://www.blogger.com/atom/ns#' term='attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='attrib'/><title type='text'>Batch programming tip #17: Moving/Copying hidden/system folders and files</title><content type='html'>A recent question about renaming a folder (on &lt;a href="http://www.computing.net/"&gt;computing.net&lt;/a&gt;) brought to my attention the fact that &lt;i&gt;move&lt;/i&gt; (which I usually use to rename folders) and also &lt;i&gt;rename&lt;/i&gt; won't work on hidden/system files.&lt;br /&gt;&lt;br /&gt;To avoid this 'issue' you must change the folder's system attributes.&lt;br /&gt;First we define our original and destination folders.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;set oldp=[define original folder here]&lt;br /&gt;set newp=[define destination folder here]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then we set the h (hidden) and s (system) attributes off (-h -s), move the folder, and switch the attributes back on again (+h +s).&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;b&gt;attrib -h -s %oldp%&lt;/b&gt;&lt;br /&gt;move %oldp% %newp%&lt;br /&gt;&lt;b&gt;attrib +h +s %newp%&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can also change all the file attributes within the folder, by using the /S modifier. And all (sub-)directories by using /D.&lt;br /&gt;&lt;br /&gt;For instance:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;attrib -h -s %oldp% &lt;b&gt;/S /D&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Will switch off the hidden and system attributes for (sub)folders and files in the %oldp% folder.&lt;br /&gt;&lt;br /&gt;The same sort of thing happens with &lt;i&gt;xcopy&lt;/i&gt;.&lt;br /&gt;If you want to use xcopy on hidden/system files you must add the correct modifiers like so:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;set oldp=[define original path here]&lt;br /&gt;set newp=[define destination here]&lt;br /&gt;xcopy %oldp% %newp% &lt;b&gt;/H /S&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Or only "visible" files will get copied.&lt;br /&gt;&lt;br /&gt;I would love any additional input you may have about this.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-213898636948398054?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/213898636948398054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=213898636948398054&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/213898636948398054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/213898636948398054'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/batch-programming-tip-17-movingcopying.html' title='Batch programming tip #17: Moving/Copying hidden/system folders and files'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7707033989606711683</id><published>2008-08-21T18:49:00.008+02:00</published><updated>2008-09-14T20:32:19.716+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='sandbox'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='database.yml'/><title type='text'>Symfony sandbox project</title><content type='html'>I recently heard of the &lt;a href="http://www.symfony-project.org/"&gt;Symfony project&lt;/a&gt;. It's an appealing free open-source PHP5 development framework licensed under the MIT license and I decided to give it a go.&lt;br /&gt;&lt;br /&gt;For starters I downloaded the sandbox version from:&lt;br /&gt;&lt;a href="http://www.symfony-project.org/installation/1_1"&gt;http://www.symfony-project.org/installation/1_1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I had an easy-PHP installation already up and running on my Windows 2000 system. So simply dropped the sandbox project under my www folder and followed the instructions on the Symfony website using mySQL as database manager:&lt;br /&gt;&lt;a href="http://www.symfony-project.org/tutorial/1_1/my-first-project"&gt;http://www.symfony-project.org/tutorial/1_1/my-first-project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It was all pretty straight-forward except for a few "catches" detailed below.&lt;br /&gt;&lt;br /&gt;#1 - the project uses php.exe on the command line to generate configuration files, PHP classes, etc. You really need to make sure to copy the php.ini file to the folder where the php.exe is located in order for the configuration to be taken into account. You can check which modules are available (and in effect, whether your latest php.ini is getting loaded properly) by typing &lt;pre&gt;php -m&lt;/pre&gt; on the command line.&lt;br /&gt;&lt;br /&gt;#2 - I also activated the xsl extension. This gets rid of some error messages that occur during database configuration and creation. I am not sure whether this makes an actual difference on the end result but was trying to clear any errors as I ran into them.&lt;br /&gt;&lt;br /&gt;#3 - When I tried to access &lt;code&gt;http://localhost/sf_sandbox/web/frontend_dev.php/comment&lt;/code&gt; or &lt;code&gt;http://localhost/sf_sandbox/web/frontend_dev.php/post&lt;/code&gt; as specified in the tutorial, the pages wouldn't launch properly, I was getting database error messages.&lt;br /&gt;To avoid this, I had to manually configure the &lt;i&gt;www\sf_sandbox\config\database.yml&lt;/i&gt; configuration file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;all:&lt;br /&gt;  propel:&lt;br /&gt;    class: sfPropelDatabase&lt;br /&gt;    param:&lt;br /&gt;      phptype: mysql&lt;br /&gt;      database: symfony_project&lt;br /&gt;      dsn: 'mysql://root@localhost/symfony_project'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I changed all three parameters: phptype, database (use the database name you chose), and dsn (note that root is using an empty password to connect here).&lt;br /&gt;For changes to take effect, make sure to clear the cache using:&lt;br /&gt;&lt;code&gt;php symfony cache:clear&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;#4 - In the middle of the tutorial, it tells you to start using your new website. &lt;br /&gt;However, when you try to add a comment you get the following error:&lt;br /&gt;&lt;code&gt;Class "Post" must implement a "__toString" method to be rendered in a "sfWidgetFormPropelSelect" widget&lt;/code&gt;&lt;br /&gt;To fix this, open the &lt;pre&gt;sf_sandbox\lib\model\Post.php&lt;/pre&gt; and add a __toString method as follows:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Post extends BasePost&lt;br /&gt;{&lt;br /&gt;  function __toString()&lt;br /&gt;  {&lt;br /&gt;    return $this-&gt;getTitle();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;To be 100% accurate, also change the &lt;i&gt;sf_sandbox\apps\frontend\modules\comment\templates\editSuccess.php&lt;/i&gt; file so that the &lt;i&gt;Post id&lt;/i&gt; label becomes &lt;i&gt;Post title&lt;/i&gt; or simply &lt;i&gt;Post&lt;/i&gt; since the post title is what we're actually seeing now we have added the __toString method in the Post class.&lt;br /&gt;&lt;br /&gt;#5 - I couldn't get the following to work:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Next, open the modules/comment/templates/editSuccess.php and replace the following lines:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;tr&gt;&lt;br /&gt;  &amp;lt;th&gt;Post:&lt;/th&gt;&lt;br /&gt;  &amp;lt;td&gt;&amp;lt;?php echo object_select_tag($comment, 'getPostId', array (&lt;br /&gt;  'related_class' =&gt; 'Post',&lt;br /&gt;)) ?&gt;&amp;lt;/td&gt;&lt;br /&gt;&amp;lt;/tr&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The original code is slightly different in the sandbox version and the replacement code wouldn't work. One way to avoid this issue is to set the default post id in your comment actions class.&lt;br /&gt;Simply open your &lt;i&gt;sf_sandbox\apps\frontend\modules\comment\actions\actions.class.php&lt;/i&gt; and add the following in the "executeCreate()" method:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$post=PostPeer::retrieveByPk(&lt;br /&gt;  $this-&gt;getRequestParameter('post_id'));&lt;br /&gt;if ($post)&lt;br /&gt;{&lt;br /&gt;  $this-&gt;form-&gt;setDefault('post_id', &lt;br /&gt;    $this-&gt;getRequestParameter('post_id'));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This simply pre-selects the post title in the form when you access the 'new comment' page from a given post's page by setting the default value of the drop-down choice list.&lt;br /&gt;&lt;br /&gt;#6 - in the same file (&lt;i&gt;sf_sandbox\apps\frontend\modules\comment\actions\actions.class.php&lt;/i&gt;). Instead of using the code from the tutorial, simply replace the redirect line with:&lt;br /&gt;&lt;code&gt;$this-&gt;redirect('post/show?id='.&lt;br /&gt;  $request-&gt;getParameter('comment[post_id]'));&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will redirect to the correct post rather than to the comment page.&lt;br /&gt;&lt;br /&gt;Well, that's it for now. I haven't finished the tutorial yet. I have only made it to just before the Form Validation chapter. So still lots of fun to be had - stay tuned!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;[EDIT: it looks like the Symfony Sandbox Project tutorial has been updated so some - if not all - of the above information may no longer be applicable.]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7707033989606711683?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7707033989606711683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7707033989606711683&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7707033989606711683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7707033989606711683'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/symfony-sandbox-project.html' title='Symfony sandbox project'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5986807832164474372</id><published>2008-08-20T18:56:00.008+02:00</published><updated>2008-08-21T09:16:42.602+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='crowd search'/><category scheme='http://www.blogger.com/atom/ns#' term='me.dium'/><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><category scheme='http://www.blogger.com/atom/ns#' term='social search'/><category scheme='http://www.blogger.com/atom/ns#' term='BOSS'/><category scheme='http://www.blogger.com/atom/ns#' term='search engine'/><title type='text'>Me.dium - Power to the People</title><content type='html'>In a comment left on a &lt;a href="http://elinorhurst.blogspot.com/2008/08/cuil-not-that-cool.html"&gt;previous post&lt;/a&gt; about Cuil not quite living up to previous expectations, Chris pointed me to the &lt;a href="http://me.dium.com/search/"&gt;Me.dium search engine&lt;/a&gt; (built on &lt;a href="http://developer.yahoo.com/search/boss/"&gt;Yahoo Search BOSS&lt;/a&gt;). This alpha-release search engine offers two search types: you can opt for traditional results but also decide to 'get social' and view the 'hottest' results according to what other people are viewing.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Me.dium.com has taken a different tack. We have a full web index, but we change the results based on the surfing activity of our user base (now over 2,000,000).&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The searching activity data is gathered using the Me.dium &lt;span style="font-weight:bold;"&gt;search toolbar&lt;/span&gt;. Obviously, you don't &lt;i&gt;have&lt;/i&gt; to install it yourself unless you actually want to become part of the crowd - but with this new "Power to the People" philosophy, it's being part of the crowd that empowers you as an individual surfer. Based on the &lt;a href="https://me.dium.com/tutorial"&gt;tutorial&lt;/a&gt;, it seemed a little too invasive (teenager-ish?) for me: you can see which of your friends are online, what they are currently viewing, chat with them, etc. and, even if the feature can be disabled, I am not sure I want to share that amount of intimacy with my friends when at work or at home. But it's probably just one of those things I will change my mind about as more and more people choose to use it.&lt;br /&gt;&lt;br /&gt;We all know Web 2.0 really is all about 'social': social networking, social bookmarking, social learning, you name it, it has social in front of it. Well, &lt;span style="font-weight:bold;"&gt;this new engine brings 'social' to the search industry&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;When you use social search, you get &lt;span style="font-weight:bold;"&gt;extra information&lt;/span&gt; for every link in your result set:&lt;br /&gt;- crowd rank: not sure how this works, perhaps there is a rank button on the toolbar, a bit like the Google page rank (?);&lt;br /&gt;- velocity: whether site traffic from the crowd is stable, increasing or decreasing;&lt;br /&gt;- recent activity: how 'hot' the site is (luke-warm, warm, hot);&lt;br /&gt;- visitors present: whether anyone from the crowd is currently visiting;&lt;br /&gt;- average visit duration: "short", "medium" or "long" (?);&lt;br /&gt;- navigate from and to: how most of the crowd moves to or from the link.&lt;br /&gt;&lt;br /&gt;So you actually get quite a lot of additional information about each search result.&lt;br /&gt;&lt;br /&gt;It will be interesting to see in what way the search results are &lt;span style="font-weight:bold;"&gt;influenced by the crowd&lt;/span&gt;, I guess it could (hypothetically) lead to all sorts of biases, but also to a good way of measuring what most people are interested in or in fact (want to) believe.&lt;br /&gt;&lt;br /&gt;I couldn't help but wonder whether the propagandists could get hold of this, but I get the feeling that's a typical Web-2.0 non-argument. A bit like the kind of argument you may have against corporate wikis/forums/blogs. The top 'guys' always have the gut feeling the system will be used and &lt;i&gt;abused&lt;/i&gt; whereas in actual fact, the vast majority of people are pretty level-headed and once they get the hang of the system actually use it in constructive ways. It seems to me that the more people use this system, the better the results will be and the lesser the impact of small groups of people who may want to sway the search results one way or another.&lt;br /&gt;&lt;br /&gt;And there is always the Yahoo-based standard search to fall back on if you are not getting what you want.&lt;br /&gt;&lt;br /&gt;There were a couple of minor things I noted when using the search engine.&lt;br /&gt;There was one feature I really missed: the &lt;span style="font-weight:bold;"&gt;word suggestions&lt;/span&gt;. For instance, I wasn't quite sure how to spell Musharraf so guessed at Musharaf, I was expecting the search engine to automatically suggest the correct spelling - it's a bad habit, but a great feature that most Google users have probably grown used to.&lt;br /&gt;&lt;br /&gt;Another thing I found as an avid Googler who doesn't ever press the "I'm feeling lucky" button (shameful I know...), was that &lt;span style="font-weight:bold;"&gt;using the "I feel social" button really didn't come naturally&lt;/span&gt;. I think the location of the button and the use of the word 'feel' set the alarm bells a-ringing in a "don't-click-me" kind of way.&lt;br /&gt;&lt;br /&gt;One last thing I felt was missing was the ability to &lt;span style="font-weight:bold;"&gt;sort the search results&lt;/span&gt; by crowd rank, recent activity, average visit duration, etc. as this could certainly increase search relevancy. But I guess there is only so much you can expect from an alpha release especially with this level of stability! :-)&lt;br /&gt;&lt;br /&gt;So, Me.dium definitely looks promising, and it's really top-notch: if there were any glitches, I certainly didn't notice them. AND it's bringing something really new to the search market so it's worth staying tuned to see how this project will evolve and whether it can get hold of any significant share of the search market.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5986807832164474372?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5986807832164474372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5986807832164474372&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5986807832164474372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5986807832164474372'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/medium-power-to-people.html' title='Me.dium - Power to the People'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2897722731836953505</id><published>2008-08-19T18:34:00.001+02:00</published><updated>2008-08-19T18:34:00.834+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Netbeans'/><title type='text'>Netbeans 6.5b released</title><content type='html'>The &lt;a href="http://www.netbeans.org"&gt;Netbeans&lt;/a&gt; 6.5b was released last week and can be downloaded &lt;a href="http://download.netbeans.org/netbeans/6.5/beta/"&gt;here&lt;/a&gt;. The full installer weighs in at around 200Mb.&lt;br /&gt;&lt;br /&gt;To my knowledge this is the first "release" to include the PHP module. The previous version, dubbed "Early Access For PHP" required a separate download and wasn't integrated into the usual Netbeans IDE which included the usual Java, Ruby, etc.&lt;br /&gt;&lt;br /&gt;It's great to be able to seamlessly integrate PHP projects in this latest release!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2897722731836953505?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2897722731836953505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2897722731836953505&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2897722731836953505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2897722731836953505'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/netbeans-65b-released.html' title='Netbeans 6.5b released'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4865404596524716268</id><published>2008-08-18T18:59:00.010+02:00</published><updated>2008-08-19T16:43:12.410+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='keys'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='KeyCzar'/><category scheme='http://www.blogger.com/atom/ns#' term='public'/><category scheme='http://www.blogger.com/atom/ns#' term='private'/><title type='text'>KeyCzar quickfix fixed</title><content type='html'>Some of you might recall my using a batch 'quickfix' in a previous post about &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-creating-rsa-public-and.html"&gt;Google KeyCzar: creating the RSA public and private keys using batch&lt;/a&gt;, to work around a small issue whereby filenames ended up being concatenated to the folder name (e.g. rsakeysmeta instead of rsakeys\meta).&lt;br /&gt;&lt;br /&gt;A few hours after posting, I eureka-d that adding \ to the folder variables would probably fix it much more neatly - and now I have found the time to verify this, it does :-).&lt;br /&gt;&lt;br /&gt;I fixed the previous post accordingly and here is the uninterrupted simplified version of the batch for anyone interested:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;br /&gt;:init&lt;br /&gt;set java=java&lt;br /&gt;if exist "C:\Program Files\Java\jre1.6.0_05\bin\java.exe" set java="C:\Program Files\Java\jre1.6.0_05\bin\java.exe"&lt;br /&gt;if exist "C:\Program Files\Java\jre1.6.0_07\bin\java.exe" set java="C:\Program Files\Java\jre1.6.0_07\bin\java.exe"&lt;br /&gt;if not exist %java% goto java_nf&lt;br /&gt;&lt;br /&gt;set parent=..&lt;br /&gt;set keyczar=keyczar05b.jar&lt;br /&gt;set gson=gson-1.1.1.jar&lt;br /&gt;set log4j=log4j-1.2.15.jar&lt;br /&gt;&lt;br /&gt;if not exist %parent%\%keyczar% goto keyczar_jar_nf&lt;br /&gt;if not exist %parent%\%gson% goto gson_jar_nf&lt;br /&gt;if not exist %parent%\%log4j% goto log4j_jar_nf&lt;br /&gt;&lt;br /&gt;goto create_keys&lt;br /&gt;&lt;br /&gt;:create_keys&lt;br /&gt;&lt;b&gt;set location=rsakeys\&lt;/b&gt;&lt;br /&gt;&lt;b&gt;set public=publickeys\&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;if not exist %location%%public% mkdir %location%%public%&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;echo Creating key set&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool create &lt;b&gt;--location=%location%&lt;/b&gt; --purpose=crypt --asymmetric=rsa&lt;br /&gt;echo Creating private decryption key&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool addkey &lt;b&gt;--location=%location%&lt;/b&gt; --status=primary&lt;br /&gt;echo Creating public encryption (primary) key&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool pubkey &lt;b&gt;--location=%location%&lt;/b&gt; --status=active &lt;b&gt;--destination=%location%%public%&lt;/b&gt;&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:java_nf&lt;br /&gt;echo Cannot find java&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:keyczar_jar_nf&lt;br /&gt;echo Cannot find keyczar jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:gson_jar_nf&lt;br /&gt;echo Cannot find gson jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:log4j_jar_nf&lt;br /&gt;echo Cannot find log4j jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Well, that's it. Much neater and quite as functional!&lt;br /&gt;&lt;br /&gt;Please refer to the &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-creating-rsa-public-and.html"&gt;previous post&lt;/a&gt; for more information on what is actually happening here.&lt;br /&gt;&lt;br /&gt;You can also read the &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-java-encryptiondecryptio.html"&gt;second part of the post&lt;/a&gt; which covers how to use the KeyCzar library in Java for asymmetric RSA encryption/decryption (using the keys we just created with the above batch file).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4865404596524716268?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4865404596524716268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4865404596524716268&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4865404596524716268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4865404596524716268'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/keyczar-quickfix-fixed.html' title='KeyCzar quickfix fixed'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1059550367781715455</id><published>2008-08-17T18:36:00.000+02:00</published><updated>2008-08-17T18:36:00.275+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='cuil'/><category scheme='http://www.blogger.com/atom/ns#' term='search engine'/><title type='text'>Cuil, not that cool</title><content type='html'>So perhaps Cuil isn't as cool as they had made out when it was launched.&lt;br /&gt;&lt;br /&gt;I was really enthusiastic about the &lt;a href="http://www.cuil.com/"&gt;Cuil&lt;/a&gt; search engine when it was first publicized but have returned to my 100% Google searching as it comes up with the results I am expecting, and thus increases my productivity. The Cuil features like drill-down and its well thought-out philosophy are great but get completely overshadowed by the engine's poor search results.&lt;br /&gt;&lt;br /&gt;So how do I measure how good the results are? Well, really the way I do this is by comparing the results from Cuil to those that Google would give me. Which is probably very bad practice, but I guess that just highlights the fact Google really has become the de facto "best" search engine for most people. How many times have you heard "Google it", and how many times have you heard "Yahoo it"? See, that's what I thought.&lt;br /&gt;&lt;br /&gt;It does leave me wondering whether in some cases it's the search engine giving poor results or me using poor search words. Perhaps the way I pick search words has changed to accomodate the way Google references its pages and that's what makes it easier for me to use Google than Cuil, for instance.&lt;br /&gt;&lt;br /&gt;Still, Cuil does on occasion undoubtedly return disastrous results.&lt;br /&gt;For instance, if I search for the following three words: &lt;br /&gt;e-learning technologies karrer&lt;br /&gt;I expect the first link to be the &lt;a href="http://elearningtech.blogspot.com/"&gt;eLearning Technology&lt;/a&gt; blog by Tony Karrer.&lt;br /&gt;Well although Cuil actually will provide a link to the blog (and not the main page at that!), it does so with the wrong picture and in fact places the correct picture under someone else's name! Ouch.&lt;br /&gt;&lt;br /&gt;So it seems Google really does just go that extra mile... :-)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1059550367781715455?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1059550367781715455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1059550367781715455&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1059550367781715455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1059550367781715455'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/cuil-not-that-cool.html' title='Cuil, not that cool'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3527184686717360098</id><published>2008-08-16T18:02:00.002+02:00</published><updated>2008-09-16T22:50:53.434+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='read'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='properties'/><category scheme='http://www.blogger.com/atom/ns#' term='ini'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip #16 (part 2): getting property values from an ini file</title><content type='html'>This is just a slight variation on the previous post on working with *.ini files.&lt;br /&gt;Here we only retrieve property values but not sections or property names.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;@echo off&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set ini_file=my.ini&lt;br /&gt;goto show_values&lt;br /&gt;&lt;br /&gt;:show_values&lt;br /&gt;for /F "tokens=1,2 delims==" %%L in (%ini_file%) do (&lt;br /&gt; if not [%%M]==[] (&lt;br /&gt;  echo Value: %%M&lt;br /&gt; )&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Simple :-).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3527184686717360098?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3527184686717360098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3527184686717360098&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3527184686717360098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3527184686717360098'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/batch-programming-tip-16-part-2-getting.html' title='Batch programming tip #16 (part 2): getting property values from an ini file'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5947475559050727795</id><published>2008-08-15T19:00:00.002+02:00</published><updated>2008-08-15T19:00:00.698+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='notebook'/><category scheme='http://www.blogger.com/atom/ns#' term='fast boot'/><category scheme='http://www.blogger.com/atom/ns#' term='motherboard'/><category scheme='http://www.blogger.com/atom/ns#' term='ASUS'/><category scheme='http://www.blogger.com/atom/ns#' term='splashtop'/><title type='text'>Splashtop</title><content type='html'>A colleague recently pointed me to the Splashtop website: &lt;a href="http://www.splashtop.com/"&gt;http://www.splashtop.com/&lt;/a&gt; and then days later a discussion with friends brought it back to mind.&lt;br /&gt;&lt;br /&gt;So what is Splashtop? It's a small Linux distribution which launches in a matter of seconds at bootup allowing you to almost instantly access the internet using a fully-fledged browser. The website offers some nice demos which give you the "feel" for the way it works and naturally, its impressive startup speed.&lt;br /&gt;&lt;br /&gt;The following movie shows the basic Splashtop environment. Note that later versions have already been improved on with new functionalities!&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qd_kZhbXkXA&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qd_kZhbXkXA&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;It looks like it might be time to give up on that two-minute bootup wait before you look up your favourite recipe, check your email or look up a new road itinerary.&lt;br /&gt;&lt;br /&gt;Splashtop is currently bundled with ASUS motherboards and notebooks.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5947475559050727795?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5947475559050727795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5947475559050727795&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5947475559050727795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5947475559050727795'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/splashtop.html' title='Splashtop'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2367338993309060757</id><published>2008-08-15T12:39:00.007+02:00</published><updated>2008-08-15T12:50:25.620+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='KeyCzar'/><title type='text'>Google Keyczar - now available for Java 1.5</title><content type='html'>This is a quick update regarding a sidenote in &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-java-encryptiondecryptio.html"&gt;yesterday's post&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;... if you get a message like "incorrect class version, 50 should be 49" or something along those lines, it means you are not running the correct version of java (i.e. the KeyCzar classes were compiled with a later version).&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://saweis.net/"&gt;Steve Weis&lt;/a&gt;, who originally developed keyCzar, very kindly confirmed this information this morning.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The class version error is indeed due to the fact that we're using Java 1.6. Unfortunately, that's not supported by some (all?) Mac users, so we're going to post a Java 1.5 Jar soon.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Well, for anyone interested the 1.5 Jar is already available at the KeyCzar website: &lt;a href="http://www.keyczar.org/"&gt;http://www.keyczar.org/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2367338993309060757?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2367338993309060757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2367338993309060757&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2367338993309060757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2367338993309060757'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/google-keyczar-now-available-for-java.html' title='Google Keyczar - now available for Java 1.5'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2351460531661819760</id><published>2008-08-14T18:26:00.002+02:00</published><updated>2008-08-15T00:00:34.364+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='KeyCzar'/><title type='text'>Google Keyczar - a Java encryption/decryption example</title><content type='html'>&lt;a href="http://www.keyczar.org/"&gt;Google Keyczar&lt;/a&gt; is a new Google toolkit for data encryption. We saw in a &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-creating-rsa-public-and.html"&gt;previous post&lt;/a&gt; how to create the private and public key files for RSA encryption.&lt;br /&gt;&lt;br /&gt;Let's now see how to use them by integrating the Keyczar library in a Java project.&lt;br /&gt;It's actually extremely simple.&lt;br /&gt;&lt;br /&gt;First, let's see the code from Bob's perspective. Bob encrypts the data using a public key which Alice has given him (and maybe other people). To do this we will use a class called BobsApp which will specifically handle encryption using the public key folder (you'll want to check its location: it should be rsakeys\publickeys\ and the rsakeys folder should be located at the same level as the BobsApp class file).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package keyczartest;&lt;br /&gt;&lt;br /&gt;import org.keyczar.Encrypter;&lt;br /&gt;import org.keyczar.exceptions.KeyczarException;&lt;br /&gt;&lt;br /&gt;public class BobsApp&lt;br /&gt;{   &lt;br /&gt;    private Encrypter encrypter; // used to crypt&lt;br /&gt;    &lt;br /&gt;    public BobsApp() throws KeyczarException&lt;br /&gt;    {&lt;br /&gt;        String publickey=this.getClass().getResource("rsakeys/publickeys").&lt;br /&gt;                                                                getFile();&lt;br /&gt;        this.encrypter=new Encrypter(publickey);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public String process(String data) throws KeyczarException&lt;br /&gt;    {&lt;br /&gt;        if (data==null) return null;&lt;br /&gt;        return this.encrypter.encrypt(data);&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, let's do the same thing from Alice's perspective. She will receive Bob's (and maybe other people's) encrypted messages, but she alone can decrypt them using her private key. (You'll want to check the private key folder location: it should be rsakeys and the rsakeys folder should be located at the same level as the BobsApp and AlicesApp class files).&lt;br /&gt;&lt;br /&gt;This is the Java utility class which specifically handles decryption:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package keyczartest;&lt;br /&gt;&lt;br /&gt;import org.keyczar.Crypter;&lt;br /&gt;import org.keyczar.exceptions.KeyczarException;&lt;br /&gt;&lt;br /&gt;public class AlicesApp&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    private Crypter crypter; // used to decrypt&lt;br /&gt;&lt;br /&gt;    public AlicesApp() throws KeyczarException&lt;br /&gt;    {&lt;br /&gt;        String privatekey=this.getClass().getResource("rsakeys").&lt;br /&gt;                                                        getFile();&lt;br /&gt;        this.crypter=new Crypter(privatekey);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public String process(String data) throws KeyczarException&lt;br /&gt;    {&lt;br /&gt;        if (data==null) return null;&lt;br /&gt;        return this.crypter.decrypt(data);&lt;br /&gt;    }   &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, let's create our main method which we can use to run the project:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import keyczartest.AlicesApp;&lt;br /&gt;import keyczartest.BobsApp;&lt;br /&gt;&lt;br /&gt;public class Keyczarette&lt;br /&gt;{&lt;br /&gt;    public static void main(String[] args)&lt;br /&gt;    {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            String secretText="For Alice's eyes only. Signed: Bob";&lt;br /&gt;            String bobsMessage=new BobsApp().process(secretText);&lt;br /&gt;            System.out.println("Bob sends: " + bobsMessage);&lt;br /&gt;            AlicesApp app=new AlicesApp();&lt;br /&gt;            String alicesMessage=new AlicesApp().process(bobsMessage);&lt;br /&gt;            System.out.println("What Alice reads: " + alicesMessage);&lt;br /&gt;        }&lt;br /&gt;        catch (Exception e)&lt;br /&gt;        {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Just one last note, if you get a message like "incorrect class version, 50 should be 49" or something along those lines, it means you are not running the correct version of java (i.e. the KeyCzar classes were compiled with a later version).&lt;br /&gt;&lt;br /&gt;Straight to the point! =D&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Could it get any simpler than that?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2351460531661819760?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2351460531661819760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2351460531661819760&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2351460531661819760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2351460531661819760'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/google-keyczar-java-encryptiondecryptio.html' title='Google Keyczar - a Java encryption/decryption example'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1799277224358024149</id><published>2008-08-13T19:01:00.004+02:00</published><updated>2008-08-18T15:40:13.412+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='cryptography'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='open source tools'/><category scheme='http://www.blogger.com/atom/ns#' term='keys'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='KeyCzar'/><category scheme='http://www.blogger.com/atom/ns#' term='public'/><category scheme='http://www.blogger.com/atom/ns#' term='private'/><title type='text'>Google Keyczar - creating the RSA public and private keys using batch</title><content type='html'>Google Keyczar made headline news on geek planet recently and I couldn't help but give it a go. It's a cryptographic toolkit for Python and Java and here is a quick look at how you can get it to work for Java on Windows.&lt;br /&gt;&lt;br /&gt;You can use it to encrypt/decrypt using public/private keys or to sign content. What really interested me was to use the RSA asymmetric method as it has always really appealed to me. Just to recap' on how this works, the idea is that Alice uses two keys: a public key (which anyone and everyone can know) and a private key that only she knows. Anyone can send her an encrypted message using the public key. To decrypt the message you need the private key, so only Alice can read the message. Excellent.&lt;br /&gt;&lt;br /&gt;For starters, here's a link to where you can get the keyczar jar library: &lt;a href="http://www.keyczar.org/"&gt;http://www.keyczar.org/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You will also need two dependencies:&lt;br /&gt;- the gson jar from Google code: &lt;br /&gt;&lt;a href="http://code.google.com/p/google-gson/"&gt;http://code.google.com/p/google-gson/&lt;/a&gt;&lt;br /&gt;- the apache log4j jar: &lt;br /&gt;&lt;a href="http://logging.apache.org/log4j/1.2/download.html"&gt;http://logging.apache.org/log4j/1.2/download.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also note: I think JRE 1.6 or more is required to run the jar properly.&lt;br /&gt;&lt;br /&gt;There are several steps to getting this up and running:&lt;br /&gt;1. We need to create the public and private key files. The keyczar toolkit provides command line utilities to do this.&lt;br /&gt;2. We need to create the Java code which will encrypt Bob's message to Alice (using the public key), and decrypt Bob's message when it reaches Alice (using the private key) so that Alice, and only Alice, can read it.&lt;br /&gt;&lt;br /&gt;This first post will cover how to create the public and private key files using the batch file shown below.&lt;br /&gt;&lt;br /&gt;I will add a couple of notes as we go along to explain the various parts of the batch file.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We need to set up Java properly, so point this to a JRE on your machine.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:init&lt;br /&gt;set java=java&lt;br /&gt;if exist "C:\Program Files\Java\jre1.6.0_05\bin\java.exe" set java="C:\Program Files\Java\jre1.6.0_05\bin\java.exe"&lt;br /&gt;if exist "C:\Program Files\Java\jre1.6.0_07\bin\java.exe" set java="C:\Program Files\Java\jre1.6.0_07\bin\java.exe"&lt;br /&gt;if not exist %java% goto java_nf&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here we are defining the directory structure to be able to find the jar files which will be passed to the Java command. In my case the batch file is located in a script directory. The 3 jars (keyczar, gson and log4j) are all located on the same level as the script directory i.e. a level above the .bat file. This is why I set the parent variable to ..&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set parent=..&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Obviously check the exact jar names...&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set keyczar=keyczar05b.jar&lt;br /&gt;set gson=gson-1.1.1.jar&lt;br /&gt;set log4j=log4j-1.2.15.jar&lt;br /&gt;&lt;br /&gt;if not exist %parent%\%keyczar% goto keyczar_jar_nf&lt;br /&gt;if not exist %parent%\%gson% goto gson_jar_nf&lt;br /&gt;if not exist %parent%\%log4j% goto log4j_jar_nf&lt;br /&gt;&lt;br /&gt;goto create_keys&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now we'll be calling the commands to create the keys.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:create_keys&lt;br /&gt;set location=rsakeys\&lt;br /&gt;set public=publickeys\&lt;br /&gt;&lt;br /&gt;if not exist %location%%public% mkdir %location%%public%&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You will want to make sure each of the following three %java% commands are actually on one line and not cut up as they are here.&lt;br /&gt;&lt;br /&gt;Right, first command, create the key set. Note that we'll be using asymmetric RSA.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;echo Creating key set&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool create --location=%location% --purpose=crypt --asymmetric=rsa&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Second java command: create a key. This will be the secret key. Its status must be set to primary because that means it can be used for decrypting.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;echo Creating private decryption key&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool addkey --location=%location% --status=primary&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Finally, we create the public key and use a "public" destination for it.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;echo Creating public encryption key&lt;br /&gt;%java% -classpath %parent%/%keyczar%;%parent%/%gson%;%parent%/%log4j% org.keyczar.KeyczarTool pubkey --location=%location% --status=active --destination=%location%%public%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:java_nf&lt;br /&gt;echo Cannot find java&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:keyczar_jar_nf&lt;br /&gt;echo Cannot find keyczar jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:gson_jar_nf&lt;br /&gt;echo Cannot find gson jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:log4j_jar_nf&lt;br /&gt;echo Cannot find log4j jar&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That's it. Once you run this, you should get the following results:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;rsakeys\&lt;br /&gt;    publickeys\&lt;br /&gt;        1&lt;br /&gt;        meta&lt;br /&gt;    1&lt;br /&gt;    meta&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Basically two files for each key: a meta file which describes the key and another file which contains the key itself.&lt;br /&gt;&lt;br /&gt;If you're interested there is some excellent documentation on the keyczar wiki at:&lt;br /&gt;&lt;a href="http://code.google.com/p/keyczar/w/list"&gt;http://code.google.com/p/keyczar/w/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It gives real insight into the key metadata, the various possible values and what they actually mean.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts for now?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;[EDIT: For the second part of this post follow the link: &lt;a href="http://elinorhurst.blogspot.com/2008/08/google-keyczar-java-encryptiondecryptio.html"&gt;Google KeyCzar Java encryption/decryption&lt;/a&gt;]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1799277224358024149?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1799277224358024149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1799277224358024149&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1799277224358024149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1799277224358024149'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/google-keyczar-creating-rsa-public-and.html' title='Google Keyczar - creating the RSA public and private keys using batch'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2534404181322763583</id><published>2008-08-12T18:54:00.001+02:00</published><updated>2008-08-12T18:54:00.874+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Kolb&apos;s experiential learning theory'/><category scheme='http://www.blogger.com/atom/ns#' term='learning'/><category scheme='http://www.blogger.com/atom/ns#' term='Kolb&apos;s learning styles model'/><category scheme='http://www.blogger.com/atom/ns#' term='experience'/><category scheme='http://www.blogger.com/atom/ns#' term='Kolb'/><title type='text'>Kolb's learning styles</title><content type='html'>An interesting article about Kolb's theory on experiential learning and learning styles model:&lt;br /&gt;&lt;a href="http://www.businessballs.com/kolblearningstyles.htm"&gt;http://www.businessballs.com/kolblearningstyles.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What better way to learn than through concrete experience?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2534404181322763583?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2534404181322763583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2534404181322763583&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2534404181322763583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2534404181322763583'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/kolbs-learning-styles.html' title='Kolb&apos;s learning styles'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3995251241681534575</id><published>2008-08-11T20:52:00.001+02:00</published><updated>2008-08-11T21:51:09.410+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='write'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='read'/><category scheme='http://www.blogger.com/atom/ns#' term='ini'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip #16: Reading a property from an INI file</title><content type='html'>You are going to start thinking batch an I are having a love-hate relationship but there was an &lt;a href="http://www.computing.net/answers/programming/batch-file-variables/16799.html"&gt;interesting question&lt;/a&gt; on &lt;a href="http://www.computing.net"&gt;computing.net&lt;/a&gt; recently. Someone asked how to get a property from an INI file and/or print things to an ini file or text file.&lt;br /&gt;&lt;br /&gt;This was my effort at it.&lt;br /&gt;&lt;br /&gt;File: - my.ini -&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[provider]&lt;br /&gt;name=ETH&lt;br /&gt;organization=Stardust&lt;br /&gt;&lt;br /&gt;[file]&lt;br /&gt;server=192.168.254.42    ; use IP address &lt;br /&gt;port=8080&lt;br /&gt;file=wonderful.txt&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The aim of the following batch is to retrieve the server IP address.&lt;br /&gt;To do this we read all the lines of the ini file (that is each first "token" of every line, but because the property=value entities don't contain any default delimiters the first token will actually be the property=value pair on each line).&lt;br /&gt;&lt;br /&gt;Then we try matching the beginning of the line with our property name.&lt;br /&gt;If it matches, bingo, get the remaining string value and output it to ini/txt.&lt;br /&gt;&lt;br /&gt;File: - ini_bat.bat -&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;:: this is our ini file path&lt;br /&gt;set ini_file=my.ini&lt;br /&gt;:: this is the key for which we want to retrieve a value&lt;br /&gt;set key=server&lt;br /&gt;:: this is the length of our key word (e.g. 'server')&lt;br /&gt;set keylen=6&lt;br /&gt;:: this is the index at which the equal sign should be&lt;br /&gt;set /a eqsign=%keylen%+1&lt;br /&gt;:: tmp dir name (should be empty)&lt;br /&gt;set tmp_dir=tmp000&lt;br /&gt;:: make temp dir&lt;br /&gt;if not exist %tmp_dir% mkdir %tmp_dir%&lt;br /&gt;goto get_key&lt;br /&gt;&lt;br /&gt;:get_key&lt;br /&gt;set tmp_file=%tmp_dir%\tmp.txt&lt;br /&gt;:: this read the first token of every line, shouldn't be spaces in the ini file properties&lt;br /&gt;for /F %%L in (%ini_file%) do (&lt;br /&gt; set line=%%L&lt;br /&gt; set linestart=!line:~0,%keylen%!&lt;br /&gt;&lt;br /&gt; if !linestart!==%key% (&lt;br /&gt;  set value=!line:~%eqsign%!&lt;br /&gt;  goto output_value&lt;br /&gt; )&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;:: this will erase existing %tmp_dir%\new.ini and %tmp_dir%\new.txt files&lt;br /&gt;&lt;br /&gt;:output_value&lt;br /&gt;echo Outputting value to ini file&lt;br /&gt;echo server=%value% &gt; %tmp_dir%\new.ini&lt;br /&gt;echo Outputting value to text file&lt;br /&gt;echo The value is: %value% &gt; %tmp_dir%\new.txt&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And there you have it!&lt;br /&gt;&lt;br /&gt;Some obvious improvements could be:&lt;br /&gt;- setting the key dynamically (this also means computing the key length on the fly).&lt;br /&gt;- including adequate behaviour if the property definitions include spaces&lt;br /&gt;(e.g. server&amp;nbsp;=&amp;nbsp;192.0.2.42)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3995251241681534575?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3995251241681534575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3995251241681534575&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3995251241681534575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3995251241681534575'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/batch-programming-tip-16-reading.html' title='Batch programming tip #16: Reading a property from an INI file'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8158648896601438173</id><published>2008-08-05T18:47:00.010+02:00</published><updated>2008-08-06T10:16:45.097+02:00</updated><title type='text'>Birthday Week</title><content type='html'>Well, this is really a one off, because for once (!) I shall be talking about my private life. Expect crazyness. Not.&lt;br /&gt;&lt;br /&gt;This week is my birthday week and I am lucky to have lots of things going on this year so please forgive my short absence from the blogosphere... and, fear not, I'll be back soon with new riveting posts :D.&lt;br /&gt;&lt;br /&gt;Among things I would like to explore:&lt;br /&gt;- software licenses&lt;br /&gt;- impersonal e-learning&lt;br /&gt;- PowerPoint presentations&lt;br /&gt;- Splashtop&lt;br /&gt;- Google Translation&lt;br /&gt;- geeky programming stuff&lt;br /&gt;&lt;br /&gt;And lots of other things too.&lt;br /&gt;&lt;br /&gt;'See' you soon I hope ;-),&lt;br /&gt;&lt;br /&gt;Elinor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8158648896601438173?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8158648896601438173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8158648896601438173&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8158648896601438173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8158648896601438173'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/birthday-week.html' title='Birthday Week'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5561371700781292089</id><published>2008-08-02T18:06:00.001+02:00</published><updated>2008-08-02T22:42:19.761+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='object-oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML forms'/><category scheme='http://www.blogger.com/atom/ns#' term='form rendering'/><title type='text'>Object-oriented form rendering using PHP, part 3</title><content type='html'>Back to a couple of posts that date back to ages ago:&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/06/well-hi-again.html"&gt;Object-oriented form rendering using PHP, part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/06/there-is-one-fundamental-problem-with.html"&gt;Object-oriented form rendering using PHP, part 2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically, I had said at the time I would be redesigning lots of the code. Which is now done! Just one update compared to what was previously said, the client-side rules are added to the onsubmit event of the form.&lt;br /&gt;&lt;br /&gt;And this is the result from the server perspective (login form):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$login_form=new HTML_Form('login',$_SERVER['PHP_SELF'], 'POST', 'login');&lt;br /&gt; &lt;br /&gt;// identifier&lt;br /&gt;$f_identifier=new Text('identifier', 'identifier', '', 15, 15);&lt;br /&gt;$f_identifier-&gt;setLabel(Toolkit::get_lang('identifier'));&lt;br /&gt;$f_identifier-&gt;addOnSubmitRule('trim');&lt;br /&gt;$f_identifier-&gt;addOnSubmitRule('required', 'This field is required');&lt;br /&gt;$login_form-&gt;add($f_identifier);&lt;br /&gt; &lt;br /&gt;// password&lt;br /&gt;$f_password=new Password('password', 'password', '', 15, 15);&lt;br /&gt;$f_password-&gt;setLabel(Toolkit::get_lang('password'));&lt;br /&gt;$f_password-&gt;addOnSubmitRule('required', 'This field is required');&lt;br /&gt;$login_form-&gt;add($f_password);&lt;br /&gt;&lt;br /&gt;// secure form&lt;br /&gt;$login_form-&gt;secure();&lt;br /&gt; &lt;br /&gt;// submit button&lt;br /&gt;$submit=new Submit();&lt;br /&gt;$login_form-&gt;add($submit);&lt;br /&gt; &lt;br /&gt;// display form&lt;br /&gt;$login_form-&gt;display();&lt;br /&gt; &lt;br /&gt;if ($login_form-&gt;validate())&lt;br /&gt;{&lt;br /&gt; // handle POST information, etc.&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;First I create an HTML_Form object to which I can add form elements like Text or Password objects. I can add rules to my form elements using the addOnSubmitRule method.&lt;br /&gt;&lt;br /&gt;This is the resulting form:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;form action="/stardust/zencity/main/home.php" method="POST" id="login" name="login" onSubmit="reset_errors(); var ret=true;ret&amp;=trim('identifier');ret&amp;=required('identifier','This field is required');ret&amp;=required('password','This field is required');if (!ret) return false;"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;label for="identifier"&gt;identifier*&amp;nbsp;: &amp;lt;/label&gt;&lt;br /&gt;&amp;lt;input id="identifier" name="identifier" type="text" size="15" maxlength="15"/&gt;&lt;br /&gt;&amp;lt;span id='error_identifier' name='error_identifier'&gt;&amp;lt;/span&gt;&amp;lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;label for="password"&gt;password*&amp;nbsp;: &amp;lt;/label&gt;&lt;br /&gt;&amp;lt;input id="password" name="password" type="password" size="15" maxlength="15"/&gt;&lt;br /&gt;&amp;lt;span id='error_password' name='error_password'&gt;&amp;lt;/span&gt;&amp;lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input id="seckey" name="seckey" type="hidden" value="BcfaGvQEpqvJujGv90nz6P10zEBqgOBUp9X3J0aXrebdf9tUoD1DA1hv28e5tlkv"/&gt;&amp;lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="submit" value="ok"/&gt;&amp;lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The validate() method then checks the form (e.g. makes sure it has been submitted with the correct security key).&lt;br /&gt;Some of the goodies are:&lt;br /&gt;- the required fields' labels are automatically appended with * sign;&lt;br /&gt;- the calls to JS code are automatically generated and most of the checking happens on the client-side, to help avoid server overload for simple rules (like trim, minimum length requirements, email validity, etc.);&lt;br /&gt;- error zones are automatically created, these are used by the Javascript code to show error messages when the client-side rules are not met (e.g. required field empty);&lt;br /&gt;- you can seamlessly add to the code behind all this: new rules, new types of elements (for instance, I have designed a small captcha - which still needs tuning mind you - which I can create with: &lt;span style="font-style:italic;"&gt;new Captcha('captcha', 'captcha')&lt;/span&gt;, and then add to form using the usual add() method; simple as that).&lt;br /&gt;&lt;br /&gt;Well, hopefully more on this project soon to explain what's actually happening behind the scenes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5561371700781292089?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5561371700781292089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5561371700781292089&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5561371700781292089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5561371700781292089'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/object-oriented-form-rendering-using.html' title='Object-oriented form rendering using PHP, part 3'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-6549832902596668553</id><published>2008-08-01T18:37:00.002+02:00</published><updated>2008-08-02T10:29:27.682+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='::'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='file information'/><category scheme='http://www.blogger.com/atom/ns#' term='delayed expansion'/><category scheme='http://www.blogger.com/atom/ns#' term='timestamp'/><category scheme='http://www.blogger.com/atom/ns#' term='loop'/><category scheme='http://www.blogger.com/atom/ns#' term='spaces'/><category scheme='http://www.blogger.com/atom/ns#' term='comparing file sizes'/><category scheme='http://www.blogger.com/atom/ns#' term='REM'/><category scheme='http://www.blogger.com/atom/ns#' term='arguments'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='file attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='cd /D'/><category scheme='http://www.blogger.com/atom/ns#' term='CON'/><category scheme='http://www.blogger.com/atom/ns#' term='subroutine'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Batch programming summary</title><content type='html'>So been there, done that, time to move on from batch.&lt;br /&gt;But before that, a quick list of all the batch programming scripts already available here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-01-variables-and.html"&gt;Variables and spaces&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/tip02-using-cd-d.html"&gt;Using CD /D&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-03-using-boring.html"&gt;The Boring Black Hole&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with.html"&gt;Working with arguments, part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with_29.html"&gt;Working with arguments, part 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with_30.html"&gt;Working with arguments, part 3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/05/using-con-or-not.html"&gt;Using CON... or not&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/05/how-to-clear-log-file.html"&gt;How to clear the log file&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip06-getting-batch.html"&gt;Getting the batch file path&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip07-retrieving.html"&gt;Retrieving argument file size&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-tip07-part-2-comparing-files-by.html"&gt;Comparing files by size&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-reading-from.html"&gt;Reading from a file: part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-part-2-reading.html"&gt;Reading from a file, part 2: looping&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-part-3-reading.html"&gt;Reading from a file, part 3: looping, part 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip09-using-for-d.html"&gt;Using FOR /D&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip10-making-and.html"&gt;Making and calling a subroutine, part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip10-making-and_18.html"&gt;Making and calling a subroutine, part 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip11-using-substring.html"&gt;Using The Substring Equivalent&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip12-creating.html"&gt;Creating a timestamp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip13-using-setlocal.html"&gt;Using setlocal enabledelayedexpansion&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip14-difference.html"&gt;The difference between :: and REM&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-tip15-getting-file.html"&gt;Getting file information&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/batch-programming-using-help-to-help.html"&gt;Using help to help yourself (part 1)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://elinorhurst.blogspot.com/2008/07/using-help-to-help-yourself-part-2.html"&gt;Using help to help yourself (part 2): publishing batch help information in HTML format&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-6549832902596668553?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/6549832902596668553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=6549832902596668553&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6549832902596668553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6549832902596668553'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/08/batch-programming-summary.html' title='Batch programming summary'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2160403496189547400</id><published>2008-07-31T18:22:00.007+02:00</published><updated>2008-07-31T18:22:00.211+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='accents'/><category scheme='http://www.blogger.com/atom/ns#' term='Š'/><category scheme='http://www.blogger.com/atom/ns#' term='edit'/><category scheme='http://www.blogger.com/atom/ns#' term='accentué'/><category scheme='http://www.blogger.com/atom/ns#' term='help'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='french'/><category scheme='http://www.blogger.com/atom/ns#' term='accented characters'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='notepad'/><title type='text'>Using help to help yourself (part 2): publishing batch help information in HTML format</title><content type='html'>Well, it took quite a bit of head-scratching but here it is: a batch script that outputs information about commands in HTML format.&lt;br /&gt;&lt;br /&gt;This is the code (NOTE: works with french accented words)&lt;br /&gt;&lt;br /&gt;[commands_site.bat]&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;set out_dir=site&lt;br /&gt;set page_sub=pages&lt;br /&gt;set page_dir=%out_dir%\%page_sub%&lt;br /&gt;if not exist %page_dir% mkdir %page_dir%&lt;br /&gt;goto create_site&lt;br /&gt;&lt;br /&gt;:create_site&lt;br /&gt;set ifile=%out_dir%\index.html&lt;br /&gt;&gt; %ifile% echo ^&amp;lt;html^&gt;^&amp;lt;head^&gt;^&amp;lt;title^&gt;Commands index^&amp;lt;/title^&gt;^&amp;lt;/head^&gt;&lt;br /&gt;&gt;&gt; %ifile% echo ^&amp;lt;body^&gt;&lt;br /&gt;for /F "tokens=1" %%C in ('help') do (&lt;br /&gt; call :set_is_command %%C&lt;br /&gt; if "!is_command!"=="1" (&lt;br /&gt;                echo Handling: %%C&lt;br /&gt;                set cfile=%page_dir%\%%C.html&lt;br /&gt;                &gt;&gt; %ifile% echo ^&amp;lt;a href="%page_sub%\%%C.html"^&gt;%%C^&amp;lt;/a^&gt;^&amp;lt;br/^&gt;&lt;br /&gt;  :: set cfile=CON&lt;br /&gt;  &gt; !cfile! echo ^&amp;lt;html^&gt;^&amp;lt;head^&gt;^&amp;lt;title^&gt;%%C^&amp;lt;/title^&gt;^&amp;lt;/head^&gt;&lt;br /&gt;                &gt;&gt; !cfile! echo ^&amp;lt;body^&gt;^&amp;lt;h2^&gt;%%C^&amp;lt;/h2^&gt;^&amp;lt;pre^&gt;&lt;br /&gt;  for /F "delims=" %%T in ('help %%C') do (&lt;br /&gt;   set str=%%T&lt;br /&gt;                        set str=!str:…=^&amp;amp;agrave;!&lt;br /&gt;                        set str=!str:‚=^&amp;amp;eacute;!&lt;br /&gt;                        set str=!str:Š=^&amp;amp;egrave;!&lt;br /&gt;                        set str=!str:ˆ=^&amp;amp;ecirc;!&lt;br /&gt;                        set str=!str:‰=^&amp;amp;euml;!&lt;br /&gt;                        set str=!str:Œ=^&amp;amp;icirc;!&lt;br /&gt;                        set str=!str:‹=^&amp;amp;iuml;!&lt;br /&gt;                        set str=!str:“=^&amp;amp;ocirc;!&lt;br /&gt;                        set str=!str:—=^&amp;amp;ugrave;!&lt;br /&gt;                        set str=!str:–=^&amp;amp;ucirc;!&lt;br /&gt;                        set str=!str:‡=^&amp;amp;ccedil;!&lt;br /&gt;                        set str=!str:ÿ=^&amp;amp;nbsp;!&lt;br /&gt;                        &gt;&gt; !cfile! echo !str!&lt;br /&gt;  )&lt;br /&gt;                &gt;&gt; !cfile! echo ^&amp;lt;br/^&gt;^&amp;lt;br/^&gt;&lt;br /&gt;                &gt;&gt; !cfile! echo ^&amp;lt;a href="../index.html"^&gt;Back to index/Retour ^&amp;amp;agrave; l'index^&amp;lt;/a^&gt;&lt;br /&gt;  &gt;&gt; !cfile! echo ^&amp;lt;/pre^&gt;^&amp;lt;/body^&gt;^&amp;lt;/html^&gt;&lt;br /&gt; )&lt;br /&gt;)&lt;br /&gt;&gt;&gt; %ifile% echo ^&amp;lt;/body^&gt;&lt;br /&gt;&gt;&gt; %ifile% echo ^&amp;lt;/html^&gt;&lt;br /&gt;&lt;br /&gt;goto end&lt;br /&gt;&lt;br /&gt;:set_is_command&lt;br /&gt;set name=%~1&lt;br /&gt;set is_command=1&lt;br /&gt;if not "%name%"=="" (&lt;br /&gt; set num=1&lt;br /&gt; for /F "usebackq tokens=1 delims=ABCDEFGHIJKLMNOPQRSTUVWXYZ" %%W IN ('%name%') do (&lt;br /&gt;  set num=0&lt;br /&gt; )&lt;br /&gt; set is_command=!num!&lt;br /&gt;)&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:end&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So, how does it work?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;One&lt;/span&gt;&lt;br /&gt;We enable delayedexpansion. This allows us to dynamically set variables in FOR loops.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Two&lt;/span&gt;&lt;br /&gt;We prepare the output directories (mkdir). The root of the "site" is the site directory (this is where the site index will get stored). In this directory, a subdirectory is created which will hold all the pages (one for each command): the pages subdirectory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Three&lt;/span&gt;&lt;br /&gt;A loop (for /F "tokens=1" %%C in ('help')...) is used to loop through all the lines output by the help command. Each command is output starting with the command name and one or more lines of short explanations like the following example shows:&lt;br /&gt;&lt;br /&gt;VERIFY   Indique à Windows 2000 s'il doit ou non vérifier que les fichiers&lt;br /&gt;         sont écrits correctement sur un disque donné.&lt;br /&gt;&lt;br /&gt;Notice the accented characters shown in the explanation (é, à).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Four&lt;/span&gt;&lt;br /&gt;Obviously we only want to retrieve the command names (e.g. VERIFY) and nothing else. To do this we must check the first token of every line. In our case the first token will be VERIFY for the first line, and "sont" for the second line. Only the first of these two tokens is an actual command name. Fortunately, it has only uppercase letters.&lt;br /&gt;The set_is_command subroutine makes sure the is_command variable is set to 1 if the token is a command (i.e. all uppercase letters) or 0 if the token isn't (one or more lowercase letters e.g. "sont").&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Five&lt;/span&gt;&lt;br /&gt;The script will output: one file for each command (containing its detailed help information) and an index file which will reference all these command pages.&lt;br /&gt;For every command name, we:&lt;br /&gt;- create a link in the index file&lt;br /&gt;- create a file containing the detailed information (the result of help %commandname%)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Six&lt;/span&gt;&lt;br /&gt;Notice there is a strange section with a few lines like:&lt;br /&gt;set str=!str:Œ=^&amp;amp;icirc;!&lt;br /&gt;&lt;br /&gt;At first, when I tried to output the result of 'help %commandname%' to an HTML file, the accented characters got replaced by different characters. For instance: "é" was shown as ",", "è" was shown as "Š", and so on and so forth. After some Googling and much head-scratching, I came up with this.&lt;br /&gt;The idea is to replace the "bad" character with a character which will give me the desired result. Because I am working with HTML a good way to do this is to replace these accented characters with the corresponding HTML entities. Thus, é becomes &amp;amp;eacute;, à becomes &amp;amp;agrave;, etc.&lt;br /&gt;I used a simple replacement syntax set str=!str:S=R! where S represents what you're searching for and R represents the desired replacement. Neat little trick.&lt;br /&gt;&lt;br /&gt;There is a catch however. To work properly with accented characters, you need to open the batch file using EDIT (cmd &gt; EDIT). If you open the above code using EDIT you will find that "…" becomes "à", "‚" becomes "é", "Š" becomes "è", etc. Once you have finished entering the accented characters, you can then revert to notepad for instance but the characters will look "strange" (i.e. as in the example above).&lt;br /&gt;I guess you could do exactly the same with text, by typing the accented characters in notepad (for instance), then opening the file in EDIT. The notepad characters will look weird in EDIT but you can then type in EDIT the original characters to be replaced with the "weird" notepad characters using the S=R syntax. I haven't tried this but I expect it works.&lt;br /&gt;&lt;br /&gt;Well, I think that's it. I hope someone will find this useful!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2160403496189547400?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2160403496189547400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2160403496189547400&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2160403496189547400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2160403496189547400'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/using-help-to-help-yourself-part-2.html' title='Using help to help yourself (part 2): publishing batch help information in HTML format'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8658430005265832165</id><published>2008-07-30T18:03:00.004+02:00</published><updated>2008-07-30T22:07:21.824+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='help'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming: using help to help yourself</title><content type='html'>Nothing I know of can quite beat the Linux/Unix "man" pages but here's a quickie on how to use the help command from the Windows command prompt.&lt;br /&gt;&lt;br /&gt;Step 1: start the prompt (Start -&gt; Run -&gt; (type) cmd -&gt; Enter)&lt;br /&gt;&lt;br /&gt;Step 2: type help&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cmd&gt; help&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This displays a list of available batch commands.&lt;br /&gt;&lt;br /&gt;Step 3: get help on command of your choice (e.g. "FOR")&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cmd&gt; help for&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Reading all of this in black and grey is pretty tedious, so I have started on a script that will output all these command in HTML format. Run it once and it will create a folder containing:&lt;br /&gt;- an link index to all the commands&lt;br /&gt;- one page per command with the relevant details&lt;br /&gt;&lt;br /&gt;I currently have two major problems with this:&lt;br /&gt;1. Trailing "spaces": I can't seem to remove trailing spaces successfully (not even sure they really are spaces)&lt;br /&gt;[EDIT: PROBLEM 1 SOLVED, shall post code tomorrow]&lt;br /&gt;2. Accented characters: I am using French, and accented characters are output as anything but what they should be. For instance "é" is output ",", etc. and I have yet to find a full-DOS solution to this problem.&lt;br /&gt;[EDIT: PROBLEM 2 SOLVED, shall post code tomorrow]&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Any suggestions more than welcome regarding these two issues =)&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8658430005265832165?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8658430005265832165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8658430005265832165&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8658430005265832165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8658430005265832165'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-using-help-to-help.html' title='Batch programming: using help to help yourself'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3268304455963773175</id><published>2008-07-29T19:45:00.002+02:00</published><updated>2008-07-30T12:47:02.106+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file path'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='file attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='file information'/><title type='text'>Batch programming tip#15: Getting file information</title><content type='html'>This example speaks for itself I think. You can obviously also use it in FOR loops or subroutines. It show how to retrieve lots of useful information about files (in this exemple the first argument).&lt;br /&gt;&lt;br /&gt;[info.bat]&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;if [%1]==[] goto what_file&lt;br /&gt;if not exist %1 goto what_file&lt;br /&gt;goto show_info&lt;br /&gt;&lt;br /&gt;:show_info&lt;br /&gt;echo.&lt;br /&gt;echo General information&lt;br /&gt;echo -------------------&lt;br /&gt;echo Fully qualified name (%%~f1): %~f1&lt;br /&gt;echo Drive letter (%%~d1): %~d1&lt;br /&gt;echo Path (%%~p1): %~p1&lt;br /&gt;echo File name (%%~n1): %~n1&lt;br /&gt;echo File extension (%%~x1): %~x1&lt;br /&gt;echo Date time (%%~t1): %~t1&lt;br /&gt;echo Size (%%~z1): %~z1&lt;br /&gt;echo File attributes (%%~a1): %~a1&lt;br /&gt;goto show_combinations&lt;br /&gt;&lt;br /&gt;:show_combinations&lt;br /&gt;echo.&lt;br /&gt;echo Some possible combinations&lt;br /&gt;echo --------------------------&lt;br /&gt;echo Drive and path (%%~dp1): %~dp1&lt;br /&gt;echo Filename and extension (%%~nx1): %~nx1&lt;br /&gt;echo Path using short names (%%~fs1) : %~fs1&lt;br /&gt;echo.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:what_file&lt;br /&gt;echo Please provide valid file.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Simply call it using something like:&lt;br /&gt;&lt;br /&gt;[info_call.bat]&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;call info test_file_info.longext&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;These allow you to get: file size, date time, etc. Really useful stuff =D.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3268304455963773175?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3268304455963773175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3268304455963773175&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3268304455963773175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3268304455963773175'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip15-getting-file.html' title='Batch programming tip#15: Getting file information'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4530728980878123487</id><published>2008-07-28T18:16:00.003+02:00</published><updated>2008-07-28T18:16:00.937+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='cuil'/><category scheme='http://www.blogger.com/atom/ns#' term='search engine'/><title type='text'>Cuil - Search Engine</title><content type='html'>It seems to have been a long long while since any new search engine has actually surfaced on the web and made Google look anything different to Goliath (OK, I know that's a bad example because Goliath lost and Google just keeps winning :-)).&lt;br /&gt;&lt;br /&gt;But look out for this new rising star: &lt;a href="http://www.cuil.com/"&gt;http://www.cuil.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Co-founded by ex-Google employees, Cuil has already crawled more pages than the Search Engine Giant itself! With a name from the Gaelic word for Knowledge, it looks like you may not be able to ignore this site for too long!&lt;br /&gt;&lt;br /&gt;Among some of its really neat features are:&lt;br /&gt;- two or three-column presentation of search results&lt;br /&gt;- context-driven results with a drilldown feature which allows you to easily get to other pages in the same context by using an "Explore by category" link box located at the right-hand side of the screen (for instance, try typing "e-learning technologies")&lt;br /&gt;- search tabs: in some cases search tabs will appear at the top(-ish) of the page with "sub-searches" (for instance, try searching for "insects" and you will get tabs relating to "Flying insects", "Beneficial insects", "Harmful insects" and many more)&lt;br /&gt;&lt;br /&gt;Add to that an excellent FAQ, clear an meaningful explanations, cool web design, plus lots of things I probably missed, and you must be on to a winner!&lt;br /&gt;&lt;br /&gt;This afternoon (by GMT+1 standards), they were already adding capacity, with their search page sporting the message:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;We’ll be back soon...&lt;br /&gt;Due to overwhelming interest, our Cuil servers are running a bit hot right now. The search engine is momentarily unavailable as we add more capacity.&lt;br /&gt;Thanks for your patience.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;It's a hit! =D&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What do you think? Can Cuil unsettle Google on the search engine market?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4530728980878123487?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4530728980878123487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4530728980878123487&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4530728980878123487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4530728980878123487'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/cuil-search-engine.html' title='Cuil - Search Engine'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5588952371990029682</id><published>2008-07-27T18:38:00.002+02:00</published><updated>2008-07-27T21:53:02.771+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comments'/><category scheme='http://www.blogger.com/atom/ns#' term='REM'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='remarks'/><category scheme='http://www.blogger.com/atom/ns#' term='::'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#14: The difference between :: and REM</title><content type='html'>Both REM and :: are commonly used to "comment out" a line in batch files, so what's the difference between them?&lt;br /&gt;&lt;br /&gt;REM is the true "Remark" command. In other words it is treated as such and interpreted.&lt;br /&gt;&lt;br /&gt;::, on the other hand, is an invalid label (a label starts with a colon) and is therefore simply skipped.&lt;br /&gt;&lt;br /&gt;What this means is using REM is slower than using :: because :: means the line is skipped and the next is interpreted whereas with REM the line isn't skipped in the first place.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5588952371990029682?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5588952371990029682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5588952371990029682&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5588952371990029682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5588952371990029682'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip14-difference.html' title='Batch programming tip#14: The difference between :: and REM'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8195842259825294433</id><published>2008-07-25T22:52:00.004+02:00</published><updated>2008-07-25T22:52:02.142+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='enabledelayedexpansion'/><category scheme='http://www.blogger.com/atom/ns#' term='delayed expansion'/><category scheme='http://www.blogger.com/atom/ns#' term='setlocal'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='substring'/><category scheme='http://www.blogger.com/atom/ns#' term='exclamation'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='nested variables'/><title type='text'>Batch programming tip#13: Using setlocal enabledelayedexpansion</title><content type='html'>Delayed expansion is pretty tricky to explain. It basically means you are making sure that your variable is evaluated as many times as necessary and not just once (as would normally be the case).&lt;br /&gt;&lt;br /&gt;The typical use for this is when using a "for" command. Without delayed expansion, variables do not appear to get set correctly. Why? Because they are evaluated once for the for command (rather than each time you loop) which results in apparently strange behaviour.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;set num=0&lt;br /&gt;for /l %%N IN (1,1,9) do (&lt;br /&gt; echo %num%&lt;br /&gt; set /a num=%num%+1&lt;br /&gt;)&lt;br /&gt;goto show_result&lt;br /&gt;&lt;br /&gt;:show_result&lt;br /&gt;echo Num is actually now worth: %num%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The &lt;span style="font-style:italic;"&gt;for /l %%N IN (1,1,9) do&lt;/span&gt; command basically creates a loop from 1 to 9 with a step of 1 (so nine passes).&lt;br /&gt;Anyhow, anyone would go crazy trying to debug this thing: it outputs nine zeros and a total worth of 1!&lt;br /&gt;&lt;br /&gt;Enter delayed expansion however and things get back to normal:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_sys&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;setlocal enabledelayedexpansion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;set num=0&lt;br /&gt;for /l %%N IN (1,1,9) do (&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; echo !num!&lt;br /&gt; set /a num=!num!+1&lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;goto show_result&lt;br /&gt;&lt;br /&gt;:show_result&lt;br /&gt;echo Num is actually now worth: %num%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Notice we use the exclamation mark instead of % to reference variables within the for loop. This makes sure the variable is reassessed every time we use it.&lt;br /&gt;&lt;br /&gt;I have written a short example below with a loop inside a loop. It loops through a sentence and shows every word separately using a call to an appropriate subroutine.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_sys&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set text=The quick brown fox jumps over the lazy dog&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Displaying text using %%: %text%&lt;br /&gt;echo Displaying text using ^^!: !text!&lt;br /&gt;&lt;br /&gt;for /l %%N IN (1,1,9) do (&lt;br /&gt; call :get_substr %%N "%text%"&lt;br /&gt; echo Token: !strtok!&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:get_substr&lt;br /&gt;set token=%~1&lt;br /&gt;set string=%~2&lt;br /&gt;&lt;br /&gt;for /F "usebackq tokens=%token% delims= " %%w in ('!string!') do (&lt;br /&gt; set strtok=%%w&lt;br /&gt;)&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Note that if you don't use the delayed expansion properly (e.g. in the second for loop: '!string!') all hell will break loose... I know because I tried :D&lt;br /&gt;&lt;br /&gt;The second use of delayed expansion is to nest variables like so:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_sys&lt;br /&gt;setlocal enabledelayedexpansion&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set text=The quick brown fox jumps over the lazy dog&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;for /l %%N IN (1,1,9) do (&lt;br /&gt; call :getchars %%N&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:getchars&lt;br /&gt;set num=%~1&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;echo !text:~0,%num%!&lt;/span&gt;&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;What this script does is successively retrieves N (N being 1 to 9) number of characters from our sentence "The quick brown fox jumps over the lazy dog".&lt;br /&gt;To do this we nest the %num% variable in our "substring" notation:&lt;br /&gt;!text:~0,%num%!&lt;br /&gt;&lt;br /&gt;Cool.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8195842259825294433?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8195842259825294433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8195842259825294433&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8195842259825294433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8195842259825294433'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip13-using-setlocal.html' title='Batch programming tip#13: Using setlocal enabledelayedexpansion'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7610138771259901962</id><published>2008-07-20T18:24:00.001+02:00</published><updated>2008-07-20T18:24:00.429+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='timestamp'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='substring'/><category scheme='http://www.blogger.com/atom/ns#' term='%date%'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='%time%'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#12: Creating a timestamp</title><content type='html'>Now we can substring, creating a timestamp is really easy.&lt;br /&gt;&lt;br /&gt;This is one simple way of doing this using the %date% and %time% system variables to create timestamped files.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:create_file&lt;br /&gt;call :get_timestamp&lt;br /&gt;type NUL &gt; %timestamp%.file&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:get_timestamp&lt;br /&gt;set d_stamp=%date:~11%%date:~8,2%%date:~5,2%&lt;br /&gt;set t_stamp=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9%&lt;br /&gt;set timestamp=%d_stamp%%t_stamp%&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;(We reverse year, month and day so that the files are naturally sorted in the 'right' order.)&lt;br /&gt;&lt;br /&gt;The create_file section retrieves the timestamp (e.g. 2008071719410698) created by the get_timestamp subroutine and uses it to create an empty file. Obviously this can have multiple uses like timestamping log information for instance.&lt;br /&gt;&lt;br /&gt;(Note: day and month probably appear in a different order according to sytem locale.)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7610138771259901962?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7610138771259901962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7610138771259901962&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7610138771259901962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7610138771259901962'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip12-creating.html' title='Batch programming tip#12: Creating a timestamp'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-9156030141763125269</id><published>2008-07-19T18:04:00.005+02:00</published><updated>2008-07-19T18:04:00.607+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='substring'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Batch programming tip#11: Using The Substring Equivalent</title><content type='html'>As you know, most (all?) programming languages provide a substring() method of some sort which allows you to retrieve part of a string variable.&lt;br /&gt;&lt;br /&gt;To do this in batch you can use the following syntax: &lt;br /&gt;%var:~start% or &lt;br /&gt;%var:~start,length% &lt;br /&gt;where start is the index of the first character to retrieve (the first character in a string is indexed 0) and length is the length of the substring to retrieve. If no length is given the whole remaining string is shown.&lt;br /&gt;&lt;br /&gt;In this example, we use a system variable %date% which holds the current system date and then echo the current system month and year.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:get_year&lt;br /&gt;echo System date: %date%&lt;br /&gt;echo System month: %date:~8,2%&lt;br /&gt;echo System year: %date:~11%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also use this method 'backwards'. Assume we didn't know the length of the %date% variable string, and wanted to retrieve the four last characters which represent the year. &lt;br /&gt;We could then use the following syntax: &lt;span style="font-weight:bold;"&gt;%date:~-4%&lt;/span&gt; with a minus preceding the 4. This moves us back 4 characters from the end of the string, then (because no length has been specified) returns all the remainder until the end of the string. This is equivalent to: %date:~-4,4%&lt;br /&gt;&lt;br /&gt;The drawback here is you cannot dynamically set the 'start' and 'length'. For this we need to use delayed expansion, which I'll get back to in a later post!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Until then, thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-9156030141763125269?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/9156030141763125269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=9156030141763125269&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9156030141763125269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9156030141763125269'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip11-using-substring.html' title='Batch programming tip#11: Using The Substring Equivalent'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-513521052811725410</id><published>2008-07-18T18:46:00.002+02:00</published><updated>2008-07-22T23:03:24.363+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='arguments'/><category scheme='http://www.blogger.com/atom/ns#' term='subroutine'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='sub'/><title type='text'>Batch Programming Tip#10: Making and calling a subroutine (part 2)</title><content type='html'>Let's see how can pass arguments to our get_date subroutine to change date format. For instance, we will be able to choose whether the day or month comes first in our output string and which separator (if any) we wish to use.&lt;br /&gt;Beware that &lt;i&gt;date /T&lt;/i&gt; is probably locale dependent. On my system the date is output in the following format 'day. dd/mm/yyyy' e.g. mon. 14/07/2008&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:show_date&lt;br /&gt;call :get_date / 0 1&lt;br /&gt;echo Date: %_date%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:get_date&lt;br /&gt;set delim=%~1&lt;br /&gt;set order=%~2&lt;br /&gt;set show_day=%~3&lt;br /&gt;&lt;br /&gt;echo delim=%delim% and order=%order% and show_day=%show_day%&lt;br /&gt;&lt;br /&gt;for /F "tokens=1,2,3,4 delims=/ " %%d in ('date /T') do (&lt;br /&gt; set day=%%d&lt;br /&gt; set dd=%%e&lt;br /&gt; set mm=%%f&lt;br /&gt; set yyyy=%%g&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;set _date=%dd%%delim%%mm%%delim%%yyyy%&lt;br /&gt;if "%order%"=="1" set _date=%mm%%delim%%dd%%delim%%yyyy%&lt;br /&gt;if "%show_day%"=="1" set _date=%day% %_date%&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The get_date subroutine has changed considerably.&lt;br /&gt;&lt;br /&gt;First, we get three possible arguments: delimiter, order (either day/month or month/day) and show_day (whether or not to show the day: 'mon.' for instance). You retrieve the arguments in the same way as you would for batch command-line arguments (using %~1, etc.).&lt;br /&gt;&lt;br /&gt;These arguments are appended to the call to the subroutine: call :get_date &lt;b&gt;/ 0 1&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Second, we split the date string into four parts day (mon.), dd (14), mm (07), yyyy (2008). &lt;br /&gt;&lt;br /&gt;Finally, we build the %_date% variable while taking into account the various arguments. If %order% is set to 1 we reverse dd and mm order. If show_day is set to 1, we prefix the date with the day.&lt;br /&gt;&lt;br /&gt;That's it.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-513521052811725410?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/513521052811725410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=513521052811725410&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/513521052811725410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/513521052811725410'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip10-making-and_18.html' title='Batch Programming Tip#10: Making and calling a subroutine (part 2)'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1429519225347263317</id><published>2008-07-17T18:41:00.000+02:00</published><updated>2008-07-17T18:41:00.929+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='subroutine'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='sub'/><title type='text'>Batch Programming Tip#10: Making and calling a subroutine (part 1)</title><content type='html'>It looks like quite a few people are wondering how to write a subroutine, and how to pass it arguments. So let's write a small subroutine. You can't actually 'return' a value from the subroutine in the usual sense of the term. You can however set one or more variables within the subroutine which can then be used by the caller.&lt;br /&gt;&lt;br /&gt;Let's imagine we need to write a subroutine that will retrieve the current date for us.&lt;br /&gt;&lt;br /&gt;Let's start our batch by writing the following subroutine which will compute the date and store it in the %_date% variable.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:get_date&lt;br /&gt;for /F "tokens=2 delims= " %%d in ('date /T') do (&lt;br /&gt; set _date=%%d&lt;br /&gt;)&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;What happens here is a slightly more complex &lt;i&gt;for /F&lt;/i&gt; construct than we saw previously.&lt;br /&gt;&lt;i&gt;date /T&lt;/i&gt; outputs the current date, for instance as follows: mon. 14/07/2008&lt;br /&gt;The &lt;i&gt;for&lt;/i&gt; construct then effectively splits the string using the space character as the delimiter (this will leave us with 2 tokens: 'mon.' and '14/07/2008' but without the quotes). It then takes the second token (tokens=2) which is stored in %%d. Neat!&lt;br /&gt;&lt;br /&gt;Obviously, if you run this script 'as-is', you won't actually 'see' anything happen, although the script will have computed the 'date' and stored it in the %_date% variable.&lt;br /&gt;&lt;br /&gt;I do have an inkling that date format varies according to system locale. For instance you may find that on some systems you will output day/month/year and on others month/day/year according to your country/language settings.&lt;br /&gt;&lt;br /&gt;Right, now let's add in some script to call the subroutine.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:show_date&lt;br /&gt;call :get_date&lt;br /&gt;echo Date: %_date%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:get_date&lt;br /&gt;for /F "tokens=2 delims= " %%d in ('date /T') do (&lt;br /&gt; set _date=%%d&lt;br /&gt;)&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Calling the subroutine is done in much the same way as calling an external batch but with an extra colon: &lt;i&gt;call :get_date&lt;/i&gt;. This sets the %_date% variable which can then be shown from within the calling routine.&lt;br /&gt;&lt;br /&gt;Note the importance of the 'goto blackhole' instruction at the end of the subroutine, this is what makes you 'return' to the calling code. You can alternatively use goto:EOF or goto :EOF. (Note that this is NOT the same as &lt;i&gt;goto eof&lt;/i&gt; without the colon, which leads to the "Press any key" section of this script.)&lt;br /&gt;&lt;br /&gt;One way to improve our subroutine would be to add arguments to allow for various date formats.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1429519225347263317?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1429519225347263317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1429519225347263317&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1429519225347263317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1429519225347263317'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip10-making-and.html' title='Batch Programming Tip#10: Making and calling a subroutine (part 1)'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-362215298292308260</id><published>2008-07-16T18:43:00.005+02:00</published><updated>2008-07-16T18:43:01.740+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loop'/><category scheme='http://www.blogger.com/atom/ns#' term='current directory'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><category scheme='http://www.blogger.com/atom/ns#' term='directories'/><title type='text'>Batch programming tip#09: Using FOR /D</title><content type='html'>This is a basic variation of the for loop. Add the /D modifier to loop through directories.&lt;br /&gt;&lt;br /&gt;The following script shows all the subdirectories of the current directory (the directory the batch is running from).&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;for /D %%l in (*) do (&lt;br /&gt; echo Directory: %%l&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Let's simply list all directories and all files in those directories:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;for /D %%l in (*) do (&lt;br /&gt; echo Directory: %%l&lt;br /&gt; cd %~dp0\%%l&lt;br /&gt; for %%f in (*.*) do (&lt;br /&gt;  echo File: %%f&lt;br /&gt; )&lt;br /&gt; &lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Well, that's it for now.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-362215298292308260?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/362215298292308260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=362215298292308260&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/362215298292308260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/362215298292308260'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip09-using-for-d.html' title='Batch programming tip#09: Using FOR /D'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8312174147057324635</id><published>2008-07-15T18:03:00.008+02:00</published><updated>2008-07-15T21:07:33.105+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='for ... in (...) do'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='read'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='line'/><category scheme='http://www.blogger.com/atom/ns#' term='delims'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#08 (part 3): Reading from a file - Looping</title><content type='html'>This post will bring an end (I think) to this thread about file reading using batch.&lt;br /&gt;&lt;br /&gt;To use the loop command on a file we simply add &lt;i&gt;/F&lt;/i&gt; in our FOR loop construct like so:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;if exist file1.txt goto action&lt;br /&gt;echo Oops. file1.txt doesn't exist. Please create it or change file name.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;for /F %%l in (file1.txt) do (&lt;br /&gt; echo Content: %%l&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will probably work with most configuration files you might use. There is one additional parameter that's really useful though, especially if your lines contain spaces. The FOR loop will by default only return the first token up to a delimiter character. The default delimiter characters are space and tab. This means the script above will only return the first word of any line containing spaces.&lt;br /&gt;&lt;br /&gt;To avoid this (usually unwanted) behaviour, use the &lt;i&gt;delims&lt;/i&gt; parameter and set it to empty as in the following code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;if exist file1.txt goto action&lt;br /&gt;echo Oops. file1.txt doesn't exist. Please create it or change file name.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;for /F "delims=" %%l in (file1.txt) do (&lt;br /&gt; echo Content: %%l&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notice how we have added to our for construct:&lt;br /&gt;&lt;i&gt;for /F "delims=" %%l in (file1.txt) do&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;You can set &lt;em&gt;"delims="&lt;/em&gt; to whatever you want in effect, you could for instance use comma instead: "delims=,".&lt;br /&gt;&lt;br /&gt;Well, I think that's it, you can of course take file reading much further if you want. In that case, you might want to check Rob van der Woude's comprehensive page about &lt;a href="http://www.robvanderwoude.com/ntfor.html"&gt;NT FOR syntax&lt;/a&gt;. Enjoy!&lt;br /&gt;&lt;br /&gt;More shortly about how to loop through directories.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8312174147057324635?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8312174147057324635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8312174147057324635&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8312174147057324635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8312174147057324635'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-part-3-reading.html' title='Batch programming tip#08 (part 3): Reading from a file - Looping'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8167474522976149488</id><published>2008-07-14T18:01:00.003+02:00</published><updated>2008-07-14T18:01:00.223+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='for ... in (...) do'/><category scheme='http://www.blogger.com/atom/ns#' term='loop'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='read'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#08 (part 2): Reading from a file - Looping</title><content type='html'>So, let's see how we can loop through information.&lt;br /&gt;The following script is the same as the previous but I have added a loop construct which will loop through our file_content variable (the first line of the file).&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;if exist file1.txt goto action&lt;br /&gt;echo Oops. file1.txt doesn't exist. Please create it or change file name.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;set /P file_content=&amp;lt;file1.txt&lt;br /&gt;for %%l in (%file_content%) do (&lt;br /&gt; echo Content: %%l&lt;br /&gt;)&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The loop construct is simple: for %%varname in (%var%) do ( ..[action]..)&lt;br /&gt;The parentheses around the %var% are not in there just for form, you really need to remember them or your batch will crash.&lt;br /&gt;&lt;br /&gt;To test it try using a file that contains a first line with spaces in it (e.g. The quick brown fox jumps over the lazy dog) and you will see that each word of the first line of the file will appear on a line of its own.&lt;br /&gt;&lt;br /&gt;Excellent, the next step will be to loop through all the lines in a file.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8167474522976149488?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8167474522976149488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8167474522976149488&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8167474522976149488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8167474522976149488'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-part-2-reading.html' title='Batch programming tip#08 (part 2): Reading from a file - Looping'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1286820974820952483</id><published>2008-07-13T18:35:00.007+02:00</published><updated>2008-07-13T18:35:00.319+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='read'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='set /P'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#08: Reading from a file</title><content type='html'>Reading from file can sometimes be really useful. For example, you could imagine one process was to output lots of file names to a given file (let's call it file1.txt) and then that our batch would jump in there and retrieve those file names and print up whatever is in them (obviously in a real-world case scenario, you would want to handle the files and do something with them, e.g. archive them to a different location or whatever).&lt;br /&gt;&lt;br /&gt;To read content from a file, we set a variable using /P and the &amp;lt; sign after the usual = sign.&lt;br /&gt;&lt;br /&gt;The following code does this.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set /P file_content=&amp;lt;file1.txt&lt;br /&gt;goto action&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo File content: %file_content%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Note that if file1.txt doesn't exist an error message will show and the variable %file_content% will be empty.&lt;br /&gt;&lt;br /&gt;Hey presto, we got something out of the file. This is great... except: we are only getting hold of the first line.&lt;br /&gt;&lt;br /&gt;In the two following posts, I will explain the loop construct and how to use it to read all the lines from the file.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts in the meantime?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1286820974820952483?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1286820974820952483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1286820974820952483&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1286820974820952483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1286820974820952483'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip08-reading-from.html' title='Batch programming tip#08: Reading from a file'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4716603002308582514</id><published>2008-07-12T18:16:00.004+02:00</published><updated>2008-07-13T13:58:56.950+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comparing file sizes'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='argument'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch tip#07 part 2: comparing files by size</title><content type='html'>Now we have seen how to retrieve the length of a file passed as argument, let's see how we can use this.&lt;br /&gt;&lt;br /&gt;The code below does the following:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Command-line check&lt;/strong&gt;&lt;br /&gt;The process checks for command-line arguments. It expects two existing files otherwise shows an error. &lt;br /&gt;To check whether a file exists, simply use &lt;i&gt;if exist %file%&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Compare sizes&lt;/strong&gt;&lt;br /&gt;The batch retrieves and compares argument file sizes. To do this we use &lt;em&gt;%~z1&lt;/em&gt; and &lt;em&gt;%~z2&lt;/em&gt; which return the file sizes of command line arguments 1 and 2 respectively.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Take action&lt;/strong&gt;&lt;br /&gt;Finally, it outputs an adequate message. This is obviously the bit where you should include appropriate actions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:param_check&lt;br /&gt;if "" == "%1" goto invalid_call&lt;br /&gt;if "" == "%2" goto invalid_call&lt;br /&gt;goto file_one&lt;br /&gt;&lt;br /&gt;:file_one&lt;br /&gt;if exist %1 goto file_two&lt;br /&gt;set file_path=%1&lt;br /&gt;goto show_error&lt;br /&gt;&lt;br /&gt;:file_two&lt;br /&gt;if exist %2 goto run_content&lt;br /&gt;set file_path=%2&lt;br /&gt;goto show_error&lt;br /&gt;&lt;br /&gt;:run_content&lt;br /&gt;if %~z1==%~z2 goto same_size&lt;br /&gt;if %~z1 LSS %~z2 goto first_smaller&lt;br /&gt;goto second_smaller&lt;br /&gt;&lt;br /&gt;:same_size&lt;br /&gt;echo Both files are of same size.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:first_smaller&lt;br /&gt;echo %1 is smaller than %2&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:second_smaller&lt;br /&gt;echo %2 is smaller than %1&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:show_error&lt;br /&gt;echo File not found: "%file_path%"&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:invalid_call&lt;br /&gt;echo Please call with the following parameters:&lt;br /&gt;echo [1] the first file name&lt;br /&gt;echo [2] the second file name&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to close window...&lt;br /&gt;pause &gt; nul&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To run this, simply use a second .bat file containing something like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;call comp_files file1.txt file2.txt&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Where file1.txt and file2.txt are replaced with the relative or absolute paths of the files your are comparing.&lt;br /&gt;&lt;br /&gt;Simple as that!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4716603002308582514?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4716603002308582514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4716603002308582514&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4716603002308582514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4716603002308582514'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-tip07-part-2-comparing-files-by.html' title='Batch tip#07 part 2: comparing files by size'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-6378945551397408304</id><published>2008-07-11T18:46:00.008+02:00</published><updated>2008-07-11T20:46:38.368+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DNS'/><category scheme='http://www.blogger.com/atom/ns#' term='DNS checker'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='Kaminsky'/><category scheme='http://www.blogger.com/atom/ns#' term='doxpara'/><title type='text'>The DNS uproar</title><content type='html'>As you probably already know, security researcher Dan Kaminsky (and his team I believe) recently reported a DNS vulnerability affecting most DNS servers world-wide. They have also released patches for all platforms before actually revealing details about the vulnerability. In fact, they are leaving people the time to upgrade their systems, before giving us any of the secret facts.&lt;br /&gt;&lt;br /&gt;And it doesn't stop there! If you check out the Doxpara research site (at: &lt;a href="http://www.doxpara.com"&gt;http://www.doxpara.com&lt;/a&gt;), you will find an online DNS checker which will tell you whether your DNS server seems safe or not.&lt;br /&gt;&lt;br /&gt;If you are like me your DNS requests might get routed to one of several DNS servers, so this can require several online "tests".&lt;br /&gt;&lt;br /&gt;Some people seem to be having issues with ZoneAlarm (as reported by &lt;a href="http://blogs.zdnet.com/security/?p=1471"&gt;Nathan McFeters at ZDnet&lt;/a&gt;) but it seems workarounds are already available. So this really does seem minor to me.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Will this start to pave the way to responsible hack disclosures?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-6378945551397408304?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/6378945551397408304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=6378945551397408304&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6378945551397408304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6378945551397408304'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/dns-uproar.html' title='The DNS uproar'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-6621284234117355784</id><published>2008-07-10T18:43:00.000+02:00</published><updated>2008-07-10T18:43:00.613+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='%~z0'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='file size'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#07: Retrieving argument filesize</title><content type='html'>Imagine you are using a file as argument (this can also be %0 of course) and you would like to know the file's size in bytes.&lt;br /&gt;&lt;br /&gt;This is an example of how to do this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo File size of currently running batch file: %~z0&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Using %~z0 retrieves the file size of the currently running batch which should be 164 (unless of course you  have added in or removed extra line breaks, comments, etc.)&lt;br /&gt;&lt;br /&gt;One reason to use file size would be, for instance, you might want a batch to once use a given configuration file, but then use another the next time, and then to switch back to the first the time after that. If these configuration files are definitely of different size, you can use file size to operate the swap.&lt;br /&gt;&lt;br /&gt;Voilà!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-6621284234117355784?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/6621284234117355784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=6621284234117355784&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6621284234117355784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6621284234117355784'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip07-retrieving.html' title='Batch programming tip#07: Retrieving argument filesize'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-848685359899090074</id><published>2008-07-09T18:07:00.001+02:00</published><updated>2008-07-09T18:07:00.466+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Belgium'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Europe'/><category scheme='http://www.blogger.com/atom/ns#' term='price'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><category scheme='http://www.blogger.com/atom/ns#' term='3G'/><title type='text'>Are you ready for iPhone 3G?</title><content type='html'>Here it comes, the iPhone 3G is finally being launched in the remaining European countries!! &lt;br /&gt;&lt;br /&gt;In Belgium, specific legislation means it cannot be sold exclusively.&lt;br /&gt;But at a selling price of a whopping 525 to 615 euro (!), approximately 4 times the US price, will the Belgians be ready for it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-848685359899090074?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/848685359899090074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=848685359899090074&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/848685359899090074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/848685359899090074'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/are-you-ready-for-iphone-3g.html' title='Are you ready for iPhone 3G?'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5701067896574519298</id><published>2008-07-08T18:27:00.006+02:00</published><updated>2008-07-11T17:02:20.251+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='blogging'/><category scheme='http://www.blogger.com/atom/ns#' term='label'/><category scheme='http://www.blogger.com/atom/ns#' term='schedule'/><title type='text'>Blogger Quicklist - Making a blog "work"</title><content type='html'>Blogging - and bloggers - have got me thinking about how to make a blog 'work'. I have had several blogs, and although lots of energy, time and effort can ensure some readership it's very difficult to keep a blog going in the long-run.&lt;br /&gt;&lt;br /&gt;So, here are a few things that seem important to me:&lt;br /&gt;1. Use a main thread in your blog e.g. write about your work OR write about your private life OR write about a particular passion and anything related OR ... but don't mix them up in the same blog (or only do so rarely, e.g. explain you haven't posted for a week because you have been on holiday, that sort of thing);&lt;br /&gt;2. Don't post just to post, if inspiration gets low, just let it go for a while&lt;br /&gt;3. Choose a good blog title, only use your name if you are already a well-known blogger figure&lt;br /&gt;4. Go crazy with labels, use lots of them&lt;br /&gt;5. Use blogger's label list (and/or &lt;a href="http://elinorhurst.blogspot.com/2008/07/label-cloud.html"&gt;turn it into a label cloud)&lt;/a&gt;&lt;br /&gt;6. Use the post options to automatically schedule post publication (for instance, it may be easier to write several posts at the week-end and schedule them to be published during the week) - this way users don't get overloaded with new posts to read, and you don't feel obligated to write more during the week.&lt;br /&gt;7. Don't let posts get too lengthy&lt;br /&gt;&lt;br /&gt;Well, there must be lots of other obvious guidelines which I didn't mention here. But I guess it's a start! I can't really talk about how to increase blog participation (e.g. comments, emails, etc.) as I have a very low participative rate on this blog. But one of the tricks is to ask questions every time you end a post like so:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What 'guidelines' do you follow to make your blog successful?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5701067896574519298?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5701067896574519298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5701067896574519298&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5701067896574519298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5701067896574519298'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/blogger-quicklist-making-blog-work.html' title='Blogger Quicklist - Making a blog &quot;work&quot;'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5054783765008048356</id><published>2008-07-06T09:23:00.000+02:00</published><updated>2008-07-06T09:23:00.896+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file path'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='run path'/><category scheme='http://www.blogger.com/atom/ns#' term='%~dp0'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch programming tip#06: Getting the batch file path</title><content type='html'>Ok. Well, it's been a while since I posted anything to do with actual programming, and I have missed it. So here goes with the next batch programming trick planned: how to retrieve the batch file path. That is: the path where the batch file being run is located.&lt;br /&gt;&lt;br /&gt;This is a dead easy variable: %~dp0. We'll get back to what this sequence actually means in a later post but you will notice how much it looks like the argument 0 (%0 or %~0 in this case) I mentioned in an earlier post. It's just had a couple of characters added in (dp).&lt;br /&gt;&lt;br /&gt;So, now for a simple echo example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Current batch run path: %~dp0&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This looks too simple to actually be of any use but actually using the current run path can be very handy if you store configuration or content files in the same directory as your batch file (or a subdirectory thereof)!&lt;br /&gt;&lt;br /&gt;More about that soon.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5054783765008048356?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5054783765008048356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5054783765008048356&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5054783765008048356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5054783765008048356'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/batch-programming-tip06-getting-batch.html' title='Batch programming tip#06: Getting the batch file path'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-9084606991680363719</id><published>2008-07-05T15:26:00.007+02:00</published><updated>2008-07-05T22:41:12.945+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swf'/><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='crawl'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='search engine'/><category scheme='http://www.blogger.com/atom/ns#' term='rich internet application'/><title type='text'>Increasing Flash searchability</title><content type='html'>One of the main concerns when building a website (blogs, wikis, ... included) is of course to make sure all data on it is readily available. Which basically means the search engines need to be able to crawl the data in a way that makes it possible to extract content and relevant keywords.&lt;br /&gt;&lt;br /&gt;If you're using plain HTML for instance, this is pretty easy.&lt;br /&gt;&lt;br /&gt;It does get more complicated if you're using Flash but that may be about to change.&lt;br /&gt;The following article (dated: 2006) describes what you can do (or had to do in the past) to make sure your Flash-enabled website pages get (got) the correct (or increased) search rankings:&lt;br /&gt;&lt;a href="http://www.adobe.com/devnet/flash/articles/flash_searchability.html"&gt;http://www.adobe.com/devnet/flash/articles/flash_searchability.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, there have been several reports this week that Google, Yahoo and Adobe are teaming up to make Flash (SWF) files easier to crawl in-depth - more like an HTML page crawl basically.&lt;br /&gt;&lt;br /&gt;In &lt;a href="http://www.eweek.com/c/a/Enterprise-Apps/Adobe-Teams-with-Google-Yahoo-for-Flash-Search"&gt;eWeek's article&lt;/a&gt;, Bill Hunt (president of Global Strategies International) is quoted as saying:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;[The most significant aspect of the announcement] "is that this is not a change the site owners have to implement but that Google, and soon Yahoo, have this baked into their crawl systems and can interact with the SWF format just as a visitor to the site would, allowing them to get deep into the content discovering links and content that have previously been hidden from search engines."&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This is a win-win-win situation where both the search engines and Adobe will benefit from an enhanced user experience (thus the third 'win'). And Adobe will subsequently be edging nearer to a position where it could claim to be more than a de facto standard for rich internet applications.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;So, will this make the RIA era boom? And should Adobe Flash applications become an official web standard?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-9084606991680363719?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/9084606991680363719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=9084606991680363719&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9084606991680363719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/9084606991680363719'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/increasing-flash-searchability.html' title='Increasing Flash searchability'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7368079859220706149</id><published>2008-07-05T11:33:00.006+02:00</published><updated>2008-07-05T15:20:51.890+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet Explorer'/><category scheme='http://www.blogger.com/atom/ns#' term='automated updates'/><category scheme='http://www.blogger.com/atom/ns#' term='XP SP2'/><category scheme='http://www.blogger.com/atom/ns#' term='XP'/><category scheme='http://www.blogger.com/atom/ns#' term='IE7'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='Safari'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='IE6'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Browser Security</title><content type='html'>Ryan Naraine discussed a recent study about browser security in a &lt;a href="http://blogs.zdnet.com/security/?p=1384&amp;tag=nl.e539"&gt;recent article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Before we start let's point out the following:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;The entire report is a valuable read on the state of browser security but, as Brian Krebs points out, the conclusions should be considered conservative since it does not include information on vulnerable plugins (think Flash Player, Adobe Reader, Java, QuickTime, etc).  Also, bear in mind that these numbers only represent Google users. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;So we're really talking specifically about the browser applications and not the browsing experience as a whole.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;We discovered that at most 83.3% of Firefox users, 65.3% of Safari users, 56.1% of Opera users, and 47.6% of Internet Explorer users were using the latest most secure browser version on any day between January 2007 to June 2008. For the latest version analysis of Safari, we only considered the date range Dec 2007 to June 2008, when Safari version 3 became widespread.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;I suspect Internet Explorer's surprisingly bad results are due to poor adoption of the browser's latest version IE7. And this will be linked to:&lt;br /&gt;- people who can't upgrade to IE7 because their system requirements cannot be met (e.g. anyone running Win2000);&lt;br /&gt;- people who won't upgrade to IE7 because they found it changes their browsing experience too much (e.g. too different from the user perspective: tabs, new menus, etc. and/or technical issues: breaks current web-based applications which need to be upgraded to ensure IE7 compatibility).&lt;br /&gt;&lt;br /&gt;I must say of late Microsoft upgrades have entailed lots of extra unexpected technical work. Just think back to XP SP2 (a real pain in the neck). These new systems require security tweaking everytime - it's no wonder companys and users are slowly changing their ways and going for backward-compatible and standard compliant systems.&lt;br /&gt;&lt;br /&gt;And it makes me wonder. Should large corporations be allowed to make application upgrades which will affect everyone actually developing anything for use with said application? Aren't systems today being designed to be so secure at the user's expense, making them difficult to use? Is it not actually counterproductive if users just get annoyed and frustrated with over-secure systems (esp. as these systems are still vulnerable to attacks anyway)?&lt;br /&gt;&lt;br /&gt;Perhaps we should just turn to some form of mandatory training about the risks posed by accessing the Internet, how to reduce these risks and how to recognize certain types of attacks/infections, and how to check systems for known infections.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;What do you think?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7368079859220706149?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7368079859220706149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7368079859220706149&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7368079859220706149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7368079859220706149'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/browser-security.html' title='Browser Security'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8058917210897898776</id><published>2008-07-01T20:56:00.005+02:00</published><updated>2008-07-01T21:02:59.289+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='label'/><title type='text'>Label cloud</title><content type='html'>I am probably centuries late on this one but I simply have to share.&lt;br /&gt;I had never payed much attention but when I came across &lt;a href="http://acedar.blogspot.com/"&gt;http://acedar.blogspot.com/&lt;/a&gt; and saw the label cloud I just had to investigate.&lt;br /&gt;It hardly took any effort at all, simply check out:&lt;br /&gt;&lt;a href="http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html"&gt;http://phy3blog.googlepages.com/Beta-Blogger-Label-Cloud.html&lt;/a&gt;&lt;br /&gt;and "build" your own label cloud within minutes.&lt;br /&gt;&lt;br /&gt;The best effect is achieved by simply leaving the labels in alphabetical order, this ensures a nice mix of larger/smaller lettering.&lt;br /&gt;&lt;br /&gt;The beauty in the blogger widgets is you can change them (i.e. via the HTML code interface), and then still move them about (via the layout interface) without losing your own changes. Great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8058917210897898776?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8058917210897898776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8058917210897898776&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8058917210897898776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8058917210897898776'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/07/label-cloud.html' title='Label cloud'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3343136758533849318</id><published>2008-06-19T07:54:00.005+02:00</published><updated>2008-06-19T15:51:43.693+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Belgium'/><category scheme='http://www.blogger.com/atom/ns#' term='world map'/><category scheme='http://www.blogger.com/atom/ns#' term='world record'/><category scheme='http://www.blogger.com/atom/ns#' term='UK'/><category scheme='http://www.blogger.com/atom/ns#' term='guiness record'/><category scheme='http://www.blogger.com/atom/ns#' term='Republic of Ireland'/><category scheme='http://www.blogger.com/atom/ns#' term='number'/><category scheme='http://www.blogger.com/atom/ns#' term='participation'/><category scheme='http://www.blogger.com/atom/ns#' term='download day'/><category scheme='http://www.blogger.com/atom/ns#' term='Russia'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox sets the World Record</title><content type='html'>I have been checking out the Firefox map of its World Record attempt at:&lt;br /&gt;&lt;a href="http://www.spreadfirefox.com/en-US/worldrecord"&gt;http://www.spreadfirefox.com/en-US/worldrecord&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The map is obviously a pretty good indicator of technology acceptance in the various countries with North America and Western Europe hitting the top notches and Africa, South America, and Asia being less well served. I do feel it's a shame that the results aren't also computed in relation to the actual population of each country though.&lt;br /&gt;&lt;br /&gt;For instance, France and Spain both downloaded more copies (well above 300,000) compared to Russia where "only" around 130,000 downloads occurred. Yet Russia appears dark red. And a country like Belgium appears in orange.&lt;br /&gt;&lt;br /&gt;Let's compare some numbers to show where I am coming from.&lt;br /&gt;&lt;br /&gt;Wikipedia tells us Russia's population in 2008 is around: 142,008,838 and we know from Firefox that 134,442, which brings us to 0.09% of the population.&lt;br /&gt;&lt;br /&gt;The population of Belgium is around 10,000,000 and we know from Firefox that 69,760 downloads occurred over the 24-hour download period, which is about 0.7% of the population. So, although the map is a good indicator of the global distribution of downloads, it really does give as skewed vision on a per-country basis.&lt;br /&gt;&lt;br /&gt;What also struck me was the huge discrepancy between Southern Ireland and the UK. At first sight, Ireland looks like it didn't support the SpreadFirefox initative all that much at all - it shows in pale orange and is hardly worth the notice on that map next to it's dark red neighbour.&lt;br /&gt;Well, let's check it out. &lt;br /&gt;&lt;br /&gt;Populations in the UK and Ireland are respectively estimated at around: 60,587,000 and 4,339,000. Firefox downloads reached 387,488 and 42,993 respectively.&lt;br /&gt;The actual percentage of downloads reached: 0.6% in the UK but virtually 1.0% for the Republic of Ireland!&lt;br /&gt;&lt;br /&gt;[EDIT: 2008-06-19]&lt;br /&gt;So let's recap with our new numbers:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;UK, 0.6%, dark red&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Belgium, 0.7%, orange&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Ireland, 1.0%, light orange&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;The colors show the exact opposite to what the true representation in these countries actually is!&lt;br /&gt;[/EDIT]&lt;br /&gt;&lt;br /&gt;One last thing caught my eye. Notice the difference between North and South Korea?&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Any thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3343136758533849318?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3343136758533849318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3343136758533849318&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3343136758533849318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3343136758533849318'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/firefox-sets-world-record.html' title='Firefox sets the World Record'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8407386987555099223</id><published>2008-06-17T23:36:00.003+02:00</published><updated>2008-06-19T15:53:27.421+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='e-learning'/><category scheme='http://www.blogger.com/atom/ns#' term='minimum requirements'/><category scheme='http://www.blogger.com/atom/ns#' term='second life'/><category scheme='http://www.blogger.com/atom/ns#' term='RAM'/><title type='text'>Second Life take 1</title><content type='html'>Tony Karrer recently published a comprehensive list of &lt;a href="http://elearningtech.blogspot.com/2008/06/second-life-learning-videos.html"&gt;Second Life Learning Videos&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After viewing three, curiosity got the better of me. So... I now have a Second Life account and have downloaded, installed and started (or almost) the program.&lt;br /&gt;&lt;br /&gt;Only problem: my home PC doesn't meet the minimum requirements. I do only have 256 Mb of RAM. Ouch. Of course, it does date back to dinosaur era (i.e. ~2002), which explains why it's so outdated.&lt;br /&gt;&lt;br /&gt;[EDIT: 2008-06-19]&lt;br /&gt;I did try this again at home in the hopes it may have been a one-off, but no luck, it crashed again.&lt;br /&gt;[/EDIT]&lt;br /&gt;&lt;br /&gt;With a bit of luck, I shall be able to pursue this experiment over my lunch hour tomorrow! More news then...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8407386987555099223?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8407386987555099223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8407386987555099223&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8407386987555099223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8407386987555099223'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/second-life-take-1.html' title='Second Life take 1'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8458543816863662468</id><published>2008-06-17T23:15:00.006+02:00</published><updated>2008-06-19T15:54:31.306+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='world record'/><category scheme='http://www.blogger.com/atom/ns#' term='guiness record'/><category scheme='http://www.blogger.com/atom/ns#' term='download day'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Firefox Download Day</title><content type='html'>Well, Firefox Download Day started about 4 hours ago (19.00 here in Belgium).&lt;br /&gt;It looks like there might have been a slight glitch in the system as when I first followed the link, it simply gave me the usual RC3 version.&lt;br /&gt;&lt;br /&gt;Now it links to a "The Browser That Has It All" page, with the final 3.0 release. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mozilla.com/en-US/firefox/?p=downloadday"&gt;http://www.mozilla.com/en-US/firefox/?p=downloadday&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8458543816863662468?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8458543816863662468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8458543816863662468&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8458543816863662468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8458543816863662468'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/firefox-download-day.html' title='Firefox Download Day'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-945344675177856630</id><published>2008-06-17T21:09:00.006+02:00</published><updated>2008-06-17T21:41:10.055+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='animation'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='youtube'/><title type='text'>When the creation meets its creator</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qo1d6ttbAq8&amp;hl=en"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qo1d6ttbAq8&amp;hl=en" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-945344675177856630?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/945344675177856630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=945344675177856630&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/945344675177856630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/945344675177856630'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/when-creation-meets-creator.html' title='When the creation meets its creator'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3233494598285352040</id><published>2008-06-10T18:15:00.005+02:00</published><updated>2008-06-11T13:56:18.218+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google favicon'/><title type='text'>Google's favicon</title><content type='html'>Google's favicon needs a make-over! The favicon is the little icon that shows in the address bar and also your favourites, so it's important in getting people to identify company image.&lt;br /&gt;&lt;br /&gt;I gather they have already explored an incredible number of possible icons and are now making a public request for more ideas. So, you can now submit your own home-grown Google favicon by following the link: &lt;a href="http://www.google.com/faviconideas/"&gt;http://www.google.com/faviconideas/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Of course, I couldn't resist building my own 16 x 16 proposal!&lt;br /&gt;&lt;br /&gt;Simple version: &lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5210257315025504306" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_yTimejXbd5M/SE6NbEJ5yDI/AAAAAAAAAAU/ZFhw59nc_Co/s320/ggle1_1.gif" border="0" /&gt;&lt;br/&gt;&lt;br /&gt;This actually looks less than 16 by 16px because there's a transparent background border on the left side of the pic.&lt;br /&gt;&lt;br /&gt;Full version: &lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5210257190471452706" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_yTimejXbd5M/SE6NT0J5yCI/AAAAAAAAAAM/-dWcjVIc9QM/s320/ggle1_2.gif" border="0" /&gt;&lt;br/&gt;&lt;br /&gt;This looks square because... it is.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-decoration:line-through"&gt;I hope to be submitting these in the near future, as soon as I get my head around their terms of service.&lt;/div&gt;&lt;br /&gt;EDIT [June 11, 2008] - Done.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts, advice, opinions?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3233494598285352040?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3233494598285352040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3233494598285352040&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3233494598285352040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3233494598285352040'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/googles-favicon.html' title='Google&apos;s favicon'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_yTimejXbd5M/SE6NbEJ5yDI/AAAAAAAAAAU/ZFhw59nc_Co/s72-c/ggle1_1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-1177455474366820037</id><published>2008-06-08T21:08:00.009+02:00</published><updated>2008-07-27T11:36:20.921+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='object-oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML forms'/><category scheme='http://www.blogger.com/atom/ns#' term='form rendering'/><title type='text'>Object-oriented form rendering using PHP, part 2</title><content type='html'>There is one fundamental problem with my previous analysis of automatic form generation (using PHP).&lt;br /&gt;&lt;code&gt;&lt;br /&gt;// in the page header&lt;br /&gt;$form-&gt;displayJS();&lt;br /&gt;// ... lots of useful stuff&lt;br /&gt;// in the page body&lt;br /&gt;$form-&gt;display();&lt;br /&gt;// ... other useful stuff&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Which is: displaying the JS in the header is a really cool idea in a world where all forms are created on full HTML pages: with html, head, body tags. The truth of the matter is though that you often, probably mostly, work with PHP 'chunks' which you then include in the higher level page.&lt;br /&gt;&lt;br /&gt;For instance, I am currently working on a login form which I would like to appear on several different pages. Displaying JS in the header using the displayJS() function becomes impossible because the include (using require_once, include, ...) happens when you are already in the 'body' of the resulting page.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;html&gt;&lt;br /&gt;&amp;lt;head&gt;&lt;br /&gt;  &amp;lt;title&gt;An example&amp;lt;/title&gt;&lt;br /&gt;&amp;lt;/head&gt;&lt;br /&gt;&amp;lt;body&gt;&lt;br /&gt;  &amp;lt;?php require_once('login/login.php'); ?&gt;&lt;br /&gt;&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So, onto plan B. I have now changed my original idea to a more lightweight technique. On each 'input' you declare, you can add one or more client-side 'rules' which will take effect when the onchange event occurs (i.e. whenever the user validates input for the field). In other terms, whenever the user enters information into the field, it's trimmed, etc. using Javascript.&lt;br /&gt;Once the form gets submitted, the onsubmit event triggered by the browser, will only make sure required fields are present, required being also used in the sense non-empty.&lt;br /&gt;&lt;br /&gt;Right, so that's the theory. All it needs now is putting into practice.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Thoughts?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-1177455474366820037?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/1177455474366820037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=1177455474366820037&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1177455474366820037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/1177455474366820037'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/there-is-one-fundamental-problem-with.html' title='Object-oriented form rendering using PHP, part 2'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8232749550957661131</id><published>2008-06-08T20:53:00.007+02:00</published><updated>2008-08-20T09:13:59.461+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google Webmaster Tools</title><content type='html'>As you probably guessed the use of the words 'sex' and 'drugs' in my previous post title were not quite as innocent as I tried to make out. I have always wondered the effect using these words could have on a blog's popularity and have now decided to experiment.&lt;br /&gt;&lt;br /&gt;Today, time for the grand news! I decide to connect to my Google Analytics account, expecting the zillions of visits I so truely deserve for this pathetic attempt, and low and behold... nothing has changed. Same flimsy statistics.&lt;br /&gt;&lt;br /&gt;But my eye did catch on to one thing: Google is now offering a set of tools for webmasters. They are absolutely free, easy to 'plug into' using a simple meta tag in your page headers, and can be added to your iGoogle page.&lt;br /&gt;&lt;br /&gt;For instance, you can list top search queries, crawl errors, problems with content (meta tags, ...) and so on and so forth. You can also submit a site map to make sure Googlebot visits &lt;i&gt;all&lt;/i&gt; the pages you want referenced.&lt;br /&gt;&lt;br /&gt;Other interesting fact, the last time Googlebot successfully crawled my index page was May 22. So my dismay is now tempered by the fact that there is still a tiny gleam of hope for the sex and drugs effect.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Any ideas for better words?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8232749550957661131?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8232749550957661131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8232749550957661131&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8232749550957661131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8232749550957661131'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/google-webmaster-tools.html' title='Google Webmaster Tools'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-7228802552018243281</id><published>2008-06-06T21:02:00.006+02:00</published><updated>2008-08-20T09:13:59.464+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Sex, drugs and malbolge</title><content type='html'>This is probably the most useless piece of information E-VER but you just gotta love it! Pointed out by one of my colleagues today!&lt;br /&gt;&lt;br /&gt;Ever heard of malebolge, the eighth circle of Hell? Sounds pretty horrendous, right? Well, some chap called Ben Olmstead, invented the programming language to go with it: Malbolge.&lt;br /&gt;&lt;br /&gt;Prepare, for the end is nigh.&lt;br /&gt;&lt;br /&gt;Example: guess what the following does.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(=&lt;`:9876Z4321UT.-Q+*)M'&amp;%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**&lt;br /&gt; hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O&lt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This actually displays... Hello World.&lt;br /&gt;&lt;br /&gt;Uh oh. Ben, you are either crazy or simply have a great sense of humour!!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.antwon.com/other/malbolge/malbolge.txt"&gt;http://www.antwon.com/other/malbolge/malbolge.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-7228802552018243281?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/7228802552018243281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=7228802552018243281&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7228802552018243281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/7228802552018243281'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/sex-drugs-and-malbolge.html' title='Sex, drugs and malbolge'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-8492623986741386531</id><published>2008-06-04T18:00:00.006+02:00</published><updated>2008-08-20T09:13:59.466+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='object-oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='zencity'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML forms'/><category scheme='http://www.blogger.com/atom/ns#' term='form rendering'/><title type='text'>Object-oriented form rendering using PHP, part 1</title><content type='html'>Well, hi again.&lt;br /&gt;&lt;br /&gt;I have had to major annoyances these past two weeks:&lt;br /&gt;- clearing my flat (those who know me well, know this is a endless task);&lt;br /&gt;- and studying for a Dutch exam, which is today! So, there is lots of touching wood going on around here.&lt;br /&gt;&lt;br /&gt;[UPDATE: the exam wasn't that difficult. I think I have made it to the next module. Actual results next Wednesday!]&lt;br /&gt;&lt;br /&gt;The good news is I actually found my IT diploma certificate!&lt;br /&gt;&lt;br /&gt;Other than that, I have continued my personal website, and also started working on anxcity, which I have already renamed zencity because we really want to focus on the aim rather than the "problem".&lt;br /&gt;&lt;br /&gt;I know I shall be needing quite a few forms (especially for administration), so I have started developing a form publisher using object oriented PHP. The form and input nodes are ready, but I hope to be adding client-side and server-side rules shortly.&lt;br /&gt;&lt;br /&gt;The general idea is (I haven't checked syntax so bare with me):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$form=new Form();&lt;br /&gt;$name=new Text('name',40); // 40 is the size&lt;br /&gt;$comment=new TextArea('comment',4,5);&lt;br /&gt;$form-&gt;add($name);&lt;br /&gt;$form-&gt;add($comment);&lt;br /&gt;$form-&gt;display();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And of course ultimately:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// in the HTML head or before&lt;br /&gt;$form=new Form();&lt;br /&gt;$name=new Text('name',40); // 40 is the size&lt;br /&gt;$name-&gt;addPreSubmitJS('trim');&lt;br /&gt;$name-&gt;addOnSubmitJS('min-length',0);&lt;br /&gt;$comment=new TextArea('comment',4,5);&lt;br /&gt;$comment-&gt;addPreSubmitJS('trim');&lt;br /&gt;$comment-&gt;addOnSubmitJS('min-length',0);&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;$form-&gt;add($name);&lt;br /&gt;$form-&gt;add($comment);&lt;br /&gt;&lt;br /&gt;// in the HTML head&lt;br /&gt;$form-&gt;displayJS();&lt;br /&gt;&lt;br /&gt;// in the HTML body&lt;br /&gt;$form-&gt;display();&lt;br /&gt;&lt;br /&gt;// once the form is actually submitted to server,&lt;br /&gt;// apply server side rules&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There are thus to separate types of rules:&lt;br /&gt;- JS client-side rules (the usual: trim(), length()&gt;0, etc.) that get tested before the HTTP request actually gets (or doesn't get) sent.&lt;br /&gt;- PHP server-side rules (non-duplicate identifier, etc.) tested on the server-side once the HTTP request gets through.&lt;br /&gt;&lt;br /&gt;Anyhow, once the personal website is up I shall be able to share more with you about the evolution of the project.&lt;br /&gt;&lt;br /&gt;Any thoughts for now?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-8492623986741386531?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/8492623986741386531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=8492623986741386531&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8492623986741386531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/8492623986741386531'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/06/well-hi-again.html' title='Object-oriented form rendering using PHP, part 1'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2653496967381942907</id><published>2008-05-20T21:27:00.004+02:00</published><updated>2008-08-20T09:13:59.469+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='anxcity'/><title type='text'>I have been thinking</title><content type='html'>[Note: the thinking process has not brought on fits, high fever, sweating, or any other adverse effects until now. I should engage in this activity more often perhaps?]&lt;br /&gt;&lt;br /&gt;I don't really like the idea of complicating life with lots of useless rules but I am starting to believe that 'good practices' really also do apply to batch files as simple as they may be, as they apply to more or less anything when it comes to sharing, reusing some nifty piece of code, or deciding to chuck it for now.&lt;br /&gt;&lt;br /&gt;So, I may be coming up with some more generalist posts on this issue, although it may quickly get superseded by other pressing issues I would like to share with you.&lt;br /&gt;&lt;br /&gt;One of these (and this is the true reason behind my short absence from the blogosphere) is that I am working on a personal website. &lt;br /&gt;&lt;br /&gt;Why? &lt;br /&gt;&lt;br /&gt;Well, firstly, I would like to provide a platform to download code which I have posted to this blog (for you ;-)).&lt;br /&gt;&lt;br /&gt;Secondly, I would like to actually start working on a project of mine that's been simmering for some time: Anxcity, a website for English and French speaking anxiety disorder sufferers. And, hopefully, I can tag Dutch onto that too!&lt;br /&gt;&lt;br /&gt;As you probably know anxiety disorders affect up to 18% of adult population at one time in their lives (according to U.S statistics). Which means about one in five people suffer from some form of anxiety. Which in turn means you are either a sufferer yourself or are close to someone who is, has been or will be.&lt;br /&gt;&lt;br /&gt;So, let's recap some of the most common disorders: Generalized Anxiety Disorder (GAD), Obsessive-Compulsive Disorder (OCD), Panic Disorder (PD), Social Anxiety Disorder, Agoraphobia, Impulse Phobia, Specific Phobias, Post Traumatic Stress Disorder (PTSD) and ... I have probably forgotten some.&lt;br /&gt;&lt;br /&gt;For most people their disorders are only slight and therefore hardly debilitating, but for others anxiety plays a major, even central, role in their lives, preventing them from doing the most trivial things: food and clothes shopping, working, going out with friends or family, visiting places, traveling, ... you name it.&lt;br /&gt;&lt;br /&gt;Of course, at this stage you have already betted a month's wages that I myself am a sufferer, and you were silly not to bet two :p. I have Panic Disorder with Agoraphobia and Social Anxiety Disorder. And finding 'help' has been quite a challenge by itself! The internet, with its vast pool of information and links and references and addresses, wasn't able to provide the answers I was looking for. Yup! Incredible but true. Things are slowly changing and I would like to help bring on that change. That is what the Anxcity project is all about: bringing on awareness, understanding and a common forum for sufferers to share experiences, and stories. And more importantly, a place to share answers to the most important question: where to get help.&lt;br /&gt;&lt;br /&gt;So, that's what this project is about. And I hope to be getting it running shortly. Any suggestions, ideas, comments, questions, ... are welcome.&lt;br /&gt;&lt;br /&gt;Just drop me a line at: elinor [DOT] hurst [AT] gmail [DOT] com.&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2653496967381942907?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2653496967381942907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2653496967381942907&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2653496967381942907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2653496967381942907'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/05/i-have-been-thinking.html' title='I have been thinking'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-5627298831011838884</id><published>2008-05-20T19:35:00.001+02:00</published><updated>2008-08-20T09:13:32.093+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>How to clear the log file</title><content type='html'>Now, there is one important issue we didn't cover in our previous post about logs: how to clear the log when it starts taking up too much space.&lt;br /&gt;&lt;br /&gt;Probably the simplest way to do this is to redirect &lt;em&gt;type NUL&lt;/em&gt; to your log file, as follows:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;type NUL &gt; your_log.log&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That's it! You will find &lt;em&gt;your_log.log&lt;/em&gt; file size drops back to 0 once you have called this command.&lt;br /&gt;&lt;br /&gt;Thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-5627298831011838884?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/5627298831011838884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=5627298831011838884&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5627298831011838884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/5627298831011838884'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/05/how-to-clear-log-file.html' title='How to clear the log file'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2217403567048544995</id><published>2008-05-19T22:18:00.002+02:00</published><updated>2008-08-20T09:13:25.462+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Using CON... or not</title><content type='html'>Hi folks. I am back from the wilderness of, well, my inner-self I guess.&lt;br /&gt;And here with another tip: using CON or not.&lt;br /&gt;&lt;br /&gt;When you are programming a batch file, it's usually pretty useful to get the output to show on screen. Why? Well, simply because it saves you the trouble of finding and opening a potential log file just to read some silly message about a file not being found, or some syntax error for instance.&lt;br /&gt;&lt;br /&gt;So, let's start from the top.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. How do I redirect output from the console to a logfile?&lt;/strong&gt;&lt;br /&gt;Here are perhaps the more useful redirection techniques.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;echo Hello World &gt; hello.txt&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will redirect the command &lt;i&gt;echo Hello World&lt;/i&gt; to the hello.txt file (which is created in the directory where the batch file is located).&lt;br /&gt;You can immediately see the way to turn this into a logging functionality:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;echo Something happened &gt; my_log.log&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The poor thing about this is, if you run the batch twice consecutively you will loose the first output. The &gt; is in effect making sure the file is rewritten completely. If you want to append to a file, simply use &gt;&gt;.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;echo Something else happened &gt;&gt; my_log.log&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Great! Now we are actually adding to the log as we go along. The beauty in this is that if the file doesn't already exist it's automatically created (in the same way as when you use the simple &gt; redirect).&lt;br /&gt;&lt;br /&gt;So, all is cool here except &lt;em&gt;echo&lt;/em&gt; is a pretty boring command. So let's liven things up a little. First we will copy hello.txt to hello1.txt, then we will remove directory hello.txt (of course, we will assume there is no hello.txt directory on your system, at least please make sure you check for this! - this will fail hello.txt not being a directory).&lt;br /&gt;&lt;br /&gt;With these more "complex" commands you can distinguish standard output (numbered 1) from error output (numbered 2). So you can actually redirect standard output to one file, and error output to the console for instance.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;echo Before copy &gt;&gt; my_log.log&lt;br /&gt;copy hello.txt hello1.txt &gt;&gt; my_log.log 2&gt;&amp;1&lt;br /&gt;echo Before rmdir 1 &gt;&gt; my_log.log&lt;br /&gt;rmdir hello.txt &gt;&gt; my_log.log&lt;br /&gt;echo Before rmdir 2 &gt;&gt; my_log.log&lt;br /&gt;rmdir hello.txt &gt;&gt; my_log.log 2&gt;&amp;1&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Using this example you can see how adding 2&gt;&amp;1 after the redirect will make sure both standard and error output are redirected to file. Otherwise error output will show on screen (first rmdir).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Dynamically choosing where to redirect to&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Now, let's say in certain cases you want to redirect output to screen but in other cases (say your batch is being called from within another script) you would rather use a file.&lt;br /&gt;&lt;br /&gt;You can do this using CON.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set out=CON&lt;br /&gt;if not "%1"=="" set out="%1"&lt;br /&gt;goto do_stuff&lt;br /&gt;&lt;br /&gt;:do_stuff&lt;br /&gt;echo Copying hello.txt &gt;&gt; %out%&lt;br /&gt;copy hello.txt hello1.txt &gt;&gt; %out% 2&gt;&amp;1&lt;br /&gt;echo Removing directory hello.txt &gt;&gt; %out%&lt;br /&gt;rmdir hello.txt &gt;&gt; %out% 2&gt;&amp;1&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;if not "%out%"=="CON" goto blackhole&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If you just launch the batch file, all the output will show up on console (because no %1 argument has been provided).&lt;br /&gt;&lt;br /&gt;If you launch the batch via a call as follows, however:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;redirect5 my_second_log.log&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The output will get sent to my_second_log.log. Note that on top of that we can avoid pausing the process 'for nothing' by using the &lt;em&gt;if not "%out%"=="CON" goto blackhole&lt;/em&gt; condition in &lt;em&gt;:eof&lt;/em&gt;. Neat, don't you think?&lt;br /&gt;&lt;br /&gt;I have never actually seen a redirection based on anything else but a "on-a-command" basis i.e. how to redirect output for the whole current process. Have you? If so, drop me a line, I would love to know how to do this, if possible!&lt;br /&gt;&lt;br /&gt;Another post will be coming up shortly. Just a few thoughts I would like to share.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2217403567048544995?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2217403567048544995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2217403567048544995&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2217403567048544995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2217403567048544995'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/05/using-con-or-not.html' title='Using CON... or not'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-6890832384379260683</id><published>2008-04-30T20:48:00.003+02:00</published><updated>2008-06-08T23:10:07.092+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #04: Working with arguments - Part 3</title><content type='html'>&lt;b&gt;6. Using SHIFT&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I mentioned previously that you cannot assign more than 9 arguments to a batch call.&lt;br /&gt;Well, that isn't altogether true because the shift command will allow you to read any number of arguments by replacing %1 with %2, %2 with %3, ... on each call.&lt;br /&gt;&lt;br /&gt;Let's get straight to a real example (let's call it shiftargs.bat):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We will use the arg_count variable to count the number of variables and show this at the end of the program.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:init_vars&lt;br /&gt;set arg_count=0&lt;br /&gt;goto load_args&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now let's load the arguments recursively and do something with each.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:load_args&lt;br /&gt;if "%1" == "" goto end_script&lt;br /&gt;set current_arg=%~1&lt;br /&gt;goto action&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In the action part we keep track of the argument count and more importantly shift to the next. Once we have called shift we have in effect "lost" %1 which has been replaced with %2 which itself is replaced with %3, etc.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:action&lt;br /&gt;set /A arg_count+=1&lt;br /&gt;shift&lt;br /&gt;echo Argument %arg_count%: %current_arg%&lt;br /&gt;goto load_args&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;At the end of the script, we display the argument count or a specific message if non were passed.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:end_script&lt;br /&gt;if %arg_count%==0 goto no_args&lt;br /&gt;echo Number of arguments: %arg_count%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:no_args&lt;br /&gt;echo No arguments provided.&lt;br /&gt;goto eof&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We finish it all off with the usual.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you just run the batch without passing any arguments it will display:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;No arguments provided.&lt;br /&gt;Press any key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We can also create an additional batch to call our shiftargs.bat with command line arguments as follows:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;call shiftargs the hungry fox and lovely plump goose are both peckish and so am I&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will of course display something more interesting:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Argument 1: the&lt;br /&gt;Argument 2: hungry&lt;br /&gt;Argument 3: fox&lt;br /&gt;Argument 4: and&lt;br /&gt;Argument 5: lovely&lt;br /&gt;Argument 6: plump&lt;br /&gt;Argument 7: goose&lt;br /&gt;Argument 8: are&lt;br /&gt;Argument 9: both&lt;br /&gt;Argument 10: peckish&lt;br /&gt;Argument 11: and&lt;br /&gt;Argument 12: so&lt;br /&gt;Argument 13: am&lt;br /&gt;Argument 14: I&lt;br /&gt;Number of arguments: 14&lt;br /&gt;Press any key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And there we have it, we have passed more than 9 arguments to our batch command!&lt;br /&gt;&lt;br /&gt;Bye for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-6890832384379260683?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/6890832384379260683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=6890832384379260683&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6890832384379260683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/6890832384379260683'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with_30.html' title='Batch Programming Tip #04: Working with arguments - Part 3'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3044888387273607587</id><published>2008-04-29T22:51:00.004+02:00</published><updated>2008-08-20T09:13:32.095+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #04: Working with arguments - Part 2</title><content type='html'>&lt;b&gt;5. The %0 argument&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I mentioned in my previous post that you could 'read' arguments using %1 through %9 (with or without the ~).&lt;br /&gt;&lt;br /&gt;There is another argument you can get: %0. Of course, numbering &lt;i&gt;had&lt;/i&gt; to start at 0, we are in geek world after all, right?&lt;br /&gt;&lt;br /&gt;The first argument (%0) is simply the first thing that appears on the command line, which is the command itself.&lt;br /&gt;&lt;br /&gt;The following batch code illustrates this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;SET cmdln=%~0&lt;br /&gt;if "%cmdln%"=="" goto no_cmdln&lt;br /&gt;goto show_cmdln&lt;br /&gt;&lt;br /&gt;:show_cmdln&lt;br /&gt;echo Argument 0: %cmdln%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:no_cmdln&lt;br /&gt;echo No argument %%0.&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Executing this will show the complete path to the current batch file.&lt;br /&gt;&lt;br /&gt;Now let's call this same batch from within another simple batch:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;:: show_arg0 is the first batch file's name&lt;br /&gt;call "show_arg0"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will show:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Argument 0: show_arg0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that we never actually get to the no_cmdln condition!&lt;br /&gt;&lt;br /&gt;Well, it's getting late I am afraid, but do come back for the next post, we'll be seeing how to use a variable number of arguments, and how to retrieve more than 9... so, until next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3044888387273607587?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3044888387273607587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3044888387273607587&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3044888387273607587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3044888387273607587'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with_29.html' title='Batch Programming Tip #04: Working with arguments - Part 2'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3375334586491873442</id><published>2008-04-28T20:26:00.005+02:00</published><updated>2008-08-20T09:13:32.097+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #04: Working with arguments - Part 1</title><content type='html'>This is less a tip than a succinct how-to.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. The basics&lt;/b&gt;&lt;br /&gt;Passing arguments to a script (or subroutine) is very simple: add the arguments just after the call on the same line. The arguments are separated by space. If you need to pass an argument which itself contains one or more spaces, make sure to enclose it using quotes.&lt;br /&gt;&lt;br /&gt;Let's write a short example. The idea is simply to write two words which are passed as arguments.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Our first write words script&lt;/b&gt;&lt;br /&gt;First let's clear up the caller syntax by writing the following to call_write_words.bat:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;call write_words hello "hello world"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;We pass two arguments:&lt;br /&gt;hello&lt;br /&gt;"hello world"&lt;br /&gt;&lt;br /&gt;Note that the second argument is quoted as it contains a space.&lt;br /&gt;&lt;br /&gt;That was the easier part, now let's look at how we get hold of the arguments and then print them on screen. To do this we will create a second batch file containing the code just below which is probably the simplest form of getting and printing two arguments.&lt;br /&gt;&lt;br /&gt;To get the value of the arguments, use %1, %2, ..., %9:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Sentence1: %1&lt;br /&gt;echo Sentence2: %2&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Sentence1: hello&lt;br /&gt;Sentence2: "hello world"&lt;br /&gt;Press a key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With our current example, if you don't provide values for those two arguments however, the program will ouput:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Sentence1:&lt;br /&gt;Sentence2:&lt;br /&gt;Press a key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this particular case, it doesn't really matter as empty values will not cause an error (and/or make the program halt or falter in any way).&lt;br /&gt;&lt;br /&gt;Mostly though you will want to check the values that are stored in your arguments and you may even provide default values in some cases.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Checking arguments&lt;/b&gt;&lt;br /&gt;In the following batch program, we will create two variables to hold the values of the arguments passed to it. If no value is provided a default value is used instead.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;SET default=No sentence passed!&lt;br /&gt;SET sentence1=%1&lt;br /&gt;SET sentence2=%2&lt;br /&gt;if "%sentence1%"=="" set sentence1=%default%&lt;br /&gt;if "%sentence2%"=="" set sentence2=%default%&lt;br /&gt;goto action&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Sentence1: %sentence1%&lt;br /&gt;echo Sentence2: %sentence2%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Important note: to compare empty string values, enclose the string with the character of your choice. I usually use the " character but the [ and ] characters are also often used.&lt;br /&gt;&lt;br /&gt;For instance: &lt;br /&gt;if "%1"=="" ... &lt;br /&gt;or &lt;br /&gt;if [%1]==[] ...&lt;br /&gt;have exactly the same meaning, the bottom line being that if the condition returns true, your %1 must be empty. In that case, use the default value you previously prepared or exit with an error message as needed.&lt;br /&gt;&lt;br /&gt;Using:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;call write_words "hello world"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You get the following output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Sentence1: "hello world"&lt;br /&gt;Sentence2: No sentence passed!&lt;br /&gt;Press a key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You may be wondering how to get rid of the quotes around your "hello world" string. Indeed, you have to add the quotes to passe the argument but you may just have been meaning to pass "hello world" without the quotes, except that is technically impossible.&lt;br /&gt;The good news is there's a nifty little feature that let's you do this: instead of using %1, %2, ... %9 use %&lt;b&gt;~&lt;/b&gt;1, %&lt;b&gt;~&lt;/b&gt;2, ... %&lt;b&gt;~&lt;/b&gt;9.&lt;br /&gt;Using this in our first simplified version, we get the following:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;:: added the ~&lt;br /&gt;SET sentence1=%~1&lt;br /&gt;:: added the ~&lt;br /&gt;SET sentence2=%~2&lt;br /&gt;goto action&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Sentence1: %sentence1%&lt;br /&gt;echo Sentence2: %sentence2%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;A much nicer result without the quotes. &lt;br /&gt;It may seem a little superficial here but quotes can be a realy nuisance (when working with file names, and paths for instance) and you would mostly "strip" your arguments even if to add quotes later on when needed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. The argument wildcard&lt;/b&gt;&lt;br /&gt;Finally, for today, another way of handling arguments is to use the argument wildcard %*. This will get all the arguments in one go.&lt;br /&gt;&lt;br /&gt;Let's prepare our call:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;call write_words_star well, that will be it for today, tchuss until next time...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And now handle the call in a separate batch (write_words_star.bat):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;goto action&lt;br /&gt;&lt;br /&gt;:action&lt;br /&gt;echo Arguments: %*&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press a key to quit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The console will show the following:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Arguments: well, that will be it for today, tchuss until next time...&lt;br /&gt;Press a key to quit...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Well, that really will be it for today. Until next time...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3375334586491873442?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3375334586491873442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3375334586491873442&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3375334586491873442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3375334586491873442'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-04-working-with.html' title='Batch Programming Tip #04: Working with arguments - Part 1'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3120958885765041194</id><published>2008-04-27T22:27:00.005+02:00</published><updated>2008-08-20T09:13:32.099+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #03: Using The Boring Black Hole</title><content type='html'>Batch scripts can quickly end up looking like spaghetti code. In my opinion this is mostly because you commonly use the (Really, Really Nasty) "goto" instruction.&lt;br /&gt;&lt;br /&gt;There are a few things you can do to avoid "I-wrote-this-program-but-cannot-for-the-life-of-me-remember-how-or-even-whether-it-works" syndrome:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Always use the same program structure: init_system (setlocal calls, set system variables, etc.), init_vars (read program arguments and initalize variables), function routines and subroutines, eof (where you go to end and pause the program in interactive mode), blackhole (where you go when you want nothing more to happen).&lt;/li&gt;&lt;li&gt;Comment code profusely when needed as things like missing argument, undeclared variable, etc. will not be considered like compile-time or even runtime errors. So you're stuck with you ... and you to work out what's going on when things start going wrong.&lt;/li&gt;&lt;li&gt;Although this may not be considered best practice, using intermediary variables can make your code much more easy to read.&lt;/li&gt;&lt;li&gt;When calling a subroutine, pass variables as arguments where possible i.e. don't rely on caller program to prepare variables for the sub-routine (something similar to using "globals"), rather pass the variables as arguments (rather like passing arguments to a function instead of relying on global variables). This just makes the script more obvious and easy to understand, as with most programming languages.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So, here's a basic example that simply does... well nothing:&lt;/p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_system&lt;br /&gt;goto init_vars&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;SET text=I am doing something...&lt;br /&gt;SET end_text=This is eof...&lt;br /&gt;SET press_key=Press a key to continue...&lt;br /&gt;goto do_something&lt;br /&gt;&lt;br /&gt;:do_something&lt;br /&gt;call :pause_prog "%text%"&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;:: this takes one argument&lt;br /&gt;:: @param 1 - the text to show&lt;br /&gt;:pause_prog&lt;br /&gt;cls&lt;br /&gt;echo Message: %~1&lt;br /&gt;echo %press_key%&lt;br /&gt;pause &gt; NUL&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;call :pause_prog "%end_text%"&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Any reusable code is stored in a subroutine (e.g. pause_prog) which ends swallowed in the black hole which is where the subroutine stops and the code then returns to the line which immediately follows the call to the subroutine. Hence the name... but we'll get back to those in a later post. Until then... tchuss.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3120958885765041194?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3120958885765041194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3120958885765041194&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3120958885765041194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3120958885765041194'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-03-using-boring.html' title='Batch Programming Tip #03: Using The Boring Black Hole'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-3968424567943182358</id><published>2008-04-26T22:43:00.023+02:00</published><updated>2008-08-20T09:13:32.101+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #02: Using cd /D</title><content type='html'>Using the /D option on the CD command is another very simple "trick" which can come in handy if you're not sure what the final location of your script will be or whether it will actually be stored on the same drive as where you want the working directory to be.&lt;br /&gt;&lt;br /&gt;(Note: the CD command is used to Change Directory. It can be really useful in combination with the FOR loop as we will see in a later tip.)&lt;br /&gt;&lt;br /&gt;On a two-drive computer (we'll call the drives C:\ and D:\, in our examples), try the following.&lt;br /&gt;&lt;br /&gt;On drive C:\ create a batch file containing:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;cd D:\DirectoryName&lt;br /&gt;echo Current location: %cd%&lt;br /&gt;echo Press any key to exit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Although you have changed directories on the D:\ drive, you will find the %cd% variable still contains the drive path on drive C:\.&lt;br /&gt;&lt;br /&gt;(Note: The %cd% variable expands to your current working directory. It's mostly considered like an environment variable, meaning you don't have to set it, it just "exists" natively.)&lt;br /&gt;&lt;br /&gt;This is where the /D option comes in handy as it forces a drive change too, if necessary.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;:: change directory and force drive change&lt;br /&gt;cd /D D:\DirectoryName&lt;br /&gt;echo Current location: %cd%&lt;br /&gt;echo Press any key to exit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This second example works because it also changes the drive letter automatically so you can now move your script to a different location on a different drive and still obtain the expected results.&lt;br /&gt;&lt;br /&gt;In the following script we will save the original location, switch to a new working directory and then back to the original location once we have finished doing Some Really Useful Stuff. The script is a little more complicated and contains calls to a subroutine and also uses of the famous black hole both of which we'll get back to later on.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;SET original=%cd%&lt;br /&gt;SET working=D:\DirectoryName&lt;br /&gt;goto do_switch&lt;br /&gt;&lt;br /&gt;:do_switch&lt;br /&gt;:: the following will show original location&lt;br /&gt;call :show_cd&lt;br /&gt;:: change directory and force drive change&lt;br /&gt;cd /D "%working%"&lt;br /&gt;:: this will now show the new working directory&lt;br /&gt;call :show_cd&lt;br /&gt;goto do_something&lt;br /&gt;&lt;br /&gt;:do_something&lt;br /&gt;echo This is where we put Our Really Useful Code&lt;br /&gt;goto end_script&lt;br /&gt;&lt;br /&gt;:end_script&lt;br /&gt;:: switch back to original location&lt;br /&gt;cd /D "%original%"&lt;br /&gt;call :show_cd&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;:show_cd&lt;br /&gt;echo Working directory is now: %cd%&lt;br /&gt;goto blackhole&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo Press any key to exit...&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;br /&gt;:blackhole&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So basically using cd /D is a pretty effective way of keeping things nice and simple and avoiding those last minute surprises we could all do without :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-3968424567943182358?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/3968424567943182358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=3968424567943182358&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3968424567943182358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/3968424567943182358'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/tip02-using-cd-d.html' title='Batch Programming Tip #02: Using cd /D'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-4558284420181101181</id><published>2008-04-24T19:51:00.016+02:00</published><updated>2008-08-20T09:13:32.103+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Batch Programming Tip #01: Variables and spaces</title><content type='html'>Well, this is probably the most basic of all tips. It's also one that will save you loads of time if you got it wrong in the first place (as I did...). Most programming languages don't worry too much about spaces unless they are part of a string.&lt;br /&gt;&lt;br /&gt;For instance, in PHP you could declare:&lt;br /&gt;$my_var = "hello world"; // there are spaces around the = sign&lt;br /&gt;or&lt;br /&gt;$my_var="hello world"; // there are no spaces around the = sign&lt;br /&gt;indescriminately as both declarations have the same meaning.&lt;br /&gt;&lt;br /&gt;Try the following in batch:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;SET my_var=world&lt;br /&gt;echo Hello %my_var%&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will work as expected and output &lt;i&gt;hello world&lt;/i&gt; to the standard output (which would normally be the console). Notice we do not use quotes.&lt;br /&gt;&lt;br /&gt;If you try this second example, however, you may be in for a surprise.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;SET my_var = world&lt;br /&gt;echo Hello %my_var%&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Indeed the script doesn't work as expected: it just outputs Hello followed by ...nothing. The reason for this behaviour is that batch programming variable names &lt;b&gt;may contain spaces&lt;/b&gt;. Yup, scary, huh?&lt;br /&gt;&lt;br /&gt;So to make the second example "work", we need to add the space in the variable reference as follows:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;SET my_var&amp;nbsp;=&amp;nbsp;world&lt;br /&gt;:: there is a space before the second % below&lt;br /&gt;echo Hello %my_var&amp;nbsp;%&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will output Hello&amp;nbsp;&amp;nbsp;world. Notice that there are two spaces between hello and world because the value which is assigned to the %my_var&amp;nbsp;% variable starts immediately after the = sign.&lt;br /&gt;&lt;br /&gt;So the next fix is to remove that leading space:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;:: the space between = and world has been removed&lt;br /&gt;SET my_var =world&lt;br /&gt;echo Hello %my_var %&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Let's finish with a working example of a variable name containing spaces.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;:: ask the user to enter first name&lt;br /&gt;SET /P first name=Please enter your first name: &lt;br /&gt;SET hello=Hello&lt;br /&gt;echo %hello% %first name%&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Enter your first name and hey presto, it hellos you as planned.&lt;br /&gt;&lt;br /&gt;Although I would never suggest using variables with spaces as they can lead to serious confusion, this tip would usually be a good place to start when variables seem to unset themselves like by (black) magic between one line and the next.&lt;br /&gt;&lt;br /&gt;Well, that will be it for today...&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@echo off&lt;br /&gt;&lt;br /&gt;:::&lt;br /&gt;:: Init variables&lt;br /&gt;:&lt;br /&gt;&lt;br /&gt;:init_vars&lt;br /&gt;SET goodbye=See you later,&lt;br /&gt;SET end_goodbye=Thanks for reading...until next time ;-).&lt;br /&gt;SET anonymous=Anonymous&lt;br /&gt;SET attempts=0&lt;br /&gt;SET max_attempts=3&lt;br /&gt;goto ask_for_first_name&lt;br /&gt;&lt;br /&gt;:::&lt;br /&gt;:: Ask for first name&lt;br /&gt;:: Loop for max_attempts if necessary or give up.&lt;br /&gt;:&lt;br /&gt;&lt;br /&gt;:ask_for_first_name&lt;br /&gt;SET /P first name=Please enter your first name, so I can be polite and say goodbye: &lt;br /&gt;SET /A attempts+=1&lt;br /&gt;&lt;br /&gt;if "%first name%"=="" (&lt;br /&gt; :: LSS is definitely an Win NT trick&lt;br /&gt; if %attempts% LSS %max_attempts% goto ask_for_first_name&lt;br /&gt; SET first name=%anonymous%&lt;br /&gt;)&lt;br /&gt;goto say_goodbye&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;:::&lt;br /&gt;:: Output goodbye&lt;br /&gt;:&lt;br /&gt;&lt;br /&gt;:say_goodbye&lt;br /&gt;cls&lt;br /&gt;echo %goodbye% %first name%&lt;br /&gt;echo %end_goodbye%&lt;br /&gt;goto eof&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;:::&lt;br /&gt;:: Pause for reading&lt;br /&gt;:&lt;br /&gt;&lt;br /&gt;:eof&lt;br /&gt;echo.&lt;br /&gt;echo (Press any key to quit...)&lt;br /&gt;pause &gt; NUL&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-4558284420181101181?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/4558284420181101181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=4558284420181101181&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4558284420181101181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/4558284420181101181'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/batch-programming-tip-01-variables-and.html' title='Batch Programming Tip #01: Variables and spaces'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5199583470212679285.post-2759896450579104843</id><published>2008-04-24T09:19:00.003+02:00</published><updated>2008-08-20T09:13:32.106+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='NT'/><title type='text'>Hello and welcome</title><content type='html'>What more can I say? A new day and a new blog... let's hope this one "sticks".&lt;br /&gt;&lt;br /&gt;I will be starting with a few "tips" relating to my latest fad: batch programming.&lt;br /&gt;Weird, huh? But also jolly useful at times. I am using the NT flavour of batch programming so I am not sure how much of the code I will be posting here will be usable on other systems.&lt;br /&gt;&lt;br /&gt;Obviously, I couldn't start to thank Rob van der Woude enough for compiling the ultimate scripting site: &lt;a href="http://www.robvanderwoude.com/"&gt;http://www.robvanderwoude.com/&lt;/a&gt;. In it he describes batch commands, batch syntax and even provides scores of examples.&lt;br /&gt;&lt;br /&gt;Here is a compilation of the tips I hope to be expanding shortly:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Tip#01: Variables and spaces&lt;/li&gt;&lt;li&gt;Tip#02: Using: cd /D&lt;/li&gt;&lt;li&gt;Tip#03: Using The Boring Black Hole&lt;/li&gt;&lt;li&gt;Tip#04: Working with arguments&lt;/li&gt;&lt;li&gt;Tip#05: Using CON ... or not&lt;/li&gt;&lt;li&gt;Tip#06: Getting the batch file path&lt;/li&gt;&lt;li&gt;Tip#07: Retrieving and using file size&lt;/li&gt;&lt;li&gt;Tip#08: Reading from a file&lt;/li&gt;&lt;li&gt;Tip#09: Using: for /D&lt;/li&gt;&lt;li&gt;Tip#10: Making and calling a subroutine&lt;/li&gt;&lt;li&gt;Tip#11: Using The Substring Equivalent&lt;/li&gt;&lt;li&gt;Tip#12: Creating a timestamp&lt;/li&gt;&lt;li&gt;Tip#13: Using: setlocal enabledelayedexpansion&lt;/li&gt;&lt;li&gt;Tip#14: The difference between :: and REM&lt;/li&gt;&lt;li&gt;Tip#15: Getting file attributes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Of course, this list will probably change over time in ways I cannot imagine just yet so bare with me. Oh and please do comment on anything you want, that's what the comment link is for and, in my experience, it is usually shamefully underused. So, dither no more... :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5199583470212679285-2759896450579104843?l=elinorhurst.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elinorhurst.blogspot.com/feeds/2759896450579104843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5199583470212679285&amp;postID=2759896450579104843&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2759896450579104843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5199583470212679285/posts/default/2759896450579104843'/><link rel='alternate' type='text/html' href='http://elinorhurst.blogspot.com/2008/04/hello-and-welcome.html' title='Hello and welcome'/><author><name>Elinor</name><uri>http://www.blogger.com/profile/16238006038283808291</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
