Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Starts the local server and listens to it at port 8080
async function localServerStart() { var http = require('http'); //creating server http.createServer(async function (request, response) { var body = []; request.on('error', (err) => { console.error(err); }).on('data', (chunk) => { body.push(chunk); }).o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"🐢 http://localhost:8080\");\n\t});\n}", "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"🐢 http://localhost:8080\");\n\t});\n}", "function startListening() {\n\tapp.listen(8080, function() {\n\t\tc...
[ "0.78415805", "0.78415805", "0.7661802", "0.761614", "0.7551808", "0.7472026", "0.7440004", "0.7414381", "0.73970085", "0.7376053", "0.7338134", "0.7336493", "0.73169893", "0.7303056", "0.7298042", "0.7297081", "0.72890246", "0.7284261", "0.7284261", "0.7284261", "0.72815156"...
0.0
-1
The entering function of the start file
async function p() { localServerStart(); consoleCommands(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start () {}", "start() {// [3]\n }", "function start() {\n\n}", "function start(){\n\t\n}", "started() {\r\n\r\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {...
[ "0.738937", "0.7372664", "0.7296327", "0.727324", "0.7212825", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70399916", "0.699805",...
0.0
-1
Fetch the data from the server.
function getData (symbols, endpoint) { let host = settings.react.calls.server.host; let port = settings.react.calls.server.port; let url = host + ':' + port + '/' + symbols.join(','); switch(endpoint) { case '': break; case 'historical': url = url + '/historical'; break; } retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchData() {\n fetch(url, {\n method: \"get\",\n headers: {\n \"Content-Type\": \"application/json; charset=utf-8\",\n \"x-apikey\": key,\n \"cache-control\": \"no-cache\",\n },\n })\n .then((e) => e.json())\n .then((data) => {\n ...
[ "0.73012596", "0.71859133", "0.70043886", "0.70028996", "0.70028996", "0.69244564", "0.68590915", "0.68550104", "0.682554", "0.68174285", "0.6800103", "0.67762625", "0.6773406", "0.6752981", "0.6752334", "0.6748075", "0.67198783", "0.66904664", "0.66825855", "0.6659984", "0.6...
0.0
-1
For each character replace it with its code. Concatenate all of the obtained numbers. Given a ciphered string, return the initial one if it is known that it consists only of lowercase letters. Note: here the character's code means its decimal ASCII code, the numerical representation of a character used by most modern p...
function decipher(cipher) { let chars = cipher.match(/9[5-9]|.{3}/g); // match 95-99 or sets of 3 chars ( use {1,3} for up to 3 chars) return chars.map(charCode => String.fromCharCode(charCode)).join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CaesarCipher(str, num) {\n\tvar res = '';\n\t\n\tfor(var i = 0; i < str.length; i++){\n\t\tif(/[A-z]/.test(str[i])){\n\t\t\tvar temp = str.charCodeAt([i]) + num;\n\t\t\t\n\t\t\tif(/[9][1-6]/.test(temp) || temp >=123) {\n\t\t\t\ttemp = temp - 26;\n\t\t\t}\n\t\t\tres = res + String.fromCharCode(temp);\n\t\t...
[ "0.7190994", "0.71582544", "0.6925791", "0.6867967", "0.68528605", "0.6757514", "0.67308587", "0.6707515", "0.6689409", "0.6686503", "0.6663738", "0.6628777", "0.6622813", "0.6614678", "0.65032476", "0.6484479", "0.6469598", "0.6458858", "0.6457889", "0.6449539", "0.64488024"...
0.62268007
38
Functions that handle ListBox selection and button actions / onListBoxAction: Called from ListBox event handlers
function onListBoxAction (data) { if (data.index < 0) return; switch (data.action) { case 'navigate': if (debug) console.log(`navigate: ${data.index}`); updateButton(false); break; case 'activate': if (debug) console.log(`activate: ${data.index}`) sendButtonActivationMessage({...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listBoxSelectionCallBack(eventObj)\n{\n\tkony.print(\"\\n\\nin list box selection\\n\\n\");\n\tif(btnId==\"btnOrigin\"){\n\t\tfrmAnimation.lblSelectedOrigin.text=\"Origin: \"+(eventObj.selectedKeyValue)[1];\n\t\tkony.print(\"\\n--->\"+frmAnimation.lblSelectedOrigin.text);\n\t\t\t\t\n\t}else{\n\t\t\n\t\tfr...
[ "0.7392048", "0.7068184", "0.6567267", "0.64783067", "0.6200226", "0.6195994", "0.6120593", "0.611731", "0.6082135", "0.602773", "0.6025057", "0.59951574", "0.5970093", "0.5878831", "0.58513296", "0.5822986", "0.5816855", "0.5792404", "0.57719886", "0.5727343", "0.5692175", ...
0.7394105
0
Handle window focus change events: If the sidebar is open in the newly focused window, save the new window ID and update the sidebar content.
function handleWindowFocusChanged (windowId) { if (windowId !== myWindowId) { let checkingOpenStatus = browser.sidebarAction.isOpen({ windowId }); checkingOpenStatus.then(onGotStatus, onInvalidId); } function onGotStatus (result) { if (result) { myWindowId = windowId; runContentScripts('o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\r\n isWindowFocused = true;\r\n }", "function updateSidebar() {\n $('.sidebar-menu li').removeClass('active...
[ "0.57622784", "0.57622784", "0.5707427", "0.5674421", "0.5631589", "0.5615489", "0.5607207", "0.5587777", "0.5506651", "0.5482559", "0.54382694", "0.5414452", "0.5411722", "0.54102224", "0.53714263", "0.53623503", "0.5355416", "0.5355416", "0.5355416", "0.53215647", "0.528549...
0.70908797
0
Functions that process and display data from content script / getFormattedTitle: Extract page title from the page structure message sent by the content script, and return it embedded in an HTMLformatted string.
function getFormattedTitle (message) { return `<p>${message.title}</p>`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageTitle () {\n return title;\n }", "async pageTitle () {\n debug('getting pageTitle')\n return new Promise(resolve => {\n this.pageContext.evaluate(() => { return document.title },\n (err, result) => {\n if (err) {\n console.error(err)\n }\n ...
[ "0.6802629", "0.67995685", "0.65375334", "0.6139926", "0.61212903", "0.6101654", "0.60911864", "0.6081117", "0.60763854", "0.606356", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.60484916", "0.6025819", "0.6016694", "0.60094", ...
0.6070131
9
Format the heading info as HTML, with the appropriate class names for the grid layout.
function getClassNames (name) { switch (name) { case 'H1': return ['h1-name', 'h1-text']; case 'H2': return ['h2-name', 'h2-text']; case 'H3': return ['h3-name', 'h3-text']; case 'H4': return ['h4-name', 'h4-text']; case 'H5': return ['h5-name', 'h5-text']; case 'H6': return ['h6-name', 'h6-te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatHeadline(text) {\n const categories = addCategory();\n const timeStamp = formatTimeAndDate(countryCode);\n const header = `<h4><a id=\"${timeStamp[1]}\" name=\"${timeStamp[1]}\"></a>${text} - ${timeStamp[0]} ${categories}</h4>`;\n return header;\n}", "heading(text, level) {\n\t\tlet ta...
[ "0.6722495", "0.66949224", "0.65797037", "0.63619673", "0.63292366", "0.63108075", "0.621045", "0.61502206", "0.61236465", "0.6111745", "0.6094731", "0.60766524", "0.6006179", "0.5971537", "0.59543294", "0.59520894", "0.59503317", "0.59446627", "0.59179926", "0.5911828", "0.5...
0.0
-1
Display the structure information collected by the content script
function updateSidebar (message) { let pageTitle = document.getElementById('page-title-content'); let headings = document.getElementById('headings-content'); if (typeof message === 'object') { const info = message.info; if (debug) { console.log('------------------------') console.log(`number...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayContents() {\n\tif (contentsRequest.readyState === XMLHttpRequest.DONE) {\n\t\tif (contentsRequest.status === 200) {\n\t\t\tdocument.getElementById('tree').textContent = properties.showtree();\n\t\t\tdocument.getElementById('display').innerHTML = formatDirContents(contentsRequest.responseText);\n\t...
[ "0.6271606", "0.6152953", "0.6018301", "0.5802143", "0.57905054", "0.5771399", "0.5727607", "0.57216984", "0.56849325", "0.5683155", "0.56800497", "0.5651975", "0.55882937", "0.55713373", "0.556489", "0.55554736", "0.55457294", "0.5537492", "0.5529276", "0.5519981", "0.551605...
0.0
-1
Functions that run the content scripts to initiate processing of the data to be sent via port message / runContentScripts: When content.js is executed, it established a port connection with this script (panel.js), which in turn has a port message handler listening for the 'info' message. When that message is received, ...
function runContentScripts (callerFn) { if (debug) console.log(`runContentScripts invoked by ${callerFn}`); getActiveTabFor(myWindowId).then(tab => { if (tab.url.indexOf('http:') === 0 || tab.url.indexOf('https:') === 0) { browser.tabs.executeScript(tab.id, { file: '../utils.js' }); browser.tabs.ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n\n var sidebarSkin = get('layout.sidebar-skin');\n\n if (!sidebarSkin) {\n sidebarSkin = 'control-sidebar-dark';\n }\n\n updateSidebarSkin(sidebarSkin);\n\n updateSidebarToggle(get('layout.sidebar-control-open'));\n\n\n\n var boxedLayout = ge...
[ "0.60545754", "0.5989085", "0.59802514", "0.58650345", "0.58299387", "0.5683305", "0.5666823", "0.55882424", "0.55803436", "0.5557971", "0.5511649", "0.5503348", "0.54717195", "0.54550123", "0.54331017", "0.54302764", "0.5421875", "0.5413457", "0.539683", "0.5384487", "0.5365...
0.54516345
14
getActiveTabFor: expected argument is ID of window with focus. The module variable myWindowId is updated by handleWindowFocusChanged event handler.
function getActiveTabFor (windowId) { return new Promise (function (resolve, reject) { let promise = browser.tabs.query({ windowId: windowId, active: true }); promise.then( tabs => { resolve(tabs[0]) }, msg => { reject(new Error(`getActiveTabInWindow: ${msg}`)); } ) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTabWindowByChromeTabId (tabId) {\n const tw = this.windowIdMap.find(w => w.findChromeTabId(tabId))\n return tw\n }", "getTabWindowByChromeId (windowId) {\n return this.windowIdMap.get(windowId)\n }", "function getActiveTabId(e) {\n\t\tvar query = { active: true, currentWindow: true };\n\t\tfuncti...
[ "0.74438876", "0.74290186", "0.6755566", "0.66839886", "0.6648591", "0.655822", "0.64862543", "0.64339864", "0.6389305", "0.6357002", "0.6334173", "0.6326636", "0.62317747", "0.6226168", "0.6186943", "0.6168544", "0.61467344", "0.61053", "0.60988045", "0.6039023", "0.60050756...
0.7634702
0
Adding a new entry
function addEntry(e) { // Preventing form submission e.preventDefault(); // Getting the value of the new entry const previousEntries = choreContainer.innerHTML; const newEntry = document.getElementById('chore').value; // Check if chore is empty if (newEntry != "") { checkState(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addEntry(data) {\n if (!data || (typeof data) !== 'object') {\n return this.badRequest('the data pass are not right,pleas pass right data');\n }\n const error = DummyDataHelpers.validateEntry(data);\n if (!error) {\n if (DummyDataHelpers.titleExists(dummyEntries, data.title)) {\n ...
[ "0.7460456", "0.7325927", "0.7170439", "0.7136014", "0.70926416", "0.70185554", "0.6993922", "0.6872985", "0.68356615", "0.6819675", "0.67857546", "0.6768144", "0.6713991", "0.6699737", "0.6678103", "0.66315114", "0.66156495", "0.65291137", "0.6485474", "0.6456781", "0.645489...
0.0
-1
Storing the attribute values of the checkboxes
function checkState() { for (var j = 0; j < entryList.length; j++) { checkedAttribs[j] = entryList[j].checked; // Verify the checked values with a console statement // console.log(entryList[j].checked + "" + j); classHidden[j] = entryList[j].parentNode.style.display; } consol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCheckboxValues() {\n includeLowercase = lowerCaseCheckbox.checked;\n includeUppercase = uppercaseCheckbox.checked;\n includeNumeric = numericCheckbox.checked;\n includeSpecial = specialCheckbox.checked;\n}", "saveAttributes() {\n let newMarkedAttri = [];\n ElementHandler.getAllCheckboxesWit...
[ "0.68100977", "0.6715273", "0.65708226", "0.65407306", "0.641484", "0.6322653", "0.62947714", "0.6236526", "0.62242967", "0.61811966", "0.6178914", "0.61457574", "0.6120232", "0.6074181", "0.60731626", "0.60670966", "0.6061513", "0.6043491", "0.60344166", "0.60044694", "0.599...
0.5662455
56
Restoring the checkbox statuses
function restoreChkbxStatus(len, increment) { const testArray = JSON.parse(localStorage.getItem('checkboxStatuses')); const anotherArray = JSON.parse(localStorage.getItem('displayStatuses')); for (var k = 0; k < len; k++) { entryList[k + increment].checked = testArray[k]; entryList[k + incre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function syncronizeCheckboxes(clicked, pri, pub) {\n pri.checked = false;\n pub.checked = false;\n clicked.checked = true;\n }", "function restore() {\n var i = 0;\n var list;\n while (that.data.lists[i] !== undefined) {\n list = that.data.lists[i];\n if (list.tChecked) {\n th...
[ "0.6916666", "0.6393776", "0.6352745", "0.63186836", "0.6316324", "0.62939316", "0.6279714", "0.62796664", "0.62531996", "0.62198687", "0.6215878", "0.6199987", "0.6190296", "0.61751896", "0.6167841", "0.6148121", "0.6143057", "0.61397487", "0.6138587", "0.6122321", "0.612013...
0.70359266
0
Removing a single entry use e.target Also read up event bubbling for making this event binding a relatively inexpensive affair.
function removeOne(event) { // Using this method instead of the removeChild method because of the ease of data persistence. I am sure I could do persistence with removeChild too, but the solution hasn't yet presented itself to me. const thisChore = event.target.parentNode; thisChore.style.display = 'none'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeItem(e) {\n e.target.parentElement.removeChild(e.target);\n}", "_removeItem(e) {\n e.preventDefault();\n e.stopPropagation();\n\n const $target = $(e.target);\n const $entry = $target.closest('.djblets-c-list-edit-widget__entry');\n\n if (this._numItems > 1) {\n...
[ "0.68944114", "0.6860733", "0.68070024", "0.6783093", "0.6556286", "0.6512268", "0.6508953", "0.6480316", "0.64483815", "0.6447342", "0.6417734", "0.6404331", "0.6388853", "0.63610953", "0.6320248", "0.6285292", "0.6265647", "0.62632126", "0.6262439", "0.6255217", "0.6251802"...
0.67959684
3
Removing all the entries at once.
function removeAll() { localStorage.clear(); window.location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "clear() {\n\t\tlet e = this.first();\n\t\twhile (e != 0) { this.delete(e); e = this.first(); }\n\t}", "function removeEntries() {\n // Find all entries\n var $entries = $schedule.fin...
[ "0.713801", "0.71156275", "0.6852535", "0.6799216", "0.67984176", "0.66575223", "0.6620862", "0.6564253", "0.656139", "0.6518557", "0.65134984", "0.64874005", "0.64594734", "0.6456778", "0.64506996", "0.6428316", "0.6421387", "0.63880116", "0.6386418", "0.63764954", "0.635257...
0.0
-1
Show the Remove All button if there are more than one entries.
function showRemoveBtn() { if (document.getElementById('entries').childElementCount > 1) { document.getElementById('removeBtn').style.display = 'initial'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayDeleteAll() {\n const deleteAllBtn = document.querySelector('.deleteAll');\n // add button if guest array bigger than zero and no deleteAllButton\n if (party.guests.length && !deleteAllBtn) {\n const tableContainer = document.querySelector('#tableContainer');\n tableContainer.appendChild(...
[ "0.72400993", "0.66364855", "0.6522446", "0.62390465", "0.6174773", "0.61586815", "0.61159176", "0.60888386", "0.6069556", "0.6066277", "0.6054565", "0.590161", "0.5832153", "0.5826949", "0.5823255", "0.58211416", "0.58107257", "0.58070296", "0.5759274", "0.5747089", "0.57413...
0.71412474
1
an array of numbers as arg. The Fn should return an arr containing any shortest combination of element that add up exactly the targetSum. If there is a tie, you may return any single one
function bestSum(targetSum, numbers, memo = {}) { // Time complexity O(m^2*n) // Space complexity O(m^2) if (targetSum in memo) return memo[targetSum]; if (targetSum === 0) return []; if (targetSum < 0) return null; let shortestCombination = null; for (const num of numbers) { const remainder = target...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function targetSum(arr, sumTarget){\n \n}", "function solution1(array, targetSum) {\n array.sort((a,b) => a - b);\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const x = array[i];\n for (let j = i+1; j < array.length; j++) {\n const y = array[j];\n ...
[ "0.79291975", "0.77573454", "0.7635987", "0.75427556", "0.735771", "0.73258513", "0.72595406", "0.7211043", "0.7206935", "0.70983297", "0.7053367", "0.7040068", "0.7021375", "0.7000597", "0.69954574", "0.6960469", "0.6957229", "0.6952071", "0.68956226", "0.688082", "0.6863434...
0.7240638
7
listens to the event and fires the appropiate event subscription
function handleKeyEvent(event) { if (isEventModifier(event)) { return; } if (ignoreInputEvents && isInputEvent(event)) { return; } const eventName = getKeyEventName(event); const listeners = __subscriptions[eventName.toLowerCase()] || []; if (typeof __monitor === 'function') {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _subscribeToEvent(event) {\n GOD.subscribe(event);\n }", "function subscribeForEvents() {\n const userResponseEvetnType = 'UserHIReceived';\n const subscriber = eventSubscriber();\n subscriber.subscribeEvent(userResponseEvetnType, userResponseEventReceived);\n }", "_subscri...
[ "0.7278217", "0.69331", "0.66832113", "0.6681481", "0.66425866", "0.66145456", "0.66138107", "0.6345793", "0.624889", "0.62461823", "0.62335074", "0.6099182", "0.6099045", "0.60898596", "0.60787123", "0.6061408", "0.605613", "0.59908956", "0.5989496", "0.596213", "0.59345376"...
0.0
-1
creates a subscription and returns the unsubscribe function;
function subscribe(name, callback) { // Subscripton names are lowercased so both 'Shift+Space' and 'shift+space' works. name = name.toLowerCase(); // remove spaces so both 'Shift + Space' and 'shift+space' works. name.replace(/\s/, ''); if (typeof __subscriptions[name] === 'undefined') { __su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsub(name, fn) {\n this.unsubscribe(name, fn);\n }", "unsub(fn) {\n this.unsubscribe(fn);\n }", "unsub(fn) {\n this.unsubscribe(fn);\n }", "unsubscribe() {\n this.unsubscribeFunc()\n }", "unsub(name, fn) {\r\n this.unsubscribe(name, fn);\r\n }", "unsubscribe() {\n Object...
[ "0.7071786", "0.70051444", "0.70051444", "0.6990121", "0.69038194", "0.687618", "0.68336684", "0.68336684", "0.6818329", "0.6814473", "0.6755408", "0.6738019", "0.673709", "0.6736756", "0.66867554", "0.6684773", "0.6658661", "0.66275686", "0.66227585", "0.65694386", "0.655654...
0.0
-1
alows to set a monitor function that will run on every event
function setMonitor(monitor = null) { if (monitor === true) { __monitor = defaultMonitor; } else { __monitor = monitor; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mainMonitor() {\n // queueDisk.addEvent() listen.... todo\n onNewDevEvent(() => {\n console.warn(\"newDevEvent\");\n\n // //step1 get new dev info and update view\n // sendGlobalUpdate();//global view update(from store)\n //\n // //setp check2 ntfs and update\n ...
[ "0.64917415", "0.6465147", "0.6455923", "0.6428134", "0.6371135", "0.61784786", "0.6018997", "0.6002404", "0.5908825", "0.5908825", "0.58978367", "0.58626884", "0.5849526", "0.58457273", "0.5709883", "0.5633148", "0.5628563", "0.5606831", "0.55822796", "0.5550446", "0.5549111...
0.59446716
8
adds the event listener to the element
function startListening() { element.addEventListener(listenForEvent, handleKeyEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEventListeners() {\n\n}", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "[addDivListener](event, listener) {\n this.htmlDiv.addEventListener(event, listener);\n }", "addEventListener (f) {\n this.eventListeners.push(f)\n }", "function evtLi...
[ "0.738553", "0.71789664", "0.6703408", "0.67027724", "0.66859764", "0.66484183", "0.66224724", "0.6574885", "0.6511779", "0.6498515", "0.64830184", "0.6478967", "0.6472188", "0.64285713", "0.64284235", "0.64264214", "0.64264214", "0.64264214", "0.64264214", "0.6406285", "0.63...
0.0
-1
removes the event listener from the element
function stopListening() { element.removeEventListener(listenForEvent, handleKeyEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n this.target.removeEventListener(this.eventType, this.fn, false);\n }", "unlisten() {\n [\"change\"].forEach(name => {\n this.el_.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }", "_removeEventListeners() {\n this.currentEve...
[ "0.76763076", "0.7414222", "0.73614687", "0.7361277", "0.7300983", "0.7300983", "0.72921246", "0.7279179", "0.7275385", "0.72615063", "0.7240268", "0.72103614", "0.72103614", "0.72103614", "0.72103614", "0.72103614", "0.72055864", "0.7172616", "0.71660155", "0.71508133", "0.7...
0.7189224
17
called when the client connects
function onConnect() { localDiv.html('client is connected'); client.subscribe(topic); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n }", "clientConnected() {\n super.clientConnected('connected', this.wasConnected);\n\n this.state = 'connected';\n t...
[ "0.7953843", "0.7779623", "0.7695985", "0.76530504", "0.76057947", "0.7550192", "0.7486288", "0.74651325", "0.7456237", "0.743651", "0.74294996", "0.7360504", "0.7349641", "0.733722", "0.7330392", "0.73156106", "0.73113114", "0.72769135", "0.7256924", "0.72469455", "0.7216576...
0.76097023
4
called when the client loses its connection
function onConnectionLost(response) { if (response.errorCode !== 0) { localDiv.html('onConnectionLost:' + response.errorMessage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clientDisconnect() {\r\n delete clients[connection.remoteAddress];\r\n console.log('connection closed: ' + remoteAddress + \" \" + now.getHours() + \":\" + now.getMinutes() + \":\" + now.getSeconds());\r\n\r\n\r\n }", "handleDisconnect() {\n\t\tdebug(\n\t\t\t'warn: ' + ((this.fromServer)?'server'...
[ "0.7493831", "0.74451375", "0.7402893", "0.7352792", "0.73291796", "0.73029107", "0.7284382", "0.7193906", "0.71692103", "0.71331644", "0.71320593", "0.7108812", "0.7093675", "0.708489", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7057972"...
0.6877702
62
called when a message arrives
function onMessageArrived(message) { // Split the message into an array: let readings = float(split(message.payloadString, ',')); // if you have all the readings, put them in the chart: if (readings.length >= numBands) { chart.data.datasets[0].data = readings; // update the timestamp: timestampDiv.h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onMessageReceive() {}", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "onMessage() {}", "onMessage() {}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n write(message.payloadString);\n}"...
[ "0.7933765", "0.77630854", "0.77630854", "0.77630854", "0.76885456", "0.76885456", "0.7680746", "0.7617823", "0.7525026", "0.74566025", "0.7440345", "0.7429147", "0.7429147", "0.7409153", "0.739501", "0.73929787", "0.7364344", "0.73325026", "0.7318553", "0.73094666", "0.72703...
0.0
-1
takes wavelength in nm and returns an rgba value adapted from
function wavelengthToColor(wavelength) { var r, g, b, alpha, colorSpace, wl = wavelength, gamma = 1; // UV to indigo: if (wl >= 380 && wl < 440) { R = -1 * (wl - 440) / (440 - 380); G = 0; B = 1; // indigo to blue: } else if (wl >= 440 && wl < 490) { R = 0; G = (wl - 440) / (490 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wavelengthToColor(wavelength) {\n var r,g,b,alpha,\n colorSpace,\n wl = wavelength,\n gamma = 1;\n \n if (wl >= 380 && wl < 440) {\n R = -1 * (wl - 440) / (440 - 380);\n G = 0;\n B = 1;\n } else if (wl >= 440 && wl < 490) {\n R = 0;\n G = (wl - 440) ...
[ "0.7833795", "0.7622385", "0.6670089", "0.6535967", "0.64636475", "0.6079295", "0.60789424", "0.6070874", "0.6065623", "0.5981613", "0.5977258", "0.5961137", "0.59331894", "0.5919916", "0.5916034", "0.5853928", "0.58256084", "0.5820887", "0.58110523", "0.57610303", "0.5714932...
0.7809527
1
Wait for the required DOM to be rendered
async function scrapeCurrentPage() { await page.waitForSelector('.product-image'); // Get the link to all the required products let urls = await page.$$eval('.col-12 > section .col-6', links => { links = links.map(el => el.querySelector('.product-card > a').href) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async waitForPageToLoad(elementSelector) {\n browser.maximizeWindow();\n const selector = await $(elementSelector);\n await selector.waitForDisplayed();\n const isDisplayed = await selector.isDisplayed();\n if (!isDisplayed) {\n return await $(elementSelector).waitForDisplayed();\n }\n }", ...
[ "0.6623635", "0.64619225", "0.6430823", "0.6350255", "0.63124496", "0.62749916", "0.62593365", "0.62532026", "0.6155751", "0.61484855", "0.6060486", "0.60243165", "0.59915257", "0.59706193", "0.596268", "0.59519553", "0.59481704", "0.59424925", "0.593901", "0.59345174", "0.59...
0.0
-1
ProgressButton: component that represents each number underneath the sudoku board. It has a progress bar on the outside showing how many of that number have been put onto the board. props: value: the number that is stored in the button. onClick: a function that executes after the component is clicked. percent: the perc...
function ProgressButton(props) { return ( <Progress theme={ { error: { symbol: props.value, trailColor: 'rgb(240, 240, 240)', color: 'rgb(7, 76, 188)', }, default: { symbol: props.value, trailColor: 'rgb(245, 2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animateProgressBar() {\n const\n cardLen = this.props.cards.length, // get cardsLength\n current = this.state.current, // get current\n calcPer = (lg, sm) => lg && sm ? (sm / lg) * 100 : 0, // create func that return precen...
[ "0.65872", "0.65730345", "0.6360369", "0.63334435", "0.63189983", "0.6311207", "0.6309521", "0.63063455", "0.6296162", "0.619475", "0.61631364", "0.6151493", "0.6149023", "0.6141332", "0.6125544", "0.61229694", "0.6116238", "0.61112714", "0.60833883", "0.60608685", "0.6043936...
0.69918656
0
handle the device information
function handle_device(topic, payload) { var deviceID = topic[2]; if (topic[4] == "flx") flx = JSON.parse(payload); if (topic[4] == "sensor") { var config = JSON.parse(payload); for (var obj in config) { var cfg = config[obj]; if (cfg.enabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _collectDeviceInfo() {\n _device.deviceClass = \"Handset\";\n _device.id = DeviceInfo.getUniqueID(); // Installation ID\n _device.model = DeviceInfo.getModel();\n }", "function Device(listen_port) {\n //a basic device. Many functions are stubs an...
[ "0.6881749", "0.6316864", "0.6182602", "0.6162377", "0.6117553", "0.6077262", "0.60668993", "0.6066492", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.6032404", "0.60089266", "0.5942555", "0.5935273", "0.59175646", "0.5915749", "0.5854...
0.64631146
1
handle the sensor information
function handle_sensor(topic, payload) { var sensor = {}; var msgType = topic[3]; var sensorId = topic[2]; if (sensors[sensorId] == null) { sensors[sensorId] = new Object(); sensor.id = sensorId; sensor.name = sensorId; } else sensor = sensors[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sensorFunc() {\n\t// calls the success callback if the sesnor is there otherwise calls error\n\t// callback\n\ttizen.humanactivitymonitor.getHumanActivityData(\"HRM\",\n\t\t\tsuccessCallbackHeart, errorCallback); // HeartRate API\n}", "function handle_sensor(topicArray, payload) {\n // the retrieved ...
[ "0.6966615", "0.6716126", "0.66259146", "0.64087725", "0.63992155", "0.62982756", "0.6296216", "0.6273894", "0.62679636", "0.62663", "0.6263095", "0.6262468", "0.61906576", "0.6142741", "0.6094484", "0.6092796", "0.60718995", "0.60653365", "0.60595727", "0.6053847", "0.605205...
0.68387544
1
Het gaat hier om een gepubliceerd trackModel die door de eigenaar is geprivatiseerd of defintief verwijderd heeft. De volger hoeft alleen maar de dit trackModel/trackSupModel en trackTagModellen (incl updaten van de lables in SideMenu) uit zijn stores te verwijderen. Dit trackModel is dan niet meer zichtbaar in zijn TR...
function verwijderTrack(trackModel, mode, watch) { var q = $q.defer(); //console.warn('dataFactoryTrack verwijderTrack: ', trackModel.get('naam')); var trackId = trackModel.get('Id'); initxData(trackModel); // // Clean up stores // loDash.remove(dataFactoryTrack.star,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateReacties(trackModel) {\n\n //console.warn('dataFactoryTrack updateReacties naam: ', trackModel.get('naam'));\n\n var q = $q.defer();\n\n var trackId = trackModel.get('Id');\n\n var trackReacties = loDash.filter(dataFactoryTrackReactie.store, function (trackReactieModel) {\n ...
[ "0.7294336", "0.5948411", "0.566308", "0.56378025", "0.551426", "0.5450242", "0.5441904", "0.54346395", "0.53733796", "0.53655684", "0.5345137", "0.5313684", "0.5289227", "0.5282877", "0.5271635", "0.5228974", "0.5216725", "0.5216628", "0.521087", "0.52106005", "0.5206321", ...
0.69560146
1
Na de load van alle Sporen wordt in ieder track bepaald of er nieuwe reacties zijn toegveoegd.
function updateReacties(trackModel) { //console.warn('dataFactoryTrack updateReacties naam: ', trackModel.get('naam')); var q = $q.defer(); var trackId = trackModel.get('Id'); var trackReacties = loDash.filter(dataFactoryTrackReactie.store, function (trackReactieModel) { return track...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startTracking() {\n HyperTrack.onTrackingStart();\n }", "function Track() {}", "addTracks() {\n let { playlistId, tracks } = this.state;\n spotifyApi.addTracksToPlaylist(playlistId, tracks);\n }", "beginTracking_() {\n this.tracking_ = true;\n }", "fetchTracks(latLngBounds) {\n va...
[ "0.5531132", "0.54468215", "0.542647", "0.5424072", "0.54053086", "0.53733295", "0.5353028", "0.5350978", "0.5337433", "0.53164256", "0.5276098", "0.5254721", "0.52413976", "0.5215806", "0.51991415", "0.5199064", "0.5198783", "0.51940495", "0.5178993", "0.51759356", "0.517173...
0.50803757
38
convert the object into HTML
toHtml() { // 1. dynamic list of action buttons each one with it's design from the class // 2. var answer = '<div class="academic-papers-panel"><div class="personal-row-col col-reverse-mobile w-100 align-space-between"><h3>' + this.title + '</h3>' if (this.fileLinks[1]["link"] != "") { answer += '<a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _coerceObjectToHTML(obj) {\n var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0});\n eachProperty(obj, function(name, value) {\n t.push(TR(TH(String(name)), TD(String(value))));\n });\n return toHTML(t);\n}", "function object2html(obj, level){\n if (!level) level = 0; // default to 0\n ...
[ "0.75345165", "0.73364747", "0.7290966", "0.70888644", "0.69863486", "0.6939569", "0.6914273", "0.68218917", "0.6696153", "0.664422", "0.6641676", "0.6617087", "0.6599305", "0.64678276", "0.64626235", "0.6448896", "0.6429585", "0.64055693", "0.6401883", "0.6337124", "0.631283...
0.0
-1
build a list of this object from Json object
static createListFromJson(jsonObj) { var answer = []; for (var publicationIndex = 0; publicationIndex < jsonObj.length; publicationIndex++) { answer.push(PublicationCard.createFromJson(jsonObj[publicationIndex])); } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createListFromJson(jsonObj)\n\t{\n\t\tvar answer = [];\n\t\tfor (var projectIndex = 0; projectIndex < jsonObj.length; projectIndex++)\n\t\t{\n\t\t\tanswer.push(ProjectStudent.createFromJson(jsonObj[projectIndex]));\n\t\t}\n\t\treturn answer;\n\t}", "function createData(json) {\n\tconsole.log(json);\n\tdat...
[ "0.6511763", "0.6003714", "0.5967254", "0.5797491", "0.5694719", "0.56515944", "0.5651211", "0.5574462", "0.55693215", "0.55429196", "0.55225444", "0.5520386", "0.55173886", "0.54675996", "0.545905", "0.544704", "0.5379877", "0.5379143", "0.53785515", "0.537014", "0.53679097"...
0.6721883
0
build a list of this object from Json object
static createFromJson(jsonObj) { return new PublicationCard(jsonObj["name"], jsonObj["description"], ActionButton.createListFromJson(jsonObj["fileLinks"]), jsonObj["authors"], jsonObj["year"], jsonObj["topic"], jsonObj["type"], jsonObj["publisher"], jsonObj["publicationStatus"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createListFromJson(jsonObj)\n\t{\n\t\tvar answer = [];\n\t\tfor (var publicationIndex = 0; publicationIndex < jsonObj.length; publicationIndex++)\n\t\t{\n\t\t\tanswer.push(PublicationCard.createFromJson(jsonObj[publicationIndex]));\n\t\t}\n\t\treturn answer;\n\t}", "static createListFromJson(jsonObj)\n\t{...
[ "0.6721883", "0.6511763", "0.6003714", "0.5967254", "0.5797491", "0.5694719", "0.56515944", "0.5651211", "0.5574462", "0.55693215", "0.55429196", "0.55225444", "0.5520386", "0.55173886", "0.54675996", "0.545905", "0.544704", "0.5379877", "0.5379143", "0.53785515", "0.537014",...
0.5135339
48
sort according to some property list of this object
static sortByProperty(ObjList, property) { return ObjList.sort(function(a, b) { var x = a[property + ""]; var y = b[property + ""]; return ((x < y) ? -1 : ((x > y) ? 1 : 0)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n ...
[ "0.73198926", "0.7296321", "0.7296321", "0.72160774", "0.7187887", "0.71842307", "0.7149367", "0.7125927", "0.70316625", "0.69431007", "0.68770385", "0.68661344", "0.6842619", "0.683528", "0.6831407", "0.6830048", "0.6805293", "0.6801186", "0.6793107", "0.67834175", "0.678119...
0.7727587
0
filter the list according to some property and value
static filterList(objList, property, filterValue) { var answer = []; for (var objIndex = 0; objIndex < objList.length; objIndex++) { if (objList[objIndex][property + ""] == filterValue) { answer.push(objList[objIndex]); } } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter(predicate = this._compare) {\n return this._list.getValue().filter((_) => predicate(_));\n }", "function where(list, properties, k) {\n var names = []\n return reduce(list, function(list, v, k) {\n var names = true\n for (var k in properties) {\n if (properties[k] ...
[ "0.69004273", "0.6489177", "0.63892597", "0.633543", "0.6235546", "0.621389", "0.610121", "0.6040775", "0.60404855", "0.6020834", "0.5991925", "0.59573346", "0.5935419", "0.5934845", "0.5932653", "0.5930276", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", ...
0.7527607
0
split list into list of lists according to some property
static splitByProperty(ObjList, property) { var answer = {}; var spliter = ObjList[0][property + ""]; var subGroup = [ObjList[0]]; for (var publicationIndex = 1; publicationIndex < ObjList.length; publicationIndex++) { if (ObjList[publicationIndex][property + ""] != spliter) { answer[spliter] = [.....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupBy2(xs, prop) {\n var grouped = {};\n for (var i=0; i<xs.length; i++) {\n var p = xs[i][prop];\n if (!grouped[p]) { grouped[p] = []; }\n grouped[p].push(xs[i]);\n }\n return grouped;\n}", "function groupItems(list) {\n return list.reduce(function (groupedList, element) {\n var key ...
[ "0.5736494", "0.55942863", "0.55851495", "0.5567104", "0.5532998", "0.5500809", "0.5461137", "0.5460786", "0.53871804", "0.5371475", "0.535328", "0.5328581", "0.53005475", "0.5291793", "0.5284913", "0.5275434", "0.5275434", "0.5275434", "0.5275434", "0.5275434", "0.5272965", ...
0.7096044
0
that code calculates the area of a circle. If you want to reuse that code, or that calcuation, you can store it in a function. in order to create a function, we use the fucntion keyword, a unique name, and a pair of parentheses. Once created, we can reuse it whenever we want.
function sayHello() { console.log("Hello"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAreaOfACircle(radius) {\n // your code here\n return Math.PI * radius**2;\n}", "function areaOfCircle(radius) {\r\n\r\n function square() {\r\n return radius * radius;\r\n }\r\n console.log(3.14 * square())\r\n}", "function calcArea(CircleRadius){\r\n\r\n\r\n\tvar CircAre...
[ "0.78759056", "0.7857781", "0.7792947", "0.778629", "0.7708014", "0.77007234", "0.7675718", "0.7675128", "0.7586368", "0.7565583", "0.7539107", "0.7517293", "0.75137484", "0.7509697", "0.7502098", "0.74985695", "0.7496695", "0.74707025", "0.7447507", "0.7416571", "0.7415434",...
0.0
-1
Much like how we passed values to methods (like console.log()), we can do the same with functions if we include a parameter
function calculateArea(radius) { var result = radius * radius * Math.PI; console.log(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myFunction(paramOne, paramTwo) {\n console.log(paramOne)\n console.log(paramTwo)\n}", "function log(foo){\n\tconsole.log(foo);\n}", "function f ([ name, val ]) {\n console.log(name, val);\n}", "function myfun(param){\n console.log(param());\n}", "function a(test){\nconsole.log(test)\n}...
[ "0.70102", "0.6993688", "0.6991233", "0.6968121", "0.6944141", "0.6944141", "0.68953323", "0.68839353", "0.6883921", "0.68739927", "0.68739927", "0.6848996", "0.6830609", "0.682659", "0.6823787", "0.68170494", "0.68160105", "0.68063474", "0.67824453", "0.6777071", "0.6768093"...
0.0
-1
Parameters are temporary variables that we define in the parentheses after the function name and use to access values that we pass to the function. we can also create functions with multiple parameters. in the function definition, we simply separate them with commas
function insert(array, value, index) { array.splice(index, 0, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paraArguments(parameterOne, parameterTwo) {//function declared, with two parameters.\n return parameterOne + parameterTwo + 'argument!'; //body of function.\n}", "function functionStructure(parameterOne, parameterTwo, parameterThree) { //function declaration syntax.\n //body of prescribed code her...
[ "0.70252794", "0.6892633", "0.6853644", "0.6838942", "0.6805797", "0.68047243", "0.67894596", "0.6785696", "0.67538816", "0.669484", "0.667844", "0.6659361", "0.66586256", "0.66089875", "0.6608813", "0.6601839", "0.65996045", "0.65868634", "0.6552125", "0.6549009", "0.654228"...
0.0
-1
just like many method return values, we can have a function give back a value by putting a return keyword befroe the value we want to return
function calculateA(radius) { var result = radius * radius * Math.PI; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dummyReturn(){\n}", "function returnFunction() {\r\n // return 1+1; // will return undefined.\r\n return 1+1;\r\n}", "function returnTwo() {\n\treturn 2;\n}", "function DefaultReturnValue() {}", "function returnTwo() {\n return 2\n}", "function returnSomething(value){\n\t\tconsole.log('c'...
[ "0.75421745", "0.7495398", "0.73449737", "0.7290033", "0.72883666", "0.7245007", "0.71019113", "0.7052656", "0.701583", "0.6997545", "0.6958313", "0.68631935", "0.6858841", "0.68373716", "0.68356526", "0.6805576", "0.6785121", "0.6775347", "0.6775347", "0.67669547", "0.676618...
0.0
-1
great. if we assign a function to a variable without parantheses, the variable would store the function itself, as opposed to the value it returns this is also known as a function expression what is true of functions? 1. they're reuseable blocks of code that perform specific tasks 2. We invoke them with their name and ...
function convert(a) { for (i = 0; i < a.length; i++) { var c = []; c.push(parseInt(a[i])); } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function funname() {} //literals", "function Addition(x){\r\n // it is return some reference no name of function just a refernce\r\n return func...
[ "0.75538224", "0.7020425", "0.6956452", "0.69187003", "0.69023126", "0.6892972", "0.6796137", "0.66770905", "0.6635328", "0.66190654", "0.6609298", "0.65943956", "0.6583087", "0.6547502", "0.653279", "0.6521821", "0.6517512", "0.64656585", "0.6452493", "0.64265215", "0.642526...
0.0
-1
remember we can use function declatations or function expressions to define functions. Assigning a function in parentheses or using it with arguments invokes it
function add(a, b) { return a + b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function functionDeclaration31(foo = \"=>\", bar = \"()\") { return \"foo\"; }", "function funname() {} //literals", "function functionDeclaration31...
[ "0.67986", "0.65857077", "0.6580765", "0.6537802", "0.6498908", "0.6495669", "0.64590466", "0.6373023", "0.630702", "0.6298254", "0.62902963", "0.62835294", "0.626038", "0.6249343", "0.6232013", "0.6227945", "0.62082285", "0.6201448", "0.61984175", "0.61901116", "0.6180671", ...
0.0
-1
so both of those are correct Now what is wrong with this code?
function calculatePeriphery(r) { var result = 2 * r * Math.PI; return result; console.log(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "protected internal function m252() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static private protected internal function m118() {}", "transient private protected inter...
[ "0.5810806", "0.5776088", "0.55144674", "0.5499322", "0.53955066", "0.52797455", "0.5268725", "0.5251933", "0.51337683", "0.51310575", "0.50844723", "0.50411975", "0.50137573", "0.4999178", "0.4998623", "0.49733442", "0.49540854", "0.4947042", "0.49179187", "0.49114943", "0.4...
0.0
-1
now if we want to create multiple objects with the same properties and methods, but different values, we can create a constructor function. and then we can use the new keyword to create as many instances of an object as we want.
function Hero(name, age, power) { this.name = name; this.age = age; this.power = power; this.speak = function() { console.log("Hi, I'm " + this.name + " and I'm gonna kick your ass!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewObj(){}", "function NewObj() {}", "function createObj(a, b)\n{\n //var newObject = {}; // Not needed ctor function\n this.a = a; //newObject.a = a;\n this.b = b; //newObject.b = b;\n //return newObject; // Not needed for ctor function\n}", "construct (tar...
[ "0.7269592", "0.71305794", "0.6959858", "0.6889945", "0.6811198", "0.67037714", "0.66918826", "0.6671699", "0.6577214", "0.6538281", "0.65016484", "0.64441824", "0.6416497", "0.63833725", "0.6363711", "0.6361445", "0.6339496", "0.631635", "0.6316325", "0.6316325", "0.6316325"...
0.0
-1
May be removed. Not currently used
reset(){ this.ended = false; this.elements = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "transient final protected i...
[ "0.7391319", "0.73725605", "0.71413606", "0.69961905", "0.6908526", "0.6878456", "0.6851884", "0.65124625", "0.64934975", "0.64694625", "0.6425184", "0.64128214", "0.6326194", "0.62956107", "0.62510985", "0.61789596", "0.61450046", "0.6122066", "0.610433", "0.60626006", "0.60...
0.0
-1
This method is used to set a custom terminal function for the push on the last created Flow in the Flow chain
setTerminalFunction(func){ if( Util.isFunction(func) ) this.terminalFunc = func; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "push(input){\n this.next !== null ? this.next.push(input) : this.terminalFunc(input);\n }", "Push() {\n\n }", "function Push() {\n console.debug(\"Push()\");\n}", "static get PUSH_LEFT() { return \"pushLeft\"; }", "function setTerminal() {\n \"use strict\";\n addInput(SHELLNEW);...
[ "0.5894712", "0.5687585", "0.55689806", "0.55226415", "0.5410262", "0.53981024", "0.53510433", "0.53049326", "0.52745247", "0.5273706", "0.527057", "0.525383", "0.5235407", "0.520267", "0.5181505", "0.51257867", "0.51084137", "0.50890785", "0.5045798", "0.5039319", "0.5020774...
0.6085474
0
This method create a Flow from several data types. Supported data types are: Array, Flow, Map, Set, Object, FileSystem, JAMLogger
static from(data){ return FlowFactory.getFlow(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return...
[ "0.6014337", "0.5861445", "0.53727204", "0.5016639", "0.49903375", "0.4984653", "0.4975973", "0.49730957", "0.49730957", "0.49670136", "0.4927937", "0.4919229", "0.48817575", "0.4831915", "0.4805668", "0.47669953", "0.47496417", "0.47432217", "0.4739487", "0.4725464", "0.4701...
0.6073683
0
This method creates a Flow using different modes from supplied arguments
static of(){ if( arguments.length == 0 ) return FlowFactory.getFlow([]); if( arguments.length > 1 ) return FlowFactory.getFlow(arguments); if( arguments.length == 1 && Util.isNumber(arguments[0]) ) return new IteratorFlow(FlowFactory....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.s...
[ "0.5705125", "0.56897783", "0.5656588", "0.5529257", "0.5344734", "0.51809794", "0.5176161", "0.5161175", "0.5136103", "0.5111144", "0.50556713", "0.5043777", "0.5017146", "0.49989784", "0.49793434", "0.49251306", "0.48796272", "0.48600587", "0.48528117", "0.48454717", "0.483...
0.5701238
1
This creates a Flow from a range of numbers. It is assumed that end > start
static fromRange(start, end){ return FlowFactory.getFlow([...new Array(end - start + 1).keys()].map((elem) => elem + start)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRange(start, end, step) {\n return new Range(\n type.isBigNumber(start) ? start.toNumber() : start,\n type.isBigNumber(end) ? end.toNumber() : end,\n type.isBigNumber(step) ? step.toNumber() : step\n );\n }", "function createRange(start, end, step) {\n return n...
[ "0.6557774", "0.6553659", "0.65510285", "0.65236956", "0.65049326", "0.64819974", "0.6318393", "0.62468153", "0.6182466", "0.61631614", "0.61609024", "0.6149031", "0.6106702", "0.6085905", "0.6048761", "0.60284626", "0.6016698", "0.6012064", "0.5992934", "0.59705955", "0.5959...
0.7746055
0
This is a direct method to create a Flow from file.
static fromFile(file){ return new IteratorFlow(FlowFactory.createIteratorFromFileSystem(file)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static from(data){\n return FlowFactory.getFlow(data);\n }", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = th...
[ "0.6166627", "0.57145196", "0.56857115", "0.562967", "0.5604891", "0.5471463", "0.5301391", "0.5241441", "0.5224979", "0.51904845", "0.5137636", "0.50957966", "0.5093447", "0.50872844", "0.50281215", "0.50156933", "0.49810165", "0.4952644", "0.49317124", "0.48863092", "0.4859...
0.70620036
0
Dummy function to be used by collect
static toArray(){ return "toArray"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return ...
[ "0.73877877", "0.66418546", "0.66418546", "0.66418546", "0.66349894", "0.66349894", "0.66349894", "0.64273256", "0.6314596", "0.6117025", "0.6117025", "0.59968644", "0.57376856", "0.57353544", "0.5720762", "0.5706844", "0.56929576", "0.56698734", "0.5658614", "0.5657462", "0....
0.0
-1
Dummy function to be used by collect
static toSet(){ return "toSet" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return ...
[ "0.73877877", "0.66418546", "0.66418546", "0.66418546", "0.66349894", "0.66349894", "0.66349894", "0.64273256", "0.6314596", "0.6117025", "0.6117025", "0.59968644", "0.57376856", "0.57353544", "0.5720762", "0.5706844", "0.56929576", "0.56698734", "0.5658614", "0.5657462", "0....
0.0
-1
Dummy function to be used by OrderBy
static ASC(){ return "ASC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DE...
[ "0.6982649", "0.62106574", "0.60469484", "0.60469484", "0.5973395", "0.5899146", "0.5852469", "0.58466953", "0.58419573", "0.5827838", "0.5808664", "0.5788289", "0.5765332", "0.5756178", "0.5754691", "0.5651835", "0.5651835", "0.5651835", "0.5647551", "0.56164104", "0.5599080...
0.52609926
40
Dummy function to be used by OrderBy
static DESC(){ return "DESC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DE...
[ "0.6984175", "0.6211202", "0.6047289", "0.6047289", "0.5973239", "0.5899177", "0.58527905", "0.58454394", "0.5842255", "0.58277667", "0.5808379", "0.57904786", "0.5765817", "0.57563853", "0.5754423", "0.5653292", "0.5653292", "0.5653292", "0.5648085", "0.5617021", "0.56006575...
0.0
-1
Dummy function to be used by OrderBy
static NUM_ASC(){ return "NUM_ASC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DE...
[ "0.6984175", "0.6211202", "0.6047289", "0.6047289", "0.5973239", "0.5899177", "0.58527905", "0.58454394", "0.5842255", "0.58277667", "0.5808379", "0.57904786", "0.5765817", "0.57563853", "0.5754423", "0.5653292", "0.5653292", "0.5653292", "0.5648085", "0.5617021", "0.56006575...
0.0
-1
Dummy function to be used by OrderBy
static NUM_DESC(){ return "NUM_DESC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DE...
[ "0.6982649", "0.62106574", "0.60469484", "0.60469484", "0.5973395", "0.5899146", "0.5852469", "0.58466953", "0.58419573", "0.5827838", "0.5808664", "0.5788289", "0.5765332", "0.5756178", "0.5754691", "0.5651835", "0.5651835", "0.5651835", "0.5647551", "0.56164104", "0.5599080...
0.0
-1
FLOW METHODS This method restricts data operation to a certain number, starting from the first item it can see.
limit(num){ if( num <= 0 ) throw new Error("Limit value must be greater than 0"); var flow = new RangeMethodFlow(0, num); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skip(num){\n if( num <= 0 )\n throw new Error(\"Skip value must be greater than 0\");\n\n var flow = new RangeMethodFlow(num, Number.MAX_VALUE);\n setRefs(this, flow);\n\n return flow;\n }", "function EnsureLimit() {\n\t\t\t\tif (_itemId > 10 && (...
[ "0.5690883", "0.5311678", "0.5290672", "0.5168561", "0.5142593", "0.51268005", "0.4991036", "0.49759328", "0.4947757", "0.49148992", "0.4912665", "0.4898238", "0.48551947", "0.4844317", "0.48417974", "0.48272336", "0.48217312", "0.48174116", "0.48081303", "0.4784529", "0.4756...
0.5594103
1
The number of elements to skip in the data stream
skip(num){ if( num <= 0 ) throw new Error("Skip value must be greater than 0"); var flow = new RangeMethodFlow(num, Number.MAX_VALUE); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skip() {\n\t return that._source.slice(4).then(function(chunk) {\n\t if (chunk == null) return {done: true, value: undefined};\n\t header = view(array = concat(array.slice(4), chunk));\n\t return header.getInt32(0, false) !== that._index ? skip() : read();\n\t });\n\t }",...
[ "0.69645816", "0.6717245", "0.6171246", "0.6139315", "0.6139315", "0.6139315", "0.6139315", "0.60687983", "0.6066338", "0.6034649", "0.59845823", "0.59341836", "0.5928784", "0.5928784", "0.5928784", "0.5928784", "0.5812787", "0.5783848", "0.5734192", "0.5641494", "0.5611645",...
0.5469301
29
Skip until the condition in the function argument returns true
skipUntil(func){ if( !Util.isFunction(func) ) throw new Error("skipUntil requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 1); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skipWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 2);\n setRefs(this, flow);\n\n return flow;\n }", "takeWhile(func){\n if( !Util.isFunc...
[ "0.7029516", "0.6718507", "0.67023265", "0.66092503", "0.65189856", "0.65189856", "0.65139866", "0.6432234", "0.6400434", "0.6175636", "0.6145253", "0.6144896", "0.61159474", "0.6108472", "0.6106238", "0.60610074", "0.6059095", "0.6037861", "0.6037861", "0.60053694", "0.59980...
0.6817808
1
Skip while the condition in the function argument returns true
skipWhile(func){ if( !Util.isFunction(func) ) throw new Error("skipWhile requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 2); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skip(opSt) { return false; }", "takeWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 4);\n setRefs(this, flow);\n\n return flow;\n }", "async resolv...
[ "0.6879535", "0.6777159", "0.66293716", "0.65964663", "0.6511093", "0.6500644", "0.6500644", "0.64705396", "0.62586856", "0.62370336", "0.62226963", "0.6222539", "0.61811286", "0.61511815", "0.6101928", "0.6062624", "0.60604185", "0.6048583", "0.5979251", "0.5973103", "0.5966...
0.7103854
0
Keep accepting the piped data until the condition in the function argument returns true This method also takes the data that meets the condition but skips after
takeUntil(func){ if( !Util.isFunction(func) ) throw new Error("takeUntil requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 3); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while ((!x.done) && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }", "takeWhile(func){\n if( !Util.i...
[ "0.6032363", "0.6009052", "0.5894059", "0.5502335", "0.549489", "0.549489", "0.5455754", "0.54302037", "0.54252577", "0.54174346", "0.53798", "0.5376534", "0.53666985", "0.53475714", "0.5334338", "0.5330845", "0.5312011", "0.5293243", "0.5265569", "0.52574325", "0.5243032", ...
0.5618757
3
Keep accepting the piped data while the condition in the function argument returns true
takeWhile(func){ if( !Util.isFunction(func) ) throw new Error("takeWhile requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 4); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }", ...
[ "0.5588876", "0.55531573", "0.5489361", "0.54739535", "0.5465496", "0.5399858", "0.53974634", "0.5315248", "0.5290117", "0.5277283", "0.521335", "0.52082443", "0.52006364", "0.52006364", "0.5190021", "0.51740724", "0.51729184", "0.517272", "0.5147424", "0.5143029", "0.5111831...
0.5447432
5
This create a data window to operate on
range(startIndex, endIndex){ if( startIndex < 0 ) throw new Error("Start Index cannot be negative"); if( endIndex <= 0 ) throw new Error("End Index must be greater than 0"); if( startIndex > endIndex ) throw new Error("End Index cannot ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWindow() {\n\t\tpopulateData(\"employment\",1);\n\t}", "function makeChartWindow() {\n\tvar chartWindow = $(\n\t\t\"<div id='chartWindow' class='ui-widget-content resizable movable'>\" + \n\t\t \"<div id='chartTitleBar' class='movableWindowTitleBar'>\" + \n\t\t \"<div id='chartTitleText' class...
[ "0.6333172", "0.568205", "0.55629206", "0.5411922", "0.54106224", "0.53886354", "0.5357712", "0.5325728", "0.53065014", "0.52989614", "0.5283861", "0.52700675", "0.5251572", "0.521602", "0.51900035", "0.517553", "0.51752836", "0.51701975", "0.5168563", "0.5165006", "0.5161955...
0.0
-1
This maps one or more parts of a data...as with MapReduce
select(func){ var flow = new Flow(); if( Util.isFunction(func) ) flow.pipeFunc = func; else{ flow.pipeFunc = function(input){ return input[func]; }; } setRefs(this, flow); return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processData(data) {\n mapData = data[0]\n incidence = data[1];\n mortality = data[2]\n for (var i = 0; i < mapData.features.length; i++) {\n mapData.features[i].properties.incidenceRates = incidence[mapData.features[i].properties.adm0_a3];\n mapData.features[i].properties.mortalityRates = mortal...
[ "0.6129621", "0.59837294", "0.5661337", "0.5516505", "0.5446484", "0.5387967", "0.535542", "0.5287701", "0.52764606", "0.526623", "0.5242507", "0.5216665", "0.51901126", "0.51873523", "0.5151459", "0.5148634", "0.51045245", "0.51024413", "0.5098705", "0.5089407", "0.5089407",...
0.0
-1
This maps data from one input to many outputs using the input function to generate the collection
selectExpand(func){ var flow = new SelectExpandFlattenMethodFlow(func); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compute(data) {\n return data.map(d => {\n return {\n input: encode(d.input),\n output: d.output\n }\n });\n}", "map(getOutput) {\n const self = this;\n return new Seq(function* () {\n for (const element of self)\n yield getOutput(element);\n ...
[ "0.5845911", "0.57997525", "0.5771829", "0.56820375", "0.559674", "0.5565334", "0.55287766", "0.5518632", "0.55140597", "0.5485255", "0.54753476", "0.5430437", "0.5368826", "0.5366108", "0.5351709", "0.53433114", "0.53322077", "0.5331424", "0.53075516", "0.53075516", "0.52963...
0.0
-1
This does data filtering
where(func){ var flow = new WhereMethodFlow(func); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filteredData(ds){\n\t\treturn ds.filter(function(entry){\n\t\t\t\treturn (UniNameFilter === null || UniNameFilter === String(entry[\"VIEW_NAME\"]))\n\t\t\t\t\t&& (UOAFilter === null || UOAFilter === String(entry[\"Unit of assessment name\"])); // keep if no year filter or year filter set to year being rea...
[ "0.7577056", "0.7546823", "0.7363577", "0.7307347", "0.7269179", "0.7262557", "0.7176279", "0.7156935", "0.71417934", "0.71336764", "0.71023756", "0.70818555", "0.70460916", "0.70460576", "0.70409906", "0.7000739", "0.6996826", "0.69850945", "0.6971106", "0.6941638", "0.68972...
0.0
-1
This method discretizes a Flow
discretize(span, length, spawnFlows){ if( spawnFlows === undefined ) //if this argument was not specified, we default to true spawnFlows = true; var flow = new DiscretizerFlow(span, getDataEndObject(length), spawnFlows); setRefs(this, flow); this.isDisc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateFlow() {\n this.flow += 1;\n }", "function getMaxFlow()\n {\n\n Graph.instance.edges.forEach(\n function(key, edge)\n {\n edge.state.flow = 0;\n })\n\n var no_path_found = false;\n currentFlow = 0;\n while(!no_path_found)\n ...
[ "0.5719512", "0.56993496", "0.53552854", "0.5220769", "0.5174941", "0.5171247", "0.51712376", "0.49766344", "0.48833254", "0.48824742", "0.4876707", "0.4875268", "0.4849155", "0.48481536", "0.4814602", "0.47855714", "0.4782492", "0.47178924", "0.47153184", "0.47084096", "0.47...
0.50022054
7
Function to be used by collect
static toMap(keyFunc){ var groupFunc = keyFunc; if( !Util.isFunction(keyFunc) ) { groupFunc = function (input) { return input[keyFunc]; }; } return groupFunc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return self => collect_(self, f);\n}", "function collect(collector, collected)\n{\n collected.remove();\n}", "function collectAllWith(pf, __trace) {\...
[ "0.73632026", "0.64950097", "0.6187338", "0.5952919", "0.58741635", "0.57947814", "0.57544214", "0.5729692", "0.5697806", "0.55472684", "0.55420387", "0.5536479", "0.5477412", "0.54462093", "0.54036117", "0.53454214", "0.529837", "0.52953535", "0.52857536", "0.5241673", "0.52...
0.0
-1
This allows a custom operation on the data elements seen at the last Flow
foreach(func){ var data, _next; _next = this.next; this.next = null; while( (data = this.process()) != null ) func(data); this.next = _next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "peek(){\n return this.data[this.data.lenght - 1]\n }", "addLast(e) {\n // let { data, size } = this;\n // // last time, size become data.length\n // if ( size >= data.length ) {\n // \tthrow new Error('addLast failed. Array is stuffed');\n // }\n // data[size] = i;\n // size ++; 归并...
[ "0.5935606", "0.5754769", "0.5748815", "0.5699038", "0.5559181", "0.5559181", "0.5534117", "0.55078715", "0.5498485", "0.5498485", "0.54982674", "0.5490613", "0.5438254", "0.54037255", "0.5354391", "0.5342514", "0.5340543", "0.5320211", "0.52920663", "0.52794516", "0.52734596...
0.0
-1
Alias of foreach for those familiar with the JS forEach
forEach(func){ this.foreach(func); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ForEach() {}", "function forEach(arr, fun) { return HTMLCollection.prototype.each.call(arr, fun); }", "function foreach(a, f) {\n for (var i = 0; i < a.length; i++) {\n f(a[i]);\n }\n}", "forEach(callback, thisArg = undefined) {\n let i = 0;\n for (let p in this)\n call...
[ "0.7932546", "0.7412556", "0.73404443", "0.7309132", "0.7269947", "0.7161315", "0.7154374", "0.7056756", "0.7028455", "0.69966483", "0.6978964", "0.69717395", "0.6971216", "0.69622266", "0.69577485", "0.6856901", "0.6834711", "0.6832951", "0.6823172", "0.6802958", "0.67939556...
0.7717121
1
This function is used to set the linked references for Flows (like LinkedLists)
function setRefs(primary, secondary){ secondary.prev = primary; primary.next = secondary; secondary.rootFlow = primary.rootFlow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setReferences(currentId) {\n if (!(this.referencedVariables[currentId].originalIds.length === 1\n && this.referencedVariables[currentId].originalIds[0] === currentId)) {\n this.referencedVariables[currentId].originalIds.forEach((d) => {\n this.setReferences(d);\n ...
[ "0.6091946", "0.6017897", "0.59291023", "0.5927652", "0.5911776", "0.59032995", "0.58989304", "0.58872604", "0.58802027", "0.5861781", "0.58299994", "0.5828967", "0.57657737", "0.5746016", "0.5735655", "0.5723207", "0.57144654", "0.56937146", "0.56832844", "0.56626827", "0.56...
0.6770335
0
This method is used to determine if data is pushed on this IteratorFlow as a stream
isStream(){ return this.iterators.length > 0 && this.iterators[0].streamer && Util.isStreamer(this.iterators[0].streamer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\...
[ "0.65608674", "0.6411723", "0.6329973", "0.6166335", "0.61634654", "0.6122687", "0.6122133", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", ...
0.7266703
0
The process method will act like the pipe method in the default Flow class (but without an input)
process(){ if (this.pos >= this.iterators.length) { this.pos = 0; return null; } if( !this.isDiscretized ) { //##go through the iterators one after the other## //get the data from the current iterator v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "process() {}", "process() {}", "function Process(){}", "_transform(data, done){\r\n this.stdio.stdin.splitPush(data)\r\n this.fork.stdin.write(data) && done() || this.fork.stdin.on('drain', done)\r\n }", "function pipe() {\n return {name: 'pipe', value: [].slice.call(arguments)}\n}", "f...
[ "0.6748917", "0.6748917", "0.6656468", "0.60588413", "0.602799", "0.59697235", "0.58565086", "0.57908386", "0.5767287", "0.5764625", "0.57430077", "0.57076347", "0.56861466", "0.5676333", "0.56135297", "0.56135297", "0.56107163", "0.559984", "0.5544666", "0.5532164", "0.55255...
0.5405385
32
This methods merges another data input on the current stream. It is only available to IteratorFlow We can not merge Streamers with other data types
merge(data){ var isStream = this.isStream(); var iterator = FlowFactory.getIterator(data); //ensure that we cannot mix streams and static data structures if( (!isStream && iterator.streamer) || (isStream && !iterator.streamer) ) throw new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function merge$() {\n\tfor (var _len = arguments.length, streams = Array(_len), _key = 0; _key < _len; _key++) {\n\t\tstreams[_key] = arguments[_key];\n\t}\n\n\tvar values = streams.map(function (parent$) {\n\t\treturn parent$.value;\n\t});\n\tvar newStream = stream(values);\n\tstreams.forEach(function triggerMerg...
[ "0.6134648", "0.6035722", "0.58465743", "0.5826035", "0.5820796", "0.5814241", "0.56638765", "0.56244284", "0.5609664", "0.55938804", "0.5549562", "0.5514483", "0.5475858", "0.5460846", "0.5442579", "0.5441733", "0.54165757", "0.5394357", "0.5347644", "0.53381926", "0.5338192...
0.7981541
0
This method is used by OutFlow to trigger the start of a push flow for finite data and for JS generators
_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too... var obj; if( !this.isDiscretized ) { while(true) { if (!this.isListening || this.pos >= this.iterators.length) break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "begin() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"start\")) arr.exe();\n this.engine.phases.current = this;\n this.engine.events.emit(this.name, this);\n }", "_definitelyPush() {\n\t\t// create copy of collected chunks to be pushed as...
[ "0.57655185", "0.5632301", "0.5508445", "0.54772514", "0.5462174", "0.5454371", "0.53902304", "0.538924", "0.5375783", "0.53715616", "0.5368803", "0.53670794", "0.5361112", "0.532122", "0.52992535", "0.528071", "0.5265861", "0.525854", "0.5254401", "0.52314043", "0.52100694",...
0.6006543
0
Register to listen for data changes in streamers and push elements through the Flow chain This method is called by startPush when the push operation is required to start listening for data changes in the streamers
_listen(){ if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency var streamers = []; //the order with which we should arrange data in discretized flows for (let iterator of this.iterators) { if (iterator.str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('subtaskWasModified', subtaskWasModified);\n channel.bind('subtaskWasDeleted', subtaskWasDeleted);\n channel.bind('subtaskWasComplete...
[ "0.5843148", "0.58224446", "0.5739786", "0.5671986", "0.5607331", "0.554507", "0.5531636", "0.55246484", "0.54794145", "0.54533654", "0.5435203", "0.5428958", "0.54111075", "0.54063994", "0.53553325", "0.53542805", "0.5327822", "0.52222365", "0.52170205", "0.52170205", "0.521...
0.5460947
9
This method makes the IteratorFlow discretizable.
discretize(span, spanLength, spawnFlows){ if( spawnFlows === undefined ) spawnFlows = true; this.discreteStreamLength = span; this.isDataEndObject = getDataEndObject(spanLength); this.isDiscretized = true; var flow = new DiscretizerFlow(span,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n ...
[ "0.6228786", "0.57286453", "0.57180357", "0.5533352", "0.54622626", "0.54398274", "0.53323853", "0.5311075", "0.52953213", "0.52953213", "0.5273414", "0.5252151", "0.5244799", "0.5223933", "0.5223933", "0.5207388", "0.5204728", "0.5200674", "0.51508933", "0.514868", "0.514501...
0.0
-1
This method subscribes a Flow (IteratorFlow) to a Streamer to listen for data changes This method is placed outside the class to prevent external access
function subscribeToStream(streamer, flow){ var func = function(data){ setTimeout(() => flow._prePush(data, streamer), 0); }; streamer.subscribe(func); flow.subscribers[streamer.key] = func; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (it...
[ "0.65513027", "0.5845343", "0.5828928", "0.58125", "0.5673418", "0.56472117", "0.5590598", "0.5556058", "0.5555709", "0.55441004", "0.5483723", "0.5482346", "0.5442747", "0.54296744", "0.5423778", "0.5405285", "0.53719753", "0.53719753", "0.5355241", "0.5355241", "0.5355241",...
0.5941531
1
we cannot sort in a push
push(input){ this.next !== null ? this.next.push(input) : this.terminalFunc(input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n\t}", "sort() {\n\t}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data...
[ "0.6692783", "0.6692783", "0.6558604", "0.6537924", "0.6419929", "0.6409419", "0.63682246", "0.6349012", "0.6329023", "0.62746865", "0.62673795", "0.6265736", "0.62430525", "0.6197283", "0.6182318", "0.6180305", "0.6180135", "0.6167526", "0.61529577", "0.61529577", "0.6149281...
0.0
-1
This method receives streams of data from the Streamer subscription
notify(data){ this.push(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sub(streams){\n this.socket.on('open',async ()=>{\n await this.checkGrantAccessAndQuerySessionInfo()\n this.subRequest(streams, this.authToken, this.sessionId)\n this.socket.on('message', (data)=>{\n // log stream data to file or console here\n // console.l...
[ "0.7555975", "0.67507976", "0.62720823", "0.62312895", "0.6212201", "0.60684174", "0.60365725", "0.59991777", "0.5997595", "0.59265834", "0.5922826", "0.5919994", "0.5863007", "0.58500856", "0.5810274", "0.5797977", "0.5763799", "0.5763379", "0.5731796", "0.5728546", "0.57232...
0.0
-1
regularize InFlow if it is chained for piping
process(){ return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function pipeline (input, fun1, fun2) {\n return fun2(fun1(input))\n}", "function piper(transformer) {\r\n function nextPipe(nextTransformer) {\r\n return piper(function (value) {\r\n return next...
[ "0.5841287", "0.57548285", "0.5680209", "0.5627322", "0.56138843", "0.55605215", "0.5546891", "0.5528825", "0.5528825", "0.5528825", "0.5521588", "0.5500015", "0.5500015", "0.5462556", "0.54427505", "0.54389554", "0.5417531", "0.5380848", "0.5370469", "0.5343364", "0.5328384"...
0.0
-1
This method would be called by the OutFlow each time data is available at the Flow chain end. If a receiver is specified in the constructor, the receiver would be sent the data each time it arrives otherwise, you will need to override this class to specify your implementation
push(input, key){ if( this.receiver != null ) this.receiver(input, key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onReceive(data)\n {\n //console.log(\"RX:\", data);\n\n // Capture the data\n this.receivedBuffers.push(data);\n\n // Resolve waiting promise\n if (this.waiter)\n this.waiter();\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEven...
[ "0.6152492", "0.6127788", "0.6118728", "0.6118728", "0.6118728", "0.61002374", "0.6060994", "0.6017111", "0.6017111", "0.5976113", "0.5910101", "0.58992016", "0.5889595", "0.58468443", "0.58468443", "0.5837217", "0.58325315", "0.5799023", "0.5738228", "0.5667161", "0.5640132"...
0.0
-1
This will be used to subscribe a listener for data streams
subscribe(listener){ if( (listener.notify && Util.isFunction(listener.notify)) || Util.isFunction(listener) ) this.listeners.push(listener); else throw new Error("Listener object must either be a function or an object with a `notify` function."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listen() {\n const subscription = this.client.subscribe(\n this.subject,\n this.queueGroupName,\n this.subscriptionOptions()\n );\n\n subscription.on('message', (msg) => {\n console.log(\n 'Message Received: ' + this.subject + '/' + th...
[ "0.6750277", "0.66075", "0.6567859", "0.6429837", "0.64089686", "0.6402483", "0.6361166", "0.63215816", "0.6285055", "0.6283506", "0.6281141", "0.62720525", "0.621081", "0.61862016", "0.6184958", "0.61642575", "0.61564994", "0.6145766", "0.6134912", "0.6117304", "0.6096442", ...
0.0
-1
This method should be called by your internal implementation to send data to listeners like the InFlow and/or IteratorFlow
send(data){ Flow.from(this.listeners).where(listener => listener.notify && Util.isFunction(listener.notify)).foreach(listener => listener.notify(data)); Flow.from(this.listeners).where(listener => !(listener.notify && Util.isFunction(listener.notify)) && Util.isFunction(listener)).foreach(listen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dispatch(data) {\n this._receiveListener(data);\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", ...
[ "0.64082885", "0.62990487", "0.62565744", "0.6215769", "0.6215769", "0.6215769", "0.61426413", "0.60756236", "0.60725445", "0.6047418", "0.6030183", "0.6023809", "0.5988507", "0.59221447", "0.59221447", "0.59221447", "0.59020776", "0.59020776", "0.5895517", "0.588165", "0.586...
0.73781633
0
This method will be used by the InFlow/IteratorFlow to unsubscribe from receiving stream data. When stopPush is called on element of the Flow chain
unsubscribe(listener){ let index = this.listeners.indexOf(listener); if( index >= 0 ) this.listeners.splice(index, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stop() {\r\n Utils.log('ttt-pusher stop() stopping pusher');\r\n this.data.pusherContext && this.data.pusherContext.stop();\r\n }", "stop () {\n const priv = privs.get(this)\n if (!priv.receiving) return\n priv.receiving = false\n priv.emitter.removeListener(priv.eventName, priv.receive)...
[ "0.69079596", "0.65906143", "0.65443397", "0.6526078", "0.62948966", "0.61777025", "0.61586237", "0.61419386", "0.6114692", "0.6060259", "0.603508", "0.5947886", "0.58970886", "0.5894296", "0.5830296", "0.57991934", "0.57971674", "0.57534665", "0.5739715", "0.569963", "0.5699...
0.0
-1
Create a Flow from any object that implements the Javascript Iterable framework
static createIteratorFromIterable(iterable){ //TODO save state for restarting when Flow is being reused return iterable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow...
[ "0.6666977", "0.63464296", "0.5896912", "0.56354374", "0.56059796", "0.5503439", "0.54766095", "0.54322994", "0.5401885", "0.5397467", "0.5382203", "0.5318642", "0.5275923", "0.5248009", "0.521134", "0.5196181", "0.5196181", "0.5191738", "0.5181552", "0.51783013", "0.51695806...
0.61491233
2
Create a Flow from a JS Generator
static createIteratorFromGenerator(gen){ return (function(_gen){ let gen = _gen; let iterator = gen(); let elem; return { next: function(){ try { elem = iterator.next(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static from(data){\n return FlowFactory.getFlow(data);\n }", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "f...
[ "0.6088698", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586",...
0.0
-1
Create a Flow from a Javascript Object, iterating through the properties and creating a propertyvalue pair
static createIteratorFromObject(object){ return (function(_object){ let object = _object; let keys = Object.keys(object); let pos = 0; let length = keys.length; return { next: function(){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "astProperties(o) {\r\n\t\t\t\t\tvar computed, property, ref1, ref2;\r\n\t\t\t\t\tref1 = this.properties, [property] = slice1.call(ref1, -1);\r\n\t\t\t\t\tif (this.isJSXTag()) {\r\n\t\t\t\t\t\tproperty.name.jsx = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcomputed = property instanceof Index || !(((ref2 = property.name) != ...
[ "0.5428093", "0.51196736", "0.5051341", "0.50242513", "0.49777344", "0.48940158", "0.48647156", "0.48534572", "0.48284438", "0.47887272", "0.4767054", "0.4766189", "0.4759498", "0.47594088", "0.47523558", "0.474209", "0.46894836", "0.46600226", "0.4653309", "0.4640964", "0.46...
0.0
-1
As opposed to throwing an exception, create a Flow with the value as the only value
static createIteratorFromValue(value){ return (function(){ let used = false; return { next: function(){ try { return used ? {done: true} : {value: value, done: false}; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "function absorb(val) {\n return (isStream(val)) ? val.val : v...
[ "0.5648238", "0.55251104", "0.5514643", "0.53843147", "0.5381006", "0.5273136", "0.5196975", "0.51839685", "0.510901", "0.50123024", "0.5007515", "0.49796844", "0.4960807", "0.4913575", "0.4872144", "0.4839806", "0.47758394", "0.47608337", "0.47528547", "0.47121018", "0.46940...
0.0
-1
This method is for regularizing the design
static createIteratorFromStreamer(streamer){ return (function(){ let length = streamer.size(); let nul = {}; let pos = 0; let item; return { next: function(){ try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "recalculateAndDraw() {\n\n\t\tif (!this.tgOrigin.getOrigin()) return;\n\n\t\t//console.log('recalculateAndDraw');\n\t\t\n\t this.tgRoads.calDispRoads();\n\t\tthis.tgWater.calDispWater();\n\t\tthis.tgLanduse.calDispLanduse();\n\t\t//this.tgPlaces.calDispPlace();\n\t\t\n\n\t\tif (this.currentMode === 'DC') {\n\t\t\...
[ "0.5526384", "0.5486169", "0.5429024", "0.54123235", "0.5346472", "0.53269637", "0.5249486", "0.5236653", "0.5207239", "0.5203663", "0.5183295", "0.51811075", "0.5123563", "0.5122597", "0.51168984", "0.510657", "0.5106151", "0.5102037", "0.509806", "0.50856674", "0.50805694",...
0.0
-1
Run axecore tests on each urlview combination
async run() { await Promise.all(this[QUEUE].map(this[TEST_PAGE])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run_all_tests(){\n\t$(\"#tests_list .section_title\").each(function(num,obj){\n\t\ttype=obj.id.substr(8);\n\t\trun_tests(type);\n\t});\n}", "function applicationsTests({ apiGET, apiPOST }) {}", "async function runTestOnAllHtmlUrls() {\n\tconst testUrls = [\n\t\t 'http://example.com',\n\t\t /*\n \t 'h...
[ "0.5877059", "0.58756995", "0.5785658", "0.5730221", "0.5632493", "0.56255096", "0.55625737", "0.5537204", "0.55075663", "0.55004597", "0.5495863", "0.54705954", "0.542833", "0.5367382", "0.5356986", "0.5323607", "0.5317409", "0.5294425", "0.52214086", "0.52053154", "0.520488...
0.0
-1
Generate HTML and JSON reports
async report() { const { logger, db } = this[OPTIONS]; const testedPages = await db.read('tested_pages'); logger.info('Saving JSON report'); const json = new JSONReporter(this[OPTIONS]); await json.open(); await json.write(testedPages); await json.close(); logger.info('Saving HTML Repo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static generateHTMLReport(capabilities) {\n const os = require(\"os\");\n\n report.generate({\n jsonDir: path.resolve('./test/'),\n reportPath: path.resolve('./test/'),\n metadata: {\n browser: {\n name: capabilities.get('browserName'...
[ "0.6794463", "0.66173285", "0.6382862", "0.6302422", "0.6292933", "0.62754923", "0.62583613", "0.62321824", "0.6148897", "0.6145369", "0.60203487", "0.6013818", "0.5989477", "0.59849805", "0.59810555", "0.59620833", "0.5927691", "0.5901185", "0.58981466", "0.58895123", "0.588...
0.74107265
0
Sort Password Change Log GridBy krishna on 21082015
function SortPasswordLogGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortPasswordLogGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAllRecords').pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reorderLogFiles(logs) {\n\tlet dig = [];\n\tlet lett = [];\n\tfor(let i = 0; i < logs.length; i++){\n\t\tlet lastCode = logs[i][logs[i].length - 1].charCodeAt();\n\t\tif (lastCode >= 97 && lastCode <= 122) {\n\t\t\tlett.push(logs[i]);\n\t\t}else {\n\t\t\tdig.push(logs[i]);\n\t\t}\n\t}\n\t//把前面貼到後面\n\tlett...
[ "0.58694744", "0.5628748", "0.56030595", "0.550858", "0.5469627", "0.543787", "0.543787", "0.5412021", "0.5375251", "0.5368646", "0.5326117", "0.530929", "0.528575", "0.5276939", "0.5272496", "0.5270572", "0.52679026", "0.5251555", "0.523941", "0.5233764", "0.5230345", "0.5...
0.50169605
46
Sort Password Disable Log GridBy krishna on 21082015
function SortPasswordDisableLogGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortPasswordDisableLogGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "function enableSortingBtn(){\r\n document.querySelector(\"#bubble\").disabled = false;\r\n document.querySelector(\"#insertion\").disabled...
[ "0.5633179", "0.5468326", "0.54259646", "0.53695476", "0.53389585", "0.53231835", "0.53129697", "0.52924436", "0.52732754", "0.5264437", "0.5213561", "0.5211993", "0.5208002", "0.51733595", "0.51582164", "0.5131508", "0.5127855", "0.5127671", "0.5125064", "0.508045", "0.50798...
0.5329112
5
Sort User Log Activity GridBy krishna on 21082015
function SortUserLogActivityGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortUserLogActivityGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); //var isAll = $('#ShowAllRec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAccessed);\n\t\tvar date2 = Date.parse(entry2.dateAccessed);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n c...
[ "0.6543412", "0.6395627", "0.6367838", "0.6333604", "0.6103069", "0.60980606", "0.6069885", "0.60545176", "0.6046345", "0.6039842", "0.60212874", "0.5987934", "0.5971773", "0.59702843", "0.59563315", "0.5880812", "0.58712864", "0.58670044", "0.5864401", "0.5862018", "0.586136...
0.5835192
23
Sort Daily Charge Report GridBy krishna on 21082015
function SortDailyChargeReportGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var departmenttype = $('#ddlDepartment').val(); var url = "/Reporting/SortDailyChargeReportGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_sortDataByDate() {\n this.data.sort(function(a, b) {\n let aa = a.Year * 12 + a.Month;\n let bb = b.Year * 12 + b.Month;\n return aa - bb;\n });\n }", "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "function Sor...
[ "0.680611", "0.67671496", "0.6370093", "0.6266206", "0.6251742", "0.6240144", "0.6144035", "0.61390495", "0.6072873", "0.59748936", "0.5972378", "0.5967003", "0.59616387", "0.594454", "0.59426844", "0.59377426", "0.5931969", "0.5925862", "0.59247744", "0.5923642", "0.5889181"...
0.0
-1
Sort Collection Report Report GridBy krishna on 21082015
function SortCollectionLogtGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortCollectionLogtGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAllRecords...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key ...
[ "0.67517096", "0.6634672", "0.6634672", "0.65874153", "0.6571248", "0.6562572", "0.6497997", "0.6473892", "0.64595795", "0.6450784", "0.64372116", "0.64096856", "0.6399269", "0.6382355", "0.63754743", "0.63303363", "0.63284194", "0.63193995", "0.6312161", "0.6297437", "0.6296...
0.0
-1