Friday, September 30, 2011

Windows Vista source code (funny, especially for non-Windows users!)

With thanks to Azyure, this very funny purported Microsoft Windows Vista "code extract" - originally posted on PC World New Zealand's Linux-focused Tux Love blog (read their post, excellent!), via MyLox blog.

Non-programmers, don't be fazed - it may look like code at first, but just persevere and read it through!


(I hope that PC World won't have a problem with the direct link to the pic but if they do please let me know and I'll remove it.)

I'd add that I'm not using Vista yet, and when I bought a laptop last year opted for XP Pro instead. Clearly I made the right decision!

Thursday, September 29, 2011

Recovering deleted files from memory cards, flash drives / thumb drives with Restoration

If you accidentally delete files from a USB flash drive / USB key / USB stick / thumb drive or a memory stick / memory card like an SD card (which you can open and read on your PC using a card reader), unfortunately they don't go into a Recycle Bin from which you can restore them.

Fortunately, there is a way to get deleted files back from a removable disk, if you act fast - i.e. before you try to write anything else to that flash drive or memory card, or indeed ideally before you do anything else with it.

Plug the thumb drive into your PC, or insert the memory card into the card reader and plug that in to your PC. Then try Brian Kato's excellent Restoration utility - which is a free little download that's been around for some years, and works on all versions of Windows before Vista, i.e. XP back to Windows 95.

It can restore files deleted from hard drives too - but in that case you're better off downloading it to a USB key or flash drive (rather than the affected hard drive) and running it from there, so as to try to preserve the deleted files on your hard drive (which should still be there, just invisible). Better still, why not download Restoration in advance onto a thumb drive, and then in future if you need it you can just plug it in and run it from there.

NB do NOT download Restoration to the drive, stick or card containing the accidentally deleted files - download it to another drive!

It's easy to use, but here's a walk through of how to use Restoration:


  1. After you've opened Restoration.exe from wherever you've downloaded it to, select the removable drive from which you want to recover deleted files.
  2. Click "Search Deleted Files".
  3. Normally I'd say "No" to "Do you want to scan vacant clusters?" (but if the search didn't turn up what you wanted, you might try Yes).

  4. The deleted files that it can detect are listed on the left. Simply select the files you want to restore by clicking on them, holding down the Ctrl key as you click if you want to select more than one file.
  5. Then click "Restore by Copying", and choose where on your computer (or external hard drive, or indeed the memory card or USB key) you want the selected deleted files to be restored to. That's it!
It's always worked perfectly whenever I've tried it. I've not needed to use it much as, obviously, I normally try to be careful and not delete files unless I'm very sure I don't need them. But whenever I've used it, it's done the job and saved my bacon. There's no guarantee it will always work, of course, but it's certainly worth a try.

Thanks for the lifesaver, Brian!

Notepad: save non-TXT files without .txt ending e.g. html files

I still often use Notepad in Windows for quickly producing simple html or js files and the like.
One pain is that when you "Save" or "Save as" a file in Notepad, the program automatically sticks a "txt" at the end of the filename so you end up with a file called something like "myfile.html.txt" - which really doesn't work properly as an html file (or whatever) until you rename it to get rid of the ".txt". Or you have to change the "Save as type" box, which is an extra step.
Here's a tip which I only recently discovered, I don't recall where from, which saves you all that hassle - read on for how to save non-text files quickly without a .txt being appended to the end of the file name.
When you choose Save or Save as, in the File Name box just type the name of your file with .html or .htm (or whatever extension you need) as the ending, but surround the filename with doublequotes. NOT single quotes, it has to be double quotes (Shift 2 usually). Like this, where I've used "myfile.html" as the filename:

Then choose your file location and Save it, and you'll find that even though you didn't touch the "Save as type" box, it's been saved with exactly the right file extension - no annoying extra "txt" at the end. I love tricks like these!

Windows: print list of files & folders easily

