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
This function gets a team_id and return all the players in the team
async function getPlayersByTeam(team_id) { let player_ids_list = await getPlayerIdsByTeam(team_id); let players_info = await getPlayersInfo(player_ids_list); return players_info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getPlayerIdsByTeam(team_id) {\r\n let player_ids_list = [];\r\n const team = await axios.get(`${api_domain}/teams/${team_id}`, {\r\n params: {\r\n include: \"squad\",\r\n api_token: process.env.api_token,\r\n },\r\n });\r\n team.data.data.squad.data.map((player) =>\r\n player_...
[ "0.788046", "0.77576035", "0.74867225", "0.74399257", "0.7217915", "0.7185584", "0.70703197", "0.6964931", "0.6956884", "0.69300556", "0.69101506", "0.6889052", "0.687279", "0.68486255", "0.67859787", "0.67566746", "0.6749945", "0.672434", "0.6693466", "0.6678993", "0.6642154...
0.8425535
0
This function return players by player's name (optional filtering: player_position and group_name)
async function getPlayersByName(player_name, player_pos, group_name) { let promises = []; promises.push( await axios.get(`${api_domain}/players/search/${player_name}`, { params: { api_token: process.env.api_token, include: "team", }, }) ) let players_info = await Pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractRelevantPlayerDataByName(players, player_pos, group_name) {\r\n let players_data = players[0].data.data;\r\n \r\n players_data = players_data.filter(function (elem) {\r\n return elem != null;\r\n });\r\n\r\n // Filter by player's position\r\n if(player_pos != \"\")\r\n players_data = pl...
[ "0.7880941", "0.6559878", "0.6517819", "0.65007204", "0.64667356", "0.6433029", "0.62638944", "0.6258867", "0.6249173", "0.6249173", "0.6236685", "0.6218456", "0.61730397", "0.6090219", "0.60704976", "0.6062624", "0.605388", "0.59911877", "0.5967604", "0.5919409", "0.5908038"...
0.77655494
1
This function extract the relevant players_info (and filtering by player's position and group_name if necessary)
function extractRelevantPlayerDataByName(players, player_pos, group_name) { let players_data = players[0].data.data; players_data = players_data.filter(function (elem) { return elem != null; }); // Filter by player's position if(player_pos != "") players_data = players_data.filter((player...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractRelevantPlayerData(players_info) {\r\n return players_info.map((player_info) => {\r\n const { player_id, fullname, image_path, position_id } = player_info.data.data;\r\n const { name } = player_info.data.data.team.data;\r\n return {\r\n player_id: player_id,\r\n name: fullname,\...
[ "0.8359837", "0.7523208", "0.69428146", "0.6868558", "0.6285982", "0.6222269", "0.6192052", "0.6155928", "0.6140852", "0.6014476", "0.5998457", "0.5964972", "0.59601134", "0.5916568", "0.5902487", "0.58750975", "0.58363605", "0.58329964", "0.57737803", "0.5763992", "0.5723359...
0.8538503
0
This function return the player personal page details by given a player_id
async function getPlayerPersonalPageByID(player_id){ let promises = []; promises.push( await axios.get(`${api_domain}/players/${player_id}`, { params: { api_token: process.env.api_token, include: "team", }, }) ) let players_info = await Promise.all(promises); con...
{ "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.7565091", "0.6439593", "0.6244245", "0.6207129", "0.6170582", "0.6048649", "0.59257", "0.59063625", "0.5896098", "0.57814795", "0.57717806", "0.5760468", "0.57454014", "0.5729685", "0.5708539", "0.5616661", "0.5600246", "0.558471", "0.5561358", "0.5544002", "0.55374867", ...
0.78030974
0
This function extract and return the relevant player personal page's details
function extractRelevantPlayerPageDataByID(players) { const player_info = players[0].data.data; const {player_id ,fullname, image_path, position_id, common_name, nationality, birthdate, birthcountry, height, weight } = player_info; if(player_info){ return { player_id: player_id, name: f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getPlayerPersonalPageByID(player_id){\r\n let promises = [];\r\n promises.push(\r\n await axios.get(`${api_domain}/players/${player_id}`, {\r\n params: {\r\n api_token: process.env.api_token,\r\n include: \"team\",\r\n },\r\n })\r\n )\r\n let players_info = await Pr...
[ "0.6933682", "0.6859497", "0.67515755", "0.6750966", "0.61634415", "0.61068517", "0.6000802", "0.59944606", "0.589055", "0.58657277", "0.57655513", "0.57564163", "0.57205904", "0.5670958", "0.5652822", "0.56499636", "0.5637566", "0.56222713", "0.56142265", "0.5602376", "0.560...
0.74250436
0
A function to count up the inputted number while changing the multiples of 3, 5 and 15 to ping, pong and pingpong respectively.
function countUp(input) { var total = []; for (var index = 1; index <= input; index++) { //test //console.log(index) if (index % 3 === 0 && index % 5 === 0) { total.push("pingpong"); } else if (index % 5 === 0) { total.push(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countUp(input) {\n var total = [];\n for (var first = 1; first <= input; first++) {\n //test\n //console.log(first)\n if (first % 15 === 0) {\n total.push(\"PINGPONG\");\n } else if (first % 5 === 0) {\n total.push(\"PONG\");\n } else if (firs...
[ "0.6885193", "0.65763324", "0.64223444", "0.6229682", "0.6226158", "0.617686", "0.60266936", "0.6019278", "0.59952265", "0.5972141", "0.5945354", "0.5940848", "0.59371704", "0.5907879", "0.5899621", "0.5896014", "0.5843745", "0.58374435", "0.5831287", "0.5798823", "0.579253",...
0.6821299
1
Returns whether the text content contains line breaks.
isContentMultiLine() { return /\r?\n/.test(this.content.trim()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasNewline(value) {\n return typeof value === 'string' && /\\r|\\n/.test(value);\n }", "function isNewline(node) {\n return useNewlineChar ? node.textContent === '\\n' : node.tagName === 'BR';\n }", "function isNewline(node) {\n return useNewlineChar ? node.textContent === '\\n' : node....
[ "0.7372039", "0.71763253", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7156914", "0.7116402", "0.66104484", "0.6396932", "0.6396932", "0.6396932", "0.6381388", "0.6340487", "0.6295884", "0.62892574", ...
0.80764705
0
Checks whether a node is identical to another node by comparing tag names, attribute names and values and content.
isIdenticalTo(otherNode) { return super.isIdenticalTo(otherNode) && this.isContentIdenticalTo(otherNode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareNodes(a, b) {\n let aChildren = a.childNodes || [];\n let bChildren = b.childNodes || [];\n let aAttributes = a.attributes || [];\n let bAttributes = b.attributes || [];\n if (a.nodeType !== b.nodeType || (a.tagName !== b.tagName)) {\n return false;\n }\n if (a.nodeType === 3 && a.data !=...
[ "0.7188159", "0.6961757", "0.69311494", "0.6908586", "0.6861659", "0.6776662", "0.67071074", "0.6655086", "0.64933944", "0.64773726", "0.6431887", "0.6416286", "0.6411785", "0.6383507", "0.6244256", "0.6169616", "0.5974208", "0.5900133", "0.5849145", "0.5834332", "0.58145994"...
0.7201632
0
Circle with blurry outside, a bit like the moon in Crazy Nights
function blurredCircle(x, y, r, layering, c) { let transp = s.color(s.red(c), s.green(c), s.blue(c), 1) for (let i = layering; i >= 0; i--) { let colour = s.lerpColor(c, transp, i / layering) canvas.noStroke() canvas.fill(colour) canvas.circle(x, y, r + i) } canvas.fill(c) ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blurredCircle(x, y, r, layering, c){\n\t\tlet transp = s.color(s.red(c), s.green(c), s.blue(c), 1)\n\t\tfor(let i=layering;i>=0;i--){\n\t\t\tlet colour = s.lerpColor(c, transp, i/layering)\n\t\t\ts.noStroke()\n\t\t\ts.fill(colour)\n\t\t\ts.circle(x, y, r+i)\n\t\t}\n\t\ts.fill(c)\n\t\ts.circle(x, y, r)\n\t...
[ "0.732666", "0.67986035", "0.65605485", "0.63727957", "0.63599604", "0.6322739", "0.62059677", "0.6162732", "0.61615247", "0.61448455", "0.61426705", "0.6069842", "0.6040936", "0.6039662", "0.60314935", "0.6016766", "0.6008474", "0.5993356", "0.59894276", "0.5984214", "0.5982...
0.7460318
0
Similar to the above, to add a darkening effect to the outside
function darkenHalo(x, y, r, layering, c) { let transp = s.color(s.red(c), s.green(c), s.blue(c), 15) for (let i = 0; i < layering; i++) { canvas.noFill() canvas.stroke(transp) canvas.strokeWeight(2) canvas.circle(x, y, r - i) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imgblur(img){\t\r\n\tvar away = axisaway(img); \r\n\tif(away.toString() != \"false\"){\r\n\t\tvar opa = 0.2 + 0.8 * away;\r\n\t\timg.style.opacity = opa; \r\n\t}\r\n}", "function darkenHalo(x, y, r, layering, c){\n\t\tlet transp = s.color(s.red(c), s.green(c), s.blue(c), 15)\n\t\tfor(let i=0;i<layering;...
[ "0.69127053", "0.6757961", "0.6732834", "0.67175716", "0.66568387", "0.651941", "0.648923", "0.64546305", "0.6440427", "0.64258575", "0.6408619", "0.63683444", "0.6303716", "0.6273948", "0.62652206", "0.62558216", "0.6240412", "0.61894023", "0.61674786", "0.61477226", "0.6102...
0.6848373
1
set user session storage data
function setUserSessionStorageData(data) { var udata = utility.getFromStorage(true, "udata"); $.extend(true, udata, data || {}); utility.storeToStorage(true, "udata", data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSessionData(userData) {\n if (userData != null) {\n var userId = userData.userName;\n userData.sessionId = randomString(SESSION_ID_LENGTH, SESSION_ID_CHARACTERS);\n userData.sessionTime = new Date().getTime();\n allUserData[userId] = userData;\n localStorage.setItem(USER_DATA_KEY, JSON....
[ "0.80662173", "0.7790527", "0.77299637", "0.75617605", "0.7396094", "0.73464316", "0.7338565", "0.72448957", "0.7233419", "0.72042644", "0.7201944", "0.7193734", "0.7174929", "0.7158723", "0.7156321", "0.71267325", "0.7101072", "0.7060947", "0.70493364", "0.70144963", "0.6993...
0.82898253
0
set session storage data
function setSessionStorageData(key, data) { var d = utility.getFromStorage(true, key); $.extend(true, d, data || {}); utility.storeToStorage(true, key, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set() {\n sessionStorage.setItem('a', '1');\n}", "function setUserSessionStorageData(data) {\n var udata = utility.getFromStorage(true, \"udata\");\n $.extend(true, udata, data || {});\n\n utility.storeToStorage(true, \"udata\", data);\n}", "function SetSessionData (key, value) {\n sess...
[ "0.80026954", "0.7981999", "0.7852154", "0.774742", "0.75787365", "0.74604166", "0.74473816", "0.7444745", "0.7418129", "0.73920625", "0.73268795", "0.73237854", "0.72925764", "0.72925764", "0.72925764", "0.72925764", "0.7233841", "0.7167934", "0.71556795", "0.7100912", "0.70...
0.8301677
0
This sample demonstrates how to List all effective security admin rules applied on a virtual network.
async function listEffectiveSecurityAdminRules() { const credential = new DefaultAzureCredential(); const client = createNetworkManagementClient(credential); const subscriptionId = ""; const resourceGroupName = "myResourceGroup"; const virtualNetworkName = "testVirtualNetwork"; const options = { body: {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "newSecurityRule() {\n return {\n resource_name: `${this.generateResourceName()}Rule`,\n direction: \"INGRESS\", \n protocol: \"all\", \n is_stateless: false, \n description: \"\",\n source_type: \"CIDR_BLOCK\", \n source: \"0.0.0.0...
[ "0.52391315", "0.5236654", "0.5118224", "0.50903976", "0.50221014", "0.4982679", "0.49467987", "0.4928922", "0.48124337", "0.47967327", "0.47952455", "0.47450495", "0.4700273", "0.4690093", "0.4690093", "0.4690093", "0.4663238", "0.46529517", "0.46388033", "0.46276417", "0.46...
0.73611987
0
Get the position (in isometric coordinates) from a pixel x,y
function getPixelPos(x, y, tileWidth){ return [ (x / (tileWidth/2) + y / (tileWidth/4)) /2, (y / (tileWidth/4) -(x / (tileWidth/2))) /2 ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canvasPixeltoImagePixel(x, y) {\n if(x instanceof Array) {\n y = x[1];\n x = x[0];\n }\n else if(x.x != null) {\n y = x.y;\n x = x.x;\n }\n var coords = viewer.viewport.pointFromPixel(new OpenSeadragon.Point(x,y), true);\n coords.x = Math.floor(coords.x*viewer.viewport.contentSize.x);\n ...
[ "0.7366893", "0.7348609", "0.72670597", "0.722287", "0.7220258", "0.7198784", "0.7115281", "0.70280486", "0.7014918", "0.6998159", "0.6986657", "0.69197565", "0.69044507", "0.6902113", "0.6879662", "0.6842788", "0.683004", "0.6795968", "0.67942417", "0.6778049", "0.67770404",...
0.74883586
0
Calculate the win state.
function calculateWinState(){ if(gameIsFree){ return; } var result = getCalculatedTrafficPath(); currentConnectedPath = result.win || result.lose; if(result && result.win){ var sinPath = function(layer, coords){ if(now > this.start && now <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getState() {\n if (this.isWin()){\n this.state = 1\n }\n else if (this.moves === 9) {\n this.state = 2\n }\n \n return this.state\n }", "checkWinStates() {\n // in current board\n let state = '';\n for(let i=0;i<9;i++) state ...
[ "0.7570721", "0.72695327", "0.6881173", "0.68706316", "0.67773443", "0.65551347", "0.644778", "0.6427541", "0.6422669", "0.63963866", "0.63916355", "0.63315886", "0.6260682", "0.6257556", "0.62109137", "0.62109077", "0.61981446", "0.619648", "0.61702615", "0.6114204", "0.6105...
0.7685882
0
Returns if CHIP is supported in launchpage scenario.
function isChipSupported(oChipInstance) { return oChipInstance.getApi().configuration. getParameterValueAsString('sap.ui2.launchpage.support') === 'true'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkSupport() {\n\t\t\tvar ua = navigator.userAgent.toLowerCase();\n\t\t\t//var supported = ( ua.search(/(iphone)|(ipod)|(android)/) === -1 );\n\t\t\t//return supported;\n\t\t\treturn true;\n\t\t}", "static browser_is_supported() {\n if ('Microsoft Internet Explorer' === window.navigator.appName) {\...
[ "0.62420785", "0.6139314", "0.61297345", "0.61029357", "0.56726974", "0.56469923", "0.5602023", "0.5592599", "0.55438954", "0.55302894", "0.5525498", "0.5520791", "0.5509113", "0.5497666", "0.5484896", "0.5467005", "0.5455278", "0.54221004", "0.5413407", "0.5401889", "0.54017...
0.7800131
0
Final work after all catalog pages are read. Some catalog pages may fail to load due to unsupported CHIPs: Clean up array of catalogs AFTER loading all of them, select first one and set model for UI. Must only run once: Take care of catalog pages having multiple issues which leads to this function being called several ...
function checkFinalizeCatalogCreation() { var j; if (iCatalogsLoaded !== iCatalogCount || bCatalogCreationFinalized) { return; } bCatalogCreationFinalized = true; for (j = iCatalogCount; j >= 0; j = j - 1) { if (!aCatalogs[j]) { aCatalogs.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_catalog()\n{\n\tRMPApplication.debug (\"begin load_catalog\");\n c_debug(dbug.catalog, \"=> load_catalog\");\n\n // query catalog collection (capi)\n var input = {};\n var options = {};\n input.input_query = {}; // we load all catalog's items from collection (max 1000)\n id_get_...
[ "0.5947143", "0.5543162", "0.54386514", "0.53970397", "0.5347095", "0.5338871", "0.53303313", "0.5326941", "0.53186756", "0.5307306", "0.53000224", "0.5280403", "0.52698535", "0.52516353", "0.52407056", "0.5213765", "0.52023983", "0.5199094", "0.51807135", "0.5156323", "0.514...
0.5987215
0
each medal is an object in array, containing name, rgbcolor and an array, where each entry indicates the amount of won medals
function medalSeries(days) { var timelines = new Array(3); [['Gold', '#ffff00'], ['Silver', '#c0c0c0'], ['Bronze', '#cc9900']].forEach(function (metal, index) { //add zeroes as default values of won medals timelines[index] = ({ name: metal[0], color: metal[1], data: new Array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function medalWinners(athletesJSON) {\n const medalJson = athletesJSON.reduce((medalCount, event) => {\n if (event.Medal !== 'NA' && event.NOC === 'IND') {\n // Checks if athlete has won the medal and if he belongs from INDIA\n if (medalCount[event.Year]) {\n medalCount[event.Year].add(event.N...
[ "0.56604534", "0.5598326", "0.53994054", "0.53604007", "0.5357826", "0.5337083", "0.5328829", "0.5328222", "0.530342", "0.52465296", "0.5211332", "0.52113074", "0.52053684", "0.52052134", "0.5203207", "0.5173534", "0.5153401", "0.5144221", "0.51436275", "0.5141086", "0.511984...
0.5899434
0
Write a function called stringItOut that takes in an array. Determine if it is an array of numbers or strings and sort it greatest to least accordingly (sort strings alphabetically). Return the array converted into a string using the toString method. Code here
function stringItOut(arr){ arr.sort( (a,b) => { if (a > b) {return -1;} else if(a < b) {return 1;} else {return 0} }) return arr.toString() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortArray( array ){\r\n\tarrayNumber = [];\r\n\tarrayString = [];\r\n\t\r\n\tfor (var i = 0; i < array.length; i++) {\r\n\t\tif (typeof array[i] == 'number') {\r\n\t\t\tarrayNumber.push(array[i]);\r\n\t\t\tarrayNumber.sort();\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tarrayString.push(array[i]);\r\n\t\t\tarraySt...
[ "0.70471084", "0.6631735", "0.6556824", "0.65052605", "0.6436212", "0.6363781", "0.6278333", "0.62526613", "0.6238705", "0.62283754", "0.6205511", "0.6187135", "0.618385", "0.6178026", "0.61723095", "0.61683637", "0.6166553", "0.61569744", "0.61438525", "0.61111397", "0.60912...
0.8099495
0
createBackground() draws out the background for the game. This includes the outline for the gameboard, the lighter black box at the bottom of gameboard, and the stars all packed neatly in their own functions
function createBackground() { background(0); drawOutline(); drawMilkyWay(); stars.draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBackground() {\n\tvar background = document.createElement(\"canvas\"),\n\t\tbgctx = background.getContext(\"2d\");\n\n\t\tjewel.dom.addClass(background, \"background\");\n\t\tbackground.width = cols * jewelSize;\n\t\tbackground.height = rows * jewelSize;\n\n\t\tbgctx.fillStyle = \"rgba(227, 141, 182...
[ "0.77019906", "0.76870036", "0.7440555", "0.7422023", "0.7369598", "0.7345884", "0.7334168", "0.7324894", "0.7288172", "0.727213", "0.72695917", "0.72651434", "0.71965057", "0.7161402", "0.71553594", "0.7122132", "0.70754606", "0.70752317", "0.70639575", "0.7058573", "0.70529...
0.86005116
0
drawOutline() creates outline around gameboard
function drawOutline() { stroke('#EBEBD3'); strokeWeight(4); noFill(); //noFill needed so that the black background will show through rect(0,0,width,height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawOutline()\n{\n // We don't need lighting or textures on outlines\n gl.disableVertexAttribArray(vNormal);\n gl.disableVertexAttribArray(texCoordLoc);\n\n // Bind the current buffer that we want to draw (the one with the points)\n gl.bindBuffer( gl.ARRAY_BUFFER, vOutlineBuffer );\n gl....
[ "0.7627346", "0.74145335", "0.73469955", "0.7107475", "0.70009476", "0.69635844", "0.68944055", "0.66750056", "0.66156775", "0.6610527", "0.657954", "0.6556128", "0.652738", "0.65016717", "0.64508486", "0.63933676", "0.6382644", "0.6160456", "0.61032027", "0.6048361", "0.6048...
0.8440358
0
drawMilkyWay() creates "Milky way", lighter black box at bottom of gameboard
function drawMilkyWay() { const border = 2; fill('#1F2223'); noStroke(); rect(border, 300, width-border*2, 348); //values take outer stroke into consideration and don't cover it up, stroke = 2 px (approx) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawMilkyWay(ctx, gpara) {\n ctx.setLineDash([]);\n ctx.strokeStyle = \"blue\";\n // Northern edge\n drawLineInChart(ctx,milky.northernEdge,gpara);\n // Southhern edge\n drawLineInChart(ctx,milky.southernEdge,gpara);\n // Others\n drawLineInChart(ctx,milky.betaCas,gpara);\n draw...
[ "0.73212963", "0.6238606", "0.6232464", "0.6101359", "0.59928447", "0.59916943", "0.5986305", "0.5913092", "0.5902736", "0.5897345", "0.5874249", "0.58220994", "0.5822062", "0.5821014", "0.5818425", "0.57766086", "0.57743037", "0.57714015", "0.57701015", "0.5729317", "0.57285...
0.8082691
0
Exchanges ZAR to a foreign currency
function exchangeLocalCurrency(e) { let amount = $('input[name="localAmount"]').value; const currency = $('select[name="localCurrency"]').value; fetch(API + '/exchange', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ amount, currency })}).then((response) => { respo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zDollar() {\n requestify.get('https://min-api.cryptocompare.com/data/price?fsym=ZEC&tsyms=USD')\n .then(function(response) {\n var dol = response.getBody();\n answer.coinToDollar = dol.USD; // Zcash Coin to Dollar Rate\n done();\n }\n );\n }", "function conver...
[ "0.6972049", "0.5860947", "0.5855554", "0.5852422", "0.58232397", "0.5822511", "0.5772242", "0.57720894", "0.5653726", "0.56487614", "0.5646797", "0.5641788", "0.55891967", "0.5582829", "0.5565551", "0.555315", "0.55327946", "0.54516655", "0.5431173", "0.54269516", "0.5424644...
0.605348
1
Shows an populates the order confirmation page
function showOrderConfirmation(order) { $('.summary-body').innerHTML = ''; for (let item in order) { $('.summary-body').innerHTML += '<tr>\ <td>' + item.replace('_', ' ').toUpperCase() + '</td>\ <td>' + order[item] + '</td>\ </tr>'; } $('.select-page').style.display = 'none'; $('.confirm-page...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderConfirmation(orderObject) {\n var entries;\n\n console.log(entries);\n var data = {\n from: config.fromEmail,\n to: 'jensderond@gmail.com',\n subject: 'Bestelling bevestiging',\n html: pug.renderFile( EMAIL_TEMPLATES_ROOT + 'order-confirm.pug',\n {\n orderId: orderObject.id,\n ...
[ "0.6879554", "0.67524326", "0.6565232", "0.65270853", "0.6501788", "0.64112556", "0.6358293", "0.63467646", "0.62684053", "0.6242595", "0.62286687", "0.62260556", "0.61846906", "0.61429745", "0.6133316", "0.6082566", "0.60802203", "0.60497564", "0.603541", "0.59712946", "0.59...
0.8020284
0
MODULE 04 SAVE AND RETRIEVE Stores each list items' innerHTML and completed status
function saveList() { localStorage.clear(); for (let i = 0; i < taskList.childElementCount; i += 1) { const item = taskList.children[i]; localStorage.setItem(`${i}`, `${item.innerHTML}`); localStorage.setItem(`${i}${i}`, `${item.classList.contains('completed')}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function store() {\n window.localStorage.myitems = list.innerHTML;\n }", "function SaveList() {\n // Loop that goes through current task list and saves to local storage\n for (let i = 1; i <= $(\"#list li\").length; i++) {\n localStorage.setItem((\"task\" + i), $(\"#list li:nth-of-type(\" + i ...
[ "0.7081082", "0.7009778", "0.68619806", "0.68285763", "0.67518485", "0.6725878", "0.67091763", "0.66905236", "0.65883267", "0.65171015", "0.65025043", "0.64550155", "0.6448421", "0.6430208", "0.6379295", "0.63760644", "0.635718", "0.63488746", "0.63042885", "0.6299381", "0.62...
0.7118189
0
Gets current levels sliders are at, parses them into numbers. Returns as an array.
function getCurrentSliderLevel(){ var sliderArray =[]; var sliders = document.getElementsByClassName("rangePicker"); [].forEach.call(sliders, function (slider) { sliderArray.push(parseInt(slider.value, 10)); }); console.log("Slider Values: " + sliderArray); return sliderArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLevels() {\n //this gets called a lot so check first\n if (parserConfig.hasChanged()) {\n levels = parserConfig.getLevels();\n }\n }", "function getLevel() {\n // Get the data from the meter\n var measures = meter.measure();\n // Display the val...
[ "0.65690315", "0.5657186", "0.56010294", "0.5560575", "0.55330664", "0.55326605", "0.55236423", "0.55236423", "0.54167366", "0.5319623", "0.5284505", "0.52826005", "0.52778375", "0.52591676", "0.5182075", "0.5170772", "0.51574427", "0.51196057", "0.51118034", "0.5101463", "0....
0.7502661
0
this funciton will edit the spentPoints updating existing payer values and creating nonexiting payer values
function editPointObject(payer, pointValue, pointObject) { if (pointObject[payer]) { pointObject[payer] = pointObject[payer] + pointValue; } else { pointObject[payer] = pointValue; } return pointObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePoints() {\n if (gamePointsInfo.correctClicks != 0) {\n if (gamePointsInfo.correctClicks % inGameDifficulty.bonusClickQty == 0) {\n gamePointsInfo.bonus++\n }\n }\n\n let plusThese = (gamePointsInfo.completeMatch * inGameDifficulty.posPoints)...
[ "0.6303631", "0.6209583", "0.61438817", "0.591563", "0.5910819", "0.5833369", "0.58242756", "0.57060033", "0.5702513", "0.56925124", "0.5682776", "0.5657283", "0.5646952", "0.5642169", "0.5636935", "0.563106", "0.5609173", "0.55733126", "0.55683935", "0.55668414", "0.5552498"...
0.68583477
0
base:["bar","pie","line", etc] Chart type used to render the chart. name:name of the chart. usually the lookgraph name. alias:Array of alternate names for the chart (optional). useChart: Use this chart instead of the "name" one. label:title to display in chart tool. chartProps: ["pieProps","barProps", etc] base propert...
function tdginfoInit(ibiMsgStr) { tdginfo.category = [ { category: ibiMsgStr['crtbar'], //Bar Category chartList:[ {base:'bar',internalType:'bla',name:'vbar', label:ibiMsgStr['VBar'],chartProps: 'barProps',showInTool:false}, {base:'bar',internalType:'bla',name:'errorbar'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeChartForThisData(currentData,type='bar'){\n\n\tlet data = getDataForChart(currentData.datasets[0].data, currentData.datasets.slice(1));\n\tlet option = getOptionsOfChart(currentData.title);\n\tploatChart(\"chart_1\",type, data, option);\n\n\n}", "chartDetailInJson() {\r\n return {\r\n ...
[ "0.6371261", "0.6283228", "0.60009897", "0.5949351", "0.59371203", "0.5887644", "0.5853745", "0.5818611", "0.57990384", "0.57231176", "0.5707496", "0.5697223", "0.56699115", "0.5658873", "0.56529313", "0.5619253", "0.56163096", "0.5608206", "0.5600711", "0.55887747", "0.55675...
0.6948563
0
Loads image tags and places them as buttons.
function loadTags() { console.log("Loading tags"); makeJsonRequest('GET', 'rest/image/tags', (tags) => { let tagBox = document.getElementById("tag-box"); tags.forEach((item) => { let button = document.createElement('button'); button.addEventListener('click', () => loadThu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initilaizeButtons() {\n for (let i = 0; i < imageSrcArray.length; i++) {\n createButton(imageSrcArray[i]);\n }\n }", "function setupTagPanelButtons(){\n\t$('.addNewTag').click(()=>{\n\t\taddTagButton()\n\t});\n\tsetupTagSaveLoadButtons()\n}", "function loadImages() {\n\n ...
[ "0.6828088", "0.6334059", "0.62000173", "0.6197271", "0.6191428", "0.6108071", "0.6103768", "0.60793334", "0.6063733", "0.60511386", "0.60483044", "0.6042528", "0.60362095", "0.6018248", "0.6015685", "0.5991384", "0.5984683", "0.5983468", "0.5969685", "0.59649634", "0.5935097...
0.6919184
0
Loads thumbnails of images for given tag name.
function loadThumbnails(tagName) { makeJsonRequest('GET', 'rest/image/tags/' + tagName, (thumbnails) => { document.getElementById("image-box").innerHTML = ""; let thumbnailBox = document.getElementById("thumbnail-box"); thumbnailBox.innerHTML = ""; thumbnails.forEach((item) => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImages(path) {\n $.getJSON({\n url: \"/api/list-previews\",\n data: {dir: path},\n success: function (result) {\n $(\"div.thumbnails\").empty();\n result.forEach(function(element) {\n n = $( \"<a href=\\\"/f/\" + ...
[ "0.64923084", "0.6298398", "0.5969862", "0.5903104", "0.5819022", "0.5789391", "0.5787085", "0.5766348", "0.5759325", "0.57569915", "0.56980675", "0.56978315", "0.5679249", "0.5666112", "0.5649467", "0.5644769", "0.56300116", "0.5615492", "0.55899227", "0.5565895", "0.5555493...
0.73672384
0
Write a function called makeAcronym() that converts a name like Portable Document Format to its acronym (PNG).
function makeAcronym(str){ var newArr = str.split(' '); var finalStr = ''; for(var i = 0; i < newArr.length; i++){ finalStr += newArr[i][0].toUpperCase(); } return finalStr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAbbr(name) {\n let name2=name.replace(/[^0-9A-Z]+/gi,\" \"); // Remove non alphanumeric characters\n name2=name2.replace(/\\s+/g, ' '); // Reduce multiple spaces to one space for word split\n\n let words=name2.split(\" \",2); // Get first 2 words \n ...
[ "0.6959074", "0.65002537", "0.64806587", "0.6480503", "0.64033777", "0.64033777", "0.64033777", "0.64033777", "0.63440394", "0.62822026", "0.6242985", "0.6190318", "0.6154278", "0.614853", "0.614853", "0.6122093", "0.6122093", "0.6122093", "0.6122093", "0.6122093", "0.6122093...
0.68188226
1
Reset data for search table
resetDataSearch() { $(this.wrapperSearchFilter)[0].reset(); this.clearForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n searchResultData = {};\n }", "function resetSearchResults() {\n\t\tsearchresults.listD.length = 0;\t searchresults.listSL.length = 0; searchresults.listWC.length = 0; \n\t\tsearchresults.listSI.length = 0; searchresults.listLBM.length = 0; searchresults.listGEN.length = 0; \n\t}",...
[ "0.8263693", "0.7654803", "0.75629586", "0.7547072", "0.748246", "0.73660564", "0.73338014", "0.7328728", "0.72982866", "0.72739655", "0.72062564", "0.71973073", "0.71973073", "0.71973073", "0.71973073", "0.7173235", "0.71345764", "0.71178335", "0.7109131", "0.709692", "0.707...
0.8108851
1
Disable all input when loading
disableFieldsWhenLoading() { $(this.wrapperSearchFilter + ' input').data('disabled', true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableInputs(){\n\t\t/* Disabling entry boxes. */\n\t\t$(\".\" + __constants.DOM_SEL_INPUT_BOX).attr('readonly','readonly');\n\t}", "disable() {\n\t\tfor (let i = 0; i < this.inputs.length; i++) {\n\t\t\tthis.inputs[i].disabled = true;\n\t\t}\n\t}", "function disableUI () {\n\n fileButton.disabled...
[ "0.7067378", "0.69748515", "0.6938642", "0.68553674", "0.6785942", "0.677601", "0.6741935", "0.66821575", "0.66388243", "0.6607749", "0.66064554", "0.658969", "0.6585053", "0.6575568", "0.6560785", "0.6545304", "0.65302783", "0.6513333", "0.6513333", "0.6513333", "0.6513333",...
0.71598834
0
Get an existing SshKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
static get(name, id, state, opts) { return new SshKey(name, state, Object.assign(Object.assign({}, opts), { id: id })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get(name, id, state, opts) {\n return new KeyPair(name, state, Object.assign(Object.assign({}, opts), { id: id }));\n }", "function getState(id) {\n return id ? state[id] : state;\n }", "function getStateKey(key) {\n return KEY + key;\n }", "static get(name, id, opts) {\n ...
[ "0.6455372", "0.5402664", "0.52507573", "0.51363635", "0.49337938", "0.4812133", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", "0.479666", ...
0.739048
1
Returns true if the given object is an instance of SshKey. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === SshKey.__pulumiType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isKey(obj) {\n var obj2;\n\n try {\n var unseal = obj.unseal;\n if (typeof unseal !== \"function\") {\n return false;\n }\n obj2 = unseal(theUnsealer);\n } catch (ex) {\n // Ignore; can't assume that other objects obey any particular\n // unsea...
[ "0.6087296", "0.6087296", "0.57775456", "0.56538457", "0.56532365", "0.5559464", "0.55074996", "0.55074996", "0.5505091", "0.5501318", "0.5446512", "0.5416657", "0.5391694", "0.5391694", "0.5391694", "0.5391694", "0.5391694", "0.5391694", "0.5391694", "0.5391694", "0.5391694"...
0.7002051
1
Checks to see if this deposit is already in the redemption process and, if it is, returns the details of that redemption. Returns null if there is no current redemption.
async getCurrentRedemption() { const details = await this.getLatestRedemptionDetails() if (details) { return new Redemption(this, details) } else { return null } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocalDraft() {\n var localDrafts = window.localStorage.localDrafts ?\n JSON.parse(window.localStorage.localDrafts) : {};\n var parent_rrid = $(\"#mozreview-data\").data(\"parent-review-id\");\n return localDrafts[parent_rrid] ? localDrafts[parent_rrid] : {};\n }", "getReceipt() {\n ...
[ "0.54741997", "0.46679595", "0.45796508", "0.45319661", "0.4529181", "0.45069864", "0.44314194", "0.43811366", "0.42297474", "0.42048818", "0.4171598", "0.41692945", "0.4143054", "0.4117583", "0.40788683", "0.40711612", "0.40612242", "0.40254167", "0.39869708", "0.39805308", ...
0.7383447
0
Finds an existing event from the keep backing the Deposit to access the keep's public key, then submits it to the deposit to transition from state AWAITING_SIGNER_SETUP to state AWAITING_BTC_FUNDING_PROOF and provide access to the Bitcoin address for the deposit. Note that the client must do this public key submission ...
async findOrWaitForPublicKeyPoint() { const signerPubkeyEvent = await this.readPublishedPubkeyEvent() if (signerPubkeyEvent) { console.debug( `Found existing Bitcoin address for deposit ${this.address}...` ) return { x: signerPubkeyEvent.returnValues._signingGroupPubkeyX, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function _getPublicKey({ address, web3 }) {\n\n if (memoizedPublicKeysMap[address]) {\n return memoizedPublicKeysMap[address]\n }\n\n const message = 'This signature is needed to encrypt the notification'\n\n const signature = await new Promise((resolve, reject) => {\n web3.currentProvider.sendAsyn...
[ "0.5224915", "0.5083772", "0.50066054", "0.50062275", "0.4926271", "0.4908365", "0.48950762", "0.4867308", "0.4821583", "0.47731364", "0.47669694", "0.4738551", "0.47383955", "0.47230947", "0.47192234", "0.46854717", "0.46780342", "0.46697176", "0.46584776", "0.4646201", "0.4...
0.7536006
0
Returns a promise that is fulfilled when the contract has entered the active state.
async waitForActiveState() { const depositIsActive = await this.contract.methods.inActive().call() if (depositIsActive) { return true } console.debug( `Monitoring deposit ${this.address} for transition to ACTIVE.` ) // If we weren't active, wait for Funded, then mark as active. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isActive() {\n return Promise.resolve(this._isActive());\n }", "ensureActive () {\n return new Promise((resolve) => {\n if (this.active) {\n resolve()\n } else {\n this.$once('is-active', resolve)\n }\n })\n }", "async function compactivate(contract...
[ "0.7035778", "0.67287266", "0.6611467", "0.64004", "0.59395725", "0.5925658", "0.59227663", "0.57547253", "0.57532257", "0.5606979", "0.5595094", "0.55644953", "0.54711515", "0.5439512", "0.54092103", "0.540737", "0.540177", "0.53982854", "0.53939724", "0.53555065", "0.533428...
0.75816107
0
Exit the courtesy call state. Only callable if the deposit is sufficiently collateralised.
async exitCourtesyCall() { await EthereumHelpers.sendSafely(this.contract.methods.exitCourtesyCall()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitCommitmentControlClause(ctx) {\n\t}", "exitBasis(ctx) {\n\t}", "exitParenthese(ctx) {}", "exitCaseAlternative(ctx) {\n\t}", "exitCurrencySignClause(ctx) {\n\t}", "exitCommitWork(ctx) {\n\t}", "exitCancelCall(ctx) {\n\t}", "exitPerformBy(ctx) {\n\t}", "exitFunctionCall(ctx) {\r\n\t}", "exitCal...
[ "0.60289776", "0.59147435", "0.58853275", "0.58736014", "0.5868499", "0.5842023", "0.58271444", "0.58072776", "0.57986754", "0.57871354", "0.5769135", "0.5764581", "0.5741992", "0.5727103", "0.57131356", "0.57110065", "0.57110065", "0.56913805", "0.568908", "0.5687235", "0.56...
0.7322015
0
Notify the contract that the courtesy call period has expired and begin liquidation of the signer bonds. The bonds are auctioned in a fallingprice auction. The value of the bonds can be queried using `Deposit.auctionValue`, and bids placed using `Deposit.purchaseSignerBondsAtAuction`.
async notifyCourtesyCallExpired() { await EthereumHelpers.sendSafely( this.contract.methods.notifyCourtesyCallExpired() ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async purchaseSignerBondsAtAuction() {\n // FIXME Need systemic handling of default from address.\n const owner = this.factory.config.web3.eth.defaultAccount\n const allowance = await this.factory\n .token()\n .methods.allowance(owner, this.address)\n .call()\n\n const lotSize = await th...
[ "0.60030663", "0.55695736", "0.53634924", "0.53044575", "0.52211297", "0.51301664", "0.51295125", "0.50816596", "0.50617754", "0.5052133", "0.50162995", "0.4969506", "0.4961773", "0.48967505", "0.48878744", "0.48846346", "0.48705024", "0.4863142", "0.48614413", "0.48401198", ...
0.5974383
1
Notify the contract that the deposit is severely undercollateralized, and begin liquidation of the signer bonds. The bonds are auctioned in a fallingprice auction. The value of the bonds can be queried using `Deposit.auctionValue`, and bids placed using `Deposit.purchaseSignerBondsAtAuction`.
async notifyUndercollateralizedLiquidation() { await EthereumHelpers.sendSafely( this.contract.methods.notifyUndercollateralizedLiquidation() ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async purchaseSignerBondsAtAuction() {\n // FIXME Need systemic handling of default from address.\n const owner = this.factory.config.web3.eth.defaultAccount\n const allowance = await this.factory\n .token()\n .methods.allowance(owner, this.address)\n .call()\n\n const lotSize = await th...
[ "0.62158704", "0.5675948", "0.52248937", "0.51191115", "0.51060385", "0.5102265", "0.50910884", "0.50906485", "0.5019531", "0.5016461", "0.50073797", "0.50049716", "0.5002212", "0.49849784", "0.49627155", "0.48918018", "0.48868707", "0.4872595", "0.4819905", "0.47990796", "0....
0.6127197
1
Purchases the signer bonds and closes the liquidation auction.
async purchaseSignerBondsAtAuction() { // FIXME Need systemic handling of default from address. const owner = this.factory.config.web3.eth.defaultAccount const allowance = await this.factory .token() .methods.allowance(owner, this.address) .call() const lotSize = await this.getLotSize...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async takeAuction() {\n await this.purchaseSignerBondsAtAuction()\n await this.withdrawFunds()\n }", "async closeAuction() {\n const user = await User.findOne(Meteor.userId());\n\n if (!user || (user._id !== this.borrowerId && !user.isAdmin())) {\n throw new Meteor.Error(403, 'Access forb...
[ "0.65746856", "0.6246772", "0.5635865", "0.5424917", "0.5391352", "0.5377967", "0.5235081", "0.52264726", "0.521159", "0.51706266", "0.5132146", "0.5122552", "0.5119239", "0.5113536", "0.5111072", "0.5103202", "0.5094662", "0.5089747", "0.5069463", "0.5065961", "0.5040134", ...
0.66229415
0
Withdraw caller's allowance. Withdrawals can only happen when a contract is in an endstate.
async withdrawFunds() { // FIXME Need systemic handling of default from address. await EthereumHelpers.sendSafely(this.contract.methods.withdrawFunds()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleWithdraw(event){\n event.preventDefault();\n calculatesWithWallet(currency, amount, context.wallet, rejectTransaction, handleOpen);\n }", "async withdraw(){\n let withdrawl = await App.contract.withdraw({from: web3.eth.defaultAccount, gas: gasAmount})\n .on('error', ...
[ "0.706384", "0.66967434", "0.6695413", "0.6620573", "0.6611397", "0.6595521", "0.6522766", "0.64788556", "0.64494586", "0.63917154", "0.63255894", "0.6310325", "0.6056661", "0.603786", "0.5981866", "0.593231", "0.5923738", "0.58857703", "0.5879344", "0.58547044", "0.5849878",...
0.71091247
0
Notify the contract that the funder has failed to send BTC. Only applicable during funding.
async notifyFundingTimedOut() { await EthereumHelpers.sendSafely( this.contract.methods.notifyFundingTimedOut() ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async notifySignerSetupFailed() {\n await EthereumHelpers.sendSafely(\n this.contract.methods.notifySignerSetupFailed()\n )\n }", "function on_fail(msg) {\n Action.add(\"Transmission failed\", msg, 'fail')\n throw new Error(\"Transmission failed.\")\n}", "confirmationFailure() {\n this.uiCommu...
[ "0.6796849", "0.6190974", "0.58873683", "0.5824957", "0.5824957", "0.58214706", "0.5804241", "0.5789333", "0.57411486", "0.56809807", "0.5665892", "0.56592834", "0.5637547", "0.5635607", "0.56159246", "0.548604", "0.54842913", "0.5483587", "0.54503614", "0.54145044", "0.53982...
0.6756407
1
Notify the contract that the signers have failed to produce a signature for a redemption transaction. This is considered fraud, and moves the deposit into liquidation. Only applicable during redemption.
async notifyRedemptionSignatureTimedOut() { await EthereumHelpers.sendSafely( this.contract.methods.notifyRedemptionSignatureTimedOut() ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async notifySignerSetupFailed() {\n await EthereumHelpers.sendSafely(\n this.contract.methods.notifySignerSetupFailed()\n )\n }", "function doneSigning() {\n\t\tvar card = getCurrentCard();\n\n\t\tif(card && checkCard(card)) {\n\t\t\t// Card is valid...\n\t\t\t// submit card\n\t\t\tvar includes = car...
[ "0.6782114", "0.5572672", "0.5568356", "0.5463532", "0.5463532", "0.52877784", "0.519475", "0.5166658", "0.5126015", "0.50493497", "0.5031874", "0.5021646", "0.49474868", "0.49069518", "0.4865348", "0.48366013", "0.4824392", "0.4818506", "0.4818506", "0.4818506", "0.4818506",...
0.65411955
1
Notify the contract that the signers have failed to produce a redemption proof.
async notifyRedemptionProofTimedOut() { await EthereumHelpers.sendSafely( this.contract.methods.notifyRedemptionProofTimedOut() ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async notifySignerSetupFailed() {\n await EthereumHelpers.sendSafely(\n this.contract.methods.notifySignerSetupFailed()\n )\n }", "async notifyRedemptionSignatureTimedOut() {\n await EthereumHelpers.sendSafely(\n this.contract.methods.notifyRedemptionSignatureTimedOut()\n )\n }", "confi...
[ "0.72779965", "0.63884133", "0.6004996", "0.587495", "0.587495", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.54575545", "0.5342962", "0.5261457", "0.52382886", "0.5229387", "0.5...
0.64115953
1
Button click swap hardware style
function styleSwap() { document.getElementsByClassName("cassette")[0].style.display = "block"; document.getElementsByClassName("cassette")[1].style.display = "block"; document.getElementById('hstyle').innerHTML='Cassette'; document.getElementById('clickcassette').classList.add("styleactive"); document.getElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickSwitch() {\n 'use strict';\n var isA = 0;\n var btnA = document.getElementById('metric-button');\n var btnB = document.getElementById('imperial-button');\n \n function setState(isA) {\n btnA.className = (isA == 0) ? 'btn inactive' : 'btn'; \n btnB.className = (isA == 1) ? '...
[ "0.6632789", "0.64359677", "0.6401112", "0.6357901", "0.6325995", "0.6302391", "0.6279826", "0.6262018", "0.620531", "0.6204932", "0.6204932", "0.6183041", "0.6139917", "0.6084698", "0.60499996", "0.60496205", "0.60414857", "0.6033804", "0.6027108", "0.60136026", "0.59695596"...
0.6518421
1
position bending: bend fully to server position in each sync [percent=1.0], unless the position difference is larger than 4.0 (i.e. wrap beyond bounds)
get bending() { return { position: { max: 4.0 } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get bending() {\n return { position: { max: 500.0 } };\n }", "function bnpClamp(){for(var c=this.s&this.DM;this.t>0&&this[this.t-1]==c;)--this.t}", "bendToCurrent(original, percent, worldSettings, isLocal, increments) {\n\n let bending = { increments, percent };\n // if the object has d...
[ "0.6365683", "0.5948722", "0.59378123", "0.5911154", "0.58879066", "0.5887542", "0.5887542", "0.58725446", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", "0.5868206", ...
0.6269919
1
on addtoworld, create a physics body
onAddToWorld() { game = this.gameEngine; p2 = game.physicsEngine.p2; this.physicsObj = new p2.Body({ mass: this.mass, damping: 0, angularDamping: 0, position: [this.position.x, this.position.y], velocity: [this.velocity.x, this.velocity...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWorld() \n{\n    //gravity vector x, y - 10 m/s2 - thats earth!!\n\tvar gravity = new b2Vec2(0, -9.8);//create a new gravity\n\n\tworld = new b2World(gravity , true );//create a new world\n\t//setup debug draw\n\tvar debugDraw = new b2DebugDraw();\n\tdebugDraw.SetSprite(document.getElementById(\"can...
[ "0.7346924", "0.73455507", "0.7218406", "0.71306616", "0.7127962", "0.7094408", "0.7077846", "0.7065309", "0.70255196", "0.6993261", "0.6975745", "0.69511944", "0.6948436", "0.69463784", "0.6859367", "0.6836851", "0.68250245", "0.67298084", "0.6713397", "0.6707908", "0.670698...
0.75195915
0
on removefromworld, remove the physics body
onRemoveFromWorld() { game.physicsEngine.world.removeBody(this.physicsObj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeRigidbodyFromWorld() {\n if (this.colGroup == FudgeCore.PHYSICS_GROUP.TRIGGER) { //Delete check for this trigger from world if this component is removed\n FudgeCore.Physics.world.unregisterTrigger(this);\n }\n FudgeCore.Physics.world.removeRigidbody(this);\n ...
[ "0.780062", "0.74827814", "0.7459744", "0.7191566", "0.7191566", "0.7182322", "0.6932915", "0.6915462", "0.689527", "0.6850162", "0.6828028", "0.6686103", "0.6621892", "0.65968305", "0.65395886", "0.6400781", "0.63595665", "0.6302144", "0.62600994", "0.616905", "0.61259735", ...
0.9179132
0
Adds random .verts to an asteroid body
addAsteroidVerts() { let width = this.physicsObj.shapes[0].width; let height = this.physicsObj.shapes[0].height; this.physicsObj.verts = [ [-width / 2, -height / 2], [-width / 2, height / 2], [width / 2, height / 2], [width / 2, -height / 2], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(x,y,width,height) {\n//To make the ground still\n var options = {\n isStatic: true\n}\n//To keep the x,y axis,width,height at random\n this.body = Bodies.rectangle(x,y,width,height,options);\n this.width = width;\n this.height = height;\n//To add it to the world \n World.add(world, ...
[ "0.61340094", "0.60894626", "0.6025816", "0.6018479", "0.5988176", "0.59844774", "0.5935097", "0.59330976", "0.58515674", "0.584665", "0.5838808", "0.58218557", "0.5811463", "0.57929015", "0.5788386", "0.5719787", "0.5703499", "0.5696599", "0.5689758", "0.5683333", "0.5681094...
0.70455945
0
name_chip moustache template service
function LoadNameChip(nameParam) { var template = $('#add_new_name_chip_template').html(); Mustache.parse(template); // optional, speeds up future uses var rendered = Mustache.render(template, { name: nameParam }); $('#add_new_name_chip_container').append(rendered); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tpl(data) {\n return '<span class=\"cyCompartmentLumen\" >' + data.name + '</span>'; // your html template here \n }", "tpl(data) {\n return '<span class=\"cyCompartmentMembrane\" >' + data.name + '</span>'; // your html template here\n }", "function addTemplateContent(name, ...
[ "0.6521489", "0.6418551", "0.6347031", "0.6321493", "0.61775076", "0.6137127", "0.61199325", "0.6094539", "0.6005251", "0.60028183", "0.59225327", "0.59177905", "0.5902142", "0.5895396", "0.586943", "0.58189195", "0.58092964", "0.5801739", "0.5800127", "0.57886094", "0.575645...
0.6995639
0
Funcion: Renderiza todos mis libros:
function renderLibrary(){ bookShelft.innerHTML = " "; // quiero borrar primero todo lo que hay en el DOM myLibrary.forEach(libro => { renderBook(libro) // rederizo todos mis libros }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(){\n resetData();\n myLibary.forEach((array, index) =>{\n data.appendChild(createTableData(array, index));\n });\n}", "function render () {\n for (let i = 0; i < productos.length; i++) {\n if(productos[0] && productos[i].cantidad > 0){\n const productosRender ...
[ "0.6348276", "0.62074596", "0.6160072", "0.6134094", "0.6127045", "0.61101484", "0.6087444", "0.60746366", "0.6058981", "0.6031654", "0.5927114", "0.5900917", "0.589444", "0.5857197", "0.58112025", "0.57596064", "0.5737994", "0.5701847", "0.5687405", "0.5650168", "0.5640064",...
0.74609715
0
Funcion agrega mis datos/ libros a mi array myLibrary: una instancia de mi funcion constructora "Books".
function addBookToLibrary(title, author, pages, isRead){ var book = new Books (title, author, pages, isRead) myLibrary.push(book); // con push me aseguro de agreguen al final de mi array. saveLocal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeLibrary() {\r\n let book1 = new createBook(\"Cracking the Coding Interview\", \"Gayle Laakman Mcdowell\", 708, false);\r\n let book2 = new createBook(\"Linear Algebra Done Right\", \"Sheldon Axler\", 340, true);\r\n let book3 = new createBook(\"The Musician's Guide to Theory and Analysi...
[ "0.802251", "0.7872998", "0.77740335", "0.7745301", "0.77151746", "0.7686086", "0.7529791", "0.7523846", "0.7522222", "0.7519853", "0.74956137", "0.7442302", "0.7386752", "0.73770887", "0.733053", "0.73040015", "0.72744495", "0.7228218", "0.7211222", "0.71703416", "0.71178335...
0.7883974
1
Extract query params from url
function extractQueryParams(url) { let searchParams = url.searchParams; let queryParams = {}; for (let pair of searchParams.entries()) { queryParams[pair[0]] = pair[1]; } return queryParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQueryStringParams() {\r\n let query = location.search;\r\n return query\r\n ? (/^[?#]/.test(query) ? query.slice(1) : query)\r\n .split('&')\r\n .reduce((params, param) => {\r\n let [key, value] = param.split('=');\r\n params[key] = value...
[ "0.7800778", "0.773402", "0.77080005", "0.76682305", "0.7655924", "0.7583008", "0.75696236", "0.7554285", "0.7545264", "0.75285786", "0.75234616", "0.7520169", "0.7515388", "0.7511866", "0.749749", "0.7470267", "0.7470267", "0.7470267", "0.74700767", "0.7431922", "0.74030674"...
0.7957213
0
fetch word count from api
function getWordsCount(){ fetch('http://localhost:5000') .then(resp => resp.json()) // .then(console.log) .then(wordsCount => renderWordsCount(wordsCount) ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async getTotalCountLearnedWords() {\n const data = await WordsGlobalStatistics.getWordsData({\n wordsPerPage: 1,\n filter: FILTERS.LEARNED,\n });\n\n if (!data) {\n return data;\n }\n\n const { count } = data;\n\n return count;\n }", "function wordCount(data){\n var wo...
[ "0.6907367", "0.6746338", "0.6559651", "0.6501906", "0.6429029", "0.64205176", "0.63728845", "0.62809336", "0.6273966", "0.6261586", "0.6259117", "0.6259117", "0.6249459", "0.6243979", "0.6194979", "0.61910266", "0.6181308", "0.61559886", "0.61464554", "0.6139983", "0.6126973...
0.7314872
0
Broadcasts a request for a chain to all connected peers.
broadcastRequestForChain() { this._broadcast(this.MESSAGE_TYPE.REQUEST_SYNC_CHAIN, 'Let us sync the whole chain!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "broadcastQueryChain() {\n this.sockets.forEach(socket => {\n socket.send(JSON.stringify({\n type: MessageType.QUERY_ALL,\n data: null\n }));\n });\n }", "broadcastSyncChain() {\n this.sockets.forEach(socket => {\n this.sendLastBlock(socket);\n });\n }", "function broa...
[ "0.64852214", "0.6332874", "0.5991791", "0.5963989", "0.59256697", "0.5921259", "0.5877681", "0.58335274", "0.58099395", "0.57483566", "0.56752825", "0.56062216", "0.55488133", "0.5547289", "0.5502747", "0.55027294", "0.5449941", "0.54011405", "0.53916085", "0.53394014", "0.5...
0.7207985
0
that has the largest product and return that product. Example For inputArray = [3, 6, 2, 5, 7, 3], the output should be adjacentElementsProduct(inputArray) = 21. 7 and 3 produce the largest product. initialize a currentLargestProduct to 0 loop through array. Check for if current item in array is the last item in the ar...
function adjacentElementsProduct(inputArray) { let currentLargestNumber = inputArray[0] * inputArray[1] for (let i = 0; i < inputArray.length; i++) { let currentNumber = inputArray[i]; if (i === inputArray.length - 1) { continue; } else { if (currentNumber * inputArray[i + 1] > currentLarge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adjacentElementsProduct(inputArray) {\n let max = inputArray[0] * inputArray[1];\n for (let i = 1; i < inputArray.length - 1; i++) {\n if (inputArray[i + 1] * inputArray[i] > max) {\n max = inputArray[i + 1] * inputArray[i];\n }\n }\n return max;\n}", "function adjacentElementsProduct(inp...
[ "0.75193036", "0.7496376", "0.7435145", "0.73494524", "0.71207714", "0.7115221", "0.7029085", "0.6880257", "0.6878208", "0.6874061", "0.677872", "0.6777001", "0.6657464", "0.6642582", "0.6641071", "0.66225356", "0.66027397", "0.65848196", "0.6527431", "0.6506373", "0.64953095...
0.8380404
0
Create a new index with the mapping for the sanctions data.
function createSanctionsIndex() { return new Promise((resolve, reject) => { client.indices .create({ index, body: require("./es-config") }) .then(resolve) .catch(reject); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function createIndex() {\n const body = {\n settings: {\n analysis: {\n filter: {\n autocomplete_filter: {\n type: 'ngram',\n min_gram: 1,\n max_gram: 20,\n },\n },\n\n analyzer: {\n autocomplete: {\n type: '...
[ "0.6882641", "0.6308778", "0.592104", "0.5842897", "0.58394504", "0.5776398", "0.5704019", "0.55270684", "0.546817", "0.545793", "0.540182", "0.539229", "0.53823304", "0.53822464", "0.5378233", "0.53597456", "0.5308054", "0.5284771", "0.5261667", "0.5260483", "0.5257266", "...
0.74958175
0
Perform the bulk insert of financial sanctions.
function bulkInsertSanctionList(body) { return new Promise((resolve, reject) => { client .bulk({ body }) .then(resp => { console.log(`Indexed latest set of financial sanctions`); resolve(); }) .catch(reject); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function insertNftIds(address, nftIds) {\n\n let nftsInDb = await Nft.findAll({\n where: {\n contract: address,\n },\n logging: false,\n raw: true\n });\n\n if (nftsInDb.length === 0) {\n let data = []\n nftIds.forEach(el => {\n data.pu...
[ "0.55141747", "0.54367334", "0.5433567", "0.53061783", "0.5232423", "0.5224943", "0.52109677", "0.5181343", "0.51406276", "0.5081131", "0.49948993", "0.49812418", "0.4977817", "0.49655524", "0.4955771", "0.49467584", "0.49389917", "0.49246764", "0.49148968", "0.491085", "0.48...
0.7518138
0
Stop caret tick, so it will no longer blink.
stopCaretTick () { clearTimeout(this._caretTickTimeout) this._caretTickTimeout = null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tickCaret () {\n this.toggleCaret()\n this._caretTickTimeout = setTimeout(\n () => this.tickCaret(),\n 500\n )\n }", "function stop() {\n\t\tTicker.removeListener(tick);\n\t}", "startCaretTick () {\n this.stopCaretTick()\n this.tickCaret()\n }", "stop() {\n this.send([0xFC])\n ...
[ "0.71119815", "0.7056087", "0.70281553", "0.66776985", "0.6636789", "0.6519078", "0.6432115", "0.6387818", "0.62865406", "0.62632906", "0.62496984", "0.62439597", "0.6235867", "0.6234607", "0.6214485", "0.61899304", "0.61758626", "0.6152098", "0.6144733", "0.6140821", "0.6116...
0.86846596
0
Start caret tick, so caret will start blinking.
startCaretTick () { this.stopCaretTick() this.tickCaret() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tickCaret () {\n this.toggleCaret()\n this._caretTickTimeout = setTimeout(\n () => this.tickCaret(),\n 500\n )\n }", "attach () {\n this._addCaret()\n this.startCaretTick()\n }", "stopCaretTick () {\n clearTimeout(this._caretTickTimeout)\n this._caretTickTimeout = null\n }", ...
[ "0.78739977", "0.64704126", "0.6271281", "0.6263116", "0.6156054", "0.61229783", "0.6119247", "0.6098611", "0.60434884", "0.59928346", "0.5939475", "0.5935678", "0.5795927", "0.57622236", "0.5757486", "0.56880367", "0.56315833", "0.5619051", "0.5600201", "0.558612", "0.554684...
0.8398055
0
Caret ticking, initiated by startCaretTick method. Hint: setTimeout is used, because setInterval after inactive time will queue all expected actions on stack.
tickCaret () { this.toggleCaret() this._caretTickTimeout = setTimeout( () => this.tickCaret(), 500 ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startCaretTick () {\n this.stopCaretTick()\n this.tickCaret()\n }", "stopCaretTick () {\n clearTimeout(this._caretTickTimeout)\n this._caretTickTimeout = null\n }", "function tick () {\n\n if (!app.paused) {\n\n requestAnimationFrame(tick);\n \n for (var i ...
[ "0.7874638", "0.7076549", "0.67138994", "0.61818326", "0.60333794", "0.59962773", "0.59851515", "0.5969744", "0.59625655", "0.59306544", "0.5927663", "0.5892292", "0.5858179", "0.5812554", "0.57852495", "0.57672095", "0.57532173", "0.5742923", "0.57349974", "0.5722175", "0.57...
0.8249171
0
Initiate autowriter tick, so it will start writing alternatives.
startWriterTick () { this.stopWriterTick() this._writingTickTimeout = setTimeout( () => this.writeNextAlternative(() => this.startWriterTick()), 3000 ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_triggerTick () {\n if (this.tick !== undefined && this.tick !== null) {\n this.tick(this.countdown)\n }\n }", "start() {\n \"use strict\";\n this.#bot_should_tick = true;\n this.tick();\n }", "ready() {\n super.ready();\n\n const that = this;\n\n that._...
[ "0.5764994", "0.56017226", "0.55115527", "0.5375963", "0.5356809", "0.5265344", "0.52206725", "0.51511896", "0.5139147", "0.50991064", "0.50968796", "0.5081999", "0.5073413", "0.50677174", "0.50455016", "0.5014492", "0.49846944", "0.4940616", "0.49237898", "0.49225706", "0.49...
0.62544173
0
Add caret to element.
_addCaret () { if (!this.hasCaret) { this.element.style.borderRight = '0.2em solid transparent' this.hasCaret = true } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertAtCaret(el) {\n\t var self = this;\n\t var caret = Math.min(self.caretPos, self.items.length);\n\t var target = self.control;\n\n\t if (caret === 0) {\n\t target.insertBefore(el, target.firstChild);\n\t } else {\n\t target.insertBefore(el, target.children[caret]);\n\t }\n\n\t s...
[ "0.713011", "0.6954178", "0.66411215", "0.65952694", "0.6549731", "0.65118456", "0.6488345", "0.6484384", "0.6443452", "0.6184507", "0.6184507", "0.6169474", "0.61652505", "0.61496073", "0.6140171", "0.6134045", "0.6128559", "0.61163354", "0.6082994", "0.6069867", "0.60282636...
0.7859597
0
Remove caret from element.
_removeCaret () { if (this.hasCaret) { // Hide caret this._hideCaret() // Remove spacing between text and caret this.element.style.borderRight = 'none' // Mark that there is no caret set-up this.hasCaret = false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCaret(iframename){\n\tvar iframe=$(iframename).contentWindow\n\tvar referenceNode = iframe.document.getElementById(\"caret\");\n\tif (referenceNode){\n\t\tvar sel=$(iframename).contentWindow.getSelection()\n\n\t\tif(sel.focusNode){ // FireFox\n\t\t\tvar range=sel.getRangeAt(0);\n\t\t}else{ // Chrome\...
[ "0.66547483", "0.6532486", "0.6397611", "0.6397611", "0.6311378", "0.63058305", "0.6229313", "0.6167285", "0.6107022", "0.5876079", "0.578902", "0.5689436", "0.56812817", "0.5644975", "0.5621883", "0.56168973", "0.5616363", "0.56150794", "0.56105113", "0.56084746", "0.5589906...
0.79288155
0
Show (existing) caret. Used by blinking action.
_showCaret () { if (this.hasCaret && !this.isCaretVisible) { // Show caret line this.element.style.boxShadow = '0.08em 0 0 -0.02em currentColor' // Mark caret as visible this.isCaretVisible = true } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleCaret () {\n if (this.isCaretVisible) {\n this._hideCaret()\n } else {\n this._showCaret()\n }\n }", "tickCaret () {\n this.toggleCaret()\n this._caretTickTimeout = setTimeout(\n () => this.tickCaret(),\n 500\n )\n }", "function showCaretPosition() {\n i...
[ "0.74015784", "0.642036", "0.6194857", "0.6185889", "0.61410016", "0.61107105", "0.602952", "0.5885506", "0.57949454", "0.5757068", "0.57064086", "0.56999075", "0.56782746", "0.5667054", "0.5665155", "0.5638453", "0.5562628", "0.55331945", "0.55137926", "0.5506773", "0.549887...
0.7664334
0
Hide (existing) caret. Used by blinking action.
_hideCaret () { if (this.hasCaret && this.isCaretVisible) { // Hide caret line this.element.style.boxShadow = 'none' // Mark caret as invisible this.isCaretVisible = false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleCaret () {\n if (this.isCaretVisible) {\n this._hideCaret()\n } else {\n this._showCaret()\n }\n }", "_removeCaret () {\n if (this.hasCaret) {\n // Hide caret\n this._hideCaret()\n\n // Remove spacing between text and caret\n this.element.style.borderRight = 'none...
[ "0.73837495", "0.73284173", "0.6930402", "0.65602803", "0.64191824", "0.63299507", "0.6277095", "0.62481564", "0.6244455", "0.62301093", "0.62288374", "0.62152034", "0.6202205", "0.6201664", "0.61774164", "0.61546093", "0.6150946", "0.61279535", "0.6122575", "0.61113393", "0....
0.82706124
0
Show/hide caret depending on current state.
toggleCaret () { if (this.isCaretVisible) { this._hideCaret() } else { this._showCaret() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_showCaret () {\n if (this.hasCaret && !this.isCaretVisible) {\n // Show caret line\n this.element.style.boxShadow = '0.08em 0 0 -0.02em currentColor'\n\n // Mark caret as visible\n this.isCaretVisible = true\n }\n }", "_hideCaret () {\n if (this.hasCaret && this.isCaretVisible) {\n...
[ "0.71018624", "0.62557715", "0.58974385", "0.580355", "0.580355", "0.5704184", "0.56999177", "0.5699497", "0.56632036", "0.5661148", "0.56415707", "0.56200886", "0.5510377", "0.5508224", "0.54840827", "0.54480386", "0.54480386", "0.53579867", "0.53557515", "0.5349938", "0.533...
0.7617683
0
Attach caret and events to current element.
attach () { this._addCaret() this.startCaretTick() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertAtCaret(el) {\n\t var self = this;\n\t var caret = Math.min(self.caretPos, self.items.length);\n\t var target = self.control;\n\n\t if (caret === 0) {\n\t target.insertBefore(el, target.firstChild);\n\t } else {\n\t target.insertBefore(el, target.children[caret]);\n\t }\n\n\t s...
[ "0.6515578", "0.64841056", "0.64272094", "0.6355044", "0.6323662", "0.6323057", "0.6151562", "0.6119737", "0.6097727", "0.60216135", "0.60031503", "0.59409255", "0.58478886", "0.5832598", "0.5791989", "0.5737503", "0.57209873", "0.57200736", "0.5695048", "0.567646", "0.565704...
0.7578066
0
Detach caret and events from current element.
detach () { this._removeCaret() this.stopCaretTick() this.stopWriterTick() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('click', this._clickListener, true);\n this._document.body.removeEventListener('contextmenu', this._clickListener, true);\n if (this._platform.IOS && this._cursorStyleIsSet) {\n thi...
[ "0.66083103", "0.66083103", "0.658668", "0.65212137", "0.65212137", "0.6497468", "0.6470194", "0.6461401", "0.6301614", "0.62541777", "0.6202845", "0.6202845", "0.6202845", "0.6202845", "0.6202845", "0.62003726", "0.6158388", "0.6091262", "0.59974355", "0.59974355", "0.599549...
0.7285544
0
Logout from Facebook, and remove the token. IMPORTANT: For the Facebook logout to work, the logoutRedirectURL must be on the domain specified in "Site URL" in your Facebook App Settings
function logout(callback) { var logoutWindow, token = tokenStore['fbtoken']; /* Remove token. Will fail silently if does not exist */ tokenStore.removeItem('fbtoken'); if (token) { logoutWindow = window.open(FB_LOGOUT_URL + '?access_token=' + token + '&next=' + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function facebookLogout() {\n ngFB.logout();\n ApiService.logoutUser($rootScope.user.accessToken)\n }", "function fb_logout() {\n FB.logout(function (response) {\n console.log('User signed out of facebook.');\n });\n}", "function facebookLogout() {\n FB.init({\n ...
[ "0.7894595", "0.7627995", "0.7512309", "0.74450254", "0.72988206", "0.7206524", "0.7173132", "0.71116483", "0.70992416", "0.70468223", "0.70161927", "0.6958091", "0.69276536", "0.6904235", "0.6897685", "0.6850686", "0.6820702", "0.68142706", "0.67869484", "0.67600185", "0.669...
0.7632096
1
Lets you make any Facebook Graph API request.
function api(obj) { var method = obj.method || 'GET', params = obj.params || {}, xhr = new XMLHttpRequest(), url; params['access_token'] = tokenStore['fbtoken']; url = 'https://graph.facebook.com' + obj.path + '?' + toQueryString(params); xhr.onrea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FacebookGraph() {}", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n}", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n ...
[ "0.7480458", "0.7053285", "0.70171446", "0.70171446", "0.70171446", "0.6963001", "0.6790162", "0.66396964", "0.66322815", "0.66242963", "0.6580952", "0.65278196", "0.6522274", "0.6519157", "0.6507611", "0.648391", "0.64795065", "0.6459775", "0.6456254", "0.6456254", "0.645563...
0.72488034
1
string Sign (string, string, string, string)
Sign(string, string, string, string) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sign(string, string, string, Variant) {\n\n }", "function SignExpression() {\n}", "function sign(){\n var a=1,b=3;\n return a+b;\n}", "function checkSign()\r\n{\r\n if(sign == \"x\")\r\n {\r\n sign = \"o\";\r\n }\r\n else\r\n {\r\n sign = \"x\";\r\n }\r\n}", "sign(s...
[ "0.73886055", "0.7030674", "0.6448437", "0.6264251", "0.62184083", "0.61586773", "0.61513907", "0.60235447", "0.6014823", "0.5976795", "0.597228", "0.5962861", "0.5949806", "0.5949806", "0.5949806", "0.5931146", "0.5902721", "0.58949685", "0.58949685", "0.5894003", "0.5819219...
0.8433208
0
void SignFile (string, string, string)
SignFile(string, string, string) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Sign(string, string, string, string) {\n\n }", "Sign(string, string, string, Variant) {\n\n }", "function sign(file_data) {\n var first_time = file_data.indexOf(TOKEN) !== -1;\n if (!first_time) {\n if (is_signed(file_data))\n file_data = file_data.replace(PATTERN, signing_token());\n else\n...
[ "0.73152786", "0.70474666", "0.69234645", "0.6792838", "0.6609874", "0.6506188", "0.63778925", "0.6287161", "0.61308694", "0.61023164", "0.60547346", "0.6050696", "0.6002554", "0.59442586", "0.59124273", "0.5886868", "0.58409894", "0.57737666", "0.5748262", "0.5739654", "0.57...
0.90963674
0
bool Verify (string, string, bool)
Verify(string, string, bool) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VerifyFile(string, bool) {\n\n }", "function verification (message, cle){\n return cleDeVerification(message) == cle\n}", "function validate(pass) {\n return true\n}", "verify() {\n\n }", "verify(result) {\n\t\t\treturn result.data === true;\n\t\t}", "async function check (name, pass) {\n va...
[ "0.723373", "0.6901666", "0.66072685", "0.6507673", "0.64826185", "0.6432029", "0.6307732", "0.6096155", "0.6082688", "0.6071309", "0.6065322", "0.60489696", "0.6018743", "0.59733164", "0.59710836", "0.59525746", "0.59525746", "0.58450824", "0.58329034", "0.5830354", "0.58198...
0.9139743
0
bool VerifyFile (string, bool)
VerifyFile(string, bool) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Verify(string, string, bool) {\n\n }", "checkFile(callback)\n {\n if (fs.existsSync(this.fullPath))\n {\n callback(true);\n }\n else {\n callback(fasle); \n }\n }", "function isValid(filename){\n return (filename == \"\")? false: true;\n}", ...
[ "0.7012018", "0.66767687", "0.66697776", "0.64825237", "0.6120914", "0.60897934", "0.6087637", "0.60198194", "0.5937961", "0.5927503", "0.5805777", "0.5798696", "0.5743103", "0.56954086", "0.56950444", "0.5674095", "0.5647864", "0.5633828", "0.56199193", "0.5586963", "0.55777...
0.9200808
0
Loads the JavaScript libraries in the correct order
function loadLibraries() { // This prevents 'generated bytecode for method exceeds 64K limit' Packages.org.mozilla.javascript.Context.getCurrentContext().setOptimizationLevel(-1); load(options.envjs, options.jquery, options.handlebars, options.ember); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDependencies()\n{\n // check jQuery\n if (inArray(new String('jQuery').toLowerCase(), dependencies) && typeof(jQuery) === \"undefined\")\n {\n if (getBrowserLanguage() === 'zh-cn')\n {\n document.body.appendChild(createElement('script', {src: cdnList.china.jquery}));\...
[ "0.75079584", "0.7184233", "0.688867", "0.6854889", "0.6854889", "0.68524253", "0.6783795", "0.6783795", "0.6773923", "0.6655133", "0.6652673", "0.657448", "0.6530167", "0.6509793", "0.6509793", "0.64436483", "0.63854665", "0.63800323", "0.6379736", "0.6360854", "0.63258445",...
0.75449
0
start is a starting value operations is a sequence of operations, output of step n is an input of step n+1 write the execute function which accepts function sequence and the starting value and returns the value processed by piping via function sequence don't use FOR loops, use functional programming function execute...
function execute(operations, start) { return operations.reduce(function(value, func) { return func(value); }, start); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "step () {}", "step() {\n\t}", "function Increaser(start, step, end) {\n\tvar initial_start = parseFloat(start);\n\t\n\tvar ret = initial_start;\n\tvar start = initial_start;\n\tvar end = parseFloat(end);\n\tvar step = parseFloat(step);\n\t\t\n\tthis.perform = function() {\n\t\tvar tmp = ret;\n\t\tret = ret + s...
[ "0.60142565", "0.58634585", "0.5850992", "0.5837427", "0.57965654", "0.56260484", "0.56044286", "0.5502949", "0.5494139", "0.5404323", "0.5400528", "0.53670377", "0.53606427", "0.53393", "0.5328933", "0.531081", "0.5281919", "0.51873875", "0.5140016", "0.5128927", "0.50546634...
0.7291323
0
para(text) transforms text by first xsssafing it, then replacing 2 newlines with , and 1 newline with
function para(text) { text = CapperLayout.xss(text); text = text.replace(/\n\n/g, "<p>"); return text.replace(/\n/g, "<br />"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nl2p( text ) {\n let paras = text.split( /[\\r\\n]+/g ), resp = [];\n for ( let iter = 0; iter < paras.length; iter++ ) {\n resp.push( '<p>' + paras[iter] + '</p>' );\n } return resp.join('');\n }", "function paragraphify(source) {\n return source.split('\\n\\n').map(function ...
[ "0.64642096", "0.62305707", "0.60384196", "0.58396995", "0.56552404", "0.5632799", "0.5570635", "0.5540918", "0.5527857", "0.5492033", "0.5468539", "0.5463005", "0.5453581", "0.54085463", "0.539727", "0.539046", "0.539046", "0.5358421", "0.53364176", "0.53364176", "0.53364176...
0.7352014
0
This function is used handle enable/disable of submit button. if user is already submitted the charges then navigating from previous page and summary will keep button status disabled
function enableBtn() { if (m_iiSubmitCharges) $('#submitCharges').attr("disabled", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSubmitButton() {\r\n var disabled = true;\r\n if (CRM.vars.osa.paidInLieu || payInLieuCB.prop('checked')) {\r\n disabled = false;\r\n }\r\n if (disabled && $scope) {\r\n if ($scope.totalCreditsSelected >= $scope.totalCreditsRequired) {\r\n disabled = false;\r\n }\r\...
[ "0.78287894", "0.72494465", "0.7144697", "0.7128232", "0.7024782", "0.7012585", "0.6949541", "0.6949541", "0.69247276", "0.69236994", "0.6882529", "0.68782836", "0.6873483", "0.6841375", "0.6795902", "0.67958504", "0.6734998", "0.67262256", "0.6698946", "0.6698476", "0.666401...
0.7607536
1
Project: infusion_injection.js Version 1.0.0 create modules styling object for infusion and injection panel.
function InjectionInfusionComponentStyle() { this.initByNamespace("ii"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InjectionInfusionComponentStyle()\r\n{\r\n this.initByNamespace(\"ii\");\r\n}", "function ProcessManagementComponentStyle()\r\n{\r\n this.initByNamespace(\"pm\");\r\n}", "function LaboratoryComponentStyle(){\r\n this.initByNamespace(\"lab\");\r\n}", "function MedicationsComponentStyle(){\n ...
[ "0.6882761", "0.6107854", "0.60574853", "0.59838724", "0.5972587", "0.59636796", "0.59385645", "0.59317654", "0.58848184", "0.5857808", "0.58413774", "0.582131", "0.5785224", "0.57695603", "0.5758824", "0.5755531", "0.57317144", "0.5655327", "0.5594544", "0.5593063", "0.55780...
0.6832201
1
Function is used to initialize the component filters of infusion and injection panel. This function will be invoked by GetInfusionInjection() of Clinical_driver_comp.js. when bedrock filters are fetched from BEDROCK tables. Also this function contains set and get methods for all the filters set for infusion and injecti...
function InjectionInfusionComponent(criterion) { this.setCriterion(criterion); this.setStyles(new InjectionInfusionComponentStyle()); this.setComponentRenderTimerName("ENG:MPG.ONC_INJECTION_INFUSION.01 - render component"); this.setIncludeLineNumber(false); this.setScope(2); this.setDisplay(true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _initFilter() {\n _captureGanttDetails();\n _prepareFilterFieldPlan();\n _constructFilterPopupPanelDialog();\n _setupFilterAccessRibbonControls();\n }", "init() {\n if (this.initialized) {\n return;\n }\n\n // import main stylesheet\n ...
[ "0.61040235", "0.5875887", "0.57229143", "0.5669275", "0.5645498", "0.5643262", "0.5616996", "0.5554794", "0.555285", "0.55250573", "0.551563", "0.55144113", "0.551305", "0.55102646", "0.5499077", "0.5499077", "0.54896575", "0.54726523", "0.54726523", "0.54726523", "0.5472652...
0.63282347
0
This function is used to validate the values selected in controls before appending them to II table in manual mode. This function validates below options: Site : combobox. Type : Combobox. Medication : searchbox. Start/Stop Date and Time : edit box
function validateSave() { var bReturn = true; var theSel,theSelR, theR,the, vtime, vidx; theSel = this.document.getElementById('combodiv'); the = theSel.selectedIndex; if (the == 0) { alert(i18n.SELECT_SITE); this.document.getElementById('combo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_dropdown1(){\n\tvar formError = false;\n// for seq select\n\tvar dropdown = document.getElementById('seqSelect');\n\tvar info=document.getElementById(\"seqHint\");\n\tif(dropdown.selectedIndex==0){\n\t\tseqHint.innerHTML=\"field cannot be left empty\";\n\t\tdropdown.focus();\n\t\tformError = true...
[ "0.6681778", "0.63872874", "0.6357096", "0.63130456", "0.6310714", "0.6293232", "0.6258697", "0.62529963", "0.622898", "0.6222169", "0.6220904", "0.6194903", "0.6157514", "0.6103074", "0.60594815", "0.60526603", "0.6042998", "0.6026021", "0.6015552", "0.60152435", "0.60041344...
0.6514203
1
This function is used change name of ADD and Cancel button when user selects a row in manual mode . prevRowId : id of selected row.
function selectRow(prevRowId) { if (prevRowId != "") { saveFlag = 2; _g('saveId').innerHTML = i18n.MODIFY; _g('cancelId').innerHTML = i18n.DELETE; CERN_INFUSIONINJECTION_O1.PopulateValues(prevRowId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wireUpCancelButton(button, tr, theRow, vHash) {\n\tif(vHash==null) {\n\t\tbutton.id=\"C_NO_\" + tr.rowHash;\n\t\tvHash=\"\";\n\t} else {\n\t\tbutton.id = \"c\"+vHash+\"_\"+tr.rowHash;\n\t}\n\tlistenFor(button,\"click\",\n\t\t\tfunction(e){ handleCancelWiredClick(tr,theRow,vHash,button); stStopPropagation(...
[ "0.58994275", "0.58871156", "0.5884366", "0.58089566", "0.5740573", "0.56900704", "0.5679184", "0.5671729", "0.56490064", "0.5636697", "0.5625483", "0.5625345", "0.55848664", "0.55847543", "0.5552363", "0.5520043", "0.55127853", "0.55044913", "0.5499565", "0.5488221", "0.5486...
0.6546299
0
This function is used to highlight selected row in II table in manual mode. keyCode : mouse event (left_btn_down).
function highLightRow(keyCode) { var newVal = ""; var navigate = false; var tempPrevId = prevRowId; if ((keyCode == KEY_UP) && ($('#' + prevRowId).prev().attr("id") != undefined)) { navigate = true; } else if ((keyCode == KEY_DOWN) && ($('#' + pre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textmousedown(p, selectedindex) {\n \n highlight_row(selectedindex);\n\n \n\n }", "function handleKeyDown(event) {\n var element = event.target.parentNode, intKeyCode = event.keyCode || event.which, selectedTr, trs, i, len, selectedRecordIndex;\n \n if (!eleme...
[ "0.7338129", "0.67375606", "0.663777", "0.6500779", "0.636756", "0.6333006", "0.6224373", "0.6043952", "0.6019398", "0.5956452", "0.5956249", "0.59541565", "0.5928712", "0.59142125", "0.59027773", "0.5893651", "0.5854982", "0.584396", "0.5835751", "0.5835022", "0.5824424", ...
0.7148686
1
This function is used to submit charges. Before submitting charges this function performs certain set of operation: 1. Converting all available CPT codes to XML file format and saves in longtext table. 2. writes all CPT codes along with orderIds into XML file and saves it in Longtext file for identification of submitte...
function SubmitCharges() { m_DeletedRows.sort(); var m_SubmitedMedications = []; var arrEventStatus = []; var arrOrderIds = []; var arrServiceDtTm = []; var arrAdminRoutes = []; for(var i = 0; i<m_Medications_Orderid_Name.length;i++) { var NonDeletedItem = false; for(var j = 0;j<m_DeletedRow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CalculateCharges()\n{\n\tvar submitOrders = true;\n\tvar increment = 0;\n\tif(m_AutomateIvInd && m_bShowSubmittedOrders == true){\t\n\t\tincrement = 7;\n\t\tif(m_iiMARDelete){\n\t\t\tincrement = 8;\n\t\t}\n\t\tif (confirm(i18n.WARING_MSG) == true) {\n\t\t\tsubmitOrders = false;\n\t\t} else {\n\t\t\tsubmit...
[ "0.5947757", "0.55839396", "0.5535576", "0.53700095", "0.52851903", "0.5216314", "0.5184346", "0.5121084", "0.5074905", "0.5062493", "0.5043566", "0.50043416", "0.499214", "0.49788153", "0.49708593", "0.49675608", "0.49609694", "0.49563083", "0.49400178", "0.49291268", "0.492...
0.6311915
0
call this function to ensure blank subheader is loaded.
function loadSubHeader(divin) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ready() {\n super.ready();\n let headerNodes, footerNodes;\n footerNodes = this.$.footer.assignedNodes({\n flatten: true\n }).length;\n if (footerNodes === 0) {\n this.emptyFooter = !this.emptyFooter;\n }\n headerNodes = this.$.header.assignedNodes({\n flatten: true\n }).leng...
[ "0.60901874", "0.5976877", "0.54691005", "0.53067267", "0.5278654", "0.52592033", "0.5240624", "0.5176199", "0.5150142", "0.5127004", "0.512374", "0.5123039", "0.51180434", "0.5113987", "0.5113987", "0.50619435", "0.5047338", "0.5013835", "0.4991493", "0.49648777", "0.4942942...
0.63836
0
this function is used to validate missing data information for II table orders in automateIVMode.
function ValidateInfusiontabledata() { var tObj1 = _g('infusion_tbl'); var rowCount1 = tObj1.rows.length; var updateInd = 0; var temp = ""; var med_name = ""; if (CERN_INFUSIONINJECTION_O1.GetMARInd() && m_iiMARDelete) { updateInd = 1; } for (var currowindex = 0; currowindex < rowCount1; currowindex++) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateDOItemDetail() {\n var itemDetailRow = parseInt($('#txtTotalItemDetail').val());\n var isOrder = $('#txtOrderEntryId').val();\n for(var i = 1; i <= itemDetailRow; i++) \n { \n// var item_sku_selector = $('#txtItemSKU_'+i);\n// if(item_sku_selector.val() === '') {\n...
[ "0.59989613", "0.5945221", "0.58091885", "0.57572675", "0.57411915", "0.57270527", "0.56723166", "0.55995023", "0.556769", "0.5565984", "0.5564371", "0.5542029", "0.55415124", "0.5523593", "0.5492759", "0.54649544", "0.5460116", "0.54526335", "0.54259086", "0.54071873", "0.53...
0.63409835
0
this function is used to create submitted orders XML file. After xml file is created this function will save XML file in Longtext table.
function StoreSubmitedOrders(OrdersArray,component) { if(m_existingSubmitedorder.length > 0) { for(var i =0;i<m_existingSubmitedorder.length;i++) { OrdersArray.push(m_existingSubmitedorder[i]); } } OrdersArray.sort(); var m_xmlSubOrd = "<Message></Message>"; m_xmlSubmitedOrders.loadXML(m_xmlSubOrd); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getXML(){\n conn.connect(function (err){\n if(err)\n console.log(err);\n req.query('SELECT dbo.fnACRONIS_WebOrders() AS Orders ', function(err, recordset){\n if(err)\n console.log(err);\n else { \n\n //create file xml\n ...
[ "0.5948197", "0.5856127", "0.5802151", "0.57339495", "0.57339495", "0.57339495", "0.57339495", "0.5658382", "0.5645839", "0.554919", "0.55116844", "0.5303456", "0.5271345", "0.52304864", "0.52274317", "0.5191602", "0.51310813", "0.51214224", "0.5058829", "0.5056564", "0.50548...
0.6029552
0
this function is used to create deleted orders XML file. After xml file is created this function will save XML file in Longtext table.
function StoreDeletedOrders(deletedOrdersArray,component) { if(m_existingDeletedOrders.length > 0) { for(var i =0;i<m_existingDeletedOrders.length;i++) { deletedOrdersArray.push(m_existingDeletedOrders[i]); } } deletedOrdersArray.sort(); var m_xmlSubOrd = "<Messag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getXML(){\n conn.connect(function (err){\n if(err)\n console.log(err);\n req.query('SELECT dbo.fnACRONIS_WebOrders() AS Orders ', function(err, recordset){\n if(err)\n console.log(err);\n else { \n\n //create file xml\n ...
[ "0.56314325", "0.5566255", "0.5367608", "0.5366059", "0.5261553", "0.5253323", "0.5253323", "0.5253323", "0.5253323", "0.52299565", "0.50989234", "0.509819", "0.504368", "0.50169504", "0.4999745", "0.4957622", "0.49554074", "0.48596537", "0.48550647", "0.4781174", "0.47663537...
0.6392581
0
This function is used to sort the recordData with respect to stop date time. This function uses bubble sort algorithm
function formatRecordStructure(recordData, sortOrder) { var temprecordData = recordData; var i; var j; var temp; var tempFlag= false; var dateTime1 = new Date(); for(i =0;i<temprecordData.MEDICATIONS.length;i++) { var flag = 0; for(j=0;j<temprecordData.MEDICATIONS.length-i-1;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortData(list)\n{\n var swapped;\n do {\n swapped = false;\n for (var i=0; i < list.length-1; i++) {\n if (list[i+1].timeOnPage > list[i].timeOnPage) {\n var temp = list[i+1];\n list[i+1] = list[i];\n list[i] = temp;\n ...
[ "0.6568879", "0.64505625", "0.6360935", "0.6273875", "0.61639273", "0.6110283", "0.6092199", "0.6057918", "0.6027169", "0.6022035", "0.59838367", "0.5941213", "0.5933951", "0.59125537", "0.59007", "0.5897839", "0.58941925", "0.58930385", "0.58887917", "0.5881447", "0.58619356...
0.66352284
0
this function is used to get the submitted orders for the encounter this function loops through submitted order xml and fetches the stored submitted orders.
function getSubmittedOrders(recordData) { var iSubOrdCnt = recordData.SUBMITTED_EVENTS.length; var orderIdsSubmited = []; /*var xmldata = recordData.LONG_TEXT; m_xmlLoadSubmitedOrders.loadXML(xmldata); var xmlsubmitedOrders = m_xmlLoadSubmitedOrders.getElementsByTagName('OrderId'); for(var i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StoreSubmitedOrders(OrdersArray,component)\n{\n\tif(m_existingSubmitedorder.length > 0)\n\t{\n\t\tfor(var i =0;i<m_existingSubmitedorder.length;i++)\n\t\t{\n\t\t\tOrdersArray.push(m_existingSubmitedorder[i]);\n\t\t}\n\t}\n\tOrdersArray.sort();\n\tvar m_xmlSubOrd = \"<Message></Message>\";\n m_xmlSubmit...
[ "0.62602645", "0.5938968", "0.5882545", "0.5738352", "0.57098824", "0.57053727", "0.5605846", "0.5533355", "0.55287766", "0.548851", "0.54642797", "0.54498935", "0.54494184", "0.54288876", "0.53892493", "0.536165", "0.5339125", "0.5293371", "0.52852863", "0.5235287", "0.52347...
0.6901023
0
Create new Cascadify instance.
function Cascadify() { if (!(this instanceof Cascadify)) return new Cascadify() this.files = [] this.browserify = browserify() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(c) {\n return new c();\n}", "async function createCa() {\n try {\n return await mkcert.createCA({\n organization: 'Hello CA',\n countryCode: 'NP',\n state: 'Bagmati',\n locality: 'Kathmandu',\n validityDays: 365\n })\n } catch (e) {\n throw new Error(e)\n }...
[ "0.5078526", "0.50204", "0.49779543", "0.49460882", "0.49041852", "0.48725745", "0.48725745", "0.4867619", "0.48607045", "0.48478565", "0.48263392", "0.48158383", "0.48027563", "0.48011574", "0.48011574", "0.478647", "0.47529408", "0.47124952", "0.46689433", "0.46685573", "0....
0.69487005
0
Check in array board if the given position is available or not
function checkIfAvailable(position) { positionArray = position.split(""); let boardPos = board[positionArray[0]][positionArray[1]]; if(boardPos === "") { return true; } else if (boardPos === "X" || boardPos === "O") { return false; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inBoard(position){\n return position >= 0 && position < 64;\n}", "function checkAvailability(col, row, currentShip, board) {\n var neighbors = [];\n neighbors.push([col - 1, row - 1]);\n neighbors.push([col - 1, row]);\n neighbors.push([col - 1, row + 1]);\n neighbors...
[ "0.75139475", "0.70917577", "0.70382375", "0.68875813", "0.6860001", "0.6845279", "0.67940515", "0.6648861", "0.6567569", "0.65514904", "0.6538174", "0.652468", "0.6509619", "0.64957356", "0.64861137", "0.64763594", "0.64730597", "0.64666194", "0.64451456", "0.6384639", "0.63...
0.7641879
0
select the layer through its name from all layers on the map to set its visibility
function selectLayer(layername) { map.getLayers().forEach(function(layer, i) { if (layer instanceof ol.layer.Layer) { var s = layer.getSource().params_.LAYERS; if (s == layername) { if (layer.getVisible() == true) { layer.setVisible(false); } else { layer.setVisible(true); } } } });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleLayer(selected){\n var layer = map.getStyle().layers.filter(function(each){return each[\"id\"]===selected})[0];\n \n if(layer['layout']['visibility']===\"visible\"){\n map.setLayoutProperty(layer['id'], 'visibility', 'none');\n labelChange(\"Labels\",selected,false,true);\n countries.map...
[ "0.77827245", "0.7560954", "0.7220135", "0.71895075", "0.70428413", "0.7021885", "0.6976435", "0.68514645", "0.68077815", "0.6676721", "0.6675369", "0.6663086", "0.66400397", "0.6619993", "0.6609175", "0.65798676", "0.6555407", "0.65474766", "0.65465736", "0.6530276", "0.6529...
0.8266061
0
Cycles the params list and applies them to Vincent
function _init (parameters) { for (let param in parameters) { if (parameters.hasOwnProperty(param)) { vincent.set(param, parameters[param]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_params() {\n\t recalc_k();\n\t update_k();\n\t \n\t recalc_x(); // Dependent because x is taken mod N-1.\n\t update_x();\n\t \n\t recalc_x2();\n\t update_x2();\n\t \n\t //recalc_v();\n\t //update_v();\n\n\t recalc_A();\n\t update_A();\n\n\t /* Redundant - t...
[ "0.62779564", "0.5823748", "0.57016546", "0.5557623", "0.5513217", "0.5513217", "0.55026823", "0.54908353", "0.54782844", "0.54435736", "0.5374134", "0.5331755", "0.5306122", "0.52200675", "0.5127175", "0.506672", "0.5058812", "0.5055306", "0.50528026", "0.5046887", "0.504232...
0.6543732
0
Function definitions Define simulation drag actions
function drag(sim) { function dragStart(e, d) { if (!e.active) sim.alphaTarget(0.4).restart(); d.fx = d.x; d.fy = d.y; }; function dragging(e, d) { d.fx = e.x; d.fy = e.y; }; function dragEnd(e, d) { if (!e.active) sim.alphaTarget(0); d.fx = null; d.fy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drag_drag(d, simulation) {\n d.fx = d3.event.x;\n d.fy = d3.event.y;\n }", "function dragStartedGame(){\n}", "function startDrag() {}", "function mouseDragged() {}", "function CdkDragMove() { }", "function CdkDragMove() { }", "function start(){\n\tdrawCircles();\n \n\t// Add your drag...
[ "0.70020866", "0.69129676", "0.6772438", "0.67453194", "0.6590738", "0.6590738", "0.6555979", "0.65499616", "0.6533912", "0.6440369", "0.641866", "0.6329449", "0.6280882", "0.6279538", "0.6266384", "0.6255553", "0.62453014", "0.6230687", "0.6227904", "0.6195562", "0.6149836",...
0.7180793
0
Check if two nodes are connected
function isConnected(a, b) { let check1 = indexLink[`${a.index}|${b.index}`]; let check2 = indexLink[`${b.index}|${a.index}`]; return (check1 || check2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isConnected(a, b) {\n return linkedByIndex[a.index + \",\" + b.index] || linkedByIndex[b.index + \",\" + a.index] || a.index == b.index;\n }", "function isConnected(a, b) {\n return linkedByIndex[a.index + \",\" + b.index] || linkedByIndex[b.index + \",\" + a.index] || a.index == b.inde...
[ "0.76590055", "0.76590055", "0.76590055", "0.76590055", "0.76590055", "0.76590055", "0.73751765", "0.73751765", "0.729864", "0.729864", "0.729864", "0.729864", "0.7173708", "0.7173708", "0.71429336", "0.71417403", "0.7030597", "0.70165724", "0.6735084", "0.6709441", "0.661110...
0.77613
0
an array of integers movieLengths (in minutes) and returns a boolean if there are two numbers in movieLengths whose sum equals flightLength. Assume your users will watch exactly two different movies.
function canTwoMoviesFillFlight (movieLengths, flightLength) { var movieLengthsSeen = new Set(); for (var i = 0; i < movieLengths.length; i++) { var firstMovieLength = movieLengths[i]; var matchingSecondMovieLength = flightLength - firstMovieLength; if (movieLengthsSeen.has(matchingSecondMovieLength)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function movieFlightChecker(movieLengths, flightLength) {\n //check if element from array is longer than flight\n let perfectMatch = false;\n movieLengths.forEach(function(movie){\n if (movie < flightLength) {\n //check if element can sum with any other to equal flight time\n //if no, check next elemen...
[ "0.8481177", "0.8411603", "0.8409242", "0.75908136", "0.7210908", "0.71701777", "0.6692717", "0.6620133", "0.562301", "0.5592515", "0.5513422", "0.5507464", "0.54685056", "0.5431995", "0.5425992", "0.5398698", "0.53401506", "0.5339309", "0.533828", "0.5328147", "0.5323909", ...
0.8495746
0