Nested Ordered List Plugin Conflicts

I recently had problem with Enlighter plugin (for displaying code) being misaligned after upgrading my WordPress. The Enlighter text went outside the boxes in desktop browser mode and I contacted the author of the plugin for help in the forum, and learned it was actually Nested Order List (NOL) plugin that’s overriding the CSS rules that defines the margins.

Another user had similar problem NOL conflicting certain templates and the author of NOL suggested similar causes that the CSS style from the plugin messed with other styles:

.nested-list .entry-content ul,
.nested-list .hentry ul {
 margin:.8em 0 .8em 1.4em
}

The author suggested that the NOL plugin itself is not complicated to start with (it’s just adding a CSS), and the same functionality can achieved by adding this CSS to my WordPress theme template (pasting the following text under “Additional CSS”):

.entry-content ol,
.hentry ol {
 counter-reset:level1;
}
.entry-content ol ol,
.hentry ol ol {
 counter-reset:level2
}
.entry-content ol ol ol,
.hentry ol ol ol {
 counter-reset:level3
}
.entry-content ol>li,
.hentry ol>li {
 list-style-type:none;
 line-height:1.4;
 text-indent:-1.5em
}
.entry-content ol>li:before,
.hentry ol>li:before {
 content:counter(level1,decimal)'. ';
 counter-increment:level1;
 display:inline-block;
 text-align:right;
 text-transform:none;
 width:1em
}
.entry-content ol ol>li:before,
.hentry ol ol>li:before {
 content:counter(level2,lower-alpha)'. ';
 counter-increment:level2
}
.entry-content ol ol ol>li:before,
.hentry ol ol ol>li:before {
 content:counter(level3,lower-roman)'. ';
 counter-increment:level3
}

It worked like a charm!

Loading

Texas Gov Rick Perry’s response to Craig Ferguson’s honorary citizenship request Standard to become a proud Texan

I fondly remember Craig Ferguson’s skit on his Late Late Show reading a letter from Governor Rick Perry responding to his application to become an honorary citizen of Texas (part of his honorary citizen campaign before he became an US citizen). We hear bits and pieces on the show, but gladly Ed Bark has the whole letter down in his blog.

Since it’s very old material, and it seems such marvelous material is fading out from search engines, I made a copy here to preserve it. I hope somebody can find the letter and make a PDF out of it.

Here’s the letter:

Dear Craig,

There was a time when we granted the status of Texan to just about anyone, including criminals, drunks and Tennesseans. Today our standards are much higher.

We need to know first of all if you have a gun rack on your car — and we don’t mind gun racks on girlie cars, which I suspect you drive.

Secondly, we need to know if, upon approaching roadkill, you drive on by, or stop and throw it in the back so you can skin it and hang the pelt on your wall.

Third, we need to make sure you have never, and never would, deface the Alamo.

Lastly, we need to know if you are willing to stand guard on our border, and prevent the entry of illegals from Arkansas, Oklahoma, Louisiana and New Mexico.

Your citizenship as a Texan depends on your answers to these questions, and whether you can dip tobacco and eat chili at the same time.

Sincerely yours,

Rick Perry

Governor

Loading

System Engineers’ tip to HKCEE/HKALE Math and Physics

Shortly after I’ve graduated with Mathematics and Electrical (and Computer) Engineering degrees, I realized a few supposedly difficult topics in Hong Kong’s Mathematics and Physics (Electric Circuits) curriculum was taught in unnecessarily painful ways.

Here’s an article I’ve written to show that it is less work to teach secondary (high) school students a few easy-to-learn university math topics first than teaching them dumb and clumsy derivations/approaches to avoid the pre-requisitesHKDSE EE Tips

Here are the outline of the article

  • Complex numbers with Euler Formula
  • Trigonometric identities can be derived effortlessly using complex number than tricky geometric proofs
  • Inverting matrices using Gaussian elimination instead of messing with cofactors and determinants
  • Proper concepts of circuit analysis and shortcuts
  • Solving AC circuits in a breeze with complex numbers instead of remembering stupid rules like ELI and ICE rules and messy trigonometric identities.

