Thursday, 5 December 2013

Convert any Windows app or script to a service

I've just found very nice utility allowing to convert any Windows application or script into a Windows service:
http://nssm.cc/
NSSM stands for "the Non-Sucking Service Manager"
It has many clever options for such a small and lightweight application (230k EXE file)
Web site is brief but explains all important ideas.
I'll definitely use this utility instead of other "reinvented wheels".

Tuesday, 12 March 2013

Programming in HTML5 with JavaScript and CSS3 (70-480)

Just passed another MS Exam: 70-480 "Programming in HTML5 with JavaScript and CCS3"
About two months ago MS sent me an offer for a free exam and I wanted to try this new exam and new examination workflow with new types of questions.
It was quite simple to pass in my opinion.
I watched this set of video lessons: https://www.microsoftvirtualacademy.com/training-courses/learn-html5-with-javascript-css3-jumpstart-training
Also I read this book: http://diveintohtml5.info/
So these two sources of information plus some experience of JavaScript programming was sufficient to pass the exam.

Tuesday, 29 January 2013

How to execute different code if your .NET component is used within web application

I've just discovered a tiny workaround helping me to execute different code inside of .NET component if it is used within a web application:

bool webMode = (System.Web.HttpContext.Current != null);

if (webMode)
{
    // code for web application
}
else
{
    // code for all other types of apps
}

Probably it has some drawbacks and hidden pitfalls but so far it works well...