add

Saturday, March 12, 2011

promote your business and post jobs

promote your business and post/get jobs for free at http://www.electronicpakistan.com/
no need to login

Tuesday, March 8, 2011

Installing Apache2 With PHP5 And MySQL On Ubuntu 10.10 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 10.10 server with PHP5 support (mod_php) and MySQL support.

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root:
sudo su

2 Installing MySQL 5

First we install MySQL 5 like this:
aptitude install mysql-server mysql-client

You will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on:
New password for the MySQL "root" user: <-- yourrootsqlpassword
Repeat password for the MySQL "root" user: <-- yourrootsqlpassword

3 Installing Apache2

Apache2 is available as an Ubuntu package, therefore we can install it like this:
aptitude install apache2
Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page (It works!):
Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the /etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d.

4 Installing PHP5

We can install PHP5 and the Apache PHP5 module as follows:
aptitude install php5 libapache2-mod-php5
We must restart Apache afterwards:
/etc/init.d/apache2 restart

5 Testing PHP5 / Getting Details About Your PHP5 Installation

The document root of the default web site is /var/www. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.
vi /var/www/info.php
<?php phpinfo(); ?>
Now we call that file in a browser (e.g. http://192.168.0.100/info.php):
As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.

6 Getting MySQL Support In PHP5

To get MySQL support in PHP, we can install the php5-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
aptitude search php5
Pick the ones you need and install them like this:
aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
Now restart Apache2:
/etc/init.d/apache2 restart
Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

7 phpMyAdmin

phpMyAdmin is a web interface through which you can manage your MySQL databases. It's a good idea to install it:
aptitude install phpmyadmin
You will see the following questions:
Web server to reconfigure automatically: <-- apache2
Configure database for phpmyadmin with dbconfig-common? <-- No
Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/:

Wednesday, February 16, 2011

market your product and Post jobs (www.electronicpakistan.com)

www.electronicPakistan.com provide a huge upsurge in sales, and a significant decrease in expenses, thus making it a clever and astute business move. A website:

* Acts as an inexpensive showroom, storefront and salesperson to your local market and beyond — 24 hours a day, seven days a week.
* Serves to satisfy the phenomenon of customers increasingly researching purchases before buying, thus leading to an informed customer who is ready to buy.
* Allows for mailing lists to send the same email message to hundreds of customers for the same cost as sending to one. No more huge postal costs, or licking envelopes.
* Can provide answers to frequently asked questions, which reduces the costs of staff having to answer the same thing over and over.
* Provides a shopping experience that is both convenient and timesaving. (And for women, satisfying!)
* Gives your business a great advantage over your competitors and consequently provides an opportunity to capture their market share.
* Doesn’t limit a business to its location; you can reach a wider and more diversified market.
* Makes it easy to collect and collate information on the purchasing patterns of your customers, thereby allowing a vendor to cost effectively alter their sales and promotion methods.
* Can accept automated orders and payments for products.
* Can facilitate an online database of products, which is quick and easy to modify; whereas traditional media catalogues cannot be altered without great expense.

Sunday, February 21, 2010

What is jQuery

jQuery is an amazing JavaScript library that makes it easy to create wonderful web effects in just a few lines of code. As the website says:”

“jQuery is a JavaScript library that takes this motto to heart: Writing JavaScript code should be fun. jQuery achieves this goal by taking common, repetitive, tasks, stripping out all the unnecessary markup, and leaving them short, smart and understandable.”

Maybe you are thinking… “Why I would need another JavaScript library”? Just give a try and you will see how simple and powerful it is even if you have already used Moo.fx, Scriptaculous, TW-SACK or Prototype.
Why I should use jQuery?

Simple. In just one glance at the source code of a page using jQuery you’ll see how easy it is to use, how much it accomplishes in so few lines of code, and how graceful it is.

My mind was opened one day when I stumbled across some code written with jQuery. I was flipping through the RSS feeds and reading my daily dose of web design blogs when I came across an example of JavaScript loveliness that used jQuery. Truth be told, the code on that site had some browser related bugs… but the concept was something I hadn’t seen before.
What about the code?

The code looked almost simple. Like nothing I had seen before. It made sense.

I started reading through the documentation and was amazed to see how much could be done with so little extra code.
When you can use jQuery?

You should use jQuery when you need:

* A small library that gives you powerful control over the Document Object Model
* With very little effort or work on your part

Or

* Quick access to AJAX
* Without a lot of bloat (overhead - wasted code)
* And some basic animation effects to spice things up

But…

If you need super fancy effects for animation, drag and drop, and super smooth animation then you’ll probably want to use Prototype and one of the many great library created to enhance the effects.
Where to get it?

You can download the source code (15k), a lot of plugins and read some excellent tutorials at the jQuery website. jQuery was created by John Resig.

Wednesday, December 2, 2009

How To Install Dreamweaver CS3 In Ubuntu Hardy


It would be great if there is a Linux build of the popular Dreamweaver CS3, or that it could be easily installed via WINE. The truth is, none of the above work. There is no Linux version, nor will it work via WINE direct installation. The only way to get it to work is to port it over from a Windows installation.
If you are new to Dreamweaver CS3, it is one of the best, if not, the best web editor software in the market. While there are many open source and free web editors out there, none of them come close to it in term of quality and capability. Although it comes with a hefty price tag of $399, it is well worth the money if you are into serious web developing. As such, if you wish to follow this guide and install Dreamweaver CS3 in your Ubuntu machine, please make sure you have the licensed copy, or proceed to Adobe to make your purchase. Do not attempt to use illegal software.
Initial Installation – WINE
We will need WINE to create a Windows environment for Dreamweaver. If you have already installed WINE, you can skip to the next section.
sudo apt-get install wine
winecfg
The WINE configuration window will pop up. Click OK to close the window. You can now find a .wine folder in your Home directory (if you can’t see it, go to View and check “Show Hidden Files“).
Porting Dreamweaver CS 3 From Windows
Install your Dreamweaver CS 3 in Windows. (For this step, I would advise you to install it on a Windows virtual machine so that you can transfer files between the two OS easily later on.)
Now there are 5 main folders that you need to copy to your Ubuntu machine.
1) Open up File Manager and navigate to C:\Program Files. Copy the whole ‘Adobe‘ folder to Ubuntu /home/username/.wine/drive_c/Program Files folder.
2) Still in the Windows File manager, navigate to C:\Documents and Settings\your-windows-user-name\Application Data (if you can’t find the Application Data folder, go to Tools->Folder Option->View and select ‘show hidden files and folders‘) and copy the whole ‘Adobe‘ folder to Ubuntu /home/username/.wine/drive_c/windows/profiles/All Users/Application Data/
3) In the Windows File manager, go to C:\Program Files\Common Files and copy the whole ‘Adobe‘ folder to Ubuntu /home/username/.wine/drive_c/Program Files/Common Files4) In the Windows file manager, go to C:\WINDOWS\system32 and copy the whole ‘marcomed‘ folder to Ubuntu /home/username/.wine/drive_c/windows/system325) In the Windows file manager, go to C:\WINDOWS and copy the whole ‘WinSxS‘ folder to Ubuntu /home/username/.wine/drive_c/windows
Next, we need to import the Dreamweaver registry to WINE.
In your Windows,
go to Start->Run. Type in ‘regedit‘ and press Enter.
In the window that pop up, on the left pane, navigate to HKEY_LOCAL_MACHINE-> SOFTWARE->Adobe->Dreamweaver. Right click on the ‘Dreamweaver‘ folder and select ‘Export’. Save the file as dreamweaver.reg
Copy this dreamweaver.reg to your Ubuntu home folder.
Now you need to convert the registry file to ASCII format.
sudo apt-get install recode
recode ucs-2..ascii dreamweaver.reg
wine regedit dreamweaver.reg
At this time, you have successfully ported all the necessary files from Windows to Ubuntu. To test your installation:
cd .wine/drive_c/Program\ Files/Adobe/Adobe\ Dreamweaver\ CS3/
wine Dreamweaver.exe
Dreamweaver CS3 should now launch.
Creating entry in Applications menu
To create an entry in your Applications menu, right click on the Applications menu and select ‘Edit Menus’.
Scroll down to the Wine->Programs entry and select New Item. Enter the following
Type: Application
Name: Dreamweaver CS3
Command: wine /home/username/.wine/drive_c/Program\ Files/Adobe/Adobe\ Dreamweaver\ CS3/Dreamweaver.exe
Click Close. You should now see an entry in your Application menu. You can drag the entry to your desktop or to the panel to create a shortcut.

