如果程式沒有把參數用設定檔寫好的話,這個參數值可能就會用在很多程式碼中
突然參數值要改的話,就必需個檔一個檔開起來改很費時間
下面這個指令可以幫你找出所有副檔名是.php的檔,其中有包含 "要被取代的字" 的檔名有哪些,最後針對這些檔案做文字取代:
Oscar 發表在 痞客邦 留言(0) 人氣(2,512)
有時候在command line打包好一個檔,卻又懶的用 ftp 或 sftp抓的時候,可以直接用mail指令寄到信箱
先看看用法
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
Oscar 發表在 痞客邦 留言(0) 人氣(5,119)
有時候PDO物件連線,然後程式在處理大量資料時,Mysql等太久最後timeout斷線了
這時執行query就會需到Mysql Server has gone away的錯誤 (uncaught exception)
一昧的加大timeout,不如直接Catch這個Exception
範例程式如下:
Oscar 發表在 痞客邦 留言(0) 人氣(2,726)
此範例來自
http://www.php.net/manual/en/function.pcntl-fork.php
通常用在需要大量呼叫SOAP API或RestfulAPI時使用
比方說我有1000張照片,我要用API取得這1000張照片的資訊,每呼叫一次api就需要1秒
Oscar 發表在 痞客邦 留言(0) 人氣(4,733)
相信有用PHP輸出CSV報表的人都有遇過中文亂碼的問題吧
有的人開起來正常,有的人開起來亂碼
解法就是把檔案輸出成XLS的格式就沒問題了-使用套件PHPExcel (http://phpexcel.codeplex.com/)
程式邏輯想像你今天用Office Excel做CSV轉檔成XLS,就是用Excel打開一個CSV檔並另存新檔成XLS
Oscar 發表在 痞客邦 留言(0) 人氣(1,871)
國內的虛擬主機價格過高,又不能自己ssh進去coding (我用VIM)
朋友推薦這個國外主機就自由多了,可以ssh進去,又便宜又有固定IP
而且還是SSD : https://www.digitalocean.com/?refcode=08b0aaf45cc4
Oscar 發表在 痞客邦 留言(0) 人氣(109)
譜請按繼續閱讀
Google幫你找: https://www.google.com.tw/search?q=filetype%3Apdf+while+my+guitar+gently+weeps+jake
Oscar 發表在 痞客邦 留言(0) 人氣(405)

When I was playing in Los Angeles a few years ago I remember a jazz saxophonist telling me that rockabilly was too simple, it usually only had three chords. Then he listened to more of it and agreed with me that yes it has three chords but the feel and groove of how you play those three chords is not nearly as simple as it may seem.
Rockabilly comes from a time in which music had a big swing feel which was necessary for the dancers who wished to "dance to the bop", and has a kind of hillbilly approach to playing swing that gives it its own special rhythm. Let's try this in the key of E over standard 12-bar blues changes.
I have two basic rhythms to get started with. This one is an arpeggio style and the other in the following lesson is single 8th notes on low strings.
Oscar 發表在 痞客邦 留言(0) 人氣(56)

Now we will use different types of pick-style approaches to "stylize" the previous video's "upper-register common-tone" progressions. This video focuses on picking techniques inspired by Dave Matthews and Neil Young, and features some other arpeggiation approaches.
Oscar 發表在 痞客邦 留言(0) 人氣(23)

If I had to use one word to describe the overall sound of Gilmour's lead playing it would be "epic". He has played many great and original solos over the years, but in my opinion "epic" is what come to mind for most people. In this lesson I'll break down a solo in his style that incorporates many of the elements that make his soloing "epic".
Oscar 發表在 痞客邦 留言(0) 人氣(57)