Archive for the ‘Software’ Category

Deleting WordPress Post Revisions

Saturday, February 25th, 2012

To all WordPress bloggers: As a blogger who has used WordPress blogging software for his blogs for several years, I often find that the number of saved post revisions grows quite large in a short time, especially since I’m constantly updating my collection of blog posts.  Deleting WordPress post revisions   occasionally, becomes necessary to preserve efficient WordPress database operation.  While I wish to retain the post revisions for a week or two, those older ones I can certainly do without.  Indeed, one sure way to better   optimize the WordPress database   is to keep only the posts, comments, and other data that you actually need, in order to keep your blog quickly responding to page requests and to shorten the time required for a WordPress database backup to complete.

So, each time I back up my blog databases, I first delete the WordPress post revisions I no longer want.  Remember that each time you save a post during editing, a new post revision record is created in the WordPress database.  Therefore, if you make many revisions to a document, you’ll create many copies of it saved in the database.  If the document is a large one, the amount of storage required for it and its revisions quickly becomes significant.  So be sure to periodically delete those WordPress post revisions regularly to help keep your blog running at top speed.

To delete WordPress post revisions, use the following procedure:

  1. Log into yout MySQL account that hosts your WordPress blog’s database you’re working with.
  2. Then, execute the following SQL statement in the quotes: “DELETE FROM wp_posts WHERE post_type = “revision”;”  Note that this particular SQL statement removes all post revisions.  However, you could add timestamp constraints, to, for example, delete only those post revisions that are more than two weeks old.
  3. You should then see a response from MySQL, telling you how many records were actually deleted from the wp_posts table.
  4. If you have no further tasks, log out of your MySQL account.

I’ve successfully executed the above procedure for WordPress 2 and WordPress 3 blogs.  So I expect that you will experience no problems with it on your WordPress blogs.  Indeed, it would be possible to automate this command into a PHP script that you could run with task scheduling software (like UNIX Cron).  Good luck.

Tom Hesley

Related Posts

Today’s Business: 2011-11-03

Thursday, November 3rd, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.  Cat duty involves cleaning the litter boxes, bagging the excess, feeding, and house cleaning cat dirt of all types.
  • Wash (2) loads of pending laundry.   DONE.  174 loads done in the washer now.

Log

08:55 AM: I’m up.

09:05 AM: Facebooked for several minutes. Friend count: 596 (unchanged). Fan count: 112 (unchanged).

09:30 AM: Requested an estimate for sound-reducing windows for the house here from a second vendor.  Sent a reply letter to them, supplying the details for the project that they requested yesterday.

12:05 PM: Talked with   [Emmy].

02:30 PM: Watched today’s episode of   The Young and the Restless   via the DVR.

07:25 PM: Watched tonight’s episode of   NBC’s Nightly News   via the DVR.

08:15 PM: Watched today’s episode of    Dr. Phil,    called    Affairs, Lies, and Audiotape.

11:00 PM: Talked with   [Emmy].

11:30 PM: Continued working on the Tommy’s Tunes music library management software, to add recursive folder handling to the batch file processing scripts and programs.  Today, I completed this work on one of the conversion programs written in the C++ language.  There are two more of those, which should go easily, as the work I did for the first one is shared (in the form of a DLL library) by the others.  Then, there are my PERL scripts to enhance as well.  I’m hoping by the end of this month to complete this effort for all my programs.

11:55 PM: Downloaded approximately 100 new songs today from Promo Only’s  Express Audio music subscription service.  I’ll add all the ones I’ve downloaded over the past few months once I finish writing and testing the upgrades to my Tommy’s Tunes software.

12:05 AM: The daily traffic stats from yesterday for my blogs.  The monthly keyword hit count held steady this time, and currently stands at 913, down from 914 at last check.  The record high for this dimension remains at 1788.  The next goal: 2000.

12:10 AM: I’m headed to bed.  Good night, and I’ll write more tomorrow.

Tom Hesley

Received Mail and Shipments

None today.

Related Posts and Links

Today’s Business: 2011-09-22

Thursday, September 22nd, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.
  • Wash (1) load of pending laundry (blue jeans).  DONE.  148 loads done in the washer now.

Log

07:30 AM: I’m up.

08:15 AM: Facebooked a bit.  Friend count: 581 (up two).  Fan count: 111 (unchanged).

