This comes up all the time when preparing reports or scientific papers.  Column values should be aligned at the decimal point but the standard formatting options in Word are left, right, center, and justified.  MS Word has a command for doing this, it just isn’t where you think you’d find it.

Create your table in Word or paste it over from Excel.  Highlight the cells that you’d like to align, now click on the left tab in the top left corner and scroll down to tabs…

word-decimal-1

The following window will pop up:

word-decimal-2

In the tab stop position field type in a distance, say  2cm, select decimal and then press set. This will add the 2cm feature to the box on the left.  Click on 2cm to highlight it, and then press OK.

word-decimal-3

Voila!  The colums are aligned according to the decimal point.

Advertisements

I have an external USB drive, formatted in Mac OS Extended (Journaled) which I use with my iBook G4 (OS X Tiger).

Sometimes when I eject the drive the computer hangs and the pinwheel spins for a few minutes, and everything is fine.  Other times it’s not.  I’m not sure if firewire drives perform any better.  I bought the USB drive because it was small and cheap.

Anyways, one day I plugged the drive in and OS X couldn’t mount it.  I tried repairing it in Disk Utility and the repair failed with an “Invalid Volume Header“.  DiskWarrior is supposed to be able to repair drives that Disk Utility can’t, but I didn’t feel like spending the $100.  All of the photos on this drive were mirrored on another drive and also on DVD.  The only thing I’d be losing are the star ratings I’d assigned to the photos (for the process of sorting through them).

So, considering that I wasn’t about to lose any data that I didn’t already have backed up, I tried to find a UNIX-type way to repair the disk.  The Apple website had some notes about fsck (file system check), but nothing much that helped me.  Then I found a website (that I can no longer find) that provided a solution running fsck.

First, start up disk utility and write down the location of the disk that won’t mount.  OS X will give it a location such as /dev/disk1s3 .  See Figure 1.

disk that won't mount

If you run disk utility you will get an error message such as shown in Figure 2.

disk utilities fails

The way to repair the disk is to use fsck with the -r and -f flags. -r rebuilds the filesystem catalog, and some times you’ll need to use the -f flag to force a check because it’s a journaled system.  I haven’t had to use the -f flag (perhaps someone could comment on this?). If your drive is given the location /dev/disk1s3 you would type:

fsck_hfs -r /dev/disk1s3

Terminal will take a few minutes then spit out a bunch of code like this:
josh:~ Josh$ fsck_hfs -r /dev/disk1s3
** /dev/rdisk1s3
Invalid Volume Header
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
Missing thread record (id = 485454)
Incorrect number of thread records
(4, 226)
Incorrect number of thread records
(4, 226)
** Checking multi-linked files.
** Checking Catalog hierarchy.
Missing thread record (id = 485454)
Invalid directory item count
(It should be 38 instead of 57)
Missing thread record (id = 485441)
Invalid directory item count
(It should be 0 instead of 3)
Invalid volume file count
(It should be 402470 instead of 404177)
** Checking Extended Attributes file.
** Checking volume bitmap.
Volume Bit Map needs minor repair
** Checking volume information.
Invalid volume free block count
(It should be 9243234 instead of 13012437)
Volume Header needs minor repair
(2, 0)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
Missing thread record (id = 471381)
Missing thread record (id = 473603)
Missing thread record (id = 476491)
Incorrect number of thread records
(4, 226)
** Checking multi-linked files.
** Checking Catalog hierarchy.
Invalid volume file count
(It should be 402470 instead of 404177)
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** Repairing volume.
Missing directory record (id = 476491)
Missing directory record (id = 473603)
Missing directory record (id = 471381)
** Look for missing items in lost+found directory.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
Invalid volume file count
(It should be 404177 instead of 402470)
** The volume HDD could not be repaired after 3 attempts.

If it still reports a failure, run it again.

josh:~ Josh$ fsck_hfs -r /dev/disk1s3
** /dev/rdisk1s3
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
Invalid volume file count
(It should be 404177 instead of 402470)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume HDD was repaired successfully.
josh:~ Josh$

Success!  The volume is repaired.

Apple reports that some errors that get reported when a volume is journaled are benign. See http://support.apple.com/kb/TS2028?viewlocale=en_US. See also http://support.apple.com/kb/TA21053?viewlocale=en_US for Apple’s support page on repairing a journaled volume.

Dashboard was a pretty cool feature when I first got my iBook G4, but I hardly use it these days and sometimes accidentally activate it by pressing F8 when I mean to press F9.  The problem with doing this is that some widgets continue to run in the background, eating up system resources.

There is an easy terminal command to disable dashboard, and it only disables it for your user account.

Start by opening up a terminal window.  If you don’t already have terminal in your dock, click on finder and navigate to the utilities folder and double click on terminal.  Then copy and paste the following code:

defaults write com.apple.dashboard mcx-disabled -boolean YES

killall Dock

The first line disables dashboard, by replacing YES to NO you can bring it back.  The second line restarts the dock.

If you want to see how much memory these widgets use, open a terminal window and type:

top -u

To return to the command line, press ctrl+c (break) to interrupt the process.  You will see that OS X does a good job allocating resources and even big programs don’t hold on to memory if they’re not using it.  From here you can kill any program that is misbeahaving by typing:

kill -9 PID

Where PID is the Process ID (far left column) and -9 means no exceptions.

November 2018
S M T W T F S
« Aug    
 123
45678910
11121314151617
18192021222324
252627282930  

Archives

Advertisements