Pages

Thursday, December 29, 2011

Be careful when creating JavaScript variables on the server side

Writing JavaScript from your server-side code can be a great way to create a dynamic, flexible site. But you should also be aware of the risks. For example, suppose you generate your variable names from product codes stored in the database. While this may be a great scheme, what do you do if the database entry is "", a number, a duplicate of a previous entry, or a reserved word? Any of those circumstances could cause your JavaScript variable to be invalid.

Wednesday, December 28, 2011

Insert multiple images with four simple steps (PowerPoint 2002/2003/2007)

If you'd like to insert several images into a presentation, you can insert them and create the necessary slides all in one dialog box.

Tuesday, December 27, 2011

Keep your metadata to yourself (Photoshop CS/CS2/CS3/CS4)

While keyword metadata is a helpful tool for easy search and retrieval when archiving images, there are times you simply don’t want your metadata going everywhere your image goes. Whether it’s a privacy concern or you simply don’t want to share your camera specs with others, there is a way to get rid of all the metadata in Photoshop.

Monday, December 26, 2011

Make your XHTML backward-compatible with Appendix C

Sometimes you'll hear about various appendices in discussions about the Web standards on the W3C site (www.w3.org). These appendices are simply portions of a given specification. Appendix C (www.w3.org/TR/xhtml1/#guidelines) is the portion of the XHTML 1.0 standard that talks about how to make XHTML backward-compatible with browsers intended to interpret HTML. The recommendations in Appendix C provide a way to make a smoother, easier transition between HTML and XHTML.

Friday, December 23, 2011

Whatever happened to Scan Disk? (Windows XP)

If you're wondering why you can't find the Scan Disk utility in Windows XP, it's because in this OS it's called Error Checking. To locate it, right-click on a hard drive in My Computer, choose Properties, and then click on the Tools tab. In the Error Checking section of the Property sheet, click the Check Now button.

Thursday, December 22, 2011

Make sure 33 + 33 = 66 in your JavaScript code

As useful as JavaScript is, it doesn't always convert values into their appropriate data types when you perform an operation on them. For instance, in many scripting languages, the statement "33" + 33 would produce 66, despite the fact that the first value is a string, instead of a number.

Wednesday, December 21, 2011

Showing the current date and time in a worksheet cell (Excel 2000/2001/2002/2003/2007)

Sometimes there's an advantage to storing the current date or time in a Excel's worksheet cell. For instance, the worksheet's layout may lend itself to showing the date inline with the data, as opposed to in the header section. Or, your worksheet may use date-based formulas that process data according to the current date and time. Regardless of the reason, it's easy to create cells that display the current date and time.

Tuesday, December 20, 2011

A click way to make your palettes disappear (InDesign CS/CS2/CS3/CS4)

As useful as all the Adobe InDesign panels are, they can really get in the way if you’re limited to working on a single monitor. When you can’t see your DTP document through the sea of panels, there’s a really quick way to return them from whence they came.

Monday, December 19, 2011

Don't forget to edit URLs in free scripts

Are you using free scripts you downloaded from some site? Beware: Sometimes these contain links back to the site they came from. For example, we know of one person who used a script for a mousetrail. Well, about every 20th time a user clicks on that site now, he's redirected to the site the script came from. Now, we're certainly not saying you should deny credit to authors who share their scripts. Go ahead and give credit, create a link to the author's site, etc. But just don't let that code randomly direct your users to some free scripts site when they least expect it! It's always good to search for URL's in the script to make sure that doesn't happen. Otherwise, you might annoy your users--not to mention, embarrass yourself.

Friday, December 16, 2011

Switching between grid and line borders (Excel 2002/2003/2007)

Excel 2002's Draw Borders tool takes a lot of the pain out of applying borders to cells. Just open the Borders palette on the Formatting toolbar, select Draw Borders, and use your mouse pointer to draw where you want lines to appear. You can switch between whether the tool draws lines or grids using the toggle button on the Borders toolbar that appears. However, there's an easier way to switch between modes. Just hold down the [Ctrl] key. While the key is pressed, the tool applies whatever border formatting is opposite from the currently active mode.

