Opening “Computer” or drive list screen by default in Windows 7

by vj 28. June 2010 11:24

If you are looking for making Windows 7 open the list of drives screens (“Computer” or “My Computer”) change the shortcut command to

%windir%\explorer.exe /e,::{20d04fe0-3aea-1069-a2d8-08002b30309d}

Tags: ,

Workarounds | References

Taming the Google Search and IE search provider

by vj 14. June 2010 22:40

I really hate Google search service on one issue, the main search page by default chooses the language of the country of request origin. If Google had to proactively guess the language of my choice, they would have better used the “Language Preference” that I have set in the browser, but instead they blindly stuff everybody up with the language of the country of the requests origin.

For this reason I have set my home page to http://www.google.com/ncr which opts-out the ultra smart Google logic of throwing you onto the local countries locale search page. I believe NCR stands for No Country Redirect, but that expansion was not from an official channel.

This is more painful when you are searching the web using browsers inbuilt “Search Providers”. The user is simply thrown into the result page that is based on the foreign language, and clicking on the Google logo takes you to the main page with all your search result discarded into the void.

For Firefox, Opera and Chrome it was easy for me to customize the “Search Provider” through the built-in interface of the browsers, but on IE 8 there is no option to edit the exiting “Search Providers” (you can add, remove, enable, disable, move up, move down, but no Sir you cannot edit it!).

Fed-up with this restriction I went around the net to find the location where IE stored its Search Providers list and came across this blog post which described how to add default search providers by directly making entries in the registry.

It turns out the repository for all search providers for IE is located at

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]

so, I edited my existing entry for Google’s provider from

http://www.google.com/search?q={searchTerms}&sourceid=ie7&rls=com.microsoft:{language}:{referrer:source}&ie={inputEncoding?}&oe={outputEncoding?}

to

http://www.google.com/search?hl=en&num=50&q={searchTerms}&sourceid=ie7&rls=com.microsoft:{language}:{referrer:source}&ie={inputEncoding?}&oe={outputEncoding?}&safeSearch=false&safe=images&newwindow=1&gl=us

Now it stills returns me the results from the local data centre, but at least the interface is in English and I get to have 50 results in one go and results are set to open in new window and that's neat!

References:

Steve Novoselac for providing with the registry location details of IE’s search providers

Google Search Protocol Reference

Peter “TCSM” Wailes for Google search parameter debunking

 

Cheers!

Tags: , ,

Workarounds | Technology | References

DVCS it is!

by vj 26. April 2010 19:48

After CodePlex announced that they are supporting Mercurial, I have been seeing a lot about it on the net. In the following months I am slowly planning to switch over to Mercurial from my existing system. Below are few links that I found useful in understanding and evaluating Mercurial:

Fog Creek has released a source control system named Kiln based on Mercurial, and Joel Spolsky has posted a very nice tutorial / introduction to Mercurial.

TekPub has published an introductory video on using Mercurial along with CodePlex.

Get one of the following Visual Studio plug-ins for using Mercurial as your source control system

Visual HG

Mercurial SCC

I am also starting off with an open source project for a remote service administration requirement at the institute I work, for which details will be provided in the short future.

Happy DVCSing! :)

Tags: ,

References | Technology

Digging into old components through MSIL

by vj 22. April 2010 20:57

Yesterday and today I had to deal with an old component who’s source code has already been ported from .net framework v1.1 to v3.5 (most of them rewritten from scratch). This asp.net based component was working fine till sometime last week and then suddenly started throwing up exceptions. Due to some legacy dependencies the web app had to be run in v1.1 and I do not have VS2003 with me.

The old architecture worked in a manner where a particular variable was passed from web app 1 to web app 2 through query string and the web app 2’s initial page stored that variable as a session variable for the rest of its pages to use them.So, when we were going through the initial steps of debugging the issue we figured out that a session stored variable was not getting passed to a stored procedure, and further investigation showed that for some odd reasons the session was getting expired and taking all the session stored variables into the oblivion along with it.

In order to get the application up and running in the shortest time, all we needed to do was change the stored procedure value to be taken from query string instead of the session variable. But since I didn’t have the means to recompile the source code into its own framework v1.1 form, I thought the best option would be to find tools which would allow me to just change the IL directly on the assembly.

After researching a while I found 2 great tools for it (apart from the ildasm / ilasm tools of the visual studio’s tool chest):

1. Dotnet IL Editor
2. RelexIL Addon for Reflector

Since I am not a pro on MSIL editing, I choose to go with the ReflexIL add-on for Reflector. After adding the add-on to the Reflector, I was able to locate the area that needed modification and carry out the changes.

