10/11/2008

Python: getInfoFromXmlString

0 comments



from xlm.dom import minidom

def getInfoFromXmlString(xmltxt):
'''
getInfoFromXmlString:

>>> xmltxt ='<date1 type="datetime" start="now">2005-08-11T13:43</date1>'
>>> getInfoFromXmlString(xmltxt)
(u'date1', u'2005-08-11T13:43', {u'start': u'now', u'type': u'datetime'})

>>> getInfoFromXmlString('<zoomified/>')
(u'zoomified', '', {})

python 2.5
10/11/08

'''


doms = minidom.parseString(xmltxt)

# >>> txt ='<date type="datetime" start="now">2005-08-11T13:43</date>'
# >>> doms = minidom.parseString(txt)
# >>> doms
# <xml.dom.minidom.Document instance at 0x02965C60>
# >>> doms.childNodes
# [<DOM Element: date at 0x2965d50>]

elem = doms.childNodes[0]
# <DOM Element: date at 0x2965d50> # <---- dom element <date>


# >>> elem.childNodes
# [<DOM Text node "2005-08-11...">]
# dText=elem.childNodes[0]
# <DOM Text node "2005-08-11...">
# >>> dText.nodeValue
# u'2005-08-11T13:43' # <---- contained text of the 1st Text Node
elemvalue = ''.join(x.nodeValue for x in elem.childNodes)

attrs = elem.attributes
# <xml.dom.minidom.NamedNodeMap object at 0x029820F8>
attrs = attrs.items()
# [(u'start', u'now'), (u'type', u'datetime')]

elemattrs = {}
elemattrs.update(attrs)
# {u'start': u'now', u'type': u'datetime'}

return elem.tagName, elemvalue, elemattrs

''' getInfoFromXmlString test:

xmltxt ='<date1 type="datetime" start="now">2005-08-11T13:43</date1>'
print getInfoFromXmlString(xmltxt)
# (u'date1', u'2005-08-11T13:43', {u'start': u'now', u'type': u'datetime'})
print getInfoFromXmlString('<zoomified/>')
# (u'zoomified', '', {})

'''

11/24/2007

Load A New File From Template In Notepad++

6 comments

What are needed:

  1. htmlTemplate.htm: Your html template
  2. nppNewHtml.bat: a .bat file looking like this:
copy  d:\html\htmlTemplate.htm  d:\html\new.htm
"C:\Program Files\Notepad++\notepad++.exe"  d:\html\new.htm

Save nppNewHtml.bat in, for example, d:\html.

In Notepad++, go to menu [Run], or hit [F5].

In the input box shown under the title [Type your program to run here], enter:

d:\html\nppNewHtml.bat


Hit [Save] to save it to a run menu item (give it a name like "new html").

From now on, you can go to the [Run] menu and find an item called "new html" that allows you to open a new html file based on your template.

10/17/2007

關於「中國製產品條碼」的錯誤資訊

3 comments

今天收到朋友轉寄來的有關「中國製造的產品條碼」的信件,指出如果產品條碼前三碼是「690」就代表是「中國製造」的,如果不是「690」則表示「非中國製造」,可以放心使用(如下圖)。

錯誤的產品條碼資訊


事實上這是一個錯誤的資訊

首先,中國產品的條碼,不止「690」開頭。除了「690」外,691~695 都屬於中國。請參考產品國條碼表列

更嚴重的錯誤是,產品條碼前三碼並不代表「產品生產國」這個網站指出:

系統碼,也就是前兩碼或前三碼,通常代表該產品的製造商在哪一國註冊,而不必然是該產品真正的生產國。
System code, the first two or three digits, usually identifying the country in which the manufacturer is registered (not necessarily where the product is actually made).

以幾個產品為例:

例一:同一家工廠的不同產品可能有不同的國碼:
同為紐西蘭一家工廠的兩種產品,左邊國碼(941)為紐西蘭,右邊國碼(400)為德國(因為是德國的廠商)。值得注意的是:右邊產品的國碼為德國,但白紙黑字寫得很清楚是在紐西蘭製造。

例二:中國製造,國碼為荷蘭:
中國製造,國碼為荷蘭

例三:中國製造,國碼為美國:
中國製造,國碼為美國

因此,光靠產品條碼上的國碼,並不能判斷是否為中國製造。如果一家廠商是在台灣註冊,但跑到中國去生產,那其產品的國碼就很可能是「471」,也就是台灣。

像此文中提到的這項錯誤資訊已經傳遍網路,將使大眾反而誤購了中國製產品還堅信是台灣製造的,誤導社會大眾甚深,希望以後讀者不要再散播這樣的錯誤訊息。

8/10/2007

How KNN Twists A Report

6 comments