Friday, October 30, 2009

HTML Tags

Beginning HTML Tags!

A web browser reads an HTML document top to bottom, left to right. Each time the browser finds a tag, it is displayed accordingly (paragraphs look like paragraphs, tables look like tables, etc). Tags have 3 major parts: opening tag(s), content(s), and closing tag(s). Recall that a completed tag is termed an element. By adding tags to an HTML document, you signal to the browser "Hey look, I'm a paragraph tag, now treat me as such."
As you will learn, there are probably hundreds of HTML Tags. Tables, images, lists, forms, and everything else being displayed on an web page requires the use of a tag or two.
HTML Code:
<openingtag>Content</closingtag>
<p>A Paragraph Tag</p>
Tags should be lower-case letters if you plan on publishing your work. This is the standard for XHTML and Dynamic HTML. Here's quick look at some HTML tags.
HTML Tags:

<body>Body Tag (acts as a content shell)
<p>Paragraph Tag</p>
<h2>Heading Tag</h2>
<b>Bold Tag</b>
<i>Italic Tag</i>
</body>
Tags Without Closing Tags
There are a few tags that do not follow the mold above. In a way, they still have the 3 parts (opening/closing and content). These tags however do not require a formal </closingtag> but rather a modified version. The reason being that these tags do not really require any content. Rather some of them just need a source URL and this is enough information for the web browser to display the tag properly (image tags). Let's take a look at a line break tag.
HTML Code:
<br />
To tell the browser we want to place a line break (carriage return) onto the site, it is not necessary to type <br>linebreak</br>. If every line break tag needed all three components as other do, life would become redundant real quick. Instead the better solution was to combine the opening and closing tags into a single format. Other tags have also been modified such as the image tag and input tag.
HTML Code:
<img src="../mypic.jpg" /> -- Image Tag
<br /> -- Line Break Tag
<input type="text" size="12" /> -- Input Field
Display:


