Are You Lazy To Type Some Extension in the URL Bar (i.e .wordpress.com)


Hai Friends,

The Ctrl+Enter shortcut is probably one of the most useful keyboard combinations for your daily browsing, as it automatically adds the necessary http:// prefix and .com suffix to open any website.

But what if you visit other domains more often than the .com itself, As well as above i told? Use URL Suffix and you’ll be able to customize this shortcut, as well as the Shift+Enter for .net addresses and the Shift+Ctrl+Enter for .org ones.

You can change the prefixes and suffixes which are used to complete a URL on the location bar when using the Control+Enter, Shift+Enter or Alt+Enter key combination.

Basically I’m very lazy boy. 😉 bcoz it’s lazy to type thasulinux”.wordpress.com”. 😛 So, today i searched in google. Finally i got this solution from the Firefox Web Browser. It  will provide this Add-on  called as “URL Suffix”.when you add it in your browser, you no need to type some long extensions in the URL. 😉

To install it in your browser:

Select the "Tools & Add-ons"

 

 

Search in the "search box"

Click the "Add to Firefox"

Click the "Install Now" button

Click the "Restart Firefox" button

Again click, Tools--> Add-ons-->Extensions

Here, Set your options & Enjoy 😉

Thats all friends.  🙂 😉

You want to do more customise in the firefox, Type in the url bar, “about:config”

about:config

haiya… jolly jolly…  Here after, i no need to type “thasulinux.wordpress.com”

I’ll type just, “thasulinux” and press “Alt+Enter”.  That’s all.

😀

Learning PHP


Hai friends,

From last 3 days I’m learning PHP.

How PHP Works!

Small description abt PHP:

PHP was originally created by Rasmus Lerdorf in 1995 and has been in continuous development ever since. The main implementation of PHP is now produced by the PHP Group and serves as the de facto standard for PHP as there is no formal specification.PHP is free software released under the PHP License.

PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line  mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms.

PHP’s Main syntax:

<?php
  PHP CODE GOES IN HERE
?>

This is the most commonly used (and recommended) form. It is known as the XML style, because it can be used inside of an XML document without causing the document to become poorly formed.

🙂

Recover Your ubuntu. !


If your ubuntu system got crashed after installing some packages you can restore your system

Now we have to remove that packages.
How to remove ???

Put your live cd.
Select try ubuntu section
Open your terminal
Create one directory using,

 $ mkdir live 

mount your root directory using,(You can find out your “root” directory using, $ sudo fdisk -l”)

 $ sudo mount /dev/sda1 live

now, we have to give chroot permission for “live” directory

 $ sudo chroot live


Now, we can remove that packages.

 $ sudo apt-get remove package-name

Or

 $ sudo apt-get remove --purge package-name

That’s all.

restart your system. 🙂

Your “ubuntu” is back. 😉

Ex:

Pls Take a notes of above and install the following, 😉

1. jasper
2. libjasper-dev
3. libjasper-java
4. libjasper-runtime
5. openjpeg-tools

if possible you try to install the above 5 packages in your ubuntu machine.

After installed, please restart your machine.

😛

Again multiplication Tables uh? ;)


Hai Friends,

Still i remember, When i was studying 3rd std., daily at the night time(bed timing) My dad  asked me, tell the from 2 table to 10th table(i.e literally increased) 😦 🙂 But now, In my ruby class, sir asked me, “write a program for all tables” 😮
At starting, i struggled then, with help of my sir, i finished that program. 😉 After seeing my result i went into mu childhood remembrances.

The Code is,

# The Multiplication table
=begin
Program name: multiplication.rb
Date written: 18-12-2010
Date modified: 20-12-2010
Author: Tha.Suresh
Licence: LPGL
=end

# Main part of the starts here

range_array = [1..6,7..12,13..18,19..24,25..30,31..36,37..42,43..48,49..54,55..60,61..66]

