DB2 – How to get the Relative Record Number sequence


My scenario was this:
Pulling in several million rows of data from a DB2 database system into an Enterprise 2012 SQL Server Analysis Services setup. This data was basically tranasction records keyed on several fields, like Location, job numbers…etc. And this data was from a main system that was not developped or maintained by the devs I work with.

But in the data’s structure there was an element that wasn’t completely rock solid. That was trying to get the most recent transaction of it’s type based on a max date, max time (on the given date) and also a max sequence number.

Problem was on occasion there was no sequence number and even no time records… really making it impossible to accurately get the desired results. This transactional data is used, from what I can tell, as a log that is compiled by a few different “sub programs” or modules within the main application.

This data was accessible through the legacy system, an ancient green screen program, which still worked quite well but was no longer being used. However, in this program when viewing the data you could see record level keys… but these were not accessible by query field.

These were loaded in correct sequence and give the desired results (in my case) with the proper criteria.

We didn’t think, at first, that it was possible to get these record numbers which wouldn’t just fix the current problem but also simplify our update scripts.

After a little research (thanks Google!) I found that it was so very easy.

I found DB2’s RRN() function. All I had to do was pass the table name to the function in the query and the RRN function would return this Relative Record Number.


SELECT RRN(users) AS rID,FirstName,LastName
FROM users

Or using an alias on the table name

SELECT RRN(u) AS rID,FirstName,LastName
FROM users AS u

This query would return 10 records (SQL server TOP 10 equivalent) with rID as the Relative Record Number.

D-Link DWA-182 AC1200 Wireless USB Adapter

How to install D-Link DWA-182 Wireless AC1200 Dual Band USB Adapter on Linux Ubuntu


D-Link DWA-182 AC1200 Wireless USB AdapterAfter moving into the new place we ended up going totally WiFi. One small challenge came up, my (older) desktop PC was running Ubuntu and didn’t have an on board WiFi card, so I decided to purchase a USB adapter.

I picked up a D-Link DWA-182 Wireless AC1200 Dual Band USB Adapter, seemed to be a pretty good performing adapter (from what I had read).

I hadn’t seen Linux listed in the support specs but I kind of expected that it wouldn’t be. Started looking for drivers on my smart phone and using it as a USB to transfer the downloaded files over.

Finally after going through quite a few forum posts I found the solution that I needed.

First I downloaded the driver from here:

Then it was the simple commands:
make clean
sudo make uninstall
sudo make install

When I plugged in the adapter it did nothing at first, but then I went into the “Network” settings in “System Settings”, I had the device right away and it recognized my network… put in my password and boom… here I am!

Just wrote this on the Linux desktop!

Get a Custom Google+ URL with


I was digging into trying to find custom URLs for Google Plus today and didn’t see any options to do this. I remember back when custom URLs came out in Facebook.

It’s certainly much easier and nicer to link to your social media site with a custom/easy to read URL then some long string of numbers and/or letters that you’ll never ever ever be able to remember.

So… after a quick search I found that there was a little service that seemed to cater to this (Google+ custom URLs). I decided against just using another link shortening site and use this.

So if this is something that interests you, just go over to, enter your Google+ ID (the site shows a screen shot of what this means) and the desired nickname/url string… and voila…. if no one’s already chosen it of course!

I’ve used it, and you can find me over here:

Adding a sidebar to post view in Twenty Eleven WordPress Theme


Something else I missed when looking at themes for my new blog was post template options.

Seems as though the Twenty Eleven theme won’t display the sidebar when viewing a post/article.

Thankfully, it’s not a huge modification and there is lot’s out there on how to do it.

Basically, you modify the theme’s single.php file and add the get_sidebar() function. But that in itself will not be enough, you need to adjust some CSS as well.

I had tried with just the get_sidebar() modification… but after a quick search I found an example.

Check out Zeaks “ADD SIDEBAR TO POST VIEW IN TWENTY ELEVEN THEME” for an example on how to modify the CSS to make this work.

I used it as a reference and it worked great.

How to add custom banners to Worpress TwentyEleven theme


I’m setting up a new personal blog and settled on using WordPress’s Twenty Eleven theme that ships with current downloads.

I wanted to create custom banners to be displayed in the “Header” settings under the “Appearance” menu.

I thought they could be uploaded, this was something I simply presumed and didn’t actually check. I had seen the options to display a random header but hadn’t actually tried it… or read everything for that matter… 😉

There aren’t any uploaders. If you do upload a custom banner it is set as the banner for all pages.

The work around was quite easy, if you can follow PHP code of course.

First, create the banners you want to have on the blog, at appropriate sizes of course (defaults are 1000 × 288 pixels for the banners on the Twenty Eleven Theme out of the box). Then, your thumbnails (230×66 pixles, less important as it’s for the admin panel)…. then go into the theme’s image folder (unless you want to change those settings, but we won’t get into that here). Theme folder should be in:

Upload your banners and thumbnail images.

