Invisible if css is enabled, don't click
This shouldn't be displaying, if you have css disabled, don't click

Archive for the 'IT' Category

Printing multi-frame Tiff images in VB.NET to a certain printer tray

Wednesday, March 7th, 2007

A part of work I was asked to create a simple program that prints a multi-frame Tiff image from the file system to a (user-definable) printer and specific tray and to add some fun the ability to specify which page to start on and the ability to skip X number of pages between.

This is a edge case and finding the information was a huge task, while I do program VB.NET some (I know and use at least four languages,) I am mainly a web app programmer so I don’t know much about image manipulation and printing, I feared I would be heading into Win32 API land and flash backs of my days as a VB6 programmer came flooding back.

Luckily it wasn’t that hard, getting the correct information and merging it together was 95% of my battle. Following the jump will reveal the secrets.

(more…)

Popularity: 86% [?]

Moto Q - Final Word

Tuesday, January 30th, 2007

I originally wrote a glowing review of the Moto Q, followed up by a rather bitter account of what had happened since, and now that I’ve had a working Q for two months without incident I’d like to put in my final word.

I still love the Q, we’ve had a rocky relationship but stuck through the good and the bad, but the effect of the experience has compelled me to recommend anyone against this phone. Not because of the phone itself but because of the uncertainty.

I am living in constant fear it’s going to crater on me again, I have made backups of my contacts and files on the phone so that doesn’t bother me as much as what happens if it craters on me at the end of my warranty? I’m locked into a 3 year contract and Telus doesn’t give you a new warranty every time they swap your phone.

Yes, if your phone dies, you take it to the mobility store, they request another unit and take yours. You don’t get a brand new unit mind you, it’s refurbished, which means you’re receiving someone elses broken unit that has been “fixed.” So it’s a gamble whether you’ll get one that will stay fixed but they don’t give you an extension on your warranty, does that seem right to you?

It doesn’t to me and it makes me angry. I feel foolish for adopting a technology so early, I’ve been burned like this before and I swore I’d never do it again, which is why I am so leery of the new Apple iPhone, though I doubt I’d ever purchase it due to it’s price despite having to lock yourself into a contract ($600 with a 2yr Cingular AT&T contract.)

With that said I’d like to address some stuff that I’ve noticed that repeatedly shows up in my traffic logs

1. You cannot do a hard reset on the Moto Q if you’re running the old firmware. I highly recommend doing a backup and upgrading your firmware from the motorola site as soon as possible. To do a hardware reset if you have the current firmware is, from a powered off state, hold the center action button and press the power button to turn it on, it should then prompt if you wish to do a reset.

