最近買了電光火石(http://www.firestone.idv.tw/)的fubar II usb DAC,果然得到了相當不錯的音質,雖然我沒有很高檔的設備來互相做對照組,可是效果還是相當令人滿意,用了一個月下來基本上也沒什麼問題。我用的軟體foobar2000和media player classic都可以設定使用usb device來做聲音的output,而遊戲還是使用主機板內建的音效,因為我玩遊戲(WOW)時比較少在聽音效,所以就沒有使用usb device來發聲。
一邊玩遊戲,一邊聽音樂感覺真是不錯阿,之前內建的主機板音效,不但失真嚴重,而且會有聲音停頓,找不出是什麼原因,真是讓人不爽,這也是我為什麼會想買fubar II的原因囉。
2007/08/31
2007/07/24
10 Tips That Every PHP Newbie Should Know
10 Tips That Every PHP Newbie Should Know
Jeffery Vaska
Tip 6: Single and double quotes
Single and double quotes confused me for some time and it really should not have. I see this quite often in the forum as well. It's very easy to understand that double quotes allow php to parse and single quotes do not. Here are some examples:
$var = $value; // ok
$var = "$value"; // ok, but double quotes are not necessary
$var = '$value'; // will not work (single quotes will not allow parsing)
('.' the period adds/connects variables, functions, etc. together.
Oftentimes programmers will leave spaces around the ' . ' to make
things easier to read.)
$var = 'This is the ' . $value . ' of things.'; // ok - preferred
technique
$var = "This is the $value of things."; // ok, but harder to read/debug
$var = 'This is the $value of things.'; // will not parse $value
$var = This is the $value of things.; // error
$var = $array['name']; // ok, generally the preferred technique
$var = $array["name"]; // ok, but why use double quotes if they are not
necessary?
$var = "$array[name]"; // ok, but harder to read/debug - poor coding
style
$var = 'Name: ' . $array['name']; // ok - preferred technique
$var = "Name: $array[name]"; // ok, but harder to read/debug - poor
coding style
$var = "Name: $array["name"]"; // error
$var = "Name: $array['name']"; // error
exampleFunction($value); // ok
exampleFunction("$value"); // ok, but double quotes are not necessary
exampleFunction('$value'); // will not parse $value
http://www.phpbuilder.com/columns/vaska20050722.php3?aid=948
http://www.phpbuilder.com/columns/vaska20050812.php3
Jeffery Vaska
Tip 6: Single and double quotes
Single and double quotes confused me for some time and it really should not have. I see this quite often in the forum as well. It's very easy to understand that double quotes allow php to parse and single quotes do not. Here are some examples:
$var = $value; // ok
$var = "$value"; // ok, but double quotes are not necessary
$var = '$value'; // will not work (single quotes will not allow parsing)
('.' the period adds/connects variables, functions, etc. together.
Oftentimes programmers will leave spaces around the ' . ' to make
things easier to read.)
$var = 'This is the ' . $value . ' of things.'; // ok - preferred
technique
$var = "This is the $value of things."; // ok, but harder to read/debug
$var = 'This is the $value of things.'; // will not parse $value
$var = This is the $value of things.; // error
$var = $array['name']; // ok, generally the preferred technique
$var = $array["name"]; // ok, but why use double quotes if they are not
necessary?
$var = "$array[name]"; // ok, but harder to read/debug - poor coding
style
$var = 'Name: ' . $array['name']; // ok - preferred technique
$var = "Name: $array[name]"; // ok, but harder to read/debug - poor
coding style
$var = "Name: $array["name"]"; // error
$var = "Name: $array['name']"; // error
exampleFunction($value); // ok
exampleFunction("$value"); // ok, but double quotes are not necessary
exampleFunction('$value'); // will not parse $value
http://www.phpbuilder.com/columns/vaska20050722.php3?aid=948
http://www.phpbuilder.com/columns/vaska20050812.php3
訂閱:
文章 (Atom)