Script to display latest full sized magazine covers

July 11th, 2010

I have just finished making a script which allows any site owner/blogger to be able to post full screen cover shots of a selection of thousands of different magazines hosted on Newsstand Magazines.

To do so, simply navigate to any of the magazines details page on Newsstand.co.uk, copy the URL, and replace the first link in the below code. You will also have to change the link text too to match the magazine.

I will shortly write a bit of code to automate this step, so watch out for it within the newsstand site.
Note: This feature is in early development stages, in future please see official statements regarding the installation and policies of use within the Newsstand site. As this is not yet in production, it may be retracted or malfunction without warning.

<div id="nsMagCover">
<a href="http://www.newsstand.co.uk/613-Satire-Magazines/196-Subscribe-to-PRIVATE-EYE--Magazine-Subscription.aspx">More About Private Eye</a>
<script type="text/javascript" language="javascript" src="http://www.newsstand.co.uk/Scripts/magazinecovers.js"></script>
</div>

Techie , ,

Chrome OS just installed!

June 9th, 2010

Just finished the long old process of building Chrome OS, and the moment of installing the image on a dev machine is awaiting me tomorrow; if all goes well!

So far it’s taken around 6 hours to install all the prerequisits, sync & build the code and create an image. The actual build took just over two hours on a 64bit single core virtual machine. Next time I will add a few extra cores in aid of speeding the process up; the project is very active so I will need to do this fairly regularly.

I’m going to be interested in seeing the speed of the system first hand. The official videos demonstrate the boot sequence taking 7 seconds from the power button being pressed to the login screen appearing; something I’m finding a little hard to comprehend seeing as the bios load normally takes longer than this on most machines. Hopefully I can get my own video done too.

Anyway, it will be fun to have a look at the new concepts, and start developing some apps for it.

Will keep you all posted!

Techie

SQL Import tool Fails with converted OpenOffice Documents

June 8th, 2010

The ‘SQL Server Import and Export Wizard’ can fail when trying to import a spreadsheet which was originally created by Open Office and converted by Excel into an Excel format.

Symptom

Symptoms of this problem can be seen when you edit mappings within the Wizard there are always 255 columns with the extra columns being prefixed with an ‘F’.

Even though these extra columns are not selected for import, you will get a violation of a datatype for the first column.

Solution

If this is the case, simply copy and paste the data from one document to a new blank document created by Excel.

Versions

Microsoft SQL Server Management Studio 10.0.2531.0
SQLServer 2008
Excel 2007
OpenOffice

Techie ,

How to swallow large tablets/pills

April 16th, 2010

Some people, me included, have huge trouble swallowing large tablets anywhere from half a gram (500mg) upwards. Whenever I go to the doctors and I see him scribbling out a prescription, I’m always etching to see the dosage. If the dreaded 500mg mark is on my prescription my heart generally sinks at the thought of trying desperately to swallowing the tablet or capsule for 10 minutes or so, before giving up by it either disintegrating into a yucky tasting mess in my mouth, or trying to cut it up, or even biting it in half to lessen the pain. If it turns out to be a capsule, these tend to be worse as they are long, and look far bigger.

One day last month I had had enough. I was so ill, I couldn’t even bare to watch tv, and had a whole week of pure unentertaining boredom off of work. I was given these capsules, 500mg to take 3 times a day. That topped it. I decided that I would sit down and learn how to swallow these damn things.

It’s not like I can’t swallow things bigger sized. If I have a chip butty for example, I can’t stop myself taking huge bites and eating it within 4 or 5 mouthfuls with little chewing. Yes that is bad for me, but it’s an instant reflex proving that I can equally experience the opposite extreme, so it was just a question of learning what the difference between the two were.

My solution; If I’m thirsty, I would quite often gulp a large glass of water down while keeping my breath held. I may not finish the whole glass, but the point is I am swallowing large volumes of liquid time after time without breathing. This is a natural feeling that occurs when I feel thirsty and drink, but I can force myself to do the same thing otherwise, just maybe not for quite as long.

This is the feeling that I would use as my basis to swallow the tablet. Maybe have a trial first, naturally drink a couple of mouthfuls fairly quickly. When comfortable pop the pill into your mouth, front or middle; somewhere where it is comfortable is the key. Then start drinking as you did before, but keep drinking as if you were drinking the whole glass. Don’t worry what the tablet is doing, just concentrate on drinking all of the drink quite quickly. You will not be able to control the location of the tablet, but just keep that out of your mind as you will find before long you have swallowed it like anything else with that same exact feeling.

Personal

Import Tool fails when inserting mixed null columns from excel

March 29th, 2010

I’ve just discovered yet another glitch with the ‘Import Data’ tool within the ‘Microsoft SQL Server Management Studio’. It took me a while to figure this one out as the error message was of a slightly unhelpful wild goose chase.

Error

If you have a column within excel that contains a mix of both data and null cells, the import tool fails even if the destination column is set to ‘Nullable’ within ‘Column Mappings’.

“Text was truncated or one or more characters had no match in the target code page.”

Solution

The only work around I have found is to separate the null columns and import them separately.

As alternative I think you can place a single quote (’) in each null cell, this forces the excel engine to register the cell as text rather then a null type and import it as an empty piece of data; I’ve used this technique before to force mixed numeric and text fields to be solely text, as using ‘format cell’ and selecting ‘text’ still imports the cell as a numeric value. I haven’t tested it for this scenario, but it sounds plausible that it will have the same effect with null values.

Versions

Microsoft SQL Server Management Studio 10.0.2531.0
SQLServer 2008
Excel 2007

Techie ,