Coding HTML5/Javascript Linear Gauge without any libraray
A Pen by Hyyan Abo Fakher on CodePen.
var button = document.createElement('button'); | |
button.textContent = 'Push'; | |
document.body.appendChild(button); | |
var x, title; | |
if (!history.state) { | |
x = 0; | |
title = document.title; | |
// Without this we can loose the initial page's title on browser navigation |
/* Attribution: http://techslides.com/how-to-parse-and-search-json-in-javascript */ | |
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else |
function format(date, format) { | |
if (!date || !format) { | |
return; | |
} | |
if (format.toLowerCase() === "short") { | |
format = "dd-MM-yyyy"; | |
} | |
if (format.toLowerCase() === "medium") { | |
format = "dd-MM-yyyy hh:mm:ss"; | |
} |
Coding HTML5/Javascript Linear Gauge without any libraray
A Pen by Hyyan Abo Fakher on CodePen.
<div class="tools"> | |
<label> | |
Bruch Color | |
<input id="color" type="color" value="#f00" /> | |
</label> | |
<label> | |
Bruch Size | |
<input id="size" type="number" value="10" /> | |
</label> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Service Workers</title> | |
<link rel="stylesheet" href="index.css"> | |
</head> | |
<body> | |
<h1>Service Workers Rocks</h1> | |
<button id="updateButton" style="display: none">Update Now</button> |
let cacheName = 'cache-v1'; | |
self.addEventListener('install', (e) => { | |
let cache = caches.open(cacheName).then((c) => { | |
c.addAll([ | |
'/index.css' | |
]); | |
}); |
<?php | |
require_once 'vendor/autoload.php'; | |
use Jaguar\Canvas, | |
Jaguar\Transformation, | |
Jaguar\Action\Color\Boost, | |
Jaguar\Action\Blur\SelectiveBlur, | |
Jaguar\Action\Posterize, | |
Jaguar\Action\EdgeDetection; |
<?php | |
require_once 'vendor/autoload.php'; | |
use Jaguar\Canvas, | |
Jaguar\Transformation, | |
Jaguar\Action\Color\Grayscale, | |
Jaguar\Action\EdgeDetection, | |
Jaguar\Action\Color\Negate; |
Simple CSS3 Masonry Grid , which can be used to create image gallery or to display posts grid wih no Javascript
A Pen by Hyyan Abo Fakher on CodePen.