11:00 AM: Attempted to set up my HP 3300 combo printer on my Dell XPS 8300 computer. However, I encountered an error message during the software installation process that said that the file copy operation had failed.  I got this message at the same place in the installation process.  So, thinking that the software CD was scratched or finger printed, I tried cleaning it.  No luck however.  The error persisted.  So then I attempted an install on my much older Windows XP machine.  This installation went fine. So this version of the HP printer software I have apparently will not install on Windows 7.  I checked around for a revised version on the HP web site but could find nothing conclusive.  Hmmmm.  I do hope I’ll be able to print from my new computer.  I’d hate to be forced to buy a new printer.  HP does have a universal printer driver that can be downloaded.  I’ll try that soon and see if I can at least get basic printing functionality on this computer.

12:00 PM: Posted the   WPSBC Alumni Association –> Bylaws 2011    piece.  In this revision, I’ve added the current slate of officers’ names.

01:30 PM: Packed for my upcoming Pittsburgh trip.

01:40 PM: Leaving now to visit Mom and to travel to Pittsburgh.

03:55 PM: Visited with and had a Mexican lunch with Mom.  Now, I’m leaving the nursing home for the train station.

04:30 PM Arrived at the train station.  The train to Pittsburgh is running roughly a half hour late.  So I’m listening to Dr. Joy Browne on my iPod to pass the time.  I’m well into the December, 2008 episodes now.

05:45 PM: Leaving Altoona now on the train that just arrived here.

08:40 PM: Arrived at Pittsburgh.  Listened to Dr. Joy Browne the whole way.  I’m smarter as a result.

09:15 PM: Arrived at   [Emmy's].

09:30 PM: Started the music drive sync process to copy my latest additions to my music library, to the satellite drive.

10:45 PM: Made my bed of blankets and quilts on [Emmy's] bedroom floor.  For the past hour and a half, we watched some TV and talked about everything and nothing too.  :-)

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count rose this time, and currently stands at 1081; down from 1091 at last check.  The record high for this dimension remains at 1788.  The next goal: 2000.

12:10 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley

Received Mail and Shipments

None today.

Related Posts and Links

Solving Access Denied Errors in File Copying PERL Scripts in Windows 7

Wednesday, August 31st, 2011

I have a   PERL script   that installs software on a PC by   copying files   into the Program Files (X86) directory.  I’ve run this from a   Command Prompt.  for years without troubles on Windows XP.

 

Problem:

But when run on   Windows 7,   Access Denied  error messages display for every file the PERL script attempts to copy.

 

Solution:

One way I found to solve this problem is to set my Command Prompt to run as administrator.  Do that as follows:

  1. Right-click your Command Prompt shortcut.  This causes the Command Prompt Properties window to appear.
  2. Click the Shortcut tab in that window.  The available options in the window change accordingly.
  3. Click the Advanced   button.  The Advanced Properties window then appears.
  4. Make sure the Run As Administrator checkbox is checked.
  5. Press the OK button to close the Advanced Properties window.  This action once again reveals the Command Prompt Properties window.
  6. Then, back in the Command Prompt Properties window, click the Apply button.
  7. Finally, press the OK button.  This closes the Command Prompt Properties window.

 

Now, when you open a Command Prompt, you’ll be prompted by Windows 7, asking if you want to allow this program to make changes to your computer.  Press the Yes button.  This closes the UAC window and takes you into the new Command Prompt window just opened.   Now you’re running it as an administrator.

At this point, I was able to run the heretofore offending PERL scripts in this Command Prompt window without further Access Denied error messages.

Be careful not to run other commands in this “super user” authorized Command Prompt window, lest you risk serious damage to your computer if the program(s) you run turn out to be malware.

Tom Hesley

Related Posts and Links

 

Today’s Business: 2011-08-13

Saturday, August 13th, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.

Log

09:25 AM: We’re up.

01:00 PM: Fixed a problem [Emmy] was experiencing with the JAWS screen reading software on this computer.  In some edit boxes, JAWS would not speak typed-in characters when you’d arrow back over them in Internet Explorer 9.  Not sure why this worked.  But I picked Tools–> Compatibility View in Internet Explorer.  After that, JAWS spoke the characters flawlessly and has continued to do so ever since.  I stumbled across this fix just by “playing around.”

03:30 PM: Nap time.  Back later.

05:00 PM: We’re awake again.

06:00 PM: Now that we’ve got JAWS working on this computer for [Emmy], I configured Outlook 2010 so she can access her email account when she’s logged into her personal account here on this computer.

06:50 PM: Leaving now for walk 49 of 100 for 2011, to the south (Logan Valley) cemetery.  Back later.

07:50 PM: We’re back home. Mostly cloudy but calm weather out there tonight.

07:55 PM: We arrived home to find sisters Christine and Diane waiting for us, wondering if we’d like to go out for ice cream and to visit Mom.  Well, we’re usually up for socializing.  So we’re going.  Back later.

09:00 PM: We visited Mom.  She’s doing well; although she did say that the lunch at the Mexican restaurant yesterday upset her stomach apparently.  That sort of food is not on her usual meal menu. So perhaps she’s just not used to eating the chips and meat with the higher-than-typical fat in them.

10:00 PM: We’re back home.  We brought some pizza too.  Nothing like a late evening snack.  Yum!

10:15 PM: Sister Christine called to say that she found   [Emmy's]   iPod in the back seat of her car, and that she and her husband Rich are bringing it over shortly.  Nice.

10:25 PM: Sister Christine and husband Richard arrived.  That returned the iPod to a grateful [Emmy], and the four of us sat out on the south porch, gabbing about everything from Mom to the upcoming high school football season here in Bellwood.

11:10 PM: Christine and Rich left for home.  I gave them a couple of insulated coolers to take with them, since we never use them here, and I was tired of them taking up so much space in our basement.

11:45 PM: Watched tonight’s episode of   NBC’s Nightly News   via the DVR.

11:55 PM: Skimmed all back rerun episodes of   Dr. Phil   on the DVR.

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count dropped, and now stands at 1521; down from 1553 the last time I checked.  The record high for this dimension remains at 1788.  The next goal: 2000.

12:10 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley

Received Mail and Shipments

None today.

Related Posts and Links

Money Talks Program Write Errors Upon Closing

Tuesday, August 2nd, 2011

[Emmy] uses the   Money Talks   checking account management program from the  American Printing House for the Blind (APH)   to keep track of her personal finances. However, since she got her new computer, three error message boxes always have come up when she closes the program. They are as follows:

  • Error writing categories.
  • Error writing pay names.
  • Error writing items.

 

She did not get these on her old computer, and says that she’s noticed these ever since we installed the Money Talks software on her new Dell computer. She asked me to investigate.

Thus, I tried numerous possible solutions including the following:

  1. I looked in the Event Viewer logs. No errors were written there at the same time as the above errors displayed on the screen.
  2. I reinstalled Money Talks. This did not fix the trouble.
  3. I deleted the program from her system with the Add / Removes Programs wizard. Then again, I reinstalled Money Talks as in item 1. This still did not fix the trouble.
  4. I made a backup copy of her registry, then removed all mentions of Money Talks that I could find within it. Then I tried item 2 again. Still, the problem persists.
  5. I installed Money Talks on my computer, but was unable to duplicate the above errors. It closes just fine on my machine.
  6. I also noticed that in none of the reinstallation steps above was I prompted to reenter [Emmy’s] access code. Hmmm. This induced me to suspect that Money Talks leaves some data behind, even after uninstalling it. Perhaps it’s some sort of zombie data left over that caused the above errors.

 

Well, I looked around remotely through [Emmy’s] computer and could find nothing obviously wrong. So I called the APH tech support line. Did not talk to someone immediately but did leave a voice mail. They called back within several minutes (fast), and I explained the issue in detail.

They’d never seen this before.  So to be safe, they said not to rely on the accuracy of Money Talks until the error messages have been eliminated. The support specialist said he’d confer with a software engineer colleague and get back to me ASAP. I asked him to ask the engineer if there are any other files that Money Talks writes besides the account data (.mtf) file. He said he’d check.

About a half-hour later, the APH support specialist returned my call, saying that he had no immediate answers. However he assured me that the developer would look at the code to devise an answer within a few days. The engineer also advised to have a look at the following files that Money Talks also writes to host computers:

  • %AppData%\aph\Money Talks\category.ini
  • %AppData%\aph\Money Talks\items.ini
  • %AppData%\aph\Money Talks\paynames.ini

 

Solution: Well, I found these files. I did not find them before because they do not normally show up since the AppData directory is normally hidden. But upon inspecting the files, I quickly discovered that the read-only bit was set on all of them. We do not know how this happened. But there it was. Anyway, whenever I cleared this bit (with the ATTRIB –r command at a command prompt), the errors upon Money Talks program exit mentioned above occurred no more. Wow! Problem solved.

I notified the APH support technician of my findings and thanked him and the engineer profusely for their help.  Perhaps I should work as a support engineer myself.  :-)

Take care.

Tom Hesley

Related Posts

Today’s Business: 2011-07-31

Sunday, July 31st, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.

Log

08:00 AM: I’m up.

10:00 AM: Spent an hour Facebooking.  Friend count: 558.  Fan count: 111.

01:00 PM: Assembled a probe for my function generator.  I used a length of RG-59 cable, a twist-on BNC male connector, and a couple alligator clips at the other end of the cable.  This will come in handy when playing with the switching power supply project.

03:45 PM: Nap time.  Back later.

04:30 PM: I’m awake again.

06:50 PM: Studied up on JAWS screen reading software scripting. I’ve read about half of the JAWS scripting manual now.  Gotta keep up my computer skills, you know.  :-)

07:00 PM: Leaving now for walk 38 of 100 for 2011, again, around the south cemetery.  Back later.

08:00 PM: I’ve returned home.

10:00 PM: Watched tonight’s episodes of   NBC’s Nightly News via the DVR.

11:00 PM: Talked with   [Emmy] via the cordless phone from the first floor office.

11:55 PM: Followed the continuing debt ceiling crisis coverage on CNN for nearly an hour.

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count rose some, and now stands at 1640; down from 1637 the last time I checked.  The record high for this dimension remains at 1788.  The next goal: 2000.

12:35 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley

Received Mail and Shipments

No mail or deliveries on Sundays.

Related Posts and Links

Today’s Business: 2011-07-30

Saturday, July 30th, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.

Log

08:00 AM: I’m up.

11:00 AM: Began the weekly system backups for all my blogs.

11:30 AM: Completed the weekly system blog backups.

11:55 AM: Posted the   Weekly Backups: 2011-07-30 piece.

12:00 PM: Spent much of the morning reading about writing scripts for the JAWS screen reading software from Freedom Scientific.  I’m doing this to help   [Emmy]  troubleshoot a problem she’s having with entering data into Winamp’s media library window.

03:00 PM: Solved [Emmy's] JAWS and Winamp problem and will post details about this presently.

05:00 PM: Talked with [Emmy], and talked her through the installation of the JAWS script for Winamp that I revised to fix her trouble.  She now reports that the difficulty has been eliminated.

07:30 PM: Leaving now for walk 37 of 100 for 2011, around the south cemetery.  Back later.

08:30 PM: I’ve returned home.  It was pleasant walking in the evening sun with temps in the upper eighties.

09:35 PM: iPodded on the east porch for an hour plus.  I just couldn’t let thie beautiful weather go yet.

10:00 PM: Watched tonight’s episodes of   NBC’s Nightly News via the DVR.

11:00 PM: Talked with   [Emmy] via the cordless phone from the first floor office.

11:55 PM: Followed the continuing debt ceiling crisis coverage on CNN for nearly an hour.

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count rose some, and now stands at 1640; up from 1637 the last time I checked.  The record high for this dimension remains at 1788.  The next goal: 2000.

12:35 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley

Received Mail and Shipments

  • Cable + phone + Internet bill.
  • Mom’s pension pay stub.
  • Informational papers from Medical Assistance regarding Mom’s coverage in the nursing home.
  • Drivers License renewal forms for Mom.  Unfortunately, she’ll probably never drive a vehicle again.

Related Posts and Links

Today’s Business: 2011-07-02

Saturday, July 2nd, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty.  DONE.

Log

08:45 AM: I’m up.

09:50 AM: Got caught up on the blogs and Facebook.

11:00 AM: Leaving now with nephew Garrett for Grant’s graduation party.  Back later.

01:00 PM: Hung out around sister Christine’s pool for a couple hours, just shooting the breeze with family and friends.  Kind of reminded me of that song last year from Nickelback, called   This Afternoon,  that talks of spending the afternoon, the evening, and well into the next morning just chilling with fond friends and relatives, and how much fun that can be.

01:15 PM: I ordered 56 pieces of square pizza (two big flats of it).  I was hungry and so apparently, were all the kids.

01:45 PM: Nephew Grant went to pick up the pizza and upon his return, he was mobbed by us folks with the big appetites.  Yep.  The pizza was a big hit.  They may have even liked it more than the sounds of my music.

01:45 PM: Set up the DJ equipment in the lower yard, under the trees near the fire pit.  So far, everything is working well.  This is the first time I’ve used Windows 7 at a gig.  So I’m a bit nervous.  However, I’m not anticipating any problems, as I’ve worked it pretty good on my bench at home and found no bugs.  Just in case the main computer experiences non recoverable difficulties, I’ve brought two iPods.  I can play from them in a pinch.

02:00 PM: I began music play; a mix of mostly new dance tunes but interspersed with numerous classic rock pieces so that the older folk among us (including me) would not grow bored.

03:00 PM: Mom and her friend Jeff arrived in the wheelchair van about ten minutes ago; both of them smiling ear-to-ear.  Getting them through the breezeway out to the patio proved a bit of a challenge; but probably more for them than for us who were assisting.

06:00 PM: Lots of people have come; near a hundred I think.  I left the music table for a while to mill among them and catch up with friends I haven’t seen in a while.  I sure miss [Emmy] being here.

08:00 PM: One lady asked if I’d be interested in DJing her Halloween party in a few months.  I told her that I’ve all but stopped DJing professionally. But I invited her to give me a call and see what exactly she has in mind.  I might do it if I could pay for a significant part of this year’s music subscriptions withe the proceeds.

10:00 PM: I began gradually lowering the master volume on the music; that’s how I ramp down from an evening of fun-filled dancing in the volleyball field.  I also switched over to softer music of the adult contemporary variety, to further cement my message that there will be no more loud music tonight from this point on.

12:00 AM: I’m back home.  Too late to chat with   [Emmy]   tonight.  So I’ll call her in the morning.

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count moved higher again this time, and now stands at  1691; up from 1669 yesterday.  The new record high is now 1691.  The next goal: 2000.

12:30 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley

Received Mail and Shipments

None today.

Related Posts and Links

Today’s Business: 2011-06-12

Sunday, June 12th, 2011

Today’s Activities

  • Shower. DONE.
  • Cat duty. DONE.

Log

08:00 AM: I’m up.

11:00 AM: Updated my file synchronization scripts to fix some errors that happen when copying hidden files.  I switched from using the Windows system command line copy utility to the File::copy module command in PERL.  So far, it seems to work great and it’s a bit faster besides.   

02:00 PM: Heated some fish fillets for lunch. 

03:30 PM: Mary Kay came to drive me to the train.  I’m heading out to Pittsburgh to visit   [Emmy].  Sister Jojo and her family will house sit for me while I’m gone. 

03:35 PM: I showed Mary Kay the blue mirror, and she, who remembers the original that gram proudly displayed in her living room throughout the fifties through seventies, said that this one matches in every way the original.  It’s blue color is just as blue, the beveling catches the light as brilliantly as the original, and the brass bolts that secure the backing, give this mirror the same authentic art deco look that Gram’s mirror had.  I’m thrilled. 

04:00 PM: We arrived at the train station.  No problems getting the tickets, although this time, I paid for them at the station.  Normally, I pre pay them.  But my ATM card has disappeared. So I had to cancel that card before I could pay for my usual phone reservations. 

04:20 PM: Ran into sister Mary Ann’s sister-in-law at train-side.  She was picking up a couple of her aunts, who were coming in from Chicago.  She’s going to drive me to State College this December, when we visit New York City for the day to take in a Rockettes show.

05:15 PM: I boarded my train, after listening to my iPod and the horrendous amount of 2011 music that I recently added to my library.  So far, I’ve found a few great songs, but the rest of it is junk. 

08:00 PM: We arrived without incident in Pittsburgh.  I think I’ll walk down to Fifth Avenue and take the bus, rather than waiting for a taxi here at the train station.  There’s a large throng of people outside right now, so getting a cab will be difficult and apparently, quite time-consuming. 

08:30 PM: Rode the 71-D Hamilton bus to Oakland from downtown thus, and got off at Fifth and Craig streets.  However, a flooded Fifth Avenue greeted me; the water extending from Fifth and Dithridge east, past Craig.  I ended up with wet feet as the water was much deeper than I predicted when I attempted to step through and around it. 

08:50 PM: Arrived at   [Emmy's]. 

10:00 PM: Unpacked my suitcase while   [Emmy]   watched some snake show on Animal Planet. 

12:00 AM: Started synchronizing  the music hard drive of mine that   [Emmy]   has with the one I brought with me.  So far, it’s going well, but I had to install PERL on   [Emmy's]   computer; my sync script is written in PERL. 

12:05 AM: Reviewed the daily traffic stats from yesterday for my blogs.  The monthly keyword hit count is up a little again, and now stands at  1300; up from 1297 yesterday.  The record high so far: 1302 key phrases.  Next goal: 1500. 

12:15 AM: Bed time.  More tomorrow.  Good night.

Tom Hesley 

Received Mail and Shipments

  • No mail on Sundays.

Related Posts and Links