Cheers to Jb Evain for the Mono.Cecil and Sebastien Lebreton for the ReflexIL!

Tags: ,

Technology | References

Google public DNS servers

by vj 14. December 2009 03:27

This is nice! When you are trying to increasing every possible way of speeding up your browsing speed, DNS servers are also a vital area to focus. I have so far used OpenDNS, but there had been few privacy concerns with them. Now with Google providing public DNS service I hope its going to be all good.

Make use of Google’s public DNS by setting primary / secondary DNS server IP’s to:

8.8.8.8

and

8.8.4.4

 

Good day! :)

Tags: ,

Technology | References

Starting with Ajax.net

by vj 12. September 2009 20:10

Starting off with ajax.net development for a project requirement. To wet the legs I stated off with a hello world application, and faced few issues. Thankfully the workarounds were easy and took very little time. This post is for reference purpose to others who may face the same problem.

 

Tools:

Windows XP SP3

MS Visual Studio .NET 2008

MS SQL 2008 Dev. Ed.

 

Game:

  • Created an empty folder D:/Projects/Test/Ajax/Hello1
  • Created virtual folders /AjaxTest –> D:/Projects/Test/Ajax/ and /AjaxTest/Hello1 –> D:/Projects/Test/Ajax/Hello1
  • Opened VS, opened website /AjaxTest/Hello1
  • Added new AJAX Web Form (Default.aspx)
  • Went to design view and was presented with the following error on the design page:
    • image
  • Since it was reference error, I tried adding an empty Web Configuration file and reloaded the web form in design view and it solved the issue
  • Added an update panel, a label and a button to the web form
  • Added an event to the button click to display a message on the label
  • Loaded the web form on the browser and was presented with the following exception:
    • The path '/AjaxTest/Hello1/App_GlobalResources/' maps to a directory outside this application, which is not supported.
  • Did some research online and found that adding a trailing slash to any virtual application home folder in the current web sites path causes this problem.
  • Removed the trailing slash of AjaxTest virtual folder
  • All is well now! :)

Happy coding!

Tags: ,

Technology | References

f.lux your system and protect your eyes

by vj 28. July 2009 11:38

If you are like me who like to work at the wee hours (just because sometimes you just get those cranky workarounds and logic just about that time ;) ) you may have noticed that the screen brightness of your laptop is too bright and painful. f.lux is a freeware application which when installed adjusts your monitor brightness and colour warmth according to the current time of the system.

 

Give it a go at http://www.stereopsis.com/flux/

Tags:

References

US Zip/City/County/State spatial data all ready for your SQL Server 2008… Just download, SQLCMD/import and go

by vj 22. April 2009 03:16

This is so cool, if we could get a similar data made available for GCC my life would be so easier :D

 

[via] Geeks are Sexy

 

CodePlex - US Census Data for SQL Server 2008

Project Description
This is a repository for US Census Data for SQL Server 2008 with spatial information. Some of the data that is and will be included will be for states, counties, cities, and zip codes. The project will be updated as the data is available in SQL Server 2008 format.

Please note that this tables contain geometry data types made for the "Flat Earth Model."

Data downloaded from http://www.census.gov and imported using the SQL Server 2008 Spatial Tools (http://www.sharpgis.net/page/SQL-Server-2008-Spatial-Tools.aspx) by Morten Nielsen

Florida

FloridaCounties "

…”

US Census Data for SQL Server 2008 - State and County Table

“…

State Table
source code, 1785K, uploaded Today

County Table
source code, 14132K, uploaded Sat

Release Notes

The State and County Table are based on the 2000 Census Data and was normalized to the best of my knowledge. Please note that the the County table requires the State table. Both scripts contain the create and insert of the data.

The State geometry was derived by grouping all of the counties of each state using the User Defined Function found here: http://conceptdev.blogspot.com/2007/12/sql-server-2008-geometry-stunion.html

…”

US Census Data for SQL Server 2008 - Version 0.0.1.0

"...

State
source code, 1528K, uploaded Today - ...

County
source code, 7148K, uploaded Today -...

City
source code, 12258K, uploaded Today - ...

ZipCode
source code, 42531K, uploaded Today - ...
Release
Notes

Changes:
Added the ZipCode table
Modified all scripts
to include the spatial index
Compressed the files to a rar to make the files
smaller#

..."

A number of the podcasts I listen to have been covering SQL Server 2008’s spatial data type, so when I saw this I knew I had capture the data and mention it…

Update 4/20/2009 @ 7:15am:

There's now a City table/download (21860K) too... ;)

Update 4/20/2009 @ 4:20PM:
Added 0.0.1.0 block, which includes ZipCode data!

