Align an element horizontally & vertically center using css.
A Pen by Gokulakrishnan Kalaikovan on CodePen.
3dd2222c-c7ea-ebf2-c4fb-86c36ffbe4ed | |
"*": | |
"exception-reporting": | |
userId: "3dd2222c-c7ea-ebf2-c4fb-86c36ffbe4ed" | |
welcome: | |
showOnStartup: false | |
core: | |
themes: [ |
/* | |
Example for Object.observe | |
Polyfill: https://github.com/MaxArt2501/object-observe | |
Detects: Add, Update, Delete properties | |
Supported Browser: http://caniuse.com/object-observe |
{ | |
"auto_complete": true, | |
"bold_folder_labels": true, | |
"caret_extra_width": 2, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", |
"*": | |
welcome: | |
showOnStartup: false | |
core: | |
themes: [ | |
"atom-dark-ui" | |
"one-dark-syntax" | |
] | |
editor: | |
invisibles: {} |
Align an element horizontally & vertically center using css.
A Pen by Gokulakrishnan Kalaikovan on CodePen.
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
//Cache polyfil to support cacheAPI in browsers | |
importScripts('/cache-polyfill.js'); | |
//Cache name | |
var staticCache = "my-static-files"; | |
//Files to cache | |
var filesToCache = [ | |
"/", | |
"images/logo.jpg", |
//After install, fetch event is triggered for every page request | |
self.addEventListener("fetch", function (event) { | |
console.log("Request -->", event.request.url); | |
//To tell browser to evaluate the result of event | |
event.respondWith( | |
caches.match(event.request) //To match current request with cached request it | |
.then(function(response) { | |
//If response found return it, else fetch again. | |
return response || fetch(event.request); |
//Activate event will be triggered once after registering, also used to clean up caches | |
self.addEventListener("activate", function (event) { | |
var cacheWhitelist = ['my-static-files']; | |
event.waitUntil( | |
caches.keys() | |
.then(function (allCaches) { | |
//Check all caches and delete old caches here | |
allCaches.map(function (cacheName) { |
function singlyLinkedList() { | |
this.length = 0; //Default value | |
this.head = null; | |
} | |
//To store in a new node | |
function storeNode(data) { | |
this.data = data; | |
this.next = null; | |
}; |