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
Text and outlined styles both use transparent backgrounds
hasBackground() { return !this.text && !this.outlined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textColor(text,color) {\nvar g = text.graphics;\nvar textPen = g.newPen(g.PenType.SOLID_COLOR,color,1);\ng.foregroundColor = textPen;\n}", "function normalText(wid)\n\t{\n\t\twid.color(style.color);\n\t}", "function textarebild(text){\n\t\t\t\ttext = text.replace(/#wh1skasGenerator/g, '.'+classNameHTM...
[ "0.6117406", "0.60367805", "0.5876161", "0.5823882", "0.57855034", "0.5775946", "0.5740056", "0.571848", "0.571848", "0.56982136", "0.56931204", "0.5692446", "0.56572634", "0.5643818", "0.5610805", "0.5597421", "0.55816346", "0.5581347", "0.5569485", "0.5568849", "0.54973537"...
0.62800545
1
Snackbar is dark by default override themeable logic.
isDark() { return this.hasBackground ? !this.light : _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"].options.computed.isDark.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isDark() {\n return this.hasBackground ? !this.light : _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"].options.computed.isDark.call(this);\n }", "getToolStyle() {\r\n return 'plain-dark'\r\n }", "getToolStyle() {\r\n return 'plain-dark'\r\n }", "function setTheme() {\n ...
[ "0.65786177", "0.6459577", "0.6459577", "0.63973093", "0.63973093", "0.6355461", "0.6310029", "0.6264246", "0.62518007", "0.6196031", "0.6137932", "0.61045945", "0.6101788", "0.6096645", "0.6089892", "0.6082987", "0.60501856", "0.60442865", "0.6035123", "0.59988916", "0.59869...
0.6502282
1
Description : Edit Client for Report Option Input Params : dataExcel sheet data Return Values : return the message
editClient(data) { this.nav_helper_edit(data); /*if(data.itemSummaryDpn!=undefined) { util.elementClickable(this.itemSummaryChkbox); util.selectDropDown(this.itemSummaryDpn,data,itemSummaryDpn,'item Summary Dpn','Edit Client') }*/ // if(data.itemDetailDpn!=undefined) { // this.detailSummaryChkbox.cli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_data_action(id, classidcheck, actiontype, type)\n{\n if (actiontype != \"\")\n {\n var name = classidcheck;\n var seloption = \"<option>Select Variable</option>\";\n var arrval = \"\";\n $('input[name^=\"variablename\"]').each(function () {\n arrval = $(...
[ "0.6013562", "0.586117", "0.58444524", "0.5814592", "0.57950234", "0.5772444", "0.5735301", "0.567869", "0.5656101", "0.5577676", "0.5562828", "0.553157", "0.55224526", "0.55171716", "0.5501919", "0.5487727", "0.54781884", "0.5474419", "0.54571676", "0.5452265", "0.54456395",...
0.62357587
0
Toggle sort direction on a header cell
togglesort(fieldname) { let hCell = this.gridheader.querySelector(`[data-name='${fieldname}'`); let sort = 'asc'; if ((hCell) && (hCell.getAttribute('data-sort'))) { if (hCell.getAttribute('data-sort') === 'asc') { sort = "desc"; } } this.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortToggle(){\n\tvar col = this.parentNode.cellIndex;\n\tif(ascending == true){\n\t\tsortDescending(col);\n\t}\n\telse{\n\t\tsortAscending(col);\n\t}\n}", "function updateSortDirection(thElem) {\n var adiv = thElem.select('div'),\n id = thElem.attr('colId');\n\n api.none(adiv);\...
[ "0.8036378", "0.7114572", "0.7056026", "0.69906193", "0.69595426", "0.69271797", "0.6903341", "0.68242425", "0.6790408", "0.67826724", "0.6743284", "0.67415684", "0.6737053", "0.67255664", "0.67217016", "0.6681987", "0.66566306", "0.6642919", "0.6595292", "0.65905666", "0.654...
0.7542771
1
Opens a data window about the row for various purposes
datawindow(mode, rowdata) { let dialogconfig = { actions: [], screen: this.screen }; switch(mode) { case 'edit': dialogconfig.title = TextFactory.get('datagrid-dialog-item-edit', this.elementname); dialogconfig.for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showData() {\n /* create the table for the data */\n var sData = '<table border=1>';\n sData += '<thead>';\n sData += '<tr>';\n sData += '<th>E</th><th>Data</th><th>Value</th>';\n sData += '</tr>';\n sData += '</thead><tbody>';\n for (sdCur = sdList; sdCur != null; sdCur = sdCur.ne...
[ "0.6464829", "0.6183569", "0.599525", "0.5971466", "0.5965078", "0.59300905", "0.5875451", "0.5872483", "0.5852056", "0.5844706", "0.5817284", "0.5813992", "0.5808133", "0.5738805", "0.57171863", "0.5716206", "0.56881595", "0.5667862", "0.5666791", "0.5666188", "0.566386", ...
0.67620313
0
Grind through duplicate cells if configured to do so.
grindDuplicateCells() { if (!this.demphasizeduplicates) return; let previousRow; for (let r of this.gridbody.querySelectorAll('tr')) { if (!previousRow) { previousRow = r; let pcells = previousRow.querySelectorAll("td:not(.mechanical)"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "copyRowOnce() {\n let k = this.props.rowIndex;\n this.copyRowNtimes(k, 1);\n }", "function fillMissed(x, y){\n if(!noShipsAround(x, y,cells)) isLastHittedCell = false\n for(let i = x-1; i <= x+1; i++){\n for(let j = y-1; j <= y+1; j++){\n if(pointOutOfBounds(i, j)) continue\n ...
[ "0.60934746", "0.57007825", "0.5641821", "0.55790454", "0.5575766", "0.55721176", "0.5567648", "0.5527316", "0.5521963", "0.5518103", "0.5476667", "0.5473026", "0.5418634", "0.54066396", "0.540188", "0.5399039", "0.5395828", "0.53725845", "0.53633", "0.536283", "0.5350348", ...
0.72582036
0
DATA METHODS_____________________________________________________________________ Clears data from the grid. Completely flattens it.
clear() { this.data = []; this.gridbody.innerHTML = ""; this.postProcess(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearData() {\n var self = this;\n self.data = [];\n }", "clearData() {\n this.data = {\n colors: [],\n positions: [],\n }\n }", "clearData(){\n this.max = 0;\n this.data = [];\n this.xRange = [];\n ...
[ "0.7322479", "0.71055907", "0.70576054", "0.70068645", "0.7001826", "0.69539785", "0.6820888", "0.66242445", "0.66181576", "0.66009927", "0.65978646", "0.6552885", "0.649651", "0.64912206", "0.64687335", "0.64243525", "0.6408576", "0.6408362", "0.6407785", "0.6386841", "0.638...
0.7535802
0
Gets data and merges it in. Updates entries that have changed and inserts new ones.
mergeData(url=this.source) { this.fetchData(url, (data) => { this.update(data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "merge(query, data) {\n\n let objects = this.get_by_query(query)\n\n for (var obj of objects) {\n if (Array.isArray(obj.v)) {\n if (!Array.isArray(data)) continue\n // If array is a timeseries, merge it by timestamp\n // else merge by item index\...
[ "0.62153256", "0.59334457", "0.59063584", "0.5846726", "0.5821904", "0.58131", "0.5788625", "0.5788625", "0.5780946", "0.5780946", "0.57710755", "0.5766948", "0.5760863", "0.5730975", "0.57237893", "0.57185555", "0.56776136", "0.5666845", "0.5659889", "0.56583947", "0.5644296...
0.6377533
0
Get a specific entry from the data set
getEntry(id) { if (!this.identifier) { return null; } let entry; for (let e of this.data) { if ((e[this.identifier]) && (e[this.identifier] === id)) { entry = e; break; } } return entry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findEntryByIndex(event, idx) { return event.entries[idx] }", "function find(id) {\n return data[id];\n}", "getEntry (/** String */ name) {\n return getEntry(name);\n }", "lookup(index) {\r\n if (index < 0 || index >= this.length) throw new Error(`Index ${index} is out of bo...
[ "0.6571117", "0.6442404", "0.6224694", "0.62118614", "0.6187995", "0.6055327", "0.60402894", "0.602823", "0.6008757", "0.5993309", "0.59855276", "0.5957776", "0.5914392", "0.5900204", "0.58893996", "0.587518", "0.57997775", "0.5790074", "0.5783419", "0.57816947", "0.57816947"...
0.6957127
0
Update multiple rows of data. Inserts if the value isn't there.
update(data) { //if (!this.data) { this.data = []; } this.data = []; this.gridbody.innerHTML = ''; for (let entry of data) { // incoming data //this.addEntry(entry); // We can only append if (this.identifier) { let id = entry[this.identifier]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateValues (table, data){\n for(const key in data)\n if(data[key] == \"\") data[key] = null;\n return table.update(data, {where: {[table.key]: data[table.key]}})\n .catch(()=>{ throw \"Unable to Update \" + table.name });\n}", "async update(data, options) {\n const stack = this....
[ "0.7081166", "0.6272867", "0.6156467", "0.60424745", "0.5987623", "0.5969163", "0.5964977", "0.5941968", "0.5925594", "0.59207475", "0.59091604", "0.5889102", "0.5880924", "0.58739334", "0.58343434", "0.58098835", "0.57569474", "0.5756555", "0.57517964", "0.57373434", "0.5722...
0.6315526
1
Add an entry into the data
addEntry(entry) { this.gridbody.appendChild(this.buildRow(entry)); this.data.push(entry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addEntry(table, id, data) {\n table.allItems.push(id);\n table.byId[id] = data;\n }", "function addEntry(entry) {\n Logger.log(entry);\n\n var today = Utilities.formatDate(new Date(), 'PST', 'MM/dd/yyyy');\n var rangeData = [\n today,\n entry['entry-name'],\n entry['entry-category'],\n ...
[ "0.73622304", "0.7309679", "0.6844166", "0.68033123", "0.67984813", "0.6761878", "0.66773224", "0.6671046", "0.6622716", "0.6573658", "0.656602", "0.6538748", "0.6538559", "0.6515365", "0.65081257", "0.6492447", "0.64551497", "0.6425076", "0.6405196", "0.63596606", "0.6317361...
0.7510991
0
Delete a row from the grid.
deleteRow(rowid) { let index = 0; for (let d of this.data) { if ((d.rowid) && (d.rowid === rowid)) { break; } index++; } this.data.splice(index, 1); this.gridbody.removeChild(this.gridbody.querySelector(`[data-rowid='${rowid}'`)); this.postProce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actionDelete(row){\n removeRow(row);\n addRowToTopOfGrid();\n drawGrid();\n}", "function deleteRow(row) {\n row.remove();\n recalculateAvg();\n}", "deleteRow(index) {\n const rows = this.rows;\n\n if (index >= 0 || index <= rows.length) {\n rows[index].remove();\n ...
[ "0.80992764", "0.76783156", "0.75175637", "0.75132334", "0.75132334", "0.7340555", "0.732353", "0.7320834", "0.7231477", "0.72153044", "0.71867615", "0.71851224", "0.70999014", "0.70999014", "0.7087456", "0.7029222", "0.7001661", "0.69907457", "0.6989817", "0.69679904", "0.69...
0.7774604
1
COLUMN METHODS___________________________________________________________________ Toggle a column on or off
toggleColumn(f) { if (f.hidden) { this.showColumn(f); } else { this.hideColumn(f); } this.persist(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleColumn(column) {\n this[`_${column}Hidden`] = !this[`_${column}Hidden`];\n }", "toggleColumn(key) {\n // Note: All td must have the same class name as the headings key!\n let columns = document.querySelectorAll('.' + key);\n\n if (this.$refs[key].classList.contains(...
[ "0.79731846", "0.71256864", "0.69606525", "0.683346", "0.6738105", "0.66089547", "0.6584108", "0.64910126", "0.6488639", "0.6472214", "0.63897246", "0.6311427", "0.62613565", "0.62071234", "0.61893535", "0.61455554", "0.61375004", "0.61313003", "0.6116469", "0.61121315", "0.6...
0.73034763
1
Check to see that at least one column is visible, and if not, show a warning.
handleColumnPresences() { let colsvisible = false; for (let f of this.fields) { if (!f.hidden) { colsvisible = true; break; } } if (!colsvisible) { this.messagebox.innerHTML = ""; this.messagebox.appendChild(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkColumns() {\n if ( ! ( colKey[\"Student ID (EMPLID)\"] || colKey[\"Username\"] ) ) {\n\tthrow 'The columns \"Username\" or \"Student ID (EMPLID)\" must be '\n\t +'in this view in order to download grades.\\n'\n\t +'The columns \"Last Name\" and \"First Name\" will also be '\n\t +'included...
[ "0.6563726", "0.6497624", "0.6469264", "0.6469264", "0.6448541", "0.6354834", "0.6115486", "0.6095614", "0.59962356", "0.59670496", "0.59643644", "0.5900864", "0.5875269", "0.5867447", "0.57910883", "0.57569176", "0.5750821", "0.56960636", "0.5664784", "0.5662507", "0.5645732...
0.7932853
0
Show a hidden column in the view.
showColumn(field) { field.hidden = false; for (let c of Array.from(this.grid.querySelectorAll(`[data-name='${field.name}']`))) { c.classList.remove('hidden'); } this.handleColumnPresences(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_column(aColumnId) {\n mc.e(aColumnId).removeAttribute(\"hidden\");\n}", "function hide_column(aColumnId) {\n mc.e(aColumnId).setAttribute(\"hidden\", \"true\");\n}", "showOrHideColumns() {\n let cloneColumns = cloneDeep(this.columns);\n\n const { hiddenColumns } = this;\n\...
[ "0.81672806", "0.7644742", "0.758922", "0.7274926", "0.72167546", "0.72072774", "0.7179907", "0.70809245", "0.7028032", "0.7010566", "0.7006481", "0.6942985", "0.68842906", "0.68219465", "0.6809029", "0.6764468", "0.67312926", "0.67290187", "0.66207707", "0.6609288", "0.65548...
0.77857065
1
Build the form shade
buildShade() { this.shade = new LoadingShade({ spinnertext: this.spinnertext, spinnerstyle: this.spinnerstyle }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildVisualComponents() {\n if (this.firstRun)\n super.buildVisualComponents();\n this.clear();\n\n const abc = this.act.abc['primary'];\n if (abc) {\n if (abc.image)\n abc.setImgContent(this.act.project.mediaBag, null, false);\n\n if (this.act.acp !== null)\n this.act.acp....
[ "0.5490413", "0.5486081", "0.54649746", "0.5380698", "0.5371411", "0.5322379", "0.52949834", "0.5283655", "0.52762663", "0.52564865", "0.52493834", "0.5213443", "0.5182662", "0.51659775", "0.5107991", "0.5098355", "0.5091633", "0.508425", "0.508055", "0.5052908", "0.5047015",...
0.67881745
0
Update the count of elements in the data grid.
updateCount() { let empty = true; if (this.data) { for (let node of this.container.querySelectorAll('span.itemcount')) { node.innerHTML = this.data.length; } if (this.data.length > 0) { empty = false; } } if (empty) { if (th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _updateCount()\n\t{\n\t\tvar me\t= this;\n\t\tme._countElement.update(me.getCheckedValues().size());\n\t}", "updateCounter()\r\n {\r\n this._numberOfObservations = this.list.length;\r\n }", "function updateCounts() {\n // const counts = knn.getCountByLabel();\n\n // select('#example1')....
[ "0.7657325", "0.7006509", "0.68894523", "0.6797462", "0.6618766", "0.647744", "0.64562076", "0.64524716", "0.6408924", "0.64070624", "0.637384", "0.6307403", "0.6281765", "0.6276565", "0.62497103", "0.6244542", "0.6244436", "0.6244436", "0.62269163", "0.62167686", "0.62036747...
0.7105048
1
Build the actual grid table.
buildGrid() { this.grid = document.createElement('table'); this.grid.classList.add('grid'); if (this.selectable) { this.grid.classList.add('selectable'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function construct_grid() {\r\n\r\n var wrapper = $(\"<div />\");\r\n header_row_container = $(\"<div />\");\r\n header_row_container.attr({class:\"eg-header-row-container\"});\r\n header_row_container.css({width: cont_width+\"px\"});\r\n headers = create_head...
[ "0.7119414", "0.70142794", "0.68131936", "0.6791486", "0.67886186", "0.6763754", "0.6754233", "0.67516804", "0.6747093", "0.67289793", "0.6721372", "0.6719286", "0.67107636", "0.6707965", "0.6692923", "0.6644589", "0.6641589", "0.66391814", "0.66370505", "0.66354597", "0.6634...
0.7179328
0
Build the footer element
buildFooter() { this.footer = document.createElement('footer'); this.footer.appendChild(this.buildItemCounter()); this.footer.appendChild(this.buildActivityNotifier()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildfooter (footer) {\n for (var i = 0; i < footer.length; i++) {\n\n var footercontent = '<div class=\"large-12 columnsDOE header-color result-text\" endpoint=\"' + footer[i].endrange + '\" id=\"a' + (i + 1) + '\">'+\n '<h3>' + footer[i].scoretext + '</h3></div>' \n\n $( \"#footer-co...
[ "0.749715", "0.7454249", "0.7313156", "0.713911", "0.7125627", "0.69977003", "0.6883564", "0.6808147", "0.68079853", "0.67647725", "0.67441", "0.67399", "0.6718177", "0.6666721", "0.66494673", "0.6641002", "0.66273594", "0.65864664", "0.65286064", "0.65014297", "0.64414203", ...
0.8290449
0
design sends the user to the make page with a list of in stock colors
* design (request, response) { const role = request.currentUser.role const colors = yield Database .from('colors') .where({ in_stock: 1 }) yield response.sendView('make', { colors, role }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detailProduct(produitChoose) {\n\n document.getElementById(\"imgProduct\").setAttribute(\"src\", produitChoose.imageUrl);\n document.getElementById(\"nameProduct\").innerHTML = produitChoose.name;\n document.getElementById(\"descriptionProduct\").innerHTML = produitChoose.description;\n docume...
[ "0.623725", "0.59833246", "0.5981354", "0.5971178", "0.59143823", "0.5893715", "0.58384025", "0.5813797", "0.5813133", "0.5798917", "0.57975596", "0.57731354", "0.5752401", "0.57226974", "0.5718728", "0.57050496", "0.56827813", "0.5640055", "0.55840224", "0.55840087", "0.5558...
0.6173668
1
create adds a new order to the orders database and the associated colors to the details database
* create (request, response) { const details = request.only('size','design'); var orderData = { user_id: request.currentUser.id, size: details.size, design: details.design, status: "received"}; yield Order.create(orderData) const orderCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(req, res, next) {\n const data = {\n userId: req.body.userId,\n status: req.body.status,\n };\n orderDao.create(data)\n .then((neworder, created) => {\n if (!neworder) {\n res.send(false);\n }\n if (neworder) {\n res.json(neworder);\n }\n });\n}", ...
[ "0.6523061", "0.63293403", "0.6320041", "0.6284032", "0.62582856", "0.6216857", "0.6190644", "0.6167693", "0.6133168", "0.60870945", "0.59317416", "0.59079766", "0.58888394", "0.5826237", "0.5742884", "0.5734562", "0.5695487", "0.56812155", "0.5647134", "0.56273824", "0.55901...
0.6828428
0
termMultiply takes two objects representing two terms of polynomial expressions and multiplies them to return an object with coefficient and power values.
termMultiply(obj1, obj2) { const returnObj = {}; returnObj.coefficient = obj1.coefficient * obj2.coefficient; returnObj.power = obj1.power + obj2.power; return returnObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToTermsforPolynomialMultiplication(terms, node) {\n const polyNode = new Node.PolynomialTerm(node);\n let termName;\n\n if (!polyNode.hasCoeff()) {\n termName = getTermName(node, Node.PolynomialTerm, '*');\n terms = Util.appendToArrayInObject(terms, termName, node);\n }\n else {\n const c...
[ "0.6911974", "0.6525869", "0.63630867", "0.6270393", "0.6254108", "0.6221793", "0.61261135", "0.61232346", "0.6115391", "0.6097787", "0.6095744", "0.6070821", "0.60584354", "0.6049454", "0.60488415", "0.60396457", "0.60346407", "0.60308886", "0.60265434", "0.60265434", "0.602...
0.8340339
0
Counts the surrounding squares of a given position on the old grid
function countNeighbors(grid, x, y){ let sum = 0; // Loop through the surrounding 8 squares, adding the value of each square for (let i = -1; i < 2; i++){ for(let j = -1; j < 2; j++){ // If we hit the edge cell use the cell at position 0, grid wraps around let col = ( x + i + cols) % cols; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function surrounding(y, x){\n var count = 0;\n if (y > 0 && x > 0 && mines[y - 1][x - 1]) \n count++;\n if (y > 0 && mines[y - 1][x]) \n count++;\n if (y > 0 && x < gridx - 1 && mines[y - 1][x + 1]) \n count++;\n if (x > 0 && mines[y][x - 1]) \n count++;\n if (x < grid...
[ "0.7436602", "0.71691805", "0.7145724", "0.7062217", "0.7035574", "0.69567764", "0.6927447", "0.68689275", "0.6835838", "0.6825968", "0.6783421", "0.6729289", "0.6716388", "0.6713762", "0.6688995", "0.6596718", "0.6594949", "0.65822035", "0.65513724", "0.6551324", "0.653003",...
0.7247729
1
test out the binary tree Vars needed to build & print tree
function printTree(a){console.log(a)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PrintTree(root) {\n if (root != null) {\n console.log(root.data);\n this.PrintTree(root.yesNode);\n this.PrintTree(root.noNode);\n }\n }", "printValues() {\n if (this.root === null) {\n console.log('The tree is void');\n return;\n }\n\n this.pr...
[ "0.6657763", "0.6395322", "0.63446295", "0.63054335", "0.6058814", "0.6053925", "0.6037609", "0.59576654", "0.59288085", "0.59059614", "0.58950996", "0.5871539", "0.580309", "0.57860684", "0.57826483", "0.57780933", "0.5672135", "0.56682897", "0.56618273", "0.5653106", "0.565...
0.6563277
1
Retrieves the Pokemon array and sorts by Id
function getAll() { return pokemonNameList.sort(byId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllPokemon() {\n var toast = Materialize.toast('Loading all Pokemon...');\n var full = `${api_url}/pokedex/1/`;\n $.getJSON(full, function (response) {\n console.log(response);\n var pokedex_list = (response.pokemon_entries);\n var pokemon_names = [];\n var pokemon_...
[ "0.71587247", "0.6525886", "0.64663756", "0.6430631", "0.6418779", "0.637614", "0.637614", "0.62034595", "0.6200002", "0.6094735", "0.6018628", "0.60023284", "0.59775347", "0.5935201", "0.5906554", "0.5902613", "0.5835317", "0.5793595", "0.5791936", "0.5756952", "0.57562095",...
0.719758
0
A function for mimicking a powering down button of the app
function powerDown() { const powerButton = document.querySelector('.header-powerbttn'); powerButton.addEventListener('click', () => { if (window.confirm('Are you sure you want to power down?')) { document.body.style.display = 'none'; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function powerDown () {\n console.log(\"power down\");\n //isPowered = false;\n pfio.digital_write(0,0);\n setTimeout(doReset, 5000);\n}", "togglePower() {\n\t\tthis.power(!this.data.on);\n\t}", "function powerUp () {\n console.log(\"power up\");\n isPowered = true;\n pfio.digital_write(0,1);\n}", "fu...
[ "0.6912085", "0.6856744", "0.6532943", "0.65206313", "0.6501718", "0.6498218", "0.63867486", "0.6334389", "0.63317746", "0.6306285", "0.62944734", "0.6292435", "0.62359244", "0.62135035", "0.6206247", "0.61751235", "0.6171895", "0.61367744", "0.6116159", "0.60240346", "0.6022...
0.71782917
0
Define the fetchVideoFromNetwork() function
function fetchVideoFromNetwork(video) { console.log('fetching videos from network'); // Fetch the MP4 and WebM versions of the video using the fetch() function, // then expose their response bodies as blobs const mp4Blob = fetch(`videos/${video.name}.mp4`).then(response => response.blob()); const webmBlob = f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayvideo() {\n document.getElementsByClassName(\"video\")[1].src= \"/static/media/default.mp4\";\n var httpRequest = new XMLHttpRequest();\n httpRequest.onreadystatechange = function() {\n if (httpRequest.readyState == 4 & httpRequest.status == 200) {\n var httpResponse = JSON.parse(httpReq...
[ "0.66749364", "0.6614059", "0.65979", "0.65799654", "0.65430665", "0.6525023", "0.6321711", "0.6315667", "0.62829584", "0.62810344", "0.6269463", "0.6227754", "0.62017316", "0.61924136", "0.61882204", "0.61687016", "0.6168006", "0.6166468", "0.613709", "0.61333716", "0.612876...
0.7941211
0
Define the storeVideo() function
function storeVideo(mp4Blob, webmBlob, name) { // Open transaction, get object store; make it a readwrite so we can write to the IDB const objectStore = db.transaction(['videos_os'], 'readwrite').objectStore('videos_os'); // Create a record to add to the IDB const record = { mp4 : mp4Blob, webm : webmBl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveVideo() {\n\t\tdocument.getElementById(\"preview_popup_container\").style.display = \"none\";\n\t\tdocument.getElementById(\"Studio\").onExternalPreviewPlayerPublish();\n\t}", "saveVideos(videos){\n\t this._VideoService.saveVideos(videos);\n\t alert('Videos saved to local storage!');\n }", "add...
[ "0.6865876", "0.6733901", "0.66979384", "0.6567106", "0.64067787", "0.636466", "0.6310591", "0.6296328", "0.6284259", "0.626264", "0.6216812", "0.618985", "0.6171425", "0.61662036", "0.6149408", "0.6137233", "0.61137646", "0.60957", "0.60551083", "0.60541904", "0.6053607", ...
0.70915335
0
Sometimes The Connection Dies, and Leap Motion Needs to be Restarted
function check_connection() { now = new Date().getTime() / 1000; if(now - last_poll > connection_lost_after) { clearInterval(connection); try { chrome.runtime.sendMessage({ connection: 'lost' }, function(response) { console.error('Connection to Leap Motion Lost. Restart Leap Motion and Refr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onsentinelreconnect(){\n console.log(\"retry\");\n }", "function restart() {\n\n // Initialize contents and visibility of HTML-Elements\n log_elt.innerHTML = \"\";\n btn_connect_elt.disabled = false;\n btn_disconnect_elt.disabled = true;\n\n // Initialize global variables\n mediaStream =...
[ "0.6466322", "0.6368927", "0.6249312", "0.62317616", "0.62072146", "0.6124984", "0.6005322", "0.5995363", "0.5905491", "0.5871885", "0.58024395", "0.58009297", "0.5794747", "0.57868665", "0.5754645", "0.5745419", "0.5699421", "0.5687092", "0.567578", "0.567578", "0.5670426", ...
0.6413328
1
Check if Current Tab has Focus, and only run this extension on the active tab
function check_focus() { try { chrome.runtime.sendMessage({ tab_status: 'current' }, function(response) { if(response.active && window.location.href == response.url && document.hasFocus()) { tab_has_focus = true; } else { tab_has_focus = false; } }); } c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkTabFocus(target) {\n focused = document.activeElement;\n\n if (target === focused) {\n activateTab(target, false);\n }\n }", "function checkTabFocus(target) {\n var focused = document.activeElement;\n\n if (target === focused) {\n activateTab(target, false);\...
[ "0.72713405", "0.72187483", "0.68558735", "0.66226315", "0.65398586", "0.65014416", "0.6501053", "0.6441346", "0.64202136", "0.63946635", "0.63702387", "0.63702387", "0.63702387", "0.63702387", "0.633893", "0.6308803", "0.62906814", "0.62798285", "0.62646", "0.62571275", "0.6...
0.7644449
0
cbxTypeSelect.addEventListener("change", showTypeControls); var btnAddControls = document.getElementById("btnAddControls"); btnAddControls.addEventListener("click", createNewControls);
function showTypeControls() { var typeIndex = document.getElementById("cbxTypeSelect").selectedIndex; var tdParts = document.getElementById("tdForParts"); switch (typeIndex) { case 0: postControl(tdParts); break; case 1: phoneControl(tdParts); break; case 2: exponentialNotationContr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_new() {\n var e = document.getElementById(\"config_type\");\n e.addEventListener(\"change\", type_handle, false);\n\n init_edit();\n}", "function addEventsSearchSelect(){\n let searchSelect = document.getElementById(\"searchSelect\");\n searchSelect.addEventListener(\"change\", addEventsBu...
[ "0.65020746", "0.63986385", "0.63673633", "0.6212038", "0.6179275", "0.611955", "0.61072755", "0.6039556", "0.6036416", "0.6026059", "0.6019569", "0.60132426", "0.5987612", "0.5973917", "0.5961869", "0.58991003", "0.5885436", "0.5866605", "0.5861731", "0.58582175", "0.5855571...
0.6621831
0
the PluggableElementType for the currently defined adapter
get adapterType() { const adapterConfig = getConf(self, 'adapter') if (!adapterConfig) throw new Error(`no adapter configuration provided for ${self.type}`) const adapterType = pluginManager.getAdapterType(adapterConfig.type) if (!adapterType) throw new Error(`unknown...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GetType() {\n return this.m_type;\n }", "type() {\n return this._type.name;\n }", "type() {\n return this._type.name;\n }", "getType() {\n return this.getAttribute('type');\n }", "GetType() {\n return this.m_type;\n }", "getSpecificTyp...
[ "0.5816972", "0.5813836", "0.5813836", "0.5766102", "0.57189786", "0.5697695", "0.5619935", "0.55901057", "0.5570355", "0.55607015", "0.5560604", "0.55524236", "0.5550215", "0.5527692", "0.5527409", "0.5450976", "0.5405735", "0.53614074", "0.53614074", "0.53614074", "0.536140...
0.6707508
0
the pluggable element type object for this track's renderer
get rendererType() { const track = self const RendererType = pluginManager.getRendererType( self.rendererTypeName, ) if (!RendererType) throw new Error(`renderer "${track.rendererTypeName}" not found`) if (!RendererType.ReactComponent) throw new Erro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getType() {\n return this.getAttribute('type');\n }", "getElement() {\n return this.renderer.drawableElement;\n }", "getSpecificType() {\r\n var isComponent = this.hasTag('component');\r\n if (isComponent) {\r\n return this.isAbstract ? 'abstract-component': 'component'\r\n ...
[ "0.59771687", "0.58492553", "0.5828746", "0.57909685", "0.57393795", "0.5692689", "0.56575334", "0.56575334", "0.56225204", "0.562033", "0.56157947", "0.56157947", "0.56157947", "0.56157947", "0.56157947", "0.55759835", "0.556363", "0.5559497", "0.5559497", "0.5559497", "0.55...
0.6065785
0
returns a string feature ID if the globallyselected object is probably a feature
get selectedFeatureId() { const session = getSession(self) if (!session) return undefined const { selection } = session // does it quack like a feature? if ( selection && typeof selection.get === 'function' && typeof selection.id === 'function' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUnique(feature) { return feature.id }", "function selectFeature(objectId) {\n // query feature from the server\n featureLayer\n .queryFeatures({\n objectIds: [objectId],\n outFields: [\"*\"],\n returnGeometry: false\n })\n .t...
[ "0.6946554", "0.6164755", "0.61279976", "0.61011475", "0.60999495", "0.60319877", "0.59642506", "0.59608245", "0.59192735", "0.5850776", "0.57842106", "0.5737573", "0.5679286", "0.5591772", "0.5543517", "0.5535107", "0.54474527", "0.5420973", "0.5407026", "0.54069775", "0.538...
0.78863233
0
Turns bixi heatmap on/off
function bixiToggleHeatmap() { bixiHeatmap.setMap(bixiHeatmap.getMap() ? null : bixiMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleHeatmap(){\n\t\t\t\t\tpressButton($('#crimes'));\n\t\t\t\t\theatmap.setMap(heatmap.getMap() ? null : map);\n\t\t\t\t}", "function togglePassHeatmap() {\n sim_hm_passStart.setMap(sim_hm_passStart.getMap() ? null : map);\n sim_hm_passEnd.setMap(sim_hm_passEnd.getMap() ? null : map); \n}", ...
[ "0.77178", "0.69817895", "0.68587995", "0.6542356", "0.64738834", "0.64573425", "0.62764585", "0.6241038", "0.6237246", "0.618508", "0.61168927", "0.61100787", "0.60675806", "0.60662246", "0.6028857", "0.6014917", "0.5986358", "0.5944328", "0.5927519", "0.5924234", "0.5888749...
0.8287461
0
Changes radius of bixi heatmap
function bixiChangeRadius() { bixiHeatmap.set('radius', bixiHeatmap.get('radius') ? null : 20); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeRadius(heatmap, slider) {\n const zoom = map.getZoom();\n const factor = parseInt(slider.value)/5; // Ranges from 0 to 2.\n heatmap.set(\"radius\", Math.pow(1.75, zoom + factor));\n}", "updateHeatmapRadius(radius: number, blur: ?number): void {\n if (radius) {\n this._heatmap.radius(rad...
[ "0.710581", "0.6979082", "0.683686", "0.6448561", "0.6174841", "0.60839194", "0.6022275", "0.5986963", "0.5986963", "0.5981939", "0.59121615", "0.5864359", "0.58185965", "0.57795966", "0.57421744", "0.5704901", "0.5687042", "0.5653068", "0.56144667", "0.557376", "0.55679643",...
0.8295096
0
Get updated Bixi data
function bixiUpdateData() { console.log("In bixiUpdateData"); //Show the modal as will load the bixiHeatmap $('#myPleaseWait').modal('show'); //Remove old stats of bixi $("#bixiSnapshotStatsView").empty(); //Get current bixi data to display on map $.ajax({ url: "/latestBixi", type: "post", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCloudBoiInfo() {\n $.post(window.location['pathname'] + 'API', {info:\"roms\"}).done(function (data){\n roms = data.info;\n });\n $.post(window.location['pathname'] + 'API', {info:\"saves\"}).done(function (data){\n saves = data.info;\n });\n ...
[ "0.65130335", "0.63065416", "0.58789295", "0.5818574", "0.5799425", "0.57459277", "0.5720849", "0.57123125", "0.5710547", "0.5704135", "0.56897336", "0.565949", "0.56158733", "0.5612188", "0.5606442", "0.5584668", "0.55388135", "0.55137604", "0.5513727", "0.55105746", "0.5501...
0.65560097
0
Draws latest Bixi data on heatmap
function drawBixiDataonMap(data) { //console.log("drawBixiDataonMap received data as: ", data); var numberOfStations = data.length; //console.log("numberOfStations is: ", numberOfStations); // Formatting the data to send to heatmap var i; var j; for(i = 0; i < numberOfStations; i++) { var latitude ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawUserSelectedTimeBixiDataonMap(data)\n {\n //console.log(\"drawUserSelectedTimeBixiDataonMap: data received is: \", data);\n var numberOfStations = data.length;\n console.log(\"numberOfStations is: \", numberOfStations);\n\n // Remove old stations from bixiStations\n bixiStations.splice(...
[ "0.7035035", "0.7018064", "0.667294", "0.6512708", "0.6238673", "0.6022086", "0.59883845", "0.5941942", "0.59354013", "0.5870859", "0.58576745", "0.58359045", "0.58302426", "0.5815835", "0.57687515", "0.5753707", "0.57124555", "0.567107", "0.5665122", "0.5627714", "0.5626308"...
0.7121478
0
Draw heatmap of bixi at user specified time
function drawUserSelectedTimeBixiDataonMap(data) { //console.log("drawUserSelectedTimeBixiDataonMap: data received is: ", data); var numberOfStations = data.length; console.log("numberOfStations is: ", numberOfStations); // Remove old stations from bixiStations bixiStations.splice(0,bixiStations.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawHeatmap(){\n heatmap.setData(pointsArr);\n heatmap.set('radius', 40);\n}", "function heatMap(yr,yg,yb,hmTable){\r\n\t\t// Function to get the Max value in Array\r\n\t Array.max = function( array ){\r\n\t return Math.max.apply( Math, array );\r\n\t };\r\n\t // get all values\r\n\t ...
[ "0.6707577", "0.646879", "0.64446586", "0.63550323", "0.6305701", "0.6119161", "0.59994096", "0.5887568", "0.58831257", "0.57948047", "0.5742437", "0.57259285", "0.57106435", "0.5706229", "0.5678407", "0.5646219", "0.56309193", "0.56176066", "0.5591195", "0.5589829", "0.55888...
0.6634966
1
PUT : Update dossier
static updateDossier(req,res) { // Check si le body comporte des données if (!req.body) return res.status(400).send({ message: "Le body doit comporter des données" }); // Find dossier Dossier.findByIdAndUpdate(req.params.dossierId, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async put (req, res){\n const { nome, email } = req.body\n\n await Cliente.update(\n { nome, email },\n {\n where: { id:req.params.id }\n })\n\n return res.json({ message: 'Atualizado com sucesso'})\n }", "function updateJugador() {\n var...
[ "0.6609794", "0.6423359", "0.6339677", "0.62785333", "0.626777", "0.6218071", "0.6216756", "0.616652", "0.6152621", "0.61486006", "0.6073431", "0.6060751", "0.60572106", "0.6048483", "0.60135514", "0.60004306", "0.59852964", "0.597836", "0.59659225", "0.59626323", "0.5945338"...
0.74637794
0
Creates a PReLU activation layer
constructor (attrs = {}) { super(attrs) this.layerClass = 'PReLU' // Layer weights specification this.params = ['alphas'] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activation(inputs) {\n let sum = this.bias;\n for (let i = 0; i < inputs.length; i++) {\n sum += inputs[i] * this.weights[i];\n }\n\n return 1 / (1 + Math.exp(-sum)); //sigmoid\n //return Math.max(0, sum); // ReLU; its derivative is (sum > 0 ? 1 : 0)\n }", "activa...
[ "0.5486313", "0.5483257", "0.5373304", "0.5158708", "0.50117594", "0.48567215", "0.4838476", "0.47984868", "0.47958693", "0.47831884", "0.4775634", "0.47648177", "0.47085375", "0.47070894", "0.46281424", "0.46000782", "0.4582579", "0.45339614", "0.44977516", "0.44944486", "0....
0.65020293
0
Creates the reorder row extension.
function ReorderRowExtension(options) { this._options = options || {}; if (this._options.disabled === undefined) { this._options.disabled = ko.observable(false); } this._gridGuid = Util.newGuid(), _super.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_reorderRows(){const body=this.$.items;const items=body.querySelectorAll('tr');if(!items.length){return;}const adjustedVirtualStart=this._virtualStart+this._vidxOffset;// Which row to use as a target?\nconst targetRow=this._rowWithFocusedElement||Array.from(items).filter(row=>!row.hidden)[0];if(!targetRow){// All ...
[ "0.6352791", "0.5823878", "0.572817", "0.5657926", "0.56351817", "0.5391555", "0.53699577", "0.53609484", "0.53287345", "0.5306832", "0.52848023", "0.52172405", "0.52110195", "0.520762", "0.5207558", "0.5202019", "0.5156593", "0.5133645", "0.5130524", "0.5129858", "0.5128635"...
0.68241626
0
takes response text and parses for the count and returns the count
function getCountFromSlack(slackResponse) { var count = -1; //grab data and set messageCount var response = JSON.parse(slackResponse); if (response.ok === true) { var count = response.messages.pagination.total_count; } console.log("message count: " + count); return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "countResponses (column, response, data) {\n const columnIndex = this.getColumnIndex(column, data);\n let rows = data.slice(1);\n let count = 0;\n for (let k = 0; k < rows.length; k++){\n if (rows[k].Data[columnIndex].VarCharValue == response) {\n count++;\n };\n };\n return count...
[ "0.6477985", "0.6454358", "0.64063776", "0.62220293", "0.6174773", "0.6095918", "0.6060146", "0.6001083", "0.5988952", "0.5986051", "0.59735787", "0.59488064", "0.5935484", "0.5918344", "0.5918191", "0.5914684", "0.5914684", "0.5907616", "0.59064054", "0.5904045", "0.5877402"...
0.67086333
0
changes page to a parent div by id screenName is the parentid value to switch to path = either the specific path or false
function switchView(screenName, path){ //alert(screenName); //alert(path); if(path){ // open and populate path from content.js content //screen = 'detail'; //screen = 'video'; screen = 'gallery'; openPath(path); } else { // open page like orientation screen //alert(screenName); //alert(path); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function togglePage() {\n if (currentDivId == \"content\") {\n currentDivId = \"content1\";\n }\n else {\n currentDivId = \"content\";\n }\n}", "function goToNextScreenIC() {\n\tvar docPane = dojo.widget.getWidgetById('main');\n\tdocPane.setUrl('./content/main/parts/save_bom_as/screen_part_save_bom_as_...
[ "0.6312213", "0.6208496", "0.58127576", "0.5812199", "0.58116704", "0.58086705", "0.5804311", "0.578107", "0.57512766", "0.564993", "0.56082195", "0.56056255", "0.5591383", "0.55878806", "0.55670273", "0.5544022", "0.5499325", "0.5467256", "0.54577917", "0.54527354", "0.54158...
0.7007414
0
click from landing page into a path, changes the title and shows/hides divs path ie: birch_creek, pathTitle ie: Birch Creek
function openPath(path){ //console.log(pathContent[path]); //console.log(path); if (typeof pathContent[path] == 'undefined') { //alert('hit it inside openPath ' + path); //return false; //pathContent[path] = { name: '', video_url: '', gallery_images: [] }; } if (typeof pathContent[path] !== 'undefined') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPageTitle(path){\n var title = getTitle(path);\n\n if (title){\n $('title').text(title);\n } else {\n $('title').text(window.location.origin.split('/')[3]);\n }\n\n }", "function switchView(screenName, path){\n\t//alert(screenName);\n\t//alert(path...
[ "0.6384478", "0.63088274", "0.6076464", "0.59626925", "0.5936167", "0.5920146", "0.58974665", "0.58825594", "0.5829255", "0.5816022", "0.5803634", "0.5749885", "0.57268727", "0.57156885", "0.5702979", "0.5701358", "0.5700639", "0.56877047", "0.5682012", "0.56784505", "0.56765...
0.71354395
0
populate the parent detail div with path specific content path ie: birch_creek
function setupDetailDiv(path){ $('.parent.detail').attr('id', path); // set footer buttons data-name to path $('.controls .buttons *').data('name', path); if (typeof pathContent[path] == 'undefined') { alert('hit it inside setupDetailDiv'); return false; } //content from pathContent object var content ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\r\n var x = window.location.href;\r\n var n = x.replace('linezeta/info/machine', 'pad/info/monster');\r\n var l = '<div><a href=\"'+n+'\">[Pad Info Page]</a></div>';\r\n jQ('#linezeta-info-machine-detail').prepend(l);\r\n}", "function openPath(path){\n\t//console.log(pathContent[path]);\n\t...
[ "0.61722964", "0.60254663", "0.59685105", "0.5720388", "0.5707454", "0.5680925", "0.54385734", "0.5432113", "0.5427663", "0.5418512", "0.5379239", "0.53491676", "0.5340221", "0.53047884", "0.5302394", "0.5256173", "0.5238273", "0.52279663", "0.5220429", "0.5191872", "0.518689...
0.7042894
0
Getting the Active Campaign data & adding the new contact
function addContactToActiveCampaign(data) { let newContact = { "p[8]": 8, name: data.name, phone: data.phone, email: data.email, "field[%invoiceNumber%]": data.invoiceNumber, "field[%AGE%,0]": data.age, "field[%BODY_WEIGHT%, 0]": data.weight, "field[%HEIGHT%, 0]": data.height, "fie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contactAdd (cb) {\n api.contactAdd(contactData, function (err, addedContact) {\n expect(err).to.be(null);\n secondContact = addedContact;\n return cb();\n });\n }", "async addContact(info){\n if (this.contactsMap.has(info.peerID)){\n console.log(\"Already co...
[ "0.63754255", "0.63460493", "0.63141835", "0.59482455", "0.5937492", "0.59225374", "0.5913889", "0.5882444", "0.5879293", "0.58577013", "0.5822274", "0.58179027", "0.57894063", "0.5780068", "0.57461476", "0.5736079", "0.57336575", "0.57191443", "0.5714933", "0.5701446", "0.56...
0.84646267
0
Emit a 'complete' event signifying that everything has been received. If cacheChunks is true, the event will be emitted with a single buffer containing all concatenated chunks.
emitComplete() { if (this.cacheChunks) { const reclaimed = Buffer.concat(this.chunks); this.emit(EV_COMPLETE, reclaimed); } else { this.emit(EV_COMPLETE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleDataAvailable(e) {\r\n recordedChunks.push(e.data);\r\n}", "function handleDataAvailable(event) {\n console.log(event)\n console.log(\"data-available\");\n if (event.data.size > 0) {\n recordedChunks.push(event.data);\n console.log(recordedChunks);\n } else {\n //...
[ "0.5750882", "0.5465305", "0.5380318", "0.5350471", "0.51195574", "0.5118417", "0.5118417", "0.5092618", "0.5029051", "0.50234133", "0.50234133", "0.5003435", "0.49830082", "0.49830082", "0.49450785", "0.49450785", "0.49378458", "0.49283436", "0.49283436", "0.49283436", "0.49...
0.83674467
0
Create the chunk generator or return the existing active generator.
get chunkGenerator() { if (!this._activeGenerator) { this._activeGenerator = this.createChunkGenerator(); } return this._activeGenerator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "*createChunkGenerator() {\n if (!this.buffToSend) {\n throw new Error('buffer not set');\n }\n const totalNumChunks = this.numChunks;\n let chunksYielded = 0;\n while (chunksYielded < totalNumChunks) {\n let chunkStart = chunksYielded * this.chunkSize;\n let chunkEnd = chunkStart + th...
[ "0.5898025", "0.58090097", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.563752", "0.56...
0.76735187
0
Generate chunks of the buffer we are sending. Throws an error if this is called when buffToSend is not set.
*createChunkGenerator() { if (!this.buffToSend) { throw new Error('buffer not set'); } const totalNumChunks = this.numChunks; let chunksYielded = 0; while (chunksYielded < totalNumChunks) { let chunkStart = chunksYielded * this.chunkSize; let chunkEnd = chunkStart + this.chunkSize;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendChunk() {\n // Nothing to do?\n if(this.queue.length === 0) return\n\n const chunk = this.queue.slice(0, this.chunkSize)\n this.queue = this.queue.slice(this.chunkSize)\n this.decoder.decodeList(chunk)\n }", "function generateSendBuffer (n) {\n\n let crcString = crc16...
[ "0.6264273", "0.604431", "0.59043556", "0.57271934", "0.5712634", "0.5478945", "0.54773825", "0.54024", "0.53494334", "0.5320858", "0.5317172", "0.52396256", "0.52326405", "0.51938754", "0.51938754", "0.5178826", "0.5144164", "0.51298213", "0.51064366", "0.50801736", "0.50749...
0.76556844
0
opens the Facebook page in a new tab
function openFacebook() { window.open("https://www.facebook.com/StitchedRecordingsLLC"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fb_link(){\r\n\r\n window.open(\"https://www.facebook.com/nj.jn54\",\"_self\");\r\n}", "function facebook(){\n\twindow.open('../../facebookapi/?setting=1','','toolbar=no,menubar=no,location=no,height=1,width=1');\t\n}", "function ouvrireFacebook(){\n window.open('http://www.facebook.com', '', ''...
[ "0.80202794", "0.72272193", "0.7209413", "0.7082194", "0.6994771", "0.6952952", "0.6928625", "0.69092435", "0.6805282", "0.6802425", "0.6802425", "0.6769307", "0.6756796", "0.6752848", "0.6748637", "0.67128474", "0.6695696", "0.6652255", "0.6630546", "0.66098994", "0.66033643...
0.78873134
1
opens the Twitter page in a new tab
function openTwitter() { window.open("https://twitter.com/StitchedRec"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openExternalTweet(tweetId) {\r\n window.open(TWEET_URL + tweetId, \"_blank\");\r\n}", "function tweet () {\n var difference = ((new Date()).getTime() - initalTime) / 1000;\n\n var win = window.open('https://twitter.com/intent/tweet?url=http%3A%2F%2Ftakeb1nzyto.space&text=I%20got%20ratelimited%20for...
[ "0.75588727", "0.7190303", "0.7042298", "0.7040419", "0.6916925", "0.69053686", "0.68779486", "0.6769931", "0.6750986", "0.6705687", "0.6705687", "0.6696467", "0.6686121", "0.6659509", "0.6641941", "0.6641442", "0.66286", "0.6620901", "0.6585952", "0.658153", "0.65740806", ...
0.8405616
0
opens the Youtube page in a new tab
function openYoutube() { window.open("https://www.youtube.com/user/StitchedRecordings"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function launchYoutubePlayer(videoUrl) {\n var ref = window.open(videoUrl, '_system');\n}", "function cnsAml_openYT(){\n var link = $(\"#cnsAml_video\").val();\n\n if(empty(link)){\n return;\n }\n\n window.open(link);\n}", "function openInNewTab(url) {\n var win = window.open(url, '_...
[ "0.7714423", "0.7046983", "0.6936405", "0.6929923", "0.6919309", "0.68609166", "0.6825955", "0.68210447", "0.68048584", "0.66950583", "0.668741", "0.6684371", "0.6681068", "0.6680013", "0.6680013", "0.6675443", "0.66547894", "0.65283084", "0.6526919", "0.6510495", "0.64859664...
0.82014984
0
opens the Soundcloud page in a new tab
function openSoundcloud() { window.open("https://soundcloud.com/stitched-recordings-llc"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openInNewTab(url) {\n var win = window.open(url, '_blank');\n win.focus();\n }", "function openPlaylist() {\n // open playlist URL in new window\n window.open(data.external_urls.spotify);\n }", "function openUrl(url) {\n window.open(url, '_blank');\n }", "...
[ "0.71221685", "0.7116922", "0.7107971", "0.69849896", "0.69849896", "0.6964476", "0.69447905", "0.6901122", "0.6867257", "0.68597186", "0.6852971", "0.6782083", "0.6777969", "0.6772579", "0.67349464", "0.67337483", "0.6722869", "0.6708317", "0.6708317", "0.66930133", "0.66498...
0.82209396
0
opens the Bandcamp page in a new tab
function openBandcamp() { window.open("https://stitchedrecordingsllc.bandcamp.com/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openInNewTab(url) {\n var win = window.open(url, '_blank');\n win.focus();\n }", "function CFOpenNewTab(url) {\n\tvar win = window.open(url, '_blank');\n\twin.focus();\n}", "spawn() {\n window.open(window.location);\n }", "spawn() {\n window.open(windo...
[ "0.72311574", "0.7219108", "0.7159147", "0.7159147", "0.7120025", "0.70988935", "0.7031344", "0.7022073", "0.6957776", "0.6932695", "0.6886564", "0.6848809", "0.6844202", "0.6840597", "0.6822695", "0.6822695", "0.67731327", "0.676885", "0.6766307", "0.6739455", "0.67230576", ...
0.7988585
0
Unsubscribe to the counts if a subscription exists.
unsubscribeCount() { if (this._counter) { this._counter.unsubscribe(); this._counter = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsubscribe() {\n const index = this.subscriptions.indexOf(this);\n if (index !== -1) {\n this.subscriptions.splice(index, 1);\n }\n }", "removeAllSubscriptions() {\n for (const key in this.subscriptions) {\n if (this.subscriptions[key]) {\n thi...
[ "0.7370589", "0.71037453", "0.6914305", "0.681577", "0.6794555", "0.6731681", "0.6695944", "0.66771233", "0.6667022", "0.66446775", "0.663572", "0.65867233", "0.65867233", "0.65208", "0.65109074", "0.6467662", "0.64436966", "0.6416513", "0.6405951", "0.6381875", "0.6367654", ...
0.778253
0
If called by server, show or confirm a message; if called by the user, show an unconfirmed message and send the update to the server
function showMessage(objId, sender, d, text, server){ // This is changed if the server is going to confirm an existing message var new_message = true; // If showMessage is called by a server update set the proper // style, and add the date if(server){ var skin = g['skin_names'][g['current_sk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUpdate( msg, msg_type){\n\n\t\tif (typeof(msg_type)==='undefined') msg_type = \"info\"; /*if no message type is passed , default it to info*/\n\n\t\tMessenger().post({\n\t\tmessage:msg,\n\t\ttype:msg_type,\n\t\t showCloseButton: true\n\t\t });\n}", "function confirmChange(){\n confirm(\"Are you sur...
[ "0.6903547", "0.65383244", "0.65202576", "0.6507317", "0.639439", "0.633748", "0.63020456", "0.62481", "0.6220613", "0.62051296", "0.61645246", "0.61244285", "0.6124254", "0.6122818", "0.6122818", "0.6106566", "0.6105672", "0.6068979", "0.6067797", "0.6039594", "0.60326594", ...
0.6874818
1
Takes a text and puts it into p: substituting the emoticons with corresponding images putting anchors around http:// links replacing newlines with "br"
function textRender(utext, p) { var utextArray = utext.split('\n'); for (var i = 0; i < utextArray.length; i++) { var v = utextArray[i].split(" "); for (var j = 0; j < v.length; j++) { var src = ""; switch(v[j]){ case ":)": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function para(text) {\n text = CapperLayout.xss(text);\n text = text.replace(/\\n\\n/g, \"<p>\");\n return text.replace(/\\n/g, \"<br />\");\n}", "function replaceEmotes(text) {\n\tvar textSplit = text.split(' ');\n\tfor (var i = 0; i < textSplit.length; i++) {\n\t\tif (emotes.value[textSplit[i]])\n\t\t...
[ "0.6359942", "0.634008", "0.62223154", "0.60996675", "0.59776497", "0.5966922", "0.5960853", "0.5932399", "0.5853613", "0.58384037", "0.5727732", "0.5686081", "0.56806785", "0.5598102", "0.55617905", "0.5478288", "0.54456747", "0.54229605", "0.54157215", "0.53854716", "0.5385...
0.7616982
0
remove all elements from the chat window
function clearChat() { var div = getById("text_output"); while (div.hasChildNodes()) div.removeChild(div.firstChild); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeChatWindows () {\n const windows = document.querySelectorAll('#chat1')\n windows.forEach((window) => {\n window.remove()\n })\n}", "function clearAllMessages() {\n Chatty.removeAllMessagesInArray();\n $border.html(\"\"); //OR.empty();\n $clearAllButton.attr(\"disabled\", true);\n ...
[ "0.8015323", "0.7390643", "0.7383022", "0.7329197", "0.7308979", "0.7289358", "0.72341824", "0.72188395", "0.71829486", "0.7096509", "0.70633626", "0.7032665", "0.6941107", "0.68749046", "0.6869477", "0.68186927", "0.6806418", "0.67480105", "0.6745236", "0.6707552", "0.664179...
0.74176097
1
Gives figure new position and writes previous position Also calls placeFigure method
moveFigure(X, Y){ this.position = { lastPosX: this.position.currentX, lastPosY: this.position.currentY, currentX: X, currentY: Y }; this.isMoved = true; this.placeFigure(); whiteMoves = !whiteMoves; if (this.name == 'king' && this.position.currentX - this.position.lastPosX == 2){ this.getCage...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "placeFigure(){\n\t\tlet el = this.getCoords('new');\n\t\tel.innerHTML = `<img src=\"${this.texture}\" id=\"${this.ID}\">`;\n\t\tthis.getCageByMove().content = this;\n\t\tif (this.position.lastPosX != null && this.position.lastPosY != null){\n\t\t\tlet oldEl = this.getCoords('old');\n\t\t\toldEl.innerHTML = \"\";\n...
[ "0.7484358", "0.5871171", "0.58027387", "0.5767411", "0.57074535", "0.5704668", "0.57043236", "0.5633637", "0.56065875", "0.5514801", "0.54966885", "0.548713", "0.54727095", "0.54727095", "0.5469279", "0.54537636", "0.54514474", "0.5447755", "0.5437727", "0.5435367", "0.54043...
0.5906452
1
Function to create random sized bars between 10 310 px in height
function randomBars() { clearBars() number = barNumber.value /* if (!number) return alert('no number input') if (number > 101) return alert('number too large') */ for (let i = 0; i < number; i++) { let bar = document.createElement('div') bar.classList.add('viz-bar') vizBarCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomArrayGenerator()\n{\n const divsNum = Math.floor((window.innerWidth - 280)/barWidth)\n for(let i = 1; i <= divsNum; i++)\n {\n const newDiv = document.createElement(\"DIV\");\n let randomNum = getRandom(5, 700);\n newDiv.setAttribute(\"style\", `height: ${randomNum}px`);\n newDi...
[ "0.7758515", "0.73918545", "0.7251566", "0.7102018", "0.7084109", "0.7049293", "0.69047374", "0.67534274", "0.6730746", "0.6710187", "0.65901434", "0.65374064", "0.6502119", "0.6464079", "0.6353771", "0.6301523", "0.6281726", "0.6213258", "0.61963123", "0.6151669", "0.6134802...
0.7693064
1
serialize state to url anchor (url encode to avoid base64 charset limitations)
function save(state) { let serialized = btoa(window.unescape(encodeURIComponent(JSON.stringify(state)))); history.replaceState(null, null, '#' + serialized); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateURLState() {\n var menuState = layerMenu.getMenuState(),\n fullState = {};\n\n menuState = menuState.map(function(layer) {\n\n delete layer.element;\n\n layer.uri = layer.uri.replace(/%22/g,\"'\");\n\n return layer;\n\n });\n\n fullState[\"m\"] = menuState; //Data l...
[ "0.63292974", "0.5957554", "0.58763343", "0.58440685", "0.5826441", "0.5793878", "0.577106", "0.5757708", "0.5757708", "0.5757708", "0.5757708", "0.5757708", "0.5757708", "0.5757708", "0.5757708", "0.57051384", "0.5695906", "0.56653863", "0.5665294", "0.5663565", "0.55958", ...
0.6679071
0
First check whether the resource's relative path points to a file within the control folder. If so, preserve the folder structure in outdir. If not, check whether a resource's file name collides with any other resources file. If so returns a new file name otherwise return original name.
checkResourcePath(resourceRelativePath) { const resourceName = path.basename(resourceRelativePath); const resourceAbsPath = path.join(this.controlAbsPath, resourceRelativePath); const simplifiedRelativePath = path.relative(this.controlAbsPath, resourceAbsPath); let relativePathInOutDir; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static interpretRelativePathAsName (relativePath, contextPath) {\n if (relativePath.length < 2) {\n return;\n }\n\n const nameIndex = relativePath.length - 1;\n\n // Omit the name\n // Note: concat() and slice() have no side effects.\n const genPath = contextPat...
[ "0.5245385", "0.5116278", "0.507474", "0.50514185", "0.5031884", "0.4964477", "0.49639335", "0.48809955", "0.48465538", "0.4807245", "0.48016924", "0.479918", "0.4797141", "0.47769418", "0.47533795", "0.47378695", "0.47344106", "0.47249267", "0.47244963", "0.4708133", "0.4703...
0.74997056
0
Inspects `` tag to see if experimental version of demo CSS is loaded there.
_inspectLinkTag() { if (this.hStyleLoad) { this.hStyleLoad = this.hStyleLoad.release(); } if (this.hStyleInspectionTimeout) { clearTimeout(this.hStyleInspectionTimeout); this.hStyleInspectionTimeout = null; } this.hStyleInspectionTimeout = setTimeout(() => { const links = Arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspect(){\n var supportDOM2Core = document.implementation.hasFeature(\"Core\", \"2.0\");\n var supperDOM2Views = document.implementation.hasFeature(\"Views\", \"2.0\");\n var supportDOM2XML = document.implementation.hasFeature(\"XML\", 2.0);\n var supportDOM2CSS2 = document.implementation.has...
[ "0.57445574", "0.53561103", "0.5330093", "0.53054", "0.52279854", "0.5206441", "0.516852", "0.51345587", "0.5122698", "0.5110925", "0.5104728", "0.50413436", "0.5030095", "0.5004938", "0.5001136", "0.4978463", "0.49724802", "0.49724802", "0.49724802", "0.4965362", "0.4953507"...
0.5837655
0
This gives a tiny number of results per page on mobile.
get estimatedItemsPerPage() { return ppixiv.mobile? 18:50; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyPages(results) {\n var pages;\n if(results % 10 == 0){\n pages = results / 10;\n } else {\n pages = Math.floor(results / 10) + 1;\n }\n return pages;\n }", "function numPages()\r\n\t\t{\r\n\t\t\treturn Math.ceil(jsonArray.length / record...
[ "0.7001809", "0.6362369", "0.6329002", "0.63145566", "0.62869763", "0.6252504", "0.6237289", "0.6212714", "0.6212714", "0.61735433", "0.61704427", "0.6165101", "0.6165101", "0.61264104", "0.6071696", "0.60282797", "0.6005768", "0.5966818", "0.5905703", "0.5834326", "0.5814724...
0.71606624
0
Given a content selection ("all", "illust", "manga", "ugoira") and an ages selection, return the shorthand key for this combination, such as "i".
function contentKeyFor(content, ages) { let keys = { "all": "o", "illust": "i", "manga": "i" /* same as illust */, "ugoira": "u" }; let contentKey = keys[content]; // Append * for r18 and ** for r18g. if(ages == "r18") contentKey += "*"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sigegKawi(aksara)\n{\n var retval = ''\n\n if (aksara == 'ng' || aksara == 'nk' || aksara == ' basa' || aksara == ' yasmi' || aksara == 'r' || aksara == ' omahku' || aksara == ' omahmu' || aksara == 'ra' || aksara == 'h') {\n retval = KAWI['+' + aksara]\n } else {\n retval = KAWI[ak...
[ "0.54042304", "0.53117025", "0.5295256", "0.51805544", "0.5107959", "0.4976626", "0.48757312", "0.4836403", "0.4757129", "0.4757129", "0.4757129", "0.4757129", "0.4757129", "0.4757129", "0.4757129", "0.4757129", "0.47195876", "0.46992669", "0.46919027", "0.46917227", "0.46914...
0.7230266
0
Given a mode ("daily") and an ages selection ("r18"), return the combined mode, eg. "daily_r18".
function modeWithAges(mode, ages) { if(ages == "r18") mode += "_r18"; // daily_r18 else if(ages == "r18g") mode += "_r18g"; // daily_r18g // Seriously, guys? if(mode == "daily_ai_r18") mode = "daily_r18_ai"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMode(mode) {\r\n // City bike racks are recognized by ID\r\n if (Number.isInteger(parseInt(mode))) {\r\n return \"Bysykkel\";\r\n }\r\n\r\n // Convert to string\r\n mode += \"\";\r\n\r\n switch (mode) {\r\n case \"onstreetBus\":\r\n return \"Buss\";\r\n ...
[ "0.60919553", "0.5177551", "0.51264524", "0.51075405", "0.5072005", "0.5010338", "0.49786192", "0.48406827", "0.48393884", "0.4831558", "0.47807962", "0.47537228", "0.47519833", "0.47348467", "0.46957827", "0.4650741", "0.461239", "0.46087024", "0.4592645", "0.45800182", "0.4...
0.8294205
0
Cleans up the timestamp and makes it in the format of 1:30PM
function cleanTime(time) { var shortTime = time.substr(11,5); var mins = shortTime.substr(2,5); var hour = parseFloat(shortTime.slice(0,2)); var ampm = 'AM'; // Assume that 12 means noon, not midnight. if (hour == 12) { ampm = 'PM'; } else if (hour >= 12) { hour -= 12; ampm = 'PM'; } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatTime(timestamp) {\n var date = (timestamp) ? new Date(timestamp) : new Date(),\n hours = date.getHours() || 12,\n minutes = '' + date.getMinutes(),\n ampm = (date.getHours() >= 12) ? 'pm' : 'am';\n\n hours = (hours > 12) ? hours - 12 : hours;\n minutes = (mi...
[ "0.66741335", "0.6665443", "0.6617602", "0.66059095", "0.6595822", "0.6565072", "0.65545213", "0.648921", "0.64655346", "0.64184976", "0.6404987", "0.64040923", "0.63873374", "0.63601077", "0.6346961", "0.6333821", "0.63336074", "0.6327223", "0.6322686", "0.63091105", "0.6276...
0.68819165
0
Using the parsing method shown Define our parser class. It takes in some text, and then you can call "linkifyURLs", or one of the other methods, and then call "getHTML" to get the fully parsed text back as HTML!
function twitterParser(text) { var html = text; var urlRegex = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; var hashTagRegex = /#([^ ]+)/gi; var atTagRegex = /\@([a-z]+)/ig; this.linkifyURLs = function() { html = html.replace(urlRegex, '<a href="$1">$1</a>');...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static parse(text) {\n let links = {};\n // First, sanitize any HTML\n text = text.replace('<', '&lt;').replace('>', '&gt;');\n // Then, get the list of references, removing them from the text\n text = text.replace(this.REGEX_REF, (_, k, v) => {\n links[k] = v;\n ...
[ "0.7294874", "0.6741172", "0.66942334", "0.66942334", "0.6290382", "0.62781405", "0.6237439", "0.6219379", "0.62089396", "0.6189558", "0.6189558", "0.6189558", "0.6189558", "0.61588895", "0.6156911", "0.61557525", "0.615413", "0.6120657", "0.60639286", "0.59387946", "0.593646...
0.6968005
1
Given an form and an element name, returns the uppercased, trimmed value of that element
function cleanupElementValue( kualiForm, name ) { var element = kualiForm.elements[ name ]; if ( typeof element == 'undefined' ) { alert( 'undefined element "' + name + '"' ); } // element.value = element.value+''; // // element.value = element.value.toUpperCase().trim(); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function to_uppercase(){\n var numero = document.forms[0].elements.length;\n for(a=0;a<numero;a++) {\n if(document.forms[0].elements[a].type == 'text' || document.forms[0].elements[a].type == 'textarea')\n document.forms[0].elements[a].value = document.forms[0].elements[a].value.toUpperCase...
[ "0.6434275", "0.64053285", "0.6355853", "0.6269748", "0.60285395", "0.5968242", "0.5932739", "0.5932739", "0.5914622", "0.5853952", "0.5777224", "0.5734222", "0.5722563", "0.56753105", "0.56711066", "0.56462854", "0.55920035", "0.55645096", "0.55575526", "0.5552916", "0.55365...
0.72663754
0
Clears the value of the given target.
function clearTarget(kualiForm, targetBase) { setTargetValue(kualiForm, targetBase, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearThis(target) {\n\ttarget.value= \"\";\n}", "function clear(target){\r\n\t\t$('input,select,textarea', target).each(function(){\r\n\t\t\tvar t = this.type, tag = this.tagName.toLowerCase();\r\n\t\t\tif (t == 'text' || t == 'password' || tag == 'textarea')\r\n\t\t\t\tthis.value = '';\r\n\t\t\telse if...
[ "0.724486", "0.7112391", "0.70050836", "0.68998647", "0.67597985", "0.66591346", "0.6426792", "0.6426792", "0.61990845", "0.61982375", "0.6186915", "0.61155", "0.60837835", "0.60505885", "0.60478115", "0.6047342", "0.60199434", "0.5989474", "0.5986174", "0.5962722", "0.594312...
0.72171044
1
delete all renderers in cache
purge () { for (const key of Object.keys(this.renderers)) { this.del(key); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroyTextureCache() {\n var key;\n for (key in TextureCache) {\n TextureCache[key].destroy();\n }\n for (key in BaseTextureCache) {\n BaseTextureCache[key].destroy();\n }\n}", "function destroyTextureCache() {\n var key;\n for (key in TextureCache) {\n Texture...
[ "0.7154017", "0.7154017", "0.7147253", "0.7147253", "0.71388996", "0.71388996", "0.7126249", "0.7126249", "0.70938396", "0.70938396", "0.70789087", "0.70789087", "0.70789087", "0.70789087", "0.70644724", "0.70644724", "0.70644724", "0.70644724", "0.69949096", "0.69949096", "0...
0.8169614
0
Obtain the local shared object for the Access Enabler.
function getAccessEnabler() { return document.getElementById(AccessEnablerID); ​}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadAccess() {\n const trimmedObjectApiName = this.removeWhitespaces(this.apiName);\n\n return isSObjectAccessible({ apiName: trimmedObjectApiName })\n .then(data => {\n this.isAccessible = data;\n return this.isAccessible;\n })\n .catch(...
[ "0.54502845", "0.52816486", "0.52474415", "0.52474415", "0.5243371", "0.5204717", "0.5186004", "0.51723933", "0.5163229", "0.51394916", "0.51200825", "0.5120069", "0.5113752", "0.509261", "0.5091369", "0.5085488", "0.5085338", "0.5084045", "0.5083709", "0.5018796", "0.5013255...
0.5503973
0
getMinutes(): Generates current minute. Fixes minutes < 10 to have a 0 in front of it. e.g. "0" + 6 = ':06'
function getMinutes(date) { var clockMinutes = date.getMinutes(); if (clockMinutes < 10) { clockMinutes = "0" + clockMinutes; } return clockMinutes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFormattedMinutes() {\n //\n var secondsLeft = totalSeconds - secondsElapsed;\n \n var minutesLeft = Math.floor(secondsLeft / 60);\n \n var formattedMinutes;\n \n if (minutesLeft < 10) {\n formattedMinutes = \"0\" + minutesLeft;\n } else {\n formattedMinutes = minutesLeft;...
[ "0.72437483", "0.7218268", "0.71263665", "0.7105271", "0.7033102", "0.7028192", "0.70215786", "0.70121557", "0.69487643", "0.6942509", "0.68684715", "0.6805572", "0.680434", "0.67805296", "0.67726314", "0.67690325", "0.6720459", "0.6720459", "0.6720459", "0.6680586", "0.66179...
0.7481858
0
updateMessage(clockHours): Given current hour of the day, generates proper greeting message based on time of day.
function updateMessage(clockHours) { console.log(clockHours); var message = ""; switch(clockHours) { // 12 am - 11 am case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greetingMessage(){\n var currentTime = new Date();\n var currentOffset = currentTime.getTimezoneOffset();\n\n var ISTOffset = 330; // IST offset UTC +5:30 \n var ISTTime = new Date(currentTime.getTime() + (ISTOffset + currentOffset)*60000);\n // ISTTime now represents the time in IST coordinates\n\...
[ "0.676644", "0.6442293", "0.6264792", "0.6264792", "0.6234635", "0.6206792", "0.6204792", "0.6201767", "0.6190006", "0.6145281", "0.61309683", "0.6117473", "0.6066892", "0.60292864", "0.5974893", "0.5967299", "0.59137416", "0.5884092", "0.5840505", "0.58272594", "0.5810847", ...
0.8273138
0
Replace script tags inside given DOM element with executable ones. Will also check children recursively and replace any found script tags in same manner.
function replaceScriptNodes(node) { if (node.tagName === "SCRIPT") { node.parentNode.replaceChild(buildExecutableNode(node), node) } else { var children = node.childNodes if (children && children.length) { for (var i = 0; i < children.length; i++) { replaceScriptNodes(children[i]) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replaceScriptNodes(node) {\r\n\t\tif (node.tagName === \"SCRIPT\") {\r\n\t\t\tnode.parentNode.replaceChild(buildExecutableNode(node), node);\r\n\t\t} else {\r\n\t\t\tvar children = node.childNodes;\r\n\t\t\tif (children && children.length) {\r\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t...
[ "0.74196947", "0.7356759", "0.73542506", "0.73542506", "0.6461649", "0.61673295", "0.61673295", "0.61673295", "0.61673295", "0.6150798", "0.59246624", "0.5857501", "0.5710751", "0.5710751", "0.5710751", "0.5710751", "0.56116736", "0.56116736", "0.5533468", "0.54189086", "0.53...
0.74280983
1
Export this load balancer
export() { return { loadBalancerArn: new cdk.CfnOutput(this, 'LoadBalancerArn', { value: this.loadBalancerArn }).makeImportValue().toString() }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "export() {\n this.call(\"beforeExport\");\n window.location.href = this._element.toDataURL(\"image/png\").replace(\"image/png\", \"image/octet-stream\");\n this.call(\"afterExport\");\n }", "async export(options = {}) {\n return await this.apiCall.get(this.endpointPath('export'), o...
[ "0.55306906", "0.5253647", "0.5219443", "0.5195583", "0.5178006", "0.51051223", "0.5100004", "0.50763553", "0.49867824", "0.48763615", "0.4854366", "0.4846441", "0.48358396", "0.48171", "0.4805319", "0.47866154", "0.47854972", "0.47821432", "0.4738099", "0.47300404", "0.47182...
0.6531191
0
Return the given named metric for this Network Load Balancer
metric(metricName, props) { return new cloudwatch.Metric(Object.assign({ namespace: 'AWS/NetworkELB', metricName, dimensions: { LoadBalancer: this.fullName } }, props)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLossOrMetricName(fn) {\n util.assert(fn !== null, \"Unknown LossOrMetricFn \" + fn);\n if (typeof fn === 'string') {\n return fn;\n }\n else {\n var fnName = void 0;\n for (var _i = 0, _a = Object.keys(losses_3.lossesMap); _i < _a.length; _i++) {\n var key = ...
[ "0.5784655", "0.5776547", "0.5717881", "0.55477387", "0.5451434", "0.5311628", "0.51870567", "0.5159709", "0.51509845", "0.50965726", "0.50084037", "0.4991524", "0.49856564", "0.49796835", "0.48813534", "0.48512384", "0.48219877", "0.4787204", "0.4750297", "0.47133142", "0.46...
0.6405656
0
The number of load balancer capacity units (LCU) used by your load balancer.
metricConsumedLCUs(props) { return this.metric('ConsumedLCUs', Object.assign({ statistic: 'Sum' }, props)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCapacity()\n\t{\n\t\treturn this.capacity;\n\t}", "getCapacity(type) {\n if (_.isUndefined(type) || _.includes(this.limit, type))\n return this.capacity;\n return 0;\n }", "async getRemainingCapacity() {\n try{\n const resp = await this._chocoRequest(\"getRemainingCapac...
[ "0.5820824", "0.57332253", "0.5713617", "0.5668916", "0.5456355", "0.54418135", "0.53848475", "0.53841007", "0.5362973", "0.53626215", "0.5336154", "0.53215617", "0.5318461", "0.5318461", "0.53054017", "0.528666", "0.52355903", "0.5206618", "0.5195016", "0.5195016", "0.519453...
0.58305836
0
The total number of reset (RST) packets sent from a client to a target. These resets are generated by the client and forwarded by the load balancer.
metricTcpClientResetCount(props) { return this.metric('TCP_Client_Reset_Count', Object.assign({ statistic: 'Sum' }, props)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "metricTcpTargetResetCount(props) {\n return this.metric('TCP_Target_Reset_Count', Object.assign({ statistic: 'Sum' }, props));\n }", "function serveReset(req, res) {\n visitCounter = 0;\n sendHtmlResponse(HttpStatus.OK, messages.COUNTER_RESET, res);\n}", "metricTcpElbResetCount(props) {\n ...
[ "0.6073309", "0.54550636", "0.5332524", "0.5103357", "0.5068308", "0.4991145", "0.4931711", "0.49040306", "0.4880729", "0.48116514", "0.48017585", "0.47999564", "0.47935015", "0.47881824", "0.47766203", "0.47583058", "0.4725909", "0.47258812", "0.47217754", "0.47187084", "0.4...
0.5841135
1
The total number of reset (RST) packets generated by the load balancer.
metricTcpElbResetCount(props) { return this.metric('TCP_ELB_Reset_Count', Object.assign({ statistic: 'Sum' }, props)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRetryCount() {\n return internal.retryCount;\n }", "metricTcpTargetResetCount(props) {\n return this.metric('TCP_Target_Reset_Count', Object.assign({ statistic: 'Sum' }, props));\n }", "async getPacketRelayStats()\n {\n\n \n let minedTransactions = await t...
[ "0.5800377", "0.55900913", "0.5401661", "0.5390997", "0.5358983", "0.52627844", "0.5248602", "0.52156556", "0.52108145", "0.5206936", "0.517233", "0.517119", "0.5159037", "0.5126813", "0.51159835", "0.5103661", "0.5103661", "0.5096125", "0.5083125", "0.5065913", "0.5061003", ...
0.56521475
1
The total number of reset (RST) packets sent from a target to a client. These resets are generated by the target and forwarded by the load balancer.
metricTcpTargetResetCount(props) { return this.metric('TCP_Target_Reset_Count', Object.assign({ statistic: 'Sum' }, props)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "metricTcpClientResetCount(props) {\n return this.metric('TCP_Client_Reset_Count', Object.assign({ statistic: 'Sum' }, props));\n }", "function serveReset(req, res) {\n visitCounter = 0;\n sendHtmlResponse(HttpStatus.OK, messages.COUNTER_RESET, res);\n}", "metricTcpElbResetCount(props) {\n ...
[ "0.5713566", "0.5362633", "0.53486764", "0.50818604", "0.5050519", "0.4990917", "0.49701235", "0.49320772", "0.4913788", "0.48927104", "0.48742688", "0.4826919", "0.48245853", "0.4787815", "0.4753713", "0.4739721", "0.47258407", "0.47189", "0.4712781", "0.46929875", "0.464370...
0.6170381
0
Add a class to a node
function addClass(node, name) { node.className += " " + name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addClass(node, className) {\n if (hasClass(node, className)) node.className += \" \" + className;\n}", "function addClass(node, name) {\n if(node.classList) {\n node.classList.add(name);\n }\n else {\n // kind of hacky \n node.className += ' ' + name;\n }\n}", "func...
[ "0.76412547", "0.7480422", "0.7441692", "0.7355224", "0.72492766", "0.72247946", "0.71678555", "0.7157776", "0.7124717", "0.7093456", "0.7082631", "0.7082631", "0.6914061", "0.6791004", "0.6784799", "0.67839795", "0.6689422", "0.6682602", "0.6680154", "0.66640615", "0.6614135...
0.76141423
1
Does this node have a class "name" ?
function hasClass(node, name) { var regex = new RegExp(".*" + name + ".*") return node.className.match(regex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasClass(element, name) {\n var list = typeof element == 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n }", "function is_class_contain(node, cls)\r\n{\r\n\treturn (node.className.search(\"(\\\\s|^)\" + cls + \"(\\\\s|$)\") != -1);\r\n}", "fu...
[ "0.7484516", "0.74794215", "0.74426466", "0.74426466", "0.7375141", "0.7375141", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", "0.7363003", ...
0.8347621
0
Move a "Show All Of Today" link next to the category title, so it takes less space.
function moveShowAllOfToday(icon) { var tHead = icon.parentNode; var parentTable = tHead.parentNode.parentNode.parentNode; var container = parentTable.parentNode; var showAllOfToday = parentTable.nextSibling; if (!showAllOfToday) { return 0; } // Clone the original link and modify it. var SAOTClone = sho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCategory(allCategories) {\n const result = allCategories.map(\n ({ categoryName }) => ` \n <tr>\n <td>${categoryName}</td>\n <td data-name='${categoryName}'><i class=\"btn fas fa-trash-alt\"></i></button></td>\n </tr>`\n );\n if (CategoryToShow) {\n CategoryT...
[ "0.56898004", "0.5534268", "0.5353316", "0.5284929", "0.5123078", "0.51152927", "0.5065149", "0.5021963", "0.5020132", "0.4956234", "0.49547765", "0.49106514", "0.48783243", "0.486546", "0.48472518", "0.48218715", "0.48065296", "0.47896296", "0.4772721", "0.47598845", "0.4741...
0.7132406
0
Do one simulation step and display it.
function step() { simulation.update() display_simulation_state() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stepClick() {\r\n\tstopSimulation();\r\n\tsingleSimulationStep();\r\n}", "function step(){\n player.step();\n\n //draw everything\n draw();\n }", "step() {\n\t}", "step() {\n }", "step() {\n this.game.step();\n this.render();\n }", "step () {}", "fun...
[ "0.67158765", "0.6573551", "0.6557623", "0.6541982", "0.6513784", "0.6509862", "0.6437801", "0.63707834", "0.63406557", "0.63211405", "0.62989265", "0.6288298", "0.6228452", "0.6164732", "0.61510307", "0.6123709", "0.6109941", "0.6103313", "0.6102606", "0.60896623", "0.607017...
0.80775344
0
Start simulation. This includes parsing the map, displaying everything and finally initiating the game loop.
function start_simulation() { const entity_map = translator.parse_initial_map(map) num_map_cols = entity_map[0].length simulation.setup_tile_map(entity_map) display.update_speed(step_duration) display_simulation_state(false) setTimeout(loop, step_duration) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startSimulation() {\n\t\t// Clear outputs\n\t\tclock = 0;\n\t\tObject.keys(outputs).forEach(function (o) {\n\t\t\toutputs[o].value = 0;\n\t\t});\n\t\tpickupsCompleted = 0;\n\t\tgrossProfit = 0;\n\t\tdisposeObjects(journeys);\n\n\t\tsimulationRunning = true;\n\t}", "function startGame() {\n mgModel.move...
[ "0.6706874", "0.66480815", "0.65963954", "0.65680844", "0.64445573", "0.6404504", "0.638453", "0.6307072", "0.63002336", "0.6292194", "0.62862146", "0.6279364", "0.6273307", "0.62582856", "0.62467366", "0.6227485", "0.6218618", "0.62135893", "0.62093836", "0.6206362", "0.6195...
0.85996723
0
Changes the frame to the QR displaying of the conodes.
function displayQrOfConode() { pageObject.showModal("shared/pages/qr-code/qr-code-page", { textToShow: Convert.objectToJson(conode) }, () => { }, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawQrcode () {\n var qrcode = new QRCode(\"qrcode\", {\n text: 'http://' + host,\n colorDark : \"#000\",\n colorLight : \"#fff\"\n });\n }", "onQRPress() {\n this.showModal('qrScanner');\n }", "function show(canvas,barcodeName) {\n\n bw.render();\n\n ...
[ "0.65172946", "0.5776167", "0.55534226", "0.54099405", "0.53551066", "0.5334945", "0.53129804", "0.53128654", "0.53062534", "0.5298682", "0.5292007", "0.5253928", "0.5207365", "0.5192268", "0.51809466", "0.51809466", "0.51743025", "0.51729333", "0.51656485", "0.51620066", "0....
0.6443703
1
Deletes the last node in this list. Returns [v, newHead] where v is the value that was removed, and newHead is the new head of the list (possibly undefined). Arguments: prev is a reference to the previous node. If there is no previous node, then set prev to undefined. head is a reference to the first node in the list.
removeLast(prev = undefined, head = this) { // Base Case: When we have reached the end of the list if (this.next == undefined) { if (this != head) { prev.next = undefined; return [this.value, head]; } else { return [this.value, und...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeHead() {\n if (!this.head) {\n return undefined;\n }\n\n var removed;\n\n if (this.head === this.tail) {\n removed = this.head;\n this.head = null;\n this.tail = null;\n } else {\n removed = this.head\n this.head = this.head.next;\n }\n ...
[ "0.7080886", "0.6972885", "0.69637364", "0.6954175", "0.68816555", "0.6843342", "0.6817767", "0.6767643", "0.6760831", "0.6755365", "0.67198515", "0.67063576", "0.67006457", "0.6692253", "0.6676465", "0.66617775", "0.66424525", "0.66285104", "0.66280323", "0.6614618", "0.6612...
0.82009274
0
Deletes the first node with the specified value. It is an error if value is not found in the list. Returns the head of the new list, possibly undefined Arguments: prev is a reference to the previous node. If there is no previous node, then set prev to undefined. head is a reference to the first node in the list.
removeValue(value, prev = undefined, head = this) { // Base Case 1: When we have found the sought-after value if (this.value == value) { // Corner Case (A) and (B) if (this != head) { prev.next = this.next; return head; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(value) {\n // if the list is empty, return\n if (!this.head) return null;\n\n // if the node to delete is the head\n if (this.head.value === value) {\n this.head = this.head.next;\n } else {\n let prevElement = this.head;\n\n while (prevElement.next.value !== value) {\n ...
[ "0.7723678", "0.7616319", "0.75858533", "0.7284508", "0.7091695", "0.70443904", "0.70066214", "0.6991001", "0.69832045", "0.69691", "0.6910472", "0.68981415", "0.68557644", "0.6824813", "0.6773566", "0.67640686", "0.6746512", "0.6708495", "0.6699283", "0.6685135", "0.6679788"...
0.76872915
1
Finds and returns the smallest value in this list
findSmallest() { // Base Case: When we have reached the end of the list if (this.next == undefined) { return this.value; } // Recursive case else { var smallest = this.next.findSmallest(); if (this.value < smallest) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "min() {\n if (!this.length) {\n throw new Error(`Can't call .min() on an empty array`);\n }\n let minVal = this[0];\n for (let i = 1; i < this.length; i++) {\n if (this[i] < minVal) {\n minVal = this[i];\n }\n }\n return minV...
[ "0.75624", "0.7505462", "0.73494214", "0.73437005", "0.7330393", "0.7319775", "0.7319775", "0.7319775", "0.7267058", "0.723437", "0.72047466", "0.71633005", "0.714116", "0.71050465", "0.7099294", "0.70944625", "0.70828056", "0.7069425", "0.7053223", "0.70499516", "0.70144236"...
0.8117129
0
Sorts the list in ascending order. Returns the head of the new list.
sort() { // Base case if (this.next == undefined) { return this; } // Recursive case else { var smallest = this.findSmallest(); var sublist = this.removeValue(smallest); var sortedSublist = sublist.sort(); return sorte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sortList()\n {\n if(this.head == null)\n {\n console.log(\"list is empty\")\n }\n else{\n \n let prevtemp = this.head\n let temp = this.head\n\n while(prevtemp)\n {\n temp = prevtemp.next\n\n ...
[ "0.6538705", "0.6439705", "0.63222265", "0.63122064", "0.6243219", "0.62390673", "0.6232905", "0.6227885", "0.6226071", "0.6226071", "0.6226071", "0.6226071", "0.6180627", "0.6170875", "0.6167761", "0.6167761", "0.6167761", "0.61499584", "0.6126603", "0.6089212", "0.6086028",...
0.7091658
0
Modifies this this list by concatenating secondList to this list
concat(secondList) { if (this.next == undefined) { this.next = secondList; } else { this.next.concat(secondList); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extend(first, second) {\n for (var i = 0, n = second.length; i < n; ++i) {\n var item = second[i];\n if (item)\n first.push(item);\n }\n }", "add(other: ShapeList) {\n this.shapes = this.shapes.concat(other.shapes);\n th...
[ "0.6483208", "0.61523885", "0.6055791", "0.58887196", "0.5847749", "0.5828329", "0.5739283", "0.56795025", "0.55462056", "0.552585", "0.5435032", "0.5357288", "0.53532726", "0.53395694", "0.5334602", "0.5299514", "0.5299514", "0.5284292", "0.52833354", "0.52714425", "0.526577...
0.73577636
0
Writes text on the main canvas
drawText(text){ const ctx = this.tetrisCnvs.getContext("2d"); ctx.font = "30px Arial"; ctx.textAlign = "center"; ctx.fillStyle = "rgba(255, 255, 255, 0.3)"; ctx.fillRect(0, 0, 300, 600); ctx.fillStyle = "#666666"; ctx.fillText(text, 150, 250); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawText()\n\t{\n\t\t// Choose a width based on the character count\n\t\tvar w = chooseSize();\n\n\t\t// Draw the text\n\t\ttext = that.add('text', {\n\t\t\tw: w,\n\t\t\ttext: that.text,\n\t\t\tfont: that.font || style.font,\n\t\t\tcolor: style.color,\n\t\t\talign: style.align,\n\t\t\tdepth: depth + 1,\t\...
[ "0.7396615", "0.7268932", "0.7169362", "0.71389586", "0.7113529", "0.70758706", "0.70239806", "0.7000793", "0.6991848", "0.6977459", "0.69662946", "0.6949291", "0.69470936", "0.6932562", "0.69249403", "0.6923435", "0.6919681", "0.6909501", "0.68688244", "0.68379396", "0.68275...
0.7438518
0
FUNCTION FOR REQUEST TO THE QISCUS MULTICHANNEL SERVICE function to get free agent
async function freeAgent() { let data = qs.stringify({ source: 'qiscus', ignore_availability: '', channel_id: '', }); let url = process.env.BASE_URL + '/api/v1/admin/service/allocate_agent'; let config = { method: 'post', url: url, headers: { 'Content-Type': 'application/x-www-fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_agent () {\n\n results=[]; //output list\n\n\n\n if (DEBUG) {\n console.log (\"(1) create agent\");\n }\n\n reqwest({\n url: \"/node/\" + participant_id,\n method: 'post',\n type: 'json',\n success: function (resp) {\n if (DEBUG) {\n ...
[ "0.6157629", "0.6088384", "0.5945882", "0.58920455", "0.57342833", "0.5572763", "0.55427516", "0.5430424", "0.5355998", "0.53287065", "0.5305294", "0.527113", "0.52657884", "0.5253388", "0.5219606", "0.51617634", "0.5148362", "0.5142386", "0.512022", "0.5100326", "0.51001704"...
0.7556638
0
function to assign agent to a room
async function assignAgent(agent_id, room_id) { let data = qs.stringify({ room_id: room_id, agent_id: agent_id, max_agent: '1', }); let url = process.env.BASE_URL + '/api/v1/admin/service/assign_agent'; let config = { method: 'post', url: url, headers: { 'Content-Type': 'applicat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeRoom(room) {\n\troom_manager.curr_room.clear();\n\troom_manager.curr_room = room;\n\troom_manager.curr_room.create();\n}", "@action\n enterRoom(room) {\n // room = room + \"@\" + ConstantsObject.conferenceServerUrl;\n console.log(\"%c room \", \"background: lime; color: black\", room);\n ...
[ "0.63722616", "0.6291183", "0.6116552", "0.6097192", "0.60790706", "0.6070616", "0.6044397", "0.6041903", "0.60308826", "0.60223347", "0.60022396", "0.59670883", "0.5879361", "0.58751154", "0.586594", "0.58593684", "0.5852426", "0.5821399", "0.5815881", "0.57888794", "0.57775...
0.7159437
0
Like `template()` but returns an expression, not an expression statement.
function expression (input: string): Template { const fn: Template = template(input); return function (ids: TemplateIds): Node { const node: Node = fn(ids); return node.expression ? node.expression : node; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTemplate(template, value) {\n try {\n return eval('`' + template + '`;')\n } catch (err) {\n return template;\n }\n}", "function doExpr(template,env) {\n // We only accept one argument, so extract and evaluate it.\n var arglist = template.targs;\n // No argument is ...
[ "0.6769794", "0.67656296", "0.67500067", "0.67500067", "0.6742138", "0.6609203", "0.6593083", "0.6593083", "0.6544396", "0.647187", "0.6460671", "0.6357311", "0.6327738", "0.6316238", "0.6059036", "0.6000496", "0.5990408", "0.5983742", "0.59160984", "0.58796096", "0.58790845"...
0.7625712
0
Normalize the plugin options.
function normalizeOpts (opts: PluginOptions): PluginOptions { if (opts[$normalized]) { return opts; } // fill in the default handled labels if not specified if (!opts.labels) { opts.labels = ["error", "warn", "info", "debug", "trace"]; } // add extra labels if specified ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _normalizeOptions (options) {\n return options\n }", "function normalizeOptions(options) {\n\n\t// convert string values for API parameters to native types\n\tif (typeof options.fromCache === \"string\") {\n\t\toptions.fromCache = options.fromCache.match(/^on$/i) ? true : false;\n\t}\n\n\tif (typeof o...
[ "0.7916853", "0.7147067", "0.6893624", "0.67935365", "0.67484283", "0.65799105", "0.64664984", "0.640562", "0.64007795", "0.6375056", "0.6360843", "0.6348227", "0.6346217", "0.61389375", "0.6120039", "0.6095143", "0.6024535", "0.6023825", "0.6010757", "0.59576154", "0.5923723...
0.7620318
1
Collect the metadata for a given node path, which will be made available to logging functions.
function collectMetadata (path: NodePath, opts: PluginOptions): Metadata { const filename: string = path.hub.file.opts.filename; const filepath: string = fspath.resolve( process.cwd(), path.hub.file.opts.filename ); const line: number = path.node.loc.start.line; let indent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMetadata (filePath) {\n var md = {};\n var p = path.dirname(filePath);\n var initialP = p;\n\n // Walk up the directory path, merging together all existing metadata files\n // with child data overwriting parent's\n while (p != '/' && p != '' && p != '.') {\n var pmd = metadataHas...
[ "0.54206246", "0.52361846", "0.52238446", "0.5145033", "0.51197803", "0.5076312", "0.49999934", "0.4981011", "0.49444014", "0.49348548", "0.49194703", "0.4909403", "0.49045816", "0.48784167", "0.48637387", "0.48506388", "0.48306036", "0.48211354", "0.4811328", "0.480145", "0....
0.64058006
0
Last example The built in function 'alert' is prebuilt into JavaScript, but is somewhat set up similarly:
function alert (/*some code*/) { //some code }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAlert() {\n alert(\"This is an alert.\");\n}", "function testalert() {\n alert(\"soweit ok\");\n }", "function sc_alert() {\n var len = arguments.length;\n var s = \"\";\n var i;\n\n for( i = 0; i < len; i++ ) {\n s += sc_toDisplayString(arguments[ i ]);\n }\n\n return ale...
[ "0.7470449", "0.7459762", "0.74515367", "0.74065346", "0.74023736", "0.73941624", "0.7347635", "0.7281094", "0.725299", "0.7207175", "0.72052413", "0.7202124", "0.7136842", "0.7128486", "0.71106887", "0.7103699", "0.7038658", "0.70282227", "0.69814926", "0.6979654", "0.697401...
0.760818
0