M♪o 之學習筆記本《子》開關︰【紅火禮】謙和有禮

派生碼訊

子 鼠

天澤履 ䷉ ,素履之往,獨行愿也。幽人貞吉,中不自亂也。愬愬終吉,志行也。視履考祥,其旋元吉。

紅火禮︰《説文解字》:禮,履也。所以事神致福也。从示从豊,豊亦聲。 古禮 ,古文禮。程式之先,當思其 禮 禮,當作說明,以利分享,以及來日之自讀。

 

派 ︰《了凡四訓》有言︰

何謂真假?昔有儒生數輩,謁中峰和尚,

問曰︰「佛氏論善惡報應,如影隨 形。今某人善,而子孫不興;某人惡,而家門隆盛︰佛說無稽矣。」

中峰云︰「凡情未滌,正眼未開,認善為惡,指惡為善,往往有之 。不憾己之是非顛倒,而反怨 天之報應有差乎?」

眾曰︰「善惡何致相反?」

中峰令試言。

一人謂「詈人毆人是惡;敬人禮人是善。」

中峰云︰「未必然也。」

一人謂「貪財妄取是惡,廉潔有守是善。」

中峰云︰「未必然也。」

眾人歷言其狀,中峰皆謂不然。因請問。

中峰告之曰︰「有益於人,是善;有益於己,是惡。有益於人,則毆人,詈人皆善也;有益於己,則敬人,禮人皆惡也。 是故人之行善,利人者公,公則為真;利己者私,私則為假。又根心者真,襲跡者假;又無為而為者真,有為而為者假;皆當自考。」

何謂端曲?今人見謹愿之士,,類稱為善而取之;聖人則寧取狂狷。至於謹愿之士,雖一鄉皆好,而必以為德之賊;是世人之善惡,分明與聖人相反。推此一端,種種取舍,無有不謬;天地鬼神之福善禍淫,皆與聖人同是非,而不與世俗同取舍。凡欲積善,決不可徇耳目,惟從心源隱微處,默默洗滌,純是濟世之心,則為端;苟有一毫媚世之心,即為曲;純 是愛人之心,則為端;有一毫憤世之心,即為曲;純是敬人之心,則為端;有一毫玩世之心,即為曲;皆當細辨。

……

 

生 昔有『唐鳳』者,能文善語『珍珠串』☿☺︰

