14/06/2013 Let’s assume that time frame 1 starts from Start1 and ends on End1 (Time Frame 1 = Start1 – End1) Similarly Time frame 2 = Start2 – End 2 Time Frame 1 and Frame 2 Over Lap IF: Start1 <= End2 AND End1 >= Start2 Time Frames do not overlap IF: End2 < Start1Continue reading “ILT – How to find if two time frames overlap or collide?”
Author Archives: Menol
How to Add/Update/Remove Application Configuration (App.Config) Keys
14/05/2013 How to add new keys to app.config file? Simple, just use this code. When you execute this code, a new key will be added to your configuration file and the given value will be set for it. Important: This code will not change the configuration file you see in the Visual Studio but theContinue reading “How to Add/Update/Remove Application Configuration (App.Config) Keys”
How to force your website to download a file (rather than opening)
07/05/2013 I wanted to add a download link to one of my products. The file was an Windows Installer Package (*.msi). However, FireFox started to open the file on the browser rather than downloading it so when my visitors tried to download the installer they would rather see some gibberish on the browser because FireFoxContinue reading “How to force your website to download a file (rather than opening)”
ILT – How to bring your window (form) to the top C#
2013/04/11 How to bring a window (form) to the top? Or how to make your window active from the code? Simply: call the Activate() function (method) of your form instance. Menol ILT
ILT – Command to lock a windows computer
19/03/2013 How to program your custom keyboard key to lock your computer? How to programmatically lock your computer? How to lock your computer from the run dialog box? How to lock your computer form DOS? Answer: Just use following command rundll32.exe user32.dll, LockWorkStation You can use this on the command prompt, the run dialog orContinue reading “ILT – Command to lock a windows computer”
ILT – Divide and Conquer Strategy – Why it is so powerful
08/02/2013 Divide and Conquer is a very interesting and effective strategy that has been used by many technical experts, leaders, mangers, and warriors through out the world for many years. Following is a story of the famous Sri Lankan king Dutugemunu. Apparently he learnt the lesson from an old woman! King Dutugemunu was fighting hisContinue reading “ILT – Divide and Conquer Strategy – Why it is so powerful”
Replace Function Doesn’t Replace Double Quotation in VBA
13-11-2012 I had to remove all double quotation marks from a string using VBA. I tried to do this by using the Replace function as shown below. Also Note that two double quotation marks are used to represent the quotation mark. This is because the quotation mark is a special character in VBA and weContinue reading “Replace Function Doesn’t Replace Double Quotation in VBA”
ILT – How To Change SQL Server Default Database?
16-10-2012 I have been annoyed by having to change the database from the available databases drop-down whenever I want to write a query. This was because the default database which is always selected was the “Master” database which I never use. If you had the same problem then thisContinue reading “ILT – How To Change SQL Server Default Database?”
Virtual Laser Keyboard – How it works.
20-02-2009 Computer is the electronic device that has been evolved in the most rapid phase over the time. All parts that all together compose the computer now have come a very long journey when compared with their ancestors. The keyboard, our topic, the most widely used input device in the world, has no exception forContinue reading “Virtual Laser Keyboard – How it works.”