AliGrant.com
 
Valid XHTML 1.0!

Valid CSS!

Powered by PHP

Get FireFox

1&1 Internet


Archived News

PEAR on Shared HostingMonday 20th May 2013
The PHP Extension and Application Repository, or PEAR, is an online repository of non-core PHP libraries. These libraries are often referenced in the official PHP documentation, but not bundled as part of the default build.

To use the PEAR libraries you need to install them. This can be done with the useful "pear" command-line utility.

For example, I wanted the "http" package, so to install it I logged onto my shared hosting through SSH and ran:
pear install http

Naturally, my hosting company being 1&1 everything rapidly fell apart with running old versions of PEAR and PHP (defaults to PHP4!).

As PEAR is usually a shared resource in shared hosting, it requires the hosting company to update it - which they are unlikely to do. Luckily you can simply build a local install in your area without affecting the shared install and retain full control.

For 1and1 hosting, there is a couple of tricks you need to do to get the system to ignore the default shared junk. Edit your ~/.profile file and add in these commands:
alias pear='~/pear/bin/pear'
alias php='php6'
export PHP_PEAR_PHP_BIN=/usr/bin/php6

What this does is redirect the "pear" command to your soon-to-be-installed version. The "php" command to the latest binary (NOTE: This is a one and one hosting quirk, it is unlikely to be the same on your hosting), and similarly the PHP_PEAR_PHP_BIN defines where the PHP binary that PEAR should be using (as otherwise mine was falling back to version 4, which is a bit, silly).

Getting PEAR is easy:
wget http://pear.php.net/go-pear.phar

Installing is just as easy:
php go-pear.phar


Set your all your install directories to something under your control. If you setup the first "prefix" entry, you can then use "$prefix" in all your remaining paths as a shortcut.

And that should be about is. To confirm that it is working run "pear -V", this should give you the latest version of PEAR and a recent version of PHP.

Be sure to update your PHP include path in your code to point towards your new directory instead of the shared one.


Mouse gripTuesday 14th May 2013
My Microsoft Habu mouse has finally given up the ghost (after being replaced once under warranty). I am quite fussy about my devices as I don't like change when I get used to something. The Habu is the second long-term mouse I've had, before it was a (few) original Microsoft IntelliMouse Explorer.

My main love-affair with Microsoft peripherals is due to the size, whilst I have skinny fingers, I have quite a large span - something that Microsoft seems to cater better for than many other manufacturers. Even these large mice I found sometimes my little finger would be brushing against the mouse mat in a distracting fashion.

I also like to play shooters - my Habu had what is now a fairly standard feature. On-the-fly sensitivity/DPI adjustments; these allow you to play games in a fast-pace reactive fashion but then slow the mouse down when wanting to set-up for a long-range shot. Some mice now come with a "sniper" button that temporarily drops the DPI for this very purpose (also aimed towards designers who want precision).

With this in mind I started to research my next purchase, as it used to be a case of spending forty pounds on a mouse was classed as eye-wateringly expensive, a gamers mouse now seems to start at the fifty quid mark and rapidly move up. The problem with mouse reviews are, they're subjective. It's all about personal preference.

Some of the better reviews discussed whether the mouse favoured a "palm" or "claw" grip. I've never really thought about this until seeing these reviews - but they are described as follows:

Palm
The natural/default way to hold the mouse, but placing the entire palm and fingers huggingly over the mouse surface and to use the underside of the index finger to press buttons.

Claw
To raise up the hand so the base of your fingers/under the knuckle are raised and the end of your finger tips press down on the button.

The argument that more experienced gamers tend to adapt the claw approach as it allows you to jab your buttons faster. Then there is the outside case:

Finger-tip
None of the palm touches the mouse and instead it is gripped entirely by the finger tips.

I spent a couple of weeks trying to figure out what style I fell into. I, along with some gaming work-colleagues laughed at the idea of the palm grip and agreed we are claw users. But to my surprise when playing at home and I checked, my hand was snugly wrapped around my mouse.

My work mouse though, I definitely claw at it. And I recall some laptop mice I definitely hold in my finger tips.

