Internet Explorer: this page contains both secure and nonsecure items

Posted on April 23rd, 2009 by whinger. Filed under Tech, Web Development.


So the web is full of people asking about this symptom and I hit it myself. Seemingly randomly (but consistently) IE will complain about nonsecure items in the page, with this warning message:

 

This page contains both secure and nonsecure items. \n\nDo you want to display the nonsecure items?

The error message from IE7

The usual response to this is that you’re loading images (or other media) from a non-SSL connection (hence “non-secure” items); there are also some mentions of IE not being happy about IFRAMEs without SRC= attributes (the browser assigns “about:blank” as a default SRC, which – being non-secure – flips the error); however none of these things applied in my case.

 

I discovered that if I turned off javascript the error disappeared, which suggested my script was problematic, but I still couldn’t find anything in the scripts which was loading any non-secure items.

 

In the end after much messing around it turns out that the offending script was setting object.style.background to a relative path, eg 

myObj.style.background=”url(/images/mybackground.gif)”;

Even though this will correctly resolve to an https:// address (assuming the root of the document is https://) IE can’t figure this out and moans.

 

Simply adding the full path to the background solved my problem.

 

This doesn’t apply to CSS files setting backgrounds – you can happily have relative paths in these and all will be well. 

 

Of course I then wondered why I hadn’t found that on the web and figured you might be looking for it too – so here it is 🙂

Tags: , , , , .



Have I lost it?

Posted on March 31st, 2009 by whinger. Filed under Poker, Whinges.


No, that’s not a question on the state of my sanity.

The last few live games I’ve played I’ve bemoaned the fact that I’ve hit no cards. However last night I played in a game which was the weakest table I’ve ever sat at but I singularly failed to make any moves at all. Maybe it was because the first hand I tried I lost but it’s almost like I was having some sort of out-of-body experience, watching myself playing as a complete passive fish.

I have been blaming my recent run on a complete lack of cards (which is admittedly true, last night I hit one pair – 66 – and one AQ in 90 minutes of play) but I’m beginning to wonder if actually I’m running scared.

Perhaps I went out early too many times playing overly aggressive; however I think I’ve reached the conclusion that I had more fun losing quickly being caught out in a bluff than painfully. Last night I just watched myself melting into nothing and, unless I can fix it, I think my live game will be dead.

.



OpenOffice 3 British English Thesaurus

Posted on March 30th, 2009 by whinger. Filed under Tech.


I’ve been persuading friends and family that using OpenOffice is going to save the planet and all the fluffly ikkle animals and everything.

I’ve been using the Novell-sponsored go-oo version (from go-oo.org) because it seems to have better compatibility with the MS stuff as well as being quicker and generally more fluffy-ikkle-animal-friendly; however it looks like something they’ve done has caused the British English thesaurus to break. I’m assuming it’s Go-oo’s fault because the standard OO install on Harry’s machine (on the next desk) is fine.

Anyway, after some hours of searching the web for a solution (all of which seemed to be based around editing a file which no longer exists in oo3) for now I’ve packaged up my own extension based on the stock en-gb dictionary and PaulH’s thesaurus from brit-thesaurus.sourceforge.net

Apparently this could also be useful if you don’t like the fact that the British English thesaurus in ooo actually points at the en_US version anyway…

So here it is. Just install it and restart OO, that should do it. Let me know if it’s broken.

Edit: to install (assuming that just opening the file doesn’t work) go to Tools->Extension Manager in OpenOffice, click “Add” and navigate to wherever you saved the file!

Tags: , , , , , , , , , , .



Scunthorpe???

Posted on March 19th, 2009 by whinger. Filed under Tech, Web Development, Whinges.


So Google Streetview has come to the UK, with street-level pictures of Southampton, London, Bristol, Cambridge, Oxford, Norwich, Coventry, Birmingham, Nottingham, Derby, Manchester, Liverpool, Sheffield, Leeds, York, Newcastle, Glasgow, Edinburgh, Dundee, Aberdeen, Swansea, Cardiff, Belfast, Lisburn and… Scunthorpe.

 

WTF? Does Google UK’s mapping director live in Scunthorpe or something? I mean, I’ve nothing against the town but it’s not exactly the most attractive or well-known, is it?

Tags: .



mysql in completely incomprehensible design decision shock

Posted on February 6th, 2009 by whinger. Filed under Web Development, Whinges.


