Detaching Far Manager from long-running process on Windows 7

Occasionally├é┬áI launch a program from Far Manager that takes very long to complete. Normally you can use Ctrl+Alt+Tab to “detach” Far from a running process. Technical note #27 explains this well: If a long-running process (for example, archiving) was run in a FAR console, and for some reasons this very instance of FAR is needed […]

Converting .Net DateTime to JavaScript Date

JavaScript Date constructor accepts number of milliseconds since Unix epoch (1 January 1970 00:00:00 UTC). Here’s C# extension method that converts .Net DateTime object to JavaScript date: public static class DateTimeJavaScript { private static readonly long DatetimeMinTimeTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Ticks; public static long ToJavaScriptMilliseconds(this DateTime dt) { return (long)((dt.ToUniversalTime().Ticks […]