How apt:
employment rose causing misery for many.From this, also worth a read.
Have an award.
I've often wondered, idly, how to get MySQL to output a row number column, which would rank sorted and grouped results.
Well thanks to this excellent post I've found out how:
SELECT *, @rownum:=@rownum+1 as rank FROM ( -- Your Query Goes in Here SELECT t.* FROM table t WHERE something group by 2,3,4 order by 1 desc limit 20 ) day_rank, (SELECT @rownum:=0) r;
Want to install apc on CENTOS or RHEL?
REad this: http://www.agileapproach.com/blog-entry/howto-install-pecl-apc-cache-centos-without-xampp
I thought I'd put this in as well, since I had to google for it, using -n will make iostat provide you with stats for nfs shares too.
You can also use nfsstatiostat -nh 5
nfsstat -cvn -o nfs
I found this fascinating blog post on MSDN's IEBlog about the logo for IE9, thanks to Sam Ruby's wonderful Planet Intertwingly.
You should read it too.
I thought you may like to know (unless I'm the last one to cotton on!) that a scenario we've theorised about on the ASRG mailing list for years is finally here, there's now at least one commercial service that will translate CAPTCHA's for cash.
I found the link (shown below) to a service that will decode captcha's for you for $2 per 1000 successes. (Ironically it was in an ad served to me by gmail.)
So to anyone who ever proposed a spam "solution" that relied on differentiating between people and machines, and doubted us when we told them that the commercial imperative would be its downfall, read this:
We told you so, and it only costs two bucks for a thousand!I predict much more of this in time, with costs falling as more competition enters the market, and I honestly think it presages the end of the useful life of the captcha.
That isn't $2 per success - it's $2 per 1000 successes. Minimum purchase is $10 = 5,000 spam, er, advertising opportunitiesThanks Kevin, I've updated the post to reflect this.
... found sweatshops in India quoting some small number of rupees per thousand, claiming to be able to supply up to 250,000 per day. At _least_ three years ago.c) More intriguingly Steve Atkins said:
...
Incidentally, some of the spam filter companies, as part of their technology for trying to figure out whether the jpeg is naughty or not, _claim_ they can solve >90% of all captchas on the fly.
There's even a neural net implemented in javascript as a greasemonkey plugin that'll solve some simple captchas in the browser.I had a Googlearound and found this, that may interest you http://ejohn.org/blog/ocr-and-neural-nets-in-javascript/
This is a useful one if, like us, you find that the account used to create the procedure doesn't have the privileges required to execute it, or perhaps you've revoked the original definers grant. (DoH!)
ALTER PROCEDURE procedure_name SQL SECURITY DEFINER;javascript:void(0)
It seems that the way in which facebook chooses an image to show alongside a posted link differs for links posted in different ways.
Oh how fucking hilarious. Not.
On our product page if you "attach" the link, or share it using facebook sharer (http://www.facebook.com/sharer.php) it picks the big product image as the first image in the list for you to choose from. This is a Good Thing, and exactly what we want to achieve.
However if you click the like button, its picking up a random image from sets of smaller images elsewhere on the page.
e.g. Share this dress' page through the sharer, or by "attaching" and you see this image:
but if you use the like button it shows us this image,
which is for this dress.
Arrgghh that's annoying. Get a damn grip facebook, at the very least you could try to be consistent. Read about the principle of least surprise.
Facebook appears to be unavailable for many users, our office included.
This looks like a DNS issue, looking up www.facebook.com reveals no answer, but facebook.com does resolve.
So I added this to my hosts file[1], its one of the addresses for facebook.com, and it all came rumbling back.
(update, I've updated the line to include the login hostname)
69.63.181.11 www.facebook.com login.facebook.com
Facebook.. if you're listening, fix your DNS, and you owe me!
[1] Windows users, use notepad, you'll find that file here:
C:\windows\system32\drivers\etc\hosts
Just copy'n'paste the line at the end
I like to use nano to edit the crontab, but I don't want to change the default editor.
(Some people are very un-funny about that kind of thing!)
This is the one-liner to use nano, and I seldom remember it.
env EDITOR=nano crontab -e
Another piece of DBA hoodoo that I seldom need!
SELECT @@global.read_only;
SET GLOBAL read_only=1;
SELECT @@global.read_only;
Another one that I have to google every time.
Not being a DBA I don't do this very often, but now and again I find myself in the Hot Seat.
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
I do this so infrequently that I always have to google it.
Now I can search my own blog!
openssl pkcs12 -in mycert.pfx -out certificate.cer -nodes
Be safe.. the following describes an attempt to scam me into giving someone remote access to my PC, I was in a playful mood so I strung him along, don't you do that same thing unless you *know* what you're doing. And above all never let anyone remotely access your pc unless you're 100% sure that you ant them to.
I just got a call from a company calling themselves "virtual pc doctor".
He said that I was being called because I was a microsoft registered user.
The guy got me to log into my pc.
Then we clicked the start button and he got me to tell him if it said "computer" or "my computer".
Then we looked at the event viewer, he told me that the errors and warnings were some kind of dire "online infections" that can't be detected by anti-virus.
Woo, scary techno-shit, I thought (not!)
Then he asked me to open www.logmein123.com.
I didn't. I googled it instead.
He told me that a technician would log in, and cure these infections and install a "gateway" which would prevent further infections.
At this point I challenged him about the "online infections" and told him that I didn't think "dhcp client cannot obtain address" was very serious at all.
He said that if I thought that then that was my choice, but my computer could be irreperable damaged.
"oh!" I said, "how?"
"by corrupting the harddrive and the operating system" said he,
"OH!" I said, "Thats, bad. But what kind of software is capable of damanging the hardware? I can just re-install windows can't I?"
"No, because this is new, in the past few weeks, thats why we are giving you the call"
So I asked him where his company was located, and when he said the UK I asked him for registration details.
He Rang Off.
I reported the scam to trading standards.
If he calls you, hang up and report it yourself. Be safe!
In the spirit of the World Cup I'm going to veer off into football for this award, possibly for the only time ever.
I'm not a football fan, I prefer to follow "another code" (rugby union for those who don't speak in riddles) and I've been amazed and appalled at the number of times in this world cup, that the ref has appeared to have his hands tied and his eyes poked out by the victorian attitude to refereeing as expressed by FIFA.
International Rugby has sucessfuly benefited from video replays and from penalty-tries, and indeed from a clock that counts the seconds of play, cleverly pausing for injury or other "time out". None of these things interrupt the flow of the game. None of them compromise his authority.
The introduction of goal line "technology" however, would. That would delegate the decison to a machine.
In both codes the ref's decision is absolute and final, as it should be, and he has the option to exercise his opinion and experience at every stage of the game.
But by FIFA denying ref's access to the *option* to consult a video ref (or tv match official) or the *option* to award a goal for goal line offences we are saying that we do not trust their judgement. If FIFA do not trust the judgement of their referees what does that say for the game? Not to mention the appaling messages the handing of these incidents sends to our kids.
Decisions forced on ref's in this world cup undermine sportsmanship, and for that reason, FIFA, you get the Queen Victoria memorial award for reactionary fuddy-duddy-ism.
I have to say that although I don't have anything against Diaspora, there's a strong sense of dot-com naievety in the web site and the press reports that I've read. As someone once said in some movie I once saw sometime;
There's more to running a railroad than just laying down tracks, you know.*Those of you who were around during the unfettered madness in the last stages of the dot-com boom should know better than simply to believe the hype here, and let me explain why.
When I was a child I spoke as a child, I understood as a child, I thought as a child; but when I became a man I put away childish things....and that as facebook is more "grown up" it becomes cool to move your social network activity to facebook.
I've recently added the much talked about facebook "like" button to this blogger blog. (For those that are interested the code is at the bottom of this post)
And as I was doing it I wondered how to gain access to the stats this will inevitably collect. I don't have the precise answer to that one yet, but I did find some interesting things on the Facebook Query Language page.
Just for example, this link https://api.facebook.com/method/fql.query?query=SELECT%20total_count%20FROM%20link_stat%20WHERE%20url=%27blog.killerbees.co.uk/2010/04/no-i-dont-have-my-ipad-with-me.html%27 will show you how many times that blog post has been shared on facebook.
Why don't I care that this information, and a whole lot more, is in the public domain? Mainly because I assume that if I use facebook everything is available to everyone and I should be careful what I say, we need to educate each other, as we do with our kids, not to post things online that give away the secrets of our private life.
But also because facebooks attempt to predict the result of the election (here) has predicted a victory for the lib-dems.
This is something that is clearly not going to happen, but is also something that a quantative approach to predicting the election will always come up with. Why? Hopefully its because we lie to pollsters, even if that includes lying to ourselves. We're not rational or very sane, and as long as we don't publicise information that can be used to harm us predicting future behaviour using facebook data is no better or worse than using any of the other sources of information available.
Why should I be worried? The one doubt I have in my mind is that it would be possible to track all of your associations, and you may not want me to know who your friends friends are, or what interests you share, particularly if your friends achieve notoriety or your shared interests reveal your social circles in an unfavourable light.
That fb code:
1st put these in the top of the template html, I had to put them directly under the opening "head" tag to stop blogger from removing them.
<meta content='your site name goes here' property='og:site_name'/> <meta content='your app id goes here' property='fb:app_id'/>
<div id='fb-root'><div/> <script> window.fbAsyncInit = function() { FB.init({appId: 'your app id goes here', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); </script> <fb:like action="like" colorscheme="dark" expr:href="data:post.url" layout="standard" show_faces="true" width="500"> </fb:like>
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.Now I'm not a lawyer but this would seem to imply that Oracle reserve the right to abandon any commitment that Sun may have made over the future of Java and anything that may have been commited to via the JCP.
No awards for a while, but today Tim Bray made me smile on twitter with this comment on the HTML5 shenanignas
This is getting weird even by Standards standards.Have an award Tim.
I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.
Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.
Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)