Posts

Showing posts from October 31, 2010

Llorando (Crying) from Mulholland Drive

Image
Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/llorando_mulholland_drive.htmlLlorando (Crying) from Mulholland DriveXah Recommends:

iPod Nano. Xah Lee, 2010-11-06There is a very emotionally disturbing song, “llorando”, from the movie Mulholland Drive (2001)The song is so touching that when it is playing, it makes me listen intently, and it changes my brain's state into a deep philosophical sorrow on human suffering, and often i broke into silent tears all over my face.While in 2001 when Mulholland Drive with this song came out, i researched on the web who's the singer. I found the singer's site with email, and sent her $1 thru paypal. (1 dollar was small, but in my opinion is the right way to express my deep appreciation. At the time, it's the dot com era with lots of new visions of web stores and economy, and the concept of Micropayment is still alive. Though, i think she probably doesn't even know what paypal is, and i doubt she actually…

What is a Tech Geeker?

Perm url with updates: http://xahlee.org/UnixResource_dir/writ/tech_geeker.htmlWhat is a Tech Geeker?Xah Lee, 2008-05-03, 2010-11-06Definitiontech geeker: (noun) A elite programer nerd who severely lacks literacy of social sciences yet persistently loud of his opinions on many social issues related to programing, such as language popularity, pros and cons of GUI, software engineering practices, software license issues, IT industry practices, ethics of corporations.Are You a Tech Geeker?Are you male?Are you proficient in a computer language or technology? perhaps several?Is computer coding or sys admin your way of getting food?Do you love the term “hacker”? Have you been called a hacker?You do not have a degree in history, arts, philosophy, law, economics, communication, psychology, or any credential from the field of social sciences.You are keen on social issue of software. You read slashdot and groklaw and reddit and hacker news.You have strong opinions on software licensing, the con…

Cyborg RAT 5 gaming mouse

Image
2 months ago, i found a fantastic mouse:Cyborg RAT 5 gaming mouse. But reading amazon reviews today, it seems to have its problems. For video review and detail, see: Best Input Devices (Jog/Shuttle, Touchpad, Cyborg Mouse, Pen Tablet).

真善美 (Truth, Virtue, Beauty)

Image
Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/stace_vrude_melbi.html真善美 (Truth, Virtue, Beauty)Xah Lee, 2005-04, 2010-11-04 Title: 真善美 (Truth, Virtue, Beauty) Singer: 周璇 Zhou1 Xuan2 (1918-1957) Lyrics: 李雋青 Music: 侯湘 (李厚襄(1916─1973)) Source: 《鸞鳳和鳴》電影插曲 Translation: 李杀 (Xah Lee) 真善美, 真善美, 它们的代价是脑髓, 是心血是眼泪, 哪件不带酸辛味? 真善美, 真善美, 它们的代价是疯狂, 是沉醉是憔悴, 哪件不带酸辛味? 多少因循多少苦闷, 多少徘徊, 换几个真善美? 多少牺牲多少埋没, 多少残毁, 剩几个真善美? 真善美, 真善美, 它们的欣赏究有谁? 爱好的有谁? 需要的有谁? 几个人知这酸辛味? Truth, Virtue, Beauty; Truth, Virtue, Beauty They are the nervous breakdowns Sweat and tears How do they taste? Truth, Virtue, Beauty; Truth, Virtue, Beauty Their cost is insanity Intoxication, and despondency Are they not suffering? How many failings, the dejections and futilities Buys how much truth, virtue, and beauty? What sacrifices, oblivion What wreckage For how much truth, virtue, and beauty? Truth, Virtue, Beauty; Truth, Virtue, Beauty Just who appreciates them? Who loves them? Who needs them? Have you …

Emacs Lisp Power: Text-Soup Automation

Perm url with updates: http://xahlee.org/emacs/elisp_text-soup_automation.htmlEmacs Lisp Power: Text-Soup AutomationXah Lee, 2010-11-03This pages showcases a example of emacs lisp power, in dealing with text-soup processing that requires human interaction.The ProblemI have a favorite movies page at Xah's Favorite Movies.The page contain about 70 amazon links like this: <aclass="amz"href="http://www.amazon.com/dp/B000055Y0X/?tag=xahh-20">amazon</a> It's a mystery what the link is, unless you visit the link. I want them to be like this: <aclass="amz"href="http://www.amazon.com/dp/B000055Y0X/?tag=xahh-20"title="Dr. Strangelove; movie">amazon</a> It's a thorny problem. You have to write a script to fetch the amazon page then parse the result to get the product title then insert them at the right place. Amazon may block crawlers, and even if not, the parsing of the complex html to extract the title may t…

Fix Defective Keys in Comfort Curve Keyboard

