Disable Windows Key and Alt Tab using AutoHotkey

AutoHotkey script to disable Windows key, Windows key + Tab and Alt + Tab key, useful to prevents accidentally pressing the keys when playing games, etc . . . Disable Alt+Tab ;!Tab::Return LAlt & Tab::Return ; Disable Windows Key + Tab #Tab::Return ; Disable Left Windows Key LWin::Return ; Disable Right Windows Key ;RWin::Return The script above will disable Left Windows key and Left Alt + Tab key only, if you would like to disable both alt tab keys uncomment the following line:...

October 31, 2015 · Sebastian

Reset jQuery UI Dialog Position on Open

If you have a jQuery UI dialog and wanted to reset its position every time the dialog is re-opened, you can add custom function to reset its position in the open event. This can be useful if you use the close method to close the dialog instance and intend to re-use the dialog box without re-initializing it again, i.e: myCustomDialog.dialog("open"), as the instance is not removed and the next time you re-opened the dialog its last position will be retained to the position before you close the dialog box....

October 19, 2015 · Sebastian

Using SqlParameter with SQL’s IN Clause in C#

Using SqlParameter in SqlCommand is a great way to pass variable into SQL statement and prevent SQL Injection, it is rather simple to implement as well, basically all you need to do is to declare the parameter name in your SQL statement or stored procedure and make sure that you add the parameter with the specified parameter name into the SQL command parameters. Here’s an example of basic implementation of SqlParameter:...

August 8, 2014 · Sebastian

Initialize New Anonymous Type on VB.NET

This code snippet will shows you an example on how to initialize a new anonymous type and define the properties while at it as a function parameter in Visual Basic .NET. The example used is based on Flurl library by tmenier, and URL builder for .NET check it out at the Project’s GitHub Page, it’s pretty neat. Dim url = "http://www.some-api.com".AppendPathSegment("endpoint").SetQueryParams(New With { Key .api_key = ConfigurationManager.AppSettings("SomeApiKey"), Key .max_results = 20, Key ....

July 31, 2014 · Sebastian