Archive for June, 2010

Get Unix Time/ POSIX Time in c#

0

Recently needed to convert the time into Unix format in C#. Since the Unix time format is basically a count of the seconds passed since 1/1/1970 (Unix epoch), this can be easily done using the DateTime object.

int unixTime = (int) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;

If you are trying to convert some other DateTime value to POSIX time, make sure that it is first converted to UTC.

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

Error creating Virtual Port in 64bit Vista/ Windows 7 GPSGate

2

If you getting error 1275 while creating virtual port for GPSGate in Vista/ Windows 7 64 bit, here is the fix from their forums..

If you use 64-bit Vista or Windows 7 please follow those steps.
(If you are unsure, simply install GpsGate normally first, if Virtual ports does not work – follow those steps)
(more…)

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

Casting int or string to Enum

0

Quick note to myself :D

From a string:

MyEnum foo = (MyEnum) Enum.Parse(typeof(MyEnum), yourString);

From an int:

MyEnum foo = (MyEnum) yourInt;

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

Windows 7 – “New txt file” missing from right click menu

0

Few days back realized that somehow I managed to loose the “New txt file” option in the context menu 8O . To fix this

1. Download the fix file given below. (Use Right-click

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

You cannot debug this SWF because it does not contain ActionScript

10

Upgrading from Flash CS4 to CS5 ran into great wall of china again 8O .. really man.. I know web is full of posts from people running into this problem then why the hell can’t Adobe just make the error message a little less misleading :roll: … most common reason for this is the code behind is so big that the compiler is running out of memory while compiling the movie.
(more…)

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

Embedding Fonts in CS5

Font Embedding in Flash CS5

7

Flash CS5 introduces a new way of emebdding fonts and unfortunately it breaks the older way of embedding fonts :( . The older way of embedding fonts which can be found here , does not work anymore for Flash IDE projects though that will still work for pure AS3 projects. I was using this method only in my project but as soon as I upgraded to flash CS5, text disappeared in my compiled movie. Googling pointed me to these two:
(more…)

Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.

  • Cumulus

  • Tweets

Go to Top