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
#dc - domain component | |
#cn - common name | |
#ou - org units | |
require 'net/ldap' | |
class Ldap | |
attr_accessor :ldap_connection, :params, :ldap_response | |
def initialize(params = {}) | |
self.ldap_connection = connect_to_ldap_server() |
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
Testing: | |
http://code.tutsplus.com/tutorials/testing-your-javascript-with-jasmine--net-21229 | |
http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/ | |
React: | |
http://busypeoples.github.io/post/react-component-lifecycle/ | |
jQuery Cheatsheet: | |
https://oscarotero.com/jquery/ |
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
http://busypeoples.github.io/post/react-component-lifecycle/ | |
http://www.undefinednull.com/2015/05/03/react-tdd-example-unit-testing-and-building-a-react-component-with-jest-gulp-and-react-test-utils/ | |
http://www.jackcallister.com/2014/12/01/building-a-test-suite-in-react-js.html | |
Mocha- React: | |
http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/ |
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
def lambda_test(x) | |
lam = lambda { |x| puts "Square is #{x * x}"; return; puts "cube is #{x*x*x}" } | |
lam.call x | |
puts "Hello World in Lambda" | |
end | |
def proc_test(x) | |
proc = Proc.new do |x| | |
puts "Square is #{x * x}" | |
return |
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 User = function (fname, lname) { | |
this.fname = fname; | |
this.lname = lname; | |
this.fullname = function(){ | |
console.log("Fullname is "+this.fname+" "+this.lname); | |
}; | |
}; | |
var Member = function(memberId, fname, lname) { |
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
function Shape(){ | |
this.name = 'Shape'; | |
this.toString = function () { | |
return this.name; | |
}; | |
} | |
function TwoDShape(){ | |
this.name = '2D shape'; | |
} | |
function Triangle(side, height){ |
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 User = function (fname, lname) { | |
this.fname = fname; | |
this.lname = lname; | |
this.fullname = function(){ | |
console.log("Fullname is "+this.fname+" "+this.lname); | |
}; | |
}; | |
var Member = function(memberId, fname, lname) { |
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 p = new Promise(function (resolve, rejeect) { | |
$.ajax({ | |
url: "https://api.github.com/users/sriram15690", | |
type: "GET", | |
success: function(response){ | |
resolve(response); | |
}, | |
error: function(response) { | |
reject(response); | |
} |
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
Enzyme: | |
1. Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output. | |
2. Use any assertion library. | |
3. Shallow rendering - useful for testing components as a unit, and to ensure that your tests aren't indirectly asserting on behavior of child components. | |
4. methods are similar to jQeury API |
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
#module DateParser | |
#DateTime.new(2016,06,06,17,20,10).strftime("%d/%m/%Y %I,'M%p") | |
require "date" | |
require 'active_support/all' | |
EXISTING_PATTERNS = { | |
months: ['january','february','march','may','june','july','august','september', 'october','november','december'], | |
days: ['sunday','monday','tuesday', 'wednesday','thursday','friday','saturday'], | |
past: ["before","ago", 'yesterday', 'last','previous'], |
OlderNewer