Angular 4 IE 11 error: Exception thrown and not caught File: polyfills.bundle.js

Reason: The default polyfills.ts file is commented
Solution: need to uncomment lines of code and run npm install the corresponding module.

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/set';

Then it will compatible with the IE11


Leave a comment

Mysql Error: PDO: MySQL server has gone away

I got this error while setting up Laravel application, and able to resolve it by increasing the mysql ini’s max_allowed_packet size.

Leave a comment

Kick-off Ionic – Angular

Hello, i have been learning Ionic – Cordova – Angular these days and got through this cool tutorial which may be helpful for anyone starting to learn the same:

Leave a comment

Find locations/posts within radius of latitude and longitude via mysql query

Was trying to do this and then came across this nice solution.
1) First, we can find out the boundaries of latitude and longitude using a  function for given latitude and longitude.

2) Now, we can query using the BETWEEN operator and achieve this simply.

function getBoundingBox($lat_degrees,$lon_degrees,$distance_in_miles) {
$radius = 3963.1; // of earth in miles
$due_north = 0;
$due_south = 180;
$due_east = 90;
$due_west = 270;
$lat_r = deg2rad($lat_degrees);
$lon_r = deg2rad($lon_degrees);
$northmost = asin(sin($lat_r) * cos($distance_in_miles/$radius) + cos($lat_r) * sin ($distance_in_miles/$radius) * cos($due_north));
$southmost = asin(sin($lat_r) * cos($distance_in_miles/$radius) + cos($lat_r) * sin ($distance_in_miles/$radius) * cos($due_south));
$eastmost = $lon_r + atan2(sin($due_east)*sin($distance_in_miles/$radius)*cos($lat_r),cos($distance_in_miles/$radius)-sin($lat_r)*sin($lat_r));
$westmost = $lon_r + atan2(sin($due_west)*sin($distance_in_miles/$radius)*cos($lat_r),cos($distance_in_miles/$radius)-sin($lat_r)*sin($lat_r));
$northmost = rad2deg($northmost);
$southmost = rad2deg($southmost);
$eastmost = rad2deg($eastmost);
$westmost = rad2deg($westmost);
if ($northmost > $southmost) {
$lat1 = $southmost;
$lat2 = $northmost;} else {
$lat1 = $northmost;
$lat2 = $southmost;
if ($eastmost > $westmost) {
$lon1 = $westmost;
$lon2 = $eastmost;} else {
$lon1 = $eastmost;
$lon2 = $westmost;
return array($lat1,$lat2,$lon1,$lon2);

$lat = ‘14.1057’;
$long = ‘72.5065’;
list($lat1,$lat2,$lon1,$lon2) = getBoundingBox($lat,$long,500);


After this we can use $lat1, $lat2 for Between operator latitude and similarly $lon1, $lon2 for Between operator longitude.
Cheers! might help!

Leave a comment

get youtube videos thumbnail automatically

Very nice trick to show you tube thumbnails without any processing.

We can just use image source like where the key can be repalced by you tube url key. Hope this helps and saves allot time.


Disable weekend plus holidays from jquery datepicker

Always an requirement with jquery datepicker to hide/disable the weekend days plus the holidays mentioned.
So, googling allot and not finding any piece of code which can satisfy BOTH conditions, i’ve added this which may be utilizable

For Datapicker parameter: beforeShowDay: setHoliDays
var holiDays =[[2012,11,11,’Memorial Day’],[2012,11,12,’Pongal’],[2012,11,15,’Christmas Day’]];
function setHoliDays(date) {

for (i = 0; i < holiDays.length; i++) {
if ((date.getFullYear() == holiDays[i][0]
&& date.getMonth() == holiDays[i][1] – 1
&& date.getDate() == holiDays[i][2]) || date.getDay() == 0 || date.getDay() == 6) {
return [true, ‘ui-datepicker-unselectable ui-state-disabled’, holiDays[i][3]];
return [true, ”];

Conditions added to avoid weekend days


Leave a comment

ob_start() the vital function

Hey, this might be a known theory to many php developer but i found out this today after almost 2 hours of searching for problems i was having with redirect(), headers already sent etc. in custom/codeigniter php.

I found the solution where i just need to use ob_start() which starts output buffering i.e. during that no outpur is sent from the server other than headers.

Leave a comment

Reading a magnetic card swipe with jQuery

Hiez, was working around since 5-10 days to find some solution for card swipe (hardware interaction) with php or any client side language.

This tutorial was the base help:

In some card instances, we might require to change the end syntax in Cardreader.js
In my requirement case, i have to do this ‘this.track_end = track_end || “^”;’ in place of “-“…….



Track via jquery when the background image actually loads on browser

var imageObj = new Image();
$(imageObj).attr(“src”,src).load(function(){alert(‘load’); //do whatever});

here, src is the path of the image……..

Leave a comment

For facebook developers :P

FBML will no longer be supported on Platform. June 1, 2012: FBML apps will no longer work. All FBML endpoints are removed. If you are building a new application on, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML.

1 Comment