Skip to main content

Posts

Showing posts from March, 2012

XML Parser

If XML inside bundle : NSString  *pathStr = [[[ NSBundle   mainBundle ]  resourcePath ]  stringByAppendingPathComponent : @" Mobile_amountDue.xml " ];            NSData  *dataXml = [ NSData   dataWithContentsOfFile :pathStr];      url  = [[ NSURL   alloc ]  initWithString :pathStr];      xmlParser  = [[ NSXMLParser   alloc ]  initWithData :dataXml];      parser  = [[ XMLParser   alloc ]  initXMLParser : @"success" ];     [ xmlParser   setDelegate : parser ];     [ xmlParser   parse ]; if ([ newsArray   count ]> 0 ) { [ newsArray   removeAllObjects ];  }      newsArray =[ parser . parsedXML   mutableCopy ]; XML read from URL : #define  URL_STRING  @ "http://www.espncricinfo.com/rss/content/story/feeds/0.xml"...

Folder list in SVN URL

Return you the list of root folders and all the inside folders too: svn list $REPO_URL -R | egrep "/$" Return you the list of root folders only: svn list $REPO_URL | egrep "/$"   Example: svn list https://subversion.assembla.com/svn/dipakmishra | egrep "/$"

Forgot password

Reset Mac Password – without a CD Using a pretty nifty trick you can reset a forgotten Mac password without a Mac OS X installer CD/DVD. The steps may seem a little intimidating at first but I assure you it’s easy if you follow them exactly, here is exactly how to do this in three stages: Stage 1) Boot into Single User Mode and remove a setup file Restart the Mac holding down the  Command+S  keys, this will take you into Single User Mode and it’s Terminal interface You’ll need to check the filesystem first: fsck -fy Next, you must mount the root drive as writeable so that changes will save: mount -uw / Now, type the following command exactly, followed by the enter key: rm /var/db/.applesetupdone After removing the applesetupdone file, you need to reboot, type ‘reboot’ and hit enter Stage 2) Create a New User Account upon System Boot You aren’t finished, but the hard part is now over – no more command lines, you’ll now be in the familiar Mac OS X GUI to finis...