Of Zen and Computing

Friday Link Round-Up from Technology Links Daily

The Friday Link Round-Up is brought to you by our companion blog, Technology Links Daily. If you have enjoyed this week’s picks, we hope you won’t hesitate to subscribe to the Technology Links Daily feed.

How to Remove Read-Only From All Files in a Folder

After copying a batch of files to your Windows PC from a CD or DVD, you may discover that all the copied files carry the read-only flag. The most obvious way to remove the read-only flag from a file is to right-click on its icon, choose “Properties”, and uncheck the “Read-only” box. But what if you have hundreds, or even thousands of files marked read-only?

You can batch-remove the read-only flag from multiple files using the attrib command from a command prompt. The Windows Command Line site has a tutorial on commands everyone can use, which includes an explanation of performing this task with the attrib command. The section on the attrib command is titled “Changing file attributes with ‘attrib’”, and is located about three quarters of the way down the page.

In short, you can remove the read-only flag from a group of files by navigating to their folder from a command prompt and typing attrib -r ./*.* /s. I did this to a folder full of image files with attrib -r ./*.jpg /s.

Bring up a command prompt in Windows XP by clicking Start → Run, typing “cmd”, and pressing “OK”. In Windows Vista, click Start, type “cmd”, and press the Enter key.

Printer and Scanner, or All-In-One? Readers Weigh In

lights on a printer

A frugal OZaC reader asks:

“I have need for both a printer and scanner. Should I buy an all-in-one machine, or purchase both separately? I am particularly concerned about a hardware failure in one indirectly affecting the other.”

Great question, and ironically one that I just addressed myself. I found myself looking for both a printer and scanner for my home office, and pondering whether to buy an all-in-one machine or get them separately. If the printer should fail before the scanner, I would be forced to do one of the following:

  1. Have the printer repaired. This often costs as much as a new printer.
  2. Buy another printer, and continue using the all-in-one as a scanner. This wastes space.
  3. Junk the whole thing and buy a new printer and scanner. This is a waste of both money and perfectly good electronics.

In addition to not wanting to have to choose between these three options at some point in the future, I did not have an immediate need for the printer, so I chose to purchase the two separately.

What do OZaC readers think is more cost-effective? What is more convenient? A separate printer and scanner, or an all-in-one? Leave your answer in the comments.

Photo by liewcf.

Road Runner Hijacking DNS - How to Disable It

If Time Warner’s Road Runner is your internet service provider, try to visit a web site that does not exist (such as wwww.ofzenandcomputing.com). Typically, you would receive some type of generic error message informing you that the domain name you requested does not exist. But if you have Time Warner, you will see a page full of advertisements.

Rumors of this project have been floating around the Web, and I have finally started seeing it in action on my own connection at home. Road Runner is capitalizing on customers who request inexistent or incorrectly typed domain names by returning a “Website Suggestions” page. A small portion of the page informs you that the requested site does not exist. The rest consists of advertisements. Here’s a sample screenshot:

Fortunately, it is very easy to opt out of seeing these advertisements. Digg commenter mymoustache posted the simple solution: just visit ww23.rr.com/prefs.php and disable the Web Address Redirect Service.

Why Macs Are Not More Expensive Than PCs

Each passing day brings more people purchasing iPods and iPhones. People seeing increasing numbers of friends sporting those sleek silver laptops. Most of those people eventually ponder whether a Mac might be right for them as well. After discussions of security, stability, efficiency, and user friendliness follows the inevitable deal maker/deal breaker: money.

Continue reading this article »

How to Query Random Records in Microsoft Access

Today we have a quickie for SQL jockies working in MS Access land: how to select a result set of random records.

Disclaimer

The meaning of the word quickie in this article is two-fold. First, this is a small article — a quick tip. Second, this is not mean to be used for large or frequently-called queries. ORDER BY RAND() is very inefficient. The table I am working with contains only a few hundred records, and I need to generate the result set just once.

How not to do it

Thinking in MySQL terms, my first instinct was to use the following query to produce a small result set of random records.

SELECT * FROM [MyTable]
ORDER BY RAND() LIMIT n

This does not work in Microsoft Access — instead, you need to call the Rnd function.

Querying Random Records in MS Access

The following query is what I chose in order to generate a small, one-time result set of random records. It uses the primary key column ID as a seed.

SELECT TOP n * FROM [MyTable]
ORDER BY Rnd([ID])

Note: in both of these queries, n is the maximum number of records I wish to include in the result set.

Friday Link Round-Up from Technology Links Daily

The Friday Link Round-Up is brought to you by our companion blog, Technology Links Daily. If you have enjoyed this week’s picks, we hope you won’t hesitate to subscribe to the Technology Links Daily feed.

Optimize WordPress for Search Engines with robots.txt

Bloggers who publish with WordPress should take special care to optimize their sites for search engines by uploading a custom robots.txt file. robots.txt is a text file that contains instructions for search engines concerning what pages should and should not indexed.

You may be wondering why you should prevent search engines from indexing certain parts of your blog. After all, isn’t getting your posts ranked the point of SEO? In this case, not necessarily. An important part of Search Engine Optimization is making sure you are not publishing duplicate content. Search engines don’t like duplicate content, and therefore it hurts your rankings.

Continue reading this article »

RAM Chip Won’t Fit in the Computer’s Slot

RAM chips

I bought a memory upgrade for my computer, but it will not fit in the slot on the motherboard. What gives?

It unfortunately sounds like you bought the wrong type of RAM. There are a few different types of RAM available. In order to upgrade your memory, you must find out exactly what kind of RAM your computer requires.

Continue reading this article »

How to Fix Image Uploads in WordPress 2.5 (Temporarily)

WordPress logo

As you may be painfully aware, the release of WordPress version 2.5 brought not only a slick new administrative interface, but also broken image/media uploads.

The WordPress support forums currently feature a closed sticky about 2.5’s broken image uploads. The post goes through a number of generic fixes for the problem, such as clearing your browser cache, upgrading Adobe Flash, and re-uploading WordPress’ system files.

I seem to be among the many WordPress users for whom none of these suggestions work, so it’s time to go back to old-fashioned form-based image uploading:

  • Download the No-Flash-Uploader plugin.
  • Upload no-flash-uploader.php to your WordPress plugins directory (e.g. wp-content/plugins).
  • Log into the WordPress administrative interface, click “plugins”, and activate the No-Flash-Uploader plugin.
  • Return to the post or page you were editing, and hit the “Add an Image” button. Instead of the new, broken Flash uploader, you will get the traditional HTML form-based interface.

Until the WordPress team comes out with a definitive set of fixes, the No-Flash-Uploader plugin should keep you blogging.