Sunday, August 30, 2009

Enabled RDC in Windows 7

I am running Virtual Server 2005 and just installed my Windows 7 operating system. One of the first things I usually do is install the machine additions however, even with Virtual Server 2005 SP1 they didn't want to install on Windows 7. Without the Machine Additions from Virtual Server the mouse was really sensitive. This left me with a problem -- I needed to enable RDC on the box without using the mouse. Here are the hot keys that helped me from the Virtual Server 2005 web interface to enable RDC: 1) Ctrl-Esc (Brings Up The Start Menu) 2) Right Arrow to the Second Vertical Bar in the Start Menu. 3) Up Arrow to the Computer Menu item in the Start Menu 4) Shift-Ctrl-F10 (Brings up the Context Menu) 5) Down Arrow in the Context Menu till you get to properties 6) Enter (to select the properties) 7) Now you get the Control Panel Properties for the Computer 8) Esc to close the Start Menu 9) Alt-Tab Until you select the Control Panel Properties Window 10) Tab a couple of times until you get to the tasks menu 11) Down Arrow the highlight to Remote Settings 12) Press Enter 13) Tab to the Radio Button List that enables the RDC. 14) Use the down arrow to select one of the permission levels 15) Tab to the Ok Button 16) Enter to press Ok 17) Tab to the Ok Button 18) Enter to press Ok for Control Panel Properties for the Computer 19) Ctrl-Alt-Del to get the logoff selections screen. 20) Down Arrow and Press Enter {6230289B-5BEE-409e-932A-2F01FA407A92}

Wednesday, August 26, 2009

Quotes And Google Alerts

This might change in the future, however currently (8/26/2009) Google Alerts doesn't respect quotes like Google Search does. Almost every place I read on the web says that if you quote wrap you term like "Wayne Walter Berry" for Google Alerts it will only find exact matches with that phrase. However, currently this isn't working in Google Alerts. I think that other people that written their blog entries haven't tested this -- they are just parroting the google documentation. Just setting the record straight -- if it isn't working for you, you are not the only one. {6230289B-5BEE-409e-932A-2F01FA407A92}

Tuesday, August 25, 2009

JavaScript Insight With Google Map API

I have a couple hundred markers I want to add to a Google Map via the Google Map API. For each one I want to have a clickable Info Window with a little bit of HTML in the window. The Google Map API function written in JavaScript to do this is:
GEvent.addListener(marker , ‘click’, function() { … } );
The first parameter is the marker instance, the second is the event, and the last parameter is the function to execute when the click event takes place on the marker. However, notice that there isn’t any place to send in parameters. addListener doesn’t have an optional parameters property, and the method doesn’t allow you to create a function that takes parameters – since it wouldn’t know what to pass there. Which leaves me with the problem: how do I pass in the HTML that I want to display on the click? I could create a global array of html data that I fill and reference that global from inside the function, however this is messy. The answer is to tell the marker what the HTML is and then extract it from the marker. However, the marker is of type GMarker which is a Google class. If this was C# I would have to subclass the GMarker object and add another property. However, subclassing (or the equivalent) is way too complicated in JavaScript. The solution is to understand that you can just add a property to an instance of the Javascript object without having to declare the property in the object. In fact you can just tag on the HTML data and get it later – even though if it is someone else’s object. So my code looks like this:
var marker = new GMarker(point);
marker.html = ‘<b>’ + title + ‘</b>’;
GEvent.addListener(marker, ‘click’, function() { this.openInfoWindowHtml(this.html)});
In the function, this refers to the instance of the object which the action was taken, which in this case is the marker. So this.html has the information for this marker’s html, which is displayed in the Info window. {6230289B-5BEE-409e-932A-2F01FA407A92}