Why can't I type "execute"? It keeps coming out as "executre".
This is an open question with a million dollar* cash prize for the correct answer.
* this kind
2012-12-23
2012-11-05
MacJunk
I develop on a Mac, because my company thinks they're awesome. Sometimes, however, I have to take my work home with me, and because I'm sane, I have Windows. Of course, this inevitably leads to Issues.
tags:
mac os x,
programming,
web design,
windows
2012-11-02
-RRRRRRRRRRRRRRRRRR
(as in, 'aaaaarggghhh!' - but you got that, right?)
tags:
davidiocy,
graargh,
linux,
programming,
web design
2012-11-01
zenToHan
One of the problems I occasionally come across in web apps is sanitizing user input. Japanese has two versions of each alphanumeric character, known as 全角 (full-width) and 半角 (half-width). Many users don't know how to differentiate between the two, and it can cause problems when inserting values into the database.
tags:
internet,
javascript,
jquery,
web design
2012-10-27
2012-10-18
grrrrraaaaaaaaaaaaaaaaaaaaaaaaargh
(this ain't gonna reveal the best side of my personality, so don't read it)
tags:
gaikoku,
graargh,
japan,
japanese,
soft racism
2012-10-17
steal this dvd
You wouldn't steal a car You wouldn't steal a handbag You wouldn't steal a television You wouldn't steal a movie.
Just rented a movie and apparently they are still using this. I first saw it as a teenager like a decade ago, and I thought it was idiotic then. Do I even need to bother explaining the logical flaws in the argument? Is there anyone out there who didn't immediately come to the obvious conclusion? How can they not have got rid of it by now? I can only assume it's been so successful in halting piracy that they cannot afford to do away with it.
tags:
advertising,
movies,
piracy,
tv
2012-10-16
s
I tend to look down on social media addicts, like those poor saps who cannot go for more than a few hours without seeing someone else's updates on Facebook. Don't they have anything better to do?
On a completely unrelated note, I was recently awarded the Enthusiast badge over at StackOverflow. It's for those dedicated souls who have [v]isited the site each day for 30 consecutive days.
[The fact that all I have to do in Chrome to get to SO is hit s followed by the enter key is probably a warning sign...]
On a completely unrelated note, I was recently awarded the Enthusiast badge over at StackOverflow. It's for those dedicated souls who have [v]isited the site each day for 30 consecutive days.
[The fact that all I have to do in Chrome to get to SO is hit s followed by the enter key is probably a warning sign...]
tags:
internet,
programming,
social media,
stackoverflow,
web design
2012-10-13
a problem to <span> the pages
Never assume that you know everything. That's so obvious I'm not even going to explain it further. But also never assume that you know everything that you do actually know. Because you may know it, but you don't know that you know it when you need to know.
2012-10-07
namespaces
Uncaught SyntaxError: Unexpected token ILLEGAL
When you're making an SVG embedded in an XHTML document, don't forget the namespaces!
2012-07-23
condicionally amusing
I know it's pretty much accepted as an alternative spelling, but even so, at least once a month I see it somewhere online, and I giggle.
2012-07-22
2012-07-09
harness the power of... binary options!
You know you're too much of a geek when you start to get spam emails like this:
tags:
advertising,
english,
humo(u)r,
internet,
mmkay,
programming,
spam
2012-07-04
mini flashcards
Just made a quick guide, written in an incredibly patronizing tone, for the novice wishing to make some mini-flashcards.
why?
The name suddenly makes sense. It is, after all, called "Microsoft Word", not "Microsoft Words". Presumably it is programmed to trim down any excess.
2012-06-30
jQueery
This is slightly bizarre. I was jumping through hoops trying to get a script to reset a dropdown after a successful ajax request. Quite pointlessly, as it turns out.
tags:
html,
javascript,
jquery,
programming,
web design
2012-06-28
svg to vml or gif and back
God only knows what my grandfather would have made of the title of this post. Gotta love how fast language can change.
tags:
conversion,
convert,
cross-browser compatibility,
php,
svg,
vml,
web design
2012-06-25
plaintext passwords is crazy, init
If you're accessing a MySQL database using PHP, you have to hand the mysql functions your username and password, as well as the name of the database you want to work with.
This is a massive security risk.
mysql_connect('localhost', 'myname', 'mypass'); //etc
This is a massive security risk.
tags:
mysql,
php,
web design
2012-06-21
mathjax
Behold, a magic trick! Watch the foundations of mathematics disappear!
tags:
cross-browser compatibility,
css,
education,
html,
internet,
javascript,
math,
mathjax,
web design
2012-06-19
早口言葉#6
A tongue twister to limber up your labials before bed: 「赤パジャマ茶パジャマ黄パジャマ」
tags:
games,
japanese,
tongue twister
2012-06-11
2012-06-07
2012-05-06
subtle
I clicked by an ad for AOL email today. I clicked off the page before I noticed it, and only caught it as it vanished, so this might not be verbatim, but this is pretty much what it said:
"Does your email have you running around in circles?"
The implication being, of course, that running around in circles is complex and therefore bad.
Hmm.... I wonder what they could have meant. I'm sure there's a reference to a competitor hidden cleverly away in there somewhere, but I just can't spot it. This is the very definition of sly wit. The sort of bon mot that I have no doubt Oscar Wilde, had he been into failing internet giants, would have handed them for an ad campaign.
"Does your email have you running around in circles?"
The implication being, of course, that running around in circles is complex and therefore bad.
Hmm.... I wonder what they could have meant. I'm sure there's a reference to a competitor hidden cleverly away in there somewhere, but I just can't spot it. This is the very definition of sly wit. The sort of bon mot that I have no doubt Oscar Wilde, had he been into failing internet giants, would have handed them for an ad campaign.
tags:
advertising,
aol,
google,
internet
irreturnable
*sigh*
So if you are using AJAX to hijack a plain HTML/PHP form, and you have written the Javascript perfectly, and you're getting a 200 code so you know it's being SENT okay, but nothing seems to be coming back....
So if you are using AJAX to hijack a plain HTML/PHP form, and you have written the Javascript perfectly, and you're getting a 200 code so you know it's being SENT okay, but nothing seems to be coming back....
tags:
ajax,
davidiocy,
jquery,
php,
web design
2012-05-02
2012-04-14
FPDF FTW
If you ever need to create PDFs on the fly with PHP, I highly recommend you use FPDF.
tags:
japanese,
mysql,
pdf,
php,
programming,
web design
2012-03-28
早口言葉#4
A quirkily tricky twister of tongues this time: 「竹垣に竹立てかけた」
tags:
games,
japanese,
tongue twister
local sqlite db in android
If you want to include an existing SQLite database in an Android app, but all the tutorials seem to be telling you how to create one at runtime, go here:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
Easy-to-understand and thorough tutorial on using your own database. Something, I might add, that should really have its on section on the Android Dev site.
BTW sorry for the total lack of puns in the post title. I shall do better in future, I promise.
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
Easy-to-understand and thorough tutorial on using your own database. Something, I might add, that should really have its on section on the Android Dev site.
BTW sorry for the total lack of puns in the post title. I shall do better in future, I promise.
tags:
android,
programming,
sqlite
aaaiiiIEeee 7/8 bug
There seems to be a weird form submission bug in old versions of Internet Explorer (i.e.* 8 or earlier).
tags:
cross-browser compatibility,
html,
php,
web design
2012-03-12
2012-03-07
installing Native American Tribe
If you need to install Apache and, like me, are still running Vista, GO HERE NOW:
How to Install Apache 2.2 on Windows Vista
It is a very simply-written guide to a fairly complex process.
How to Install Apache 2.2 on Windows Vista
It is a very simply-written guide to a fairly complex process.
tags:
apache,
php,
web design
spot the mys(ql)take
Spot the mistake time again:
mysql_query( "INSERT INTO users (username, password) ↲ VALUES($user, $pass)", $database );
tags:
davidiocy,
mysql,
php,
web design
2012-02-27
somewhat of a pet peeve
So today I'm somewhat vexed. Actually, it's not just today, it's the past six months or so. There's an awful misuse of English going on, and it seems to be spreading like Marmite on toast. That is to say, it spreads very well, but with the consequence that you are left with a piece of delicious bread covered in Marmite, an industrial solvent which the British often mistakenly use for making sandwiches.
So the spreadage is bad. I hope that's clear now.
So the spreadage is bad. I hope that's clear now.
2012-02-24
早口言葉#3
This time we present a well-known tongue-twister: 「生麦生米生卵」
tags:
games,
japanese,
tongue twister
2012-02-19
snow small feet
My right knee and left foot are at the same height, but my legs are still straight. Yet I endured the pain in order to take this photograph. For you. |
2012-02-10
2012-02-08
snow place like home
So I was standing by this junction, and the traffic light was green, and yet no traffic was moving. Why?
2012-02-07
早口言葉#1
Japanese tongue-twisters are fun. Let's start off with an easy one: 「庭に2羽ニワトリ」
tags:
games,
japanese,
tongue twister
2012-02-03
z-index not working?
This is the third time this month I've had this problem. I'm writing it down here in the hopes that it won't happen again.
tags:
css,
davidiocy,
html,
javascript,
web design
2012-01-30
awesomenicles
Icicles? I think not. We gotta invent a new word for these babies. Ladies and gentlemen, I give you awesomenicles.
2012-01-27
a decade later and still its not right
I remember making fun of MS Word's spelling and grammar checker, back in the days when it first came out. My best friend and I spent several hours one afternoon just typing in words and giggling at the suggested corrections. The only one I can recall now was our home town of Ilkley, which yielded alkali - for some reason that sent us into paroxysms of laughter (well, we were 13 - pretty much everything sent us into paroxysms of laughter).
It's not as if Microsoft hasn't had the time or the resources (new!Solitaire). How does Word still do things like this?
It's not as if Microsoft hasn't had the time or the resources (new!Solitaire). How does Word still do things like this?
conference blues
Why is it that whenever people attend a conference, they always number among them those who think that it is cool to badmouth said conference? Even if it is interesting. Even if it is providing opportunities to enhance their skills and enable them to engage in more effective work, even further their careers. Even though they are enjoying themselves. Why is it cool to constantly make fun of it?
I'm no stranger to the sarcasm, and I get the whole "conference = boring" stereotype. It's a safe topic of conversation for people who are only occasionally acquainted with one another, for who would argue? Well, I did. I said, "No, actually, I am having a good time. Aren't you?" Apparently that wasn't cool. I ended no small number of conversations with that line. Well I'm sorry. I thought we were in teaching because we wanted to teach. I thought that any opportunity for improvement would be eagerly seized and made the most of. What an idiot I was.
I, for one, enjoyed the conference. Having been to it five times over the past few years, I can honestly attest that this year was the best. Not a single workshop didn't but yield some priceless nugget of inspiration. The keynote and guest speakers were a joy to listen to, and I've already implemented some of their ideas in class, with great success.
I care about being a teacher. I have done ever since I met my first really good one in junior high school. I'll do anything to make myself into a person who can inspire a new generation of kids the way that one inspired me.
I'm no stranger to the sarcasm, and I get the whole "conference = boring" stereotype. It's a safe topic of conversation for people who are only occasionally acquainted with one another, for who would argue? Well, I did. I said, "No, actually, I am having a good time. Aren't you?" Apparently that wasn't cool. I ended no small number of conversations with that line. Well I'm sorry. I thought we were in teaching because we wanted to teach. I thought that any opportunity for improvement would be eagerly seized and made the most of. What an idiot I was.
I, for one, enjoyed the conference. Having been to it five times over the past few years, I can honestly attest that this year was the best. Not a single workshop didn't but yield some priceless nugget of inspiration. The keynote and guest speakers were a joy to listen to, and I've already implemented some of their ideas in class, with great success.
I care about being a teacher. I have done ever since I met my first really good one in junior high school. I'll do anything to make myself into a person who can inspire a new generation of kids the way that one inspired me.
2012-01-26
making hijax jQuery form submit
Kinda obvious now, but I was tearing my hair out for a long time over this.
If you are trying to hijax the default submission of a form, with Javascript or jQuery, you need to make sure the .onsubmit() or .submit() is referencing the form, not the submit button.
If you are trying to hijax the default submission of a form, with Javascript or jQuery, you need to make sure the .onsubmit() or .submit() is referencing the form, not the submit button.
tags:
davidiocy,
html,
javascript,
jquery,
web design
2012-01-25
primes
Example
-
In case you don't know, a prime is a whole number that cannot be divided by any whole number other than 1 or itself. To test whether a number is prime, therefore, we just need to divide it by all the whole numbers that are smaller than it. If it can be divided by one of these numbers, it is not prime.
Here's a simple script that tests if a number is prime or not.
tags:
javascript,
math
2012-01-24
2012-01-22
new kanji
I hereby present this humble offering for inclusion in the next version of the Japanese language, whenever it is released.
weird .test() behaviour in Javascript regex
In a previous post, I described how I implemented a search of words contained in an XML file by using a regular expression defined by the user. Well, I ran into a weird problem.
tags:
javascript,
stackoverflow,
web design
wildcard search using RegExp
So one of my current projects is the Vocablinator, a dictionary of the words used in the JHS English textbooks in Japan. Believe it or not, this is actually quite useful to some people.
tags:
javascript,
web design
2012-01-21
Subscribe to:
Posts (Atom)