Slow PDF opening in Mozilla Firefox

Programming, PHP, JavaScript, motorbikes, pubs, poker, football, news, restaurants and anything else
One thing that PHP5 does allow, however, is what they call 'class type hinting'. This allows you to specify the type of object which is passed into a method and, if a variable is passed in incorrectly, then a runtime error is generated. E.g.
class Foo
{
public function __construct(Bar $bar)
{
}
}
$foo = new Foo($bar);
This will throw an error if $bar doesn't contain an object of class Bar.
This is a step forward in that at least you get a warning about your code breaking closer to where it actually happened than, perhaps, five methods down the line when you actually try and do something with the incorrect object, but there are a couple of parts of the implementation that I still don't really like.
The first problem is that the error message only gives the line number of the method that's called, not the callee so there's still some back-tracking to find the source of the error. Still, beggars can't be choosers...
The other is that some of the built-in types don't seem to be recognised. Therefore you can specify your own classes by name but using 'String $myString' or 'Array $myArray' doesn't wash with the interpreter. This means you have to leave those untyped, which kind of defeats the purpose in some cases.
The other issues are really to do with a wish-list. What would be really good would be:
I don't know whether that's ever going to be possible given loose typing but I don't think PHP 5 will be regarded as a true rock-solid OO language without them.
Okay, I've seen an article on the economics of spam on The Register that reckons only 50 in every million people need to respond to make money, but 50 seems a high number for these obviously useless e-mails. I guess someone must be making money out of it, but who?
The best theory I can come up with is that the people who are doing the spamming are selling their services to people who are probably even more gullible than the intended victims of spam: those people who think they can send a few million e-mails and make their internet fortune. The market for get-rich-quick schemes is always busy...
Incidentally, as an excellent way to catch spam I've been using Robin Keir's K9 Spam Filter, which is free and extremely good.
It even has a title which relates to its content, which is:
now = new Date(); day = now.getDate(); alert(day+1);
Not a bad effort;
little client value, though.
Could be a new craze?
The full attendees were:
I'm not going to put the full details here (even if I could remember them...) but a few photos are below:
Luke pointing at a statue
Black and white shot of me and Luke
Lindsey, Susan and Luke
Dave and Susan
Paul, not too drunk yet
Deborah, on a rare occassion when she isn't hiding
Me with a glass of Kwak. I really did turn into Mr Hyde later that night.
Susan, Luke and myself on our way to the Eurostar.
Me hiding. Sweatshirt sleeve/mask of zorro.
Susan, Dave, Paul and thumbs
Dave goes for his guns/beer
Hot chocolate self-assembly kit before
Hot chocolate self-assembly kit after
Group photo: Susan, Luke, Lindsey, Dave, Me (and Paul behind the camera)
Susan and Linsey
It rained a bit while we were there...
We know exactly where we are, honest.
Me, Luke and beer. Such a rare sight to see together.
A student beer-and-lorry-fest. No idea what this was all about.
Princess Susan
Mealtime
Another shot of someone drinking (spot a theme?)
Dave and Deborah, before Deborah had a chance to hide
An overturned car that Paul spotted coming out of an underpass
The window of our hotel. Fascinating.
Lindsey, Luke, Susan and Paul (from left to right)
you son of a ...
just found your blog doing a search on my name! :D
ttfn
Basically, Spiderman has signed up to a deal to review a full set of Crayola crayons. The pictures are absolutely superb... I don't know how they managed to get a plastic Spiderman figure to have an expression on his face, but he does.
I'm a big curry fan, and Kerala is certainly a treat. The menu is nothing like the majority of Indian restaurants (read 'Curry Houses') you find; there were a couple of the 'standard' dishes (a biryani, something korma-looking) but otherwise it was generally a lot more authentic and based (I was told) on Keralan cuisine. My choice was a dosa to start with and a mutton curry main course. Both were very good indeed, and the meat was much more tender than any of the lamb I've had down Brick Lane. I tried a few of the other dishes and the roast duck was particularly good.
The drinks list was fairly standard, except instead of "Kingfisher" or "Cobra" the Indian beer was "Adi adi". I'd never heard of it, and it had an interesting taste with floral overtones. Very unusual for a lager.
The service was good throughout, although I'm convinced the waiter will have aching cheek muscles at the end of each night from so much grinning. Prices were above the usual curry house, but the quality matched it and it was still a reasonably cheap meal at around £15 a head
I would absolutely recommend Kerala. It's a great find, and to find such good quality in the centre of London is absolutely fantastic. The menu is very broad and would be excellent for vegetarians, as well as having a wide range of fish dishes.
Kerala Restaurant, 15 Great Castle Street, London, W1W 8LT. Nearest tube Oxford Circus
Review of Kerala on London-eating
Review of Kerala at
Curry House Reviews
Having read a good review and after friends from outside of London we were looking forward to a good evening and good good at Kerala restaurant.
At first the waiting staff seemed friendly, took our coats and orders, we sipped our drinks and waited for our food to arrive.
We were initially suprised by the price of £1.50 per poppadom. When the poppadom arrived, we recieved half a poppadom per portion. We asked the waiter where the rest were. He explained this was the portion size. The manager also explained this was normal and he had been in the buisness 15 years. The customer service we recieved was rude and nothing was done to try and please us as customers.
We left after our first course and would never return to this restaurant again.
So, having brought Italy from it's small beginnings to conquering most of Europe I have the following advice
I've made that mistake a couple of times. As well as being difficult to manage, your much more likely to have a rebellion occur when you're already overstretched. The artificial intelligence in Medieval Total War seems to keep an eye on how vulnerable you are and will spring a surprise on you (e.g. an old faction re-emerging) at the time you'd least like it to happen.
It takes a while for a region to settle down. It's tempting once you've 'broken through' to go on the rampage, but the provinces you leave behind will pretty soon revert to their old ways
In retrospect, I did upset the Pope far too early in the game by attacking the Hungarians. It meant he declared a crusade against me and then half the catholic world declared war. I think there is probably a better way to use religion within Total War than I have so far.
If you do upset the Pope then the best thing to do is invade Rome and destroy the faction. That voids all excommunications and crusades. The problem is, every few years there'll be a really big rebellion usually involving about 1000 highly trained troops. The good thing about these is that the Pope usually makes a really bad general so the army is often easy to rout. Which brings me to:
...use plenty of missile power, and keep your troops in formation. It's much better in this situation to be defending, so as soon as you see an uprising fill the province with troops and try to fight it down in the same turn it attacks. That way you can just occupy a hill position and rain crossbow bolts and arrows down on the troops.
Unless you see the 'The Enemy is fleeing the field' message. Reinforcements may be over the hill and being caught out of formation is very bad.
Spearmen or feudal seargants are very good against cavalry, as long as the cavalry don't attack from the flank. The Medieval world is very vicious...
Despite invading and conquering Sicily there were a number of resurgences of the Sicilian or rebel factions.
As a Meditteranean nation, the Italians are often fighting on a coastal region. If you have a string of ships and a port at the start of the journey then you can move armies around the map almost instantly. This makes defending places like Rome and Sicily much easier. You should still keep large armies in these places, though, as a deterrent.
This especially applies to Rome. It may be easy to push forces in from the Meditteranean, but when things hot up you need to redeploy them equally as quickly.
The Italians can train Royal Knights. These are excellent against lesser trained troops. Remember not to get them bogged down against spearmen especially, though. Charge in, then charge out. During a battle, keep them on the flanks so they can run outside the enemy and round the back.
It's not much use when you're attacking, but for defending a hilltop a couple of catapults can scare the shit out of most enemies. Medieval peasants especially generally won't be prepared for stones on their heads.
Very important for the Italians, and also good for trade. Try to maintain sea-going superiority. This gives tremendous flexibility when attacking somewhere such as Spain.
I've stopped short of invading Poland so far and have some fairly big castles built up along the border. So far, this has put them off any idea of invasion
As with Don't expand too quickly, if there's too much going on then you'll be seen as an easy target. This can also be used to your advantage: weaken any of the other medieval factions and a rebellion may pop up. This is especially likely to happen if you manage to kill a faction leader.
You need to be quite technically advanced in terms of castles and weaponry but Italian Infantry make very good fighters in virtually any battle situation.
A well-trained force can often beat another army of double its size. My Italians have just fought off the Egyptians in a war with odds of 2-1. Remember, there's a limit on the number of soldiers on the field at any time with Medieval Total War so you don't need to fight them all of at once, just one wave at a time
If you're fighting a large battle with reinforcements available then watch how your archers arrow stocks are going. If they're low and there's a lull in the fighting then withdraw them and call on the reinforcements.
Just watch out for any heavy cavalry around and get ready to withdraw them
Not ideal, but it's better to spend the money wisely in one area than to spread it too thinly. Some provinces are really only any good for developing farmland. Tuscany, for example.
E.g. Once an area is able to generate spearmen, try to make them better spearmen. The next province can be given the task of making archers (for instance) - give the region a speciality. This is especially useful where you want to build shipyards as galleys take so long to construct; there's no point in being able to build every kind of troop in one region if the throughput is low. Sometimes you may be under attack and need to build hundreds of troops very quickly
It's helpful to have a high (3 or more) star general near anywhere that might start a war. That said, it's also best to leave a provinces governor at his home. Go for a combination of dread and acumen in governors and leave the good generals free to fight the wars.
And almost worthless anywhere else.
Well, there you have it. The best collection of Medieval Total War tips I can manage from my experiences so far.
More tips:
I think your ideas about the Italians are great. Have you considered providing an "encyclopedia" of tips on a group of nations (eg muslim or Catholic). Thanks anyway for the tips and keep them coming!
Thats greast info and quite useful. But a question: how do you invade those little islands?? They are so annoying! you cant get rid of them... and if you can, how?? thx
You seem to have fallen for the most common mistake of people who don't read the manual fall to. All you have to do is have a ship in each sea region between a province with your army and those "little islands". Then its a matter of dragging and dropping the army to the islands like the sea isnt there. Oh you can't have any of those sea regions blockaded by enemy ships or this won't work, so attack their ships first.
So, having brought Italy from it's small beginnings to conquering most of Europe I have the following advice
I've made that mistake a couple of times. As well as being difficult to manage, your much more likely to have a rebellion occur when you're already overstretched. The artificial intelligence in Medieval Total War seems to keep an eye on how vulnerable you are and will spring a surprise on you (e.g. an old faction re-emerging) at the time you'd least like it to happen.
It takes a while for a region to settle down. It's tempting once you've 'broken through' to go on the rampage, but the provinces you leave behind will pretty soon revert to their old ways
In retrospect, I did upset the Pope far too early in the game by attacking the Hungarians. It meant he declared a crusade against me and then half the catholic world declared war. I think there is probably a better way to use religion within Total War than I have so far.
If you do upset the Pope then the best thing to do is invade Rome and destroy the faction. That voids all excommunications and crusades. The problem is, every few years there'll be a really big rebellion usually involving about 1000 highly trained troops. The good thing about these is that the Pope usually makes a really bad general so the army is often easy to rout. Which brings me to:
...use plenty of missile power, and keep your troops in formation. It's much better in this situation to be defending, so as soon as you see an uprising fill the province with troops and try to fight it down in the same turn it attacks. That way you can just occupy a hill position and rain crossbow bolts and arrows down on the troops.
Unless you see the 'The Enemy is fleeing the field' message. Reinforcements may be over the hill and being caught out of formation is very bad.
Spearmen or feudal seargants are very good against cavalry, as long as the cavalry don't attack from the flank. The Medieval world is very vicious...
Despite invading and conquering Sicily there were a number of resurgences of the Sicilian or rebel factions.
As a Meditteranean nation, the Italians are often fighting on a coastal region. If you have a string of ships and a port at the start of the journey then you can move armies around the map almost instantly. This makes defending places like Rome and Sicily much easier. You should still keep large armies in these places, though, as a deterrent.
This especially applies to Rome. It may be easy to push forces in from the Meditteranean, but when things hot up you need to redeploy them equally as quickly.
The Italians can train Royal Knights. These are excellent against lesser trained troops. Remember not to get them bogged down against spearmen especially, though. Charge in, then charge out. During a battle, keep them on the flanks so they can run outside the enemy and round the back.
It's not much use when you're attacking, but for defending a hilltop a couple of catapults can scare the shit out of most enemies. Medieval peasants especially generally won't be prepared for stones on their heads.
Very important for the Italians, and also good for trade. Try to maintain sea-going superiority. This gives tremendous flexibility when attacking somewhere such as Spain.
I've stopped short of invading Poland so far and have some fairly big castles built up along the border. So far, this has put them off any idea of invasion
As with Don't expand too quickly, if there's too much going on then you'll be seen as an easy target. This can also be used to your advantage: weaken any of the other medieval factions and a rebellion may pop up. This is especially likely to happen if you manage to kill a faction leader.
You need to be quite technically advanced in terms of castles and weaponry but Italian Infantry make very good fighters in virtually any battle situation.
A well-trained force can often beat another army of double its size. My Italians have just fought off the Egyptians in a war with odds of 2-1. Remember, there's a limit on the number of soldiers on the field at any time with Medieval Total War so you don't need to fight them all of at once, just one wave at a time
If you're fighting a large battle with reinforcements available then watch how your archers arrow stocks are going. If they're low and there's a lull in the fighting then withdraw them and call on the reinforcements.
Just watch out for any heavy cavalry around and get ready to withdraw them
Not ideal, but it's better to spend the money wisely in one area than to spread it too thinly. Some provinces are really only any good for developing farmland. Tuscany, for example.
E.g. Once an area is able to generate spearmen, try to make them better spearmen. The next province can be given the task of making archers (for instance) - give the region a speciality. This is especially useful where you want to build shipyards as galleys take so long to construct; there's no point in being able to build every kind of troop in one region if the throughput is low. Sometimes you may be under attack and need to build hundreds of troops very quickly
It's helpful to have a high (3 or more) star general near anywhere that might start a war. That said, it's also best to leave a provinces governor at his home. Go for a combination of dread and acumen in governors and leave the good generals free to fight the wars.
And almost worthless anywhere else.
Well, there you have it. The best collection of Medieval Total War tips I can manage from my experiences so far.
More tips:
The place seems very well organised when you arrive, but it doesn't always manage to be so. We found there were no lockers available and since we'd all travelled by train (Waterloo to Effingham Junction) their suggestion of 'can you leave your bags in the car?' didn't help much. But they were very helpful in letting us store our bags in their equipment shed, although I wouldn't expect to be so lucky next time as I think we were lucky with who we dealt with.
The first frustration, though, was in arriving at 12pm (as we had been told to) but not even getting to fire a shot until well after 1:30 due to lunch breaks. They were 'running behind schedule'. Nobody's perfect, but it was frustrating for us.
The paintballing sessions themselves were fun. I'd never been before so didn't really know what to expect, so the first shower of paintballs is quite a surprise! You soon get used to it, though. As a group we made absolutely no attempt to organise ourselves into any kind of coherent team so it just tended to be 20 individuals against 20 other individuals. It's only a game, and attack strategies seemed to much like 'work'.
The marshals did fairly well at organising the three rounds of games (with two attempts at each round - one as attacker, one as defender). There was a 'defend the president in the convoy','protect the missile' and 'occupy the inca temple'. All quite a good laugh. The only problem I had was after my goggles getting so covered in paint splashes in one round I couldn't see anything the next.
Firing paintball guns is also not a particularly exact science. I had a good shot of the enemies 'president' in the first round (hey - I wonder if that phrase is going to trigger the CIA looking at my blog?) but at more than about 40 feet there's no accuracy at all (probably a possible hit area of around 10 feet diameter) and often the paintballs don't burst. And if they don't burst, it doesn't count. I was slightly disappointed with that, but then I suppose if they made them more powerful it would be a very dangerous game.
Paintballing injuries abound, though. They were very clear about the need for goggles, and the wound on my hand shows me that you really don't want one anywhere near your eye so that was good advice. (Actually, it's more than advice: it's a hard and fast rule.) Everyone had some wounds somewhere and there are plenty of small red bruises on my legs today. Paintballing is certainly not for anyone who doesn't mind a few minor aches the next day.
The walk from Effingham Junction station to the paintballing centre itself was a bit hazardous too - no footpaths, and it's a good mile or so. Not much the paintballing centre can do about that, I imagine, but some wider verges would have made it a bit less hairy.
All in all, paintballing was a good day out, but I can't say I'm itching to go again. Some other groups there were obviously real addicts but the whole fake war thing is not something I can get too excited about. Instead, I'll just keep on being an armchair general in Medieval Total War and leave the paintballing for now.
I am going paintballing with some guys in the holidays, and after handing in my deposit i've got to the worried stage. But then i think they were winding me up, does it really hurt that much? Please let me know.
Loving you blog btw :)
http://spaces.msn.com/members/fiestyphoniex/
Hey,i just went paintballing the other day with some friends, had a great time! just wear a pair of jeans and a another pair of camo cargo pants will do,and wear a long sleved shirt and 2 sweat shirts over that,if your older like a teenager then id only go with a long sleevd shirt and jeans.HAVE FUN!!! IT DOESENT HURT AT ALL! YULL JUST BE A LITTLE SCARED THE FIRST ROUND!!
P.S. I'm Only 10 years old!!! im 5 foot 1
Paintballing doesnt hurt if everyone follows the rules. Normally you're not allowed to shoot within 10ft of each other, if someone ignores this and pops you at point blank range then it will most likely break the skin and cause a nasty scabby bruise. Be warned, dont rely on everybody being sensible and honest! You'll find you hit people, they'll just wipe it off and carry on running at you!!
The game was published by Zenobi Software, who published a large number of adventure games on the Spectrum, and written using the Professional Adventure Writing System (PAWS). I think I made £60 out of it... Still, I was proud of it at the time and seeing it reviewed in a national magazine is very satisfying.
You can read the review here on the Your Sinclair tribute site
Having seen the film version a long time ago (at least 10 years) I felt in a good position a) to know more-or-less what I was letting myself in for, but b) not expecting a clone of Jack Nicholson, who performed very well in the film. From memory, the play had a few more light-hearted moments than the film yet still managed to convey an aura of impending doom. There was only a single set with virtually no prop changes at all and the action is perfectly contained within it.
Good points: the supporting cast, the complexity of all the characters.
Bad point: the Indian didn't look much like an Indian. In fact, I thought he started to sound a bit like Tommy Cooper towards the end of the play. (Although another of the party I was with leaned more towards Elvis.)
It's similar to the Action Pack, so there are licensing restrictions on the software, but still a bargain.
The ScotAirways flight itself was good, too. We were given a boiled sweet on take-off and landing to stop the ears from popping and tea and biscuits in-flight, as well as a newspaper. Although they did run out of Evening Standards for the trip back, which is a gripe. The plane's were tiny (30 seats) and the flight takes slightly longer than in a larger jet, but it's still only an hour and twenty minutes for the journey so that's not exactly a big problem.
Unfortunately Edinburgh airport on the return journey is not quite so slick. I imagine this is due to its greater use by tourists and for international flights, but checking in 1 hour before departure is always a pain.
All in all: City Airport is great!
Yes, and isn't Edinburgh Airport COLD! Yesterday, I had to sit at Gate 4 for three hours, during which it got colder and colder, before boarding at 9.3opm. Normal outdoor clothes were not adequate. I spoke to the BMI staff, who commiserated and said it was always like that in cold weather. Typical British approach to building design and management!
I've just discovered "Rekkaturvat (Truck Dismount)", having already played the very addictive "Porrasturvat (Stair Dismount)". Basically, you set up some initial conditions and try to injure a man as much as possible by crashing a truck. It's extremely addictive and the physics simulation is excellent.
War with the English has started with my invasion of their three French provinces at once. They didn't stand a chance, and King Harold had nowhere to retreat to. Still, he can't have been very popular as his ransom was refused and I ended up beheading him. Now that I've got the whole of France the borders are much easier to police. Also, the invasion of a few more provinces brought me a few handy florins so I can get to work improving some more regions.
I'm holding off a war in Spain at the moment. There are a lot of troops there and a few ships out to see which would hamper my troop movements. I've pushed a couple of Catholic bishops in there to see if I can start converting some people so that the invasion is better received, when it happens.
Is it better to always stick or always change?
Remarkably, you have a 2/3 chance of winning if you decide to change every time.
To help sort things out, I wrote a little simulation program: Monty Hall simulation.
And here is The Wikipedia entry on the Monty Hall problem.
It's been an action-packed couple of days. The Sicilians rose from the ashes and I had to retreat to the castle and muster some more forces. The whole thing ended in a massive battle between my spearmen and archers and their heavily armoured knights. I had to keep my distance and pepper them with arrows to get the numbers down. I've also discovered that my King is a coward and runs away at the first sight of trouble.
I've finally gotten rid of the French, though, and the alliance with the English is holding. Although they have a chunk of France that I really have my eye on so I can't see that lasting too long... The problem is that attacking the English might provoke the Danes, but they don't look very strong. I think a few more turns of consolidating troops and making sure there aren't going to be any more provincial rebellions (I'm still watching out for the Papacy again) and then I'll have another war on my hands.
The dome:

The gallery:

The bathroom:

Stowe gardens around the temple:

Looking back at the temple from near the Palladian Bridge: