Friday, January 15, 2010

fpdf number_format()

number_format

(PHP 4, PHP 5)

number_format — Format a number with grouped thousands

string number_format ( float $number , int $decimals , string $dec_point , string $thousands_sep )
----------------------------------------------------------------------------------------------

number

The number being formatted.
decimals

Sets the number of decimal points.
dec_point

Sets the separator for the decimal point.
thousands_sep

Sets the thousands separator.

Only the first character of thousands_sep is used. For example, if you use bar as thousands_sep on the number 1000, number_format() will return 1b000.

----------------------------------------------------------------------------------------------


Example #1 number_format() Example

For instance, French notation usually use two decimals, comma (',') as decimal separator, and space (' ') as thousand separator. This is achieved with this line :

$number = 1234.56;

// english notation (default)
$english_format_number = number_format($number);
// 1,235

// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56

$number = 1234.5678;

// english notation without thousands seperator
$english_format_number = number_format($number, 2, '.', '');
// 1234.57

?>

How to install Google Chrome in Fedora 10 or Fedora 11

To install chromium, create a chromium.repo file in your /etc/yum.repos.d directory.

vim /etc/yum.repos.d/chromium.repo
--------------------------------------------------------------------------------------
Then fill it up with this:-

[chromium]
name=Chromium Test Packages
baseurl=http://spot.fedorapeople.org/chromium/F$releasever/
enabled=1
gpgcheck=0
--------------------------------------------------------------------------------------
After that, just yum install chromium
--------------------------------------------------------------------------------------
[root@atreides ~]# yum install chromium
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: mirror.oscc.org.my
* rpmfusion-free: mirror.transact.net.au
* rpmfusion-free-updates: mirror.transact.net.au
* rpmfusion-nonfree: mirror.transact.net.au
* rpmfusion-nonfree-updates: mirror.transact.net.au
* updates: ftp.riken.jp
chromium | 1.2 kB 00:00
chromium/primary | 2.4 kB 00:00
chromium 7/7
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package chromium.i586 0:3.0.191.0-0.1.20090628svn19474.fc11 set to be updated
--> Processing Dependency: libv8.so.0 for package: chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586
--> Running transaction check
---> Package v8.i586 0:1.2.9-1.20090626svn2284.fc11 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
chromium i586 3.0.191.0-0.1.20090628svn19474.fc11 chromium 11 M
Installing for dependencies:
v8 i586 1.2.9-1.20090626svn2284.fc11 chromium 858 k

Transaction Summary
================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 12 M
(1/2): chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586 | 11 MB 01:11
(2/2): v8-1.2.9-1.20090626svn2284.fc11.i586.rpm | 858 kB 00:06
--------------------------------------------------------------------------------
Total 149 kB/s | 12 MB 01:19
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : v8-1.2.9-1.20090626svn2284.fc11.i586 1/2
Installing : chromium-3.0.191.0-0.1.20090628svn19474.fc11.i586 2/2

Installed:
chromium.i586 0:3.0.191.0-0.1.20090628svn19474.fc11

Dependency Installed:
v8.i586 0:1.2.9-1.20090626svn2284.fc11

Complete!

Thursday, August 13, 2009

PHP Script showing Google map route b/w Bangalore to Bagalkote

http://php.example.org/Implementaion/map.php
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iframe width="325" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://maps.google.co.in/maps?f=d&source=s_d&saddr=Bangalore&daddr=Bagalkot,+Karnataka&
hl=en&geocode=%3BFbP29gAdcwiDBA&mra=ls&sll=13.019945,77.624588&sspn=0.288335,0.441513&
ie=UTF8&ll=14.577975,76.6477&spn=3.22181,1.903&output=embed">
/iframe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

style="color:#0000FF;text-align:left">View Larger Map

Monday, August 10, 2009

Float image in Center of an column.

reff : http://bv.example.co.in/


<div class="his_img">



.his_img img
{
display:block;
margin:auto;

Friday, August 7, 2009

Search Box










reff: file:///home/Yoga/Back%20up/Beginning%20CSS%20examples/chapter%2010/bbc2.html
------------------------------------------------------------------------------------------------------------------
HTML Code:
------------------------------------------------------------------------------------------------------------------








=================================================
CSS code :

#searchfield {
background:transparent url(images/search.gif) no-repeat scroll -66px center;
border:0 none;
height:30px;
line-height:1.1;
margin-right:-4px;
padding:9px 2px 0 4px;
width:194px;
text-align:left;
outline:none;
}

#searchbutton {
margin:0;background:url(images/search.gif) no-repeat scroll 0 center;
border:medium none;
width:66px;
height:29px;
font-weight:normal;
vertical-align:bottom;
cursor:pointer;
font-size:1.5em;
font-family:sans-serif;
color:#FF0004;
padding-bottom:3px;
outline:none;
}

Thursday, August 6, 2009

Creating Scroll view, using overflow property.

===============================================
HTML file
----------------------------

The below paragraph put in a div & include .stream class as in css file

reff: file:///home/Yoga/Back%20up/Beginning%20CSS%20examples/Chapter%2015/exp1.html

below is the dummy data.
By giving the box a set height, you ensure that it does not expand or contract based on the
content it holds. If there is more content than the box can hold, the scrollbar will automatically
appear, allowing you to scroll through the whole text, as you see in Figure

Now define the stream selector. First, the size of the box is declared (here it is a square
300×300 pixels), and some padding is declared to ensure the content does not touch the border.
Most importantly, the overflow property is given the auto value.

Note that for this example, you will need to paste plenty of content into this container to
see the effect of the overflow, such as masses of Lorem Ipsum text. With that taken care of, we
can move on to the nifty styling.
content it holds. If there is more content than the box can hold, the scrollbar will automatically
appear, allowing you to scroll through the whole text, as you see in Figure




================================================
CSS file
-----------------------
.stream {
width:150px;
height:250px;
padding:10px;
border:1px solid #999;
background-color:#FFF;
overflow:auto;
}

Removing The Dotted Outline

Removing The Dotted Outline that appears in web browser, when mouse is moved on link or button / icon :

Solution:
a {
outline: none;
}

a:hover, a:active, a:focus {
outline: none;
}