Showing posts from March 20, 2011

new version of emacs math symbol input mode (xmsi-mode)

New version of Emacs Unicode Math Symbols Input Mode (xmsi-mode) (for math symbol and unicode input). This version added about 102 full width symbols. e.g. “fw&” becomes “&”. (these chars probably not useful to most, but i use the fullwidth version of ampersand often to avoid encoding complexity in html) happy using.See: HTML Entities, Ampersand, Unicode, SemanticsProblems of Symbol Congestion in Computer Languages (ASCII Jam; Unicode; Fortress).

Stack Overflow is based on Microsoft Tech

Am surprised to learn that Stack Overflow is based on Microsoft technologies.framework: Microsoft ASP.NETlanguage: C#development environment: Visual Studioweb framework: ASP.NET MVCbrowser framework: jQuerydatabase: SQL Server 2008data access layer: LINQ to SQLsource control: Subversion (now Mercurial through Kiln)compare tool: Beyond Comparesource control integration: VisualSVN (now, VisualHg)See: Source going Microsoft!

Rebecca Black - Friday (song)

Perm url with updates: Black - Friday (song)Xah Lee, 2011-03-24A 13-years-old girl, Rebecca Black, made a song called “Friday”. It went viral on the net on 2011-03-11, and within a few days, got millions of views. As of today (2011-03-24), it's got 44M views.Here's the video.“Rebecca Black - Friday” amazon I think i first saw the video from twitter. My first impression was: bad song. Monotonic music, brainless lyrics — pubescent teeeens. I closed it without much thought, though i did finish watching it, for my fascination of teens. I didn't know she was 13. I might have taken her to be 16.According to report, she might be making $60k due to the popularity. Here's the exceedingly intricate lyrics. (Yeah, Ah-Ah-Ah-Ah-Ah-Ark) Oo-ooh-ooh, hoo yeah, yeah … Seven a.m., waking up in the morning Gotta be fresh, gotta go downstairs Gotta have my bowl, gotta have cereal Seeing everything, the time is going Ticki…

HTML5 “figure” & “figurecaption” Tags Browser Support

Perm url with updates: “figure” & “figurecaption” Tags Browser SupportXah Lee, 2011-03-24html5 has a nice “figure” and “figurecaption” tags, for images. Like this: <figure> <imgsrc="../i/lilies-s.png"alt="lilies"width="167"height="106"> <figcaption>lilies</figcaption> </figure> Test if you browser support it here: html5 figure figurecaption test page.Of all latest publically released browsers as of today (2011-03-24), Safari (5.0.4) and Opera (11.01) doesn't support it. Google Chrome (10.0.648.151), Firefox 4.0, IE9, all support it. You can tell because the caption should be rendered beneath the image, not to the right of it.It's odd that Google Chrome and Safari both runs WebKit engine but behavior is different. HTML5 Canvas vs SVGHTML5 Video and Audio TagJavascript Execution Order; HTML5 Asynchronous JavascriptHTML6: Your JSON and SXML SimplifiedGoog…

Tsunami in Japan (personal videos)

Here's a 9 minutes video of personal recording.“大津波 tsunami japan おいらせ町” (wngad869 2011-03-17) more at

CSS “pre” Problem: No Linebreak After Tag

