query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Handle a press on the Collapse All button. Collapses each entry. Args: e (Event): The event which triggered the action. | _onCollapseAllClicked(e) {
e.preventDefault();
e.stopPropagation();
this._entryViews.forEach(entryView => entryView.collapse());
} | [
"function _toggleExpanded(e) {\n $(\"#categories\").toggleClass(\"expanded\")\n\n if ($(\"#categories\").hasClass(\"expanded\")) {\n $(e.target).text(\"Collapse All\")\n $(\".checkbox\").removeClass(\"hide\")\n } else {\n $(e.target).text(\"Expand All\")\n $(\".checkbox\").not(\".depth0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The addOperand function will set the display to correct operand variable based on which one currently needs filling. | function addOperand() {
if (firstOperand === null) {
firstOperand = displayToFloat();
} else {
secondOperand = displayToFloat();
}
} | [
"function addOperator(buttonVal) {\n\tdisplay = $(\".display\").text();\n\t\n\t// invariant: numbers will have only one operator to its right at most.\n\t// invariant: only one decimal can exist in display\n\tif(buttonVal === \"C\") {\n\t\t$(\".display\").html(\"\");\n\t} else if(buttonVal === \".\") {\n\t\tif(!dis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use to concatenate the files path ../test/hello.html | concatenate_paths() {
console.log(path.join(__dirname, "/test", "hello.html"));
} | [
"function concat_files(base_dir, files) {\n var output = '';\n _.each(files, function(file) {\n output += fs.readFileSync(path.join(base_dir, file), 'utf8');\n });\n return output;\n}",
"function fileincludeTask(cb) {\n return src(['./src/*.html'])\n .pipe(fileinclude({\n prefix: '@@',\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Strip the prototypes from objects, so that they can safely be accessed as maps. | function withoutPrototype(obj) {
if (!(obj instanceof Object))
return obj;
var result = Object.create(null);
for (var prop in obj)
if (Object.prototype.hasOwnProperty.call(obj, prop))
result[prop] = obj[prop];
return result;
} | [
"removeUsedProps(aProps) {\n\t\t//METODO: change this to actual source cleanup\n\t\tdelete aProps[\"input\"];\n\t\tdelete aProps[\"groupBy\"];\n\t}",
"function normalizeObject(input) {\n\t// Unwrap the functions\n\tif( input && isFunction(input) ) {\n\t\treturn normalizeObject( input() );\n\t}\n\n\t// the object ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if given value is an rgb object | static isRgb(color) {
return color && typeof color.r === 'number' && typeof color.g === 'number' && typeof color.b === 'number';
} | [
"static test(color) {\n return typeof color === 'string' && (isHex.test(color) || isRgb.test(color));\n }",
"function colorMatch(a, b) {\r\n return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a\r\n }",
"function rgbGo() {\n var colorSet = getInputValues(\"r\", \"g\", \"b\", function(x) {re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch the ABI for given account, cached. | async getAbi(account) {
let rv = this.abiCache.get(account);
if (!rv) {
let getAbi = this.pendingAbis.get(account);
if (!getAbi) {
getAbi = this.rpc.get_abi(account);
this.pendingAbis.set(account, getAbi);
}
rv = (await getA... | [
"function getAbi(account){\n try {\n return eos.getAbi(account).then(function(abi) {\n return abi;\n });\n } catch (err) {\n let errorMessage = `Get Abi Controller Error: ${err.message}`;\n return errorMessage;\n } \n}",
"async getAddressFromMetaMask() {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method fire when a chat selected. it find the messages of target chat and send those to chatBox to render | _onChatSelected({detail}) {
// find all messages of selected chat
const chatMessaged = this._messages.filter(m => m.sender === detail.id || m.toChat === detail.id);
// set selected chat as activeChat of whole app
this.activeChat = this._chats.find(c => c.id === detail.id);
// i... | [
"function showchatUserSelect(){\n if(userChat==null)\n {return;}\n /*eventAddChat(message);*/\n $(\".inyect-commit\").html(\"\");\n $(\"#bienvenida\").hide();\n listOfChat.forEach(function(message){\n if((message.name.id==userChat.id && message.userSend.id==JSON.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
puts corner4 in position to be placed in | function positionCorner4(cube) {
//a through b
for (var a = -1; a < 12; a++) {
singleRotation(a);
for(var b = -1; b < 12; b++) {
singleRotation(b);
if (checkWhiteCross(cube) && checkCorner4(cube) && (cube[down][2][0] == 'W') && (cube[down][0][0] == 'W') && (cube[down][0][2] == 'W')... | [
"function positionCorner3(cube) {\n //a through b\n for (var a = -1; a < 12; a++) {\n singleRotation(a);\n\n for(var b = -1; b < 12; b++) {\n singleRotation(b);\n\n if (checkWhiteCross(cube) && checkCorner3(cube) && (cube[down][2][0] == 'W') && (cube[down][0][0] == 'W')) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion interna para eliminar una columna del textarea de columnas seleccionadas | function borrarColsSel(val,txt){
var i = 0;
while(i<document.getElementById("txtColumnsSel").options.length){
var opt=document.getElementById("txtColumnsSel").options[i];
var optTxt = opt.text;
if (optTxt.indexOf(txt)>=0){
opt.parentNode.removeChild(opt);
}else{
i++;
}
}
//eliminamos e... | [
"function remuevecolumnaEliminar(){\r\n\t\tvar tablaLength = obtenTablaLength(\"invitado_table\");\r\n\t\tfor(var i = 1; i <= tablaLength; i++){\r\n\t\t\t$(\"#tr_\"+i+\" td\", $(\"#invitado_table\")).eq(5).hide();\r\n\t\t}\r\n\t}",
"deleteColumn(options) {\n this._withTable(options, ({ range, lines, table,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The number of iterations that this optimizer instance has been invoked for. | get iterations() {
if (this.iterations_ == null) {
this.iterations_ = 0;
}
return this.iterations_;
} | [
"getTotalStepCount () {\n\t\treturn this.getTotalCycleCount() * this.steps;\n\t}",
"getTotalCycleCount () {\n\t\treturn this.getTotalInterval() / this.getReferenceInterval();\n\t}",
"incrementUsageCount()\n {\n const self = this;\n return self.usageCount += 1;\n }",
"function YDataRun_get_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sort tweets array by date (Oldest First) | function oldestTweetsByDate(allTweets){
allTweets.sort(function(a, b){ return (a.date < b.date) ? -1 : ((a.date > b.date) ? 1 : 0); });
return allTweets;
} | [
"function sortArrayByDate(entries){\n for (var i = 0; i < entries.length;i++){\n entries[i]['data'].sort(function(a,b){\n return new Date(a['date']) - new Date(b['date'] );\n });\n }\n}",
"function sortTweets(tweetList,sortOrder) {\n\tvar result;\n\tvar sortNum;\n\tif (sortOrder.toLowerCase() =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new enemy and push to array when maxEnemy increases | function newEnemy() {
if (allEnemies.length < maxEnemy) {
var enemy = new Enemy(randomCol(), enemyY, randomSpeed(), enemyWidth, enemyHeight, getChar());
allEnemies.push(enemy);
}
} | [
"function addMoreEnemies(){\n let enemyPosition = Math.random() * 184 + 50;\n enemyLocation.push(enemyPosition);\n enemy = new Enemy(0, enemyPosition, Math.random() * 256);\n allEnemies.push(enemy);\n}",
"setupEnemies() {\n if (!this.enemies) {\n this.enemies = [];\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get twitter recent tweets with socket emitter | function getTwitterTweets(screen_name) {
socket.emit('user_tweets', { screen_name: screen_name });
} | [
"function showLastTweets() {\n\tvar params = {screen_name: 'trgmedina'};\n\n\tclient.get('statuses/user_timeline', { count: 20 }, function(error, tweets, response) {\n\t if (error) {\n\t console.log('Error occurred: ' + error);\n return;\n\t }\n\t else {\n\t \tfor (var i = 0; i < tweets.length; i++) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets all parcel items | static getItems(req, res) {
ParcelModel.getAllParcels()
.then(data => res.status(200).json(data))
.catch((err) => {
if (err.status) {
res.status(err.status).json({ message: err.message });
}
res.status(500).json({ message: err.message });
});
} | [
"function getAllItems(){\n\n}",
"async allItems() {\n const allItemMenuLocator = await this.components.menuAllItemsLink()\n await allItemMenuLocator.click()\n }",
"async getAllBagItems(req, res) {\n const bagItems = await Bag.find().populate(\"customer\").populate(\"product\");\n res.send... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displaying challengers on list | displayChallengers () {
let challengers = this.challengers
for (let i = 0, length = challengers.length; i < length; i++) {
this.createListItem(challengers[i])
}
} | [
"function topSugList() {\n var listhtml = \"\";\n var wordlist = Object.keys(displayedSugs);\n for (var i = 0; i < wordlist.length; i++) {\n listhtml += (\"<li>\" + wordlist[i] + \"</li>\");\n }\n $(\"#topsugslist\").html(listhtml);\n}",
"function addPhraseToDisplay(arr) {\n for (let i = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load the marketo js api | function loadMarketo() {
if(_self.defaultOptions.marketoLibUrl) {
loadScript(_self.defaultOptions.marketoLibUrl, function(){
loadMarketoForm();
});
}
else
loadMarketoForm();
} | [
"function loadMarketoForm() {\r\n\t\tMktoForms2.loadForm(\r\n\t\t\t_self.defaultOptions.marketoAPIUrl,\r\n\t\t\t_self.defaultOptions.munchkinId,\r\n\t\t\t_self.defaultOptions.formid,\r\n\t\t\tfunction(form) {\r\n\t\t\t\t// create form function\r\n\t\t\t\t_self.form = form;\r\n\r\n\t\t\t\t// load all the select opti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[19] PathExpr ::= LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath Unlike most other nodes, this one always generates a node because at this point all reverse nodesets must turn into a forward nodeset | function pathExpr(stream, a) {
// We have to do FilterExpr before LocationPath because otherwise
// LocationPath will eat up the name from a function call.
var filter = filterExpr(stream, a);
if (null == filter) {
var loc = locationPath(stream, a);
if (null == loc) {
throw new Error
... | [
"function pathExpr(stream, a) {\n // We have to do FilterExpr before LocationPath because otherwise\n // LocationPath will eat up the name from a function call.\n var filter = filterExpr(stream, a);\n if (null == filter) {\n var loc = locationPath(stream, a);\n if (null == loc) {\n thro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remap any references to duplicate arcs in paths to use the same arcs Remove any unused arcs from the dataset's ArcCollection. Return a NodeCollection | function cleanArcReferences(dataset) {
var nodes = new NodeCollection(dataset.arcs);
var map = findDuplicateArcs(nodes);
var dropCount;
if (map) {
replaceIndexedArcIds(dataset, map);
}
dropCount = deleteUnusedArcs(dataset);
if (dropCount > 0) {
// rebuild nodes if arcs have changed
nodes = new... | [
"function ArcCollection() {\n var _xx, _yy, // coordinates data\n _ii, _nn, // indexes, sizes\n _zz, _zlimit = 0, // simplification\n _bb, _allBounds, // bounding boxes\n _arcIter, _filteredArcIter; // path iterators\n\n if (arguments.length == 1) {\n initLegacyArcs(arguments[0]); // wan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last component of a path. '/foo/bar' > 'bar' '/foo/bar/baz/' > 'baz/' '/a' > 'a' | function lastComponent(path) {
var index = path.lastIndexOf('/', path.length - 2);
if (index === -1) {
return path;
}
else {
return path.slice(index + 1);
}
} | [
"function getLastPath() {\n if (url.path.components.length > 0) {\n return url.path.components[url.path.components.length - 1];\n }\n }",
"function get_last_word_in_path(req) {\n\t\tconst parts = req.path ? req.path.split('/') : [];\t\t\t\t\t// grab the last word in the request's path\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new instance of `XMLDTDNotation` `parent` the parent `XMLDocType` element `name` the name of the notation `value` an object with external entity details `value.pubID` public identifier `value.sysID` system identifier | constructor(parent, name, value) {
super(parent);
if (name == null) {
throw new Error("Missing DTD notation name. " + this.debugInfo(name));
}
if (!value.pubID && !value.sysID) {
throw new Error("Public or system identifiers are required for an external entity. " + th... | [
"static create(value: Value, cell: Block): TablePosition {\n const row = value.document.getParent(cell.key);\n const table = value.document.getParent(row.key);\n\n return new TablePosition({\n table,\n row,\n cell\n });\n }",
"constructor(value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a function which takes the credentials of email of the administrator and the users email to send an email to them. | function send_email(your_email,your_password,to_email, subject, content)
{
// Set up the connection to the administrator's email account
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: your_email,
pass: your_password
}
});
// Customize the email as required
var mailOpt... | [
"function _sendEmail() {\n\t\t\t}",
"function sendEmail(usermail){\r\n\r\n \r\n const accessToken = oAuth2Client.getAccessToken();\r\n // to generate accessTokens every time\r\n\r\n // create reusable transporter object\r\n let transporter = nodemailer.createTransport({\r\n service: 'gmail',... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handler for mouse click events works in conjuction with hover event to show dock for maxmized windows | _onDockClicked(actor, event) {
// Show overview if button is right click
if (this._settings.get_boolean('toggle-overview')) {
let button = event.get_button();
if (button == 3) { //right click
if (Main.overview.visible) {
Main.overview.hide(); ... | [
"dock(here) {\n return {\n action: 'docked',\n location: here,\n };\n }",
"_onDashToDockHoverChanged() {\n //Skip if dock is not in dashtodock hover mode\n if (this._settings.get_boolean('dashtodock-hover')) {\n if (DashToDock) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts four hexidecimal chars to the integer that the string represents. For example, uniCharCode('0','0','0','f') will return 15, and uniCharCode('0','0','f','f') returns 255. Returns a negative number on error, if a char was invalid. This is implemented by noting that char2hex() returns 1 on error, which means the ... | function uniCharCode(a, b, c, d) {
return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);
} | [
"function intToHex(integer){if(integer<0){throw new Error('Invalid integer as argument, must be unsigned!');}var hex=integer.toString(16);return hex.length%2?\"0\"+hex:hex;}",
"function hexToInt(str, def)\n {\n if (typeof str === 'number')\n { return str; }\n\n const result = parseInt(str.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grab the areas array and make wiki output. | function output_wiki() {
var html, coords;
html = '<imagemap>';
if (typeof myimgmap.pic != 'undefined') {
html+= 'Image:' + myimgmap.pic.src + '|' + myimgmap.pic.title + '\n';
}
//foreach areas
for (var i=0; i<myimgmap.areas.length; i++) {
if (myimgmap.areas[i]) {
if (myimgmap.areas[i].shape && myimgmap.... | [
"buildRestrictedAreaLinks() {\n const restrictedAreas = AirportController.current.restricted_areas;\n\n _forEach(restrictedAreas, (area) => {\n this.restricted.list.push({\n data: area,\n range: null,\n inside: false\n });\n });... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
log activity in log.txt | function logActivity(summary) {
// concatenate data into var
log = '\n\nAction chosen: ' + action + ', query: ' + queryLog + '\n' + summary;
// append log data to log.txt
fs.appendFile('log.txt', log, function () {});
} | [
"logActivity(activity) {\n if (!activity) {\n throw new Error('Activity is required.');\n }\n var logText = util.format('\\n Activity Received: %s \\n', util.inspect(activity));\n console.log(logText);\n\n if (activity.conversation) {\n var id = activity.conv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns data[] reordered by mapAddressListOnto(), and initiaValue for any entry of oldAddress[] not present in newAddress[]. | function mapAddressListDataOnto(data, oldAddress, newAddress, initialValue) {
var res = __spreadArrays(Array(oldAddress.length).fill(initialValue));
if (data.length === 0) {
return res;
}
var addressIndexMap = exports.mapAddressListOnto(oldAddress, newAddress);
for (var i = 0; i < addressInd... | [
"function clearAddress() {\n address = [];\n}",
"function modifyData( newNeighbourhoodData ) {\n dataDict = [];\n\n if(newNeighbourhoodData) {\n for(var i = 0; i < newNeighbourhoodData.length; i++ ) {\n var regionData = newNeighbourhoodData[i];\n dataDict[regionData.neighborhood] = r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get link to saucelabs job | getTestLink ({ config, sessionId, isMultiremote, instanceName }) {
const isSauceJob = (
(config.hostname && config.hostname.includes('saucelabs')) ||
// only show if multiremote is not used
config.capabilities && (
// check w3c caps
config.capa... | [
"function getJobPathFromName(job) {\n var jobData = loadJobData(job);\n var fileName = jobData.fileName;\n var unGroupName = jobData.unGroupName;\n\n if (unGroupName){\n fileName = unGroupName;\n }\n\n var parsedJobName = fileName.split(\"-\");\n var order = parsedJobName[0];\n var jobNumber = parsedJobN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse the `loca` table. This table stores the offsets to the locations of the glyphs in the font, relative to the beginning of the glyphData table. The number of glyphs stored in the `loca` table is specified in the `maxp` table (under numGlyphs) The loca table has two versions: a short version where offsets are stored... | function parseLocaTable(data, start, numGlyphs, shortVersion) {
var p = new parse.Parser(data, start);
var parseFn = shortVersion ? p.parseUShort : p.parseULong;
// There is an extra entry after the last index element to compute the length of the last glyph.
// That's why we use numGlyphs + 1.
var g... | [
"function parseLookupTable(data, start) {\n var p = new parse.Parser(data, start);\n var table, lookupType, lookupFlag, useMarkFilteringSet, subTableCount, subTableOffsets, subtables, i;\n lookupType = p.parseUShort();\n lookupFlag = p.parseUShort();\n useMarkFilteringSet = lookupFlag & 0x10;\n su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an animation timeline for hiding the label. | hide() {
const hideTL = new TimelineLite();
hideTL.to(this.$.flag, FLAG_ENTRANCE_DURATION, {
y: 55,
opacity: 0,
ease: Sine.easeInOut
});
hideTL.call(() => {
this._showing = false;
});
return hideTL;
} | [
"hide() {\n\t\tlet _ = this\n\n\t\t_.timepicker.overlay.classList.add('animate')\n\t\t_.timepicker.wrapper.classList.add('animate')\n\t\tsetTimeout(function () {\n\t\t\t_._switchView('hours')\n\t\t\t_.timepicker.overlay.classList.add('hidden')\n\t\t\t_.timepicker.overlay.classList.remove('animate')\n\t\t\t_.timepic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a new contactWebsite | static create(contactWebsite) {
return __awaiter(this, void 0, void 0, function* () {
try {
const newContactWebsite = (yield db_1.db.write.table('ContactWebsites').insert(contactWebsite).execute()).rowCount;
return (newContactWebsite == 1) ? { message: 'Contact websit... | [
"function createContact() {\n var contacts = new Appworks.AWContacts();\n\n // Gather properties from your form\n var name = document.getElementById(\"contact-name\").value;\n var number = document.getElementById(\"contact-number\").value;\n\n // Create a new contacts object\n var contact = new Contact();\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all of the IDs that have been issued new IDs in the order in which they were issued new IDs. | getOldIds() {
return [...this._existing.keys()];
} | [
"get ids() {\n return issues.map(obj => obj.id);\n }",
"function getUnusedCardIDs() {\n //return list\n let r = new Array();\n //copy card ids and add them to r \n cardIDs.forEach(id => {\n r.push(id);\n });\n //for each used cards id subtract it from r\n cardIDsUsed.forEach(id => ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Redo Action performed on selected elements | redoAction() {
this.element.executeAction(this.details);
} | [
"hintRightClickSelectionPerturbationDone() {\n this._restoreSelection();\n }",
"undoAction() {\n this.element.executeOppositeAction(this.details);\n }",
"hintRightClickPerturbingSelection() {\n this._saveSelection();\n }",
"function UndoRedo(e) {\n var evtobj = window.event ? event : e\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds an array of values based on the keyword, it will be used for encrypting and decrypting | function key()
{
var keywordInput = document.getElementById("keyword");
keywordInput = keywordInput.value;
if (keywordInput == '')
{
alert("Please enter a keyword");
}
keywordInput = keywordInput.toLowerCase();
keyword = keywordInput.replace(' ', '');
var keywordValues = [];
for (var i = 0; i <... | [
"static getCryptoValueArray() {\n var coinArray = [];\n for(var i = 0; i < CryptoExchanger.cryptoExchangerArray.length; i++) {\n coinArray.push({\n name: CryptoExchanger.cryptoExchangerArray[i].getCoinName(),\n population: CryptoExchanger.cryptoExchangerArray[i].getCurrentValue(),\n })... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Part I: Process songs using the primary_artist for lyric section attribution | function processSongs(songs) {
// when building our data store we need to make sure not to create a duplicate entry for the artist
// first we check if table['primary_artist'] exists
// if it does
// we increment that lyricSectionLength value by our lyricText length
// if it doesn't
// we create a n... | [
"function processMostUniqueWords(songs) {\n // we will need to process lyric sections in the same way as part II \n // next we will need to process lyric sections for unique words \n // we will need two additional fields in our store for this section: \n // we will need to store the lyric sections\n // we will... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a function returnFalseMessage() that returns the string "Hey, it's false!" | function returnFalseMessage() {
return "Hey, it's false!";
} | [
"function returnTrueMessage() {\n return \"Hey, it's true!\";\n}",
"function getMessage() {\n return \"I am normal function\";\n }",
"function returnMessage(x) {\n return x;\n}",
"function IncorrectAnswer(incorrectAnswer) {\n var incorrectAnswerOutput;\n\n incorrectAnswerOutput = \"<p>You en... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParseron_list_partitioned_table. | visitOn_list_partitioned_table(ctx) {
return this.visitChildren(ctx);
} | [
"visitPartitioned_table(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitOn_comp_partitioned_table(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitTable_partitioning_clauses(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitOn_hash_partitioned_table(ctx) {\n\t return this.visitChildre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
populates the table with the top 10 datapoints using the specified column for comparison | function top_column(col_idx) {
table = document.getElementById("output_table");
data = get_table_data(table); // get the data from the table
if (data.length == 1) return;
sorted = data.sort((a, b) => {
return b[col_idx]- a[col_idx]
... | [
"filterTopTenCountries(data) { \n let header = data['columns'].map(header => header);\n let lastEntryInHeaders = (header[header.length - 1])\n \n //sort data in descending order by total numbers\n let countriesSortedByTotalNumbers = data.sort(compareTotal);\n function compareTotal(a, b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wolves have been reintroduced to Great Britain. You are a sheep farmer, and are now plagued by wolves which pretend to be sheep. Fortunately, you are good at spotting them. Warn the sheep in front of the wolf that it is about to be eaten. Remember that you are standing at the front of the queue which is at the end of t... | function warnTheSheep(queue) {
const position = queue.reverse().indexOf('wolf');
return position === 0 ? 'Pls go away and stop eating my sheep' : `Oi! Sheep number ${ position }! You are about to be eaten by a wolf!`;
} | [
"function hungry(hunger){\n \nreturn hunger <= 5 ? 'Grab a snack': 'Sit down and eat a meal';\n}",
"function biggerIsGreater(w) {\n\tlet arr = w.split('');\n\tfor (let i = arr.length - 2; i >= 0; i--) {\n\t\t// starting from end to find the index that there is/are greater characters after that\n\t\tlet biggerC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load metadata for autocomplete from GWT | function loadMetadataForGWT(keyword, parentText, tags, editor, optional_keyword) {
optional_keyword = (typeof optional_keyword === 'undefined') ? '' : optional_keyword;
if (editor.autocompleteInfo) jQuery("#" + editor.autocompleteInfo).html("Loading catalogue metadata keywords for auto-complete");
if (edi... | [
"function editMetadata()\n{\n this.name = \"editMetadata\";\n this.icon = \"editMetadata.png\";\n this.description = \"edit the metadata annotations in this model\";\n\n utils.addScript(staticPath + \"js/3rd/jquery.rdfquery.core.min-1.0.js\");\n}",
"function populateMetadataInternal() {\n \"use str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given an "If/Then" block that has an input conditon, find colors selected (color = 1) | checkColors(block) {
let colorReqs = {
red: false,
yellow: false,
blue: false,
};
let ifCondition = block.conditionBlock; // the operator block
if (ifCondition !== null) {
if ("operator_equals" === ifCondition.opcode) {
le... | [
"function selectColor(input) {\n \n\n if(input == \"color\") {\n userColor();\n } else if(input == \"rainbow\") {\n rainbowColor();\n } else {\n greyScale();\n }\n\n }",
"function chooseFinalColor(){\n //co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Activates the hover effects for tables | function ActivateTableHoverEffects(){
$(document).ready(
//####> FUNCTION FOR HANDLING HOVER AND UNHOVERS
function(){
$(".odd").hover(
function(){
unhoverBorderColor = $(this).css("border-color");
unhoverColor = $(this).css("background-color");
$(this).css("background-color", hove... | [
"hover(state, index) {\n //If table object already has hover css toggle back to normal highlight\n\t\t\tif (state.table[index].css == state.colorTheme.hover && state.table[index].interactive) {\n state.table[index].css = state.colorTheme.hightlight\n } \n\t\t\t//If the object is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BEHAVIOR FUNCTION Jumps a timeline to a new frame. Accepts the following arguments: tmLnName the name of the timeline (ex: Timeline1) fNew the frame number to jump to numGotos (optional) the number of times to jump there Designed to work in conjunction with Dreamweaver's Timeline Inspector. The Timeline Inspector creat... | function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
//Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = docu... | [
"function MM_timelineStop(tmLnName) { //v1.2\n //Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.\n if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time\n if (tmLnName == null) //stop all\n for (var i=0; i<document.MM_Time.length; i++) document.MM_Tim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a constructor with the prebuilt resource as its prototype this is syntactic sugar to allow callers to new up the resources. | function createResourceConstructor(resourcePrototype) {
function APIResource(options) {
options = options || {};
this.cache = options.cache || noopCache;
}
APIResource.prototype = resourcePrototype;
return APIResource;
} | [
"constructor(t, name, custom, props = {}, opts = {}, remote = false, dependency = false) {\n /**\n * A private field to help with RTTI that works in SxS scenarios.\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Any advisory lock whose `updatedAt` time is older than the Date object returned by this method should be considered expired | getAdvisoryLockExpiration() {
return new Date(Date.now() - 1000 * self.options.advisoryLockTimeout);
} | [
"function expired() {\n return (this.token && this.token.expires_at && new Date(this.token.expires_at) < new Date());\n }",
"unlockMessage() {\n // if message is over a day old (10 seconds for testing), unlock it and allow deletion\n if(Date.now() - this.posted > 10000) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enter a parse tree produced by KotlinParsercallSuffix. | enterCallSuffix(ctx) {
} | [
"function pushlex(type, info) {\n var result = function(){\n lexical = new CSharpLexical(indented, column, type, null, lexical, info)\n };\n result.lex = true;\n return result;\n }",
"enterKotlinFile(ctx) {\n\t}",
"enterPreprocessorParenthesis(ctx) {\n\t}",
"enterNamedInfix(ctx) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mutate a tour using swap mutation | mutate(tour) {
// Loop through tour cities
for (let tourPos1=0; tourPos1 < tour.tourSize; tourPos1++){
// Apply mutation rate
if (Math.random() < this.mutationRate){
// Get a second random position in the tour
let tourPos2 = Math.floor(tour.tourSize * Math.random());
// Get ... | [
"function swapGun()\n{\n let tmp = gun;\n selectGun(prevGun);\n prevGun = tmp;\n}",
"function swap (a, b) {\n var c = rep_data.data [a];\n rep_data.data [a] = rep_data.data [b];\n rep_data.data [b] = c;\n}",
"function swap(triangle, i , j) {\n var temp = triangle[i];\n triangle[i] = triangle[j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation of sExplanationStarted signal | static sExplanationStarted(key) {
Signals.emit(key, "sExplanationStarted", {"startTime": rooms[key].startTime});
} | [
"static sExplanationEnded(key) {\n Signals.emit(key, \"sExplanationEnded\", {\n \"wordsCount\": rooms[key].freshWords.length +\n ((rooms[key].editWords[rooms[key].editWords.length - 1].wordState === \"notExplained\") ? 1 : 0)});\n }",
"function speechStarted() {\n}",
"static sWor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an array of property names of the proxied room. | onOwnPropertyNamesGet(room, identifier) {
return Object.getOwnPropertyNames(room);
} | [
"_getClientNames() {\n const names = [];\n for (let key in this.clients) {\n names.push(this.clients[key].name);\n }\n return names;\n }",
"getPropertyKeys() {\n let properties = this.getProperties();\n let propertyKeys = [];\n if (properties) {\n for (var key in ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fast local update for godtimer | function fastupdateGodTimer(){
//Check if round is ongoing
if(godtimer_in_seconds > 0){
godtimer_in_seconds = godtimer_in_seconds - 0.2;
////console.log(godtimer_in_seconds);
god_numhours = Math.floor(godtimer_in_seconds / 3600);
god_numminutes = Math.floor((godtimer_in_seconds % 3600) / 60);
god_... | [
"function timerUpdate() {\n // update display of timer on browser window\n var timeString = timerMilliSeconds / 1000;\n $(\"#timer\").text(timeString + \" seconds until next update\");\n}",
"function update_timer() {\n seconds = Math.floor(game.time.time / 1000);\n milliseconds = Math.floor(game.ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a multiplexor with the given number of select lines. The first n items in gate.inputs are the select lines (least significant bit first), the next n^2 are the data lines. The number of select lines, n, is stored in the n field of the returned object. | function mux (n) {
const inputs = []
for (let i = 0; i < n; i++) {
inputs.push(pin())
}
for (let i = 0; i < (1 << n); i++) {
inputs.push(pin())
}
return {
id: nextId(),
type: 'mux',
n,
inputs: Object.seal(inputs),
outputs: Object.seal([pin()])
}
} | [
"function renumber (circuit) {\n const clone = { ...circuit }\n let maxId = currentId\n\n const calcNewId = (id) => currentId < (Number.MAX_SAFE_INTEGER - id)\n ? id + currentId\n : (id - Number.MAX_SAFE_INTEGER) + currentId\n\n const updateId = (object) => {\n const clone = {\n ...object,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
After every component update, check whether the activeFont prop has changed. If so, change the font in the fontManager as well | componentDidUpdate() {
if (this.state.activeFont !== this.props.activeFont) {
this.setActiveFont(this.props.activeFont);
}
} | [
"function handleFontFamily(font, event) {\n setFontFamily(font);\n let fontButtons = document.querySelectorAll(\".font-button\");\n fontButtons.forEach((item) => {\n item.classList.remove(\"active\");\n });\n event.target.classList.add(\"active\");\n }",
"function detectFontChange(_options) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the userinputted radius from a field Parameters: ID of the field that will intake user input Returns int | function getNewRadius(inputValueID){
// If the radius input field is not empty, use the value. Otherwise, default to radius = 30
var newRadius = document.getElementById(inputValueID).value.length !== 0 ? document.getElementById(inputValueID).value : 30;
// Convert from string
newRadius = parseInt(newRadius);
retu... | [
"function radiusOutput () {\n dInput = document.getElementById('d-input').value\n dInput = parseInt(dInput)\n radius = dInput / 2\n document.getElementById('radius').style.display = 'block'\n document.getElementById('radius-input').innerHTML = radius\n if (document.getElementById('d-input').value === '') {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets called when the user changes the input of the project name input field in the create project dialog. Enables/disables the creation of projects depending on whether the name input is empty or not. | _onInputProjectNameChanged(projectName) {
if(projectName) {
this.shadowRoot.getElementById("dialog-button-create").disabled = false;
} else {
this.shadowRoot.getElementById("dialog-button-create").disabled = true;
}
} | [
"generateProjectName(firstInit) {\n\n // name has not been modified by the user\n if (firstInit || (this.projectInformationForm['deskname'].$pristine && this.projectInformationForm.name.$pristine)) {\n // generate a name\n\n // starts with project\n var name = 'project';\n\n // type select... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the math node into a MathMLnamespaced DOM element. | toNode() {
if (this.character) {
return document.createTextNode(this.character);
} else {
const node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
node.setAttribute("width", this.width + "em");
return node;
}
} | [
"toNode() {\n const node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n for (const attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display player chosen circle | function displayPlayerElectedCircles(e) {
playerCircle.classList.add('display-player-btn');
// Fill button with corresponding image
document.querySelector(
'.btn-player'
).lastElementChild.innerHTML = `${e.lastElementChild.innerHTML}`;
// Shines computers the elected new circle
shinesButton(playerCirc... | [
"function displayComputerElectedCircle(computerResult) {\n // Fill button with corresponding image\n buttons.forEach((e) => {\n if (computerResult == e.id) {\n computerCircle.lastElementChild.innerHTML = `${e.lastElementChild.innerHTML}`;\n computerCircle.classList.add('display-player-btn');\n s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the time of the index given the Sequence's subdivision | _indexTime(index) {
return new _Ticks.TicksClass(this.context, index * this._subdivision + this.startOffset).toSeconds();
} | [
"function calculateIndex(time) {\n let data = time.split(\":\");\n let currentTime = parseInt(data[0], 10) * 60 + parseInt(data[1], 10);\n let rangeMinutes = parseInt(process.env.rangeMinutes, 10);\n let timeStart = parseInt(process.env.timeStart, 10);\n return Math.floor((currentTime - timeStart) / rangeMinut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get total claimable amount | async totalClaimable(){
try {
let claimable = await this._contract.claimAmount({
user: this._accountId
})
return utils.format.formatNearAmount(claimable)
} catch (error) {
console.log(error)
return 0
}
} | [
"async getClaimDistributionAmount () {\n this.REQUIRES(Services.COMSTOCK)\n const userWallet = this.web3Manager.getWalletAddress()\n const web3 = this.web3Manager.getWeb3()\n const wallet = web3.utils.toChecksumAddress(userWallet)\n const claimDistribution = await this.comstock.getComstock({ wallet }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Page builder widget element search filterable | function cs_page_composer_filterable(id) {
var $container = jQuery("#page_element_container" + id),
elclass = "cs-filter-item";
$container.find('.element-item').addClass("cs-filter-item");
jQuery(document).on('click', '#filters' + id + ' li', function (event) {
var $selector = jQuery(th... | [
"function filterNames() {\n document.getElementsByClassName(\"pagination\")[0].innerHTML = ' '; \n let filterValue = document.getElementById('input').value.toUpperCase(); \n let ul = document.getElementById('names'); \n let li = ul.querySelectorAll('li.student-item... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the EventHandler. Global variable. | function setEventHandler(eventHandler) {
if (g_eventHandler) g_eventHandler = eventHandler;
} | [
"onEventHandlerSet(room, handler, callback, identifier) {\n if (!this.handlers[handler]) {\n this.handlers[handler] = {};\n }\n\n this.handlers[handler][identifier] = callback;\n }",
"_registerEvent () {}",
"_initEvent() {\n this.eventManager.listen('hide', this.hide.bind(this));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call to determine if there are any more unanswered questions | moreQuestionsAvailable() {
return (this.progress.qAnswered < this.progress.qTotal);
} | [
"function allQuestionsAnswered() {\n clearTimeout(countdown);\n}",
"function allAreAnswered(questions){\n if(questions.status===1){\n return true\n }\n}",
"function getUsedAnswers() {\n var answers = angular.copy(pageData.answers);\n return answers.filter(function(entry) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a new Decimal whose value is the natural exponential of `x` truncated to `sd` significant digits. Taylor/Maclaurin series. exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ... Argument reduction: Repeat x = x / 32, k += 5, until |x| < 0.1 exp(x) = exp(x / 2^k)^(2^k) Previously, the argument was initially reduced by ... | function exp(x, sd) {
var denominator, guard, pow, sum, t, wpr,
i = 0,
k = 0,
Ctor = x.constructor,
pr = Ctor.precision;
if (getBase10Exponent(x) > 16) throw Error(exponentOutOfRange + getBase10Exponent(x));
// exp(0) = 1
if (!x.s) return new Ctor(ONE);
if (sd == null) {
... | [
"function ep(x) { return Number(x.toFixed(5)).toString(); }",
"function trunc(x, d) {\n d = Math.pow(10, d);\n return (x * d | 0) / d;\n }",
"function show_exp(d, precision) /* (d : double, precision : ?int) -> string */ {\n var _precision_17864 = (precision !== undefined) ? precision : -17;\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Binds an event to an element. | function bind(element, event, handler) {
// Convert a string element to its DOM equivalent
if (typeof element == "string") {
element = $(element)[0];
}
if (element) {
element.addEventListener(event, handler, false);
}
} | [
"function bindElement(element, object) {\n setPropertyOnElement(element, DATA_BINDING_ID, object);\n}",
"function attachEventListener(elementId, eventType, listener) {\n\tvar e = document.getElementById(elementId);\n\tif (e.addEventListener) {\n\t\t//Most modern browsers\n\t\te.addEventListener(eventType, list... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a register with memory from HL | ldRegMem(register) {
register[0] = MMU.rb(regHL[0]);
return 8;
} | [
"LDI(register, integerValue) {\n this.reg[register] = integerValue;\n }",
"ldReg(registerTo, registerFrom) {\n registerTo[0] = registerFrom[0];\n return 4;\n }",
"function loadMemory() {\n\n // Hardcoded program to print the number 8 on the console\n program;\n\n if(program.length < ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParsersubpartition_by_list. | visitSubpartition_by_list(ctx) {
return this.visitChildren(ctx);
} | [
"visitList_partition_desc(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitList_subpartition_desc(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitList_partitions(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitComposite_list_partitions(ctx) {\n\t return this.visitChildren(ctx);\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
filters out specific event that is to be deleted and set that variable to state | deleteEvent() {
let updatedEvents = this.state.events.filter(
event => event["start"] !== this.state.start
);
// localStorage.setItem("cachedEvents", JSON.stringify(updatedEvents));
this.setState({ events: updatedEvents });
} | [
"eraseEvent(state, num) {\n state.events.splice(num, 1);\n\n }",
"remove(eventName) {\n if (this.eventStorage[eventName]) {\n delete this.eventStorage[eventName];\n }\n }",
"removeAll(signal) {\n delete this._events[signal];\n }",
"function destroy_event() {\n event = null;\n e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load the protobuf prototype / Creates a perfomance object that contains details from youtube video scraping | function CreatePerformanceStubWithYoutubeDetails(data){
var deferred = Q.defer();
ytdl.getInfo(data.youtube_url,{}, function(err,info){
if (err){
console.log(err)
deffered.reject(err)
}
performance = {}
performance.YoutubeId = info.video_id
perform... | [
"load(data) {\n var _a;\n const { playlistId, title, thumbnail, shortBylineText, videoCount, videoCountShortText, } = data;\n this.id = playlistId;\n this.title = title.simpleText || title.runs[0].text;\n this.videoCount = common_1.stripToInt(videoCount || videoCountShortText.simp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
highlights the possible options in the dropdown menu | function dropdown_highlighter(query_year,query_month,query_day){
if(current_buffer){
$('#dateShower option').css('background-color','white');
if(!(query_year&&query_month&&query_day)){
for(var i=0;i<current_buffer.length;i++){
if((query_year==current_buffer[i]["year"]||query_year=='')&&(query_month==cur... | [
"function moveHighlight(dropdown,delta){function findElementIndex($elements,selector){for(var i=0,length=$elements.length;i < length;i++) {if($elements.eq(i).is(selector)){return i;}}return -1;}function scrollToHighlight(){var $el;if(dropdown.highlightedResult){var quotedId=Selectivity.quoteCssAttr(dropdown.highlig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new record with associated keys and values swapped | function reverseRecord(record) {
return Object.entries(record)
.reduce((p, [str, val]) => (Object.assign(Object.assign({}, p), { [val]: str })), {});
} | [
"invert(obj) {\r\n var inverted = [];\r\n\r\n // for every property in the input object, swaap the key:vale pair\r\n for (var property1 in obj) {\r\n inverted[obj[property1]] = property1;\r\n // original value key\r\n };\r\n return inverted;\r\n\r\n }",
"function swap (a, b) {\n va... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enter a parse tree produced by Java9ParserelementValueArrayInitializer. | enterElementValueArrayInitializer(ctx) {
} | [
"function parseArrayInitializer() {\n\t var elements = [], node = new Node(), restSpread;\n\t\n\t expect('[');\n\t\n\t while (!match(']')) {\n\t if (match(',')) {\n\t lex();\n\t elements.push(null);\n\t } else if (match('...')) {\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requests to switch the avatar to the given id | function sendSwitchPlayerRequest(id)
{
// There is no use in switching to itself
if(playerId != id)
{
console.log("Requesting to switch player to " + id);
controlsAjax.send("/cd/game?a=setavatar&id=" + id);
}
} | [
"function changeAvatar() {\n ignoreEditorChanges_ = true;\n\n const avatarSelect = BlocklyGames.getElementById('avatar-select');\n const i = avatarSelect.selectedIndex;\n if (Pond.currentAvatar === Pond.Battle.AVATARS[i]) {\n return;\n }\n Pond.saveAvatar();\n Pond.currentAvatar = Pond.Battle.AVATARS[i];\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
when false the speach function doesn't work edit this function to change what the chatbot says | function chatbotResponse() {
talking = true;
botMessage = "I'm confused"; //the default message
if (lastUserMessage === 'hey' || lastUserMessage =='hello'||lastUserMessage =='hii'||lastUserMessage =='hi'||lastUserMessage =='howdy'||lastUserMessage =='hey bro'||lastUserMessage =='pranam'||lastUserMessage =='namas... | [
"function chat(){\n // if (speechRec.resultValue){\n let input = speechRec.resultString;\n bot.reply(\"local-user\", input).then(function(reply) {\n console.log(\"Bot>\", reply);\n // output.html(reply);\n speech.speak(reply)\n });\n \n // }\n }",
"function setBotRespon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to create the Timer Display and set the styling and attributes | function createTimerDisplay() {
var timerDisplay = document.createElement('div');
timerDisplay.setAttribute('id','theTimer');
timerDisplay.style.color = 'red';
timerDisplay.style.fontSize = '30px';
timerDisplay.style.paddingTop = '15px';
timerDisplay.style.fontWeight = 'bolder';
return timerDisplay;
} | [
"function renderTimer (display, timeSnap) {\n \n // Loop through the time metrics using .map() method\n const output = timeSnap.map(metric => {\n // Get state of the metric\n let state = metric.val <= 0 ? 'done' : 'running';\n \n // Store pulse animation class depending on if state =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transform ITImage to canvas image. Example: let gray = IT.toGrayscale(img); let imgData = ctx.createImageData(465,620); IT.grayITImageToCanvasImageData(gray, imgData); ctx.putImageData(imgData,0,0); | grayITImageToCanvasImageData(grayITImage, imgData) {
let j = 0, i = 0, dst = imgData.data;
for (;i < dst.length; i+=4, j+=1) {
dst[i] = grayITImage.data[j];
dst[i+1] = grayITImage.data[j];
dst[i+2] = grayITImage.data[j];
dst[i+3] = 255;;
}
} | [
"imageToCtx (img, x = 0, y = 0, width = img.width, height = img.height) {\n if ((x + width > img.width) || (y + height > img.height))\n this.error('imageToCtx: parameters outside of image')\n const ctx = this.createCtx(width, height)\n ctx.drawImage(img, x, y, width, height, 0, 0, width, height)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Container for the React App automatically | function createContainer(){
const app = document.getElementById('app');
if(!app){
const el = document.createElement('div');
el.setAttribute('id', 'app');
return document.body.insertBefore(el, document.body.firstChild);
}
return app;
} | [
"createLayout(){\n const container = createComponent('div', {class: 'container'})\n const pageContent = createComponent('div', {id: 'pageContent', class: 'my-5'})\n const welcomeImage = createComponent('img', {src: \"./images/home.png\", style: \"max-width: 100%\"})\n pageContent.append(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to indicate a colour change the current data needs rerendering using the new colour, but nothing else should change. | colourChange() {
// Re-render what's already there, no need to reset or change the data
this.currentGraphicHandler.render(this)
} | [
"_colorUpdate() {\n if(this.value){\n this.updateStyles({\n '--l2t-paper-color-indicator-icon': this.value,\n '--l2t-paper-color-indicator-icon-display': 'block',\n });\n } else {\n this.updateStyles({\n '--l2t-paper-color-indicator-icon': 'transparent',\n '--l2t-pap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
16. Write a while loop that counts sheep in the console until 42. Use a var called sheep and console log something like "13 sheep. 14 sheep."Etc | function countSheep () {
n = 0;
while (n < 42) {
n++,
console.log(n + " sheep");
}
} | [
"function playFives(num)\n{\n for(var i = 1; i <= num; i++)\n {\n var random = rollOne();\n if(random === 5)\n {\n console.log(random + \" That's good luck\");\n }\n else\n {\n console.log(random);\n }\n }\n}",
"function five(word) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method waits until all players are logged in | async allPlayersAreLoggedIn() {
console.log('allPlayersAreLoggedIn : starting to wait');
await Promise.all(
this.state.players.map((player, index) => {
return new Promise((resolve, reject) => {
this.whenPlayerIsUpdated(
index,
(updatedPlayer) => updatedPlayer.logg... | [
"logIn(playerName){\n\n for(var player in this.players){\n if(this.players[player].name === playerName){\n this.players[player].isLoggedOn = true;\n }\n }\n\n console.log(\"logIn\", playerName);\n }",
"function waitForPlayer(successFunction) {\n firebaseGame.child('player').on('value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========= MDEC_SelectLevelChange ================ PR20230320 | function MDEC_SelectLevelChange(el_select) {
console.log("===== MDEC_SelectLevelChange =====");
mod_MEX_dict.lvlbase_pk = (el_select.value && Number(el_select.value)) ? Number(el_select.value) : null;
MDEC_enable_btn_save();
} | [
"function levelSelected() {\n var selectElement = document.getElementById('levelSelect');\n var selectedIndex = selectElement.selectedIndex;\n var selectedOption = selectElement.options[selectedIndex];\n var levelId = selectedOption.value;\n selectLevelWithId(levelId);\n persistence.setValue('selectedWorld', ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create location event for an assignment. | function createLocationForAssignment(axios$$1, token, payload) {
return restAuthPost(axios$$1, 'assignments/' + token + '/locations', payload);
} | [
"function addLocation() {\n\n personAwardLogic.addLocation($scope.awardLocation, personReferenceKey).then(function (response) {\n\n var locationId = null;\n if (appConfig.APP_MODE == 'offline') {\n locationId = response.insertId;\n } else {\n\n l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
departmentsData() //coded by Brett need to check the salary for end dates. also need to go through departments and employee departments for the different department names. | function employeeData() {
let employeeInfo = [] //The new array containing the separate objects
for (let i = 0; i < employees.length; i++) {
const empl = employees[i];
let stillEmployeed = true
let currentSal = []
let deptWorked = []
for (let j = 0; j < employeeSalari... | [
"function getSalary () {\r\n\tvar levelSelect = document.getElementById(\"levelSelect\");\r\n\tvar lvl = levelSelect.value.replace(/\\D/, \"\");\r\n\tif (dbug) console.log (\"Got level \" + lvl + \".\"); // and start date of \" + startDate + \".\");\r\n\tif (lvl < 1 || lvl > 5) {\t// Should only happen if someone m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns all the squares that has been taken updated or not | returnTakenSquares() {
return this.takenSquares
} | [
"function updateAllBoardSquares() {\n // find all board squares\n var $square, x, y;\n $('button.square').each(function () {\n $square = $(this);\n x = $square.data('x');\n y = $square.data('y');\n\n // defensive check\n if (x == undefined ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private function: Instantiates the fsevents interface path string, path to be watched callback function, called when fsevents is bound and ready Returns new fsevents instance | function createFSEventsInstance(path, callback) {
return (new fsevents(path)).on('fsevent', callback).start();
} | [
"function CustomEventDispatcher() { this._init(); }",
"_createWatcher() {\n const _watcher = Looper.create({\n immediate: true,\n });\n _watcher.on('tick', () => safeExec(this, 'fetch'));\n\n this.set('_watcher', _watcher);\n }",
"function configChangeListner(){\n\tfs.watch(SERV_CONF_PTH, func... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a EventProcessor to be kept globally. | function addGlobalEventProcessor(callback) {
getGlobalEventProcessors().push(callback);
} | [
"function getGlobalEventProcessors() {\n var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEven... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the longest directory path common to all files. | function getCommonDirectory(files) {
if (!files.length) {
return "";
}
const roots = files.map((f) => f.split(/\\|\//));
if (roots.length === 1) {
return roots[0].slice(0, -1).join("/");
}
let i = 0;
while (new Set(roots.map((part) => part[i])).size === 1) {
i++;
... | [
"function commonPathPrefix(paths) {\n /* prefixCommonness is a mapping whose keys are prefixes in the paths,\n * and who values are tuples containing the number of paths that share\n * that prefix and the length of the prefix (in terms of how many\n * slashes it has) */\n var prefixCommonness = {};\n\n pat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get total area and room count sql condition as a sql parameter. | function getTotalAreaAndCountQueryParameter() {
var areaAndCount = ' 1=1 ';
var vpaRes = arguments.length == 1 && arguments[0] == "em"? "${sql.getVpaRestrictionForTable('rm')}": "${sql.vpaRestriction}";
var parameters = " AND ( (${parameters['dp_id']} AND ${parameters['dv_id']} ) AND (${parame... | [
"function getAllCommonParameters() {\n\treturn getCommonParameters()+\" AND ${parameters['totalArea']}\";\n}",
"function applyCustomRestriction() {\n // custom SQL restriction that uses one of the columns from the custom SQL query in AXVW\n var restriction = 'total_area > 0';\n \n // get a reference t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the offer made by a user | deleteUserOffer(listing_id, offer_user_id){
return new Promise((resolve, reject) => {
this.pool.query(`
UPDATE OFFERS
SET deleted = 1
WHERE ((listing_id = ?) AND (offer_user_id = ?))
`, [listing_id, offer_user_id], function(err, data){
... | [
"async onClick(){\n const user = this.props.user;\n const response = await this.deleteUser(user);\n this.props.removeUser(user.id);\n }",
"function deleteUser(req, res, next) {\n //Check if the id is valid and exists in db\n \n Users.findOne({\"_id\": req.query.id},\n\n function(err, result)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
when start button is clicked a new instance of Race class is called | function handleStartBtn() {
const race = new Race(c1, c2);
race.startRace();
} | [
"function driveIt(vehicle) {\n vehicle.start();\n racetrack.push(vehicle);\n}",
"function startNewGame(){\n\ttoggleNewGameSettings();\n\tnewGame();\n}",
"function initSimon() {\n $('[data-action=start]').on('click', startGame);\n\n }",
"function setStartScreen() {\n score = 0;\n showSc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getNewName: Function to get the new file name. The primaryname is the same as the source file. | function getNewName()
{
var ext, docName, newName, saveInFile, docName;
docName = sourceDoc.name;
ext = '_AB_nobleed_HR.pdf'; // new extension for pdf file
newName = "";
for ( var i = 0 ; docName[i] != "." ; i++ )
{
newName += docName[i];
}
newName += ext; // full pdf name of the file
// Create a file o... | [
"function getNewName()\n{\n\tvar ext, docName, newName, saveInFile, docName;\n\tdocName = sourceDoc.name;\n\text = '.ai'; // new extension for pdf file\n\tnewName = \"\";\n\t\t\n\tfor ( var i = 0 ; docName[i] != \".\" ; i++ )\n\t{\n\t\tnewName += docName[i];\n\t}\n\tnewName += ext; // full pdf name of the file\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
example: "bbabab" is a polygram with radical "bba" because it is the concat of "bba" and "bab"; | function isPolygram(word) {
if (word.length % 2) return "";
const half = word.slice(0, word.length / 2);
if ([...half].every(w => w === half[0])) return "";
return half;
} | [
"function plusOut(str, word)\n{\n let result = \"\";\n let temp = \"\";\n let j = 0;\n for(let i = 0; i < str.length; i++){\n if(str.charAt(i) != word.charAt(j)){\n result = result + \"+\";\n if(temp.length!=0){\n for(let k = 0; k < temp.length; k++){\n result ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detect features in frame using fast algorithm | function detectFeatures(frame, features, width, height) {
// detect features for frame
const tempFeatures = [];
for (let i = 0; i < width * height; i++) {
tempFeatures[i] = new jsfeat.keypoint_t();
}
const count = jsfeat.fast_corners.detect(frame.data[0], tempFeatures, 3);
// add detect... | [
"async getInViewFeatures() {\n\n if (!(this.browser && this.browser.referenceFrameList)) {\n return []\n }\n\n let allFeatures = []\n const visibleViewports = this.viewports.filter(viewport => viewport.isVisible())\n for (let vp of visibleViewports) {\n\n con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds all formulas, measures which page they're on, and assigns them the correct page number. | function assignPagesToFormulasForPDFExport() {
breadcrumb('[PAPER] [EXPORT] Assigning pages to formulas');
$(".ql-editor")[0].querySelectorAll(".ql-formula").forEach(function(elem){
var pgno = Math.ceil(px2mm(elem.offsetLeft) / (paper.width + paper.opticalSeparator));
elem.setAttribute("pg... | [
"function FormulaPage() {}",
"function calculate () {\n if (page === 1) {\n dInput = document.getElementById('d-input').value\n dInput = parseInt(dInput)\n radius = dInput / 2\n area = Math.PI * radius ** 2\n area = area.toFixed(2)\n document.getElementById('area-result').innerHTML = area\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
photo_opener now opens instead of just an image. If is empty, then it will open /catalog/detail.gsp by default. | function photo_opener(url, file, iIndex,isVariant,corpCard,type) {
var width = 570;
var height = 670;
if (file == "" || file == "/catalog/detail_swatch.gsp" || file == "/catalog/detail.gsp") {
file = "/catalog/detail.gsp";
if(type == 2) {
width = 740;
height = 540;
... | [
"function show_image_on_popup(image_path) {\n\tvar photo_enlarger_main_image = document.getElementById(\"photo_enlarger__photo\");\n\tphoto_enlarger_main_image.src = image_path;\n\t\n\ttoggle_photo_enlarger_display();\n}",
"function openImage() {\n window.open($(this).prop('src'));\n }",
"function openProdu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
componentDidMount fetches all users, notes, and classrooms | componentDidMount() {
fetch('http://localhost:9000/api/v1/users')
.then(r=>r.json())
.then(users=>this.setState({users}))
fetch('http://localhost:9000/api/v1/notes')
.then(r=>r.json())
.then(notes=>this.setState({notes}))
fetch('http://localhost:9000/api/v1/classrooms')
... | [
"componentDidMount() {\r\n fetch(`${baseUrl}/folders`)\r\n .then(res => {\r\n if (!res.ok) {\r\n return res.json().then(e => Promise.reject(e))\r\n }\r\n return res.json()\r\n })\r\n .then(resJson => {\r\n // console.log(resJson)\r\n this.setState({\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check for state change from to trigger send animation | function stateChanged() {
// if state IS valid and was FORMERLY invalid
if( isValid( $('#msg').val() ) && valid === false) {
valid = true;
animateSend("100%");
}
// else reset to default state
else if( !isValid($('#msg').val()) ) {
valid = false;
animateSend("0%");
}
... | [
"function ReadyToFire(){\n\tif(!anim.IsInTransition(3))\n\t\tanim.SetBool(\"charged\", true); \n}",
"setAnimationFlag(attributeName, state) {\n const arg = this.args[attributeName];\n\n if (arg && arg.anime !== state) {\n arg.anime = state;\n this.emit('state.change.animation', {\n animatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
execute shell on node with array of args | static execute(args) {
return new Promise( (resolve, reject) => {
shell.exec(escape(args), {}, (code, stdout, stderr) => {
if(code === 0) {
resolve(stdout);
} else {
reject(stderr);
}
});
});
... | [
"function spawn(cmd, args) {\n return function(callback) {\n grunt.util.spawn({\n cmd: cmd,\n args: args\n }, function(err, res, code) {\n callback(err || code, res);\n });\n };\n }",
"function spawnInteractiveCommand(c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
IMGUI_API void LogText(const char fmt, ...) IM_FMTARGS(1); // pass text data straight to log (without being displayed) | function LogText(fmt) {
bind.LogText(fmt);
} | [
"_log() {\n let args = Array.prototype.slice.call(arguments, 0);\n\n if (!args.length) {\n return;\n }\n\n if (args.length > 1)\n this.emit('log', args.join(', '));\n else\n this.emit('log', args[0]);\n }",
"function logText(text) {\n\tif(conf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
password equal check obj1 : input type obj2 : input type | function isEqualPass(obj1,obj2){
var pw1 = obj1.value;
var pw2 = obj2.value;
if(pw1.length ==0 || pw2.length ==0){
return true;
}
if(pw1 == pw2){
return false;
}
return true;
} | [
"function CheckPasswordsMatch(pwd1, pwd2) {\n if(pwd1 === pwd2){\n return true;\n }\n return false;\n}",
"function checkPasswords(name1, name2, pwdLen) {\n\n var elem1 = eval(\"'input[name=\" + name1 + \"]'\");\n var elem2 = eval(\"'input[name=\" + name2 + \"]'\");\n\n elem1 = $(elem1)[0]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a value indicating whether the creep is in the home room. | get isHome () {
return this.room.name === this._mem.rooms.home;
} | [
"get homeRoom () {\n if (this._cache.homeRoom !== undefined) {\n return this._cache.homeRoom;\n }\n this._cache.homeRoom = Empire.getRoom(this._mem.rooms.home);\n return this._cache.homeRoom;\n }",
"playerHomeDist() {\n return this.playerDistTo(this.getBlackboa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Waiting on init() to complete allows parsing the PCI ID database only once. | async init()
{
// If we don't yet have the PCI database parsed, do it now.
if (! pciIds)
{
pciIds = await require("./parsePciIds")(this.pciIdPath);
}
} | [
"function idbReady() {\n const isSafari = /Safari\\//.test(navigator.userAgent) &&\n !/Chrom(e|ium)\\//.test(navigator.userAgent);\n // No point putting other browsers through this mess.\n if (!isSafari)\n return Promise.resolve();\n let intervalId;\n return new Promise((resolve) => {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize instagram media from media bundle instagram. | function initInstagram() {
function _initInstagram () {
instgrm.Embeds.process();
}
if (typeof instgrm === 'undefined') {
$.getScript('//platform.instagram.com/en_US/embeds.js', _initInstagram);
}
else {
_initInstagram();
}
} | [
"setMediaFile() {\n if (!this.creative()) {\n return this;\n }\n\n this.$media = bestMedia(this.creative().mediaFiles().all());\n\n if (!this.media()) {\n console.warn('No media.');\n\n return this;\n }\n\n const virtual = document.createEle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |