query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Determine the type of a character in a keypath.
function getPathCharType (ch) { if (ch === undefined || ch === null) { return 'eof' } var code = ch.charCodeAt(0); switch (code) { case 0x5B: // [ case 0x5D: // ] case 0x2E: // . case 0x22: // " case 0x27: // ' case 0x30: // 0 return ch case 0x5F: // _ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return ch\n\n case 0x5F: // _\n ...
[ "0.6553067", "0.6553067", "0.6553067", "0.6553067", "0.6553067", "0.6530318", "0.6530318", "0.6530318", "0.6530318", "0.6530318", "0.6509395", "0.6509395", "0.6397073", "0.61194676", "0.5952906", "0.5830649", "0.5683862", "0.5683862", "0.54683864", "0.54234093", "0.5405826", ...
0.6608188
0
Format a subPath, return its plain form if it is a literal string or number. Otherwise prepend the dynamic indicator ().
function formatSubPath (path) { var trimmed = path.trim(); // invalid leading 0 if (path.charAt(0) === '0' && isNaN(path)) { return false } return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}", "function formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n ...
[ "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.7751916", "0.5868635", "0.5612484", "0.5612484", "0.5351044", "0.5337993", "0.5329883", "0.527293", "0.52567154", "0.5256155", "...
0.7828504
0
Asynchronous WebSocket Sessions using WSS.js example:
async function startWebSocketSession(HURL, SURL) { session = new WSS (HURL); if (HURL.toLowerCase().trim().startsWith("http")) { var websocket = await session.connect(SURL, true); } else { websocket = await session.connect(SURL, false); } return (session); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initWS(key){\n console.log('tries', wsTries);\n if (wsTries <= 0){\n console.error('unable to estabilish WS after 5 tries!');\n wsConnection = null;\n wsTries = 5;\n wsSessionID = null;\n return;\n }\n wsConnection = new WebSocket('wss://beta.ethvigil.com/ws'...
[ "0.68328536", "0.6683525", "0.66712224", "0.651843", "0.6476508", "0.64735323", "0.6472878", "0.64728147", "0.6471408", "0.6466958", "0.64516336", "0.6448947", "0.64052314", "0.6322534", "0.6316995", "0.6310024", "0.62698877", "0.6260204", "0.6230967", "0.62179345", "0.620389...
0.7603927
0
Get configuration details of image from server
function getConfigurations() { serverCall(CONFIG.configUrl, function (error, res) { if (error) { return console.log("Some error occured"); } ConfigData = res; ImageBaseURL = ConfigData.images.base_url; getMovies('popular'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getConfig() {\n const { payload } = await this.send({ command: Commands.GET_IM_CONFIG });\n return payload;\n }", "bind() {\n let img_conf = this.context.getImageConfig(this.config_id);\n if (img_conf && img_conf.regions_info) {\n this.image_info = img_conf.image_info;\n ...
[ "0.6234092", "0.6069728", "0.5884359", "0.57491696", "0.57218134", "0.5701374", "0.567777", "0.56631273", "0.5662533", "0.5647425", "0.56294215", "0.56236047", "0.56190443", "0.5595079", "0.55950457", "0.5575094", "0.5572357", "0.5561189", "0.5555247", "0.55524015", "0.553416...
0.63769704
0
Get movie list based on type passed as argument. [popular or upcoming]
function getMovies(type) { let url = type === "popular" ? CONFIG.popularMovies : CONFIG.upcomingMovies; $("#movieList").html('<div class="loader"></div>'); $("#search").val(''); serverCall(url, function (error, res) { if (error) { console.log("some error occured"); } changeActiveClass(type)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovies(type){\n if(type == 1){\n $('.upcomingMovies').hide(); \n $('.ratedMovies').show();\n $('.upcoming_movies').removeClass('active');\n $('.rated_movies').addClass('active');\n } else {\n $('.ratedMovies').hide();\n $('.upcomingMovies').show();\n ...
[ "0.7097046", "0.67512137", "0.6440548", "0.6349986", "0.6065", "0.59365064", "0.5892698", "0.5849933", "0.57772344", "0.57445526", "0.5724112", "0.56653905", "0.564751", "0.55801225", "0.5573917", "0.55274487", "0.5522624", "0.5512297", "0.5499541", "0.5477311", "0.5469824", ...
0.67575645
1
concat 3 mp4s together using 2 500ms directionalWipe transitions
async function main() { await concat({ output: path.resolve(__dirname, `./output/${Date.now()}.mp4`), videos: [ path.resolve(__dirname, './input/000.mp4'), path.resolve(__dirname, './input/001.mp4'), path.resolve(__dirname, './input/002.mp4'), path.resolve(__dirname, './input/003.mp4')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeVideo() {\n\tvar fi = document.getElementById('fileItem');\n\tvar videoCount = fi.files.length;\n\tvar ii = 0;\n\tvar jj = 0;\n\tcreateSegmentObjects(videoCount);\n\n\n\tdocument.getElementById('processing').innerHTML = \"We're making your video! Give us a few.\";\n\t//move();\n\n\n\tapp.mediaPaths.fo...
[ "0.58555025", "0.5811004", "0.5618298", "0.5505472", "0.5454147", "0.54503155", "0.5415417", "0.54058105", "0.53371227", "0.5332481", "0.53248173", "0.52141225", "0.5181201", "0.51648784", "0.51426196", "0.5133625", "0.5098838", "0.5080407", "0.5037834", "0.502089", "0.500856...
0.6697344
0
Initialise new prototype functions for string. [1] toProperCase() Proper cases the string that executes this function
initialise() { String.prototype.toProperCase = function () { return this.replace(/\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toLowerCase(str) {\r\n // -------------------- Your Code Here --------------------\r\n\r\n\r\n\r\n\r\n // -------------------- End Code Area ---------------------\r\n}", "function SuperString(string){\n\n}", "[_firstLetterUppercase](str){ //auxiliar function that change the string fist latter for up...
[ "0.6652885", "0.6514158", "0.6455807", "0.64071685", "0.6304795", "0.626997", "0.624265", "0.62270033", "0.62270033", "0.62083924", "0.62083924", "0.6152274", "0.6133238", "0.61269456", "0.60794574", "0.60752934", "0.6016951", "0.60044795", "0.5968392", "0.5959824", "0.595281...
0.83136064
0
this function loops over the array of colors it creates a new div and gives it a class with the value of the color it also adds an event listener for a click for each card
function createDivsForColors(colorArr) { for (let color of colorArr) { const newDiv = document.createElement("div"); newDiv.classList.add(color) newDiv.addEventListener("click", handleCardClick); gameBox.append(newDiv); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCards(colors) {\n const gameBoard = document.getElementById(\"game\");\n \n colors.forEach((color,idx)=>{\n // for each color\n // create a div\n // creat a listener\n // give them a class of the color looped over\n let newCard = document.createElement(\"div\");\n newC...
[ "0.8318036", "0.8278419", "0.81181264", "0.8103234", "0.80994916", "0.8086859", "0.80791265", "0.8076519", "0.806841", "0.8042765", "0.8038181", "0.8031464", "0.8021993", "0.8010136", "0.80096376", "0.80023366", "0.80023366", "0.80023366", "0.80023366", "0.80023366", "0.80023...
0.83502465
0
Load an SVG file with XHR and generate an inline SVG code
generateInlineSVG () { const context = this // Reset first. Remove all the code of the existing inline SVG this.resetInlineSVG() // Get the content of the SVG file const request = new XMLHttpRequest() request.open('GET', this.src, true) request.onload = function () { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateInlineSVG () {\n const context = this\n\n // reset first\n this.isSVGReady = false\n let svgElement = this.$el.getElementsByTagName('svg')[0]\n if (svgElement) {\n this.$el.removeChild(svgElement)\n }\n\n // Get the contents of the SVG\n let request = new XMLH...
[ "0.7171952", "0.7051264", "0.689925", "0.68914884", "0.68914884", "0.6856468", "0.68389374", "0.68378836", "0.6788437", "0.6769521", "0.65756726", "0.65214515", "0.65131146", "0.6442549", "0.6427336", "0.6403605", "0.6387026", "0.6366647", "0.63308877", "0.63015014", "0.62492...
0.7274069
0
Returns width of div
function getDivWidth(div_id){ return $("#" + div_id).width(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDivElementWidth(element) {\n var style = getComputedStyle(element[0]);\n if (style)\n return style.width;\n else\n return \"0\";\n }", "function getWidth(el) {...
[ "0.81341505", "0.76321816", "0.7466168", "0.7373589", "0.7353728", "0.7345602", "0.7230072", "0.7230072", "0.7230072", "0.71801156", "0.7124252", "0.71108985", "0.7109329", "0.70913184", "0.7050703", "0.7048006", "0.7021077", "0.7004909", "0.6990754", "0.6987911", "0.6973146"...
0.79363835
1
Show idle timeout warning dialog.
function IdleWarning() { $("#timeout").css({'display':'block'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IdleWarning() {\n clearTimeout(warningTimer);\n timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);\n $(\"#timeout\").dialog({\n modal: true\n });\n // Add code in the #timeout element to call ResetTimeOutTimer() if\n // the \"Stay Logged In\" butt...
[ "0.79637754", "0.7957691", "0.7596571", "0.7429778", "0.7232342", "0.68363315", "0.6781406", "0.67310286", "0.67287314", "0.6709336", "0.65398586", "0.64067", "0.6362511", "0.6346632", "0.63168156", "0.63061965", "0.6271576", "0.6269282", "0.6180368", "0.61773443", "0.6161117...
0.82552487
0
comparison with the Logical And Operator
function testLogicalAnd(vau){ if(vau <=100 && vau >= 50){ return "yes"; } return "No"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function andOp(a, b){\r\n return (a === true) ? b :\r\n (a === false) ? false : error(and);\r\n}", "function and(a, b) {\n return a && b\n}", "function and()\t{\t\n\tdebugMsg (l+\":and()\");\n\tvar r=pop();\n\tvar l=pop();\n\t\t\t \t \n\tif(l.type.and(r.type)) {\n\t\tpush(jsValue.create(\"_$bo...
[ "0.7553537", "0.7518964", "0.74660385", "0.74264866", "0.7379892", "0.73796004", "0.7369267", "0.7369267", "0.7369267", "0.7336025", "0.7304306", "0.72853076", "0.72691095", "0.72691095", "0.72691095", "0.72691095", "0.72691095", "0.72691095", "0.72691095", "0.72691095", "0.7...
0.75463396
1
this function will be called when clicked on Submit Money Button(at the time of collecting money from delivery boy) first it will check whether any delivery boy is selected from the list or not if not selected the it return Please select delivery boy from the dropdown else it will check whether any comment will be prov...
function submitMoney() { var comments = $('textarea#submitMoneyComment').val().trim(); var selectedDeliveryBoyId = $("#deliveryBoyList").val(); var selectedDeliveryBoyName = $( "#deliveryBoyList option[value='" + selectedDeliveryBoyId + "']") .text(); console.log("Submit Money :- Comments :- " + comme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function okSelected(e){\n handleInputPayeeAccClose();\n if ((e.selectedValue != undefined) &&(e.selectedValue != null) && (e.selectedValue.length>0)){\n document.getElementById(\"billing.input.text\").value = e.selectedValue;\n //loadInfoFromIdAccount();\n ...
[ "0.65581554", "0.6433565", "0.62315494", "0.6228191", "0.62144643", "0.6180419", "0.6114265", "0.6098965", "0.60890245", "0.6081804", "0.60806984", "0.60731894", "0.6031276", "0.6025838", "0.6006334", "0.5984349", "0.5984161", "0.5944876", "0.59395504", "0.59139013", "0.59084...
0.66512275
0
this function is used to enable input box(money provided) when clicked on edit money provided button
function editMoneyProvided() { $("#moneyProvidedInputBox").prop('disabled', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enableCashRegisterEdit() {\n toggleCashRegisterEditState(\"enable\");\n}", "function enableEditModal() {\n $('[name=\"name\"], [name=\"supplier-email\"], [name=\"count\"], [name=\"price\"], [name=\"delivery-type\"], [name=\"country\"], [name=\"city\"]').prop('disabled', false);\n }", "fun...
[ "0.67136514", "0.6572782", "0.6486518", "0.64708483", "0.6422578", "0.6407773", "0.63958836", "0.63795274", "0.63732773", "0.6345836", "0.63409716", "0.63237935", "0.6321573", "0.63206935", "0.6248658", "0.6208166", "0.6202915", "0.6170628", "0.61661816", "0.6165703", "0.6163...
0.8178941
0
Switch state to trigger confirm withdrawl dialog
function confirmWithdraw() { setShowDialog(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterConfirmMode()\n {\n if (this.saveConfirm)\n {\n this.saveConfirm=0;\n this.setState({buttonState:this.normalMenu});\n return;\n }\n\n this.setState({buttonState:[[\"Confirm Save\",\"/icons/confirm.png\"],[\"Cancel Save\",\"/icons/naw.png\"]]});\n...
[ "0.7145661", "0.69942015", "0.69918776", "0.6857713", "0.6843553", "0.676095", "0.6680399", "0.6680399", "0.6649836", "0.6567328", "0.6562695", "0.65621275", "0.65580094", "0.65503174", "0.6514917", "0.6509768", "0.65094423", "0.6500776", "0.64868397", "0.64835334", "0.648212...
0.7329735
0
Fomulate the sql and retrieve the database names from the local server which populates the selector. This is on the assumption that all databases have a test database existing.
async fill_selector()/*:Promise<void>*/{ // //Empty the options in the dbnames of the previous selection; this.dbname_selector.innerHTML=""; // //Get the selected database type const type=/*<metavisuo.schema.db_type>*/this.type_selector.value; // //Fetch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_master_all() {\n return DB;\n}", "async databases(databaseName = null, params = {}) {\n var databaseList = _arrFrom(await this.indexedDB.databases());\n return this.matchDatabaseList(databaseList, databaseName, params);\n\t}", "function PickDatabases() {\n var manager = $find('Cf...
[ "0.5906103", "0.5814535", "0.5731544", "0.56508946", "0.56372255", "0.55843943", "0.54059047", "0.534816", "0.53063357", "0.526464", "0.5263347", "0.52157587", "0.5195389", "0.5172635", "0.51657015", "0.5127186", "0.5114614", "0.5087435", "0.5078701", "0.50781405", "0.5043403...
0.61526877
0
The currently selected dbname as set by the user.
get dbname()/*:string*/{return this.dbname_selector.value;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get databaseNameInput() {\n return this._databaseName;\n }", "getDbName() {\r\n return this.#dbName;\r\n }", "function database() {\n // use constructor - this literal is confusing\n var db_re = new RegExp('/(.*)/'),\n db_raw = db_re.exec(document.location.pathname)...
[ "0.6994748", "0.68229705", "0.65632266", "0.64410174", "0.629549", "0.6207536", "0.61625606", "0.61354476", "0.6030582", "0.5953641", "0.59276676", "0.5675214", "0.55151796", "0.5512078", "0.54865044", "0.5482466", "0.5433855", "0.54331803", "0.54284847", "0.5417502", "0.5413...
0.6971414
1
The type of database selected by the user.
get db_type()/*:metavisuo.schema.db_type*/{return /*<metavisuo.schema.db_type>*/this.type_selector.value;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDbType() {\n\t\t\t// Fix. Do something functional to infer correct db type...\n\t\t\treturn type='mongo';\n\t\t}", "function getDatabaseTypeFromUiType(type) {\n switch(type) {\n case 'date': return 'posting_date';\n case 'eyeColor': return 'eye_color';\n case 'hairColor': return 'ha...
[ "0.70835406", "0.7016902", "0.6717871", "0.6587363", "0.64149076", "0.6227614", "0.62159455", "0.5813317", "0.57694155", "0.57655126", "0.5717116", "0.5713998", "0.57079864", "0.5698782", "0.5646118", "0.56131965", "0.5593756", "0.55908775", "0.55479586", "0.5531179", "0.5511...
0.75515836
0
Returns the dbase which is obtained via the javascript library
async get_dbase(dbtype/**:metavisuo.schema.db_type*/, dbname/*:string*/)/*:Promise<metavisuo.alterable_database>**/{ // // // //Check if the database is alraedy opened; if it is, use the opened // //database; otherwise, open a fresh one // if (metavisuo.alterable_database.opened_databases[d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function database(){\n\treturn dbase;\n}", "getDb(uid){\n var dbs = this.getDbs();\n return dbs[uid];\n }", "function apibase() {\n var scripts = document.getElementsByTagName('script'),\n script = scripts[scripts.length - 1];\n\n return script.src.substr(0, script.src.lastIndex...
[ "0.71711606", "0.6109987", "0.57894886", "0.5746713", "0.5725021", "0.5651683", "0.5454971", "0.5419559", "0.5414081", "0.53395003", "0.5312248", "0.5275655", "0.5266922", "0.5213352", "0.51940733", "0.5155369", "0.51542467", "0.51406115", "0.5099118", "0.5098669", "0.5085783...
0.6195759
1
Return a selected entity if there is a selected element or a false if no selected element
get_selected(){ // //Get the affected/selected entity that we want to alter. The altering //an entity can only happen if there is a selected element const selection = document.querySelector('[selected=true]'); // //Test if the selection is a null or undefined and return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TreeWidgetElem_isSelected()\n{\n\tvar o=this;\n\tif(o.treeView.multi)//multi selection\n\t{\n\t\tvar idx = arrayFind(o.treeView,'selIds',o.id);\n\t\treturn (idx>=0);\n\t}\n\telse\n\t{\n\t\treturn (o.id == o.treeView.selId);\n\t}\n}", "get selected() {\n return this.multiple ? this._selectionModel...
[ "0.6717955", "0.65950495", "0.65950495", "0.65950495", "0.6481627", "0.64763695", "0.64544535", "0.64210147", "0.64210147", "0.64210147", "0.64210147", "0.6420626", "0.63181996", "0.6317827", "0.6279198", "0.622958", "0.6182439", "0.61653125", "0.6163844", "0.61529297", "0.61...
0.8045726
0
Review the records of the selected entity
static review_entity(){ // //returns either a swelected entity or a false const $entity = this.get_selected(); // //If no selected entity return alert an error msg if ($entity===false){ alert('please select an entity to do this operation'); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "printRecord() {\n this.edit(this.form.id, true);\n }", "_toggleRecord(e) {\n if (e.getData()) {\n this.getEngine().record();\n }\n }", "editRecord(vo) {\n this.vo = angular.copy(vo);\n }", "function propagateChanges(records, comments) {\n _.each(records, function(...
[ "0.55275446", "0.52824295", "0.52745396", "0.5270561", "0.52674717", "0.5185506", "0.51472443", "0.51269275", "0.5122627", "0.5097295", "0.5055667", "0.5032343", "0.5029247", "0.50231755", "0.5014469", "0.50103766", "0.5004904", "0.49817207", "0.49742785", "0.49544597", "0.49...
0.64627635
0
Create a new record for the selected entity using a new window
static create_records() { // //Get the $name of the selected entity using the id as tname meaning table name let $tname = document.querySelector('[selected=true]').id; // //Open an empty brand new window let $win = window.open("page_create.php"); // $win.o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newRecord() {\n\t\tvar num = Math.round(Math.random() * 10000); // random data\n\t\tdb.transaction(function(tx) {tx.executeSql(\n\t\t\t\"INSERT INTO Table1Test (id, text) VALUES (?, ?)\",\n\t\t\t[num, document.querySelector('#wdb-todoitem').value ],\n\t\t\tfunction(tx, result) {\n\t\t\t\tlog.innerHTML = '...
[ "0.65209055", "0.6517741", "0.6314755", "0.62686837", "0.61795837", "0.61697674", "0.615594", "0.6153371", "0.61170405", "0.6076547", "0.60266495", "0.60110945", "0.5997031", "0.59792554", "0.59398013", "0.5878339", "0.5873707", "0.58699405", "0.5869036", "0.5828979", "0.5828...
0.6954663
0
Compiles all the metadata of a prticular entity preparing to be saved as a comment to the respective entity.
complete_table_comment()/**Array<{ename,comment}> */{ // //Get the collection of all the entities represented by the ellipses that represents all the //tables of a particular database. const ellipses/**Array<SVGEllipseElement> */ = Array.from(document.querySelectorAll('ellipse')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileEntity() {\n var entity = extend({\n buildId: bff.key(payload),\n extension: file.extension,\n filename: file.filename,\n fingerprint: print,\n url: file.url\n }, payload);\n\n return entity;\n }", "function ...
[ "0.5776256", "0.5538514", "0.53899306", "0.5373562", "0.5371611", "0.53242224", "0.53242224", "0.53242224", "0.5301464", "0.52966785", "0.52859515", "0.52384716", "0.5219108", "0.5196642", "0.5184886", "0.5184886", "0.5184886", "0.51751876", "0.51694906", "0.51694906", "0.509...
0.5619901
1
on click we close the database
static close_dbase() { location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function close(){ \n database.close();\n return;\n }", "closeDB() {\n\t\tdb.close();\n\t}", "function close() {\n bulmaModal.destroy();\n }", "function close() {\n \n }", "close() {\n this.db.close();\n }", "close() {\n if (...
[ "0.73501396", "0.71131814", "0.708054", "0.708048", "0.69487256", "0.68995106", "0.6855363", "0.6853647", "0.68471044", "0.6824477", "0.67608786", "0.66781956", "0.6669891", "0.66388834", "0.6634546", "0.6629978", "0.66127497", "0.66016537", "0.65799385", "0.6553991", "0.6539...
0.71395254
1
Display the relation in a new window to enable the users to edit
static edit_relation(){ // //Test if there is a selected element is a relation // //Get the selected element const selected = document.querySelector('[selected=true]'); // //1. There was no element selected alert an element has to selected if(selected....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openDetailsWindow(association) {\n re.windows.details_window.show();\n re.windows.masks.details_window_mask = new Ext.LoadMask('details-window', {\n msg: \"Loading Data...\"\n });\n re.windows.masks.details_window_mask.show();\n renderMedlineDocuments(association);\n}", "function o...
[ "0.5908989", "0.58271635", "0.5782866", "0.57044905", "0.56364113", "0.56331295", "0.5598236", "0.5571474", "0.5561747", "0.5559654", "0.55524755", "0.5545493", "0.5537355", "0.5508773", "0.54855144", "0.54766184", "0.543647", "0.5408661", "0.5390631", "0.5359853", "0.5335133...
0.69600797
0
Saves the relation by compiling a comment
static save_relation(win, ename, cname){ const comment= {}; // //Get the value of the start comment["start"]=win.document.getElementById("start").value; // //Get the end of the comment comment["end"]= win.document.getElementById("end").innerText; // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateComment(comment) {\n comment.save().then(() => {\n // debug('comment updated');\n });\n }", "save(options={}, context=undefined) {\n console.assert(this.get('canSave'),\n 'save() called when canSave is false.');\n\n const extraData = _.clone(this.get...
[ "0.6260497", "0.5824805", "0.5806141", "0.57759637", "0.5713301", "0.5622263", "0.55822784", "0.5568857", "0.5462551", "0.5436346", "0.53963614", "0.53767383", "0.5308935", "0.5305719", "0.5304615", "0.5303337", "0.5297741", "0.529645", "0.52963847", "0.5265511", "0.52498114"...
0.6544614
0
fill the selector with the hidden entities
static fill_hidden(){ // //Get the select to be popilated with the hidden entities const select= document.getElementById('hidden'); // //Get all the hidden entities const entities = databases[page_graph.dbname].entities; // //filter entities and remai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static hide_element(evt) {\n //\n //Get the selected elements name which is its id.\n const element = document.querySelector('[selected=true]').id;\n //\n //Get the selected group containing the text and the attributes t spans \n const group = document.getElementById(`${el...
[ "0.5961822", "0.5935435", "0.58360416", "0.5684932", "0.56322557", "0.5499093", "0.5431257", "0.54092306", "0.5397977", "0.5393281", "0.5372786", "0.5362814", "0.53605044", "0.53586936", "0.5354393", "0.532701", "0.5307599", "0.5287769", "0.5286558", "0.528307", "0.5275859", ...
0.7133903
0
function that runs when a seat is clicked
function onClick(element) { // alert("You clicked " +element.title); var currentPrice; //if seat is available it can be clicked and turned black //this adds seat to the array if (element.title == "available") { element.title = "selected"; document.getElementById(element.id).style.b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seatClicked(seatID)\r\n{\r\n\t\r\n\t// GET THE SPOT INFORMATION ABOUT THE CURRENT USER\r\n\tgetUserStatus(seatID);\r\n\r\n}", "function updateSeats(){\n $(\"#selected\").trigger('click');\n}", "function searchSeats(value){\n\tmapAttr.clicked(currentMap.seatData[value].mapSelect);\n}", "function a...
[ "0.8006775", "0.6717042", "0.65220785", "0.6485928", "0.64461255", "0.63897073", "0.6371378", "0.6311488", "0.62806636", "0.61586607", "0.6086652", "0.6085376", "0.6077432", "0.6072742", "0.60442966", "0.6034598", "0.60246193", "0.60212404", "0.5987674", "0.59783834", "0.5976...
0.68285215
1
button on the enter information page user inputs their info and then either moves onto the confirmaton page or exchanges their tickets ( which makes up most of the code in this function )
function EnterInfoButton(event, toolName, tipName) { let input = document.getElementById("EnterInfo_form"); fname = input.elements[0].value; lname = input.elements[1].value; //address = input.elements[2].value; phone = input.elements[2].value; email = input.elements[3].value; payment...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function controlinfo() {\n\t\n\tvar numberoftickets=parseInt(document.getElementById(\"tickets\").value);\n\t\n\t//if more than 3, display pop up\n\tif(numberoftickets>3)\n\t{\n\t\talert(\"Hand me your keys and start riding your bike!\");\n\t\n\t}\n\telse {\n\t\talert(\"Enter your age and car value\");\n\t\t//allo...
[ "0.63814133", "0.6355859", "0.6242428", "0.60960907", "0.60393745", "0.60217756", "0.5972755", "0.5934397", "0.5909795", "0.5880359", "0.5872749", "0.5816942", "0.5814789", "0.58136725", "0.5807518", "0.578308", "0.5770723", "0.5767906", "0.57678515", "0.57436985", "0.5713160...
0.7068093
0
confirm button the user confirms their info and the ticket info is put into the database the seats are also reserved in the show database
function confirmBtn() { //PUT TICKET INFO IN DB let stringClickedSeats = clickedSeats.join(''); let updatedSeatsTaken = showTickets.SeatsTaken + stringClickedSeats; let data = {showID: showTickets.showID, seatsTaken: updatedSeatsTaken}; $.post("/tickets/show_update", data, function(result){ }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BookingTicket() {\n if (TicketId.length !== 0) {\n UserInfoDialogClean();\n $(\"#SelectedTicketNumber\").text(\"You have picked these seat number \" + TicketId);\n $('#UserInformation').modal('show');\n } else {\n swal({\n title: \"Not Selected!\",\n text: \"P...
[ "0.6638952", "0.6499076", "0.6407976", "0.6181665", "0.6148088", "0.6109513", "0.6063018", "0.60486126", "0.5995515", "0.59780556", "0.5887921", "0.5845562", "0.5835448", "0.58150935", "0.5805539", "0.57832223", "0.57717896", "0.5735744", "0.5703535", "0.56928134", "0.5682332...
0.792742
0
collect the event Ids associated with the email return an array of event Ids
function getEventIds(email,instance) { Logger.log(instance); var events = []; var prefix = boMap[instance].prefix; if (instance === "Queens South PL System Beta") { var regData = SpreadsheetApp.openById(props[prefix+"_reg_data_id"]).getSheetByName("form registrations").getDataRange().getValues(); } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNotificationIds() {\n var notificationIds = toArray(new String(event.parm2));\n return notificationIds;\n}", "assignIDs(events) {\n\t\treturn events.map((event, index) => {\n\t\t\tevent.id = index;\n\t\t\tevent.date = moment(event.date, \"DD-MM-YYYY hh:mm:ss\");\n\t\t\treturn event;\n\t\t});\n\t}",...
[ "0.6384557", "0.6298444", "0.628147", "0.6127195", "0.59637916", "0.59396136", "0.5938684", "0.5829618", "0.5829054", "0.5829054", "0.5829054", "0.57594395", "0.5658812", "0.56307405", "0.56277543", "0.56008977", "0.55971926", "0.5503676", "0.5488544", "0.5479734", "0.5465799...
0.7371483
0
get from the server the current number of tweets
function update_count(){ $.ajax('/count').done(function(data){ $('#tweets').text(data.count) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTweetCount(msg){\n\n\t//get URL that the user entered\n\tvar url = msg.match[1];\n\t//RegEx to test if url entered was an actual URL\n\tvar pattern = new RegExp('^(https?:\\\\/\\\\/)?'+ // protocol\n \t'((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|'+ // domain name\n \t'((\\\\d{1,3}\\\\.){...
[ "0.681376", "0.6738727", "0.6604657", "0.64718926", "0.6461143", "0.64585227", "0.64426464", "0.64208025", "0.6419714", "0.6416408", "0.6396132", "0.6395434", "0.6372862", "0.63529956", "0.63517505", "0.63223493", "0.63181823", "0.63055974", "0.63054705", "0.6304446", "0.6304...
0.7640396
0
ChimeiMapType as a Overlay Map Type
function ChimeiMapType() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initMap() {\t\n\n\t// Create a new StyledMapType object, passing it an array of styles,\n // and the name to be displayed on the map type control.\n var styledMapType = new google.maps.StyledMapType(\n\t[\n\t {\n\t \"elementType\": \"geometry\",\n\t \"stylers\": [\n\t {\n\t \"colo...
[ "0.6746183", "0.66050667", "0.6550062", "0.6507603", "0.631885", "0.6266082", "0.6174719", "0.61270833", "0.6114486", "0.61025804", "0.6060269", "0.60486424", "0.60286194", "0.60227615", "0.5975506", "0.5962577", "0.59525037", "0.5946287", "0.59196866", "0.59110165", "0.58864...
0.78109413
0
MeshMap a subclass of OverlayView
function MeshMap(map) { this.setMap(map); this.map = map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setExtoverViewMapControl(map) {\r\n // Initialize two maps: one full size and one in a small div in the corner\r\n // of the large map.\r\n /*var map = new google.maps.Map(document.getElementById(mapDivID), {\n \"noClear\": true\n });\n */\r\n var overlayMa...
[ "0.6079294", "0.6066778", "0.60325193", "0.60151684", "0.59368604", "0.59368604", "0.59172857", "0.5902877", "0.5861375", "0.58392125", "0.58249867", "0.56813633", "0.5673306", "0.56707007", "0.5615407", "0.56057274", "0.5602143", "0.55810344", "0.5572008", "0.55321336", "0.5...
0.6908672
0
Triggered when the user changes the "Follow" checkbox.
onFollowChange() { const checked = this.followCheckbox.prop('checked'); this.followCheckbox.prop('disabled', true); this.firebaseHelper.toggleFollowUser(this.userId, checked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trackFollowStatus() {\n if (this.auth.currentUser) {\n this.firebaseHelper.registerToFollowStatusUpdate(this.userId, (data) => {\n this.followCheckbox.prop('checked', data.val() !== null);\n this.followCheckbox.prop('disabled', false);\n this.followLabel.text(data.val() ? 'Following' :...
[ "0.78710246", "0.7113208", "0.68942064", "0.6661407", "0.6434447", "0.62712324", "0.61934155", "0.6036313", "0.5986344", "0.5982165", "0.59555554", "0.59302884", "0.5928922", "0.59206027", "0.5913671", "0.590254", "0.58452976", "0.5804073", "0.57403755", "0.57260764", "0.5635...
0.81272733
0
Triggered when the user changes the "Block" checkbox.
onBlockChange() { const checked = this.blockCheckbox.prop('checked'); this.blockCheckbox.prop('disabled', true); this.firebaseHelper.toggleBlockUser(this.userId, checked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trackBlockStatus() {\n if (this.auth.currentUser) {\n this.firebaseHelper.registerToBlockedStatusUpdate(this.userId, (data) => {\n this.blockCheckbox.prop('checked', data.val() !== null);\n this.blockCheckbox.prop('disabled', false);\n this.blockLabel.text(data.val() ? 'Blocked' : 'Blo...
[ "0.73571795", "0.64392126", "0.6341934", "0.6219979", "0.6219979", "0.6219765", "0.60906756", "0.60654706", "0.6048201", "0.5993771", "0.5932376", "0.5885564", "0.58735454", "0.5863304", "0.58534586", "0.5852221", "0.58506197", "0.5846253", "0.5837576", "0.58233243", "0.58205...
0.8024298
0
Starts tracking the "Follow" checkbox status.
trackFollowStatus() { if (this.auth.currentUser) { this.firebaseHelper.registerToFollowStatusUpdate(this.userId, (data) => { this.followCheckbox.prop('checked', data.val() !== null); this.followCheckbox.prop('disabled', false); this.followLabel.text(data.val() ? 'Following' : 'Follow')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onFollowClicked() {\n\tApplicationState.following = !ApplicationState.following;\n\n\tif (ApplicationState.following) {\n\t\tfor (streamer of ApplicationState.streamers) {\n\t\t\tstreamer.follower.enable();\n\t\t}\n\t} else {\n\t\tfor (streamer of ApplicationState.streamers) {\n\t\t\tstreamer.follower.dis...
[ "0.67118347", "0.64391524", "0.60145766", "0.6013313", "0.5922268", "0.5874069", "0.5864742", "0.58038116", "0.5760382", "0.57049334", "0.5694447", "0.56813896", "0.56501293", "0.5636312", "0.55954504", "0.55842227", "0.55842227", "0.5533975", "0.55166805", "0.54996127", "0.5...
0.77801985
0
Starts tracking the "Blocked" checkbox status.
trackBlockStatus() { if (this.auth.currentUser) { this.firebaseHelper.registerToBlockedStatusUpdate(this.userId, (data) => { this.blockCheckbox.prop('checked', data.val() !== null); this.blockCheckbox.prop('disabled', false); this.blockLabel.text(data.val() ? 'Blocked' : 'Block'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start()\n {\n if (this._started)\n return;\n\n Prefs.on(\"blocked_total\", this._onBlockedTotal);\n\n this._downloader.scheduleChecks(CHECK_INTERVAL, INITIAL_DELAY);\n this._started = true;\n }", "block () {\n this.blocked = true;\n }", "function markThreaded(){\r\n State.treaded ...
[ "0.6816204", "0.6543038", "0.597043", "0.59356874", "0.59356874", "0.59271395", "0.5903144", "0.5883041", "0.58728635", "0.58728635", "0.58728635", "0.58728635", "0.5822951", "0.5742518", "0.5709292", "0.56918454", "0.569124", "0.55512094", "0.55484945", "0.553117", "0.543352...
0.7395542
0
Displays the list of followed people.
async displayFollowing() { const profiles = await this.firebaseHelper.getFollowingProfiles(this.userId); // Clear previous following list. $('.fp-usernamelink', this.followingContainer).remove(); // Display all following profile cards. Object.keys(profiles).forEach((uid) => this.followingContainer.p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFollowing() {\n\n\tvar postData = {\n\t\tusername: $(\"#username\").text().split(\"@\")[1]\n\t}\n\n\t$.ajax({\n\t\ttype \t\t: \t'POST',\n\t\turl\t\t\t: \t'../php/display_following.php', \n\t\tdata \t\t: \tpostData,\n\t\tdataType\t: \t'JSON',\n\t\tsuccess\t\t: \tfunction(data) {\n\t\t\tvar length =...
[ "0.6729007", "0.66358995", "0.63301224", "0.62643635", "0.6235799", "0.6122031", "0.6093615", "0.6077785", "0.60357106", "0.59907055", "0.5942008", "0.5933814", "0.59298074", "0.58800316", "0.58784837", "0.58680195", "0.58673847", "0.58522815", "0.5847816", "0.5833205", "0.58...
0.66582364
1
Given a list and a predicate, returns a pair of lists where the first list contains all elements of the original list for which the predicate evaluated to true, and the second returned list contains other elements from the original list.
function partition(predicate, list) { var passed = list.filter(predicate); var failed = list.filter(function(e) { return !predicate(e); }); return [passed, failed]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter(list, predicate){\n\tvar result = [];\n\tfor(var i=0;i<list.length;i++){\n\t\tvar item = list[i];\n\t\tif (predicate(item) )\n\t\t\tresult.push(item);\n\t}\n\treturn result;\n}", "function filter(list, predicate) {\r\n if (list == null) {\r\n return null;\r\n }\r\n var filtered = ...
[ "0.6605033", "0.61551243", "0.60987467", "0.5769721", "0.5758798", "0.5616585", "0.56143475", "0.54876614", "0.54553086", "0.5453156", "0.54086876", "0.540799", "0.5369274", "0.53353035", "0.52869534", "0.5268402", "0.5263548", "0.525448", "0.5252615", "0.5252615", "0.5252615...
0.6825953
0
checks that the three Card objects form a set Returns false if NOT a set, true if a set
function verifySet(card1, card2, card3){ /* checks counts are all same or all different */ if(card1.count == card2.count && card1.count != card3.count || card1.count == card3.count && card1.count != card2.count || card3.count == card2.count && card1.count != card3.count){ return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isASet(array) {\n\t// A Set must have 3 cards.\n\tif (array.length !== SIZE_OF_SET) {\n\t\treturn false;\n\t}\n\n\tvar attributes = {\n\t\tnumbers: 0, \n\t\tcolors: 0,\n\t\tshapes: 0,\n\t\tshades: 0\n\t};\n\n\tfor (var i in array) {\n\t\tattributes.numbers += array[i].number;\n\t\tattributes.colors += ...
[ "0.7667401", "0.72972643", "0.71230984", "0.67781955", "0.6774107", "0.6738123", "0.6435292", "0.63635725", "0.6330251", "0.62819886", "0.625361", "0.625361", "0.62014043", "0.6154441", "0.6141457", "0.6141457", "0.61333853", "0.6115944", "0.6110066", "0.6110066", "0.6095171"...
0.7715169
0
Returns an array of index positions in currentDeal if currentDeal has a set; returns false otherwise
function find_set(){ for(var i = 0; i < current_deal_size(); i++){ for(var j = 0; j < current_deal_size(); j++){ for(var k = 0; k < current_deal_size(); k++){ let card1 = currentDeal[i]; let card2 = currentDeal[j]; let card3 = currentDeal[k]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_index(states){var i,x\n for(i=states.length;i--;) if(states[i]){\n assert(x==undefined,'no overlapping csets in DLO')\n x=i}\n return x}", "function isAddingToSettlement(position, settlements) {\n\t\tvar row = position[0][0];\n\t\tvar col = position[1][0];\n\t\tvar adjTo = [];\n\t\tconsole.log...
[ "0.59616387", "0.56525856", "0.5325261", "0.529037", "0.5248415", "0.5202035", "0.5176863", "0.5175258", "0.5143434", "0.5099832", "0.5087696", "0.5059649", "0.504913", "0.504206", "0.5023902", "0.5001496", "0.49888343", "0.49824587", "0.4979571", "0.49784723", "0.4964663", ...
0.7806965
0
draws three cards from the deck and adds them to currentDeal
function addThreeCards(){ if(this.deck.get_size() > 0){ for(var i = 0; i < 3; i++){ currentDeal.push(this.deck.draw_Card()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawThree(){\n let newCards = deck.drawThree();\n setHand([...newCards, ...hand]);\n }", "function initialDeal(){\n for(var i = 0; i < INIT_DEAL_SIZE; i++){\n currentDeal.push(this.deck.draw_Card());\n }\n while(find_set() == false){ //if no Set, add cards\n console.log(\"a...
[ "0.7302955", "0.7017707", "0.6943848", "0.69348", "0.6908124", "0.6901617", "0.6674983", "0.666634", "0.66630286", "0.66436404", "0.6603002", "0.6573911", "0.65505755", "0.6543984", "0.65290606", "0.64952624", "0.64878064", "0.64816624", "0.64721185", "0.6471964", "0.6429455"...
0.80046386
0
Sends a window alert with the scores of all current players
function reportScores(prefix){ let scores = prefix + "\n\nCurrent Scores:\n\n"; if(computerEnabled){ scores += "Computer: " + compScore + "\n"; } for(i = 0; i < humanScores.length; i++){ scores += "Player " + (i+1) + ": " + humanScores[i] + "\n"; } window.alert(scores); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayScore() {\r\n\r\n player1Win.innerText = `Nombre de parties gagnées par le joueur ${player1} : ${gamesWonPlayer1}`;\r\n player2Win.innerText= `Nombre de parties gagnées par le joueur ${player2} : ${gamesWonPlayer2}`;\r\n nobodyWon.innerText = `Nombre de parties nulles : ${gamesWonNobody}`;...
[ "0.7031369", "0.69225377", "0.6758865", "0.6697634", "0.6662851", "0.6653112", "0.66223574", "0.6606765", "0.66044456", "0.6587637", "0.65699357", "0.6568617", "0.653616", "0.6529464", "0.65248895", "0.6520037", "0.65192467", "0.65189224", "0.6510815", "0.65023816", "0.646527...
0.70328146
0
sends a window alert with the locations of the cards in a set displays a grid where the X's mark the locations of the cards in the set
function hint(){ if(current_deal_size() > 0){ var hint = find_set(); if(hint === false){ window.alert("There are no sets in the current Deal"); }else{ let str = "X's mark the locations of cards in a set on the grid\n\n"; for(var i = 0; i < current_deal_siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCardmarkers()\r\n\t {\r\n\t\t for(var marker in cardMarkers)\r\n\t\t {\r\n\t\t\t map.removeLayer(cardMarkers[marker]);\r\n\t\t }\r\n\t\t cardMarkers=new Array();\r\n\t\t for(var card in currentGame.cards)\r\n\t\t {\r\n\t\t\t cardMarkers.push(L.circle([currentGame.cards[card].occuranceLocat...
[ "0.5968728", "0.56956404", "0.56328595", "0.5558877", "0.5427075", "0.5421854", "0.5409204", "0.53667426", "0.5355709", "0.5350627", "0.53470147", "0.53427625", "0.5339191", "0.53338706", "0.5316309", "0.53135765", "0.529498", "0.5287287", "0.5278831", "0.5278461", "0.5274857...
0.6400619
0
Emit a submitted answer on the buttons
function submitAnswer(answer) { //time testing var submitTime = new Date(); var submitTimeInMillis = submitTime.getTime(); console.log(submitTimeInMillis + ' - Time Answer Selected: '); socket.emit('submission', document.getElementById(answer).value, submitTimeInMillis); //Se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendResults() {\n document.querySelector(\"#my-answers\").submit();\n }", "onSubmit(answer) {\n // Raise our callback \n this.onAnswer({\n answer\n });\n }", "onSubmit(value) {\n this.status = 'answered';\n\n // Rerender prompt\n this.render();\n\n...
[ "0.7067777", "0.69706935", "0.6798889", "0.6759558", "0.6719604", "0.66764057", "0.6669913", "0.6667669", "0.6640207", "0.66372997", "0.6616446", "0.6615787", "0.6601024", "0.65785044", "0.6558726", "0.65351075", "0.65246576", "0.65017897", "0.6487042", "0.6438572", "0.642144...
0.69713646
1
Substituindo &quot por caractere espeical
function replaceSpecialCharacter(jokeReturn) { return jokeReturn.replace(/&quot;/g, '"'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esc_quot(text){\n return text.replace(\"\\\"\", \"\\\\\\\"\");\n }", "function replaceQuote(a) {\n a = a.replace(/\\'/, '%92');\n a = a.replace(/%27/gi, '%92');\n return a;\n}", "function replaceQuote(a) {\n a = a.replace(/\\'/, '%92');\n a = a.replace(/%27/gi, '%92');\n return a...
[ "0.7274707", "0.6892255", "0.6892255", "0.686901", "0.6859356", "0.67661035", "0.6560702", "0.6549735", "0.6546042", "0.6546042", "0.6546042", "0.6498051", "0.6477224", "0.645539", "0.6431661", "0.64179623", "0.6355993", "0.63462377", "0.63002205", "0.62938744", "0.62915367",...
0.702589
1
Buy in quantities of quantity while the asking price is at or below our goal price until i is 0. Wait if the asking price is too high or the askSize is too small.
function buyMore(i) { var buyOrder = { 'account': creds.account, 'venue': creds.venue, 'symbol': creds.stock, 'price': 0, 'qty': 0, 'direction': "buy", 'orderType': "limit" }; var sellOrder = { 'account': creds.account, 'venue': creds.venue, 'symbol': creds.stock, 'pri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\n connection.query(\"SELECT * FROM products\", function(err, results) {\n if (err) throw err;\n inquirer\n .prompt([\n {\n name: \"item_id\",\n type: \"rawlist\",\n choices: function() {\n var choiceArray = [];\n for (var i =0; i ...
[ "0.66908497", "0.6637291", "0.6624076", "0.65318197", "0.65211844", "0.6460724", "0.6454487", "0.63969845", "0.63281786", "0.63066214", "0.6283891", "0.62674195", "0.62502927", "0.6222525", "0.621908", "0.6216171", "0.6209236", "0.62010694", "0.6192539", "0.6187518", "0.61759...
0.7022335
0
Gets a public event by id.
static getPublicEvent(id: number): AxiosPromise<Event> { let url = url_base + '/event/' + id; return axios.get(url, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEvent(id) {\n return apiClient.get('/events/' + id)\n }", "function GetById(id) {\n return $http.get('http://localhost:8080/api/events/' + id).then(handleSuccess, handleError('Error getting event by id.'));\n }", "function GetEvent(id) {\r\n var req = {\r\n ur...
[ "0.76246643", "0.75664204", "0.7281848", "0.66285014", "0.66285014", "0.6166659", "0.6149157", "0.6145445", "0.6096278", "0.5976054", "0.59456825", "0.5893699", "0.5873318", "0.57953376", "0.57795", "0.5698313", "0.56756014", "0.56601894", "0.5650715", "0.564998", "0.56396705...
0.8096346
0
Get all ticket types on a single event by id.
static getPublicEventTickets(id: number): AxiosPromise<TicketType[]> { let url = url_base + '/event/' + id + '/tickets'; return axios.get(url, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventTypes() {\n\t \tjobEventTypeService.getAll(function(response) {\n\t \tjac.eventTypes = response;\n\t \t\n\t }, function() {\n\t \n\t });}", "function getHandoffsForEvent(id) {\n var interactions = flashTeamsJSON[\"interactions\"];\n var eventHandof...
[ "0.57375157", "0.548858", "0.5381929", "0.525325", "0.5250047", "0.5236331", "0.51973355", "0.51506233", "0.5092008", "0.5079025", "0.5078848", "0.5063323", "0.50411505", "0.50281924", "0.50281924", "0.5012793", "0.50042325", "0.49386382", "0.49203426", "0.49166676", "0.49098...
0.6875529
0
Get all artists on an event by id.
static getPublicArtist(id: number): AxiosPromise<Artist[]> { let url = url_base + '/event/' + id + '/artist'; return axios.get(url, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArtists(id) {\n let path = \"/artists\";\n if (id) {\n path += \"/\" + id;\n }\n\n // the \"initial request\" promise -- resolves to a Response object\n const requestPromise = fetch(path);\n\n const jsonPromise = requestPromise.then(\n (response) => {\n if (response.ok) {\n retu...
[ "0.7332424", "0.6703484", "0.6624849", "0.6415164", "0.63716334", "0.6258387", "0.6239356", "0.62341714", "0.6150942", "0.6149123", "0.61000705", "0.59154946", "0.58489573", "0.5784728", "0.5735115", "0.5726994", "0.5716152", "0.5683104", "0.56722724", "0.5642147", "0.5634612...
0.6739847
1
Migrate all srcData to destData If one key not exist in srcData, the value in destData must be empty
function migrate(srcData, destData, defaultValueIfNotExistInSource) { for (var destKey in destData){ if(srcData[destKey] !== undefined) { destData[destKey] = srcData[destKey]; } else { if (defaultValueIfNotExistInSource !== undefined) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyFromData(src, dst) {\n for (var prop in src) {\n if (src[prop] !== undefined && src[prop] != null && ! isFunction(dst[prop]))\n if (dst[prop] instanceof Array) {\n var s = src[prop][0];\n if (s !== undefined && hasProperties(s) && ! (s instanceof Arr...
[ "0.6473502", "0.64004385", "0.6373209", "0.6276079", "0.62110215", "0.6152972", "0.6152972", "0.6152972", "0.6152972", "0.6152972", "0.6152972", "0.6152972", "0.6130016", "0.61151004", "0.5955485", "0.5895132", "0.5829986", "0.56803924", "0.557419", "0.55673516", "0.55399334"...
0.77188873
0
REFRESH THE BACKGROUND! including all images already clicked
function refreshBgImg(){ fill(255); image(img, 0, 0); //draw all the images that have already been clicked on! sectionImgsRevealed.forEach(function(thisImage, idx){ image(thisImage.image, thisImage.section.coords[0], thisImage.section.coords[1], thisImage.section.coords[2], thisImage.section.coords[3] ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeBackgroundImage(o) {\n\t\tvar newBackgroundImageIndex = this.state.backgroundImageIndex + o.clickValue;\n\t\tvar backgrounds = images.filter(item => item.type === \"Background\").map((image, index) => {return {id: index, imageSrc: image.img}});\n\t\tif(newBackgroundImageIndex >= backgrounds.length) newBackgr...
[ "0.69736904", "0.67189854", "0.66327226", "0.6578045", "0.64311355", "0.6370916", "0.63363117", "0.63075787", "0.6307308", "0.62951905", "0.6290606", "0.6266279", "0.6260267", "0.6246965", "0.6245275", "0.62370884", "0.6236518", "0.6228083", "0.6227519", "0.6178535", "0.61646...
0.8247181
0
function to choose next employee role (engineer, inter, or finish/create HTML and CSS)
function chooseEmployee () { inquirer.prompt( { type: "list", name: "role", message: "What employee position would you like to add next?", choices: [{name: "Engineer", value: "Engineer"}, {name: "Intern", value: "Intern"}, {name: "Finish building team", value: "generatepage"}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function askForEmployeeRole() {\n return inquirer\n .prompt([\n {\n message: \"What is your role?\",\n name: \"role\",\n type: \"list\",\n choices: [\"Engineer\", \"Intern\", \"No more employees needed\"],\n },\n ])\n .then((answer) => {\n // console.log(answer....
[ "0.7245803", "0.6875947", "0.6692029", "0.6600262", "0.6596321", "0.65910906", "0.65484923", "0.64908826", "0.6410257", "0.6355307", "0.63488984", "0.63420767", "0.63310385", "0.63139033", "0.63131475", "0.6307068", "0.62979245", "0.627747", "0.6144362", "0.61337024", "0.6125...
0.7376083
0
SSF FILTER STATUS AND ARRAY
function ssfFilterStatusAndArray() { console.log("function : ssfFilterStatusAndArray"); // vars var filterBtn = this; var filterValue = this.innerHTML; var filterType = this.getAttribute("data-filterType"); if (typeof window[filterType + "Arr"] == 'undefined') { window[filterType + "Arr"] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HandleFilterStatus(el_input) {\n console.log( \"===== HandleFilterStatus ========= \");\n console.log( \"el_input\", el_input);\n\n // - get col_index from el_input\n // PR2021-05-30 debug: use cellIndex instead of attribute data-colindex,\n // because data-colindex goes ...
[ "0.5903977", "0.5891864", "0.5867562", "0.583097", "0.5683012", "0.5669358", "0.56659955", "0.5565997", "0.55609375", "0.5529946", "0.5529031", "0.5511943", "0.5497881", "0.5497756", "0.5497525", "0.54962766", "0.5490409", "0.54776293", "0.5471427", "0.5462572", "0.5423612", ...
0.60441387
0
RefToolbar Description: Adds tools for citing references to the edit toolbar. See [[Wikipedia:RefToolbar/2.0]] for further documentation. To disable this script, add refToolbarInstalled = 'bypass'; to [[Special:Mypage/vector.js]]. Current maintainers: none Former maintainers: [[User:Mr.Zman]], [[User:Kaldari]]
function initializeRefTools() { if ( window.refToolbarInstalled === undefined ) { importScriptURI('//en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbarBase.js&action=raw&ctype=text/javascript'); if( mw.user.options.get('usebetatoolbar') && mw.user.options.get('usebetatoolbar-cgd') ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function regAjaxComponentInToolbar(contentEditor, isFF) {\n // retrieve the content frame (kept in sep. var for possible future changes)\n var contentFrame = window.parent.document.getElementById('contentFrame');\n var content = contentFrame.contentWindow.document;\n var cmdButtonId = 'commandButton_';...
[ "0.5741226", "0.57173425", "0.56211865", "0.5572877", "0.55692446", "0.5562181", "0.54596037", "0.54596037", "0.5454866", "0.5439829", "0.54054874", "0.5404196", "0.5402067", "0.53651035", "0.532083", "0.531768", "0.529195", "0.52809894", "0.52736694", "0.52710116", "0.525446...
0.74934024
0
important only because heroku has memory limits and doing a gc lets me stay under and run more processes. it only takes a fraction of a second anyway.
function doGarbageCollection(name,log){ if (log) { var u_before = process.uptime() var m_before = process.memoryUsage() memwatch.gc() var m_after = process.memoryUsage() var u_after = process.uptime() console.log(`### ${name}: gc: before: ${formatMB(m_before.rss)}MB -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gc(){}", "function doGC()\n{\n\tglobal.gc();\n\n\tsetTimeout(doGC, 5000);\n}", "function garbageCollect() {\n const terminatingIterations = 3;\n let usedBeforeGC = Number.MAX_VALUE;\n let nondecreasingIterations = 0;\n for (; ;) {\n global.gc();\n const usedAfterGC = process.memoryUsage().he...
[ "0.67207944", "0.6715029", "0.6477458", "0.6423832", "0.64109194", "0.638005", "0.62424845", "0.62101704", "0.6206679", "0.61239266", "0.611273", "0.6112128", "0.5918199", "0.58930784", "0.58878005", "0.5883212", "0.58325636", "0.57836807", "0.5777233", "0.5753993", "0.569051...
0.68059796
0
Returns an array for terrains where meshes[i] meshes for terrain i
buildMap(modelDatabase) { this.__terrainGenerator = new TerrainGenerator(modelDatabase) let meshes = []; for(let terrainX = 0; terrainX < WORLD_LENGTH; terrainX++) { for(let terrainZ = 0; terrainZ < WORLD_WIDTH; terrainZ++) { let translation =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_terrain() {\n\tif (map[hero.row_coordinate][hero.column_coordinate].terrain == 1)\n \t\treturn \"Forest\";\n \telse if (map[hero.row_coordinate][hero.column_coordinate].terrain == 2) \n \treturn \"River\";\n \telse if (map[hero.row_coordinate][hero.column_coordinate].terrain == 3) \...
[ "0.5894858", "0.5709727", "0.5640164", "0.56015617", "0.55365646", "0.55332875", "0.5525415", "0.5524383", "0.54905534", "0.54445904", "0.5422456", "0.5358751", "0.5352369", "0.53467596", "0.53329235", "0.53295445", "0.5306328", "0.52980363", "0.52974653", "0.52843547", "0.52...
0.60076755
0
node to module's list of nodes replacement rule args: node object, module object returns: list of node objects
function nodeToModule(parentNode, module){ const rename = s => parentNode.name + '/' + s, inputToIndex = module.input.reduce( (a,name,i) => Object.assign(a,{[name]:i}), {}) return module.nodes.map(node => { const newNode = { name: rename(node.name), input: node.input.map(rename), op: node.op, li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transformAST(node, opts) {\n node.nodes.slice(0).forEach(child => {\n if (isColorModFunction(child)) {\n // transform any variables within the color-mod() function\n if (opts.transformVars) {\n transformVariables(child, opts);\n } // transform any color-mod() functions\n\n\n ...
[ "0.59712446", "0.59020954", "0.5793655", "0.5709822", "0.5702005", "0.56155586", "0.56152344", "0.56135017", "0.56135017", "0.56135017", "0.55883265", "0.5587716", "0.5587716", "0.5587716", "0.557567", "0.557567", "0.55517787", "0.5505591", "0.55043846", "0.5441451", "0.54343...
0.67715096
0
encode ASN.1 DER length field if =128, long form
function encodeLengthHex(n) { if (n<=127) return toHex(n); else { n_hex = toHex(n); length_of_length_byte = 128 + n_hex.length/2; // 0x80+numbytes return toHex(length_of_length_byte)+n_hex; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeLengthHex(n) {\r\n if (n<=127) return toHex(n)\r\n else {\r\n var n_hex = toHex(n)\r\n var length_of_length_byte = 128 + n_hex.length/2 // 0x80+numbytes\r\n return toHex(length_of_length_byte)+n_hex\r\n }\r\n}", "function EBML_write_u1_data_len(len, dv, at)\n{\n va...
[ "0.6442685", "0.6299898", "0.6243489", "0.59564686", "0.5950345", "0.589814", "0.5820292", "0.57802904", "0.5537027", "0.55367655", "0.54829705", "0.5467841", "0.5458001", "0.5458001", "0.5380468", "0.53467506", "0.53415906", "0.532264", "0.52985716", "0.52962846", "0.5292023...
0.6324184
1
returns true if last input char is operator, if digit false
function checkLastCharIsOperator(input) { if (operators.includes(input[input.length - 1])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOperator(char) {\n\t\treturn isTimes(char) || isDivide(char) || isPlus(char) || isMinus(char);\n\t}", "function isOperator(char) {\n return (char === \"×\" || char === \"÷\" || char === \"^\" || \n char === \"+\" || char === \"-\");\n}", "isLastDigitAnOperator(text){\n\t\tconst regex =...
[ "0.82091093", "0.80862916", "0.7839455", "0.7649834", "0.7602908", "0.7511224", "0.7483377", "0.7461592", "0.74446833", "0.7347317", "0.7324107", "0.7308072", "0.7299994", "0.7261911", "0.7223727", "0.71506894", "0.71397907", "0.7110491", "0.7089404", "0.7051422", "0.7011684"...
0.8436838
0
format the result to fit in display
function formatResult(result) { var result_string = result.toString(); if (result_string.length > 8) { if (result_string.indexOf(".") !== -1 && result_string.indexOf(".") < 8) { result = result.toFixed(7-result_string.indexOf(".")); while (result.endsWith("0")) { result = result.substring(0,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resultString(){\n\t\tvar start = (current*pgSize)+1;\n\t\tvar end = (current+1)*pgSize;\n\t\tif(end > total){\n\t\t\tend = total;\n\t\t}\n\t\treturn `<p class=\"results ${divName}\">(Showing results ${start} through ${end} of ${total})</p>`;\n\t}", "function printResult(data){\n\tvar res = \"\";\n\tfor ...
[ "0.62354344", "0.60250705", "0.6021863", "0.59747994", "0.5963216", "0.5956363", "0.59463114", "0.5938918", "0.5934078", "0.58997416", "0.5886305", "0.58488715", "0.5822579", "0.58204305", "0.5814247", "0.5800002", "0.5787434", "0.5782898", "0.5764594", "0.57317525", "0.57285...
0.6616581
0
Set or clear the hashkey for an object.
function setHashKey(obj, h) { if (h) { obj.$$hashKey = h; } else { delete obj.$$hashKey; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "function setHashKey(obj, h) {\n\t if (h) {\n\t obj....
[ "0.80561537", "0.80561537", "0.80561537", "0.80561537", "0.8014669", "0.8014669", "0.8014669", "0.8014669", "0.8014669", "0.8014669", "0.8014669", "0.8014669", "0.8001534", "0.8001534", "0.8001534", "0.8001534", "0.8001534", "0.8001534", "0.8001534", "0.8001534", "0.8001534",...
0.8075709
1
A helper function to call $setValidity and return the value / undefined, a pattern that is repeated a lot in the input validation logic.
function validate(ctrl, validatorName, validity, value) { ctrl.$setValidity(validatorName, validity); return validity ? value : undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate(ctrl,validatorName,validity,value){return ctrl.$setValidity(validatorName,validity),validity?value:undefined}", "getValidity() {\n\t\tlet fmt = \"ddd HH:mm\"\n\t\treturn this.validFrom.format(fmt) + \" - \" + this.validTo.format(fmt)\n\t}", "function validate(ctrl, validatorName, validity, va...
[ "0.6816958", "0.60717297", "0.60608673", "0.60608673", "0.6036155", "0.6036155", "0.6036155", "0.6036155", "0.5966375", "0.59596914", "0.5915486", "0.58707756", "0.586027", "0.5774721", "0.5763071", "0.57142806", "0.5676006", "0.5625849", "0.5614032", "0.56047106", "0.5604536...
0.6182412
1
Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
function push() { var name, value, browserCookies, updated; //delete any cookies deleted in $cookies for (name in lastCookies) { if (isUndefined(cookies[name])) { $browser.cookies(name, undefined); } } //update all cookies updated in $cookies ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function push() {\n var name,\n value,\n browserCookies,\n updated;\n\n //delete any cookies deleted in $cookies\n for (name in lastCookies) {\n if (isUndefined(cookies[name])) {\n $browser.cookies(name, undefined);\n }\n }\n...
[ "0.7468595", "0.74517614", "0.7449556", "0.7405949", "0.72485054", "0.6549915", "0.6524384", "0.63835853", "0.63709044", "0.6316386", "0.6222772", "0.61695", "0.6114246", "0.6112263", "0.6083366", "0.6074286", "0.6064145", "0.6064085", "0.6044528", "0.60109305", "0.6009275", ...
0.74692494
0
all animations call this shared animation triggering function internally. The animationEvent variable refers to the JavaScript animation event that will be triggered and the className value is the name of the animation that will be applied within the CSS code. Element, parentElement and afterElement are provided DOM el...
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) { var runner = animationRunner(element, animationEvent, className); if (!runner) { fireDOMOperation(); fireBeforeCallbackAsync(); fireA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n var currentClassName, classes, node = extractElementNode(element);\n if(node) {\n currentClassName = node.className;\n classes = currentClassName + ' ' + classN...
[ "0.6730274", "0.65214074", "0.65214074", "0.63870174", "0.6383169", "0.6383169", "0.63086843", "0.61689705", "0.61656505", "0.61649853", "0.61382085", "0.6129503", "0.6123593", "0.6096336", "0.6073187", "0.6054567", "0.6045205", "0.58231103", "0.5730726", "0.5655525", "0.5593...
0.6629636
1
Check if date is valid for specific month (and year for February). Month: 0 = Jan, 1 = Feb, etc
function isValid(year, month, date) { if (month === 1 && date > 28) { return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0); } if (month === 3 || month === 5 || month === 8 || month === 10) { return date < 31; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValid(year,month,date){if(date < 1){return false;}if(month === 1 && date > 28){return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0);}if(month === 3 || month === 5 || month === 8 || month === 10){return date < 31;}return true;}", "function isValid(year, month, date) {\n\t i...
[ "0.8320063", "0.8306339", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", "0.82966626", ...
0.8310503
1
Returns an object of show and hide triggers. If a trigger is supplied, it is used to show the tooltip; otherwise, it will use the `trigger` option passed to the `$tooltipProvider.options` method; else it will default to the trigger supplied to this directive factory. The hide trigger is based on the show trigger. If th...
function getTriggers(trigger) { var show = trigger || options.trigger || defaultTriggerShow; var hide = triggerMap[show] || show; return { show: show, hide: hide }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTriggers ( trigger ) {\n var show = trigger || options.trigger || defaultTriggerShow;\n var hide = triggerMap[show] || show;\n return {\n show: show,\n hide: hide\n };\n }", "function getTriggers ( trigger ) {\n var show = trigger || options.t...
[ "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.7954029", "0.78739303", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78736055", "0.78...
0.7992162
0
Show the tooltip popup element.
function show() { popupTimeout = null; // If there is a pending remove transition, we must cancel it, lest the // tooltip be mysteriously removed. if (transitionTimeout) { $timeout.cancel(transitionTimeout); transitionTi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show() {\n popupTimeout = null;\n\n // If there is a pending remove transition, we must cancel it, lest the\n // tooltip be mysteriously removed.\n if (transitionTimeout) {\n $timeout.cancel(transitionTimeout);\n transitionT...
[ "0.78909665", "0.78909665", "0.7881515", "0.7870649", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", "0.7829301", ...
0.7975607
0
retweet tweets by search
retweet(search) { console.log(search); this.client.get('search/tweets', { q: search, count: 1 }, (error, tweets, response) => { console.log(tweets); // for (let i = 0; i < 1; i++) { // console.log("TWEET " + i + ": " + tweets.sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retweet() {\n var params = {\n q: '#recycle', // REQUIRED\n result_type: 'popular',\n lan: 'en',\n count: 5\n }\n\n T.get('search/tweets', params, function(err, data) {\n \tif(data.statuses[0] === undefined) console.log('No tweet found');\n \t// if there no ...
[ "0.77857596", "0.77105117", "0.74542594", "0.73864347", "0.7230276", "0.71981525", "0.7185795", "0.71454906", "0.7081313", "0.6993278", "0.69900423", "0.69609237", "0.69256186", "0.69100916", "0.6904319", "0.6896547", "0.68401414", "0.6801391", "0.6800156", "0.6771025", "0.67...
0.78612727
0
Handles the fileClosed event.
function fileClosed(e) { window.extensions.KJSLINT.Page.Controller.fileClosed(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpenClose() {\n\t if (typeof this.fd === 'number') {\n\t // actually close down the fd\n\t this.close()\n\t }\n\t}", "function onOpenClose() {\n\t if (typeof this.fd === 'number') {\n\t // actually close down the fd\n\t this.close()\n\t }\n\t}", "function onOpenClose() {\n\t if (typ...
[ "0.64110565", "0.64110565", "0.64110565", "0.63444614", "0.6240904", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613", "0.62210613",...
0.7725924
0
Handles the currentViewChanged event.
function currentViewChanged(e) { window.extensions.KJSLINT.Page.Controller.fileSwitched(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCurrentView( currentView ) {\n\t\tthis.setState({ currentView });\n\t}", "_onViewChanged() {\n const viewMode = this.model.get('viewMode');\n\n this._$viewTabs\n .removeClass('active')\n .filter(`[data-view-mode=${viewMode}]`)\n .addClass('active');\n\n ...
[ "0.6402422", "0.6254801", "0.6199358", "0.59792036", "0.5838236", "0.5815293", "0.5788272", "0.5787973", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", "0.5718185", ...
0.69052756
0
Handles the fileSaved event.
function fileSaved() { window.extensions.KJSLINT.Page.Controller.fileSaved(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileSaveEvent(event) {\n // Create an temporary element to download\n let downloadElement = document.createElement('a');\n // Specify encoding and define content\n let fileString = Object(_createFile__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n downloadElement.setAttribute('href', ...
[ "0.67215604", "0.65959364", "0.6275677", "0.6258533", "0.6254826", "0.6179935", "0.608529", "0.6072585", "0.5917212", "0.58858037", "0.5853927", "0.58326286", "0.582474", "0.581933", "0.5818488", "0.58100295", "0.5808709", "0.58077705", "0.58026654", "0.5792281", "0.5788586",...
0.75194716
0
find a dom node from the chidren of the node with className.
function findNodeByClass(node, className) { return node.getElementsByClassName(className)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winFindByClassName(el, className) {\n\n var i, tmp;\n\n if (el.className == className)\n return el;\n\n // Search for a descendant element assigned the given class.\n\n for (i = 0; i < el.childNodes.length; i++) {\n tmp = winFindByClassName(el.childNodes[i], className);\n if (tmp != null)\n ...
[ "0.7478685", "0.74102956", "0.7239654", "0.7035674", "0.7027404", "0.6840835", "0.6831781", "0.6794366", "0.67451245", "0.6725181", "0.65356946", "0.64889765", "0.64637935", "0.64520437", "0.64459145", "0.64091015", "0.63422936", "0.6340628", "0.63167566", "0.62851614", "0.62...
0.80441123
1
Iterate through all routes and flatten them
flattenRoutes( children, parent, reset ) { for ( let i in children ) { let child = children[i]; if ( child.nodeName !== Route ) { continue; } let node = child; if ( parent ) { node = parent; } let props = { ...node.attributes, ...child.attributes }; if ( props.static && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "helperShowRoutes() {\n let route;\n const routes = [];\n function addRoute(route) {\n if (route) {\n let methodId;\n for (let layer of route.stack ) {\n if (layer.handle.name === 'setMethodId') {\n const fakeReq = {};\n layer.handle(fakeReq, null, function...
[ "0.6390604", "0.6334784", "0.62903506", "0.6204125", "0.6195447", "0.61655915", "0.6151174", "0.6111224", "0.6086944", "0.6068718", "0.6068718", "0.6068718", "0.60578275", "0.5969877", "0.59061044", "0.5899859", "0.5895877", "0.5854037", "0.58290946", "0.58290946", "0.5829094...
0.7289191
0
clean up profane words
function clearProfanity(word) { return word.replace(PROFANEWORDS, function (m) { return CENSOR.substr(0, m.length) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanUpStory(cleanBadWord){\n let arr = cleanBadWord.split(' ')\n const sampleLetter = ['.', ':', '!', '?', \"'\",\"'\", \",\"]\n const newArray = arr.map(word =>{\n sampleLetter.forEach(letter => {\n if(word.includes(letter)){\n word = word.replace(letter,'')\n }\n })\...
[ "0.749391", "0.68921965", "0.6863143", "0.67928386", "0.6693471", "0.66546804", "0.66412896", "0.65761036", "0.6563586", "0.65581435", "0.65383", "0.6529193", "0.6520326", "0.6519663", "0.6500341", "0.6493281", "0.6468109", "0.64415556", "0.64368814", "0.6404631", "0.63764477...
0.75160956
0
Tous les points map de tous les marqueurs
function pointMarkersMap(marqueur, marqueurs){ //Remplir le tableau marqueurs avec les coordonnées de chaque marqueur marqueurs.push(''+marqueur.getPosition().lat()+', '+marqueur.getPosition().lng()+''); //Assigner les coordonnées des marqueurs a des points map et mettre dans un tableau var pointsMarque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPoints() {\n return [\n new google.maps.LatLng(36.8581819275, -75.9790104736),\n new google.maps.LatLng(36.8376497271, -75.9771314756),\n new google.maps.LatLng(36.8432289545, -75.9749940638),\n new google.maps.LatLng(36.8477323813, -75.9839999682),\n new google.maps.LatLng(36.857203030...
[ "0.65882677", "0.6567936", "0.65589726", "0.6490544", "0.64768314", "0.634224", "0.6273053", "0.6207507", "0.6057", "0.60489315", "0.604843", "0.59997636", "0.59819984", "0.596499", "0.59487474", "0.5939031", "0.59347475", "0.59292835", "0.5917331", "0.5907145", "0.5887955", ...
0.7625615
0
draw a smile function
function drawSmile(argSmile) { //fej circle(argSmile.x, argSmile.y, argSmile.size, argSmile.color); //szem circle(argSmile.x-argSmile.size/2, argSmile.y-argSmile.size/3, argSmile.size/6, argSmile.color); //szem circle(argSmile.x+argSmile.size/2, argSmile.y-argSmile.size/3, argSmile.size/6, argSmile.color);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smile() { .. }", "function smiley(x, y) {\n moveTo(x, y);\n color(\"yellow\");\n circle(0, 0, 50);\n color(\"black\");\n circle(-20, 10, 7);\n circle(20, 10, 7);\n lineWidth(3);\n path(\"g -20 -10 q 20 -10 0 -50 c\");\n goBack();\n}", "function drawMissiles() {\n missiles.forEach((missile) =...
[ "0.79764694", "0.6679586", "0.6565302", "0.6497432", "0.63818187", "0.6151933", "0.6145641", "0.6106629", "0.59602845", "0.59522706", "0.59445375", "0.5941186", "0.59311455", "0.59075654", "0.58923405", "0.5887151", "0.58679354", "0.5844905", "0.5791268", "0.5788517", "0.5783...
0.81896645
0
Gets all the steps of the pipeline
getSteps() { return [ this.sourceStep, ...this.transformerSteps, this.loaderStep ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSteps() {\n const steps = [].slice.call(this.element.querySelectorAll('tag-wizard-step'));\n return steps;\n }", "function getSteps() {\n return ['Nueva obra', 'Cargar cotización', 'Revision de datos'];\n}", "function getSteps() {\n return [\n \"Marketplace Integration\",\n \"Shippi...
[ "0.6792962", "0.63990283", "0.6361715", "0.62641674", "0.6256912", "0.62335914", "0.6212004", "0.6189078", "0.59526545", "0.5938438", "0.58949447", "0.589055", "0.5886521", "0.5875504", "0.58213747", "0.581057", "0.581057", "0.581057", "0.581057", "0.58011013", "0.5699755", ...
0.7102992
0
Sets screenshot, geolocation, keylog, and url flags
function set_flags(flags) { if (flags.screenshots == "true") { screenshot_flag = true } else { screenshot_flag = false } if (flags.geolocation == "true") { geolocation_flag = true } else { geolocation_flag = false } if (flags.keylog == "true") { keyl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setGeo(data) {\n //console.log('set geo');\n window.fingerprint.ip = data.ip;\n window.fingerprint.geo = data;\n}", "setScreenshot(screenshot) {\n if (screenshot !== this.screenshot) {\n this.screenshot = screenshot;\n this.onScreenshot.dispatch(screenshot);\n }\n ...
[ "0.5650975", "0.5414939", "0.54005045", "0.53896004", "0.5125552", "0.50345653", "0.50250596", "0.5019308", "0.5017474", "0.5005354", "0.4989239", "0.49641317", "0.49603468", "0.49599212", "0.49562344", "0.49439156", "0.49393407", "0.4935217", "0.49004778", "0.4886189", "0.48...
0.6320915
0
Logs all URLs visited
function getUrls() { if (!urls_flag) { return } today = new Date(); var url = new URL(window.location.href).toString(); url_log = '{"logtype": "URL", "datetime":"' + today + '", "url":"' + url + '"}' if (urls_flag) { $.post(host_port, url_log, function(data, status) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logVisit(event) {\n // We don't want embedded content's URLs to be logged, only the top-level URL\n if (event.frameId !== 0) {\n return;\n }\n\n curr_url = new URL(event.url);\n\n params = null;\n\n // Check if it is an actual website and not something like \"about:profiles\"\n ...
[ "0.6665785", "0.6568107", "0.6195794", "0.60388374", "0.60356873", "0.5867331", "0.58627224", "0.5862654", "0.58421075", "0.5826179", "0.5754152", "0.57510775", "0.57373214", "0.5723738", "0.56925315", "0.5673118", "0.5673118", "0.5673118", "0.5673118", "0.5647775", "0.554258...
0.6709676
0
Logs the geolocation data Citation:
function getGeo() { if (geolocation_flag) { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( (location) => { today = new Date() location_log = '{"logtype": "LOC", "datetime":"' + today + '", "lat":"' + location.coords....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printLocationInfo(zipCode, city, state, country, long, lat) {\n\tvar zipMessage = \"The city for the zip code \" + zipCode + \" is : \" + city + \", \" + state + \", \" + country + \", longitude: \" + long + \", latitude: \" + lat + \".\";\n\tconsole.log(zipMessage);\n}", "function getLocation(locati...
[ "0.62715685", "0.58674073", "0.5796673", "0.5695818", "0.5677863", "0.5673617", "0.5664303", "0.5617097", "0.5580892", "0.5580892", "0.5580892", "0.55684495", "0.5565074", "0.5538551", "0.55244875", "0.5502889", "0.5477705", "0.5457842", "0.5457389", "0.5454191", "0.5446219",...
0.6170849
1
Logs operating system info
function getOSInfo() { var nav_obj = window.navigator var appVersion = nav_obj.appVersion var language = nav_obj.language var platform = nav_obj.platform var userAgent = nav_obj.userAgent var vendor = nav_obj.vendor today = new Date() os_info_log = '{"logtype": "OSI", "datetime":"' + to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showSystemInfo() {\n\t\talert(systemInfo().join('\\n'));\n\t}", "function OSinfo() {\n\treturn {\n\t\tplatform: os.platform(),\n\t\tosType: os.type(),\n\t\tfreeMemory: os.freemem(),\n\t\ttotalMemory: os.totalmem(),\n\t\tEOL: os.EOL\n\t};\n}", "function getSystemInfo() {\n divElements[4].innerHTML = (...
[ "0.64794564", "0.6457062", "0.6255797", "0.6210702", "0.60070926", "0.59579223", "0.5953078", "0.5944789", "0.58380973", "0.57966304", "0.5767309", "0.5685185", "0.5522687", "0.55050343", "0.5504506", "0.54940814", "0.54787904", "0.54700303", "0.54530007", "0.54072094", "0.54...
0.64747846
1
Gets rgba array at given 'pos' position in picture represented by 'data' array
function getRGBA(data, idx){ return data.slice(idx, idx + 4).join(','); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pixelColour(pos) {\n var t = getAddress(pos);\n return grid.subarray(t, t + 4);\n }", "function rgbaAtImgCoordinate(ctx, x, y) {\n const pixel = ctx.getImageData(x, y, 1, 1);\n const data = pixel.data;\n const rgba = 'rgba(' + dat...
[ "0.67177886", "0.63269436", "0.62792474", "0.6177368", "0.6134144", "0.6050576", "0.6002608", "0.5946451", "0.5926896", "0.59022725", "0.5820192", "0.5805984", "0.57975674", "0.5791954", "0.5790955", "0.56535095", "0.5636429", "0.5624876", "0.5605347", "0.5601136", "0.5593592...
0.6672636
1
This method will populate the beers cache using static data. This will make the browse beer function more reliable when the network is unavailable
function loadStaticBeersCache() { var beersCache = $http.get('static-beers.json') .then(function(response) { $localStorage.setObject('beersCache',response.data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBeers() {\n var beersUrl = ENV.apiEndpoint + 'beers/browse';\n return $http.get(beersUrl)\n .then(getBeersComplete,getBeersFailed)\n\n function getBeersComplete(response) {\n // save a local copy of last response\n $localStorage.setO...
[ "0.6688739", "0.62879336", "0.6232106", "0.61535794", "0.61336493", "0.605611", "0.6038474", "0.60187656", "0.5964725", "0.590113", "0.58709", "0.5863766", "0.5853238", "0.5839924", "0.58206314", "0.58138484", "0.58027864", "0.5789542", "0.5772137", "0.57255954", "0.57098705"...
0.7531841
0
utility function that tries the conversion. If it can, it'll return the conversion rounded. If it can't, it'll return an empty string.
function tryConvert(value, tUnit){ var tryNumber = Number(value); if(isNaN(tryNumber)){ //is NOT a valid # we can work with return ''; }else{ //user gave us a valid number (isNaN returned false). We can convert if(tUnit == 'c'){ var convertedNumber = toFahrenheit(tryNumber); }else{ var convertedNumb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryConvert(temperature, convert) {\r\n const input = parseFloat(temperature);\r\n if (Number.isNaN(input)) {\r\n return '';\r\n }\r\n const output = convert(input);\r\n const rounded = Math.round(output * 1000) / 1000;\r\n return rounded.toString();\r\n}", "function convertFahrToCelsius(value) ...
[ "0.69923055", "0.61371684", "0.58262116", "0.58031666", "0.55971664", "0.5582976", "0.55573577", "0.55457157", "0.5523789", "0.5504319", "0.5500473", "0.54905725", "0.5488117", "0.54624075", "0.54624075", "0.54624075", "0.54624075", "0.54624075", "0.54624075", "0.54624075", "...
0.61615217
1
This is for removing the customer list from this page from disassociate modal window. if all customers are all selected redirect the page to search page.
onDiassociateCustomers(){ let custList = _.cloneDeep(this.state.custList); custList.forEach(mng => { mng.selected = (mng.verifySelected)?(!mng.verifySelected):mng.selected mng.verifySelected = (mng.verifySelected)?!mng.verifySelected:mng.verifySelected mng.regionList...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteCustomer () {\n // delete customer using modalCustomer object\n DeleteCustomer(modalCustomer.customerID)\n setShowOptionsModal(false)\n getWaitlist()\n }", "function cancelOrder(doReturn) {\n sessionStorage.removeItem(\"itemType\");\n sessionStorage.removeItem(\"items\");\n ...
[ "0.65183324", "0.56573844", "0.5617691", "0.5582238", "0.55446875", "0.5481788", "0.54212874", "0.5387527", "0.5375313", "0.53668594", "0.5345598", "0.53159916", "0.52989465", "0.5272493", "0.5268855", "0.5248092", "0.5221815", "0.5200149", "0.5199087", "0.5194148", "0.519222...
0.5854833
1
This method only for Borker and Broker associates. editing the access priveleges at property level in the table only for Broker and Broker associate.
onPropAccesspriv(privType, e){ let securityRole = this.state.securityRole; //console.log(securityRole) if(securityRole == 'EXT_BRK_ASC'){ let selAdminList = _.cloneDeep(this.state.selAdminCustList) selAdminList.forEach(mng => { mng.regionList.forEach(rgn => ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toAddAssignmentRowsAndUpdate(pk,ojbDvDpRmCatRmType){\n var blId = pk[0];\n var flId = pk[1];\n var rmId = pk[2];\n\tvar em_id = controllerCreateIndvMoPopup.selectedEmId;\n var em = getEmRecordsById(em_id);\n \n\tvar grid = View.panels.get(\"abSpAsgnEmToRm_emAssigned\");\n\tclearChanges();\n...
[ "0.49414492", "0.48287535", "0.48107636", "0.4805803", "0.48052368", "0.47988692", "0.47889522", "0.47619772", "0.47592172", "0.47443122", "0.47286126", "0.4683723", "0.46594527", "0.46572682", "0.46453333", "0.4636078", "0.45888567", "0.45868376", "0.45852974", "0.45817077", ...
0.51530313
0
Transformer factory for the decorator downlevel transformer. See fileoverview for details.
function decoratorDownlevelTransformer(typeChecker, diagnostics) { return (context) => { const parameterTypeSymbols = new Set(); /** * Converts an EntityName (from a type annotation) to an expression (accessing a value). * * For a given ts.EntityName, this walks depth firs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factory(cs) {\n /**\n * Our compiler (typescript, or a module with typescript-like interface)\n */\n var ts = cs.compilerModule;\n /**\n * Traverses the AST down to the relevant assignments in the decorator\n * argument and returns them in an array.\n */\n function isProper...
[ "0.59792095", "0.5867092", "0.5828793", "0.5759466", "0.5634048", "0.55884063", "0.55884063", "0.5531499", "0.5311145", "0.5277204", "0.5154211", "0.5154211", "0.5152195", "0.51308924", "0.51308924", "0.51308924", "0.51064473", "0.50864834", "0.5076314", "0.5050409", "0.50491...
0.6315943
0
Converts an EntityName (from a type annotation) to an expression (accessing a value). For a given ts.EntityName, this walks depth first to find the leftmost ts.Identifier, then converts the path into property accesses.
function entityNameToExpression(name) { if (ts.isIdentifier(name)) { const typeSymbol = typeChecker.getSymbolAtLocation(name); if (typeSymbol) { parameterTypeSymbols.add(typeSymbol); } // Based on TS's strategy to allow the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function serializeQualifiedNameAsExpression(node, useFallback) {\n var left;\n if (node.left.kind === 71 /* Identifier */) {\n left = serializeEntityNameAsExpression(node.left, useFallback);\n }\n else if (useFallback) {\n var temp = ts.crea...
[ "0.56240493", "0.55735254", "0.5557879", "0.5530737", "0.551821", "0.51807016", "0.5172001", "0.5113034", "0.5103909", "0.5103909", "0.50793684", "0.5007148", "0.49843132", "0.4982672", "0.49761114", "0.49555248", "0.49400526", "0.4929103", "0.48977116", "0.48279667", "0.4815...
0.72245526
0
Inserting cameras in db
function insertCameras(progress, data){ $.ajax({ type: "POST", url: "php/setup.php", data: { action: "insert-cameras", data: data }, success: function(response){ if(response){ currentStep += 1; var value = currentStep * 100/installSteps; progress.attr('aria-valuenow', value).css('wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_to_db()\n{\n\tdb.run(\"INSERT INTO files VALUES (?,?,?,?,?)\", [null, name, graph_data, pos_data, image_data], \n\t\tfunction(err, data) {\n\t\t\tif(err) throw err;\n\t\t\tconsole.log(\"[Message]: Data added Properly!\");\n\t});\n\n}", "save(callback, movie) {\n startconnection();\n ...
[ "0.5658356", "0.56166285", "0.56098497", "0.5604401", "0.5602886", "0.5545179", "0.55190545", "0.54937637", "0.5493648", "0.53217864", "0.5301692", "0.52212536", "0.5179102", "0.51765555", "0.5139487", "0.51102984", "0.51092607", "0.5100811", "0.50968444", "0.50897396", "0.50...
0.6246335
0
Inserting POI in db
function insertPoi(progress, data){ $.ajax({ type: "POST", url: "php/setup.php", data: { action: "insert-poi", data: data }, success: function(response){ if(response){ currentStep += 1; var value = currentStep * 100/installSteps; progress.attr('aria-valuenow', value).css('width', value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPOI(name, lat, long, order) {\r\n\tdbName = name.replace(/'/g, \"''\").replace(/\"/g, \"&quot;\");\r\n\tdbLat = lat;\r\n\tdbLong = long;\r\n\tdbOrder = order;\r\n\tvar db = window.openDatabase(\"itinerario\", \"1.0\", \"Itinerario DB\", 1000000);\r\n\tdb.transaction(createTBL, errorDB, tblCreated);\r\n...
[ "0.6317309", "0.5762026", "0.5749411", "0.5672704", "0.56278324", "0.5603614", "0.55944026", "0.55596465", "0.5553673", "0.5545268", "0.55409575", "0.55407226", "0.55390817", "0.5530711", "0.5491365", "0.54680246", "0.54641795", "0.5463305", "0.54556274", "0.54421496", "0.542...
0.62301004
1
Constructs a GeometryReshapingTool and sets the handle and name of the tool.
function GeometryReshapingTool() { var _this = _super.call(this) || this; // there's no Part.reshapeAdornmentTemplate either // internal state _this._handle = null; _this._adornedShape = null; _this._originalGeometry = null; // in case the tool is ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Tool0(name) {this.name = name;}", "function SectorReshapingTool() {\n go.Tool.call(this);\n this.name = \"SectorReshaping\";\n this._handle = null;\n this._originalRadius = 0;\n this._originalAngle = 0;\n this._originalSweep = 0;\n}", "selectToolPane(toolName) {\n switch(toolName) {\n ...
[ "0.5827349", "0.58129287", "0.53416437", "0.5279427", "0.5223881", "0.5134934", "0.51114553", "0.5081562", "0.50611776", "0.5053078", "0.5004007", "0.49812147", "0.49790508", "0.4950186", "0.49037623", "0.49003503", "0.4895019", "0.48904446", "0.4872281", "0.48533264", "0.476...
0.8455123
0
Highlight a row or an array of particular rows. Note that highlighting a row and selecting a row are two different things. Pass row index or an array or row indexes to highlight. Pass null to unhighlight all rows.
highlightRows(idx) { this.highlightedRows = idx = Utils.assureArray(idx); this.gridOptions.getRowStyle = (params) => { for (let i=0 ; i < idx.length ; i++) if (params.node.rowIndex === idx[i]) return { background: 'lightPink' }; return null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightRow(tableId, rowId) {\n //unhighlight all rows\n //document.getElementById(\"hf_table\").rows.forEach(element => element.className = \"\");\n for (let row of document.getElementById(tableId).rows) {\n row.className = \"\";\n }\n //highlight selected row\n var row = docume...
[ "0.69857985", "0.68196076", "0.6756208", "0.6683935", "0.662563", "0.64513344", "0.64110446", "0.63988733", "0.6395761", "0.6340997", "0.6334056", "0.6330179", "0.62847996", "0.6221388", "0.6213181", "0.62024313", "0.6196319", "0.6158675", "0.6085472", "0.6074141", "0.605442"...
0.7277128
0
Create a new grid context.
static newGridContext() { AGGrid.gridContext.push([]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createContext() {\n return new CharityProjectContext();\n }", "function createGrid() {\n var $div = $('<div ui-grid=\"' + $scope.content.name + '\" '\n + 'id=\"' + $scope.content.name + '\" '\n + (USE_PAGINATION ? PAGINATION_DIRECTIVE : '')\n ...
[ "0.6032266", "0.60260046", "0.59761906", "0.59715235", "0.5904725", "0.58878505", "0.5862294", "0.5853617", "0.5825295", "0.579842", "0.5793287", "0.57110626", "0.5704072", "0.56792057", "0.5678355", "0.5623187", "0.5601978", "0.5601978", "0.55784595", "0.55563074", "0.555375...
0.7472928
0
Add a grid to the current context.
static addGrid(grid) { const cc = AGGrid.gridContext[AGGrid.gridContext.length - 1]; cc.push(grid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addGrid() {\n var template = $tpl.html();\n Mustache.parse(template);\n var data = {idx: ++gridNb};\n var rendered = Mustache.render(template, data);\n $gridsContainer.append(rendered);\n }", "function addGridItems(grid) {}", "function appendGrid(grid) {\n $('.co...
[ "0.7583818", "0.722975", "0.6643197", "0.65965754", "0.64867043", "0.6141825", "0.6141825", "0.6097081", "0.5895959", "0.58872193", "0.58506876", "0.5803111", "0.5771631", "0.5763565", "0.5721312", "0.5711867", "0.57110256", "0.57075286", "0.5680186", "0.5679607", "0.56714934...
0.7703876
0
Destroy all grids in last context and remove the context
static popGridContext() { const c = AGGrid.gridContext.pop(); if (c) for (let i = 0; i < c.length; i++) c[i].destroy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static popAllGridContexts() {\n while (AGGrid.gridContext.length)\n AGGrid.popGridContext();\n }", "function destroyGrid(){\n\t\tthis.grid.destroy();\n\t}", "destroy() {\n if (this.gridInstantiated) {\n this.gridOptions.api.destroy();\n this.gridOptions = null;...
[ "0.77628815", "0.769877", "0.7224771", "0.70095116", "0.69706625", "0.6886661", "0.66727096", "0.6633356", "0.65578395", "0.6539451", "0.6528449", "0.6523096", "0.64967084", "0.6489869", "0.6477355", "0.6461092", "0.64569056", "0.6419146", "0.64132386", "0.64090985", "0.63633...
0.85324246
0
This function return a list of players_ids that belongs to a given team_id
async function getPlayerIdsByTeam(team_id) { let player_ids_list = []; const team = await axios.get(`${api_domain}/teams/${team_id}`, { params: { include: "squad", api_token: process.env.api_token, }, }); team.data.data.squad.data.map((player) => player_ids_list.push(player.play...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getPlayersByTeam(team_id) {\r\n let player_ids_list = await getPlayerIdsByTeam(team_id);\r\n let players_info = await getPlayersInfo(player_ids_list);\r\n return players_info;\r\n}", "static async getTeamPlayers(team) {\r\n const db = await client.db(dbName);\r\n const col = await...
[ "0.73152894", "0.69236845", "0.6639611", "0.65733635", "0.65125024", "0.640976", "0.63724726", "0.6161616", "0.6119528", "0.6070148", "0.6062483", "0.60059994", "0.5931494", "0.5904243", "0.58489555", "0.58055395", "0.57957536", "0.57771593", "0.5770115", "0.5765349", "0.5724...
0.83580005
0
This function return a players_dict by given a players_ids list
async function getPlayersInfo(players_ids_list) { let promises = []; players_ids_list.map((id) => promises.push( axios.get(`${api_domain}/players/${id}`, { params: { api_token: process.env.api_token, include: "team", }, }) ) ); let players_info...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assignPlayerId(id, players, assignCb) {\n return players.map(player => {\n if(assignCb(player)) {\n return Object.assign({}, player, {id: id})\n }\n else {\n return player\n }\n })\n}", "async players() {\n const Player = this.models.get('Player')\n return Player.fi...
[ "0.6212681", "0.59900844", "0.5894858", "0.5700322", "0.5689332", "0.56019616", "0.55533195", "0.54906315", "0.54752004", "0.54318726", "0.5402971", "0.5399777", "0.5389809", "0.53829646", "0.53398055", "0.5330725", "0.5318272", "0.53063595", "0.52992743", "0.5276744", "0.523...
0.66797006
0
This function extract the relevant data for a player, given a players_info
function extractRelevantPlayerData(players_info) { return players_info.map((player_info) => { const { player_id, fullname, image_path, position_id } = player_info.data.data; const { name } = player_info.data.data.team.data; return { player_id: player_id, name: fullname, image: ima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractRelevantPlayerPageDataByID(players) {\r\n const player_info = players[0].data.data;\r\n const {player_id ,fullname, image_path, position_id, common_name, nationality, birthdate, birthcountry, height, weight } = player_info;\r\n \r\n if(player_info){ \r\n return {\r\n player_id: player_i...
[ "0.81891304", "0.75195146", "0.7065933", "0.6806372", "0.6768586", "0.6675697", "0.66102767", "0.6588861", "0.6556774", "0.6523432", "0.6462665", "0.645052", "0.64213556", "0.64187884", "0.6406924", "0.6277127", "0.6273493", "0.62667614", "0.6264466", "0.6200889", "0.6146216"...
0.8819458
0