[公告] 痞客邦「應用市集」新 App 上架-iFontCloud Professional[公告] 痞客邦後台發表文章提供插入多張圖片新功能[公告]痞客邦新服務上線 部落客商店聚集就在《痞市集》[公告] 部落格「快捷功能BAR」改版介紹[公告] 痞客邦「快捷功能BAR」6月4日改版通知

 

Mr. Crowley - Ozzy Osbourne

Mr. Crowley, what went on in your head?
Oh, Mr. Crowley, did you talk to the dead?
Your life style to me seemed so tragic
With the thrill of it all
You fooled all the people with magic
Yeah, you waited on Satan's door

Mr. Charming, did you think you were pure?
Mr. Alarming, in nocturnal rapport
Uncovering things that were sacred
Manifest on this Earth
Conceived in the eye of a secret
And they scattered the afterbirth

Mr. Crowley, won't you ride my white horse?
Mr. Crowley, it's symbolic, of course
Approaching a time that is classic
I hear that maiden's call
Approaching a time that is drastic
Standing with their backs to the wall

Was it polemically sent
l want to know what you meant
I want to know, I want to know what you meant, yeah

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

如果程式沒有把參數用設定檔寫好的話,這個參數值可能就會用在很多程式碼中

突然參數值要改的話,就必需個檔一個檔開起來改很費時間

下面這個指令可以幫你找出所有副檔名是.php的檔,其中有包含 "要被取代的字" 的檔名有哪些,最後針對這些檔案做文字取代:

 

find . -name "*.php" | xargs grep "要被取代的字" | awk -F: '{print $1}' | uniq | xargs sudo sed -i "s/要被取代的字/取代後的字/g"

, , , , , , , , ,

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

有時候在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

 

簡單寄檔案:

> echo "As Attached" | mail -s "標題哥" -a "/檔案路徑/檔名.tar" receiver@mail.com

, , , , , , , , , ,

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

有時候PDO物件連線,然後程式在處理大量資料時,Mysql等太久最後timeout斷線了

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

一昧的加大timeout,不如直接Catch這個Exception

範例程式如下:

失敗後重連線一次

 /** 
截取我的程式的一部分
$this->Connect是我的PDO物件*/

function executeQuery($query) {
$sth = $this->Connect->prepare($query); try {
$sth->execute($params);//執行query
} 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的決定。

當然你也可以設retry,用遞迴的方式把retry的次數繼續往下帶:

 

 /** 
遞廻方式
*/

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

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

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

}
.
(略)
.
.
}

 

, , , , , , , , , , ,

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

此範例來自

http://www.php.net/manual/en/function.pcntl-fork.php

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

比方說我有1000張照片,我要用API取得這1000張照片的資訊,每呼叫一次api就需要1秒

1000張就約需要1000秒

如果用multi-process,一次送25個request,相當於速度提升25倍(不考慮其他因素如cpu、memory、api端的loading)

 

<?php 
declare(ticks=1); 
//A very basic job daemon that you can extend to your needs. 
class JobDaemon

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

相信有用PHP輸出CSV報表的人都有遇過中文亂碼的問題吧

有的人開起來正常,有的人開起來亂碼

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

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

 

, , , , ,

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

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

朋友推薦這個國外主機就自由多了,可以ssh進去,又便宜又有固定IP

而且還是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.

COMMONLY ASKED FINGERPICKING QUESTIONS:

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.

Q: What is "TRAVIS PICKING?"

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) 人氣()

最近在路上常有看到在賣愛心餅干的人,請大家幫他們建家園><,也謝謝大家的小亮的支持,對於blog所放的廣告賺的錢,通通都捐出去囉~
日期

摘要

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

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

對於有興趣學習烏克麗麗的你,第一個遇到的問題應該是如何選一把好的烏克麗麗吧!

挑烏克麗麗就和挑選吉他差不多,我通常用過濾的方式挑選

如果已經有鎖定特定品牌的話,其實就已經刪掉一大半了,基本上我們還是相信較好的品牌有較好的品質

1、選Size  
 
    市面上常見的有21"與23"兩種,21"的只有12格,23吋的約有17格,再來就26"

    如果你是想彈演奏曲的,不建議買21",因為可以演奏的音域有限。


 
2、外型

    選一個自己喜歡的外型,外型為什麼重要呢?因為就算彈的不好,拍照的時候至少好看XD!!!

    有的琴會有缺角,那是讓你高把位時比較好按,依個人喜好與演奏需要挑選吧!

3、音準

    一把音不準的樂器就算聲音再好都沒用,就像聲音好聽的人,但一直走音...

    拿調音器把烏克麗麗的音調準,再一格一個的check,和調音器對

    低階的琴一般來說音都會跑掉一點,如果只有一點還可以調整,如果跑掉太多就不用考慮了

    可以先從第12格開始檢查,如果空弦音是C,那按第12格應該也要是C,而且調音器的準度一定要在中間!

    12格都不準我覺得其他的音也不會準到哪去。

    如果高把位的地方會打弦(撥弦的時候,會有弦打到指板的聲音)的也不要選。

4、手感

    可以用左手在琴頸上滑來滑去試試,並按看看弦,看看好不好按,弦距(弦與指板的距離)是否太高

    推弦看看,看弦與指板在推弦的時候會不會不好推,或是有卡卡的,有不好的磨擦聲。

5、做工

    仔細的看琴的接縫處或是其他小細節,漆是否上不好,木頭是否裂掉、面板是否有損傷

    看看弦鈕是否鬆鬆的,太鬆的音調不準,彈一下音就跑掉了

    如果做工不好的琴,想必品質控管不是很好,一般來講,成本應該也比較低,可以殺價一下。

6、音色

    基本上有附合以上1~4點的,都可以是一把好的練習琴了,如果真的要上台表演,音色是很重要的一點

    音色好的琴,彈出來像CD,音色差的像"抬D"

    可以感受一下撥完或刷完弦後,音是否有持續響約8秒,整個琴的共嗚是否好,感受一下琴的震動

    音量是否夠大,聲音會不會太尖等等。

    通常要彈過音色好的高級琴,才會真的對音色有感覺…因為真的差很多。

7、額外選擇

    可以依需求看要不要選可以插電的等等。

以上是小亮在選琴的一些看法,有其他看法的朋友也歡迎補充:D

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