Code

Coding, Programming & Algorithms, Tips, Tweaks & Hacks

Friday, January 24, 2020

Using WebP image format for browsers that support it : Part 2

›
Almost a decade ago, I wrote about Using WebP image format for browsers that support it . Now there's a different method to implement t...
Monday, January 13, 2020

PHP 7's Null Coalescing Operator

›
PHP 7's Null coalescing operator is more useful than I thought. PHP public static function read($id) { $Row = MySQL::query("S...
Tuesday, December 17, 2019

Get the element that triggered the event in an event handler function

›
A lot of people seem to get confused when trying to get the element that triggered the event in an event handler function. this or $(this) r...
Sunday, April 28, 2019

Commas in HTML INPUT textfields for better readability

›
Sometimes, when a user enters numbers into a HTML INPUT text field, he/she enters commas too for readability esp in the case of financial in...
Friday, July 27, 2018

Encrypt and Decrypt strings in URL in PHP 7 using openssl

›
Here's a dead simple solution to pass through encrypted data as a value in your URL. Say you wanted to load something like https://my-pr...
Tuesday, March 6, 2018

Always check for existence of a file in spl_autoload_register's function call

›
PHP <?php function my_autoloader_1($className) { $filename = 'test1/'.$className.'.php'; if (file_exists($fil...
Saturday, December 9, 2017

Availability of a file / link publically on Google Cloud Storage

›
If you want to check if a file exists publically on Google Cloud Storage, PHP <?php $flyer = "http://commondatastorage.googleapis.co...
Thursday, August 6, 2015

Compressing HTML

›
Compress might not be the right word, as it doesn't really compress / zip the output HTML code, but combines all the HTML lines to a si...
Wednesday, February 15, 2012

Convert CSV to JSON

›
Sometimes I find myself converting google doc spreadsheets (CSV) to JSON format. I would later on use the JSON string to insert it into a Ja...
Friday, April 15, 2011

Using WebP image format for browsers that support it

›
The WebP image format for the web is starting to get a lot of hype for its massive file compression. Chrome supports it since ver 9 and Ope...
›
Home
View web version
Powered by Blogger.