Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Visit children in `parent`.
function all(children, parents) { var min = -1 var step = reverse ? -1 : 1 var index = (reverse ? children.length : min) + step var result while (index > min && index < children.length) { result = one(children[index], index, parents) if (result[0] === EXIT) { return result } index = typeof result[1] === 'number' ? result[1] : index + step } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n ...
[ "0.7961384", "0.79312205", "0.7884723", "0.78684103", "0.78684103", "0.78684103", "0.77845716", "0.7271602", "0.676529", "0.6586661", "0.65283436", "0.6210523", "0.6132636", "0.6132636", "0.6119895", "0.60864514", "0.60864514", "0.60303557", "0.60248023", "0.601196", "0.60119...
0.5307402
89
Utility assert each property in `test` is represented in `node`, and each values are strictly equal.
function matchesFactory(test) { return matches function matches(node) { var key for (key in test) { if (node[key] !== test[key]) { return false } } return true } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertObjectsEqual(actual, expected, testName) {\n // your code here\n var check = 0;\n if ( Object.keys(actual).length === Object.keys(expected).length) {\n for ( var key in actual ) {\n if( actual[key] === expected[key] ) {\n check ++;\n }\n }\n if( Object.keys(actual).leng...
[ "0.59323835", "0.58419055", "0.5838475", "0.5838475", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.58318937", "0.56913674", "0.5687075", "0.56659764", "0.56651175", "0.56378585", "0.5545392", ...
0.49073783
53
Utility to return true.
function ok() { return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "isValid() {\n return true;\n }", "isValid() {\n return true;\n }", ...
[ "0.73456", "0.73456", "0.73456", "0.73456", "0.6982842", "0.6982842", "0.687671", "0.6781867", "0.65777314", "0.65777314", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.6514493", "0.65144...
0.6057896
52
Create a listitem using overly simple mechanics.
function pedanticListItem(ctx, value, position) { var offsets = ctx.offset; var line = position.line; /* Remove the list-item’s bullet. */ value = value.replace(EXPRESSION_PEDANTIC_BULLET, replacer); /* The initial line was also matched by the below, so * we reset the `line`. */ line = position.line; return value.replace(EXPRESSION_INITIAL_INDENT, replacer); /* A simple replacer which removed all matches, * and adds their length to `offset`. */ function replacer($0) { offsets[line] = (offsets[line] || 0) + $0.length; line++; return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListItem() {}", "function ListItem() {}", "function ListItem() {}", "function listItem() {\n // To do: remove `loose` in next major.\n return {type: LIST_ITEM, loose: false, spread: false, children: []}\n}", "function createListItem(item) {\n text += '<li>' + item + '</li>\\n';\n}", "functi...
[ "0.79325664", "0.79325664", "0.79325664", "0.75126517", "0.73318106", "0.73292196", "0.73013085", "0.7208457", "0.7129883", "0.70614284", "0.7052945", "0.70054454", "0.69544744", "0.6950974", "0.691121", "0.6853496", "0.6819171", "0.6802467", "0.6798598", "0.67780524", "0.676...
0.0
-1
A simple replacer which removed all matches, and adds their length to `offset`.
function replacer($0) { offsets[line] = (offsets[line] || 0) + $0.length; line++; return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replacer($0) {\n offsets[line] = (offsets[line] || 0) + $0.length\n line++\n\n return ''\n }", "function replacer(match, p1, p2, p3, offset, string) {\n // p1 is nondigits, p2 digits, and p3 non-alphanumerics\n return [p1, p2, p3].join(' - ');\n}", "function replacer(match, p1, p2, p3, off...
[ "0.62986106", "0.5595901", "0.55841625", "0.5539513", "0.54235834", "0.53846", "0.53708786", "0.53606343", "0.527393", "0.52699256", "0.52699256", "0.52699256", "0.52699256", "0.50347126", "0.49958324", "0.49856946", "0.49536362", "0.4931493", "0.4908296", "0.49029103", "0.49...
0.62765366
5
Create a listitem using sane mechanics.
function normalListItem(ctx, value, position) { var offsets = ctx.offset; var line = position.line; var max; var bullet; var rest; var lines; var trimmedLines; var index; var length; /* Remove the list-item’s bullet. */ value = value.replace(EXPRESSION_BULLET, replacer); lines = value.split(C_NEWLINE); trimmedLines = removeIndent(value, getIndent(max).indent).split(C_NEWLINE); /* We replaced the initial bullet with something * else above, which was used to trick * `removeIndentation` into removing some more * characters when possible. However, that could * result in the initial line to be stripped more * than it should be. */ trimmedLines[0] = rest; offsets[line] = (offsets[line] || 0) + bullet.length; line++; index = 0; length = lines.length; while (++index < length) { offsets[line] = (offsets[line] || 0) + lines[index].length - trimmedLines[index].length; line++; } return trimmedLines.join(C_NEWLINE); function replacer($0, $1, $2, $3, $4) { bullet = $1 + $2 + $3; rest = $4; /* Make sure that the first nine numbered list items * can indent with an extra space. That is, when * the bullet did not receive an extra final space. */ if (Number($2) < 10 && bullet.length % 2 === 1) { $2 = C_SPACE + $2; } max = $1 + repeat(C_SPACE, $2.length) + $3; return max + rest; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListItem() {}", "function ListItem() {}", "function ListItem() {}", "function listItem() {\n // To do: remove `loose` in next major.\n return {type: LIST_ITEM, loose: false, spread: false, children: []}\n}", "function createListItem(item) {\n text += '<li>' + item + '</li>\\n';\n}", "functi...
[ "0.75386494", "0.75386494", "0.75386494", "0.729518", "0.71076787", "0.7037123", "0.69637203", "0.6959679", "0.69403636", "0.67636955", "0.6760568", "0.67349756", "0.6733005", "0.67233574", "0.6702412", "0.668655", "0.66667783", "0.6604268", "0.6596561", "0.65841085", "0.6582...
0.0
-1
Remove the minimum indent from every line in `value`. Supports both tab, spaced, and mixed indentation (as well as possible).
function indentation(value, maximum) { var values = value.split(C_NEWLINE); var position = values.length + 1; var minIndent = Infinity; var matrix = []; var index; var indentation; var stops; var padding; values.unshift(repeat(C_SPACE, maximum) + '!'); while (position--) { indentation = getIndent(values[position]); matrix[position] = indentation.stops; if (trim(values[position]).length === 0) { continue; } if (indentation.indent) { if (indentation.indent > 0 && indentation.indent < minIndent) { minIndent = indentation.indent; } } else { minIndent = Infinity; break; } } if (minIndent !== Infinity) { position = values.length; while (position--) { stops = matrix[position]; index = minIndent; while (index && !(index in stops)) { index--; } if ( trim(values[position]).length !== 0 && minIndent && index !== minIndent ) { padding = C_TAB; } else { padding = ''; } values[position] = padding + values[position].slice( index in stops ? stops[index] + 1 : 0 ); } } values.shift(); return values.join(C_NEWLINE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function indentation(value, maximum) {\n var values = value.split(lineFeed)\n var position = values.length + 1\n var minIndent = Infinity\n var matrix = []\n var index\n var indentation\n var stops\n\n values.unshift(repeat(space, maximum) + exclamationMark)\n\n while (position--) {\n indentation = get...
[ "0.6820948", "0.62553596", "0.62441105", "0.62441105", "0.62441105", "0.62130535", "0.62130535", "0.62130535", "0.62028563", "0.62028563", "0.62028563", "0.62028563", "0.62028563", "0.62028563", "0.62028563", "0.62028563", "0.6192061", "0.61844164", "0.61617017", "0.61606306", ...
0.6609624
4
`collapse(' \t\nbar \nbaz\t') // ' bar baz '`
function collapse(value) { return String(value).replace(/\s+/g, ' ') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapse(value) {\n return String(value).replace(/\\s+/g, ' ');\n}", "function collapseWhitespace(s) {\n return s.replace(/([ \\t]|\\r\\n)+/g, ' ').replace(/^\\s*/, '').replace(/\\s*$/, '');\n }", "function collapseWhitespace(s) {\n return s.replace(/([ \\t]|\\r\\n)+/g, ' ').replace(...
[ "0.74667555", "0.6824464", "0.6824464", "0.6824464", "0.6824464", "0.62912476", "0.62912476", "0.62912476", "0.62912476", "0.62912476", "0.62912476", "0.62912476", "0.62912476", "0.6211564", "0.6211564", "0.6211564", "0.62017", "0.62017", "0.62017", "0.6197904", "0.61585355",...
0.7487294
4
Check if `character` can be inside an enclosed URI.
function isEnclosedURLCharacter(character) { return character !== C_GT && character !== C_BRACKET_OPEN && character !== C_BRACKET_CLOSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEnclosedURLCharacter(character) {\n return (\n character !== greaterThan &&\n character !== leftSquareBracket &&\n character !== rightSquareBracket\n )\n}", "function isUnclosedURLCharacter(character) {\n return (\n character !== leftSquareBracket &&\n character !== rightSquareBracke...
[ "0.81486577", "0.7500003", "0.714516", "0.714516", "0.714516", "0.714516", "0.714516", "0.714516", "0.6336468", "0.6286722", "0.6083982", "0.60603946", "0.58911103", "0.58911103", "0.5886743", "0.5872227", "0.57812464", "0.5764877", "0.5764867", "0.5750054", "0.5740378", "0...
0.7969861
5
Check if `character` can be inside an unclosed URI.
function isUnclosedURLCharacter(character) { return character !== C_BRACKET_OPEN && character !== C_BRACKET_CLOSE && !whitespace(character); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUnclosedURLCharacter(character) {\n return (\n character !== leftSquareBracket &&\n character !== rightSquareBracket &&\n !whitespace(character)\n )\n}", "function isEnclosedURLCharacter(character) {\n return (\n character !== greaterThan &&\n character !== leftSquareBracket &&\n ...
[ "0.8341564", "0.8120539", "0.80575234", "0.80575234", "0.80575234", "0.80575234", "0.80575234", "0.80575234", "0.6532676", "0.6472318", "0.6283268", "0.6107071", "0.6049062", "0.59961176", "0.5868086", "0.58435214", "0.58435214", "0.5814732", "0.5804297", "0.5804297", "0.5804...
0.81645966
5
Check if the given character code, or the character code at the first character, is a word character.
function wordCharacter(character) { return re.test( typeof character === 'number' ? fromCode(character) : character.charAt(0) ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWord(str){\n\n\tlet out = true;\n\tif (str.search(/[^\\w\\s]/) != -1){\n\n\t\tout = false;\n\t};\n\treturn out\n}", "function isWord(str) {\n var alphaNumericFound = false;\n for (var i = 0; i < str.length; i++) {\n var code = str.charCodeAt(i);\n if ((code > 47 && code < 58) || // num...
[ "0.72246575", "0.6977269", "0.6935932", "0.6562502", "0.65500504", "0.6515297", "0.6492587", "0.6350667", "0.6291884", "0.6283158", "0.62462986", "0.62142324", "0.62021756", "0.6181676", "0.6181676", "0.6117957", "0.6106907", "0.60335594", "0.6032476", "0.60316193", "0.601765...
0.7577065
4
Visit a single node.
function one(node) { var result if (!type || node.type === type) { result = visitor(node, stack.concat()) } if (node.children && result !== false) { return all(node.children, node) } return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "visitNode(node) { }", "visit() {\n if(this.state) this.state = Node.VISITED;\n }", "function node(){}", "function one(node, index, parent) {\n var result;\n\n index = index || (parent ? 0 : null);\n\n if (!type || node.type === type) {\n result = visitor(node, index, parent || null);\...
[ "0.7661173", "0.6445177", "0.64438576", "0.62799275", "0.61086637", "0.6075337", "0.6050634", "0.6050634", "0.60447025", "0.59705806", "0.5951017", "0.59241366", "0.59029406", "0.59029406", "0.59029406", "0.59029406", "0.5638122", "0.5634819", "0.56231177", "0.5618358", "0.56...
0.58092374
21
Visit children in `parent`.
function all(children, parent) { var length = children.length var index = -1 var child stack.push(parent) while (++index < length) { child = children[index] if (child && one(child) === false) { return false } } stack.pop() return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n ...
[ "0.7961384", "0.79312205", "0.7884723", "0.78684103", "0.78684103", "0.78684103", "0.77845716", "0.7271602", "0.676529", "0.6586661", "0.65283436", "0.6210523", "0.6132636", "0.6132636", "0.6119895", "0.60864514", "0.60864514", "0.60303557", "0.60248023", "0.601196", "0.60119...
0.57666224
30
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.5825987", "0.56372195", "0.55575734", "0.5491102", "0.5401295", "0.53869206", "0.53641313", "0.5329602", "0.5323104", "0.5316228", "0.5316228", "0.5295301", "0.52686304", "0.5219148", "0.52003515", "0.5193797", "0.51936084", "0.51571286", "0.51420885", "0.5129062", "0.5128...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.67307776", "0.6633116", "0.6609801", "0.65994185", "0.65991455", "0.65645915", "0.65056276", "0.6466668", "0.64615506", "0.6410588", "0.63689065", "0.63643163", "0.63643163", "0.63643163", "0.63643163", "0.6356162", "0.63265204", "0.6321958", "0.632186", "0.6294811", "0.62...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.69080657", "0.6774919", "0.6607738", "0.65373826", "0.6493206", "0.6487827", "0.6487827", "0.6449772", "0.6449772", "0.642834", "0.6428275", "0.6403372", "0.6403372", "0.63946307", "0.63946307", "0.63946307", "0.63946307", "0.63946307", "0.63946307", "0.63946307", "0.63946...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.6876632", "0.68532825", "0.68532825", "0.68532825", "0.68532825", "0.68521523", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517"...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.6599482", "0.65679044", "0.65622234", "0.65622234", "0.65622234", "0.65622234", "0.6525046", "0.65242517", "0.65087306", "0.65087306", "0.65087306", "0.65087306", "0.65087306", "0.65039986", "0.6492512", "0.6456032", "0.6456032", "0.6456032", "0.6456032", "0.6456032", "0.6...
0.6480518
43
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7729453", "0.7467235", "0.7467235", "0.74239284", "0.7165505", "0.71431816", "0.70840144", "0.7080456", "0.69956654", "0.6969364", "0.6898247", "0.6879638", "0.6712778", "0.66559386", "0.663537", "0.6608779", "0.6608779", "0.6608779", "0.6608779", "0.6598088", "0.65969384"...
0.0
-1
Works up the tree to the draggable itself attempting to match selector.
function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ { var node = el; do { if (matchesSelector(node, selector)) return true; if (node === baseNode) return false; node = node.parentNode; } while (node); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_dragHandler() {\n if (!this._settings.draggable) return;\n\n if (!this._settings.selectableContent) {\n this._startDrag();\n } else {\n setTimeout(() => this._startDrag(), this._settings.timeToSelect);\n }\n }", "function selfOrDescendant( target , selector ){\n return $( target ).fi...
[ "0.5786643", "0.5668372", "0.5482923", "0.5447762", "0.54283714", "0.5390145", "0.5387486", "0.53093845", "0.53027976", "0.5289175", "0.52788854", "0.52788854", "0.5274027", "0.52539885", "0.5244813", "0.5209783", "0.51951706", "0.5149104", "0.51261413", "0.5119189", "0.51180...
0.4897384
57
Userselect Hacks: Useful for preventing blue highlights all over everything when dragging. Note we're passing `document` b/c we could be iframed
function addUserSelectStyles(doc /*: ?Document*/) { if (!doc) return; var styleEl = doc.getElementById('react-draggable-style-el'); if (!styleEl) { styleEl = doc.createElement('style'); styleEl.type = 'text/css'; styleEl.id = 'react-draggable-style-el'; styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\n'; styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\n'; doc.getElementsByTagName('head')[0].appendChild(styleEl); } if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disable_text_selection() {\n \n if ( typeof document.body.onselectstart != 'undefined' ){\n document.body.onselectstart = function(){ return false; };\n } else if ( typeof document.body.style.MozUserSelect != 'undefined' ) {\n document.body.st...
[ "0.72972286", "0.7274107", "0.71534383", "0.711208", "0.7085924", "0.7085924", "0.7042776", "0.70285916", "0.7025537", "0.70095485", "0.70095485", "0.70045483", "0.70045483", "0.6970307", "0.69637614", "0.69637614", "0.69609", "0.6960346", "0.6934611", "0.69295067", "0.691418...
0.6909705
23
Create an data object exposed by 's events
function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/ { var state = draggable.state; var isStart = !isNum(state.lastX); var node = findDOMNode(draggable); if (isStart) { // If this is our first move, use the x and y as last coords. return { node: node, deltaX: 0, deltaY: 0, lastX: x, lastY: y, x: x, y: y }; } else { // Otherwise calculate proper values. return { node: node, deltaX: x - state.lastX, deltaY: y - state.lastY, lastX: state.lastX, lastY: state.lastY, x: x, y: y }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "constructor( data ){\n this._emitter = new EventTarge...
[ "0.7131644", "0.7129394", "0.6954137", "0.67877406", "0.6753327", "0.6746133", "0.6605278", "0.6517078", "0.65061116", "0.63700247", "0.63006157", "0.6294749", "0.6262863", "0.6262445", "0.6157371", "0.61538035", "0.6141494", "0.6094484", "0.60841423", "0.6050611", "0.6046539...
0.0
-1
Create an data exposed by 's events
function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/ { var scale = draggable.props.scale; return { node: coreData.node, x: draggable.state.x + coreData.deltaX / scale, y: draggable.state.y + coreData.deltaY / scale, deltaX: coreData.deltaX / scale, deltaY: coreData.deltaY / scale, lastX: draggable.state.x, lastY: draggable.state.y }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "event(name, data = {}) {\n const eventObj = { event: name };\n f...
[ "0.6988314", "0.6832301", "0.6813667", "0.6774418", "0.6638333", "0.64710677", "0.64589286", "0.64571726", "0.6403867", "0.6360234", "0.63414186", "0.6330915", "0.6316681", "0.6316681", "0.6292044", "0.626019", "0.6185507", "0.6136435", "0.60948485", "0.60742015", "0.60579884...
0.0
-1
A lot faster than stringify/parse
function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/ { return { left: bounds.left, top: bounds.top, right: bounds.right, bottom: bounds.bottom }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ser_str(x) { var r;\n\ttry { r= JSON.stringify(x); }\n\tcatch (ex) {} //A: json fails, must be circular\n\tif (!r || r==\"{}\") {\t\n\t\tvar t= typeof(x);\n\t\tr=\"str_r('\"+typeof(x)+\"',{\";\n\t\tfor (var i in x) { r+=\"'\"+i+\"': '\"+x[i]+\"', \" }\n\t\tr+=\"});\"\n\t}\n\treturn r;\n}", "function val...
[ "0.615521", "0.6127262", "0.60143465", "0.5994501", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "0.5832782", "...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.582302", "0.56352496", "0.55549705", "0.54886013", "0.5398446", "0.5384924", "0.53627056", "0.53269863", "0.5322178", "0.53158647", "0.53158647", "0.5293647", "0.5266638", "0.52168524", "0.5198115", "0.51917535", "0.5191675", "0.5155282", "0.5140739", "0.5130987", "0.51252...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.67325807", "0.66350085", "0.6609975", "0.66011983", "0.65996516", "0.65650445", "0.6507408", "0.64692605", "0.64640933", "0.6412933", "0.6371315", "0.63672847", "0.63672847", "0.63672847", "0.63672847", "0.6358507", "0.632842", "0.6323558", "0.63232696", "0.62977177", "0.6...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.69097364", "0.6775297", "0.6607535", "0.65383923", "0.64938533", "0.64889115", "0.64889115", "0.64495087", "0.64495087", "0.6429092", "0.6428121", "0.6404058", "0.6404058", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.639544...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.68771935", "0.6853766", "0.6853766", "0.6853766", "0.6853766", "0.6852374", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.6599196", "0.6566137", "0.6560382", "0.6560382", "0.6560382", "0.6560382", "0.6523208", "0.6522379", "0.6506975", "0.6506975", "0.6506975", "0.6506975", "0.6506975", "0.65022165", "0.64905936", "0.6454269", "0.6454269", "0.6454269", "0.6454269", "0.6454269", "0.6454269", ...
0.6478573
54
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7730571", "0.74697196", "0.74697196", "0.74258965", "0.7164231", "0.71448183", "0.7083163", "0.7080694", "0.6995368", "0.6971116", "0.6901662", "0.6883398", "0.67147285", "0.66557264", "0.6639163", "0.6611592", "0.6611592", "0.6611592", "0.6611592", "0.6600893", "0.6599787...
0.0
-1
Works up the tree to the draggable itself attempting to match selector.
function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ { var node = el; do { if (matchesSelector(node, selector)) return true; if (node === baseNode) return false; node = node.parentNode; } while (node); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_dragHandler() {\n if (!this._settings.draggable) return;\n\n if (!this._settings.selectableContent) {\n this._startDrag();\n } else {\n setTimeout(() => this._startDrag(), this._settings.timeToSelect);\n }\n }", "function selfOrDescendant( target , selector ){\n return $( target ).fi...
[ "0.5788872", "0.5666754", "0.5481894", "0.544926", "0.5429542", "0.5391704", "0.53881156", "0.5310255", "0.5304365", "0.52912045", "0.5277325", "0.5277325", "0.5276975", "0.52520376", "0.5244536", "0.5209051", "0.51961106", "0.51524574", "0.5127923", "0.5120503", "0.5119766",...
0.48960298
55
Userselect Hacks: Useful for preventing blue highlights all over everything when dragging. Note we're passing `document` b/c we could be iframed
function addUserSelectStyles(doc /*: ?Document*/) { if (!doc) return; var styleEl = doc.getElementById('react-draggable-style-el'); if (!styleEl) { styleEl = doc.createElement('style'); styleEl.type = 'text/css'; styleEl.id = 'react-draggable-style-el'; styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\n'; styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\n'; doc.getElementsByTagName('head')[0].appendChild(styleEl); } if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disable_text_selection() {\n \n if ( typeof document.body.onselectstart != 'undefined' ){\n document.body.onselectstart = function(){ return false; };\n } else if ( typeof document.body.style.MozUserSelect != 'undefined' ) {\n document.body.st...
[ "0.7296971", "0.72733355", "0.7152761", "0.71121716", "0.7086034", "0.7086034", "0.7042596", "0.7028938", "0.70247877", "0.70094436", "0.70094436", "0.7004929", "0.7004929", "0.69705606", "0.69641006", "0.69641006", "0.69606924", "0.6959554", "0.6934463", "0.69286746", "0.691...
0.69088346
22
Create an data object exposed by 's events
function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/ { var state = draggable.state; var isStart = !isNum(state.lastX); var node = findDOMNode(draggable); if (isStart) { // If this is our first move, use the x and y as last coords. return { node: node, deltaX: 0, deltaY: 0, lastX: x, lastY: y, x: x, y: y }; } else { // Otherwise calculate proper values. return { node: node, deltaX: x - state.lastX, deltaY: y - state.lastY, lastX: state.lastX, lastY: state.lastY, x: x, y: y }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "constructor( data ){\n this._emitter = new EventTarge...
[ "0.71316594", "0.7129601", "0.6954417", "0.67879397", "0.6753512", "0.67462087", "0.66054535", "0.6517171", "0.6506489", "0.6370212", "0.6300383", "0.6294925", "0.62630916", "0.62626976", "0.6157493", "0.6153874", "0.61415225", "0.6094402", "0.6084208", "0.6050727", "0.604692...
0.0
-1
Create an data exposed by 's events
function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/ { var scale = draggable.props.scale; return { node: coreData.node, x: draggable.state.x + coreData.deltaX / scale, y: draggable.state.y + coreData.deltaY / scale, deltaX: coreData.deltaX / scale, deltaY: coreData.deltaY / scale, lastX: draggable.state.x, lastY: draggable.state.y }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "event(name, data = {}) {\n const eventObj = { event: name };\n f...
[ "0.69873744", "0.6830782", "0.68129873", "0.67745864", "0.6638699", "0.64706445", "0.6459251", "0.64566296", "0.6405677", "0.63617885", "0.634134", "0.6333428", "0.63163394", "0.63163394", "0.6291603", "0.62594455", "0.61850744", "0.61380994", "0.6096372", "0.60758704", "0.60...
0.0
-1
A lot faster than stringify/parse
function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/ { return { left: bounds.left, top: bounds.top, right: bounds.right, bottom: bounds.bottom }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ser_str(x) { var r;\n\ttry { r= JSON.stringify(x); }\n\tcatch (ex) {} //A: json fails, must be circular\n\tif (!r || r==\"{}\") {\t\n\t\tvar t= typeof(x);\n\t\tr=\"str_r('\"+typeof(x)+\"',{\";\n\t\tfor (var i in x) { r+=\"'\"+i+\"': '\"+x[i]+\"', \" }\n\t\tr+=\"});\"\n\t}\n\treturn r;\n}", "function val...
[ "0.6157371", "0.61287427", "0.60163444", "0.5997226", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", ...
0.0
-1
A simple HOC that provides facility for listening to container resizes.
function WidthProvider(ComposedComponent) { var _class, _temp2; return _temp2 = _class = function (_React$Component) { _inherits(WidthProvider, _React$Component); function WidthProvider() { var _temp, _this, _ret; _classCallCheck(this, WidthProvider); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { width: 1280 }, _this.mounted = false, _this.onWindowResize = function () { if (!_this.mounted) return; // eslint-disable-next-line var node = _reactDom2.default.findDOMNode(_this); // Flow casts this to Text | Element if (node instanceof HTMLElement) _this.setState({ width: node.offsetWidth }); }, _temp), _possibleConstructorReturn(_this, _ret); } WidthProvider.prototype.componentDidMount = function componentDidMount() { this.mounted = true; window.addEventListener("resize", this.onWindowResize); // Call to properly set the breakpoint and resize the elements. // Note that if you're doing a full-width element, this can get a little wonky if a scrollbar // appears because of the grid. In that case, fire your own resize event, or set `overflow: scroll` on your body. this.onWindowResize(); }; WidthProvider.prototype.componentWillUnmount = function componentWillUnmount() { this.mounted = false; window.removeEventListener("resize", this.onWindowResize); }; WidthProvider.prototype.render = function render() { var _props = this.props, measureBeforeMount = _props.measureBeforeMount, rest = _objectWithoutProperties(_props, ["measureBeforeMount"]); if (measureBeforeMount && !this.mounted) { return _react2.default.createElement("div", { className: this.props.className, style: this.props.style }); } return _react2.default.createElement(ComposedComponent, _extends({}, rest, this.state)); }; return WidthProvider; }(_react2.default.Component), _class.defaultProps = { measureBeforeMount: false }, _class.propTypes = { // If true, will not render children until mounted. Useful for getting the exact width before // rendering, to prevent any unsightly resizing. measureBeforeMount: _propTypes2.default.bool }, _temp2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listen() {\n EventManager.on('resize', this.onResize)\n }", "resize(size, evt) { console.log('Resize callback'); }", "onResize_() {\n dispatcher.getInstance().dispatchEvent(new GoogEvent(EventType.RESIZE));\n }", "onResize(evt) {\n var event = document.createEvent('Event');\n event.initEvent('r...
[ "0.7308991", "0.7056416", "0.69942594", "0.68985856", "0.6897915", "0.6890507", "0.6871638", "0.6823513", "0.6823513", "0.67785704", "0.66170883", "0.65962356", "0.65418977", "0.6518847", "0.65104", "0.6485315", "0.6468744", "0.64610803", "0.64597243", "0.644851", "0.6423478"...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.582302", "0.56352496", "0.55549705", "0.54886013", "0.5398446", "0.5384924", "0.53627056", "0.53269863", "0.5322178", "0.53158647", "0.53158647", "0.5293647", "0.5266638", "0.52168524", "0.5198115", "0.51917535", "0.5191675", "0.5155282", "0.5140739", "0.5130987", "0.51252...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.67325807", "0.66350085", "0.6609975", "0.66011983", "0.65996516", "0.65650445", "0.6507408", "0.64692605", "0.64640933", "0.6412933", "0.6371315", "0.63672847", "0.63672847", "0.63672847", "0.63672847", "0.6358507", "0.632842", "0.6323558", "0.63232696", "0.62977177", "0.6...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.69097364", "0.6775297", "0.6607535", "0.65383923", "0.64938533", "0.64889115", "0.64889115", "0.64495087", "0.64495087", "0.6429092", "0.6428121", "0.6404058", "0.6404058", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.6395446", "0.639544...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.68771935", "0.6853766", "0.6853766", "0.6853766", "0.6853766", "0.6852374", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "0.684702", "...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.6599196", "0.6566137", "0.6560382", "0.6560382", "0.6560382", "0.6560382", "0.6523208", "0.6522379", "0.6506975", "0.6506975", "0.6506975", "0.6506975", "0.6506975", "0.65022165", "0.64905936", "0.6454269", "0.6454269", "0.6454269", "0.6454269", "0.6454269", "0.6454269", ...
0.6478573
45
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7730571", "0.74697196", "0.74697196", "0.74258965", "0.7164231", "0.71448183", "0.7083163", "0.7080694", "0.6995368", "0.6971116", "0.6901662", "0.6883398", "0.67147285", "0.66557264", "0.6639163", "0.6611592", "0.6611592", "0.6611592", "0.6611592", "0.6600893", "0.6599787...
0.0
-1
Works up the tree to the draggable itself attempting to match selector.
function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ { var node = el; do { if (matchesSelector(node, selector)) return true; if (node === baseNode) return false; node = node.parentNode; } while (node); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_dragHandler() {\n if (!this._settings.draggable) return;\n\n if (!this._settings.selectableContent) {\n this._startDrag();\n } else {\n setTimeout(() => this._startDrag(), this._settings.timeToSelect);\n }\n }", "function selfOrDescendant( target , selector ){\n return $( target ).fi...
[ "0.5788872", "0.5666754", "0.5481894", "0.544926", "0.5429542", "0.5391704", "0.53881156", "0.5310255", "0.5304365", "0.52912045", "0.5277325", "0.5277325", "0.5276975", "0.52520376", "0.5244536", "0.5209051", "0.51961106", "0.51524574", "0.5127923", "0.5120503", "0.5119766",...
0.48960298
56
Userselect Hacks: Useful for preventing blue highlights all over everything when dragging. Note we're passing `document` b/c we could be iframed
function addUserSelectStyles(doc /*: ?Document*/) { if (!doc) return; var styleEl = doc.getElementById('react-draggable-style-el'); if (!styleEl) { styleEl = doc.createElement('style'); styleEl.type = 'text/css'; styleEl.id = 'react-draggable-style-el'; styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n'; styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n'; doc.getElementsByTagName('head')[0].appendChild(styleEl); } if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disable_text_selection() {\n \n if ( typeof document.body.onselectstart != 'undefined' ){\n document.body.onselectstart = function(){ return false; };\n } else if ( typeof document.body.style.MozUserSelect != 'undefined' ) {\n document.body.st...
[ "0.7296971", "0.72733355", "0.7152761", "0.71121716", "0.7086034", "0.7086034", "0.7042596", "0.7028938", "0.70247877", "0.70094436", "0.70094436", "0.7004929", "0.7004929", "0.69705606", "0.69641006", "0.69641006", "0.69606924", "0.6959554", "0.6934463", "0.69286746", "0.691...
0.67873764
27
Create an data object exposed by 's events
function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/ { var state = draggable.state; var isStart = !isNum(state.lastX); var node = findDOMNode(draggable); if (isStart) { // If this is our first move, use the x and y as last coords. return { node: node, deltaX: 0, deltaY: 0, lastX: x, lastY: y, x: x, y: y }; } else { // Otherwise calculate proper values. return { node: node, deltaX: x - state.lastX, deltaY: y - state.lastY, lastX: state.lastX, lastY: state.lastY, x: x, y: y }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "constructor( data ){\n this._emitter = new EventTarge...
[ "0.71316594", "0.7129601", "0.6954417", "0.67879397", "0.6753512", "0.67462087", "0.66054535", "0.6517171", "0.6506489", "0.6370212", "0.6300383", "0.6294925", "0.62630916", "0.62626976", "0.6157493", "0.6153874", "0.61415225", "0.6094402", "0.6084208", "0.6050727", "0.604692...
0.0
-1
Create an data exposed by 's events
function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/ { var scale = draggable.props.scale; return { node: coreData.node, x: draggable.state.x + coreData.deltaX / scale, y: draggable.state.y + coreData.deltaY / scale, deltaX: coreData.deltaX / scale, deltaY: coreData.deltaY / scale, lastX: draggable.state.x, lastY: draggable.state.y }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventData () {\n return {\n id: 0,\n effects: {\n },\n duration: 0\n };\n}", "function EventData() {\n this.token = \"\";\n this.extent = \"\";\n this.rset = \"\";\n this.GetEventData = GetEventData;\n}", "event(name, data = {}) {\n const eventObj = { event: name };\n f...
[ "0.69873744", "0.6830782", "0.68129873", "0.67745864", "0.6638699", "0.64706445", "0.6459251", "0.64566296", "0.6405677", "0.63617885", "0.634134", "0.6333428", "0.63163394", "0.63163394", "0.6291603", "0.62594455", "0.61850744", "0.61380994", "0.6096372", "0.60758704", "0.60...
0.0
-1
A lot faster than stringify/parse
function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/ { return { left: bounds.left, top: bounds.top, right: bounds.right, bottom: bounds.bottom }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ser_str(x) { var r;\n\ttry { r= JSON.stringify(x); }\n\tcatch (ex) {} //A: json fails, must be circular\n\tif (!r || r==\"{}\") {\t\n\t\tvar t= typeof(x);\n\t\tr=\"str_r('\"+typeof(x)+\"',{\";\n\t\tfor (var i in x) { r+=\"'\"+i+\"': '\"+x[i]+\"', \" }\n\t\tr+=\"});\"\n\t}\n\treturn r;\n}", "function val...
[ "0.6157371", "0.61287427", "0.60163444", "0.5997226", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", "0.5834905", ...
0.0
-1
import autoMergeLevel2 from 'reduxpersist/lib/stateReconciler/autoMergeLevel2';
function configureStore(){var allMiddleware=Object.values(_middleware2.default);var rootReducer=(0,_redux.combineReducers)({global:_ducks2.default.global,dashboard:_ducks2.default.dashboard,holdings:_ducks2.default.holdings,trade:(0,_reduxPersist.persistReducer)(tradePersistConfig,_ducks2.default.trade),news:_ducks2.default.news,coins:_ducks2.default.coins,referrals:_ducks2.default.referrals,algos:_ducks2.default.algos});var store=(0,_redux.createStore)(rootReducer,(0,_reduxDevtoolsExtension.composeWithDevTools)(_redux.applyMiddleware.apply(undefined,(0,_toConsumableArray3.default)(allMiddleware))));_middleware2.default.sagaMiddleware.run(_ducks.rootSaga);// Make reducers hot reloadable if(false){module.hot.accept('./ducks',function(){// eslint-disable-next-line global-require var nextReducer=require('./ducks');store.replaceReducer((0,_redux.combineReducers)((0,_extends3.default)({},nextReducer)));});}var persistor=(0,_reduxPersist.persistStore)(store,null,function(){_logger2.default.debug('Store has been hydrated');});return{store:store,persistor:persistor};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoMergeLevel2(inboundState, originalState, reducedState, _ref) {\n var debug = _ref.debug;\n\n var newState = _objectSpread({}, reducedState); // only rehydrate if inboundState exists and is an object\n\n\n if (inboundState && _typeof(inboundState) === 'object') {\n Object.keys(inboundState).forEa...
[ "0.6375807", "0.6166047", "0.5853037", "0.5661879", "0.55676275", "0.54963434", "0.5475112", "0.5462089", "0.5462089", "0.543869", "0.53748137", "0.5215527", "0.5202128", "0.5194099", "0.51516867", "0.508525", "0.5084668", "0.5065886", "0.5050644", "0.5007387", "0.5003919", ...
0.52486444
11
combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2
function persistCombineReducers(config, reducers) { config.stateReconciler = config.stateReconciler === undefined ? __WEBPACK_IMPORTED_MODULE_2__stateReconciler_autoMergeLevel2__["a" /* default */] : config.stateReconciler; return Object(__WEBPACK_IMPORTED_MODULE_1__persistReducer__["a" /* default */])(config, Object(__WEBPACK_IMPORTED_MODULE_0_redux__["combineReducers"])(reducers)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function persistCombineReducers(config, reducers) {\n config.stateReconciler = config.stateReconciler === undefined ? _autoMergeLevel2.default : config.stateReconciler;\n return (0, _persistReducer2.default)(config, (0, _redux.combineReducers)(reducers));\n}", "function persistCombineReducers(config, reducers)...
[ "0.7519051", "0.73466134", "0.72460246", "0.7232761", "0.6891282", "0.66568446", "0.6604932", "0.65095603", "0.63100165", "0.599657", "0.59791934", "0.59782034", "0.5878149", "0.58655936", "0.5818507", "0.5783604", "0.5585683", "0.55729973", "0.5515478", "0.54919344", "0.5474...
0.7293237
3
autoMergeLevel2: merges 2 level of substate skips substate if already modified this is essentially reduxperist v4 behavior
function isPlainEnoughObject(o) { return o !== null && !Array.isArray(o) && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoMergeLevel2(inboundState, originalState, reducedState, _ref) {\n var debug = _ref.debug;\n\n var newState = _objectSpread({}, reducedState); // only rehydrate if inboundState exists and is an object\n\n\n if (inboundState && _typeof(inboundState) === 'object') {\n Object.keys(inboundState).forEa...
[ "0.77434164", "0.6913908", "0.55335474", "0.5469021", "0.542019", "0.5347255", "0.5280359", "0.5257912", "0.5257912", "0.5257912", "0.5218692", "0.51929325", "0.51559734", "0.5146037", "0.5122448", "0.510735", "0.5079359", "0.5069973", "0.50692964", "0.5031946", "0.50106156",...
0.0
-1
Author: Zhenxing Zhou Blog: Date: 2008711
function $$(divID) { return document.getElementById(divID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "static private internal function m121() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "transient private protected internal fun...
[ "0.69410574", "0.6862497", "0.65279025", "0.65262073", "0.6390657", "0.6368995", "0.6346428", "0.62105983", "0.6075701", "0.60738105", "0.6053121", "0.59944856", "0.59943694", "0.59561723", "0.58870596", "0.58845186", "0.58787733", "0.5863297", "0.5805838", "0.5800965", "0.57...
0.0
-1
Get current Chirp count
function getCount() { return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCounter() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n\n let proxyResult;\n proxyResult = Module._vscr_ratchet_message_get_counter(this.ctxPtr);\n return proxyResult;\n }", "get channelCount() {\n return this._getChannelProperties().ch...
[ "0.69377005", "0.6528092", "0.63182753", "0.5895571", "0.58917373", "0.5887822", "0.58841306", "0.58466583", "0.5838331", "0.58100325", "0.58017987", "0.57986414", "0.5739335", "0.57300156", "0.57295114", "0.5728879", "0.57268983", "0.57224196", "0.5699298", "0.5695995", "0.5...
0.6143193
3
Initialize Watch watch blockchain for new contract events update chirps when new chirp or vote comes in
function watchEvents() { const events = contractInstance.allEvents(); events.watch((error, result) => { if (!error) { const id = result.args.id ? parseInt(result.args.id) : null; switch (result.event) { case 'NewChirp': loadChirp(id); break; case 'Vote': loadChirp(id); break; default: null; } console.log(`Incoming Event: ${result.event}`); console.log(`Arguments:${JSON.stringify(result.args)}`); } else { console.log(error); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startEventListener() {\n // Utils.pzChestContract.CreateChest().watch((err, { result }) => {\n // if (err) return console.error('Failed to bind event listener:', err);\n\n // console.log('Chest Created');\n // console.log(result);\n // });\n }", "function watchBl...
[ "0.6005222", "0.59970754", "0.5962124", "0.57591754", "0.56653744", "0.55778354", "0.5569963", "0.54077446", "0.5360693", "0.5349578", "0.5345343", "0.5340084", "0.53310746", "0.53168917", "0.53132063", "0.53132063", "0.5295741", "0.5274722", "0.52744836", "0.5270121", "0.525...
0.69459236
0
Load the picture and then check
async load() { if (this.path) { // Try loading this.image = await Picture2D.loadImage(this.path); this.empty = this.image.empty; // If not empty, configure bitmap size if (!this.empty) { this.oW = this.image.width; this.oH = this.image.height; if (this.cover) { this.w = RPM.CANVAS_WIDTH; this.h = RPM.CANVAS_HEIGHT; } else if (this.stretch) { this.w = RPM.getScreenX(this.image.width); this.h = RPM.getScreenY(this.image.height); } else { this.w = RPM.getScreenMinXY(this.image.width); this.h = RPM.getScreenMinXY(this.image.height); } RPM.requestPaintHUD = true; this.loaded = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_image(file) {\n\n}", "function checkPicture (shouldLoad) {\n return driver\n .context(webviewContext)\n .setAsyncScriptTimeout(MINUTE / 2)\n .executeAsync(cameraHelper.checkPicture, [getCurrentPromiseId(), isAndroid7])\n .then(function (result) {\...
[ "0.7152087", "0.67384815", "0.6687192", "0.66786563", "0.6596711", "0.6596711", "0.6558073", "0.6537745", "0.65174514", "0.6512329", "0.6456663", "0.63369656", "0.63283145", "0.63219357", "0.63144517", "0.6296253", "0.6250051", "0.6243681", "0.6240939", "0.6240045", "0.623148...
0.68783295
1
Create a copy of a picture2D
createCopy() { let picture = new Picture2D(); picture.empty = this.empty; picture.path = this.path; picture.image = this.image; picture.loaded = true; picture.stretch = false; picture.setW(picture.image.width, true); picture.setH(picture.image.height, true); return picture; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyPix(originX,originY,destX,destY) {\n var origin = (originY * img.width + originX) * 4; //convert to 1D pixels index\n var dest = (destY * img.width + destX) * 4;//convert to 1D pixels index\n pixels[dest] = pixels[origin];\n pixels[dest+1] = pixels[origin+1];\n pixels[dest+2] = pixels[origin+2];\...
[ "0.64743096", "0.63965577", "0.6224653", "0.6043176", "0.600313", "0.59332055", "0.59221387", "0.585315", "0.5844815", "0.5785268", "0.57552993", "0.5753254", "0.57461303", "0.5706015", "0.5645579", "0.5635791", "0.5622143", "0.5604357", "0.5570088", "0.55581176", "0.55562824...
0.84603226
0
MOVING (in posture set) moving without changing axis
_actionMove(data) { this.socket.emit('/action', `m ${data.posture.charAt(0)} ${data.x} ${data.y}`) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "move() {\n this.geometricMidpoint = this.setGeometricMidpoint();\n this.in.X = this.position.X - this.geometricMidpoint.X;\n this.in.Y = this.position.Y - this.geometricMidpoint.Y;\n }", "move() {\n this.x += this.xdir * .5;\n this.y += this.ydir * .5;\n }", "move() {\n // Set velocity via ...
[ "0.7298882", "0.7205994", "0.7068243", "0.7062525", "0.70593184", "0.69451004", "0.6922129", "0.6903526", "0.68870646", "0.6886303", "0.68670106", "0.6842643", "0.6841768", "0.6827383", "0.6821674", "0.68144494", "0.6790788", "0.6790387", "0.67893684", "0.6774653", "0.6752816...
0.0
-1
DRIVING (in posture set) moving with axis turn, like a car drives
_actionDrive(data) { this.socket.emit('/action', `d ${data.posture.charAt(0)} ${data.x} ${data.y}`) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drive(y, z) {\n this.motor_left_0.set(0.4 * y - 0.3 * z);\n this.motor_right_0.set(0.4 * y + 0.3 * z);\n }", "move() {\n if (this.crashed) {\n return;\n }\n if (this.direction == 1) {\n this.y -= settings.step;\n }\n else if (this.direction == 2) {\...
[ "0.6907305", "0.6454733", "0.64347655", "0.64292634", "0.64026225", "0.63863146", "0.6337681", "0.62538767", "0.62438667", "0.6207436", "0.61981237", "0.61431617", "0.6139935", "0.61087495", "0.6088836", "0.6078504", "0.60689986", "0.60670227", "0.6051777", "0.60458416", "0.6...
0.0
-1
TURNING (in posture set) no moving, just turning on the spot
_actionTurn(data) { this.socket.emit('/action', `t ${data.posture.charAt(0)} ${data.direction.charAt(0)}`) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "move() {\n if (this.crashed) {\n return;\n }\n if (this.direction == 1) {\n this.y -= settings.step;\n }\n else if (this.direction == 2) {\n this.x += settings.step;\n }\n else if (this.direction == 3) {\n this.y += settin...
[ "0.6697236", "0.6697073", "0.6653945", "0.6638358", "0.66148245", "0.6612541", "0.65642124", "0.6524891", "0.6482015", "0.6478994", "0.6445759", "0.6397155", "0.6393875", "0.6386389", "0.6379194", "0.6375088", "0.63536024", "0.63323814", "0.6318899", "0.6316602", "0.631429", ...
0.0
-1
LICENCE Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. Displays aggregated IQR control information Used internally only
function IQRState(config) { this.Init(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showQr() {\n new QRCode(qr,{\n text: `${name.value.toUpperCase()}\nNUMBER PLATE: ${plate.value.toUpperCase()}\nCHASSIS: ${chassis.value.toUpperCase()}\nhttp://www.npf.gov.ng/tinted/permit/index.index.php?abuja=${id.value}`,\n width: 300,\n height: 300,\n })\n...
[ "0.7414718", "0.6699919", "0.6607788", "0.65513825", "0.65342116", "0.65116066", "0.6487303", "0.64441234", "0.6364337", "0.6249958", "0.6248732", "0.620641", "0.619105", "0.6118726", "0.59372896", "0.59122604", "0.58752066", "0.58466715", "0.58336765", "0.57913226", "0.57772...
0.5363911
40
Constructs a new AuthOAuth2ConnectorSAMLConfig.
constructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OAuthTwoLeg(config) { \n this._config = config;\n }", "function createConnection() {\n return new google.auth.OAuth2(\n googleConfig.clientId,\n googleConfig.clientSecret,\n googleConfig.redirect\n );\n }", "function createConfigInitializeSetting() {\n return {\n in...
[ "0.5113158", "0.50480586", "0.4873684", "0.48320195", "0.4773867", "0.4678154", "0.46510676", "0.46059045", "0.46013606", "0.44474202", "0.44446933", "0.44446933", "0.44033775", "0.43896818", "0.4385921", "0.43745384", "0.43620282", "0.43501365", "0.43428627", "0.43250585", "...
0.0
-1
Implementation of POST call
function handlePost() { var bodyStr = $.request.body ? $.request.body.asString() : undefined; if ( bodyStr === undefined ){ $.response.status = $.net.http.INTERNAL_SERVER_ERROR; return {"myResult":"Missing BODY"}; } // Extract body insert data to DB and return results in JSON/other format $.response.status = $.net.http.CREATED; return {"myResult":"POST success"}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postRequest() {\n // TODO\n}", "function POST(){\n \n}", "function postRESTlet(datain) {\n\n}", "post(url, body, options = {}) {\n return this.request('POST', url, addBody(options, body));\n }", "post(url, data, opt = {}) {\n opt.method = 'POST';\n opt.data = data;\n return this.s...
[ "0.73972034", "0.7258474", "0.7135052", "0.7107843", "0.71065855", "0.7008605", "0.70046544", "0.6953473", "0.6928738", "0.69166404", "0.69166404", "0.69166404", "0.69166404", "0.69166404", "0.69140786", "0.68445414", "0.67910105", "0.6722905", "0.66913784", "0.65861815", "0....
0.6989223
7
Check Content type headers and parameters
function validateInput() { var i; for (i = 0; i < $.request.parameters.length; ++i) { paramName = $.request.parameters[i].name; paramValue = $.request.parameters[i].value; if (paramName === 'x') { x = parseInt(paramValue, 10); } if (paramName === 'y') { y = parseInt(paramValue, 10); } if (paramName === 'z') { z = parseInt(paramValue, 10); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateHeaders(xdrHeaders) {\n var multipartCheck, boundaryCheck, typeCheck, contentIdCheck, soapCheck, actionCheck;\n\n if (!xdrHeaders || !xdrHeaders[\"content-type\"]) {\n return false;\n }\n\n var tokens = xdrHeaders[\"content-type\"].trim().split(\";\");\n for (var i in tokens)...
[ "0.69200355", "0.6806127", "0.6498417", "0.6427931", "0.64225596", "0.63834924", "0.6377379", "0.6359445", "0.63588345", "0.63588345", "0.6341271", "0.63193995", "0.6298347", "0.6173153", "0.6170139", "0.6162786", "0.6073947", "0.60311246", "0.6023161", "0.59472847", "0.59284...
0.0
-1
Show Add backlog/task window
function showWindow(windowName) { $("#kanbanWindow").removeClass("show"); changePageWindow(windowName, 0); (windowName == "backlogWindow") ? clearBacklogWindow() : clearTaskWindow(); setTimeout(function () { $("#kanbanWindow").css("display", "none"); $("#" + windowName).css("display", "block").addClass("show"); $(viewIndicator[0]).removeClass("show").on("click", function () { hideWindow(); }); }, 250); // Clear fields $(".assignee-name-active").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask () {\r\n tasks.setSelected(tasks.add())\r\n taskOverlay.hide()\r\n\r\n tabBar.updateAll()\r\n addTab()\r\n}", "function createNewTask() {\n\n\tvar parms = centerParms(600,450,1) + \",scrollable=yes,resizable=yes\";\n\n\tvar url = \"index.php?module=managetasks&hideHeader=1\";\n\tvar ref = wi...
[ "0.66559273", "0.6498721", "0.6451571", "0.63768744", "0.6261262", "0.6234148", "0.6120871", "0.60578555", "0.6008472", "0.59823376", "0.5955724", "0.5937864", "0.592787", "0.5914598", "0.58751285", "0.5862424", "0.5856235", "0.58558565", "0.5839891", "0.5830329", "0.5820202"...
0.53663975
82
Hide Add backlog/task window and Open the kanban board
function hideWindow() { var window = $(".window.show"); $(window).removeClass("show"); setTimeout(function () { $(window).css("display", "none"); $("#kanbanWindow").css("display", "block").addClass("show"); $(viewIndicator[0]).addClass("show"); }, 250); $("#taskWindow") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideLobbyShowBoard() {\n $(\"#lobby\").hide();\n $(\"#game-area\").show();\n\n // Show GO in detail pane\n selectSquareModel(0).showDetail();\n // Show buttons\n showButtons([]);\n}", "function createNewTask() {\n\n\tvar parms = centerParms(600,450,1) + \",scrollable=yes,resizable=yes\...
[ "0.6237918", "0.623018", "0.6203043", "0.6158131", "0.61370337", "0.60457104", "0.59102184", "0.5868533", "0.5808274", "0.5793443", "0.57887703", "0.5782674", "0.576714", "0.5765234", "0.56884956", "0.568752", "0.56687504", "0.56558305", "0.56527185", "0.5634196", "0.5615936"...
0.57671404
12
In backlogWindow and taskWindow there are 2 pages: 1. For adding or viewing some data 2. For viewing history or tasks of that backlog, or adding document and comment to a task
function changePageWindow(windowName, index) { var page = document.getElementById(windowName).getElementsByClassName("page"); if (index == 1) { page[0].style.left = "-100%"; page[1].style.display = "block"; setTimeout(function () { page[1].style.left = "0"; }, 300); setTimeout(function () { page[0].style.display = "none"; }, 1000); } else { page[1].style.left = "100%"; page[0].style.display = "block"; setTimeout(function () { page[0].style.left = "0"; }, 300); setTimeout(function () { page[1].style.display = "none"; }, 1000); } $(page[index]).scrollTop(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function taskView()\n{\n // set up necessary data\n const taskList = $(\"#tasklist\");\n const archiveList = $(\"#archivelist\");\n const tasks = $(\"body\").data(\"tasks\");\n const active = tasks[\"active\"];\n const activeKeys = Object.keys(active);\n // first, update the tasklist with data from the DOM\...
[ "0.57269204", "0.5507186", "0.549561", "0.54312074", "0.542911", "0.5287957", "0.52544904", "0.5222835", "0.52205235", "0.52073514", "0.5178027", "0.5131624", "0.51132196", "0.5091229", "0.5090417", "0.50721645", "0.5069212", "0.5068049", "0.5065345", "0.50618106", "0.5051705...
0.0
-1
Board drag and drop functionality
function init_BoardDragDrop() { $(".connected").sortable({ connectWith: ".connected", receive: function (event, ui) { var laneType = this.getAttribute("data-lane-type"); var laneID = this.getAttribute("data-id"); if ((laneType == 3) || (ui.item.type == laneType)) { // To diferentiate between changing lane and updating position ui.item.targetLane = laneID; //Update sticky note new swimlane id and position changeLane(ui.item.id, ui.item.type, laneID, ui.item.index()); $(ui.item).attr("data-status", $(this).attr("data-status")); //Update positon of all old sticky notes in destination lane based on new insertation position var index = ui.item.index(); var note = this.getElementsByClassName("note"); for (var i = index + 1; i < note.length; i++) { updatePosition($(note[i]).attr("data-id"), i, $(note[i]).attr("data-type")); } // Update position of sticky notes in the source lane. note = ui.item.startLane.getElementsByClassName("note"); for (var i = ui.item.startPos; i < note.length; i++) { updatePosition($(note[i]).attr("data-id"), i, ui.item.type); } // Update new position in clients var noteID = $(ui.item).attr("id"); var swimlanePosition = $(".connected").index(this); proxyNote.invoke("changePosition", noteID, swimlanePosition, index); } else { $(ui.sender).sortable("cancel"); showErrorDialog(0); } }, start: function (event, ui) { ui.item.startLane = this; ui.item.startPos = ui.item.index(); ui.item.id = $(ui.item).attr("data-id"); ui.item.type = $(ui.item).attr("data-type"); }, stop: function (event, ui) { //If the note didn't move to another swimlane if ((ui.item.targetLane == null) && (ui.item.startPos != ui.item.index())) { var index = ui.item.index(); var startPos = ui.item.startPos; var note = this.getElementsByClassName("note"); if (index < startPos) { // If the note move up for (var i = index; i < startPos + 1; i++) { updatePosition($(note[i]).attr("data-id"), i, $(note[i]).attr("data-type")); } } else { // If the note move down for (var i = startPos; i < index + 1; i++) { updatePosition($(note[i]).attr("data-id"), i, $(note[i]).attr("data-type")); } } // Update new position in clients var noteID = $(ui.item).attr("id"); var swimlanePosition = $(".connected").index(this); proxyNote.invoke("changePosition", noteID, swimlanePosition, index); } } }).disableSelection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drop(event) {\n clearSpaces();\n var checkerId = event.dataTransfer.getData(\"Text\");\n var destRow = Math.floor((event.pageY - 7 - document.getElementById(checkerId).parentElement.offsetTop) / 50);\n var destCol = Math.floor((event.pageX - 7 - document.getElementById(checkerId).parentElement.offsetL...
[ "0.7590913", "0.74037766", "0.7269101", "0.7211959", "0.7091803", "0.70904446", "0.70419115", "0.70226055", "0.69760513", "0.6891953", "0.6841073", "0.68396276", "0.6827149", "0.6787907", "0.6736845", "0.6735565", "0.6710487", "0.6702367", "0.66396534", "0.66396534", "0.66171...
0.68712884
10
Swimlane drag and drop functionalities
function init_SwDragDrop() { $("#currentSwimlane").sortable({ placeholder: "ui-state-highlight", start: function (event, ui) { ui.item.startPos = ui.item.index(); }, stop: function (event, ui) { var index = ui.item.index(); var startPos = ui.item.startPos; // Update to database var sw = this.getElementsByClassName("swimlane"); if (index < startPos) { // If the swimlane move up for (var i = index; i < startPos + 1; i++) { saveSwimlanePosition($(sw[i]).attr("data-id"), i); } } else { // If the swimlane move down for (var i = startPos; i < index + 1; i++) { saveSwimlanePosition($(sw[i]).attr("data-id"), i); } } // Update in the board changeSwPosition(startPos, index); // Send update to other client proxyNote.invoke("changeSWPosition", startPos, index); } }).disableSelection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drop(e){\n e.preventDefault();\n // Remove Background Color/Padding\n listColumns.forEach((column)=>{\n column.classList.remove('over');\n\n });\n // Add Item to Column\n const parent =listColumns[currentColumn];\n parent.appendChild(draggedItem);\n // Dragging complete\n dragging=false;\n re...
[ "0.7056875", "0.69886494", "0.6926061", "0.69160974", "0.68193334", "0.6735216", "0.67130363", "0.67025375", "0.67025375", "0.6693264", "0.6690549", "0.66856635", "0.6668594", "0.6647465", "0.6622608", "0.66071296", "0.6596028", "0.658581", "0.658581", "0.65751827", "0.655815...
0.6710404
7
1. Create new sticky note and save it to database
function insertItem(type) { var item = (type == "backlog") ? new Backlog() : new Task(); if (type == "task" && !item.Backlog_ID) showErrorDialog(2); else { showProcessingDiaglog(); $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "insertItem", projectID: projectID, type: type, item: JSON.stringify(item) }, type: "post", success: function (result) { // Link assignee to the created item var deferreds = saveAssignee(result.substring(0, result.indexOf(".")), type, true); $.when(deferreds).done(function () { showSuccessDiaglog(0); }); // Display created item in board var objtext = getVisualNote(result, type, item); var swimlanePosition = parseInt($("#txtSwimlanePosition").val()); $(objtext).appendTo($(".connected")[swimlanePosition]); (type == "backlog") ? clearBacklogWindow() : clearTaskWindow(); // Send to other clients proxyNote.invoke("sendInsertedNote", swimlanePosition, objtext); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNote(){\n let note = new Note(\"title\",\"content\");\n notes.push(note);\n addNote(note);\n localStorage.setItem(\"notes\",JSON.stringify(notes));\n}", "function addNote() {\n // formatter, to render date in polish format\n const formatter = new Intl.DateTimeFormat('pl');\n /...
[ "0.7574368", "0.7480215", "0.74032503", "0.7333511", "0.73153585", "0.7282837", "0.72413075", "0.72383505", "0.7217789", "0.71831954", "0.7181238", "0.7180336", "0.7132378", "0.71305156", "0.71216255", "0.7095756", "0.70608205", "0.7050139", "0.70471597", "0.7035775", "0.7012...
0.0
-1
2.1 Change position of a sticky note
function updatePosition(itemID, pos, type) { var table = (type == 1) ? "Backlog" : "Task"; $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "updatePosition", projectID: projectID, type: table, itemID: itemID, pos: pos }, type: "get" }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undockNote(noteCard){\n\t\t\tvar posLeft = getNoteLeftPos(noteCard);\n\t\t\t noteCard.css({position:\"fixed\",left:posLeft+\"px\",top:actionBarHeight + \"px\"});\n\t\t }", "function elongateTopNote(noteIndex)\n{\n if(topNoteBlocks[noteIndex]){\n var newTop = - fallDownSpeed;\n topNoteBl...
[ "0.6834854", "0.6807826", "0.64257944", "0.6362727", "0.6183329", "0.6150149", "0.61447376", "0.60926205", "0.60807157", "0.6069175", "0.6064843", "0.60579115", "0.60274154", "0.59846836", "0.5963077", "0.5938443", "0.59245855", "0.5911479", "0.58934706", "0.5888289", "0.5868...
0.0
-1
2.2 Move a sticky note to another swimlane
function changeLane(itemID, type, swimlane_id, pos) { var table = (type == 1) ? "Backlog" : "Task"; $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "changeSwimlane", projectID: projectID, type: table, itemID: itemID, swimlane: swimlane_id, pos: pos }, type: "get" }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function elongateTopNote(noteIndex)\n{\n if(topNoteBlocks[noteIndex]){\n var newTop = - fallDownSpeed;\n topNoteBlocks[noteIndex].style.top = newTop;\n }\n \n}", "function swapNotes(note) {\n if (!borderedNote) {\n borderedNote = note;\n note.style.border = \"solid red\";\n } else ...
[ "0.64461625", "0.63247633", "0.6265482", "0.6185075", "0.6049529", "0.59128636", "0.5887465", "0.5841026", "0.58173", "0.5785755", "0.5773158", "0.5738146", "0.5733421", "0.57171893", "0.57120085", "0.563024", "0.5594627", "0.55894", "0.5578799", "0.55505717", "0.55280036", ...
0.0
-1
View all assignee of an item
function viewAssignee(itemID, type) { return $.ajax({ url: "Handler/UserHandler.ashx", data: { action: "viewAssignee", itemID: itemID, type: type }, type: "get", success: function (result) { $("#" + type + "Assign").prepend(result); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAssignList(order_id) {\n var params = {};\n if (order_id != undefined) {\n params = {order_id: order_id};\n }\n\n var assignee = $http.post(\n $global.API_URL + 'api/crm/assignee/list/', params);\n return assignee;\n ...
[ "0.58953154", "0.58953154", "0.57766205", "0.56971425", "0.56575054", "0.5544959", "0.5387834", "0.53597677", "0.53396314", "0.53053045", "0.528455", "0.5267496", "0.52632517", "0.524962", "0.52311456", "0.51668894", "0.51082134", "0.50892836", "0.50770515", "0.50753176", "0....
0.61601037
0
Update assignee including delete old records and save new ones
function updateAssignee(itemID, type) { //Delete old records $.ajax({ url: "Handler/UserHandler.ashx", data: { action: "deleteAssignee", type: type, itemID: itemID }, type: "get", success: function () { //Save new records return saveAssignee(itemID, type, false); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assignSync(targetId, targetEntity, assigneeId, assigneeEntity) {\n\n var xml = soapXml.getAssignXml(targetId, targetEntity,\n assigneeId, assigneeEntity);\n\n return executeRequest(xml, false);\n }", "function updateAssignment(req, res) {\n req.body.dateUpdate = new Date();\...
[ "0.5823742", "0.5819037", "0.57625574", "0.57484305", "0.5739894", "0.5725211", "0.56761163", "0.55900335", "0.5569395", "0.5552657", "0.55015135", "0.5490051", "0.5486643", "0.5440547", "0.5437471", "0.53943324", "0.53166574", "0.5304473", "0.5268634", "0.52457714", "0.51984...
0.6158581
0
After insert new item and get the item ID, then save the assignee of that item to database
function saveAssignee(itemID, type, clear) { var deferreds = []; var assignee = document.getElementById(type + "Assign").getElementsByTagName("div"); for (var i = 0; i < assignee.length; i++) { deferreds.push($.ajax({ url: "Handler/UserHandler.ashx", data: { action: "saveAssignee", type: type, itemID: itemID, assigneeID: assignee[i].getAttribute("data-id") }, type: "get" })); } assigneeChange = false; if (clear) $(".assignee-name-active").remove(); return deferreds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async save_assign(assign) {\n //const {location_id, table_id, date_from, first_name, last_name, phone, email} = assign;\n try {\n /* NOTE: assign contains all key-value pairs to pass it as values-object */\n const result = await mAssign.create(assign, {raw: true});\n ...
[ "0.6210805", "0.61240363", "0.6056307", "0.6027602", "0.5991383", "0.5971676", "0.597021", "0.5867692", "0.586757", "0.5831394", "0.58252484", "0.5815995", "0.58136773", "0.58114684", "0.58000636", "0.57846147", "0.5780964", "0.57681257", "0.57597727", "0.57502747", "0.574692...
0.61173946
2
Add assignee name result
function addAssignee(obj, type) { var id = obj.getAttribute("data-id"); var objtext = "<div class='assignee-name-active' data-id='" + id + "' onclick='removeAssignee(this)'>" + obj.innerHTML + "</div>"; var container = $("#" + type + "Assign"); if (!IsAssigned(id, container)) { var searchBox = $("input:eq(0)", container); $(objtext).insertBefore($(searchBox)); assigneeChange = true; $(".window-content").perfectScrollbar("update"); } // Reset search box $(searchBox).val("").focus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReassigneeNames() {\n let namesOutput = '';\n if (this._reassignees.length) {\n this._reassignees.forEach((reassignee) => {\n namesOutput += `${reassignee.name}; `;\n });\n // Cut off the trailing comma and space...\n namesOutput = namesOutput.slice(0, -2);\n return namesOu...
[ "0.6388296", "0.60572225", "0.59210944", "0.5859892", "0.5793617", "0.5752565", "0.5724272", "0.5576034", "0.55587816", "0.5554607", "0.5536156", "0.5517698", "0.5516917", "0.5501936", "0.54788834", "0.5458865", "0.5438256", "0.5430544", "0.54180187", "0.54093146", "0.5399804...
0.5938492
2
Find out whether the user had been assigned to that task/backlog yet
function IsAssigned(userID, container) { var users = $(".assignee-name-active", container); for (var i = 0; i < users.length; i++) { if ($(users[i]).attr("data-id") == userID) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isReassignedToUser(user) {\n return !!this._reassignees.find((reassignee) => {\n if (reassignee) {\n return String(reassignee._id) === String(user._id);\n }\n return false;\n });\n }", "userExists(user) {\n return this.users.indexOf(user)!==-1;\n }", "function isTaskMember(data...
[ "0.6210521", "0.6111297", "0.6005352", "0.6005352", "0.5939203", "0.59198976", "0.59096545", "0.5870097", "0.5821713", "0.58095515", "0.5807158", "0.58022827", "0.579252", "0.579252", "0.5789638", "0.5775319", "0.57273483", "0.5699601", "0.5681459", "0.5674612", "0.56527376",...
0.58279985
8
When click on active assignee then it's removed
function removeAssignee(obj) { var parent = obj.parentElement; parent.removeChild(obj); assigneeChange = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function action_removeSelectedUserFromCollaboratorList() {\n var parentUl = $('#panel-collaborators').children('ul');\n var users = parentUl.children('li');\n var user = users.get(0);\n\n // Remove selected user from list..\n var collaborator = collaboratorList.find(function(oneInfo) {\n retu...
[ "0.62904376", "0.6275417", "0.60320556", "0.60214543", "0.59846294", "0.5938572", "0.5914852", "0.58764845", "0.5869731", "0.58001095", "0.57855654", "0.578202", "0.57805234", "0.57665503", "0.5750579", "0.5747827", "0.5742825", "0.5738329", "0.57279074", "0.5727378", "0.5721...
0.7318282
0
4. Double click on note to open corresponding window that allow user to edit content
function viewDetailNote(itemID, type) { showProcessingDiaglog(); var windowName = type + "Window"; showWindow(windowName); $("#" + windowName + " .title-bar").html("Edit " + type + " item"); var btnSave = $("#" + windowName + " .btnSave"); $(btnSave).val("Save").attr("onclick", "saveItem(" + itemID + ",'" + type + "')"); $("#" + windowName + " .pageRibbon img").css("display", "block"); //Get all data of that item var getItemData = $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "viewItem", projectID: projectID, itemID: itemID, type: type }, type: "get", success: function (result) { result = result[0]; (type == "backlog") ? displayBacklogDetail(result) : displayTaskDetail(result); $("#taskWindow").attr("data-task-id", itemID); } }); //View all assignee of that item var getAssignee = viewAssignee(itemID, type); assigneeChange = false; // Turn off processing diaglog when everything is loaded $.when(getItemData, getAssignee).done(function () { $(".diaglog.success").fadeOut(100); }); if (type == "backlog") loadTaskBacklogTable(itemID); else { viewTaskComment(itemID); viewTaskFile(itemID); $("#btnSubmitComment").attr("data-task-id", itemID); $("#inputUploadFile").attr("data-task-id", itemID).val(""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickNoteEditor(e){\n self.focus_manager.setFocusObject(self.focus_manager.NOTE_EDITOR);\n }", "function openNotesEditModal(e) {\r\n e.preventDefault();\r\n\r\n dmpNotesModal.style.display = \"block\";\r\n\r\n currentEditDay = e.target.dataset.jsEditNotes;\r\n currentEditDayNumber = parseInt(\r\...
[ "0.7278818", "0.70743775", "0.70162165", "0.70076066", "0.6676049", "0.66381884", "0.6625861", "0.6610706", "0.6598721", "0.650659", "0.64347196", "0.6341878", "0.63015515", "0.6285762", "0.6248542", "0.62225294", "0.6213537", "0.61863786", "0.6168482", "0.6142485", "0.608091...
0.0
-1
4.1.1 Display detail backlog
function displayBacklogDetail(data) { $("#txtSwimlaneID").val(data.Swimlane_ID); $("#txtBacklogTitle").val(data.Title); $("#txtBacklogDescription").val(data.Description); $("#ddlBacklogComplexity").val(data.Complexity); $("#ddlBacklogColor").val(data.Color); $("#txtBacklogStart").val(parseJSONDate(data.Start_date)); $("#txtBacklogComplete").val(parseJSONDate(data.Completion_date)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "viewListInfo(){\n console.log(`${this.listName} List. Due : ${this.listDue}. Complete : ${this.isListComplete}. Number of tasks : ${this.tasks.length}.`);\n }", "function viewBacklogStat(obj, backlog_id) {\n loadBacklogStat(backlog_id);\n var windowHeight = window.innerHeight || document.document...
[ "0.59790605", "0.58100903", "0.5733236", "0.5691956", "0.56819975", "0.5669068", "0.5580382", "0.5574082", "0.55621123", "0.5556848", "0.5545524", "0.5544661", "0.55369496", "0.55143166", "0.5492348", "0.5484436", "0.5472271", "0.54353154", "0.5425193", "0.5423525", "0.542332...
0.5527863
13
4.1.2 Clear backlog window
function clearBacklogWindow() { $("#backlogWindow .inputbox").val(""); $("#backlogWindow textarea").val(""); $("#backlogWindow #ddlBacklogComplexity").val("1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTaskWindow() {\n $(\"#taskWindow .inputbox\").val(\"\");\n $(\"#taskWindow textarea\").val(\"\");\n\n //Update list of current backlog items \n createCurrentBacklogList();\n}", "_clearWorkspaceHistory() {\n const menu = this.getWorkspaceHistoryMenu();\n const items = Array.from(me...
[ "0.7554516", "0.7422298", "0.6753057", "0.6702558", "0.6546479", "0.64707464", "0.64697766", "0.6436075", "0.64114636", "0.63992125", "0.6390531", "0.633781", "0.62762374", "0.62627846", "0.6249001", "0.62298733", "0.62280184", "0.6226121", "0.6222351", "0.6219127", "0.621898...
0.7306537
2
4.2.1 Display detail task
function displayTaskDetail(data) { $("#txtSwimlaneID").val(data.Swimlane_ID); $("#txtTaskTitle").val(data.Title); $("#txtTaskDescription").val(data.Description); $("#ddlTaskBacklog").val(data.Backlog_ID); $("#txtTaskWorkEstimation").val(data.Work_estimation); $("#ddlTaskColor").val(data.Color); $("#txtTaskDueDate").val(parseJSONDate(data.Due_date)); $("#txtTaskCompletionDate").val(parseJSONDate(data.Completion_date)); $("#txtTaskActualWork").val(data.Actual_work); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayTask() {\n if (tasks.length != 0) { \n panel.refreshTask(tasks[0]);\n } else {\n panel.allTasksDone();\n }\n }", "renderSingleTask(task){\n return (\n <div>\n <h1>Task: {task.title}</h1>\n <h4>Completion: ...
[ "0.7119611", "0.70578146", "0.6990345", "0.69752485", "0.69118863", "0.6872202", "0.68403405", "0.6818526", "0.6808154", "0.67562443", "0.675438", "0.6736695", "0.67214113", "0.67079306", "0.6679833", "0.6673038", "0.66635245", "0.6638406", "0.66334677", "0.6610154", "0.66059...
0.58415323
94
4.2.2 Clear task Window
function clearTaskWindow() { $("#taskWindow .inputbox").val(""); $("#taskWindow textarea").val(""); //Update list of current backlog items createCurrentBacklogList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.currentWindow_ = null;\n this.windows_ = [null, null, null, null, null, null, null, null];\n }", "function clearTasks(e) {\n taskList.innerHTML = \"\";\n}", "clearTasks(){\n const taskList = document.getElementById(\"taskList\");\n taskList.innerHTML = '';\n }", "fun...
[ "0.6918268", "0.6796332", "0.679552", "0.67241275", "0.66273195", "0.6602811", "0.6581202", "0.6514634", "0.6514634", "0.64849085", "0.6475176", "0.6455738", "0.6420535", "0.6367857", "0.63284683", "0.6302771", "0.6276151", "0.6261883", "0.62533116", "0.6245836", "0.6234128",...
0.7510166
0
4.3 Working with comments of a task /4.3.1 View all comment of a task
function viewTaskComment(taskID) { $.ajax({ url: "Handler/CommentHandler.ashx", data: { action: "viewTaskComment", projectID: projectID, taskID: taskID }, type: "get", success: function (result) { $("#commentBox .comment-box").remove(); $("#commentBox").prepend(result).perfectScrollbar("update"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printComment() {\r\n fetch('/data').then(response => response.json()).then((comments) => {\r\n const taskListElement = document.getElementById('comment-container');\r\n comments.forEach((comment) => {\r\n taskListElement.appendChild(createCommentElement(comment));\r\n })\r\n });\r\n}", "...
[ "0.7191281", "0.67550445", "0.66969985", "0.662071", "0.65523005", "0.65146136", "0.6450016", "0.63990045", "0.6332451", "0.631382", "0.6296767", "0.62869734", "0.62534964", "0.62425715", "0.62334603", "0.621169", "0.6211091", "0.6186104", "0.61735445", "0.6148036", "0.611923...
0.66106826
4
4.3.2 Delete a comment of a task
function deleteTaskComment(commentID) { $.ajax({ url: "Handler/CommentHandler.ashx", data: { action: "deleteTaskComment", projectID: projectID, userID: userID, commentID: commentID }, type: "get", success: function (message) { if (message == "Success") proxyTC.invoke("deleteComment", commentID); //else window.location.href = "/404/404.html"; } }); var obj = document.getElementById("comment-" + commentID); obj.parentElement.removeChild(obj); // Delete comment in other clients' view var taskID = $("#btnSubmitComment").attr("data-task-id"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_task_comment(commentid) {\n $.get(admin_url + 'tasks/remove_comment/' + commentid, function(response) {\n if (response.success == true) {\n $('[data-commentid=\"' + commentid + '\"]').remove();\n }\n }, 'json');\n}", "delete() {\n $(`comment-${this.config['id...
[ "0.7438841", "0.73568326", "0.72422755", "0.7239542", "0.7224469", "0.71348083", "0.7113656", "0.7088992", "0.70817524", "0.70641255", "0.70193267", "0.6966411", "0.6954185", "0.6862315", "0.6826284", "0.6823246", "0.6823246", "0.6822155", "0.6794935", "0.6788893", "0.6779831...
0.7244381
2
4.3.3 Fetch a comment to input field to edit
function fetchTaskComment(commentID) { var comment = document.getElementById("comment-" + commentID); var content = comment.getElementsByClassName("comment-content")[0].innerHTML; content = content.replace(/<br>/g, '\n'); $("#txtTaskComment").val(content); $("#btnSubmitComment").val("Save").attr("onclick", "updateTaskComment(" + commentID + ")"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadComment(e, object) {\n commentNodeKey = object.part.data.key;\n var node = findNode(commentNodeKey, globalLogicData);\n document.getElementById('NoteOneOnHTML').value = node.notes[0];\n document.getElementById('NoteTwoOnHTML').value = node.notes[1];\n document.getElementById('NoteThreeO...
[ "0.69309795", "0.64649814", "0.6426499", "0.6416816", "0.6342788", "0.63052595", "0.62856", "0.62770134", "0.6273452", "0.62650603", "0.6247182", "0.6209264", "0.616803", "0.6136143", "0.61026686", "0.61004674", "0.6099584", "0.6099584", "0.6099249", "0.60937417", "0.6088907"...
0.69365513
0
4.3.4 Update edited comment
function updateTaskComment(commentID) { var contentText = $("#txtTaskComment").val().replace(new RegExp('\n', 'g'), '<br />'); $.ajax({ url: "Handler/CommentHandler.ashx", data: { action: "updateTaskComment", projectID: projectID, userID: userID, commentID: commentID, content: $("#txtTaskComment").val() }, type: "post", success: function (message) { if (message == "Success") { // Update comment content in other clients' view var taskID = $("#btnSubmitComment").attr("data-task-id"); proxyTC.invoke("updateComment", commentID, contentText); } //else window.location.href = "/404/404.html"; } }); var comment = document.getElementById("comment-" + commentID); var content = comment.getElementsByClassName("comment-content")[0]; content.innerHTML = contentText; $("#txtTaskComment").val(""); $("#btnSubmitComment").val("Send").attr("onclick", "submitTaskComment()"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UpdateComments()\n{\n\tif(NonSpace(Comments.commentsWindow.document.myComments.comments.value) == 0)\n\t{\n\t\tComments.commentsWindow.seaAlert(getSeaPhrase(\"UPDATE_COMMENTS\",\"TE\"))\t\n\t\tComments.commentsWindow.document.myComments.comments.focus();\n\t\treturn;\n \t}\n\tCommentsUpdateFlag = true;\n...
[ "0.7340084", "0.71712327", "0.7027544", "0.6968206", "0.6876442", "0.684947", "0.6804622", "0.6797458", "0.67937386", "0.6770765", "0.6741807", "0.66997117", "0.66450053", "0.66262454", "0.66068184", "0.6536444", "0.6526762", "0.6511199", "0.64759207", "0.64286286", "0.637478...
0.62805945
25
4.3.5 Insert new comment for a task
function submitTaskComment() { var taskID = $("#btnSubmitComment").attr("data-task-id"); var comment = { Task_ID: taskID, Project_ID: projectID, User_ID: userID, Content: $("#txtTaskComment").val() } $.ajax({ url: "Handler/CommentHandler.ashx", data: { action: "insertTaskComment", projectID: projectID, comment: JSON.stringify(comment) }, type: "post", success: function (id) { var content = $("#txtTaskComment").val().replace(new RegExp('\r?\n', 'g'), '<br />'); var objtext = "<div class='comment-box' id='comment-" + id + "'><div class='comment-panel'>" + "<img class='comment-profile' title='" + _name + "' src='" + _avatar + "'></div>" + "<div class='comment-container'><div class='comment-content'>" + content + "</div><div class='comment-footer'>" + "<div class='comment-button' title='Edit comment' onclick='fetchTaskComment(" + id + ")'></div>" + "<div class='comment-button' title='Delete comment' onclick='deleteTaskComment(" + id + ")'></div>" + "</div></div>"; var temp = $(objtext); $(".comment-panel", temp).css({ "float": "right", "margin-right": "10px" }); $("#commentBox").append(temp); $("#commentBox").scrollTop(document.getElementById("commentBox").scrollHeight); $("#txtTaskComment").val(""); // Send objtext to other client who is also viewing the task proxyTC.invoke("sendSubmittedComment", id); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask() {\n Task.addTask(info.newTask);\n info.newTask = \"\";\n }", "function createComment(taskId, comment) {\n\n var createCommentUrl = baseUrl + '/api/call.php?createComment=true';\n $.ajax({\n url: createCommentUrl,\n type: 'POST',\n data: {taskId: taskId, commen...
[ "0.69550216", "0.69503754", "0.6848351", "0.6802735", "0.6740542", "0.6590844", "0.6570688", "0.6483857", "0.64829886", "0.6474756", "0.64699847", "0.6462941", "0.6459354", "0.6449458", "0.6421889", "0.641177", "0.6410343", "0.6400184", "0.6398425", "0.6372534", "0.63489896",...
0.0
-1
5 Save changes of the current item to database
function saveItem(itemID, type) { showProcessingDiaglog(); var item; if (type == "backlog") { item = new Backlog() item.Backlog_ID = itemID; } else { item = new Task(); item.Task_ID = itemID; document.getElementById(type + "." + itemID).setAttribute("data-backlog-id", item.Backlog_ID); } var saveData = $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "updateItem", projectID: projectID, type: type, item: JSON.stringify(item) }, type: "post", success: function (result) { updateVisualNote(type + "." + itemID, item.Title, item.Color); // Update note in other clients proxyNote.invoke("updateNote", type + "." + itemID, item.Title, item.Color); } }); var saveAssignee = (assigneeChange == true) ? updateAssignee(itemID, type) : null; // Turn off processing window and display success message // Send new info to other clients $.when(saveData, saveAssignee).done(function () { showSuccessDiaglog(1); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "saveItem() {\n\n }", "save () { if (this.name) saveValue(this.name, this.items); }", "function handleSave(){\n props.onAdd(qItems);\n props.toggle(); \n }", "function saveNewActivity(item){\n\tupdateStorage();\n\t\n}", "saveItem() {\n let description = this.view.getDescrip...
[ "0.7051083", "0.7038679", "0.6766112", "0.67034066", "0.66092217", "0.6582681", "0.6578951", "0.65764296", "0.65497357", "0.65450376", "0.64474225", "0.64142805", "0.639077", "0.6371299", "0.632835", "0.62920237", "0.6284819", "0.6284182", "0.626429", "0.6235811", "0.623542",...
0.608797
36
6. Delete an item
function deleteItem(itemID, type) { // Delete object on the board var id = type + "." + itemID; var note = document.getElementById(id); note.parentElement.removeChild(note); // Remove all task belongs to the backlog if the backlog is deleted if (type.toLowerCase() == "backlog") { $(".note[data-backlog-id='" + itemID + "']").remove(); } $.ajax({ url: "Handler/ItemHandler.ashx", data: { action: "deleteItem", projectID: projectID, itemID: itemID, type: type }, type: "get", success: function () { // Delete in other clients proxyNote.invoke("deleteNote", id); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(item) {\n this.sendAction('delete', item);\n }", "function deleteItem(id) {\n executeHTTPRequest(id, 'DELETE', '/remove')\n}", "function deleteItem(){\r\n// todo\r\n var id = readNonEmptyString('please type the id of the item you wish to delete :');\r\n if (!isNaN(id)){\r\n va...
[ "0.80949414", "0.78749835", "0.7858624", "0.7824545", "0.77550584", "0.7701483", "0.76594424", "0.7654974", "0.76451075", "0.74350905", "0.73780966", "0.73606753", "0.73392266", "0.7338457", "0.7333247", "0.7333247", "0.7323346", "0.7309586", "0.7301506", "0.7289842", "0.7285...
0.7025173
46
7.1 Creat a drop down list contains all current backlog items
function createCurrentBacklogList() { var note = $(".note[data-type='1']"); var backloglist = document.getElementById("ddlTaskBacklog"); backloglist.innerHTML = ""; for (var i = 0; i < note.length; i++) { var id = note[i].getAttribute("data-id"); var content = note[i].getElementsByClassName("item-id")[0].innerHTML + " - " + note[i].getElementsByClassName("note-content")[0].innerHTML; backloglist.innerHTML += "<option value='" + id + "'>" + content + "</option>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDropDown(){\r\r\n\t\tvar $form = $(\"div#country-select form\");\r\r\n\t\t$form.hide();\r\r\n\t\tvar source = $(\"#country-options\");\r\r\n\t\tsource.removeAttr(\"autocomplete\");\r\r\n\t\tvar selected = source.find(\"option:selected\");\r\r\n\t\tvar options = $(\"option\", source);\r\r\n\t\t$(\"#c...
[ "0.6476073", "0.64178586", "0.6254095", "0.6252242", "0.622689", "0.62162066", "0.6203382", "0.61827856", "0.6146788", "0.6141174", "0.6129664", "0.612121", "0.6119396", "0.6118645", "0.6103293", "0.6092743", "0.60810244", "0.6053637", "0.60446566", "0.60372585", "0.6032357",...
0.7078872
0
8.1.a Parse multiple file name to box
function getChosenFileName(obj) { var files = obj.files; var result = ""; for (var i = 0; i < files.length - 1; i++) { result += files[i].name + ", "; } result += files[files.length - 1].name; $('#inputFileName').html(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySingleSelection(fileName) {\n var baseName = fileName.replace(/^.*[\\/\\\\]/, \"\");\n $(\".upload-filelist\").empty();\n $(\".upload-filelist\").append($(\"<li/>\").text(baseName));\n }", "function displayMultiSelection(files) {\n $(\".upload-filelist\").empty();\n...
[ "0.647903", "0.64185923", "0.62879366", "0.6222925", "0.6053606", "0.58754516", "0.57948464", "0.5792349", "0.5790606", "0.57783407", "0.5767001", "0.5742084", "0.5711663", "0.56767946", "0.56767946", "0.5672762", "0.5619721", "0.56196624", "0.5613642", "0.55831766", "0.55778...
0.6042653
5
8.1.b Calculate total size of all uploading files
function getTotalSize(files) { totalSize = 0; for (var i = 0; i < files.length; i++) { totalSize += files[i].size; } return totalSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fileSize () {\n if (this.isDirectory()) {\n // dirs don't have file size\n return 0\n }\n\n let sum = 0\n this.blockSizes.forEach((size) => {\n sum += size\n })\n\n if (this.data) {\n sum += this.data.length\n }\n\n return sum\n }", "function getTotalSizeListFileUploa...
[ "0.78138244", "0.7644598", "0.7636424", "0.73287475", "0.7004123", "0.6899991", "0.68362665", "0.682034", "0.6704156", "0.66675574", "0.66561043", "0.6584284", "0.6517932", "0.6506601", "0.64755785", "0.6474325", "0.64623153", "0.63962024", "0.6386899", "0.63282603", "0.63141...
0.8061773
0
8.2.2 Upload file at [index] of input file list
function uploadFile(i, taskID) { var file = files[i]; var req = new XMLHttpRequest(); var url = "Handler/FileHandler.ashx?action=uploadFile&fileType=" + file.type + "&taskID=" + taskID + "&projectID=" + projectID; var form = new FormData(); form.append(file.name, file); req.upload.addEventListener("progress", function (e) { //Tracking progress here var done = e.position || e.loaded; var tempProgress = Math.round(((tempSize + done) / totalSize) * 100); if (progress < tempProgress) { progress = tempProgress; document.getElementById("uploadProgress").style.width = progress + "%"; } }); req.onreadystatechange = function () { if (req.readyState == 4 && req.status == 200) { // Upload completed document.getElementById("fileList").innerHTML += req.responseText; // Send the visual to other clients proxyTC.invoke("sendUploadedFile", taskID, req.responseText); // If the queue still has files left then upload them if (i < files.length - 1) { tempSize += file.size; uploadFile(i + 1, taskID); } // Otherwise reset back to original state else { document.getElementById("uploadProgressContainer").style.opacity = 0; document.getElementById("uploadProgress").style.width = 0; document.getElementById("inputFileName").innerHTML = ""; document.getElementById("inputUploadFile").value = ""; } } } req.open('post', url, true); req.send(form); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload() {\n fileCount = 0;\n for (var i in fileList) fileCount++;\n\n if (fileList != null) {\n //uploader.setSimUploadLimit(((fileCount > simultaneousUploads) ? simultaneousUploads : fileCount));\n uploader.uploadAll(\"/entry/uploadimage\", \"POST\", { }, \"upload\");\n }\n}",...
[ "0.71611416", "0.66796345", "0.664612", "0.6566898", "0.65623945", "0.64958286", "0.64757067", "0.6433512", "0.6428971", "0.637059", "0.6349551", "0.6309306", "0.6307695", "0.6294705", "0.62944645", "0.6279432", "0.62630254", "0.6241155", "0.623222", "0.62291485", "0.62251526...
0.58985823
57
8.3 Get all upload files
function viewTaskFile(taskID) { $.ajax({ url: "Handler/FileHandler.ashx", data: { action: "viewTaskFile", projectID: projectID, taskID: taskID }, type: "get", success: function (result) { $("#fileList .file-container").remove(); $("#fileList").prepend(result).perfectScrollbar("update"); $("#fileList .file-container").on("mouseover", function () { this.getElementsByClassName("file-remove")[0].style.display = "block"; }); $("#fileList .file-container").on("mouseout", function () { this.getElementsByClassName("file-remove")[0].style.display = "none"; }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFiles() {\n let files = this.state.cursor().get( 'files' )\n return files\n ? files.toList()\n : null\n }", "function getFileEls() {\n return document.getElementById(\"files\").getElementsByClassName(\"file\");\n }", "getUploadingFiles() {\n const uploadingFiles...
[ "0.73238146", "0.71083057", "0.7076285", "0.70759183", "0.70224124", "0.69428015", "0.69274855", "0.6878159", "0.6834539", "0.6770454", "0.66999525", "0.6644814", "0.65919787", "0.65680504", "0.65636045", "0.65046984", "0.64798015", "0.64699894", "0.6451128", "0.64180076", "0...
0.0
-1
8.4 Delete an attached file of task
function deleteFile(fileID) { $("#fileList div[data-id='" + fileID + "']").remove(); // Remove visual of the file in other clients var taskID = $("#btnSubmitComment").attr("data-task-id"); $.ajax({ url: "Handler/FileHandler.ashx", data: { action: "deleteTaskFile", projectID: projectID, taskID: taskID, fileID: fileID }, type: "get", success: function () { proxyTC.invoke("deleteFile", taskID, fileID) } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteFile(url){\n const file = url.split(env.files.uploadsUrl)[1]\n if(file != 'system/default.png'){\n fs.unlinkSync(env.files.uploadsPath+file)\n }\n }", "function deleteFile(id) {\n chrome.runtime.sendMessage({\n type: \"remove\",\n id: id\n });\n}", ...
[ "0.6843831", "0.6843501", "0.681999", "0.67326766", "0.6671565", "0.66081214", "0.6574406", "0.6566185", "0.654979", "0.6544947", "0.6474733", "0.6469235", "0.64445204", "0.64324", "0.64283407", "0.6414865", "0.6414331", "0.64063966", "0.6403424", "0.6388639", "0.63740945", ...
0.68062735
3
9.1 Open Chart Window
function showChartWindow() { fetchPieChartData(); fetchBarChartData(); fetchBurnUpData(); fetchBurnDownData(); fetchTeamEstimationFactor(); $("#chartWindow .date").val(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openFigure(URL){\r\nFigureWin=window.open(URL,\"FigureWin\",\"width=650, height=500, scrollbars=yes, left=100, x=100, top=100, y=100\")\r\n}", "function goToChart() {\n}", "function showChart(link) {\n\t//console.log('showing chart');\n\tvar el = document.getElementById(\"overlay\");\n\tvar oc = docum...
[ "0.6947339", "0.6877813", "0.67845726", "0.65838784", "0.650805", "0.6298128", "0.62167907", "0.61459684", "0.60698706", "0.6022724", "0.6014794", "0.59436184", "0.5916562", "0.5916562", "0.58974165", "0.5890953", "0.57989943", "0.5766126", "0.57641804", "0.5756842", "0.57529...
0.67064196
3
9.2 Load pie chart data
function fetchPieChartData() { var chartPie = document.getElementById("chartPie"); var spinner = loadChartSpinner(chartPie); var ctx = chartPie.getContext("2d"); $.ajax({ url: "Handler/ChartHandler.ashx", data: { action: "getPieChart", projectID: projectID }, type: "get", success: function (pieChartData) { unloadChartSpinner(chartPie); if (myPie != null) myPie.destroy(); myPie = new Chart(ctx).Pie(pieChartData); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loaded(){\n graph([]);\n pieChart([],[],[],[]);\n}", "fetchPieChartData(){\n this.borderColors = [\"#D98880\", \"#F1948A\", \"#C39BD3\", \"#BB8FCE\", \"#7FB3D5\", \"#85C1E9\",\"#76D7C4\", \"#73C6B6\", \"#7DCEA0\", \"#82E0AA\", \"#F7DC6F\", \"#F8C471\", \"#F0B27A\", \"#E59866\", \"#BFC9CA\", \"#...
[ "0.752212", "0.6861621", "0.6758829", "0.6727035", "0.67219824", "0.66545296", "0.6636456", "0.6619609", "0.658964", "0.65723866", "0.6554791", "0.6546979", "0.654425", "0.6514769", "0.65050113", "0.65006304", "0.6485342", "0.6479401", "0.6467779", "0.6460191", "0.64478403", ...
0.6708193
5
9.3 Load bar chart data
function fetchBarChartData() { var chartBar = document.getElementById("chartBar"); var spinner = loadChartSpinner(chartBar); var ctx = chartBar.getContext("2d"); $.ajax({ url: "Handler/ChartHandler.ashx", data: { action: "getBarChart", projectID: projectID }, type: "get", success: function (barChartData) { unloadChartSpinner(chartBar); if (myBarChart != null) myBarChart.destroy(); myBarChart = new Chart(ctx).Bar(barChartData, { scaleFontColor: "#FFFFFF", scaleGridLineColor: "rgba(128, 128, 128, 0.2)" }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "plotBarChart(data) {\n this.graph.xAxis('Story')\n .yAxis('Memory used (MiB)')\n .title('Labels')\n .setData(data, story => app.$emit('bar_clicked', story))\n .plotBar();\n }", "function bar_load() {\n var barctx = document.getElementById(\"MyBar\").getContext('2d')...
[ "0.73058486", "0.71664417", "0.7101166", "0.7068576", "0.69476175", "0.69210225", "0.69209266", "0.68971354", "0.6826787", "0.67821884", "0.67726314", "0.676879", "0.67490935", "0.67178905", "0.67090213", "0.6681802", "0.6677203", "0.6635003", "0.66071606", "0.65987456", "0.6...
0.7178016
1
9.4 Load burn up chart data
function fetchBurnUpData() { var burnupChart = document.getElementById("burnupChart"); loadChartSpinner(burnupChart); var ctx = burnupChart.getContext("2d"); $.ajax({ url: "Handler/ChartHandler.ashx", data: { action: "getBurnUpChart", projectID: projectID }, type: "get", success: function (lineGraphData) { unloadChartSpinner(burnupChart); burnupData = lineGraphData; if (myBurnUp != null) myBurnUp.destroy(); myBurnUp = drawLineGraph(ctx, lineGraphData); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadChartData() {\n chart.showLoading();\n $timeout(function() {\n var testData = {\n evaporation: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],\n precipitation: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, ...
[ "0.710362", "0.7040278", "0.7022284", "0.6698567", "0.66294026", "0.65622205", "0.6549584", "0.653829", "0.65047497", "0.6499403", "0.64852667", "0.6442438", "0.6432319", "0.64231175", "0.63854575", "0.6382302", "0.6319986", "0.6319013", "0.6318468", "0.62968963", "0.6284314"...
0.66580814
4
9.5 Load burn down chart data
function fetchBurnDownData() { var burndownChart = document.getElementById("burndownChart"); loadChartSpinner(burndownChart); var ctx = burndownChart.getContext("2d"); $.ajax({ url: "Handler/ChartHandler.ashx", data: { action: "getBurnDownChart", projectID: projectID }, type: "get", success: function (lineGraphData) { unloadChartSpinner(burndownChart); burndownData = lineGraphData; if (myBurnDown != null) myBurnDown.destroy(); myBurnDown = drawLineGraph(ctx, lineGraphData); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchBurnUpData() {\n var burnupChart = document.getElementById(\"burnupChart\");\n loadChartSpinner(burnupChart);\n var ctx = burnupChart.getContext(\"2d\");\n $.ajax({\n url: \"Handler/ChartHandler.ashx\",\n data: {\n action: \"getBurnUpChart\",\n projectI...
[ "0.6884012", "0.6818953", "0.6683677", "0.66165423", "0.65482855", "0.648203", "0.637197", "0.6369146", "0.63363445", "0.6330913", "0.63003737", "0.6256476", "0.62521374", "0.62025636", "0.6123589", "0.6120361", "0.61139137", "0.61080897", "0.6090078", "0.6082938", "0.6082218...
0.69114065
0
9.6 Team estimation factor
function fetchTeamEstimationFactor() { // Waiting While fetching data var interval = setInterval(function () { var fake = Math.round(Math.random() * 100) - 50; gauge.refresh(fake); }, 250); // Fetching data $.ajax({ url: "Handler/ChartHandler.ashx", data: { action: "getEstimationFactor", projectID: projectID }, type: "get", success: function (result) { clearInterval(interval); var data = result.split("$"); var factor = (data[0] >= data[1]) ? 1 - (data[0] / data[1]) : (data[1] / data[0]) - 1; if (!isNaN(factor)) { factor = Math.round(factor * 100); gauge.refresh(factor); } else gauge.refresh(0); $("#txtGaugeEst").text(data[0]); $("#txtGaugeAct").text(data[1]); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "oblivionFactor() {\n return Math.pow(2, - this.timestep / this.HALFTIME);\n }", "function forAllTeams(v, k, m) {\n m.get(k).set(\"Win Percentage\", (m.get(k).get(\"Wins\")+(m.get(k).get(\"Ties\") * 0.5))/m.get(k).get(\"Games played\"));\n }", "lifeExpectancyJupiter() {\n let jovianLifeExpectan...
[ "0.6005619", "0.5901507", "0.5899868", "0.57967186", "0.5788022", "0.5785989", "0.5779226", "0.5774965", "0.57614434", "0.57535344", "0.57474524", "0.57431597", "0.56946504", "0.567582", "0.567207", "0.5639278", "0.5608716", "0.5588268", "0.556102", "0.55601734", "0.55451614"...
0.0
-1