Java Dates

For own documentation purposes.

private String returnDMY(Timestamp date) {
String str = "";
if (date != null) {
String d = date.toString();
// System.out.println("returnDMY (start): "+d);
int year = Integer.parseInt(d.substring(0, 4));
int month = Integer.parseInt(d.substring(5, 7));
int day = Integer.parseInt(d.substring(8, 10));
int hours = Integer.parseInt(d.substring(11, 13));
int mins = Integer.parseInt(d.substring(14, 16));
int secs = Integer.parseInt(d.substring(17, 19));

Calendar gc = new GregorianCalendar(year, month - 1, day, hours,
mins, secs);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
str = sdf.format(gc.getTime());
// System.out.println("returnDMY (end): "+str);
}
return str; // returns empty String if DB field is null
}

private Timestamp plusOneYear(Timestamp date)
{
//2011-03-28 00:00:00.0 - Sample timestamp
String d = date.toString();
//System.out.println("Timestamp toString():"+d);
int year = Integer.parseInt(d.substring(0, 4));
int month = Integer.parseInt(d.substring(5, 7));
int day = Integer.parseInt(d.substring(8, 10));
int hours = Integer.parseInt(d.substring(11, 13));
int mins = Integer.parseInt(d.substring(14, 16));
int secs = Integer.parseInt(d.substring(17, 19));

Calendar gc = new GregorianCalendar(year, month - 1, day, hours, mins, secs);
gc.add(Calendar.YEAR, 1);

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String str = sdf.format(gc.getTime());
//System.out.println("PlusOneYear: "+str);

return Timestamp.valueOf(str);
}

Tagged ,

Clearing iPhone’s ‘Other’ space

Requires a jailbroken iPhone, with iFunBox installed.
My iTunes version: 10.3.1.55, using iPhone 4.

  1. Connect iPhone to PC and launch iFunBox
  2. Navigate to [iTunes Control], and then [Music Control] folder.
  3. Delete all sub-folders, sub-directories inside [Music Control] folder
  4. Disconnect and close iFunBox, go to iTunes, and sync your iPhone WITHOUT the music (make sure to uncheck the sync music choice)
  5. Disconnect iPhone. Reboot iPhone. Reconnect phone to PC again.
  6. Launch iTunes, sync iPhone with everything you want (including music, make sure to check it again)
  7. There should be a significant drop in the OTHERS space indicator in iTunes.
Tagged , ,

Guitar Amps and Effects for iPhone, iPod and iPad

Just learnt that there are guitar amplifier apps on the iOS devices. I’ll give these apps a test run on my iPad and iPhone before getting one of those mini portable guitar amplifiers.

Amplitube

Amplitube (iTunes $19.99)
Amplitube (iTunes Free)

The Amplitube iRig costs like SGD$54 on my local Apple Store.
Maybe I should get the replica from DealExtreme instead.

StompBox

StompBox for iPad (iTunes $19.99)

Other Amplifier apps

AmpKit+AmpKit+ (iTunes $19.99/ AmpKit Free)

PocketAmp (iTunes $4.99/ Free lite version available)

Tagged

New apps on my iDevices

Planet Waves Guitar Tools

(iTunes $1.99)

Gibson Learn & Master Guitar Application

(iTunes Free)

EQu – the quality equalizer

(iTunes $2.99)

Tagged

Impulsive buys and hoots

HP DV6-6105tx

20110914-121110.jpg

Intel i7-2620M
8GB DDR3
ATI Radeon HD 6770 1GB DDR5
15.6″ HD LED
Blu-ray player

Funan, 3 weeks before IT Show :(
Damage: $1499

Just Mobile Alupen replica

20110914-121126.jpg

Damage: USD$5 (DealExtreme)

FiiO E5 Portable Amplifier

20110914-121132.jpg

Went to Adelphi to audition some headphones. The best pick for the intended budget range was the Alessandro MS-1i open headphones but then I have absolute no reason to get them. Got the Fiio portable amp to match my IE2s instead. Happy with the extra boost.

Damage: USD$17.41 (DealExtreme)

Craftsman ST30, Line 6 Spider IV 15

20110914-121211.jpg

Suckseed + Thai pubs =  Thai pop.
Experimental + tight budget = ST30 package from City Music.

Craftsman ST30 Black Strat copy
Line 6 Spider IV 15W Amplifier
Korg GA-1 Solo Tuner
Guitar Bag
Guitar Cable
Picks
Damage: SGD$307

Add: Hercules electric guitar stand GS402B $24 from Ranking Sports and Music Supplier, Bras Basah Complex

Tagged ,
Follow

Get every new post delivered to your Inbox.