sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type Boolean --set /apps/gdm/simple-greeter/disable_user_list True
function ReplaceByDashes(string){
return string.replace(/\s/g,'-');
}
// run it
var string = "Hello my beautiful world!";
string=ReplaceByDashes(string);
alert(string);
if(typeof String.prototype.rbd==='undefined'){ // we have to check if someone hasn't added it already
String.prototype.rbd = function(){
return this.replace(/\s/g,'-');
}
}
// run it
var string = "Hello my beautiful world!";
string=string.rbd();
alert(string);
String.prototype.ucFirst = function () {
return (this.substr(0,1).toUpperCase() + this.substr(1,this.length));
}
UPDATE Dest
SET Dest.Address1 = Src.Address1,
Dest.Address2 = Src.Address2
FROM SourceTableName Src
JOIN DestinationTableName Dest ON Dest.PersonID = Src.PersonID
UPDATE DestinationTableName Dest, SourceTableName Src
SET Dest.Address1 = Src.Address1,
Dest.Address2 = Src.Address2
WHERE Dest.PersonID = Src.PersonID
RewriteEngine on
RewriteCond %{REMOTE_HOST} !^192\.168\. #any ip from 192.168.0.0 to 192.168.255.255
RewriteCond %{REMOTE_HOST} !^192\.190\.1\.86 #just some IP that will be allowed too
RewriteCond %{REQUEST_URI} /.*$
RewriteCond %{REQUEST_URI} !/maintenance\.html$ #users that aren't allowed will see this page
RewriteCond %{REQUEST_URI} !(css|png|jpg)$ # if maintenance.html consists images, you have to allow them either.
RewriteRule .* maintenance.html [R=301,L]
1. Pick a font you want to use for your menu. I recommend a nice easy-to-read monospace font such as DejaVu Sans Mono (it's in the example below).
2. Convert the font to grub2's format using the grub-mkfont command, taking the extra step of setting the font size:
sudo grub-mkfont --output=/boot/grub/DejaVuSansMono.pf2 \ --size=24 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
3. GRUB_FONT=/boot/grub/DejaVuSansMono.pf2
GRUB_FONT=/boot/grub/DejaVuSansMono.pf2
4.
sudo update-grub
gconftool-2 --set "/apps/metacity/general/button_layout" --type string "menu:minimize,maximize,close"
export XKL_XMODMAP_DISABLE=1
gconftool-2 -t bool --set /apps/gnome_settings_daemon/plugins/keyboard/active false
$ git fsck --lost-found
dangling commit 9dbd85d427b32773aee016efc7912f9d1c39aac4
dangling commit 604948146be1bdc2181962543cca039c18cc06b4
git reflog expire --expire=now --all #Dangerous command, it will be very difficult to recover stuff later on, if you execute it
git gc --prune=now
#include <iostream>
using namespace std;
int fib (int n)
{
if (n == 0)
{
return 0;
}
else if (n == 1)
{
return 1;
}
else
{
return fib (n - 1) + fib (n - 2);
}
}
int main ()
{
int num;
cout << "Which Fibonacci number? ";
cin >> num;
cout << "The number is " << fib (num) << endl;
return 0;
}