--Line Break--

As you can see from the above image tag, your browser is completely capable of interpreting this tag so long as we tell the browser where the image is located using the src attribute. More on attributes in the next lesson.
Beginning HTML Tags!

A web browser reads an HTML document top to bottom, left to right. Each time the browser finds a tag, it is displayed accordingly (paragraphs look like paragraphs, tables look like tables, etc). Tags have 3 major parts: opening tag(s), content(s), and closing tag(s). Recall that a completed tag is termed an element. By adding tags to an HTML document, you signal to the browser "Hey look, I'm a paragraph tag, now treat me as such."
As you will learn, there are probably hundreds of HTML Tags. Tables, images, lists, forms, and everything else being displayed on an web page requires the use of a tag or two.
HTML Code:
<openingtag>Content</closingtag>
<p>A Paragraph Tag</p>
Tags should be lower-case letters if you plan on publishing your work. This is the standard for XHTML and Dynamic HTML. Here's quick look at some HTML tags.
HTML Tags:
<body>Body Tag (acts as a content shell)
<p>Paragraph Tag</p>
<h2>Heading Tag</h2>
<b>Bold Tag</b>
<i>Italic Tag</i>
</body>
Tags Without Closing Tags
There are a few tags that do not follow the mold above. In a way, they still have the 3 parts (opening/closing and content). These tags however do not require a formal </closingtag> but rather a modified version. The reason being that these tags do not really require any content. Rather some of them just need a source URL and this is enough information for the web browser to display the tag properly (image tags). Let's take a look at a line break tag.
HTML Code:
<br />
To tell the browser we want to place a line break (carriage return) onto the site, it is not necessary to type <br>linebreak</br>. If every line break tag needed all three components as other do, life would become redundant real quick. Instead the better solution was to combine the opening and closing tags into a single format. Other tags have also been modified such as the image tag and input tag.
HTML Code:
<img src="../mypic.jpg" /> -- Image Tag
<br /> -- Line Break Tag
<input type="text" size="12" /> -- Input Field
Display:

--Line Break--
As you can see from the above image tag, your browser is completely capable of interpreting this tag so long as we tell the browser where the image is located using the src attribute. More on attributes in the next lesson.