Total Pageviews

Sunday, November 13, 2011

Quote


Don’t make something unless it is both
necessary and useful; but if it is both
necessary and useful, don’t hesitate to
make it beautiful.

Thursday, November 3, 2011

Tuesday, November 1, 2011

variables in PHP


Some key points to remember when declaring variables in PHP
  • Remember to always put $ sign in front of variable names. That tells PHP that we're working with a variable.
  • In PHP a variable name must start with a letter or an underscore followed by combination of letters, number or underscores.
  • PHP variables are case sensitive, that means they could be either lower case or upper case or combination of both.
  • You don't have to worry about declaring the type of the variable. For example strings and integers are declared the same way.
  • It's good practice to initialize a variable i.e. assign it a value. Uninitialized variables in PHP have a value of either false, empty string or empty array.

Howto add fonts to Ubuntu 11.10



There is a lot of fonts in Ubuntu 11.10 repository but not enough to maintain the stability of documents created from Windoze environment because you need the same font used for those documents yet some of them were not in the repository at all. Here is what I've done to manage this :

1. Create a .fonts folder in your Home directory
2. Copy the ttf files you have (you can download some free true type fonts or just copy it from Windoze folder.
3. Open your terminal emulator and type sudo fc-cache -fv
4. Done

Sunday, October 30, 2011

PHP quick checklist ..


PHP quick checklist The main points:



  • Always give PHP pages the correct filename extension, normally .php.
  • Enclose all PHP script between the correct tags: <?php and ?>.
  • Avoid the short form of the opening tag: <?. Using <?php is more reliable.
  • PHP variables begin with $ followed by a letter or the underscore character.
  • Choose meaningful variable names and remember they’re case-sensitive.
  • Use comments to remind you what your script does.
  • Remember that numbers don’t require quotes, but strings (text) do.
  • You can use single or double quotes, but the outer pair must match.
  • Use a backslash to escape quotes of the same type inside a string.
  • To store related items together, use an array.
  • Use conditional statements, such as if and if... else, for decision making.
  • Simplify repetitive tasks with loops.
  • Use functions to perform preset tasks.
  • Display PHP output with echo or print.
  • Inspect the content of arrays with print_r().
  • With most error messages, work backward from the position indicated.
  • Keep smiling—and remember that PHP is not difficult.


Saturday, October 29, 2011

GTK-WARNING **: UNABLE TO LOCATE THEME ENGINE IN MODULE_PATH: “PIXMAP”


sudo apt-get install gtk2-engines-pixbuf
^^^^^^^^^^^^^^^^^^^^^
You want to do this.
If running kiba-dock from command line you may notice you’re getting a Gtk warning where it complains of its inability to locate the theme engine module_path pixmap – as seen below.
macewan@moc:~$ kiba-dock
(kiba-dock:21995): Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”,
** Message: Cant copy /usr/share/applications/gnome-file-roller.desktop to /home/macewan/.kiba-dock/gnome-file-roller.desktop
** Message: Cant copy /usr/share/applications/epiphany.desktop to /home/macewan/.kiba-dock/epiphany.desktop
macewan@moc:~$ sudo apt-get install gtk2-engines-pixbuf
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
gtk2-engines-pixbuf
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 148kB of archives.
After unpacking 246kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com edgy/universe gtk2-engines-pixbuf 2.10.6-0ubuntu1 [148kB]
Fetched 148kB in 0s (176kB/s)
Selecting previously deselected package gtk2-engines-pixbuf.
(Reading database … 120211 files and directories currently installed.)
Unpacking gtk2-engines-pixbuf (from …/gtk2-engines-pixbuf_2.10.6-0ubuntu1_i386.deb) …
Setting up gtk2-engines-pixbuf (2.10.6-0ubuntu1) …
macewan@moc:~$ kiba-dock
** Message: Cant copy /usr/share/applications/gnome-file-roller.desktop to /home/macewan/.kiba-dock/gnome-file-roller.desktop
** Message: Cant copy /usr/share/applications/epiphany.desktop to /home/macewan/.kiba-dock/epiphany.desktop
*note: the solution to the *.desktop errors should be obvious enough
*note: this work is taking place on the Edgy flavor of Ubuntu :-)

Wednesday, September 14, 2011

Phones ....

محمد زكي

 admin@id3m.net
0020102350070



محمود عبد المجيد

Maado

002019881145

maa.do@hotmail.com
sad.maaado@gmail.com


  M.Zaki :   +20102350070
  Maaado : +20198811445