Archive for 2005
Internet Newbie? Start here.
There are a gazillion tutorials online that explain how to use the Internet. I stumbled across one called Basic Web Lessons that looks organized, so I thought I would share it.
It happens to be on the AARP website along with many other ‘how-to’ articles.
Take a read and see what you think!
Open Files. Fast.
The Windows “Send To” context menu item is a great thing. But, it can be made even more useful. You can actually add any program to the list of applications that a file can be sent to. When editing my programming files, I like to right-click and send them to Notepad, for example. Fast and easy.
To set up the “Send To” menu with your personal preferences, create a shortcut for the applications, then copy those shortcuts to C:\Documents and Settings\<userid>\SendTo. You can also delete any shortcuts you don’t want from that folder. Less clutter = more productivity!
To make the shortcut available for all the users of your computer, copy it to the C:\Documents and Settings\All Users\SendTo directory. Note: By default, the “Send To” directory isn’t in this location and will need to be created.
Protect Your Investment
Just launched, this UK government- and business- sponsored website has it all for any computer user to understand how to protect their PC and the data inside it.
The information on the site, named Get Safe Online, is universal. It can be applied to anyone with any computer — though some of the content is directed toward PC users.
Learn definitions of terms, how to surf the Internet safely, securing your network and more. This is a site to bookmark!
XP Mods for Work or Play
There are numerous ways to customize your home or business computer to make computing fun and efficient. Windows XP has many features that can be adjusted. Initially, the user interface is a great place to start making changes. This will help increase familiarity with Windows, as well as add personality to the machine.
TweakXP is a comprehensive site offering tips and other helpful information on how to adjust Windows to fit specific computing styles. Take a look at the User Interface category and go to town!
Dynamic Sorting in SQL Stored Procedures
One of the biggest limitations of using Stored procedures vs. dynamic SQL is the severe restrictions of sorting. In SQL Server it is not possible to programatically specify a sort order such as this:
Order By @SortCol1 @Direction, @SortCol2, …
There is however, a way of writing a Stored Procedure sort that does the equivalent, allowing you to pass the sort order as a parameter. Admittedly it’s not ideal, but it is much faster than re-sorting the results using client-side code, XSL, or many of the other alternatives. To accomplish this all you need to do is define one or more calculated fields in your query, and a parameter to control them.
For instance:
create procedure X
@P1 int,
@P2 char(10),
@SortOption
tinyint =0
as
Begin
Select A, B, C,
case @n
when 0
then convert( char(10), A )
when 1
then B
when 2
then convert( char(10), C )
else ‘ ‘
end as SortCOlumn1,
case @n
when 10
then convert( char(10), A )
when 11
then B
when 12
then convert( char(10), C )
else ‘ ‘
end as SortCOlumn2,
where B=@P2 or A=@P1 or …
order by SortColumn1 asc, SortColumn2 desc
End
By passing in a value for @SortOption you can indirectly control which field is used for sorting. Note that all the choices should be converted to the same datatype, I found that SQL Server give syntax errors if you don’t. Also be sure to use the else ‘ ‘, this allows the first sort to be ignored when you want to sort in descending order, and vice versa.
So there you have it, once compiled this solution is quite efficient. I don’t have any numbers handy to prove it (yet), but initial impressions were that it would easily beat sorting the end results in an XSL transformation or in a .Net dataview object.
Phishing on the Pharm
The influx of e-mail messages that I receive from fake entities claiming to be real ones is mind-boggling.
In the past few months, I received several messages claiming to be sent from:
- a major bank
- eBay
- PayPal
- IBM
In all cases, they wanted me to “click here” to fix my account problem. Since I know better, I either deleted the messages, reported them, or both.
What is Phishing and Pharming?
Phishing attacks use both social engineering and technical subterfuge to steal consumers’ personal identity data and financial account credentials. Social-engineering schemes use ’spoofed’ e-mails to lead consumers to counterfeit websites designed to trick recipients into divulging financial data such as credit card numbers, account usernames, passwords and social security numbers. Hijacking brand names of banks, e-retailers and credit card companies, phishers often convince recipients to respond. Technical subterfuge schemes plant crimeware onto PCs to steal credentials directly, often using Trojan keylogger spyware. Pharming crimeware misdirects users to fraudulent sites or proxy servers, typically through DNS hijacking or poisoning. — Anti-Phishing Working Group
The FTC offers some tips for identifying these e-mail messages so that you don’t fall into the trap.
I’m on the look-out.
A non-abrasive Ajax.
Buzz, buzz, buzz… Ajax. A recently coined term for combining JavaScript with XMLHttpRequest technologies, coming to us from AdaptivePath.
In their essay on Ajax, the definition is:
Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:
- standards-based presentation using XHTML and CSS;
- dynamic display and interaction using the Document Object Model;
- data interchange and manipulation using XML and XSLT;
- asynchronous data retrieval using XMLHttpRequest;
- and JavaScript binding everything together.
The main benefits to Ajax are: minimized use of server resources and, as a result, performance. Read this blog entry for a more detailed explanation (and a .NET slant).
Want to see it in action? Check out: Google Suggest and Google Maps.
You Be the Guru
With time, all things are possible.
When it comes to using a PC, it’s worth taking time to master the skills that can make you the Tek. Once you do, though, think long and hard before giving out your phone number.
Here’s a compiled list of 30 skills that will have you well on your way to mastering the machine.
Shortcut Icons For Your Site
Internet Explorer supports a feature that allows an icon to display with your
website’s shortcut link. If you bookmark our home page, you can see it in action.
Microsoft explains how to reference your shortcut icon, but you still have to convert
your graphic to an icon file type. Installing the icon is simple and there’s a
very simple utility on the Internet that can help.
Visit HTML-Kit’s FavIcon from Pics page and get your shortcut icon working today!
DHTML Behaviors
DHTML Behaviors are useful features utilized by Internet Explorer. They’re often overlooked because other browsers don’t support them. Usage, therefore, is generally limited to intranet applications where the users’ configuration is homogenous and controlled.
DHTML Behaviors are used for associating code with an HTML tag through a CSS file. For instance, putting the following style into either a CSS file or directly into a <style> tag will associate the code inside the .htc file with the anchor tag.
A {
BEHAVIOR: url(../css/LinkBehave.htc)
}
The code inside the LinkBehave.htc file:
< PUBLIC:COMPONENT NAME=”LinkBehave” lightWeight=”true” >
<ATTACH EVENT=”onclick” HANDLER=”DoClick” />
</PUBLIC:COMPONENT>
<SCRIPT LANGUAGE=”javascript”>
<!–
function DoClick() {
if (window.event != null) {
if (window.event.shiftKey != 0 ) {
window.event.cancelBubble = true;
window.event.returnValue = false;
return false;
}
}
return true;
} //–>
</SCRIPT>
Once loaded, the DoClick function is called every time the user clicks on an anchor tag, any anchor tag. When DoClick() is called, it checks to ensure the shift key is not pressed. If it is, it ignores the click, preventing IE from opening the link inside a new window. This is handy when you’re developing an intranet application that needs to prevent the user from performing certain actions.
Here is a link to an extremely useful example of a DHTML behavior, this one allows you to define a or tag that is dynamically populated through a web service. Now that is really handy. Imagine dynamically populating part of a page, based on the selection of a control. All without the need to reload the entire page again.

