# Wednesday, 30 March 2011

Only recently from the last few years did I finally figure out the beauty of duct tape. And now I have found yet another versatile tool/construction material that is very useful in repairs/hacking stuff. Epoxy putty! Here's what I'm using it for.

DSC00553

What's so cool about epoxy putty? When you start to use it, it's like Play Doh. Then after a few minutes (which can be a good or bad thing) it starts hardening into something rock hard. This makes it good for repairing holes in items, reshaping stuff, etc. etc.

My most recent use was when I had to do some exploratory surgery on the wheel of WZ's old baby stroller. After I was done, I realized that the hole I left in the hub cap was a water risk so I plug the hole with epoxy putty and it's sealed up perfectly again!

Wonder what other weird stuff I can do with this?


Wednesday, 30 March 2011 23:36:23 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Saturday, 26 March 2011

I picked up another Car 5V power adapter from Low Yat today.

DSC00552

On first glance it looks like any other 2 USB plug power adapter, but on a closer look.

DSC00550

Other dual plug power adapters I saw promised 2.1Amps when only ONE device is connected. This one states that the top port always delivers 2.1A regardless of wheter or not a second device is plugged into the bottom port.

This is a Kensington Power Bolt Duo Car Charger, so I hope it's not lying about it's current output.


Saturday, 26 March 2011 15:40:20 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Wednesday, 23 March 2011

Some of you out there are probably using the ReadyBoost function of Windows with a USB flash drive to accelerate your system cache performance, maybe you just use some old, quick random access capable drive you just have around like this.

DSC00545

Large, unsightly and since it's sticking out like a sore thumb, moving your notebook around with it connected would probably be inviting some sort of trouble.

So you go out and get a smaller thumb drive.

DSC00546

Yes, its much smaller so instead of a sore thumb, you have a sore pinky sticking out the side of your notebook.

This is the main reason why I don't use ReadyBoost on my Asus Tablet, it's kinda dangerous to have something juting out when you're likely to change the holding orientation of the device frequently. And since my SD card slot is used to bit locker my OneNote files.

If only there was a USB drive that just sat snugly into the port and got out of the way like what those wireless mice use now! If only…

DSC00548

Oh… why hello there! What's this lovely little thing? This is Verbatim's Store And Stay USB Drive and as you can see, it's exactly as advertised.

DSC00549

8GB of storage in a tiny compact form factor that doesn't get in the way of day to day operations. EXTREMELY delighted that this thing had sufficient performance to handle ReadyBoost duties! (Granted, every notebook's USB bus might be slightly different so while it works for my Asus it might not work for your notebook)

It's not much more expensive than your typical 8GB USB drive, if you do use ReadyBoost with a USB drive I'd STRONGLY recommend it (with the above caveat of course) Heck.. if you just need 8GB of storage for something and would like it to be there all the time… this looks like a great solution. Now I need to see if I can find a 16GB one.


Wednesday, 23 March 2011 01:18:07 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Monday, 21 March 2011

Performance looks hopeful, high potential to be a real game now.


Monday, 21 March 2011 11:38:05 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Friday, 18 March 2011

Well.. I got my phone unlocked... now what?


Friday, 18 March 2011 00:18:28 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Sunday, 13 March 2011

While working on my little XNA sample I bumped into a little problem. No matter how much time I spent on it, I can't draw for the heck of it. And not to mention, the total time it'd have taken me to draw a set of sample sprites might have allowed me to finished another code module on the sample.

In a suddden eureka moment I picked up the Asoblocks I bought a while back, put together some models and then took this photo.

Source

The individual elements were then color keyed so I'd have a pretty nice template to work with.

player

Then it was a matter of resizing the image and adding some extra details and viola…

invaderwin

Definetly better than me trying to draw the whole thing!


Sunday, 13 March 2011 18:20:15 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Saturday, 12 March 2011

Microsoft's XNA is a game development framework which allow the creation of games for various platforms through the use of Managed .Net code. What I found extremely nifty while I was doing some research was that once I had a simple app running on Windows Phone 7. (emulator only since I've run into a little snag trying to obtain deployment credentials)

invadershot

Since the app code is pretty simple, if I wanted to create a Windows desktop app all I needed was to select Create Copy Of Project For Windows and... Windows version of the same app!

invaderwin

Yes, I realize its because I have no UI code or anything platform specific, but I can't help but geek out a little by selecting Create Copy Of Project For XBOX 360 , added some code to control via the gamepad instead of the keyboard and...

DSC01389

As I've dabbled with DirectX previously in the past its very welcome to know that in XNA you get to worry about the important things like how to write your game then worry about detecting device context, getting exclusive access to hardware, etc. etc.

Hope I'll find more time to play with this.

You can try out the Windows version of the program here. Unfortunately, you need a pretty decent video card before you can run it.

Update – Figured out that there's a lower requirement Reach profile I can compile the program for, you can get it here.

You'll need to install the XNA Framework Runtime if you don't already have it by any other means.

Arrow keys to control the ship, Space to fire, Z to enagage DEATH BLOSSOM mode!


Saturday, 12 March 2011 01:48:31 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Thursday, 03 March 2011

From personal experience, and then what I gathered on the web. That question seem to be asked A LOT! The main issue here is that by default the WPF Listbox scrolls item by item due to control virtualizing, which means it only creates visual controls when needed. This is vital for good performance if you decide to bind a large item source to the listbox, say… a few hundred items?

Unfortunately without smooth scrolling, most people find the item based scrolling very sudden and jarring and overall a bad user experience. For me the effect was even worse on my project that was for a touch based application, item based scrolling just wouldn't work!

Turning off control virtualization was not an option because of the amount of data my project needed to handle.

So I did what I took a deep dive and starting reading up on how to create a layout panel, how does control virtualization work in wpf, how to support scrolling.

And I came up with this.

An ItemPanel that performs control virtualizing AND implements IScrollInfo. You can get the sample here. So now you too can have a listbox in WPF that supports smooth scrolling AND item virtualizing.

It wasn't too hard to make it actually, all the code was available around the net in separate places, I have no idea why no one had put this together before. Or maybe I wasn't looking hard enough?

Problems With The Code

  • The control was designed to work specifically with my project, you should read up on all the links I included in the SmoothVirtualizedPanel.vb file and understand how things work before wondering why it blows up.
  • There are parts of the code (particularly in dealing with the ItemGenerator) which I'm not sure how or why it works. So it might blow up in your face.
  • If you have no idea what an ItemPanel is, you really should read up on all the links I put on top of the source file before trying to do anything else.

This is pretty much research quality code, and hasn't gone through any optimization and proper error handling yet so copy and pasters beware.

Oh… did I mention the code is in Visual Basic? ;)


Thursday, 03 March 2011 03:38:11 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  |