Pomax's homepage http://pomax.nihongoresources.com The latest 20 entries from Pomax' homepage, dealing with whatever seemed worth mentioning. en-us pomax@nihongoresources.com Load text with custom fonts when the font is ready. http://pomax.nihongoresources.com/index.php?entry=1327200006 Over the past year and a bit I've run into many occasions where it is ridiculously tricky to load a bit of text, styled with a custom font, because browsers don't know when a custom font is ready. They can tell that they finished downloading it, but then can't tell when it is also ready for typesetting (A large font can easily have 200ms between 'download complete' and 'fully parsed and ready for use'). [...] Saturday 21st of January 2012, 06:40:06 pm 1327200006 Trap keys for HTML elements - show the browser who's boss http://pomax.nihongoresources.com/index.php?entry=1321828706 Say you're writing a browser game. Everything's going great until your user hits "backspace" and BAM! The browser goes to the previous page. How annoying is that? Forget about annoying, it means your game is unplayable because it doesn't trap important keys. [...] Sunday 20th of November 2011, 02:38:26 pm 1321828706 Adding macros to your CSS without breaking things http://pomax.nihongoresources.com/index.php?entry=1321828586 For the redesign of Nihongoresources.com I needed CSS macros at the client. I like <a href="http://sass-lang.com/">SASS</a>, but it doesn't let you keep shared design elements actually shared once the CSS it generate is loaded in a browser, so I needed something that kept those links in. <a href="http://lesscss.org/">LESS</a> has a horrendous syntax, and is not CSS compatible, so I rolled my own macro package that sticks with the syntax that is used in proper CSS so that things work even if people block scripts. [...] Sunday 20th of November 2011, 02:36:26 pm 1321828586 Get your simple page comments here. http://pomax.nihongoresources.com/index.php?entry=1320102522 So I needed something to add instant commenting to random pages I write (because I don't keep all my stuff on one website, and sometimes I'll make pages that have a limited lifetime but I'd still like comments for). So I dug into my Primer on Bezier curves, and ripped out the commenting functionality as it was the most modular starter I had lying around. [...] Monday 31st of October 2011, 04:08:42 pm 1320102522 Let's do JS templating! http://pomax.nihongoresources.com/index.php?entry=1319228259 For no good reason, let's get some templating going on for HTML pages, without needing server-side variable substitution. I have no idea when you'd actually use this, but then again maybe it's exactly the kind of thing you were looking for. <a href="pages/templating">Have some</a>. Friday 21st of October 2011, 01:17:39 pm 1319228259 Summer 2011 brings photographs http://pomax.nihongoresources.com/index.php?entry=1315456328 I've not been spending enough time posting entries, because I now have four websites on which I can post things when things happen, and no good solution (yet) on how to manage content between them... [...] Wednesday 7th of September 2011, 09:32:08 pm 1315456328 HTML5 meets Pomax http://pomax.nihongoresources.com/index.php?entry=1299561051 I like trying things because I have a need for them. One of the things I needed way back when I was writing the first revision for my book on Japanese grammar was a way to tell roughly how many pages of typeset material a plain text file would be. [...] Monday 7th of March 2011, 09:10:51 pm 1299561051 Bezier information for everyone http://pomax.nihongoresources.com/index.php?entry=1299560870 If you've ever wanted to know something about Bezier curves, there's a good chance I've covered it in my rather lenthly "Primer" on Bezier curves, conveniently located at <a href="http://processingjs.nihongoresources.com/bezierinfo/">http://processingjs.nihongoresources.com/bezierinfo/</a>. [...] Monday 7th of March 2011, 09:07:50 pm 1299560870 Writing a shoutbox http://pomax.nihongoresources.com/index.php?entry=1279860958 Because I'm migrating some of the functionality of <a href='http://www.nihongoresources.com' target='_blank'>nihongoresources</a> to a new domain, <a href='http://dictionaries.nihongoresources.com' target='_blank'>dictionaries.nihongoresources.com</a> I figured this was a good opportunity to let people voice their opinion in a less barrier, more direct way. Shoutbox style. [...] Thursday 22nd of July 2010, 09:55:58 pm 1279860958 I, for one, welcome our North Korean traffic wardens http://pomax.nihongoresources.com/index.php?entry=1278557463 <a href="http://gizmodo.com/5580656/global-alarm-north-korea-now-has-flying-traffic-girls" target="the_future">Futuristic deployment methods are futuristics.</a> Wednesday 7th of July 2010, 07:51:03 pm 1278557463 Thinking of buying Ziro? http://pomax.nihongoresources.com/index.php?entry=1277142258 If you're thinking of buying <a href="http://www.ziroworld.com/" target="_blank">Ziro</a>, the puzzle game, you may want to wait to see if the developers ever write a fix for the terrible mouse lag that the game suffers from. A game this simple (think iPhone app game) should not, and frankly speaking cannot, come with mouse lag. Yet it does. Terrible mouse lag. This makes the game utterly unplayable. Save your $5 or so for now. It really isn't worth the hatred you'll be spewing at your screen. Monday 21st of June 2010, 10:44:18 am 1277142258 A simple website link mapper http://pomax.nihongoresources.com/index.php?entry=1273872676 Ever had the problem where you needed to do a forward and backlink analysis of a website? Sure, for a simple homepage it's pretty easy, and some blog software will let you do it, and if you like google analytics (why do you like google analytics?) that will conceivably be able to help you do it too, but sometimes you're like me, and you just want a tool to do the job for you. You're thinking of using <a href="http://www.gnu.org/software/wget/" target="_blank">wget</a>, but it doesn't actually do link mapping, just recursive webmirroring, so what are you to do... [...] Friday 14th of May 2010, 02:31:16 pm 1273872676 Internationally Published Author http://pomax.nihongoresources.com/index.php?entry=1271838822 At long last, my book "An introduction to Japanese - Syntax, Grammar %26 Language" is properly published and available for purchasing. I will be selling autographed copies via http://www.sjgrpublishing.com and regular copies are available through amazon <a href="http://www.amazon.com/introduction-Japanese-Syntax-Grammar-Language/dp/9081507117/ref=sr_1_1?ie=UTF8%26s=books%26qid=1271837821%26sr=8-1" target="_blank">US</a>, <a href="http://www.amazon.ca/Introduction-Japanese-Syntax-Gr/dp/9081507117/ref=sr_1_1?ie=UTF8%26s=books%26qid=1271837849%26sr=8-1" target="_blank">Canada</a>, <a href="http://www.amazon.co.uk/Introduction-Japanese-Syntax-Gr/dp/9081507117/ref=sr_1_1?ie=UTF8%26s=books%26qid=1271837691%26sr=8-1" target="_blank">UK</a> and <a href="http://www.amazon.de/Introduction-Japanese-Syntax-Gr/dp/9081507117/ref=sr_1_1?ie=UTF8%26s=books-intl-de%26qid=1271837797%26sr=8-1" target="_blank">Germany</a> (since there's no amazon.eu) although that said, the German site seems to sell it at a price 100% higher than they should. [...] Wednesday 21st of April 2010, 01:33:42 am 1271838822 Computing bezier curve bounding boxes http://pomax.nihongoresources.com/index.php?entry=1271765044 Have you ever needed to compute the bounding box for a vector shape? You may have run into the problem that computing bounding boxes for lines is really easy, and that computing bounding boxes for arbitrary curves is, in fact, not. Not to worry! If you don't mind getting your brain dirty, <a href="/pages/bezier">I suffered this problem so that you don't have to</a>. Compute the bounding box for Bezier curves in the knowledge that math is on your side! Tuesday 20th of April 2010, 05:04:04 am 1271765044 Let's talk about democracy http://pomax.nihongoresources.com/index.php?entry=1269638772 For the first time in quite a while, I've written a new article on my live journal. This time on the concept of democracy, and how what the US has just pulled off is nothing even close to a democratic process. Feel free to <a href="http://pomax.livejournal.com/11231.html" target="_blank">peruse</a> it. Friday 26th of March 2010, 02:26:12 pm 1269638772 Photoshop CS4 without all the rest http://pomax.nihongoresources.com/index.php?entry=1262543325 I had to redo my computer setup, as I literally fried my system disk (ever seen an HD short circuit? There's a lot of smoke...) and that meant reinstalling Photoshop CS4. This time round I wanted to make sure I only installed what I needed, without all the crap Adobe's installer forces on you, so in the hopes that Adobe doesn't delete the post, instructions on how are <a href="http://forums.adobe.com/thread/548877" target="_blank">here</a>. [...] Sunday 3rd of January 2010, 10:28:45 am 1262543325 Do you use dokuwiki? http://pomax.nihongoresources.com/index.php?entry=1250761587 If you do, then perhaps this <a href="http://www.dokuwiki.org/plugin:tabtables" target="_blank">plugin</a> that I wrote will be of use to you; it lets you use standard tab delimited tables in your wiki, turning it into proper tables when you view the page in a browser. [...] Thursday 20th of August 2009, 02:46:27 am 1250761587 Playing games in windowed mode http://pomax.nihongoresources.com/index.php?entry=1244302766 First off, if you play Maple Story, go away. [...] Saturday 6th of June 2009, 08:39:26 am 1244302766 A better layout manager http://pomax.nihongoresources.com/index.php?entry=1242306034 Layout management in Java gives me lots of headaches. Especially since I'm writing a custom text annotation tool and there do not seem to be any layout managers that are designed to do what you expect for text-like objects: format as lines and paragraphs. [...] Thursday 14th of May 2009, 06:00:34 am 1242306034 Unicode strings in java http://pomax.nihongoresources.com/index.php?entry=1241362452 I got fed up with Java's inability to properly handle unicode strings due to it relying on a 16 bit "char" primitive. Unicode (at the time of writing) basically covers a space that requires 4 bytes, and char is only 2 bytes 'wide', so it just ... doesn't work. Strings report the wrong length, substring selection can chop up unicode glyphs mid-byte-sequence, it's a mess. [...] Sunday 3rd of May 2009, 07:54:12 am 1241362452 A walk through the garden http://pomax.nihongoresources.com/index.php?entry=1240058535 With the weather being pleasant, I decided to take a stroll through my parents' garden and take a few pictures. The result is actually fairly enjoyable so I figured I'd set up a <a href="http://www.flickr.com/photos/pomax/sets/72157616953383276/" target="_blank">set</a> for it, starting at <a href="http://www.flickr.com/photos/pomax/3450380351/in/set-72157616953383276/" target="_blank">this</a> photograph. Saturday 18th of April 2009, 05:42:15 am 1240058535