Skip to content

Instantly share code, notes, and snippets.

@igortoliveira
igortoliveira / 0_reuse_code.js
Created February 3, 2014 17:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{
"status": {
"status": "ERROR",
"error": {
"status": "Error",
"code": "VX_UNHANDLED_EXCEPTION 50",
"message": "javax.xml.ws.soap.SOAPFaultException: ERR.SWS.CLIENT.VALIDATION_FAILED\n\tat com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:189)\n\tat com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)\n\tat com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)\n\tat com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)\n\tat com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)\n\tat com.sun.proxy.$Proxy173.passengerDetailsRQ(Unknown Source)\n\tat com.virginamerica.web3.gateway.sabre.PaxDetailsGateway.submit(PaxDetailsGateway.java:58)\n\tat com.virginamerica.web3.gateway.sabre.PaxDetailsGateway.submit(PaxDetailsGateway.java:34)\n\tat com.virginamerica.web3.gateway.sabre.SabreBaseGateway.doSubmit(SabreBaseGateway.java:31)\n\tat com.virginamerica.web3.gateway.BaseGateway$WebServiceS
request:
{"bookingInfo":{"travelerInfoList":[{"firstName":"foo","middleName":"","lastName":"bar","type":"Adult","gender":"MALE","emergencyContactName":"Ken","emergencyContactNum":"98737777","dob":"1988-04-07","knownTravelerNum":"","redressNum":""}],"addressInfo":{"addressOne":"assfsdfsdfsdf","city":"asdasdasd","state":"Alaska","country":"USA","zipCode":"13123"},"phoneInfo":{"number":"13123123123","contactType":"HOME","phoneRefNumber":"1.1","sequenceNum":0,"primary":true},"emailInfo":{"address":"foo@bar.com","emailType":"CC","emailRefNumber":"1.1","sequenceNum":0,"primary":false},"bookingType":"ANONYMOUS_DOLLAR","mobile":false,"oAndDList":[{"departureDateTime":"2014-05-08T06:50:00-08:00"},{"departureDateTime":"2014-05-09T08:55:00-05:00"}],"insuranceOption":{"selected":false},"optInOption":{"selected":false}},"seatInfo":{"seatFlightList":[{"flightId":1,"flightNum":"350","paxSeatList":[{"pax":{"firstName":"foo","lastName":"bar","guestId":0},"seatNum":"13C","mce":false}]},{"flightId":2,"flightNum":"351","paxSeatL
{
"addressInfoList": [
{
"addressType": "HOME",
"city": "Denver",
"country": "US",
"primary": true,
"sequenceNum": 1,
"state": "CO",
"zipCode": "54321"
{
"tripDetails": {
"bookingType": "DOLLAR",
"departingFlightList": [
{
"departingFlights": [
{
"flightSegment": {
"aircraftType": "A320",
"arrival": "SJD",
{
"entity": {
"eid": "2079156"
},
"elevateId": "87006530918",
"authToken": "fd84d907-0f34-4e55-97f1-e415a23bd995",
"personDetail": {
"firstName": "gold",
"lastName": "testers",
"gender": "MALE",
var validator = $.data( this[ 0 ], "validator" );
if ( validator ) {
return validator;
}
// Add novalidate tag if HTML5.
this.attr( "novalidate", "novalidate" );
validator = new $.validator( options, this[ 0 ] );
$.data( this[ 0 ], "validator", validator );
1. What is the difference between classical inheritance and prototypical inheritance?
2. What Object Orientation means? What is its advantage?
3. What is the difference between Object Orientation and Functional Programming?
4. Do you know what is Big O notation?
5. Did you already use any design patterns? If the answer is positive could you explain the design pattern you used and why.
6. What frameworks and libraries did you already use? (e.g. jquery, angular, backbone.js)
7. Give me the name of 3 data structs and their complexities.
r = divide(3, 0)
r = unwrap(r)
.when('error', function(err) print(err) end)
.when('success', function(r)
r2 = mult(r, 3)
unwrap(r2).when('error')
end)
r = unwrap!(r)
class AnimationValue {
public:
AnimationValue(float keyTime, PassRefPtr<TimingFunction> timingFunction = 0)
: m_keyTime(keyTime)
{
if (timingFunction)
m_timingFunction = timingFunction;
}
virtual ~AnimationValue() { }