|TextPad word wrap
|I've been using TextPad ever since it came pre-installed on my school laptop 5 years ago. The program is very simple and easy to use. It's basically just a text editor, but its most significant feature in my opinion is its right-click integration. You can right-click on pretty much any file on your computer and open it in TextPad, whether it's a text file, an html/js/php file, an exe file, or a jpeg file. Really anything.
One problem that I encountered and have been dealing with is the fact (or so I thought) that you couldn't turn on word wrap by default. There's a little button on the toolbar that does it, but I always had to click on that to enable word wrap. But then I found this link that said, "Click on Configure > Preferences. Under 'Document Classes' on the left, click the '+' button and then choose 'Default'. You should see the default preferences for files show in the right-side of the pane. Make sure 'Word wrap long lines' is checked and hit 'Ok'." I tried it and it sort of worked, but I fooled around with it and found that if you make sure that the box is checked for each of the document types, it'll work all the time. So that's what I did and it worked great. #technology
|Zamboni is a manufacturer of ice resurfacing machines. Calling one a Zamboni is like calling a tissue a Kleenex or calling an adjustable wrench a Crescent wrench (genericized trademark). Ice resurfacing machines work like this:
1. A blade scrapes a layer of ice off the surface.
2. An auger gathers the scraped ice and puts it into a bucket.
3. Hot water is sprayed onto the ice to remove dirt and debris. Hot water is used because it "loosens the crystal structure of the old ice underneath, so the new ice will form a solid bond with the old ice, instead of a separate layer that chips off easily."
4. Excess water is squeegeed off with a rubber blade and then vacuumed up.
5. Warm water is pumped out along the squeegee blade and spread evenly over the ice.
Charlie Brown said it best: "There are three things in life that people like to stare at: a flowing stream, a crackling fire, and a Zamboni clearing the ice." #technology
|This link on the WordPress codex describes how to make the default search function return "www.example.com/search/searchterms" instead of "www.example.com/?s=searchterms". I thought it could be done with Apache mod_rewrite, but I'm not smart enough to figure that out. I tried a couple things at the mod_rewrite RewriteRule Generator, but I couldn't get anything to work. The solution from the codex works fine.
This link from the codex mentions how to show the number of search results, such as "Searching for $s returned $n results". You'd think this would be easier, but it's not. An easy way to implement it is to put it in your theme directory in a file called "search.php". Here's what part of the file should look like:
<?php if (have_posts()) :
preg_match('#FROM (.*) GROUP BY#', $request, $matches);
$fromwhere = $matches;
$numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");
if (0 < $numposts) $numposts = number_format($numposts); ?>
Searching for <b><i><?php echo $s; ?></i></b> returned <?php echo $numposts; ?> result(s).
<?php while (have_posts()) : the_post(); ?>
Another good addition to the WordPress search function is the search hilite plugin. It hilites the search terms from search engines and the WordPress search function, and it has a style that's customizable from within the WordPress options.
Note: I haven't yet implemented any of these functions on this site. Since I'm blocked at work, I can't get much site management stuff done. I'll eventually upgrade to WordPress 2.0 and implement these search features, and this will make the world a better place. And doggonit, people like me. #technology
|This came out a while ago, but I just found it again today. Google Gulp is another funny Google thing that says it's a drink "designed to maximize your surfing efficiency by making you more intelligent, and less thirsty". It comes in four flavors: Beta Carroty, Glutamate Grape, Sugar-Free Radical, Sero-Tonic Water. Note: It's a joke. #food
|The reading today in my daily Christian devotional, Our Daily Bread, mentioned that ostriches don't bury their heads in the sand to hide from danger. I looked it up, and sure enough, that's true. This website says, "Contrary to popular belief, ostriches do not bury their heads in the sand. If a predator threatens their nest, ostriches will lay their head against the sand to try to blend in with it." Ostriches have no need to bury their head in fear, seeing that they can grow to be 10 feet tall, weigh 400 pounds, run 40 mph, and kick and peck violently with their large talons and beaks. #technology