2. Problem starting up, if you Q is not freezing on the start up, first thing you should do is try removing the battery. Telus reps usually recommend leaving it out for an hour then trying again, most likely this is not going to do anything but if it does, be happy. If it doesn’t, you’re going to need to do a hard reset (see #1 about that.) Again if you didn’t upgrade your firmware, you need to make a trip down to the mobility dealer, hope you backed up your data cause it’s gone (don’t forget to take out your MiniSD card before handing over your itty bitty brick.)

3. Voice Recognition, as I stated in my first article, is expecting you to talk to it like a person, not a baby. When it prompts you for a command speak to it clearly but as you were talking to someone else. It is also highly recommended you include last names and how you want to contact someone. For example, I want to call Bob Smith on his mobile phone I would say CallBobSmithMobile in one breath, it will better understand that than Call, Bob, Smith, Mobile. Also it is a good idea to imitate the pronounciation that the VR uses, my friend has a last name Barbutza, pronounced Bar-boot-za, but the phone pronounces it how it reads Bar-but-za. Finally if it asks you a Yes/No question wait until you hear the beep before answering otherwise it won’t register a response, this is the most annoying part about it since there is a noticable delay between it asking your a question and when it will start accepting a response. By habit you’ll be half way through your response before it will start accepting, try breaking that habit, this is also the one exception where speaking unnaturally helps, yeeeess works better than yes.

Popularity: 80% [?]

Javascript: determine if element (or any of it’s parents) is hidden. Pt. 2 (a better solution)

Monday, December 4th, 2006

I while ago I posted my code to find out if an element is hidden (with added complexity that if it’s parent is hidden it will also be hidden despite the fact that it’s own display style may not be set.) Originally I came up with the following code:

  1. function displayNoneSet(element){
  2. if(element.parentNode == null){
  3. //we’ve reached the top of the tree #document doesn’t have a style property
  4. //this means that no element is set to hidden on the tree from the original element sent
  5. return false;
  6. }else{
  7. if(element.style.display == "none"){
  8. ///We’ve found a node that is hidden
  9. return true;
  10. }else{
  11. //check the element’s parent, I don’t like recursion, but the only way I see this working
  12. return displayNoneSet(element.parentNode);
  13. }
  14. }

Right away I knew it was a less than perfect example of finding what I needed, I prefer to avoid recursion as much as possible. Eventually I came to the realization that I was overthinking the problem and I came up with a much more elegant solution to the problem. And here it is:

  1. function displayNoneSet(element){
  2. while(element.parentNode){
  3. if(element.style.display=="none"){
  4. //if we have found an element on the DOM tree that is not displayed
  5. return true;
  6. }
  7. element=element.parentNode;
  8. }
  9. //if we’ve got to this point no element was found that had style.display set
  10. return false;
  11. }

This I can live with much easier.

Technorati Tags: , , , ,

Popularity: 48% [?]

Moto Q Hell

Wednesday, November 29th, 2006

So I got back my Moto Q about a week after the previous post, lo and behold, it was a P.O.S. as well. This one has a new power saving feature that randomly turns off the phone for you as well as a call time reduction feature that doesn’t allow outside calls in, also at random. I’m getting quite frustrated with it, yesterday my friend was coming to pick me up from work to go to the Hockey game (Calgary vs Colorado, if you were watching sportsnet you might have saw me in the crowd when Calgary scored on Colorado in the second round, twice) and he didn’t quite know where my work was. He was parked two buildings down waiting for me, while I was in my building waiting for him, he called me six times and I did not receive one single call. He also tried texting me which also did not make it through.

So when I have time I have to take it to the mobility dealership yet again to get it exchanged, and possibly wait another week to get a new one. Well not a new one, a refurbished one, so basically spinning the Russian roulette wheel again. At least I’ve backed-up my contacts this time.

Word of advice to those considering this phone, wait a generation or two, there are plenty of serious bugs Motorola and/or Microsoft have to work out.

Popularity: 62% [?]

Moto Q: two months later… dead.

Thursday, November 2nd, 2006

My Moto Q died on me the other day, I would turn it on and the thing wouldn’t boot past the vendor screen (the very first screen you see at when booting the device.) After about 2 minutes of nothing, the phone would start to glitch, and if it weren’t so frustrating it would be a pretty cool screen saver. I tried removing my battery for a few minutes but it still acted the same, I tried removing it for a few hours and no luck.

I head over to the oracle, aka Google, and asked what could I do. The Oracle replied that the phone needed to be reset, and that to do so you had to go into the settings, select Master Reset and reboot the phone. Ok so my phone that won’t get past the first boot screen needs to get past it in order to reset it so that I can fix it… that can’t be right there must be another way to reset it. There is, you can hold down the “ok” button (the silver button in the center of the directional pad) and the power button and after a few seconds the Moto Q will ask if you want to preform a hard reset… if you’re running the lastest firmware.

Turns out that Motorola shipped the Q without the ability to do a reset any other way than through the Windows Mobile settings. They’ve recently released a patch that is not only supposed to address the problem of not being able to boot but also allow the users to do a hard reset on boot. It seems to me that this is a feature that should have been standard to begin with.

Unfortunatly for me they’ve only JUST released the firmware upgrade for Telus users and I haven’t had a chance to upgrade, not only that but I also just formatted my computer. This normally wouldn’t matter but all my contacts, emails, etc were backed up on my computer until a few days ago and I hadn’t synced my Q since. When I took it to the mobility store they told me it was a DOA and they’d have to send it to Telus whom would send me a new unit and there was no chance of data recovery.

Take my advice, back up your Q immediately, head over to the Motorola site  and grab the firmware upgrade. This is a “common” problem for both for Telus and Verizon users.

Technorati Tags: , , , , ,

Popularity: 74% [?]

We did not invent the algorithm. The algorithm killed Jeeves. The algorithm constantly finds Jesus. This is not the algorithm. This is close.