Image
Perm url with updates: http://xahlee.org/emacs/ms_keyboard/ms_comfort_curve_keyboard_2000_fix.html
Fix Defective Keys in Comfort Curve Keyboard Xah Lee, 2010-10-18, 2010-11-03
If you bought a Microsoft Comfort Curve Keyboard 2000, and some keys started to fail, this page shows you how to fix it.

Microsoft Comfort Curve keyboard 2000. amazon This keyboard is known for key-failure problem. For detail, see: Microsoft Comfort Curve Keyboard 2000 Review.
What's the Cause of The Problem? Static Built-Up? There's a guy SMApple who wrote a post here: Source. He says the problem is electric static built-up inside the keyboard. Quote:
The problems with this MS comfort curve keyboard starts when at random some of the keys stop working, it dose not matter how hard you press or for how long, they just wont work, this problem is due to static charge build up on the thin plastic sheet/mat inside the keyboard that has electric circuit printed on them. This new keyboard technology is wonderful…

Emacs Lisp Power! amazon-linkify

Perm url with updates: http://xahlee.org/emacs/elisp_amazon-linkify.htmlEmacs Lisp Power! Transform Text Under CursorXah Lee, 2010-11-03This pages showcases the power of emacs.Just updated a elisp command. (defunamazon-linkify () "Make the current url or region into a Amazon link. ; examples of Amazon product url formats http://www.amazon.com/Cyborg-R-T-Gaming-Mouse/dp/B003CP0BHM/ref=pd_sim_e_1 http://www.amazon.com/gp/product/B003CP0BHM http://www.amazon.com/exec/obidos/ASIN/B003CP0BHM/xahh-20 http://www.amazon.com/exec/obidos/tg/detail/-/0877796335/ Example output: <a class=\"amz\" href=\"http://www.amazon.com/dp/B003CP0BHM/?tag=xahh-20\" title=\"Cyborg R T Gaming Mouse\">amazon</a> For info about the amazon id in url, see: URL `http://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number'" (interactive) (let (asin p1 p2 meat productName tmpBds) (if (region-active-p) (setq p1 (region-beginning) p2 (re…

Apple Macbook Air Review

Image
Perm url with updates: http://xahlee.org/comp/macbook_air.htmlApple Macbook Air ReviewXah Lee, 2010-11-02Apple recently come out with 2 new fancy laptop computers. Macbook Air. It's thin and light. The special part is that it's got flash drive instead of the hard-disk, and does not have a DVD drive. Here's the spec for the smaller sized model.Macbook Air, 2010 October Macbook Air MC505LL/ADimension30 cm × 19.2 cm × 1.7 cmWeight1.04 kg (that's like 6 apples)screen pixels1366 × 768CPU1.4 GHz Core 2 DuoMemory2 GB (RAM)Storage128 GB Solid State DriveGPUNVIDIA GeForce 320M Integrated GraphicsMacbook Air, 2010 October. Apple Macbook Air commercial. Slick, ain't it? Note that they not only dropped the hard-disk for a flash-drive, they also dropped DVD drive. So, if you are thinking of watching DVD on the plane, you are a rube. The cool kids don't watch DVDs on a computer anymore. Instead, you watch video thru downloaded files or digital streaming e.g. Video On Demand.Ap…

Conical Surface Juggling

Perm url with updates: http://xahlee.org/vofli_bolci/conics.htmlConical Surface JugglingXah Lee, 2006-11, 2010-11-02Greg Kennedy juggling inside a conical enclosure. It looks like juggling in wonderland, doesn't it?You may not know, that when a cone is cut by a plane, their intersection forms a curve on the cutting plane, and this curve is mathematically classified into 3 types: ellipse (closed), hyperbola (open), parabola (open), depending the angle of the cutting plane with respect to the cone.In general, these curves are literally and collectively called Conic Sections, or just Conics, and is the first systematically studied math subject by ancient Greeks.You can see illustrations and their math details here: conic sections, ellipse, hyperbola, parabola. Now, this is why, when the guy throws the ball even towards the ground, the ball comes up higher.As long as he does not aim the ball precisely at the tip of the cone (his feet), then the ball will make a dip and come up!Also of …

HTML5 Video and Audio Tag

Perm url with updates: http://xahlee.org/js/html5_video_audio.htmlHTML5 Video and Audio TagXah Lee, 2010-11-01This page shows you how to embed video or audio using html5's “video” and “audio” tags.HTML5 introduced a “audio” and “video” tags. They allow you to embed a video or audio file without using Flash or other plugins. However, currently it is not yet widely supported by browsers, and the format spec is also not settled. Latest versions of Firefox, Chrome, Safari, Opera, usually support some of it. Internet Explorer 9 (in public beta) also support some.For detail about which browser supports the “video” tag, see: http://www.youtube.com/html5HTML5 AudioHere's a audio file embeded using HTML5 audio tag.Bach's Well-tempered Clavier, Book I, prelude and fugue number 1. Here's the html source code. <audiosrc="i/Bach_WTC1_1_Martha_Goldstein.ogg" controls></audio> AttributesAttributePossible ValuesCommentpreloadnone,metadata,auto◇controls◇Does not ta…