Loading

變幻才是永恆 = 世界是線性?

羅文唱的「家變」中的歌詞提及到「不必怨世時變,變幻才是永恆」,表達了一個很大膽的理論: 「世界是線性的」,這是學術界不可思議的一大奇聞。如果世事真的是線性,那麼股市只可以永遠不停地上升,下降,或停滯。從微積分學中,我們可以看到為何如此簡單的一句歌詞醞含著那麼大的玄機:

我們先以 f(x) 代表世界的事情, x 陣列代表可變的事物,K 是永恆不變的固定數,那麼世事變幻便是 f'(x)。「變幻才是永恆」亦即譯作 f'(x) = K,把恆等式的兩邊積分,我們便得到 f(x) = Kx + C,不用多說,C 當然是隨意常數。從此可見世界是線性方程式!

– Sep 17, 2005

Loading

喼神 Paul Ho (God of Briefcase) PAUL HO's unHOLY QUOTATIONs

PAUL HO’s unHOLY QUOTATIONs (All in Chinglish/English because SPC is an EMI school)

  • Open the door and see the mountain (翻譯: 開門見山)
  • There is a Chinese saying … (翻譯: 俗語有話…)
  • Don’t put your hands under your desk. People might think you are playing some toys.
  • Why you should not put your hands in your pocket?
    People might think that you are having a lucky draw.
  • Why you should not put your hands under your desk?
    People might think that you are playing some toys.
  • Detention Club: Lifetime membership
  • Fishing Club (上堂釣魚/こっくり)
  • Mr. Tso, a poet who can make a poem in seven steps (翻譯: 七步成詩)
  • ICAC might stand for “I Can Accept Cash” (When he taught EPA)
  • The term “tertiary industry” (三級工業) might have a better Chinese translation…
  • ICAC might stand for “Ice-Cream And Coca-cola”
  • ICAC might meant “I Can Accept Cheques”
    (I overused his “I can accept cash” in his Econ class, so he changed it to checks)
  • Good Family Education (有家教)
  • If someone is not happy with you, they’ll say hello to your family(問候你全家).
  • If you use credit card in King Fu, they might say hello to your family(問候你全家).
  • People don’t cry until they see the coffin (翻譯: 唔見棺材, 唔流眼淚)
  • Lots of St Pauls boys go to HKU……………………….for lunch
  • Kill the monkey to warn the chicken (殺雞警猴)

編者的話: 喼神雖然係懶,但佢嗰種老狐狸智慧喺一般學校裡面唔會學到。教得唔好唔緊要(喺聖Paul度讀都予咗至少一半係咁,自己執生係一門必修課),最緊要係佢唔煩唔管小事。喼神口賤(尤其係sarcasm)嘅功力超深,我喺佢身上學到唔少。如果你能豁開要佢教econ嘅期望,俾佢教都幾頂癮。

我認為係聖Paul教書嘅先生,教得好唔好唔係最大嘅問題; 最重要嘅係識唔識得同學生相處,同埋醒唔醒目。聖Paul嘅學生一般都唔會因為你係學校教書嘅就尊重你,都係要靠自己嘅真才實料(人際技巧係其中之一)贏返嚟。好似龍捲風呢啲得把口講,同埋超叔呢啲無自知之明嘅低B動物,要贏得聖保羅學生嘅尊重起碼要等多十世。我承認間中有啲學生會去認同啲無料到但好努力嘅先生,但我唔會咁做。

總而言之,係聖Paul教書都咪話容易,好多時都要睇天份。好似Ms Wai呢啲遲到早退嘅,偏偏係有料之人。佢火爆嘅脾氣反而教曉我有時對人好口啲好多時會幫你逢凶化吉。仲有我F.1俾飛機張教Maths大考38分,F.2俾Ms Wai教Maths大考全級第二,你話呢。


Loading