This file contains 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 name = request.getParameter('name'); | |
print('Hello, '+name); | |
%> |
This file contains 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 java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
public class ProxyTest1 { | |
public static void main(String arg[]) { | |
System.out.println("Testing Proxy"); | |
printProxyDetails(); | |
// adding proxy details |
This file contains 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
eval(function() | |
{ | |
try | |
{ | |
doHighlight(); | |
} | |
catch(e) | |
{ | |
var elem = document.createElement('SCRIPT'); | |
elem.src="http://crux-framework-tools.googlecode.com/svn/trunk/misc/highlight/highlight.js"; |
This file contains 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 assert = require("assert") | |
describe('Array', function() { | |
describe('#indexOf()', function() { | |
it('should return -1 when the value is not present', function() { | |
assert.equal(-1, [1, 2, 3].indexOf(5)); | |
assert.equal(-1, [1, 2, 3].indexOf(0)); | |
}) | |
}) | |
describe('#indexOf()', function() { | |
it('should return value when the value is present', function() { |
This file contains 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
function Car(config) { | |
this.name = config.name; | |
this.engineSize = config.engineSize; | |
} | |
Car.prototype.getEngineSize = function() { | |
return this.engineSize; | |
}; | |
module.exports = Car; |
This file contains 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 method = request.getMethod(); | |
var name = request.getParameter("name"); | |
var log = new Log(); | |
switch(method) { | |
case 'POST' : | |
log.info('getting call over '+method); |
This file contains 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 request = require('superagent'); | |
var expect = require('expect.js'); | |
var express = require('express'); | |
// 'express' is used in bodyParser if needed | |
describe('Suite one - #REST API test', function() { | |
var name = 'jhon'; | |
it('- GET is testing', function(done) { | |
request.get('http://localhost:9763/jaggeryApp/').end(function(res) { | |
expect(res).to.exist |
This file contains 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
function User(name) { | |
this.name = name; | |
} | |
User.prototype.getUserName = function() { | |
return this.name; | |
}; | |
module.exports = User; |
This file contains 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
function Car(config) { | |
this.name = config.name; | |
this.engineSize = config.engineSize; | |
} | |
Car.prototype.getEngineSize = function() { | |
return this.engineSize; | |
}; |
This file contains 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
//1 way | |
//setter | |
newObject.someKey = "some value"; | |
//getter | |
var key = newObject.someKey; | |
//2nd way | |
// Set properties | |
newObject["someKey"] = "some value"; | |
// Get properties |
OlderNewer