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.