這時執行query就會需到Mysql Server has gone away的錯誤 (uncaught exception)





function executeQuery($query) {
$sth = $this->Connect->prepare($query); try {
} catch (PDOException $e) {

/** 這邊會抓到PDO的Exception */ $this->connect(); //重新連線
/** 這邊也可以用遞迴 $this->executeQuery($query)*/ $sth=$this->Connect->prepare($query); $sth->execute($params);


補充,你可以判斷Exception的種類看是不是真的是Mysql Server has gone away,然後做是否重連線執行query的決定。




function executeQuery($query, $retry = 3) {

if ($retry == 0) {
return false;
$sth = $this->Connect->prepare($query); try {
} catch (PDOException $e) {

/** 這邊會抓到PDO的Exception */
$this->connect(); //重新連線
$sth=$this->executeQuery($query, $retry--);



, , , , , , , , , , ,

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()



通常用在需要大量呼叫SOAP API或RestfulAPI時使用





//A very basic job daemon that you can extend to your needs. 
class JobDaemon

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()



解法就是把檔案輸出成XLS的格式就沒問題了-使用套件PHPExcel (http://phpexcel.codeplex.com/)

程式邏輯想像你今天用Office Excel做CSV轉檔成XLS,就是用Excel打開一個CSV檔並另存新檔成XLS


, , , , ,

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

國內的虛擬主機價格過高,又不能自己ssh進去coding (我用VIM)


而且還是SSD : https://www.digitalocean.com/?refcode=08b0aaf45cc4

Digital Ocean, 一個月最便宜的專案是 5美金/月



Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()


 Google幫你找: https://www.google.com.tw/search?q=filetype%3Apdf+while+my+guitar+gently+weeps+jake

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

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.

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

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.

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

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".

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

Welcome to the wonderful world of acoustic fingerpicking! We are going to start right at the beginning with a simple pattern, and move all the way on through up to some techniques of the pros!
Let's start from the top, with a simple 4-step pattern.

This four-step fingerpicking pattern is a super-powerful building block for fingerstyle guitar.

For this pattern, play the sixth string (Low E) with a downward pluck of your thumb. Next, pluck upwards on the first string (high E string) with your middle finger. Next, pluck downwards on the third string (G string) with your thumb. Lastly, pluck upwards on the second string (B string) with your index finger.

This pattern of four steps constitutes one half measure of music in 4/4 time. The count is: One And Two And. To complete a full measure, simply play the pattern again, with this count: Three And Four And.

Repeat this pattern over and over, trying to maintain a consistent rhythm, and gradually building up your speed.

In the next lesson, we'll take a look at how to apply this pattern to a variety of chords.


Q: I see you are using only your thumb, index, and middle fingers? I've seen some players use three fingers, plus the thumb. Which is correct?

A: There is no absolute right or wrong to this. You'll hear opinions on both sides of the aisle. My personal preference is based on the tradition called "Travis Picking" named for guitarist Merle Travis. I personally feel this pattern of finger moves, which uses the thumb twice within the pattern, opens up more rhythmic possibilities as you get into more advanced techniques.


A: The signature "Travis" move is that alternating thumb beat - the fact that your thumb does double-duty, alternating between the bass note, and the third string (or a variation of that) of the guitar. That provides a steady rhythm against which you can then add ornamentations, syncopation, melody, etc. Some students ask why they can't do these same patterns using three fingers, and the thumb on the bass note only. Technically you may be able to, but in so doing you compromise that steady "thump thump" of the Travis-style thumb beats.

Q: Is it necessary to have long fingernails to play fingerstyle guitar?

A: No. My personal preference is to have long-ish nails on the thumb, index, and middle fingers of my right hand. However, many players prefer to play with short nails. There is a difference in tone when using nails vs. not using nails. With nails, the tone is a bit crisper, without nails, it is a bit more muted. It's a matter of personal preference.

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()


尋狗網: http://www.findingdog.com.tw/

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()



支出 存入 結餘
2013/4/5 線上捐款-捐款給喜憨兒基金會 1,933.00 0.00 0.20

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()
































Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

基本調弦可以用 G C E A
烏克麗麗好學的原因之一是,前三個音的GCE就是 C和弦的組成音

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()

 aNueNue超搶手烏克麗麗U900 熊野 (夏威夷小吉他)

Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()


Posted by Oscar at 痞客邦 PIXNET 留言(0) 引用(0) 人氣()