Byte order marks are the secret bane of many a PHP coder, and usually you want to remove them from documents that you are about to process.
But if you are sending UTF-8 CSV data to Excel, then you need to add one, otherwise your unicode is gonna be gibberish.
// send BOM
echo pack( 'C3', 0xef, 0xbb, 0xbf );
// then immediately send output
print $csv;
Note that this doesn’t work with Excel 2004 (Mac). As far as I can tell, there is no way to force Excel 2004 to read unicode CSV files. I mean, who would want to? :-p
Man this one is annoying: after you upgrade Flash on OS X, the cursor disappears from your GMail replies.
The fix is here, which is that you should go to Settings, scroll down to Attachments, and select “Basic attachment features”.
Why in the name of HTML5 does Google still use Flash for file uploads? Grrrr.
Every now and then an application’s icon will randomly disappear from the Macintosh Dock. The application is still on the Dock, you can click on it like normal, but its icon is blank. What to do?
1) Quit the Application if it is running.
2) Right-click on the blank Dock icon and click Options > Show in Finder.
3) Right-click again and choose Options > Remove From Dock.
4) Relaunch the Dock using the Terminal command: killall Dock
5) Launch the Application from the Finder window and drag it back to its rightful place in the Dock.
Annoying, yes, but at least it doesn’t happen very often.
There’s a great post at Tomorrow Museum declaring The End of Sexism. It’s a bit of a manifesto, actually, the point being that there are no excuses, other than outright stupidity, for sexist behavior.
I agree and disagree at the same time. Based on reactions to valid claims of sexism in technology (I’m looking at you, IT) and politics, I think that a disturbing number of people are unwilling to acknowledge that there is a problem. It’s too big to even see—unless you’re looking for it, and then it’s everywhere.
So we are in a strange place: the majority have agreed for a long time that sexism is bad, the enlightened are adopting a zero-tolerance policy, but the male-dominated, mainstream everything is still completely oblivious to the issue.
If the the repulsive force of squabbling bureaucrats could be overcome using conference-room confinement, the resulting release of energy would power the world forever.
— Slashot post by sakdoctor
Ideally, you would have one site, that you own and control, and you would post everything to that site. Then you would make decisions about how to republish those posts (or protect them):
- Short posts get re-posted to Twitter and/or Facebook
- Photos get re-posted to Flickr
- Videos get re-posted to YouTube
- Copyrighted media gets protected with a password so you can share it with friends and family only.
Because you control the site, it’s okay to store credentials for other services (like your Facebook password) in there.
Baked into the site would be tags, RSS newsfeeds for everything, a built-in URL shortener, and simple photo/audio/video editing tools.
Ilia Alshanetsky points out that AddHandler is the wrong directive to use for executable file types like PHP, because Apache could execute the file bad.php.jpeg (I haven’t tested this yet, but plan to).
The safer directive is apparently AddType:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
You would think that if your browser doesn’t support playing audio/mp3 content using an html5 <audio> tag, it would do the right thing and fall back to the fallback markup under it.
Consider the following html5 markup:
<audio controller=”controller”>
<source src=”sound.mp3” type=”audio/mp3”>
<a href=”sound.mp3”>Click here to play audio</a>
</audio>
I’m just getting started with html5, but it seems to me that a browser should embed an audio controller if sources of type audio/mp3 are supported, and fall back to the link if not.
Firefox (which doesn’t support mp3) embeds the controller, but shows a big red X because it can’t play the file.
So I ask you, internets, am I misinterpreting the standard?