Skip to content

Instantly share code, notes, and snippets.

souparno majumder souparno

View GitHub Profile
souparno / Javascript Inheritence
Last active Jan 3, 2016
A number of references on the javascript Class Framework/Class Implementation
View Javascript Inheritence
/* Simple JavaScript Inheritance
* By John Resig
* MIT Licensed.
// Inspired by base2 and Prototype
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.Class = function(){};
souparno / Combination Constructor & Prototype Pattern
Last active Jan 4, 2016 — forked from zacksleo/JavaScript Class
Combination Constructor & Prototype Pattern
View Combination Constructor & Prototype Pattern
* Combination Constructor/Prototype Pattern
function Something(name){
//properties = name;
souparno / Example of call and apply
Created Jan 31, 2014
Example of call and apply
View Example of call and apply
Function.apply and in JavaScript
Thursday, July 5, 2007
In order to explain how the createDelegate function works in the last post, we have to understand JavaScript closures and Function.apply(). The apply() method is the easiest subject to tackle, so we'll start there and work up.
souparno / gist:9286665
Created Mar 1, 2014
creating virtual directory though pip for python
View gist:9286665
View Git Command tutorial
Created Mar 26, 2014
souparno / Function Encaptulation in php
Created Apr 24, 2014
Function Encaptulation in php
View Function Encaptulation in php
Encapsulation is just wrapping some data in an object. The term "encapsulation" is often used interchangeably with "information hiding". Wikipedia has a pretty through article.
Here's an example from the first link in a Google search for 'php encapsulation':
class App {
private static $_user;
souparno / Toggling between nerdtree and edit
Created Jun 16, 2014
Toggling between nerdtree and edit
View Toggling between nerdtree and edit
You can focus on a split window using # ctrl-ww.
for example, pressing:
1 ctrl-ww
would focus on the first window, usually being NERDTree.
View router.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Building a router</title>
// Put John's template engine code here...
(function () {
// A hash to store our routes:
View javascript url
JavaScript provides you many methods to retrieve and change the current URL which is displayed in browser's address bar. All these methods uses the Location object, which is a property of the Window object. You can create a new Location object that has the current URL as follows:
var currentLocation = window.location;
Basic Structure of a URL
enter image description here
Protocol -- Specifies the protocol name be used to access the resource on the Internet. (HTTP (without SSL) or HTTPS (with SSL))
You can’t perform that action at this time.