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
/** @param {Node|HTMLElement} node */ | |
function toJSON(node) { | |
if(!node) | |
node = this; | |
var obj = { nodeType: node.nodeType }; | |
if(node.tagName) | |
obj.tagName = node.tagName.toLowerCase(); | |
else if(node.nodeName) |
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
p_0(1 - t)^3 + 3p_1t(1 - t)^2 + 3p_2t^2(1 - t) + p_3t^3 | |
\\ | |
p_0(1 - 3t + 3t^2 - t^3) | |
+ 3p_1(t - 2t^2 + t^3) | |
+ 3p_2(t^2 - t^3) | |
+ p_3t^3 | |
\\ | |
t^3(p_3 - 3p_2 + 3p_1 - p_0) | |
+ t^23(p_2 - 2p_1 + p_0) | |
+ t3(p_1 - p_0) + p_0 |
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
/** @param {string} id | |
* @param {string} secret */ | |
function BitBucket(id, secret){ | |
this.auth = AccessToken(id, secret); | |
this.Commit = function(repo,branch,message,files){ | |
return Commit(repo,branch,message,files,this.auth.access_token); | |
} | |
} | |
/** @param {string} id |
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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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 resolved = false; | |
var resolving; | |
/* global FB */ | |
var fbResolver = new Promise((resolve,reject) => { | |
if(resolved) | |
return resolve(); | |
resolving = resolve; | |
}); |
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
image: python:3.5.1 | |
pipelines: | |
default: | |
- step: | |
script: # Modify the commands below to build and test your repository. | |
- apt-get update | |
- apt-get install -y zip | |
- zip -r $BITBUCKET_REPO_SLUG".zip" * | |
- pip install awscli |
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 (doc,req) { | |
if(!req.id) | |
return [null,{ message : "Support only PUT with id" }]; | |
if(!doc) | |
doc = { "_id":req.id }; | |
var data = JSON.parse(req.body); | |
delete data._id; | |
delete data.id; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using Google.Protobuf; | |
using Google.Protobuf.Collections; |
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
<#@ output extension=".cs" #> | |
class ObjectProxyOperator | |
{ | |
<# | |
{ | |
var types = new[]{ "sbyte","byte","short","ushort","int","uint","long","ulong","float","double","decimal" }; | |
foreach(var pair in new System.Collections.Generic.Dictionary<string,string>() { ["Add"] = "+",["Subtract"] = "-",["Multiply"] = "*",["Divide"] = "/",["Mod"] = "%" }) | |
{ | |
var func = pair.Key; | |
var op = pair.Value; |
OlderNewer