Category Archives: 程式語言

Python 註解

# 這是註解~~~ “”” 這也是註解 “””

Posted in Python | Leave a comment

Shell Script 計算字元

cowman@ubuntu:~$ string=”0123 56 89″; echo “length: ${#strstring ing}” length: 10

Posted in Linux, Shell Script | Leave a comment

Iframe 允許 fullscreen

礙於某些原因,更改css有點麻煩….. 所以就直接使用iframe把別人做好的網頁樣版包起來排版 這將就方便許多了!! 只是這次包的是player,那全螢幕???? 查了一下~可以用下列方法達成 allowFullScreen=”true” webkitallowfullscreen=”true” mozallowfullscreen=”true” 只是這個方法對ie…..沒用!

Posted in HTML | Leave a comment

iBeacon SDK

Estimote為成大推薦的iBeacon廠牌,目前在Github上可查到iOS跟Android的SDK iOS => https://github.com/Estimote/iOS-SDK Android => https://github.com/Estimote/Android-SDK

Posted in iBeacon, iOS | Leave a comment

Sublime Text 2 install PHP-Beautifier

環境:Windows 7 x64 安裝 PHP 1.1 http://windows.php.net/download/,選擇Installer最新版本下載安裝 1.2 將PHP安裝路徑加至Windows系統環境變數Path內 安裝php pear 2.1 下載http://pear.php.net/go-pear.phar至PHP目錄下 2.2 使用命令提示字元(以系統管理者啟動),切換至PHP目錄,輸入php go-pear.phar進行安裝 2.3 PHP目錄下會產生Pear_ENV.reg檔案,將它加入至系統內 PHP安裝PHP_Beautifier 3.1 在PHP目錄下,輸入pear install PHP_Beautifier-0.1.15進行安裝 3.2 修改PHP目錄下的php_beautifier,將error_reporting(E^ALL)修改為error_reporting(0),大約在第55行 3.3 修改PHP目錄下的php_beautifier.bat,將所有的改為/ 3.4 修改PHPpearPHPBeautifierFilter目錄下的Pear.filter.php及phpBB.filter.php,將require_once (‘PEAR/Config.php’);註解 Sublime Text 2安裝PHP_beautifier 4.1 Sublime Text 2安裝Package Control,進入Console模式(ctrl+`),輸入import urllib2,os; pf=’Package … Continue reading

Posted in PHP, Sublime Text 2 | Leave a comment

Post 檔案至Web CGI

第一種方式,linux curl command curl -vv –cookie “Session=798434368” –data-binary @RoxioMediaManager_test4_AAC-LC_v4_Stereo_CBR_64kbps_44100Hz_ok.aac http://192.168.251.156/CGI/MobileAudio 第二種方式,PHP cUrl

Posted in PHP | Leave a comment

PHP 下拉檔案選單

Posted in PHP | Leave a comment

PHP強迫輸出

Source: http://php.net/manual/en/function.ob-flush.php some problems with ob_flush() and flush() could be resolved by defining content type header : header( ‘Content-type: text/html; charset=utf-8’ ); so working code looks like this:

Posted in PHP | Leave a comment

PHP Eclipse Editor

怒了, 還是來裝一下Editor好了 不然vim打得好累…… 參考蛙齋的作法1、蛙齋的作法2 先到官網下載Eclipse軟體安裝後,利用help=>install new software找到『Web, XML, Java EE and OSGi Enterprise Development』項目 在此項目下就可以看到php的相關plugin 然後再安裝rse,主要是可以讓eclipse支援remote操作(ftp、ssh等) rse主要在General Purpose Tools下,需要安裝『Remote System Explorer End-User Runtime、Remote System Explorer User Actions』這兩個 安裝完後便可以利用『Remote System Explorer』設定ssh的連線資訊 設定完成後選擇遠端的網頁目錄按右鍵『Create Remote Project』 這時候便可以用php explorer來瀏覽、編輯網頁 註:我比較懶,且不算是生產線上的系統,所以選擇直接編輯 通常最適當做法應該是在本機創模擬環境,確認ok後再上傳

Posted in PHP | Leave a comment

查詢關鍵字是否存在於以逗號分隔的資料欄位中

這樣有個好處 table的欄位可以開少一點 只是拉出來時如果要個別拆開 就需要程式語言有支援了…. (還有php有支援XD) 只是這邊有一點要小心,逗號前後的空格都有可能會影響比對的部分

Posted in MySQL, PHP | Leave a comment