Archive for the 'Other' Category

29
Jan

decode google maps PolyLines objective C

If you are working on Google maps API and using routes/directions
this will help you decode route polylines
works on MAC OS X and iPhone SDK

-(NSMutableArray *)decodePolyLine: (NSMutableString *)encoded {
[encoded replaceOccurrencesOfString:@"\\\\" withString:@"\\"
options:NSLiteralSearch
range:NSMakeRange(0, [encoded length])];
NSInteger len = [encoded length];
NSInteger index = 0;
NSMutableArray *array = [[NSMutableArray alloc] init];
NSInteger lat=0;
NSInteger lng=0;
while (index < len) {
NSInteger b;
NSInteger shift = 0;
NSInteger result = 0;
do {
b = [encoded characterAtIndex:index++] - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
NSInteger dlat = ((result & 1) ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
b = [encoded characterAtIndex:index++] - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
NSInteger dlng = ((result & 1) ? ~(result >> 1) : (result >> 1));
lng += dlng;
NSNumber *latitude = [[NSNumber alloc] initWithFloat:lat * 1e-5];
NSNumber *longitude = [[NSNumber alloc] initWithFloat:lng * 1e-5];
CLLocation *loc = [[CLLocation alloc] initWithLatitude:[latitude floatValue] longitude:[longitude floatValue]];
[polyLines addObject:loc];
NSLog(@"%f,%f",[latitude floatValue],[longitude floatValue]);
[loc release];
[latitude release];
[longitude release];
}
return array;
}

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google
30
Nov

IIS 6.0 PHP Invalid access to memory location error

installed php 5.2.11 on windows 2003 IIS 6.0 (ISAPI)
encountred following error on phpinfo()
Invalid access to memory location

FIX:
check directory write permissions for following paths in php.ini
upload_tmp_dir="C:\Temp"
session.save_path="C:\Temp"
error_log="C:\temp\php-errors.log"

paths on your php.ini might be different

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google
17
Mar

iPhone cycorder application

I am stunned!
Record video from your iPhone and in very very impressive quality
you can get the application in Cydia search for cycorder

after video is done
SSH to: /private/var/mobile/Media/Videos
to download *.mov file(s) from iPhone
here is one i made

download cycorder video test (mov)

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google
27
Nov

iTunes 64-bit on its way?!

connected my iPhone to charge and i got this pretty message by iTunes

itunes 64bit

am using iTunes 7.5, iPhone 1.1.2 and Vista 64

previous iTunes just gave message that iPhone is not supported.
well if this is true i can finally delete my windows XP.

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google
26
Jul

weird hidden Word document

MS word keeps cache of the document that you are typing in a separate file hidden and with little weird name, usually virus files have such names but this is not a virus
hidden word file

file is undeleteable while MS word is running

this cache comes handy when your computer (most probably windows) carshes or electricity plays with you
next time you open that document (which you were typing while your computer crashed) MS word will automatically detect that file(s) and ask you to save the desired recoeverd file.
word file recovery

you can set the auto recovery file save time in Word options -> save
word options

by default its 10 minutes
word file recovery save settings

you can delete this file or keep its your call, before deleting its wise to check if it contains some data to be recoverd, word probably cannot read those files directly so open the orignal word document and word will see if there is any file for recovery.

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google
22
Jun

Linkin Park or Linkin Fart

i have listened to new Linkin Park album Minutes to midnight, tho LP claims that they have been working on this album from long, but dude they sound more like Linkin Fart, am pretty much disappointed from LP.
They are not the same.

Linkin Park or Linkin Fart

Hope they come up with good stuff next time

FKN Share and Enjoy:
  • blogmarks
  • del.icio.us
  • Furl
  • Reddit
  • Digg
  • Facebook
  • LinkedIn
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
  • Google



March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

No categories

Xbox360

PS3

Hasnat's PSN

Flickr

www.flickr.com