query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Enter a parse tree produced by MmParserparagraphLeftMarginValue.
enterParagraphLeftMarginValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraphRightMarginValue(ctx) {\n\t}", "getLineStartLeft(widget) {\n let left = widget.paragraph.x;\n let paragraphFormat = widget.paragraph.paragraphFormat;\n if (this.isParagraphFirstLine(widget) && !paragraphFormat.bidi) {\n left += HelperMethods.convertPointToPixel(parag...
[ "0.6190543", "0.61410105", "0.6110401", "0.5924359", "0.5891392", "0.5770887", "0.5635743", "0.5564808", "0.5564808", "0.55141985", "0.55141985", "0.54764116", "0.54430115", "0.54225004", "0.54225004", "0.54225004", "0.5413774", "0.5378361", "0.53539515", "0.53405905", "0.531...
0.7893713
0
Exit a parse tree produced by MmParserparagraphLeftMarginValue.
exitParagraphLeftMarginValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraphLeftMarginValue(ctx) {\n\t}", "enterParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphRightMarginValue(ctx) {\n\t}", "function goLeft() {\n leftMargin = $(\".inner-liner\").css(\"margin-left\").replace(\"px\", \"\") * 1;\n newLeftMargin = (leftMargin + 650);\n $(\".inne...
[ "0.732358", "0.6279431", "0.60713637", "0.5734169", "0.56208414", "0.54983354", "0.54013634", "0.5398322", "0.539773", "0.53922105", "0.53922105", "0.5366215", "0.5366215", "0.5366215", "0.5339542", "0.5339542", "0.52322507", "0.5231755", "0.5176058", "0.5145627", "0.51066434...
0.77305937
0
Enter a parse tree produced by MmParserparagraphRightMarginValue.
enterParagraphRightMarginValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphLeftMarginValue(ctx) {\n\t}", "enterParagraphLeftMarginValue(ctx) {\n\t}", "set rightMargin(value) {\n this.rightMarginIn = value;\n this.notifyPropertyChanged('rightMargin');\n }", "set rightMargin(value) {\n if (value === t...
[ "0.6652303", "0.57765603", "0.56153345", "0.5549584", "0.53868115", "0.53868115", "0.52143264", "0.51520926", "0.51520926", "0.51520926", "0.51328284", "0.5122781", "0.50877476", "0.50581425", "0.4983599", "0.4951621", "0.49231225", "0.49229887", "0.49163902", "0.4837947", "0...
0.7479592
0
Exit a parse tree produced by MmParserparagraphRightMarginValue.
exitParagraphRightMarginValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphLeftMarginValue(ctx) {\n\t}", "exitParagraphAlignValue(ctx) {\n\t}", "exitParagraphValue(ctx) {\n\t}", "exitParagraphMaxWidthValue(ctx) {\n\t}", "function goRight() {\n leftMargin = $(\".inner-liner\").css(\"margin-left\").replace(\"px\", ...
[ "0.6868799", "0.6687583", "0.6091496", "0.57694733", "0.56102", "0.5582106", "0.54940057", "0.54940057", "0.5481234", "0.5481234", "0.5481234", "0.53742445", "0.53221697", "0.53221697", "0.53221697", "0.53221697", "0.52199996", "0.52199996", "0.52199996", "0.52199996", "0.521...
0.80962867
0
Enter a parse tree produced by MmParserparagraphMaxWidthValue.
enterParagraphMaxWidthValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParagraphMaxWidthValue(ctx) {\n\t}", "enterParagraphLeftMarginValue(ctx) {\n\t}", "enterParagraphRightMarginValue(ctx) {\n\t}", "set maxWidth(value) {}", "enterParagraphValue(ctx) {\n\t}", "enterParagraphAlignValue(ctx) {\n\t}", "function userInputForTree() {\n var rows = heightVal.value;\n var w...
[ "0.5963386", "0.5438351", "0.5356726", "0.52290887", "0.51634943", "0.5051618", "0.5050161", "0.4897857", "0.48649642", "0.48432773", "0.47885522", "0.47798255", "0.47665635", "0.47193354", "0.46162313", "0.46158314", "0.46054646", "0.45976034", "0.45870605", "0.45854148", "0...
0.7367413
0
Exit a parse tree produced by MmParserparagraphMaxWidthValue.
exitParagraphMaxWidthValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraphMaxWidthValue(ctx) {\n\t}", "exitParagraphLeftMarginValue(ctx) {\n\t}", "exitParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphAlignValue(ctx) {\n\t}", "exitParagraphValue(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "exitParagraphParameters(ctx) {\n\t}", "exitParagraph(ctx) ...
[ "0.67150354", "0.64033514", "0.6403222", "0.6115422", "0.61061937", "0.5500996", "0.5490033", "0.5483737", "0.51556456", "0.50646156", "0.49891305", "0.48165676", "0.47926274", "0.47189552", "0.46795338", "0.46582192", "0.46183002", "0.46172655", "0.46039987", "0.45787904", "...
0.7806197
0
Enter a parse tree produced by MmParserparagraphCaseValue.
enterParagraphCaseValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraphValue(ctx) {\n\t}", "enterParagraph(ctx) {\n\t}", "enterParagraphAlignValue(ctx) {\n\t}", "enterParagraphParameter(ctx) {\n\t}", "enterParagraphCommand(ctx) {\n\t}", "enterParagraphLeftMarginValue(ctx) {\n\t}", "enterParagraphParameters(ctx) {\n\t}", "enterParagraphRightMarginValue(ctx)...
[ "0.65999144", "0.57033306", "0.5528822", "0.54856426", "0.5381263", "0.53601515", "0.5237473", "0.49859095", "0.48898882", "0.48702365", "0.47621652", "0.46285552", "0.4602373", "0.46014532", "0.46006945", "0.45932275", "0.45804673", "0.45652983", "0.45461747", "0.45341843", ...
0.66400504
0
Exit a parse tree produced by MmParserparagraphCaseValue.
exitParagraphCaseValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParagraphValue(ctx) {\n\t}", "exitParagraphAlignValue(ctx) {\n\t}", "exitParagraph(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "exitParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphCommand(ctx) {\n\t}", "exitParagraphLeftMarginValue(ctx) {\n\t}", "exitParagraphParameters(ctx) {\n\t}"...
[ "0.7015481", "0.62367696", "0.6177356", "0.61354065", "0.58430666", "0.58016485", "0.5796938", "0.5760324", "0.5493591", "0.537195", "0.5166411", "0.5120816", "0.5101688", "0.50855", "0.5083728", "0.50602674", "0.502917", "0.5000667", "0.49971128", "0.49917433", "0.49708834",...
0.75239295
0
Enter a parse tree produced by MmParserparagraphValue.
enterParagraphValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParagraph(ctx) {\n\t}", "enterParagraphParameter(ctx) {\n\t}", "enterParagraphAlignValue(ctx) {\n\t}", "enterParagraphCommand(ctx) {\n\t}", "enterParagraphParameters(ctx) {\n\t}", "function splitToInsertParagraph(editor) {\n var _a;\n // If there is an empty text selected, we need to move the ...
[ "0.5992149", "0.5763659", "0.5683291", "0.5669882", "0.5607157", "0.5572748", "0.5420736", "0.50966334", "0.5021291", "0.5002208", "0.49775186", "0.49349248", "0.49033162", "0.49033162", "0.49033162", "0.49033162", "0.49033162", "0.49033162", "0.48889583", "0.48767874", "0.48...
0.6730196
0
Exit a parse tree produced by MmParserparagraphValue.
exitParagraphValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParagraph(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "exitParagraphAlignValue(ctx) {\n\t}", "exitParagraphCaseValue(ctx) {\n\t}", "exitParagraphParameters(ctx) {\n\t}", "exitParagraphCommand(ctx) {\n\t}", "exitParagraphRightMarginValue(ctx) {\n\t}", "exitParagraphLeftMarginValue(ctx) {\n...
[ "0.6466476", "0.6418617", "0.6405345", "0.61938345", "0.61698794", "0.6111827", "0.5955102", "0.5894943", "0.5611701", "0.5482526", "0.53215617", "0.5307023", "0.52999014", "0.52486444", "0.5222208", "0.5192277", "0.5132178", "0.5132178", "0.5132178", "0.5132178", "0.5132178"...
0.7250543
0
Exit a parse tree produced by MmParsercallValues.
exitCallValues(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitCallValue(ctx) {\n\t}", "'CallExpression:exit'(node) {\n if ((0, _utils.isExpectCall)(node) && node.parent.type === _experimentalUtils.AST_NODE_TYPES.ExpressionStatement) {\n context.report({\n messageId: 'noAssertions',\n node\n });\n }\n }", "\"C...
[ "0.6116438", "0.56198597", "0.5598746", "0.5522511", "0.55173594", "0.55057746", "0.54837984", "0.5446403", "0.5443421", "0.5428791", "0.5399705", "0.53712654", "0.5355477", "0.53429013", "0.5334643", "0.531081", "0.5288911", "0.52710956", "0.5246158", "0.5227843", "0.5194775...
0.61524296
0
Enter a parse tree produced by MmParsercallValue.
enterCallValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse_Expr() {\n tree.addNode('Expr', 'branch');\n if (foundTokensCopy[parseCounter][1] == \"digit\") {\n console.log('its a gooda digit');\n parse_IntExpr();\n //tree.endChildren();\n\n\n } else if (foundTokensCopy[parseCounter][0] == '\"') {\n parse_StringExpr();\n ...
[ "0.5567092", "0.5316813", "0.52273214", "0.51734483", "0.5173335", "0.5130984", "0.5122577", "0.5105345", "0.5080699", "0.5061831", "0.5051391", "0.50413305", "0.5028346", "0.5003524", "0.499982", "0.4977168", "0.49562407", "0.4938376", "0.49156618", "0.48654485", "0.48606402...
0.58461386
0
Exit a parse tree produced by MmParsercallValue.
exitCallValue(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'CallExpression:exit'(node) {\n if ((0, _utils.isExpectCall)(node) && node.parent.type === _experimentalUtils.AST_NODE_TYPES.ExpressionStatement) {\n context.report({\n messageId: 'noAssertions',\n node\n });\n }\n }", "exitCallValues(ctx) {\n\t}", "\"...
[ "0.5785486", "0.57098025", "0.56650835", "0.5660436", "0.558487", "0.55117685", "0.5449061", "0.5440239", "0.54058754", "0.53302205", "0.5321798", "0.5287424", "0.5273135", "0.523451", "0.5211181", "0.51695573", "0.51657045", "0.5153018", "0.5118264", "0.51172125", "0.5109159...
0.62186533
0
Enter a parse tree produced by MmParsercallParameter.
enterCallParameter(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParameterMember(ctx) {\n\t}", "compile_token(token) {\n switch(token.type) {\n case 'W':\n let entry = this.find_entry(token.value)\n if (!entry) {\n this.handle_error(\"Unknown entry: \" + token.value)\n return\n ...
[ "0.5318287", "0.5289008", "0.5251292", "0.5251292", "0.51307106", "0.50681746", "0.50599146", "0.5045047", "0.5045047", "0.5032344", "0.5018188", "0.501127", "0.500883", "0.5003857", "0.50000036", "0.49743542", "0.49552682", "0.49525252", "0.4944334", "0.49276763", "0.491736"...
0.55986154
0
Exit a parse tree produced by MmParsercallParameter.
exitCallParameter(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParameterMember(ctx) {\n\t}", "exitGroupParameter(ctx) {\n\t}", "exitParameterMembers(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "exitCallParameters(ctx) {\n\t}", "exitGroupParameters(ctx) {\n\t}", "function closeParams() {\n nesting_level--;\n }", "function closeParams() {\n nest...
[ "0.6457519", "0.6122975", "0.5941229", "0.5831425", "0.57432884", "0.5542854", "0.5485119", "0.5485119", "0.5469588", "0.5436106", "0.5405293", "0.5371515", "0.53616786", "0.53444433", "0.52705425", "0.52705425", "0.5196356", "0.51454794", "0.51372236", "0.51370806", "0.51150...
0.6338657
1
Enter a parse tree produced by MmParsercallParameterName.
enterCallParameterName(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterCallParameter(ctx) {\n\t}", "enterCallCommand(ctx) {\n\t}", "function parseCall(tokens) {\n\n var identifier = tokens.eat(); // Consume name\n tokens.eat(\"(\"); // Consume left paren\n // Consume arguments\n var args = [];\n while (!tokens.nextIs(\")\")) {\n args.push(tokens.eat());...
[ "0.55750304", "0.54329324", "0.53221774", "0.52889115", "0.52805674", "0.52754813", "0.5252538", "0.5174846", "0.5130137", "0.50380766", "0.5000923", "0.5000923", "0.50006586", "0.49941403", "0.4977363", "0.49656233", "0.49517256", "0.49490726", "0.49244267", "0.48747465", "0...
0.61775225
0
Exit a parse tree produced by MmParsercallParameterName.
exitCallParameterName(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParameterMember(ctx) {\n\t}", "exitCallParameter(ctx) {\n\t}", "exitGroupParameter(ctx) {\n\t}", "exitDotted_name(ctx) {\n\t}", "exitCallCommand(ctx) {\n\t}", "exitParameterMembers(ctx) {\n\t}", "exitCallParameters(ctx) {\n\t}", "exitGroupParameters(ctx) {\n\t}", "exitGroupMember(ctx) {\n\t}", ...
[ "0.59837615", "0.59020954", "0.5763554", "0.5667164", "0.552034", "0.5477102", "0.5437001", "0.52640605", "0.5206232", "0.52041996", "0.5182381", "0.5167001", "0.51487255", "0.5145599", "0.5102021", "0.5091365", "0.5087521", "0.5086629", "0.50581294", "0.5041324", "0.5041324"...
0.6527983
0
Enter a parse tree produced by MmParserparameterMembers.
enterParameterMembers(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParameterMember(ctx) {\n\t}", "function openParams() {\n nesting_level++;\n }", "function openParams() {\n nesting_level++;\n }", "function expandParseArguments(parseFn, self) {\n var arglist = self.parseParams;\n\n if (!arglist || arglist.length === 0) {\n parseFn = parseFn.replace...
[ "0.6045764", "0.5499774", "0.5499774", "0.547324", "0.5467138", "0.5336254", "0.52938914", "0.52132434", "0.5181076", "0.51558155", "0.5146297", "0.5136685", "0.5136685", "0.50430703", "0.5019983", "0.4977216", "0.4892725", "0.47472167", "0.47289762", "0.46974567", "0.4681381...
0.6095849
0
Exit a parse tree produced by MmParserparameterMembers.
exitParameterMembers(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParameterMember(ctx) {\n\t}", "exitGroupParameter(ctx) {\n\t}", "exitGroupParameters(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "function closeParams() {\n nesting_level--;\n }", "function closeParams() {\n nesting_level--;\n }", "exitParagraphParameters(ctx) {\n\t}", "exitGroupM...
[ "0.6856901", "0.5972344", "0.5732789", "0.57165056", "0.56441516", "0.56441516", "0.5640223", "0.55559903", "0.54420435", "0.5426414", "0.5295447", "0.5201493", "0.5201493", "0.51273835", "0.50572073", "0.50165576", "0.50065297", "0.4940946", "0.49239442", "0.49064013", "0.48...
0.69311833
0
Enter a parse tree produced by MmParserparameterMember.
enterParameterMember(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterParameterMembers(ctx) {\n\t}", "compile_token(token) {\n switch(token.type) {\n case 'W':\n let entry = this.find_entry(token.value)\n if (!entry) {\n this.handle_error(\"Unknown entry: \" + token.value)\n return\n ...
[ "0.5840433", "0.5525739", "0.54928744", "0.53840894", "0.52843493", "0.52780443", "0.526467", "0.526467", "0.521462", "0.51962584", "0.5057247", "0.49486718", "0.49486718", "0.49334615", "0.48774436", "0.4862102", "0.47747087", "0.47562686", "0.47224665", "0.4718575", "0.4715...
0.62734085
0
Exit a parse tree produced by MmParserparameterMember.
exitParameterMember(ctx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitParameterMembers(ctx) {\n\t}", "exitGroupParameter(ctx) {\n\t}", "exitParagraphParameter(ctx) {\n\t}", "exitParagraphParameters(ctx) {\n\t}", "exitGroupParameters(ctx) {\n\t}", "exitCallParameter(ctx) {\n\t}", "exitGroupMember(ctx) {\n\t}", "function closeParams() {\n nesting_level--;\n }", ...
[ "0.6668909", "0.60440403", "0.6032804", "0.5627697", "0.5560602", "0.5544509", "0.5530295", "0.5529941", "0.5529941", "0.5296802", "0.5265043", "0.51616496", "0.51616496", "0.5158321", "0.5057766", "0.50464267", "0.497489", "0.4958863", "0.4948785", "0.49361894", "0.49355707"...
0.7139286
0
write a function for box5 called clearFinished that will remove all the chores in the list that have the class "done".
function clearFinished () { var listItems = document.querySelectorAll('#box5 ul li'); listItems.forEach(v => { if (v.classList.contains('done')) v.style.display = "none"; }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearDoneTasks() {\r\n\tvar doneTasks = document.getElementsByClassName('done');\r\n\tfor(var i=doneTasks.length-1; i >= 0; i--) {\r\n\t\tdoneTasks[i].parentNode.removeChild(doneTasks[i]);\r\n\t}\r\n}", "function removeDone(){\n for (let i = 0; i < listItem.children.length; i++) {\n if (listItem.child...
[ "0.6922885", "0.69046104", "0.683985", "0.68138134", "0.6711997", "0.6693523", "0.6652826", "0.66503453", "0.66091454", "0.6525843", "0.6485216", "0.6463824", "0.64619714", "0.63928264", "0.6310667", "0.6283915", "0.62523013", "0.62428856", "0.62302", "0.6174683", "0.615822",...
0.7992926
0
write a function called addChore that adds a new item to the list of chores, giving it the class "undone."
function addChore(str) { var bux5ul = document.querySelector('#box5 ul') var chore = `<li class="chore undone">${str} (undone)</li>`; bux5ul.innerHTML += chore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeChore(newChore) {\n console.log('in makeChore', newChore);\n // ajax call to server to get chore table\n $.ajax({\n type: 'POST',\n url: '/chores',\n data: newChore\n }).then(function (response) {\n console.log('Response from server.', response);\n getChores();\n }).catch(function ...
[ "0.59437215", "0.57150275", "0.5632242", "0.5598726", "0.5520068", "0.55037576", "0.5490793", "0.5477788", "0.54432464", "0.5370065", "0.53456867", "0.5325758", "0.5323169", "0.5292192", "0.5289868", "0.5269661", "0.525779", "0.52499956", "0.5241335", "0.52137", "0.5195041", ...
0.66942656
0
do this task using the .appendChild() or innerHTML reverse the text in box6
function rev6() { var str = document.querySelector('#box6 p').textContent; str = str.split("").reverse().join(""); document.querySelector('#box6 p').textContent = str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertBackwards(str) {\n let backwardsString = str.split(\"\").reverse().join(\"\");\n console.log(\"The user string backwards is: \" + backwardsString);\n var box1El = document.getElementById('box1');\n box1El.innerHTML = backwardsString;\n }", "function flipMe(){\n\n // works simi...
[ "0.61794394", "0.6136488", "0.60889786", "0.6084328", "0.60666186", "0.60340923", "0.59746766", "0.5966881", "0.5952162", "0.5907956", "0.5897025", "0.5865363", "0.5846604", "0.5819487", "0.58018535", "0.57985574", "0.5750555", "0.5749824", "0.5736324", "0.5727554", "0.572239...
0.7159152
0
put tags around the word "keep" in box6s
function ital6s() { var str = document.querySelector('#box6s p').textContent; var arr = str.split(" "); var newArr = arr.map(v => { if (v == "keep") { return `<em>${v}</em>` } else return v; }); str = newArr.join(" "); document.querySelector('#box6s p').innerHTML = str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanExtraTags(id){\r\n\tclearMathJaxRendering(id);\r\n\t//disable highlighted code\r\n\t$('#'+id+' .CodeMirror').remove();\r\n\t$('#'+id+' .deck-codemirror-result').remove();\r\n\t$.each($('#'+id+' .code'),function(index,value){\r\n\t\t$(value).css('display','');\r\n\t\t$(value).removeClass('passive-code...
[ "0.5844164", "0.5526926", "0.54850453", "0.5480107", "0.54298407", "0.5408205", "0.5389794", "0.5356537", "0.53564405", "0.53357553", "0.53129244", "0.5303217", "0.5252032", "0.52310103", "0.522899", "0.5221392", "0.5197526", "0.5189812", "0.5176737", "0.51454383", "0.5137169...
0.6027342
0
Main function to prepare and publish openapi spec to ghpages branch
async function main() { const config = getConfig(); const { distDir, spec, versions, ghPagesConfig } = config; try { prepareDistDir(distDir); copySpecFileToDist(spec); if (spec.isReleaseVersion) { const versionsJson = await fetchVersions(versions.url); const updatedVersionsJson = updateVe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function main() {\n const children = await readdir(apiPath);\n const dirs = children.filter(x => {\n return !x.endsWith('.ts') && !x.includes('compute');\n });\n const contents = nunjucks.render(templatePath, { apis: dirs });\n await writeFile(indexPath, contents);\n const q = new p_...
[ "0.5878678", "0.57260805", "0.56262624", "0.5574827", "0.55623794", "0.5507299", "0.54211247", "0.54025275", "0.5379255", "0.53514284", "0.5334872", "0.53218764", "0.53200996", "0.5295387", "0.5284994", "0.5251893", "0.52339613", "0.52286404", "0.52249795", "0.5205882", "0.51...
0.7725145
0
Publish dist folder to ghpages branch
async function publishToGHPages(distDir, ghPagesConfig) { return new Promise((resolve, reject) => { ghpages.publish(distDir, ghPagesConfig, (err) => { if (err) { reject(err); } resolve(); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deploy() {\n return gulp.src('./public/**/*')\n .pipe($.ghPages());\n}", "function push() {\n\t\tRelease.chdir( Release.dir.dist );\n\n\t\tconsole.log( \"Pushing release to dist repo...\" );\n\t\tRelease.exec( \"git push \" + distRemote + \" master --tags\",\n\t\t\t\"Error pushing master and tags to...
[ "0.7630955", "0.7096719", "0.65212244", "0.6442222", "0.6366749", "0.6348395", "0.63213676", "0.6300824", "0.62760013", "0.61852", "0.61798", "0.61143875", "0.6041013", "0.6028244", "0.59371746", "0.5921917", "0.5910328", "0.5890462", "0.58713585", "0.58687633", "0.58687633",...
0.7702603
0
TODO: refactor to merge this with Roof._makeSlab()
_makeSlab (corners, pose, layer, color, incline = 0, depth = -0.1) { const adjustedCorners = Pose.relocate(pose, corners) const xyPolygon = new Geometry.XYPolygon(adjustedCorners) const abstractThickPolygon = new Geometry.ThickPolygon(xyPolygon, { incline, depth }) const p0 = { ...adjustedCorners[0], z:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(s, colour) {\r\n this.boids = [];\r\n this.colour = colour;\r\n this.colShift = random(0.001, 0.005);\r\n \r\n this.grid = new Grid(width/neighbourRadius, height/neighbourRadius);\r\n \r\n for (let i = 0; i < s; i++) {\r\n let boid = new Boid(this.grid.rows, this.grid.cols);\r...
[ "0.53521067", "0.5308627", "0.53001755", "0.51796126", "0.5141403", "0.51293737", "0.51019496", "0.50768673", "0.50738287", "0.50399923", "0.5027163", "0.50018364", "0.5000189", "0.5000189", "0.5000189", "0.5000189", "0.5000189", "0.5000189", "0.5000189", "0.5000189", "0.5000...
0.5583497
0
Sync service method to create TODO.
function doCreate(datasetId, params, callback, metadata) { var METHOD_NAME = "doCreate(): "; // Insert TODO into ToDo collection. createToDoEndpoint.createToDo(params, function(error, response) { // If failed to create TODO, return failure callback. if (error) { winston.error("Error res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static update(todos) {\n fs.writeFile(p, JSON.stringify(todos), (err) => console.log(err));\n }", "function createTodo(done, text) {\n todos.push({id: nextId, done: done, text: text});\n nextId += 1;\n saveList();\n renderTodos(todos); // signal view(s)\n}", "function createTodo(text){\n \n}", "up...
[ "0.6124553", "0.61156267", "0.608801", "0.60223407", "0.59987515", "0.59949243", "0.59300005", "0.5914866", "0.59103435", "0.5905297", "0.589606", "0.5872861", "0.5870476", "0.5867256", "0.5859954", "0.58515626", "0.58490306", "0.5834442", "0.58225083", "0.58161235", "0.58066...
0.61813974
0
Service for accessing local storage
function LocalStorageService($http, $q){ var data = {}; this.getData = function(dataItemsUrl){ // instantiate promise var deferred = $q.defer(); // access local storage $http.get(dataItemsUrl) .then(function(response){ console.log('Success accessing local storage: ' + dataItemsUrl); defer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StorageService() {\n this.store = window.localStorage;\n }", "function LokiLocalStorageAdapter() {}", "function LokiLocalStorageAdapter() {}", "function LocalStorage()\r\n{\r\n this.getItem = function(key)\r\n {\r\n return storedItems[key];\r\n }\r\n\r\n this.set...
[ "0.78449917", "0.72493625", "0.72493625", "0.7232494", "0.72205126", "0.72096884", "0.7129369", "0.7110711", "0.710552", "0.705486", "0.70375896", "0.6990993", "0.69800836", "0.69774735", "0.69586605", "0.69553494", "0.69440424", "0.69348425", "0.6880112", "0.687966", "0.6874...
0.7285068
1
Create the wechat icon and QRCode.
function createWechat ($container, $data) { var $wechat = $container.find('a.icon-wechat'); $wechat.append('<div class="wechat-qrcode"><h4>'+$data.wechatQrcodeTitle+'</h4><div class="qrcode"></div><div class="help">'+$data.wechatQrcodeHelper+'</div></div>'); $wechat.find('.qrcode')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCreateIcon() { return $('<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg>'); }", "generateAccountInfoQR() {\n // Account info model for QR\n let QR = nem.model.objects.create(\"accountInfoQR\")(this._Walle...
[ "0.63122565", "0.614195", "0.6022381", "0.5953607", "0.5908088", "0.5818485", "0.58040255", "0.57392555", "0.57047784", "0.56911075", "0.56910765", "0.5677682", "0.55637395", "0.55580705", "0.5556079", "0.55458546", "0.5491379", "0.5465075", "0.54458255", "0.54365504", "0.542...
0.7322499
0
smoothly have one value approach another value
function approach(value, valueDest, rate) { if (value < valueDest) { value += Math.abs(value - valueDest) / rate; } else if (value > valueDest) { value -= Math.abs(value - valueDest) / rate; } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valueDistortion(value) {\n return value;\n }", "function getRecommendValue(a, b) {\n let x = a > b ? b : a\n let y = 0\n\n if (x >= 4000) {\n y = x * 0.015\n } else if (x >= 2000) {\n y = x * 0.013\n } else if (x >= 1000) {\n y = x * 0.011\n } else if (x >= 300...
[ "0.6005608", "0.5904132", "0.5872437", "0.5856909", "0.5791042", "0.5771462", "0.5743416", "0.5720196", "0.57195324", "0.5590538", "0.5571959", "0.5534498", "0.55281186", "0.5515298", "0.55111796", "0.5510957", "0.54980105", "0.547577", "0.54713994", "0.5470116", "0.5462835",...
0.59943634
1
Initializes the YouTube player. Sometimes the JavaScript loads before the DOM has the time to finish loading and the YouTube player can't be found. To solve this, this function will try 10 times to find it each try is separated by 1000ms.
function initPlayer(tries) { // If tries was not set, set it to 0. if (tries == undefined) tries = 0; // Try to fetch the YouTube player object. self.player = document.getElementById("movie_player"); // Check if the player element was found & it started playing. try { if (self.player.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialise( width, height, videoId, rfrsh ){\r\n var tag = document.createElement('script');\r\n wdt = width;\r\n hgt = height;\r\n vidid = videoId;\r\n refresh = rfrsh;\r\n \r\n tag.src = \"https://www.youtube.com/iframe_api\";\r\n tag.class =\"container\";\r\n var firstScriptTag = document.getE...
[ "0.65785253", "0.65447867", "0.6509541", "0.6488845", "0.6399587", "0.6395636", "0.6375504", "0.6357863", "0.6350241", "0.63471496", "0.63471496", "0.63471496", "0.63403815", "0.6339012", "0.6315676", "0.6310847", "0.62948793", "0.6283081", "0.6283081", "0.6283081", "0.628308...
0.6685322
0
Updates the local storage to include this player information. This method is recalled every 1000ms to keep the player updated.
function updateStorage() { // Ask the storage for the clients list and the information for this tab. chrome.storage.local.get(["clients", "" + tabId], function(items) { // Add the id for this tab to the clients list. if (items.clients == undefined) items.clients = []; if (items.clients.indexOf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static update(player){\n localStorage.setItem('player',JSON.stringify(player));\n\n }", "function storePlayer() {\n localStorage.setItem(\"player names\", JSON.stringify(playerName));\n localStorage.setItem(\"player scores\", JSON.stringify(hiscoreList));\n}", "function savePlayer() {\n wind...
[ "0.81207645", "0.6980931", "0.6915837", "0.67435205", "0.6720911", "0.66962427", "0.6641197", "0.65974176", "0.6588888", "0.65297353", "0.65293396", "0.6412088", "0.64041775", "0.6273528", "0.6257958", "0.62375987", "0.6153745", "0.615127", "0.61185294", "0.60909307", "0.6088...
0.7220445
1
Load a serialized comment and add comment blocks for it. Args: serializedCommentBlock (object): The serialized data for the new comment block(s).
loadSerializedCommentBlock(serializedCommentBlock) { const parsedData = this.commentBlockModel.prototype.parse( _.pick(serializedCommentBlock[0], this.commentBlockModel.prototype.serializedFields)); this.createCommentBlock(_.extend( { fileAttac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadSerializedCommentBlock(serializedCommentBlock) {\n console.assert(false, 'loadSerializedCommentBlock must be ' +\n 'implemented by a subclass');\n }", "addBlock(newBlock){\n\t\tnewBlock.previousHash = this.latestBlock().hash;\n\t\tnewBlock.index = this.latestBlock().ind...
[ "0.7374099", "0.5489499", "0.54102284", "0.5370356", "0.5345197", "0.5324441", "0.53053546", "0.52905595", "0.5244164", "0.5188594", "0.51785064", "0.51265126", "0.5116279", "0.5115296", "0.511095", "0.50737363", "0.5032369", "0.49737558", "0.4922233", "0.48716256", "0.486865...
0.8373945
0
isSupported.js ============== / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. Dependencies
function isSupported() { return error.isValid(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async isSupported() {\n return new Promise((resolve, reject) => {\n resolve(true);\n });\n }", "function isVendorSupported() {\n return __awaiter(this, void 0, void 0, function* () {\n if (vendorSupport != null) {\n return Promise.resolve(vendorSupport)...
[ "0.77990884", "0.71586466", "0.70868826", "0.7084988", "0.7045174", "0.6919571", "0.6919571", "0.6919571", "0.69141644", "0.69141644", "0.69141644", "0.69141644", "0.69141644", "0.69141644", "0.6899536", "0.688795", "0.6847465", "0.6847465", "0.6841208", "0.68400913", "0.6745...
0.78382576
0
isWebCamGIFSupported.js ======================= / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
function isWebCamGIFSupported() { return error.isValid(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExistingVideoGIFSupported(codecs) {\n var hasValidCodec = false;\n\n if (utils.isArray(codecs) && codecs.length) {\n utils.each(codecs, function (indece, currentCodec) {\n if (utils.isSupported.videoCodecs[currentCodec]) {\n hasValidCodec = true;\n }\n });\n\n ...
[ "0.7112601", "0.62327814", "0.62177813", "0.6003592", "0.5920575", "0.58924", "0.5866748", "0.57574826", "0.57204324", "0.56725305", "0.56662536", "0.5665421", "0.5623531", "0.5580614", "0.5566992", "0.55547786", "0.5552305", "0.5521828", "0.55185914", "0.5511699", "0.5510189...
0.92045885
0
isExistingVideoGIFSupported.js ============================== / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. Dependencies
function isExistingVideoGIFSupported(codecs) { var hasValidCodec = false; if (utils.isArray(codecs) && codecs.length) { utils.each(codecs, function (indece, currentCodec) { if (utils.isSupported.videoCodecs[currentCodec]) { hasValidCodec = true; } }); if (!hasValidC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWebCamGIFSupported() {\n return error.isValid();\n }", "function supports_video() {\n return !!document.createElement('video').canPlayType;\n}", "function subir_GIF_function() {\r\n let form = new FormData();\r\n form.append('file', GIF_video, 'myGif.gif');\r\n ...
[ "0.8122735", "0.61259514", "0.60961795", "0.6080997", "0.6050581", "0.5997428", "0.5962455", "0.59585005", "0.5899771", "0.5879371", "0.5812232", "0.57381994", "0.5663638", "0.56565136", "0.56493765", "0.5595269", "0.55814844", "0.5572234", "0.55668294", "0.5492691", "0.54592...
0.80454904
1
NeuQuant.js =========== / NeuQuant NeuralNet Quantization Algorithm Copyright (c) 1994 Anthony Dekker NEUQUANT NeuralNet quantization algorithm by Anthony Dekker, 1994. See "Kohonen neural networks for optimal colour quantization" in "Network: Computation in Neural Systems" Vol. 5 (1994) pp 351367. for a discussion of ...
function NeuQuant() { var netsize = 256; // number of colours used // four primes near 500 - assume no image has a length so large // that it is divisible by all four primes var prime1 = 499; var prime2 = 491; var prime3 = 487; var prime4 = 503; // minimum size for input image var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NeuQuant(networkSize){\n /**\n * Constants\n */\n const ncycles = 100; // number of learning cycles\n const maxnetpos = networkSize - 1;\n\n // defs for freq and bias\n const netbiasshift = 4; // bias for colour values\n const intbiasshift = 16; // bias for fractions\n const i...
[ "0.75975037", "0.60318315", "0.58580995", "0.5789704", "0.5786007", "0.5619838", "0.5547125", "0.5528039", "0.5424809", "0.5410352", "0.53761613", "0.53746754", "0.53525287", "0.52840656", "0.52735335", "0.5261336", "0.5243487", "0.52253526", "0.5223896", "0.52063614", "0.519...
0.72004783
1
Insertion sort of network and building of netindex[0..255] (to do after unbias)
function inxbuild() { var i; var j; var smallpos; var smallval; var p; var q; var previouscol; var startpos; previouscol = 0; startpos = 0; for (i = 0; i < netsize; i++) { p = network[i]; smallpos = i; smallval = p[1]; // index ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inxbuild() {\n let previouscol = 0;\n let startpos = 0;\n for (let i = 0; i < networkSize; i++) {\n const p = network[i];\n let smallpos = i;\n let smallval = p[1]; // index on g\n // find smallest in i..netsize-1\n for (let j = i...
[ "0.7064702", "0.57111907", "0.5649119", "0.5619839", "0.55056804", "0.54521847", "0.54141736", "0.5246777", "0.515637", "0.515563", "0.5150035", "0.50921977", "0.50765014", "0.5076276", "0.5071271", "0.50625294", "0.506063", "0.50562656", "0.50542665", "0.505129", "0.50213987...
0.6889766
1
Move adjacent neurons by precomputed alpha(1((ij)^2/[r]^2)) in radpower[|ij|]
function alterneigh(rad, i, b, g, r) { var j; var k; var lo; var hi; var a; var m; var p; lo = i - rad; if (lo < -1) { lo = -1; } hi = i + rad; if (hi > netsize) { hi = netsize; } j = i + 1; k = i - 1; m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alterneigh(radius, i, b, g, r) {\n const lo = Math.abs(i - radius);\n const hi = Math.min(i + radius, networkSize);\n\n let j = i + 1;\n let k = i - 1;\n let m = 1;\n\n while((j < hi) || (k > lo)){\n const a = radpower[m++];\n\n if (j < hi) {...
[ "0.5655893", "0.53333485", "0.5087731", "0.5086067", "0.50812167", "0.5029539", "0.5020329", "0.500774", "0.4991974", "0.49557844", "0.49281028", "0.48866838", "0.48822004", "0.48699772", "0.48623684", "0.48030445", "0.48012134", "0.48005015", "0.4799362", "0.47966942", "0.47...
0.60924447
0
Move neuron i towards biased (b,g,r) by factor alpha
function altersingle(alpha, i, b, g, r) { // alter hit neuron var n = network[i]; var alphaMult = alpha / initalpha; n[0] -= (alphaMult * (n[0] - b)) | 0; n[1] -= (alphaMult * (n[1] - g)) | 0; n[2] -= (alphaMult * (n[2] - r)) | 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function altersingle(alpha, i, b, g, r){\n network[i][0] -= (alpha * (network[i][0] - b)) / initalpha;\n network[i][1] -= (alpha * (network[i][1] - g)) / initalpha;\n network[i][2] -= (alpha * (network[i][2] - r)) / initalpha;\n }", "incrementRotor(){if(this.bias<25){this.bias+=1;}else{th...
[ "0.7093589", "0.59683543", "0.5632523", "0.5568411", "0.55240566", "0.55170965", "0.55038357", "0.5473716", "0.544993", "0.5373901", "0.53715247", "0.5285154", "0.5257766", "0.52402705", "0.5227425", "0.5203979", "0.5202502", "0.5192343", "0.5192343", "0.5192343", "0.5192343"...
0.70407754
1
Main compression routine, palette indexes > LZW code stream. |index_stream| must have at least one entry.
function GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) { buf[p++] = min_code_size; var cur_subblock = p++; // Pointing at the length field. var clear_code = 1 << min_code_size; var code_mask = clear_code - 1; var eoi_code = clear_code + 1; var next_code = eoi_cod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n buf[p++] = min_code_size;\n var cur_subblock = p++; // Pointing at the length field.\n\n var clear_code = 1 << min_code_size;\n var code_mask = clear_code - 1;\n var eoi_code = clea...
[ "0.6643301", "0.66347563", "0.66314495", "0.66314495", "0.66314495", "0.66314495", "0.66314495", "0.66314495", "0.5336379", "0.49745443", "0.4899499", "0.48688745", "0.47753137", "0.47716975", "0.46713585", "0.46520817", "0.45690054", "0.4558203", "0.45316243", "0.4524835", "...
0.66667473
0
getBase64GIF.js =============== / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
function getBase64GIF(animatedGifInstance, callback) { // This is asynchronous, rendered with WebWorkers animatedGifInstance.getBase64GIF(function (image) { callback({ error: false, errorCode: '', errorMsg: '', image: image, }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBase64(img, callback) {\n const reader = new FileReader();\n reader.addEventListener('load', () => callback(reader.result));\n reader.readAsDataURL(img);\n }", "function getBase64Image(img) {\n // Create an empty canvas element\n var canvas = document.createElement(\"canvas\");\n\n var newImg = new ...
[ "0.6769273", "0.6737693", "0.66666055", "0.65553415", "0.65034574", "0.64359957", "0.64189446", "0.6408101", "0.6378245", "0.62816614", "0.62218213", "0.6174414", "0.61582613", "0.61510605", "0.6099838", "0.6087514", "0.60708153", "0.6030129", "0.60100603", "0.6001927", "0.59...
0.8667072
0
existingImages.js ================= / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
function existingImages() { var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var self = this; var callback = obj.callback, images = obj.images, options = obj.options; var imagesLength = obj.imagesLength; var skipObj = { getUserMedia: true, '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addImages() {\n var images = ['heroImage', 'legacyLogo'];\n var img = null;\n for (var i = 0; i < images.length; i++) {\n var key = companyInfo['key'];\n if (companyInfo[images[i]].length > 0) {\n var url = 'https://media.licdn.com/media' + companyInfo[images[i]];\n img = $('<img class=...
[ "0.6718133", "0.6625609", "0.65091425", "0.6502574", "0.6481033", "0.64418715", "0.6415796", "0.64072454", "0.63800955", "0.6378517", "0.6375434", "0.6366499", "0.6363261", "0.63248694", "0.63188356", "0.6314467", "0.63074934", "0.6293857", "0.62832874", "0.6272537", "0.62631...
0.727801
0
stopVideoStreaming.js ===================== / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
function stopVideoStreaming(options) { options = utils.isObject(options) ? options : {}; videoStream.stopVideoStreaming(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopVideo() {\n console.log(\"Inside stop video\");\n stream.getVideoTracks()[0].enabled = false;\n stream.getVideoTracks().forEach((track) => {\n track.stop();\n });\n\n stream.getAudioTracks().forEach((track) => {\n track.stop();\n });\n }", "function sto...
[ "0.8368343", "0.82664514", "0.80574095", "0.8026516", "0.79371136", "0.78987503", "0.77917576", "0.76779526", "0.76779526", "0.7671906", "0.75851923", "0.7579602", "0.75631654", "0.7547997", "0.75050527", "0.74499506", "0.7247041", "0.7172272", "0.7148225", "0.7137046", "0.70...
0.83465713
1
existingVideo.js ================ / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. Dependencies
function existingVideo() { var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var callback = obj.callback, existingVideo = obj.existingVideo, options = obj.options; var skipObj = { getUserMedia: true, 'window.URL': true, }; var errorObj = error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadNewVideo(vid){\n console.log('loadNewVideo:',vid);\n player.loadVideoById(vid);\n}", "function createVideo() {\n var video = getVideoObject();\n submitVideo(video, 'create_video', onCreateSuccess);\n}", "createHTMLVideo() {\n return null; //TODO!\n }", "function PickNewVideo(iVideoInf...
[ "0.7268966", "0.70197713", "0.6931911", "0.68327373", "0.682611", "0.6758282", "0.67328256", "0.66899407", "0.6663229", "0.661874", "0.65996826", "0.65592057", "0.65499187", "0.6540705", "0.65195644", "0.6516631", "0.6485332", "0.64500517", "0.64381576", "0.6436231", "0.64018...
0.82293886
0
existingWebcam.js ================= / Copyright 2017 Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. Dependencies
function existingWebcam() { var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var callback = obj.callback, lastCameraStream = obj.lastCameraStream, options = obj.options, webcamVideoElement = obj.webcamVideoElement; if (!isWebCamGIFSupported()) { retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function importWebcamStream() {\n let constraints = {\n video: {\n mandatory: {\n minWidth: width,\n minHeight: height,\n },\n optional: [{ maxFrameRate: 24 }],\n },\n audio: true,\n };\n createCapture(constraints, function (stream) {\n console.log(stream);\n });\n}", ...
[ "0.6901145", "0.6869053", "0.67722166", "0.6606407", "0.65534943", "0.65425247", "0.65284204", "0.65226567", "0.6495945", "0.64163", "0.63960385", "0.6382582", "0.63403314", "0.6335623", "0.62675697", "0.62326276", "0.6229361", "0.6215911", "0.6215456", "0.6212106", "0.618656...
0.81226045
0
Execute a callback when an array of promises complete, regardless of whether any throw an error.
onComplete(promises, cb) { Promise.all(promises).then( () => cb(), () => cb(), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function done() {\n for( let i = 0; i < callbacks.length; ++i ) {\n await callbacks[ i ]();\n }\n\n if( lastCallback ) {\n await lastCallback();\n }\n}", "function asyncForEach(array, fn, done) {\n var completed = 0;\n\n if (array.length === 0) {\n ...
[ "0.66673714", "0.6134219", "0.59439623", "0.591809", "0.59121877", "0.5893223", "0.5805651", "0.57632196", "0.5744834", "0.5742047", "0.5740281", "0.57280266", "0.57151186", "0.570534", "0.5699638", "0.5664928", "0.56624895", "0.56249547", "0.56106395", "0.559249", "0.5591637...
0.7268687
0
Returns a vizUrl, tokenizing it if a token is passed and immediately invalidating it to prevent it from being used more than once.
getUrl(nextUrl) { const newUrl = nextUrl || this.props.url; const token = this.props.token; const parsed = newUrl && typeof newUrl === 'string' && url.parse(newUrl, true); if (!parsed.protocol || !parsed.host) return ''; if (!this.state.didInvalidateToken && token) { this.invalidateToken...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _build_token_link(url, token, token_name){\n\tvar new_url = url;\n\n\t// Default to \"barista_token\".\n\tif( ! token_name ){ token_name = 'barista_token'; }\n\n\tif( token ){\n\t if( new_url.indexOf('?') === -1 ){\n\t\tnew_url = new_url + '?' + token_name + '=' + token;\n\t }else{\n\t\tnew_url = ne...
[ "0.54777294", "0.54777294", "0.50261325", "0.49988276", "0.49267346", "0.48811537", "0.48811537", "0.48811537", "0.48698774", "0.4815443", "0.4813669", "0.47425395", "0.47217444", "0.47193637", "0.47027606", "0.46987695", "0.46765164", "0.46516004", "0.46206614", "0.458822", ...
0.5681422
0
Make every spot where active piece was empty
function undrawPiece() { for (var i =0; i<active.location.length;i++){ row = active.location[i][0]; col = active.location[i][1]; if( grid[row][col] !== BORDER){ ctx.fillStyle = "black"; ctx.fillRect(col * SQUARE_SIZE, row * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearPiece() {\n for (var i=0; i<prevPieceArray.length; i++){\n for (j=0; j<prevPieceArray.length; j++) {\n if (prevPieceArray[i][j] != 0)\n gameBoard[prevYPosition+i][prevXPosition+j] = 0;\n\n }\n }\n ctx.clearRect(150, 20, 400, 500);\n drawGameArea();\...
[ "0.7367596", "0.6959912", "0.67890567", "0.676917", "0.6742718", "0.67340046", "0.67094547", "0.6670963", "0.659328", "0.65665257", "0.6563377", "0.65485317", "0.65452546", "0.6520696", "0.6519893", "0.65089834", "0.6502584", "0.6490929", "0.64865625", "0.6480865", "0.6478073...
0.70744133
1
Rotates active piece counterclockwise
function rotate() { var newOrient = active.orientation + 1; undrawPiece(); if (newOrient >= active.type.length) { newOrient = 0; } var test = active.type[newOrient]; for (var i = 0; i < test.length; i++) { active.location[i][0] =test[i][0] + active.pivot.r; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rotatePiece(piece, angle){\n let newpiece = copyMatrix(piece);\n for (var i = 0; i < angle; i++) {\n newpiece = rotatePiece90(newpiece);\n }\n return newpiece;\n}", "function rotatePiece90(piece){\n let newpiece = copyMatrix(piece);\n const x = Math.floor(piece_dim/2);\n const y = piece_dim - ...
[ "0.70195246", "0.69634783", "0.69501555", "0.6859222", "0.6623743", "0.66110265", "0.6607178", "0.6603812", "0.6580773", "0.6566771", "0.65590256", "0.65526086", "0.6536312", "0.65326756", "0.6519718", "0.64904994", "0.6487457", "0.64771587", "0.64703786", "0.6446306", "0.639...
0.7302617
0
Handles path of /example
function exampledir(page_data, request, response, json){ response.writeHead(200, {'Content-Type': 'application/json'}); response.end("Welcome to /example, you can do other things using this function"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handler(request, response) {\n var uri = url.parse(request.url);\n console.log(uri.pathname, 'was requested');\n response.writeHead(200, {'Content-Type': 'text/plain'});\n response.end('Hello World!');\n}", "function handleRoot(req, res) {\n res.send(\"Hello World!\");\n}", "function di...
[ "0.6022033", "0.58249307", "0.5713372", "0.565377", "0.55947655", "0.55622303", "0.5447335", "0.5415664", "0.53913414", "0.53398144", "0.5319798", "0.5318528", "0.5288168", "0.52817404", "0.52626586", "0.52332133", "0.52323073", "0.52227455", "0.52226484", "0.52217066", "0.51...
0.5979852
1
Prefix numbers with up to 20 leading zeros This is so we can have some kind of natural comparison on the regex below
function prefixer(match, p1, offset, string) { return ('00000000000000000000' + match).substr(-20); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prefixer(match, p1, offset, string) {\n\t\t\t\t\treturn ('00000000000000000000'+match).substr(-20);\n\t\t\t\t}", "function leadingZero(input, spaces) {\n\tif (input.length < spaces) {\n\t\treturn leadingZero('0' + input)\n\t} else {\n\t\treturn input\n\t}\n}", "function prefix (val) {\n if (val.lengt...
[ "0.6953328", "0.6879884", "0.681738", "0.6767982", "0.67414045", "0.671485", "0.6636978", "0.6601453", "0.65849894", "0.6552298", "0.63969517", "0.6346945", "0.63288736", "0.63211435", "0.629524", "0.628715", "0.62848735", "0.62636024", "0.6244971", "0.620426", "0.6196028", ...
0.7154236
0
Clears populated controls. Prepares UI for next processing.
function ResetControls() { document.getElementById("faceImage").style.display = "none"; document.getElementById("signImage").style.display = "none"; document.getElementById("extractedData").style.display = "none"; $('#drivers-license-data').empty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n\t\t\tdiv.update('');\n\t\t\tlastSelected = null;\n\t\t\tspinnerVisible = false;\n\t\t}", "function defaultControls() {\n controls.reset();\n }", "function resetControls() {\n controls.reset();\n if (!animating) {\n render();\n }\n}", "function resetControls() {\n\t/* js...
[ "0.72312164", "0.72132206", "0.71399367", "0.71138334", "0.70872504", "0.70107627", "0.6973498", "0.68771946", "0.6862589", "0.68487114", "0.6784221", "0.67218524", "0.6715851", "0.6695762", "0.6685998", "0.6675144", "0.66728944", "0.66675663", "0.6633879", "0.6622865", "0.66...
0.7341494
0
get recommended classes based on year and major
async function getRecommendedClasses(year, major, db) { const dbRef = db.collection('schedules').where("year", "==", year).where("major", "==", major) try { let frequencyCount = new Map(); let querySnapshot = await dbRef.get(); querySnapshot.forEach(doc => { doc.data().classe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMajorAsClass(major) {\n return major.replace(/ /g,'');\n}", "function getClasses(uid) {\n\t\tuid = (uid || Math.random())+\"\";\n\n\t\tvar courses = slice(document.querySelectorAll(\"div[id*=DERIVED_REGFRM1_DESCR]\")),\n\t\t classes = [];\n\n\t\tcourses.forEach(function (courseElem) {\n\t\t\tva...
[ "0.62363267", "0.6154556", "0.5870337", "0.58687073", "0.54672235", "0.54672235", "0.54672235", "0.54672235", "0.54672235", "0.54672235", "0.54672235", "0.5407524", "0.5370981", "0.5289816", "0.5270766", "0.51816267", "0.5168334", "0.5157348", "0.5118118", "0.5095117", "0.506...
0.685332
0
Generate a timestamp if they are enabled and display them as dim cyan
static _timestamp(){ if(!Logger.timestamps){ return ""; } var date = new Date() var dateString = date.toLocaleString(); return colors.dim.cyan("["+dateString+", "+date.getMilliseconds().toString().padStart(3)+"] "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTime() {\n\tOutput('<span>It\\'s the 21st century man! Get a SmartWatch</span></br>');\n}", "_renderCardTimestamp() {\n if (this.card_timestamp && this.timestampLayer) {\n this.timestampLayer.innerHTML = localDatetime(new Date().toISOString())\n }\n }", "_renderCardTimes...
[ "0.6373427", "0.6168082", "0.6168082", "0.6124877", "0.5840692", "0.57737195", "0.57656676", "0.57521194", "0.57400167", "0.57277817", "0.5683161", "0.5666046", "0.5655758", "0.56501013", "0.5645658", "0.56453276", "0.56379056", "0.56221676", "0.5618996", "0.56139416", "0.560...
0.6433886
0
Take picture with camera
function takePicture() { navigator.camera.getPicture( function(uri) { var img = document.getElementById('camera_image'); img.style.visibility = "visible"; img.src = uri; }, function(e) { console...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takepicture() {\n var context = canvas.getContext('2d');\n if (width && height) {\n canvas.width = width;\n canvas.height = height;\n context.drawImage(video, 0, 0, width, height);\n \n var data = canvas.toDataURL('image/jpeg');\n photo.setAttribute('src', data);\n p...
[ "0.7668148", "0.7660722", "0.7647047", "0.7621036", "0.7553278", "0.754262", "0.7518746", "0.7478076", "0.7434032", "0.74247295", "0.73791164", "0.7315621", "0.7312897", "0.7295084", "0.72875965", "0.726378", "0.72581154", "0.72464067", "0.72426575", "0.72189677", "0.7198943"...
0.7958757
0
Select picture from library
function selectPicture() { navigator.camera.getPicture( function(uri) { var img = document.getElementById('camera_image'); img.style.visibility = "visible"; img.src = uri; }, function(e) { co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseExamplePhoto() {\n const $activeExampleFace = $acitveExampleFaces.find(buildCustomData(KEY_OF_THE_INDEX_OF_AN_EXAMPLE_PHOTO, exampleFaceIndex)).find(buildCustomData(KEY_OF_THE_FACE_ID));\n setImgSrc($chosenPartOfFace, $activeExampleFace.attr('src'));\n activeExamplePhotoId = $activeExampleF...
[ "0.72310746", "0.6820095", "0.67208666", "0.6632594", "0.6598977", "0.6586632", "0.656993", "0.6499895", "0.64962226", "0.6440464", "0.64026684", "0.63586086", "0.63476634", "0.6289992", "0.62836194", "0.6273462", "0.6256409", "0.62072885", "0.6190038", "0.6181574", "0.617842...
0.7203851
1
Return a user based on network player
function GetUser(netPlr : NetworkPlayer) : UserClass{ for(var i : int = 0; i < playerList.Count; i++){ if(netPlr == playerList[i].netPlr){ return playerList[i]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetUser(netID : NetworkViewID) : UserClass{ \n\tfor(var i : int = 0; i < playerList.Count; i++){ \n \tif(netID == playerList[i].netID){\n \t\treturn playerList[i];\n \t}\n }\n return null;\n}", "function getUserByName(name) {\r\n\tvar player = players.find(obj => obj.name == name);\r\n\ti...
[ "0.7253096", "0.7133482", "0.68087554", "0.666674", "0.66240805", "0.66212296", "0.65351367", "0.64360315", "0.64326483", "0.6409714", "0.6379584", "0.6337769", "0.6289786", "0.6254773", "0.6225581", "0.6213903", "0.6199476", "0.61925983", "0.6181203", "0.61706185", "0.617051...
0.72219664
1
Return a user based on netView ID
function GetUser(netID : NetworkViewID) : UserClass{ for(var i : int = 0; i < playerList.Count; i++){ if(netID == playerList[i].netID){ return playerList[i]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserById(id) {\n return getUserByProperty('id', id);\n}", "function getUserById(userid) {\n}", "function getUser(id) {\n return \"Akhil\";\n}", "function getUserId(){\n VK.api(\"users.get\", { fields: 'timezone'}, \n function(data){ \n appUserId = data.response[0].id;\n ap...
[ "0.6568792", "0.65136456", "0.6493769", "0.6482161", "0.6455126", "0.6447277", "0.64262974", "0.64220256", "0.6371192", "0.6354932", "0.6329724", "0.63116187", "0.62804645", "0.62783384", "0.6260913", "0.6257289", "0.6249501", "0.6228301", "0.6217874", "0.61831176", "0.618000...
0.67850053
0
A User Filed a complaint against a certain user
function UserComplaint(violatorID : NetworkViewID, reporter : NetworkViewID){ var list : List.<NetworkViewID>; if(!userComplaintTable.ContainsKey(violatorID)){ //Check if the compliant board has this user already list = new List.<NetworkViewID>(); list.Add(reporter); userComplaintTable.Add(violatorID,list); //A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addHealthcareProfessional(userId) {\n // To do\n }", "function tellUser(sourceUser, targetUser) {\n var interested = Math.random();\n\n /**\n * This user has already seen the concept.\n **/\n if (pastUsers.hasOwnProperty(targetUser.name)) {\n return false;\n ...
[ "0.57588136", "0.5711993", "0.51690745", "0.51583815", "0.51454175", "0.51343197", "0.5104661", "0.5081925", "0.5059961", "0.5049359", "0.50231373", "0.5016247", "0.50004536", "0.49908343", "0.49850795", "0.49790084", "0.49784082", "0.49640065", "0.49638993", "0.49592462", "0...
0.58100116
0
Clean Up Player Items & Registration
function CleanUpPlayer(netPl : NetworkPlayer){ for(var i : int = 0; i < playerList.Count; i++){ if(netPl == playerList[i].netPlr){ if(gameManager.gameFields.gameStarted)gameManager.CleanUpPlayer(playerList[i]); playerList.RemoveAt(i); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RemoveUsed(item) {\n if (player) {\n for (count = 0; count < playerQuestions.data.length; count++) {\n if (playerQuestions.data[count] == item) {\n delete playerQuestions.data[count];\n playerQuestions.data.splice(count, 1);\n }\n }\n ...
[ "0.6740746", "0.65209264", "0.64604986", "0.64363796", "0.638936", "0.6379826", "0.6339682", "0.6305788", "0.62371945", "0.6219923", "0.62142295", "0.6212873", "0.6184747", "0.6150664", "0.61343473", "0.61272395", "0.61051226", "0.6104375", "0.60911185", "0.60509485", "0.6049...
0.68192273
0
appends to the global search results array
function SearchResultsAppend(search_string){ var search_strings = search_string.split(' '); $.each(search_strings,function(i,v){ var vl = v.toLowerCase(); if( $.inArray(vl,_TTSearchResults) === -1 ){ _TTSearchResults.push(vl); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addSearchResultItems(result) {\n if (isNullOrUndefined(result) || result === '') {\n return;\n }\n if (isNullOrUndefined(this.owner.findResultsList)) {\n this.owner.findResultsList = [];\n }\n this.owner.findResultsList.push(result);\n }", "function add...
[ "0.7067287", "0.6798217", "0.65959567", "0.6279208", "0.6212924", "0.62002873", "0.6160007", "0.6079264", "0.6039068", "0.6034919", "0.5982182", "0.5871617", "0.5852508", "0.5847811", "0.5842436", "0.5841577", "0.5794842", "0.5785824", "0.5778214", "0.57779175", "0.57356685",...
0.7228948
0
Change the color of the div with id "colordiv"
function changeColor() { document.getElementById("color-div").style.color="red"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeDivColor (id, color) {\n var elem = document.getElementById(id);\n elem.classList.add(color);\n}", "function colour()\n{\n divcolour.style.color='blue';\n}", "function changeColor() {\n\t\tvar randomColor = '#' + Math.floor(Math.random() * 16777215).toString(16);\n\t\tvar text = document.ge...
[ "0.78436846", "0.76868534", "0.7607936", "0.75693697", "0.7196284", "0.71590275", "0.7157341", "0.7139497", "0.7135067", "0.7102098", "0.7082522", "0.7065582", "0.7051132", "0.70337754", "0.703235", "0.703235", "0.7015949", "0.70097095", "0.698982", "0.69860667", "0.6983106",...
0.88708264
0
It console logs a pyramid shape with N levels using the character with no spaces on both the left and right hand sides These are some examples pyramid(1) '' pyramid(2) ' ' '' pyramid(3) ' ' ' ' ''
function pyramid(n, row = 0, level = '') { if (row === n) { return; } if (level.length === 2 * n - 1) { console.log(level); return pyramid(n, row + 1); } const midpoint = Math.floor((2 * n - 1) / 2); let add; if (midpoint - row <= level.length && midpoint + row >= level.length) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pyramid(n) {\n // looping through the levels\n for (let i = 0; i < n; i++) {\n\n var output = ''; // reset each level of the loop\n for (let j = 0; j < n - i; j++) output += ' '; //\n for (let k = 0; k <= i; k++) output += '# '; //Add the '#' for each row\n console.log(ou...
[ "0.7662186", "0.7497231", "0.7488352", "0.74694395", "0.7467821", "0.73060024", "0.7260817", "0.7213365", "0.71463513", "0.70760214", "0.70754546", "0.7072089", "0.6947308", "0.69183165", "0.68635947", "0.6782925", "0.6768395", "0.67088675", "0.6667352", "0.6554232", "0.65488...
0.75171244
1
Get access to users microphone start
_getUserMedia() { // Get microphone access if (navigator.mediaDevices || navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia(this.options).then((stream) => { // request access to the users microphone and set up a stream globalStream = stream; // set stream equal to the glo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserMicrophone () {\n return getUserMedia({ audio: true, video: false })\n}", "requestUserMedia() {\n var self = this;\n function success(stream) {\n console.log('Got getUserMedia stream');\n\n // checking audio presence\n if (self.canMediaDevicesGetUserMedia) {\n if (str...
[ "0.6836724", "0.65315443", "0.6401362", "0.64002025", "0.6386974", "0.6377579", "0.6341192", "0.633717", "0.63331205", "0.62680876", "0.6263049", "0.6256642", "0.62315637", "0.62249506", "0.6214771", "0.6209732", "0.61713773", "0.6115704", "0.6076538", "0.59983915", "0.598732...
0.67968106
1
global middleware for checking restricted routes
function restricted(req, res, next) { if (req.url.match('/api/restricted')) { verifySession(req, res, next) } else { next() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restrictMiddleware(req, res, next) {\n // if path contains '/api/restricted', no matter what follows, runs check for valid session and cookie info\n if (req.path.includes(\"/api/restricted\")) {\n // verifies if user is logged in. if yes, points to next middleware (the endpoint, in this case)\n if...
[ "0.7305999", "0.67933893", "0.67678916", "0.6633704", "0.6630601", "0.6599381", "0.65601814", "0.6513521", "0.6511145", "0.6487162", "0.640915", "0.6386897", "0.63663083", "0.63508606", "0.63490933", "0.6308022", "0.63047636", "0.6281414", "0.62753505", "0.62630206", "0.62444...
0.7435686
0
Draws a block at the given row and column. Adds a barrier if barrier = true
function drawBlock(row, col, barrier, cursor) { // Create block var block = $("<div/>") .css("bottom", (row * size + spacing) + "px") .css("left", (col * size + spacing) + "px") .css(styling); // Style accordingly if(barrier) { block .css("background-color", barrier...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawBlock(grid, row, col) {\r\n for (var i = row; i <= row + 1; i += 1) {\r\n for (var j = col; j <= col + 1; j += 1) { \r\n drawPoint(grid, i, j);\r\n } \r\n } \r\n }", "function drawBoard() {\n\n // Get rid of old blocks\n $(\"...
[ "0.7053805", "0.70275635", "0.65184027", "0.65066224", "0.63977987", "0.63440466", "0.6342201", "0.633469", "0.62721777", "0.6269549", "0.62310874", "0.6099421", "0.609319", "0.6071917", "0.6054381", "0.60119814", "0.5991985", "0.5974339", "0.595131", "0.59246594", "0.5844852...
0.7982805
0
Submit data to mturk
function submitTurk() { $("#scoreField").val(score); $("#secondsField").val(seconds); $("#timeoutField").val(averageTimeout); $("#movementsField").val(movements); $("#mturk_form").submit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mturkSubmit(submitUrl, results) {\r\n var form = $(\"#submit-form\");\r\n addHiddenField(form, 'assignmentId', state.assignmentId);\r\n addHiddenField(form, 'workerId', state.workerId);\r\n addHiddenField(form, 'results', JSON.stringify(results));\r\n addHiddenField(form, 'feedback', $(\"#f...
[ "0.7128993", "0.6638985", "0.63302726", "0.6054163", "0.6014498", "0.5854631", "0.57480514", "0.56947386", "0.56600684", "0.56327313", "0.56319505", "0.5623992", "0.561585", "0.560179", "0.5582743", "0.55766857", "0.55540305", "0.55436903", "0.55099195", "0.55013037", "0.5464...
0.74113697
0
Given a requested target, find a matching doc file. If the target doesn't exist, try appending various extensions to the name, or look for a directory of the same name with an index file. target (String) The requested file extensions (Array, optional) Extensions, including leading dot, to try appending to the target na...
function findMatch(target, extensions, callback) { var args = Array.prototype.slice.call(arguments); callback = args.pop(); extensions = args[1] || ['.md', '.mdown']; target = path.normalize(args[0]); var potentials = []; var ext = path.extname(target); if (extensions.indexOf(ext) === -1) { // try t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFile(base, useIndex, callback) {\n FindExtensions.reduceRight(function (next, ext) {\n const file = base + ext\n\n return function () {\n fs.stat(file, function (error, stats) {\n if (error) {\n if (error.code === 'ENOENT' || error.code === 'ENOTDIR') {\n next()\...
[ "0.530255", "0.5234627", "0.5119991", "0.50890446", "0.4950288", "0.48983002", "0.48861474", "0.48517933", "0.47666574", "0.4766253", "0.47592977", "0.47453055", "0.47151953", "0.47151953", "0.47071826", "0.47047636", "0.47047636", "0.46995595", "0.46995595", "0.46799535", "0...
0.7915767
0
constructor cria e inicia as linhas e colunas criadas pela classe posicionamento
constructor(linha, coluna) { this.linha = linha; this.coluna = coluna; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor () {\n this.numRows = 6;\n this.numColumns = 7;\n this.spaces = this.createSpaces();\n }", "function LineMap(){\n this.columns = [];\n }", "constructor(cols, rows) {\n this.cols = cols;\n this.rows = rows;\n }", "constructor(x, y, eixoX, e...
[ "0.6740094", "0.6345636", "0.6295685", "0.6238675", "0.6109249", "0.60786945", "0.60490525", "0.5947576", "0.59257466", "0.587455", "0.5852016", "0.5833479", "0.58211917", "0.577377", "0.57627267", "0.5761255", "0.5759861", "0.5728452", "0.5717136", "0.56605506", "0.56550443"...
0.75179344
0
Checks an array of data for existance called via function. when they all exist the onExists function is called.
function checkData(dataFunc,interval,onExists) { var anyNull = false var datum = dataFunc() //console.log("data = "+ datum) for (i=0; i<datum.length; i++) { if (datum[i] == null) { //console.log($.sprintf("dat %s does not exist",i)) anyNull = true break } } if (anyNull) { setTimeout(function() { ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkArrayExists(id, dataArray) {\n var isExists = false;\n for (var i = 0; i < dataArray.length; i++) {\n if (dataArray[i] === id) {\n isExists = true;\n break;\n }\n }\n return isExists;\n ...
[ "0.628241", "0.6191806", "0.6190227", "0.60633385", "0.60507524", "0.59632874", "0.5883263", "0.58236325", "0.58149576", "0.57669026", "0.5741898", "0.5739132", "0.57101446", "0.5666335", "0.5650419", "0.5642465", "0.5622559", "0.562154", "0.56202614", "0.5564753", "0.5556656...
0.7224717
0
Set size of the grid and filter out too big ones, coming from the first line of the .txt file
function initialGridSet(firstLine) { let x = firstLine.split(" ")[0] * 1; let y = firstLine.split(" ")[1] * 1; if (x <= 50 && y <= 50) { initialGrid.x = x; initialGrid.y = y; } else { console.log("Grid size bigger than allowed"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadGrid(file) {\n\t\tlet data = fs.readFileSync(file, 'utf8');//reads the file for us\n //splits the data into an array of substrings based on separator specified\n //and returns them in an array, in this case the array is called tokens\n let tokens = data.split(' ');\n //attempts to extract an intege...
[ "0.6226572", "0.58603203", "0.56984717", "0.5593124", "0.5521025", "0.55046004", "0.54011416", "0.5396337", "0.5355664", "0.53441894", "0.53399295", "0.53261757", "0.53155684", "0.5281269", "0.5271652", "0.52667063", "0.52512467", "0.5235842", "0.5215906", "0.5211413", "0.520...
0.6779058
0
Set initial position, coming from every even line from the .txt file
function initialPosSet(evenLines) { actualPos.x = evenLines.split(" ")[0] * 1; actualPos.y = evenLines.split(" ")[1] * 1; actualPos.direction = evenLines.split(" ")[2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n let input = fs.readFileSync(filepath, \"utf-8\").split(\"\\n\"); // didn't want to use async/await just for this.\n // Last line will always be cardinal directions (and thus not a coordinate)\n directions = input.pop().split(\"\");\n // Everything else is a coordinate, data should r...
[ "0.5236901", "0.52113664", "0.5203854", "0.51756585", "0.51404595", "0.49593368", "0.48891798", "0.48673362", "0.48410752", "0.48398933", "0.48398933", "0.48398933", "0.48398933", "0.48398933", "0.48398933", "0.48341605", "0.48323658", "0.4831993", "0.48181567", "0.48148596", ...
0.69351655
0
Function that generates empty cart and checkout buttons based on condition that checks if productsInCart array is empty
function generateCartButtons() { if (productsInCart.length > 0) { emptyCart.style.display = "block"; cartCheckout.style.display = "block" totalPrice.innerHTML = calculateTotalPrice() + " kn"; } else { emptyCart.style.display = "none...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyCartData() {\n $('#products-header').html(\n '<h1 class=\"mt-3\">Your cart is empty. <a href=\"store.html\">Go to shop!</a></h1>'\n );\n}", "function cartCheckoutBlank() {\r\n var cartItems = document.querySelectorAll('.cart-item'); // Get all cart items\r\n var cartCheckout = doc...
[ "0.6871986", "0.6771669", "0.6704728", "0.66186136", "0.65974337", "0.6577365", "0.6520113", "0.64525497", "0.64384353", "0.6435227", "0.6427777", "0.63019717", "0.62820315", "0.6267271", "0.6254778", "0.62114316", "0.6185399", "0.61766934", "0.6173382", "0.61679244", "0.6161...
0.81362903
0
Preloading the dustbin Image to variable DustbinImg in function preload.
function preload() { DustbinImg = loadImage("dustbin.png"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preload() {\n\tdustbin_img = loadImage(\"dustbin.png\")\n}", "function preload(){\r\n\r\n img=loadImage('js/ddss.png');\r\n}", "function preload(){\n getBcgImg();\n}", "function preload(){\n\tcowimg = loadImage('assets/cow.png');\n}", "function preload() {\n img = loadImage(bimage);\n msk ...
[ "0.8978076", "0.80346334", "0.79081", "0.78234714", "0.7813709", "0.7786185", "0.77846086", "0.77715325", "0.77500606", "0.77093947", "0.77019626", "0.76926464", "0.7689697", "0.7689272", "0.76714444", "0.7656119", "0.7625201", "0.7623014", "0.7619564", "0.7602224", "0.758004...
0.9001384
0
returns the total cost of items in cart
function TotalCost() { var totalcost = 0; for (var i in Cart) { totalcost += Cart[i].price; } return totalcost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function total() {\n let totalCost = 0\n for (var i = 0; i < cart.length; i++) {\n for (var item in cart[i]) {\n totalCost += cart[i][item]\n }\n }\n return totalCost\n}", "function totalCost(){\n var totalCartCost=0;\n for(var i in cart){\n \t totalCartCost+=cart[i].price*cart[i].count; \n...
[ "0.838495", "0.81679976", "0.8142583", "0.8058705", "0.8056231", "0.7949964", "0.7927343", "0.79099643", "0.78842247", "0.78445417", "0.7821332", "0.77924925", "0.77608407", "0.7641536", "0.7612041", "0.7610344", "0.75754637", "0.7555852", "0.75500214", "0.7499312", "0.747651...
0.83665365
1
inserts a game to user's favorite games.
async function markGameAsFavorite(user_id, game_id){ const user_games = await DButils.execQuery( `SELECT game_id FROM dbo.UsersFavoriteGames where user_id='${user_id}'` ); if (user_games.find((game) => game.game_id == game_id)){ throw { status: 409, message: "Game already set as a favorite"}; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function markGameAsFavorite(user_id, game_id) {\r\n await DButils.execQuery(\r\n `INSERT INTO dbo.myGames (user_id, game_id) values (${user_id},${game_id})`\r\n );\r\n}", "async function markTeamAsFavorite(user_id, team_id) {\r\n await DButils.execQuery(\r\n `insert into dbo.FavoriteTeams values (...
[ "0.77673274", "0.63173354", "0.62828416", "0.61462104", "0.5923008", "0.5903634", "0.58820105", "0.582062", "0.57884514", "0.5772494", "0.5769077", "0.57615334", "0.57481354", "0.5746748", "0.57352346", "0.5729849", "0.5694311", "0.5682565", "0.5644224", "0.5633807", "0.56086...
0.7465596
1
returns user's favorite games.
async function getFavoriteGames(user_id) { const game_ids = await DButils.execQuery( `select game_id from UsersFavoriteGames where user_id='${user_id}'` ); return game_ids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function checkIfInFavoritesGames(userID, gameID) {\n const favorite = await DButils.execQuery(\n `select gameID from FavoritesGames where userID=${userID} and gameID = ${gameID}`\n );\n return favorite;\n}", "async function getFavoriteGames(userID) {\n const gamesID = await DButils.execQuery(\n `...
[ "0.66096556", "0.65849334", "0.65367687", "0.64058036", "0.63858145", "0.6375216", "0.6287678", "0.62571937", "0.61912394", "0.60838175", "0.60717547", "0.6047712", "0.6028385", "0.6019491", "0.6011215", "0.597521", "0.594142", "0.59335834", "0.58925676", "0.5863503", "0.5858...
0.72777236
0
git information for the current commit
get git() { return getCommitData( this.commit, this.branch, this.vars ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCurrentCommit() {\n return new Promise((resolve, reject) => {\n child_process_1.exec(\"git rev-list --no-merges --abbrev-commit -n 1 HEAD\", (error, stdout, stderr) => {\n const failed = error || stderr !== \"\";\n resolve(failed ? \"HEAD\" : filename_utils_1.trim...
[ "0.7302445", "0.7204718", "0.7071955", "0.6744949", "0.66983116", "0.65439004", "0.6419617", "0.63039917", "0.62022024", "0.6179094", "0.6104601", "0.60639566", "0.6028992", "0.60090417", "0.5925216", "0.5910842", "0.5894286", "0.5888774", "0.57891417", "0.57858384", "0.57582...
0.7469899
0
manually set build commit and branch targets
get target() { return { commit: this.vars.PERCY_TARGET_COMMIT || null, branch: this.vars.PERCY_TARGET_BRANCH || null }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(options, cbDone)\n{\n proxy(options, {url:'/refs/heads/master'}, function(e, r, j){\n if(e || r.statusCode > 202) return cbDone(nicer(e, r.statusCode, j));\n options.commitsha = j.object.sha;\n proxy(options, {url:'/commits/'+options.commitsha}, function(e, r, j){\n if(e || r.statusCod...
[ "0.51872945", "0.507349", "0.50673467", "0.5049224", "0.4975705", "0.49283287", "0.49067414", "0.48756433", "0.48372993", "0.48338142", "0.47939095", "0.47566858", "0.47551128", "0.47491518", "0.47036046", "0.46710646", "0.4663781", "0.4649886", "0.46267924", "0.4617115", "0....
0.5505196
0
Beginning of function changeImage() function that: set the src of the small image icon to that of the large image set the backgroung image of the page to src on imageHistory array base on the index imageIndex. set the top border of the sub view image currently showing on the page set the top border of the sub view imag...
function changeImage() { if (imageIndex == imageHistory.length){ imageIndex = 0; }else{ imageIcon.src = imageHistory[imageIndex]; largeImageCont.style.backgroundImage = 'url(' + imageHistory[imageIndex] + ')'; images[imageIndex].style.borderTop = '2px solid red'; images[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextImg() {\n imageIndex -= 1;\n imageIcon.src = imageHistory[imageIndex];\n}", "function prevImg() {\n\n if (imageIndex == 0 || imageIndex == 1){\n imageIndex = 0;\n alert('can not go any further');\n }else{\n imageIndex -= 2;\n imageIcon.src = imageHistory[imageIndex];\...
[ "0.73131955", "0.7260156", "0.7239995", "0.708371", "0.70419115", "0.7002817", "0.69422996", "0.6879449", "0.68767726", "0.6812106", "0.6769202", "0.6749371", "0.6744817", "0.67375755", "0.6735627", "0.6703204", "0.6634039", "0.6633081", "0.65946054", "0.65866303", "0.6577899...
0.81879294
0
End of function changeImage() Beginning of function nextImg()
function nextImg() { imageIndex -= 1; imageIcon.src = imageHistory[imageIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextImg() {\n clearCanvas();\n currentIndex++;\n if (currentIndex > 3) {\n currentIndex = 0;\n }\n drawImg(allImg[currentIndex]);\n}", "function changeImage() \n\t{\n\t\t// sets the value for the image src value\n\t\timage.setAttribute(\"src\", imageArray[imageIndex]);\n\t\timageIndex++;\n\t\t//...
[ "0.77869755", "0.76560324", "0.7653143", "0.7646106", "0.7552986", "0.75178677", "0.7509161", "0.75077486", "0.7500494", "0.74965066", "0.7482586", "0.74823546", "0.7478938", "0.74303144", "0.7394871", "0.73597574", "0.73530835", "0.7349474", "0.7315874", "0.7300884", "0.7298...
0.8194176
0
Send AJAX POST request to create new product
function createProduct(){ isLoading = true; renderProducts(); $.ajax({ url: '?product=new', type: 'POST', data: $('#newModal form').serialize(), success: function(result) { isLoading = false; renderProducts(); if(result.status == "ok"){ $("#newModal").modal('hide'); $('#newModal form')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addbackendprod(e){\n const uid = e.target.value;\n const name = document.getElementById(\"NC\");\n const quant = document.getElementById(\"QC\");\n const q = quant.value;\n const y = name.value;\n const xhr = new XMLHttpRequest();\n xhr.open('POST','/product')\n xhr.setRequestHeade...
[ "0.7182548", "0.7153192", "0.7068679", "0.6974941", "0.6962779", "0.6938302", "0.68482447", "0.6846719", "0.6815243", "0.6806676", "0.6748614", "0.67095953", "0.670703", "0.6626808", "0.65667737", "0.65089834", "0.6460178", "0.6417984", "0.64059806", "0.63870376", "0.63748115...
0.75483847
0
End of Event listeners Clears the value of memory buttons
function clearMemory(){ ButtonMemory = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearMemory(){\n $values.innerText=0;\n numberIsClicked=false;\n operatorIsClicked=false;\n equalsToIsClicked=false;\n myoperator=\"\";\n numberOfOperand=0;\n}", "function onReset() {\n clear();\n}", "function clearAllHandler() {\n\theldValue = null;\n\theldOperation = null;\n\tnext...
[ "0.67929536", "0.67546165", "0.6747105", "0.6682303", "0.66613156", "0.66510296", "0.66076463", "0.6558457", "0.6535189", "0.65312266", "0.6518602", "0.649998", "0.64686555", "0.64557016", "0.6393029", "0.63862264", "0.63831806", "0.6368058", "0.63630533", "0.6347843", "0.633...
0.7627472
0
Change the operator sign on display
function setDisplayOperator(sign){ operatorSign = sign; displayOperator.textContent = operatorSign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOperatorText() {\n if (choice === 'add') {\n $('#operator').text('+');\n } else if (choice === 'subtract') {\n $('#operator').text('-');\n } else if (choice === 'multiply') {\n $('#operator').text('*');\n } else {\n return false;\n...
[ "0.7418789", "0.7414826", "0.7338887", "0.7312296", "0.72590137", "0.71794593", "0.71282136", "0.69842994", "0.68854374", "0.6774434", "0.6740133", "0.67323184", "0.66689295", "0.66534495", "0.66411006", "0.66316354", "0.65661854", "0.6543018", "0.64872015", "0.64579517", "0....
0.8294782
0
scale all keyframe times by a factor (useful for frame seconds conversions)
scale( timeScale ) { if ( timeScale !== 1.0 ) { const times = this.times; for ( let i = 0, n = times.length; i !== n; ++ i ) { times[ i ] *= timeScale; } } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_scaleTime(timestamp) {\n return timestamp * 0.001\n }", "function Scale () {}", "set scaleFactor(value) {}", "scale(s) {\r\n this.forEach((x, i, a) => a[i] *= s);\r\n }", "function updateLoopKeyframe() {\n let keyFrames = findKeyframesRule(\"loop\");\n for (var i = 0; i < keyFrames.length;...
[ "0.61935836", "0.5985305", "0.59489423", "0.5886056", "0.57859033", "0.56587785", "0.56463397", "0.56434023", "0.5534989", "0.55270547", "0.5526171", "0.55072767", "0.54684955", "0.5441573", "0.54255295", "0.54133135", "0.5405348", "0.5393439", "0.53871715", "0.5375981", "0.5...
0.66917217
1
removes keyframes before and after animation without changing any values within the range [startTime, endTime]. IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values
trim( startTime, endTime ) { const times = this.times, nKeys = times.length; let from = 0, to = nKeys - 1; while ( from !== nKeys && times[ from ] < startTime ) { ++ from; } while ( to !== - 1 && times[ to ] > endTime ) { -- to; } ++ to; // inclusive -> exclusive bound if ( from !=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trim( startTime, endTime ) {\n\n\t\tconst times = this.times,\n\t\t\tnKeys = times.length;\n\n\t\tlet from = 0,\n\t\t\tto = nKeys - 1;\n\n\t\twhile ( from !== nKeys && times[ from ] < startTime ) {\n\n\t\t\t++ from;\n\n\t\t}\n\n\t\twhile ( to !== - 1 && times[ to ] > endTime ) {\n\n\t\t\t-- to;\n\n\t\t}\n\n\t\t++ ...
[ "0.70731354", "0.58651525", "0.5817531", "0.5719942", "0.57103646", "0.5695317", "0.5616018", "0.55112684", "0.54917336", "0.5433259", "0.5365459", "0.53376615", "0.5313787", "0.52815884", "0.52498275", "0.5219642", "0.5217202", "0.52049285", "0.5159413", "0.51549745", "0.514...
0.7343563
0
helper function to configure endpoint
function configureEndpoint() { if(!o().isEndpoint()) { o().config({ endpoint:'http://services.odata.org/V4/%28S%28wptr35qf3bz4kb5oatn432ul%29%29/TripPinServiceRW/', version:4, strictMode:true }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "endpoint() {\n //\n }", "function setupEndpoint() {\n if (host.val().indexOf('/') != -1) {\n var hostArr = host.val().split('/');\n\n path = \"http://\" + hostArr[0] + \":\" + port.val();\n hostArr.shift(); // remove host\n\n if (hostArr.length > 0) { ...
[ "0.712594", "0.7031287", "0.6514845", "0.6436479", "0.64296484", "0.64296484", "0.6324555", "0.6261385", "0.6253787", "0.61195123", "0.6117743", "0.6108241", "0.60592896", "0.6009572", "0.5989587", "0.5989587", "0.5973853", "0.5955566", "0.59162426", "0.59093785", "0.5906813"...
0.79913837
0
return css class by file extension Ryan Yang
function getCssClassByFileExt(ext) { switch (ext.toUpperCase()) { case "JS": return "seti-javascript"; case "JSX": return "seti-react"; case "CSS": return "seti-css"; case "LESS": return "seti-less"; case "SASS": case "SCSS": return "seti-sass"; case "JSON": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCssClassByFileExt(ext) {\n switch (ext.toUpperCase()) {\n case 'JS':\n return 'seti-javascript';\n case 'JSX':\n return 'seti-react';\n case 'CSS':\n return 'seti-css';\n case 'LESS':\n return 'seti-less';\n case 'SASS':\n case 'SCSS':\n return 'seti-sass';\n...
[ "0.79874265", "0.6774117", "0.6734687", "0.6729427", "0.62852645", "0.60661256", "0.6055278", "0.6047178", "0.596336", "0.5921074", "0.5865575", "0.5824839", "0.58145887", "0.58145887", "0.5751598", "0.57082146", "0.57077485", "0.57034457", "0.56999683", "0.56936264", "0.5662...
0.80199
0
Use Proxy to watch object props change
observe(obj) { let updateChart = this.updateChart; return new Proxy(obj, { set: (target, prop, val) => { // @ts-ignore target[prop] = val; Promise.resolve().then(updateChart); return true; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function watchPropsOn(el) {\n return new Proxy(el, {\n get(target, propKey, receiver) {\n //return Reflect.get(target, propKey, receiver);\n console.log('get', propKey);\n return el[propKey];\n },\n set(target, propKey, value, receiver) {\n console.log('set', propKey, value);\n ...
[ "0.787914", "0.667319", "0.65391487", "0.65391487", "0.6530543", "0.646232", "0.646232", "0.646232", "0.646232", "0.646232", "0.646232", "0.646232", "0.646232", "0.64480746", "0.64480746", "0.62426114", "0.62426114", "0.6240894", "0.6240894", "0.62115055", "0.61427647", "0....
0.71730137
1
Resets the fromCharCode method's implementation. For debug use.
static resetFromCharCode() { shaka.util.StringUtils.fromCharCodeImpl_.reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n initializeCharacters();\n }", "reset() {\n // Reset data buffer\n super.reset.call(this); // Perform concrete-cipher logic\n\n this._doReset();\n }", "clear() {\r\n return 0x00E0;\r\n }", "_reset() {\n this._buffer = [];\n this._codepage = 'ascii';\n\n...
[ "0.6268394", "0.6158204", "0.599839", "0.59501874", "0.5912614", "0.566346", "0.5658555", "0.5580556", "0.55535334", "0.5525274", "0.5501988", "0.5467413", "0.5455116", "0.54481834", "0.5442908", "0.544188", "0.54114896", "0.540973", "0.5361053", "0.53447056", "0.53393763", ...
0.88480276
0
Using filter to write the following function: Write a function called evenMult that takes an array of numbers as a parameter, and returns an array of only the even numbers in the parameter that are also multiple of 2 evenMult([2,3,1,4,10,0,44]) ====> [2,10,44]
function evenMult(array) { return filter(array, function (num, i) { return ((num % 2 === 0) && (i % 2 === 0)) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evenNumbers(arr) {\n const result = arr.filter(function(num) {\n if (num % 2 == 0) {\n return num;\n }});\n return result;\n}", "function even(arr){\n\nnewArr = arr.filter((elem)=>{\n return elem % 2 === 0;\n })\n return newArr\n}", "function filterEven(arr){\n retur...
[ "0.80267006", "0.79412025", "0.78383285", "0.78127974", "0.77935684", "0.77146876", "0.77096367", "0.77074647", "0.76922494", "0.7585362", "0.75830144", "0.758231", "0.75648725", "0.75596803", "0.7544558", "0.75409085", "0.75298184", "0.75254095", "0.75098073", "0.7462492", "...
0.87334985
0
pressing "enter" will call function guess
function keyPress(event) { if (event.key === "Enter") { guess(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enterKey(e){\n e.preventDefault();\n if (e.which === 13) { // if they pressed a key...which one? 13 is enter key\n checkGuess();//fire the checkGuess function\n //console.log(\"enter key fired checkguess\");\n }\n }", "function onKeyPress(event) {\n if (event.key === ...
[ "0.7760341", "0.7383018", "0.71941286", "0.7106693", "0.6821745", "0.6733559", "0.6678587", "0.6672768", "0.6672696", "0.6632413", "0.662169", "0.6609938", "0.65783477", "0.6535696", "0.648762", "0.6460419", "0.6457787", "0.6447535", "0.6439496", "0.64286625", "0.63937503", ...
0.79880846
0
This function should be triggered from 'wheel' event Find closest above and below specified html element in the loop of saved selector by One: Finding if element is below or above by comparing "element.offsetTop" and "window offset before scrolling" Two: Finding closest one by comparing each "element.offsetTop" to "clo...
mwEvent(event){ event.preventDefault() // // Debugging purposes // console.log("mousewheel: " + event.deltaY) // console.log("pageYOffset: " + window.pageYOffset) if(scrollOkan.mwheel.mwAvailable){ scrollOkan.mwheel.setMwAvailable(false) setTimeout(function(){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findClosestPanel() {\n\n var differences = [],\n lowestDiff = Infinity\n\n if (lowestDiff !== 0) {\n\n // work out closest element\n for (var i = 0; i < sections.length; i++) {\n var difference = window.scrollY - sections[i].offsetTop\n\n if (difference < 0) {\n ...
[ "0.715333", "0.6453593", "0.61201537", "0.59970146", "0.59922236", "0.5988156", "0.59353477", "0.59322137", "0.59009105", "0.5887798", "0.5883733", "0.5827479", "0.5783861", "0.57652414", "0.5759107", "0.57585156", "0.5753946", "0.5753946", "0.5753946", "0.57347286", "0.57330...
0.7192266
0
Add (or execute immediately if account is funded) transaction to the txQueue. This method will set the secret, sequence number and sign it.
function addTransaction(tx) { if (!$scope.account.Balance) { // if account is unfunded, then there is no need to ask user for a key // Add transaction to the queue. // (Will be submitted as soon as account gets funding) var item = { tx_json: tx.tx_json, type: tx.tx_json.Trans...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTransaction(tx) {\n\n\t // Get user's secret key\n\t keychain.requestSecret(id.account, id.username, function (err, secret) {\n\t if (err) {\n\t console.log(\"client: txQueue: error while unlocking wallet: \", err);\n\n\t return;\n\t }\n\n\t var transaction = ripple.T...
[ "0.71370316", "0.59183013", "0.5664173", "0.5591338", "0.5517037", "0.5423743", "0.54158956", "0.5412015", "0.53662795", "0.5334675", "0.53194237", "0.5293906", "0.5271557", "0.52570873", "0.5254309", "0.52492535", "0.51501673", "0.5131043", "0.51059437", "0.5102476", "0.5099...
0.7005327
1
Check if the account has been funded. If yes, submit all the transactions in the queue.
function checkQueue() { if (!$scope.account.Balance) return; if (!settings.hasSetting($scope.userBlob, 'txQueue')) return; var self = this; // Get user's secret key keychain.requestSecret(id.account, id.username, function (err, secret) { if (err) { console.log('client: txQueue: error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkQueue() {\n\t if (!$scope.account.Balance || !$scope.userBlob.data.txQueue) return;\n\n\t var self = this;\n\n\t // Get user's secret key\n\t keychain.requestSecret(id.account, id.username, function (err, secret) {\n\t if (err) {\n\t console.log(\"client: txQueue: error while ...
[ "0.68199384", "0.6282757", "0.6001212", "0.5783332", "0.57460994", "0.57270277", "0.5720332", "0.56944937", "0.5651354", "0.5643042", "0.5632217", "0.56196856", "0.55508304", "0.5538184", "0.5501392", "0.54960567", "0.5490941", "0.5490941", "0.54855585", "0.5480872", "0.54745...
0.6824313
0
Setea los parametros del panel de control
setearParams(kv, ma, md, fltr, anod) { //console.log("seteo nuevos parametros"); this.kilovolt = kv; this.miliamperios = ma; this.modo = md; this.filtro = fltr; this.anodo = anod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PanelParameter() { this.initialize(...arguments); }", "function setDatParameter(params){\n\n // console.log( Date(Date.now()) + \" [via OSC] \" + params[1] + \"->\" + params[2] + \": \" + params[3] + \" (for \" + params[4] +\")\");\n var data = { behaviour: params[1], name: params[2], value: params...
[ "0.70360494", "0.6113789", "0.6040913", "0.598187", "0.59622467", "0.58651936", "0.57693976", "0.5767766", "0.5741962", "0.5724299", "0.5713782", "0.57086915", "0.5696036", "0.5665104", "0.562325", "0.5576736", "0.5567877", "0.5567005", "0.5562401", "0.55619067", "0.55313593"...
0.6770051
1
Creates info notification so one color
function createInfoNotification(message, seconds){ createNotification(message, "info", seconds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pinfo(x,y){\n new PNotify({\n title: x,\n text: '<hr class=\"notifys\">'+y,\n type: 'info',\n styling: 'bootstrap3',\n delay:2000,\n });\n}", "function showInfo(message)\n{\n newmessage(\"bg-info\", \"<span class='glyphicon glyphicon-exclamation-sign'></span> \"...
[ "0.6707612", "0.65270925", "0.64848363", "0.64848363", "0.64848363", "0.6382944", "0.636308", "0.63051254", "0.6253877", "0.6250288", "0.61475605", "0.6074646", "0.6009746", "0.5985629", "0.59661067", "0.59567004", "0.5921691", "0.589491", "0.58527696", "0.5846984", "0.583444...
0.702777
0