Once that is there, you must open the theme’s functions.php file (in twentyeleven’s root folder). In there, find the register_default_headers() function. You’ll want to configure your custom banners in the arrays as such:

register_default_headers( array(
'every-man-lives' => array(
'url' => '%s/images/headers/first-banner.jpg',
'thumbnail_url' => '%s/images/headers/first-banner-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Banner 1', 'twentyeleven' )
'love-dies' => array(
'url' => '%s/images/headers/second-banner.jpg',
'thumbnail_url' => '%s/images/headers/second-banner-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Banner 2', 'twentyeleven' )
) );

Once you’ve registered the new banners, refresh the admin panel Header or Custom Header page and check out the public site.

Was nice and simple.

How do I de-authorize a computer on iTunes?


I came up against this question very recently.

You see, I had signed up for an apple ID quite a few years back and have been buying music from them since.

Lately, I had noticed I maxed my Apple ID to the 5 computers that an account has as it’s authorized limit. 3 of those computers had died long ago. So there were only 2 computers that were active.

I wondered how I could deauthorize the computers that were “long gone” and couldn’t be accessed.

Well, it turns out that it’s quite easy. You can deauthorize them 1 by 1…. if you still have access to them. Or, you can deauthorize your account on all computers!!

That’s right. It’s rather simple as I found out.

Go into the iTunes Store (not the Store menu but the “iTunes Store” to the left) and click to sign in or if you are logged in, click on your user id which is in the top right corner of the screen. This will bring up your Account Information where you will see your Computer Authorizations with the Apple ID you’re logged in with.

If you choose “Deauthorize All”, it will wipe the Authorize settings for all computers associated with your Apple ID.

Then, to reset the computers that you want as authorized with your Apple ID, simply go into the Store menu to the top of iTunes and click on “Authorize this computer” and the computer will be set as authorized with your Apple ID.

Not hard at all. Glad I didn’t have to call support.


How to set a delay in Javascript


Writing a simple delay is quite simple in Javascript.

I’m not a Javascript guru…. or any other type of guru. Often times while working on something I just come across a certain scenario that needs a tweek or a small problem to solve.

So while writing some code to create on inline editing (in a data grid for example) I had some JS functions that would load my form to replace the data, submit the form in the background (POST HTTP request…). Problem was when the data grid’s cell would reload it would actually reload the old data. The update was taking just a touch longer then the function that was requesting the row’s data.

Every thing was firing in the proper order. I just needed to delay the function that would reload the grid’s row.

At first I thought I could do something like this:

I figured the delay should work. But I believe, the delay function is better suited for animations… fades and such.
(Also, I am using jQuery)

So I set a timeout function to initiate the jQuery function which worked perfectly.
setTimeout(function() {$(“#divToReload”).load(reloadURL);},500);


How to Fix Skype crash (APPCRASH) in Windows 7


So today when I logged into the computer to start work I had a most unpleasant surprise.

That being that Skype was unable to start. I use Skype a whole bunch in my “day to day” work activities. It’s how I keep in contact with my current “work team”.

Looking into the details, the message was APPCRASH. I didn’t have much to go on and I cleaned off the computer as I thought it may have something….. which it did. Some spy-ware and malware. I believe it may have picked some up from some “Girls games” sites my daughter plays on from time to time.

Anyways, cleaning this thing off didn’t do anything.

Eventually, I found Aasim Naseem Siddiqui’s blog and the answer was there. There are directions for fixing this for Windows 7, Mac OSx, XP and Linux.

Thank you so much Aasim!

I will post the Windows 7 solution here.
Find and delete the shared.xml file in the Skype data folder located here:

Restart Skype and there you have it. Worked fine for me. Skype likely shouldn’t be running if you do this… but if you have this problem, Skype probably isn’t running anyways right???

Once again, Thanks to Aasim for posting this on his blog. And for the other OS fixes, please visit his blog:

Need form submission to break out of an iFrame?


I’m kind of posting this for my own memory.

From time to time I come across these situations where there is a simple answer but I simply have not done before or can’t remember.

So, here was the scenario:

I had an iFrame on a website that loaded some dynamic content and did some processing in the background (and yes, it had to be done this using, using 3rd party software API)…. this iFrame then presented a form with a couple of options.

What I found out after creating the form and functionality to handle the “stuff” in the iFrame was that the form submission and the next page load were being presented within the iFrame… which maybe I could do a little work around, but it wasn’t the best or cleanest way to accomplish what was desired.

So, after a little help from “my friend Google“, I found that it was nice and easy. I added an onclick attribute with my submit button… and voila it worked!

Here’s an example of what worked:

<input type=”submit” value=” Freedom! ” onclick=”’_top'” />

Facebook "Like Box" options

Manually tweeking your Facebook Like Box


This evening I had a particular little bug come up with the normally simple task of creating and embedding a “Facebook Like Box” and thought I’d jot down a few words on it.

I was using Facebook’s options to customize a “Like Box” for a Facebook Page that I was then going to embed into a new website. All was well, I’d change the options and the preview would change accordingly.

Go to Top