Thursday, December 15, 2011

Use the Ruler tool to straighten a crooked image (Photoshop CS2/CS3/CS4)

Select the Ruler tool from the Eyedropper tool's flyout menu in the Tools panel. Click and drag along an image line that should be horizontal or vertical. Choose Image > Rotate Canvas > Arbitrary, and the correct angle and direction to make that line match the edge of the image frame is displayed. Click OK and Photoshop straightens the image.

Wednesday, December 14, 2011

Overwrite deleted data without third-party programs (Windows)

Deleting files doesn't erase them from the hard disk, as many criminals convicted by digital evidence have learned the hard way. When you delete a file in Windows, by default it just goes into the Recycle Bin. It can easily be discovered there and restored. Even after you empty the Recycle Bin, though, the data isn't gone. Windows simply removes the pointers to it from the file table and marks that space on the disk as reusable. Until it's overwritten by new data, computer forensics experts can still use special software to recover it.

Tuesday, December 13, 2011

Easily undo multiple actions in Excel (2000/2003/2007)

If you're a longtime keyboard jockey, you probably instinctively use the [Ctrl]Z shortcut when you want to undo a change you've made. However, if you need to backtrack through many steps, you may not recall exactly how many steps you need to undo. Chances are you'll backtrack too far and then wind up redoing more steps than you had planned. The next time you find yourself in this situation, use the dropdown arrows on Excel's Undo and Redo buttons. These provide you with a running list of your recent actions so you can easily undo or repeat exactly the steps you want. (In Excel 2007, the Undo and Redo buttons still have a dropdown arrow. But you'll need to look for these buttons on your Quick Access Toolbar.)

Monday, December 12, 2011

Separate script tags can help insulate good JavaScript code from bad

As developers, sometimes we like to think of ourselves as perfect. However, whether you blame other developers, clients, etc., the fact remains that mistakes happen. Unfortunately, often one bad apple in a script ruins the whole batch. For example, consider the following code:

Friday, December 9, 2011

Use the Shadow Settings toolbar to create a text shadow (PowerPoint 2000/2003/2007)

You can use the same Shadow Settings toolbar in Microsoft PowerPoint to create shadows for objects as the one you use for your text.

Thursday, December 8, 2011

Vertically justify text in frames enhanced with the Corner Effects command in Adobe InDesign (CS/CS2/CS3/CS4)

When you apply the Corner Effects command to a text frame in Adobe InDesign, the vertical justification of the text defaults to the top and can't be adjusted via the Vertical Justification options in the Text Frame Options dialog box (Object menu). If you need to vertically realign text in the center of the frame, choose Object > Text Frame Options and increase the values for Inset Spacing more than the corner radius you specified in the Corner Effects dialog box. Click OK to flow the text into place.

Wednesday, December 7, 2011

Schedule an automatic Windows XP shutdown

Want to automatically shutdown your machine with Windows XP after a period of time? Perform the following steps to automate your shutdown process:

Tuesday, December 6, 2011

Make Outlook your default email program (2000/2002/2003/2007)

Since you're one of the many people that see all the great productivity features that Outlook has to offer, it's only natural that you'd want to make sure that you're using it often as possible. To do this, set up Outlook to be your default email program. Open the Control Panel, and then double-click on the Internet Options icon. Select the Programs tab. In the E-mail dropdown list, select Microsoft Outlook and click OK. That's all there is to it!

Monday, December 5, 2011

A quick way to sum powers of 2

A lot of development tasks involve working with powers of 2. For example, you may use enum declarations with powers of 2 in your server-side code, store data on the server in binary format, or keep track of user choices by assigning different powers of 2 to your HTML form elements.

Friday, December 2, 2011

Track Changes in Windows Server 2003 and higher

If you are a Windows Server administrator, one of the critical jobs you usually do is manage the server, especially File Servers.

Thursday, December 1, 2011

Three ways to format fills and strokes from your keyboard (Illustrator CS/CS2/CS3/CS4)

Here are three easy keyboard shortcuts that will save you time when applying strokes and fills in Adobe Illustrator. First, if you want to quickly switch between fill and stroke and you don't want to bother with clicking them, simply press "x" to toggle between the two.

Wednesday, November 30, 2011

Create more flexible applications with class libraries (VB .NET)

A .NET class library, or component, is a collection of one or more classes compiled together as a unit. Class libraries allow you to create "pluggable" applications where you can debug, enhance, replace, and modify components individually without having to rebuild the entire application. You can use a class library for your business logic, common formatting functions, and more.

Tuesday, November 29, 2011

Find which tables and columns contain trailing spaces

If you need to get rid of trailing spaces in a database, you should first find out which table columns contain them. We have a little script to help you do that.

Monday, November 28, 2011

Freeze Excel column and row titles (2000/2001/2002/2003/2007)

When you work with a large Excel worksheet, it's often difficult to remember exactly what kind of data columns or rows contain once you begin scrolling around the sheet and lose sight of the column and row labels. Fortunately, you can freeze rows and columns that contain headings so you always know what data you're looking at.

Friday, November 25, 2011

Tired of doing a print screen or a mark->copy on a DOS command box? Here’s a better way

To copy the contents of your screen to a text editor like notepad, you can perform the following command instead of copying the text one screen at a time:

Thursday, November 24, 2011

Omit the tedium of deleting high volume style sheets in QuarkXPress (5/6)

Deleting one or even a few style sheets is best done through the Style Sheet palette. If you have high volume style sheets that you want to get rid of there is a better way than deleting them one by one. To do it. choose Edit > Style sheets and [command]-click ([Ctrl]-click in Windows) to select them. You can also [shift] and drag through the style sheets that you want to delete. Then, click Delete. Respond to any of the prompts that may appear and click Save.

Wednesday, November 23, 2011

Edit your shared border files directly (FrontPage 2000/2002/2003)

It's sometimes easier to edit a shared border directly than it is to edit it within the context of a normal page. The only trick lies in accessing the hidden _borders folder. To do so, choose Web Settings from the Tools menu. Switch to the Advanced tab, enable the Show Hidden Files And Folders or Show Documents In Hidden Directories check box and click OK.

Now, open the _borders folder in Folders view. You'll find up to four files, whose names correspond with their page positions: top.htm, left.htm, right.htm, and/or bottom.htm.

Tuesday, November 22, 2011

Quickly identify SSL-related problems

Microsoft supplies a utility, SSL Diagnostics, which provides you with invaluable information for troubleshooting Secure Sockets Layer (SSL) problems in Internet Information Services (IIS). For example, you can use SSL Diagnostics to troubleshoot problems with certificates by creating a temporary certificate to see if the new certificate resolves the problem. If it does, then you know the problem you're experiencing with SSL is due to the IIS server's certificate. To find out more about SSL Diagnostics and to download it, go to http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=674.

Monday, November 21, 2011

Format text and objects faster with Quick Apply (InDesign CS2/CS3/CS4)

InDesign features a way to select and apply paragraph, character, and object styles. The Quick Apply command eliminates the need to search for styles buried deep in the Paragraph Styles, Character Styles, and Object Styles palettes.

Friday, November 18, 2011

Include a read receipt on your messages (Outlook 2000/2002/2003/2007)

There are many reasons why you may want to know if someone has opened an email that you've sent. Maybe it has time-sensitive material in it and you need to verify when the person viewed it, or maybe you're just trying to make lunch plans and want to know if the recipient has read your email. It's easy to add a read receipt to your outgoing emails so you're notified when the recipient opens it.

Thursday, November 17, 2011

Setting a series of tabs with designated spacing (QuarkXPress 5/6)

You may find that you need to set your tabs with precise measurements. You do this by clicking on your text box with the Content tool and choosing Style > Tabs to open the Paragraph Attribute dialog box. To set a series of tabs by specifying the distance between them, after you've set your first tab, then enter "+" and then the gap length in the Postion text box (such as 3+2). Make sure the tab distance isn't greater than your text box. Also, be sure to click Apply after you enter each position. Then, Click OK when you've finished.

Wednesday, November 16, 2011

Two essentials for keeping your site safe

If you store any user input on your server or post it to your site or URL, you may be vulnerable to hacker attacks.

Tuesday, November 15, 2011

Take back control over SQL script files (SQL Server 7/2000)

You may have noticed that certain applications (rather rudely, one might say) assume ownership of your SQL script file types without so much as a by your leave. Visual Studio .NET is notorious for this. Sure, sometimes this is fine, if you do, in fact, spend most of your time in that environment. But DBAs often feel more comfortable working with scripts in SQL Query Analyzer. Luckily, there's a very quick way to take back control over your script files. Simply choose Tools | Options, and then click on the General tab. You'll notice a check box called Select SQL Query Analyzer As The Default Editor For Query File Extensions. Select this check box, click OK, and you're all set.

Monday, November 14, 2011

Make an image catalog using an automated task (Photoshop CS/CS2/CS3)

Do you have a lot of images stored on your computer or CDs that you’re constantly sifting through to find what you want? If so, you should take advantage of Adobe Photoshop’s ability to create contact sheets. Basically, this feature allows you to print out thumbnails of all your image files stored in a folder, including images in subfolders. Even more importantly, you can print the filename along with the thumbnail. Then, when you want a certain image, just glance through your thumbnail printouts, find the image you want, and then access it on your computer.

Friday, November 11, 2011

Partitioning external hard drives (Windows)

If you're using an external USB or FireWire hard drive, you may find that Windows doesn't let you delete and create new partitions. To resolve this issue, double-click on the Safely Remove Hardware icon in the System Tray. Next, select the drive, click the Properties button, and then click on the Policies tab. If the Optimize For Quick Removal option button is selected; Windows treats the drive as a removable device and won't let you change partitions. However, if the Optimize For Performance option is selected, Windows treats the drive as a fixed device and you can delete and add partitions.

Thursday, November 10, 2011

Create a shape on a new layer (Photoshop CS/CS2/CS3/CS4)

Photoshop automatically fills a shape layer, which you can make with any Shape, Line, or Pen tool, with the foreground color. You can also apply a gradient or pattern via layer styles. To create a shape layer, select one of the Shape tools, and be sure to click the Create New Shape Layer button on the tool Options bar. Photoshop stores the shape outline as a vector mask that appears in the Paths panel.

Wednesday, November 9, 2011

Sort DataSet records using a DataView object (VB .NET)

In .NET, you can easily sort DataSet records using a DataView. First, create a new DataSet and load it. Then, create a new DataView object using a DataTable in the DataSet. Finally, identify the column or columns you want to sort.

Tuesday, November 8, 2011

New Horizons recognized among the world’s Top 20 IT training companies four out of four years

New Horizons Computer Learning Centers today announced it has again earned a spot among the Top 20 Information Technology (IT) educational companies in the world for the fourth straight year since the award was first established in 2008 by the leading website TrainingIndustry.com.

Public-Key Cryptography and Windows PKI: How it works (Microsoft Windows 2000/2003/XP)

Most of your customers have concerns about the security of the data they send and receive. Some Microsoft Windows operating systems include a native public-key infrastructure (PKI) that allows for both encryption and signing. Public-Key Cryptography guarantees that encrypted outgoing data can be understood only by the intended recipient, and ensures that signed incoming data actually came from the indicated source.

Monday, November 7, 2011

Target a specific page by using PDF page import options

When importing an Adobe PDF document as a graphic into a picture box in QuarkXPress, there’s an option specifically created for PDF import that is often overlooked. However, it’s one every QuarkXPress user should know as it ensures the correct page is imported.

Friday, November 4, 2011

Use Image Resizer to resize graphics for PowerPoint in a Flash (Microsoft PowerPoint 2000/2002/2003/2007)

If you're using Windows XP, you can download and install the Microsoft PowerToy, Image Resizer, and use it to resize graphics for use in PowerPoint. Locate the install at www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx and install it. Then, follow these steps to resize graphics for PowerPoint:


Thursday, November 3, 2011

Process forms more easily by synchronizing numeric field values with JavaScript arrays

You may want to display information based on a visitor's form field selection. For instance, a dropdown list or radio button group may trigger specific text to appear in a designated element on the page. Naturally, you could force the page to reload with the new information each time the user selects an option, but JavaScript offers a better, client-side solution:


Wednesday, November 2, 2011

Switch the email you're composing back to a document (Word 2000/2002/2003/2007)

Word is a great email-editing tool, and it's easy to use as well. You can simply click the E-mail button on the Standard toolbar to convert your document to an email and continue composing. However, if you decide you'd prefer to save your work as a document rather than as an email, how do you convert the email message into a Word document? All you need to do is click the E-mail button again. The email header information goes away, and you're left with the Word document you want.

Tuesday, November 1, 2011

Allow users to select colors without a dialog window (VB .NET)

VB .NET offers a ColorDialog component that you can load to help users pick colors at runtime. However, you don't need a separate window for this task. The .NET Framework consists of 167 system-defined colors. The Color object exposes the FromKnownColor() function, which allows you to access these colors, by index, using the following syntax:

Monday, October 31, 2011

Create backups to revert from unwanted saved changes (Excel 2000/2001/2002/2003/2007)

When you're working fast, you're bound to make mistakes. You'll often catch your errors right away, but it's easy to make accidental changes to a workbook's existing data and not notice until it's too late. If you've ever felt the nausea that accompanies the realization that you've just saved workbook changes that unintentionally destroy large amounts of data, you should investigate Excel's backup feature.

Friday, October 28, 2011

Easily flip an AutoShape (Microsoft PowerPoint 2000/2002/v.X/2003/2007)

If your AutoShape (or Shape in PowerPoint 2007) isn't looking quite like you'd hoped, try flipping it. To do this:
  1. Select the AutoShape you wish to flip.
  2. Select Draw | Rotate Or Flip from the Drawing Toolbar.
  3. Select Flip Horizontal or Flip Vertical.
In PowerPoint 2007, you won't have a Drawing toolbar. Here's how to flip your Shape instead:
  1. Select the Shape you wish to flip.
  2. Click on the Format tab in the Drawing Tools ribbon.
  3. In the Arrange group, click on the Rotate button to open a dropdown menu. Select Flip Horizontal or Flip Vertical from the dropdown list, depending on how you want to flip the Shape.


Thursday, October 27, 2011

Quickly log an error message with RunSQL() (2002/2003/2007)

The RunSQL() method of DoCmd allows you to execute SQL statements against your database. However, it can also serve as a quick and sneaky way of generating a log file. To do so, you simply pass it a SQL statement that writes to a text file, like so:

Wednesday, October 26, 2011

Save your custom page sizes as InDesign presets (CS/CS2/CS3/CS4)

When creating a new document, there are several generic page sizes you can choose from, or you can manually enter the custom width and height you need. More often, though, InDesign documents are set up using custom page sizes. Manually entering the same information over and over again is tedious and a waste of time. One option to speed up the process is to create document presets, where you enter the values in the New Document dialog box and then click the Save Preset button. Another option, which we'll explain how to do, is add your custom page sizes to the Page Size pop-up menu in the New Document dialog box.

Tuesday, October 25, 2011

Use xsd:extension to add functionality to XSD elements

You can create name complexTypes to reuse common content models, but let’s take it a step further with extended types. Here’s your predefined complexType and the elements that reference it:

Monday, October 24, 2011

Quickly shift the brightness of a color (Illustrator CS/CS2/CS3/CS4)

Here's a trick for Adobe Illustrator that allows you to make your current color to just a little bit lighter or darker. In the Color panel, press and hold [shift] as you drag one of the sliders. When you do, all the sliders move at the same time, allowing you to fine-tune the brightness of the color. Don't like your new color? Simply undo your change by selecting Edit | Undo Color or pressing [command]Z ([Ctrl]Z in Windows).