US Zip/City/County/State spatial data all ready for your SQL Server 2008… Just download, SQLCMD/import and go
Greg (noreply@blogger.com)
Sun, 19 Apr 2009 19:18:00 GMT

Tags: ,

Technology | References

If - Rudyard Kipling

by vj 27. February 2009 20:31

Every sentence is a gem…


 

 

If you can keep your head when all about you
Are losing theirs and blaming it on you;
If you can trust yourself when all men doubt you,
But make allowance for their doubting too;
If you can wait and not be tired by waiting,
Or, being lied about, don't deal in lies,
Or, being hated, don't give way to hating,
And yet don't look too good, nor talk too wise;

If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
If you can meet with triumph and disaster
And treat those two imposters just the same;
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to broken,
And stoop and build 'em up with wornout tools;

If you can make one heap of all your winnings
And risk it on one turn of pitch-and-toss,
And lose, and start again at your beginnings
And never breath a word about your loss;
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on";

If you can talk with crowds and keep your virtue,
Or walk with kings - nor lose the common touch;
If neither foes nor loving friends can hurt you;
If all men count with you, but none too much;
If you can fill the unforgiving minute
With sixty seconds' worth of distance run -
Yours is the Earth and everything that's in it,
And - which is more - you'll be a Man my son!

 

Technorati Tags: ,,

Tags:

References

TED | Talks | Paul Stamets: 6 ways mushrooms can save the world

by vj 15. May 2008 08:56

Quite an interesting video

 

Tags:

References

Connecting to Remote IBM WebSphere MQ Server

by vj 13. May 2008 23:14

The below post will provide a "hello world" kind of introduction to connecting to a remote IBM WebSphere Message Queue server using client application written in C#.

Points to note:

  • Server and client should have a common OS login name. The passwords can be different between the server and client, what matters is that the login name should be identical.
  • The login name you have selected to use should be part of the MQM group on the MQ server, or it should be explicitly given permission for querying the Queue manager and the queue.
  • I have come across code on the web where they have mentioned how to connect to MQ server even with a different OS login name from the client side by explicitly setting the login and password onto the MQEnviroment class static properties, but it has not worked for me till now. So, my example code would be assuming that there is an identical login name between the client and server.
  • Make a note of the Server-connection channel name (case sensitive), queue manager name (case sensitive), queue name (case sensitive) from the server side.
  • You would need to install at the least the client package of MQ onto the client machine, the client code would be using the library from this installation to connect to the server.
  • A reference to amqmdnet.dll would have to be added to the client project, its located in <MQ Installation Path>\bin\amqmdnet.dll

 

Now for the code

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:  using IBM.WMQ;
   5:   
   6:  namespace RemoteMQTest {
   7:      class Test01 {
   8:          static void Main(string[] args) {
   9:              MQEnvironment.Hostname = "My_Server";
  10:              MQEnvironment.Channel = "My_Channel";
  11:   
  12:              string mqQueueManagerName = "My_Q_Manager";
  13:              string mqQueueName = "My_Queue";
  14:              int openOptions = MQC.MQOO_INPUT_AS_Q_DEF;
  15:   
  16:              MQQueueManager qMgr = new MQQueueManager(mqQueueManagerName);
  17:              MQQueue q = qMgr.AccessQueue(mqQueueName, openOptions);
  18:   
  19:              MQMessage message = new MQMessage();
  20:              message.Version = 2;
  21:   
  22:              q.Get(message);
  23:   
  24:              Console.WriteLine("I got the message : {0}", message.ReadString(message.DataLength));
  25:              message.Seek(0);
  26:   
  27:   
  28:              q.Close();
  29:              qMgr.Close();
  30:              Console.WriteLine("done!");
  31:          }
  32:      }
  33:  }

Note that in line 25, we are explicitly making the message to seek back to 0th byte.

 

Happy coding Happy

Tags: ,

Technology | References

User Interface Prototyping with Powerpoint

by 30. April 2008 11:24

In the hunt for improving my development methodologies and techniques I recently came across on the concept of using Powerpoint for prototyping the user interface of the application that's yet to be developed. It is quite an interesting concept, apart from getting a look into the idea Long Zheng has provided a template package in  Powerpoint which can be used for designing such prototypes.

I am already loving this idea and planning to use from the current development cycle.

Tags: ,

Technology | References

Downloading YouTube videos as mp4

by 20. April 2008 00:51

Of the various techniques proposed on the www for downloading YouTube videos, I find the one mentioned at Download YouTube videos as MP4 Files post very convenient and sure to work. If you are using Safari or Firefox as your browser all you need to do is drag YouTube Video Downloading Link onto your quick bookmark and then visit any video on the YouTube and download it by clicking on the added link.

 

