Archive for the ‘Tutorial’ Category
Remove Multiple Spaces in String to Single Space
It’s much easier to remove spaces in php with a simple for loop.
$array = explode(” “, $keyword);
$output = “”;
for ($i=0; $i<sizeof($array); $i++) {
if ($array[$i] != “”) {
$output = $output.” “.$array[$i];
}
}
$output = trim($output);
apt-get Reinstall Apache2 Config Files
This Works:
After spending half a night trying the wrong way, i finally got apt-get in Ubuntu 9.10 to reinstall the apache configuration files. All you have to do is:
#sudo apt-get purge apache2.2-common
#sudo apt-get install apache2.2-common
Not Working:
I tried looking for several answers, all so close, yet all none working
http://ubuntuforums.org/showthread.php?t=1055112
http://ubuntuforums.org/showthread.php?t=296875
http://linux.derkeiler.com/Mailing-Lists/Ubuntu/2006-10/msg00759.html
and even my own thread, that no one [...]
How to mount a Samba Share in Ubuntu
I keep forgetting the command for this, so I’m making this post as a reference for myself
sudo smbmount //192.168.0.100/boxee/Music /mnt/music -o username=boxee
