Image Color Extract

The Image Color Extract PHP class pulls the most common colors out of an image file. The color values are in hexidecimal. 

Image Color Extract.

Advertisements

Login with Dropbox on your Website OAuth Authentication : jQuery plugin

This script uses OAuth in a jquery plugin to authenticate users on your website using their Dropbox account credentials.Pulls the user details from its Dropbox account and displays the same on your webpage.

Source:  Login with Dropbox on your Website OAuth Authentication : jQuery plugin – jQuery Rain.

mPDF

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF, with a number of enhancements.

mPDF.

Solve PHP Fatal Error: Allowed memory size of 8388608 bytes exhausted

This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8 MB limit. However, do not fret because this is an easy problem to overcome.


To change the memory limit for one specific script, include a line such as this at the top of the script:

ini_set("memory_limit","12M");

The 12M sets the limit to 12 megabytes (12582912 bytes). If this does not work, keep increasing the memory limit until your script fits or your server squeals for mercy.

You can also make this a permanent change for all PHP scripts running on the server by adding a line such as this to the server’s php.ini file:

memory_limit = 12M

Keep in mind that a huge memory limit is a poor substitute for good coding. A poorly written script may inefficiently squander memory which can cause severe problems for frequently executed scripts. However, some applications are run infrequently and require lots of memory like importing and processing a large data file.

 

Solve PHP Fatal Error: Allowed memory size of 8388608 bytes exhausted (tried… | a Tech-Recipes Tutorial.

hint.css – A tooltip library in CSS

Hint.css is a tooltip library written in SASS which uses only HTML/CSS to create simple tooltips.

It does not rely on any JavaScript and rather uses data-* attribute, pseudo elements, content property and CSS3 transitions to create the tooltips. Also it uses BEM naming convention particularly for the modifiers.

hint.css – A tooltip library in CSS.

Sorting VARCHAR data in MySql

Here’s a quick tip at sorting VARCHAR type data in mysql database with values in a column.

With the default sort, it would look something like below:

mysql> SELECT column FROM table_name ORDER BY column; 

column
======
100
1000
10000
200
2000
20000
...

Now with “… ORDER BY column+0”, I get it sorted right:

mysql> SELECT column FROM table_name ORDER BY column+0; 

column
======
100
200
1000
2000
10000
20000
...

This is a quick fix instead of sorting to CAST operator.

Reference: Sorting VARCHAR data in mysql

Database Normalization Basics

Database Normalization Basics.