2011年9月26日 星期一

學習 Flash,官網文件混亂

找說明文件當然是以 中文 pdf 為佳,結果官網太複雜,新舊不一,pdf 檔不多見。
只好記一下線上文件位置...期望官網別再改位置了!!

說明 ActionScript 2.0 和 3.0 的不同

ActionScript 2.0 語言參考增補內容

程序迁移到Adobe ActionScript 3的重要概念

2011年9月25日 星期日

在Blogger 使用 SyntaxHighlighter 3.0

測試一下...
SyntaxHighlighter.autoloader(
'applescript http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAppleScript.js',
'actionscript3 as3 http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAS3.js',
'bash shell http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js',
'coldfusion cf http://alexgorbatchev.com/pub/sh/current/scripts/shBrushColdFusion.js',
'cpp c http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js',
'c# c-sharp csharp http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js',
'css http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js',
'delphi pascal http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDelphi.js',
'diff patch pas http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDiff.js',
'erl erlang http://alexgorbatchev.com/pub/sh/current/scripts/shBrushErlang.js',
'groovy http://alexgorbatchev.com/pub/sh/current/scripts/shBrushGroovy.js',
'java http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js',
'jfx javafx http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js',
'js jscript javascript http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js',
'perl pl http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js',
'php http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js',
'text plain http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js',
'py python http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js',
'ruby rails ror rb http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js',
'sass scss http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSass.js',
'scala http://alexgorbatchev.com/pub/sh/current/scripts/shBrushScala.js',
'sql http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js',
'vb vbnet http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js',
'xml xhtml xslt html http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'
);
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all()


參考來自:
http://novathinking.blogspot.com/2011/04/blogger-syntaxhighlighter-30_471.html
可以選用的著色語法:
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

2011年9月9日 星期五

NetBean 7 subversion import 後,清除回無版本控制狀態

NetBean 7 subversion import 後,想清除回無版本控制狀態...
  1. 關閉 project ,刪除 project 下的所有的 .svn
  2. 清除 C:\Documents and Settings\xxx\.netbeans\7.0\var\cache\svncache
  3. 重開 project

2011年8月25日 星期四

PHP 程式碼混淆器 (Obfuscator and Encoder)

PHP Obfuscator and Encoder (PHP 程式碼混淆器)
PHP 程式碼保護,虛擬主機商支援的,編碼都要錢,免費的都需自行安裝...
只好退而求其次,使用混淆器,使程式難懂...XD
試過...
  • POBS 0.9.9, 2003年,PHP 寫成的,在 PHP5.3 需要改不少地方。官網推薦比較新的 http://www.raizlabs.com/software/phpobfuscator/,可惜也停了,沒啥可下的。
  • YAPHPO 1.0.1, 2007年,也是PHP 寫成的,需要在命令列執行,選項較少。
POBS 在PHP5.3有許多問題:
  • 許多地方需改成 isset() 的判斷方式
  • 有個 md5() 參數沒給值
  • 對於字串內的註解會誤判
  • 未處理的檔案複製沒有先比對日期,導致編譯費時
  • 目標資料夾因為PHP權限問題,需位於來源資料夾內,那將導致無窮盡迴圈
  • 變數位於不同檔案時,更新某檔會缺乏連動機制,導致名稱不一致
  • 變數位於 conf 檔時,需要一一排除這些變數...數量大時很麻煩

後來也試了 PHP Obfuscator (POBS 官網推薦的),沒想到這 C# 做的更慘:
  • 一開始就整個資料夾刪除再複製,無法設定那些子資料夾不必複製。
  • 目的資料夾有唯讀檔案時會跳出。
  • 複製檔案都沒比對日期,缺乏效率。
  • 原本期待.NET的 Regx 有特異功能 "群組堆疊" ,似乎也沒發現,程式用迴圈在讀巢狀符。
  • 我有個比較老的 PHP檔,竟然讓它死當了,懶得查原因,可能有變數放在 conf 沒被讀進吧?
  • 這是很可能是個還沒 Release 就掛了的 Project 。2007年就停了,只好放棄...

2011年8月2日 星期二

phpMyAdmin 3.3.9 在 UTF-8 的 MySQL 下,建立資料庫卻不是 utf-8 的

phpMyAdmin 3.3.9 在 UTF-8 的 MySQL 下,建立資料庫卻不是 utf-8 的,而是一個瑞典的編碼?
結果一路建下去,每個表格與欄位都要改為 utf-8 unicode-ci,真糟糕!!

也許一開始建立資料庫就要注意 "校正" 的編碼是否正確,不然用 UI 反而沒效率...
嗯~本來 UI 就比較沒效率!!

2011年6月27日 星期一

MS Access 在查詢時文字欄位的結合問題

MS Access 在查詢時文字欄位的結合,CName: 文字欄1 + 文字欄2
只要有一欄是 NULL,這個運算也變成NULL 了,沒有錯誤訊息...

在 SQL 找不到能用的指令,只好求助 VBA 函數...用 IIF() 防止 NULL...
例如: (C1,C2 是同表格不同代號)
CName: IIf([C1.CName] Is Null,'',[C1.CName])+IIf([C2.CName] Is Null,'',[C2.CName])

另外,在 Access 2000 查詢設計中,勾選不顯示的欄位代號都會變成詢問數值的方式,所以不顯示的欄位代號沒辦法拿來簡化運算式,還是我哪邊沒設好 ?

2011年6月23日 星期四

GridView 在 VS2008 精靈掛點

GridView 在 VS2008 分割模式下,改變原始碼 DataSource 的欄位設定,可能導致設計模式的精靈掛點,無法進去編輯,這時設計模式的畫面顯示許多的 "資料繫結"。

解決辦法: 在這個 GridView 點選資料結構重整,但是在確認時回答"No",以免毀了之前的欄位設定,也許之前需要回答 Select 條件的 Key 值,選好資料型態,給個樣本值即可。
這樣垂死的精靈又活過來了!!