Create a file called /etc/modprobe.d/blacklist-kvm.conf:
(For example, you can use gedit gksu gedit /etc/modprobe.d/blacklist-kvm.conf or nanosudo nano /etc/modprobe.d/blacklist-kvm.conf)
Put in it the following three lines:
blacklist kvm
blacklist kvm_intel
blacklist kvm_amd
来源:http://askubuntu.com/a/312858… Read More
Please get a working ethernet connection temporarily and do:
sudo apt-get update
sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install linux-firmware-nonfree
来源:http://askubuntu.com/a/337187… Read More
Method 1
Using gparted format the drive FAT16, set the boot flag.
Using Archive Manager extract the iso to the drive.
(or just copy the DVD to the drive).
That’s it.
works for me
Method 2
To create your bootable installer disc, select an ISO image or CD/DVD disc, and click Install
This will create your Windows Vista/7 installer USB. It is
We know Magento support multiple currency. I have found the solution to check current currency in the Magento site frontend
To get Current Currency
<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>
If you looking for current currency symbol use :
<?php echo Mage::app()->getLocale()-&g… Read More
在网站搬家、更换域名的时候,Drupal和Wordpress都是用的MySQL的数据库,很多配置信息是写在MySQL数据库里面的。我们需要将数据库里面的相关配置信息替换成新空间或域名的信息。这时我们就要用到MySQL的字符串替换函数Replace了。
MySQL Replace 替换函数语法:
update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, "find this string", "replace found string with this string");
Replace 替换函数案例:
update client_table set url = replace(url, "py… Read More
PHP方法:
<?php
$str = " This line containstliberal rn use of whitespace.nn";
// First remove the leading/trailing whitespace
//去掉開始和結束的空白
$str = trim($str);
// Now remove any doubled-up whitespace
//去掉跟隨別的擠在一塊的空白
$str = preg_replace('/s(?=s)/', '', $str);
// Finally, replace any non-space whitespace, with a space
//最後,去掉非space 的空白,用一個空格代替
$st… Read More
CREATE TABLE myTable(
id INT NOT NULL AUTO_INCREMENT PRIMARy KEY,
name VARCHAR(100),
city VARCHAR(100));
INSERT INTO myTable (name, city) VALUES ('test', 'anza');
INSERT INTO myTable (name, city) VALUES ('fish', 'riverside');
SELECT *
FROM myTable
WHERE 'anza city' LIKE CONCAT('%', city, '%') OR 'riverside county' LIKE CONCAT('%', city, '%… Read More