Michael over the "The view from Taiwan" has an article "Media Management (in)Eptitude" in which he cited an article on Taipei Times KMT starts English, Japanese `news service' regarding the new Kuomintang News Network (KNN) launched by KMT. According to Stephen Chen (陳錫蕃), a KMT think tank member and former (KMT government) representative to the US, one of the main functions of KNN is:

help to counter the biased reports of pro-green English [language] newspapers

and with KNN they will :

provide recent poll results, news analysis from the KMT think tank and selected party news every day

and
take a more aggressive approach to promote itself internationally through the sites

It's interesting to see such an action from KMT. For a long time some Taiwan-based English bloggers (see Michael's blog and the blogs he links to) have been commenting heavily about how major foreign media like CNN, BBC, etc play the role of Chinese propaganda trumpet by reporting biased Taiwan news in favor of pro-china pan-blue (like KMT). Now KMT is saying that they are the victim?

Knowing that twisting the fact is not something new in KMT culture, I am curious to see how "their" recent poll results would say. It didn't take me too long before I spot a twisting fact on their site. On the second poll I checked, regarding an identity poll conducted by Eva TV, on July 19, 2007, KNN puts up a link to a Word file containing the poll results.

Obviously that's what KNN did on all the poll results showing on their site. But on that particular identity poll mentioned above, they added an extra remark:

Preposterous remark made by KNN. Click to see the full page. (original link)
Can anyone tell me what exactly they are saying? I read it back and forth couple of times but still unable to follow its logic. Not only does it contradict itself in such a short paragraph (in the first half it says no “Both Taiwanese and Chinese” option was given but in the second half it says some respondents were able to choose “Both Taiwanese and Chinese”), but also the logic is completely preposterous -- how come an omission of the "Both" option naturally shows a high percentage of “Taiwanese Only” ? If that is "naturally shown," doesn't it already mean that in deed more people in Taiwan identify themselves as Taiwanese?

Even worse, what it says about the wording is not the fact at all ! Simply bringing out the word file of that identity poll, you will be able to find this table:

Poll result. KMT says the poll didn't offer "Both Taiwanese and Chinese" as an option. Do they think all readers are blind ? (click for larger image, or click here to download the original word file)
Not only does KNN lie about the "Both" option, but also, they attached "only" to "Taiwanese" and "Chinese" options shown in the original poll, such that the original 3 options "Taiwanese, Chinese, Both" was twisted into a 2-option "Taiwanese Only, Chinese Only" in their remark.

You must be amazed by such an desperate, low-wit trick KNN pulled up. The fact is there, right under their nose, yet they try to put up a twisted facade to cheat on people who don't have time for details. Whoever is willing to spend just two more minutes to dig into the Word file will be able to tear their lies apart right on their own page.

Talking about the "wording," who is the real genius here ? Is this what they called "more aggressive approach" ? I feel sympathetic for these poor souls ...

8/09/2007

Has Taiwan Never Been A Country In History?

0 comments

David Lu of the Taipei Economic and Cultural Office (TECRO) in San Francisco, a branch of Taiwan's officially unofficial representative office in the US, post an article in San Jose Mercury News regarding the issue of Taiwan entering UN (United Nations' exclusion of Taiwan is unjust). Some readers commented and claimed that "Taiwan has never been a country in the history".

In rebuttal, I post an article:

1) raventhorn: "Fact is, Taiwan NEVER represented itself in any treaty negotiations or signed any treaties. It was always considered as a part of some other country's territorial administration."

2) Alvin Ding: '"Taiwan" was never be a country in history'

----

These are incorrect statements. In her history, Taiwan established herself as an independent country at least twice, and exercised her sovereignty right through treaties numerous times.

In 1664, Cheng Jing (鄭經), son of Cheng cheng-gong (鄭成功), founded Tong-Ning Kingdom (東寧王國) in Taiwan. The kingdom has her own government, own army, own social system, and own business interactions with surrounding countries. It also has other own diplomatic relationships with other powers, in which Cheng was called "The King of Tyawan." (Taiwan was sometimes spelled as Tyawan at that time)

In 1895, Republic of Taiwan was established in Taiwan by Liu Jing-Song (劉景崧). It is the first republic country in Asia.

Aside from the above 2 official establishments, Taiwanese had exercised their sovereignty right independently as a country. For example, by signing treaties with other countries, as what Michael mentioned in his earlier post:

"the Qing denied controlling Taiwan on several occasions, and foreign powers negotiated directly with local aborigine leaders."


The countries who signed treaties with Taiwanese include USA, after USA marine was defeated (and one of USA Civil War Generals killed) by Taiwan aborigine (in around 1780, I believe).

Following raventhorn's own words: 'Treaties largely make up the foundation of "de jure" sovereignty,' then Taiwan has been an independent sovereignty many times in her history.

These are historical facts that shouldn't be withheld from the readers. I have to agree with Michael: "Raventhorn's 'rebuttal' sounds credible only because he withholds key facts from the reader."


Btw, David Lu's article is full of errors, not only in facts but also in English grammar.

7/23/2007

Javascript string replacing function (2)

0 comments

Previously I mentioned a string replacing function that, instead of building a string this way:

tag= '<' + tagname + ' style="background-color:'
+ bgcolor + ';color:' + color + '">' + text + '</' + tagname +'>'

allows for doing it this way:

tag0= '<___ style="background-color:___;color:___">___</___>'
tag1 = tag0._(tagname, bgcolor, color, text, tagname)

or this way :

tag00= '<[.tagname.] style="background-color:[.bgcolor.];'+
'color:[.color.]">[.txt.]</[.tagname.]>'

data = {tagname:'span', bgcolor:'#EEFFBB',color:'red',txt:'tag2'}
tag2 = tag00._(data)


After playing with the regular expression for a while, I come up with a short version :

String.prototype._=function(){
var i=-1, a= arguments
var t= typeof(a[0])=='string'
var rx = t?(/___/g):(/\[\.[A-Za-z0-9_]*\.\]/g)
var f = t?function(x){i++;return a[i]}
:function(x){return a[0][x.slice(2, -2)]||''}
return this.replace(rx,f)
}


To me it's amazing to see how such a task can be accomplished with such a neat code.

7/21/2007

Problems in Javascript Subclassing

0 comments

In javascript, the subclassing is done this way:

[1] function Person(name, sex){    # Define the superclass
[2] this.name = name
[3] this.sex = sex
[4] this.prn = function(){ return this.name + ', '+ this.sex }
[5] }

[6] function Man(name){ this.sex = 'M' } # Define the subclass
[7] Man.prototype = new Person() # Connect Person and Man

And the instantiation:
[8]  p = new Person('Jane','F')
[9] m = new Man('John')

Checking the function prn (defined in [4]):
p.prn() ==> Jane, F
m.prn() ==> undefined, M


As shown, the name John given to Man when instantiating m ([9]) is NOT transferred to m. It is obvious 'cos we didn't instruct it to do so when defining Man in [6].

Problem.1: Subclass Arguments Are Not Automatically Transferred To Subclass Instances



So, unless explicitly instructed, the arguments of a subclass will not be assigned to the instance of that subclass. That means, [6] needs to be re-defined as:
function Man(name){ 
this.sex = 'M'
this.name= name # <== new line
}

Note that the above highlighted line already exists in the superclass (line [2]). Why does it have to be re-done again in the subclass ? Didn't we already instruct Person to be the super class ?

Problem.2: An Instance of Subclass Is an Instance of the Superclass too ?


Lets investigate the instanceof operator in javascript:
[10] (p instanceof Person)  ==> true
[11] (m instanceof Man) ==> true
[12] (m instanceof Person) ==> true


Line [10] and [11] are what we expect. But [12]? How come m is an instance of Person ? This doesn't sound right.

Problem.3: The Constructor of A Subclass' Instance Is The Superclass But Not the Subclass ?


Check the constructor of the instances of subclass and of superclass:
[13] getConstructor(p) ==> Person
[14] getConstructor(m) ==> Person

Shouldn't the constructor of m be Man?

Solution Proposal



Lets try a new way of defining a subclass. Instead of
function Man(name){ 
this.sex = 'M'
this.name= name # <== new line
}

We try this:
function Woman(name){ update(this, new Person(name, 'F'))}
w= new Woman("Jan")

See the following table for comparison:

ClassesInstanceinstanceof
Person
constructor
function Person(name, sex){
this.name = name
this.sex = sex
this.prn = function(){
return this.name +','+this.sex}
}
ptruePerson
function Man(name){
this.sex = 'M'
this.name= name }
Man.prototype = new Person
mtruePerson
function Woman(name){
update(this, new Person(name,'F'))
}
wfalseWoman

7/20/2007

中國的食品污染

0 comments

今天讀到大紀元的一篇報導:毒牙膏再演鬧劇 質檢總局大變臉
http://epochtimes.com/b5/7/7/20/n1778129.htm

該文提到因中國外銷的含毒牙膏所引發的一連串新聞。文中提到的「二甘醇」是一種抗凝劑,若水中含有二甘醇,則在低溫時會防止水分子結成冰。二甘醇的含量越高,越不易結冰,可能在零下二、三十度時都還保持液體狀態不會變成冰塊。中國製的牙膏,就是利用二甘醇的這種特性,使其即使保存很久也不會硬化。這是對人體有害的有毒物質,因此像牙膏這種不小心會吃進人體的東西不應該含有二甘醇。

其他重點:

  1. 中國生產的幾種牙膏含有0.21%至7.5%的二甘醇。
  2. 中國衛生部不久公佈了該部「專家」的評估結論:「長期使用二甘醇含量低於15.6%的牙膏不會對人體健康產生不良影響」,但報告未顯示專家姓名,也沒說明該試驗的具體方法。
  3. 7月16日,中國質檢總局局長公開批評境外媒體對中國出口產品質量問題的報導是"顛倒黑白",他表示,中國食品合格率要高於美國。
  4. 中國工廠即使自己想要合法生產也很困難,因為他們購買的材料本身就是非法的有毒物(可能買不到無毒的)。譬如說,生產用的水,前幾年由於污染的加劇,中國政府不是採取措施防治並減少污染,反而降低水質標準,把以前的污染水當成合格水賣給企業
  5. 今年七月,據中國質檢總局對食品、化肥和農用機械等眾多消費品質量抽查,結果發現19.1%的產品達不到標準。其中最嚴重的是食品問題,特別是罐裝食品、乾果和果汁飲料。
  6. 中國常用油鹽醬醋米麵的合格率平均低於40%,特別是低價食品,其衛生質量根本無法保障。
  7. 中國進口到美國的食品只有 0.9% 有被抽查。即使在如此低的抽樣率下,中國裝船的食品每個月有 200 次在港口被拒收,排名世界第一。
  8. 中國食品藥品質量監測管理局2005年批准了1113個新藥,這數目等於美國近十年來新藥的「受理」總量(看清楚,不是批准量)。

About Subclassing in Javascript

0 comments

Let the superclass be:

function Person(sex){alert('I am Person')}

and subclasses:

function Man(){this.sex='M'}
function Woman(){this.sex='F'}

The following two subclassing approaches don't seem to make any difference:

Man.prototype = new Person
Woman.prototype = new Person()
m = new Man()
w = new Woman()

In both cases:
  • The function Person will be executed
  • The constructor of both m and w are Person


4/04/2007

IE's TextRange.compareEndPoints()

0 comments

TextRange object

The other day I was coding a web page that needs to make use of some javascript functions of textarea element. I did a little dig-out and ran into this compareEndPoints function. It is a function attached to a TextRange object. The IE-specific TextRange object serves as a mediator for the text input element (<input> with type="text", <textarea>...) to manupilate text-related operations (search, replace, copy, paste, insert ...).

Now assuming we have a <textarea> element object called oTextArea, a TextRange object can be created in one of the following ways:
  1. var oTR1 = oTextArea.createTextRange()
  2. var oTR2 = document.selection.createRange()
These code should appear inside an eventhandler, for example:

  oTextArea.onselect = function(){
...
var oTR1= this.createTextRange()
var oTR2= document.selection.createRange()
...
}

Both oTR1 and oTR2 are a TextRange object that has the following properties:

PropertiesoTR1oTR2
boundingHeight1616
boundingLeft15141
boundingTop124124
boundingWidth25256
offsetLeft15141
offsetTop124124
textThis is the test
<textarea> element
textarea
htmlTextThis is the test
&lt;textarea&gt; element.
textarea

Note that:
  1. What createTextRange returns (=oTR1) covers the entire value range of <textarea> while createRange covers only the range of text that is selected;
  2. All the numerical property values in TextRange object are in pixel. No information of index (the start and end point for the selected text range) is available;

compareEndPoints (type, textRange)

I won't go through all the methods of the TextRange object but this one compareEndPoints(type, textRange). This function checks the relationship between two TextRange objects by comparing the starting and ending indices of textRange.text :

  textRange1.compareEndPoints("StartToStart", textRange2)

The argument type can be one of the fillowing 4 : "StartToStart", "StartToEnd", "EndToStart" and "EndToEnd". When it is "StartToStart", it compares the starting index of textRange1.text with the that of textRange2.text. The return is either -1, 0 or 1.

Now, the reason that I talk about this compareEndPoints specifically. Since it is used upon two TextRange objects, and as we saw earlier that both createRange() and createTextRange() return a TextRange object, instinctly it would work like this:

   var oTR1= oTextArea.createTextRange()
var oTR2= document.selection.createRange()
var x = oTR1.compareEndPoints("StartToStart", oTR2)

However, it won't work. IE rejects this usage by showing "illegal argument" error. It took me a while of searching and code digging to figure out a way to do this:

   var oTR1 = document.body.createTextRange(); // Create TextRange on entire body 
oTR1.moveToElementText(oTextArea) // Use moreToElementText to move
// the TextRange to the textarea

var oTR2= document.selection.createRange();
var x = oTR1.compareEndPoints("StartToStart", oTR2)

Only when the createTextRange( ) is used in this way can the resulting TextRange object be used together in compareEndPoints( ) with that generated by createRange( ).

3/31/2007

My javascript addEvent

1 comments

In the end of 2005 several web programming gurus, Peter-Paul Koch (ppk), Dean Edward and Scott Andrew LePera host a "javascript recoding contest" in which they asked participants to submit their code for adding and removing events in javascript. A template page was designed to test the code. The winner was John Resig, whose original code is here. The final code was slightly modified version:

function addEvent( obj, type, fn )
{
if (obj.addEventListener)
obj.addEventListener( type, fn, false );
else if (obj.attachEvent)
{
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent( "on"+type, obj[type+fn] );
}
}
function removeEvent( obj, type, fn )
{
if (obj.removeEventListener)
obj.removeEventListener( type, fn, false );
else if (obj.detachEvent)
{
obj.detachEvent( "on"+type, obj[type+fn] );
obj[type+fn] = null;
obj["e"+type+fn] = null;
}
}

I personally don't feel comfortable with these code. First of all, as one of the comments mentioned (#2 Posted by Tino Zijdel on 18 October 2005) that in cases of multiple-eventhandlers in IE, the eventhandler added last will be executed first:

... since this is for IE a wrapper around attachEvent, the execution order of the events is different ('random' according to Microsofts documentation, but LIFO in practice against FIFO using the W3C event model)

A simple test reveals this problem:

function init(){
var btn=document.createElement('input')
btn.value = 'Click me'
btn.type = 'button'
document.body.appendChild( btn )
addEvent( btn, "click", function(){alert("#1")} )
addEvent( btn, "click", function(){alert("#2")} )
}

Run the init() function as the onload eventhandler (<body onload="init()">) and load with browser. Firefox alerts "#1" then "#2". But IE alerts "#2" first then "#1", which is not what it should be.

Another part making me uncomfortable is that it uses the entire function content as the key name of a hash:

   obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }

Although none obvioiusly problem is mentioned or discussed, it could result in extremely long and complex key name, which, IMHO, is not what a hash is supposed to be.

I therefore came up with my own version:

function addEvent( obj, type, fn ) 
{
obj.eventHooks = obj.eventHooks || {} // set .eventHooks for obj if not exists
var evs = obj.eventHooks[type] || [] // set .eventHooks[type] if not exists
obj.eventHooks[type] = evs.concat( fn.concat? fn:[fn]) // this allows for multiple fns added
obj['on'+type] = function (e) // like addEvent(obj,"click",[f1,f2])
{
for (var i=0;i<this.eventHooks[type].length;i++)
{
this.tmp = this.eventHooks[type][i] // attach to the obj such that the this
this.tmp(e) // inside the function points to the obj correctly
this.tmp = undefined
}
}
obj = null
}
function removeEvent( obj, type, fn )
{
if (obj.eventHooks && obj.eventHooks[type])
{
var evs = obj.eventHooks[type]
for (var i=0; i<evs.length;i++)
{
if (evs[i]==fn)
{
obj.eventHooks[type] = evs.slice(0,i).concat(evs.slice(i+1))
break
}
}
}
obj = null
}

Unlike most addEvent inventions, in which either addEventListener or attachEvent is used, the above code simply stores eventhandlers into a buffer that has the following structure:

  obj.eventHooks = { click    : [f1, f2]
, keyup : []
, mouseover: [f3]
....
}

For each event, say, click, a function is assigned to the .onclick. This function carries out the following steps:
  1. Check if obj.eventHooks exists. If not, create one
  2. Check if obj.eventHooks.click exists. If not, create one
  3. Loop through each functions in obj.eventHooks.click
  4. For each function, attaches it to obj as a temporary obj.tmp, then executes obj.tmp(e). This makes sure that any this keyword inside that function point to the obj correctly.
A test page, using the contest template, is here. I am sure that there will be some downside along with this code, but at least at this moment it seems to solve the problems came with the winning code.

3/20/2007

Javascript string replacing function

0 comments

In python there's a very convinient string replacing function that comes with every string. The following example show how it works:

To construct a string:   "firstname:Runsun, lastname:Pan, project:wysiwyc"

firstname='Runsun'
lastname ='Pan'
project ='wysiwyc'
s= 'firstname:<b>%s</b>, lastname:<b>%s</b>, project:<b>%s</b>'%(firstname, lastname, project)

The symbol % attaching to the end of a string is a function to insert a series of strings (firstname, lastname, project) into the original string. This not only makes it easier to read but also easier to type, as compared to:

'firstname:<b>'+ firstname +'</b>, lastname:<b>'+ lastname+ '</b>, project:<b>'+ project + '</b>'

In javascript you don't have that luxury. I came up with a tiny function that does just that:

function ___(s)
{
var ss = arguments[0].split('___')
var out= [ss[0]]
for (var i=1;i<ss.length;i++){
out.push(arguments[i])
out.push(ss[i])
}
return out.join('')
}

So now you can do this:

s= ___('firstname:<b>___</b>, lastname:<b>___</b>, project:<b>___</b>',firstname, lastname, project)

I found that this syntax is actually better than its python cousin, because the symbol "___" implies that there's something to be filled, just like what we used to do when filling up a form with a pen.

It would look even more clear if we attach this "___()" function to the string prototype:

String.prototype._= function()
{

var ss = this.valueOf().split('___')
var out= [ss.shift()]
for (var i=0;i<ss.length;i++){
out.push(arguments[i])
out.push(ss[i])
}
return out.join('')
}

which allows this:

s= 'firstname:<b>___</b>, lastname:<b>___</b>, project:<b>___</b>'._(firstname, lastname, project)

Some other uses of this function:

Example-1:

alert('myArray=[___]'._(myArray))

Example-2:

tag = '<___ style="___">___</___>'
DIV = tag._('div','___','___','div')
SPAN = tag._('span','___','___','span')
adiv = DIV._("border:1px dashed blue; color:blue", "div example")
aspan= SPAN._("color:red;background-color:yellow", "span example")

The 2nd example gives:

div example
span example

Replace with a data in a hash


The above ___() function is already very helpful. But the original python % has one other feature:

data= {'fname':'Runsun'
,'lname':'Pan'
,'proj' :'wysiwyc'}
s= 'firstname:<b>%(fname)s</b>, lastname:<b>%(lname)s</b>, project:<b>%(proj)s</b>'%(data)

By inserting a (fname) into %s, you allow the data be in hash form. Now lets put this feature into the ___() function.

Stand-alone ___() function:

function ___(s)
{
var isObj=false
try {
isObj = arguments[1].constructor.toString().split('(')[0].split(' ')[1]=='Object'
}catch(e) {}

if (isObj)
{
var args = arguments[1]
for (var k in args) { s=s.split( '_'+k+'_').join( args[k] ) }
return s

}else{

var ss = arguments[0].split('___')
var out= [ss[0]]
for (var i=1;i<ss.length;i++){
out.push(arguments[i])
out.push(ss[i])
}
return out.join("")
}
}

Attached to string prototype:

String.prototype._= function()
{
var ss= this.valueOf()
var isObj=false
try {
isObj = arguments[0].constructor.toString().split('(')[0].split(' ')[1]=='Object'
}catch(e) {}

if (isObj)
{
var args = arguments[0]
for (var k in args) { ss=ss.split( '_'+k+'_').join( args[k] ) }
return ss

}else{

var ss = ss.split('___')
var out= [ss.shift()]
for (var i=0;i<ss.length;i++){
out.push(arguments[i])
out.push(ss[i])
}
return out.join("")
}
}

Now we can do this in javascript:

data= {fname:'Runsun'
,lname:'Pan'
,proj :'wysiwyc'}
s= 'firstname:<b>_fname_</b>, lastname:<b>_lname_</b>, project:<b>_proj_</b>'._(data)

Again, IMO, this looks better than its python cousin does.

UPDATE(7/23/07): See a regular expression version of the same function.

3/15/2007

HTML tablizer

0 comments

Introducing a html tablizer -- an online utilite to make simple html table.

The program has an Input Section and Output Section:


Enter your table data in the Input Section and either hit [Submit] button or simply move the cursor away from the input box. Then the resulting table will be shown immediately in the Demonstration in the Output Section. Also, the corresponding HTML code will be displayed in HTML code for copy and paste.

After the HTML code and the demo result are shown, you can modify the HTML code and see the result immediately:



If the resulting table is too wide:



You can hit the button [demo on top] to bring the table up:



Enjoy tablizer here.

3/11/2007

△ Recovering CHK files

0 comments

I have an old One-Touch external hard drive from Maxtor. It went crazy and generated 10,000 FILE????.CHK files about a year ago. My wife and I were worried about that the entire hard drive has gone unstable so we simply gave up using it. Recently I found some spare time trying to search for some tools to recover those CHK files.

RecognizeImageFiles.py


One of the most important file types to recover is our photos. The first step I tried was to find some python script that can recognize image files by file content but not by file extensions. There is indeed such a nice little script imghdr.py in python repository. I modified it a little to have it specifically useful in CHK image file recovery (RecognizeImageFiles).
Screenshot of RecognizeImageFiles.py execution

It was quite successful and about 500 image files were recovered. But then, what about other types of files? I went online to search for third-party tools.

UnCHK and FileCHK


Surprisingly there isn't too many tools online. The most popular tools seem to be UnCHK (by Eric Phelps) and FileCHK (by Martin Kratz). They seem to be neat and useful. However, UnCHK (version UnCHK3) froze at the very beginning:



and FileCHK gave an error that reads:

Runtime error "9":
Subscript out of range

It's possible that they couldn't recognize my One-Touch in drive F. Whatever, they don't work in my case.

MediaHeal


I then found a MediaHeal from officerecovery. The description reads:

Recovers files from corrupted hard disks. Supported are all common file systems, including NTFS, FAT12, VFAT12, FAT16, and FAT32.

I downloaded the MediaHeal for Hard Drives and gave it a try. Unfortunately, this program only aims at the entire hard drives but doesn't allow users to check folder(s):

MediaHeal doesn't allow you to choose a folder (image shrunk to fit screen)

Much worse, it froze at the very beginning on this screen:

The excution of MediaHeal demo version froze at the very beginning
(image shrunk to fit screen)


RecoverMyFiles


Finally, I found RecoverMyFiles from GetData. According to their website, this program allows users to recover deleted files even after the hard disk is reformatted (I didn't even know that it's possible):

Recover deleted files even if emptied from the Recycle Bin
Recover formatted hard drives, even if you have reinstalled Windows!
Recover your files after a hard disk crash
Get back files after a partitioning error
Recover documents, photos, video music and email.
Recover from hard drive, camera card, USB, Zip, floppy disk or other media

and it's able to recover 200 types of files. I downloaded the trial version and was amazed how efficient it was:

The screenshot of RecoverMyFile excution.

It ran smoothly and took less than 4 minutes to complete checking my 250GB One-Touch. You can check the content of each file to decide what file is valuable. Since this is a trial vresion so it doesn't allow real rescuing. But it already impressed me.

Other links


FILExt.com
http://filext.com/detaillist.php?extdetail=chk&Search=Search

Look for info about a file ext
http://shell.windows.com/fileassoc/0409/xml/redir.asp?Ext=jpg

A list of common file extensions
http://safari.oreilly.com/0596002491/winxpnut-APP-F

OfficeRecovery.com (data recovery software for corrupted files)
http://www.officerecovery.com/mediaheal/index.htm

3/02/2007

■ 228 六十週年

0 comments

228 整整六十週年了。就如過去一樣,台灣藍綠雙方政治人物與支持者都有一大堆活動與討論。我們看看六十週年的今年,跟過去有什麼不同。

● 法律制裁


去年此時,我寫了一篇有關於 228 責任追究與法律制裁的文章(註一),裡頭提到:

在二次大戰後的「紐倫堡大審」中,有很多納粹的一級戰犯被審判、定罪並處死。但是,有很多德國納粹軍官化名逃亡而逃過審判。西方社會對這些人的做法是:不管你用什麼方式逃到什麼天涯海角,即使化成灰也要把你抓出來將你定罪。

反觀台灣人對二二八事件的態度,恐怕任何一個西方人也會為之傻眼 ── 在那樣一個「系統性屠殺」之後,竟然到今天沒有任何審判與定罪。不但如此,當初有系統殺害台灣菁英的那些劊子手,不但沒有任何人接受任何法律制裁,而且接承該殘暴法統的外來勢力至今還在繼續掌握、享有社會資源,甚至還能囂張地利用新聞的編造與扭曲唱衰台灣、撕裂台灣。

並批判泛綠政客對 228 法律追究的漠視:

為什麼那麼多泛綠人士對二二八事件的探討中,竟也很少很少看到二二八事件法律責任的追究?陳水扁總統本身還是律師出身,為什麼竟不懂得強調二二八的「法律層面」,而一再地落入泛藍「將二二八政治化」的圈套裡?

一年過去了,也許時機也漸漸成熟了,台灣人似乎已經從「要求道歉賠償」醒過來,開始有了法律追訴的聲音。日前,美國228大屠殺遺族代表在總統府受陳總統接見時提出法律制裁的請求(註二註三):

台灣應設特別法庭審理已故總統蔣介石當年下令鎮壓導致數千名台灣人喪生的悲劇。

「我們不要求血債血償,但希望獲得公平正義的處理」,代表王文宏說道。

家屬團共計提出五點訴求,包括對蔣介石與其他幫兇進行缺席審判、將228事件列入教科書、把「中正紀念堂」更名為「台灣忠烈祠」、撤走看守蔣介石陵寢的警衛兵、以及撤銷每年將蔣介石逝世日當作國定假日的做法。

而這項請求也得到陳總統的正面回應。在新成立的228國家紀念館的揭幕儀式中,陳總統公開指稱蔣中正為 228 的元兇,並承諾政府將對 228 的犯行採取法律追溯(註四):

總統說,過去為了內部團結,政府以撫平傷痛取代責任追究,卻讓228成為有受害者卻沒加害者的無頭公案:『更讓部分政治人物有機會基於政治的需要,任意捏造歪曲歷史,不論是早年將228抹紅成由台共所主導的叛亂事件,到近日所謂「官逼民反」的最新詮釋,本質上都是一樣的,都在掩飾,並淡化當時獨裁統治者打壓民主、迫害人權的國際罪行。』

未來政府將透過責任追究和法律追訴等方式,加速還原歷史真相,因為只有這樣才能進一步尋求真正的寬恕與和解。

另外,在泛綠的『與媒體對抗』網站,一個專門探討 228 法律追溯的討論欄已經進行了好一段時間(註五),可見,國人已經漸漸瞭解,「法律制裁」才是解決 228 爭議的唯一方式。這實在是 228 六十週年最令人欣慰的事。

● 官逼民反


同一個時間,幾週前才因貪污罪被起訴的泛藍明星馬英九,再一次地重複去年他發明的「標籤」,指稱 228 屠殺是 『官逼民反』(註六):

國民黨前主席馬英九昨天重申,二二八事件不是族群衝突,是查緝私煙導致「官逼民反」

我在去年的文章裡,已經強烈批判了馬英九這種言論是在替 228 的元兇脫罪,並污衊在 228 中犧牲的台灣人:

通常,在這種官民對抗的事件上,如果你是站在人民的一邊,你會以「起義」或「革命」來形容該事件。只有站在官方或者「同情官方」的立場,才會說那是「造反」。

很顯然,馬英九雖然表面上將責任歸在官方,看起來好像是站在人民的立場講話,但是,這句話的前提卻是「人民造反」,也就是他其實完全是站在官方的立場來看待二二八。利用這句精巧包裝的政治語言,馬英九在事件的歸屬上,很巧妙地將當年台灣人為了活下去而做的掙扎定了「造反」的罪,而那些為了爭民主而犧牲的台灣人,就這樣被馬英九的陰招鎖成「暴民」。

今年,阿扁總統也在公開場合做了同樣的批判(註七):

陳水扁總統上午反駁表示,將「228事件」定位為所謂的「官逼民反」或「警民衝突」,這是為過去的獨裁者粉飾太平,完全是以施暴者與加害者的史觀來詮釋歷史,這是絕大多數台灣人民不能夠接受與理解的。

顯然,馬英九欲以「官逼民反」將 228 事件定位為「人民造反」的陰謀,已經被國人所識破。

● 日本是 228 元兇?


還有更離譜的事。前幾日中研院幾個院士發表了一篇完全背離歷史事實的文章,指稱日本與美國才是 228 的元凶,企圖將 228 的責任歸屬轉嫁到日本與美國(註八):

中央研究院院士黃彰健、研究員朱宏源、民間史學學者武之璋戚嘉林27日上午聯合發表研究新發現。他們發現,日本人蓄意放棄對糧食配給管制,造成光復後台灣糧食大災難是228事件的原兇;美國人則為自身利益,企圖掌控、佔據台灣,屬於幫兇。228事件,其實是「民逼官反」。


雲林228紀念碑
啊??? 蓄意放棄對糧食配給管制,造成光復後台灣糧食大災難,所以是228事件的原兇?

首先,日本人已經要撤離台灣,已經沒有對台灣的控制權,即使他們沒放棄,也不可能有權力去維持該管制,何來「蓄意放棄」之說?

甚且,「沒有糧食管制」造成糧食大災難而導致 228?228 這種涉及整個社會的屠殺事件的原因複雜,怎可能因為單一的「沒有糧食管制」而死那麼多人?這種荒謬的邏輯,這幾個所謂的大學者竟然說得出口?

最後,殺人不眨眼的大魔頭與中國軍隊屠殺台灣人無罪,「已無權力管制台灣」的日本人反倒成為元兇?

這幾個飽讀「屍書」的學者,試圖利用學者身份替屠殺者粉飾罪惡,真是令人可悲。

可喜的是,這幾個無恥的蛋頭學者昧著良心所羅織的偽證,並沒有得到廣大讀者的支持。在該報導所附的討論區裡,絕大部分讀者的回應是在罵這些學者(註九)。舉幾個例子:

2007-02-27 14:18
systemzero:狗黨拿了多少錢給他們這些老頭捏造假歷史
當時基隆港屠殺 可是國民政府軍隊直接用機槍對岸上無辜人民掃射
此事豈可推給美日兩國!!!
2007-02-27 14:23
juliebarbie:如此「學者」!講痟話!
扯太遠啦!
日本人要離台了,當然要解除糧食管制,讓台灣人吃自己的糧食,難道還要繼續把糧食運往日本。
不過,據了解,終戰(「光復」)後台灣糧食大量運往中國去餵「豬」,支應國共內戰所需。
2007-02-27 15:45
haghland1:我在中研院~我也覺得很奇怪
他們雖然是中研院院士,可是是因為自己的興趣與政治傾向去進行自己的研究,他們憑什麼代表中研院發言呢?就我所知,中研院研究人員跟他們意見相左的人,大有人在,為什麼這些人的聲音不被重視?
而且,拿槍殺人的人沒罪?那請問納粹大屠殺的受害者,是不是要怪當年把希特勒給甩了的女性,才讓希特勒變得有偏激傾向?這些所謂學者,真的是讓自己的意識形態掌控一切了!
2007-02-27 16:52
hongshan:錯了!元兇是蒙古人,幫兇是英國人
按照所謂「中央研究院院士黃彰健、研究員朱宏源、民間史學學者武之璋、戚嘉林」等視野獨到鑽家的邏輯,那我們也可以衍論228元兇是蒙古人,因為元朝時蒙古人渡海東征未果,所以才有後來『日本人蓄意放棄對糧食配給管制』造成228民心動盪。而幫兇當然是英國人,因為他們當年放任北美獨立,所以才有後來的『美國人則為自身利益,企圖掌控、佔據台灣』。
當然,我們也可以按照這個邏輯推論其實元兇是亞當,而幫兇是夏娃。
2007-02-27 17:12
allweiout:是壓是壓/ 幕後大元兇 倒底是誰
一直往前推,全部都有責任,共產黨,滿清,發明槍的人。
繼續愚弄人民壓~幹的好,水喔。記住這些名字!
中央研究院院士黃彰健、研究員朱宏源、民間史學學者武之璋、戚嘉林。

這些回應似乎顯示出:這年頭要以學者之名為中國人在 228 事件中屠殺台灣人的劣跡脫罪的努力,已然不能得逞了。

● 可期待的未來


幾週前,陳總統曾說過,現在距離 2008 總統大選還有一段時間,依照台灣意識的發展速度,到了 2008 選總統投票時,台灣人覺醒的程度,將使得那些「支持統一」的候選人完全沒有機會被選上。日前,國民黨的立法院院長王金平也說過類似的話 (註十):

二00八大選時的外省籍問題,將非常嚴重 ... 台灣族群的主體議意識已經發酵了,看看正名問題發酵了沒?中南部已經強烈反映不會投給外省人了

以最近台灣政府大刀闊斧的正名運動,以及民間將 228 事件由「政治層面」回歸到「法治層面」的舉動,似乎顯示,局勢是在台灣人這邊,2008 總統大選,不管親中的泛藍泛橘泛紅抬出什麼人選,以逆著台灣意識的姿態,要贏得政權恐怕很難了。

● 參考資料



註一:被遺忘的法律制裁
http://aztecpassage.blogspot.com/2006/02/blog-post.html

註二:台灣人籲審判已故總統蔣介石屠殺罪
http://www.anti-media.tw/phpBB/post_468620.html#468620

註三:Taiwanese demand trial of late president Chiang for massacre
http://news.monstersandcritics.com/asiapacific/news/article_1269827.php/Taiwanese_demand_trial_of_late_president_Chiang_for_massacre

註四:扁:轉型正義新階段 追訴元兇
http://news.yam.com/bcc/politics/200702/20070228984357.html

註五:從艾斯曼案(The Eichman Case)來探討228集體大屠殺罪責如何追究
http://www.anti-media.tw/phpBB/topic_15469.html

註六:馬:228事件是官逼民反
http://news.chinatimes.com/2007Cti/2007Cti-News/2007Cti-News-Content/0,4521,110501+112007022500006,00.html

註七:馬稱228「官逼民反」 扁反駁
http://news.yam.com/udn/politics/200702/20070226978869.html

註八:228事件60週年/中研院:日本是元兇 美國是幫兇
http://news.yam.com/ettoday/politics/200702/20070227981228.html

註九:「228事件60週年/中研院:日本是元兇 美國是幫兇」討論區
http://forum.news.yam.com/disingle.php?newsid=20070227981228

註十:王金平:2008大選 外省籍問題將非常嚴重
http://udn.com/NEWS/NATIONAL/NATS5/3744920.shtml

2/14/2007

【牽手】

0 comments

想到 Madeci 外的寒意
到如今困境不知凡幾
而我們依然手牽手在一起
真心相惜始終如一

於是我心中充滿無盡的感激
如妳說下輩子還要找在一起
到時也許換我給妳一棵腎臟
也好讓欠疚的人不只我自己

想到結婚兩年半裡
衫污了有妳洗好衣
肚子夭有妳煮了米
郎睏了妳先備好蓆
到月底妳早把財理

這就是我的家妻
家裡大小一手理
閑閑的我只能專心地
愛妳疼妳惜妳


給小豬豬
2007 年 情人節前夕
大牛即興作於德州休士頓
The Methodist Hospital
Rm D423

8/21/2006

■ 公然騙錢的政治神棍

0 comments

/潘潤生

日前施明德先生開記者會發起「倒扁捐款」,說已經開了幾個「倒扁帳戶」,請民眾捐款他讓他倒扁。

這種「利用民眾信念」進行騙錢的行為公然發生在台灣,真是讓人瞠目結舌。為什麼說,施先生的舉動是「公然騙錢」呢?

民主社會,總統下台有一定的法定程序,不是錢多就可以。民眾只急著要把錢送出去,可有去質問施明德,「錢多」如何跟「倒扁」扯上關係?為什麼我享受「應有的罷免總統的民主權利」竟還要付錢給你?

★ 用錢推翻民意

施先生說,要看金錢多寡,來決定倒扁的力量有多大。這種邏輯實在是荒謬可笑。首先,在他這一波倒扁行動之前,泛藍政客媒體,以及所謂親綠學者,已經發起過兩次失敗的倒扁行動,可見倒扁並非多數民眾想要的。亦即,以民主社會「服從多數決」的原則,欲倒扁的並非多數。現在,難道用「錢多」就可以讓「相對少數」的人漠視這個民主原則去推翻多數民意?

★ 有錢就有勢

更荒謬的是,這種「看錢夠不夠多」的邏輯,造成了「幣幣不等值」,因為很多人捐了遠比他建議的「一人一百」還多的錢。譬如說,當捐款為「一百萬」的時候,並不見得是一萬人想倒扁,而可能是一個人就捐了一百萬。因此,「多少錢」並不等於「多少人」。換言之,施先生的「錢多力量大」的邏輯,使得比較有錢的人,他的聲音就會比較大,比較窮的人,聲音就比較小,這是完全背離民主原則的政治詭計。

而施先生越是強調這一點,越會促使反扁民眾捐更多,反而使得「幣幣更不等值」而造成「錢越多越不代表民意」,這是對民主精神的最大傷害。

★ 缺乏民主觀念

而人民之所以會去付錢,表示民眾認同「錢多代表民意大」,認同「有錢人聲音可以比較大」,認同「可以用錢推翻民意」。這充分顯示台灣人民主素養的貧乏。

至於錢多是不是真的能倒扁呢?如果是,那台灣整個民主體系恐將崩潰。由此看來,施先生這個「捐錢給我倒扁」的反民主行為,到最後,唯一獲利的人,恐怕就是施先生自己。這種反民主的,利用民眾信念的弱點以進行斂財的行為,跟一般神棍有什麼差別呢?

5/28/2006

■ 黃光芹「台灣本土政權何去何從」

0 comments

/潘潤生

五月初,美南的FAPA 邀請黃光芹女士在休士頓台灣人活動中心演講「台灣本土政權何去何從」。黃女士跟周玉蔻汪笨湖等是泛綠政論節目主持人,有關她的資訊可參考註[1][7][8][9]。

黃女士首先提到陳水扁總統的「終統」政策(筆者註:指前一陣子陳總統終止「國家統一委員會」以及「國統綱領」的政策。「國統會」與「國統綱領」不但是國民黨黨國時代權威政權下的產物,完全沒有台灣人的民意基礎,而且早已長期閒置沒有任何運作,其存在的唯一意義只在象徵外來政權對台灣主權的強暴,將之廢止乃為尊重台灣人民權利的正確方向,沒想到竟造成泛藍人士的強烈反彈以及美國政府的強力干預)。她提到謝長廷先生對於終統的看法是『終統觸動敏感神經,影響台美關係』。看來終統不只泛藍罵,民進黨也不滿,這就是台灣的問題。

台灣的問題還有媒體的水準低落。媒體隨便亂報,沒有事實根據的也天花亂墜地亂報一通。到最後記者不跑新聞,等著被餵新聞,人民整天被這樣的新聞環境虐待,生活怎麼能不痛苦?陳總統自己也有感而發地說出被媒體「柔性斬首」之言。

為什麼台灣社會演變變成今天這樣的亂象?黃女士認為陳總統應該好好檢討自己,為什麼去年(2005年)要去弄個扁宋會(指去年二月的「扁宋會」,會後共同發表「扁宋會」十點結論,被李登輝前總統批為「跟人家上床」),為什麼會有媒體被中資滲透的現象,為什麼會有高捷案。。。等等。

黃女士以下列三點來談民進黨的「致命傷」:

一 扁宋會

黃女士提到扁宋會的因緣。一開始是周玉蔻、楊憲宏兩位泛綠政論家找李前總統談扁宋會的可能性。李前總統想以「郝柏村模式」讓宋楚瑜當行政院長,於是告訴陳總統扁宋會可行。周、楊於是傳話給宋楚瑜而促成扁宋會。萬萬想不到的,是陳總統竟然跟宋楚瑜達成「十點共識」(註
[2]),而在獨派人士強烈反彈之時,陳總統不但沒有採取補救措施與獨派人士好好溝通,反以「不要再自欺欺人」「任內做不到就是做不到」等不適合國家元首的發言來反諷獨派人士對於制憲的期望。陳總統甚至於還想讓宋楚瑜帶口信給胡錦濤造成扁胡會(註:據筆者所知,報紙有此報導,但政府從來沒有證實)。

這樣的言行當然會讓熱情的支持者傷心。扁宋會後陳總統在「大話新聞」節目接受訪問時又說些「阿輝又不是我老爸」等傷感情的談話。李前總統夫婦向來把阿扁當自己的家人看,因此在電視機前面看到陳總統的談話非常難過,當天晚上夫人曾文惠還送醫急救(筆者註:個人認為,陳總統對「扁宋會」最「失格」的發言,應是在他針對李前總統「我叫他去相親,他卻跑去跟人家上床」的批評時,以『要去相親,就要有上床的準備。』的荒唐用語回應。)。

陳總統從扁宋會開始向泛藍靠攏,一直到宋楚瑜與中國的胡錦濤簽訂一個中國之約才停止(註
[3]),然後到去年底三合一選舉大敗後才真正回魂。(筆者註:其實,陳總統並不是從「扁宋會」才開始他的「偏藍之旅」。打從2000年一上任開始,他就以「中間執政」為名,一步步向泛藍靠攏、妥協,在許多關鍵性的爭執上,常常以「殺親信以悅敵軍」的方式來試圖化解泛藍的挑釁,結果當然是泛綠重臣被解聘,而泛藍的無理挑釁依舊。筆者曾一度憂心,以其如此向強權低頭的個性,是否到頭來會以「接受一國兩制」來博取泛藍的好感。)

二 陳哲男

黃女士接著提到陳總統對高捷案主角陳哲男多年來「超乎尋常的照顧」。其實陳哲男不法的行為早就有跡可尋:1996年陳總統還是北市長時,陳哲男已經辱罵檢察官還被錄音;1998年司法黃牛案裡陳哲男遭彈劾;2003
競選連任時,很多案子都有陳哲男的涉獵。這些風風雨雨,將陳哲男當作親信的陳總統難道都不知情?但他不但沒有處理,甚至在2004年連任後的就職典禮前,還頒國家勳章給陳哲男,稱他「功在總統府、功在國家」,不清楚陳哲男有何作為值得國家勳章的頒發?結果最後陳哲男被收押,等於讓民進黨去了半條命。

三 自殺式改革

黃女士又提到民進黨的「搞不清楚狀況」-- 在民進黨推動的「六大改革」裡,其中可能把民進黨自己腰斬的就有三項,包括:

一。黨政軍退出媒體 ── 忙了半天,泛綠的都退出了,泛藍的還是霸佔不放,結果讓泛藍的更加壟斷媒體;
二。國會改革── 要國會改革(國會減半、單一選區兩票制 ),光是算算各政黨的基本盤,民進黨不用選就已經輸了,2007年 立委選舉可能只有二、三十席。泛綠立委通過這個即將「造成立委失業」的條款,結果反過來批評政府,比泛藍批得更凶。
三。三合一 ── 三合一有利於國民黨賄選與樁腳制度,對基層樁腳盤根錯節的國民黨而言等於是如魚得水。因此推動「三合一」,等於是助長國民黨,讓民進黨失勢。而在幾個民進黨大頭裡,謝長廷是力主三合一的,陳總統也支持,只有蘇貞昌曾拍桌反對。

為什麼民進黨會去推動有利於國民黨、有害於民進黨的制度?民進黨還沒站穩前就想改革,等於沒考慮到本土政權的延續。黃女士質疑:如果改革是要消滅本土媒體與政權,那改革有何意義?

除了以上三點之外,黃女士也認為陳總統也應該檢討為什麼放任公權力不彰,使得違法者越來越視法律於無物。譬如說,媒體被中資滲透至少 17 家,這些都是違法行為,為什麼政府不敢取締?(筆者註:如果如報紙報導陳總統說的:『願意犧牲國家安全,也要捍衛百分之百的新聞自由』是真實的話(註[4]),那在他的觀念裡,寧可陷國家於險境中,也不敢去動媒體,如果當真如此昏庸,我們還能期望什麼呢?)(筆者又註:TVBS 電台在去年新聞局長林佳龍任內已經被裁定為違法中資而因此被罰款。後來行政院長謝長廷下台,換上蘇貞昌,新聞局長也換人,同樣的政府單位,卻反過來裁定 TVBS 合法,不但讓其續照而且罰款還要吐回去,理由是『間接中資,不算中資』。也就是說,所有中資只要找人在台灣成立一家人頭公司做為轉接,用這種間接方式來控制台灣的媒體,這樣蘇貞昌的政府就認為屬於「不算是中資」。關於蘇貞昌的網友討論可參考註 [5],其中有這麼一段話:『 查了一下蘇貞昌周邊幕僚,越來越冒冷汗,原來被稱為「自殺式改革」的國會減半,原始規劃就是出於院長辦公室主任吳祥榮之手』)。

還有,連宋訪中,為什麼沒有法辦?根據憲法增修條文刑法 113 條,最起碼隨行的國民黨立委都應該罰 20 萬以上,可是政府卻放任不管,根本連調查都沒有。陳總統沒有動用公權力,導致社會越來越目無法紀,也難怪陳總統當時的支持度僅剩 18 趴。

黃女士還說,現在整個民進黨都向泛藍傾斜,蘇貞昌、謝長廷都向中國傾斜,還有新潮流也是一樣,有事就看到他們先跳出來講一些偏向泛藍的言論。新潮流的鐘佳賓等其實自己是想到中國做生意,才會逼促政府開放。還有一些泛綠媒體人看到泛藍勢大,開始在轉變立場往泛藍傾斜。她強調她絕對不會採取如此路線。

對於 2008 總統大選的選情,黃女士表達了悲觀的看法。她說馬英九其實看不出來有什麼能力,大致上一直「連歸馬隨」,大概以後在胡錦濤面前也如連戰一般不敢說自己當過中華民國的什麼長。而且,當國民黨主席前還有人期望他改革,沒想到當了主席後賣黨產賣得比連戰還凶,正副議長選舉黑金一堆,縣市長選舉時還幫台東縣鄺麗真輔選(筆者註:2005年縣市長選舉,馬英九全力輔選已經被調查的台東縣長候選人吳俊立(註 [6]),而在吳俊立貪污罪確定之後的補選中,又全力輔選其妻鄺麗真以確保其能「繼承夫業」,吾人不禁合理懷疑,吳俊立、鄺麗真夫婦到底幫馬英九私藏了、掩蓋了什麼私人利益,否則為什麼明知其為貪官卻非確保其當選不可。同時,馬英九當時也全力輔選基隆市長候選人許財利,其人目前已經因貪瀆罪被收押,但是馬英九竟還對外宣稱「從不後悔向選民推薦他」)。

馬英九已經積極的跑遍台灣在為他的2008總統大選鋪路,但相對的,民進黨到現在還沒有總統人選,四大天王內鬥可能打到 2007 年,在那之前,一切都將是零。以民進黨如此態勢,她擔憂 2008的選舉本土政權將被斷送,但原因不在馬英九,而在民進黨本身。

會後的聽眾提問,同鄉王明珠女士提到已經沒有泛綠媒體,泛綠如何宣傳。黃女士說目前跟汪笨糊在研討經營未來節目的可能性。

有位同鄉提到,我們政府連一國都沒有,卻堅稱有三國之地(指憲法稱中華民國、中華人民共和國,外蒙古為國土;其實中華民國的憲法對於「國土」的定義很含糊,用語是「依其固有疆土」),民進黨為何不喚醒台灣人。黃女士說,阿扁沒有勇氣,怕被批評為法理台獨,到後來連他自己都不知道下一步要怎麼走。

有位年輕同鄉問起如何教導外籍新娘使其成為台灣人。黃女士回應說,她不明白為什麼教科書到現在還沒有加入台灣本土教材。有些泛綠政府官員當了官後的表現很奇怪,譬如說,姚嘉文先生當考試院長,考試委員包括他一個共七個,要表決什麼決定時,其他六票剛好藍綠比三比三,表決結果也是三比三,只要姚院長投泛綠那邊一票泛綠贊成的政策就通過,姚院長卻說要保持中立不投票,結果使得泛綠在「即使有比泛藍更多委員」的情況下,仍無法讓泛綠支持的政策通過。這不是很鄉愿嗎?

黃女士關於姚院長的描述讓筆者吃驚不小。筆者很難想像姚院長會有如此鄉愿的作為。但願這事只是個誤解。

美南民進黨的李錫舟先生則對教科書的問題提出了補充。他說,教科書修改要兩年,故杜正勝上任後第一次主張的新的教科書,今年九月才能出來。問題在於,為什麼阿扁不在一開始就讓杜正勝當部長?如此已經浪費了四年。李先生強調,教育一定要本土路線不能走中間路線。

總結而言,黃女士的演講重點在目前亂象的分析,著重在陳總統應該為目前的亂象自我反省,尤其是陳總統在「偏離本土路線」及「公權力淪喪」兩方面的缺失,是造成如今泛綠民心渙散,支持度崩盤的關鍵因素。黃女士對於現況的分析確實有助於旅居海外的台灣同鄉瞭解家鄉近況,只有兩點讓筆者覺得有點遺憾:一是演講主題的「台灣本土政權何去何從」的「未來」幾乎完全沒有著墨;二是黃小姐在大約有六次講到「中國」的場合中,只有一次以「中國」稱之,其他五次仍稱呼對岸為「大陸」。中國有自己的國名,「大陸」這個詞的英文是「mainland」,只有「自認為是附屬島國」才會稱身旁的大島為「大陸」,要不然,國際慣例上應該是以國名相稱,如此也算是對對方國家的尊重。顯然,黃小姐尚未意識到自己用語間的「自我矮化」的意涵。在泛綠早已經積極「為中國正名」相當長一段時間的現在(最起碼有兩年了吧?),以黃小姐扮演「為泛綠喉舌」的知名政論家角色而言,這現象的確讓筆者感到相當意外。

黃小姐演講中數度宣稱她自己絕對不會因為藍營勢大而「西瓜偎大邊」,想到黃小姐與汪笨湖、周玉蔻等名嘴都是在泛綠成為執政黨後才由藍營中「起義來歸」的往事,吾人希望黃小姐今天在演講中的保證,並不僅僅是面對同鄉時的討好之詞。

[1] 黃光芹小姐主講「台灣本土政權何去何從」
http://www.epochtimes.com/b5/6/5/13/n1317107.htm
[2] 扁宋會十點:
http://news.bbc.co.uk/chinese/trad/hi/newsid_4290000/newsid_4293900/4293901.stm
[3] 陸委會:兩岸一中 逾扁宋會十點共識
http://www.epochtimes.com/b5/5/5/12/n919653.htm
[4] 願意犧牲國家安全,捍衛百分之百的新聞自由
http://www.libertytimes.com.tw/2005/new/jul/9/today-p4.htm
[5] 蘇院長,還是當科長就好?
http://www.anti-media.tw/phpBB/viewtopic.php?t=14360&postdays=0&postorder=asc&start=0
[6] 清廉執政
http://mayingshe.blogspot.com/2006/04/blog-post_21.html
[7] 黃光芹部落格
http://bloguide.ettoday.com/heartburn1/
[8] 泛綠網友對黃光芹的檢視與批判
http://www.anti-media.tw/phpBB/viewtopic.php?t=14387&k_id=14
[9] 魚夫給邱毅與「資深媒體人」的忠告
http://blog.ptt2.cc/blog.pl/LucSpace/article,20031115.html

4/25/2006

■ 我聽徐佳青議員演講

0 comments

by 潘潤生

時間: 2005 年 4 月 16日
地點:美國德州休士頓台灣人活動中心

日前到活動中心聆聽了現任台北市議員徐佳青的演講。徐議員是民進黨新潮流的成員,目前也是民進黨婦女部的主任。在演講中,徐議員談到了新潮流派系的運作方式與政策形成的過程,並提及泛綠目前的困境以及可以走、應該走的方向。

民進黨的新潮流,近幾年來在泛綠陣營中似乎有著極大的爭議。這些爭議的來源,可能是新潮流成員的言論內容與行事風格,在某種程度上似乎與泛綠的民意有距離,再加上新潮流的勇於批評的作風,造成了相當部分的泛綠成員的不諒解。

徐議員針對這個現象提出可能的解釋。她首先提到新潮流跟民進黨內的其他政團不同之處。新潮流成軍原在民進黨成立之前,當黨外運動由街頭運動轉型為政黨政治之後,新潮流提攜後進的傳統發揮了相當大的作用。他們會長期觀察有理想、有潛力的年輕人,然後邀請他們進入新潮流,如果有競選的需要,新潮流會盡力幫助該成員。這樣的運作方式,使得一些沒有資源、沒有背景的年輕人也有參與選舉、為民服務的機會。

徐議員提到,民進黨黨內的初選機制,需要一個人在黨內有相當的支持度,於是欲出線的人必須拉攏人馬,這造成民進黨內不同派系的形成。但她同時強調,真正說起來並沒有所謂的派系,因為在這些所謂派系中,只有新潮流有在經營理想性的、政策性的辯論並為他們的政策背書,其他的政團存在的主要目的只是為了贏得選舉的勝利。

徐議員說,新潮流的這些特質,使得名不見經傳的新潮流成員能夠突破樁腳體系的傳統政治模式而當選。由於其他派系並沒有這樣的機制與能力,新潮流的成就自然使得其他人眼紅。於是乎,很多對新潮流不利的耳語漸漸傳開。徐議員認為,這些風評對新朝流並不公平。

徐議員提到另一個新潮流的特質,是勇於批評的作風。筆者個人認為,在一個正常的民主社會裡,「批評」不但應該是常態,而且更應該是任何一個公民社會的份子應盡的義務。沒有民眾的監督,民主的過程將流於形式,而「批評」正是人民監督政府、監督民意代表的一個方式。只是,台灣的社會似乎還沒有從「君權神授」的老舊觀念中解放。儘管人民已經享有「決定誰當頭」的投票權,人民似乎不認同投了票之後的「後續監督動作」是完成民主程序的必要步驟。相反的,人民投票之後,便寄望於被他們選出來的人是上天派來的救世主,只要團結在救世主底下,不管救世主講什麼做什麼(即使這救世主好像在執行競選對手的政見),只要大家一起忍痛「鞏固領導中心」,最後就可以得救。在這樣的社會心態下,勇於批評的新潮流,自然成為各方的箭靶。

徐議員的談話內容,對新潮流的困境提供了某種程度的解釋。然而,雖然同鄉們感謝其誠摯的態度,以及言談之間所呈現的強烈的理想性,這些解釋似乎並沒有完全讓同鄉們對新潮流的疑慮釋懷。同鄉們尤其感到不解的,是新潮流的幾個重量級的人物,包括邱義仁先生、洪奇昌先生、林濁水先生等,他們近幾年的言行,看在泛綠的眼裡總是很不諒解。

徐議員提到,新潮流的決策過程是絕對民主的,所有對外公開的代表新潮流的決策,一定是要在新潮流內部經過辯論之後得到的結論才算數。邱義仁先生已經很久沒有參與新潮流的會議,他的言論當然沒有經過內部辯論。因此雖然他並沒有宣布退出新潮流,但基本上他的言論已經不能代表新潮流。洪奇昌先生的許多言論,也沒有經過新潮流的內部辯論,因此只能算是個人言論。

在場同鄉則反應,這幾個人都是新潮流台面上的大佬級人物,他們的言論當然有決定性的指標作用,更何況新潮流又沒有跟這些言論劃清界限,因此「只是個人言論」的解釋似乎並不能解決泛綠心中的疑惑。

筆者認為,這恐怕是新潮流內部必須自行克服的結構性問題。尤其,當所謂的「大佬級」人物漸漸急於跳過派系內的民主機制來讓個人意見出頭時,新潮流是要對「不合派內民主機制」的言論睜一隻眼閉一隻眼,對這些未經辯論的言行概括承受並承擔其所有後果?還是要「尊重民主機制」對民眾公開宣布來自大佬的哪些言論未經辯論故不能代表新潮流?這恐怕是對新潮流「會不會同流合污」的最佳考驗。

除了新潮流,徐議員也反省了泛綠目前的困境。她提到,做為一個民進黨的民意代表,她也常常對黨中央感到挫折,譬如說,民進黨的中常會,很少在討論政策與遠景,每週一次的中常會變成聆聽總統指令的例行會議。她順帶提到,陳總統對台灣的民主貢獻,在於完成了台灣第一次的政黨輪替。但是,陳總統本身的言行對民主機制的破壞也不容忽視。譬如說,想當黨主席就當黨主席,想辭黨主席就辭黨主席,而民進黨原本有關黨主席選舉的黨章也配合陳總統「量身訂做」地改來改去。

筆者想到之前曾在網路論壇上針對民進黨如此「拍馬屁」的反民主作風提出質疑,而該質疑竟然遭到泛綠支持者的強烈反彈。如今聽到徐議員的說法,不禁感到心有戚戚焉。

徐議員又提到,有很多人認為「陳總統變了」,其實不然,陳總統一直沒變,他的言行一直都是「一路走來始終如一」(筆者註:應該是講陳總統向來就是「變來變去」),但是人民自己要選擇自己想要相信的,到最後發覺陳總統並不是他們想像的那樣,才會變成說是「阿扁不一樣了」。

這似乎正是民眾「期待救世主」的奴隸心態導致的誤解。筆者想到,早在陳總統競選連任之前,泛綠網站充滿一片「團結」的呼聲,那種「不要苛責他,給他機會帶領我們走到樂園」的反民主心態,真是氾濫到讓人呼吸窒息。在這種心態下,人民眼睜睜看著陳總統一而再、再而三地在向泛藍屈膝妥協,而只有在選舉到時才用口號短暫地滿足支持者,選舉一過,又開始向泛藍低頭。如果說,陳總統的搖擺是今天泛綠支持度低迷的原因之一,難道支持者「對陳總統盲目地縱容」不必負一點責任嗎?

徐議員接下來提到,民進黨一個致命傷,是不懂得經營基層。民進黨的崛起一大部分歸功於民眾對國民黨專制與腐敗的反感,在那種情況下,勇於衝刺的民進黨能夠很容易地得到選票。當政之後這個「反專制、反腐敗」的賣點消失,民眾不會再因為這個理由而給你選票,而必須靠基層的經營,尤其是當政資源的利用與分享。要懂得去申請、利用資源,並將所得分享給民眾,如此才能夠贏得民眾的不斷支持。民進黨以前的選票得來太輕易,因此許多台面上的人物一直誤認只要選舉到時喊一喊選票就會進來。

她也提到,現在的泛綠高層面臨一個很大的困境,那就是上到總統,下到黨主席、黨工,沒有人能提出一個實際的作法,大家都不知道接下來該怎麼做,底下的意見又上不去,黨中央功能虛弱,給黨中央什麼實際的建議很難被當作一回事,除非你告訴他,要怎樣才能增加選票,這樣才會有人聽。

聽到這裡不覺得感慨萬千。過去這一年來民進黨不知道喊了多少次改革改革,但從來沒看到什麼具體的做法,喊改革者不是扮演正義執行者的角色要別人改革,就是開記者會喊一喊「要改革」後就沒有下文。改革應該是「行動」而不是「口號」,如果沒有配合具體可行的做法,則開記者會喊改革,跟靠暴料打知名度,又有多大的差別呢?

徐議員認為,民進黨應該擺脫「選舉為主」的信念,在這未來兩年,就打定主意當作 2008
年已經輸了,然後回過頭來想想,在這種情況下,這兩年要怎麼做,才能讓台灣意識更深一層地紮根,讓民眾實際地享受到民進黨執政的果實。徐議員建議,應該要排開政治面,而在文化的層次上用心,透過文化的深度扎根,讓台灣意識普遍成為人民的共識,並加強國家認同意識的教育。畢竟,民進黨一直不知道文化如此重要,不知道要把文化放在什麼位置,而我們的對手又是如此善於利用文化戰,如果我們能利用這兩年的機會在文化上、國家認同意識上下功夫,那也許
2012 年我們還有很好的機會。

聽完整個演講,筆者個人有點失望的是,以一個跟民進黨黨中央接觸還算頻繁的民意代表,徐議員遠道海外給演講,筆者個人期望能夠聽到「民進黨打算要如何做」的藍圖。先別提
2008 年或以後,至少,這未來兩年,民進黨以及政府要將台灣帶往哪一個方向。只是由徐議員的演講內容,似乎連她也跟我們其他在外圍觀看的民眾一樣無從著力,對民進黨只能「希望『他們』黨中央能夠怎麼做」,而不是「代表民進黨來告訴人民『我們』會怎麼做」。徐議員的「文化紮根」是一個很實際的做法,也是民進黨做為一個執政黨可以藉機著力的地方,但不知民進黨黨中央是不是認同這種「無法立即反映在選票上」的作為?

當然,局勢如此,大概不是個人之力能扭轉,徐議員身在其中,恐怕心中的無奈要百倍於旁觀者吧?令人在無力感中還能有一點點欣慰的是,民進黨裡面至少還有像徐議員這樣懷有理想的人類存在,也許,在民進黨裡,理想的火花還沒有完全泯滅吧?

───────────────────────────────────

想要多瞭解徐議員的讀者,可以上網查詢。底下筆者提供幾個連結。需要事先聲明的是,這些連結是隨機選取,並沒有任何代表性。

台北市第六選區議員徐佳青
http://web.tcc.gov.tw/bar1/bar1_5/member.asp?sno=471

2004/10/14 徐佳青議員:社福資源嚴重錯置!
http://www.tnews.com.tw/02/newscon1.asp?number=4267

2003/6/5 台北市政府違法 剝奪身心障礙老人權利
http://www.oldpeople.org.tw/news/news920605.htm

把妹秘訣上官網 婦團槓上馬團隊(1/25)
http://sisterhood.iparty.org.tw/news/news_001.asp?SubjectNo=21&MessageNo=3308

紀念婉如五週年 台灣女權再出發
http://forum.yam.org.tw/women/backinfo/participate/2001.htm

4/19/2006

◆ 境界

0 comments


之一

境界一: 因他人做錯事(即使與自己無關)而憤怒 (自我膨脹到把別人的事攬到自己身上了)

境界二: 因他人對你的態度而生氣 (我執太重,以為自己一定要被善待才可以)

境界三: 學會原諒他人的過錯 (我執還在: 不但認為「我對你錯」,我還大人大量,原諒你哩 !)

境界四: 無所謂「要不要原諒他人」(本來就不認為別人做的是錯的,何來原不原諒的問題?)


之二:

境界一: 因為人生中一件不如意事而痛苦、埋怨,卻沒想到一生中其他大部份遭遇
都是如意的 (十分之九如意境,被十分之一不如意事打敗 ?)

境界二: 認清人生中十分之九的如意事,選擇快樂地活在如意事裡;

境界三: 認清人生中的不如意事,是修練的大好時機,因此碰到時不會痛苦、埋怨;

境界四: 認清人生中的不如意事,是修練的大好時機,因此不但碰到時不會痛苦埋怨,反而懂得藉機鍛鍊自己甚至還會刻意去追求修練的機會;

境界五: 認清人在如意時要修練,比不如意時修練更難,因此人生如意時不做如意觀,
反而更加謹慎小心

境界六: 如意時不如意,不如意時如意,日日是好日,無所謂如不如意。