query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Retrieve a list of all alarms
getAlarms(where = { id: undefined, addresses: [] }) { const internalWhere = { enabled: 1, }; if (where.addresses && where.addresses.length) { internalWhere.address = { [Op.in]: where.addresses, }; } if (where.id) { internalWhere.id = where.id; } return this....
[ "async function listAlarms () {\n return devices[0].alarmClockService().ListAlarms().then(alarms => {\n log.debug('Got alarms %j', alarms)\n mqttClient.publish(config.name + '/alarms', JSON.stringify(alarms), { retain: false })\n })\n}", "function getAlarms() {\n DataSourceDwr.getAlarms(currentDsId,wr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
readonly attribute boolean canDeleteMessages; // can't delete from imap readonly
get canDeleteMessages() { return true; }
[ "get isDeleted() {\r\n return this.hasFlag(MessageFlag.DELЕTЕD);\r\n }", "get isDelete() {\r\n return this.subTypes.includes('dialog_messages_delete');\r\n }", "markMessagesDeletedByIDs(aMessageIDs) {\n // When marking deleted clear the folderID and messageKey so that the\n // indexin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function `Play`(print all block) from `top` block to some condition(reach some `height` or `limit`)
async function play (options) { let { height, limit, json } = options limit = parseInt(limit) height = parseInt(height) try { const client = await initChain(options) await handleApiError(async () => { // Get top block from `node`. It is a start point for play. const top = await client.topBl...
[ "function printTopBlock() {\n printLine('<span class=\"green\">==================</span>');\n printLine('<span class=\"cyan\">&nbsp;dhruv bhanushali</span>');\n printLine('<span class=\"green\">==================</span>');\n printLine(`<strong>software developer and technical writer</strong>`);\n pri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generates noise/static visual towards the end of the song/row
function noiseAfterSong(songNum, songDuration) { for (var currX = songDuration; currX < width; currX++) { for (var currY = songNum*colHeight; currY < (songNum*colHeight)+colHeight; currY++) { var currIndex = (currX + currY * width) * 4; var r = pixels[currIndex + 0]; var g = pixels[currIndex ...
[ "function onRandom() {\r\n paintNoise();\r\n}", "function four() {\n if (noise) {\n let audio = document.getElementById(\"clip4\");\n audio.play();\n }\n noise = true;\n bottomRight.style.backgroundColor = \"lightskyblue\";\n}", "function draw() {\n\tif (rowRemoved && soundIsOn) {\n\t\trowPopAudio....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rescales the paper. Parameters: amount: The ratio between the rescaled and current paper (e.g. '2.0' makes everything appear two times bigger) x, y: Coordinates of the point that shall remain stable, given by pixel coordinates relative to the top left corner of the viewport.
function paper_scale(amount, x, y) { var scale = V(paper.viewport).scale().sx; var newScale = scale*amount; paper.scale(newScale, newScale); var ox = paper.options.origin.x; var oy = paper.options.origin.y; var dx = (newScale - scale)/scale * (x - ox); var dy = (newScale - scale)/scale * (y - oy); pape...
[ "scale(scaleAmount) {\n\n this.w *= scaleAmount;\n this.h *= scaleAmount;\n this.x = this.center.x - this.w / 2;\n this.y = this.center.y - this.h / 2;\n\n this.calculateVectorsAndSetShape();\n this.resetFixture();\n }", "function zoom(amount) {\n\tif (blockSize + amou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds code to run in the machine right after the docker daemon has been started.
_setAfterDaemonStarted () { const code = this._opts.AfterDaemonStarted; if (!code || !code.length) { return; } this ._getLaunchConfigCode() .push(code.join('')); }
[ "function AfterSelfExec() {\n}", "async function setupDocker(name = 'Docker') {}", "function setupDockerSwarm() {\n\n const doDockerSwarmSetup = require('./setup_docker_swarm.js');\n doDockerSwarmSetup(lapi, linode_servers, ssh_connector, hosts_to_build, (err) => {\n if (err) {\n hardFail(err)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start the recursive build process with a clone of the points array and null points filtered out (3873)
function startRecursive() { var points = grep(series.points || [], function (point) { // #4390 return point.y !== null; }); series.kdTree = _kdtree(points, dimensions, dimensions); }
[ "getEmptyBorderPoints() {\n\n let empties = [];\n let emptiesPlayer0 = [];\n let emptiesPlayer1 = [];\n let piecesVisited = [];\n this.cachedPiecePointsTouchingEmpty = {};\n this.cachedPiecesThatArentBridges = [];\n this.cachedPiecesThatAreBridges = [];\n\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
helper for generating default HTML
function defaultHtml (incomingData) { var data = assign({ charset: 'utf-8', metaViewport: true, html: '', relative: false }, incomingData) var sep = data.relative ? '' : '/' var result = ['<!doctype html>'] var add = function () { result.push.apply(result, arguments) } add('<head>') ...
[ "function generateAndAppendHTML() {\n\n }", "function buildHTML() {\r\n\t\treturn;\r\n\t}", "get markup() {}", "function defaultTemplate(context) {\n function el(name, attrs, children) {\n var element = document.createElement(name);\n Object.keys(attrs).forEach(function(attr) {\n element.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isValidBoard returns true if the board satisfies sudoku constraints
isValidBoard() { for (let row = 0; row < 9; row++) { for (let column = 0; column < 9; column++) { const cellValue = this.getCell(row, column); const validValues = this.getValidPossibleValues(row, column, true); if (cellValue && !validValues.has(cellValue)) { return false; ...
[ "function IsValid(board) {\n\t\n\t// Check each column\n\tfor(var i = 0; i < board.length; i++) {\n\t\tvar column = board[i];\t\n\t\tvar table = {};\n\t\tfor(var j = 0; j < column.length; j++) {\n\t\t\tvar num = column[j];\n\t\t\t\n\t\t\tif(num != \" \" && table[num])\n\t\t\t\treturn false;\n\t\t\ttable[num] = 1;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Slack user id from Youtrack user id by matching on email.
getSlackIdFromYoutrackId(youtrackId) { // Try to find slack user with email that starts with youtrack id let slackUser = _.find( this.slackUsers, user => _.startsWith(user.profile.email, `${youtrackId}@`) && !user.deleted, ); // If not found, also try to find email with only first name ...
[ "function getUserID(email) {\n for (let id in users) {\n if (users[id].email === email) {\n return users[id].id;\n }\n }\n}", "function findUserId(email) {\n for (let userId in users) {\n if (email === users[userId].email) {\n return userId;\n }\n }\n return null;\n}", "static getUser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function called when the client submits the sensortype reference removal
async function submitRemoveSensorTypeReference() { let returnMessage = await UC.jsonFetch( "https://dat2c1-3.p2datsw.cs.aau.dk/node0/admin/removesensortypereference", [ new UC.FetchArg("username", sessionStorage.getItem("username")), new UC.FetchArg("password", sessionStorage.getItem...
[ "async function removeSensorType() {\n let returnMessage = await UC.jsonFetch(\n \"https://dat2c1-3.p2datsw.cs.aau.dk/node0/admin/removesensortype\", [\n new UC.FetchArg(\"username\", sessionStorage.getItem(\"username\")),\n new UC.FetchArg(\"password\", sessionStorage.getItem(\"pass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a link suitable for sharing
getShareLink(kind = SharingLinkKind.OrganizationView, expiration = null) { const dependency = this.addBatchDependency(); return this.getShareable().then(shareable => { dependency(); return shareable.getShareLink(kind, expiration); }); }
[ "getShareLink(kind, expiration = null) {\r\n // date needs to be an ISO string or null\r\n const expString = expiration !== null ? expiration.toISOString() : null;\r\n // clone using the factory and send the request\r\n return this.clone(SharePointQueryableShareable, \"shareLink\").postC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function akan mereturn jarak spasi antar karakter 'o' dengan karakter 'x' yang terdekat. Contoh, jika arr adalah ['x', ' ', 'o', ' ', ' ', 'x'], maka jarak terdekat dari 'o' ke 'x' adalah 2. Jika tidak ditemukan 'x' sama sekali, function akan mereturn nilai 0.
function targetTerdekat(arr) { // you can only write your code here! let a = 0; let b = 0; let tampung = 0; let arrX = []; if(arr.indexOf('x') === -1){ return 0; } else{ for(var i = 0; i < arr.length; i++){ if(arr[i] === 'x'){ a = i; ...
[ "function targetTerdekat(arr) {\n var posisiO = 0;\n var posisiX = 0;\n var jarak_terdekat_sementara = arr.length;\n for(var i =0 ; i < arr.length ; i++){\n if(arr[i] === \"o\"){\n posisiO = posisiO + i;\n }\n }\n for(var j = 0 ; j < arr.length ; j++){\n if(arr[j] === \"x\"){\n posisiX = po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes all the hooks in the `hook` stack, an returns whether they allow the command to continue (used in pre hooks).
function hook (hook, args) { var allows = true; for (var i = 0; i < Hooks[hook].length; i++) { if (Hooks[hook][i].callback(game, args) === false) { allows = false; } } return allows; }
[ "function _runHook(type, hook, args) {\n var handlers = STORAGE[type][hook];\n if (!handlers) {\n return type === 'filters' ? args[0] : false;\n }\n var i = 0,\n len = handlers.length;\n if (type === 'filters') {\n for (; i < len; i++) {\n args[0] = handlers[i]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear the Result Section
function clearResultSec() { resultSec.html(""); searchMsg.html(""); }
[ "function clear() {\n\t // reset current state for next data\n\t _result = {};\n\t _errors = {};\n\t _summary = true;\n\t }", "function clearResult() {\n showResult('');\n }", "function clearResult() {\n $(\"#resultEl\").html(\"\");\n }", "function clearResultTable() {\n resultTabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create sprint details window
function createSprintInfoWindow(name, sprint_data) { if(windows.get(name) == undefined) { let window = new BrowserWindow({ width : 400, height : 700, parent : win, center : true, title : 'Sprint Details' }) window.webContents.on('did-finish-load', () => { window.webCo...
[ "function storeIssuePrintPreview(issueId)\n{\n window.open(\"procurement/print/storeIssueDialog.jsp?operationType=find&output=HTML&issueId=\" + issueId,\n \"Store Issue Print Preview\",\n \"menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes\");\n} //End of function storeIssuePrintPrevie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the model specified by modelHandle.
function removeModel(modelHandle) { if (allModels[modelHandle]) { var entryToRemove = document.querySelector('option[value="' + modelHandle + '"]'); currentModelSelect.remove(entryToRemove.index); scene.remove( allModels[modelHandle] ); delete allModels[modelHandle]; } }
[ "removeModel(model){\n let index = this._models.indexOf(model);\n if(index > -1){\n this._models.splice(index, 1);\n }\n }", "removeModel(model){\n const index = this.findModel(model);\n //removing model number\n this.removeIndex(index);\n }", "onDelete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the user's scopes from the JWT payload.
function userScopes(jwtPayload) { if (!(jwtPayload.scope instanceof Array && jwtPayload.scope.length)) { return []; } return jwtPayload.scope .map(function (s) { return (s.includes('.') ? s.substr(s.indexOf('.') + 1, s.length) : s); }) .map(function (s) { return ({ name: s }); }); }
[ "getGrantedScopes() {\r\n const scopes = this._storage.getItem('granted_scopes');\r\n if (!scopes) {\r\n return null;\r\n }\r\n return JSON.parse(scopes);\r\n }", "getRequestedScopes() {\n const scopesStr = sessionStorage.getItem(this.sessionStorageRequestedScopesK...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
You can create a humanizer, which returns a function with defaults parameters.
function humanizer(passedOptions) { var result = function humanizer(ms, humanizerOptions) { var options = extend({}, result, humanizerOptions || {}); return doHumanization(ms, options); }; return extend(result, { language: "en", delimiter: ", ", spacer: " ", units: ["ye...
[ "function humanizer(passedOptions) {\n\n var result = function humanizer(ms, passedOptions) {\n var options = extend({}, result, passedOptions || {});\n return doHumanization(ms, options);\n };\n\n extend(result, {\n language: \"en\",\n delimiter: \", \",\n units: [\n \"year...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rooter.findAndRequire(...$patterns) Method that first finds all the files matching the `glob` patterns provided from the `rooter.ROOT` path, and then imports them (using the usual cache of `node`). It works the same as `find` and `require` combined. So, it returns a list (with what modules returned).
findAndRequire(...patterns) { return this.find(...patterns).map(pattern => require(pattern)); }
[ "find(...patterns) {\n\t\treturn globby.sync(flatten(patterns).map(pattern => this.resolve(pattern)));\n\t}", "function loadModulesFromPattern(pattern) {\n\n\t\tlib.glob.sync(pattern).forEach(function(path) {\n\t\t\tloadModuleFromPath(path);\n\t\t});\n\n\t}", "function find(pattern, rootDir, cb) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate that the feedSlug matches \w
function validateFeedSlug(feedSlug) { if (!validFeedSlugRe.test(feedSlug)) { throw new _errors__WEBPACK_IMPORTED_MODULE_1__/* .FeedError */ .IY("Invalid feedSlug, please use letters, numbers or _: ".concat(feedSlug)); } return feedSlug; }
[ "function validateFeedSlug(feedSlug) {\n if (!validFeedSlugRe.test(feedSlug)) {\n throw new _errors.FeedError(\"Invalid feedSlug, please use letters, numbers or _: \".concat(feedSlug));\n }\n\n return feedSlug;\n}", "judgeSlug () {\n\t\tif (!this.SEO.snippetFields.slug)\n\t\t\treturn;\n\t\t\n\t\tconst slug ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
I. transmogrify Write a Javascript function called transmogrify. This function should accept three arguments, which you can assume will be numbers. Your function should return the "transmogrified" result. The transmogrified result of three numbers is the product of the first two numbers, raised to the power of the thir...
function transmorgify(num1, num2, num3){ return Math.pow(num1 * num2, num3); }
[ "function transmogrify(num1,num2,num3) {\n return (num1 * num2) ** num3\n}", "function transmorgrify(num1, num2, num3) {\n return(num1 * num2) ** num3\n}", "function transmogrifier(num1, num2, num3) {\n\t// multiply first two numbers\n\tvar base = num1 * num2;\n\t// raise first two numbers to the power of t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generator function. Returns a function which returns incrementing Fibonacci numbers with each call.
function Fibonacci() { // Create a new fiber which yields sequential Fibonacci numbers var fiber = Fiber(function() { Fiber.yield(0); // F(0) -> 0 var prev = 0, curr = 1; while (true) { Fiber.yield(curr); var tmp = prev + curr; prev = curr; curr = tmp; } }); // Return a bound handle to `run` on ...
[ "function Fibonacci() {\n // Create a new fiber which yields sequential Fibonacci numbers\n var fiber = Fiber(function () {\n Fiber.yield(0); // F(0) -> 0\n var prev = 0, curr = 1;\n while (true) {\n Fiber.yield(curr);\n var tmp = prev + curr;\n prev = cur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runtime helper for merging vbind="object" into a VNode's data.
function bindObjectProps(data,tag,value,asProp,isSync){if(value){if(!isObject(value)){"development"!=='production'&&warn('v-bind without argument expects an Object or Array value',this);}else{if(Array.isArray(value)){value=toObject(value);}var hash;var loop=function loop(key){if(key==='class'||key==='style'||isReserved...
[ "function bindObjectProps(\ndata,\ntag,\nvalue,\nasProp,\nisSync)\n{\nif(value){\nif(!isObject(value)){\nwarn(\n'v-bind without argument expects an Object or Array value',\nthis);\n\n}else {\nif(Array.isArray(value)){\nvalue=toObject(value);\n}\nvar hash;\nvar loop=function loop(key){\nif(\nkey==='class'||\nkey==='...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrain NN with new training data
function retrain() {          trainingData = _.shuffle(trainingData);         train();     }
[ "function retrain() {\r\n percept.reset();\r\n train();\r\n}", "reset() {\n let input = tf.input({shape: [this._inputSize]});\n let last = input;\n for (let i=0; i < this._numLayers; i++) {\n \tlast = tf.layers.dense({units: this._layout[i], activation: this._activation}).apply(l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to evaluate 'compareHtml' property instead of 'html' for DocumentFragments
evaluate(property, a, b) { if (property === 'html' && typeof a.value !== 'string') { // DocumentFragment, compare separately supplied html return a.object.compareHtml === b.object.compareHtml; } }
[ "evaluate(property, a, b) {\n if (property === 'html' && typeof a.value !== 'string' && `compareHtml` in a.object) {\n // DocumentFragment, compare separately supplied html\n return a.object.compareHtml === b.object.compareHtml;\n }\n }", "function samehtml(a,b) {\n\treturn (unhtml(a)==unhtml(b))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle autocomplete for survey for "Location" with the searchText
handleSurveyLocAutoComplete(searchText) { var surveyData = this.state.surveyData; surveyData["location"] = searchText; this.setState({ surveyData }); this.handleLocationAutoComplete(searchText); }
[ "function initLocationAutoComplete(view) {\n\n\t// TODO: ignore punctuation in matching and consider both abbreviated and full state names\n\n\t// TODO: automatically select first item in list on enter pressed if nothing highlighted using arrow keys\n\n\t// create autocomplete instance on search field\n\tview.$sear...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Programa que calcula si un numero es par o impar y muestra el resultado en consola. function calculaQueES
function calculaQueES(num) { return num % 2 }
[ "function esPar(numerito) { \n //Si se hace una division para dos se recibe un entero o decimal\n if (numerito % 2 === 0) { //=== 0 quiere decir que no da reciduo\n return true;\n } else {\n return false;\n }\n}", "function numPrimos()\n\t{\n\t\tvar valor=parseInt(document.getElementById...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if this.state.month is 1 then year 1 and this month change 12
prevMonth() { let month = this.state.month; let year = this.state.year; if (month === 1) { month = 12; year = year - 1; } else month -= 1; this.setState({ year: year, month: month }) }
[ "_decreaseMonthYear() {\n let newMonth;\n let newYear;\n if (this.state.month === 0) {\n newMonth = 11;\n newYear = this.state.year - 1;\n } else {\n newMonth = this.state.month - 1;\n newYear = this.state.year;\n }\n\n this.setState({\n month: newMonth,\n year: newYe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test Matrix3.mul() with identity matrix
testMulIdentity() { console.info("Test: Matrix3.mul() -- Identity matrix") const firstMatrix = [ 1, 4, 8, 6, 4, 2, 7, 8, 0, ] const secondMatrix = [ 1, 0, 0, 0, 1, 0, 0, 0, 1, ] const expected = [ 1, 4, 8, 6, 4, 2, 7, 8, 0, ] const...
[ "testMul() {\n console.info('test Matrix3.mul()')\n const a = [\n 1,1,1,\n 1,1,1,\n 1,1,1,\n ]\n const b = [\n 2,2,2,\n 2,2,2,\n 2,2,2,\n ]\n const expected = [\n 6,6,6,\n 6,6,6,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Friend List, if fully loaded, globalSignGFL should be [true, true, ...]
function getFriendList(uid){ update_status('开始获取好友列表...'); pageNo = 0; URL = 'http://friend.renren.com/GetFriendList.do?curpage='+pageNo.toString()+'&id='+uid; $.get(URL, {}, function(data){ Group = $('div.page > a', data); var min_pageNo = 1; var max_pageNo = 0; for (var i=0; i<Group.length; i++){ var s...
[ "function fetchFriendList() {\n chrome.tabs.sendRequest(bkg.facebook_id, {retrieveFriendsMap: 1});\n}", "function get_fb_friends() {\n \n if (! fb_friends) {\n ds = { };\n fb_friends = ajax_call('/playdates/get_fb_friends/', ds);\n for (pdi in fb_friends) {\n key_list[fb_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the boundary edge lengths of the input mesh.
computeBoundaryLengths() { this.l = DenseMatrix.zeros(this.nB, 1); for (let he of this.boundary.adjacentHalfedges()) { let i = this.bVertexIndex[he.vertex]; this.l.set(geometry.length(he.edge), i, 0); } }
[ "function LengthofEdges() {\r\n\tvar length = l.value;\r\n\tvar width = w.value;\r\n\tvar height = h.value;\r\n\treturn ((4*height)+(2*length)+(2*width));\r\n}", "idealEdgeLength(edge) { return 32 }", "edgeLength() {\n return this.getFace().sideLength();\n }", "idealEdgeLength(edge) { return 32; }", "ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function enables/disables correct pages in the pagination
function togglePagination() { if (App.CurrentPage) { //reset pagination $('.pagination li').removeClass("active").removeClass("disabled"); $('.pagination').find(".page" + App.CurrentPage).addClass("active"); if (App.CurrentPage === 1) { $('.prev').addClass("disabled"); ...
[ "function enableButtons() {\n $next = $paginator.find(\".next-page\");\n $prev = $paginator.find(\".previous-page\");\n \n if( self.currentPage === 0 ) { // is first page\n $prev.addClass('disabled').removeData(\"page\");\n } else {\n $prev.removeClass('disab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Formats date and time If only a date is recived back from Google Calendar API: Date Format Given By Google Calandar API yyyymmdd ie 20181220 Formated to monthName dd, yyyy If date and time is recieve back from Google Calendar API: Date Format given by google calendar API is 20180615T18:00:0005:00 Formatted to monthName...
function formatDate(when) { if (when !== "") { const monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; // Splits 2018-06-15T18:00:00-05:00 or 20...
[ "function setFormatDateAndTime(dateAndTime) {\n return Utilities.formatDate(dateAndTime, SpreadsheetApp.getActive().getSpreadsheetTimeZone(), \"dd-MMM-yyyy | HH:mm:ss\")\n}", "convertGoogleDateTime(date) {\n let yyyy = date.substring(0, 4);\n let mm = date.substring(5, 7);\n let dd = date.substring(8, 1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifies if password passes comp8 requirements, Boolean return
function comp8(str) { const len_req = 8; if (str.length != len_req) { if (debug_on) { console.log("Password len " + str.length + " != " + len_req); } return false; } let has_upper = false, has_lower = false, has_symbol = false, has_number = false; for (...
[ "function isValidPassword(password) {\n if (password.length >= 8) {\n return true;\n }\n return false;\n }", "function isValidPassword(pwd) {\r\n return pwd.length >= 8;\r\n}", "function validatePassword() {\n var _password = getPassword();\n var _confirmPassword = getCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if on last image, disable next button
function disableNext() { if (img_counter == images.length - 1) { next_btn.disabled = true; } else { next_btn.disabled = false; } }
[ "handleNextClick() {\n this.nextButton.current.disabled = true;\n this.setNextPhotoActive();\n }", "showPrevImage(e) {\n this.index--;\n this.img.src = this.imgArr[this.index];\n this.nextButton.disabled = false;\n\n if (this.index === 0) {\n this.prevButton.disabled = true;\n }\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
release the select dom object
function __releaseSelects($dom) { if (_floatGFrame!=null) { _floatGFrame.style.display = "none"; } }
[ "function releaseMapSelection() {\n\t\tif (this.selectedNetworkElements != null) {\n\t\t\tfor (var i = 0; i < this.selectedNetworkElements.getLength(); i++) {\n\t\t\t\tthis.selectedNetworkElements.get(i).unselect();\n\t\t\t}\n\t\t}\n\t\tif (this.dottedSelection != null) {\n\t\t\tthis.dottedSelection.release();\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate a path by following the grid
function createPath({ start, grid, stepCount }) { const path = [start]; let current = start; let next = null; const findNext = ({ current, grid }) => { const { x, y } = current; const candidates = grid.filter( (pt) => (pt.x === x && Math.abs(pt.y - y) === config.dotSpacing) || (pt...
[ "function drawDjikstraPath()\n {\n for(let i = 1; i < path.length; i++)\n {\n let gridIndex = rcToIndex(path[i].first, path[i].second , gridRowSize);\n $('.cell').eq(gridIndex).html('<div class=\"marker_path bg-dark\"></div>'); \n }\n\n }", "function draw_grid() \n {\n var ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
viewRoster AJAX call to load Group Roster list.
function viewRoster(){ $('#viewGroupRoster').live('click', function() { //call .ajax to call server. $.ajax({ method: "get", url: "quicktools/viewgrouproster.php", data: "groupid=" + $(this).attr("title"), beforeSend: function(xhr){ $("#smloading").show(); }, complete: function(xhr, t...
[ "function renderRoster() {\n submitAJAX(\"getroster\", null, buildroster);\n}", "function getRoster() {\n $.ajax({\n url: 'http://devjana.net/support/tau_students.json',\n dataType: 'JSON',\n success: function(data) {\n if (debug) {\n co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns the id of the insert code event
function getEvent(row, col, allInsertEventsByPos) { //default error message retVal = "ERROR ON ID"; //if the row and column are good if((row >= 0 && row < allInsertEventsByPos.length) && (col >= 0 && col < allInsertEventsByPos[row].length)) { //return the id of the code retVal = allInsertEventsByPos[...
[ "function eventid(e){\n return parse_id(e.target.get('id'));\n }", "get insertedId() {\n return this._lastResults.insertId;\n }", "function getAddEventID() {\n return $window.addevent_id;\n }", "function idEvent() {\n return crypto.randomBytes(3).toString(\"hex\");\n}", "get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
transfer_marble selected ball to user
function transfer_marble(marbleId, to_owner_id) { show_tx_step({ state: 'building_proposal' }, function () { var obj = { type: 'transfer_marble', id: marbleId, owner_id: to_owner_id, v: 1 }; console.log(wsTxt + ' sending transfer marble msg', obj); ws.send(JSON.stringify(obj)); refreshHomePanel()...
[ "function transfer_marble(marbleName, to_username, to_company){\n\tshow_tx_step({state: 'building_proposal'}, function(){\n\t\tvar obj = \t{\n\t\t\t\t\t\ttype: 'transfer_marble',\n\t\t\t\t\t\tname: marbleName,\n\t\t\t\t\t\tusername: to_username,\n\t\t\t\t\t\tcompany: to_company,\n\t\t\t\t\t\tv: 1\n\t\t\t\t\t};\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to create an empty directive. This is used to track flagdirectives whose children may have functionality based on them. Example: `mdnoink` will potentially be used by all child directives.
function attrNoDirective () { return { controller: angular.noop }; }
[ "function attrNoDirective () {\n\t return { controller: angular.noop };\n\t}", "function attrNoDirective() {\n return {\n controller: angular.noop\n };\n }", "function attrNoDirective () {\n return { controller: angular.noop };\n}", "function createDirectiveType(m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `RuleActionProperty`
function CfnRuleGroup_RuleActionPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but received:...
[ "function CfnWebACL_RuleActionPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete team member from team list, JSON, diagram, and events
function deleteMember(pillId) { $('#confirmAction').modal('hide'); // remove from members array var indexOfJSON = getMemberJSONIndex(pillId); var members = flashTeamsJSON["members"]; var memberId = members[indexOfJSON].id; //console.log("deleting member " + memberId); //console.log("clicked...
[ "function deleteTeam(req, res) {\n Team.deleteMany({_id: req.params.id}, (err, result) => {\n if (err) {\n res.json({\n message: 'Test - No teams were found with given Id. Try again.',\n });\n } else {\n switch (result.n) {\n case 1:\n res.json({\n message: 'T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if Accuser is alive
function checkAccuserStatus(accuser, gameid) { return new Promise((resolve, reject) => { db.findOne({ player: accuser,gameid:gameid }, { status: 1, _id: 0 }, (err, docs) => { if (err) console.error("There's a problem with the database: ", err); else if (docs) console.log("accuser life check queried");...
[ "function isAlive(user) {\n return Db.shared.get('users', user, 'isAlive');\n }", "function isAlive() {\n\treturn (health > 0);\n}", "function CheckAlive() {\n\tif(this.currentHealth <= 0) {\n\t\tDie();\n\t}\n}", "function checkUserActive() {\n\t\t\tif (checking) {\n\t\t\t\tnewStatus = self.isUserActive()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a request token from Auth and calls the given callback with it. The request token is an object with the properties 'token', 'tokenSecret', 'consumerKey' and 'consumerSecret'.
function getRequestToken(accessor, callback) { var message = {method: "post", action: baseAuthUrl + "/request_token", parameters: [["oauth_callback", "oob"]]}; OAuth.completeRequest(message, accessor); var requestBody = OAuth.formEncode(message.parameters); opera.p...
[ "request(callback) {\n return strategy.requestToken((err, tok) => {\n //update our local knowledge of the token\n currentToken = tok && tok.accessToken;\n return callback(err, tok);\n });\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Da update em um Contato
async update(request, response, next){ try{ const { name, email, whatsapp, city, uf } = request.body; const { id } = request.params; const contatoID = await connection('contatos').select('*').where({id: id}); if(contatoID != ""){ await connection(...
[ "function update () {\n\t\t\tvar condicionventa = this.condicionventa ;\n\n\t\t\tif (this.enterprise !== undefined) { condicionventa.enterprise = this.enterprise._id } else { condicionventa.enterprise = condicionventa.enterprise._id };\n\n\t\t\tcondicionventa.$update(function() {\n\t\t\t\t$state.go('home.condicionV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
firstToMaybe : First a > Maybe a firstToMaybe : (a > First b) > a > Maybe b
function firstToMaybe(first) { if(isFunction(first)) { return function(x) { var m = first(x) if(!isSameType(First, m)) { throw new TypeError('firstToMaybe: First returing function required') } return applyTransform(m) } } if(isSameType(First, first)) { return applyTr...
[ "function maybeToFirst(maybe) {\n if(isFunction(maybe)) {\n return function(x) {\n var m = maybe(x)\n\n if(!isSameType(Maybe, m)) {\n throw new TypeError('maybeToFirst: Maybe returning function required')\n }\n\n return applyTransform(m)\n }\n }\n\n if(isSameType(Maybe, maybe)) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
view history panel key redispersed
function view_history_panel_solve_key_redispersed(number_saturation){ var str = "<h6 id='hist' style='display: none'>"; str = str + "<img src='imagenes/tag_info.png' title='Informaci&oacute;n sobre la &uacute;ltima operaci&oacute;n realizada'/>"; str_value = ""; end = sel_val['node_cap'] + 1;...
[ "history(lastKeyPressed) {\n this._keyHistory.push(lastKeyPressed);\n }", "onHistoryShow (stamp) {\n this.getJobState('history', stamp, false, '')\n }", "function save_history () {\n\tvar ds = currHds();\n\tedit_history [edit_history_index] = JSON.stringify(ds.toJSON());\n}", "function view_histor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! decodeUtf8ToCodePointsChunkAlgorithm.js Version 0.1.36
function decodeUtf8ToCodePointsChunkAlgorithm(utf8Codes, i, l, codePoints, allowOverlongEncoding, events, cache, close) { // XXX do documentation // utf8Codes = [...] // an array of utf8 codes (uint8) // i XXX // l XXX // codePoints = [] // where the code points (uint32) are pushed ...
[ "function Utf8DecodeWorker() {\n GenericWorker.call(this, \"utf-8 decode\");\n // the last bytes if a chunk didn't end with a complete codepoint.\n this.leftOver = null;\n}", "function cleanUtf8Split(chunk, runtime) {\n var idx = chunk.length - 1;\n /**\n * From Keyang:\n * The code below i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reset rhino position and current state
resetPosition(x, y) { this.x = x; this.y = y; this.moving = false; this.currentState = { killing: false, frames: 1, }; this.setDirection(Constants.RHINO_DIRECTIONS.DEFAULT) }
[ "function resetPos(){\n var molecule = Mol();\n var cys = OriCrystal();\n centerMolecule();\n drawMolecule();\n if(molecule[0].type == \"crystal\" && cys[0].cleave == 0){\n drawCube();\n }\n if(cys[0].preview == 1){\n drawCube();\n }\n drawAxis();\n if(cys[0].cleave == 1){\n drawsurface();\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create conditional thunk. Options includes the algorithm and any algorithmspecific params. FIXME: do we need to return a thunk or an ERP (that knows how to score itself)? FIXME: finish
function conditional(computation, options) { switch (options.algorithm) { case "traceMH": return mcmc_thunk(computation, new RandomWalkKernel(), options.lag, options.verbose, options.init) case "traceST": var rwkernel = new RandomWalkKernel(function(rec){return rec.structural || (typeof rec.erp.nextV...
[ "function conditional(computation, options) {\n switch (options.algorithm) {\n case \"traceMH\":\n \n break\n \n case \"traceST\":\n \n break\n \n case \"LARJMH\":\n \n break\n \n defaul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
console.log(tripleNumber([3, 1, 5, 10])); 2. Write a function that takes in an array of numbers and returns a new array of numbers less than 5. For example, given [4, 10, 8, 3], the function should return [4, 3].
function numbersLessThanFive(inputArray) { var outputArray = []; for (var i = 0; i < inputArray.length; i++) { if (inputArray[i] < 5) { outputArray.push(inputArray[i]); } } return outputArray; }
[ "function tripleAndFilter(arr){\n return arr.map(function(value){\n return value * 3;\n }).filter(function(value){\n return value % 5 === 0;\n })\n }", "function tripledPlusFive(arr){\n var onlyNums=arr.filter(function(val){\n return typeof val === 'number'\n })\n mappingOnlyNums = onlyN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get mapping by locale
getLocaleMapping(locale, group = 'default') { locale = (0, utils_1.formatLocale)(locale); const langMap = this.localeTextMap.get(locale); if (langMap) { return langMap.get(group); } }
[ "mapLocale(locale = this._defaultLocale) {\n let layout;\n const country = locale\n .split('-')\n .shift();\n // search for layout matching the\n // first part, the country code\n if (this.availableLocales[country]) {\n layout = this.availableLocal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get current search options
function getSearchOptions() { var serchOptions = {}; serchOptions[HOTEL_SEARCH_FILTER] = filterParams; serchOptions[HOTEL_SEARCH_BODY] = filterBody; serchOptions[HOTEL_SEARCH_ADVANCE] = filterAdvance; serchOptions[HOTEL_SEARCH_FROM_CACHE] = filterFromCache; ...
[ "function getQuerySearchOptions() {\n\tvar offset = null,\n\t\tlocation = null,\n\t\tradius = null;\n\n\n\tvar options = {\n\t\tinput: document.searchForm.search.value\n\t};\n\n\t// set offset\n\toffset = document.querySelector('.settings-query-search input[name=\"offset\"]').value;\n\tif (/^\\d+$/.test(offset)) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The purpose of this function is to print the billing info informations in the correct position
function print_isrBankInfo(jsonInvoice, report, repStyleObj) { var str = jsonInvoice["billing_info"]["bank_name"].split(','); //Receipt var billingInfo_REC = report.addSection("billingInfo_REC"); for (var i = 0; i < str.length; i++) { billingInfo_REC.addParagraph(str[i].trim()); } //Payment...
[ "printInfo() {\n // console.log('EXCHANGE: investor list:');\n // Object.values(this.investors).forEach(investor => void console.log(investor));\n // console.log(`EXCHANGE: chain length: ${this.chain.lastBlock().index}, total BTC: ${this.totalBtc}`);\n }", "function paymentInfo() {\n ship...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Custom updater for the splitter. This one doesn't do much but the programmer could manipulate the hash here prior to splitting the output if they like. For example, they could add additional parameters or data to the hash values if desired.
function updater(vnid_hash) { if (_.isUndefined(vnid_hash) || _.isEmpty(vnid_hash) || ! _.isObject(vnid_hash)) { throw Error("Simple splitter component requires a vnid hash parameter!"); } return vnid_hash; }
[ "function _updateHash()\n{\n\tlet hash = [];\n\n\tif (viewModel.sortFilter)\n\t{\n\t\thash.push(HASH_LABELS.SORT + '=' + viewModel.sortFilter);\n\t}\n\tif (viewModel.statusFilter)\n\t{\n\t\thash.push(HASH_LABELS.STATUS + '=' + viewModel.statusFilter);\n\t}\n\n\tif (viewModel.companyFilter)\n\t{\n\t\thash.push(HASH_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
for each API fucntions. when side menu clicks hide/show
function showAPIActionContent(obj_Id) { $(".each_api_action").hide(); $("#"+obj_Id).show(); }
[ "function hideApiPanel() {\n $(\"#apiPanel.open\").removeClass(\"open\");\n $(\"#apiPanelDrawer.show\").removeClass(\"show\");\n}", "function onSecondaryHeaderBtn() {\n toggleSideInfos();\n}", "function showingActivitiesMenu() {\n showHidesubActivitiesButtons(-1500, 50, function () {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
+ add_tos :: Number > Number > String
function add_tos(n1,n2){ return (n1 + n2) + ""; }
[ "function add(firstNum, secondNum){\n return firstNum + secondNum\n }", "function add(number) {\n return number + amount;\n }", "function addNumbers() {\n\tlet addend1 = document.getElementById(\"addend1\").value;\n\tlet addend2 = document.getElementById(\"addend2\").value;\n\tlet addend1_parsed =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
assigns a custom attribute to elements in the DOM hierarchy to indicate that they do/don't contain lvas used for hiding empty categories hides all categories containing hidden lvas either by datahiderow_date or datahiderow_semester or datahiderow_university showeverything should not be used with true unless it can safe...
function propagateVisibility(showeverything) { /*at first hide everything*/ var fachs = document.querySelectorAll('*[data-name~="fach"]'); for (var i=0; i < fachs.length; i++) { fachs[i].setAttribute("data-nocontent","true"); } var wholefachs = document.querySelectorAll('*[data-name~="wholefach"]'); for (var i...
[ "function MLINKSTUD_set_datatable_hidden() {\n\n console.log(\"===== MLINKSTUD_set_datatable_hidden =====\");\n\n add_or_remove_class(el_MLINKSTUD_loading, cls_hide, mod_MLINKSTUD_dict.mode !== \"loading\");\n add_or_remove_class(el_MLINKSTUD_no_data, cls_hide, mod_MLINKSTUD_dict.mode !== \"no_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Publishes a list of all available quizzes. Shows details of first quiz by default
function publish_all_quizzes() { $(".quiz_list").empty(); $(".quiz_list").append("<div class = 'quiz_title'>Quizzes</div>") /*Publish all questions*/ var num_quizzes = data.quizzes.length; for(var i = 0; i < num_quizzes; i++) $(".quiz_list").append("<div class = 'quiz_item' quiz_id = '"+i+"...
[ "function publish_all_quizzes() {\n\t$(\".quiz_list\").append(\"<div class = 'quiz_title'>Quizzes</div>\")\n\n\t/*Publish all questions*/\n\tvar num_quizzes = data.quizzes.length;\n\tfor(var i = 0, quiz_number = 0; i < num_quizzes; i++)\n\t\t//Display only published quizzes\n\t\tif(data.quizzes[i].isPublished) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Insert `insertArr` inside `target` at `insertIndex`. Please don't touch unless you understand
function arrayInsert(target, insertIndex, insertArr) { var before = target.slice(0, insertIndex); var after = target.slice(insertIndex); return before.concat(insertArr, after); }
[ "function arrayInsert(target, insertIndex, insertArr) {\n const before = target.slice(0, insertIndex);\n const after = target.slice(insertIndex);\n return before.concat(insertArr, after);\n }", "function arrayInsert(target, insertIndex, insertArr) {\n var before = target.slice(0, in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Processes message attachments and uploads them to the folder specified.
function processMessageAttachments(message, folderToUpload) { var attachments = message.getAttachments(); if (attachments.length != 0) { Logger.log('Message %s has %s attachments.', message.getId(), attachments.length); Logger.log('Uploading blob to folder'); for (var i = 0; i < attachments.length; i+...
[ "processAttachments(sender, attachments) {\n this.preProcess(sender);\n\n console.log(attachments);\n\n switch (this.users.get(sender).currentState) {\n\n case 'create-note':\n quill.addAttachments(this.users.get(sender).note, attachments)\n break;\n\n default:\n this.sendTex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show clear button if transcript
function showClearButton() { console.log('CHECKING SHOW CLEAR', transcript) if (!transcript.length) { clearButton.style.visibility = 'hidden' } else { clearButton.style.visibility = 'visible' } }
[ "function handleClearTranscript(event) {\r\n event.preventDefault();\r\n console.log(\"speech deleted\");\r\n\ttranscript.textContent = \"\";\r\n transcriptt.textContent = \"\";\r\n transcripttt.textContent = \"\";\r\n \r\n}", "function clear(){\n $('#phrase-pane').html('')\n}", "function clearText(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates valid disposition of usage values and updates all credit card sliders
function updateAll(idUpdated) { const currentValues = [] // Credit cards sliders values const saleTotal = saleInProgress.total // Sale total const balance = Number($('#balance').val()) || 0 // Currently inserted balance usage const ccMin = balance && balance != 0 ? 0 : ...
[ "function updateSrcValue() {\n destAmount = document.getElementById('dest-amount').value\n srcAmount = destAmount * (1 / (expectedRate / (10 ** 18)));\n displaySrcAmount();\n}", "function adjustPaymentOptions_and_availableAmounts () {\n creditType = $(\"#creditType\").val()\n netIncome = $(\"#netIncome\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
d2b.chartPie() returns a d2b pie chart generator
function pie () { var $$ = {}; var chart = function chart(context) { context.call($$.chartFrame); // make sure pie, arc, and legend accessors are defined properly $$.pie.value($$.value).color($$.color).key($$.key); $$.legend.html($$.label).key($$.key).color($$.color); $$.tooltip.color(function (d)...
[ "function generatePieChart() {\n var pieChartOutline = {\n \t\"header\": {\n \t\t\"title\": {\n \t\t\t\"text\": \"Inheritance\",\n \t\t\t\"fontSize\": 20,\n \t\t\t\"font\": \"Helvetica Neue\",\n // \"font-weight\": \"bold\",\n \t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets this GregorianCalendar to the date given by the date specifiers weekYear, weekOfYear, and dayOfWeek. weekOfYear follows the WEEK_OF_YEAR numbering. The dayOfWeek value must be one of the DAY_OF_WEEK values: SUNDAY to SATURDAY.
setWeekDate(weekYear, weekOfYear, dayOfWeek) { if (dayOfWeek < GregorianCalendar.SUNDAY || dayOfWeek > GregorianCalendar.SATURDAY) { throw new Error('invalid dayOfWeek: ' + dayOfWeek); } const fields = this.fields; // To avoid changing the time of day fields by date // calculations, use a clon...
[ "static ofWeekOfWeekBasedYearField(weekDef) {\n return new ComputedDayOfField('WeekOfWeekBasedYear', weekDef,\n ChronoUnit.WEEKS, IsoFields.WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);\n }", "function weekOfYear(mom,firstDayOfWeek,firstDayOfWeekOfYear){var adjustedMoment,end=firstDayOfWe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The market interval endpoint returns a summary of information about all markets based in a given currency over a configurable time interval.
marketInterval({ nomicsCurrencyID, hours, startISOString, endISOString }) { return this.getMarketIntervalV1({ nomicsCurrencyID, hours, startISOString, endISOString }) .catch((err) => { console.error("Error in 'marketInterval' method of nomics module\n" + err); throw new Error...
[ "getMarketRates() {\n return this._request({\n fullURL: 'https://quote.coins.ph/v1/markets',\n responseField: 'markets'\n })\n }", "async function markets() {\n try {\n const client = new CoinMarketCap(process.env.COINMARKETCAP_API_KEY)\n const currency = 'CAD';\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Xpath for Race Runner Toggle OFF
get raceRunnerToggleOFF() {return browser.element("//android.widget.ScrollView/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]");}
[ "get raceRunnerToggleON() {return browser.element(\"//android.widget.ScrollView/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]\");}", "get raceRunnerToggleOFF() {return browser.element(\"//android.widget.ScrollView...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
// // ChoroplethMap ChoroplethMap ChoroplethMap ChoroplethMap //
function qpChoroplethMapMaker() { var width = 1000, height = 428; var zoom = d3.behavior.zoom() .scaleExtent([1, 5]) .on("zoom", moveAndZoom); var svg = d3.select("div#qpCoreChoroplethMap").append("svg") .attr({ width: width, height: height }) .c...
[ "function qpChoroplethMapMaker() {\n\n var width = 850, height = 350;\n\n var zoom = d3.behavior.zoom()\n .scaleExtent([1, 5])\n .on(\"zoom\", moveAndZoom);\n\n var svg = d3.select(\"svg#ChoroplethMap\")\n .attr({ width: width, height: height })\n .ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wrapper to publish message to redis channel
function publishMsg(channel, message) { var redisClient = redis.createClient(); redisClient.publish(channel, message); }
[ "publish (payload) {\n // get default Redis channel\n let channel = this.api.config.general.channel\n\n // publish redis message\n this.clients.client.publish(channel, JSON.stringify(payload))\n }", "publish(payload) {\n // get default Redis channel\n let channel = this.api.config.general.chann...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a promise for response headers from the mock data.
promiseHeaders() { var _a; const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders; return headers instanceof RpcError ? Promise.reject(headers) : Promise.resolve(headers); }
[ "async resolveHeaders() {\n return {};\n }", "async _getHeaders() {\n const authToken = await this.authService.getToken();\n return this._headers(authToken.access_token);\n }", "getRequestHeaders() {}", "get headers() {\n let headers = {};\n try {\n this._log.trace(\"Proc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates the cancel button, opens up the account entities section
function openAccountEntityAdd() { if ($('#cancelEntityButton').length == 0) { var cancelEntityButton = $("<input/>", { "class" : "cancel btn btn-default", "type" : "button", "id" : "cancelEntityButton", "click" : me.rosterCancelAction, "value" : ap.core_prompts["action.Cancel"] }); ...
[ "function cancelButtonPressed() {\n \n // 0. Hide the buttons\n document.getElementById(\"button-group-2\").style.display = \"none\";\n \n // 0. Clear the checkboxes\n clearCheckboxes();\n \n // 1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update the selection list with all cameras available
function updateCameraList(cameras) { try { const listElement = document.querySelector('select#availableCameras'); listElement.innerHTML = ''; cameras .map(camera => { const cameraOption = document.createElement('option'); cameraOption.label = camera.label; cam...
[ "function updateCameraList(cameras) {\n let listElement = document.querySelector('select#videoSelect');\n listElement.innerHTML = '';\n cameras.forEach(camera => {\n const cameraOption = document.createElement('option');\n cameraOption.label = camera.label;\n cameraOption.value = camer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Nested pseudoclass if we are insideRule and the next special character found opens a new block
function foundNestedPseudoClass() { var openParen = 0; for (var i = pos + 1; i < source_text.length; i++) { var ch = source_text.charAt(i); if (ch === "{") { return true; } else if (ch === '(') { // pseudoclasses can contain () ...
[ "function foundNestedPseudoClass() {\n for (var i = pos + 1; i < source_text.length; i++){\n var ch = source_text.charAt(i);\n if (ch === \"{\"){\n return true;\n } else if (ch === \";\" || ch === \"}\" || ch === \")\") {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the css classes for the given reflection group and apply them to the [[ReflectionGroup.cssClasses]] property.
static applyGroupClasses(group) { const classes = []; if (group.allChildrenAreInherited) { classes.push("tsd-is-inherited"); } if (group.allChildrenArePrivate) { classes.push("tsd-is-private"); } if (group.allChildrenAreProtectedOrPrivate) { ...
[ "static applyReflectionClasses(reflection) {\n const classes = [];\n let kind;\n if (reflection.kind === index_1.ReflectionKind.Accessor) {\n if (!reflection.getSignature) {\n classes.push(\"tsd-kind-set-signature\");\n }\n else if (!reflection.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
createContentCell(content, parentDiv) creates a cell for either to word or page divs
function createContentCell(content, parentDiv) { // Create main cell body var mainDiv = document.createElement("DIV"); mainDiv.style.width = "90%"; mainDiv.style.padding = "10px"; mainDiv.style.marginRight = "auto"; mainDiv.style.marginLeft = "auto"; mainDiv.style.marginTop = "20px"; mainDiv.styl...
[ "function createCell(cell, text) {\n var div = document.createElement('div'), \n txt = document.createTextNode(text); \n \tdiv.appendChild(txt); \n \tcell.appendChild(div); \n}", "function createPageCell(word) {\n\n\tcreateContentCell(word, \"pageListingDiv\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rectangle lk intersects label li moving from pi with vector vi in positive time Compare centers of the labels they must be within li.height / 2 + lk.height / 2 in the vertical variable and li.width / 2 + lk.width / 2 in the horizontal variable, i.e solve |lk.x (pk.x + t v.x)| < d
function labelRectangleIntersection(lk, li, vi, pi) { let min = 0; let max = Number.POSITIVE_INFINITY; if (vi.y !== 0) { const firstIntersection = (lk.height / 2 + li.height / 2 - li.offsetY + (lk.top + lk.bottom) / 2 - pi.y) / vi.y; const secondIntersection = (-lk.height / 2 - li.height / 2 - li.offsetY ...
[ "function labelRectangleIntersection (lk, li, vi, pi) {\n let min = 0\n let max = Number.POSITIVE_INFINITY\n if (vi.y !== 0) {\n const firstIntersection = (lk.height / 2 + li.height / 2 - li.offsetY + (lk.top + lk.bottom) / 2 - pi.y) / vi.y\n const secondIntersection = (-lk.height / 2 - li.height / 2 - li....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new MultiRange object.
function MultiRange(data, options) { if (options === void 0) { options = defaultOptions; } function isArray(x) { return Object.prototype.toString.call(x) === '[object Array]'; } this.ranges = []; this.options = { parseNegative: !!options.parseNegative, ...
[ "function multirange(data, options) {\n return new MultiRange(data, options);\n}", "range(from, to = from) { return Range$1.create(from, to, this); }", "function createInputRangeMulti(slider) {\n\n var range_multi_start = JSON.parse(input_range_data(slider, \"start\"));\n var range_multi_ranges = JSON....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resize youtube player depending on window size
function ResizePlayer() { var newWidth = window.innerWidth * 0.45; var newHeight = newWidth * 0.625; if((newWidth >= playerMinSize) && (newWidth <= playerMaxSize)) { $(".youtube-embed").width(newWidth); $(".youtube-embed").height(newHeight); $(".learning-content").width(newWidth + 3...
[ "function gfortYoutubeVideoSizefn() {\n jQuery('.background-video-block div[data-youtube-video-url] iframe.gfort-youtube-iframe').each(function () {\n\n var elWidth = 16,\n elHeight = 9,\n el = jQuery(this),\n elParent = el.parents('.background-video-bl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Global ID of mouse down interval
function mousedown(event) { if(mousedownID==-1) //Prevent multimple loops! mousedownID = setInterval(whilemousedown, 250 /*execute every 300ms*/); }
[ "function mouseupfunc() {\n clearInterval(intervalId);\n}", "function mousedown(event) {\n if(mousedownID==-1) //Prevent multimple loops!\n mousedownID = setInterval(function(){whilemousedown(event, this);}, 100 /*execute every 100ms*/);\n\n\n}", "function mousedown(event) {\n\t\tif (mousedownID == -1)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CREATES A NEW MATCH
createMatch(matchName) { return Match.create({ matchName }); }
[ "function createMatch() {\n var match = newMatch();\n matches.push(match);\n return match;\n}", "function newMatch(candidate1, candidate2, match_id) {\n return {\n type: NEW_MATCH,\n candidates: [candidate1, candidate2],\n matchID: match_id,\n }\n}", "function matchCreator(homeClub, awayClub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abre a tela do caixa
function abreCaixa() { let mdCx = $("#md-caixa"); mdCx.on("hidden.bs.modal", function () { onCaixaClosed(); }); caixa(); }
[ "function inviertePalabras(cad) {\r\n \r\n }", "function PrecoArmaArmaduraEscudo(tipo, tabela, chave, material, obra_prima, bonus, invertido) {\n var entrada_tabela = tabela[chave];\n if (entrada_tabela == null || entrada_tabela.preco == null) {\n return null;\n }\n // Nao pode usar invertido aqu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
handles a folder expand
function toggleFolderExpand(folder) { folder.expanded = !folder.expanded; toggleExpand(folder.children, folder.expanded); }
[ "expand() {\n /**\n * Only if it is a root folder meaning having children\n * we need to set the path and update the current\n * root of state.\n */\n if (this.props.root.class === \"root\") {\n this.props.setPath(calculatePath(this.props.root));\n this.props.setRoot(this.props.root)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a promise which resolves to object storing package owner changed status for each dependency.
async function getOwnerPerDependency(fromVersion, toVersion, options) { const packageManager = (0, getPackageManager_1.default)(options, options.packageManager); return await Object.keys(toVersion).reduce(async (accum, dep) => { const from = fromVersion[dep] || null; const to = toVersion[dep] ||...
[ "function pendingDependencies() {\n\t\tvar pending = {};\n\t\tvar key;\n\t\tvar list;\n\t\tvar i;\n\t\tvar id;\n\n\t\tfor (key in __updateOnDefine) {\n\t\t\tlist = __updateOnDefine[key];\n\n\t\t\tfor (i = 0; i < list.length; i += 2) {\n\t\t\t\tid = list[i];\n\t\t\t\t(pending[id] || (pending[id] = [])).push(key);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
external logor: t > t > t Provides: ml_z_logor const Requires: bigInt, ml_z_normalize
function ml_z_logor(z1, z2) { return ml_z_normalize(bigInt(z1).or(bigInt(z2))); }
[ "function ml_z_lognot(z1) {\n return ml_z_normalize(bigInt(z1).not());\n}", "function ml_z_logand(z1, z2) {\n return ml_z_normalize(bigInt(z1).and(bigInt(z2)));\n}", "function ml_z_logxor(z1, z2) {\n return ml_z_normalize(bigInt(z1).xor(bigInt(z2)));\n}", "static log(z) {\n z = Complex.assert(z);\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
recovers the table information, if the user is sitted in a table it initializes the sittedTable variable with that data.
function setTable() { var elemT = $("#in_tableh"); if (elemT.html() == "true") { elemT.html("false"); if ($("#is_ownerh").html() == "true") sittedTable = new Table($("#table_idh").html(),true); else sittedTable = new Table($("#table_idh").html(),false); } }
[ "function setTable() {\n console.log('setting Table: ', current_table);\n setQueryParam('table', current_table);\n\n\n events = cache['events'];\n users = cache['users'];\n projects = cache['projects'];\n days = cache['days'];\n\n\n data = [];\n for (let id in cache[current_table]) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! Function : CBSystemInitialize
function CBSystemInitialize () { WebSocketIFInitialize(); HideBlocker(); }
[ "async initialize() {\n // initialize system log first since it may be needed for error output\n this.onErrorMakeSystemManagerVisible = configUtil_1.ConfigUtilInstance.getDefault(this.manifest, \"manifest.finsemble.bootConfig.onErrorMakeSystemManagerVisible\", false);\n systemLog_1.default.init...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Proceeds with the generation given the parsed swagger object
function doGenerate(swagger, options) { if (!options.templates) { options.templates = path.join(__dirname, 'templates'); } var output = path.normalize(options.output || 'src/app/api'); var prefix = options.prefix || 'Api'; if (swagger.swagger !== '2.0') { console.error( 'Invalid swagger specif...
[ "generate() {\n this.log(c.bold.underline('OpenAPI v3 Documentation Generator\\n\\n'));\n // Instantiate DocumentGenerator\n const generator = new DefinitionGenerator_1.DefinitionGenerator(this.customVars.documentation);\n generator.parse();\n // Map function configurations\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=======================FUNCTIONS ====================== =======================FUNCTIONS ====================== deatils : handle page reset
function pageReset(){ setPage({ currPage:1, pageLoaded:[1] }) }
[ "resetPage() {\n let tf = this.tf;\n if (!this.isEnabled()) {\n return;\n }\n this.emitter.emit('before-reset-page', tf);\n let pgNb = tf.feature('store').getPageNb();\n if (pgNb !== '') {\n this.changePage((pgNb - 1));\n }\n this.emitter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
problem 4 smallest multiple
function smallestMultiple(n) { var tmp, i; var union = {}; var factors = {}; var product = 1; for(i = 2; i <= n; i++) { tmp = primeFactorization(i); factors = {}; tmp.forEach(function(factor) { if(!factors[factor]) { factors[factor] = 0; ...
[ "function smallestMultiple() {\n for (var small = 2520; small>1; small++) {\n for (var i = 1; i <= 20; i++) {\n if (small % i !== 0) {\n break;\n }\n }\n if (small % i === 0) {\n return small;\n break;\n }\n }\n}", "function smallestMult(n) {\n\n let leastCommonMultiple...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert mixed [ sw, ne ] object by gm.LatLngBounds
function toLatLngBounds(mixed) { var ne, sw; if (!mixed || mixed instanceof gm.LatLngBounds) { return mixed || null; } if (isArray(mixed)) { if (mixed.length === 2) { ne = toLatLng(mixed[0]); sw = toLatLng(mixed[1]); } else if (mixed.length === 4) { ne = toLatLng([mixed[0], mixed[1...
[ "function toLatLngBounds(mixed){\n var ne, sw;\n if (!mixed || mixed instanceof google.maps.LatLngBounds) {\n return mixed || null;\n }\n if ($.isArray(mixed)){\n if (mixed.length == 2){\n ne = toLatLng(mixed[0]);\n sw = toLatLng(mixed[1]);\n } else if (mixed.length == 4){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When true, the virtual paging feature is enabled because the virtual content size exceed the supported height of the browser so paging is enable.
get virtualPagingActive() { var _a, _b; return (_b = (_a = this.heightPaging) === null || _a === void 0 ? void 0 : _a.active) !== null && _b !== void 0 ? _b : false; }
[ "verticalPagingPossible() {\n return this.contentSize.height > this.height;\n }", "get _optPhysicalSize(){return this._viewportHeight===0?Infinity:this._viewportHeight*this._maxPages;}", "get _optPhysicalSize() {\n return this._viewportHeight === 0 ? Infinity : this._viewportHeight * this._maxPages...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OBSERVER IMPLEMENTATION // Controller will serve as the central point of contact, updating components
function Controller() { var subject = new Subject(); this.attachObserver = function attachObserver(observer) { subject.attachObserver(observer); }; this.detachObserver = function detachObserver(observer) { subject.detachObserver(observer); }; this.updateObservers = function update(args) { if(...
[ "initController(event) { \n //this.controller = event.detail;\n // this.scene.add(this.controller);\n \n //these might need to be selected on type of controller\n // this.controller.standingMatrix = this.renderer.vr.getStandingMatrix();\n //this.controller.head = this.camera;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fncDeleteCookie =============== Delete cookie value Parameters in strName string variable containing cookie name in strPath string variable containing path for which cookie is valid This must be the same as the path used to create the cookie, or null/omitted if no path was specified when creating the cookie. in strDoma...
function fncDeleteCookie(strName, strPath, strDomain) { var strSearch = strName + "="; // Check if there are any cookies if (document.cookie.length > 0) { strStart = document.cookie.indexOf(strSearch); // Check if specified cookie exists if (strStart != -1) { document.cookie = strName + "...
[ "function fDeleteCookie(name, path, domain) {\n if (GetCookie(name))\n document.cookie = name + \"=\" + ((path) ? \";path=\" + path : \"\") + ((domain) ? \";domain=\" + domain : \"\") + \";expires=Thu, 01-Jan-1970 00:00:01 GMT\";\n}", "function DeleteCookie (name,path,domain) {\n if (GetCookie(name)) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the given object and its filter (if present).
function removeObject(objectId, filter) { if(objectId) { var object = document.getElementById(objectId); //if(object) object.parentNode.removeChild(object); if(object) object.style.display = 'none'; window.dialog = null; if(objectId == PICKER.id) window.picker = null; } if(filter) { filter.DO...
[ "removeObject(object) {\n this.objects.delete(object);\n this.processResultDelta('reset', this.results.filter(result => result.object === object), []);\n }", "remove(object) {\n\t\t//\n\t}", "remove(object) {}", "function removeActiveFilter(filterObject){\n console.info('ggScript: filterOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store contents of a basic template information in the TEI
function TemplateInfo() { this.code = ''; this.type = ''; this.parent = ''; this.description = ''; }
[ "function initTemplateVars() {\n if (body.dataset.type && body.dataset.type === 'plugin') {\n loadFileContent('jira_ticket.tpl', (text) => {\n JIRA_TICKET_TEMPLATE = text\n })\n loadFileContent('gitlab_merge_request.tpl', (text) => {\n GITLAB_MERGE_REQUEST_TEMPLATE = te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads configuration from the DATAREFS_DATA_FILENAME file.
function readDataRefsFromFile(aliasName) { let data = {} try { data = _readDataFromJsonFile(aliasName, DATAREFS_DATA_FILENAME) if (data) { _checkRequiredDataField(data, "dataRefs", DATAREFS_DATA_FILENAME) _checkRequiredDataField(data.dataRefs, "refs", DATAREFS_DATA_FILENAME) if (!Array.isA...
[ "function readConfig(fileRef) {\n // cspellConfigExplorerSync\n const { filename } = fileRef;\n const s = {};\n try {\n const r = cspellConfigExplorerSync.load(filename);\n if (!(r === null || r === void 0 ? void 0 : r.config))\n throw new Error(`not found: \"${filename}\"`);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that a given URI parses correctly into its various components.
function do_test_uri_basic(aTest) { var URI; try { URI = gIoService.newURI(aTest.spec); } catch (e) { var url=aTest.relativeURI ? (aTest.spec +"<"+aTest.relativeURI) : aTest.spec; //do_info("Caught error on parse of" + aTest.spec + " Error: "+e.name+" " + e.result); dump("\n{\"url\":\""+ url+"\",...
[ "function parseUri(uri){\n /*jsl:ignore*/\n if(typeof Uri === undefined) throw new Error(\"URI parser not loaded\");\n return new Uri(url);\n /*jsl:end*/\n}", "function parseUri(e){var a=parseUri.options,f=a.parser[a.strictMode?\"strict\":\"loose\"].exec(e),b={},c=14;while(c--)b[a.key[c]]=f[c]||\"\";b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[BIM customize] Construct a different pack file reader, that use a different input stream implementation that use much less memory.
function PackFileReaderLess(data, usize) { // When server side (S3 and viewing service) is configured properly, // browser can decompress the pack file for us. // Here the check is for backward compatibility purpose. // ??? we actually rely on the server doesn't configure to let brow...
[ "function ReaderFactory() {}", "function Reader(input) {\n this.stream = input;\n if (input[externalBuffer]) {\n this[externalBuffer] = input[externalBuffer].slice();\n }\n let streamType = _streams2.default.isStream(input);\n if (streamType === 'node') {\n input = _streams2.default.nodeToWeb(input);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }