2011年11月11日 星期五

Flash 使用 Google Spreadsheet Form 在 AS2 出問題

Flash 使用 Google Spreadsheet Form
試了兩天,AS2 還是不行,前半段是遇到網頁空間不支援 curl 模組,傳回的訊息是傳送 OK,害我以為是 Google Apps 權限問題。
後半段開始與原作者網頁的問題訊息相同,把AS2程式裡面的 php 亂改,訊息也沒變....XD

想放棄 AS2改用AS3,但是 AS3 的程式無法直接拿來AS2的Project用,無奈只好放棄。

另外值得一提的是:其實這個 Flash 並不需要執行 Local 的 php,作者也是用另一網頁空間的。

參考:
http://bp.51donate.com/2011/04/google-spreadsheet1.html
http://blog.ouseful.info/2009/05/18/using-google-spreadsheets-as-a-databace-with-the-google-visualisation-api-query-language/
http://www.open-electronics.org/how-send-data-from-arduino-to-google-docs-spreadsheet/

2011年11月9日 星期三

變更公司名稱 SEO 問題

客戶換公司名,網址跟著換,因為 SEO 關係,只得慢慢轉換...現在內含關鍵字是半新半舊。
虛擬主機那邊是用"網站替身"(網站別名)來設定新的網域名。
結果登記 google site map 出問題,狀態顯示黃三角驚嘆號圖示,大神認為那是轉址,不列入索引。

現在只好反過來,舊名字是替身,驚嘆號果然不見了!
看來大神認為替身(別名)跟轉址是一樣的 XD

對於Google 來說,還是得按照他的規則,就網域用 301 轉到新網域,新舊網域都是指向同一空間的話,那就需要在起始頁作一下程式判斷舊網域,然後跳到新網域,可參考...

http://www.yes-seo.tw/2011/04/html-301-redirect/
http://blog.miniasp.com/post/2008/02/10/How-Do-I-Get-Paths-and-URL-fragments-from-the-HttpRequest-object.aspx

遷移網站

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Url.Host == "www.舊網域")
        {
            Response.Status = "301 Moved Permanently";
            Response.AddHeader("Location", "http://www.新網域");
        }
    }

題外話:
無意間,剛剛發現虛擬主機有啟用 DNS,這樣不就跟網域名稱設定"代管"模式相沖了嗎?
竟然相安無事一年多......可能是兩者都者向相同IP位址的關係。

2011年10月17日 星期一

XP 加速

  • 無意間發現 jqs.exe 會定時存取磁碟,週期大約是15秒。原來是 Java 的快速啟動...可參考:關閉自私的 Java Quick Starter。 Open office 也有類似的程式,不過他不是偷偷進行的,比較容易發現。

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年就停了,只好放棄...