Dual Booting Ubuntu with Windows

January 28th, 2007

Tested this and it all works fine. I had Ubuntu dual-booting with Win2k and decided to try it out with Vista RC2 as well. Got it working in the end but Jeebus, 10GB install for Vista Ultimate?

The machine creaks and groans it’s way to the desktop in well under 10 minutes and feels like a sloth on Valium while using it. This is because I only (only?) gave it a 10GB partition, mind. On a decent HD it boots just fine, but even so…

Testing Ubuntu 6.10 – Edgy Eft

January 28th, 2007

Just for something to do I decided to install a flavour of Linux onto a spare HD to see how far they’ve come in respect of drivers, advanced hardware and the like. Originally I went for Fedora Core 6 but the fact that the package/update manager would bomb out on me didn’t bode well.

Ubuntu 64 was next up but I had problems with Java and related programs, so I sighed, fired up Azureus once again and downloaded the 32-Bit version instead. Latest release is 6.10, Edgy Eft, and that’s what I’m currently evaluating.

Not everything was smooth sailing. My Logitech DiNovo Bluetooth mouse and keyboard would disconnect every time Ubuntu got to the login screen. A quick search around the Internet and it turns out that using the Synaptic Package Manager to remove ‘bluez-utils’ solves the problem.

Next up was the screen resolution. Having suffered enough with the built-in updates I simply downloaded Alberto Milone’s ”Envy” script and ran that instead – all drivers were downloaded and installed with no fuss. Huzzah! I have yet to see how Ubuntu handles a dual monitor setup since I am currently limited to a single screen (we’re rearranging the house here), but it should be OK.

Quanta+ looks like it will be an acceptable replacement for Dreamweaver, and OpenOffice handles my all-important company spreadsheets without too much hassle. I can connect to the networked storage (Bufallo LinkStation) without problems and Evolution looks like an acceptable replacement for Outlook. So far, bar a few niggles, everything is going fine.

One thing I am not looking forward to is using The Gimp in place of Photoshop, and that’s entirely because I don’t want to learn another package. I fully intend to keep all my legit Windows software though, and install Win2k on another partition so that I can dual boot. With all my actual data on another drive accessible from both machines, this gives me the best of both worlds.

So it looks like Ubuntu can handle all the requirements I have to continue my business as well as my fund and games. I will be doing some more testing in the coming week and if all goes well, I should be reformatting and dual-booting sometime next weekend.

Some other things I should test:

  • Dual-Booting
  • Card Reader
  • Printer and Scanner
  • Joypad (shut up!)

There isn’t an awful lot I use regularly, so I should be OK.

Soy Sauce – the truth!

January 23rd, 2007

I have no idea how I ended up at the Wikipedia page for Soy Sauce but I was certainly didn’t expect this

The Truth about Soy Sauce

The Truth about Soy Sauce

Wii Strap Replacements

January 20th, 2007

Got a letter from Codestorm this morning containing my four replacement Nintento Wii wrist straps. Nothing remarkable about the presentation, it was just a white DL envelope with a llist label on the front and four Wii straps with a photocopied tip sheet enclosed.

But they’ve arrived, and I can now fling my Wii Remote about in gay (notgay) abandon safe in the knowledge that I have replacement straps. Or something.

The tips thingy reads:

Wii
The following tips are advised for safe play:

  • Always wear the writst strap while playing.
  • Keep a firm grip on the Wii Remote at all times.
  • Make sure people and objects are out of the range of movement before play begins.
  • Players shoujld keep at least three feet/one meter from their televisions and dry their hands if they become sweaty or wet for any other reason.
    Remember that the Wii Remote is responsive enough to detect minor movements – so excessive and forceful actions are not necessary. Therefore we recommend not to use excessively rapid, violent or wide swinging motions while using the Wii Remote during game play.

For further information please visit http://wii.nintendo.co.uk

Ito Misaki in Wii Sports?

January 15th, 2007

I was playing Wii Baseball with BootBlock the other day and I spotted a Mii character called Misaki which looked suprisingly like Ito Misaki, aka ‘Hermes’ from Densha Otoko.

Coincidence? I think not.

It wouldn’t have occurred to me if I hadn’t watch Densha Otoko only a few weeks ago.

Vertical Scrolling Text / News Ticker in JavaScript/DHTML

January 9th, 2007
Download Files
Click Here to Download
the HTML source.

This code allows you to create a vertically-scrolling text box of information – such as a news ticker – to your website quickly and easily.  It does not use an IFRAME so the scrolling content is actually part of your document, making it more Search Engine friendly and easier do produce by simply populating it with content from your database.  This makes it XHTML Strict as well.

The DHTML vertical scroller script has been tested with the following Windows browsers, if you experience any problems, please let me know:

  • Google Chrome 2
  • Firefox 3
  • Internet Explorer 7
  • Opera 9.50
  • Safari 3