For how to print a listing of files and folders in a particular Windows directory or folder on your computer (including external hard drives), Karen's free Directory Printer is a great sophisticated tool with the ability to drill down and print the contents of selected subfolders too.
But if you only want a quick and dirty printout listing the names of the files and top level folders in one particular folder (and you don't need a list of what's inside sub-directories too), here's a tip - simply use a web browser. And, if your folder structure is not too complex, you can navigate to and get and print subfolder listings without too much trouble too.
Note that this trick doesn't work with Internet Explorer, which just opens up a Windows Explorer window showing the contents of the folder - but it works with all other popular free browsers like Firefox, Opera, and even Google's Chrome.

How to print listing of files and folders in a particular directory or folder

  1. Open Windows Explorer or My Computer and navigate to the folder you want; open it so you're viewing its contents.

  2. Click in the address bar (or hold down Alt and tap d). This displays the "real" folder address or path and highlights it.

  3. Copy the selected address into clipboard (rightclick it and Copy or hold down Ctrl and tap c).
  4. Now go to your browser (use anything but IE - try Firefox).
  5. Click in the browser address bar (or Alt d, yep that works in browsers too), then paste the copied folder address (Ctrl v or rightclick and paste).
  6. Then click Go or hit the Enter button in your browser, and the contents of the folder you want are listed in the browser like a webpage.

    Firefox
    Opera



    Chrome
  7. You can now just print the page as you'd normally do for webpages (menu File -> Print or Ctrl p).
That's it. As you can see it'll even show info on file sizes and date last modified, and you can click the links to open files or folders to navigate round some more.
Interestingly for trivia fans, what they show in the address bar is different - with Fox showing (in my example) file:///K:/My%20Documents/test/, Chrome file:///K:/My%20Documents/test/ and Opera file:///K:/My%20Documents/test

Sit less, live longer - try online timer?

No matter how much you exercise, the more time you spend sitting, the higher your risk of dying prematurely. Sitting for long periods is seriously bad for your health.
It seems that if you want to live longer, not only should you do physical exercise, but you also need to cut down on how much time you spend sitting down. Even just getting out of your chair for a short stretch or brief walk, or just standing up for a change, can make a difference. Indeed sitting for 3 or 4 hours continuously can trigger negative physiological changes in your body. See e.g. articles in New York Times ("a study of people who sit for many hours found that those who took frequent small breaks — standing up to stretch or walk down the corridor — had smaller waists and better profiles for sugar and fat metabolism than those who did their sitting in long, uninterrupted chunks"), USA Today, Daily Mail, and ThomasNet (with more links).
I'm blogging this because further research in the US has just confirmed the same thing recently - "If you sit all day, you are in real trouble even if you exercise regularly". "Researchers say time spent sitting was independently associated with total mortality, regardless of physical activity level. They conclude that public health messages should promote both being physically active and reducing time spent sitting."
That means you, office workers, coders, gamers and inveterate surfers and film / video or TV addicts alike! And that means me too, of course.
So what to do?

Suggestion - use online timer

To help make us get up from our chairs from time to time, here's a tip: try using an online timer alarm. It'll be better for the back as well as health generally.
I've surveyed a few free online countdown timers, and my personal choice is Timeme.com (go straight to Timeme review and howto):
  1. Set your browser to autostart (how to add it to Startup folder) so it launches automatically when you turn your computer on, and
  2. Set Timeme (or other online timer of your choice) to be your browser's home page. (How to set home page: navigate to the site you want, then click "Use current" in your settings - in Internet Explorer it's Tools > Internet Options > Home Page; Firefox Tools > Options > General > Home Page; Opera Tools > Preferences > General > Home Page; if you do this with a blank page already open in a separate tab, your browser will open automatically on both a timer page and a blank page you can surf in.)
  3. Then, just remember to restart the countdown when you get back to your desk, if you've left the room while it was still counting down. And remember to pause it or stop it if you're leaving your desk at work or it may annoy your coworkers if it goes off when you're not there to shut it up!
You can install a timer application on your computer instead, if you prefer - but lots of us spend more time sitting at a computer at work, and most workplaces I know of won't let you install any software on their computers, so a browser-based solution seems to be the best (assuming the computer is connected to the internet, of course). I do briefly mention some downloadable software later, just for completeness.

Online timers - review