Player Piano, Music Box, and Designing Mechanical Music Devices

Perm url with updates: http://xahlee.org/piano/animusic.htmlPlayer Piano, Music Box, and Designing Mechanical Music DevicesXah Lee, 2008-11, 2010-11-01Player Piano, Music Box, and Designing Mechanical Music Devices is a series of computer generated animation of imagined mechanical devices that plays instrumental music.This is one of their best:Animusic, Pipe Dream Percussion instruments. FeasibilityThis is fantastic. Such a machine is certainly possible, but not as depicted exactly by the video. For example, when balls hit the strings or drum, even when precisely controlled, their ending path is not predictable because the hit target is still moving, such as cymbals. So, the balls will not all neatly fall into their catch hole.This can be mended by having the balls simply fall on the floor. Stray balls colliding with instruments can be avoided by considering all possible bounce paths. Also, the instrument itself, such as cymbals, can be designed so that it doesn't move in a uncont…

Emacs lookup: Dictionary, Google, PHP, Perl...

Perm url with updates: http://xahlee.org/emacs/emacs_lookup_ref.htmlDictionary, Google, PHP, Perl, ... Reference Lookup with EmacsXah Lee, 2008-11, 2010-11-01This page shows you how to use emacs as a dictionary application, that allows you to lookup the definitions of a word under cursor, or any general reference such as Wikipedia, Google, or lookup documentation of computer language's keywords.Looking Up Word Under CursorYou can setup your emacs so that, pressing a button will lookup the definition of the word under cursor.Place the following in your emacs init file: (defunlookup-word-definition () "Look up the current word's definition in a browser. If a region is active (a phrase), lookup that phrase." (interactive) (let (myword myurl) (setq myword (if (and transient-mark-mode mark-active) (buffer-substring-no-properties (region-beginning) (region-end)) (thing-at-point 'symbol))) (setq myword (replace-regexp-in-string…

Liszt and Bach; Music to Die For; 4 Songs for Life

Perm url with updates: http://xahlee.org/piano/fav_music.htmlMusic to Die For; 4 Songs for LifeXah Lee, 2010-10-31On a island, if there can be only 4 songs i can listen to for the rest of life, they would be:Bach. WTC, Book 1, Fugue 4. bach_wtc1_f04.midBach. WTC, Book 1, Fugue 8. bach_wtc1_f08.midLiszt. Transcendental Etudes, #12, VisionLiszt. Transcendental Etudes, #6, SnowstormThese are cold, austere, painful, and represent me, my personality, my character.There are many others that would be my top 10 or 20, but these 4 standout. And if i can only pick 2 albums, that'd be Bach's The Well-Tempered Clavier (WTC) book 1 (24 songs), and Liszt's Transcendental Etudes (12 songs). My top 10 songs likely will be exclusively piano/keyboard music. No symphonies, orchestras, no pop rap rock'n'roll, nothing except pure music.Here's music video of them.Bach, Fugue 4, WTC 1Bach, Prelude and Fugue number 4, WTC 1. Playe by Tatiana Nikolaeva. Fugue starts at 2:50. Bach, Prelu…

Functional Programing in Javascript

Perm url with updates: http://xahlee.org/js/javascript_lang_fun.htmlFunctional Programing in JavascriptXah Lee, 2009-01-28, 2010-10-30This page shows you some functional programing examples in javascript. If you are not familiar with js, see: Javascript Basics.Defining a FunctionHere's how to define a function:// defines a function functionf(n) {return n+1;}; Function without “return” returns “undefined”If you want your function to return a value, you must use the “return” statement. A function without return value, when called, will return the builtin special value “undefined”. Example:// defines a function functionf(n) {n;}; // call the function f alert(f(3)); // result is “undefined” Pure Function (aka Anonymous Function, “lambda”)You can define a function without naming it. Example:// defines a function without naming it function (n) {return n+1;}; Function's Value is “function”A function definition has a value. Its value is a special value of type “function”. alert( typ…

Javascript Execution Order

Perm url with updates: http://xahlee.org/js/js_executing_order.htmlJavascript Execution Order; HTML5 Asynchronous JavascriptXah Lee, 2010-10-30This page explains the execution order of javascript in a html page, and answers some common questions.When a javascript appears in a html page (either as a file or embeded code), the browser will load (and run) them in the order they appear on the html page.This means:If your javascript is slow, the browser will wait for it to run, before rendering the html that comes after the script.if your javascript manipulate the page's html elements that's below the script, it'll fail because those element are not loaded yet.So, the best solution is to always place your javascript at the bottom of the page, right before the 「</body>」 tag.If for some reason you must have your script at the top of a html page, and your script need to see the whole page before it runs, then, one trick to make sure your script runs only after the page has b…