Skip to content

Instantly share code, notes, and snippets.

View ramsunvtech's full-sized avatar
💭
Full Stack Developer (Java, React, React Native)

Venkat.R ramsunvtech

💭
Full Stack Developer (Java, React, React Native)
View GitHub Profile
@ramsunvtech
ramsunvtech / html-table.html
Last active November 27, 2020 15:43
HTML5 Table Structure
<!doctype html>
<html>
<head>
<title>Table Structure</title>
<style type="text/css">
.red {
background-color: red;
}
.yellow {
<meta name="description" content="Your Page Description" />
<meta name="keywords" content="Your Page Keywords, Keywords" />
<meta name="author" content="Author Name" />
<meta charset="UTF-8">
@ramsunvtech
ramsunvtech / html-ordered-list.html
Last active June 14, 2016 16:11
HTML Ordered List
<!doctype html>
<html>
<head>
<title>Possible Ordered List</title>
<style type="text/css">
.capitals {
list-style-type: upper-alpha;
}
@ramsunvtech
ramsunvtech / array-iterator.js
Created June 26, 2016 01:14
JS Array Deep Iterator
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);
@ramsunvtech
ramsunvtech / html5-structure.html
Created June 27, 2016 07:35
Simple HTML5 Page Structure
<!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>
@ramsunvtech
ramsunvtech / storage.removeItems.js
Last active August 4, 2016 11:21
Storage Prototyping
Storage.prototype.removeItems = function () {
for(item in arguments) {
this.removeItem(arguments[item]);
}
};
// Usage
localStorage.setItem('first', 'first value');
localStorage.setItem('second', 'second value');
@ramsunvtech
ramsunvtech / storage.exist.check.js
Created August 4, 2016 12:09
Session / Local Storage Exist Check
// Creation
localStorage.setItem('firstname', 'Keith');
// First Approach.
function isExist(name) {
return (!!localStorage[name]);
}
// Second Approach.
function isItemExist(name) {
@ramsunvtech
ramsunvtech / storage.getItems.js
Created August 5, 2016 18:44
Get all Storage Items
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
});
}
@ramsunvtech
ramsunvtech / ShuntingYard.scala
Created September 22, 2016 19:21
ShuntingYard Algorithm In Scala
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 }
@ramsunvtech
ramsunvtech / continent.json
Last active December 4, 2017 05:22
Continents
{
"continents": [{
"name": "Asia",
"countriesUrl": "https://gist.githubusercontent.com/ramsunvtech/bcbf0f2770bd9908381de4421db0bd81/raw/965b819b57ce64a049528e3d860c7299eb93d3f1/asia.json"
}]
}