So, here is a round up and short reviews of the online timers I've found which seem most suitable for regularly prompting us to get out of our chairs.
For all of these, you just have to:
  1. have your web browser open on the right page (even better, set it as your browser's start page see below), and
  2. where appropriate (this is with all of them except TimeMe), click the Start or similar button on the webpage to get it going for the day.
To hear the timer alarm go off, with the services I've picked you don't need to be viewing the browser tab displaying that page. You could be browsing in another tab.
You don't even need to be in the same application - e.g. you could be doing some word processing or reading your email, or even surfing using a different browser; the timer alarm will still go off, just as long as you've left the timer tab open in your browser in the background.
Of course you won't hear it if you're not in the room, so I repeat, if you leave the room (which means you've gone and got up out of your chair, pat on the back), when you come and sit back down you need to remember to re-start or reset the timer again.
None of the online services I found is perfect for what I have in mind, but I'll give the pros and cons of each.
Here are my criteria. To remind me not to stay seated for too long, what I really really want is an online Web timer which:
  1. webpage, with autoload - comprises a webpage you can set as your browser home page, so that it loads automatically when you first open your browser, and which you can save as a bookmark or favourite too
  2. alarm - plays a sound every say 30 or 45 minutes, to remind you to get up and move around, stretch, have a short walk etc (a popup window that takes focus even if you're in another application would be a bonus)
  3. makes you get up! - plays the sound continuously until you manually stop it, so that even if you're engrossed it forces you to get up off your butt and do something about it. Maybe with a backstop at 2 minutes so that it doesn't go on forever if you're not at your desk, like car alarms are supposed to have at 20 minutes (but sometimes don't!)
  4. restarts count automatically - when you click (or, I wish, press a key?) to shut it up, it should automatically start the timer countdown running again, so it'll sound again in another 30 or 45 minutes or whatever. One button to do it all. You shouldn't have to stop it and then click Start again, otherwise people will forget to click Start again.
  5. choice of interval - lets you choose the interval you want between timer alarms, e.g. 30 or 45 minutes, but won't let you choose more than 1 hour (maybe 2 hours? Don't know medically what the recommended longest time you should spend sitting still is). Choosing 7 hours would defeat the object!
  6. pause and restart functions - lets you pause the cycle and resume it again, or even restart it from scratch, e.g. after you've popped out to the little room.
  7. choice of alarm sound - lets you select the sound you want - horn, siren, horses neighing, whatever…. Ideally either on the site or, for those who prefer it, a sound file from your their computer e.g. MP3 or WAV.
So here's my shortlist of free online timers that come close to what I want for this sort of use.
Remember, none of them meet all 7 of my criteria. So if anyone builds or knows of something which does, please let me know!

1. http://timer.onlineclock.net/


Pro

Alarm won't stop until you manually click "Alarm Off". Which is what we want to make us get up!

Con

  1. After it goes off and you click Alarm Off, you also have to (1) click "Back to Timer" and then (2) select the countdown time afresh, to start it going again. Extra steps which some may forget.
  2. No choice of which sound to use.
  3. Sounding till you manually turn it off can be a con if you're not at your desk when it goes off - it could drive your co-workers crazy. So remember to set it to Off via the dropdown if you get up from your desk while it's still counting down, and then to restart it when you get back.
Try Online Clock timer. The developer has kindly said he'll look into making the cycle repeat automatically on clicking "Alarm Off", when he has time.

2. Java timer


Click "Count Down", choose hours/minutes/seconds, then click Start.
Tip: if you don't like the label "Tea Timer", click on that label and type what title you like instead, then hit Enter or Return (or click anywhere outside that area). If you mistype you can't backspace, but just click on the name again and re-type it.
The code is from http://javaboutique.internet.com/JavaTimer/ and is available online on various websites such as (click one of these links to try it, it's the same on each):

Pro

  1. It remembers your previous setting e.g. x minutes, as long as the browser remains open, so (unlike the previous service) you don't have to re-select the countdown time, so after the alarm sounds you can just click Start to restart the timer (and stop the alarm sounding).
  2. Alarm sounds for a decent length of time too.

Con

  1. Every day, the first time you go to the webpage you have to click "Count Down" and then choose the number of minutes afresh, to get it going. Some may forget to do that. Similarly the "Tea Timer" title - your changes aren't saved.
  2. You have to click Start to restart it each time after it goes off. Again, some may forget to do that.
  3. The alarm stops after a few seconds so you might ignore it and forget to stand up.

3. TimeMe (via Vicki Blackwell)




  1. Click the Timer Stopwatch Settings link, then (see pic above):
    1. Choose your Alarm sound. Tips:
      1. go for Horn (sounds for longer and is the most insistent, to me) or Beep (loud-ish, but too short in my view)
      2. don't use "Pop Up" - that only plays a sound if you're still viewing that tab, or are in another application; if you're in another tab of the same browser, the alarm won't go off. Also you have to OK the popup before the timer will restart the loop.
    2. Tick Auto Start (so the timer automatically starts counting down whenever your browser opens that webpage e.g. on startup)
    3. Tick Loop to repeat the timer automatically; choose Sound (you can preview them) then
    4. click Save.
  2. It goes back to the main page (see pic below). Just click Stop if necessary first, then for Start Time enter 00:30:00 or 00:45:00 (for 30 or 45 minutes respectively) or whatever timer interval you prefer (you can leave the Stop time at 00:00:00), then click Set. That automatically starts the timer going as well.
  3. Note that:
    1. The "Stop" button actually pauses it (and you can click Start again to continue).
    2. "Reset" button restarts the countdown from scratch, e.g. if you've got up for a cuppa, you can give yourself a pat on the back and start the 30 minute (or whatever) countdown from 00:30:00 afresh when you get back to your seat.
  4. Every time you visit that page (unless you've deleted your cookie) it'll remember your settings.

Pro

  1. Very customisable, including Loop to repeat the cycle automatically (hooray!).
  2. Your settings are remembered on the computer with a cookie. If you delete cookies, this'll go unless you remember to preserve the cookie for this site. But you can always redo your settings.
  3. Choice of different alarm sounds which you can preview.
  4. "Stop" button to pause is good, as is having a "Reset" button to restart the cycle
  5. Decent help page.

Con

  1. Alarm only plays once through, not continuously until you stop it. Good for your colleagues, not so good to make you get up!
  2. If you use a different computer you have to set up your settings afresh on it. A very minor disadvantage considering most of the others won't save any settings at all.
  3. The alarm options are mostly too short (Drums) or too soothing (like Clarinet and Sonata) to make you get up! Phone is too confusing. Which is why I think Horn is best, it's the loudest and plays for the longest time.
  4. With browsers other than Internet Explorer you'll have to install QuickTime plugin in order to hear the alarm - e.g. for Firefox.
  5. It seems to have paused itself once, in my testing. Maybe it was me, but the button should have read Start after a manual pause, and it didn't, yet it wasn't counting down..
Try TimeMe.

4. Online Stopwatch/Countdown

Quite sophisticated when using the Custom option. And certainly the most Web 2.0, with the ability to add their widgets to your blog or website, Facebook, gadgets for iGoogle etc.
The settings I suggest are as follows (you can test it by picking a short countdown).

  1. See pic above - just select "Just the Countdown Timer", pick your alarm sound, pick "Ring until canceled", and I'd go for "Always start the timer at" and enter e.g. 30 minutes (00:30:00) or 45 minutes (00:45:00).
  2. Then click "Get Link to Countdown Timer", and click or save the link in the blue box that appears - that's the link you want to use for your home page or favorites in future, which goes to the custom webpage they'll set up.
  3. If you've chosen "I will set the time each use", after clicking the link to the timer webpage you'll have to click the number buttons to set the time, then click Set and Start. And each time you go back to that webpage you have to do that too. Which is why I prefer

Pro

  1. Sets up a special webpage you can access from any computer over the internet, with your chosen settings.
  2. Alarm will keep going until you click "Clear" (if you use "Ring until canceled" as I suggest), so you'll have to pay attention!
  3. Good selection of sounds, which again you can preview. The alarms are good and loud too (though "Siren" may cause a real stampede. I like Submarine, Air raid siren and Original bell for being insistent without being too piercing, although Horse race bugle call is rather fun, and "Applause" may reward you for being a good healthy thing and getting out of your seat for a bit!)
  4. Pause button available (Start becomes Pause after you click it), which becomes Cont when pressed.

Con

  1. You have to remember to click Start when you first open your browser, to get it going every day.
  2. Every time it goes off and you click Clear, you then have to click Start again afresh for the next time.
  3. There's a Pause option but no Reset (unlike TimeMe). Tip: just click Clear and Start to reset.
  4. As with Online Clock, the fact that it won't shut up till you manually click Clear is great if you're at your desk, but bad if you left and forgot to turn it off as it may annoy your colleagues, so you need to remember to turn it off if you get up! And restart it when you get back.

Here are some pages I made earlier, if you want to use them - remember you have to click Start each time after you click Clear, as it won't repeat the cycle automatically (if you try the links below, on this occasion please ignore the arrows, don't click on them, just click the links; and use the Back button on your browser to get back to this page, not the Back button on the webpage):
Try Custom Countdown.

Desktop alternatives?

Online Stopwatch also offer a free basic Windows download which will "stay on top" of your other apps, plus other more customisable SWF downloads for Windows and Mac, all of which hopefully you can download and run stand-alone on your work computer even if your IT department won't let you install software generally.
You just doubleclick the downloaded file to run it, and you're not installing anything, so hopefully your IT department won't come and wag their finger at naughty you - but it's best to check with them first.
Note that the SWF files need Adobe Flash Player installed to run, which you may or may not have on your work computer; the "stay on top" doesn't, but it's Windows only, and is not very customisable.
XNote Timer (again via Vicki Blackwell, NB it's the Timer not the Stopwatch) for Windows also runs stand alone, again without needing to install anything; it's free to try though they ask for payment if you use it, it lets you use your own sound files, you can tick "Restart the timer" to keep it going round and round, you can even set hotkeys to start, stop or reset it, yay.
But, there's no Pause, and more importantly you can either get your sound file to keep playing continuously (which is what the Loop option here does, confusingly) till you hit Stop, or you can have the cycle automatically restart - but you can't have both. So either tick Loop to keep the alarm playing, then click both Reset and Start each time it goes off; or else, use "Restart the timer" and remember it'll go off once but it won't nag you continuously till you deal with it. Tip: click More, pick Timer; to change the options e.g. sound file, interval, you should change to Stopwatch then change back to Timer.

Gmail: "Loading", can't reply or compose email, chat not working in Firefox? - possible solution

Is your Gmail stuck or hanging on "Loading…" in Firefox? Gmail chat not working either? The issue of Gmail freezing in Firefox seems fairly easy to find the solution to online, but given its huge annoyance factor here's step by step answers to help non-technical users to fix the problem.
The Firefox browser and Gmail don't always work well together. I've had previous experiences of Gmail being unusable for a while on Firefox after an upgrade to either, until the other caught up.
This particular problem seemed to persist however. (I used Internet Explorer or other browsers for Gmail, in the meantime.)
If you started getting this problem after upgrading Firefox recently (probably to version 3.6.12), one possible tip to solve the issue is this (it certainly worked for me!):
  1. In Firefox, go to the address bar and type "about:config" without the quote marks and hit Enter.
  2. You'll get the warning below, just click "I'll be careful.."

  3. Now you'll get a window that looks something like this:

  4. In the Filter box, type (again without the quotes) "dom.storage" and you'll see something like this; note the dom.storage enabled line which I've outlined in red:

  5. Now doubleclick on the "dom.storage.enabled" line, outlined in red above, so that under the "Value" column it now reads "true", like so:

  6. You can now close out of that tab, and try Gmail again.
If it still doesn't work I'm afraid the problem is something else and you'll have to try more troubleshooting. But it might well work - it has for lots of people.

Clearly Google are now using DOM storage for Gmail in Firefox - and you have no choice but to enable it if you want your Gmail to work properly. A stage on the way to full HTML 5, I suspect.

Gmail Priority Inbox - review & wishlist

This post gives thoughts, tips and suggestions on Gmail's newish Priority Inbox feature.
Google have provided a "Priority Inbox" feature for Gmail since they launched it in the late summer of 2010, clearly with their sights set on wooing over enterprise and SMB users (and educational institutions) to Google Apps, trumpeting the potential time savings and productivity gains - to some external coverage, and even available to a limited extent on Android phones.
It was highlighted as a new feature when you logged in to Gmail for a while, but not any more. From my experiences of using it, it's generally helpful - even though normally I'm a control freak who doesn't like anyone else, least of all software, automatically making decisions for me.
If you're a new Gmail user, or you didn't activate it when it was featured, this post gives an overview of this feature.

What does Priority Inbox do?

If you activate "Priority Inbox", you get a new Priority Inbox view which splits your incoming Gmail email into 3 sections:
  • "Important and unread",
  • "Starred" and
  • "Everything else".

The idea is that Gmail sorts and prioritises your email - the important stuff goes at the top so that you see it first. (See the Google video promo at the top of this blog post.)
At first, it guesses what to "file" under "Important" and what to put in "Everything else".
You "train" it by clicking icons to indicate an email is Important ("Mark as Important" has a + sign) or "Mark as not important" (- sign), so that over time it should learn and improve. There are icons both at the top of the Inbox (outlined in purple below) and also (outlined in red below) of the individual email, so you can "promote" or "demote" a single email or a selected batch in one go.

When you've read an Important email it goes into the "Everything else" section. Unless you starred it, in which case it goes into the Starred section. Or unless you archived it, in which case it disappears from the Inbox altogether.

How to activate Priority Inbox

Go to Settings (top right) and the Priority Inbox tab (or while you're logged into Gmail click this link).
Then select "Show Priority Inbox" at the bottom and click the "Save Changes" button.

Tips

The Gmail help pages have some further help and tips. Google have also blogged some specific tips.
Especially in the early days, be sure to check the "Everything else" section in case important emails get shunted there by Google. If an important email gets put in that section, use the "Mark as Important" icon to tell Google (and hopefully it'll do better next time with similar email).
Note that if you star an email it appears in the Starred section, but if you then archive it, it won't be shown there. Useful for keeping just the "star starred" items there and preventing less important starred items from cluttering up that section.
It's worth checking out your Gmail Settings for Priority Inbox (click that link only after you've logged into Gmail).
Do you find Gmail sometimes goes to the Priority Inbox, other times to the "normal" Inbox? Probably that's happening because "Default inbox" is set to "The last inbox I used". Really confusing and bad for usability. If people choose to turn on Priority Inbox, then this setting should default to "Priority Inbox". Change it to that, and click "Save changes" at the bottom.
For keyboard shortcuts fans - the g then i combo takes you to whatever Inbox has been set in the Default inbox section. So if you change it to "Priority Inbox" the combo will always go to that page, rather than sometimes one and sometimes the other.
Another tip - the Priority Inbox sections' Options let you choose how many emails you want to see in each section, and other options. For "Starred" I personally use "Show up to 10 items" so that the "Everything else" emails don't disappear too far off my radar.
Still too many starred emails in the Starred section? (even though only the latest 10 are displayed). Just archive the ones you don't need or want to see in that section.

Observations / suggestions

Personally, perhaps for cultural "left to right" reasons, I found it a bit confusing that the "Mark as Important" icon is on the left and "Mark as not important" is on the right. I keep expecting the one with the + sign to be on the right and the one with the - sign to be on the left, and had to stop myself from clicking the wrong icon to mark emails as important (or not) at first! I'd find it easier if they swapped the order of the icons.
A more important suggestion - I think that when you have read an email that's in the "Important and unread"section, it should NOT go to the "Everything else" section but should be automatically archived, so as not to clutter up the "Everything else" section and get in the way when you try to scan the emails in "Everything else". You've read it, you don't need to see it again.
So I wish Google would add an option in the Settings which you can select, something like:
When I read an email in the Important and Unread section:
  • archive it
  • put it in "Everything else".
But those are relatively minor, all in all I find Priority Inbox pretty useful to help me manage my email. I've even been able to use it to produce an "All unread email" view, which doesn't exist with Gmail. I'll blog about how to do that in a separate post.