| Mobile | RSS

Using custom fonts on websites

Posted by ramanean on July 20th, 2010 | No Comments | Posted in Coding, General


How to embed fonts in a webpage? or How to use custom fonts in a webpage?

The below tutorial would explain how to embed and use custom fonts in a webpage

There are many new fonts available in the web other than…

Read More

Creating a file in Unix

Posted by ramanean on July 16th, 2010 | No Comments | Posted in Coding, Ubuntu


To Create file in unix use this command

cat > a1.txt

Once this entered you can edit the contents of the file by typing anything and then pressing CTRL+D for saving it

Read More

Multiple order by SQL

Posted by ramanean on June 8th, 2010 | No Comments | Posted in Coding


To display a table sorted out by multiple columns use this command below

E.g

I am having a table like this

Requirement:

So now I need to get the table ordered by checkins first and then by nightsout

Solution:
SELECT *FROM `foursquare_rank`ORDER BY `checkins` DESC ,…

Read More

Latitude and Longitude distance at the poles

Posted by ramanean on May 5th, 2010 | No Comments | Posted in Coding


Here you go

One degree of latitude = 111.69 km or 69.40 mi
One minute of latitude = 1.86 km or 1.16 mi
One second of latitude = 31.03 m or 101.79 ft

Read More

Creating a new table and exporting the SQL data

Posted by ramanean on May 5th, 2010 | No Comments | Posted in Coding


It’s also possible to create a table using the structure from another table./

The example is given below..

This table with create a student2 table with same structure as student and this would contain the data when class=Four”

CREATE TABLE student2 SELECT *…

Read More

Exporting SQL data from one table to another table

Posted by ramanean on May 5th, 2010 | 1 Comment | Posted in Coding


To copy or export data from one SQL table to another table use the command below

insert into student2 select * from student;

So when the above code is executed each and every row in student would be inserted to student2.

And also…

Read More

Converting first character in word/string to uppercase in Php

Posted by ramanean on April 6th, 2010 | No Comments | Posted in Coding


To convert first character of the word to uppercase you can use the below built in function “ucfirst”


$name='techretold'
$name1=ucfirst($name);
echo $name;

Output:
Techretold

Read More

Converting Uppercase to lowercase in Php

Posted by ramanean on April 6th, 2010 | No Comments | Posted in Coding


To convert uppercase to lowercase characters in Php you can use strtolower function in Php

<?

$a=’TECHRETOLD’;
$b=strtolower($a);
echo $b;
?>

Output:
techretold

Read More

Space between characters using CSS

Posted by ramanean on January 24th, 2010 | No Comments | Posted in Coding


To leave space between characters use the following code

h1 {letter-spacing:2px}

This can be used for any div class and if the spacing is in positive then there would be more space between characters whereas if it’s negative there would be less…

Read More

Installing Python MySQLDb module for Python 2.6

Posted by ramanean on January 24th, 2010 | No Comments | Posted in Coding


Follow the below steps to install MySQL module for Python 2.6

Pre-requisites
1.Python 2.5 version should be installed

Steps:
1.Download  MySQL DB Module for Python 2.6 from technicalboard

2.Double click on the downloaded file to install it it C:\Python26\

Verification

3.Now go to cmd and python folder (C:\Python25)

4.Enter Python.exe…

Read More