query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Expands directory tree for specified path. TODO(yawano): Move this to remote_call.js
function expandDirectoryTreeFor(windowId, path) { return expandDirectoryTreeForInternal_(windowId, path.split('/'), 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function expandAllDirectories() {\n collapsedDirectoryPaths.clear();\n refreshExpandedState();\n}", "flushDirectory(path) {\n const self = this;\n if( fs.existsSync(path) ) {\n fs.readdirSync(path).forEach(function(file) {\n const curPath = path + \"/\" + file;\n ...
[ "0.634808", "0.5770047", "0.5585405", "0.549627", "0.5455609", "0.53657347", "0.53474844", "0.5324917", "0.52585787", "0.52372426", "0.5218947", "0.5216805", "0.5206158", "0.520295", "0.51898474", "0.5166645", "0.51229167", "0.51100653", "0.5100074", "0.5098117", "0.509472", ...
0.6796749
0
Navigates to specified directory on Download volume by using directory tree.
function navigateWithDirectoryTree(windowId, path) { return expandDirectoryTreeFor(windowId, path).then(function() { // Select target path. return remoteCall.callRemoteTestUtil('fakeMouseClick', windowId, [`[full-path-for-testing="${path}"]`]); }).then(function() { // Wait until Files.app is nav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateJumpDirTree() {\n $.get(\"/api/get_dir_tree\", function(data) {\n $('#fileList').tree({\n data: [data],\n autoOpen: 0\n });\n $('#fileList').bind(\n 'tree.select',\n function(event) {\n // The clicked node is 'event...
[ "0.635549", "0.6120642", "0.5890063", "0.58498764", "0.5824956", "0.57924724", "0.57920146", "0.5733929", "0.5681804", "0.5651995", "0.55734956", "0.5514295", "0.5512735", "0.54560184", "0.54539096", "0.54529417", "0.5431434", "0.5423372", "0.541589", "0.5412689", "0.5410841"...
0.63760793
0
Clicks context menu item of id in directory tree.
function clickDirectoryTreeContextMenuItem(windowId, path, id) { return remoteCall.callRemoteTestUtil('focus', windowId, [`[full-path-for-testing="${path}"]`]).then(function() { // Right click photos directory. return remoteCall.callRemoteTestUtil('fakeMouseRightClick', windowId, [`[full-path-fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function clickDirectoryTreeContextMenuItem(appId, path, id) {\n const contextMenu = '#directory-tree-context-menu:not([hidden])';\n const pathQuery = `#directory-tree [full-path-for-testing=\"${path}\"]`;\n\n chrome.test.assertTrue(\n !!await remoteCall.callRemoteTestUtil('focus', appId, [pathQuery])...
[ "0.7913264", "0.6582551", "0.6403922", "0.6251919", "0.62164867", "0.6181767", "0.6181767", "0.6140361", "0.6017886", "0.5996249", "0.59922576", "0.59600633", "0.59051585", "0.5876244", "0.5861801", "0.5852344", "0.58239204", "0.5820277", "0.5793644", "0.57567406", "0.5747062...
0.8268754
0
Navigates to destination directory and test paste operation to check whether the paste operation is done correctly or not. This method does NOT check source entry is deleted or not for cut operation.
function navigateToDestinationDirectoryAndTestPaste(windowId) { // Navigates to destination directory. return navigateWithDirectoryTree(windowId, '/destination').then(function() { // Confirm files before paste. return remoteCall.waitForFiles(windowId, ITEMS_IN_DEST_DIR_BEFORE_PASTE, {ignoreLastModif...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function navigateToDestinationDirectoryAndTestPaste(appId) {\n // Navigates to destination directory.\n await navigateWithDirectoryTree(appId, '/My files/Downloads/destination');\n\n // Confirm files before paste.\n await remoteCall.waitForFiles(\n appId, ITEMS_IN_DEST_DIR_BEFORE_PASTE, {ignoreLastM...
[ "0.71681637", "0.59370446", "0.59007233", "0.581976", "0.57834935", "0.5729486", "0.561289", "0.5605278", "0.5480693", "0.54447687", "0.54202014", "0.5407394", "0.5376506", "0.5321648", "0.5313909", "0.52679497", "0.52314943", "0.51984304", "0.51875675", "0.5181155", "0.51782...
0.70533013
1
Rename photos directory to specified name by using directory tree.
function renamePhotosDirectoryTo(windowId, newName, useKeyboardShortcut) { return (useKeyboardShortcut ? remoteCall.callRemoteTestUtil( 'fakeKeyDown', windowId, ['body', 'Enter', 'Enter', true /* ctrl */, false, false]) : clickDirectoryTreeContextMenuItem(windowId, '/photos', 'rename')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function renamePhotosDirectoryTo(appId, newName, useKeyboardShortcut) {\n if (useKeyboardShortcut) {\n chrome.test.assertTrue(await remoteCall.callRemoteTestUtil(\n 'fakeKeyDown', appId,\n ['body', 'Enter', true /* ctrl */, false, false]));\n } else {\n await clickDirectoryTreeContextMe...
[ "0.7005225", "0.67827666", "0.63121736", "0.5949987", "0.5933502", "0.5924204", "0.58963996", "0.54613566", "0.54402685", "0.5410019", "0.5404253", "0.5279402", "0.51844835", "0.5142289", "0.51373154", "0.5104162", "0.50509024", "0.5045126", "0.5027715", "0.49906197", "0.4970...
0.69182634
1
Renames directory and confirms that an alert dialog is shown.
function renameDirectoryFromDirectoryTreeAndConfirmAlertDialog(newName) { var windowId; return setupForDirectoryTreeContextMenuTest().then(function(id) { windowId = id; return navigateWithDirectoryTree(windowId, '/photos'); }).then(function() { return renamePhotosDirectoryTo(windowId, newName, false);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function renameDirectoryFromDirectoryTreeAndConfirmAlertDialog(newName) {\n const appId = await setupForDirectoryTreeContextMenuTest();\n\n await navigateWithDirectoryTree(appId, '/My files/Downloads/photos');\n await renamePhotosDirectoryTo(appId, newName, false);\n\n // Confirm that a dialog is shown.\...
[ "0.765292", "0.5988977", "0.5931281", "0.5850155", "0.5813524", "0.5807145", "0.57916594", "0.57096225", "0.56956047", "0.5692407", "0.5596962", "0.554244", "0.544004", "0.53469974", "0.5291092", "0.5260228", "0.52575487", "0.5239521", "0.5205398", "0.51664054", "0.51511693",...
0.73586166
1
body setter pass it on to the koa object body setter
set body(response) { this.koa.body = response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bodySetter(req, res, next) {\n if (req._post_body) return next()\n req.post_body = req.post_body || \"\"\n\n if ('POST' != req.method) return next()\n\n req._post_body = true\n\n req.setEncoding('utf8')\n req.on('data', function(chunk) {\n req.post_body += chunk\n })\n\n next()\n}", "setBody(...
[ "0.71489245", "0.6734567", "0.6734567", "0.6663888", "0.6630026", "0.66045976", "0.65435654", "0.6504557", "0.64344615", "0.63884604", "0.63718796", "0.6327295", "0.6327295", "0.6327295", "0.62471384", "0.620196", "0.6154932", "0.6062831", "0.6038326", "0.59507155", "0.588189...
0.71105224
1
refers to the koa request object
get request() { return this.koa.request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "requestObject(request) {\n return request; \n }", "get request() { return this._request; }", "get request() {\n return this._request;\n }", "constructor(request) {\n this.request = request;\n }", "get request() {\n return this._request;\n }", "get request() {\n\t\treturn thi...
[ "0.7203328", "0.71392614", "0.6949877", "0.69003946", "0.6866224", "0.68397105", "0.6801643", "0.6801643", "0.67051923", "0.6601575", "0.6320527", "0.6271693", "0.61570626", "0.60851246", "0.60789675", "0.6074438", "0.6067342", "0.6056805", "0.6050607", "0.6033176", "0.600708...
0.73808306
0
Create a heatmap proportional to the range of the provided numerical data
function generateHeatmap(data) { const svMin = 30; const svMax = 100; const hue = 204; if (!data.length) return [rgb2hex(...hsv2rgb(hue, svMin / 100, svMax / 100))]; const sortedData = data.toSorted((a, b) => a - b); const dataMin = sortedData[0]; const dataMax = sortedData[sortedData.length - 1]; ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function range_scatter(data, ranges) {\n\n let range = d3.scaleLinear()\n .domain([data.min, data.max])\n .range([ranges.min, ranges.max]);\n return range;\n}", "function drawHeatMapViz(data, min, max, top_5) {\n\n hMapSvg = d3.select(\".heatmap_svg\");\n\n // Creating groups\n const g = h...
[ "0.6658679", "0.6325097", "0.6211786", "0.60875183", "0.59809595", "0.5930743", "0.58754057", "0.5872672", "0.58012897", "0.5796262", "0.5787282", "0.57791847", "0.5742586", "0.57403094", "0.5733538", "0.573013", "0.5721872", "0.5713557", "0.5705561", "0.56990176", "0.5663147...
0.6992927
0
Extract the outermost values from an array into a new array. Returns an array of length 0, 1, or 2.
function getArrayOuter(arr) { const result = []; if (arr.length) result.push(arr[0]); if (arr.length > 1) result.push(arr[arr.length - 1]); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unzip(array) {\n var result = Array(array[0].length).fill(0).map(it => Array(array.length))\n for(var i = 0; i < array[0].length; i++) {\n for(var j = 0; j < array.length; j++) {\n result[i][j] = array[j][i]\n }\n }\n return result\n }", "function flattenUnbound(arr) {\r\n\...
[ "0.64274293", "0.6427185", "0.61380494", "0.6057493", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60419387", "0.60158575", "0.6014586", "0.60054433", "0.60036045", "0.5992129", "0.59867454", "0.59467626", ...
0.7189213
0
Constructs a data point for the line graph by averaging daily measurements
function lineDatum(dayData) { return { type: 'line', x: dayData[0].x, y: toFixedFloat(getMean(dayData.map((d) => d.y)), MEASUREMENT_PRECISION), depth: toFixedFloat( getMean(dayData.map((d) => d.depth).filter((d) => d !== null)), MEASUREMENT_PRECISION, ), depthUnit: dayData.find((d)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepare_average_data(data){\n\n // empty current lists\n line_data_x.length = 0\n line_data_y.length = 0\n var line_data = []\n\n\n // determine the data for the line\n data.forEach(function(d){\n line_data.push({\"x\": d[currentvariable_scatter_x], \"y\":d[currentvariable_scatter...
[ "0.64900494", "0.6352915", "0.62323", "0.5984675", "0.59228855", "0.5883962", "0.5875072", "0.5875072", "0.5838776", "0.582676", "0.5819211", "0.5770671", "0.57609457", "0.5725426", "0.570237", "0.56804216", "0.5679741", "0.5677869", "0.56756324", "0.56739336", "0.56486046", ...
0.6963659
0
Show link to download recorded stream
function showDownloadLink(name) { if (name) { // Set correct path for records. Stream records are saved to WCS_HOME/records directory. // http://flashphoner.com/docs/wcs4/wcs_docs/html/en/wcs-developer-guide/quick_start_recording_streams.htm var link = window.location.protocol + "//" + windo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showDownloadLink(name) {\n // Set correct path for records. Stream records are saved to WCS_HOME/records directory.\n // http://flashphoner.com/docs/wcs4/wcs_docs/html/en/wcs-developer-guide/quick_start_recording_streams.htm\n var link = window.location.protocol + \"//\" + window.location.host + ...
[ "0.79172546", "0.6585252", "0.6492362", "0.61755353", "0.6163545", "0.6067557", "0.60607314", "0.6036876", "0.6034119", "0.5988738", "0.5985966", "0.5979425", "0.5976737", "0.59173954", "0.5874369", "0.58647496", "0.5849988", "0.58440727", "0.58123523", "0.5800629", "0.579758...
0.7848345
1
============================================================ get status from api
function getStatus() { api({ data: "cmd=getstatus" },syncStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "status() {\r\n return this.request('GET', 'status/config');\r\n }", "function getStatus() {\n return status;\n }", "getGameStatus() {\n this.setMethod('GET');\n this.setPlayerId();\n return this.getApiResult(`${Config.PLAY_API}/${this.playerId}/status`);\n }", "function ApiStatu...
[ "0.7275659", "0.7253153", "0.7215621", "0.71418345", "0.71260923", "0.7077783", "0.70259607", "0.70148534", "0.69673115", "0.6878871", "0.68743664", "0.68729115", "0.68427086", "0.6816185", "0.68090045", "0.6808052", "0.6797171", "0.67853534", "0.6772422", "0.67579985", "0.67...
0.7915799
0
============================================================ get switch ids from area
function getSwitches() { api({ data: "cmd=getswitch", type: "switch" },selectBlocks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMenuCLassesIDs()\n {\n let IdsArray = [];\n const elements = document.querySelectorAll('.banner,.section');\n for(const elm of elements)\n {\n IdsArray.push(elm.id);\n }\n \n return IdsArray;\n }", "function getTargetIds(mo...
[ "0.5932506", "0.5770644", "0.57209694", "0.56089437", "0.5570405", "0.5562645", "0.5534264", "0.553398", "0.5511139", "0.54068345", "0.54041666", "0.53659976", "0.534114", "0.53020525", "0.52963036", "0.5274935", "0.5260298", "0.52576137", "0.5216546", "0.5157137", "0.5071922...
0.6659439
0
============================================================ get signal ids from area
function getSignals() { api({ data: "cmd=getsignal", type: "signal" },selectBlocks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSegmentIds() {\n return _.keys(this.mapping);\n }", "function getMenuCLassesIDs()\n {\n let IdsArray = [];\n const elements = document.querySelectorAll('.banner,.section');\n for(const elm of elements)\n {\n IdsArray.push(elm.id);\n }\n \...
[ "0.56525326", "0.5468853", "0.53714013", "0.5368365", "0.53301543", "0.5313685", "0.5302164", "0.5285531", "0.52405566", "0.52142245", "0.51889336", "0.5188185", "0.51596403", "0.5147837", "0.5131335", "0.5119753", "0.50838023", "0.5072681", "0.50424343", "0.503472", "0.50247...
0.60386276
0
============================================================ get route targets from area
function getRoute(start,target) { api({ data: "cmd=getroute&start="+start+"&target="+target, type: "block" },selectRoute); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateRoute(startFeature, endFeature) {\n const getId = feature => {\n const payload = JSON.parse(feature.properties.althurayyaData)\n return payload.URI;\n }\n\n const start = getId(startFeature);\n const end = getId(endFeature);\n\n // Note that this returns the IDs of the *NODES* alo...
[ "0.6201012", "0.58875763", "0.5846409", "0.5668379", "0.56644803", "0.55887276", "0.5561142", "0.55491394", "0.5501554", "0.5487857", "0.5436183", "0.54050565", "0.53508425", "0.53335184", "0.5315497", "0.5303733", "0.5294426", "0.52551395", "0.52546525", "0.52393097", "0.523...
0.59948033
1
============================================================ synchronice status with desk
function syncStatus(data,options) { //TODO write status to desk // sync completed setStatusDisplay("syncStatus",2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sync() {\n// start sync process\n\tsetStatusDisplay(\"syncStatus\",1);\n\n\tgetStatus();\n}", "async function updateDevicesStatus() {\n //Zera as duas listas\n devicesOnline.splice(0,devicesOnline.length)\n devicesOffline.splice(0,devicesOffline.length)\n\n co...
[ "0.68823075", "0.63715494", "0.6229904", "0.61832595", "0.61655724", "0.6072066", "0.6052535", "0.6044261", "0.60271245", "0.5959868", "0.59468716", "0.5942581", "0.5911789", "0.58558303", "0.58274436", "0.5824878", "0.5789187", "0.5760915", "0.5749589", "0.5721363", "0.57188...
0.7399851
0
============================================================ create the desk
function createDesk(data,options) { // create rows var element; var id; var full = $(data).find("area").attr("full"); var order = $(data).find("area").attr("order"); var area = options.name; var height = $(data).find("area").children().length; var width = ""; // create desk container // on order position $("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDesk() {\n let ul = createNewElement('ul', 'deck');\n document.getElementsByClassName('container')[0].appendChild(ul);\n ul.setAttribute('id', 'deck');\n}", "function setDeskCards()\n {\n var cardCovers = properties.cardCovers.front;\n\n desk.removeCards();\n for (...
[ "0.66265327", "0.62835026", "0.6058412", "0.58274096", "0.5659164", "0.5654383", "0.5630225", "0.5625368", "0.56247526", "0.56086725", "0.5605812", "0.5588414", "0.5495733", "0.54254234", "0.5418209", "0.54139835", "0.53913474", "0.5369289", "0.5359527", "0.5352973", "0.53442...
0.71203625
0
============================================================ set signal lights
function setSignal(id,status) { $("[signal_id='"+id+"'].light").addClass("off"); $("[light_id='signal"+status+"'][signal_id='"+id+"'].light").removeClass("off"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetLights(lights : VehicleLight[], condition : boolean)\n\t{\n\t\tfor (var curLight : VehicleLight in lights)\n\t\t{\n\t\t\tcurLight.on = condition;\n\t\t}\n\t}", "function lightsOn(x, y){\r\n var L = makeObject();\r\n drawFnormz = L.norm;\r\n normColor = L.normCo;\r\n vert = L.vertex;\r\n ...
[ "0.6839268", "0.6614399", "0.65083694", "0.64736044", "0.64543486", "0.64247537", "0.6416738", "0.6414861", "0.641178", "0.63998306", "0.6347586", "0.6333608", "0.6330966", "0.63090044", "0.6300756", "0.6287532", "0.6286741", "0.6285257", "0.62680644", "0.6263412", "0.626154"...
0.6847152
0
Builds the row with columns from the specified names. If the item parameter is specified, the memebers of the names array will be used as property names of the item; otherwise they will be directly parsed as text.
function _buildRowColumns(names, item) { var row = '<tr>'; if (names && names.length > 0) { $.each(names, function(index, name) { var c = item ? item[name+''] : name; row += '<td>' + c + '</td>'; }); } row += '<tr>'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _buildRowColumns(names, item) {\n var row = '<tr>';\n if (names && names.length > 0)\n {\n $.each(names, function(index, name) {\n var c = item ? item[name+''] : name;\n if (c > 0) {\n row += '<td style=\"background-color:#f9de...
[ "0.7533987", "0.54174334", "0.5364656", "0.5364656", "0.5323949", "0.52973217", "0.522302", "0.5202401", "0.5133278", "0.5017195", "0.49811295", "0.4928874", "0.49248797", "0.49126258", "0.4907285", "0.4897498", "0.48965102", "0.4859163", "0.4855396", "0.48367396", "0.4835111...
0.8139054
0
Builds and sets the headers of the table.
function _setHeaders() { // if no headers specified, we will use the fields as headers. _headers = (_headers == null || _headers.length < 1) ? _fields : _headers; var h = _buildRowColumns(_headers); if (_table.children('thead').length < 1) _table.prepend('<thead></thead>'); _tabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setHeaders() {\n // if no headers specified, we will use the fields as headers.\n _headers = (_headers == null || _headers.length < 1) ? _fields : _headers; \n var h = _buildRowColumns(_headers);\n if (_table.children('thead').length < 1) _table.prepend('<thead></thead>');\n ...
[ "0.8054584", "0.7424992", "0.7359216", "0.73390895", "0.73343337", "0.7325464", "0.7286157", "0.72632825", "0.723406", "0.72016716", "0.7149198", "0.7149198", "0.70813406", "0.70600724", "0.70330364", "0.7025688", "0.70193696", "0.6971628", "0.69697773", "0.6942329", "0.69383...
0.8040347
1
Validate an event, and if its valid, save
function validateAndSaveEvent(event) { valid = Q.Promise(function(resolve, reject){ event.validate(function(err) { if(err) reject(err); else resolve(); }) }); return valid.then(function() { return Location.exists(event.location) }) .then(function() { return User.exists(event.owner) }) .the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveEvent(request, response){\n // console.log(\"In saveEvent\");\n // for (var item in request.body)\n // if(request.body.hasOwnProperty(item)){\n // console.log(item + \" = \" + request.body[item]);\n // }\n \n var contextData = {\n errors: [],\n allowedDateInfo: allow...
[ "0.62544304", "0.62490267", "0.62343526", "0.61620456", "0.6097371", "0.607794", "0.60468894", "0.59933007", "0.5983963", "0.58892477", "0.58646125", "0.5845167", "0.5840974", "0.58038217", "0.58009565", "0.57914567", "0.57681787", "0.56661284", "0.5628537", "0.56151825", "0....
0.7565806
0
Creates an Overlord The Overlord runs the empire at the top level.
function Overlord() { this.overseers = this.linkOverseers(); this.requestHelp = this.getRequestHelpRooms(); this.sendHelp = this.getSendHelpRooms(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function party_create(){\n\n\t//log.error('party_create for '+this.tsid);\n\n\tthis.party = apiNewGroup('party');\n\n\tthis.party.init(this);\n}", "function createEmployee()\n {\n inquirer.prompt(employeePrompt).then(data => {\n if(data.role===\"Exit\")\n {\n \n ...
[ "0.52489954", "0.52381676", "0.5215582", "0.5075236", "0.4981223", "0.49407375", "0.49383956", "0.49383724", "0.49319872", "0.4929398", "0.49229422", "0.4901614", "0.48970774", "0.48966032", "0.48775387", "0.48734304", "0.4861407", "0.485572", "0.4854032", "0.4836064", "0.483...
0.6818179
0
Create Bubble JSON Object with Name , Description and Previous Identified Childrens
function CreateBubble(name, description, childen) { children = childen || []; if (name.length > 25) { name = name.substring(0, name.indexOf(" ")); } return { "name": name, "description": description, "children": childen }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateBubbleChild(name, address, sessionCount, collection, quantitySum) {\r\n return {\r\n \"name\": name,\r\n \"address\": address,\r\n \"sessionCount\": sessionCount,\r\n \"collection\": collection,\r\n \"quantitySum\": quantitySum\r\n };\r\n}", "function creat...
[ "0.6397094", "0.6282616", "0.577865", "0.5741025", "0.56599724", "0.56124884", "0.5567438", "0.55370146", "0.5501607", "0.5477095", "0.5450324", "0.5412093", "0.5335308", "0.53136814", "0.53111136", "0.52925605", "0.5279798", "0.52765864", "0.525572", "0.525572", "0.5249561",...
0.705971
0
Create a Bublbe Child JSON Element using Name, Address, Session Count, Child Collection and Debris Quantity
function CreateBubbleChild(name, address, sessionCount, collection, quantitySum) { return { "name": name, "address": address, "sessionCount": sessionCount, "collection": collection, "quantitySum": quantitySum }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(item, quantity) {\r\n this.item = item;\r\n this.quantity = quantity;\r\n this.children = {};\r\n }", "function addContractEventListItem(listId, childData, len){\n console.log(JSON.stringify(childData))\n}", "function addNewQty() {\n\n $('a.addQtyItem').unbind('click'...
[ "0.6362865", "0.5891805", "0.5702696", "0.5329444", "0.5305701", "0.5297654", "0.5255457", "0.5210157", "0.518846", "0.5161207", "0.5080526", "0.50587684", "0.5050025", "0.5041845", "0.50344926", "0.5030705", "0.50196576", "0.5005011", "0.5001558", "0.49961868", "0.4981982", ...
0.72790986
0
Following Code is referenced from Build the Bubble Chart SVG Elements
function chartBubbleMe(error, root) { console.log(error); svg = svg.append("svg:g").attr("transform", "translate(" + 0 + ", 50)") var bubbleObj = svg.selectAll(".topBubble") .data(root.children) .enter().append("g") .attr("id", function (d, i) { return "topBubbleAndText...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SVGColumnChart() {\r\n }", "function qpBubbles(){\n qpBubbles.bubbleButtonClick = bubbleButtonClick;\n var qpSVG = d3.select(\"div#qpBubbles\").append(\"svg\")\n .attr({ width: 600, height: 400 })\n .style({ border: \"lightgray solid\", \"stroke-width\": \"1px\" })\n ...
[ "0.6530286", "0.64916325", "0.6436998", "0.6427796", "0.63890296", "0.6385699", "0.6342301", "0.62599117", "0.6257831", "0.620579", "0.61944807", "0.61654216", "0.61639047", "0.6159044", "0.615628", "0.6135564", "0.61277735", "0.6106267", "0.6091193", "0.6077995", "0.60711265...
0.67536247
0
Setting Expense Report to true
function setExportedToTrue(id) { // getting transaction list var url = nlapiGetContext().getSetting('SCRIPT', 'custscript_coupa_er_url') + '/api/expense_reports/' + id + '?exported=true'; var postData = "<?xml version='1.0' encoding='UTF-8'?><expense-report><exported type='boolean'>true</exported></expense-repo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showEstimation(amount) {\n\t\tif ($(\"input[name='expense_category']:checked\").attr(\"data-limited\")==1) {\n\t\t\tupdateInfo(amount);\n\t\t} else {\n\t\t\t$info.empty();\n\t\t}\n\t}", "defense() {\n this.isDefending = true;\n }", "function updateReportInterval() {\n var reportIntEl = $(...
[ "0.5737833", "0.5650376", "0.5602364", "0.55498403", "0.5524937", "0.54849297", "0.5461793", "0.54605794", "0.54404044", "0.54011524", "0.5391801", "0.5314755", "0.5308953", "0.5262998", "0.52596927", "0.5236367", "0.52046007", "0.51990795", "0.5180536", "0.5136721", "0.51298...
0.6114363
0
Creating Expense Report when the ER is not yet exported to NetSuite
function createExpenseReport(expenseHeaderHeaderNode, tranid) { // VARIABLE DECLARATIONS HERE // var expenseReportLines = new Array(); // var expenseExpenseLine = new Array(); // var coupaEmployee; // var coupaERNumber; // var tranid; var coupaERCustomBody; // var totalamount = 0; // var expenseDate; // var e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createReports() {\r\n var RawDataReport = AdWordsApp.report(\"SELECT Domain, Clicks \" + \"FROM AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT \" + \"WHERE Clicks > 0 \" + \"AND Conversions < 1 \" + \"DURING LAST_7_DAYS\");\r\n RawDataReport.exportToSheet(RawDataReportSheet);\r\n}", "function ExportRepo...
[ "0.61132914", "0.6075613", "0.6032754", "0.59949434", "0.59726125", "0.5907763", "0.5865337", "0.58495426", "0.5846834", "0.5846163", "0.5825454", "0.5797611", "0.5791897", "0.5752448", "0.5681972", "0.56558126", "0.56342286", "0.56135076", "0.55675036", "0.55073434", "0.5493...
0.7006281
0
finding if Expense Report is existing will return the ID if found, will return false if not found
function findExpenseReport(tranid) { var filters = new Array(); filters[0] = new nlobjSearchFilter('custbody_coupa_er_number', null, 'is', tranid); var searchresults = nlapiSearchRecord('expensereport', null, filters); if (searchresults && searchresults.length > 0) { return searchresults[0].getId(); } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkReportExists(){\n $scope.reportFound = false;\n var arrayResultData = savedReportsService.all();\n if(arrayResultData && $scope.saveObject.reportName){\n angular.forEach(arrayResultData,function(item){\n if(item.a...
[ "0.7369589", "0.6437099", "0.62005764", "0.6076629", "0.5981223", "0.5900017", "0.58264554", "0.57006484", "0.5671871", "0.5647107", "0.56283915", "0.55767405", "0.5561052", "0.55540067", "0.553251", "0.55233264", "0.5520532", "0.5512494", "0.5504773", "0.5497218", "0.5497147...
0.69348675
1
getnumber / Function to get the internal based on externnalID for Subsidiaries, location, class, department
function getInternalIDByExternalId(externalId,recordType) { idFilter = new nlobjSearchFilter('externalid', null, 'is', externalId); var columns = new Array(); columns[0] = new nlobjSearchColumn('internalid'); var savedSearch = ''; if (recordType == 'subsidiary') savedSearch ='customsearch_co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubsidiaryInternalID(subWorkdayID) \r\n{\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvar searchColumns = new Array();\r\n\t\t\tsearchColumns[0] = new nlobjSearchColumn('internalid','custrecord_subsidiary');\r\n\t\t\t\r\n\t\t\tvar searchFilters = new Array();\t\t\r\n\t\t\tsearchFilters[0] = new nlobjSearchFilter('...
[ "0.6716901", "0.63499117", "0.6269055", "0.6077824", "0.60413563", "0.59989727", "0.5936029", "0.5927149", "0.58123493", "0.5801326", "0.5772763", "0.575383", "0.5710124", "0.5656729", "0.5574089", "0.55444354", "0.5529964", "0.5528129", "0.5523587", "0.5519393", "0.55140036"...
0.6803301
0
Maps the recipe ingredients to values for display.
mapIngredients_(ingredients) { if (!ingredients) return []; return ingredients.map(ingredient => { const flavor = this.flavorForKey(ingredient.flavor); const vendor = this.vendorForKey(flavor.vendor); const percent = ingredient.percent; return { flavor, vendor, percent }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RecipeDetails({ingredients}) {\n \n\n return ( \n ingredients.map(ingredient=>{\n return (<ul className=\"ingredient-list\" key={Math.floor(Math.random) * 10000}>\n <li>\n {ingredient.text}\n </li>\n <li>\n ...
[ "0.6642354", "0.6537993", "0.64846045", "0.6369493", "0.6286015", "0.6283334", "0.62611014", "0.6243862", "0.6086104", "0.6032635", "0.6025032", "0.60144126", "0.60050464", "0.59814394", "0.59366435", "0.59311295", "0.5917421", "0.5892597", "0.589188", "0.58526015", "0.585063...
0.7257592
0
Prepares a PUT request to the Fastly API, setting a given value for a given path extension
putOpts(pathext, value) { const ver = this.options(pathext); return Object.assign({ method: 'PUT', form: { item_value: value, }, }, ver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _put(path, body, params = {}) {\n const url = makeUrl(path, params);\n const token = getToken();\n if (getToken()) {\n return request.put(url).send(body).set('Accept', 'application/json').set('Content-Type', 'application/json')\n .set('Authorization', token);\n }\n return ...
[ "0.6238098", "0.6204147", "0.61791253", "0.61485845", "0.6072856", "0.5982139", "0.5944734", "0.593851", "0.59376407", "0.5913266", "0.5910901", "0.5871669", "0.58366716", "0.5809227", "0.5759809", "0.5753224", "0.5733749", "0.57286054", "0.57272327", "0.5724997", "0.57208776...
0.6520817
0
Determines the latest version of the service
async getCurrentVersion() { if (this._version) { return this._version; } const service = await this.getService(); return [...service.versions].pop().number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get latestVersion() {\n return this.getStringAttribute('latest_version');\n }", "function getVersion(){\n return version;\n }", "function getCurrentAppVersion() {\n return $http.get((_appMountPath + '/version'));\n }", "getCurrentVersion() {\n let request = this._get('/classes/...
[ "0.6346851", "0.63010055", "0.62891454", "0.6252878", "0.6227869", "0.6177184", "0.61697817", "0.61689913", "0.6154376", "0.6154376", "0.6146563", "0.61451304", "0.6133436", "0.6080026", "0.6066486", "0.6006907", "0.60063666", "0.5957958", "0.5922605", "0.59093624", "0.590886...
0.7119669
0
Creates backends in the service config
async initBackends() { const backends = await this.getBackends(); const missingbackends = Object.entries(backends) .filter(([_key, value]) => value.created_at === undefined) .map(([_key, value]) => value); const existing = Object.entries(backends).length - missingbackends.length; this.tick(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getBackends() {\n // if there are backends without an created_at record, they haven't\n // been fetched from the service yet\n if (Object.values(this._backends).some(e => e.created_at == null)) {\n const opts = await this.version('/backend');\n const backs = await request(opts);\n Obj...
[ "0.602788", "0.6019488", "0.59717786", "0.5667044", "0.55552125", "0.5474195", "0.5419256", "0.54166996", "0.5392734", "0.5361825", "0.53566945", "0.5320239", "0.52776355", "0.51602685", "0.5131773", "0.5127441", "0.50847656", "0.49971482", "0.49754795", "0.49446106", "0.4925...
0.6906843
0
Clones an existing configuration version. Returns a promise.
async cloneVersion() { const cloneOpts = await this.putVersionOpts('/clone'); this.tick(0, 'Cloning Service Config version', 'cloning version'); return request(cloneOpts).then((r) => { this._version = r.number; this.tick(1, `Cloned Service Config Version ${r.number}`, `cloning version ${r.number...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clone() {\n log.debug(`[${this._id}]: generating a fresh (clone) request`);\n return this._client.request(this._config);\n }", "cloneConfig(config) {\n\t\treturn Object.assign({}, config);\n\t}", "clone(opts={}) {\n // remove the id if it exists\n const {'id': deletedKey, ...attrs} = thi...
[ "0.5591221", "0.55446804", "0.506664", "0.5020446", "0.4980198", "0.49406502", "0.4799805", "0.4748134", "0.474513", "0.474513", "0.474513", "0.474513", "0.47187802", "0.4715235", "0.4687758", "0.467079", "0.467079", "0.467079", "0.467079", "0.46572822", "0.459549", "0.4587...
0.7434679
0
Generates VCL for strain resolution from a list of strains
static getStrainResolutionVCL(strains) { return resolve(strains); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getStrainParametersVCL(strains) {\n let retvcl = '';\n let defvcl = '# This file handles the URL parameter whitelist\\n\\n';\n strains.forEach(({ name, params }) => {\n if (params.length === 0) {\n return;\n }\n if (name === 'default') {\n defvcl += '# default parameter...
[ "0.61127466", "0.45374465", "0.45163774", "0.4514168", "0.4446386", "0.44405457", "0.44203967", "0.43964985", "0.43674645", "0.4325366", "0.43244967", "0.43226767", "0.4304065", "0.43003696", "0.42724252", "0.42687994", "0.42658362", "0.425883", "0.424396", "0.42266336", "0.4...
0.6780378
0
Generates VCL for strain resolution from a list of strains
static getStrainParametersVCL(strains) { let retvcl = ''; let defvcl = '# This file handles the URL parameter whitelist\n\n'; strains.forEach(({ name, params }) => { if (params.length === 0) { return; } if (name === 'default') { defvcl += '# default parameters, can be overr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getStrainResolutionVCL(strains) {\n return resolve(strains);\n }", "function brutus(pair,levslist) {\r\n\r\n var purp = [];\r\n for (var x = 0; x < pair.length; ++x){\r\n var currency = pair.substring(3,pair.length);\r\n var Fx1 = [];\r\n var g = 0;\r\n for (var f = 0...
[ "0.6782362", "0.4537027", "0.45160457", "0.4512934", "0.44458884", "0.44405195", "0.44211426", "0.4399619", "0.43700016", "0.4325653", "0.4325297", "0.43230227", "0.43028757", "0.42993003", "0.42734525", "0.42677596", "0.42653042", "0.42585206", "0.42444792", "0.42248446", "0...
0.6111005
1
Purges the entire Fastly cache for the given service version.
async purgeAll() { const baseopts = this.options('/purge_all'); const opts = Object.assign({ method: 'POST', }, baseopts); return request(opts).then((r) => { this.tick(1, 'Purging entire cache'); return r; }) .catch((e) => { const message = 'Cache could not be purged'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "wipeCache() {\n\t\tthis.cached = null;\n\t}", "purgeCache() {\n this._bufferCache = {};\n }", "function clearCache(url) {\n var apiUrl = \"https://api.cloudflare.com/client/v4/zones/\" + cloudflare.ZoneIdentifier + \"/purge_cache\";\n var data = {\n \"files\": [url]\n };\n\n debug('Clearing Cl...
[ "0.5786851", "0.57735187", "0.57472026", "0.57436407", "0.57317376", "0.57317376", "0.5663222", "0.5609986", "0.5534525", "0.55341196", "0.55027777", "0.55003715", "0.5477257", "0.54547626", "0.5392933", "0.5386036", "0.5386036", "0.5386036", "0.5386036", "0.5386036", "0.5386...
0.60306674
0
Constructs a new SaveSignificantPersonsResultModel. The result of creating a third party lead
constructor() { SaveSignificantPersonsResultModel.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createContactRecord(opt_lastname){\n\n var lastname = opt_lastname || 'foobar';\n\n return CrmRestKit\n .Create('Contact', {'LastName': lastname })\n .then(function(data){\n // only the data parameter is relevant\n return data;\n ...
[ "0.48661888", "0.47553524", "0.4693825", "0.46423817", "0.4610529", "0.45511642", "0.4547374", "0.45363384", "0.45313957", "0.45056003", "0.4463691", "0.44235897", "0.4407523", "0.438134", "0.43642306", "0.43527672", "0.4351766", "0.43347245", "0.4333317", "0.4326835", "0.431...
0.6901043
0
utility method for getting a measure from metronomeData
function getMeasure(index) { return window.song.getMeasures()[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get measure() {\n\t\treturn this.__measure;\n\t}", "get measure () {\n\t\treturn this._measure;\n\t}", "function getMeasureOriginalTempo(measureNumber) {\n var soundElements = g_xmlFile.getElementsByTagName(\"sound\");\n var tempo = Math.round(soundElements[measureNumber].getAttribute(\"tempo\"));\n return ...
[ "0.668919", "0.6685403", "0.6189594", "0.6108905", "0.61021745", "0.60830396", "0.60720015", "0.6047217", "0.59804773", "0.5940766", "0.59147924", "0.59014976", "0.5896339", "0.57193404", "0.5707649", "0.5697859", "0.566169", "0.5658449", "0.5617695", "0.5580414", "0.55722755...
0.713544
0
utility method for getting last index from metronomeData
function getLastIndex() { return Object.keys(window.song.getMeasures()).length - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLastIndex() {\n return (this.maxIndex - Math.floor(this.index) - 1) % this.maxIndex;\n }", "function GetLastPosition(index) {\n\n if(index == 0) {\n return 0;\n } else {\n index--;\n if (Sequence[\"Steps\"][index+1][\"Type\"] == 1) {\n return Sequence[\"Steps\"]...
[ "0.7350571", "0.70322484", "0.68764013", "0.6813833", "0.6813833", "0.6779102", "0.6779102", "0.6779102", "0.6713426", "0.6700738", "0.6700738", "0.6700738", "0.6512483", "0.6479764", "0.64778686", "0.64709485", "0.6466007", "0.6425385", "0.6418158", "0.63641393", "0.63241386...
0.74650586
0
private functions A wrapper for the showTip function in order to enable delaying it.
function delayShowTip() { clearTimers(); $this.delayTimer = setTimeout(showTip, o.delay); $this.one(o.hideEvent, hideTip); callbackFn('beforeshow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTip($tip) {\n\t\t\t$tip.animate({\n\t\t\t\topacity: 1,\n\t\t\t}, 500);\n\t\t}", "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n scheduler: me.client\n });\n me.tip = new Tooltip({\n id: `${me.client.id}-ti...
[ "0.75176364", "0.7443791", "0.7401492", "0.72311324", "0.71244454", "0.7107538", "0.69917166", "0.6984454", "0.6925778", "0.69087064", "0.6884647", "0.68713474", "0.68660676", "0.6847015", "0.6829178", "0.68177044", "0.68108976", "0.68108976", "0.68108976", "0.68108976", "0.6...
0.823502
0
gets company data and adds it to state. changes loading to false
async componentDidMount() { try { let data = await JoblyApi.getCompany(this.props.handle); this.setState({ companyData: data, loading: false }); } catch (err) { this.setState({ error: err }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCompanyDetails(companyID) {\r\n var msg = '';\r\n if (_.isEmpty(storageService.getObject('companyLocations'))) {\r\n msg = 'Please wait while we load everything for offline mode...';\r\n showSpinnerDialog(msg);\r\n saveCompanyDataToLocalStorage_(companyID).then(function ...
[ "0.65244573", "0.6423045", "0.64229745", "0.63392043", "0.63139117", "0.62432253", "0.6182122", "0.6170673", "0.61618286", "0.60349613", "0.60333127", "0.60183924", "0.6003672", "0.59562725", "0.59350276", "0.5927025", "0.5882765", "0.58750707", "0.5840835", "0.5833666", "0.5...
0.6622222
0
Checks if the ship is at the same course either in front or behind
function filterShipAtCourse(ship) { // Check if we need to invert the course to see if ship is relevant if (ship.relativePosition == "front" && ship.courseOverGround <= 180) { ship.courseOverGround += 180; } else if (ship.relativePosition == "front" && shi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterShipFromBehind(ship) {\n // Get our and the ships latlon\n var shipLatLon = new LatLon(ship.location.latitude, ship.location.longitude);\n var myLatLon = new LatLon(myShip.location.latitude, myShip.location.longitude);\n\n\n var bearing = myLatLon.bearingT...
[ "0.67827535", "0.6226854", "0.61561733", "0.6101346", "0.6034379", "0.6027099", "0.6007505", "0.59937006", "0.59902656", "0.5976618", "0.5965928", "0.59522235", "0.59502965", "0.5940026", "0.59319395", "0.5928556", "0.58851564", "0.58789694", "0.5852582", "0.58431464", "0.583...
0.6800673
0
Given a single GeoJSON Feature, Annotate with it with properties from the CSV row `this` is bound to the CSV row for convenience. Modifiesbyreference.
async function annotateOneFeature (feature) { feature.properties.id = this["Location Id"] feature.properties.description = this["Description"] // Initialize the total cost if it's not defined. locTotalCost[feature.properties.id] = locTotalCost[feature.properties.id] || 0 // Add this year's cost to the tota...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function csvToGeoJSON(){ //csv = reader.result\r\n\t\t\tvar lines=csv.split(/[\\r\\n]+/); // split for windows and mac csv (newline or carriage return)\r\n\t\t\tdelete window.csv; // reader.result from drag&drop not needed anymore\r\n\t\t\tvar headers=lines[0].split(\",\"); //not needed?\r\n\t\t\tvar matchID = do...
[ "0.6097936", "0.5984584", "0.5868844", "0.57581234", "0.5632847", "0.5623152", "0.5599067", "0.55984724", "0.55984724", "0.55218387", "0.5505895", "0.5505895", "0.5472226", "0.5472226", "0.5435988", "0.54194164", "0.52949196", "0.5266279", "0.52628624", "0.5227028", "0.520819...
0.65178835
0
Given a path to the City Council GeoJSON file, return object that maps district IDs to their GeoJSON boundry
function extractCouncilDistricts (jsonPath) { const districtFileContents = fs.readFileSync(jsonPath) const councilFeatureCollection = JSON.parse(districtFileContents) // keys are district numbers, values are GeoJSONn boundaries let idToBoundaryMap = {} councilFeatureCollection.features.forEach(feature => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function geoJSON(config) {\n let geoJSON = await d3.json(\"countries.geo.json\")\n let path = d3.geoPath(\n d3.geoMercator()\n .scale(180)\n .translate([config.center.x/1.5, config.center.y/1.5])\n )\n let dictFeatures = geoJSON.features.reduce((result, d) => {\n ...
[ "0.6467297", "0.60367453", "0.5897173", "0.5853621", "0.5746764", "0.56167436", "0.5612045", "0.5586392", "0.5533063", "0.5527667", "0.55166245", "0.5486285", "0.5436561", "0.5404183", "0.5393025", "0.5343523", "0.53373957", "0.53182995", "0.5310482", "0.53028595", "0.5288363...
0.8321555
0
Given a GeoJSON feature representing a sidewalk returning, returning the number of the City Council of the district that contains it, or undefined if none was found (perhaps it crosses a boundary)
function addDistrict (feature) { let foundId; for (const districtId of Object.keys(districtToGeoJSON)) { //console.log(`Checking if ${feature.geometry.type} is within ${districtToGeoJSON[districtId].geometry.type}`) if (within(feature, districtToGeoJSON[districtId])) { console.log(`\tAdding Council D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractCouncilDistricts (jsonPath) {\n const districtFileContents = fs.readFileSync(jsonPath)\n const councilFeatureCollection = JSON.parse(districtFileContents)\n\n // keys are district numbers, values are GeoJSONn boundaries\n let idToBoundaryMap = {}\n\n councilFeatureCollection.features.forEach(f...
[ "0.65177464", "0.5724496", "0.5666178", "0.557968", "0.54937625", "0.5480007", "0.5463805", "0.5338018", "0.5244488", "0.5191817", "0.5175361", "0.5174181", "0.51183265", "0.5107408", "0.5099409", "0.50930786", "0.5088649", "0.5088649", "0.5088649", "0.5078935", "0.507637", ...
0.66613936
0
show this weeks code
function showWeekCode() { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); jQuery.ajax({ url: getUrl('/showCode'), method: 'post', success: function (data) { $....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display(){\n\t$(\"#month\").html(getMonthName(currentDate.getMonth()));\n\t$(\"#year\").html(currentDate.getFullYear());\n\tfor(i=0;i<7;i++){\n\t\tif(week[i].getDate()==currentDate.getDate()){ //Add active class to day active\n\t\t\t$('#day'+i).html('<div class=\"day-active mx-auto\" >'+week[i].getDate()+...
[ "0.6948521", "0.6396008", "0.6337323", "0.6333368", "0.6215548", "0.61353123", "0.60952294", "0.60401744", "0.6023837", "0.600862", "0.60065234", "0.59958094", "0.5951135", "0.5888342", "0.58855975", "0.58429176", "0.5842013", "0.5840232", "0.58400506", "0.58268017", "0.57643...
0.6707068
1
Needed to remove complex object clutter from node
_cleanNode(node){ const removeList = ["passengers", "flights", "documents", "phones", "emails"]; for(let i=0; i<removeList.length;i++){ delete node["data"][removeList[i]]; } return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean( node ){\n\tvar l = node.c.length;\n\twhile( l-- ){\n\t\tif( typeof node.c[l] == 'object' )\n\t\t\tclean( node.c[l] );\n\t}\n\tnode.n = node.a = node.c = null;\n}", "function outNode(){\n\t\ttooltipsvg\n\t\t.style(\"opacity\", 0)\n\t\t.attr(\"width\",0)\n\t\t.attr(\"height\",0)\n\t\t.selectAll(\"*...
[ "0.6558441", "0.61011046", "0.6044066", "0.6043807", "0.60240555", "0.59482527", "0.586121", "0.5805477", "0.5786775", "0.5775429", "0.57351077", "0.57319325", "0.57289296", "0.5715741", "0.56887025", "0.5657085", "0.5651752", "0.562403", "0.55988073", "0.5577317", "0.5573192...
0.6123568
1
Update the panel list of sites
function update_site_list(names) { var list = "", current = localStorage.getItem("current_site"); $.each(names,function(a,b){ list += "<option "+(b==current ? "selected ":"")+"value='"+b+"'>"+b+"</option>"; }); $("#site-selector").html(list); try { $("#site-selector").select...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderSites() {\n sitesLayer.clearLayers();\n lMap.removeLayer(sitesLayer);\n\n // Create a label for each attack site, persistent across filtering\n if (app.views.sites) {\n domain.sites.forEach((site) => {\n if (isNotNullNorUndefined(site)) {\n // Create an invisible mar...
[ "0.6308238", "0.6249765", "0.61052865", "0.6086801", "0.6028589", "0.59518594", "0.59292114", "0.5908295", "0.5872385", "0.58705795", "0.58553165", "0.5802401", "0.5779378", "0.5752509", "0.5729522", "0.57235235", "0.5663761", "0.56491965", "0.56442237", "0.56246525", "0.5621...
0.632854
0
Change the current site
function update_site(newsite) { var sites = getsites(); if (newsite in sites) { localStorage.setItem("current_site",newsite); check_configured(); } newload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function change_site(site) {\n var sites = getsites();\n\n var ip = $(\"#cip-\"+site).val();\n var pw = $(\"#cpw-\"+site).val();\n\n site = site.replace(/_/g,\" \");\n\n if (ip !== \"\") sites[site][\"os_ip\"] = ip;\n if (pw !== \"\") sites[site][\"os_pw\"] = pw;\n\n localStorage.setItem(\"sit...
[ "0.70266646", "0.6944624", "0.6898918", "0.6646173", "0.66307974", "0.65834963", "0.6414872", "0.6404545", "0.6360666", "0.62809885", "0.62631905", "0.6252548", "0.618909", "0.61696094", "0.61492497", "0.6077753", "0.60449266", "0.60150206", "0.5923448", "0.5912203", "0.58586...
0.7150299
0
Get the list of sites from the local storage
function getsites() { var sites = localStorage.getItem("sites"); sites = (sites === null) ? {} : JSON.parse(sites); return sites; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getWebsites() {\r\n let websites;\r\n if (localStorage.getItem('websites') === null) {\r\n websites = [];\r\n } else {\r\n websites = JSON.parse(localStorage.getItem('websites'));\r\n }\r\n return websites;\r\n }", "function getLocalStorage() {\n...
[ "0.8030488", "0.71396095", "0.706929", "0.69625574", "0.6945748", "0.6930896", "0.690995", "0.68984854", "0.68984854", "0.6860529", "0.6859729", "0.68562454", "0.6813466", "0.67721975", "0.67716134", "0.67370325", "0.67369735", "0.6710619", "0.6689261", "0.66761565", "0.66652...
0.85074973
0
Check is scanning is complete
function check_scan_status() { if (window.scanprogress == 245) { clearInterval(window.scanning); if (!window.devicesfound.length) { showerror(_("No devices were detected on your network.")); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fakeScanComplete() {}", "function checkSucess() {\n setTimeout(function() {\n if (answered && authenticated && readerOperations.length === 0) {\n done();\n } else {\n checkSucess();\n }\n }, asyncDelay);\n }", "function scan () {\n // Reset found devices\n ...
[ "0.73943764", "0.6480397", "0.6441775", "0.6437667", "0.63008106", "0.62719184", "0.61901087", "0.61254704", "0.61148775", "0.6082483", "0.60810363", "0.60714656", "0.6069831", "0.6067442", "0.60283375", "0.5972486", "0.5950862", "0.5932984", "0.5926375", "0.59014666", "0.589...
0.7225996
1
Show popup for new device after populating device IP with selected result
function add_found(ip) { $("#os_ip").val(ip).parent().hide(); $("#addnew label[for='os_ip']").hide(); $("#site-select").one("popupafterclose", function(){ open_popup("#addnew"); $("#addnew").one("popupafterclose", function(){ $("#os_ip").val("").parent().show(); $("#a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetDeviceIP(){\n showBackgroundImage('wait_message');\n getContent('','/cgi-bin/setup.cgi?GetDeviceIP','function:ShowGetDeviceIP');\n}", "function selectDevice() {\n myDevice.id = deviceList.value();\n responseDiv.html('Selected: ' + deviceList.value());\n}", "function dev_replied(data) {\n localSt...
[ "0.63923234", "0.62369883", "0.62301165", "0.615917", "0.6138931", "0.604905", "0.59977394", "0.5955163", "0.5880847", "0.58486366", "0.5805914", "0.5781366", "0.57782125", "0.5746897", "0.5745314", "0.5722058", "0.56772786", "0.5676866", "0.5663224", "0.56548125", "0.5613735...
0.6580193
0
Translate program ID to it's name
function pidname(pid) { var pname = "Program "+pid; if(pid==255||pid==99) pname=_("Manual program"); if(pid==254||pid==98) pname=_("Run-once program"); return pname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pidname(pid) {\n var pname = _(\"Program\")+\" \"+pid;\n\n if(pid===255||pid===99) {\n pname=_(\"Manual program\");\n } else if(pid===254||pid===98) {\n pname=_(\"Run-once program\");\n } else if (checkOSVersion(210) && pid <= controller.programs.pd.length) {\n pname = con...
[ "0.7563557", "0.66634446", "0.6351917", "0.6307218", "0.6222683", "0.60801005", "0.6032115", "0.60296756", "0.5998972", "0.5977323", "0.5973739", "0.58700955", "0.57141227", "0.57030034", "0.5650795", "0.5582889", "0.54891896", "0.54886603", "0.5470779", "0.54643524", "0.5446...
0.72356445
1
Make the list of all programs
function make_all_programs() { if (window.controller.programs.nprogs === 0) { return "<p style='text-align:center'>"+_("You have no programs currently added. Tap the Add button on the top right corner to get started.")+"</p>"; } var n = 0; var list = "<p style='text-align:center'>"+_("Click any ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_all_programs() {\n if (controller.programs.pd.length === 0) {\n return \"<p class='center'>\"+_(\"You have no programs currently added. Tap the Add button on the top right corner to get started.\")+\"</p>\";\n }\n var list = \"<p class='center'>\"+_(\"Click any program below to expand...
[ "0.66041434", "0.6145836", "0.6110881", "0.6027543", "0.5656598", "0.56541556", "0.56144625", "0.5610782", "0.55805796", "0.545899", "0.5416845", "0.538464", "0.536136", "0.53477263", "0.5321034", "0.52987874", "0.52757823", "0.5272688", "0.5270566", "0.5246924", "0.520927", ...
0.72112423
0
Generate a new program view
function fresh_program() { return make_program("new",1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index(req, res, next) {\n\t// parameters for res.render(par1, par2)\n\t// par1 : a view in the views folder\n\t// par2 : data to be used when rendering the view\n // console.log(ALOmodel);\n // console.log(autopop);\n res.render(\n \t'program',\n \t{ title: 'Add Program',\n program: programModel...
[ "0.5991379", "0.5915591", "0.58029103", "0.5770292", "0.575647", "0.5711492", "0.5711492", "0.5711492", "0.5711492", "0.56747997", "0.5673443", "0.56414497", "0.5641388", "0.5589806", "0.55853117", "0.555748", "0.555748", "0.5550987", "0.5538528", "0.553374", "0.553374", "0...
0.62139726
0
This function supersedes the function on the web page When user is entering a normal event, it falls through this function to submitForm2 If user is entering a NEW repeating event (Repeating toggle is ON and there are no preexisting valuse in Notes) then we begin process of creating new events If the user toggles OFF b...
function preSubmitForm() { var junk; //Go figure. Server checks data instead of locally before submitting, so we have to avoid a server issue... if (checkForm(true) == false) { return; } // reset all LI's to normal color $('li[id$=LI]', iPage).removeClass('ui-body-e').addClass('ui-btn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editEventIndiv(ev)\n{\n if (!ev)\n ev = window.event;\n ev.stopPropagation();\n\n // check for open event frame\n if (windowList.length > 0)\n { // there are incomplete actions pending\n let text = '';\n let comma = '';\n let button = doc...
[ "0.6773769", "0.6708309", "0.6623429", "0.65848523", "0.6579191", "0.63124245", "0.6250563", "0.6210761", "0.6188084", "0.6177521", "0.60733765", "0.6051058", "0.60291004", "0.5977631", "0.59772813", "0.5970527", "0.5951831", "0.5945979", "0.589802", "0.5839486", "0.5830514",...
0.7452152
0
fixFormPost the formpost variable contains form field data and it was set in web page javascript Since the repeating event fields are unrecognozed by the server, we need to yank them out This function removes them.
function fixFormPost() { // Removes RecurEvent=off&RepeatType=Days&RepeatEveryType=&OccurrencesType formPost = formPost.replace(/&RecurEvent=[^&]*/, ''); formPost = formPost.replace(/&RepeatType=[^&]*/, ''); formPost = formPost.replace(/&RepeatEveryType=[^&]*/, ''); formPost = formPost.replace(/&Occ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCloseForm() {\r\n $(\"#pm_form_container_\" + nrow + \" tbody tr:not(:first)\").remove();\r\n\r\n $(\"#pm_post_container_\" + nrow + \" div\").each(function (i, v) {\r\n var idv = $(v).attr('id').split('_');\r\n var id_sub = idv[2];\r\n var id = $('inpu...
[ "0.57299304", "0.5722415", "0.5713413", "0.5681296", "0.56649023", "0.5649223", "0.5635925", "0.56292784", "0.5617414", "0.5603857", "0.55897516", "0.558792", "0.55782294", "0.55724293", "0.554847", "0.5540031", "0.5513734", "0.5506765", "0.5500904", "0.5473265", "0.54586804"...
0.7512991
0
AdvancementSave Saves advancement info from form for all repeating events except the last
function AdvancementSave() { var inst = $('#advancement').mobiscroll('getInst'); var values = inst.getValues('advancement'); if (values.length == 0 && preExistAdvance == false) { IntermediateSave(); return; } // send values to server var arrayLength = values.length; var formD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveEdited(){\n\tactiveDataSet = studentList.find( arr => arr.absenceId == activeElement ); \n\t$.post(\"\", {\n\t\t\t\t'type': 'editabsence',\n\t\t\t\t'console': '',\n\t\t\t\t'aid': activeDataSet['absenceId'],\n\t\t\t\t'id': activeElement,\n\t\t\t\t'start': formatDateDash(document.getElementById('esicks...
[ "0.63064957", "0.61952466", "0.6100183", "0.5970639", "0.5931354", "0.5871432", "0.5849591", "0.58395225", "0.5830406", "0.5824933", "0.58113253", "0.57879144", "0.57853496", "0.5784288", "0.5782473", "0.5769275", "0.5766789", "0.57602733", "0.5756043", "0.5747848", "0.572754...
0.6454086
0
submitForm2 Always enter this with an iEventID If there are repeating event posts (multiple requests), we need to intercept intermediate responses and do not want the deaful browser handlers to update the DOM or this instance of script. Therefore, we will use the datearray to indicate whether this is the final call. If...
function submitForm2() { if (stDate.length == 0) { //window.console &&console.log("Using standard .ajax"); //alert('In submitForm. This is where formPost should be updated with new dates'); postReminder(); //postAdvancement(); /* var url= 'https://' + host +'/mobil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NextEvent() {\n\n if (preExistEvent == false) {\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status != 200) {\n errStatusHandle(this.status, recurErr, [], NextEvent, []);\n }\n ...
[ "0.7221886", "0.69519866", "0.67565984", "0.6482454", "0.6375841", "0.6263864", "0.6146085", "0.6134611", "0.59654623", "0.59605753", "0.5944766", "0.5914804", "0.5828519", "0.5806347", "0.579565", "0.5788992", "0.57752067", "0.57576126", "0.5719009", "0.5717317", "0.5712144"...
0.71160114
1
sbDateFormat Given a date string, return a string that SB displays when selecting a calendar date
function sbDateFormat(dtin) { var d = new Date(dtin); //Assumes 24 hour format var monA = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; var yr = d.getFullYear(); var mon = d.getMonth(); var day = d.getDate(); var hour = d.getHours(); // Returns the hou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "returnDateFormat(date){\n var day = new Date(date);\n return day.toDateString();\n }", "function getCalendarString(dateString) {\n\tvar fullDate = new Date(dateString);\n\tvar year = fullDate.getFullYear();\n\tvar month = fullDate.getMonth() + 1; //indexes at 0\n\tvar day = fullDate.getDate();\...
[ "0.65914", "0.6587402", "0.6490269", "0.64833754", "0.6471055", "0.64591074", "0.6450647", "0.6425383", "0.64225966", "0.6390588", "0.63866305", "0.6370051", "0.6357254", "0.6354047", "0.6322426", "0.63200283", "0.6299565", "0.6283939", "0.6278751", "0.6272086", "0.62665135",...
0.67405725
0
get_sameWeekandDay Given a date (curdate) return a date in the month defined in newdate that happens on the same weekday and occurrence of that weekday in the month e.g. if the curdat is the 2nd tuesday, return the second tuesday date in the newdate month
function get_sameWeekandDay(curdate, newdate) { var cd = new Date(curdate); var nd = getdayone(newdate); var nthwk = getnth(curdate); var mon = nd.getMonth() + 1; var yr = nd.getFullYear(); var hr = cd.getHours(); var min = cd.getMinutes(); var DayofWeek = cd.getDay() + 1; var dr =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdayone(curdate) {\n var nd = new Date(curdate);\n var mon = nd.getMonth() + 1;\n var yr = nd.getFullYear();\n\n return new Date(yr, mon - 1, 1);\n\n}", "function first_day (new_date) {\n\tvar day_of_week = new_date.getDay();\n\tvar day_in_month = new_date.getDate();\n\tif (day_in_month > ...
[ "0.64872265", "0.64427143", "0.6403915", "0.619248", "0.6024698", "0.57168734", "0.56923544", "0.56261843", "0.55231565", "0.55178475", "0.54848003", "0.54812056", "0.54725015", "0.5465193", "0.5443814", "0.5443644", "0.5430191", "0.5373485", "0.5371882", "0.53463906", "0.529...
0.76650894
0
getnth returns the nth occurrence of the weekday specified by curdate in the given month from beginning of month
function getnth(curdate) { var cd = new Date(curdate); var m = cd.getMonth(); var y = cd.getFullYear(); var d = cd.getDate(); var h = cd.getHours(); var min = cd.getMinutes(); var monthday1 = new Date(y, m, "1", h, min, "0", "0"); var day1ofmonth = monthday1.getDay() + 1; var Dayo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getnthrev(curdate) {\n\n var mlen = [\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"30\", \"31\"];\n var cd = new Date(curdate);\n var m = cd.getMonth(); // Jan is 0\n var y = cd.getFullYear();\n var d = cd.getDate();\n var h = cd.getHours();\n ...
[ "0.6669568", "0.65899676", "0.6380521", "0.6086822", "0.60615283", "0.59594107", "0.5918524", "0.5885879", "0.58823615", "0.5840388", "0.58254856", "0.5771911", "0.5716568", "0.57144463", "0.57037354", "0.5632587", "0.5626877", "0.5616791", "0.56164557", "0.56063086", "0.5598...
0.74596417
0
dateDiff difference in ms between 2 dates Factor in DST hour diff
function dateDiff(date1, date2) { var stdt = new Date(date2); var endt = new Date(date1); var stOffst = stdt.getTimezoneOffset(); var enOffst = endt.getTimezoneOffset(); var minOffset = stOffst - enOffst; var dt = Date.parse(date1) - Date.parse(date2) + minOffset * 60 * 1000; return dt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dateDiffInDays(a, b) {\n // Discard the time and time-zone information.\n const utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());\n const utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());\n\n return Math.floor((utc2 - utc1) / _MS_PER_DAY);\n }", "function dateDiffInDays(a, b) {...
[ "0.71927184", "0.70801747", "0.7041782", "0.7026726", "0.6955912", "0.695236", "0.6884249", "0.6855145", "0.6838683", "0.6818531", "0.67892987", "0.6741712", "0.67393756", "0.67006195", "0.6699516", "0.66961175", "0.6691144", "0.6683949", "0.6683949", "0.6664093", "0.66610503...
0.74928975
0
addDays return a new date based on given date and number of days to add to it\ DST is an issue here. If the in and out dates straddle a DST date, need to manually adjust.
function addDays(date, days) { var dt = new Date(); var indt = new Date(date); var inOffst = indt.getTimezoneOffset(); dt.setTime(Date.parse(date) + (days * 1000 * 60 * 60 * 24)); var outOffst = dt.getTimezoneOffset(); if (inOffst != outOffst) { // recalculate var minOffset = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDays(date, days) {\n\t\tif(days == 0) return date;\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);\n\t}", "function addDays(date, days) {\n var newDate = new Date(date);\n newDate.setDate(newDate.getDate() + days);\n return newDate;\n }", "functio...
[ "0.7314905", "0.72516274", "0.7228546", "0.72164875", "0.7195046", "0.7155756", "0.7143162", "0.713385", "0.71333855", "0.71029776", "0.70926166", "0.70804757", "0.707386", "0.7071159", "0.7056158", "0.7053571", "0.7037518", "0.7034465", "0.7022033", "0.7017291", "0.6985411",...
0.7497669
0
addMonths Adds specified number of months to the date/time supplied get the day, month, and yr add months to month if result > 12 then div res/12. add int of that to yr subtract int of that12 from res/12 add that back to days
function addMonths(date, months, rev) { var mlen = ["31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "30", "31"]; var dt = new Date(date); var m = dt.getMonth(); //Jan = 0 var y = dt.getFullYear(); var cy = y; var d = dt.getDate(); var h = dt.getHours(); var min = dt.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMonths(date, months) {\n var result = new Date(date.getTime());\n var newMonth = result.getMonth() + months;\n result.setMonth(newMonth);\n // We want to maintain the same day-of-month, but that may not be possible if the new month doesn't have enough days.\n // Loop until we back up to ...
[ "0.7106855", "0.67677236", "0.67201287", "0.64130485", "0.63811934", "0.63031566", "0.6238504", "0.61457515", "0.58809704", "0.58675724", "0.56942666", "0.5690573", "0.5590971", "0.55509305", "0.552442", "0.5516011", "0.5499062", "0.54787135", "0.5472802", "0.5464372", "0.541...
0.6886304
1
getNoteCode Reads and parses the note field and poulates rptArray with codes
function getNoteCode() { //var repeatCode = $('#notes',iPage).text(); var repeatCode = $('#notes', iPage).val(); var strpat = /\<Repeat:(\d+):([a-zA-Z]+):(\d+):*(\w*)-*(\d*)/; var result = strpat.exec(repeatCode); if (result == undefined) { rptArray.length = 0; } else { rptArray...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function codeInfo(code) {\n\n let notes = [\"C\", \"Db\", \"D\", \"Eb\", \"E\", \"F\", \"Gb\", \"G\", \"Ab\", \"A\", \"Bb\", \"B\"]\n\n let semitoneRatio = 2 ** (1/12);\n let baselineFrequency = 27.5;\n let baselineCode = 21; // MIDI code for lowest note on keyboard\n let stepsAboveBaseline = code -...
[ "0.58548266", "0.58328056", "0.5766022", "0.5749921", "0.5685573", "0.5574971", "0.5479255", "0.5459343", "0.53921556", "0.5373678", "0.53533834", "0.526511", "0.5235845", "0.52276975", "0.5167607", "0.51529986", "0.51496136", "0.51449996", "0.5129557", "0.51181024", "0.50885...
0.65914357
0
atEnd This is normally a callback function when a post to the server has completed If there are remaining dates in the date array, and nothing in the eventArray, continue with adding new events If there are remaining dates in the date array, and remaining events in the eventArray, continue updating events If there are ...
function atEnd() { iEventID = ''; // cannot re-use this event // If there are any dates in the Array left, we need a new EventID if (stDate.length > 0) { // Lets see if there are no mre eventIDs to use if (eventArray.length == 0) { // process any more dates as New Repeat Entries...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SyncEvent() {\n var ds=new Date(\"2015-10-01\");\n ds=ds.toISOString();\n var de=new Date(\"2015-12-31\");\n de=de.toISOString();\n gapi.client.load('calendar', 'v3', function() { \n var req = {\n 'calendarId': 'azmaktr@gmail.com',\n ...
[ "0.57587075", "0.5741848", "0.55607575", "0.5527822", "0.54900557", "0.546822", "0.53827065", "0.53307694", "0.52773976", "0.52673984", "0.52599454", "0.5258208", "0.5246113", "0.52258676", "0.5197627", "0.51937944", "0.5180091", "0.51740575", "0.51671875", "0.5121744", "0.51...
0.7520911
0
NextEvent If on entry, there is a flag set to indicate we are updating events , get the next event ID from the array and make a call to post it with current form data (with dates updated) If no flag, request a new ID from the server. On the async response, make a call to post it with current form data (with dates updat...
function NextEvent() { if (preExistEvent == false) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status != 200) { errStatusHandle(this.status, recurErr, [], NextEvent, []); } if (this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function next() {\n\t\t\t\tif (eventIDs.length) {\n\t\t\t\t\tsetTimeout(process, 1000);\n\t\t\t\t}\n\t\t\t}", "function next() {\n\t\t\t\tif (eventIDs.length) {\n\t\t\t\t\tsetTimeout(process, 1000);\n\t\t\t\t}\n\t\t\t}", "function nextEventId() {\n\n\t\t\tfunction max(array) {\n\t\t\t\t// keep picking the larg...
[ "0.637264", "0.637264", "0.61957", "0.60100335", "0.59528327", "0.5853292", "0.57566875", "0.5743782", "0.57095987", "0.5676083", "0.56682086", "0.56569254", "0.56545126", "0.56473976", "0.5609427", "0.5601853", "0.5583773", "0.5567002", "0.55646217", "0.555656", "0.55535495"...
0.75564575
0
predeleteEvent THis function is executed instead of the one embedded on the page If repeat toggle on form is on, it buidls a list of dates and events to delete Otherwise, deletes normally
function predeleteEvent() { formPost = ''; if ($('#recurEvent', iPage).val() == 'on' && preExistEvent == true) { $.mobile.loading('hide'); $.mobile.loading('show', { theme: 'a', text: 'deleting multiple events. Please be patient...', textonly: false }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function re_delete(singleInstance){\n\t//self.location = \"http://www.keepandshare.com/calendar/action.php?ac=111345&id=\" + re_prefs.repeatid + \"&del=y\" +\n\t//\t\t\t\t\t\t\t\t'&app='+document.getElementById('app').value + '&fd=' + re_prefs.firstDay + '&to=' + re_prefs.returnTo;\n\tre_setPanelVisibility('hide')...
[ "0.639357", "0.62877107", "0.62536645", "0.6203354", "0.6095703", "0.60799456", "0.60443693", "0.6043958", "0.6026792", "0.602252", "0.6008992", "0.5981062", "0.59669966", "0.5929747", "0.5922064", "0.588921", "0.587618", "0.584681", "0.5829505", "0.58231276", "0.5789653", ...
0.67405516
0
matchdate ugly little thing to match up all the potential SB date field formats with a given date dt2 Date format Sep 29, 2017, 7pm 9pm Jun 18, 2017 7am to Jun 24, 2017 3pm Jun 19, 2017, 7pm 8:30pm Sep 29, 2017 to Oct 1, 2017 Today, 7pm dt Calculated Dates will look like Sep 29, 2017 7:00 pm
function matchdate(dt, dt2) { if (dt2 == undefined) { return false; } if (dt2 == '') { return false; } //window.console &&console.log(dt + " ?? " + dt2); //dt2 will have a range in it, denoted by either a - or the word 'to' var dtt = dt2; //handles case of 0 meeting lengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findMatchDate(matchTable) {\n var nextMatch = matchTable.rows[0].childNodes[0].innerHTML;\n\n var match;\n // Handle yyyy-mm-dd \n var reYear = /(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d) (\\d\\d):(\\d\\d)/;\n if ((match = reYear.exec(nextMatch))) {\n\t// Create a new Date(yy,mm,dd,hh,mm,ss)\n\tre...
[ "0.6902062", "0.6186408", "0.5836287", "0.58015347", "0.57751554", "0.5736726", "0.570455", "0.56834096", "0.56813693", "0.5598707", "0.55691904", "0.5511889", "0.549804", "0.5473198", "0.54700327", "0.5468372", "0.54535794", "0.5444902", "0.5427055", "0.54259056", "0.5409466...
0.75797474
0
getEventIDs(cb) This function gets all calendar events from server populates a global links array with potential links to calendar events then calls processLinks to look for events of interest Dec 2, 2017 7pm to Dec 3, 2017 8:30pm
function getEventIDs(cb) { // This function is called t retrieve event list. Matches each stDateFromArchive to find associated EventID var eventName; var lnkobj = { id: '', date: '' }; //push this if older than now var xhttp = new XMLHttpRequest(); xhttp.onreadystatechang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processLinks(cb) {\n\n // enter function with links array of a elements\n\n var numDel = 0;\n var occur = Number($('#occurrenceSType', iPage).val());\n hrflist.length = 0;\n\n if (links.length != 0) {\n var curLink = links.shift();\n\n //window.console &&console.log(curLink.h...
[ "0.6342061", "0.6224272", "0.60347056", "0.5916237", "0.5864858", "0.58258134", "0.5782186", "0.5773909", "0.57457477", "0.57306224", "0.571848", "0.5703042", "0.5608845", "0.5567348", "0.55623496", "0.5544348", "0.5544251", "0.5516698", "0.5496815", "0.54888177", "0.5486539"...
0.7818617
0
processLinks This function retrieves a link from the global links array If it is found to be a link to an event, it compares the date of that event to the dates in the stDateFromArchive array for a match. If a match is found, it will call getNoteIDfromEvent for further verification If no links are left on the global li...
function processLinks(cb) { // enter function with links array of a elements var numDel = 0; var occur = Number($('#occurrenceSType', iPage).val()); hrflist.length = 0; if (links.length != 0) { var curLink = links.shift(); //window.console &&console.log(curLink.href); v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processLinks() {\n\t\n\t//Indicates internal domains\n\tvar internalDomains = (conf.trackExternalLinks && conf.internalDomains) ? conf.internalDomains.split(PARAM_SEPARATOR) : null;\n\t//Indicates the types of file to be downloaded\n\tvar downloadFileTypes = (conf.trackDownloadLinks && conf.downloadFileTy...
[ "0.6631009", "0.6092507", "0.59989524", "0.5763778", "0.57255965", "0.55802375", "0.5520436", "0.5505663", "0.5471683", "0.54203624", "0.5358452", "0.5338273", "0.5292857", "0.52888274", "0.52623314", "0.5239755", "0.523792", "0.5223895", "0.51766145", "0.51196456", "0.510236...
0.7802452
0
getNoteIDfromEvent function retrieves an editevent page for the given eventid When the response is received, compares note field with contents of rptArray[4] it looks for a match in the unique ID... if match then save the id of the current event into eventArray When done, call processLinks
function getNoteIDfromEvent(cb) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status != 200) { errStatusHandle(this.status, recurErr, [], getNoteIDfromEvent, [cb]); } if (this.readyState == 4 && this.status == 2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEvent(eventid)\n{\n\tvar defaultTestEvent = {\n\t\t\t\t\"eventName\": \"Successfully Failing\",\n\t\t\t\t\"eventLocation\": \"Boston\",\n\t\t\t\t\"eventDate\": \"4/24/2017\",\n\t\t\t\t\"eventSeats\": \"10\",\n\t\t\t\t\"eventCurrentAttendees\": \"7\"\n\t\t\t};\n\t\n //Mathews test code block\n\t//doc...
[ "0.5843401", "0.58296835", "0.5399753", "0.5311208", "0.526611", "0.52650195", "0.5242972", "0.5197773", "0.51918733", "0.5187365", "0.51647013", "0.515535", "0.51142204", "0.511329", "0.50437677", "0.49770913", "0.49241394", "0.491145", "0.49046516", "0.4900629", "0.48734203...
0.7256918
0
Reset the error counter.
resetErrors() { this.errorCount = 0; this.seenErrors.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetErrors() {\n self.dangers = [];\n self.warnings = [];\n self.error = [];\n }", "reset() {\n this.pos = this.start\n this.error = null\n }", "reset() {\n this.successCount = 0;\n this.failureCount = 0;\n this.erroredTask = [];\n }", "clearError() {\n this....
[ "0.73583645", "0.7173041", "0.71359277", "0.6940056", "0.6940056", "0.6896286", "0.6872989", "0.6846368", "0.68084663", "0.680634", "0.66682553", "0.6635072", "0.66119957", "0.6581795", "0.6541244", "0.6540879", "0.6537413", "0.64646596", "0.6459927", "0.6442908", "0.6408893"...
0.86310107
0
Reset the warning counter.
resetWarnings() { this.warningCount = 0; this.seenWarnings.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_resetNotifCounters() {\n this._notifCounters[Severity.CRITICAL] = 0;\n this._notifCounters[Severity.MAJOR] = 0;\n this._notifCounters[Severity.MINOR] = 0;\n this._notifCounters[Severity.INFO] = 0;\n this._highestSeverity = Severity.UNDEFINED;\n }", "reset() {\n this....
[ "0.7272971", "0.6787153", "0.67747015", "0.67618126", "0.6710078", "0.67039585", "0.6598619", "0.65731245", "0.6505207", "0.6499279", "0.6488431", "0.6469119", "0.6465981", "0.64200217", "0.63816094", "0.63816094", "0.63673466", "0.6325949", "0.62973547", "0.62620556", "0.625...
0.8663666
0
Creates a new bucket if is not existing
async createBucketIfNotExists() { const bucket = this.templates.create.Resources[this.getBucketId()].Properties; const foundBucket = await this.provider.getBucket(bucket.BucketName); if (foundBucket) { this.serverless.cli.log(`Bucket ${bucket.BucketName} already exists.`); } else { this.serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBucket() {\n metadata\n .buckets.set(bucketName, new BucketInfo(bucketName, ownerID, '', ''));\n metadata.keyMaps.set(bucketName, new Map);\n}", "function insertBucket() {\n resource = {\n 'name': BUCKET\n };\n\n var request = gapi.client.storage.buckets.insert({\n 'project...
[ "0.7969252", "0.7835062", "0.71612144", "0.70026386", "0.67292213", "0.6637248", "0.6601739", "0.650015", "0.6392816", "0.62634695", "0.61143816", "0.5954273", "0.5947196", "0.59446186", "0.5873723", "0.5833009", "0.5816702", "0.57927793", "0.5791397", "0.56705403", "0.562595...
0.8335024
0
remove links from google results
function google() { var host = location.href; if (host.match('http://google.') || host.match('https://google.') || host.match('http://www.google.') || host.match('https://www.google.')) { // get all the regular links var els = document.querySelectorAll('div.g'); // loop all the elements ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeGoogleHeaderLink(name)\n{\n\tremoveMainLink(name);\n\tremoveSubLink(name);\t\n}", "function cleanHTML(html){\n html = giveLinksFullUrls(html);\n return html;\n}", "function resetSearchResults () {\n [].slice.call(\n _results.getElementsByTagName('a')\n ).forEach(function (result) {\...
[ "0.64592934", "0.62132746", "0.610158", "0.6060978", "0.60390115", "0.6024433", "0.5763628", "0.5762755", "0.57616293", "0.5733919", "0.5713799", "0.5712639", "0.5694752", "0.568788", "0.5654352", "0.5629714", "0.56202114", "0.5613704", "0.5611027", "0.5591348", "0.5585947", ...
0.6573875
0
Apollo client for web. Creates the HTTP and Absinthe Socket Links with authentication and connects them to the client for web.
function createClient(history) { /** * HTTP Link */ const API = process.env.REACT_APP_API_HOST ? process.env.REACT_APP_API_HOST + '/graphql' : 'http://localhost:4000/graphql' const httpLink = createHttpLink({ uri: API }) const WEBSOCKET_URI = process.env.REACT_APP_WEBSOCKET_URI || 'ws:/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeApolloClient(scapholdUrl) {\n const graphqlUrl = `https://${scapholdUrl}`;\n const websocketUrl = `wss://${scapholdUrl}`;\n const networkInterface = createNetworkInterface(graphqlUrl);\n networkInterface.use([{\n applyMiddleware(req, next) {\n // Easy way to add authorization headers for e...
[ "0.6032561", "0.5796562", "0.57925504", "0.5786651", "0.5741933", "0.5676906", "0.5665873", "0.5657568", "0.5608742", "0.5587152", "0.5568936", "0.54491955", "0.5437287", "0.5433538", "0.5396712", "0.53922683", "0.5387469", "0.53609854", "0.53590614", "0.5353855", "0.5305881"...
0.6597731
0
Add buttons whose functions are allowed for current frame
function addButtons() { if(isISAparent == 'True') { var warning = '<p>Cannot add/delete frame elements from parent of another frame</p>'; $('#newb').append(warning); } else if(isSUBchild == 'True') { var warning = '<p>Cannot add/delete frame elements from subframe of another frame</p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertButton(){\r\n var bottonHome = $('iframe#canvas_frame', parent.document).contents().find('td.bN.bM'); //get buttons bars\r\n if(bottonHome.is('*')){\r\n bottonHome.append('<div tabindex=\"0\" role=\"button\" class=\"J-Zh-I J-J5-Ji L3 bot\" id=\":ri\" style=\"-moz-use...
[ "0.68873215", "0.67448443", "0.6372895", "0.63655245", "0.6337876", "0.63133717", "0.6291508", "0.6288379", "0.6249259", "0.6221947", "0.6177082", "0.6164058", "0.6158597", "0.61167556", "0.6044547", "0.6022344", "0.6018956", "0.60128576", "0.59978503", "0.598588", "0.5980930...
0.72305685
0
Main function for adding frame element and subframe lists
function addFrameDetails() { // Add frame elements in inherited frame element list $.each(inheritedElements, function(index, fe) { var option = createOption(fe.fields.fe_name, 'inherited', index == 0); $('#inherited').append(option); }); // Add frame elements in new (uninherited) frame ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addFrame(frame) {\n this.frames.push(frame);\n }", "add({ object, frame }) {\n this.children.push({ object, frame });\n }", "function showFrames() {\n console.log(\"showFrames()\");\n frames.forEach(frame => {\n \n \n\n //var frameDimension = document.createElement(\"p\");\n ...
[ "0.6579751", "0.61941576", "0.6157548", "0.6143191", "0.6133535", "0.60194963", "0.5956218", "0.59315443", "0.5806876", "0.57898474", "0.57194805", "0.5716564", "0.5705524", "0.5702697", "0.57020485", "0.5674359", "0.5648896", "0.5612872", "0.55943626", "0.5593084", "0.558725...
0.7688324
0
Create subframe option in subframe list
function createSubframe(name, relations, checked) { var subframe = '<li class="suboption"><input type="radio" name="subframe" value="' + name + '"'; if(checked) { subframe = subframe + ' checked'; } subframe = subframe + '/> ' + name; var sfrels = '<ul class="sfrels">'; // Add frame ele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFrameDetails() {\n // Add frame elements in inherited frame element list\n $.each(inheritedElements, function(index, fe) {\n var option = createOption(fe.fields.fe_name, 'inherited', index == 0);\n $('#inherited').append(option);\n });\n\n // Add frame elements in new (uninher...
[ "0.651436", "0.54921067", "0.54384935", "0.53954464", "0.5245688", "0.5218252", "0.51969284", "0.50970054", "0.50567913", "0.5021562", "0.5009952", "0.4994167", "0.4895956", "0.48690104", "0.4842664", "0.480525", "0.4746063", "0.47434455", "0.47341558", "0.47316775", "0.47239...
0.62156284
1
Return all options of frame element select, with given option selected
function generateOptions(selected) { var frameElements = newElements.concat(inheritedElements); var options = ''; $.each(frameElements, function(index, frameElement) { var name = frameElement.fields.fe_name; var option = '<option value="' + name + '"'; if(name == selected) { op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectedAllOption(mixSelect, booSelected)\n{\n var select = getObject(mixSelect);\n if (empty(select))\n return false;\n if (!isBoolean(booSelected))\n booSelected = true;\n var arrOption = select.getElementsByTagName('OPTION');\n for (var intCount = 0; intCount < arrOption.le...
[ "0.68076414", "0.63929296", "0.6348001", "0.6319048", "0.63167435", "0.6245216", "0.62244964", "0.62206787", "0.6214944", "0.6214944", "0.6214727", "0.62071174", "0.6205837", "0.61961484", "0.61911076", "0.61818963", "0.6174588", "0.6172957", "0.61634064", "0.61584634", "0.61...
0.6741676
1
Create text box and button for renaming frame element
function rename(op_name) { var fe_item = $('.sublist input[name=' + op_name + ']:checked'); $('button[id$=' + op_name + ']').hide() var fe_name = fe_item.attr('value'); var textbox = '<p>Rename "' + fe_name + '": <input type="text" name="r' + op_name + '"'; textbox = textbox + ' value="' + fe_name...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subframeAdd() {\n $('#sadd').hide();\n\n var textbox = '<p>Name: <input type=\"text\" name=\"addsf\"/></p>';\n var button = '<button id=\"addsfsave\" type=\"button\" onClick=\"saveSF();\">Save</button>';\n\n var toAppend = '<div id=\"sf_add\">' + textbox + button + '</div>';\n $('#sfbuttons...
[ "0.6111776", "0.59852105", "0.5970757", "0.5880847", "0.5860851", "0.5856881", "0.5854868", "0.5853128", "0.58424556", "0.58232397", "0.5821353", "0.5821353", "0.58007944", "0.5792777", "0.57801706", "0.5759283", "0.5757772", "0.5749126", "0.572414", "0.57021576", "0.5676462"...
0.61552644
0
ajax request to rename frame element and refresh page
function saveRN(fe_name, op_name) { var new_name = $('input[name=r' + op_name + ']').attr('value'); jQuery.ajax({url: '/rename_frameelement/', type: 'POST', dataType: 'text', data: { old_name: fe_name, new_name: new_name, frame_name: frameName }, succe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveAdd() {\n var name = $('#newlist input[name=\"addnew\"]').attr('value');\n jQuery.ajax({url: '/add_frameelement/', type: 'POST', dataType: 'text',\n data: {\n fe_name: name,\n frame_name: frameName\n },\n success: function(data) {\n location....
[ "0.66388893", "0.65514565", "0.63920337", "0.63431543", "0.62637347", "0.6220846", "0.62198657", "0.617046", "0.6143611", "0.6025748", "0.5972265", "0.59630233", "0.5944824", "0.59408265", "0.5939601", "0.589485", "0.5864705", "0.58605754", "0.5829695", "0.5817091", "0.581185...
0.7242875
0
ajax request to delete frame element and refresh page
function feDel() { var fe_item = $('.sublist input[name=new]:checked'); var fe_name = fe_item.attr('value'); jQuery.ajax({url: '/delete_frameelement/', type: 'POST', dataType: 'text', data: { fe_name: fe_name, frame_name: frameName }, success: function(da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subframeDel() {\n var sf_item = $('#subframes input[name=subframe]:checked');\n var sf_name = sf_item.attr('value');\n\n jQuery.ajax({url: '/delete_subframe/', type: 'POST', dataType: 'text',\n data: {\n sf_name: sf_name,\n frame_name: frameName\n },\n s...
[ "0.7451947", "0.6699385", "0.6600577", "0.6589363", "0.6587496", "0.6488878", "0.64669985", "0.64482445", "0.64135265", "0.6380934", "0.63800263", "0.6371311", "0.6331994", "0.63236016", "0.63197386", "0.6301902", "0.6291375", "0.62899166", "0.6266304", "0.6260785", "0.624377...
0.7612499
0
ajax request to add frame element and refresh page
function saveAdd() { var name = $('#newlist input[name="addnew"]').attr('value'); jQuery.ajax({url: '/add_frameelement/', type: 'POST', dataType: 'text', data: { fe_name: name, frame_name: frameName }, success: function(data) { location.reload(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function craeteNewTabAndLoadUrl(parms, url, loadDivSelector) {\n //$(\"\" + loadDivSelector).html('<iframe frameborder=1 width=\"100%\" height=\"800\" src=\"'+url+'\">IFRAME</iframe>');\n $(\"\" + loadDivSelector).load(url, function (response, status, xhr) {\n if (status == \"error\") {\n v...
[ "0.6521314", "0.6458898", "0.62321794", "0.6205026", "0.6184934", "0.6068285", "0.60500556", "0.59869164", "0.59621805", "0.5960691", "0.594146", "0.59286296", "0.5893501", "0.5891073", "0.58741057", "0.5872349", "0.58639336", "0.5847532", "0.584056", "0.5825634", "0.5812184"...
0.68282574
0
ajax request to delete subframe and refresh page
function subframeDel() { var sf_item = $('#subframes input[name=subframe]:checked'); var sf_name = sf_item.attr('value'); jQuery.ajax({url: '/delete_subframe/', type: 'POST', dataType: 'text', data: { sf_name: sf_name, frame_name: frameName }, success: functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function feDel() {\n var fe_item = $('.sublist input[name=new]:checked');\n var fe_name = fe_item.attr('value');\n \n jQuery.ajax({url: '/delete_frameelement/', type: 'POST', dataType: 'text',\n data: {\n fe_name: fe_name,\n frame_name: frameName\n },\n succes...
[ "0.78285867", "0.6606839", "0.6550869", "0.6443146", "0.6403923", "0.6385542", "0.6384125", "0.6321397", "0.63127923", "0.6311471", "0.63023007", "0.628017", "0.6271526", "0.6228205", "0.6219258", "0.6192852", "0.6189096", "0.61834556", "0.6183442", "0.6158866", "0.6152098", ...
0.8136065
0
Create text box and button to add subframe
function subframeAdd() { $('#sadd').hide(); var textbox = '<p>Name: <input type="text" name="addsf"/></p>'; var button = '<button id="addsfsave" type="button" onClick="saveSF();">Save</button>'; var toAppend = '<div id="sf_add">' + textbox + button + '</div>'; $('#sfbuttons').append(toAppend); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_text_control (e) {\n \n var test_app = UiApp.createApplication(); \n test_app.setTitle(\"Story ID: 3, Can enter text into a UI control\");\n \n var vertical_panel = test_app.createVerticalPanel();\n var text_box = test_app.createTextBox();\n text_box.setName(\"myTextBox\").setId('myTextBox...
[ "0.61984044", "0.5890692", "0.58820266", "0.5848488", "0.58087367", "0.5796827", "0.57786596", "0.57565224", "0.57322687", "0.57251513", "0.5707624", "0.5703038", "0.56590647", "0.562611", "0.5619417", "0.55818754", "0.55655587", "0.555967", "0.5541701", "0.55121744", "0.5506...
0.7094908
0
ajax request to add subframe and refresh page
function saveSF() { var name = $('#sfbuttons input[name="addsf"]').attr('value'); jQuery.ajax({url: '/add_subframe/', type: 'POST', dataType: 'text', data: { sf_name: name, frame_name: frameName }, success: function(data) { location.reload(); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveAdd() {\n var name = $('#newlist input[name=\"addnew\"]').attr('value');\n jQuery.ajax({url: '/add_frameelement/', type: 'POST', dataType: 'text',\n data: {\n fe_name: name,\n frame_name: frameName\n },\n success: function(data) {\n location....
[ "0.69180876", "0.64805645", "0.6399856", "0.6219614", "0.6162567", "0.6048885", "0.60456896", "0.6023448", "0.59845257", "0.5981662", "0.5975412", "0.5893821", "0.58821166", "0.58750683", "0.58635193", "0.5861108", "0.58556986", "0.5780317", "0.57762283", "0.5751392", "0.5741...
0.7062595
0
ajax request to save changes to frame element assignments for selected subframe
function saveSFRel() { var checked = '#subframes input[name=subframe]:checked'; var name = $(checked).attr('value'); var parent_fes = new Array(); var child_fes = new Array(); // Fill coresponding arrays with names of frame elements in assignments var list = $(checked).parent().find(' .sfrels l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSF() {\n var name = $('#sfbuttons input[name=\"addsf\"]').attr('value');\n jQuery.ajax({url: '/add_subframe/', type: 'POST', dataType: 'text',\n data: {\n sf_name: name,\n frame_name: frameName\n },\n success: function(data) {\n location.relo...
[ "0.6797733", "0.6553947", "0.63501394", "0.6144657", "0.6097274", "0.60105354", "0.59699106", "0.59240633", "0.59146684", "0.5811658", "0.5803246", "0.58014166", "0.5702802", "0.5666598", "0.5608784", "0.5587522", "0.55864614", "0.55710834", "0.5520744", "0.55080706", "0.5502...
0.6698561
1
This function changes the big photo with fading effect. Also preloads the previous and next image
function change_big_photo(target) { // Reset the SlideShow timer - need to reset it as user may change image by clicking during the SlideInterval clearInterval(sliderInterval); sliderInterval = setInterval(function () { // trigger next button click $('.carousel_nav.next'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeImg() {\n img.fadeOut(300, function () {\n img.attr('src', 'img/' + imgArray[imgIndex]);\n img.fadeIn(300);\n });\n }", "function slide_changeimage(increment) {\n if (increment != 0 && current_bg_index!= current_fg_index+increment) {\n current_bg_in...
[ "0.7268537", "0.7237337", "0.7136699", "0.7119578", "0.6983859", "0.6785291", "0.67721224", "0.6758091", "0.67473656", "0.6747273", "0.6695132", "0.6692363", "0.6671214", "0.6650126", "0.6636584", "0.6631501", "0.66114634", "0.6597801", "0.6546742", "0.6526497", "0.6501759", ...
0.7454557
0
Review Block Functions Register callback for Sorting buttons as well as dot nav buttons
function retister_review_navigation_callbacks() { //bind click event to default button $('.review-sort-buttons .d_sort').click(function (e) { // check if it's already selected and return if true if ($(this).hasClass('selected')) return; // remove 'selected' class from...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortSelectCallback() {\n let sortType = $(this).val();\n setStatus(\"sortType\", sortType);\n\n console.log(\"sort clicked\");\n\n //TODO: Can we do this without referencing sg namespace?\n sg.cardContainer.sortCards(orderCodes[sortType]);\n }", "function sort_block...
[ "0.62139976", "0.61791235", "0.6095636", "0.6028213", "0.5930002", "0.5918963", "0.58837914", "0.5782514", "0.5775298", "0.57556313", "0.57544214", "0.5670231", "0.5659839", "0.56412584", "0.5622181", "0.5580546", "0.55703306", "0.55006033", "0.54845804", "0.54836065", "0.546...
0.66807246
0
function to sort the review (highest first). Also after sorting it will change the innerHTML of the review block with fading effect
function sort_the_reviews(reverse_sort) { if ($('.reviews_list .one_review').length) { // get the review list as array and sort them based on review score - highest first var sorted_reviews = $('.reviews_list .one_review').sort(function (a, b) { var value_a = parseInt($(a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sort() {\n renderContent(numArray.sort());\n}", "function onNewestSortChange() {\n\t$(\"#newest\").css({'font-weight': 'bold', 'color': 'black'});\n\t$(\"#priority\").css({'font-weight': 'normal', 'color': '#A00000'});\n window.sort = \"Newest\";\n $sid = $.cookie('sid');\n getFeed($sid, win...
[ "0.6775366", "0.65016043", "0.64966166", "0.6486179", "0.64699334", "0.64544773", "0.64181966", "0.64011145", "0.63837814", "0.63768464", "0.6358525", "0.63345605", "0.632824", "0.63269234", "0.6283872", "0.6278474", "0.62693447", "0.62528735", "0.6251156", "0.62368447", "0.6...
0.76476336
0
Show first page and hide others
function review_show_first_page() { // reset the class attribute to default $('.reviews_list .one_review').removeAttr('class').addClass('one_review'); // add pagination classes (page1, page2 etc) review_add_page_classes(); // show only the first page (items with class 'page1') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPage(pageIndex) {\n hideAllPages();\n var page = $(\".page\")[pageIndex];\n page.style.display = \"block\";\n}", "function showPage(toShow) {\r\n $('section').hide();\r\n $(`#${toShow}`).show();\r\n if(toShow == 'viewBooks')\r\n {\r\n getBooks();\r\n ...
[ "0.72034615", "0.7049563", "0.684641", "0.68194807", "0.6759838", "0.6757013", "0.6714898", "0.6689332", "0.6671339", "0.6624923", "0.6598433", "0.6587675", "0.6580712", "0.6572737", "0.6562967", "0.65579414", "0.6552054", "0.6540811", "0.6507577", "0.6507577", "0.6486057", ...
0.72707224
0
function to change the review page based on the dot nav click
function review_update_page(nav_id) { // retain the height (safari/windows problem) $('.reviews_list').height($('.reviews_list').height()); // hide all with fadeout effect $('.reviews_list .one_review').fadeOut().hide(); // get the nav_id passed from nav click event and append to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changePage(e) {\r\n\te.preventDefault();\r\n\tif (e.target.classList.contains('previous')) {\r\n\t\tif (currentPage > 1) {\r\n\t\t\tcurrentPage = currentPage - 1\r\n\t\t\tshowPage(currentPage)\r\n\t\t}\r\n\r\n\t} else if (e.target.classList.contains('next')) {\r\n\t\tif ((currentPage * 3) < reviewLst.leng...
[ "0.6943238", "0.6337375", "0.63226986", "0.6127774", "0.6114214", "0.5999918", "0.5935789", "0.5922593", "0.5915924", "0.5899188", "0.5838873", "0.5822884", "0.57968545", "0.5787654", "0.5760134", "0.57533914", "0.5746778", "0.56656295", "0.5647444", "0.56464237", "0.5607551"...
0.6363005
1
Add page classes (page1, page2 etc.) to each review item
function review_add_page_classes() { var total_review, page_no = 1, current_review, i; // find total pages required total_review = $('.reviews_list .one_review').length; // catch the fist one current_review = $('.reviews_list .one_review').first(); // loop through all th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createClass(student) {\n\n\tif($('.page' + count).length < studentsPerPage) {\n\t\t$(student).addClass('page' + count);\n\t}else {\n\t\tcount = count + 1;\n\t\t$(student).addClass('page' + count);\n\t}\n\t\t\n}", "function review_show_first_page() {\n // reset the class attribute to default\n ...
[ "0.63004166", "0.6274925", "0.62491983", "0.6201294", "0.601344", "0.59659016", "0.59494", "0.5929209", "0.59235924", "0.58379817", "0.5744342", "0.5741721", "0.56935346", "0.56659687", "0.5602597", "0.55236864", "0.54430604", "0.54337513", "0.5413612", "0.5395036", "0.530871...
0.8575705
0
Add a dot nav below the review block Create some spans matching the number of pages and insert them into the target div
function review_make_dot_nav() { var nav_html = '', total_page, i; // find out how many pages total_page = Math.ceil($('.reviews_list .one_review').length / per_page); // append one span for each page for (i = 1; i <= total_page; i++) { nav_html = nav_html + '<span cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateNumberOfDotsInPaging () {\r\n pagination.innerHTML = ''\r\n\r\n slides.forEach((slide, index) => {\r\n const dot = document.createElement('span')\r\n dot.addEventListener('click', () => {\r\n goToSlide(index)\r\n })\r\n pagination.append(dot)\r\n })\r\n}", "function showPage(cu...
[ "0.66993827", "0.63942075", "0.63059825", "0.6171726", "0.61633384", "0.6101275", "0.6097937", "0.5929343", "0.59232527", "0.5894788", "0.5828308", "0.5808101", "0.5780738", "0.5762846", "0.57530975", "0.5738248", "0.57325906", "0.57119006", "0.570812", "0.5703529", "0.569921...
0.7748499
0
Reset the dot nav to first page (after sorting changes it's required to reset the dot nav)
function review_reset_dot_nav() { // remove the current class for the current nav $('.review-dot-nav span').removeClass('current'); // assign it to the first one $('.review-dot-nav span').first().addClass('current'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageReset(){\n setPage({\n currPage:1,\n pageLoaded:[1]\n })\n }", "function resetPagination() {\n currentContentsPage = 1;\n $('.membersPagination').empty();\n $('.membersPagination').addClass('hidden');\n }", "initialPage() {\n this.ltClicked({...
[ "0.6897062", "0.68919617", "0.6835255", "0.6485848", "0.6437092", "0.6396977", "0.63234127", "0.6304132", "0.62722015", "0.62695074", "0.6258783", "0.6237373", "0.6226055", "0.6199565", "0.61964005", "0.6132628", "0.61309105", "0.61268735", "0.6120697", "0.6120225", "0.611890...
0.733772
0