11 February, 2008

Some stuffs on the internet for you



When you begin using the Internet for working or home, surely you should utilize Internet's resources to improve productivity. Maybe you've never realized that your work can be better with some services on the net.

Let I give an example for you: when you're working, your task still wasn't completed but you need to go home at the moment. Of course you want to save current working progess in order to continue to work at home. But how can you save your progess ? Sure, Internet's resources will take this role.

As you can see in below example, your productivity can be improved when you use properly service on net. I will show you some stuffs for your convenience:

Storage
There're many ways to allow you to put something on a host and you can get it back latter. The simplest is using mail (Gmail, Yahoo) , or you can go to some storage services like Rapidshare, Megashare and Windows Live SkyDrive (it's free and I personally prefers SkyDrive to others ^^). If you want more, you can try Google Code or Google Page Creator and you only need using storing file feature.

Media file storage
You need put your images, music, flash on net. Yes, there're always a plenty of services to help you. But I only show you some helpful site: Picasa Web Albums ,Flickr for picture, Slide for making slide, imeem for music.

More ...
I know here're many, many stuffs on the Internet but it's great if you find it out by yourself. To me, I only knows these stuffs and need to find more, like you ^^


Powered by ScribeFire.

04 February, 2008

Convert a datetime string into DateTime object

The problem: you have a string presenting a datetime value and you want convert it into DateTime object.

An answer: of course, the simplest way is you can parse that string into your fields and contruct new DateTime object then. But if the string is something like "12/8/2008 23:17", so how can you parse this string into month,day,year,hour and minute.

But .Net Framework already support you for such task. You can use DateTime.ParseExact() for this purpose. Here is sample code

1 DateTime convertedDateTime = DateTime.ParseExact(

2 "20/08/2008 13:10",

3 "MM/dd/yyyy HH:mm",

4 System.Globalization.CultureInfo.CurrentCulture);

5 Console.WriteLine(string.Format("Day: {0}", convertedDateTime.Day));

6 Console.WriteLine(string.Format("Month: {0}", convertedDateTime.Month));

7 Console.WriteLine(string.Format("Hour: {0}", convertedDateTime.Hour));


Pay a little attention in line 3 & 4, you must provide exactly format of your date time string. Acctually, I don't know why we need an IFormatProvider in here :-) (so I use default one as you can see)

Hope this tip will help you


Powered by ScribeFire.