def format_till_6(iterator,range)
string=''
for counter in range
string = string +"%2d"%iterator+" X "+"%2d"%counter+" = "+"%3d  "%(iterator*counter)
end
return string
end

def iteration_code(range)
for iterator in 1..12 do
print format_till_6(iterator,range)
puts
end
end
range_array.each do |each_range|
iteration_code(each_range)
puts
end

Print the Sum of N numbers


Hai

And Sir gave a another task, huh.. It’s like print the Sun of N numbers.

# To print sum of N natural numbers
=begin
Program name: natural_numbers.rb
Date written: 18-12-2010
Date last modified: 18-12-2010
Author: Tha.Suresh
License: Free BSD
=end
# Main part of the program starts here
puts
print " Enter the number: "
number=gets.chomp.to_i
sum = 0
for iterator in 1..number do
sum = sum + iterator
end
puts
puts " Sum of N numbers is " + sum.to_s
# Main of the program ends here

Ex:

[root@mercury suresh_class]# ruby natural_numbers.rb

Enter the number: 9

Sum of N numbers is 45

😉

My Ruby Class-1


hai friends,

yesterday Our Thyagu Sir, took spl class for me and yogesh. I learnt very basics of  ruby and “How to write a Good Programming Code?” The first day sessions goes abt how to find “simple interest of a amount?”, “print the sum of n numbers” and “a simple Multiplication table”

Find The Simple interest Of a Amount code:



# Program to calculate simple interest
=begin
program name:simple_rv.rb
Date written:18-12-2010
Date last modified:19-12-2010
Author:Tha.Suresh
License:LGPL
=end
# Main part of the program starts here
puts
print "Enter the principle: "
principle = gets.chomp.to_f
print "Number of years: "
number_of_years = gets.chomp.to_f
print "Rate of interest: "
rate_of_interest = gets.chomp.to_f
simple_interest = (principle * number_of_years * rate_of_interest)/100
puts
puts "The simple interest for the given data is: " + simple_interest.to_s
# Main part of the program ends here

This Program will give the interest amount.
Here, gets ‘ll print the data with “\n”
chomp ‘ll cut, that “\n” and print the data without “\n”
.to_f” ‘ll convert the string value into float. bcoz default Ruby takes the all value as “string value”
At last again we convert the integer value into “string” Bcoz when we can’t concordance “String + integer”
Ex:

[root@mercury suresh_class]# ruby simple_pnr.rb

Enter the principle: 10000
Number of years: 2
Rate of interest: 2

The simple interest for the given data is: 400.0

🙂

Git


Git:

Git is a free & open source, distributed version control system  designed to handle everything from small to very large projects with speed and efficiency.

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.

Name:

Linus Torvalds has quipped about the name “git”, which is British English slang for a stupid or unpleasant person. “I’m an egotistical bastard, and I name all my projects after myself. First Linux, now git.

The official Git wiki also gives a number of alternative explanations and backronyms for the name, including “Global Information Tracker”

Git is a British slang term for a contemptible, mean-spirited, incompetent, stupid, annoying, or childish person. It may also refer to:

  • Git (software), a distributed version control system

The git stable version 1.7.3.3 was realised two weeks back.

Git logo
Original author(s) Linus Torvalds
Developer(s) Junio Hamano, Linus Torvalds
Stable release 1.7.3.3 (December 3, 2010; 14 days ago (2010-12-03)
Preview release 1.7.3.rc2 (September 15, 2010; 3 months ago (2010-09-15))
Written in C, Bourne Shell, Perl
Operating system POSIX
Type Revision control
License GNU General Public License v2
Website git-scm.com

Git Man Page
If you want install from terminal in ubuntu

just type the following commamd,

 

$ sudo apt-get install git

 

It just 12.5mb only.

Some  version control of files tools such as Mercurial, Bazaar, Subversion, CVS, Perforce, and Visual SourceSafe.

Source and more info

🙂  😉