Tuesday, September 24, 2013

Highcharts "Bar Chart" with download chart image functionality

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<html debug="true">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript">
(function($){ // encapsulate jQuery
$(function () {
            chart: {
                type: 'column'
            title: {
                text: 'Monthly Average Rainfall'
            subtitle: {
                text: 'Source: WorldClimate.com'
            xAxis: {
                categories: [
            yAxis: {
                min: 0,
                title: {
                    text: 'Rainfall (mm)'
            tooltip: {
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                    '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0
            series: [{
                name: 'Tokyo',
                data: [49.9, 71.5, 106.4]
<div id="demo-content">
<div style="margin: 5px">
              <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

Generate PDF using PHP code

// First Download  "DOMPDF" Library 

//Use this code

          $html =
                '<p>Hello World!</p>'.
         $dompdf = new DOMPDF();

Saturday, September 21, 2013

Get .csv file contents using php

$fp = fopen('D:\wamp\www\hmvcExample\img\upload\retest.csv','r') or die("can't open file");
while($csv_line = fgetcsv($fp,1024)) {
    for ($i = 0, $j = count($csv_line); $i < $j; $i++) {
fclose($fp) or die("can't close file");

Tuesday, September 17, 2013

Examples of Jwplayer (audio and video player)

<TITLE>Jwplayer Player Javascript Kit</TITLE>
<script language='javascript' src='jwplayer.js'></script>
<div id="mediaplayer_joke_1"></div>
<script type="text/javascript">
'flashplayer': 'player.swf',
'width': '300',
'height': '24',
'autostart': 'false',
'file': 'example1.mp3',
'controlbar': 'bottom'

Wednesday, September 11, 2013

Sticky notes made by css

<title>Sticky Note</title>
.sticky {
 -webkit-box-shadow: #DDD 0px 1px 2px;
 position: fixed;
 background-color: #F4F39E;
 border-color: #DEE184;
 text-align: center;
 margin: 2.5em 0px;
 padding: 1.5em 1em;
 -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.25);
 -moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.25);
 box-shadow: 0px 1px 3px rgba(0,0,0,0.25);
 font-family: Chalkboard, 'Comic Sans';
.sticky.taped:after {
 display: block;
 content: "";
 position: absolute;
 width: 151px;
 height: 35px;
 top: -21px;
 left: 25%;  
 background: transparent url(tape.png) 0 0 no-repeat;
<p class="sticky taped" style="width: 250px;">
 <strong>The Little Turtle</strong>.<br />
 There was a little turtle.<br />
 He lived in a box.<br />
 He swam in a puddle.<br />
 He climbed on the rocks.<br />
 —Vachel Lindsay