Perm url with updates: “pre” Problem: No Linebreak After TagXah Lee, 2006-07-29, 2011-03-23This page shows a odd CSS behavior of lines inside “pre” are being rendered without linebreaks. It has to do with “display:table”, and “span” tags.Here's the html source code: <prestyle="display:table; border:solid thin"> <spanstyle="color:red">line 1</span> <spanstyle="color:blue">line 2</span> line 3 </pre> Here's what Safari shows:Screenshot of Safari (5.0.4 (7533.20.27)) on Windows. The following browsers renders the first 2 lines in a single line.Safari (5.0.4 (7533.20.27)) on Windows. (latest version as of 2011-03-23)Google Chrome (10.0.648.151) on Windows. (latest version as of 2011-03-23)Firefox ( Mac)Safari (2.0.4) on MacThe following browsers renders each line separate.Firefox 4.0 on Windows. (latest version as of 2011-03-23)Internet Explorer 9. (latest versi…

Sex in Second Life: Video Interview with Paisley Beebee

post removed. see it at

emacs cult scumbag: spell checking problem

Emacs cult scumbag. To spell check a file of 2.6k words, it froze emacs for 10 seconds. While in Mozilla Thunderbird and everywhere else it's 0.3 seconds.Emacs Spell Checker ProblemsHunspell Tutorialaspell TutorialEmacs Idolization: Have You Read the Emacs Manual From Cover to Cover?

Firefox 4 and AutoHotKey, MozillaWindowClass

Perm url with updates: 4 and AutoHotkey: MozillaWindowClassXah Lee, 2011-03-22Firefox 4 is released today.If you use AutoHotkey, you'll notice that Firefox's “ahk_class” changed. It was MozillaUIWindowClass, which is also used by Mozilla Thunderbird. But now for Firefox 4 it's MozillaWindowClass.This is a good change. Because now you can define key sets separate for Firefox and Thunderbird, without resorting to using the window's title or other tricks.Here's my Firefox keys.; tttt -------------------------------------------------- ;; Mozilla Firefox 4 hotkeys #IfWinActiveahk_class MozillaWindowClass ; #IfWinActive ahk_class MozillaUIWindowClass ; #IfWinActive Mozilla Firefox NumpadDiv::Send ^{PgUp} ; previous tab NumpadMult::Send ^{PgDn} ; next tab Pause::Send ^w ; close window ; swap middle/right buttons $RButton::MButton $MButton::RButton $XButton2::Send ^w ; close ^F12:: { Send ^t sleep 1…

w3c validator fuckup: p tag inside li valid!

Perm url with updates:“p” Tag in “li” as Valid HTML4If you have “p” tag inside “li”, it's valid! Even in html 4 strict.(Note that technically any ending tag of “p” and “li” can be omitted.)Test page: W3C HTML Validation Problem: p in li.With this situation, at this point, you wonder what's validator supposed to be anymore.

Google Earth Mouse Navigation and Keys

Perm url with updates: Earth Mouse Navigation and KeysXah Lee, 2011-03-12Do you find Google Earth's mouse navigation a bit confusing? This page explains.Mouse Navigationmouse wheel = zoomLeft mouse button = panMiddle mouse button = rotate & tiltRight mouse button = smart auto zoom, rotate, tilt. (up/down = zoom ◇ left right = rotate ◇ close to the surface = auto tilt)By KeyboardZoom = PgUp, PgDnPan = ←, →, ↑, ↓Rotate = 【Shift+←】, 【Shift+→】Tilt = 【Shift+↑】, 【Shift+↓】Holding down Alt before doing the above will make the steps smaller.Extra for Control Freakstilt camera = 【Ctrl+↑】 and 【Ctrl+↑】rotate camera = 【Ctrl+←】 and 【Ctrl+→】 (camera is rotated around a axis from earth center to your camera) Google Earth Geography 101Review of SpaceNavigator & Mathematical Models of 3D Inputs ControlBest Input Devices (Jog/Shuttle, Touchpad, Cyborg Mouse, Pen Tablet)Best Trackball Mouse

Emacs Lisp Batch Processing: Grep Find Replace Variations

Perm url with updates: Lisp Batch Processing: Grep Find Replace VariationsXah Lee, 2011-03-21This page shows emacs lisp scripts that do variations of grep/find/replace string, and is applied to few thousand files. For example, report the position of a given string, replace a HTML page's “H1” tag text from its “TITLE” tag text. If you don't know elisp, first take a look at Emacs Lisp Basics.Problem: Report String PositionI need to know if a particular string happens in beginning of file or near the end. Ι need to know this for about 5k files in a dir.Solution;; -*- coding: utf-8 -*- ;; 2011-03-21 ;; report the position (line number) of a occurances of string, of a given dir (setq inputDir "~/web/xahlee_org/" ) ;; add a ending slash if not there (when (not (string= "/" (substring inputDir -1) )) (setq inputDir (concat inputDir "/") ) ) (defunmy-process-file (fpath) "process…


avuncular“How many engineers does Microsoft have?” Page asked.About 25,000, he was told.“We should have a million,” Page said, in all seriousness.At that point, Schmidt put an avuncular hand on Page’s shoulder and brought him back to the real world. Now, with Page as CEO, that hand is less likely to be there. Larry Page Wants to Return Google to Its Startup Roots (2011-03-18) By Steven Levy. @ Source avuncular = Of or pertaining to an uncle.