Skip to content

Instantly share code, notes, and snippets.

Ram rampatra

Block or report user

Report or block rampatra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rampatra
rampatra / XHR.js
Created Apr 13, 2016
Generic XML Http Request method in javascript
View XHR.js
function xhr(method, uri, body, handler) {
var req = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
req.onreadystatechange = function ()
{
if (req.readyState == 4 && handler)
{
eval('var o=' + req.responseText);
handler(o);
}
}
@rampatra
rampatra / ReverseAndAdd.java
Created Sep 17, 2015
Reverse, add and check for palindrome
View ReverseAndAdd.java
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigInteger;
/**
* Created by IntelliJ IDEA.
*
* @author: ramswaroop
* @date: 9/16/15
@rampatra
rampatra / Parenthesis.java
Created Sep 17, 2015
Well-formed Parenthesis
View Parenthesis.java
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.EmptyStackException;
/**
* Created by IntelliJ IDEA.
*
* @author: ramswaroop
* @date: 9/15/15
@rampatra
rampatra / 0_reuse_code.js
Created May 1, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.