via Geeks are Sexy

Tags:

References

Essential Tools - Part 2

by 11. April 2008 12:57

Okies, carrying on with the series we will look into expanding on the Essential tools - part 1:

 

StExBar (Freeware / Open source)

StExBar is a plug-in for the Windows Explorer, which adds much needed functionality to the explorer / folder view. It provides many useful commands for your everyday use of Windows explorer. And you can add as many custom commands on your own as you like.

From the product site :

Have you ever needed to open a console window while you were using the explorer? And to have that console already set to the directory you're showing in explorer right now? Well, StExBar provides that with one simple mouseclick. There's also a hotkey defined for this: simply press Ctrl-M to open the console.
A 'lightweight' console is also available. Simply enter the command you like to execute into the edit box on the right of the
StExBar and hit enter. The command will be executed in the system console.

Have you ever needed to have the name or full path of one or more files in another application? Ctrl-Cdoesn't work here, that won't copy the file path but the file itself. StExBar comes to the rescue. It provides two commands, one to copy all selected file/foldernames to the clipboard, the other copies the whole paths of all selected items. To make it even more easier to use this, a hotkey is defined Ctrl-Shift-C which copies the selected paths.

 

Creating new folders is a common task in explorer. But to actually do that, you have to right-click on a folder background, choose "New" from the context menu, wait until the submenu finally appears, then choose "Folder" from that submenu. Not anymore! StExBar provides you the same with one easy click. Or even faster with the assigned hotkey: just press Ctrl-Shift-N and you have a new folder created in the current directory.

more info...

 

 

 

Sysinternals Suite (Freeware)

Occasionally Microsoft does make good moves, and one such thing is acquiring Sysinternals. They had wonderful set of tools by Mark Russinovich, and after he joined MS a suit of all Sysinternals tools have been released. It's a windows developer / debuggers and administrators dream toolset. Head over to Sysinternals Suite page to check out all the available tools and download them to your hearts content.

Tags:

References

Essential tools - Part 1

by 8. April 2008 10:40

Our day to day life becomes a lot easier when we make use of the proper tools to help us complete the task at hand. I am planing to post in about few tools which forms an essential part of my tool chain, most are free tools but sometimes there do come in gems which makes you to take out your credit card.

 

Below are the ones for today:

 

Piriform CCleaner (Crap Cleaner) (Freeware)

image

 

CCleaner is a freeware system optimization and privacy tool. It removes unused files from your system - allowing Windows to run faster and freeing up valuable hard disk space. The best function I like in CCleaner is that it provides you with the list of currently installed software list, the same one you get from Control Panel -> Add Remove Programs but a lot faster than the 'Add Remove Programs' applet. So, if you are a developer who always likes to check out various tools and find that removing some of them from 'Add Remove Programs' is a pain because it takes a long time to load, then I would strongly recommend this one. Apart from providing the previously mentioned function, it also provides option to clear browser cache and other MRU lists present on the system.

 

Eset NOD32 Anti-Virus (Commercial)

image

One of the few applications that I am ready to pay for, I have tried out various free and commercial options (commercial ones mainly as part of corporate subscriptions) but this one beats all of them by a mile. From my personal experience this is the best anti-virus there is todate, which does a good job of keeping the bad binaries at bay without taking up too much resource on your system.

 

MWSnap (Freeware)

image

Another gem of a software, a very light-weight application that provides screen capturing / on-screen measurement (ruler) / color picking / zoom tool. It also supports global hotkey's which makes your life a lot easier when you want to create an online documentation.

 

Unix and Linux tools for Windows (Freeware / Open source)

Are you a platform independent developer who work on both unix / linux and windows? Do you miss the powerful command line tools present in linux on windows? worry no more, you can get the following tools already ported to win32:

bc-1.05
bison-1.28
bzip2-1.0.2
diffutils-2.7
fileutils-3.16
findutils-4.1
flex-2.5.4
gawk-3.1.0
grep-2.4.2
gsar110
gzip-1.2.4
indent-2.2.9
jwhois-2.4.1
less-340
m4-1.4
make-3.78.1
patch-2.5
recode-3.6
rman-3.0.7
sed-3.02
shellutils-1.9.4
tar-1.12
textutils-2.1
unrar-3.00
wget-1.8.2
which-2.4

These are native windows binaries. so you do not need *nix simulation environment like cygwin or uwin.

Get it from (with source) : http://sourceforge.net/project/showfiles.php?group_id=9328

 

We will cover more in the future parts, till then bye and have a nice day!

Tags:

References