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
flips over random neutral card in center for players to bid on hard coded to diamonds
function flipNeutralCard (cardRank) { lastNeutralCard = cardRank; $('.upcard').empty(); $( ` <div class="card rank-${cardRank} diams"> <span class="rank">${cardRank}</span> <span class="suit">&diams;</span> </div>` ).appendTo( ".upcard" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flipCard() {\n\n\tfor(var i = 0; i <= 5; i++)\n\t{\n\t\tif($('#card' + (i + 1)).text() == 'L') {\n\t\t\tvar c = Math.floor((Math.random() * largeValues.length));\n\t\t\tcards.push(largeValues[c]);\n\t\t}else {\n\t\t\tvar c = Math.floor((Math.random() * smallValues.length));\n\t\t\tcards.push(smallValues[c...
[ "0.6547952", "0.6342471", "0.6256357", "0.6203004", "0.61699307", "0.6167653", "0.61482614", "0.61019206", "0.6095431", "0.60785246", "0.6073785", "0.6050118", "0.603282", "0.602778", "0.60264087", "0.60113686", "0.599359", "0.5968805", "0.5967247", "0.5959158", "0.59507877",...
0.63576406
1
updates opponents hand with correct amount of cards
function updateOpponentHand() { $(`<li><div class="card back">*</div></li>`).appendTo( ".opponent-hand" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetHand(){\n card1 = undefined\n card2 = undefined\n cardsFlipped = 0\n attempt++\n}", "deal () {\n for (let i = 0; i < 2; i++) {\n this.dealPlayerCard();\n this.playerCardReveal();\n $(\".player-card-back\").attr(\"class\", \"card\");\n };\n t...
[ "0.6833694", "0.6794718", "0.67923146", "0.6777469", "0.6746529", "0.6676739", "0.6640715", "0.66393286", "0.65805614", "0.6576303", "0.65744007", "0.6574251", "0.6564634", "0.6532924", "0.65325195", "0.652408", "0.65146273", "0.65097016", "0.6503278", "0.64969915", "0.647557...
0.72712535
0
check if opponent present, if present sets opponent toggle to found, and skips route
function checkForOpponent() { if (opponentToggle === "not found") { $.ajax({ url: `/game/${gameID}/waiting/${userID}`, method: "GET", success: (data) => { opponentToggle = data; } }); } stopOpponentCheckTimer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "switchTurn() {\n if (!this.extraTurn) {\n this.playerOne.isTurn = !this.playerOne.isTurn;\n this.playerTwo.isTurn = !this.playerTwo.isTurn;\n }\n else {this.extraTurn = false;}\n }", "function togglePlayer() {\n if (activePlayer === \"X\") {\n activePlayer = \"O\";\...
[ "0.6029467", "0.594004", "0.5772739", "0.5740716", "0.5736067", "0.5699982", "0.56637186", "0.5651775", "0.55859506", "0.5518277", "0.55094725", "0.54835063", "0.5477314", "0.5413228", "0.5403113", "0.5401015", "0.53813285", "0.53762645", "0.5369208", "0.5364677", "0.5363268"...
0.68439764
0
toggles the scanning feature. Scanning is performed in content.js in load() if scanningFlag is set to .
function toggleScanning() { if(scanningFlag) scanningFlag = false; else { scanningSize = prompt("min size of images in px?"); if(scanningSize != null && scanningSize >= 0) scanningFlag = true; } return scanningFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "scanClicked(e) {\n this.setState( { showScan: ! this.state.showScan } );\n }", "handleClickScanButton() {\n this.setState({\n scanningBarcode: true\n });\n if (!this.isSearching()) {\n this.startSearching();\n }\n }", "function startBLEScan() {\n\tble.is...
[ "0.6236098", "0.6069551", "0.60569435", "0.60137224", "0.59953386", "0.5902525", "0.5854552", "0.5800118", "0.57311445", "0.5715244", "0.56801647", "0.5633955", "0.5613141", "0.55959153", "0.55924344", "0.553534", "0.5503022", "0.54974335", "0.54962415", "0.54835826", "0.5442...
0.6805098
0
downloads the list stored in this script.
function downloadList(info, tab) { stopDownloadsFlag = false; dlItems.length = 0; downloadHelper(urls, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processDownload() {\n loadPlayList();\n}", "function getFileList() {\n if (!loginData.password) {\n loginData.password = decrypt(\"ilias_key\");\n rss = config.privateRssFeed.replace(\"-password-\", decrypt(\"rss_key\"));\n }\n logger.info(\"Download path: \" + pathToDir);\n l...
[ "0.68164396", "0.6601008", "0.6524128", "0.6357135", "0.6271975", "0.61747664", "0.606959", "0.6055971", "0.60309225", "0.5985683", "0.5965519", "0.5886141", "0.58731896", "0.5820067", "0.5807204", "0.57842815", "0.57829964", "0.578291", "0.5719592", "0.57140857", "0.56945664...
0.6879159
0
recursive helper. Downloads til the end, but does 1 at a time. Uses dlItems array to help if downloads need to be canceled.
function downloadHelper(dlist, filesDownloaded) { if(filesDownloaded == dlist.length) return; else { var dlurl = dlist[filesDownloaded]; chrome.downloads.download({"url": dlurl, conflictAction : "uniquify"}, function (dId) { if(stopDownloa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadItems(items, directory, maxWorkers, callback) {\n\n //Download each item asynchronously\n async.mapLimit (items, maxWorkers,\n function (item, mapCallback) {\n\n if (typeof item != 'string' ) {\n\n mapCallback(null, item);\n }\n else {\n\n download...
[ "0.6564777", "0.62845105", "0.62674993", "0.626496", "0.62636185", "0.6223281", "0.60225046", "0.59768116", "0.59768116", "0.58931226", "0.58266073", "0.57016605", "0.5693437", "0.5645541", "0.5627474", "0.55745786", "0.5543993", "0.5543721", "0.54809016", "0.54538536", "0.54...
0.6646833
0
Set the power on/off for this light.
changePower(power) { return this.setLightState({ power: power }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function YLed_set_power(newval)\n { var rest_val;\n rest_val = String(newval);\n return this._setAttr('power',rest_val);\n }", "configureLowPower(on,off){\n this.turnOn=on;\n this.turnOff=off;\n console.log(\"Low power activado\");\n timerLowPower = setTimeout(()...
[ "0.75757706", "0.69722426", "0.68513715", "0.6812262", "0.67614955", "0.6642387", "0.6607177", "0.65432286", "0.6487447", "0.6463273", "0.64489126", "0.6367556", "0.63548553", "0.6350307", "0.63452715", "0.62856", "0.62585807", "0.6242492", "0.621644", "0.60930884", "0.608868...
0.73451275
1
Sets the expanded state of the cam item with the specified id.
function setExpanded(itemElementID, b) { var api = stub.getAPI(); var itemElement = api.cam.organizations.findByIdentifier(itemElementID); if (itemElement != null) { itemElement.isExpanded = b; api.fireUpdateTOCLater(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "expand(panelId) { this._changeOpenState(this._findPanelById(panelId), true); }", "function setMyActiveItem(id/*:Object*/)/*:void*/ {\n this.activeItemId$EBEj = id;\n if (this.layoutInitialized$EBEj) {/*\n // we're only allowed the actually change the active item in the\n // card layout after it h...
[ "0.6727047", "0.61040384", "0.6082429", "0.59843194", "0.5743152", "0.57341707", "0.5632123", "0.56231177", "0.5611236", "0.5600627", "0.5594914", "0.557866", "0.555045", "0.5493611", "0.5490261", "0.5481928", "0.5481625", "0.54482585", "0.54470867", "0.54343563", "0.5425201"...
0.6936668
0
Writes the toc starting from depth 0 for the subtree starting from the specified item.
function TOC_writeTOC1Subtree(node, selectedItem, depth) { var title = cropString(node.title,22); var resource = node.getResource(); var refItem = node; while (resource == null && refItem.getChildCount() != null) { refItem = refItem.getChildAt(0); resource = refItem.getResource(); } var lessonStatus =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TOC_writeTOC2Subtree(node, selectedItem, depth) {\n\tvar title = cropString(node.title,28 - depth * 3);\n\n\tvar resource = node.getResource();\n\tvar refItem = node;\n while (resource == null && refItem.getChildCount() != null) {\n\t refItem = refItem.getChildAt(0);\n\t\tresource = refItem.getResource(...
[ "0.6901511", "0.65574753", "0.5331892", "0.5217766", "0.5217731", "0.51796407", "0.5153303", "0.5153303", "0.5129923", "0.49620563", "0.49438936", "0.49377024", "0.48468298", "0.48465195", "0.48273", "0.482113", "0.48097128", "0.48002627", "0.4699005", "0.46913818", "0.468079...
0.708848
0
Writes the toc starting from depth 1 for the subtree starting from the specified item.
function TOC_writeTOC2Subtree(node, selectedItem, depth) { var title = cropString(node.title,28 - depth * 3); var resource = node.getResource(); var refItem = node; while (resource == null && refItem.getChildCount() != null) { refItem = refItem.getChildAt(0); resource = refItem.getResource(); } var lessonS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TOC_writeTOC1Subtree(node, selectedItem, depth) {\n\tvar title = cropString(node.title,22);\n\n\tvar resource = node.getResource();\n var refItem = node;\n while (resource == null && refItem.getChildCount() != null) {\n\t refItem = refItem.getChildAt(0);\n\t\tresource = refItem.getResource();\n\t}\n\t\...
[ "0.7374002", "0.64744735", "0.534359", "0.53270507", "0.5291638", "0.5196485", "0.5163336", "0.5163336", "0.51483876", "0.50573343", "0.49564174", "0.49117556", "0.48881656", "0.4844765", "0.48008803", "0.47934458", "0.4790701", "0.4747374", "0.47270802", "0.47255677", "0.471...
0.69711274
1
Writes the table of contents. The TOC entries are retrieved from the LMS using the protected operation "api.getCurrentItem()".
function TOC_writeTOC() { var api = stub.getAPI(); if (api.isLoggedIn()) { var selectedItem = null; if (api.mode == api.MODE_COURSE) { selectedItem = api.getAnticipatedItem(); if (selectedItem == null) selectedItem = api.getCurrentItem(); } var currentOrganization = api.getCurrentOrganization(); /* ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addTableOfContent() {\n this.nodes.wrapper = $.make('section', this.CSS.tocContainer);\n\n const header = $.make('header', this.CSS.tocHeader, {\n textContent: 'On this page',\n });\n\n this.nodes.wrapper.appendChild(header);\n this.nodes.wrapper.appendChild(this.tocElement);\n\n this.tocPar...
[ "0.6606674", "0.6010001", "0.5917465", "0.5785285", "0.57538927", "0.572999", "0.57268536", "0.57081723", "0.5698531", "0.56016594", "0.5600561", "0.55851984", "0.55737686", "0.5552085", "0.55509233", "0.55475605", "0.5545742", "0.55209345", "0.5512205", "0.5510243", "0.54072...
0.78406453
0
var Browser_IsBlink = false; To detect client browser information
function Fx_WhichBrowser() { // Value will true, when the client browser is Internet Explorer 6-11 Browser_IsIE = /*@cc_on!@*/false || !!document.documentMode; // Value will true, when the client browser is Edge 20+ Browser_IsEdge = !Browser_IsIE && !!window.StyleMedia; // Value will true, when t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doBlink() {\n\t\t// Blink, Blink, Blink...\n\t\tvar blink = document.all.tags(\"BLINK\")\n\t\tfor (var i=0; i < blink.length; i++)\n\t\t\tblink[i].style.visibility = blink[i].style.visibility == \"\" ? \"hidden\" : \"\" \n\t}", "printBrowser(b) {\r\n\t\tb = (typeof b == 'undefined') ? browser : b.toLowe...
[ "0.660758", "0.64228755", "0.6420356", "0.63825774", "0.6321466", "0.6300558", "0.6268132", "0.62440217", "0.62073004", "0.61849594", "0.6167769", "0.616454", "0.61361045", "0.61035156", "0.61013925", "0.6091904", "0.6088397", "0.6086341", "0.6007583", "0.5972074", "0.5950979...
0.6452125
1
Animate the bread first search by delaying the drawing of each subsequent polyline.
function animateBFS() { if (!isAnimated) { isAnimated = true; var centerLatLng = new google.maps.LatLng(points3Array[0], points3Array[1]); var mapOptions = { zoom: 16, center: centerLatLng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animate(){\n\tdone = false;\n if(t<points.length-1 && visible){ \n\t\trequestAnimationFrame(animate); \n\t} else {\n\t\tif (!visible) {\n\t\t\treturn;\n\t\t}\n\t\t//continues to next lines if avaliable\n\t\tif (index < paths.length) {\n\t\t\tpoints = paths[index];\n\t\t\tindex++;\n\t\t\tt = 1;\n\t\t\ta...
[ "0.6628831", "0.6430622", "0.6400302", "0.627354", "0.627354", "0.627354", "0.6262964", "0.62387097", "0.6178676", "0.6155738", "0.6107301", "0.60956174", "0.60949934", "0.6067983", "0.6061745", "0.605488", "0.6014659", "0.6007294", "0.5987741", "0.597087", "0.59653544", "0...
0.68856305
0
Given a jQuery container, activate all tooltips within the container.
function ActivateTooltips(container) { if (container && container.tooltip) { container.find('span[rel="tooltip"]').tooltip(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupTooltips() {\n var elements = getAllElementsWithAttribute(\"tooltip\");\n elements.forEach(function(element) {\n attachTooltip(element);\n });\n}", "_addTooltips() {\n $(this.el.querySelectorAll('[title]')).tooltip({\n delay: { show: 500, hide: 0 }\n ...
[ "0.6683244", "0.6489405", "0.64468986", "0.64396757", "0.64156", "0.63733053", "0.6300835", "0.6275642", "0.6271601", "0.6245663", "0.6201288", "0.6162069", "0.611564", "0.60133785", "0.60094607", "0.6001276", "0.5995793", "0.5989656", "0.5972866", "0.59100455", "0.58500844",...
0.8382784
0
Extract the Kanji from the current page. This will have a switch for each type of page, and will do something different for each. This will only include vocabulary pages, reviews and lessons.
function GetVocabularyKanjiFromPage() { // Vocabulary information page. if (url.indexOf('vocabulary') != -1) { return $('header span.vocabulary-icon span').text().trim(); } // Review page. else if (url.indexOf('review/session') != -1) { return $.jStorage....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetVocabularyKanaFromPage() {\n // Vocabulary information page.\n if (url.indexOf('vocabulary') != -1) {\n return $('section.vocabulary-reading p').text().trim();\n }\n\n // Review page.\n else if (url.indexOf('review/session') != -1) {\n return $.j...
[ "0.65004206", "0.53539133", "0.5309084", "0.5168174", "0.51369566", "0.5048152", "0.49175987", "0.4881698", "0.48238885", "0.4741014", "0.47239998", "0.47180948", "0.4696497", "0.46884766", "0.4654775", "0.46450567", "0.46297058", "0.46208993", "0.4600646", "0.45998555", "0.4...
0.75193083
0
Extract the kana from the current page. This will have a switch for each type of page, and will do something different for each. This will only include vocabulary pages, reviews and lessons.
function GetVocabularyKanaFromPage() { // Vocabulary information page. if (url.indexOf('vocabulary') != -1) { return $('section.vocabulary-reading p').text().trim(); } // Review page. else if (url.indexOf('review/session') != -1) { return $.jStorage.get('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetVocabularyKanjiFromPage() {\n // Vocabulary information page.\n if (url.indexOf('vocabulary') != -1) {\n return $('header span.vocabulary-icon span').text().trim();\n }\n\n // Review page.\n else if (url.indexOf('review/session') != -1) {\n retur...
[ "0.63693005", "0.5308333", "0.52845883", "0.5155035", "0.5133463", "0.5005295", "0.49943644", "0.49926788", "0.4941185", "0.48916313", "0.48837394", "0.48767757", "0.48600173", "0.48477176", "0.47765508", "0.47757965", "0.47398084", "0.47276434", "0.47117373", "0.47099027", "...
0.7146116
0
Get the data from the remote URL for the given vocabulary.
function GetExampleSentencesForVocabulary(vocabulary, complete) { $('section#example-sentences-section').detach(); $.get('https://jeshuam.pythonanywhere.com/wanikani-sentences/' + vocabulary, complete); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVocab(jsonurl,dropdown){\n\t$(dropdown).html('');\n\tvar xmlhttp = new XMLHttpRequest();\n\txmlhttp.onreadystatechange = function() {\n\t\tif (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t\tvar obj = JSON.parse(xmlhttp.responseText);\n\t\t\tpopulate(obj.results.bindings, dropdown);\n\t\t}\n...
[ "0.5659428", "0.5577854", "0.5529736", "0.5478465", "0.546249", "0.5440649", "0.5357752", "0.53566545", "0.5328675", "0.5303454", "0.52534795", "0.5250996", "0.52204674", "0.52015036", "0.51864874", "0.51810825", "0.51682687", "0.5113132", "0.51036316", "0.5101123", "0.507263...
0.6165232
0
getValues from user input, fizz and buzz
function getValues() { // store user's fizz/buzz numbers in variables let fizz = parseInt(document.getElementById("fizz").value); let buzz = parseInt(document.getElementById("buzz").value); // generate results using fizzBuzz function let resultsArray = fizzBuzz(fizz, buzz); // dipslay results ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValues() {\n\n //get the user values from the page \n let fizzValue = document.getElementById('fizzValue').value; \n let buzzValue = document.getElementById('buzzValue').value; \n\n//parse for intergers \n fizzValue = parseInt(fizzValue);\n buzzValue = parseInt(buzzValue); \n\n//check th...
[ "0.7058774", "0.6962259", "0.6761024", "0.65642893", "0.6406043", "0.63993", "0.63797885", "0.6356422", "0.63071424", "0.6288263", "0.62644494", "0.6248208", "0.6215968", "0.61845386", "0.611848", "0.6104156", "0.60782367", "0.60609126", "0.60194796", "0.59912914", "0.5968593...
0.7202156
0
logic function calculate which numbers to replace with fizz/buzz
function fizzBuzz(fizz, buzz) { // initialize an array to hold our results let resultsArray = []; // use a for loop to replace words divisable by 3, 5, or both with fizz, buzz, or fizzbuzz respectively // use the continue statement to exit the current iteration of the for loop and continue to the next ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fizzBuzz (num) {\n if (num%5 === 0 && num%3 ===0) {\n return 'fizzbuzz';\n }\n else if (num%5 === 0) {\n return 'buzz';\n }\n else if (num%3 ===0) {\n return 'fizz';\n }\n return num;\n}", "function fizzBuzz(num) {\n if (num%15 === 0) {return 'fizzbuzz';}\n else if (num%3 === 0) {retur...
[ "0.7507102", "0.7423809", "0.7312553", "0.73019964", "0.72807175", "0.72774637", "0.72669035", "0.72626525", "0.7257012", "0.7244276", "0.72407216", "0.7222447", "0.72181654", "0.7199388", "0.71843195", "0.7171144", "0.714779", "0.71395564", "0.7131885", "0.7120619", "0.71165...
0.7461997
1
Parses the application configuration
function parseConfig() { var p = this.path + '/config/', files = framework.util.getFiles(p), mainPos = files.indexOf('main.js'), jsExt = framework.regex.jsFile, config = require(this.path + '/config/main.js'); for (var file,key,cfg,i=0; i < files.length; i++) { if (i==mainPos) continue;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadConfig() {\n try {\n appConfig = require(\"./config/app-config.json\");\n if (typeof appConfig.token === \"undefined\" || appConfig.token === \"\") {\n Logger.log(\"Missing **token** in **app-config.json**.\", \"err\");\n process.exit();\n }\n if (t...
[ "0.641325", "0.6177302", "0.6136201", "0.61342335", "0.6110863", "0.60965985", "0.6096104", "0.6072867", "0.60651785", "0.60043555", "0.5999489", "0.5973929", "0.5967075", "0.5902263", "0.5788824", "0.57842976", "0.5771339", "0.5757923", "0.5754535", "0.5747858", "0.57465476"...
0.66293824
0
Creates database drivers from config
function createDrivers() { var cfg, def, x, y, z, config = this.config.database, drivers = this.drivers; for (x in config) { cfg = config[x]; if (x === 'default') { def = cfg; continue; } for (y in cfg) { if (typeof cfg[y] == 'object') { if (typeof drivers[x] == 'undefined') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeDatabaseProvider(config) {\n const Database = this.application.container.use('Adonis/Lucid/Database');\n return new (require('../UserProviders/Database').DatabaseProvider)(this.application, config, Database);\n }", "function createPool(config, index) {\n // Oracle Pool\n oracledb.creat...
[ "0.6296143", "0.5609229", "0.5607853", "0.55752", "0.55299616", "0.54883593", "0.5485212", "0.54751146", "0.54041857", "0.53688836", "0.5360851", "0.53355855", "0.53355855", "0.53303486", "0.5304351", "0.528108", "0.5229003", "0.51398385", "0.51317406", "0.5115576", "0.510610...
0.8324114
0
Creates storages from config
function createStorages() { var cfg, x, y, z, config = this.config.storage, storages = this.storages; for (x in config) { cfg = config[x]; for (y in cfg) { if (typeof cfg[y] == 'object') { if (typeof storages[x] == 'undefined') storages[x] = {}; storages[x][y] = this.stor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get({config}) {\n const storageConfig = T.sliceObj(config, [\n 'rootFolder',\n 'defaultCategory',\n 'clippingFolderName',\n 'mainFileFolder',\n 'mainFileName',\n 'saveInfoFile',\n 'infoFileFolder',\n 'infoFileName',\n 'assetFolder',\n 'assetFileName',\n 'frameFileFolder',...
[ "0.6641388", "0.60114145", "0.5989875", "0.58615", "0.58615", "0.58615", "0.5847369", "0.58399516", "0.5750206", "0.5750206", "0.56867313", "0.5649155", "0.56477123", "0.56422335", "0.56400883", "0.56244534", "0.5563194", "0.5562009", "0.5550347", "0.5548844", "0.5548844", ...
0.8323198
0
Check if the given range is included in the set
includes(range) { for (let i = 0, j = this.set.length; i < j; i++) { const setRange = this.set[i]; if (range.value !== setRange.value) { continue; } if (setRange.range[0] <= range.range[0] && setRange.range[1] >= range.range[1]) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "overlaps(range) {\n for (let i = 0, j = this.set.length; i < j; i++) {\n const setRange = this.set[i];\n if (setRange.range[1] > range.range[0] &&\n setRange.range[0] < range.range[1]) {\n return true;\n }\n }\n return false;\n }", "function _rangeContainsItem(start, end)...
[ "0.7685754", "0.7010065", "0.7002661", "0.6976864", "0.68145865", "0.6796411", "0.67902976", "0.6789344", "0.67712724", "0.6716222", "0.66969955", "0.66862756", "0.66862756", "0.66666484", "0.6652074", "0.661878", "0.6573105", "0.6544038", "0.6544038", "0.6518066", "0.6456175...
0.8637828
0
Check if the given range overlaps anything in the set
overlaps(range) { for (let i = 0, j = this.set.length; i < j; i++) { const setRange = this.set[i]; if (setRange.range[1] > range.range[0] && setRange.range[0] < range.range[1]) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "includes(range) {\n for (let i = 0, j = this.set.length; i < j; i++) {\n const setRange = this.set[i];\n if (range.value !== setRange.value) { continue; }\n if (setRange.range[0] <= range.range[0] &&\n setRange.range[1] >= range.range[1]) {\n return true;\n }\n }\n retu...
[ "0.7732533", "0.72954416", "0.7251249", "0.7185219", "0.70913666", "0.6995916", "0.69455034", "0.6931797", "0.680938", "0.67333835", "0.67086345", "0.66922176", "0.6684598", "0.66678774", "0.66675234", "0.66632324", "0.6662699", "0.6644604", "0.6598212", "0.6585535", "0.65602...
0.86171615
0
return range of items that intersect in the sets
intersect(range) { if (this.set.length === 0) { return []; } let intersects = []; this.set.forEach( (setRange) => { let intersect = []; const list = this._setToArray([setRange]); for (let i = range.range[0]; i < range.range[1]; i++) { if (list[i]) { intersect[i] = range....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "intersection(set) {\n const intersect = new Set();\n set.values().forEach(val => {\n if(this.has(val)) {\n intersect.add(val);\n }\n });\n return intersect;\n }", "intersection(otherSet) {\n const intersectionSet = new mySet()\n const firstSet = this.values()\n\n firstSet.f...
[ "0.68639755", "0.66891503", "0.66258675", "0.6404386", "0.630003", "0.6198181", "0.61191773", "0.6100391", "0.6015638", "0.60086167", "0.59877497", "0.59453946", "0.5937015", "0.592907", "0.5926395", "0.5914047", "0.59127796", "0.58925456", "0.58614457", "0.58510274", "0.5844...
0.75643945
0
A single point attribute such as color/normal/.. and its data format/number of elements/...
function PointAttribute(name, type, numElements){ this.name = name; this.type = type; this.numElements = numElements; this.byteSize = this.numElements * this.type.size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pointAttribs(point) {\n var options = this.options,\n color = (point && point.color) || this.color;\n\n return {\n 'fill': point.fillColor || options.fillColor || color,\n 'stroke': options.lineColor || color,\n ...
[ "0.74354523", "0.67418075", "0.6345244", "0.63064724", "0.6190068", "0.61084026", "0.6097604", "0.60974187", "0.60617715", "0.5977085", "0.5977085", "0.5924869", "0.59089017", "0.5906186", "0.58796626", "0.586405", "0.5856857", "0.58445865", "0.58092326", "0.57169104", "0.569...
0.7145987
1
Ordered list of PointAttributes used to identify how points are aligned in a buffer.
function PointAttributes(pointAttributes){ this.attributes = new Array(); this.byteSize = 0; this.size = 0; if(pointAttributes != null){ // does not work in chrome v24 // for(var pointAttribute of pointAttributes){ // this.attributes.push(pointAttribute); // this.byteSize += pointAttribute.byteSize; // t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PointAttribute(name, type, numElements){\n\tthis.name = name;\n\tthis.type = type; \n\tthis.numElements = numElements;\n\tthis.byteSize = this.numElements * this.type.size;\n}", "getLinkAnchors(mode) {\n const attrs = this.state.attributes;\n return [\n {\n elemen...
[ "0.55329514", "0.5436744", "0.5392933", "0.52046686", "0.5150287", "0.5147849", "0.50630915", "0.5024585", "0.5021796", "0.5021568", "0.5020612", "0.50078017", "0.50031424", "0.5000502", "0.49988326", "0.49920192", "0.49731162", "0.4956106", "0.4951514", "0.4940095", "0.48887...
0.7013732
0
PSEUDO CODE ================================== 1. App randomly picks a letter (do not show) code reference source: code reference source:
function appSelection() { appLetter = letterOptions[Math.floor(Math.random() * letterOptions.length)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compSelectRandomLetter() {\n computerGuess = computerChoices[Math.floor(Math.random() * computerChoices.length)];\n}", "function getGamePick() {\n var chars = \"abcdefghijklmnopqurstuvwxyz\";\n gPick = chars.substr(Math.floor(Math.random() * 26), 1);\n }", "function randLetter() {\n compK...
[ "0.7511265", "0.7372346", "0.7327676", "0.7305762", "0.7286412", "0.7280271", "0.723963", "0.7215778", "0.7212997", "0.72066694", "0.7202041", "0.7184896", "0.71691", "0.71434724", "0.71351874", "0.7109252", "0.71078897", "0.70865613", "0.7083691", "0.7078622", "0.70623356", ...
0.80839425
0
Force array type and uppercase values.
function normalizeArray(val) { if (!(val instanceof Array)) { val = [val]; } return _.invokeMap(val, 'toUpperCase'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyArray(arr) {\n if (arr.length >= 5) {\n arr[4] = arr[4].toLocaleUpperCase();\n }\n return arr;\n}", "function arrayToUpperCase (array) {\n for (let i = 0; i < array.length; i++) {\n const element = array[i];\n if (typeof element === 'string') {\n let upperCased = element.toUpperC...
[ "0.66312915", "0.64870614", "0.64847785", "0.6358633", "0.6195049", "0.6177865", "0.61287063", "0.60319597", "0.5925577", "0.59030455", "0.5841729", "0.5830398", "0.5806618", "0.5719914", "0.5706758", "0.57034683", "0.56573117", "0.56149644", "0.55899835", "0.55892956", "0.55...
0.72552437
0
Set the Shape of the drawing Object.
function SetShape(obj) { var drawingshape; drawingshape = { type: "Basic", shape: obj }; node = { shape: drawingshape }; diagramInstance.drawingObject = node; enableTool(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set shape(val) {\n if (hasStringPropertyChangedAndNotNil(val, this._shape)) {\n const oldVal = this._shape;\n this._shape = val;\n this.requestUpdate('shape', oldVal);\n }\n }", "setShape(t){\n this.shape = t;\n console.log(this.shape);\n }", "...
[ "0.75434124", "0.6931601", "0.65735227", "0.65528953", "0.64933825", "0.6486944", "0.64736444", "0.6458428", "0.6449219", "0.6419958", "0.6408011", "0.6388681", "0.63770527", "0.6352812", "0.61967826", "0.616283", "0.6158117", "0.6151758", "0.6147493", "0.61208177", "0.610832...
0.8134281
0
Clear the BMI text box if user adds a new weight
function clearBMI() { document.getElementById('txt_bmiHeight').value = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcBMI(){\r\n //get values from functions page\r\n var weight = document.getElementById('txt_bmiWeight').value;\r\n var height = document.getElementById('txt_bmiHeight').value;\r\n\r\n //Calculate bmi if input fields are valid\r\n var bmi;\r\n if (weight > 0 && weight !== \"\"\r\n ...
[ "0.69455284", "0.69455284", "0.68255246", "0.68255246", "0.6621414", "0.653638", "0.6341736", "0.6247351", "0.6208673", "0.6141674", "0.6054885", "0.6009245", "0.5977673", "0.59404534", "0.59330225", "0.592436", "0.5845955", "0.58439016", "0.572842", "0.5717862", "0.5704041",...
0.7639406
1
the data for this game is stored in library.json Loading the library occurs after the user data is collected and loaded the Library will ignore any entries that appear in the solved array
function loadLibrary() { return new Promise(resolve => { console.log("trouver la bibliothèque"); fs.readFile("library.wgd", "utf8", function(err, data) { if (err) { console.log(err); resolve(err); return; } console.log("analyser les données"); var arry = data.sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeData(){\n\n\t// Clean arrays\n\thiddens = [];\n\timages = [];\n\ttitles = [];\n\telements = [];\n\tresources = [];\n\tmaxLevels = [];\n\tlockReqs = [];\n\trequirements = [];\n\tinfos = [];\n\ttexts = [];\n\tlevels = [];\n\tlockeds = [];\n\t\n\t// Class_skills are the .js stuff\n\tlet skills = Class_s...
[ "0.62537766", "0.56828195", "0.56585497", "0.5653531", "0.5648179", "0.56357944", "0.56286377", "0.55096227", "0.5496791", "0.5479485", "0.5460817", "0.5452042", "0.54333895", "0.542403", "0.5421804", "0.5421339", "0.54173374", "0.5398475", "0.5397523", "0.53950816", "0.53945...
0.58417904
1
loginUser looks for a file named _name_.log and either loads the user data and solved word list or creates a file and appends user data to it.
function loginUser(name) { return new Promise(resolve => { userFile = "users/" + name + ".wgd"; fs.readFile(userFile, "utf8", function(err, data) { if (err) { //there was an error accessing the file if (err.errno === -4058) { //the file was not found, the user is new to the gam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n let loginID = \"\";\n let loginPassword = \"\";\n\n console.log(\"-----------------------------\");\n console.log(\"LOGIN\");\n console.log(\"-----------------------------\");\n\n loginID = readline.question(\"Please enter your ID:\\n>> \");\n\n if (loginID === \"quit\") {...
[ "0.60165143", "0.5744767", "0.5579064", "0.5572269", "0.5552662", "0.5549798", "0.55027175", "0.5472911", "0.5458369", "0.54406816", "0.54368323", "0.54232264", "0.5394335", "0.5393893", "0.536738", "0.5338939", "0.53236425", "0.5321555", "0.53012186", "0.5293461", "0.5279433...
0.7033096
0
a function to append a solved phrase object to the user profile
function appendSolvedPhrase(object) { return new Promise(resolve => { var dataString = JSON.stringify(object) + "\n"; fs.appendFile(userFile, dataString, function(err) { if (err) { console.log(err); resolve(err); return; } resolve("user file updated successfully"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadPhrases(friendo) {\n this.phrasebook.populate(friendo)\n }", "function savePhrase (app, phrase) {\n setData(app, Object.assign({}, getData(app), {\n lastPhrase: Object.assign({}, getLastPhrase(app), _.omitBy(phrase, _.isUndefined)),\n }));\n}", "function savePhrase (app, phrase) {\n setData(app, ...
[ "0.5766199", "0.5729421", "0.57260174", "0.5536576", "0.5525098", "0.55031455", "0.5479334", "0.5447662", "0.53937757", "0.53633016", "0.53400594", "0.5328028", "0.5317431", "0.5289503", "0.52876955", "0.527635", "0.5257422", "0.5254801", "0.5252562", "0.52501804", "0.5249024...
0.66110206
0
Return the locale in the following order: 1. Locale cached in local storage. If not, then 2. Locale determined by brower language
static getCurrentLocale() { let cachedLocale = sharedStore.getPersistentVariable( SharedStoreKeys.LOCALE ); if (!lodash.isNil(cachedLocale)) { console.log(`Use cached locale ${cachedLocale} instead.`); return cachedLocale; } let currentLocale = intl.determineLocale({ urlLoc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAlternativeLocale()\n {\n var lang = window.navigator.userLanguage || window.navigator.language;\n \n lang = lang.replace('-','_'); // replace en-US to en_GB\n \n //we share the same resources dor en_GB and en US , if there\n //is en_US resource available remove the last part of cond...
[ "0.71356773", "0.71309924", "0.70580316", "0.7056746", "0.7011818", "0.7003012", "0.6933537", "0.69091105", "0.68765354", "0.6875056", "0.68703204", "0.6802529", "0.67813754", "0.67795765", "0.6759694", "0.6755394", "0.675369", "0.6736372", "0.6730585", "0.66938394", "0.66867...
0.7672363
0
Infers the cryptofiat rates for each exchage using the FX rates The computes median to get the final values
getMedianRatesWithForexInferredRates(exchangeCurrencyMap, usdExchangeRates, exchanges, denoms) { const medianDenoms = {}; for (let denomsIdx = 0; denomsIdx < denoms.length; denomsIdx += 1) { const denom = denoms[denomsIdx]; const rates = []; for (let exchangesIdx = 0; exchangesIdx < exchanges....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getForexExchangeRates(denoms) {\n const exchangeRates = await forex.getForexRates(denoms);\n const medianRates = {};\n for (let i = 0; i < denoms.length; i += 1) {\n const denom = denoms[i];\n const rates = [];\n for (let j = 0; j < 3; j += 1) {\n if (exchangeRates[j].error ===...
[ "0.6415417", "0.56309956", "0.5361683", "0.52084595", "0.5195723", "0.51941687", "0.5185212", "0.5181059", "0.51784533", "0.51681143", "0.5154752", "0.5150222", "0.513639", "0.51324946", "0.51267457", "0.5124279", "0.5115009", "0.510804", "0.505304", "0.5036956", "0.50310653"...
0.67143553
0
This function is necessary to expand pagination for bookings list
function expandBookingsListPagination(pagination) { page = pagination.current; var pagination_container = $('<div>', { class: 'booking-list-pagination' }); if (pagination.last != 1) { var previous = $('a[data-page].hidden.fake').clone(true); previous.removeClass('hidden').remov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paginationBuilder() {\n //reset paginator\n $(\".paginationHolder\").empty()\n //prev button\n $(\".paginationHolder\").append(\"<li><a id='pgPrev' aria-label='Previous'><span aria-hidden='true'>&laquo;</span></a></li>\");\n totalPages = 0;\n do {\n tot...
[ "0.6624962", "0.65741515", "0.65618235", "0.6541778", "0.65383255", "0.65240425", "0.6494118", "0.64829", "0.6466716", "0.6445731", "0.6360845", "0.6333875", "0.6312309", "0.6303643", "0.628302", "0.6271762", "0.6260914", "0.6253412", "0.6248877", "0.6231261", "0.6226477", ...
0.7771485
0
This function is necessary to expand contract list from ajax response
function expandContractList(contract_list) { var tbody = $('#booking-list-table > tbody'); tbody.children().remove(); $.each( contract_list, function(key, contract) { var row = $('tr.hidden.fake').clone(); row.removeClass('fake'); var need_to_sav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubcontractorsPend() {\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'getSubcontractors',\n },\n complete: function (data) {\n if (data.responseJSON) {\n createSubDropdownPend(data.responseJSON);\n //createSubDropdownI...
[ "0.6294341", "0.62397414", "0.6166276", "0.61576486", "0.60954356", "0.5993125", "0.5947203", "0.58470756", "0.5846098", "0.5796717", "0.5771143", "0.5760865", "0.57397413", "0.5734235", "0.5733852", "0.564979", "0.56274045", "0.5616777", "0.5606733", "0.55993474", "0.5596307...
0.6818859
0
This function is necessary to change page on bookings list page
function changeBookingListPage(event) { event.preventDefault(); var value = $(this).data('page'); if (value != '' & value != page) { page = value; getBookingListLimited(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeBookingListStatusFilter(event)\n{\n event.preventDefault();\n page = 1;\n\n getBookingListLimited();\n}", "function reload_book_page() {\n\twrapper.reload_book_page();\n}", "function changePage(n) {\n currentPage = Math.min(Math.max(1, n), totalPages);\n displayVenueList();\n}", ...
[ "0.65174073", "0.6508625", "0.65029955", "0.6486725", "0.64806575", "0.6397813", "0.6275496", "0.6273003", "0.6250929", "0.6214526", "0.62025017", "0.6179903", "0.6172979", "0.61647344", "0.61613923", "0.61562836", "0.6121895", "0.6110987", "0.60943586", "0.6086947", "0.60790...
0.6919878
0
This function is necessary to show current columns of bookings list
function showBookingListColumn(event) { var column_list = $(this).val(); var th_list = $('th[data-role]'); var td_list = $('td[data-role]:not([data-role="actions"])'); var show_list_th = $('th[data-role]').filter( function() { var role = $(this).data('role'); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showColumns(){\n\t\n\t//loop through the column filter inputs to determine which ones are checked or not to display the areas\n\tjQuery(\"#column_filter\").children('ul').children('li').each(function(){\n\t\tinitColumn(jQuery(this).children('input').attr('id'));\n\t});\t\n}", "function presentBookedTabl...
[ "0.62576175", "0.6200538", "0.6167468", "0.6073207", "0.5915543", "0.5885673", "0.5885673", "0.58514446", "0.58171034", "0.5777899", "0.5774088", "0.576598", "0.576598", "0.5746171", "0.5730347", "0.56802845", "0.56612915", "0.56213474", "0.5600483", "0.5589002", "0.55807114"...
0.62986267
0
Disconnect & reconnect the exchange adapter
reconnect () { this.adapter.reconnect() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disconnect() {\n try {\n if (this._connector) {\n this._connector.$disconnect();\n }\n } catch(e) {\n /* ignore any error */\n }\n }", "disconnect() {\n this.shouldReconnect = false;\n this._listenersMap = new Map();\n this.closeAllConnections()\n }", "function disconn...
[ "0.7172206", "0.68773276", "0.6753309", "0.67228144", "0.6712494", "0.6646281", "0.6593803", "0.65832835", "0.65178", "0.64700115", "0.64700115", "0.64700115", "0.64558995", "0.64490235", "0.6448408", "0.6448408", "0.6438095", "0.64267164", "0.6417343", "0.641672", "0.6394946...
0.70086807
1
Load Triggers from Database to memory
function loadTriggers(){ Triggers.find({}, function (err, triggers) { if (err) throw err; triggers.forEach(function(elem){ triggerObj[elem.triggerId] = elem.triggers; }); console.log("TRIGGER OBJ UPDATED", triggerObj); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restoreTriggers () {\n\n var triggers = knownTriggers.slice() // Shallow copy, that's all we need\n triggers[0] = '[' + triggers[0] + ']' // Mark the first trigger as being active\n fs.writeFileSync(pathTo('trigger'), triggers.join(' ') + '\\n', 'utf8')\n}", "registerTriggerDictionary(triggerDef) {\n...
[ "0.62080115", "0.5842482", "0.5610336", "0.557538", "0.5435532", "0.54010713", "0.52023166", "0.5198059", "0.51690125", "0.51622474", "0.5160254", "0.51146924", "0.50895333", "0.5077672", "0.5073889", "0.50367963", "0.50005156", "0.4974617", "0.49717185", "0.48950967", "0.489...
0.7418832
0
this is a collapsible entry in TableMonthly or TableDaily key is either "monthly" or "daily" allcanteens is obtained using int_ofs_canteen_get_all idx is the index to allcanteens allstalls is obtained using int_ofs_stall_get_all alldata is obtained using int_ofs_report
function newReportEntry(key, allcanteens, idx, allstalls, alldata){ var res; var pCount; if(key=="monthly"){ res = tmpl_mentry.clone(); pCount=12; } else if(key=="daily"){ res = tmpl_dentry.clone(); pCount=10; } // class for stall entries that belong to this c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setMonthTable(state, {ledger}) {\n ledger.bill.forEach(e => {\n let item = {year: e.year, month: e.month, monthKey: e.monthKey};\n if(e.month && e.year && ledger.monthTable.findIndex(i => (i.year === e.year && i.month === e.month)) < 0) {\n ledger.monthTable.push(item);\n }\n ...
[ "0.5416831", "0.537769", "0.5367997", "0.50359833", "0.501472", "0.4978058", "0.49699786", "0.491658", "0.4910937", "0.49077654", "0.48736587", "0.48674357", "0.485229", "0.48449916", "0.4809948", "0.48074925", "0.48000965", "0.47734338", "0.47720295", "0.4769045", "0.4768790...
0.6129097
0
Load the statistics for the given country code and limit to pollutants co and pm25. The response will come as an object, containing an array of "results". We will select the first result and save it to this.state.measurementData. Full response:
getCountryStatistics(countryCode) { // If there is no country selected, we do not make a call to the API if(countryCode === '-1' || countryCode === undefined) return; const url = `https://api.openaq.org/v1/measurements?country=${countryCode}&parameter[]=co&parameter[]=pm25`; fetch(url) .then(res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestCountrySpecificData() {\n DevSearchStore.getCountryDataFromServer();\n DevSearchStore.getDeveloperCountByCountryFromServer();\n DevSearchStore.getDeveloperCountByLanguageFromServer();\n}", "function getParksData(countryCodes, maxResults) {\n const params = {\n api_key: userApiKey,\n ...
[ "0.5919645", "0.5850806", "0.5848645", "0.58224773", "0.56833726", "0.56752646", "0.56226", "0.5607433", "0.55067724", "0.5484796", "0.5466415", "0.54525155", "0.5445553", "0.5418367", "0.5408875", "0.540343", "0.5393988", "0.5373203", "0.5367475", "0.5342871", "0.53363085", ...
0.69508326
0
Description: You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : Late. 'P' : Present. A student could be rewarded if his attendance record doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late). Y...
function checkRecord(s) { let absent = 0; for (let i = 0; i < s.length; i++) { if (s[i] === 'A') { absent++; } if (s[i] === 'L' && s[i + 1] === 'L' && s[i + 2] === 'L') { return false; } if (absent > 1) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ABCheck(str) { \n var components = str.toLowerCase().split('');\n for (i = 0; i < components.length; i++) {\n if ((components[i] === 'a') && ((components[i - 4] === 'b') || (components[i + 4] === 'b'))) {\n return true;\n } else if ((components[i] === 'b') && ((components[i - 4] === 'a') || (...
[ "0.650069", "0.62590116", "0.62522537", "0.62056565", "0.6090285", "0.6085533", "0.59437853", "0.5907846", "0.5905214", "0.5858399", "0.5817751", "0.58058345", "0.5802477", "0.57473046", "0.5735425", "0.57030344", "0.56715214", "0.56437", "0.5629172", "0.5621551", "0.5589375"...
0.74977857
0
Sign into the Twitter service Note that this service requires jsSHA for generating HMACSHA1 Oauth 1.0 signatures
static twitter(clientId, clientSecret, options) { return this.ifPlugin(() => { return new Promise((resolve, reject) => { let redirect_uri = 'http://localhost/callback'; if (options !== undefined && options.hasOwnProperty('redirect_uri')) { redirect_uri = options.redirect_uri; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authorizeTwitter() {\n var callbackUrl = window.location.origin + \"/social-media-service/twitter/callback\";\n offerService.post(\"/social-media-service/twitter/authorize\", { 'callbackUrl' : callbackUrl});\n }", "function auth() {\n if (twitter.length === 0) return;\n window.locatio...
[ "0.56310016", "0.5598618", "0.5466962", "0.5440961", "0.5440484", "0.5407709", "0.5382503", "0.53660756", "0.5255007", "0.5237305", "0.52298635", "0.52067596", "0.5194053", "0.5193888", "0.5171509", "0.5133205", "0.5111152", "0.50969964", "0.50863165", "0.5075701", "0.5065476...
0.6368237
0
handle example tabs prevent scrolling to hidden inputs, activate related content on click
function initTabs() { $('label').click(function (e) { e.preventDefault(); var forEl = $(this).attr('for'); $('#' + forEl).trigger('click'); $('.example__content[data-tab=' + forEl + ']').addClass('is-active').siblings().removeClass('is-active'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onClickCity(e){\n\n const TABS = document.getElementsByName(\"tabs\")[0];\n\n let target = e.target;\n\n // USE EVENT DELEGATION SO WE ONLY LISTEN TO CLICKS ON THE PARENT ELEMENT INSTEAD OF EVERY CHILD\n if (target.classList.contains(\"block\")){\n\n let tabIndex = target.dataset.index;\...
[ "0.6548724", "0.64952534", "0.6449355", "0.64330685", "0.6422171", "0.6422171", "0.6422171", "0.64051616", "0.64009017", "0.6390337", "0.6370484", "0.6369004", "0.6367047", "0.636053", "0.62424445", "0.6196127", "0.6180744", "0.6178367", "0.61629635", "0.61593205", "0.6155847...
0.6619864
0
Close submenu from anywhere in the page
function closeSubmenu(e) { let isClickInside = menu.contains(e.target); if (!isClickInside && menu.querySelector('.subMenuActive')){ menu.querySelector('.subMenuActive').classList.remove('subMenuActive'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeSubmenu(e) {\n let isClickInside = menu.contains(e.target);\n \n if (!isClickInside && menu.querySelector(\".submenu-active\")) {\n menu.querySelector(\".submenu-active\").classList.remove(\"submenu-active\");\n }\n }", "function closeSubmenu(e) {\r\n const isClickInside = e.tar...
[ "0.76592255", "0.7458401", "0.7455952", "0.7442061", "0.7144081", "0.7119417", "0.71170735", "0.7108781", "0.7059592", "0.70540816", "0.6982284", "0.6973305", "0.69183195", "0.68659866", "0.6853499", "0.683143", "0.68126905", "0.6810725", "0.671804", "0.6701522", "0.6678019",...
0.7467604
1
set images, sounds, and objects from json to DATA variable
function set_data() { var imgs = json_data[0]; var snds = json_data[1]; var objs = json_data[2]; for (var key in imgs) DATA.IMG[key] = imgs[key]; for (var key in snds) DATA.SND[key] = new Howl(snds[key]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadNotesFromJSON(data) {\n\t\ttuneJSON = data;\n\t\tloadCanvas();\n\t}", "preloadJson()\n {\n currentScene.load.json('dialogues', 'data/SingleDialogues.json');\n currentScene.load.json('notes', 'data/Notes.json');\n }", "function setImages(data){\r\n for(i=0;i<data.length; i++)...
[ "0.65948945", "0.63781154", "0.6357734", "0.6306911", "0.6163756", "0.6148628", "0.6143146", "0.60952646", "0.6092761", "0.60688955", "0.60382414", "0.6034551", "0.60344183", "0.6008988", "0.5999183", "0.5989198", "0.5972518", "0.5963167", "0.59488636", "0.59237075", "0.59137...
0.86442405
0
load all object files
function load_objs() { const OBJFILES = Object.values(json_data[2].files); // fix paths for (var i in OBJFILES) OBJFILES[i] = 'scripts/data/' + OBJFILES[i]; (function next(i=0) { if (i < OBJFILES.length) { var script = document.createElement('script'); script.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFiles() {\n loadConfig();\n loadDictionary();\n loadBlacklist();\n loadBonusPhrases();\n\n console.log('All files loaded');\n}", "loadObjects (state, file) {\n const loader = new FileLoader(file)\n loader.loadSync()\n Vue.set(state, file, loader.objects)\n }", "Loa...
[ "0.7042493", "0.66957265", "0.6638399", "0.63656056", "0.6335406", "0.63335794", "0.630253", "0.62386715", "0.6212175", "0.6212175", "0.6200558", "0.61688614", "0.6128338", "0.60884523", "0.60830307", "0.60490954", "0.60191345", "0.6007197", "0.5935038", "0.5919794", "0.59015...
0.7163506
0
Promise API This will just send email for obj data
function sendEmail (obj) { return transporter.sendMail(obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function sendEmail(){\n\n \n \n let panicItem = { \n itemName : this.document.getElementById(\"itemName\").value,\n storeName : localStorage.getItem(\"locationName\"),\n }\n \n console.log(panicItem);\n let requestOptions = {\n method : \"POST\",\n body : JSON.st...
[ "0.69235617", "0.6907394", "0.6896294", "0.6876363", "0.68614036", "0.68361723", "0.68197876", "0.67952955", "0.67912436", "0.6787733", "0.67859787", "0.67546105", "0.6751559", "0.67263705", "0.6717883", "0.67077976", "0.6668932", "0.6621621", "0.6620559", "0.6617534", "0.658...
0.72987103
0
Appends high temperatures to the page
function getMaxTemp() { for (var i = 0; i < forecastDays; i++) { var maxTemp = response.query.results.channel.item.forecast[i].high; $("#day" + i + "Max").append("High: " + maxTemp + "°F"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async updateTemp() { \n\t\tlet weatherData = await Weather.getWeather();\n document.querySelector(\".wind-dir\").innerHTML = `${weatherData[0].wind_deg} <sup>o</sup>`;\n document.querySelector(\".wind-speed\").innerText = `${weatherData[0].wind_speed} km/h`;\n\t\tlet forecasts = Array.fr...
[ "0.62704253", "0.6058485", "0.6012282", "0.5961496", "0.59508514", "0.59425664", "0.59354544", "0.5933685", "0.5915823", "0.5888748", "0.58860755", "0.58827555", "0.58683074", "0.5856022", "0.5852248", "0.58314794", "0.5821224", "0.58147484", "0.580472", "0.5775664", "0.57688...
0.634729
0
Appends low temperatures to the page
function getMinTemp() { for (var i = 0; i < forecastDays; i++) { var minTemp = response.query.results.channel.item.forecast[i].low; $("#day" + i + "Min").append("Low: " + minTemp + "°F"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTemp(weatherData) {\n var tempKelvin = weatherData;\n // console.log(tempKelvin);\n var degFInt = Math.floor(tempKelvin);\n // console.log(degFInt);\n $temp2.html(degFInt + \"\\u00B0F\");\n}", "function determineTempRange(temperature, body) {\n if (body.classList.length > 0) {\n body.classLi...
[ "0.6024801", "0.596786", "0.59659857", "0.59620273", "0.5908571", "0.5843213", "0.5790575", "0.57510644", "0.57178974", "0.57052207", "0.5693821", "0.56795233", "0.567308", "0.5634452", "0.5614793", "0.5590577", "0.55848217", "0.55814445", "0.55698454", "0.55536604", "0.55430...
0.6100931
0
cancel frame wraps cancelAnimationFrame. see game/helpers/animationframe.js for more information
cancelFrame() { cancelAnimationFrame(this.frame.count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stop() {\n cancelAnimationFrame(this.frameId)\n }", "function h$animationFrameCancel(h) {\n if(h.handle) window.cancelAnimationFrame(h.handle);\n if(h.callback) {\n h$release(h.callback)\n h.callback = null;\n }\n}", "function h$animationFrameCancel(h) {\n if(h.handle) windo...
[ "0.8333774", "0.8140448", "0.8140448", "0.8140448", "0.7988345", "0.79285353", "0.7751668", "0.77230346", "0.76592374", "0.7658767", "0.756589", "0.74864143", "0.7475821", "0.7450764", "0.73897076", "0.7240338", "0.72113454", "0.7135469", "0.68631923", "0.67323977", "0.667845...
0.90862316
1
meter to feet don't need to do the opposite conversion, default is meter
function meterToFeet(meter){ var feetLen = meter * 3.28084 return feetLen.toFixed(2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toFeet(meter) {\n return meter * 3.28;\n }", "function meterstoFeet(meters) {\n //calculate meters to feet\n let f = meters * 0.3048;\n console.log(f);\n // round to nearest integer\n f = Math.floor(f);\n return f;\n}", "function convertMeters(meters) {\...
[ "0.80999744", "0.78016645", "0.75374144", "0.72302467", "0.7208476", "0.7208476", "0.71529055", "0.70696014", "0.7027754", "0.70032257", "0.6973592", "0.69583416", "0.6941998", "0.6908032", "0.68784684", "0.68497145", "0.68176794", "0.6758793", "0.6736954", "0.6709329", "0.66...
0.7895585
1
Run check of lazy elements after timeout
function timeoutLazyElements() { if (waitingMode > 1) { waitingMode = 1; checkLazyElements(); setTimeout(timeoutLazyElements, options.throttle); } else { waitingMode = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "waitLoadingComplete() {\n cy.log('Common.Editor.waitLoadingComplete');\n this.element\n .find('.side-panel__content-tab-nav', {timeout: 30000})\n .should('exist');\n }", "idle() {\n return (0, _waitFor.default)(() => this.length === 0, {\n timeout: 2 * 60 * 1000 // ...
[ "0.6390248", "0.63605356", "0.61713314", "0.612799", "0.60741824", "0.6072493", "0.5878176", "0.58475894", "0.5773171", "0.57708526", "0.5765213", "0.57430166", "0.57396144", "0.5737326", "0.5723826", "0.571958", "0.57110244", "0.5709455", "0.5702908", "0.5688539", "0.5684451...
0.7072082
1
Loading of all elements
function forceLoadAll() { checkLazyElements(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadItens()\r\n{\r\n\tfor (let i = 0; i < todo.length; i++) \r\n\t{\r\n\t\taddItemToDOM(todo[i]);\r\n\t}\r\n\tfor (var i = 0; i < completed.length; i++) {\r\n\t\taddItemToDOM(completed[i],true);\r\n\t}\r\n\r\n}", "loadElements()\n {\n\n this.el = {};\n\n document.querySelectorAll('[id]'...
[ "0.70019704", "0.6916765", "0.68347204", "0.6629133", "0.654732", "0.6511375", "0.6466257", "0.63995814", "0.6386588", "0.63798255", "0.6357115", "0.63481236", "0.6325477", "0.6320996", "0.6320996", "0.6320996", "0.63055354", "0.62939435", "0.62853754", "0.6278007", "0.626770...
0.7139795
1
change current topic on click if not current was clicked
onTopicClick(topic) { if (topic.rowid === this.currentTopic) { return; } this.currentTopic = topic.rowid; localStorage.setItem('currentTopic', this.currentTopic); this.loadSelections(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateActiveTopic(topic) {\n if (activeTopic = topic) {\n node.classed(\"g-selected\", function(d) { return d === topic; });\n updateMentions(findMentions(topic));\n d3.select(\"#g-topic\").text((topic.count > maxMentions ? \"A sampling of \" : topic.count || \"No\") + \" mentions of \" + topic....
[ "0.69641984", "0.6934934", "0.6909382", "0.68960446", "0.6836642", "0.6754193", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", "0.6739285", ...
0.7852499
0
change current domain on click. if current domain was clicked, deselect current domain to apply filter for all domains
onDomainClick(domain) { if (domain.rowid === this.currentDomain) { this.currentDomain = null; } else { this.currentDomain = domain.rowid; } localStorage.setItem('currentDomain', this.currentDomain); this.loadSelections(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processClick(){\n chrome.storage.sync.get(null, function(r) {\n var domains = r.onceClickedDomains;\n // was domain clicked before ?\n if(domains.indexOf(torpedo.domain) > -1){\n // remove domain from once clicked domains\n var index = domains.indexOf(torpedo.domain);\n doma...
[ "0.6395066", "0.63208", "0.6063327", "0.6006022", "0.5856009", "0.57357967", "0.55444014", "0.55362296", "0.54691344", "0.54305565", "0.54210454", "0.5327901", "0.5311571", "0.5299805", "0.52849364", "0.5264262", "0.5223584", "0.5191736", "0.51379246", "0.5090946", "0.5047583...
0.71657676
0
Adding any node that matches returns true for to the document fragment frag (or DOM node)
function collectNodes(n, matches, frag) { if (n) { // console.log("Entering: " ); console.log(n); var c = n.firstChild; while (c != n.lastChild ) { // NOTE: Moving it to the fragment makes it forget its next sibling // So make sure we remember it for it to be updated later var next = c.nextSibling; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findAndAdd(n, matches) {\n\tif (! n || ! n.parentNode) return;\n\tif (! matches) matches = function(n) { return true; };\n\tvar df = document.createDocumentFragment();\n\tcollectNodes(n, matches, df);\n\t// for (var i=0; i<df.childNodes.length; i++) {\n\t//\tconsole.log(df.childNodes[i]);\n\t// }\n\tn.par...
[ "0.6859318", "0.56862277", "0.56280375", "0.5591901", "0.54073644", "0.53477037", "0.52901846", "0.5184381", "0.51714957", "0.5150812", "0.5141374", "0.51266193", "0.5099968", "0.50896317", "0.5063089", "0.5029863", "0.50173664", "0.5014125", "0.50129795", "0.50129795", "0.50...
0.60309035
1
Find and add nodes satisfying a given critereon as children of node n's parent (if it has one)
function findAndAdd(n, matches) { if (! n || ! n.parentNode) return; if (! matches) matches = function(n) { return true; }; var df = document.createDocumentFragment(); collectNodes(n, matches, df); // for (var i=0; i<df.childNodes.length; i++) { // console.log(df.childNodes[i]); // } n.parentNode.appendChild(df...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findChildren(person){\n let foundChildren = people.filter(function(person1){\n if (person1.parents.includes(person.id)){\n return true;\n }\n else{\n return false;\n }\n })\n return foundChildren + findChildren(foundChildren);\n\n }", "...
[ "0.5985663", "0.58141285", "0.57681227", "0.5640029", "0.55391926", "0.55293787", "0.532773", "0.5240642", "0.5237579", "0.5228534", "0.5226861", "0.5226861", "0.5223694", "0.5221314", "0.52001226", "0.5189241", "0.51778644", "0.513938", "0.5133433", "0.5079203", "0.50646377"...
0.6166587
0
create an account with application logic. This will automatically create an AnalyticsProfile for the user as well. See example query at scripts/create_usr.sql
function create(opts, callback) { var db = opts.db; var username = opts.username; var password = opts.password; var email = opts.email; var photoUrl = opts.photoUrl; if (!photoUrl) photoUrl = faker.image.avatar(); var ts = String.format("(NOW() - '{0} seconds'::INTERVAL)", faker.random.number({min:0, max:864...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAccount(){\n\tconsole.log(\"\\n-------------------------CREATE ACCOUNT------------------------\\n\")\n\n\t var name = readline.question(\"Enter your Username -: \");\n\t var emailid = readline.question(\"Enter your EmailID -: \");\n\t var password = readline.question(\"Ente your Passowrd-:\");\n\n\t...
[ "0.6961703", "0.6813749", "0.6683205", "0.6557075", "0.6549549", "0.6543711", "0.63865685", "0.63466215", "0.62918925", "0.62490153", "0.61619306", "0.6154375", "0.6121107", "0.610897", "0.6079881", "0.6059226", "0.6055104", "0.6053576", "0.6046563", "0.6044488", "0.60430497"...
0.68693924
1
when video player is ready
function videoReady() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerReady(event) {\n Controller.load_video();\n }", "function onPlayerReady(event) {\n event.target.loadVideoById(link,0,'medium');\n event.target.playvideo();\n\t invokeAtIntervals();\n\n }", "function onPlayerReady(event) {\n videosLoaded++;\n allVideosLoaded();\n}", "...
[ "0.8423173", "0.818932", "0.8186375", "0.8149145", "0.80192137", "0.78998137", "0.78872204", "0.7855524", "0.7851457", "0.7826417", "0.7826417", "0.7826417", "0.78121", "0.78118783", "0.78102285", "0.77877414", "0.7772607", "0.77570444", "0.7733989", "0.7725732", "0.7724041",...
0.8744644
0
Creates a flag that cancels the command.
static cancel() { return new Flag("cancel"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancel() {\n\t\tif (!this.state.executing) {\n\t\t\tthis.opts.cancel && this.opts.cancel();\n\t\t}\n\t}", "cancel() {\n\t\tif (!this.state.executing) {\n\t\t\tthis.opts.cancel && this.opts.cancel();\n\t\t}\n\t}", "cancel() {}", "cancel() {\n return this.channel.basicCancel(this.tag)\n }", "cancel() {\n...
[ "0.6370389", "0.6370389", "0.61823356", "0.61412287", "0.6116768", "0.6116525", "0.6116525", "0.6088027", "0.5994388", "0.5988174", "0.5983495", "0.59390944", "0.5932438", "0.58651364", "0.5863811", "0.58558536", "0.58376276", "0.5831997", "0.5831997", "0.5831997", "0.5758284...
0.7716742
0
Creates a flag that retries with another input.
static retry(message) { return new Flag("retry", { message }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function continueOrRetryM_(fa, pf) {\n return P.chain_(fa, a => O.getOrElse_(pf(a), () => P.retry));\n}", "function continueOrRetry(pf) {\n return fa => continueOrRetry_(fa, pf);\n}", "function retry(count) {\n if (count === void 0) {\n count = -1;\n }\n return function (source) { return sour...
[ "0.5669625", "0.5548094", "0.55038124", "0.5306639", "0.52191126", "0.52190727", "0.52052945", "0.5177984", "0.5177984", "0.5128601", "0.50871134", "0.50808215", "0.50626045", "0.5022144", "0.5003749", "0.49664286", "0.4929379", "0.49157244", "0.48585224", "0.48370513", "0.47...
0.7048272
0
Creates a flag that acts as argument cast failure with extra data.
static fail(value) { return new Flag("fail", { value }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function castArgument(arg) {\n \"use strict\";\n if (arg.match(/^-?\\d+$/)) {\n return parseInt(arg, 10);\n } else if (arg.match(/^-?\\d+\\.\\d+$/)) {\n return parseFloat(arg);\n } else if (arg.match(/^(true|false)$/i)) {\n return arg.trim().toLowerCase() === \"true\" ? true : fals...
[ "0.5333611", "0.53042537", "0.5294058", "0.5186874", "0.5034279", "0.5034279", "0.49766782", "0.49309564", "0.49309564", "0.4913218", "0.4913218", "0.4848306", "0.47885582", "0.47885582", "0.47884983", "0.47577545", "0.47547966", "0.4751746", "0.47213736", "0.47166803", "0.47...
0.6487395
0
Checks if a value is a flag and of some type.
static is(value, type) { return value instanceof Flag && value.type === type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tokenValueIs(val, type)\n{\n\treturn (val & type) == type\n}", "function isBoolean(val) {\n return typeof val == \"boolean\";\n}", "function isOk(val) {\r\n return typeof val === \"boolean\" && val;\r\n }", "function isBoolean (value) {\n var n = typeof (value)\n if (n === 'boolean') {\n ...
[ "0.68529195", "0.6389468", "0.6303063", "0.61710817", "0.6148639", "0.6148639", "0.6141912", "0.61270046", "0.61032534", "0.6051179", "0.6006244", "0.5998482", "0.59737736", "0.5962372", "0.59424955", "0.58775693", "0.5849425", "0.58464515", "0.5842037", "0.58336306", "0.5833...
0.8007965
0
Create visuals array from the report visuals and update the HTML
function createVisualsArray(reportVisuals) { // Remove all visuals without titles (i.e cards) LayoutShowcaseState.layoutVisuals = reportVisuals.filter(function (visual) { return visual.title !== undefined; }); // Clear visuals list div $('#visualsList').empty(); // Build checkbox html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderVisuals() {\n\n // render only if report and visuals initialized\n if (!LayoutShowcaseState.layoutReport || !LayoutShowcaseState.layoutVisuals)\n return;\n\n // Get models. models contains enums that can be used\n const models = window['powerbi-client'].models;\n\n // Get embed...
[ "0.67927116", "0.6202751", "0.60661453", "0.596584", "0.5922759", "0.58169895", "0.57754993", "0.57222766", "0.56945115", "0.56898713", "0.56634575", "0.5659918", "0.56545615", "0.564496", "0.5644392", "0.56412214", "0.563776", "0.56363374", "0.5620956", "0.5586644", "0.55627...
0.7419389
0
Render all visuals with current configuration
function renderVisuals() { // render only if report and visuals initialized if (!LayoutShowcaseState.layoutReport || !LayoutShowcaseState.layoutVisuals) return; // Get models. models contains enums that can be used const models = window['powerbi-client'].models; // Get embedContainer widt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n this.renderCells();\n this.paintCells();\n this.setFigures();\n }", "function setVisualStructure() {\n // Get contexts.\n const contextnames = [\n 'scape',\n 'glassBottle',\n 'bottleText',\n 'bottleWave',\n 'chart',\n 'blackBox',\n 'globe',\n ];\n\n u...
[ "0.65504634", "0.6527733", "0.6527733", "0.6382639", "0.6372556", "0.6334555", "0.6261418", "0.6228459", "0.6223228", "0.6221472", "0.6215493", "0.6214543", "0.6210856", "0.6210856", "0.6210856", "0.6210856", "0.6210856", "0.6210856", "0.6210856", "0.6198903", "0.6154149", ...
0.6863668
0
Update columns number and rerender the visuals
function onColumnsClicked(num) { LayoutShowcaseState.columns = num; setColumnButtonActive(num); renderVisuals(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n // columns shown, hidden or reordered\n this.init();\n }", "render() {\n // columns shown, hidden or reordered\n this.init();\n }", "renderContents() {\n // columns shown, hidden or reordered\n this.init();\n }", "renderContents() {\n // columns shown, hidden or reordered...
[ "0.66764396", "0.66764396", "0.6593815", "0.6593815", "0.6539963", "0.6452901", "0.63949835", "0.63332343", "0.6274367", "0.6267353", "0.6222928", "0.61790943", "0.61265427", "0.60973454", "0.6086873", "0.6071948", "0.60070884", "0.59866905", "0.5978632", "0.5977292", "0.5964...
0.7425996
0
Build visual checkbox HTML element
function buildVisualElement(visual) { var labelElement = document.createElement("label"); labelElement.setAttribute("class", "checkboxContainer checked"); var inputElement = document.createElement("input"); inputElement.setAttribute("type", "checkbox"); inputElement.setAttribute("id", 'visual_' + v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_checkbox(activity, index){\n return \"<input class=form-check-input type=checkbox value='' id=input\" + index + \">\\\n <label class='form-check-label' for='input'\" + index + \">\" + activity + \"</label><br>\";\n}", "function createCheckBox() {\n return $('<input />', {\n ...
[ "0.73125356", "0.71895367", "0.70760083", "0.69873285", "0.69224685", "0.6900508", "0.68843675", "0.6818287", "0.6784855", "0.67682886", "0.66756827", "0.6653065", "0.6628431", "0.6588443", "0.6586736", "0.65502936", "0.65352166", "0.6534241", "0.6490837", "0.6481818", "0.647...
0.7401508
0
Set clicked columns button active
function setColumnButtonActive(num) { const active_btn_class = "active-columns-btn"; $('#btnOneCol').removeClass(active_btn_class); $('#btnTwoCols').removeClass(active_btn_class); $('#btnThreeCols').removeClass(active_btn_class); if (num === ColumnsNumber.Three) { $('#btnThreeCols').addClas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onColumnsClicked(num) {\n LayoutShowcaseState.columns = num;\n setColumnButtonActive(num);\n renderVisuals();\n}", "function columnButtons() {\r\n\r\n new $.fn.dataTable.Buttons( table, {\r\n name: 'commands',\r\n buttons: ['colvis']\r\n } );\r\n\r\n t...
[ "0.6700151", "0.65026206", "0.64924", "0.6298033", "0.62475127", "0.6152195", "0.6078999", "0.6018718", "0.60065573", "0.5955196", "0.59278214", "0.59238696", "0.5819435", "0.5806008", "0.57954466", "0.57860243", "0.5780912", "0.5765818", "0.5757388", "0.5751611", "0.5738744"...
0.76694304
0
separate request for etherdelta balances
function getDeltaBalances(rqid) { let tokens2 = Object.keys(uniqueTokens); tokens2 = tokens2.filter((x) => {return !uniqueTokens[x].unlisted || showCustomTokens}); tokenCount = tokens2.length; let max = maxPerRequest if(!etherscanFallback) //etherscan request can't hold too much data max = ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finishedBalanceRequest()\r\n\t{\t\r\n\t\t//check if all requests are complete\r\n if (loadedED < tokenCount && loadedW < tokenCount /*|| loadedBid < 1*/) {\r\n return;\r\n }\r\n\t\t\r\n\t\tlet sumETH = 0;\r\n\t\tlet sumToken = 0;\r\n\t\t\r\n\t\tlet loadedBothBalances = false;\r\n\...
[ "0.6978022", "0.66596043", "0.6611414", "0.6495634", "0.64843124", "0.648023", "0.63873726", "0.6364955", "0.6320914", "0.62557405", "0.6195884", "0.6180772", "0.61766714", "0.61372685", "0.6123922", "0.6100856", "0.6099304", "0.60776705", "0.60419345", "0.6024485", "0.599815...
0.7055482
0
callback when balance request completes
function finishedBalanceRequest() { //check if all requests are complete if (loadedED < tokenCount && loadedW < tokenCount /*|| loadedBid < 1*/) { return; } let sumETH = 0; let sumToken = 0; let loadedBothBalances = false; if(loadedED >= tokenCount && loadedW >= ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBalance(callback){\n \n const api_data = {\n api_name:'/get-balance',\n coin:this.coin,\n api_key: this.apikey,\n password : this.api_password,\n };\n api_call.apiPostCall(api_data,{},callback);\n }", "async getBalance () {\n const ...
[ "0.710951", "0.6930129", "0.6892967", "0.6528672", "0.6517772", "0.64877546", "0.638367", "0.6380943", "0.6325674", "0.6256742", "0.624373", "0.6208534", "0.61446184", "0.61301637", "0.61089396", "0.6102627", "0.6091925", "0.60782844", "0.6077272", "0.60326517", "0.600759", ...
0.71000475
1
Stat repository collects statistic information over the application to be accesed by the user
function StatRepository() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStatistics () {\n return instance.get(base.dev + '/statistics')\n }", "function getUserStatistics() {\n var getUserStatUrl = config.serverURL + config.getUserStatistics; \n getRequest(getUserStatUrl, function(response) {\n $(\".recent-list-wrap .loading-icon\").hide();\n ...
[ "0.68513423", "0.65393543", "0.6508218", "0.63852596", "0.6294222", "0.6277326", "0.62584215", "0.6210148", "0.6164643", "0.6075903", "0.60609156", "0.6056822", "0.60564077", "0.6048737", "0.6030628", "0.6023256", "0.60016876", "0.60011375", "0.59971124", "0.59886795", "0.596...
0.73077667
0
alters the elements class name to add the CSS border styling
function addBorder() { this.className = 'border'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addBorderTopAndBottom(){\n this.addRemoveClass = 'slds-border_top slds-border_bottom';\n }", "function changeBorder() {\n // Gets the selected border value and assigns it to a variable\n var brdrVal = getValue(brdrSelect);\n\n // Switches on the brdrValue variable because the CSS\n...
[ "0.6856537", "0.67244035", "0.66477394", "0.6590528", "0.65314156", "0.64554715", "0.63564247", "0.63451123", "0.63343495", "0.6287918", "0.628289", "0.62825286", "0.62343794", "0.6232756", "0.62167764", "0.6188436", "0.613454", "0.6116851", "0.6116851", "0.6109911", "0.60965...
0.7608261
0
alters the elements class name to remove the CSS border styling.
function removeBorder() { this.className = 'noBorder'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCss() {\n\t\tif (element) {\n\t\t\telement.className = Command.css.base + \" \" + definition.css;\n\t\t}\n\t}", "function removeCssClass(el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break...
[ "0.7028296", "0.7023066", "0.68664074", "0.6838566", "0.68299603", "0.67784506", "0.6772586", "0.67683154", "0.6730463", "0.6730463", "0.6730463", "0.67299044", "0.6725315", "0.6719557", "0.66650486", "0.6648627", "0.66460824", "0.66460824", "0.66460824", "0.66460824", "0.664...
0.76734376
0
Steve's Code / Create a function named Car with one property named `manufactured_date`
function Car () { this.manufactured_date = Date.now(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Car(brand, model, dateOfProduction) {\r\n this.brand = brand;\r\n this.model = model;\r\n this.dateOfProduction = new Date(dateOfProduction);\r\n this.getYear = function () {\r\n return this.dateOfProduction.getFullYear();\r\n };\r\n}", "function Car(brand,year,km) {\n this.brand = brand;\n ...
[ "0.7078186", "0.63013875", "0.6261397", "0.6193909", "0.609007", "0.6001519", "0.5980875", "0.58525354", "0.5767546", "0.5759856", "0.5753231", "0.57513255", "0.5750675", "0.5701906", "0.5695309", "0.5688737", "0.56815463", "0.5680241", "0.565837", "0.5651435", "0.56110847", ...
0.78021395
1
Generates a fake message
function generateFakeMessage() { const ABC = 'abcdefghijklmnopqrstuvwxyz '.split(''); const MESSAGE_LENGTH_MIN = 40; const MESSAGE_LENGTH_MAX = 70; const messageLength = Math.floor(Math.random() * (MESSAGE_LENGTH_MAX - MESSAGE_LENGTH_MIN) + MESSAGE_LENGTH_MIN); let result = ''; for (let i = 0; i < mess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function message() {\n var insultGiv = insult[Math.floor((Math.random())* insult.length)]\n var choreGiv = chore[Math.floor((Math.random())* chore.length)]\n var commentGiv = comment[Math.floor((Math.random())* comment.length)]\n return `Wake up ${insultGiv}! You have to ${choreGiv} today. Get it done ...
[ "0.68065", "0.66114545", "0.65384215", "0.65124446", "0.6500725", "0.6468659", "0.6466326", "0.6462182", "0.64598423", "0.6447987", "0.636804", "0.6173774", "0.6142892", "0.6072086", "0.6046029", "0.6015136", "0.6011061", "0.5950928", "0.59456635", "0.5923766", "0.59228766", ...
0.78074867
0
Represents the current input state.
function InputState() { this.prefixRepeat = []; this.motionRepeat = []; this.operator = null; this.operatorArgs = null; this.motion = null; this.motionArgs = null; this.keyBuffer = []; // For matching multi-key commands. this.registerName = null; // Defaults to the unnam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get stateInput() {\n return this._state;\n }", "get stateInput() {\n return this._state;\n }", "function getState() {\n return currentState\n }", "function getState () {\n\t\treturn currentState;\n\t}", "function getState() {\n return currentState\n }", "st...
[ "0.7770101", "0.7770101", "0.70833707", "0.70286715", "0.6940036", "0.69152933", "0.6872475", "0.67603743", "0.6747217", "0.6703344", "0.66927624", "0.66369337", "0.66366374", "0.65914595", "0.6591038", "0.6591038", "0.6591038", "0.6591038", "0.6533652", "0.6533652", "0.65336...
0.7798126
1
Defines an external register. The name should be a single character that will be used to reference the register. The register should support setText, pushText, clear, and toString(). See Register for a reference implementation.
function defineRegister(name, register) { var registers = vimGlobalState.registerController.registers; if (!name || name.length != 1) { throw Error('Register name must be 1 character'); } if (registers[name]) { throw Error('Register already defined ' + name); } regist...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Register(name) {\n this.state = false; // false: not busy, true: busy\n this.manipulation = \"\";\n this.read = 0; // the instruction which read this register issue time\n}", "function register(mname, macro) {\n macros[mname] = macro;\n}", "function registerMe(callback) {\n register(\"RD1...
[ "0.658621", "0.5970256", "0.5651781", "0.5594736", "0.5485711", "0.54816073", "0.5406179", "0.5406179", "0.5379256", "0.5370239", "0.5340726", "0.5239051", "0.5239051", "0.51953983", "0.5144547", "0.51369476", "0.51165754", "0.51165754", "0.51165754", "0.5098337", "0.5048466"...
0.710059
1
vim registers allow you to keep many independent copy and paste buffers. See for an introduction. RegisterController keeps the state of all the registers. An initial state may be passed in. The unnamed register '"' will always be overridden.
function RegisterController(registers) { this.registers = registers; this.unnamedRegister = registers['"'] = new Register(); registers['.'] = new Register(); registers[':'] = new Register(); registers['/'] = new Register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineRegister(name, register) {\n var registers = vimGlobalState.registerController.registers;\n if (!name || name.length != 1) {\n throw Error('Register name must be 1 character');\n }\n if (registers[name]) {\n throw Error('Register already defined ' + name);\n }\...
[ "0.5801894", "0.5801894", "0.55739033", "0.54056174", "0.5105252", "0.50198", "0.49345276", "0.4900706", "0.4830857", "0.48039648", "0.47735444", "0.47680768", "0.47329926", "0.47286153", "0.4713393", "0.46962792", "0.4684629", "0.4653484", "0.46142277", "0.45971286", "0.4569...
0.6984783
1
Below are miscellaneous utility functions used by vim.js Clips cursor to ensure that line is within the buffer's range If includeLineBreak is true, then allow cur.ch == lineLength.
function clipCursorToContent(cm, cur, includeLineBreak) { var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); var maxCh = lineLength(cm, line) - 1; maxCh = (includeLineBreak) ? maxCh + 1 : maxCh; var ch = Math.min(Math.max(0, cur.ch), maxCh); return Pos(line, ch); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clipToLine(cm, curStart, curEnd) {\n var selection = cm.getRange(curStart, curEnd);\n // Only clip if the selection ends with trailing newline + whitespace\n if (/\\n\\s*$/.test(selection)) {\n var lines = selection.split('\\n');\n // We know this is all whitespace.\n l...
[ "0.60981554", "0.60981554", "0.57599235", "0.55053765", "0.5455966", "0.53698385", "0.5366901", "0.5362391", "0.53302556", "0.53117204", "0.52843404", "0.52843404", "0.5187242", "0.5187242", "0.5187242", "0.5187242", "0.5187242", "0.5187242", "0.5187242", "0.51856726", "0.515...
0.6107385
0
Updates the CodeMirror selection to match the provided vim selection. If no arguments are given, it uses the current vim selection state.
function updateCmSelection(cm, sel, mode) { var vim = cm.state.vim; sel = sel || vim.sel; var mode = mode || vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char'; var cmSel = makeCmSelection(cm, sel, mode); cm.setSelections(cmSel.ranges, cmSel.primary); updateFakeCurs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSelection(editorState, selection, forceSelection) {\n return EditorState.set(editorState, {\n selection: selection,\n forceSelection: forceSelection,\n nativelyRenderedContent: null,\n inlineStyleOverride: null\n });\n}", "function updateSelection(editorState, selection, forceSelecti...
[ "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63833773", "0.63584036", "0.63414174", "0.59227914", "0.59227914", "0.59014964", "0.59014964", "0.58650446", "0.5857013", "0.584985", "0.584985", "0.584985", "0....
0.68379515
1
Expand the selection to line ends.
function expandSelectionToLine(_cm, curStart, curEnd) { curStart.ch = 0; curEnd.ch = 0; curEnd.line++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extendToLineEnd() {\n if (isNullOrUndefined(this.start)) {\n return;\n }\n this.end.moveToLineEndInternal(this, true);\n this.upDownSelectionLength = this.end.location.x;\n this.fireSelectionChanged(true);\n }", "extendToNextLine() {\n if (isNullOrUndefined...
[ "0.788083", "0.77581507", "0.74397296", "0.72871864", "0.6951306", "0.6899558", "0.68299145", "0.6610413", "0.6600796", "0.65759873", "0.6490318", "0.64718", "0.6276113", "0.6191878", "0.614831", "0.6018647", "0.6015132", "0.601001", "0.6002979", "0.59990096", "0.5993777", ...
0.8015549
1
Extract the regular expression from the query and return a Regexp object. Returns null if the query is blank. If ignoreCase is passed in, the Regexp object will have the 'i' flag set. If smartCase is passed in, and the query contains upper case letters, then ignoreCase is overridden, and the 'i' flag will not be set. I...
function parseQuery(query, ignoreCase, smartCase) { // First update the last search register var lastSearchRegister = vimGlobalState.registerController.getRegister('/'); lastSearchRegister.setText(query); // Check if the query is already a regex. if (query instanceof RegExp) { return query...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseQuery(query, state) {\n var emptyQuery = 'x^'; // matches nothing\n\n if (query === '') { // empty string matches nothing\n query = emptyQuery;\n } else {\n if (state.regexp === false) {\n query = parseString(query);\n query = query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\...
[ "0.5907549", "0.57939714", "0.53301823", "0.4963186", "0.4963186", "0.4958732", "0.48577785", "0.48268503", "0.48200467", "0.47953197", "0.47935474", "0.47645918", "0.4764311", "0.47617614", "0.4745911", "0.4745911", "0.47397646", "0.47388467", "0.47292316", "0.47081676", "0....
0.7475791
1
Check if pos is in the specified range, INCLUSIVE. Range can be specified with 1 or 2 arguments. If the first range argument is an array, treat it as an array of line numbers. Match pos against any of the lines. If the first range argument is a number, if there is only 1 range argument, check if pos has the same line n...
function isInRange(pos, start, end) { if (typeof pos != 'number') { // Assume it is a cursor position. Get the line number. pos = pos.line; } if (start instanceof Array) { return inArray(pos, start); } else { if (end) { return (pos >= start && pos <= end...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (typeof end == 'number') {\n r...
[ "0.79374325", "0.7296724", "0.697672", "0.6344998", "0.61540985", "0.6092445", "0.6043595", "0.6010804", "0.5997589", "0.59401596", "0.5911913", "0.5867552", "0.5810559", "0.5810559", "0.5807077", "0.57435906", "0.57275623", "0.5724089", "0.5704426", "0.56859106", "0.56160474...
0.79079235
1
Repeats the last edit, which includes exactly 1 command and at most 1 insert. Operator and motion commands are read from lastEditInputState, while action commands are read from lastEditActionCommand. If repeatForInsert is true, then the function was called by exitInsertMode to repeat the insert mode changes the user ju...
function repeatLastEdit(cm, vim, repeat, repeatForInsert) { var macroModeState = vimGlobalState.macroModeState; macroModeState.isPlaying = true; var isAction = !!vim.lastEditActionCommand; var cachedInputState = vim.inputState; function repeatCommand() { if (isAction) { c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "redo() {\n if (this.canRedo()) {\n this.shouldSaveHistory = false;\n const { index, state } = this.stack[(this.position += 1)];\n this.onUpdate();\n\n this.editor.blocks.render({ blocks: state }).then(() => this.editor.caret.setToBlock(index, \"end\"));\n }\n }", "redo () {\n if (th...
[ "0.5387145", "0.53250295", "0.52919024", "0.50394565", "0.5010399", "0.49033743", "0.488878", "0.48368618", "0.48127455", "0.47964695", "0.47859222", "0.47736457", "0.47736457", "0.47518915", "0.47402057", "0.47274074", "0.46920738", "0.46697283", "0.4666963", "0.46506873", "...
0.77864
1
method to create the full URL, minus the topic optional boolean includeNav sets left navigation ON (single=true) if includeNav is true if includeNav is not set, no left navigation is set
function makeHelpURL(includeNav) { var context = "context="+helpContext; var nav = "single=true"; if (includeNav) { // when single is false, navigation pane appears nav = "single=false"; } return (contextPath + helpURL +"?" + nav + "&" + context + "&" + "topic="); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeOverviewTutorialURL(includeNav) {\r\n return (overviewTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function makeUseStudyTutorialURL(includeNav) {\r\n return (useStudyTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function make...
[ "0.6480522", "0.6095051", "0.5897472", "0.5767431", "0.575623", "0.5427077", "0.5363831", "0.5269973", "0.52148867", "0.51622564", "0.5041655", "0.49850196", "0.49648458", "0.4925407", "0.4888846", "0.48541772", "0.48236853", "0.48091012", "0.48063743", "0.48002806", "0.47785...
0.6584235
0
will open help window WITH left navigation useful for general calls to Help rather than contextsensitive help
function openHelpWindowWithNavigation(contextName) { var pageURL = makeHelpURL(true) + contextName; openWin(pageURL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayHelp() {\t\n\tvar win;\n\tvar baseWindow = window;\n\t\n\t// get mother of all windows \n\twhile (baseWindow.opener) {\t\t\n\t\tbaseWindow = baseWindow.opener;\t\t\n\t}\n\n\t/* PNI, MDO:\n\t * Variable top.helpUrl is set on each page, \n\t * so we know what help page is to be open with certain page...
[ "0.78757733", "0.7867985", "0.77683836", "0.75482655", "0.74767673", "0.7431416", "0.73423314", "0.7329939", "0.7304957", "0.7298727", "0.7268794", "0.719033", "0.70960724", "0.70905584", "0.7051864", "0.70459163", "0.7033491", "0.70270747", "0.682824", "0.6805277", "0.679610...
0.8002967
0
open users guide window (default; no navigation)
function openUsersGuideWindow(contextName) { var pageURL = makeUsersGuideURL() + contextName; openWin(pageURL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutorialBtn() {\n\twindow.open(tutorialLink);\n}", "homeOpen(){WM.open(windowName)}", "function back_teacher_page(){\n window.open(\"/user\",\"_self\");\n}", "function openHelp() {\n\twindow.open(\"help.html\", \"_blank\");\n}", "openHelpPage() {}", "function popup(url){\r\n\r\n\t// aww poor ...
[ "0.66553587", "0.6508325", "0.65024054", "0.6482389", "0.64266217", "0.63926804", "0.6368381", "0.63659495", "0.635264", "0.63327134", "0.63294244", "0.6260408", "0.6243892", "0.62423944", "0.6235774", "0.62270117", "0.6212931", "0.6198199", "0.618721", "0.6133643", "0.611983...
0.77972025
0
method to create the full URL for users guide
function makeUsersGuideURL(includeNav) { return (contextPath + usersguideURL + "#" + "pagemode=bookmarks" + "&" +"nameddest="); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get url() {\n return createUserUri(this.database.id, this.id);\n }", "function userProfileUrl() { return \"{{conf.reqUrl}}/api/userprofile/\"; }", "function makeOverviewTutorialURL(includeNav) {\r\n return (overviewTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "bu...
[ "0.6485833", "0.64434266", "0.6183541", "0.61494786", "0.61373585", "0.6123009", "0.61022663", "0.6097147", "0.60881025", "0.6084548", "0.60557425", "0.60547096", "0.5980611", "0.5968216", "0.5949702", "0.589635", "0.5864436", "0.58625156", "0.58534884", "0.58394486", "0.5832...
0.77462715
0
open tutorial window (default; no navigation)
function openOverviewTutorialWindow(contextName) { var pageURL = makeOverviewTutorialURL() + contextName; openWin(pageURL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutorialBtn() {\n\twindow.open(tutorialLink);\n}", "function openUseStudyTutorialWindow(contextName) {\r\n var pageURL = makeUseStudyTutorialURL() + contextName;\r\n openWin(pageURL);\r\n}", "function openDeployStudyTutorialWindow(contextName) {\r\n var pageURL = makeDeployStudyTutorialURL() ...
[ "0.80413836", "0.7559505", "0.73427856", "0.7198651", "0.7050049", "0.68200743", "0.67489594", "0.66982955", "0.6653832", "0.6646088", "0.6607553", "0.6551366", "0.64283264", "0.6410173", "0.64029795", "0.6386906", "0.63684916", "0.6348615", "0.63440037", "0.63248414", "0.629...
0.7700344
1
method to create the full URL for overview tutorial
function makeOverviewTutorialURL(includeNav) { return (overviewTutorialURL + "#" + "pagemode=bookmarks" + "&" +"nameddest="); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeUseStudyTutorialURL(includeNav) {\r\n return (useStudyTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function makeDeployStudyTutorialURL(includeNav) {\r\n return (deployStudyTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "functio...
[ "0.6632251", "0.64504975", "0.6390743", "0.59914076", "0.5967927", "0.5934963", "0.58914715", "0.58899826", "0.58876336", "0.5873809", "0.58352196", "0.58278424", "0.5754515", "0.57504743", "0.5745855", "0.57193476", "0.57107526", "0.57060444", "0.5684394", "0.56569093", "0.5...
0.75973284
0
open deploy study tutorial window (default; no navigation)
function openDeployStudyTutorialWindow(contextName) { var pageURL = makeDeployStudyTutorialURL() + contextName; openWin(pageURL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutorialBtn() {\n\twindow.open(tutorialLink);\n}", "function openUseStudyTutorialWindow(contextName) {\r\n var pageURL = makeUseStudyTutorialURL() + contextName;\r\n openWin(pageURL);\r\n}", "contClick() {\n // temporarily goes right to the workspace registration\n app.goto('/init/...
[ "0.734182", "0.69399285", "0.6797869", "0.67598534", "0.67195153", "0.6602174", "0.65975744", "0.648885", "0.64809763", "0.6437538", "0.63215095", "0.62773675", "0.62314254", "0.62229484", "0.6197448", "0.6099482", "0.6046357", "0.60454124", "0.6021318", "0.60056823", "0.5997...
0.7811206
0
method to create the full URL for deploy study tutorial
function makeDeployStudyTutorialURL(includeNav) { return (deployStudyTutorialURL + "#" + "pagemode=bookmarks" + "&" +"nameddest="); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeUseStudyTutorialURL(includeNav) {\r\n return (useStudyTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function makeOverviewTutorialURL(includeNav) {\r\n return (overviewTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function crea...
[ "0.65207076", "0.6488721", "0.6482425", "0.63904333", "0.6170576", "0.60727954", "0.60533535", "0.6029504", "0.60210377", "0.6017247", "0.5989141", "0.5940977", "0.5929198", "0.59209037", "0.5910948", "0.5893655", "0.5856339", "0.5825689", "0.582562", "0.58187586", "0.5802716...
0.7668716
0
open use study tutorial window (default; no navigation)
function openUseStudyTutorialWindow(contextName) { var pageURL = makeUseStudyTutorialURL() + contextName; openWin(pageURL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutorialBtn() {\n\twindow.open(tutorialLink);\n}", "function openOverviewTutorialWindow(contextName) {\r\n var pageURL = makeOverviewTutorialURL() + contextName;\r\n openWin(pageURL);\r\n}", "function openDeployStudyTutorialWindow(contextName) {\r\n var pageURL = makeDeployStudyTutorialURL() ...
[ "0.77293015", "0.7486938", "0.7309165", "0.71447766", "0.6818698", "0.6804525", "0.66658396", "0.6660132", "0.6610471", "0.6564124", "0.6492567", "0.6459046", "0.6447034", "0.64447874", "0.6427804", "0.64213294", "0.6303618", "0.6205664", "0.61640084", "0.6145625", "0.6134672...
0.78556556
0
method to create the full URL for use study tutorial
function makeUseStudyTutorialURL(includeNav) { return (useStudyTutorialURL + "#" + "pagemode=bookmarks" + "&" +"nameddest="); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeOverviewTutorialURL(includeNav) {\r\n return (overviewTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "function makeDeployStudyTutorialURL(includeNav) {\r\n return (deployStudyTutorialURL + \"#\" + \"pagemode=bookmarks\" + \"&\" +\"nameddest=\");\r\n}", "functio...
[ "0.72698325", "0.69761413", "0.6882102", "0.66068697", "0.6515266", "0.65091497", "0.64849627", "0.6475611", "0.64336866", "0.6399423", "0.63950014", "0.63899684", "0.6300409", "0.62690145", "0.6260753", "0.6260586", "0.6257954", "0.62192297", "0.62061733", "0.6197525", "0.61...
0.71776587
1
Function to print table header
function printTableHeader() { const tr1Element = document.createElement( 'tr' ); tableElement.appendChild( tr1Element ); const thElement = document.createElement( 'th' ); tr1Element.appendChild( thElement ); thElement.textContent = 'Location'; for ( let i = 0; i < workingHours.length; i++ ) { const th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printHeader(){\n\t\t\t\t\t\t// title\n\t\t\t\t\t\tif (title !== \"\"){\n\t\t\t\t\t\t\tdoc.setFont(myFont,\"bold\");\n\t\t\t\t\t\t\tdoc.setFontSize(fontsize);\n\t\t\t\t\t\t\tdoc.myText(marginLeft, y, title, {underline: true});\n\t\t\t\t\t\t\t// header - grey outlined box with text\n\t\t\t\t\t\t\ty += 5;\n\...
[ "0.766419", "0.74112505", "0.74055827", "0.73557395", "0.7354065", "0.7354065", "0.7354065", "0.7348817", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0.73481256", "0...
0.7906337
0
Function to print table footer and calculate the totals
function printTableFooter() { const tr8Element = document.createElement( 'tr' ); tableElement.appendChild( tr8Element ); const th2Element = document.createElement( 'th' ); tr8Element.appendChild( th2Element ); th2Element.textContent = 'Totals'; for ( let i = 0; i < workingHours.length; i++ ) { const ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayTotalsFooter() {\n calcTotalTotal(); // this call can't be last b/c the outer function depends on them\n\n // heading: create a row\n var trEl = document.createElement('tr');\n // create, give content, and append header for 'Totals' cell (correctly align hourly totals for all 5 stores)\n var t...
[ "0.79270685", "0.7694084", "0.76926386", "0.7658417", "0.7656264", "0.76114297", "0.75462043", "0.75063354", "0.75015754", "0.74748147", "0.7406068", "0.7388875", "0.73498654", "0.7328354", "0.73235476", "0.73177624", "0.72408015", "0.7189998", "0.71203923", "0.7101366", "0.6...
0.8004484
0