This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Table Structure</title> | |
<style type="text/css"> | |
.red { | |
background-color: red; | |
} | |
.yellow { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Possible Ordered List</title> | |
<style type="text/css"> | |
.capitals { | |
list-style-type: upper-alpha; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arrayHelper = function () { | |
this.myArray = []; | |
this.deepIterator = function(givenArray, isRecursiveCall) { | |
var _this = this; | |
// Iterating the Given Array. | |
givenArray.forEach(function (value, index) { | |
// Check if iterated item is an Complex Variable. | |
if(Array.isArray(value)) { | |
_this.deepIterator(value, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Title Goes here</title> | |
<link rel="stylesheet" href="<Your css file Path>"> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Storage.prototype.removeItems = function () { | |
for(item in arguments) { | |
this.removeItem(arguments[item]); | |
} | |
}; | |
// Usage | |
localStorage.setItem('first', 'first value'); | |
localStorage.setItem('second', 'second value'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creation | |
localStorage.setItem('firstname', 'Keith'); | |
// First Approach. | |
function isExist(name) { | |
return (!!localStorage[name]); | |
} | |
// Second Approach. | |
function isItemExist(name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Storage.prototype.getItems = function () { | |
var items = {}; | |
for(var i=0; i < this.length; i++) { | |
var itemKey = this.key(i), | |
itemValue = this.getItem(itemKey); | |
Object.defineProperty(items, itemKey, { | |
value: itemValue | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.parsing.combinator.syntactical._ | |
abstract class Expr { | |
def rpn:String | |
} | |
case class BinaryOperator(lhs:Expr, op:String, rhs:Expr) extends Expr { | |
def rpn:String = lhs.rpn + " " + rhs.rpn + " " + op | |
} | |
case class Number(v:String) extends Expr { def rpn:String = v } | |
case class Variable(v:String) extends Expr { def rpn:String = v } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"continents": [{ | |
"name": "Asia", | |
"countriesUrl": "https://gist.githubusercontent.com/ramsunvtech/bcbf0f2770bd9908381de4421db0bd81/raw/965b819b57ce64a049528e3d860c7299eb93d3f1/asia.json" | |
}] | |
} |