Git 1.7 OSX Installer - 18 Feb 2010
Git 1.7 is out, yay! A great list of new/changed stuff, which you can find here.
Normally I install my version using the OSX installer put together by Tim Harper. Unfortunately he hasn’t built the latest version just yet, so here’s a build I did using the same scripts for those OSX users who don’t want to wait or install manually.
All Possible Combinations of a Set - 18 Feb 2010
I recently had need of a way to get all the possible combinations of a set of things. Making a dynamic download choice for a new web framework I’m working on, but serving the website from a static site on github. This means allowing any combination of plugins for people to download of this framework would mean needing to generate all possible combinations of the plugins into zip files. This can be quite a daunting task, e.g.
Choosing 1 out of 3 possible plugins gives you 3 posibilities. Choosing 2 out of the 3 gives you another 3 posibilities (for the set a,b,c we can choose a,b or b,c or a,c). Choosing 3 or 0 out of 3 gives you only 1 possibility each. Adding these together means 8 configuration possibilities in total for 3 choosable plugins.
For 1 possible plugin there are 2 possible download choices. For 2 possible plugins, 4 downloads. And so on, as shown by this list:
- 1 : 2
- 2 : 4
- 3 : 8
- 4 : 16
- 5 : 32
- 6 : 64
- 7 : 128
- 8 : 256
- 9 : 512
- 10 : 1024
While knowing the possibilities is 1 thing, actually creating a set with each possibility encoded is even harder. Luckily I found a great article about it, thanks for the clarification scvalex. I’ve ported this algorithm to php for my own use, and here it is for download if anyone should ever need it, help yourself.
Here’s an example of the kind of thing you can do with it: for the set (1,2,3,4) all possible combinations are:
()
(1)
(2)
(3)
(4)
(1,2)
(1,3)
(1,4)
(2,3)
(2,4)
(3,4)
(1,2,3)
(1,2,4)
(1,3,4)
(2,3,4)
(1,2,3,4)
Please Rob Me - 17 Feb 2010
This site is just fantastic. All I can say is that I’m not surprised, are people really this unconcerned about publicly showing where they are constantly?
360 Degrees of Awesome - 14 Feb 2010
Here’s something I’ve been working on recently that I thought warranted making a blog over, so here goes my first post. It’s a javascript & flash implementation of a 360 degree rotator using normal turntable-style photography. Click and drag on it to rotate.
- World of Warcraft Tauren – 0 degrees
- World of Warcraft Tauren – 8 degrees
- World of Warcraft Tauren – 16 degrees
- World of Warcraft Tauren – 24 degrees
- World of Warcraft Tauren – 32 degrees
- World of Warcraft Tauren – 40 degrees
- World of Warcraft Tauren – 48 degrees
- World of Warcraft Tauren – 56 degrees
- World of Warcraft Tauren – 64 degrees
- World of Warcraft Tauren – 72 degrees
- World of Warcraft Tauren – 80 degrees
- World of Warcraft Tauren – 88 degrees
- World of Warcraft Tauren – 96 degrees
- World of Warcraft Tauren – 104 degrees
- World of Warcraft Tauren – 112 degrees
- World of Warcraft Tauren – 120 degrees
- World of Warcraft Tauren – 128 degrees
- World of Warcraft Tauren – 136 degrees
- World of Warcraft Tauren – 144 degrees
- World of Warcraft Tauren – 152 degrees
- World of Warcraft Tauren – 160 degrees
- World of Warcraft Tauren – 168 degrees
- World of Warcraft Tauren – 176 degrees
- World of Warcraft Tauren – 184 degrees
- World of Warcraft Tauren – 192 degrees
- World of Warcraft Tauren – 200 degrees
- World of Warcraft Tauren – 208 degrees
- World of Warcraft Tauren – 216 degrees
- World of Warcraft Tauren – 224 degrees
- World of Warcraft Tauren – 232 degrees
- World of Warcraft Tauren – 240 degrees
- World of Warcraft Tauren – 248 degrees
- World of Warcraft Tauren – 256 degrees
- World of Warcraft Tauren – 264 degrees
- World of Warcraft Tauren – 272 degrees
- World of Warcraft Tauren – 280 degrees
- World of Warcraft Tauren – 288 degrees
- World of Warcraft Tauren – 296 degrees
- World of Warcraft Tauren – 304 degrees
- World of Warcraft Tauren – 312 degrees
- World of Warcraft Tauren – 320 degrees
- World of Warcraft Tauren – 328 degrees
- World of Warcraft Tauren – 336 degrees
- World of Warcraft Tauren – 344 degrees
- World of Warcraft Tauren – 352 degrees
- World of Warcraft Tauren – 360 degrees
You can find the full source code at github.com/sheldon/fast360.
There are 2 major features I focussed on here, being load speed and accessibility. The accessibility is taken care of by the markup before javascript being just a list of images that make up the 360. Just try turning off javascript in your browser to see.
Load speed is a little more complex, the first image in the list is considered the front shot, and will load first. Once that image is loaded it is displayed right away, so the user won’t be waiting for however many other images to get feedback. After that all other images are loaded in parallel.
As the user drags the mouse left and right, the 360 will rotate to the first image it can find that’s already loaded. Initially on slower connections this can make the motion seem a bit jerky, but I thought this is a better user experience than waiting for longer to get any movement at all.
Edit: If you’re on webkit, sorry that this doesn’t work currently. It seems the flash player in webkit isn’t exposing javascript functions correctly, I’ll have to dig around for a fix.