Some good sample codes from twitter
http://twitter.github.io/typeahead.js/examples
Some good sample codes from twitter
http://twitter.github.io/typeahead.js/examples
To manipulate image (e.g. resize, rotate, flip etc) could be hard since it is not done everyday. It is required sometimes on certain project.
I found this library really easy and helpful. Just one file and can ease your life. Take a look.
Update: Another one (open source) that looks easy to use. WideImage
This becoming my favorite image gallery now – fotorama.io. So easy to implement with plenty of customization that we can do.
If you don’t believe how easy it is, copy following source code, paste and save as an html file. Then open it and see what will happen.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css" rel="stylesheet"> <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js"></script> <div class="fotorama" data-width="100%" data-ratio="800/600" data-nav="thumbs" data-loop="true" data-allowfullscreen="true"> <img src="http://s.fotorama.io/1.jpg"> <img src="http://s.fotorama.io/2.jpg"> </div>
Alternatives:
To get how long it takes to load a web page
What are the components loaded with size and percentage
Compare with other ‘average’ size
http://tools.pingdom.com/
http://gtmetrix.com/
http://www.webpagetest.org/
To round following Bank Negara Malaysia (BNM) rules.
$value = xx.xx; $roundedvalue = number_format(round($value*20,0)/20,2,'.','');
This is useful for you to create a static page of most visited page on your dynamic website (especially those being displayed on front page, sidebars and footers)
<?php
$file = file_get_contents("http://yourserver.com/site/categories.php");
file_put_contents("categories.html", $file);
?>
Can have auto infinite scroll for blogspot. Make the reader to load new page when they reach bottom. Easy to install.
http://www.spiceupyourblog.com/2013/05/load-posts-infinite-scroll-on-blogger.html#.VSFowBOUdtI
Found a review about media.net (used by bing and yahoo). The rate is just bit below adsense but not that far compared to other ad networks.
Require one time account approval and need also approval everytime add new website to display ads
http://www.seobook.com/archives/000757.shtml
Also to study kiosked.com
When people share your page on facebook, you can set what image to be displayed together with your page description on facebook.
The code:
<meta property="og:image" content="http://yourdomain.com/path/to/image.jpg" />
References on FB
1. All result set
$query = $this->db->query("YOUR QUERY");
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
echo $row->title;
echo $row->name;
echo $row->body;
}
}
2. Just one row
$query = $this->db->query("YOUR QUERY");
if ($query->num_rows() > 0)
{
$row = $query->row();
echo $row->title;
echo $row->name;
echo $row->body;
}