=head1 NAME
Lingua::Sinica::PerlYuYan – 中書珨 – Perl in Classical Chinese in Perl
=head1 VERSION
our VERSION = 1257700140.47574; # 2009年11月 9日 周一 01時09分11秒 CST</span>  <span style="color: #808000;">=head1 SYNOPSIS</span> <span style="color: #808000;"> # The Sieve of Eratosthenes - 埃拉托斯芬篩法</span> <span style="color: #808000;"> use Lingua::Sinica::PerlYuYan;</span>  <span style="color: #808000;">用籌兮用嚴。井涸兮無礙</span> <span style="color: #808000;"> 。印曰最高矣 又道數然哉。</span> <span style="color: #808000;"> 。截起吾純風 賦小入大合。</span> <span style="color: #808000;"> 。習予吾陣地 並二至純風。</span> <span style="color: #808000;"> 。當起段賦取 加陣地合始。</span> <span style="color: #808000;"> 。陣地賦篩始 繫繫此雜段。</span> <span style="color: #808000;"> 。終陣地兮印 正道次標哉。</span> <span style="color: #808000;"> 。輸空接段點 列終註泰來。</span>  <span style="color: #808000;">=head1 DESCRIPTION</span> <span style="color: #808000;"> This module makes it possible to write Perl programs in Classical Chinese poetry in Perl.</span>  <span style="color: #808000;">說此經者,能以珨文言文珨。</span>  <span style="color: #808000;">(If one I<has> to ask "Why?", please refer to L<Lingua::Romana::Perligata> for</span> <span style="color: #808000;"> related information.)</span>  。昔事已隨黃鶴去,此時空餘黃鶴樓。『珨』本無言語?!  <span style="color: #808080;">《廣韻》侯夾切《集韻》轄夾切,音洽。《玉篇》玉蛤,一云蜃器 。《集韻》蜃飾器。</span> <span style="color: #808080;"> 又《五音集韻》烏甲切,音鴨。開閉門也。</span>  此『經』將訴誰人知??又有『<a href="http://zh.wikipedia.org/zh-tw/%E5%91%A8%E8%9F%92">周蟒</a>』者,自稱『<a href="http://blog.gasolin.idv.tw/2007/09/blog-post_22.html">蓋索林</a>』 Gasolin ,曾把『派生』中文化,獨立<a href="http://code.google.com/p/zhpy/wiki/CodingStyle">風格</a>與<a href="http://blog.gasolin.idv.tw/2007/09/blog-post_22.html">堅持</a>,條條大道通羅馬。不知何因<a href="http://code.google.com/p/zhpy/">棄城池</a>,古道西風存瘦馬 ☿☹!剪不斷,理還亂,符碼文化聲聲慢,ㄚ˙禮多人不怪,斷腸人在天之涯!!     ☆ 編者言<a href="http://www.freesandal.org/wp-content/uploads/%E8%AA%AA%E6%98%8E.gif"><img class="alignnone size-full wp-image-32950" src="http://www.freesandal.org/wp-content/uploads/%E8%AA%AA%E6%98%8E.gif" alt="說明" width="120" height="19" /></a>  讀者需知『轉譯』之不易,此處 M♪o 用其家鄉之『<a href="http://www.freesandal.org/?m=20150319">城南舊事</a>』,將如何比擬恰當,或該寫『<a href="http://www.freesandal.org/?p=7613">圖靈</a>』,只恐不符旨意,或應說『<a href="http://zh.wikipedia.org/zh-tw/%E5%90%B3%E9%B3%B3">吳鳳</a>』 ,大概沒這事理,無法之法,採用莊子『隨寫隨掃』之筆法,以為『辜妄言之』哉!!     △   <strong><a href="https://www.python.org/dev/peps/pep-0257/">PEP 0257 -- Docstring Conventions</a></strong> <div id="abstract" class="section"> <h1><a class="toc-backref" href="https://www.python.org/dev/peps/pep-0257/#id12"> Abstract </a></h1> This PEP documents the semantics and conventions associated with Python docstrings.  </div> <div id="rationale" class="section"> <h1><a class="toc-backref" href="https://www.python.org/dev/peps/pep-0257/#id13"> Rationale </a></h1> The aim of this PEP is to standardize the high-level structure of docstrings: what they should contain, and how to say it (without touching on any markup syntax within docstrings). The PEP contains conventions, not laws or syntax. <blockquote>"A universal convention supplies all of maintainability, clarity, consistency, and a foundation for good programming habits too. What it doesn't do is insist that you follow it against your will. That's Python!" —Tim Peters on comp.lang.python, 2001-06-16 </blockquote> If you violate these conventions, the worst you'll get is some dirty looks. But some software (such as the <a class="reference external" href="http://docutils.sourceforge.net/"> Docutils </a> <a id="id7" class="footnote-reference" href="https://www.python.org/dev/peps/pep-0257/#id6"> [3] </a> docstring processing system <a id="id1" class="footnote-reference" href="https://www.python.org/dev/peps/pep-0257/#id4"> [1] </a> <a id="id2" class="footnote-reference" href="https://www.python.org/dev/peps/pep-0257/#id5"> [2] </a> ) will be aware of the conventions, so following them will get you the best results.  </div> …  △ 文件 ``〒'' 程式 ☿ ??  文字之先,巨鵝踏天;程式之前,哪來文件 ☿ !!     <a href="http://www.freesandal.org/wp-content/uploads/%E7%A2%BC1.png"><img class="alignnone size-full wp-image-32798" src="http://www.freesandal.org/wp-content/uploads/%E7%A2%BC1.png" alt="碼" width="48" height="48" /></a> <span style="color: #c0c0c0;"><strong>碼</strong></span>︰有 <a href="http://www.freesandal.org/wp-content/uploads/%E7%BF%92.gif"><img class="alignnone size-full wp-image-32959" src="http://www.freesandal.org/wp-content/uploads/%E7%BF%92.gif" alt="習" width="24" height="44" /></a> <strong>習</strong>。試以互動程式申論『樹莓派』板子編號制,第二十三根『入浮針』【※ input float pin 】的讀取情狀?  ☿ <a href="http://www.freesandal.org/wp-content/uploads/%E8%A1%8C.gif"><img class="alignnone size-full wp-image-32960" src="http://www.freesandal.org/wp-content/uploads/%E8%A1%8C.gif" alt="行" width="36" height="41" /></a> <strong>答</strong>︰一《圖》  <a href="http://www.freesandal.org/wp-content/uploads/debouce-graph.png"><img class="alignnone size-medium wp-image-32955" src="http://www.freesandal.org/wp-content/uploads/debouce-graph-300x190.png" alt="debouce-graph" width="300" height="190" /></a>  可抵千百字,入浮特性看分明,查考  《 <strong><a href="http://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs/">raspberry-gpio-python</a></strong> 》文件,說的詳細︰ <h1 id="inputs">Inputs</h1> There are several ways of getting GPIO input into your program. The first and simplest way is to check the input value at a point in time. This is known as 'polling' and can potentially miss an input if your program reads the value at the wrong time. Polling is performed in loops and can potentially be processor intensive. The other way of responding to a GPIO input is using 'interrupts' (edge detection). An edge is the name of a transition from HIGH to LOW (falling edge) or LOW to HIGH (rising edge). <h2 id="pull-up-pull-down-resistors">Pull up / Pull down resistors</h2> If you do not have the input pin connected to anything, it will 'float'. In other words, the value that is read in is undefined because it is not connected to anything until you press a button or switch. It will probably change value a lot as a result of receiving mains interference.  To get round this, we use a pull up or a pull down resistor. In this way, the default value of the input can be set. It is possible to have pull up/down resistors in hardware and using software. In hardware, a 10K resistor between the input channel and 3.3V (pull-up) or 0V (pull-down) is commonly used. The RPi.GPIO module allows you to configure the Broadcom SOC to do this in software:  <span style="color: #808080;">GPIO.setup(channel, GPIO.IN, pull_up_down=GPIO.PUD_UP)</span> <span style="color: #808080;"> # or</span> <span style="color: #808080;"> GPIO.setup(channel, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)</span>  (where channel is the channel number based on the numbering system you have specified - BOARD or BCM).     實測驗證現情狀︰ <pre class="lang:sh decode:true"># 超級者 sudoer 方可以出入無礙 pi@raspberrypi ~ sudo -s
root@raspberrypi:/home/pi#