After a bit more stopping and staring at my hand whilst using my computer I realised that I don't, generally, fall into any of these classifications. I sit somewhere between the claw and the palm grip - in what I like to call a hybrid grip. My hand is snug to the mouse, apart from my index finger, which is half-pulled up, so it doesn't touch the mouse surface. I don't jab at the mouse, but it's not a flat finger.

I think there is also a lot of difference of how far along people hold the mouse. I've see a lot of people who's fingers go off the end of the mouse as they keep their wrists off the table and the mouse far back in their palm. I tend to lift my wrist when moving the mouse, but it's resting position is on the table (pivoting with the wrist is bad for RSI).

Back to the reviews

With these different styles involved, the reviews suddenly got more confusing - what do people define as a palm grip? Fingers forward, or back?

I finally got my choices down to the Corsair M65, Kone XTD and the Func MS-3.

The Corsair is a dedicated first-person shooter mouse, with a large red "sniper" button. But that's all the extras it came with. The mouse itself didn't look that big. It was geared towards claw grips.

The Kone is a big mouse - although I managed to get my mitts on one in PC World and it seemed a lovely size to me. It has a shift-button where the forward/back buttons normally are, which sounds like a good idea unless you want to use the forward/back for their intended purpose as the shift key can't be moved elsewhere (only disabled).

The odd-ball in the arrangement is the Func MS-3, which looks like it has been splatted. The reason I liked the look of this one was due to the finger grips along the right-side of the mouse that keeps your spare fingers falling off the edge of the mouse. But, all the reviews said this was only for palm grippers and you're forced to put your hand in a certain location - and the sniper button is hard to reach.

After much uming and aring I went for the Func as a bit of a gamble. The reviews all said it was super-comfortable, so I guess I'd prefer a comfortable mouse that wasn't perfect to the others if I didn't like them. It also has a no-thrills simple UI for the advanced settings - this is a moral thing, I can't stand garish kiddie gamerz UIs.

It arrived today, and it is fat. and a little taller than many mice, but yes, it is really comfortable. For me, it's perfect, I can reach all the buttons easily - and my thumb rest directly over the sniper button. A quick pass around the office found that this wasn't the case for everybody, the shorter folk couldn't comfortably reach the sniper button.

As for the forced style and the finger rests - rubbish. The finger rests are lovely to slip your fingers into, but there is nothing stopping you from pulling up into a claw and for it still to be comfortable.

Whilst I haven't had a chance to use it for games yet, a day of use in the office and it is a dream. It's a light-weight mouse, with no option to weigh it down, and with some super-slick feet it glides easily. Those who prefer a bit of resistance to their movement will probably go down the fabric-mouse-pad route. I am from an era of mouse-balls where removing friction was the goal. I see no reason to impede my mouse movement.

If you have big (not fat) hands then this mouse will be fine for you. You can hold the mouse in any way you like with ease. You get maximum benefit for the super-soft surface by holding it in the palm, but you don't have to.


BizTalk filter subscriptionsFriday 3rd May 2013
I think I've encountered this before, but as it was causing me a bit of pain I figured I'd reinvestigate it and make a note.

I changed the filter expression on an activating receive shape in a BizTalk orchestration and redeployed my application - it didn't work. Not because the filter was wrong, but because it hadn't updated the subscription in BizTalk.

You can view the activation subscriptions through the BTS Administration tool - mine showed the previous expression I had used. No amount of rebuilding, redeploying or rebooting would solve the issue.

Subscriptions are stored in the BizTalkMsgBoxDb database (not the management one as you might think). The relevant tables are dbo.Subscription and dbo.EqualPredicates. The latter showed both the old and new expression filters I had used on my receive shape. Although for some reason, only the old one was being used.

If you unbind an Orchestration from a host, then the relating subscriptions are removed from the Subscription table. If you delete the application from the server, strangely, the predicates remain in the EqualPredicates table. Could this mean you get a stack of stuff building up there? Well, no, as with most things that could potentially get out of hand in BizTalk, there is a job to purge old data. PurgeSubscriptionsJob_BizTalkMsgBoxDb in this case. This runs every minute constantly and keeps things clean. If though you just knacker the redeploy button there is no chance for these to become stale and clear out.

So, if you change your expression filter the process is to unenlist and unbind the orchestrations (do the whole app for sure I'd say) and then wait a minute, or run the job manually to clear out the old subscription predicates.


Previous Next