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
// Prettier case statement, but can also return a value since it is an expression. | |
// | |
first_condition | |
? first_action() | |
: second_condition | |
? second_action() | |
: third_condition && can && (be || compound) | |
? ( | |
can(), |
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
#include <iostream> | |
template <typename Ret, typename Arg> | |
class Prod { | |
private: | |
Ret (*left)(Arg); | |
Ret (*right)(Arg); | |
public: | |
Prod(Ret (*l)(Arg), Ret (*r)(Arg)) { | |
this->left = l; |
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
/* This is the call-with-current-continuation found in Scheme and other | |
* Lisps. It captures the current call context and passes a callback to | |
* resume it as an argument to the function. Here, I've modified it to fit | |
* JavaScript and node.js paradigms by making it a method on Function | |
* objects and using function (err, result) style callbacks. | |
*/ | |
Function.prototype.callcc = function(context /* args... */) { | |
var that = this, | |
caller = Fiber.current, | |
fiber = Fiber(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
chunkify(InList, BaseChunkSize) -> | |
%%io:format("length of list is ~p and chunk size is ~p ~n",[length(InList),BaseChunkSize]), | |
case byte_size(term_to_binary(InList)) of | |
Size when Size > BaseChunkSize -> | |
NumberOfChunksLikely = ((Size div BaseChunkSize) + 1), | |
ChunkThreshold = Size div NumberOfChunksLikely, | |
chunkify(InList, ChunkThreshold, [], 0, []); | |
_Else -> | |
[InList] | |
end. |
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
[["R", "TN", "Lamar Alexander", "SenAlexander"], ["R", "NH", "Kelly Ayotte", "SenatorAyotte"], ["R", "WY", "John Barrasso", "SenJohnBarrasso"], ["D", "AK", "Mark Begich", "SenatorBegich"], ["R", "MO", "Roy Blunt", "RoyBlunt"], ["R", "AR", "John Boozman", "JohnBoozman"], ["D", "CA", "Barbara Boxer", "SenatorBoxer"], ["D", "OH", "Sherrod Brown", "SenSherrodBrown"], ["R", "NC", "Richard Burr", "SenatorBurr"], ["D", "WA", "Maria Cantwell", "US_Sen_Cantwell"], ["R", "IN", "Daniel Coats", "SenDanCoats"], ["R", "TN", "Bob Corker", "SenBobCorker"], ["R", "TX", "John Cornyn", "JohnCornyn"], ["R", "SC", "Jim DeMint", "JimDeMint"], ["R", "SC", "Lindsey Graham", "GrahamBlog"], ["R", "NV", "Dean Heller", "DeanHeller"], ["R", "NE", "Mike Johanns", "Mike_Johanns"], ["R", "WI", "Ron Johnson", "SenRonJohnson"], ["D", "SD", "Tim Johnson", "SenJohnsonSD"], ["R", "IL", "Mark Kirk", "markkirk"], ["R", "AZ", "Jon Kyl", "SenJonKyl"], ["R", "AZ", "John McCain", "SenJohnMcCain"], ["D", "MO", "Claire McCaskill", "clairecmc"], ["D", "N |
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
[["D", "CO", "Mark Udall", "MarkUdall"], ["R", "NM", "Stevan Pearce", "RepStevePearce"], ["R", "KY", "Rand Paul", "SenRandPaul"], ["R", "OH", "Jim Renacci", "RepJimRenacci"], ["R", "VA", "Scott Rigell", "RepScottRigell"], ["R", "FL", "David Rivera", "RepRivera"], ["R", "FL", "Dennis Ross", "RepDennisRoss"], ["R", "PA", "Joseph Pitts", "RepJoePitts"], ["R", "TX", "Ronald Paul", "RepRonPaul"], ["R", "IN", "Mike Pence", "RepMikePence"], ["R", "KS", "Pat Roberts", "SenPatRoberts"], ["R", "FL", "Ileana Ros-Lehtinen", "RosLehtinen"], ["R", "CA", "Edward Royce", "RepEdRoyce"], ["R", "NY", "Thomas Reed", "TomReedCongress"], ["R", "AL", "Martha Roby", "MarthaRoby"], ["R", "IN", "Todd Rokita", "ToddRokita"], ["D", "NH", "Jeanne Shaheen", "JeanneShaheen"], ["R", "AZ", "David Schweikert", "RepDavid"], ["R", "CO", "Scott Tipton", "RepTipton"], ["D", "NY", "Gary Ackerman", "RepGaryAckerman"], ["R", "AL", "Robert Aderholt", "Robert_Aderholt"], ["R", "MO", "W. Todd Akin", "ToddAkin"], ["R", "TN", "Lamar Alexander", "SenAlexa |
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
diff --git a/couch.js b/couch.js | |
index 26fb69e..21a6e82 100644 | |
--- a/couch.js | |
+++ b/couch.js | |
@@ -97,6 +97,198 @@ Dual licensed under the MIT and GPL licenses. | |
// END Math.uuid.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
diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py | |
index 6062117..a681420 100644 | |
--- a/gunicorn/app/base.py | |
+++ b/gunicorn/app/base.py | |
@@ -38,6 +38,7 @@ class Application(object): | |
self.callable = None | |
self.logger = None | |
self.do_load_config() | |
+ self.__handlers = None | |
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
INLINE ATTACHMENT | |
{ | |
_attachments: { | |
"awesome.jpeg": { | |
content_type: "image/jpeg", | |
data: "base64 data goes here", | |
headers: { | |
"Access-Control-Allow-Origin": "*", | |
"Access-Control-Allow-Methods": "GET, POST, OPTIONS", |
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
> Array.isArray(Object.create(Array.prototype)) != Array.isArray(new Array()) | |
true |