# 採用『派生』三
root@raspberrypi:/home/pi# python3
Python 3.2.3 (default, Mar 1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

# 載入 GPIO 程式庫
>>> import RPi.GPIO as GPIO

# 載入 time 程式庫
>>> import time

# 選擇板子編號制
>>> GPIO.setmode(GPIO.BOARD)

# 指定入浮針
>>> 入浮針 = 23
>>> GPIO.setup(入浮針, GPIO.IN)

# 隨機測試讀取值
>>> GPIO.input(入浮針)
0
>>> GPIO.input(入浮針)
0
>>> GPIO.input(入浮針)
0
>>> GPIO.input(入浮針)
0

# 驗證入浮一般讀取為『低』 0 態
>>> 計次 = 1
>>> while GPIO.input(入浮針) == GPIO.LOW and 計次 < 10000 :
… time.sleep(0.01)
… 計次 += 1

# 確認萬中無一次
>>> print(計次)
10000

# 查核『上拉』 pull_up 『下拉』 pull_down 皆無誤
>>> GPIO.setup(入浮針, GPIO.IN,pull_up_down = GPIO.PUD_UP)
>>> GPIO.input(入浮針)
1
>>> GPIO.setup(入浮針, GPIO.IN,pull_up_down = GPIO.PUD_DOWN)
>>> GPIO.input(入浮針)
0
>>>
>>>

 

訊 非詩;扉思

謙山在地中
和樂湧心頭
有陽當空照
禮運似水流