This sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or null.
Generally considered the proper way to set the prototype of an object, vs. the more controversial Object.prototype.proto property.
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
This is not the same as being equal according to the == operator. The == operator applies various coercions to both sides (if they are not the same Type) before testing for equality (resulting in such behavior as "" == false being true), but Object.is doesn't coerce either value.
This is also not the same as being equal according to the === operator. The === operator (and the == operator as well) treats the number values -0 and +0 as equal and treats Number.NaN as not equal to NaN.
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
//Utility for sending a HTTP request to an API interface regardless of parameters. | |
//Used this in a situation where a collection of different requests needed to be made and their result captured. | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.ResponseEntity; | |
import org.codehaus.jackson.map.ObjectMapper; //Can be used to map result to POJO | |
import org.json.JSONObject; | |
public void doRequest(ApiCall apiCall){ | |
//ApiCall is just a custom wrapper class to hold all parameters for a specific API transaction that needs to occur. |