網頁

2015年1月22日 星期四

語言學習程式 LearnLang

原先已經在 android 上寫好程式,而且也能使用
為了頁籤的順序不對
1.將 Google App Script 之 SheetAsJSON 改為 SheetAsJSON2
主要是將頁籤使用 JSON 的 Array 傳送
2.原先以為事情到此為止
哪知道儲存於資料庫時,照著頁籤名稱排序
只好修改資料庫
3.因為動了資料庫,所以全部重新下載,下載到一半居然停了,
google 回覆說不給機器程式使用發音
加入
conn.setRequestProperty("Range", "bytes=0-");
conn.setRequestProperty("Accept-Encoding", "identity");

利用 gmail 傳送 email

測試一直失敗,而後收到 googole 寄給我的一封信
重要的內容如下:

您可以改用 Google 開發的應用程式 (例如 Gmail) 存取帳戶 (建議做法),或是前往https://www.google.com/settings/security/lesssecureapps 變更相關設定,為您的帳戶停用最新安全性標準。

點入上述網頁,進入 安全性較低的應用程式,點選 啟用
重新寄信即可

gmail -> yahoo
mail.SetLogin("gingrenn@gmail.com");
mail.SetPassword("ingrenn1234");
  mail.SetSenderName("mark chen");
  mail.SetSenderMail("gingrenn@gmail.com");
//   mail.SetReplyTo("user@yahoo.com.tw");
  mail.SetSubject("The message");
  mail.AddRecipient("ingrenn@yahoo.com.tw");

yahoo -> gmail
mail.SetLogin("ingrenn");
mail.SetPassword("mark1234");
  mail.SetSenderName("ingrenn");
  mail.SetSenderMail("ingrenn@yahoo.com.tw");
//   mail.SetReplyTo("user@yahoo.com.tw");
  mail.SetSubject("The message");
  mail.AddRecipient("gingrenn@gmail.com");



2015年1月16日 星期五

VLC 控制

telnet 控制介面一直失敗,以前是成功的啊!
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --intf telnet --telnet-host=0.0.0.0 --telnet-port 4212 --telnet-password 1234

telnet localhost 4212
Password: 1234

>new ch1 broadcast enabled
>setup ch1 input rtsp://169.254.1.168:8557/PSIA/Streaming/channels/2?videoCodecType=H.264
>setup ch1 output #file{mux=ps,dst='R:\temp\aaa.ps'}
>control ch1 play
>control ch1 stop

>shutdown

Remote Control 好像能用,沒有完整的測試
vlc.exe -I rc --rc-host 0.0.0.0:8888

------------------------------------------------------------
似乎在 2.0.8 以後就不能使用了
回復以前版本
並且下命令時使用Multi-Byte Character Set
就可以在 WinXP 中使用

但是 Win8 64bit 一直找不到成功的方法

2015年1月14日 星期三

2014年12月23日 星期二

Google API

錯誤訊息
{"responseData": null, "responseDetails": "Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors", "responseStatus": 403}

到此申請帳號
https://developers.google.com/custom-search/v1/using_rest?hl=zh-TW


https://script.google.com/macros/s/AKfycbwwz9O_uKzZtpd3RPkuZLbQkueQUsDYHaEFhmi7PNXvzv_UrFo/exec?id=1Gt9Fe1WbNBSe1pMzqF50Lv1HBAnq7C_Hwh0lfTWVumM

"http://translate.google.com.tw/translate_tts?" +
      "ie=UTF-8&q=" + text + "&tl=" + lang + "&total=1&idx=0" +
      //"ie=UTF-8&q=" + escape(text) + "&tl=" + lang + "&total=1&idx=0" +
      "&textlen=" + text.length;

2014年12月18日 星期四

耳機線控

網路上的程式真的可以用,只是在 Service 和 Activity 間
都要多多 registerMediaButtonEventReceiver
以免 KeyEvent 被電話或預設的音樂程式接走了

尤其下列這種模擬的 KeyEvent,只能在模擬機器上使用,真機上容易觸發電話和預設的音樂程式
Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
sendBroadcast(intent);

2014年12月1日 星期一

關於民主

郭台銘說:民主不能當飯吃

陳為廷表示「民主或許不能當飯吃,但是民主可以讓你有尊嚴地吃飯」

朱學恒:
的確,民主不能讓你刀槍不入,民主不能讓你以寡擊眾,民主也不能讓你享盡榮華富貴
但是,我們來到這個世界上不是只為了吃飯
民主可以讓你有尊嚴,民主可以讓你不用卑躬屈膝,民主可以讓你勇敢,民主可以讓你自傲,民主讓你可以推倒高牆