Who at Mysql AB decided that SHOW TRIGGERS LIKE ‘…’, unlike the SHOW TABLES LIKE ‘…’ command on which it is modelled, should not display triggers whose names match the ‘…’ string but instead display triggers which relate to tables whose names match ‘…’

??

Sometimes I wonder about these people, I really do.

Tags: .



whuh?

Posted on January 23rd, 2009 by whinger. Filed under Tech.


Did this slip out without much fanfare, or did I just miss it completely?

Tags: , , , .



Full Tilt email in decent read shocker

Posted on January 15th, 2009 by whinger. Filed under Poker.


So I’ve criticised the last couple[1][2] of Full-Tilt howtos that have dropped into my inbox; I thought I should redress the balance and say that Aaron Bartley’s discussion on early-aggression in MTTs is a good read. The content may seem obvious and I’m sure it doesn’t say anything that’s not in a thousand poker books but I think it’s always good to crystalise things like this.

Tags: .



whinging^Wwinning poker strategy

Posted on December 19th, 2008 by whinger. Filed under Poker, Whinges.


Today’s state-the-bleeding-obvious award goes to Jordan Morgan in the featured tip in this week’s Full Tilt newsletter.

One of the keys to making money at the poker table, however, is being able to interpret when the three-bet means what it’s supposed to mean, and when a player is only representing a big hand and making a move.

The next tip in the series is “only bet when you think you have the best hand or your opponent might fold”.

Tags: .



curses!

Posted on December 18th, 2008 by whinger. Filed under Web Development, Whinges.


Say you want to step through a bunch of records in order using a MySQL cursor. That’s normally not a problem: you create a stored procedure so:
CREATE PROCEDURE doit()
BEGIN
DECLARE whichi INT(11) DEFAULT 0;
DECLARE mycur CURSOR FOR SELECT IF(i=1, f1, f2) AS whichi ORDER BY whichi;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET cursorExpired=true;
open mycur;
curnext: loop
FETCH mycur INTO whichi;
IF cursorExpired THEN
LEAVE curnext;
END IF;
select whichi;
END LOOP curnext;
close mycur;
END;

Obviously that’s an incredibly inefficient way to list records, but you get the idea.

The point of the query is that the SELECT must be ordered by the result of IF(i=1, f1, f2); however calling doit() will not output what you expect (unless, of course, you’ve come across this problem before, in which case you’ll be expecting it :))

What you get is no ordering of the data at all – the ORDER BY part of the statement is effectively ignored. Why? Because we’ve called the field in the SELECT query the same as the variable we declared above. So you end up with (essentially)

SELECT IF(i=1, f1, f2) AS whichi ORDER BY 0;

I guess you can imagine how long it took me to figure that one out.

Tags: .



it’s bubbleicious

Posted on November 27th, 2008 by whinger. Filed under Poker.


Howard Lederer’s post on full-tilt yesterday talks about S&G bubble play.

You’re second in chips with 3,000, the blinds are 100/200, and you’re dealt Ad-7d in the big blind. The chip leader is on the button and raises to 600; the small blind folds and you call the extra 400. The flop comes Q-8-3 with two diamonds, which is a pretty attractive flop for your hand. You check, and your opponent does exactly what you didn’t want him to do: put you all in for about double the size of the pot. You’re getting slightly better than 3-to-2 pot odds on a call for your tournament life.

Is it just me or is the correct thing to do with the nut draw there never ever ever ever to check??? Move all-in yourself and put the decision on your opponent.

Admittedly we don’t have a lot of information about the relative chip-stacks; if your 3000 is a decent proportion of the chips on the table and the fourth-place guy is short then clearly you can pick a better spot, but if everyone has 2000 or more then I don’t see the value in folding there.

The only way your opponent can call is if he has AQ, AA, KK or QQ, which is possible given the preflop raise but four-handed a button-raise could have a much wider range of hands than that; otherwise I don’t see how he can possibly call and – even if he does – you’re about 45% (?) to the nuts and pairing your ace may still be good.

Of course the real mistake Howard hasn’t talked about is much earlier on in the hand: if you’re planning on checking that flop you should have folded to the 400 bet in the first place – what on earth were you hoping for – AA7? Did you really expect the chip leader not to lead out and bet at any flop on which you’d checked?

Thoughts?

Tags: .



Blogroll

Categories