Archive for December, 2016

h1

Word: Find and replace multiple spaces after punctuation

December 21, 2016

You receive a document that has multiple spaces after standard punctuation — periods, commas, semicolons, colons, question marks, and exclamation marks. Sometimes the author used two spaces, sometimes three, sometimes five!

How to fix it?

Well, you can run several find/replace routines but as the number of spaces is unknown and as there are many types of punctuation, that could take quite a lot of time. Instead, you can use a wildcard find/replace routine to find them all at once, keep the punctuation, and replace the unknown number of spaces with a single space. Here’s how (for your own peace of mind, test this on a COPY of your document first):

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click the More button to show more find/replace options.
  3. Select the Use wildcards checkbox.
  4. In the Find what field, type: ([,.;:\?\!])( {2,9})
    NOTE: There’s a single space before the {2 — make sure you include that. To be safe, copy the ‘code’ in this step, and paste it into your Find what field.
  5. In the Replace with field, type: \1 followed immediately by a single space.
  6. Click Find Next to find the first instance, then Replace to replace the multiple spaces with a single space.
  7. Repeat step 6 as many times as you need to be confident that it’s finding the right things. Once you’re confident, click Replace All to run through the whole document and fix all instances.

Use wildcards to find and replace multiple spaces after defined punctation

Explanation for how this works:

  • ([,.;:\?\!]) looks for any of the listed punctuation characters. Question and exclamation marks are special cases and need to be ‘escaped’ with a \. Because you’re using wildcards, you need to surround the text you want to find in parentheses. This string defines the first section of the Find.
  • ( {2-9}) looks for a space followed by two or more spaces, up to 9 spaces (you can put whatever numbers you like inside the curly braces — if you think you might have some instances of punctuation followed by 15 spaces, then change these numbers to {2-20}, for example. Again, this section is surrounded by parentheses to define it as a separate section.
  • \1 replaces the first part of the wildcard string with itself. In other words, the punctuation character found is replaced with itself, so no change apparently occurs.
  • The space after \1 replaces the multiple spaces found in the second part of the wildcard string with a single space.
h1

The problem with ‘simple’ instructions

December 18, 2016

Bottom line: Simple instructions are good, but don’t make them TOO simple. Include key prerequisites. Users familiar with the product may choose to ignore the instructions, but new users will thank you for them.

The problem with ‘simple’ instructions is they often leave out critical information, assuming that the user already knows it. But what if this is the first time you’ve used a product? Or if you just don’t know (or forget) how it connects to other stuff?

What prompted this post? I have an under-sink water filtration system — the previous one required a plumber to fit the replacement cartridges, but this new system (Puretec’s Puremix X6 System) allows the user to change the cartridge ‘like changing a light globe’. The system has been in place for 12 months now, so it was time for me to replace the cartridge.

The only instructions on the new cartridge’s box were ‘Quick-change cartridge, easy to replace — just like changing a light globe.’ That’s it. I thought there might be instructions on a leaflet inside the box, but no. Nothing. There was an instruction on the new cartridge itself — ‘Twist old cartridge from head [what’s the ‘head’??] and twist new cartridge into head until firmly sealed. After installing cartridge flush unit for 5-10 minutes.’ But that was it.

How hard can it be?, I thought.

Well, at least for the first time, much harder than the instructions lead you to believe!

I pulled the new cartridge out of the box and found it had a blue cap covering the top — do you remove this or not? For those big water bottles you get delivered, you DON’T remove the blue cap, but that was the only reference point I had. And remember, there were no clear instructions to tell me what to do.

So into the cupboard under the kitchen sink I went, removing all the paraphernalia in front of the existing cartridge. I untwisted the existing cartridge to remove it — and water gushed EVERYWHERE!!! Why? Because they didn’t tell me a key step before changing the cartridge and that’s to turn off the mains water to that unit!!! Yes, I should have realised this, but I’ve been sick the past few days, so my head’s not in a good place. But if I was a young 18-year-old in a rental apartment and had to change the cartridge, would I know to turn off the tap first, or even how to find/identify that tap?

After a few seconds of water gushing everywhere, I turned off the mains tap. Then I spent the next 10 minutes mopping up — fortunately, we had an old bath mat under the water cartridge in case of any minor leaks, and it absorbed most (but definitely not all) of the water.

OK, now everything’s mopped up and the water’s off, so I untwist the existing cartridge and remove it. That was pretty easy. I saw that the old one didn’t have a blue cap on it, so I figured I needed to remove the blue cap on the new one. This required powers of extrapolation, which my brain wasn’t dealing well with at all. Off came the cap.

Next, to seat the new cartridge in place of the old. Not so easy. Why? Because there are notches in the top of the cartridge and you have to line them up precisely with the static part of the system (that’d be the ‘head’, I figured). Fortunately, we didn’t have quite enough room under our sink for the plumber who originally installed the system to screw the ‘head’ to the back of the cupboard (as per their images on Puretec’s website), which meant I was able to turn it at an angle where I could see the notches that had to line up. After a few attempts, I got this right and was able to seat the new cartridge and twist it to tighten and seal it. I then turned the mains water tap for the filtration unit back on, then the tap for the water filter spout (which gave me fright by spitting air at me for a few seconds before the water came through), and then ran the tap for about 7 minutes, checking inside the cupboard to make sure there were no leaks.

It shouldn’t be this hard! The box the cartridge comes in, and the cartridge itself, are large and there’s plenty of ‘white space’ on them. To add a few steps would have prevented the issues I (and no doubt others) encountered.

Here are my steps for replacing a Puremix X6-R water cartridge:

  1. Turn off the mains water tap to the water filtration system; this is likely inside the cupboard below the system.
  2. Take the new cartridge out of the box and pull off the blue cap. Note the single and double notches on the ‘shoulder’ of the cartridge.
  3. Twist the old cartridge in an anti-clockwise direction (left) to remove it from the head unit.
  4. Position the new cartridge so that the notches line up with the corresponding parts of the head unit.
  5. When aligned, push the cartridge up into the head unit.
  6. Twist clockwise (right) to tighten fully.
  7. Turn on the mains tap.
  8. Turn on the tap of the water filter spout — wait a few seconds for the air to clear the line and water to start running, then leave the water running for 5 to 10 minutes to flush the new cartridge.

As a final step (not listed above), I’d also add some information on how to dispose of the cartridge appropriately — including whether the water inside it has to be drained or is sealed in there.

 

h1

Using Avidemux to split a video file

December 11, 2016

This blog post is for me, in case I forget how to do these steps! If it helps you, well and good, but it’s part of my brain dump for myself as it’s is only something I’ve done once before and had to relearn it for the second time I needed to use it.

Problem

My Samsung TV is from 2010, so it isn’t a ‘smart’ TV. Occasionally, we watch videos from an external hard drive. However, I think my TV has problems with large files (anything much over 2GB). No matter the format of the files (MP4, MKV, AVI etc.) they won’t even show on the TV as existing, if they’re over ~2GB (I’m not sure what the magic number is but it’s a tad more than 2GB but substantially less than 3GB). I did some Google searches and found that it could be the format of the hard drive — so I tried reformatting a spare hard drive as exFAT, FAT32, and NTFS, as recommended in various forums. Nothing worked. Still the >2GB files wouldn’t show.

What I needed to do was split the video files into smaller chunks, each less than 2Gb in size. Enter Avidemux.

Solution

I used Avidemux because I already had it and had used it once before for something quite some time ago. I had to relearn what to do, so for my future self, here’s how to split a large video file into smaller chunks.

Environment: Windows 7, Avidemux 2.6.8 – 64 bit

  1. Load the file into Avidemux (either drag and drop from the folder or use File > Open).
  2. If displayed, wait a minute or two until the two progress bar screens are finished.
  3. Check the settings on the left side of the Avidemux screen: Video and Audio Output – Copy; Output Format – select the same as the original file (e.g. MP4, MKV)

    avidemux01

  4. Use the slider or playback controls to get to the starting point of the new clip.
  5. Click A.
    avidemux02
  6. Use the slider or playback controls to get to the end point of the new clip.
  7. Click B. The new clip is bounded by a blue box in the slider area.
    avidemux03
  8. Go to File > Save, then navigate to where you want to save your new clip.
  9. Give it a file name, then click Save. The recording will start and take a few minutes.
  10. When finished, you can either create another clip (as you would if you’re splitting a large file), or close the file. To create another clip, click A again then repeat steps 6 to 9.