Pages

Saturday, July 5, 2014

How to Connect MTS Mblaze in Ubuntu10.04

After many struggling i am connecting Mblaze to Ubuntu10.04

1. Insert Modem into USB port
2. Its detected in Desktop Right click that Icon and click Eject.
3. Restart you computer
4. Click network port
5. it's ready to install in mobile port
6. Type User name : internet@internet.mtsindia.in Password: MTS
7. Select Connect Automatically (surely  it will connect)

Monday, June 17, 2013

Work Experience


I started my carrier in Accel Frontline Limited as a Administration & Ruby on rails Developers on Apr-2012. I have nice experience to work with Accel family. totally different environment & different people. I am very happy to work with Accel  till now i am working..

Monday, February 6, 2012

Raphael

       what is mean by Raphael :

Raphael is a small JavaScript library that should simplify your work with vector graphics on the web.
This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. RaphaĆ«l’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.

How to use it?

Download and include raphael.js into your HTML page, then use it as simple as:


 Example:
         ve.html

<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>LONI</title>
    <link rel="stylesheet" href="style.css" />
    <script type="text/javascript" src='jquery-1.6.4.min.js'></script>
    <script type="text/javascript" src='raphael.js'></script>
</head>

<body>
    <div id="canvas"></div>
 
 
  <script type="text/javascript">
    $(function() {
      // Create the canvas
      var paper = Raphael( 0, 0, $("#canvas").width(), $("#canvas").height());

      // Use Canvas to Draw Circle
      var c = paper.circle(100, 100, 20)
      c.attr({fill: '#f00', stroke:'#000'})
    });
  </script>
 
 
</body>
</html>

style.css

#canvas{
  position: absolute;
  top: 0px;
  right: 0px;
  width: 100%;
  height: 100%;
  background-color: silver;
  z-index: -1;
}

The output is:

                                   

Tuesday, January 10, 2012

How to create a form in PHP

coding: form.php

<html>
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" /><br/>
Age: <input type="text" name="age" /><br/>
      <input type="submit" />
</form>

</body>
</html>

welcome.php

<html>
<body>

Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.

</body>
</html>

The output is:




Tuesday, January 3, 2012

php code for daily notification

<html>
<body>
<?php
$today = date("l");
print("$today");
if($today == "Sunday")
{
$bgcolor = "#ffffff";
}
elseif($today == "Monday")
{
$bgcolor = "#ffff00";
}
elseif($today == "Tuesday")
{
$bgcolor = "126nh";
}
elseif($today == "Wednesday")
{
$bgcolor = "#00ffff";
}
elseif($today == "Thursday")
{
$bgcolor = "#ff0000";
}
elseif($today == "Friday")
{
$bgcolor = "#00ff00";
}
else
{ // Only Saturday remains
$bgcolor = "#0000ff";
}
print("<body bgcolor=\"$bgcolor\">\n");
?>
</body>
</html>

Tuesday, December 27, 2011

Data Definition Language (DDL):

Data Definition Language;

This is the definition level language which includes the following statements.

A) CREATE Statement
B) ALTER Statement
C) DROP Statement


A) CREATE Statement: This Statement is used for creating the database and its objects.

B) ALTER Statement: This Statement is used for modifying the database and its objects.

C) DROP Statement: This Statement is used for deleting the database and its objects.

create a TABLE (Syntax):

CREATE TABLE Tablename (Column1 Datatype, Column2 Datatype,……..)

Example:

CREATE TABLE CUSTOMER (CNO INT, CNAME VARCHAR (20), CITY VARCHAR9 (20));

Example:

CREATE TABLE EMP(EMPNO INT, ENAME VARCHAR(20),SAL MONEY,DEPTNO INT);

The above two queries creates two tables with names CUSTOMER, EMP.


ALTER the Database(Syntax):


In Three ways we can modify the tables

1. By adding the new column to the Existing Table
Syntax:

ALTER TABLE TABLENAME ADD NEWCOLUMN DATATYPE [,……..N]

Example:

ALTER TABLE EMP ADD BONUS MONEY

The above statement adds Bonus column to EMP table

2. By changing the Data type of an Existing column:

Syntax:

ALTER TABLE TABLENAME ALTER COLUMN COLUMNNAME NEWDATATYPE

Example: ALTER TABLE EMP ALTER COLUMN EMPNO BIGINT

The above statement changes the EMPNO data type from INT to BIGINT.

3. By Dropping the Existing column from Existing Table:

Syntax: ALTER TABLE TABLENAME DROP COLUMN COLUMNNAME [,……..N]

Example: ALTER TABLE EMP DROP COLUMN ENAME, SAL

The above statement deletes two existing columns ENAME, SAL from EMP Table.


DROP Database(syntax):

DROP DATABASE DATABASENAME

Example: DROP DATABASE NRSTT

The above statement deletes NRSTT database and its objects

Tuesday, October 4, 2011

Installing LAMP On Ubuntu For Newbies

Installing LAMP On Ubuntu For Newbies

in this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.

2. Copy/Paste the following line of code into Terminal and then press enter:

sudo apt-get install apache2
3. The Terminal will then ask you for you're password, type it and then press enter.

Testing Apache

To make sure everything installed correctly we will now test Apache to ensure it is working properly.

1. Open up any web browser and then enter the following into the web address:

http://localhost/

You should see a folder entitled apache2-default/. Open it and you will see a message saying "It works!" , congrats to you!


Install PHP

In this part we will install PHP 5.

Step 1. Again open up the Terminal (Applications > Accessories > Terminal).

Step 2. Copy/Paste the following line into Terminal and press enter:

sudo apt-get install php5 libapache2-mod-php5

Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this:

sudo /etc/init.d/apache2 restart


Test PHP

To ensure there are no issues with PHP let's give it a quick test run.

Step 1. In the terminal copy/paste the following line:

sudo gedit /var/www/testphp.php

This will open up a file called phptest.php.

Step 2. Copy/Paste this line into the phptest file:

<?php phpinfo(); ?>
Step 3. Save and close the file.

Step 4. Now open you're web browser and type the following into the web address:

http://localhost/testphp.php



Install MySQL

To finish this guide up we will install MySQL. (Note - Out of Apache and PHP, MySQL is the most difficult to set up. I will provide some great resources for anyone having trouble at the end of this guide.)

Step 1. Once again open up the amazing Terminal and then copy/paste this line:

sudo apt-get install mysql-server
Step 2 (optional). In order for other computers on your network to view the server you have created, you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnf file.

gksudo gedit /etc/mysql/my.cnf

Change the line

bind-address = 127.0.0.1
And change the 127.0.0.1 to your IP address.

Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal:

mysql -u root

Following that copy/paste this line:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

(Make sure to change yourpassword to a password of your choice.)

Step 4. We are now going to install a program called phpMyAdmin which is an easy tool to edit your databases. Copy/paste the following line into Terminal:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:

gksudo gedit /etc/php5/apache2/php.ini

Now we are going to have to uncomment the following line by taking out the semicolon (;).

Change this line:

;extension=mysql.so

To look like this:

extension=mysql.so


if you have problem or error go to visit : 

http://www.howtoforge.com/ubuntu_lamp_for_newbies