// jQuery
$(document).ready(function() {
// code
})
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
function traverse(obj,func, parent) { | |
for (i in obj){ | |
func.apply(this,[i,obj[i],parent]); | |
if (obj[i] instanceof Object && !(obj[i] instanceof Array)) { | |
traverse(obj[i],func, i); | |
} | |
} | |
} | |
function getPropertyRecursive(obj, 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
Function WeekNumber(t As NotesDateTime) As String | |
' Wrapper to work out week numbers of NotesDateTime objects in the | |
' current time zone | |
Dim lst As Variant | |
lst = t.LSLocalTime | |
WeekNumber = LSWeekNumber(lst) | |
End Function | |
Function LSWeekNumber(t As Variant) As String | |
' Returns the week number of a NotesDateTime object |
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
'use strict'; | |
// Add ECMA262-5 method binding if not supported natively | |
// | |
if (!('bind' in Function.prototype)) { | |
Function.prototype.bind= function(owner) { | |
var that= this; | |
if (arguments.length<=1) { | |
return function() { | |
return that.apply(owner, arguments); |
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
+ Part I: Getting to know CouchDB (10:00-12:30) | |
+ Hello | |
+ me = ssp@SUB | |
- https://github.com/ssp/ | |
- http://www.sub.uni-goettingen.de/ | |
- who are you? | |
- what are you doing? | |
- how do you think CouchDB could be interesting for you? | |
+ What is CouchDB? | |
- http://couchdb.apache.org |
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
/* Simple JavaScript Inheritance with NFE's | |
* MIT Licensed. | |
*/ | |
// Inspired by base2 and Prototype and John Resig's class system | |
(function(){ | |
var initializing = false; | |
// The base Class implementation (does nothing) | |
this.Class = 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
"use strict"; | |
/*Start of developer.mozilla.org Polyfill*/ | |
/*WARNING FOR SERVER SIDE JAVASCRIPT IN XPAGES: http://xomino.com/2014/03/02/prototypal-inheritance-of-ssjs-across-the-whole-server-in-xpages/ http://stackoverflow.com/questions/26695434/how-to-clean-ssjs-in-domino-server-after-someone-used-javascript-*/ | |
/* | |
* Polyfill: | |
Array.isArray | |
Array.prototype.indexOf | |
Array.prototype.lastIndexOf | |
Array.prototype.forEach | |
Array.prototype.some |
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
transaction = new DOMTransaction(function (container, articleList) { | |
var childCount = container.childNodes.length; | |
for (let article of articleList) | |
container.append(article); | |
// No DOM mutation is made until this function exits. | |
console.assert(childCount == container.childNodes.length); | |
}); | |
transaction.commit(element, articles); |
Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack.
- You can upload the zip file by converting byte array as follows.
- At first, it builds
form-data
. - Adds the zip file converted to byte array and
boundary
usingBuffer.concat()
. - This is used as body in request.
- At first, it builds