id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
39,100
bluemathsoft/bm-common
lib/ops.js
empty
function empty(arg0, datatype) { var A; if (Array.isArray(arg0)) { A = new ndarray_1.NDArray({ shape: arg0, datatype: datatype }); } else { A = new ndarray_1.NDArray({ shape: [arg0], datatype: datatype }); } return A; }
javascript
function empty(arg0, datatype) { var A; if (Array.isArray(arg0)) { A = new ndarray_1.NDArray({ shape: arg0, datatype: datatype }); } else { A = new ndarray_1.NDArray({ shape: [arg0], datatype: datatype }); } return A; }
[ "function", "empty", "(", "arg0", ",", "datatype", ")", "{", "var", "A", ";", "if", "(", "Array", ".", "isArray", "(", "arg0", ")", ")", "{", "A", "=", "new", "ndarray_1", ".", "NDArray", "(", "{", "shape", ":", "arg0", ",", "datatype", ":", "dat...
Creates empty NDArray of given shape or of given length if argument is a number
[ "Creates", "empty", "NDArray", "of", "given", "shape", "or", "of", "given", "length", "if", "argument", "is", "a", "number" ]
0915b3aa3b9aab25925984b24ebdc98168ea6e07
https://github.com/bluemathsoft/bm-common/blob/0915b3aa3b9aab25925984b24ebdc98168ea6e07/lib/ops.js#L151-L160
39,101
bluemathsoft/bm-common
lib/ops.js
cross
function cross(A, B) { if (A.shape.length !== 1 || B.shape.length !== 1) { throw new Error('A or B is not 1D'); } if (A.length < 3 || B.length < 3) { throw new Error('A or B is less than 3 in length'); } var a1 = A.getN(0); var a2 = A.getN(1); var a3 = A.getN(2); var b1 =...
javascript
function cross(A, B) { if (A.shape.length !== 1 || B.shape.length !== 1) { throw new Error('A or B is not 1D'); } if (A.length < 3 || B.length < 3) { throw new Error('A or B is less than 3 in length'); } var a1 = A.getN(0); var a2 = A.getN(1); var a3 = A.getN(2); var b1 =...
[ "function", "cross", "(", "A", ",", "B", ")", "{", "if", "(", "A", ".", "shape", ".", "length", "!==", "1", "||", "B", ".", "shape", ".", "length", "!==", "1", ")", "{", "throw", "new", "Error", "(", "'A or B is not 1D'", ")", ";", "}", "if", "...
Computes cross product of A and B Only defined for A and B to 1D vectors of length at least 3 Only first 3 elements of A and B are used
[ "Computes", "cross", "product", "of", "A", "and", "B", "Only", "defined", "for", "A", "and", "B", "to", "1D", "vectors", "of", "length", "at", "least", "3", "Only", "first", "3", "elements", "of", "A", "and", "B", "are", "used" ]
0915b3aa3b9aab25925984b24ebdc98168ea6e07
https://github.com/bluemathsoft/bm-common/blob/0915b3aa3b9aab25925984b24ebdc98168ea6e07/lib/ops.js#L195-L213
39,102
bluemathsoft/bm-common
lib/ops.js
length
function length(A) { if (A.shape.length !== 1) { throw new Error('A is not a 1D array'); } return Math.sqrt(dot(A, A)); }
javascript
function length(A) { if (A.shape.length !== 1) { throw new Error('A is not a 1D array'); } return Math.sqrt(dot(A, A)); }
[ "function", "length", "(", "A", ")", "{", "if", "(", "A", ".", "shape", ".", "length", "!==", "1", ")", "{", "throw", "new", "Error", "(", "'A is not a 1D array'", ")", ";", "}", "return", "Math", ".", "sqrt", "(", "dot", "(", "A", ",", "A", ")",...
Computes length or magnitude of A, where A is a 1D vector
[ "Computes", "length", "or", "magnitude", "of", "A", "where", "A", "is", "a", "1D", "vector" ]
0915b3aa3b9aab25925984b24ebdc98168ea6e07
https://github.com/bluemathsoft/bm-common/blob/0915b3aa3b9aab25925984b24ebdc98168ea6e07/lib/ops.js#L218-L223
39,103
bluemathsoft/bm-common
lib/ops.js
dir
function dir(A) { if (A.shape.length !== 1) { throw new Error('A is not a 1D array'); } return div(A, length(A)); }
javascript
function dir(A) { if (A.shape.length !== 1) { throw new Error('A is not a 1D array'); } return div(A, length(A)); }
[ "function", "dir", "(", "A", ")", "{", "if", "(", "A", ".", "shape", ".", "length", "!==", "1", ")", "{", "throw", "new", "Error", "(", "'A is not a 1D array'", ")", ";", "}", "return", "div", "(", "A", ",", "length", "(", "A", ")", ")", ";", "...
Computes direction vector of A, where A is a 1D vector
[ "Computes", "direction", "vector", "of", "A", "where", "A", "is", "a", "1D", "vector" ]
0915b3aa3b9aab25925984b24ebdc98168ea6e07
https://github.com/bluemathsoft/bm-common/blob/0915b3aa3b9aab25925984b24ebdc98168ea6e07/lib/ops.js#L228-L233
39,104
enmasseio/babble
lib/block/IIf.js
IIf
function IIf (condition, trueBlock, falseBlock) { if (!(this instanceof IIf)) { throw new SyntaxError('Constructor must be called with the new operator'); } if (typeof condition === 'function') { this.condition = condition; } else if (condition instanceof RegExp) { this.condition = function (mess...
javascript
function IIf (condition, trueBlock, falseBlock) { if (!(this instanceof IIf)) { throw new SyntaxError('Constructor must be called with the new operator'); } if (typeof condition === 'function') { this.condition = condition; } else if (condition instanceof RegExp) { this.condition = function (mess...
[ "function", "IIf", "(", "condition", ",", "trueBlock", ",", "falseBlock", ")", "{", "if", "(", "!", "(", "this", "instanceof", "IIf", ")", ")", "{", "throw", "new", "SyntaxError", "(", "'Constructor must be called with the new operator'", ")", ";", "}", "if", ...
extend Block with function then IIf Create an iif block, which checks a condition and continues either with the trueBlock or the falseBlock. The input message is passed to the next block in the flow. Can be used as follows: - When `condition` evaluates true: - when `trueBlock` is provided, the flow continues with `tr...
[ "extend", "Block", "with", "function", "then", "IIf", "Create", "an", "iif", "block", "which", "checks", "a", "condition", "and", "continues", "either", "with", "the", "trueBlock", "or", "the", "falseBlock", ".", "The", "input", "message", "is", "passed", "t...
6b7e84d7fb0df2d1129f0646b37a9d89d3da2539
https://github.com/enmasseio/babble/blob/6b7e84d7fb0df2d1129f0646b37a9d89d3da2539/lib/block/IIf.js#L43-L72
39,105
co3moz/gluon
gluon.js
function () { return Token.destroy({ where: { code: req.get('token') } }).then(function (data) { return data; }).catch(function (err) { res.database(err) }); }
javascript
function () { return Token.destroy({ where: { code: req.get('token') } }).then(function (data) { return data; }).catch(function (err) { res.database(err) }); }
[ "function", "(", ")", "{", "return", "Token", ".", "destroy", "(", "{", "where", ":", "{", "code", ":", "req", ".", "get", "(", "'token'", ")", "}", "}", ")", ".", "then", "(", "function", "(", "data", ")", "{", "return", "data", ";", "}", ")",...
Removes token from owner @returns {Promise.<TResult>}
[ "Removes", "token", "from", "owner" ]
b6ca29330ce518b7f909755cad70a42f6add3fed
https://github.com/co3moz/gluon/blob/b6ca29330ce518b7f909755cad70a42f6add3fed/gluon.js#L174-L184
39,106
co3moz/gluon
gluon.js
function (roles) { roles.map(function (role) { return Role.findOrCreate({ where: { code: role, ownerId: req[options.auth.model].id }, defaults: { code: role, ...
javascript
function (roles) { roles.map(function (role) { return Role.findOrCreate({ where: { code: role, ownerId: req[options.auth.model].id }, defaults: { code: role, ...
[ "function", "(", "roles", ")", "{", "roles", ".", "map", "(", "function", "(", "role", ")", "{", "return", "Role", ".", "findOrCreate", "(", "{", "where", ":", "{", "code", ":", "role", ",", "ownerId", ":", "req", "[", "options", ".", "auth", ".", ...
Adds a roles to owner @param {Array<String>} roles Which roles @returns {Promise.<Instance>}
[ "Adds", "a", "roles", "to", "owner" ]
b6ca29330ce518b7f909755cad70a42f6add3fed
https://github.com/co3moz/gluon/blob/b6ca29330ce518b7f909755cad70a42f6add3fed/gluon.js#L218-L238
39,107
co3moz/gluon
gluon.js
function (role) { return Role.destroy({ where: { code: role, ownerId: req[options.auth.model].id }, limit: 1 }).catch(function (err) { res.database(err) }); }
javascript
function (role) { return Role.destroy({ where: { code: role, ownerId: req[options.auth.model].id }, limit: 1 }).catch(function (err) { res.database(err) }); }
[ "function", "(", "role", ")", "{", "return", "Role", ".", "destroy", "(", "{", "where", ":", "{", "code", ":", "role", ",", "ownerId", ":", "req", "[", "options", ".", "auth", ".", "model", "]", ".", "id", "}", ",", "limit", ":", "1", "}", ")",...
Removes a role from owner @param {String} role Which role @returns {Promise.<Number>}
[ "Removes", "a", "role", "from", "owner" ]
b6ca29330ce518b7f909755cad70a42f6add3fed
https://github.com/co3moz/gluon/blob/b6ca29330ce518b7f909755cad70a42f6add3fed/gluon.js#L247-L257
39,108
co3moz/gluon
gluon.js
function (role) { return Role.count({ where: { code: role, ownerId: req[options.auth.model].id }, limit: 1 }).then(function (data) { return data == 1 }).catch(function (err) { ...
javascript
function (role) { return Role.count({ where: { code: role, ownerId: req[options.auth.model].id }, limit: 1 }).then(function (data) { return data == 1 }).catch(function (err) { ...
[ "function", "(", "role", ")", "{", "return", "Role", ".", "count", "(", "{", "where", ":", "{", "code", ":", "role", ",", "ownerId", ":", "req", "[", "options", ".", "auth", ".", "model", "]", ".", "id", "}", ",", "limit", ":", "1", "}", ")", ...
Checks for role @param {String} role Which role @returns {Promise.<Boolean>}
[ "Checks", "for", "role" ]
b6ca29330ce518b7f909755cad70a42f6add3fed
https://github.com/co3moz/gluon/blob/b6ca29330ce518b7f909755cad70a42f6add3fed/gluon.js#L285-L297
39,109
co3moz/gluon
gluon.js
function (roles) { return Role.count({ where: { code: { $in: roles }, ownerId: req[options.auth.model].id } }).then(function (data) { return data == roles.length ...
javascript
function (roles) { return Role.count({ where: { code: { $in: roles }, ownerId: req[options.auth.model].id } }).then(function (data) { return data == roles.length ...
[ "function", "(", "roles", ")", "{", "return", "Role", ".", "count", "(", "{", "where", ":", "{", "code", ":", "{", "$in", ":", "roles", "}", ",", "ownerId", ":", "req", "[", "options", ".", "auth", ".", "model", "]", ".", "id", "}", "}", ")", ...
Checks for roles @param {Array<String>} roles Which roles @returns {Promise.<Boolean>}
[ "Checks", "for", "roles" ]
b6ca29330ce518b7f909755cad70a42f6add3fed
https://github.com/co3moz/gluon/blob/b6ca29330ce518b7f909755cad70a42f6add3fed/gluon.js#L305-L318
39,110
reklatsmasters/btparse
lib/avltree.js
create
function create(key, value) { if (!Buffer.isBuffer(key)) { throw new TypeError('expected buffer') } return { key, value, left: null, right: null, height: 0 } }
javascript
function create(key, value) { if (!Buffer.isBuffer(key)) { throw new TypeError('expected buffer') } return { key, value, left: null, right: null, height: 0 } }
[ "function", "create", "(", "key", ",", "value", ")", "{", "if", "(", "!", "Buffer", ".", "isBuffer", "(", "key", ")", ")", "{", "throw", "new", "TypeError", "(", "'expected buffer'", ")", "}", "return", "{", "key", ",", "value", ",", "left", ":", "...
create new AVL tree node @returns {{key: null, value: null, height: number, left: null, right: null}}
[ "create", "new", "AVL", "tree", "node" ]
caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9
https://github.com/reklatsmasters/btparse/blob/caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9/lib/avltree.js#L15-L27
39,111
reklatsmasters/btparse
lib/avltree.js
compare
function compare(tree_key, key) { let buf if (Buffer.isBuffer(key)) { buf = key } else if (typeof key == 'string') { buf = Buffer.from(key) } else { throw new TypeError('Argument `key` must be a Buffer or a string') } return Buffer.compare(tree_key, buf) }
javascript
function compare(tree_key, key) { let buf if (Buffer.isBuffer(key)) { buf = key } else if (typeof key == 'string') { buf = Buffer.from(key) } else { throw new TypeError('Argument `key` must be a Buffer or a string') } return Buffer.compare(tree_key, buf) }
[ "function", "compare", "(", "tree_key", ",", "key", ")", "{", "let", "buf", "if", "(", "Buffer", ".", "isBuffer", "(", "key", ")", ")", "{", "buf", "=", "key", "}", "else", "if", "(", "typeof", "key", "==", "'string'", ")", "{", "buf", "=", "Buff...
compare 2 keys @param tree_key {Buffer} @param key {string|Buffer} @returns {number}
[ "compare", "2", "keys" ]
caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9
https://github.com/reklatsmasters/btparse/blob/caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9/lib/avltree.js#L35-L47
39,112
reklatsmasters/btparse
lib/avltree.js
lookup
function lookup(tree, key) { if (!tree) { return null } switch (compare(tree.key, key)) { case 0: return tree case 1: return lookup(tree.right, key) case -1: return lookup(tree.left, key) default: break } }
javascript
function lookup(tree, key) { if (!tree) { return null } switch (compare(tree.key, key)) { case 0: return tree case 1: return lookup(tree.right, key) case -1: return lookup(tree.left, key) default: break } }
[ "function", "lookup", "(", "tree", ",", "key", ")", "{", "if", "(", "!", "tree", ")", "{", "return", "null", "}", "switch", "(", "compare", "(", "tree", ".", "key", ",", "key", ")", ")", "{", "case", "0", ":", "return", "tree", "case", "1", ":"...
search `key` in AVL tree @param tree {Object} @param key {Buffer|String} @returns {Buffer|Object|null}
[ "search", "key", "in", "AVL", "tree" ]
caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9
https://github.com/reklatsmasters/btparse/blob/caacdfd3cd24fb2e68d67f0dab64dd5ba8947ad9/lib/avltree.js#L55-L70
39,113
logikum/md-site-engine
source/models/metadata.js
function( definitions, path ) { //region Search engine properties /** * Gets the title of the document. * @type {string} * @readonly */ this.title = ''; /** * Gets the keywords of the document. * @type {string} * @readonly */ this.keywords = ''; /** * Gets the description of t...
javascript
function( definitions, path ) { //region Search engine properties /** * Gets the title of the document. * @type {string} * @readonly */ this.title = ''; /** * Gets the keywords of the document. * @type {string} * @readonly */ this.keywords = ''; /** * Gets the description of t...
[ "function", "(", "definitions", ",", "path", ")", "{", "//region Search engine properties", "/**\n * Gets the title of the document.\n * @type {string}\n * @readonly\n */", "this", ".", "title", "=", "''", ";", "/**\n * Gets the keywords of the document.\n * @type {string}\...
Represents the metadata of a content. @param {object} definitions - A collection of properties. @param {string} path - The path of the current content. @constructor
[ "Represents", "the", "metadata", "of", "a", "content", "." ]
1abb0d9d6ea2c84690b9ffdde6b7ff7d49288784
https://github.com/logikum/md-site-engine/blob/1abb0d9d6ea2c84690b9ffdde6b7ff7d49288784/source/models/metadata.js#L35-L151
39,114
wangtao0101/parse-import-es6
src/parseImport.js
findLeadingComments
function findLeadingComments(comments, index, beginIndex, first) { const leadComments = []; if (first && ignoreComment.test(comments[index].raw)) { return leadComments; } let backIndex = index - 1; while (backIndex >= beginIndex && (comments[backIndex].loc.end.line + 1 === comments[b...
javascript
function findLeadingComments(comments, index, beginIndex, first) { const leadComments = []; if (first && ignoreComment.test(comments[index].raw)) { return leadComments; } let backIndex = index - 1; while (backIndex >= beginIndex && (comments[backIndex].loc.end.line + 1 === comments[b...
[ "function", "findLeadingComments", "(", "comments", ",", "index", ",", "beginIndex", ",", "first", ")", "{", "const", "leadComments", "=", "[", "]", ";", "if", "(", "first", "&&", "ignoreComment", ".", "test", "(", "comments", "[", "index", "]", ".", "ra...
return leading comment list @param {*list<comment>} comments @param {*} the last match leading comment of one import @param {*} beginIndex the potential begin of the comment index of the import @param {*} first whether first import
[ "return", "leading", "comment", "list" ]
c0ada33342b07e58cba83c27b6f1d92e522f35ac
https://github.com/wangtao0101/parse-import-es6/blob/c0ada33342b07e58cba83c27b6f1d92e522f35ac/src/parseImport.js#L78-L96
39,115
ssmolkin1/my-little-schemer
src/prim/ops.js
loadTo
function loadTo(S) { /** * Takes a non-empty list as its argument and return the first member of the argument. * @param {list} l * @returns {*} * @example * // returns 1 * car([1, 2]); */ S.car = (l) => { if (S.isAtom(l) || S.isNull(l)) { throw new TypeError('The Law of Car: You can...
javascript
function loadTo(S) { /** * Takes a non-empty list as its argument and return the first member of the argument. * @param {list} l * @returns {*} * @example * // returns 1 * car([1, 2]); */ S.car = (l) => { if (S.isAtom(l) || S.isNull(l)) { throw new TypeError('The Law of Car: You can...
[ "function", "loadTo", "(", "S", ")", "{", "/**\n * Takes a non-empty list as its argument and return the first member of the argument.\n * @param {list} l\n * @returns {*}\n * @example\n * // returns 1\n * car([1, 2]);\n */", "S", ".", "car", "=", "(", "l", ")", "=>", "...
Inserts methods into namespace @param {object} S The namepsace into which the methods are inserted. @returns {void}
[ "Inserts", "methods", "into", "namespace" ]
618b9e94ffd0cc7f45a458bdf9eaa14aa90956b3
https://github.com/ssmolkin1/my-little-schemer/blob/618b9e94ffd0cc7f45a458bdf9eaa14aa90956b3/src/prim/ops.js#L6-L124
39,116
codekirei/columnize-array
lib/columns.js
Columns
function Columns(props) { // require and bind methods //---------------------------------------------------------- [ 'bindState' , 'solve' ].forEach(method => this.constructor.prototype[method] = require(`./methods/${method}`) ) // bind props (immutable) and state (mutable) //---------------------...
javascript
function Columns(props) { // require and bind methods //---------------------------------------------------------- [ 'bindState' , 'solve' ].forEach(method => this.constructor.prototype[method] = require(`./methods/${method}`) ) // bind props (immutable) and state (mutable) //---------------------...
[ "function", "Columns", "(", "props", ")", "{", "// require and bind methods", "//----------------------------------------------------------", "[", "'bindState'", ",", "'solve'", "]", ".", "forEach", "(", "method", "=>", "this", ".", "constructor", ".", "prototype", "[",...
Constructor with columnization logic. @param {Object} props - immutable properties that dictate columnization @returns {Object} instance of self
[ "Constructor", "with", "columnization", "logic", "." ]
ba100d1d9cf707fa249a58fa177d6b26ec131278
https://github.com/codekirei/columnize-array/blob/ba100d1d9cf707fa249a58fa177d6b26ec131278/lib/columns.js#L9-L27
39,117
juttle/juttle-viz
src/lib/utils/string-utils.js
function(str, maxLength, where) { if (!_.isString(str)) { return str; } var strLength = str.length; if (strLength <= maxLength) { return str; } // limit the length of the series name by dropping characters and inserting an ELLIPSIS where...
javascript
function(str, maxLength, where) { if (!_.isString(str)) { return str; } var strLength = str.length; if (strLength <= maxLength) { return str; } // limit the length of the series name by dropping characters and inserting an ELLIPSIS where...
[ "function", "(", "str", ",", "maxLength", ",", "where", ")", "{", "if", "(", "!", "_", ".", "isString", "(", "str", ")", ")", "{", "return", "str", ";", "}", "var", "strLength", "=", "str", ".", "length", ";", "if", "(", "strLength", "<=", "maxLe...
Truncate string to a maxLength @param {[type]} str [description] @param {[type]} maxLength [description] @param {[type]} where where to truncate and put the ellipsis (start, middle, or end). defaults to middle. @return {[type]} [description]
[ "Truncate", "string", "to", "a", "maxLength" ]
834d13a66256d9c9177f46968b0ef05b8143e762
https://github.com/juttle/juttle-viz/blob/834d13a66256d9c9177f46968b0ef05b8143e762/src/lib/utils/string-utils.js#L12-L36
39,118
logikum/md-site-engine
source/readers/process-contents.js
processContents
function processContents( contentDir, contentRoot, submenuFile, contentStock, menuStock, references, language, renderer ) { var typeName = 'Content'; // Read directory items. var items = fs.readdirSync( path.join( process.cwd(), contentDir ) ); items.forEach( function ( item ) { // Get full path o...
javascript
function processContents( contentDir, contentRoot, submenuFile, contentStock, menuStock, references, language, renderer ) { var typeName = 'Content'; // Read directory items. var items = fs.readdirSync( path.join( process.cwd(), contentDir ) ); items.forEach( function ( item ) { // Get full path o...
[ "function", "processContents", "(", "contentDir", ",", "contentRoot", ",", "submenuFile", ",", "contentStock", ",", "menuStock", ",", "references", ",", "language", ",", "renderer", ")", "{", "var", "typeName", "=", "'Content'", ";", "// Read directory items.", "v...
Processes the items of a content sub-directory. @param {string} contentDir - The path of the content sub-directory. @param {string} contentRoot - The base URL of the content sub-directory. @param {string} submenuFile - The path of the menu level file (__submenu.txt). @param {ContentStock} contentStock - The content sto...
[ "Processes", "the", "items", "of", "a", "content", "sub", "-", "directory", "." ]
1abb0d9d6ea2c84690b9ffdde6b7ff7d49288784
https://github.com/logikum/md-site-engine/blob/1abb0d9d6ea2c84690b9ffdde6b7ff7d49288784/source/readers/process-contents.js#L22-L106
39,119
oramics/synth-kit
lib/instruments/tonewheel.js
toState
function toState (preset) { if (preset) { const norm = (preset.replace(/[^012345678]/g, "") + "000000000").slice(0, 9) const gains = norm.split("").map((n) => Math.abs(+n / 8)) return { bank: { gains } } } }
javascript
function toState (preset) { if (preset) { const norm = (preset.replace(/[^012345678]/g, "") + "000000000").slice(0, 9) const gains = norm.split("").map((n) => Math.abs(+n / 8)) return { bank: { gains } } } }
[ "function", "toState", "(", "preset", ")", "{", "if", "(", "preset", ")", "{", "const", "norm", "=", "(", "preset", ".", "replace", "(", "/", "[^012345678]", "/", "g", ",", "\"\"", ")", "+", "\"000000000\"", ")", ".", "slice", "(", "0", ",", "9", ...
Given a preset, return a state fragment
[ "Given", "a", "preset", "return", "a", "state", "fragment" ]
38de28d945241507e2bb195eb551aaff7c1c55d5
https://github.com/oramics/synth-kit/blob/38de28d945241507e2bb195eb551aaff7c1c55d5/lib/instruments/tonewheel.js#L45-L53
39,120
express-bem/express-bem
lib/engines.js
function (name, extension, engine) { // add to storage this[name] = engine.render || engine; enginesByExtension[extension] = engine; return this; }
javascript
function (name, extension, engine) { // add to storage this[name] = engine.render || engine; enginesByExtension[extension] = engine; return this; }
[ "function", "(", "name", ",", "extension", ",", "engine", ")", "{", "// add to storage", "this", "[", "name", "]", "=", "engine", ".", "render", "||", "engine", ";", "enginesByExtension", "[", "extension", "]", "=", "engine", ";", "return", "this", ";", ...
add bem engine @param {String} [name] @param {String} [extension] @param {Function|Object} engine @returns {Engines}
[ "add", "bem", "engine" ]
6ea49e5ecdd8e949dd5051ecc5762e40cbcead9c
https://github.com/express-bem/express-bem/blob/6ea49e5ecdd8e949dd5051ecc5762e40cbcead9c/lib/engines.js#L22-L28
39,121
express-bem/express-bem
lib/engines.js
function (name, options, cb) { var engine = enginesByExtension[this.ext], that = this, // queue stack = [], ctx = { name : name, options : options, c...
javascript
function (name, options, cb) { var engine = enginesByExtension[this.ext], that = this, // queue stack = [], ctx = { name : name, options : options, c...
[ "function", "(", "name", ",", "options", ",", "cb", ")", "{", "var", "engine", "=", "enginesByExtension", "[", "this", ".", "ext", "]", ",", "that", "=", "this", ",", "// queue", "stack", "=", "[", "]", ",", "ctx", "=", "{", "name", ":", "name", ...
all engines will pass through it
[ "all", "engines", "will", "pass", "through", "it" ]
6ea49e5ecdd8e949dd5051ecc5762e40cbcead9c
https://github.com/express-bem/express-bem/blob/6ea49e5ecdd8e949dd5051ecc5762e40cbcead9c/lib/engines.js#L75-L123
39,122
chrisJohn404/ljswitchboard-ljm_device_curator
lib/dashboard/dashboard_operations.js
addListener
function addListener(uid) { var addedListener = false; if(typeof(dashboardListeners[uid]) === 'undefined') { dashboardListeners[uid] = { 'startTime': new Date(), 'numIterations': 0, 'uid': uid, 'numStarts': 1, }; addedListener = true; } else { // Don't add the listener. dashboardLis...
javascript
function addListener(uid) { var addedListener = false; if(typeof(dashboardListeners[uid]) === 'undefined') { dashboardListeners[uid] = { 'startTime': new Date(), 'numIterations': 0, 'uid': uid, 'numStarts': 1, }; addedListener = true; } else { // Don't add the listener. dashboardLis...
[ "function", "addListener", "(", "uid", ")", "{", "var", "addedListener", "=", "false", ";", "if", "(", "typeof", "(", "dashboardListeners", "[", "uid", "]", ")", "===", "'undefined'", ")", "{", "dashboardListeners", "[", "uid", "]", "=", "{", "'startTime'"...
Function that adds a data listener.
[ "Function", "that", "adds", "a", "data", "listener", "." ]
36cb25645dfa0a68e906d5ec43e5514391947257
https://github.com/chrisJohn404/ljswitchboard-ljm_device_curator/blob/36cb25645dfa0a68e906d5ec43e5514391947257/lib/dashboard/dashboard_operations.js#L85-L100
39,123
chrisJohn404/ljswitchboard-ljm_device_curator
lib/dashboard/dashboard_operations.js
removeListener
function removeListener(uid) { var removedListener = false; if(typeof(dashboardListeners[uid]) !== 'undefined') { dashboardListeners[uid] = undefined; delete dashboardListeners[uid]; removedListener = true; } return removedListener; }
javascript
function removeListener(uid) { var removedListener = false; if(typeof(dashboardListeners[uid]) !== 'undefined') { dashboardListeners[uid] = undefined; delete dashboardListeners[uid]; removedListener = true; } return removedListener; }
[ "function", "removeListener", "(", "uid", ")", "{", "var", "removedListener", "=", "false", ";", "if", "(", "typeof", "(", "dashboardListeners", "[", "uid", "]", ")", "!==", "'undefined'", ")", "{", "dashboardListeners", "[", "uid", "]", "=", "undefined", ...
Function that removes a data listener.
[ "Function", "that", "removes", "a", "data", "listener", "." ]
36cb25645dfa0a68e906d5ec43e5514391947257
https://github.com/chrisJohn404/ljswitchboard-ljm_device_curator/blob/36cb25645dfa0a68e906d5ec43e5514391947257/lib/dashboard/dashboard_operations.js#L103-L111
39,124
chrisJohn404/ljswitchboard-ljm_device_curator
lib/dashboard/dashboard_operations.js
dataCollectorHandler
function dataCollectorHandler(data) { // debugDDC('New data', data['FIO0']); var diffObj = _.diff(data, self.dataCache); // console.log('Data Difference - diff', diffObj); // Clean the object to get rid of empty results. diffObj = _.pickBy(diffObj, function(value, key) { return Object.keys(value).length >...
javascript
function dataCollectorHandler(data) { // debugDDC('New data', data['FIO0']); var diffObj = _.diff(data, self.dataCache); // console.log('Data Difference - diff', diffObj); // Clean the object to get rid of empty results. diffObj = _.pickBy(diffObj, function(value, key) { return Object.keys(value).length >...
[ "function", "dataCollectorHandler", "(", "data", ")", "{", "// debugDDC('New data', data['FIO0']);", "var", "diffObj", "=", "_", ".", "diff", "(", "data", ",", "self", ".", "dataCache", ")", ";", "// console.log('Data Difference - diff', diffObj);", "// Clean the object t...
Function that handles the data collection "data" events. This data is the data returned by the read-commands that are performed. This data still needs to be interpreted saved, cached, and organized into "channels". Maybe?? The dashboard_data_collector has logic for each of the devices. This logic should probably be pu...
[ "Function", "that", "handles", "the", "data", "collection", "data", "events", ".", "This", "data", "is", "the", "data", "returned", "by", "the", "read", "-", "commands", "that", "are", "performed", ".", "This", "data", "still", "needs", "to", "be", "interp...
36cb25645dfa0a68e906d5ec43e5514391947257
https://github.com/chrisJohn404/ljswitchboard-ljm_device_curator/blob/36cb25645dfa0a68e906d5ec43e5514391947257/lib/dashboard/dashboard_operations.js#L143-L160
39,125
chrisJohn404/ljswitchboard-ljm_device_curator
lib/dashboard/dashboard_operations.js
innerStart
function innerStart (bundle) { var defered = q.defer(); // Device Type is either T4, T5, or T7 var deviceType = self.savedAttributes.deviceTypeName; // Save the created data collector object dataCollector = new dashboard_data_collector.create(deviceType); // Listen to only the next 'data' event emitted b...
javascript
function innerStart (bundle) { var defered = q.defer(); // Device Type is either T4, T5, or T7 var deviceType = self.savedAttributes.deviceTypeName; // Save the created data collector object dataCollector = new dashboard_data_collector.create(deviceType); // Listen to only the next 'data' event emitted b...
[ "function", "innerStart", "(", "bundle", ")", "{", "var", "defered", "=", "q", ".", "defer", "(", ")", ";", "// Device Type is either T4, T5, or T7", "var", "deviceType", "=", "self", ".", "savedAttributes", ".", "deviceTypeName", ";", "// Save the created data coll...
This function starts the data collector and registers event listeners.
[ "This", "function", "starts", "the", "data", "collector", "and", "registers", "event", "listeners", "." ]
36cb25645dfa0a68e906d5ec43e5514391947257
https://github.com/chrisJohn404/ljswitchboard-ljm_device_curator/blob/36cb25645dfa0a68e906d5ec43e5514391947257/lib/dashboard/dashboard_operations.js#L173-L201
39,126
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(k, i) { var rval; if(typeof(k) === 'undefined') { rval = frag.query; } else { rval = frag.query[k]; if(rval && typeof(i) !== 'undefined') { rval = rval[i]; } } return rval; }
javascript
function(k, i) { var rval; if(typeof(k) === 'undefined') { rval = frag.query; } else { rval = frag.query[k]; if(rval && typeof(i) !== 'undefined') { rval = rval[i]; } } return rval; }
[ "function", "(", "k", ",", "i", ")", "{", "var", "rval", ";", "if", "(", "typeof", "(", "k", ")", "===", "'undefined'", ")", "{", "rval", "=", "frag", ".", "query", ";", "}", "else", "{", "rval", "=", "frag", ".", "query", "[", "k", "]", ";",...
Get query, values for a key, or value for a key index. @param k optional query key. @param i optional query key index. @return query, values for a key, or value for a key index.
[ "Get", "query", "values", "for", "a", "key", "or", "value", "for", "a", "key", "index", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L2833-L2844
39,127
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_expandKey
function _expandKey(key, decrypt) { // copy the key's words to initialize the key schedule var w = key.slice(0); /* RotWord() will rotate a word, moving the first byte to the last byte's position (shifting the other bytes left). We will be getting the value of Rcon at i / Nk. 'i' will iterate ...
javascript
function _expandKey(key, decrypt) { // copy the key's words to initialize the key schedule var w = key.slice(0); /* RotWord() will rotate a word, moving the first byte to the last byte's position (shifting the other bytes left). We will be getting the value of Rcon at i / Nk. 'i' will iterate ...
[ "function", "_expandKey", "(", "key", ",", "decrypt", ")", "{", "// copy the key's words to initialize the key schedule\r", "var", "w", "=", "key", ".", "slice", "(", "0", ")", ";", "/* RotWord() will rotate a word, moving the first byte to the last\r\n byte's position (shif...
Generates a key schedule using the AES key expansion algorithm. The AES algorithm takes the Cipher Key, K, and performs a Key Expansion routine to generate a key schedule. The Key Expansion generates a total of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words, and each of the Nr rounds requires Nb ...
[ "Generates", "a", "key", "schedule", "using", "the", "AES", "key", "expansion", "algorithm", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L5425-L5548
39,128
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_update
function _update(s, w, bytes) { // consume 512 bit (64 byte) chunks var t, a, b, c, d, f, r, i; var len = bytes.length(); while(len >= 64) { // initialize hash value for this chunk a = s.h0; b = s.h1; c = s.h2; d = s.h3; // round 1 for(i = 0; i < 16; ++i) { w[i] =...
javascript
function _update(s, w, bytes) { // consume 512 bit (64 byte) chunks var t, a, b, c, d, f, r, i; var len = bytes.length(); while(len >= 64) { // initialize hash value for this chunk a = s.h0; b = s.h1; c = s.h2; d = s.h3; // round 1 for(i = 0; i < 16; ++i) { w[i] =...
[ "function", "_update", "(", "s", ",", "w", ",", "bytes", ")", "{", "// consume 512 bit (64 byte) chunks\r", "var", "t", ",", "a", ",", "b", ",", "c", ",", "d", ",", "f", ",", "r", ",", "i", ";", "var", "len", "=", "bytes", ".", "length", "(", ")"...
Updates an MD5 state with the given byte buffer. @param s the MD5 state to update. @param w the array to use to store words. @param bytes the byte buffer to update with.
[ "Updates", "an", "MD5", "state", "with", "the", "given", "byte", "buffer", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L7563-L7624
39,129
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_reseed
function _reseed(callback) { if(ctx.pools[0].messageLength >= 32) { _seed(); return callback(); } // not enough seed data... var needed = (32 - ctx.pools[0].messageLength) << 5; ctx.seedFile(needed, function(err, bytes) { if(err) { return callback(err); } ...
javascript
function _reseed(callback) { if(ctx.pools[0].messageLength >= 32) { _seed(); return callback(); } // not enough seed data... var needed = (32 - ctx.pools[0].messageLength) << 5; ctx.seedFile(needed, function(err, bytes) { if(err) { return callback(err); } ...
[ "function", "_reseed", "(", "callback", ")", "{", "if", "(", "ctx", ".", "pools", "[", "0", "]", ".", "messageLength", ">=", "32", ")", "{", "_seed", "(", ")", ";", "return", "callback", "(", ")", ";", "}", "// not enough seed data...\r", "var", "neede...
Private function that asynchronously reseeds a generator. @param callback(err) called once the operation completes.
[ "Private", "function", "that", "asynchronously", "reseeds", "a", "generator", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L10590-L10605
39,130
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(e) { var data = e.data; if(data.forge && data.forge.prng) { ctx.seedFile(data.forge.prng.needed, function(err, bytes) { worker.postMessage({forge: {prng: {err: err, bytes: bytes}}}); }); } }
javascript
function(e) { var data = e.data; if(data.forge && data.forge.prng) { ctx.seedFile(data.forge.prng.needed, function(err, bytes) { worker.postMessage({forge: {prng: {err: err, bytes: bytes}}}); }); } }
[ "function", "(", "e", ")", "{", "var", "data", "=", "e", ".", "data", ";", "if", "(", "data", ".", "forge", "&&", "data", ".", "forge", ".", "prng", ")", "{", "ctx", ".", "seedFile", "(", "data", ".", "forge", ".", "prng", ".", "needed", ",", ...
main thread sends random bytes upon request
[ "main", "thread", "sends", "random", "bytes", "upon", "request" ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L10803-L10810
39,131
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(iv, output) { if(iv) { /* CBC mode */ if(typeof iv === 'string') { iv = forge.util.createBuffer(iv); } } _finish = false; _input = forge.util.createBuffer(); _output = output || new forge.util.createBuffer(); _iv = iv; c...
javascript
function(iv, output) { if(iv) { /* CBC mode */ if(typeof iv === 'string') { iv = forge.util.createBuffer(iv); } } _finish = false; _input = forge.util.createBuffer(); _output = output || new forge.util.createBuffer(); _iv = iv; c...
[ "function", "(", "iv", ",", "output", ")", "{", "if", "(", "iv", ")", "{", "/* CBC mode */", "if", "(", "typeof", "iv", "===", "'string'", ")", "{", "iv", "=", "forge", ".", "util", ".", "createBuffer", "(", "iv", ")", ";", "}", "}", "_finish", "...
Starts or restarts the encryption or decryption process, whichever was previously configured. To use the cipher in CBC mode, iv may be given either as a string of bytes, or as a byte buffer. For ECB mode, give null as iv. @param iv the initialization vector to use, null for ECB mode. @param output the output the buf...
[ "Starts", "or", "restarts", "the", "encryption", "or", "decryption", "process", "whichever", "was", "previously", "configured", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L11360-L11374
39,132
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
generateRandom
function generateRandom(bits, rng) { var num = new BigInteger(bits, rng); // force MSB set var bits1 = bits - 1; if(!num.testBit(bits1)) { num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num); } // align number on 30k+1 boundary num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0); ret...
javascript
function generateRandom(bits, rng) { var num = new BigInteger(bits, rng); // force MSB set var bits1 = bits - 1; if(!num.testBit(bits1)) { num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num); } // align number on 30k+1 boundary num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0); ret...
[ "function", "generateRandom", "(", "bits", ",", "rng", ")", "{", "var", "num", "=", "new", "BigInteger", "(", "bits", ",", "rng", ")", ";", "// force MSB set\r", "var", "bits1", "=", "bits", "-", "1", ";", "if", "(", "!", "num", ".", "testBit", "(", ...
Generates a random number using the given number of bits and RNG. @param bits the number of bits for the number. @param rng the random number generator to use. @return the random number.
[ "Generates", "a", "random", "number", "using", "the", "given", "number", "of", "bits", "and", "RNG", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L13481-L13491
39,133
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(md) { // get the oid for the algorithm var oid; if(md.algorithm in pki.oids) { oid = pki.oids[md.algorithm]; } else { var error = new Error('Unknown message digest algorithm.'); error.algorithm = md.algorithm; throw error; } var oidBytes = asn1.oidToDer(oid).getBytes(); ...
javascript
function(md) { // get the oid for the algorithm var oid; if(md.algorithm in pki.oids) { oid = pki.oids[md.algorithm]; } else { var error = new Error('Unknown message digest algorithm.'); error.algorithm = md.algorithm; throw error; } var oidBytes = asn1.oidToDer(oid).getBytes(); ...
[ "function", "(", "md", ")", "{", "// get the oid for the algorithm\r", "var", "oid", ";", "if", "(", "md", ".", "algorithm", "in", "pki", ".", "oids", ")", "{", "oid", "=", "pki", ".", "oids", "[", "md", ".", "algorithm", "]", ";", "}", "else", "{", ...
Wrap digest in DigestInfo object. This function implements EMSA-PKCS1-v1_5-ENCODE as per RFC 3447. DigestInfo ::= SEQUENCE { digestAlgorithm DigestAlgorithmIdentifier, digest Digest } DigestAlgorithmIdentifier ::= AlgorithmIdentifier Digest ::= OCTET STRING @param md the message digest object with the hash to sign....
[ "Wrap", "digest", "in", "DigestInfo", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L13846-L13875
39,134
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_getAttribute
function _getAttribute(obj, options) { if(typeof options === 'string') { options = {shortName: options}; } var rval = null; var attr; for(var i = 0; rval === null && i < obj.attributes.length; ++i) { attr = obj.attributes[i]; if(options.type && options.type === attr.type) { rval =...
javascript
function _getAttribute(obj, options) { if(typeof options === 'string') { options = {shortName: options}; } var rval = null; var attr; for(var i = 0; rval === null && i < obj.attributes.length; ++i) { attr = obj.attributes[i]; if(options.type && options.type === attr.type) { rval =...
[ "function", "_getAttribute", "(", "obj", ",", "options", ")", "{", "if", "(", "typeof", "options", "===", "'string'", ")", "{", "options", "=", "{", "shortName", ":", "options", "}", ";", "}", "var", "rval", "=", "null", ";", "var", "attr", ";", "for...
Gets an issuer or subject attribute from its name, type, or short name. @param obj the issuer or subject object. @param options a short name string or an object with: shortName the short name for the attribute. name the name for the attribute. type the type for the attribute. @return the attribute.
[ "Gets", "an", "issuer", "or", "subject", "attribute", "from", "its", "name", "type", "or", "short", "name", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L17787-L17805
39,135
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(oid, obj, fillDefaults) { var params = {}; if(oid !== oids['RSASSA-PSS']) { return params; } if(fillDefaults) { params = { hash: { algorithmOid: oids['sha1'] }, mgf: { algorithmOid: oids['mgf1'], hash: { algorithmOid: oids['sh...
javascript
function(oid, obj, fillDefaults) { var params = {}; if(oid !== oids['RSASSA-PSS']) { return params; } if(fillDefaults) { params = { hash: { algorithmOid: oids['sha1'] }, mgf: { algorithmOid: oids['mgf1'], hash: { algorithmOid: oids['sh...
[ "function", "(", "oid", ",", "obj", ",", "fillDefaults", ")", "{", "var", "params", "=", "{", "}", ";", "if", "(", "oid", "!==", "oids", "[", "'RSASSA-PSS'", "]", ")", "{", "return", "params", ";", "}", "if", "(", "fillDefaults", ")", "{", "params"...
Converts signature parameters from ASN.1 structure. Currently only RSASSA-PSS supported. The PKCS#1 v1.5 signature scheme had no parameters. RSASSA-PSS-params ::= SEQUENCE { hashAlgorithm [0] HashAlgorithm DEFAULT sha1Identifier, maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1Identifier, saltLength ...
[ "Converts", "signature", "parameters", "from", "ASN", ".", "1", "structure", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L17836-L17883
39,136
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_dnToAsn1
function _dnToAsn1(obj) { // create an empty RDNSequence var rval = asn1.create( asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); // iterate over attributes var attr, set; var attrs = obj.attributes; for(var i = 0; i < attrs.length; ++i) { attr = attrs[i]; var value = attr.value; ...
javascript
function _dnToAsn1(obj) { // create an empty RDNSequence var rval = asn1.create( asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); // iterate over attributes var attr, set; var attrs = obj.attributes; for(var i = 0; i < attrs.length; ++i) { attr = attrs[i]; var value = attr.value; ...
[ "function", "_dnToAsn1", "(", "obj", ")", "{", "// create an empty RDNSequence\r", "var", "rval", "=", "asn1", ".", "create", "(", "asn1", ".", "Class", ".", "UNIVERSAL", ",", "asn1", ".", "Type", ".", "SEQUENCE", ",", "true", ",", "[", "]", ")", ";", ...
Converts an X.509 subject or issuer to an ASN.1 RDNSequence. @param obj the subject or issuer (distinguished name). @return the ASN.1 RDNSequence.
[ "Converts", "an", "X", ".", "509", "subject", "or", "issuer", "to", "an", "ASN", ".", "1", "RDNSequence", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L19150-L19189
39,137
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_signatureParametersToAsn1
function _signatureParametersToAsn1(oid, params) { switch(oid) { case oids['RSASSA-PSS']: var parts = []; if(params.hash.algorithmOid !== undefined) { parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [ asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ ...
javascript
function _signatureParametersToAsn1(oid, params) { switch(oid) { case oids['RSASSA-PSS']: var parts = []; if(params.hash.algorithmOid !== undefined) { parts.push(asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [ asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ ...
[ "function", "_signatureParametersToAsn1", "(", "oid", ",", "params", ")", "{", "switch", "(", "oid", ")", "{", "case", "oids", "[", "'RSASSA-PSS'", "]", ":", "var", "parts", "=", "[", "]", ";", "if", "(", "params", ".", "hash", ".", "algorithmOid", "!=...
Convert signature parameters object to ASN.1 @param {String} oid Signature algorithm OID @param params The signature parametrs object @return ASN.1 object representing signature parameters
[ "Convert", "signature", "parameters", "object", "to", "ASN", ".", "1" ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L19504-L19545
39,138
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_getBagsByAttribute
function _getBagsByAttribute(safeContents, attrName, attrValue, bagType) { var result = []; for(var i = 0; i < safeContents.length; i ++) { for(var j = 0; j < safeContents[i].safeBags.length; j ++) { var bag = safeContents[i].safeBags[j]; if(bagType !== undefined && bag.type !== bagType) { ...
javascript
function _getBagsByAttribute(safeContents, attrName, attrValue, bagType) { var result = []; for(var i = 0; i < safeContents.length; i ++) { for(var j = 0; j < safeContents[i].safeBags.length; j ++) { var bag = safeContents[i].safeBags[j]; if(bagType !== undefined && bag.type !== bagType) { ...
[ "function", "_getBagsByAttribute", "(", "safeContents", ",", "attrName", ",", "attrValue", ",", "bagType", ")", "{", "var", "result", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "safeContents", ".", "length", ";", "i", "++", ...
Search SafeContents structure for bags with matching attributes. The search can optionally be narrowed by a certain bag type. @param safeContents the SafeContents structure to search in. @param attrName the name of the attribute to compare against. @param attrValue the attribute value to search for. @param [bagType] ...
[ "Search", "SafeContents", "structure", "for", "bags", "with", "matching", "attributes", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L20671-L20693
39,139
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(c, record, s) { var rval = false; try { var bytes = c.inflate(record.fragment.getBytes()); record.fragment = forge.util.createBuffer(bytes); record.length = bytes.length; rval = true; } catch(ex) { // inflate error, fail out } return rval; }
javascript
function(c, record, s) { var rval = false; try { var bytes = c.inflate(record.fragment.getBytes()); record.fragment = forge.util.createBuffer(bytes); record.length = bytes.length; rval = true; } catch(ex) { // inflate error, fail out } return rval; }
[ "function", "(", "c", ",", "record", ",", "s", ")", "{", "var", "rval", "=", "false", ";", "try", "{", "var", "bytes", "=", "c", ".", "inflate", "(", "record", ".", "fragment", ".", "getBytes", "(", ")", ")", ";", "record", ".", "fragment", "=", ...
Decompresses the TLSCompressed record into a TLSPlaintext record using the deflate algorithm. @param c the TLS connection. @param record the TLSCompressed record to decompress. @param s the ConnectionState to use. @return true on success, false on failure.
[ "Decompresses", "the", "TLSCompressed", "record", "into", "a", "TLSPlaintext", "record", "using", "the", "deflate", "algorithm", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L22117-L22130
39,140
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(b, lenBytes) { var len = 0; switch(lenBytes) { case 1: len = b.getByte(); break; case 2: len = b.getInt16(); break; case 3: len = b.getInt24(); break; case 4: len = b.getInt32(); break; } // read vector bytes into a new buffer return forge.ut...
javascript
function(b, lenBytes) { var len = 0; switch(lenBytes) { case 1: len = b.getByte(); break; case 2: len = b.getInt16(); break; case 3: len = b.getInt24(); break; case 4: len = b.getInt32(); break; } // read vector bytes into a new buffer return forge.ut...
[ "function", "(", "b", ",", "lenBytes", ")", "{", "var", "len", "=", "0", ";", "switch", "(", "lenBytes", ")", "{", "case", "1", ":", "len", "=", "b", ".", "getByte", "(", ")", ";", "break", ";", "case", "2", ":", "len", "=", "b", ".", "getInt...
Reads a TLS variable-length vector from a byte buffer. Variable-length vectors are defined by specifying a subrange of legal lengths, inclusively, using the notation <floor..ceiling>. When these are encoded, the actual length precedes the vector's contents in the byte stream. The length will be in the form of a number...
[ "Reads", "a", "TLS", "variable", "-", "length", "vector", "from", "a", "byte", "buffer", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L22148-L22167
39,141
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(b, lenBytes, v) { // encode length at the start of the vector, where the number of bytes for // the length is the maximum number of bytes it would take to encode the // vector's ceiling b.putInt(v.length(), lenBytes << 3); b.putBuffer(v); }
javascript
function(b, lenBytes, v) { // encode length at the start of the vector, where the number of bytes for // the length is the maximum number of bytes it would take to encode the // vector's ceiling b.putInt(v.length(), lenBytes << 3); b.putBuffer(v); }
[ "function", "(", "b", ",", "lenBytes", ",", "v", ")", "{", "// encode length at the start of the vector, where the number of bytes for\r", "// the length is the maximum number of bytes it would take to encode the\r", "// vector's ceiling\r", "b", ".", "putInt", "(", "v", ".", "le...
Writes a TLS variable-length vector to a byte buffer. @param b the byte buffer. @param lenBytes the number of bytes required to store the length. @param v the byte buffer vector.
[ "Writes", "a", "TLS", "variable", "-", "length", "vector", "to", "a", "byte", "buffer", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L22176-L22182
39,142
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(desc) { switch(desc) { case true: return true; case tls.Alert.Description.bad_certificate: return forge.pki.certificateError.bad_certificate; case tls.Alert.Description.unsupported_certificate: return forge.pki.certificateError.unsupported_certificate; case tls.Alert.Description.c...
javascript
function(desc) { switch(desc) { case true: return true; case tls.Alert.Description.bad_certificate: return forge.pki.certificateError.bad_certificate; case tls.Alert.Description.unsupported_certificate: return forge.pki.certificateError.unsupported_certificate; case tls.Alert.Description.c...
[ "function", "(", "desc", ")", "{", "switch", "(", "desc", ")", "{", "case", "true", ":", "return", "true", ";", "case", "tls", ".", "Alert", ".", "Description", ".", "bad_certificate", ":", "return", "forge", ".", "pki", ".", "certificateError", ".", "...
Maps a tls.Alert.Description to a pki.certificateError. @param desc the alert description. @return the certificate error.
[ "Maps", "a", "tls", ".", "Alert", ".", "Description", "to", "a", "pki", ".", "certificateError", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L25174-L25193
39,143
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(c, record) { // get record handler (align type in table by subtracting lowest) var aligned = record.type - tls.ContentType.change_cipher_spec; var handlers = ctTable[c.entity][c.expect]; if(aligned in handlers) { handlers[aligned](c, record); } else { // unexpected record...
javascript
function(c, record) { // get record handler (align type in table by subtracting lowest) var aligned = record.type - tls.ContentType.change_cipher_spec; var handlers = ctTable[c.entity][c.expect]; if(aligned in handlers) { handlers[aligned](c, record); } else { // unexpected record...
[ "function", "(", "c", ",", "record", ")", "{", "// get record handler (align type in table by subtracting lowest)\r", "var", "aligned", "=", "record", ".", "type", "-", "tls", ".", "ContentType", ".", "change_cipher_spec", ";", "var", "handlers", "=", "ctTable", "["...
Updates the current TLS engine state based on the given record. @param c the TLS connection. @param record the TLS record to act on.
[ "Updates", "the", "current", "TLS", "engine", "state", "based", "on", "the", "given", "record", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L25474-L25484
39,144
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(c) { var rval = 0; // get input buffer and its length var b = c.input; var len = b.length(); // need at least 5 bytes to initialize a record if(len < 5) { rval = 5 - len; } else { // enough bytes for header // initialize record c.record = { ...
javascript
function(c) { var rval = 0; // get input buffer and its length var b = c.input; var len = b.length(); // need at least 5 bytes to initialize a record if(len < 5) { rval = 5 - len; } else { // enough bytes for header // initialize record c.record = { ...
[ "function", "(", "c", ")", "{", "var", "rval", "=", "0", ";", "// get input buffer and its length\r", "var", "b", "=", "c", ".", "input", ";", "var", "len", "=", "b", ".", "length", "(", ")", ";", "// need at least 5 bytes to initialize a record\r", "if", "(...
Reads the record header and initializes the next record on the given connection. @param c the TLS connection with the next record. @return 0 if the input data could be processed, otherwise the number of bytes required for data to be processed.
[ "Reads", "the", "record", "header", "and", "initializes", "the", "next", "record", "on", "the", "given", "connection", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L25495-L25538
39,145
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(c) { var rval = 0; // ensure there is enough input data to get the entire record var b = c.input; var len = b.length(); if(len < c.record.length) { // not enough data yet, return how much is required rval = c.record.length - len; } else { // there is enough ...
javascript
function(c) { var rval = 0; // ensure there is enough input data to get the entire record var b = c.input; var len = b.length(); if(len < c.record.length) { // not enough data yet, return how much is required rval = c.record.length - len; } else { // there is enough ...
[ "function", "(", "c", ")", "{", "var", "rval", "=", "0", ";", "// ensure there is enough input data to get the entire record\r", "var", "b", "=", "c", ".", "input", ";", "var", "len", "=", "b", ".", "length", "(", ")", ";", "if", "(", "len", "<", "c", ...
Reads the next record's contents and appends its message to any previously fragmented message. @param c the TLS connection with the next record. @return 0 if the input data could be processed, otherwise the number of bytes required for data to be processed.
[ "Reads", "the", "next", "record", "s", "contents", "and", "appends", "its", "message", "to", "any", "previously", "fragmented", "message", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L25549-L25596
39,146
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
encrypt_aes_cbc_sha1_padding
function encrypt_aes_cbc_sha1_padding(blockSize, input, decrypt) { /* The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. The padding may be any length up to 255 bytes long...
javascript
function encrypt_aes_cbc_sha1_padding(blockSize, input, decrypt) { /* The encrypted data length (TLSCiphertext.length) is one more than the sum of SecurityParameters.block_length, TLSCompressed.length, SecurityParameters.mac_length, and padding_length. The padding may be any length up to 255 bytes long...
[ "function", "encrypt_aes_cbc_sha1_padding", "(", "blockSize", ",", "input", ",", "decrypt", ")", "{", "/* The encrypted data length (TLSCiphertext.length) is one more than the sum\r\n of SecurityParameters.block_length, TLSCompressed.length,\r\n SecurityParameters.mac_length, and padding_len...
Handles padding for aes_cbc_sha1 in encrypt mode. @param blockSize the block size. @param input the input buffer. @param decrypt true in decrypt mode, false in encrypt mode. @return true on success, false on failure.
[ "Handles", "padding", "for", "aes_cbc_sha1", "in", "encrypt", "mode", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L26143-L26170
39,147
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
compareMacs
function compareMacs(key, mac1, mac2) { var hmac = forge.hmac.create(); hmac.start('SHA1', key); hmac.update(mac1); mac1 = hmac.digest().getBytes(); hmac.start(null, null); hmac.update(mac2); mac2 = hmac.digest().getBytes(); return mac1 === mac2; }
javascript
function compareMacs(key, mac1, mac2) { var hmac = forge.hmac.create(); hmac.start('SHA1', key); hmac.update(mac1); mac1 = hmac.digest().getBytes(); hmac.start(null, null); hmac.update(mac2); mac2 = hmac.digest().getBytes(); return mac1 === mac2; }
[ "function", "compareMacs", "(", "key", ",", "mac1", ",", "mac2", ")", "{", "var", "hmac", "=", "forge", ".", "hmac", ".", "create", "(", ")", ";", "hmac", ".", "start", "(", "'SHA1'", ",", "key", ")", ";", "hmac", ".", "update", "(", "mac1", ")",...
Safely compare two MACs. This function will compare two MACs in a way that protects against timing attacks. TODO: Expose elsewhere as a utility API. See: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/ @param key the MAC key to use. @param mac1 as a binary-enco...
[ "Safely", "compare", "two", "MACs", ".", "This", "function", "will", "compare", "two", "MACs", "in", "a", "way", "that", "protects", "against", "timing", "attacks", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L26281-L26293
39,148
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_createKDF
function _createKDF(kdf, md, counterStart, digestLength) { /** * Generate a key of the specified length. * * @param x the binary-encoded byte string to generate a key from. * @param length the number of bytes to generate (the size of the key). * * @return the key as a binary-encoded string. ...
javascript
function _createKDF(kdf, md, counterStart, digestLength) { /** * Generate a key of the specified length. * * @param x the binary-encoded byte string to generate a key from. * @param length the number of bytes to generate (the size of the key). * * @return the key as a binary-encoded string. ...
[ "function", "_createKDF", "(", "kdf", ",", "md", ",", "counterStart", ",", "digestLength", ")", "{", "/**\r\n * Generate a key of the specified length.\r\n *\r\n * @param x the binary-encoded byte string to generate a key from.\r\n * @param length the number of bytes to generate (the...
Creates a KDF1 or KDF2 API object. @param md the hash API to use. @param counterStart the starting index for the counter. @param digestLength the digest length to use. @return the KDF API object.
[ "Creates", "a", "KDF1", "or", "KDF2", "API", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L26619-L26650
39,149
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(logger, message) { forge.log.prepareStandardFull(message); console.log(message.standardFull); }
javascript
function(logger, message) { forge.log.prepareStandardFull(message); console.log(message.standardFull); }
[ "function", "(", "logger", ",", "message", ")", "{", "forge", ".", "log", ".", "prepareStandardFull", "(", "message", ")", ";", "console", ".", "log", "(", "message", ".", "standardFull", ")", ";", "}" ]
only appear to have basic console.log
[ "only", "appear", "to", "have", "basic", "console", ".", "log" ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L26977-L26980
39,150
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(cert) { // convert from PEM if(typeof cert === 'string') { cert = forge.pki.certificateFromPem(cert); } msg.certificates.push(cert); }
javascript
function(cert) { // convert from PEM if(typeof cert === 'string') { cert = forge.pki.certificateFromPem(cert); } msg.certificates.push(cert); }
[ "function", "(", "cert", ")", "{", "// convert from PEM\r", "if", "(", "typeof", "cert", "===", "'string'", ")", "{", "cert", "=", "forge", ".", "pki", ".", "certificateFromPem", "(", "cert", ")", ";", "}", "msg", ".", "certificates", ".", "push", "(", ...
Add a certificate. @param cert the certificate to add.
[ "Add", "a", "certificate", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27452-L27458
39,151
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(cert) { var sAttr = cert.issuer.attributes; for(var i = 0; i < msg.recipients.length; ++i) { var r = msg.recipients[i]; var rAttr = r.issuer; if(r.serialNumber !== cert.serialNumber) { continue; } if(rAttr.length !== sAttr.length) { ...
javascript
function(cert) { var sAttr = cert.issuer.attributes; for(var i = 0; i < msg.recipients.length; ++i) { var r = msg.recipients[i]; var rAttr = r.issuer; if(r.serialNumber !== cert.serialNumber) { continue; } if(rAttr.length !== sAttr.length) { ...
[ "function", "(", "cert", ")", "{", "var", "sAttr", "=", "cert", ".", "issuer", ".", "attributes", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "msg", ".", "recipients", ".", "length", ";", "++", "i", ")", "{", "var", "r", "=", "msg", ...
Find recipient by X.509 certificate's issuer. @param cert the certificate with the issuer to look for. @return the recipient object.
[ "Find", "recipient", "by", "X", ".", "509", "certificate", "s", "issuer", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27693-L27723
39,152
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(recipient, privKey) { if(msg.encryptedContent.key === undefined && recipient !== undefined && privKey !== undefined) { switch(recipient.encryptedContent.algorithm) { case forge.pki.oids.rsaEncryption: case forge.pki.oids.desCBC: var key = privKey.decr...
javascript
function(recipient, privKey) { if(msg.encryptedContent.key === undefined && recipient !== undefined && privKey !== undefined) { switch(recipient.encryptedContent.algorithm) { case forge.pki.oids.rsaEncryption: case forge.pki.oids.desCBC: var key = privKey.decr...
[ "function", "(", "recipient", ",", "privKey", ")", "{", "if", "(", "msg", ".", "encryptedContent", ".", "key", "===", "undefined", "&&", "recipient", "!==", "undefined", "&&", "privKey", "!==", "undefined", ")", "{", "switch", "(", "recipient", ".", "encry...
Decrypt enveloped content @param recipient The recipient object related to the private key @param privKey The (RSA) private key object
[ "Decrypt", "enveloped", "content" ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27731-L27748
39,153
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(key, cipher) { // Part 1: Symmetric encryption if(msg.encryptedContent.content === undefined) { cipher = cipher || msg.encryptedContent.algorithm; key = key || msg.encryptedContent.key; var keyLen, ivLen, ciphFn; switch(cipher) { case forge.pki.oid...
javascript
function(key, cipher) { // Part 1: Symmetric encryption if(msg.encryptedContent.content === undefined) { cipher = cipher || msg.encryptedContent.algorithm; key = key || msg.encryptedContent.key; var keyLen, ivLen, ciphFn; switch(cipher) { case forge.pki.oid...
[ "function", "(", "key", ",", "cipher", ")", "{", "// Part 1: Symmetric encryption\r", "if", "(", "msg", ".", "encryptedContent", ".", "content", "===", "undefined", ")", "{", "cipher", "=", "cipher", "||", "msg", ".", "encryptedContent", ".", "algorithm", ";",...
Encrypt enveloped content. This function supports two optional arguments, cipher and key, which can be used to influence symmetric encryption. Unless cipher is provided, the cipher specified in encryptedContent.algorithm is used (defaults to AES-256-CBC). If no key is provided, encryptedContent.key is (re-)used. If...
[ "Encrypt", "enveloped", "content", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27783-L27867
39,154
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_recipientFromAsn1
function _recipientFromAsn1(obj) { // validate EnvelopedData content block and capture data var capture = {}; var errors = []; if(!asn1.validate(obj, p7.asn1.recipientInfoValidator, capture, errors)) { var error = new Error('Cannot read PKCS#7 RecipientInfo. ' + 'ASN.1 object is not an PKCS#7 Re...
javascript
function _recipientFromAsn1(obj) { // validate EnvelopedData content block and capture data var capture = {}; var errors = []; if(!asn1.validate(obj, p7.asn1.recipientInfoValidator, capture, errors)) { var error = new Error('Cannot read PKCS#7 RecipientInfo. ' + 'ASN.1 object is not an PKCS#7 Re...
[ "function", "_recipientFromAsn1", "(", "obj", ")", "{", "// validate EnvelopedData content block and capture data\r", "var", "capture", "=", "{", "}", ";", "var", "errors", "=", "[", "]", ";", "if", "(", "!", "asn1", ".", "validate", "(", "obj", ",", "p7", "...
Converts a single recipient from an ASN.1 object. @param obj the ASN.1 RecipientInfo. @return the recipient object.
[ "Converts", "a", "single", "recipient", "from", "an", "ASN", ".", "1", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27879-L27900
39,155
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_recipientToAsn1
function _recipientToAsn1(obj) { return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ // Version asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(obj.version).getBytes()), // IssuerAndSerialNumber asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQU...
javascript
function _recipientToAsn1(obj) { return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ // Version asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(obj.version).getBytes()), // IssuerAndSerialNumber asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQU...
[ "function", "_recipientToAsn1", "(", "obj", ")", "{", "return", "asn1", ".", "create", "(", "asn1", ".", "Class", ".", "UNIVERSAL", ",", "asn1", ".", "Type", ".", "SEQUENCE", ",", "true", ",", "[", "// Version\r", "asn1", ".", "create", "(", "asn1", "....
Converts a single recipient object to an ASN.1 object. @param obj the recipient object. @return the ASN.1 RecipientInfo.
[ "Converts", "a", "single", "recipient", "object", "to", "an", "ASN", ".", "1", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27909-L27934
39,156
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_recipientsFromAsn1
function _recipientsFromAsn1(infos) { var ret = []; for(var i = 0; i < infos.length; ++i) { ret.push(_recipientFromAsn1(infos[i])); } return ret; }
javascript
function _recipientsFromAsn1(infos) { var ret = []; for(var i = 0; i < infos.length; ++i) { ret.push(_recipientFromAsn1(infos[i])); } return ret; }
[ "function", "_recipientsFromAsn1", "(", "infos", ")", "{", "var", "ret", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "infos", ".", "length", ";", "++", "i", ")", "{", "ret", ".", "push", "(", "_recipientFromAsn1", "(", "i...
Map a set of RecipientInfo ASN.1 objects to recipient objects. @param infos an array of ASN.1 representations RecipientInfo (i.e. SET OF). @return an array of recipient objects.
[ "Map", "a", "set", "of", "RecipientInfo", "ASN", ".", "1", "objects", "to", "recipient", "objects", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27943-L27949
39,157
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_recipientsToAsn1
function _recipientsToAsn1(recipients) { var ret = []; for(var i = 0; i < recipients.length; ++i) { ret.push(_recipientToAsn1(recipients[i])); } return ret; }
javascript
function _recipientsToAsn1(recipients) { var ret = []; for(var i = 0; i < recipients.length; ++i) { ret.push(_recipientToAsn1(recipients[i])); } return ret; }
[ "function", "_recipientsToAsn1", "(", "recipients", ")", "{", "var", "ret", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "recipients", ".", "length", ";", "++", "i", ")", "{", "ret", ".", "push", "(", "_recipientToAsn1", "("...
Map an array of recipient objects to ASN.1 RecipientInfo objects. @param recipients an array of recipientInfo objects. @return an array of ASN.1 RecipientInfos.
[ "Map", "an", "array", "of", "recipient", "objects", "to", "ASN", ".", "1", "RecipientInfo", "objects", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27958-L27964
39,158
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_signerFromAsn1
function _signerFromAsn1(obj) { // validate EnvelopedData content block and capture data var capture = {}; var errors = []; if(!asn1.validate(obj, p7.asn1.signerInfoValidator, capture, errors)) { var error = new Error('Cannot read PKCS#7 SignerInfo. ' + 'ASN.1 object is not an PKCS#7 SignerInfo....
javascript
function _signerFromAsn1(obj) { // validate EnvelopedData content block and capture data var capture = {}; var errors = []; if(!asn1.validate(obj, p7.asn1.signerInfoValidator, capture, errors)) { var error = new Error('Cannot read PKCS#7 SignerInfo. ' + 'ASN.1 object is not an PKCS#7 SignerInfo....
[ "function", "_signerFromAsn1", "(", "obj", ")", "{", "// validate EnvelopedData content block and capture data\r", "var", "capture", "=", "{", "}", ";", "var", "errors", "=", "[", "]", ";", "if", "(", "!", "asn1", ".", "validate", "(", "obj", ",", "p7", ".",...
Converts a single signer from an ASN.1 object. @param obj the ASN.1 representation of a SignerInfo. @return the signer object.
[ "Converts", "a", "single", "signer", "from", "an", "ASN", ".", "1", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L27973-L28000
39,159
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_signerToAsn1
function _signerToAsn1(obj) { // SignerInfo var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ // version asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(obj.version).getBytes()), // issuerAndSerialNumber asn1.create(asn1.Class.UNIVERS...
javascript
function _signerToAsn1(obj) { // SignerInfo var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ // version asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, asn1.integerToDer(obj.version).getBytes()), // issuerAndSerialNumber asn1.create(asn1.Class.UNIVERS...
[ "function", "_signerToAsn1", "(", "obj", ")", "{", "// SignerInfo\r", "var", "rval", "=", "asn1", ".", "create", "(", "asn1", ".", "Class", ".", "UNIVERSAL", ",", "asn1", ".", "Type", ".", "SEQUENCE", ",", "true", ",", "[", "// version\r", "asn1", ".", ...
Converts a single signerInfo object to an ASN.1 object. @param obj the signerInfo object. @return the ASN.1 representation of a SignerInfo.
[ "Converts", "a", "single", "signerInfo", "object", "to", "an", "ASN", ".", "1", "object", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28009-L28064
39,160
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_signersFromAsn1
function _signersFromAsn1(signerInfoAsn1s) { var ret = []; for(var i = 0; i < signerInfoAsn1s.length; ++i) { ret.push(_signerFromAsn1(signerInfoAsn1s[i])); } return ret; }
javascript
function _signersFromAsn1(signerInfoAsn1s) { var ret = []; for(var i = 0; i < signerInfoAsn1s.length; ++i) { ret.push(_signerFromAsn1(signerInfoAsn1s[i])); } return ret; }
[ "function", "_signersFromAsn1", "(", "signerInfoAsn1s", ")", "{", "var", "ret", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "signerInfoAsn1s", ".", "length", ";", "++", "i", ")", "{", "ret", ".", "push", "(", "_signerFromAsn1...
Map a set of SignerInfo ASN.1 objects to an array of signer objects. @param signerInfoAsn1s an array of ASN.1 SignerInfos (i.e. SET OF). @return an array of signers objects.
[ "Map", "a", "set", "of", "SignerInfo", "ASN", ".", "1", "objects", "to", "an", "array", "of", "signer", "objects", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28073-L28079
39,161
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_signersToAsn1
function _signersToAsn1(signers) { var ret = []; for(var i = 0; i < signers.length; ++i) { ret.push(_signerToAsn1(signers[i])); } return ret; }
javascript
function _signersToAsn1(signers) { var ret = []; for(var i = 0; i < signers.length; ++i) { ret.push(_signerToAsn1(signers[i])); } return ret; }
[ "function", "_signersToAsn1", "(", "signers", ")", "{", "var", "ret", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "signers", ".", "length", ";", "++", "i", ")", "{", "ret", ".", "push", "(", "_signerToAsn1", "(", "signers...
Map an array of signer objects to ASN.1 objects. @param signers an array of signer objects. @return an array of ASN.1 SignerInfos.
[ "Map", "an", "array", "of", "signer", "objects", "to", "ASN", ".", "1", "objects", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28088-L28094
39,162
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_attributeToAsn1
function _attributeToAsn1(attr) { var value; // TODO: generalize to support more attributes if(attr.type === forge.pki.oids.contentType) { value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.value).getBytes()); } else if(attr.type === forge.pki.oids.messageDigest...
javascript
function _attributeToAsn1(attr) { var value; // TODO: generalize to support more attributes if(attr.type === forge.pki.oids.contentType) { value = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(attr.value).getBytes()); } else if(attr.type === forge.pki.oids.messageDigest...
[ "function", "_attributeToAsn1", "(", "attr", ")", "{", "var", "value", ";", "// TODO: generalize to support more attributes\r", "if", "(", "attr", ".", "type", "===", "forge", ".", "pki", ".", "oids", ".", "contentType", ")", "{", "value", "=", "asn1", ".", ...
Convert an attribute object to an ASN.1 Attribute. @param attr the attribute object. @return the ASN.1 Attribute.
[ "Convert", "an", "attribute", "object", "to", "an", "ASN", ".", "1", "Attribute", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28103-L28163
39,163
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_encryptedContentToAsn1
function _encryptedContentToAsn1(ec) { return [ // ContentType, always Data for the moment asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(forge.pki.oids.data).getBytes()), // ContentEncryptionAlgorithmIdentifier asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, t...
javascript
function _encryptedContentToAsn1(ec) { return [ // ContentType, always Data for the moment asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, asn1.oidToDer(forge.pki.oids.data).getBytes()), // ContentEncryptionAlgorithmIdentifier asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, t...
[ "function", "_encryptedContentToAsn1", "(", "ec", ")", "{", "return", "[", "// ContentType, always Data for the moment\r", "asn1", ".", "create", "(", "asn1", ".", "Class", ".", "UNIVERSAL", ",", "asn1", ".", "Type", ".", "OID", ",", "false", ",", "asn1", ".",...
Map messages encrypted content to ASN.1 objects. @param ec The encryptedContent object of the message. @return ASN.1 representation of the encryptedContent object (SEQUENCE).
[ "Map", "messages", "encrypted", "content", "to", "ASN", ".", "1", "objects", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28172-L28192
39,164
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
_sha1
function _sha1() { var sha = forge.md.sha1.create(); var num = arguments.length; for (var i = 0; i < num; ++i) { sha.update(arguments[i]); } return sha.digest(); }
javascript
function _sha1() { var sha = forge.md.sha1.create(); var num = arguments.length; for (var i = 0; i < num; ++i) { sha.update(arguments[i]); } return sha.digest(); }
[ "function", "_sha1", "(", ")", "{", "var", "sha", "=", "forge", ".", "md", ".", "sha1", ".", "create", "(", ")", ";", "var", "num", "=", "arguments", ".", "length", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "num", ";", "++", "i", ...
Hashes the arguments into one value using SHA-1. @return the sha1 hash of the provided arguments.
[ "Hashes", "the", "arguments", "into", "one", "value", "using", "SHA", "-", "1", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28606-L28613
39,165
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(options) { // task id this.id = -1; // task name this.name = options.name || sNoTaskName; // task has no parent this.parent = options.parent || null; // save run function this.run = options.run; // create a queue of subtasks to run this.subtasks = []; // error flag ...
javascript
function(options) { // task id this.id = -1; // task name this.name = options.name || sNoTaskName; // task has no parent this.parent = options.parent || null; // save run function this.run = options.run; // create a queue of subtasks to run this.subtasks = []; // error flag ...
[ "function", "(", "options", ")", "{", "// task id\r", "this", ".", "id", "=", "-", "1", ";", "// task name\r", "this", ".", "name", "=", "options", ".", "name", "||", "sNoTaskName", ";", "// task has no parent\r", "this", ".", "parent", "=", "options", "."...
Creates a new task. @param options options for this task run: the run function for the task (required) name: the run function for the task (optional) parent: parent of this task (optional) @return the empty task.
[ "Creates", "a", "new", "task", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L28835-L28877
39,166
FelixMcFelix/conductor-chord
web_modules/forge.bundle.js
function(task) { task.error = false; task.state = sStateTable[task.state][START]; setTimeout(function() { if(task.state === RUNNING) { task.swapTime = +new Date(); task.run(task); runNext(task, 0); } }, 0); }
javascript
function(task) { task.error = false; task.state = sStateTable[task.state][START]; setTimeout(function() { if(task.state === RUNNING) { task.swapTime = +new Date(); task.run(task); runNext(task, 0); } }, 0); }
[ "function", "(", "task", ")", "{", "task", ".", "error", "=", "false", ";", "task", ".", "state", "=", "sStateTable", "[", "task", ".", "state", "]", "[", "START", "]", ";", "setTimeout", "(", "function", "(", ")", "{", "if", "(", "task", ".", "s...
Asynchronously start a task. @param task the task to start.
[ "Asynchronously", "start", "a", "task", "." ]
f5326861a0754a0f43f4e8585275de271a969c4c
https://github.com/FelixMcFelix/conductor-chord/blob/f5326861a0754a0f43f4e8585275de271a969c4c/web_modules/forge.bundle.js#L29153-L29163
39,167
eface2face/jquery-meteor-blaze
gulpfile.js
bundle
function bundle() { return browserify( config.inputDir + config.inputFile ).bundle() .pipe( source( config.outputFile ) ) .pipe( rename( config.outputFile ) ) .pipe( gulp.dest( config.outputDir ) // Create the .devel.js ) .pipe( streamify( jsmin() ) ) .pipe(...
javascript
function bundle() { return browserify( config.inputDir + config.inputFile ).bundle() .pipe( source( config.outputFile ) ) .pipe( rename( config.outputFile ) ) .pipe( gulp.dest( config.outputDir ) // Create the .devel.js ) .pipe( streamify( jsmin() ) ) .pipe(...
[ "function", "bundle", "(", ")", "{", "return", "browserify", "(", "config", ".", "inputDir", "+", "config", ".", "inputFile", ")", ".", "bundle", "(", ")", ".", "pipe", "(", "source", "(", "config", ".", "outputFile", ")", ")", ".", "pipe", "(", "ren...
Produce outfile, min, and gzip versions
[ "Produce", "outfile", "min", "and", "gzip", "versions" ]
5d8776cf8915622905d3c5ff1da1c3259e7eee24
https://github.com/eface2face/jquery-meteor-blaze/blob/5d8776cf8915622905d3c5ff1da1c3259e7eee24/gulpfile.js#L31-L60
39,168
IonicaBizau/node-gh-polyglot
lib/index.js
GhPolyglot
function GhPolyglot (input, token, host) { var splits = input.split("/"); this.user = splits[0]; this.repo = splits[1]; this.full_name = input; this.gh = new GitHub({ token: token, host: host }); }
javascript
function GhPolyglot (input, token, host) { var splits = input.split("/"); this.user = splits[0]; this.repo = splits[1]; this.full_name = input; this.gh = new GitHub({ token: token, host: host }); }
[ "function", "GhPolyglot", "(", "input", ",", "token", ",", "host", ")", "{", "var", "splits", "=", "input", ".", "split", "(", "\"/\"", ")", ";", "this", ".", "user", "=", "splits", "[", "0", "]", ";", "this", ".", "repo", "=", "splits", "[", "1"...
GhPolyglot Creates a new instance of `GhPolyglot`. @name GhPolyglot @function @param {String} input The repository full name (e.g. `"IonicaBizau/gh-polyglot"`) or the username (e.g. `"IonicaBizau"`). @param {String} token An optional GitHub token used for making authenticated requests. @param {String} host An optional...
[ "GhPolyglot", "Creates", "a", "new", "instance", "of", "GhPolyglot", "." ]
1656b7a056bc57d6ab4c18cce68672dfb79baf8a
https://github.com/IonicaBizau/node-gh-polyglot/blob/1656b7a056bc57d6ab4c18cce68672dfb79baf8a/lib/index.js#L19-L25
39,169
hhdevelopment/boxes-scroll
src/boxesscroll.js
getInnerLimit
function getInnerLimit() { var items = getItems(); var notInDeck = 0; if (items.length) { do { notInDeck = notInDeck + 1; var cont = false; var item = items[items.length - notInDeck]; if (item) { var area = getArea(item); if (ctrl.horizontal) { cont = area.right > get...
javascript
function getInnerLimit() { var items = getItems(); var notInDeck = 0; if (items.length) { do { notInDeck = notInDeck + 1; var cont = false; var item = items[items.length - notInDeck]; if (item) { var area = getArea(item); if (ctrl.horizontal) { cont = area.right > get...
[ "function", "getInnerLimit", "(", ")", "{", "var", "items", "=", "getItems", "(", ")", ";", "var", "notInDeck", "=", "0", ";", "if", "(", "items", ".", "length", ")", "{", "do", "{", "notInDeck", "=", "notInDeck", "+", "1", ";", "var", "cont", "=",...
Retourne la limit pour les calcul interne, cad le nombre d'items vraiment visible @returns {Number|type.ngLimit|boxesscrollL#1.BoxScrollCtrl.$scope.ngLimit}
[ "Retourne", "la", "limit", "pour", "les", "calcul", "interne", "cad", "le", "nombre", "d", "items", "vraiment", "visible" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L89-L114
39,170
hhdevelopment/boxes-scroll
src/boxesscroll.js
addEventListeners
function addEventListeners() { ctrl.ngelt.on('wheel', wheelOnElt); ctrl.ngelt.on('computegrabbersizes', ctrl.updateSize); // ctrl.elt.addEventListener("wheel", function (event) { // boxesScrollServices.execAndApplyIfScrollable($scope, this, wheel, [event]); // }, {passive: true, capture: true}); ctrl.ng...
javascript
function addEventListeners() { ctrl.ngelt.on('wheel', wheelOnElt); ctrl.ngelt.on('computegrabbersizes', ctrl.updateSize); // ctrl.elt.addEventListener("wheel", function (event) { // boxesScrollServices.execAndApplyIfScrollable($scope, this, wheel, [event]); // }, {passive: true, capture: true}); ctrl.ng...
[ "function", "addEventListeners", "(", ")", "{", "ctrl", ".", "ngelt", ".", "on", "(", "'wheel'", ",", "wheelOnElt", ")", ";", "ctrl", ".", "ngelt", ".", "on", "(", "'computegrabbersizes'", ",", "ctrl", ".", "updateSize", ")", ";", "//\t\t\tctrl.elt.addEventL...
Ajoute et Supprime tous les handlers
[ "Ajoute", "et", "Supprime", "tous", "les", "handlers" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L119-L136
39,171
hhdevelopment/boxes-scroll
src/boxesscroll.js
keydown
function keydown(event) { var inc = 0; if (ctrl.horizontal) { if (event.which === 37) { // LEFT inc = -1; } else if (event.which === 39) { // RIGHT inc = 1; } } else { var innerLimit = ctrl.getInnerLimit(); if (event.which === 38) { // UP inc = -1; } else if (event.which ...
javascript
function keydown(event) { var inc = 0; if (ctrl.horizontal) { if (event.which === 37) { // LEFT inc = -1; } else if (event.which === 39) { // RIGHT inc = 1; } } else { var innerLimit = ctrl.getInnerLimit(); if (event.which === 38) { // UP inc = -1; } else if (event.which ...
[ "function", "keydown", "(", "event", ")", "{", "var", "inc", "=", "0", ";", "if", "(", "ctrl", ".", "horizontal", ")", "{", "if", "(", "event", ".", "which", "===", "37", ")", "{", "// LEFT", "inc", "=", "-", "1", ";", "}", "else", "if", "(", ...
Gere la navigation clavier @param {type} event
[ "Gere", "la", "navigation", "clavier" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L274-L302
39,172
hhdevelopment/boxes-scroll
src/boxesscroll.js
isScrollbarOver
function isScrollbarOver(m) { return document.elementFromPoint(m.x, m.y) === ctrl.sb; }
javascript
function isScrollbarOver(m) { return document.elementFromPoint(m.x, m.y) === ctrl.sb; }
[ "function", "isScrollbarOver", "(", "m", ")", "{", "return", "document", ".", "elementFromPoint", "(", "m", ".", "x", ",", "m", ".", "y", ")", "===", "ctrl", ".", "sb", ";", "}" ]
La souris est elle au dessus de la scrollbar @param {MouseCoordonates} m @returns {Boolean}
[ "La", "souris", "est", "elle", "au", "dessus", "de", "la", "scrollbar" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L436-L438
39,173
hhdevelopment/boxes-scroll
src/boxesscroll.js
updateGrabberSizes
function updateGrabberSizes() { if (ctrl.horizontal !== undefined) { var bgSizeElt = ctrl.ngelt.css('background-size'); var bgSizeSb = ctrl.ngsb.css('background-size'); var grabbersizePixel = '100%'; if(getInnerLimit() !== $scope.total) { grabbersizePixel = getGrabberSizePixelFromPercent(getGra...
javascript
function updateGrabberSizes() { if (ctrl.horizontal !== undefined) { var bgSizeElt = ctrl.ngelt.css('background-size'); var bgSizeSb = ctrl.ngsb.css('background-size'); var grabbersizePixel = '100%'; if(getInnerLimit() !== $scope.total) { grabbersizePixel = getGrabberSizePixelFromPercent(getGra...
[ "function", "updateGrabberSizes", "(", ")", "{", "if", "(", "ctrl", ".", "horizontal", "!==", "undefined", ")", "{", "var", "bgSizeElt", "=", "ctrl", ".", "ngelt", ".", "css", "(", "'background-size'", ")", ";", "var", "bgSizeSb", "=", "ctrl", ".", "ngsb...
Calcul la taille des grabbers
[ "Calcul", "la", "taille", "des", "grabbers" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L564-L584
39,174
hhdevelopment/boxes-scroll
src/boxesscroll.js
getGrabberOffsetPixelFromPercent
function getGrabberOffsetPixelFromPercent(percentOffset) { var sbLenght = getHeightArea(); // Longueur de la scrollbar var grabberOffsetPixel = sbLenght * percentOffset / 100; return Math.max(grabberOffsetPixel, 0); }
javascript
function getGrabberOffsetPixelFromPercent(percentOffset) { var sbLenght = getHeightArea(); // Longueur de la scrollbar var grabberOffsetPixel = sbLenght * percentOffset / 100; return Math.max(grabberOffsetPixel, 0); }
[ "function", "getGrabberOffsetPixelFromPercent", "(", "percentOffset", ")", "{", "var", "sbLenght", "=", "getHeightArea", "(", ")", ";", "// Longueur de la scrollbar", "var", "grabberOffsetPixel", "=", "sbLenght", "*", "percentOffset", "/", "100", ";", "return", "Math"...
Calcul la position du curseur en px @param {type} percentOffset @returns {Number}
[ "Calcul", "la", "position", "du", "curseur", "en", "px" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L620-L624
39,175
hhdevelopment/boxes-scroll
src/boxesscroll.js
getOffsetPixelContainerBeforeItem
function getOffsetPixelContainerBeforeItem(item) { if (ctrl.horizontal) { return getArea(item).left - getEltArea().left; } else { return getArea(item).top - getEltArea().top; } }
javascript
function getOffsetPixelContainerBeforeItem(item) { if (ctrl.horizontal) { return getArea(item).left - getEltArea().left; } else { return getArea(item).top - getEltArea().top; } }
[ "function", "getOffsetPixelContainerBeforeItem", "(", "item", ")", "{", "if", "(", "ctrl", ".", "horizontal", ")", "{", "return", "getArea", "(", "item", ")", ".", "left", "-", "getEltArea", "(", ")", ".", "left", ";", "}", "else", "{", "return", "getAre...
Retourne l'offset en pixel avant l'item Typiquement la taille du header dans un tableau @param {HtmlElement} item @returns {number}
[ "Retourne", "l", "offset", "en", "pixel", "avant", "l", "item", "Typiquement", "la", "taille", "du", "header", "dans", "un", "tableau" ]
1d707715cbc25c35d9f30baaa95885cd36e0fec5
https://github.com/hhdevelopment/boxes-scroll/blob/1d707715cbc25c35d9f30baaa95885cd36e0fec5/src/boxesscroll.js#L649-L655
39,176
mattidupre/gulp-retinize
retinize.js
function(file, enc, cb) { if ( !file.isNull() && !file.isDirectory() && options.extensions.some(function(ext) { return path.extname(file.path).substr(1).toLowerCase() === ext; }) ) { file = retina.tapFile(file, cb); } else { cb(); } ...
javascript
function(file, enc, cb) { if ( !file.isNull() && !file.isDirectory() && options.extensions.some(function(ext) { return path.extname(file.path).substr(1).toLowerCase() === ext; }) ) { file = retina.tapFile(file, cb); } else { cb(); } ...
[ "function", "(", "file", ",", "enc", ",", "cb", ")", "{", "if", "(", "!", "file", ".", "isNull", "(", ")", "&&", "!", "file", ".", "isDirectory", "(", ")", "&&", "options", ".", "extensions", ".", "some", "(", "function", "(", "ext", ")", "{", ...
Transform function filters image files
[ "Transform", "function", "filters", "image", "files" ]
f804f01d80d8f240dc41fc6c656e2bca09b1fb46
https://github.com/mattidupre/gulp-retinize/blob/f804f01d80d8f240dc41fc6c656e2bca09b1fb46/retinize.js#L37-L51
39,177
amritk/gulp-angular2-embed-sass
index.js
joinParts
function joinParts(entrances) { var parts = []; parts.push(Buffer(content.substring(0, matches.index))); parts.push(Buffer('styles: [`')); for (var i=0; i<entrances.length; i++) { parts.push(Buffer(entrances[i].replace(/\n/g, ''))); if (i < entrances.length - 1)...
javascript
function joinParts(entrances) { var parts = []; parts.push(Buffer(content.substring(0, matches.index))); parts.push(Buffer('styles: [`')); for (var i=0; i<entrances.length; i++) { parts.push(Buffer(entrances[i].replace(/\n/g, ''))); if (i < entrances.length - 1)...
[ "function", "joinParts", "(", "entrances", ")", "{", "var", "parts", "=", "[", "]", ";", "parts", ".", "push", "(", "Buffer", "(", "content", ".", "substring", "(", "0", ",", "matches", ".", "index", ")", ")", ")", ";", "parts", ".", "push", "(", ...
Writes the new css strings to the file buffer
[ "Writes", "the", "new", "css", "strings", "to", "the", "file", "buffer" ]
4e50499ea49b4a6178c1e87535c9f006877a7a65
https://github.com/amritk/gulp-angular2-embed-sass/blob/4e50499ea49b4a6178c1e87535c9f006877a7a65/index.js#L110-L125
39,178
solid/contacts-pane
contactsPane.js
function (subject) { var t = kb.findTypeURIs(subject) if (t[ns.vcard('Individual').uri]) return 'Contact' if (t[ns.vcard('Organization').uri]) return 'contact' if (t[ns.foaf('Person').uri]) return 'Person' if (t[ns.schema('Person').uri]) return 'Person' if (t[ns.vcard('Group').uri]) return 'Grou...
javascript
function (subject) { var t = kb.findTypeURIs(subject) if (t[ns.vcard('Individual').uri]) return 'Contact' if (t[ns.vcard('Organization').uri]) return 'contact' if (t[ns.foaf('Person').uri]) return 'Person' if (t[ns.schema('Person').uri]) return 'Person' if (t[ns.vcard('Group').uri]) return 'Grou...
[ "function", "(", "subject", ")", "{", "var", "t", "=", "kb", ".", "findTypeURIs", "(", "subject", ")", "if", "(", "t", "[", "ns", ".", "vcard", "(", "'Individual'", ")", ".", "uri", "]", ")", "return", "'Contact'", "if", "(", "t", "[", "ns", ".",...
Does the subject deserve an contact pane?
[ "Does", "the", "subject", "deserve", "an", "contact", "pane?" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L34-L43
39,179
solid/contacts-pane
contactsPane.js
function (books, context, options) { kb.fetcher.load(books).then(function (xhr) { renderThreeColumnBrowser2(books, context, options) }).catch(function (err) { complain(err) }) }
javascript
function (books, context, options) { kb.fetcher.load(books).then(function (xhr) { renderThreeColumnBrowser2(books, context, options) }).catch(function (err) { complain(err) }) }
[ "function", "(", "books", ",", "context", ",", "options", ")", "{", "kb", ".", "fetcher", ".", "load", "(", "books", ")", ".", "then", "(", "function", "(", "xhr", ")", "{", "renderThreeColumnBrowser2", "(", "books", ",", "context", ",", "options", ")"...
Render a 3-column browser for an address book or a group
[ "Render", "a", "3", "-", "column", "browser", "for", "an", "address", "book", "or", "a", "group" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L227-L231
39,180
solid/contacts-pane
contactsPane.js
findBookFromGroups
function findBookFromGroups (book) { if (book) { return book } var g for (let gu in selectedGroups) { g = kb.sym(gu) let b = kb.any(undefined, ns.vcard('includesGroup'), g) if (b) return b } throw new Error('findBookFromGroups: Cant...
javascript
function findBookFromGroups (book) { if (book) { return book } var g for (let gu in selectedGroups) { g = kb.sym(gu) let b = kb.any(undefined, ns.vcard('includesGroup'), g) if (b) return b } throw new Error('findBookFromGroups: Cant...
[ "function", "findBookFromGroups", "(", "book", ")", "{", "if", "(", "book", ")", "{", "return", "book", "}", "var", "g", "for", "(", "let", "gu", "in", "selectedGroups", ")", "{", "g", "=", "kb", ".", "sym", "(", "gu", ")", "let", "b", "=", "kb",...
The book could be the main subject, or linked from a group we are dealing with
[ "The", "book", "could", "be", "the", "main", "subject", "or", "linked", "from", "a", "group", "we", "are", "dealing", "with" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L250-L261
39,181
solid/contacts-pane
contactsPane.js
function (book, name, selectedGroups, callbackFunction) { book = findBookFromGroups(book) var nameEmailIndex = kb.any(book, ns.vcard('nameEmailIndex')) var uuid = UI.utils.genUuid() var person = kb.sym(book.dir().uri + 'Person/' + uuid + '/index.ttl#this') var doc = person.doc()...
javascript
function (book, name, selectedGroups, callbackFunction) { book = findBookFromGroups(book) var nameEmailIndex = kb.any(book, ns.vcard('nameEmailIndex')) var uuid = UI.utils.genUuid() var person = kb.sym(book.dir().uri + 'Person/' + uuid + '/index.ttl#this') var doc = person.doc()...
[ "function", "(", "book", ",", "name", ",", "selectedGroups", ",", "callbackFunction", ")", "{", "book", "=", "findBookFromGroups", "(", "book", ")", "var", "nameEmailIndex", "=", "kb", ".", "any", "(", "book", ",", "ns", ".", "vcard", "(", "'nameEmailIndex...
Write a new contact to the web
[ "Write", "a", "new", "contact", "to", "the", "web" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L264-L324
39,182
solid/contacts-pane
contactsPane.js
function (book, name, callbackFunction) { var gix = kb.any(book, ns.vcard('groupIndex')) var x = book.uri.split('#')[0] var gname = name.replace(' ', '_') var doc = kb.sym(x.slice(0, x.lastIndexOf('/') + 1) + 'Group/' + gname + '.ttl') var group = kb.sym(doc.uri + '#this') ...
javascript
function (book, name, callbackFunction) { var gix = kb.any(book, ns.vcard('groupIndex')) var x = book.uri.split('#')[0] var gname = name.replace(' ', '_') var doc = kb.sym(x.slice(0, x.lastIndexOf('/') + 1) + 'Group/' + gname + '.ttl') var group = kb.sym(doc.uri + '#this') ...
[ "function", "(", "book", ",", "name", ",", "callbackFunction", ")", "{", "var", "gix", "=", "kb", ".", "any", "(", "book", ",", "ns", ".", "vcard", "(", "'groupIndex'", ")", ")", "var", "x", "=", "book", ".", "uri", ".", "split", "(", "'#'", ")",...
Write new group to web Creates an empty new group file and adds it to the index
[ "Write", "new", "group", "to", "web", "Creates", "an", "empty", "new", "group", "file", "and", "adds", "it", "to", "the", "index" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L329-L366
39,183
solid/contacts-pane
contactsPane.js
function (x) { var name = kb.any(x, ns.vcard('fn')) || kb.any(x, ns.foaf('name')) || kb.any(x, ns.vcard('organization-name')) return name ? name.value : '???' }
javascript
function (x) { var name = kb.any(x, ns.vcard('fn')) || kb.any(x, ns.foaf('name')) || kb.any(x, ns.vcard('organization-name')) return name ? name.value : '???' }
[ "function", "(", "x", ")", "{", "var", "name", "=", "kb", ".", "any", "(", "x", ",", "ns", ".", "vcard", "(", "'fn'", ")", ")", "||", "kb", ".", "any", "(", "x", ",", "ns", ".", "foaf", "(", "'name'", ")", ")", "||", "kb", ".", "any", "("...
organization-name is a hack for Mac records with no FN which is mandatory.
[ "organization", "-", "name", "is", "a", "hack", "for", "Mac", "records", "with", "no", "FN", "which", "is", "mandatory", "." ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L369-L373
39,184
solid/contacts-pane
contactsPane.js
deleteThing
function deleteThing (x) { console.log('deleteThing: ' + x) var ds = kb.statementsMatching(x).concat(kb.statementsMatching(undefined, undefined, x)) var targets = {} ds.map(function (st) { targets[st.why.uri] = st }) var agenda = [] // sets of statements of same dcoument to delet...
javascript
function deleteThing (x) { console.log('deleteThing: ' + x) var ds = kb.statementsMatching(x).concat(kb.statementsMatching(undefined, undefined, x)) var targets = {} ds.map(function (st) { targets[st.why.uri] = st }) var agenda = [] // sets of statements of same dcoument to delet...
[ "function", "deleteThing", "(", "x", ")", "{", "console", ".", "log", "(", "'deleteThing: '", "+", "x", ")", "var", "ds", "=", "kb", ".", "statementsMatching", "(", "x", ")", ".", "concat", "(", "kb", ".", "statementsMatching", "(", "undefined", ",", "...
In a LDP work, deletes the whole document describing a thing plus patch out ALL mentiosn of it! Use with care! beware of other dta picked up from other places being smushed together and then deleted.
[ "In", "a", "LDP", "work", "deletes", "the", "whole", "document", "describing", "a", "thing", "plus", "patch", "out", "ALL", "mentiosn", "of", "it!", "Use", "with", "care!", "beware", "of", "other", "dta", "picked", "up", "from", "other", "places", "being",...
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L517-L548
39,185
solid/contacts-pane
contactsPane.js
deleteRecursive
function deleteRecursive (kb, folder) { return new Promise(function (resolve, reject) { kb.fetcher.load(folder).then(function () { let promises = kb.each(folder, ns.ldp('contains')).map(file => { if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) { ...
javascript
function deleteRecursive (kb, folder) { return new Promise(function (resolve, reject) { kb.fetcher.load(folder).then(function () { let promises = kb.each(folder, ns.ldp('contains')).map(file => { if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) { ...
[ "function", "deleteRecursive", "(", "kb", ",", "folder", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "kb", ".", "fetcher", ".", "load", "(", "folder", ")", ".", "then", "(", "function", "(", ")", "{...
For deleting an addressbook sub-folder eg person - use with care!
[ "For", "deleting", "an", "addressbook", "sub", "-", "folder", "eg", "person", "-", "use", "with", "care!" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L552-L574
39,186
solid/contacts-pane
contactsPane.js
function (uris) { uris.forEach(function (u) { console.log('Dropped on group: ' + u) var thing = kb.sym(u) var toBeFetched = [thing.doc(), group.doc()] kb.fetcher.load(toBeFetched).then(function (xhrs) { var type...
javascript
function (uris) { uris.forEach(function (u) { console.log('Dropped on group: ' + u) var thing = kb.sym(u) var toBeFetched = [thing.doc(), group.doc()] kb.fetcher.load(toBeFetched).then(function (xhrs) { var type...
[ "function", "(", "uris", ")", "{", "uris", ".", "forEach", "(", "function", "(", "u", ")", "{", "console", ".", "log", "(", "'Dropped on group: '", "+", "u", ")", "var", "thing", "=", "kb", ".", "sym", "(", "u", ")", "var", "toBeFetched", "=", "[",...
Is something is dropped on a group, add people to group
[ "Is", "something", "is", "dropped", "on", "a", "group", "add", "people", "to", "group" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L688-L719
39,187
solid/contacts-pane
contactsPane.js
function (uris) { uris.map(function (u) { var thing = $rdf.sym(u) // Attachment needs text label to disinguish I think not icon. console.log('Dropped on mugshot thing ' + thing) // icon was: UI.icons.iconBase + 'noun_25830.svg' if (u.startsWith('http') && u.indexOf('#') < 0) { // P...
javascript
function (uris) { uris.map(function (u) { var thing = $rdf.sym(u) // Attachment needs text label to disinguish I think not icon. console.log('Dropped on mugshot thing ' + thing) // icon was: UI.icons.iconBase + 'noun_25830.svg' if (u.startsWith('http') && u.indexOf('#') < 0) { // P...
[ "function", "(", "uris", ")", "{", "uris", ".", "map", "(", "function", "(", "u", ")", "{", "var", "thing", "=", "$rdf", ".", "sym", "(", "u", ")", "// Attachment needs text label to disinguish I think not icon.", "console", ".", "log", "(", "'Dropped on mugsh...
When a set of URIs are dropped on
[ "When", "a", "set", "of", "URIs", "are", "dropped", "on" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L1050-L1075
39,188
solid/contacts-pane
contactsPane.js
function (files) { for (var i = 0; i < files.length; i++) { let f = files[i] console.log(' meeting: Filename: ' + f.name + ', type: ' + (f.type || 'n/a') + ' size: ' + f.size + ' bytes, last modified: ' + (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() :...
javascript
function (files) { for (var i = 0; i < files.length; i++) { let f = files[i] console.log(' meeting: Filename: ' + f.name + ', type: ' + (f.type || 'n/a') + ' size: ' + f.size + ' bytes, last modified: ' + (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() :...
[ "function", "(", "files", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "files", ".", "length", ";", "i", "++", ")", "{", "let", "f", "=", "files", "[", "i", "]", "console", ".", "log", "(", "' meeting: Filename: '", "+", "f", ".",...
Drop an image file to set up the mugshot
[ "Drop", "an", "image", "file", "to", "set", "up", "the", "mugshot" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L1078-L1099
39,189
solid/contacts-pane
contactsPane.js
function (thing, group) { var pname = kb.any(thing, ns.vcard('fn')) var gname = kb.any(group, ns.vcard('fn')) var groups = kb.each(null, ns.vcard('hasMember'), thing) if (groups.length < 2) { alert('Must be a member of at least one group. Add to another gro...
javascript
function (thing, group) { var pname = kb.any(thing, ns.vcard('fn')) var gname = kb.any(group, ns.vcard('fn')) var groups = kb.each(null, ns.vcard('hasMember'), thing) if (groups.length < 2) { alert('Must be a member of at least one group. Add to another gro...
[ "function", "(", "thing", ",", "group", ")", "{", "var", "pname", "=", "kb", ".", "any", "(", "thing", ",", "ns", ".", "vcard", "(", "'fn'", ")", ")", "var", "gname", "=", "kb", ".", "any", "(", "group", ",", "ns", ".", "vcard", "(", "'fn'", ...
Remove a person from a group
[ "Remove", "a", "person", "from", "a", "group" ]
373c55fc6e2c584603741ee972d036fcb1e2f4b8
https://github.com/solid/contacts-pane/blob/373c55fc6e2c584603741ee972d036fcb1e2f4b8/contactsPane.js#L1241-L1259
39,190
quase/quasejs
packages/unit/src/core/global-env.js
diff
function diff( a, b ) { let i, j, found = false, result = []; for ( i = 0; i < a.length; i++ ) { found = false; for ( j = 0; j < b.length; j++ ) { if ( a[ i ] === b[ j ] ) { found = true; break; } } if ( !found ) { result.push( a[ i ] ); } } return result;...
javascript
function diff( a, b ) { let i, j, found = false, result = []; for ( i = 0; i < a.length; i++ ) { found = false; for ( j = 0; j < b.length; j++ ) { if ( a[ i ] === b[ j ] ) { found = true; break; } } if ( !found ) { result.push( a[ i ] ); } } return result;...
[ "function", "diff", "(", "a", ",", "b", ")", "{", "let", "i", ",", "j", ",", "found", "=", "false", ",", "result", "=", "[", "]", ";", "for", "(", "i", "=", "0", ";", "i", "<", "a", ".", "length", ";", "i", "++", ")", "{", "found", "=", ...
Returns a new Array with the elements that are in a but not in b
[ "Returns", "a", "new", "Array", "with", "the", "elements", "that", "are", "in", "a", "but", "not", "in", "b" ]
a8f46d6648db13abf30bbb4800fe63b25e49e1b3
https://github.com/quase/quasejs/blob/a8f46d6648db13abf30bbb4800fe63b25e49e1b3/packages/unit/src/core/global-env.js#L8-L25
39,191
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function(thingy) { // simple DOM lookup utility function if (typeof(thingy) == 'string') { thingy = document.getElementById(thingy); } if (!thingy.addClass) { // extend element with a few useful methods thingy.hide = function() { this.style.display = 'none'; }; thingy.show = function() { this.style....
javascript
function(thingy) { // simple DOM lookup utility function if (typeof(thingy) == 'string') { thingy = document.getElementById(thingy); } if (!thingy.addClass) { // extend element with a few useful methods thingy.hide = function() { this.style.display = 'none'; }; thingy.show = function() { this.style....
[ "function", "(", "thingy", ")", "{", "// simple DOM lookup utility function", "if", "(", "typeof", "(", "thingy", ")", "==", "'string'", ")", "{", "thingy", "=", "document", ".", "getElementById", "(", "thingy", ")", ";", "}", "if", "(", "!", "thingy", "."...
ID of next movie
[ "ID", "of", "next", "movie" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L52-L70
39,192
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( filtered ) { var out = [], data = this.s.dt.aoData, displayed = this.s.dt.aiDisplay, i, iLen; if ( filtered ) { // Only consider filtered rows for ( i=0, iLen=displayed.length ; i<iLen ; i++ ) { if ( data[ displayed[i] ]._DTTT_selected ) { out.push( displayed[i] ); ...
javascript
function ( filtered ) { var out = [], data = this.s.dt.aoData, displayed = this.s.dt.aiDisplay, i, iLen; if ( filtered ) { // Only consider filtered rows for ( i=0, iLen=displayed.length ; i<iLen ; i++ ) { if ( data[ displayed[i] ]._DTTT_selected ) { out.push( displayed[i] ); ...
[ "function", "(", "filtered", ")", "{", "var", "out", "=", "[", "]", ",", "data", "=", "this", ".", "s", ".", "dt", ".", "aoData", ",", "displayed", "=", "this", ".", "s", ".", "dt", ".", "aiDisplay", ",", "i", ",", "iLen", ";", "if", "(", "fi...
Get the indexes of the selected rows @returns {array} List of row indexes @param {boolean} [filtered=false] Get only selected rows which are available given the filtering applied to the table. By default this is false - i.e. all rows, regardless of filtering are selected.
[ "Get", "the", "indexes", "of", "the", "selected", "rows" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L829-L861
39,193
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( n ) { var pos = this.s.dt.oInstance.fnGetPosition( n ); return (this.s.dt.aoData[pos]._DTTT_selected===true) ? true : false; }
javascript
function ( n ) { var pos = this.s.dt.oInstance.fnGetPosition( n ); return (this.s.dt.aoData[pos]._DTTT_selected===true) ? true : false; }
[ "function", "(", "n", ")", "{", "var", "pos", "=", "this", ".", "s", ".", "dt", ".", "oInstance", ".", "fnGetPosition", "(", "n", ")", ";", "return", "(", "this", ".", "s", ".", "dt", ".", "aoData", "[", "pos", "]", ".", "_DTTT_selected", "===", ...
Check to see if a current row is selected or not @param {Node} n TR node to check if it is currently selected or not @returns {Boolean} true if select, false otherwise
[ "Check", "to", "see", "if", "a", "current", "row", "is", "selected", "or", "not" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L869-L873
39,194
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function( oConfig ) { var sTitle = ""; if ( typeof oConfig.sTitle != 'undefined' && oConfig.sTitle !== "" ) { sTitle = oConfig.sTitle; } else { var anTitle = document.getElementsByTagName('title'); if ( anTitle.length > 0 ) { sTitle = anTitle[0].innerHTML; } } /* Strip characters which th...
javascript
function( oConfig ) { var sTitle = ""; if ( typeof oConfig.sTitle != 'undefined' && oConfig.sTitle !== "" ) { sTitle = oConfig.sTitle; } else { var anTitle = document.getElementsByTagName('title'); if ( anTitle.length > 0 ) { sTitle = anTitle[0].innerHTML; } } /* Strip characters which th...
[ "function", "(", "oConfig", ")", "{", "var", "sTitle", "=", "\"\"", ";", "if", "(", "typeof", "oConfig", ".", "sTitle", "!=", "'undefined'", "&&", "oConfig", ".", "sTitle", "!==", "\"\"", ")", "{", "sTitle", "=", "oConfig", ".", "sTitle", ";", "}", "...
Get the title of the document - useful for file names. The title is retrieved from either the configuration object's 'title' parameter, or the HTML document title @param {Object} oConfig Button configuration object @returns {String} Button title
[ "Get", "the", "title", "of", "the", "document", "-", "useful", "for", "file", "names", ".", "The", "title", "is", "retrieved", "from", "either", "the", "configuration", "object", "s", "title", "parameter", "or", "the", "HTML", "document", "title" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L939-L960
39,195
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( oConfig ) { var aoCols = this.s.dt.aoColumns, aColumnsInc = this._fnColumnTargets( oConfig.mColumns ), aColWidths = [], iWidth = 0, iTotal = 0, i, iLen; for ( i=0, iLen=aColumnsInc.length ; i<iLen ; i++ ) { if ( aColumnsInc[i] ) { iWidth = aoCols[i].nTh.offsetWidth; iTotal +...
javascript
function ( oConfig ) { var aoCols = this.s.dt.aoColumns, aColumnsInc = this._fnColumnTargets( oConfig.mColumns ), aColWidths = [], iWidth = 0, iTotal = 0, i, iLen; for ( i=0, iLen=aColumnsInc.length ; i<iLen ; i++ ) { if ( aColumnsInc[i] ) { iWidth = aoCols[i].nTh.offsetWidth; iTotal +...
[ "function", "(", "oConfig", ")", "{", "var", "aoCols", "=", "this", ".", "s", ".", "dt", ".", "aoColumns", ",", "aColumnsInc", "=", "this", ".", "_fnColumnTargets", "(", "oConfig", ".", "mColumns", ")", ",", "aColWidths", "=", "[", "]", ",", "iWidth", ...
Calculate a unity array with the column width by proportion for a set of columns to be included for a button. This is particularly useful for PDF creation, where we can use the column widths calculated by the browser to size the columns in the PDF. @param {Object} oConfig Button configuration object @returns {Array} ...
[ "Calculate", "a", "unity", "array", "with", "the", "column", "width", "by", "proportion", "for", "a", "set", "of", "columns", "to", "be", "included", "for", "a", "button", ".", "This", "is", "particularly", "useful", "for", "PDF", "creation", "where", "we"...
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L970-L994
39,196
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function () { for ( var cli in ZeroClipboard_TableTools.clients ) { if ( cli ) { var client = ZeroClipboard_TableTools.clients[cli]; if ( typeof client.domElement != 'undefined' && client.domElement.parentNode == this.dom.container && client.sized === false ) { return true; }...
javascript
function () { for ( var cli in ZeroClipboard_TableTools.clients ) { if ( cli ) { var client = ZeroClipboard_TableTools.clients[cli]; if ( typeof client.domElement != 'undefined' && client.domElement.parentNode == this.dom.container && client.sized === false ) { return true; }...
[ "function", "(", ")", "{", "for", "(", "var", "cli", "in", "ZeroClipboard_TableTools", ".", "clients", ")", "{", "if", "(", "cli", ")", "{", "var", "client", "=", "ZeroClipboard_TableTools", ".", "clients", "[", "cli", "]", ";", "if", "(", "typeof", "c...
Check to see if any of the ZeroClipboard client's attached need to be resized
[ "Check", "to", "see", "if", "any", "of", "the", "ZeroClipboard", "client", "s", "attached", "need", "to", "be", "resized" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L1048-L1064
39,197
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( bView, oConfig ) { if ( oConfig === undefined ) { oConfig = {}; } if ( bView === undefined || bView ) { this._fnPrintStart( oConfig ); } else { this._fnPrintEnd(); } }
javascript
function ( bView, oConfig ) { if ( oConfig === undefined ) { oConfig = {}; } if ( bView === undefined || bView ) { this._fnPrintStart( oConfig ); } else { this._fnPrintEnd(); } }
[ "function", "(", "bView", ",", "oConfig", ")", "{", "if", "(", "oConfig", "===", "undefined", ")", "{", "oConfig", "=", "{", "}", ";", "}", "if", "(", "bView", "===", "undefined", "||", "bView", ")", "{", "this", ".", "_fnPrintStart", "(", "oConfig",...
Programmatically enable or disable the print view @param {boolean} [bView=true] Show the print view if true or not given. If false, then terminate the print view and return to normal. @param {object} [oConfig={}] Configuration for the print view @param {boolean} [oConfig.bShowAll=false] Show all rows in the table if tr...
[ "Programmatically", "enable", "or", "disable", "the", "print", "view" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L1078-L1093
39,198
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( message, time ) { var info = $('<div/>') .addClass( this.classes.print.info ) .html( message ) .appendTo( 'body' ); setTimeout( function() { info.fadeOut( "normal", function() { info.remove(); } ); }, time ); }
javascript
function ( message, time ) { var info = $('<div/>') .addClass( this.classes.print.info ) .html( message ) .appendTo( 'body' ); setTimeout( function() { info.fadeOut( "normal", function() { info.remove(); } ); }, time ); }
[ "function", "(", "message", ",", "time", ")", "{", "var", "info", "=", "$", "(", "'<div/>'", ")", ".", "addClass", "(", "this", ".", "classes", ".", "print", ".", "info", ")", ".", "html", "(", "message", ")", ".", "appendTo", "(", "'body'", ")", ...
Show a message to the end user which is nicely styled @param {string} message The HTML string to show to the user @param {int} time The duration the message is to be shown on screen for (mS)
[ "Show", "a", "message", "to", "the", "end", "user", "which", "is", "nicely", "styled" ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L1101-L1112
39,199
S3bb1/ah-dashboard-plugin
public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js
function ( oOpts ) { /* Is this the master control instance or not? */ if ( typeof this.s.dt._TableToolsInit == 'undefined' ) { this.s.master = true; this.s.dt._TableToolsInit = true; } /* We can use the table node from comparisons to group controls */ this.dom.table = this.s.dt.nTable; /* Clone ...
javascript
function ( oOpts ) { /* Is this the master control instance or not? */ if ( typeof this.s.dt._TableToolsInit == 'undefined' ) { this.s.master = true; this.s.dt._TableToolsInit = true; } /* We can use the table node from comparisons to group controls */ this.dom.table = this.s.dt.nTable; /* Clone ...
[ "function", "(", "oOpts", ")", "{", "/* Is this the master control instance or not? */", "if", "(", "typeof", "this", ".", "s", ".", "dt", ".", "_TableToolsInit", "==", "'undefined'", ")", "{", "this", ".", "s", ".", "master", "=", "true", ";", "this", ".", ...
Take the user defined settings and the default settings and combine them. @method _fnCustomiseSettings @param {Object} oOpts Same as TableTools constructor @returns void @private
[ "Take", "the", "user", "defined", "settings", "and", "the", "default", "settings", "and", "combine", "them", "." ]
c283370ec0f99a25db5bb7029a98b4febf8c5251
https://github.com/S3bb1/ah-dashboard-plugin/blob/c283370ec0f99a25db5bb7029a98b4febf8c5251/public/dashboard/bower_components/admin-lte/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.js#L1184-L1222