The vertical scroller works by having two DIVs, one inside the other.  The outer DIV acts as a display frame for the scrolling content, while the inner one holds the content itself.  First of all, then, we need two DIVs:

<div id="scrollBox" class="scrollBox">
<div id="scrollTxt" class="scrollTxt">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae
enim eu mauris rhoncus malesuada. Suspendisse et tellus diam, et ullamcorper
nisl. In nec nibh dolor, et auctor nibh. Duis pretium faucibus bibendum.
Suspendisse eget leo in eros faucibus consequat a id nisl. Quisque cursus
lacinia consectetur. Nam mattis sagittis diam, ac posuere risus porttitor
<a href="#" onmouseover="scrStop();" onmouseout="scrMove();">MOUSE HERE</a>
sed. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos himenaeos. Phasellus tincidunt eros at risus consectetur feugiat.
Etiam id erat vel lectus pharetra posuere. Maecenas rhoncus est vel lectus
posuere dictum. Curabitur rhoncus ligula laoreet nisl rutrum sit amet
convallis purus tincidunt. Ut ullamcorper lorem eu odio tempus placerat.
Proin cursus semper elit sed pharetra. Nam convallis, quam vitae facilisis
varius, ligula purus egestas justo, vitae eleifend metus turpis ac felis.
Aliquam tempus nisi id ligula semper sed porta odio dictum.
</div>
</div>

As you can see, the two DIVs are nested, and I’ve filled our example scroller with typical Lorem Ipsum text just to pad things out.

Our next step is to apply some CSS styles to the boxes to ensure they appear one inside the other.  We do this by adding a small stylesheet in our document’s header:

 <style type="text/css">
  .scrollBox {
   /* The box displaying the scrolling content */
   position: absolute;
   top: 30px;
   left: 200px;
   width: 180px;
   height: 200px;
   border: 1px dashed #aaaaaa;
   overflow: hidden;
 }
  .scrollTxt {
  /* the box that actually contains our content */
   font: normal 12px sans-serif;
   position: relative;
   top: 200px;
  }
</style>

For this example, the box is positioned at coordinates 200,30 from the top-left, but you can essentially do whatever you want with it.

All that remains now is to animate the inner box, moving it inside the constraints of the outer box and looping when it is no longer visible.  We accomplish this with JavaScript, but there’s an important point that needs making here, and that is: You don’t know the height of your content until it is loaded.

What this means is that we don’t know how far the scrolling content inside the box has to travel until we’ve loaded it.  The box may be showing five lines of text or it may be showing fifty, we don’t know, and so we need to calculate the content height once the page has finished loading.  Normally, you would use:

<body onload="doScroll();">

Which would only fire once the page had loaded all elements.  For this example, however, I have called the doScroll(); function immediately after displaying the nested DIVs, since the box only contains text and already has a font assigned to it, and therefore the height of the inner box is already finalised.

Here’s the JavaScript required to get the height of the scrolling content and start the scroll loop:

<script type="text/javascript">
 var scrollSpeed =1;   // number of pixels to change every frame
 var scrollDepth =200; // height of your display box
 var scrollHeight=0;   // this will hold the height of your content
 var scrollDelay=25;  // delay between movements.

 var scrollPos=scrollDepth; // current scroll position
 var scrollMov=scrollSpeed; // for stop&start of scroll

 function doScroll() {
  if(scrollHeight==0) { getHeight(); }
  scrollPos-=scrollMov;
  if(scrollPos< (0-scrollHeight)) { scrollPos=scrollDepth; }
  document.getElementById('scrollTxt').style.top=scrollPos+'px';
  setTimeout('doScroll();', scrollDelay);
 }

 function getHeight() {
  scrollHeight=document.getElementById('scrollTxt').offsetHeight;
 }

 function scrMove() { scrollMov=scrollSpeed; }
 function scrStop() { scrollMov=0; }
</script>

As you can see, doScroll(); calls itself automatically once it’s started, so all that is required is a single call to set it rolling. You can change the variables in the JavaScript so speed up the scroll or change the frequency of movement by adjusting scrollSpeed and scrollDelay accordingly.

Update:
I’ve added a link in the sample content that will stop the scrolling when you put your mouse over it.  This is achieved using two functions, scrStop() and scrMove() which stop and restart the scrolling text, and are placed in onmouseover=”" and onmouseout=”" respectively.  You can add these so that your users don’t have to chase a link as it scrolls up the page.

You can see the code working by clicking the link in the ‘Download Files’ box at the top of the page.  It will open the document in a new window, and all you need to do is view the source code.  Please leave any comments or questions below, and feel free to rate this post while you’re here – I might even respond at some point.