Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Runtime helper for checking keyCodes.
function checkKeyCodes ( eventKeyCode, key, builtInAlias ) { var keyCodes = builtInAlias; if (Array.isArray(keyCodes)) { return keyCodes.indexOf(eventKeyCode) === -1 } else { return keyCodes !== eventKeyCode } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key]||builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode)===-1;}else{return keyCodes!==eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName)!==key;}}", "function c...
[ "0.755443", "0.755443", "0.7163804", "0.7163804", "0.7163804", "0.7163804", "0.7129316", "0.7129316", "0.7095753", "0.70839065", "0.70839065", "0.70839065", "0.70839065", "0.70839065", "0.70839065", "0.70839065", "0.70839065", "0.7060453", "0.7049562", "0.7049562", "0.7049562...
0.0
-1
input will be something like int or nvarchar(15)
function getDatatype(dataType) { dataType = dataType.replace(')', ''); var arrDT = dataType.split('('); var dt = arrDT[0]; var dtLen = (arrDT.length == 2 ? arrDT[1] : null); var dataProps = { 'Type' : '', 'Length' : '', 'Decimal Places' : '' }; var dtMap = { 'bit' : 'Checkbox', 'datetime' : 'D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "convertTypesForDb(input) {\n\t\tswitch (input?.constructor.name) {\n\t\t\tcase 'Long':\n\t\t\t\treturn input.toString();\n\t\t\tdefault: return input;\n\t\t}\n\t}", "function typeOf(input) {\r\n\t\r\n\t\t\treturn ({}).toString.call(input).slice(8, -1).toLowerCase();\r\n\t\r\n\t\t}", "function valueDescription(...
[ "0.6909713", "0.60063773", "0.5964655", "0.59254414", "0.5923788", "0.58963346", "0.58695096", "0.5855481", "0.5855481", "0.5855481", "0.5803644", "0.5803644", "0.5803644", "0.58022827", "0.58022827", "0.5774577", "0.5774577", "0.5774577", "0.5747163", "0.5728211", "0.572779"...
0.0
-1
Server's constructor. It takes a number as parameter. It cannot take any other type else the project won't compile
constructor(port) { this.port = port; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Server() {}", "function myServer() {\n\tthis.server = server;\n}", "function Server() {\n this.esitScale = new EsitScale(); \n //this.log = new Log();\n \n}", "constructor(socket, serverIdentifier) {\n super(socket, serverIdentifier);\n }", "constructor(){\n\n console.log(\"Nod...
[ "0.73752725", "0.7041335", "0.6979075", "0.67926824", "0.661725", "0.6615411", "0.660361", "0.65762866", "0.6545191", "0.65270764", "0.64706486", "0.6340265", "0.628657", "0.62777394", "0.62289447", "0.6211172", "0.6198521", "0.61908245", "0.6170494", "0.6164171", "0.61429554...
0.61948514
17
Gets Learn Items from lessons that are connected to user to display in classtest list
function GetUserLessons(userId) { db.transaction(function(tx) { doQuery(tx, 'SELECT *, Category.CategoryId AS catId, Category.CategoryName FROM Lesson INNER JOIN UserLessons ON Lesson.LessonId = UserLessons.lesson_id '+ 'INNER JOIN Category on Lesson.CategoryId = Category.CategoryId WHERE user_id = '+userId+';',[]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetLearnItemTestFromLesson(userId, lessonIds, reverse){\n\tdb.transaction(function(tx) {\n\t\tdoQuery(tx, 'SELECT * FROM LearnItem INNER JOIN Lesson ON LearnItem.LessonId = Lesson.LessonId '+\t\n\t\t' WHERE Lesson.LessonId IN ('+lessonIds+') ORDER BY Lesson.LessonId;', [],function(tx,result){\n\t\t\tif (r...
[ "0.59862804", "0.57552516", "0.5518174", "0.54771817", "0.54359156", "0.5433313", "0.5346678", "0.53316915", "0.5283055", "0.524645", "0.5195878", "0.51640683", "0.515871", "0.51434565", "0.5139069", "0.51076597", "0.51071954", "0.5106007", "0.5097213", "0.5096518", "0.508902...
0.6253562
0
Get learn items for test from chosen lessons
function GetLearnItemTestFromLesson(userId, lessonIds, reverse){ db.transaction(function(tx) { doQuery(tx, 'SELECT * FROM LearnItem INNER JOIN Lesson ON LearnItem.LessonId = Lesson.LessonId '+ ' WHERE Lesson.LessonId IN ('+lessonIds+') ORDER BY Lesson.LessonId;', [],function(tx,result){ if (result != null && r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateStudyList(n, itemsForLearning, pLearned, pFoil, values, featureLearned,\n valueLearned, featureFoil, valueFoil, GetFilename) {\n let [objects, imageHTML] = GetObjects(n, values, featureLearned, valueLearned,\n featureFoil, valueFoil, Ge...
[ "0.5941115", "0.58891493", "0.5840232", "0.5491083", "0.5320322", "0.5275987", "0.5241175", "0.5239334", "0.5161786", "0.5136796", "0.51341516", "0.5120685", "0.5106897", "0.50944704", "0.50894713", "0.50831765", "0.5020811", "0.5013833", "0.49996018", "0.4996953", "0.4977646...
0.5808761
3
AW: glad you guys decided to use localStorage!!
function addTaskToLocal(taskId){ if(!localStorageService.get('cart')){ localStorageService.set('cart', {tasks: [], timeCreated: Date.now()}); } var existingCart = localStorageService.get('cart') existingCart.tasks.push(taskId); localStorageService.set('cart', existingCart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LocalStorage() \n{\nthis.setMany = function(map, onSuccess, onError)\n{\nsetTimeout(function() {\ntry {\nfor ( var key in map )\nlocalStorage.setItem( key, map[key] );\nif (onSuccess) \nonSuccess();\n} catch (ex) {\n(onError || defaultErrorHandler)(ex);\n}\n}, 0);\n};\n\nthis.getMany = function(keys, onSu...
[ "0.75563765", "0.7522956", "0.7496805", "0.74716717", "0.74216247", "0.7351421", "0.7305807", "0.72964954", "0.72802955", "0.72684044", "0.723842", "0.7234523", "0.7221441", "0.72162974", "0.72018844", "0.7188097", "0.7184782", "0.7159011", "0.71582824", "0.714454", "0.714359...
0.0
-1
PANEL / valid values for first val: everything after the double dash "panel__trigger'value'" everything after the double underscore "panel__'value'" valid values for second val: 'left', 'right' ('top', 'bottom' currently not implemented) 1.Panel trigger clicked 2.react on active panel triggers only 3.push the body (wra...
function panel(panel, direction) { //var height = $(window).height(); // $('.panel__trigger--' + panel).click(function() { // 1. if ($('.panel__trigger--' + panel).hasClass('panel__trigger--active')) { // 2. $('body').toggleClass('panel__helper--push-to' + direction); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "doOpenPanel(panelId) {\n const params = this.service.currentParams;\n\n let triggerElement = params.triggered;\n\n if (typeof triggerElement === 'string') {\n triggerElement = $(triggerElement);\n }\n\n // will apply css class to triggering element if provide.\n ...
[ "0.67277503", "0.6495976", "0.60520935", "0.5990813", "0.5990813", "0.58805573", "0.58652586", "0.5856723", "0.5789223", "0.57764304", "0.5724545", "0.57095766", "0.56653357", "0.5657198", "0.56504405", "0.56471294", "0.5617575", "0.5609458", "0.55688626", "0.5566754", "0.556...
0.6589184
1
console.log(angle1); console.log(angle2); console.log(angle3); When user clicks back button we route back to home page
function handleClick() { history.replace("/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnToHome(){\n\t\n}", "function goBackHome()\n{\n\tswitch(state){\n\t\tcase \"watershed\":\n\t\t\tZepto(\".watershed-wrapper\").fadeOut(\"medium\");\n\t\t\tbreak;\n\n\t\tcase \"nearshore\":\n\t\t\tZepto(\".nearshore-wrapper\").fadeOut(\"medium\");\n\t\t\tbreak;\n\n\t\tcase \"openwater\":\n\t\t\tZepto...
[ "0.56943154", "0.5672925", "0.5655653", "0.56551635", "0.5630369", "0.5595319", "0.55890435", "0.54917806", "0.5464913", "0.5456016", "0.5444321", "0.5433735", "0.542565", "0.54169613", "0.54167634", "0.54078174", "0.5389371", "0.537058", "0.5368818", "0.5368379", "0.5344196"...
0.0
-1
Gets the true hash value. Cannot use location.hash directly due to bug in Firefox where location.hash will always be decoded.
function getHash() { const match = location.href.match(/#(.*)$/) return match ? match[1].replace('#', '') : '' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHash() {\n\t if (!('location' in this)) _log.Console.error.call(_log.error, 'no window object, cannot do ...location.hash...');\n\t return 'location' in this ? this.location.hash : '';\n\t}", "function getHash(){ \n\t\tvar h = window.location.hash;\n\t\tif(h.charAt(0) == \"#\"){ h = h.substring(1);...
[ "0.76549774", "0.76089925", "0.7548665", "0.75055623", "0.73897845", "0.7143711", "0.70805514", "0.7046545", "0.69116426", "0.691112", "0.6803169", "0.6796538", "0.67482424", "0.6702408", "0.6672726", "0.66012496", "0.6545314", "0.6522401", "0.65178907", "0.64390546", "0.6386...
0.73270065
5
FALSE Funkce vrati TRUE pokud je cislo vetsi jak 15 a mensi jako 60 A NEBO se cislo rovna 2
function kontrola2(cislo) { let vysledek; if (cislo > 15 && cislo < 60 || cislo == 2) { vysledek = true; } else { vysledek = false; } return vysledek; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Deplacement_ennemiLimitrophe(Territoire){\r\n\tif (Territoire.army < 2) {return false}\r\n for (var i=0 ; i < Territoire.voisins.length ; i++){\r\n if (Territoire.proprietaire != Territoire.voisins[i].proprietaire ){\r\n return true\r\n }\r\n }\r\n return false\r\n}", "...
[ "0.69239926", "0.689495", "0.6712938", "0.64371604", "0.6392106", "0.6224772", "0.62245417", "0.61926854", "0.61617464", "0.61533916", "0.61297965", "0.61276335", "0.6116496", "0.6099892", "0.609685", "0.6076273", "0.6066493", "0.6027699", "0.5999139", "0.5998939", "0.5985238...
0.6816469
2
4. What does this program do? Without running this code in your code editor, explain what the following program does. Show with an example the result of executing this program. What is the runtime of this algorithm? This function adds up the value of the left node, root node, and right node bestcase: linear O(n)
function tree(t){ //if there is no tree, return 0 value if(!t){ return 0; } return tree(t.left) + t.value + tree(t.right) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "maxSum() {\n if (this.root === null) return 0;\n let sum = this.root.val;\n let nodesToVisit = [this.root];\n\n while (nodesToVisit.length){\n\n let current = nodesToVisit.pop();\n\n if ((current.left === null) && (current.right === null)){\n sum = sum;\n }\n\n else if ((curr...
[ "0.74549", "0.69668585", "0.663754", "0.6604152", "0.65136623", "0.6412629", "0.6407584", "0.6383269", "0.6236395", "0.6220293", "0.61663985", "0.616399", "0.616399", "0.61612344", "0.61533725", "0.6153325", "0.6135373", "0.613375", "0.6121115", "0.6084472", "0.60741854", "...
0.60703456
21
5. Height of a BST Write an algorithm to find the height of a binary search tree. What is the time complexity of your algorithm?
function height(bst) { //if current node is null if(!bst) { return 0; } else { // traverse through left and right nodes until you reach null if (bst.left && !bst.right) { return 1 + height(bst.left); } else if (bst.right && !bst.left) { return 1 + hei...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BSTHeight(tree) {\n if (!tree.key) return 0;\n \n let left = 0, right = 0;\n\n if (!tree.left && !tree.right) {\n return 1;\n }\n \n if (tree.left) {\n left = BSTHeight(tree.left);\n }\n\n if (tree.right) {\n right = BSTHeight(tree.right);\n }\n\n return Math.max(left, right) + 1;\n}",...
[ "0.8090448", "0.775602", "0.768171", "0.76651835", "0.7613595", "0.7603833", "0.7489365", "0.7384108", "0.7299109", "0.7255111", "0.7236453", "0.71873134", "0.7170517", "0.7162782", "0.71298003", "0.711496", "0.7112987", "0.7104908", "0.7095445", "0.70878243", "0.7028208", ...
0.77146345
2
6. Is it a BST? Write an algorithm to check whether an arbitrary binary tree is a binary search tree, assuming the tree does not contain duplicates.
function isAValidBinarySearchTree(bst) { //what makes a valid BST? //nodes, leaf nodes and, nodes with 2 children, 1 left child or 1 right child //in reference to the parent: left node has to smaller , every right node has to be larger // prove things false first, what is absolutely not true- rule this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBST(tree) {\n if (tree !== null && isBST(tree.left) > isBST(tree.right)) {\n return false;\n }\n return true;\n}", "function isBST(bst) {\n if(bst.left) {\n if(bst.left.key > bst.key) {\n return false;\n }\n if(!isbst(bst.left)) {\n return false;\n }\n }\n...
[ "0.76403195", "0.7549674", "0.7483505", "0.73842084", "0.7362987", "0.7245633", "0.7243932", "0.72439283", "0.7089044", "0.692451", "0.6900218", "0.68494093", "0.68196386", "0.6736546", "0.6702511", "0.6664556", "0.6646123", "0.6590445", "0.6563589", "0.6517624", "0.6482269",...
0.76317734
1
Create a new group
function hashCode(str) { var hash = 0; if (str.length == 0) return hash; for (i = 0; i < str.length; i++) { char = str.charCodeAt(i); hash = ((hash << 5) - hash) + char; hash = hash & hash; // Convert to 32bit integer } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createGroup() {\n this.errorMsg = null;\n\n this.SymbolGroupResource.create(this.project.id, this.group)\n .then(createdGroup => {\n this.ToastService.success('Symbol group <strong>' + createdGroup.name + '</strong> created');\n this.EventBus.emit(events.GROUP...
[ "0.8159561", "0.77772546", "0.77416205", "0.7736272", "0.7619218", "0.751406", "0.7336663", "0.7305564", "0.7274362", "0.7271129", "0.72629476", "0.7233989", "0.7222935", "0.7185628", "0.7146923", "0.7078955", "0.7040605", "0.7015198", "0.6933268", "0.69298595", "0.6908015", ...
0.0
-1
Adds element to page to notify a user
function addElement(message, domain) { var element = document.createElement("div"); element.setAttribute('id', 'content-script-notification'); element.style.position = "sticky"; element.style.width = "75%"; element.style.backgroundColor = "#f2f2f2"; element.style.border = "1px solid"; elemen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notify(message) {\r\n browser.notifications.create({\r\n \"type\": \"basic\",\r\n \"iconUrl\": browser.runtime.getURL(\"icons/ham.svg\"),\r\n \"title\": \"Thunderham\",\r\n \"message\": message\r\n });\r\n}", "function createNotify()\n{\n\n\t\tif( get[ 'msg' ] == 'insert' )\n\t\t{\n\n\t\t\...
[ "0.6705497", "0.646809", "0.62560564", "0.622026", "0.6183933", "0.6144748", "0.60768634", "0.6058416", "0.60521686", "0.600251", "0.59856486", "0.5980965", "0.5978222", "0.5969448", "0.59611344", "0.5935503", "0.5927926", "0.5925961", "0.5903761", "0.5885829", "0.58823293", ...
0.6212225
4
This is the eventhandler:
function formValidator(d) { d.preventDefault(); // Create 2 empty 'buckets', one for collecting data and // the other for error-messages let data = {}; // data.prop = 'Test property'; let errors = []; // 1. Validating fullname if (fn.value) { data.fullname = fn.value; } else { errors.push('First name h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEvent() {\n \n }", "handleEvents() {\n }", "handleEvent() {}", "handleEvent() {}", "function handleEvent(event) {\n\n }", "updated(e){}", "_evtChange(event) { }", "end(event) {\n\n }", "function handler() {\n fired = true;\n }", "handleEventChange() {\n }", "onChanged(e){...
[ "0.7243921", "0.7100557", "0.7042295", "0.7042295", "0.6970573", "0.6846314", "0.6627124", "0.6592313", "0.6590219", "0.6567089", "0.65494007", "0.6497715", "0.6466333", "0.64476526", "0.64243615", "0.64159", "0.6412797", "0.6403681", "0.64019674", "0.64019674", "0.64019674",...
0.0
-1
To Validate Email and load Password Page
function dothis(){ var mailformat=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if(document.getElementById("emailhere").value==""){ document.getElementById("errormsg").innerHTML="Enter a valid Email address"; document.getElementById("popup_container").style.visibility="visible"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadPage() {\n // Storing Field Values In Variables\n var email = document.getElementById(\"email\").value;\n var password = document.getElementById(\"password\").value;\n // Regular Expression For Email\n var emailReg = /^[a-zA-Z0-9_]+@student\\.uml\\.edu$/;\n // Conditions\n if (email == \"\") {\...
[ "0.7329787", "0.69587874", "0.6764827", "0.6706123", "0.6674116", "0.64870095", "0.6463068", "0.6437124", "0.6422255", "0.64207417", "0.6380132", "0.6365079", "0.631061", "0.6296007", "0.6285688", "0.628262", "0.6279319", "0.62772727", "0.6273989", "0.6267498", "0.6254569", ...
0.6488325
5
To load Login Page
function loadfront() { if(document.getElementById("pf").value==""){ document.getElementById("errormsg").innerHTML="Pasword cannot be empty"; document.getElementById("popup_container").style.visibility="visible"; } else{ localStorage.setItem("pass",document.getEl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadLogin() {\n\t\tvar login = $(\"#login\");\n\n\t\tlogin.load(\"view/login.html\", function () {\n\t\t\tuserSetup.setupLogin();\n\t\t});\n\t}", "function load_login_page() {\n page = 'login';\n load_page();\n}", "function loadLoginPage(){\n\n\t// delegate to navbar loading method\n\tloadNavbar...
[ "0.78402704", "0.7834828", "0.7467862", "0.7432782", "0.725657", "0.7243092", "0.7160582", "0.7103944", "0.70768136", "0.70187616", "0.7003302", "0.6980093", "0.69709116", "0.6953689", "0.6950084", "0.694604", "0.6912271", "0.6897374", "0.6893599", "0.68800455", "0.68797266",...
0.0
-1
Load forget password page
function forget_password(){ localStorage.setItem("time","1000"); localStorage.setItem("link","password_reset.html"); window.open('loading.html',"_self"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forgetPassword(req, res) {\n res.render(\"forgetPassword\");\n}", "function managePasswordForgotten() {\n\t$('#passwordReset').click(function() { \n\t\t// We must reset the document and send a link to the registered email\n\t\t// to a form where the end user can update the password\n\t\tclearDocument()...
[ "0.6792715", "0.6759048", "0.6649239", "0.65511817", "0.65202427", "0.6514498", "0.6444927", "0.636183", "0.63514465", "0.6351224", "0.62713486", "0.6250329", "0.6240128", "0.6213545", "0.6196818", "0.6184479", "0.6162781", "0.6033041", "0.60318094", "0.60308856", "0.6005093"...
0.75073516
0
Check details in login page
function loginchecker(){ if(document.getElementById("loginmail").value=="" || document.getElementById("loginpass").value==""){ document.getElementById("errormsg").innerHTML="Each field is required"; document.getElementById("popup_container").style.visibility="visible"; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkLogIn() {\n\tif (localStorage[\"mcsa_checkin_firstname\"] != null || localStorage[\"mcsa_checkin_userid\"] != null)\n\t\twindow.location = \"checkin.html\";\n}", "function check() {\r\n\r\n // stored data from the register-form\r\n var storedName = localStorage.getItem('regName');\r\n var ...
[ "0.715029", "0.711042", "0.71058494", "0.70257163", "0.6989609", "0.69866085", "0.68403715", "0.68300104", "0.68242764", "0.6815342", "0.67699206", "0.6757319", "0.6724948", "0.672054", "0.6711018", "0.66975737", "0.6693576", "0.6687681", "0.66730857", "0.6607687", "0.6597971...
0.6442625
36
Loading different videos at refresh
function videoloader(){ totalCount=4; var num = Math.ceil( Math.random() * totalCount ); var player = document.getElementById('vdo'); var source=document.getElementById("source"); player.pause(); source.src="ad"+num+".mp4"; player.load(); player.play(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadVideos() {\n BCMAPI.callback = getProcessVideosDelegateName();\n BCMAPI.find(\"find_videos_by_ids\", {\"video_ids\": config.videoIDs});\n }", "function loadVideos() {\n // if(videosloaded === false) {\n // var req = new XMLHttpRequest();\n // req.open('GET',...
[ "0.74785906", "0.73313624", "0.71351624", "0.6913796", "0.69097024", "0.69049174", "0.690279", "0.6819843", "0.6809315", "0.68071663", "0.67659825", "0.6710938", "0.6668745", "0.6628667", "0.66004544", "0.659054", "0.6586493", "0.6576943", "0.6576018", "0.65573025", "0.654352...
0.6232504
58
gives default value to the quantity
function givevalue(){ document.getElementById("qty_field").value="1"; document.getElementById("pname").innerText=localStorage.getItem("name"); document.getElementById("pprice").innerText=localStorage.getItem("price"); document.getElementById("totalp").innerText=localStorage.getItem("price"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get defaultValueQuantity() {\n\t\treturn this.__defaultValueQuantity;\n\t}", "init() {\n this.quantity = 3;\n }", "get quantity() {\n if (this._observation.dataValue \n && this._observation.dataValue.value instanceof Quantity) {\n return {\n number: this._observa...
[ "0.77204", "0.66405773", "0.65306616", "0.6458871", "0.6426208", "0.6380281", "0.6367411", "0.6363413", "0.6348092", "0.62720335", "0.62720335", "0.62720335", "0.62574613", "0.6217462", "0.6197652", "0.6184563", "0.61793584", "0.6169311", "0.6148891", "0.61344576", "0.6130782...
0.0
-1
Function to display calculations
function display(parm1, parm2, parm3, parm4) { document.getElementById('subtotal').value = parm1; document.getElementById('discount').value = parm2; document.getElementById('vat').value = parm3; document.getElementById('total').value = parm4; enablebtnProceed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawResult(){\n $(\".calcDisplay\").text(expression);\n}", "function currentTotal (numArray,operatorArray) {\n if (operatorArray.length === 2) {\n calculation[\"equationTotal\"] = operate(operatorArray[0], numArray[0], numArray[1])\n document.getElementById('display').innerText = calcu...
[ "0.7232934", "0.7047619", "0.70008934", "0.6874052", "0.68482274", "0.6808696", "0.6784497", "0.67689854", "0.672716", "0.6723427", "0.67110246", "0.66708434", "0.6669687", "0.6632433", "0.6629015", "0.6628595", "0.6628595", "0.66018414", "0.65426964", "0.6533898", "0.6526069...
0.0
-1
Function to enable btnProceed
function enablebtnProceed(){ $('#btnProceed').prop('disabled', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disablebtnProceed(){\n $('#btnProceed').prop('disabled', true);\n}", "function enableButtons()\n {\n //show buttons for updating and creating new workflow\n $(\"#perc-update-wf-save-cancel-block\").show();\n $(\"#perc-new-wf-save-cancel-block\").show();\n ...
[ "0.76508933", "0.70458955", "0.69074786", "0.6853219", "0.6775165", "0.6773699", "0.6714668", "0.66422814", "0.6632251", "0.660619", "0.65516907", "0.65426725", "0.65424633", "0.6525108", "0.6521332", "0.64883685", "0.64749575", "0.6432937", "0.642455", "0.64229167", "0.64198...
0.79427624
1
Function to disable btnProceed
function disablebtnProceed(){ $('#btnProceed').prop('disabled', true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enablebtnProceed(){\n $('#btnProceed').prop('disabled', false);\n}", "function enablebtnProceed(){\n $('#btnProceed').prop('disabled', false);\n}", "function cancelMSAssessment(){\r\n $('#btn-done-assmnt').attr('disabled','disabled');\r\n $('#btn-sub-next').removeAttr('disabled');\r\n $...
[ "0.83968735", "0.83968735", "0.74098015", "0.7289595", "0.719661", "0.71042347", "0.7099755", "0.7023563", "0.70020986", "0.69792515", "0.6976779", "0.6939071", "0.6917952", "0.6912972", "0.68965906", "0.68910134", "0.68887633", "0.6876265", "0.6870599", "0.6867335", "0.68634...
0.84942305
0
end of date validation
function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateStartToEndDay(startDay, endDay) {\n if (startDay > endDay)\n throw Error(\"startDay must come before endDay following normal calendar sequence.\");\n }", "function validateDate() {\n if (!formData[\"startdatetime\"]) return false;\n if (!formData[\"enddatetime\"]) return false;...
[ "0.7226247", "0.7144209", "0.6865209", "0.6856754", "0.67932636", "0.6765334", "0.67029667", "0.66848946", "0.66816944", "0.66800374", "0.66679025", "0.65981275", "0.65413415", "0.65190035", "0.65147644", "0.6512926", "0.6511611", "0.6506872", "0.6502897", "0.65009004", "0.64...
0.0
-1
stops the time spinner
function stopSpin() { clearInterval(document.thisLoop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopTime ()\t{\n\t\t\tclearInterval (time);\n\t\t}", "function time_stop(){\n\t\t\t\tclearInterval(timeinterval);\n\t\t\t}", "function stopTime() {\n // Clear the timer\n clearInterval(countDown);\n}", "function stopTime(){\n clearInterval(start);\n }", "function stopTime() {\n clearI...
[ "0.76980215", "0.7440178", "0.7338749", "0.730917", "0.725057", "0.7199835", "0.71402705", "0.7137266", "0.7113056", "0.6973326", "0.693762", "0.69357204", "0.69283366", "0.68090296", "0.6799763", "0.6795398", "0.67899466", "0.6787019", "0.6773318", "0.6766933", "0.67307127",...
0.0
-1
Added by Ravi Teja to display Invoice details for Canada and Puerto Rico country. Also this function call the totalCustomValue function which calculates Invoice total
function showInvoiceForCA() { if((window.opener.document.DynaShipmentShipSaveForm.country.value=='CA' || window.opener.document.DynaShipmentShipSaveForm.country.value=='PR') && window.opener.document.DynaShipmentShipSaveForm.shipFromCountryId.value == 'US' && !document.aascUPSIntlShipmentsForm.Commerc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_invoice_table_rows() {\n subtotal = 0;\n str = '';\n for (i = 0; i < products.length; i++) {\n p = 0;\n if (typeof POST[`${products[i].name}`] != 'undefined') {\n p = POST[`${products[i].name}...
[ "0.6233309", "0.6081629", "0.60220855", "0.5986225", "0.58452016", "0.5831528", "0.5797039", "0.57930946", "0.5785854", "0.5776555", "0.57665944", "0.5753013", "0.57356435", "0.5731363", "0.5731363", "0.57216287", "0.5713962", "0.57091695", "0.56948185", "0.5690021", "0.56868...
0.6165287
1
Below you'll find the code for the 'skyline' bounce effect at the end of the CV. Strictly speaking it is a physical simulation of boxes falling through a vacuum, all handled by the shader. Most of the code below is just boiler plate WebGL stuff. See the GitHub page for the vertics shader: Although, the shader could be ...
function initBouncingSkyline() { const canvas = document.getElementById('canvas'); const gl = canvas.getContext('webgl'); if (!gl) { console.error('This browser does not have a context I can draw cool stuff in. No worries tho'); return; } const scene = initScene(gl); scene.draw(); // draw firs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUpdate(framework) {\n // icoshMaterial.uniforms.Red.value=r;\n // icoshMaterial.uniforms.Green.value=g;\n // icoshMaterial.uniforms.Blue.value=b;\n\n oldt=newt;\n newt=performance.now(); // measures time since the beginning of execution\n time+=(newt-oldt);\n\n // icoshMaterial.uniforms.da...
[ "0.66729194", "0.6628178", "0.66165984", "0.6571661", "0.6546324", "0.6541269", "0.64224243", "0.64013785", "0.6370539", "0.6365582", "0.635038", "0.63491434", "0.63436633", "0.63427556", "0.6323959", "0.630921", "0.6300006", "0.6263781", "0.62500817", "0.62492275", "0.624816...
0.6607566
3
WebGL boilerplate stuff Inspired by the tutorials on webglfundamentals.org
function createShader(gl, type, text) { const shader = gl.createShader(type); gl.shaderSource(shader, text); gl.compileShader(shader); const success = gl.getShaderParameter(shader, gl.COMPILE_STATUS); if (success) { return shader; } console.error('Could not create/compile '+type+' shader:', gl.getSh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initWebGL() {\n /* Add default pointer */\n var pointers = [];\n pointers.push(new Pointer());\n /* Get webGL context */\n\n var webGL = canvas.getContext('webgl2', defualts.DRAWING_PARAMS);\n var isWebGL2 = !!webGL;\n if (!isWebGL2) webGL = canvas.getContext('webgl', defualts.DRAWING_PARAMS) || ca...
[ "0.76701915", "0.7651698", "0.7481464", "0.7465533", "0.74506074", "0.74090743", "0.73574", "0.7356358", "0.7313126", "0.73096997", "0.730181", "0.724479", "0.7226099", "0.72238654", "0.72178495", "0.7198587", "0.7195945", "0.7182789", "0.71812075", "0.71766883", "0.716811", ...
0.0
-1
Make the bird jump
jump () { if (this.bird.alive === false) { return; } // Add a vertical velocity to the bird this.bird.body.velocity.y = -350; // Create an animation on the bird var animation = this.add.tween(this.bird); // Change the angle of the bird to -20° in 100 milliseconds animation.to({angl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jump() {\n if (birdBottom < 500) birdBottom += 50\n bird.style.bottom = birdBottom + 'px'\n}", "jump() {\n\n if (this.alive == false)\n return; \n\n // Add a vertical velocity to the bird\n this.sprite.body.velocity.y = -350;\n\n // this.add.tween(this.bird).to(...
[ "0.7838074", "0.7275513", "0.72320205", "0.71320385", "0.7131415", "0.7059744", "0.7055718", "0.7044079", "0.69935936", "0.68942493", "0.6810611", "0.6794718", "0.6783426", "0.6769209", "0.67462003", "0.67118376", "0.67075616", "0.66747475", "0.6663367", "0.66405857", "0.6561...
0.7816256
1
? is arr sorted? must be for my solution
function firstDuplicate(arr) { const sortedArr = arr.sort() console.log('sortedArr', sortedArr) var dupNum = 0 for (var i = 0; i < sortedArr.length; i++) { const num1 = sortedArr[i] console.log('num1', num1) const num2 = sortedArr[i + 1] console.log('num2', num2) if (num1 === num2) { d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sorted(arr){\n\t\tfor (let i=0; i< arr.length -1; i++){\n\t\t\tfor (let j=0; j< arr.length - i -1 ; j++){\n\n\t\t\t\tif (arr[j] > arr[j+1]){\n\t\t\t\t\tlet temp = arr[j]\n\t\t\t\t\tarr[j] = arr[j+1]\n\t\t\t\t\tarr[j+1] = temp\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn arr\n\n\t}", "function sort(arr) {\...
[ "0.7383853", "0.7105842", "0.71018505", "0.707897", "0.70704514", "0.70523334", "0.70522314", "0.7032195", "0.702576", "0.7005218", "0.69606936", "0.69566333", "0.6914948", "0.690723", "0.6906733", "0.6850552", "0.68425053", "0.6774493", "0.6748035", "0.6748035", "0.6748035",...
0.0
-1
Use TexMap for this, instead of document.getElementById?
function getX(tree, pos) { var cumulativeXOffset = function(elem) { var left = 0; while (elem && elem.id != "mathDisplay") { left += elem.offsetLeft || 0; elem = elem.offsetParent; } return left; }; if (tree.children) { var startNode = tree; var endNode = tree; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadMapText(elem) {\n var newTextId = getNewTextId(elem);\n var textElem = getTextElem(elem);\n swapText(newTextId, textElem);\n }", "render() {\n return (\n <div id={this.mapid} class=\"map\"> </div>\n )\n }", "function selectErasmu(){\n changeMapB...
[ "0.6195751", "0.58614403", "0.57940525", "0.5735472", "0.57058716", "0.56727946", "0.5627444", "0.56215435", "0.559004", "0.55590665", "0.55400413", "0.5516034", "0.54967016", "0.54825383", "0.5453462", "0.5453462", "0.54474837", "0.5447061", "0.5446285", "0.54324615", "0.542...
0.0
-1
BREAK THIS UP TO DETERMINE SYMBOL??
function drawDistributionTarget(tree) { var left = getX(tree, "center"); var top = document.getElementById("mathDisplay").offsetTop; var target = drawTarget(top, left, "&#8595;", {tx:60, ty:54}); target.value = "Distribute!"; return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SimpleSymbols(str) { \n}", "function symbol(name){\r\n return lexeme(string(name));\r\n}", "function SimpleSymbols(str) {\n\n // code goes here\n return str;\n\n}", "function LexSym() {\r\n}", "function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }", "function matchSymbol()...
[ "0.7091547", "0.6941864", "0.6630639", "0.6480327", "0.6438614", "0.6217951", "0.62161356", "0.62150943", "0.6196158", "0.61378217", "0.61160755", "0.6106226", "0.6106226", "0.6050866", "0.60453206", "0.59886783", "0.59801155", "0.59645796", "0.5946613", "0.591712", "0.589357...
0.0
-1
THIS IS X symbol = "&215;";
function drawSubtractTarget(tree) { var left = getX(tree, "right"); var container = document.getElementById("mathDisplay"); var top = container.offsetTop + (container.offsetHeight / 2); var target = null; if (sharedParent.val == "neg" && sharedParent.parent && sharedParent.parent.val == "neg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }", "function SimpleSymbols(str) { \n}", "function P(a){return Ca[a]||(Ca[a]=\"&#\"+a.charCodeAt(0)+\";\")}", "function Symbol() {\n}", "function setYourSymbol() {\n document.getElementById('yourSymbol').innerHTML = yourSymbol;\n}", ...
[ "0.6667741", "0.6632645", "0.659055", "0.65804917", "0.64957964", "0.6414607", "0.6337563", "0.62666863", "0.62646085", "0.62591505", "0.619271", "0.61660683", "0.6153905", "0.6153905", "0.61339635", "0.60631686", "0.6038682", "0.60355294", "0.595682", "0.58901983", "0.583959...
0.0
-1
! isobject < Copyright (c) 20142017, Jon Schlinkert. Released under the MIT License. /! isplainobject < Copyright (c) 20142017, Jon Schlinkert. Released under the MIT License.
function sr(e){return!0==(null!=(t=e)&&"object"==typeof t&&!1===Array.isArray(t))&&"[object Object]"===Object.prototype.toString.call(e);var t}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPlainObject(obj){\n \tif (obj.constructor.name===\"Object\"){\n \t\treturn true;\n \t}\n \treturn false;\n }", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isObjectObje...
[ "0.72437334", "0.7224214", "0.7224214", "0.711493", "0.711493", "0.711493", "0.711493", "0.711493", "0.711493", "0.711493", "0.7033457", "0.7033457", "0.70283246", "0.6976139", "0.6976139", "0.6946703", "0.6852317", "0.68244183", "0.6821442", "0.6817614", "0.679908", "0.678...
0.0
-1
Make a test parameter by mapping a format and each component to a texel component data value.
function makeParam(format, fn) { const rep = getTexelDataRepresentation(format); return { R: rep.componentInfo.R ? fn(rep.componentInfo.R.bitLength, 0) : undefined, G: rep.componentInfo.G ? fn(rep.componentInfo.G.bitLength, 1) : undefined, B: rep.componentInfo.B ? fn(rep.componentInfo.B.bitLength, 2) : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapTextFormat (e) {\n if ((e === undefined) || (e === null)) return undefined;\n\n return {\n textType: getAttrValue(e, 'textType'),\n isSequence: toBoolean(getAttrValue(e, 'isSequence')),\n interval: toNumeric(getAttrValue(e, 'interval')),\n startValue: toNumeric(get...
[ "0.5343262", "0.5268283", "0.5268283", "0.52428585", "0.51962507", "0.51962507", "0.5162306", "0.5060763", "0.5051369", "0.50218743", "0.50209135", "0.49844813", "0.49542072", "0.49488688", "0.49464637", "0.4881573", "0.48693162", "0.48445794", "0.4826116", "0.48230633", "0.4...
0.63455296
0
static contextType = StateContext;
render() { // const [{basket}] = this.context; // console.log({basket}); const { customerList, isLoading } = this.state; return isLoading ? ( <LoadingBar /> ) : ( <div className="homePage"> <div className="home_flex_row"> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "state() {\n return this.context.state;\n }", "get contextType() {\n return this.contextTypeInternal;\n }", "get contextType () {\n\t\treturn this._contextType;\n\t}", "static get() { return currentContext; }", "constructor(){\n\t\tthis.util = new Util();\n\t\tthis.currentContextIdIndex = -1;\...
[ "0.6732377", "0.67053133", "0.66812074", "0.64715016", "0.64092475", "0.63427097", "0.62667793", "0.62186885", "0.61209476", "0.6102688", "0.6075226", "0.60731393", "0.6059952", "0.6046384", "0.5995907", "0.59938264", "0.59883827", "0.59883827", "0.59883827", "0.59883827", "0...
0.0
-1
adds a prospect to the prospects table and explicitly returns the given data
async function addProfile(data) { const [prospect] = await db .from('prospect') .insert(data) .returning('*'); return prospect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function singleProspect(id) {\n const [prospect] = await db\n .select('*')\n .from('prospect')\n .where({ id });\n return prospect;\n}", "function addData(data) {\n console.log(` Adding: ${data.name} (${data.owner})`);\n Patients.insert(data);\n}", "function addIncome(titleVal, typeVal, tot...
[ "0.54976565", "0.54545933", "0.51928407", "0.51894516", "0.5136515", "0.5134527", "0.5124898", "0.5119652", "0.51166296", "0.51028955", "0.5091209", "0.5060584", "0.5048052", "0.5035042", "0.50246066", "0.5001022", "0.4999309", "0.4999063", "0.49985826", "0.49464878", "0.4943...
0.6976092
0
Returns either an ID matching the employee ID from a given token or null
async function getID(id) { const [userID] = await db .select('id') .from('employee') .where({ id }); return userID ? userID : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIdToken() {\n const tokenResponse = this.state.tokenResponse;\n\n if (tokenResponse) {\n const idToken = tokenResponse.id_token;\n const scope = this.state.scope || \"\"; // We have been authorized against this server but we don't have\n // the id_token. This should be a scope issue.\n\n ...
[ "0.6428253", "0.6157372", "0.6121489", "0.6117612", "0.6076803", "0.6025079", "0.5898119", "0.58905125", "0.58899647", "0.58828866", "0.57972544", "0.57958037", "0.5785728", "0.5776228", "0.5671068", "0.565733", "0.56512874", "0.5630258", "0.56007785", "0.5599655", "0.5595547...
0.5303529
46
returns a single prospect that matches the given ID
async function singleProspect(id) { const [prospect] = await db .select('*') .from('prospect') .where({ id }); return prospect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfById(id) {\n return professors.find(prof => prof._id === id);\n }", "getById(id)\n {\n return this.getModel()\n .find(id)\n .first();\n }", "Get(id) {\n\t\treturn this.obj.filter(function(o){return o.id == id;})[0];\n\t}", "function getProducerById...
[ "0.67449754", "0.6476055", "0.6410479", "0.6400078", "0.63100076", "0.61703026", "0.61317265", "0.61027384", "0.610106", "0.6077979", "0.6075668", "0.6060156", "0.60544884", "0.6000258", "0.5986627", "0.59849036", "0.5970346", "0.59599274", "0.5929043", "0.59089", "0.58813345...
0.80616885
0
updates a prospect matching the given ID with the given post
async function updateProfile(id, post) { const [prospect] = await db .from('prospect') .where({ id }) .update(post) .returning('*'); return prospect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function updatePost(id) {}", "static async update(post_id, data) {\n let { query, values } = sqlForPartialUpdate(\n \"posts\",\n data,\n \"post_id\",\n post_id\n );\n\n const result = await db.query(query, values);\n const post = resul...
[ "0.69479173", "0.6778798", "0.6735381", "0.6729224", "0.65276706", "0.64907336", "0.63988763", "0.63174057", "0.63048154", "0.6302784", "0.6292166", "0.6278999", "0.6261988", "0.6251311", "0.6198417", "0.6188476", "0.61476386", "0.6081732", "0.6073879", "0.60670483", "0.60420...
0.75922346
0
Save and Load Functions
function save() { localStorage.setItem('en', JSON.stringify(en)); localStorage.setItem('level', JSON.stringify(level)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AutoSaveLoad() {}", "static Save() {}", "function SaveLoad_old(flowpoints, dummies, order, indent, library, modelname) {\n var msg = dent(indent, 1) + \"def save(self, name=None, extras={}):\"\n msg += '\\n' + dent(indent, 2) + \"if not name: name = self.name\"\n msg += '\\n' + dent(indent, 2) + \"...
[ "0.73028904", "0.6540106", "0.6436678", "0.6346549", "0.6145739", "0.61297125", "0.61247146", "0.6099172", "0.6099172", "0.60869527", "0.6039563", "0.5998404", "0.59755504", "0.59481996", "0.59461117", "0.5925586", "0.59221905", "0.5918312", "0.5851201", "0.58159345", "0.5796...
0.52632517
79
Third Scene | Introduces Towns and Weapons/Gear Start of Game and Battle Assigner
function start() { if (level === 1) { var startt = prompt('Do you fight? (type yes)(or type save to save your game)(or type load to load your game)(or type close to close the game!)'); if (startt === 'yes') { //Starts Battle 1 if (en === 1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Create() {\n\n\n //===================================================================\n var r = new Rule1();\n r.init({conditions: function(scene){\n return !(scene.objects['first_text'].isVisible);},\n\n actions: function(scene){\n var o = scene.objects['first_t...
[ "0.6769504", "0.6659018", "0.65607154", "0.6534451", "0.6465445", "0.64269924", "0.6367393", "0.6362646", "0.63546264", "0.6341564", "0.6297883", "0.6295216", "0.6272161", "0.6259544", "0.6240296", "0.62269723", "0.6219301", "0.62081486", "0.6206361", "0.6180681", "0.61792487...
0.0
-1
state: State; props: Props; setState: ($Shape) => void;
renderLayers() { const subLayerProps = this.getSubLayerProps({ id: 'geojson', // Proxy most GeoJsonLayer props as-is data: this.props.data, fp64: this.props.fp64, filled: this.props.filled, stroked: this.props.stroked, lineWidthScale: this.props.lineWidthScale, lineW...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StateShape()\n\t{\n\t\tmxDoubleEllipse.call(this);\n\t}", "setState (state) {\r\n this.state = state;\r\n }", "function State(xx,yy) {\n this.x = xx;\n this.y = yy;\n}", "setState(state){\n this.state = state;\n}", "function State() {\n\n }", "function State() { }", "setState(state) ...
[ "0.7175782", "0.6857663", "0.67560834", "0.6747418", "0.6670508", "0.6612117", "0.65985394", "0.6476232", "0.6448484", "0.6410037", "0.6384046", "0.6371654", "0.63705313", "0.6367858", "0.635439", "0.6317441", "0.6311552", "0.6307277", "0.6277806", "0.62310284", "0.6214018", ...
0.0
-1
TODO: figure out how to properly update state from an outside event handler
shouldUpdateState({ props, oldProps, context, oldContext, changeFlags }: Object) { if (changeFlags.stateChanged) { return true; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stateChanged(_state) { }", "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "stateChanged(state) { }", "handle() {\n if(!this.enabled)\n return;\n\n Object.assign(this.previousState, this.state); // Save the previous state\n this.update(); // Update the current state\n this.notify();\n...
[ "0.7008402", "0.7004868", "0.6997438", "0.6838403", "0.6797836", "0.6732836", "0.66913706", "0.6635578", "0.66288584", "0.6602819", "0.64784515", "0.6477399", "0.64702106", "0.6466415", "0.6461218", "0.6457096", "0.64291793", "0.64198995", "0.6404403", "0.63966924", "0.637382...
0.0
-1
Create filter function for a query string
function createFilterFor(query) { var lowercaseQuery = query.toLowerCase(); return function filterFn(item) { return (item.value.includes(lowercaseQuery)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n //Create a copy of the queryStr\n const queryStrCopy = {...this.queryStr};\n\n //Removing different types of filters from the queryStrCopy\n const removeFields = ['sort', 'fields', 'q', 'limit', 'page'];\n removeFields.forEach( el => delete queryStrCopy[el])\n\n ...
[ "0.71450585", "0.7033664", "0.6854716", "0.6849926", "0.6826466", "0.6811337", "0.6803393", "0.6778003", "0.67749566", "0.67666936", "0.6743364", "0.6740141", "0.6726036", "0.67157257", "0.67112994", "0.6707268", "0.6705722", "0.6705116", "0.66998726", "0.66976374", "0.669296...
0.67148614
14
list cart///////////////////////////////// ///////////////////////////////////function & ajax
function reSubTotal(){ var subtotal = 0; for(var i = 0; i<$scope.listCartItems.length;i++){ subtotal += $scope.listCartItems[i].proPrice*$scope.listCartItems[i].quantity; } $scope.subtotal = subtotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCart() {\n\t$.ajax(\n\t{\n\t\turl: 'php_scripts/actions.php',\n\t\ttype: 'POST',\n\t\tdata: 'action=show-cart',\n\t\tdataType: 'JSON',\n\t\tsuccess: function(data) {\n\t\t\tappendCartToDom(data);\n\n\t\t\t//remove loading\n\t\t\tcloseLoading();\n\t\t},\n\t\terror: function(response) {\n\t\t\t//log js ...
[ "0.753324", "0.73513514", "0.72059095", "0.7175831", "0.7163208", "0.71398777", "0.7132221", "0.71003807", "0.7003349", "0.6867489", "0.68491024", "0.68486506", "0.6843936", "0.6814974", "0.6808708", "0.67885846", "0.67867875", "0.67843515", "0.67843515", "0.67843515", "0.678...
0.0
-1
Used to modify an Analytics response to only include a single row, e.g. if no more than one value of the dimension is available.
function limitResponseToSingleRow( analyticsResponse ) { return [ { ...analyticsResponse[ 0 ], data: { ...analyticsResponse[ 0 ].data, rows: [ analyticsResponse[ 0 ].data.rows[ 0 ], ], }, }, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "rowData() {\n const data = this.mapResponseData();\n let rows = [];\n if (data) {\n for (const property in data) {\n rows = rows.concat(data[property]);\n }\n return rows;\n }\n return null;\n }", "function checkForSingleRow() {\n assert.equal(1, previousResult.recordset....
[ "0.5565703", "0.5129283", "0.4874831", "0.48711795", "0.4830827", "0.4790349", "0.47762674", "0.47552267", "0.47306675", "0.47099832", "0.4610542", "0.46023142", "0.45947874", "0.45945928", "0.45151114", "0.44846737", "0.44698912", "0.44632158", "0.4420637", "0.4415934", "0.4...
0.7433288
0
Run a SQL script (e.g. a file) against the database. Note that this function does not run the queries internally, rather uses the database connection parameters value that this State's pgpool was configured with to run the script using the command line 'psql' program. It chooses the first 'psql' program in the system's...
async _runScript(script) { let args = []; let o = this._pgpool.options; // cuts down on verbosity if (o.host) { args.push(`--host=${o.host}`); } if (o.port) { args.push(`--port=${o.port}`); } if (o.database) { args.push(`--dbname=${o.database}`); } if (o.user) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function execSql(name) {\n //Sequence is important in running the script\n log(`${name}: Target Environment: ` + env);\n if (env === \"production\") {\n return log(chalk.yellow(\"Cannot recreate db on production\"));\n }\n\n const config = require(\"../../src/config/config\")[env];\n const connectionStrin...
[ "0.62913525", "0.5598094", "0.55967504", "0.5588268", "0.5561262", "0.5491339", "0.5415996", "0.5390163", "0.53560996", "0.53171045", "0.51340824", "0.51191425", "0.51091474", "0.50415003", "0.49378", "0.4906948", "0.48490632", "0.48290846", "0.4786494", "0.47640428", "0.4709...
0.6937159
0
Return a client which an external user of this class can use to string commands together NOTE: It's very important that this object's .release() method gets called. Otherwise, the database client pool will be starved
async getClient() { return this._pgpool.connect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClient() {\n return new Client({\n host: 'my_postgres_container',\n user: 'admin',\n password: 'admin',\n database: 'hgop'\n });\n}", "function getClient() {\n return pool.connect();\n}", "function client() {\n return new Client()\n}", "function getClient() {\n...
[ "0.68652743", "0.6631298", "0.6467786", "0.62945235", "0.62134165", "0.61547583", "0.6147213", "0.6129128", "0.6076809", "0.5944808", "0.5916985", "0.59086084", "0.5840243", "0.5827088", "0.5778972", "0.57723105", "0.57327896", "0.57232445", "0.5721651", "0.56400526", "0.5615...
0.64581215
3
Insert a spot request.
async insertSpotRequest(spotRequest, client) { let { id, workerType, region, az, instanceType, state, status, imageId, created, } = assertValidSpotRequest(spotRequest); let text = [ 'INSERT INTO spotrequests (id, workerType, region, az, instanceTy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async upsertSpotRequest(spotRequest, client) {\n let {\n id,\n workerType,\n region,\n az,\n instanceType,\n state,\n status,\n imageId,\n created,\n } = assertValidSpotRequest(spotRequest);\n\n let text = [\n 'INSERT INTO spotrequests (id, workerType, reg...
[ "0.63485104", "0.6032151", "0.5707202", "0.5666394", "0.55797887", "0.5342978", "0.52825075", "0.5255259", "0.5196654", "0.51856637", "0.5184736", "0.51816756", "0.5180556", "0.51741743", "0.5143514", "0.5125072", "0.5115791", "0.51120293", "0.51113975", "0.5104712", "0.50997...
0.7341061
0
Either insert or update a spot request. This ensures an atomic insert or update, but we never learn which one happened.
async upsertSpotRequest(spotRequest, client) { let { id, workerType, region, az, instanceType, state, status, imageId, created, } = assertValidSpotRequest(spotRequest); let text = [ 'INSERT INTO spotrequests (id, workerType, region, az, instanceTy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async insertSpotRequest(spotRequest, client) {\n let {\n id,\n workerType,\n region,\n az,\n instanceType,\n state,\n status,\n imageId,\n created,\n } = assertValidSpotRequest(spotRequest);\n\n let text = [\n 'INSERT INTO spotrequests (id, workerType, reg...
[ "0.60957146", "0.5853129", "0.58434504", "0.55407387", "0.5536334", "0.5389816", "0.5389816", "0.5389816", "0.5389816", "0.5389816", "0.5389816", "0.5389816", "0.52605104", "0.5241444", "0.5222108", "0.5199224", "0.5160987", "0.5091287", "0.5008648", "0.49914998", "0.49778196...
0.6883942
0
Update a spot request's state.
async updateSpotRequestState({region, id, state, status}, client) { assert(typeof region === 'string'); assert(typeof id === 'string'); assert(typeof state === 'string'); assert(typeof status === 'string'); let text = 'UPDATE spotrequests SET state = $1, status = $2 WHERE region = $3 AND id = $4'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set state(state) {\n this._state = state;\n this.updateSpotifyStatus();\n }", "function updateSetExistingSpot() {\n setIsExistingSpot(true);\n setIsNewSpot(false);\n }", "get spotRequestState() {\n return this.getStringAttribute('spot_request_state');\n }", "async update({ p...
[ "0.6167215", "0.6149419", "0.59893376", "0.58742195", "0.57153606", "0.57153606", "0.57153606", "0.57153606", "0.57153606", "0.57153606", "0.57153606", "0.5712466", "0.5710253", "0.55170125", "0.55014557", "0.5447974", "0.5379149", "0.53562295", "0.532366", "0.53229004", "0.5...
0.64301646
0
Stop tracking a spot request.
async removeSpotRequest({region, id}, client) { assert(typeof region === 'string'); assert(typeof id === 'string'); let text = 'DELETE FROM spotrequests WHERE id = $1 AND region = $2'; let values = [id, region]; let result; if (client) { result = await client.query({text, values}); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopTracking() {\n HyperTrack.onTrackingStop();\n }", "userStopTracking() {\n log.info(logger, \"user clicked stop tracking\");\n stopTracking(() => {\n log.info(logger, \"stop tracking callback from core\");\n this.userTracking = false;\n });\n }", "stop() {\n this.isR...
[ "0.6926359", "0.6380505", "0.63456607", "0.6341147", "0.6321838", "0.6239748", "0.62317353", "0.6210947", "0.61851406", "0.61417425", "0.61035705", "0.60847706", "0.6055243", "0.60498613", "0.60469747", "0.6037165", "0.60145926", "0.59898454", "0.59863275", "0.5982691", "0.59...
0.0
-1
Insert an instance. If provided, this function will ensure that any spot requests which have an id of `srid` are removed safely. The implication here is that any spot request which has an associated instance must have been fulfilled
async insertInstance(instance, client) { let { workerType, region, az, id, instanceType, state, srid, imageId, launched, lastevent, } = assertValidInstance(instance); let shouldReleaseClient = false; if (!client) { shouldReleaseClient = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async upsertInstance(instance, client) {\n let {\n workerType,\n region,\n az,\n id,\n instanceType,\n state,\n srid,\n imageId,\n launched,\n lastevent,\n } = assertValidInstance(instance);\n\n let shouldReleaseClient = false;\n if (!client) {\n s...
[ "0.5741467", "0.546003", "0.5302104", "0.5001672", "0.49649882", "0.4866364", "0.4816069", "0.46608934", "0.4615744", "0.45628777", "0.45027557", "0.44582465", "0.4391395", "0.43710342", "0.4358518", "0.4354432", "0.4345003", "0.43431696", "0.43376932", "0.43345493", "0.43326...
0.57100785
1
Insert an instance, or update it if there's a conflict. If provided, this function will ensure that any spot requests which have an id of `srid` are removed safely. The implication here is that any spot request which has an associated instance must have been fulfilled
async upsertInstance(instance, client) { let { workerType, region, az, id, instanceType, state, srid, imageId, launched, lastevent, } = assertValidInstance(instance); let shouldReleaseClient = false; if (!client) { shouldReleaseClient = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async upsertSpotRequest(spotRequest, client) {\n let {\n id,\n workerType,\n region,\n az,\n instanceType,\n state,\n status,\n imageId,\n created,\n } = assertValidSpotRequest(spotRequest);\n\n let text = [\n 'INSERT INTO spotrequests (id, workerType, reg...
[ "0.5772677", "0.52768964", "0.5255414", "0.5056584", "0.49682066", "0.4924262", "0.49218628", "0.4916066", "0.48892632", "0.48215696", "0.4686832", "0.4587334", "0.45816177", "0.4581073", "0.45627913", "0.44993776", "0.44172996", "0.43605003", "0.43191493", "0.43147564", "0.4...
0.61401004
0
Update an instance's state.
async updateInstanceState({region, id, state, lastevent}, client) { assert(typeof region === 'string'); assert(typeof id === 'string'); assert(typeof state === 'string'); assert(typeof lastevent === 'object'); assert(lastevent.constructor.name === 'Date'); let text = 'UPDATE instances SET state...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUp...
[ "0.75235075", "0.721574", "0.71948487", "0.70818985", "0.6835831", "0.6600205", "0.6522778", "0.6484624", "0.64667934", "0.64582014", "0.6445938", "0.6394722", "0.63880086", "0.6366064", "0.63342685", "0.6318801", "0.6288477", "0.62643147", "0.6238352", "0.6232053", "0.622736...
0.0
-1
Stop tracking an instance
async removeInstance({region, id, srid}, client) { assert(typeof region === 'string'); assert(typeof id === 'string'); let text = 'DELETE FROM instances WHERE id = $1 AND region = $2'; let values =[id, region]; let name = 'remove-instance'; let result; if (client) { result = await cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopTracking() {\n HyperTrack.onTrackingStop();\n }", "stop() {\n this.target = null;\n }", "stop() {\n this.target = null;\n }", "stop() {\n this.active = false;\n }", "stop() {\n\t\tthis._stopAtNextUpdate = true;\n\t}", "stop() {\n this.onStop(false)...
[ "0.7402127", "0.7096933", "0.7085915", "0.7015549", "0.69702864", "0.6852481", "0.6820002", "0.6817735", "0.6816032", "0.6804208", "0.67959946", "0.6778351", "0.6778351", "0.67379385", "0.67345923", "0.6694798", "0.6693253", "0.66760075", "0.66668844", "0.66465193", "0.664117...
0.0
-1
Either insert or update an AMI's usage. This ensures an atomic insert or update, but we never learn which one happened.
async reportAmiUsage({region, id}, client) { assert(typeof region === 'string'); assert(typeof id === 'string'); let text = [ 'INSERT INTO amiusage (region, id, lastused)', 'VALUES ($1, $2, now())', 'ON CONFLICT (region, id) DO UPDATE SET lastused = EXCLUDED.lastused', ].join(' '); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async upsertInstance(instance, client) {\n let {\n workerType,\n region,\n az,\n id,\n instanceType,\n state,\n srid,\n imageId,\n launched,\n lastevent,\n } = assertValidInstance(instance);\n\n let shouldReleaseClient = false;\n if (!client) {\n s...
[ "0.49307042", "0.4927908", "0.4919801", "0.49148792", "0.489513", "0.48776117", "0.47979224", "0.47826096", "0.4683523", "0.4648209", "0.4580342", "0.45798424", "0.45756605", "0.4528132", "0.45188776", "0.45114553", "0.45023212", "0.4482642", "0.44799882", "0.44628564", "0.44...
0.6112344
0
Internal method used to generate queries which have simple and condition checking. This let's us do very specific queries while not using an ORM
_generateTableListQuery(table, conditions = {}, forUpdate = false) { assert(typeof table === 'string', 'must provide table'); assert(typeof conditions === 'object', 'conditions must be object'); let query = `SELECT * FROM ${table}`; let values = []; let k = Object.keys(conditions); if (k.leng...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQueryConditions() {\r\n var query = []\r\n if ($('#cbId').is(':checked'))\r\n query.push(`id ${$('#conditionsId option:selected').text()} ${$('#txtId').val()}`)\r\n if ($('#cbPhone').is(':checked') && $('#txtPhone').val() !== '')\r\n query.push(`phone === '${$('#txtPhone').val()....
[ "0.63486904", "0.6234686", "0.6227463", "0.61944556", "0.60729295", "0.6062974", "0.5992159", "0.5985705", "0.59228694", "0.5911054", "0.5898265", "0.5870045", "0.5796796", "0.5773086", "0.57540417", "0.5746315", "0.57348007", "0.5729906", "0.57275903", "0.56728595", "0.56636...
0.53178245
72
Internal method which runs the table queries
async _listTable(table, conditions = {}, client = undefined) { assert(typeof table === 'string'); assert(typeof conditions === 'object'); // We want a FOR UPDATE query if a client is passed in because the only // reason to pass in a client for a query is to lock the rows as part of a // transaction...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDatabaseQueries() {\n \n}", "queryAll(callback) {\r\n var self = this;\r\n this.table.findAll(this.select)\r\n .then(function (data) {\r\n self.data = data;\r\n callback(self);\r\n },\r\n function (err) {\r\n ...
[ "0.6464689", "0.6334729", "0.633421", "0.6301521", "0.6195359", "0.6108858", "0.6063582", "0.6001689", "0.5936747", "0.5933615", "0.591412", "0.5897684", "0.58847535", "0.5847082", "0.5835159", "0.58225685", "0.5814485", "0.57768047", "0.5755217", "0.5737355", "0.57273656", ...
0.0
-1
Get a list of specific instances
async listInstances(conditions = {}, client = undefined) { assert(typeof conditions === 'object'); return this._listTable('instances', conditions, client); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get instances() {\n return instances;\n }", "function getInstances(opts) {\n if (!opts) {\n opts = {};\n }\n if (!opts.version) {\n opts.version = utilities.getVersion();\n }\n return pulumi.runtime.invoke(\"aws:ssoadmin/getInstances:getInstances\", {}, opts);\n}", "func...
[ "0.7176341", "0.6612611", "0.6475695", "0.6403298", "0.63097835", "0.6234524", "0.60070777", "0.589277", "0.58878285", "0.5877593", "0.58305395", "0.58100176", "0.580907", "0.57461", "0.5741237", "0.571691", "0.56900114", "0.56862503", "0.5659957", "0.5656343", "0.559688", ...
0.6631093
1
Get a list of specific spot requests
async listSpotRequests(conditions = {}, client = undefined) { assert(typeof conditions === 'object'); return this._listTable('spotrequests', conditions, client); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async spotRequestsToPoll({region}, client) {\n let states = ['open'];\n let statuses = [\n 'pending-evaluation',\n 'pending-fulfillment',\n ];\n let result = await this.listSpotRequests({region, state: states, status: statuses}, client);\n // This is slightly inefficient because we're sele...
[ "0.6617548", "0.62114525", "0.61295164", "0.6116338", "0.5970392", "0.59181905", "0.5865054", "0.5822712", "0.57376057", "0.57215625", "0.5694521", "0.5683621", "0.56580615", "0.5653585", "0.5650902", "0.5643455", "0.56347674", "0.56232214", "0.56161404", "0.5591446", "0.5582...
0.6952614
0
Get a list of AMIs and their usage
async listAmiUsage(conditions = {}, client = undefined) { assert(typeof conditions === 'object'); return this._listTable('amiusage', conditions, client); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listApps() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.apps) {\n return this.apps;\n }\n const response = yield this.get(`${this.apiEndPoint}/WebObjects/iTunesConnect.woa/ra/apps/manageyourapps/summary/v2`);\n if (response.d...
[ "0.57408524", "0.55807364", "0.5313027", "0.52542984", "0.525368", "0.52395153", "0.52065945", "0.5160705", "0.51433027", "0.5117849", "0.5077894", "0.5067131", "0.50624675", "0.5055838", "0.5029006", "0.502757", "0.5019485", "0.5011633", "0.49987167", "0.49812484", "0.498115...
0.63486683
0
We want to be able to get a simple count of how many worker types there are in a given region. basically we want something which groups instances first by state (our domain's pending vs. running, not aws's states) and then gives a count for each instance type
async instanceCounts({workerType}, client) { assert(typeof workerType === 'string'); let shouldReleaseClient = false; if (!client) { shouldReleaseClient = true; client = await this._pgpool.connect(); } let counts = {pending: [], running: []}; await client.query('BEGIN'); try {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function workerTypeSummary(workerType, workerState) {\n let summary = {\n workerType: workerType.workerType,\n minCapacity: workerType.minCapacity,\n maxCapacity: workerType.maxCapacity,\n requestedCapacity: 0,\n pendingCapacity: 0,\n runningCapacity: 0,\n };\n\n if (!workerState) {\n retur...
[ "0.6350371", "0.61551046", "0.57781917", "0.56379527", "0.5492338", "0.5471334", "0.54226714", "0.53343016", "0.53175056", "0.52664006", "0.52330875", "0.52120703", "0.5209538", "0.51424015", "0.5141124", "0.5134528", "0.5063023", "0.50562674", "0.5051453", "0.504833", "0.503...
0.73307574
0
We want to be able to get a list of those spot requests which need to be checked. This is done per region only because the list doesn't really make sense to be panec2. Basically, this is a list of spot requests which we're going to check in on.
async spotRequestsToPoll({region}, client) { let states = ['open']; let statuses = [ 'pending-evaluation', 'pending-fulfillment', ]; let result = await this.listSpotRequests({region, state: states, status: statuses}, client); // This is slightly inefficient because we're selecting * from...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findRequestAll(qParams) {\n return this.request.get('requests', qParams);\n }", "async listSpotRequests(conditions = {}, client = undefined) {\n assert(typeof conditions === 'object');\n return this._listTable('spotrequests', conditions, client);\n }", "getListVerificationRequest(qParams) {\n ret...
[ "0.5964934", "0.5949816", "0.5517706", "0.54858047", "0.546569", "0.5451746", "0.53492904", "0.5195389", "0.5153052", "0.5138574", "0.513363", "0.51266366", "0.51227474", "0.512189", "0.50922203", "0.507049", "0.5028692", "0.50230354", "0.49962336", "0.49713764", "0.49402854"...
0.64268035
0
List all the instance ids and request ids by region so that we can kill them
async listIdsOfWorkerType({workerType}, client) { let shouldReleaseClient = false; if (!client) { shouldReleaseClient = true; client = await this._pgpool.connect(); } await client.query('BEGIN'); try { let instances = await this.listInstances({workertype: workerType}, client); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static regions() {\n return new NS1Request('get', `/monitoring/regions`)\n }", "static getAllRegionsById(region_id) {\n const url = `${API_URL}/region/${region_id}`\n return axios.get(url)\n }", "static getAllRegions() {\n const url = `${API_URL}/region/`\n return axios.get(u...
[ "0.5662139", "0.561881", "0.5607834", "0.55238116", "0.5275274", "0.525183", "0.52203476", "0.51400083", "0.51348823", "0.5103607", "0.50560874", "0.5029344", "0.50045204", "0.49376896", "0.49333933", "0.49242362", "0.4919711", "0.49106807", "0.48895788", "0.4882768", "0.4878...
0.5545018
3
This method runs any of the regular cleanup we need. This includes doing 1. All instances which have an SRID which is a valid SRID in the spotrequests table should result in marking the SR as fulfilled This is taken care of by using transactions to delete the SRID if it's there when we create an instance 2. All instanc...
async cleanup() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function cleanup() {\n const stacksToDelete = await deleteableStacks(exports.STACK_NAME_PREFIX);\n // Bootstrap stacks have buckets that need to be cleaned\n const bucketNames = stacksToDelete.map(stack => aws_helpers_1.outputFromStack('BucketName', stack)).filter(defined);\n await Promise.all(bu...
[ "0.6119973", "0.58657867", "0.5852285", "0.58109814", "0.5691083", "0.5683216", "0.56473166", "0.5519347", "0.5517954", "0.5396529", "0.5367889", "0.5367248", "0.53642136", "0.53624076", "0.5357033", "0.5342623", "0.53291374", "0.52143097", "0.51921993", "0.51918477", "0.5182...
0.0
-1
KATA 2 MULTIPLY FUNCTION
function multiply(x, y) { let product = 0 for(let counter = 0; counter < y; counter++){ product = add(product, x) // product + x //product initiates '0' from the start //When the code executes, the product reassigns to 6 //The next run, the products assigns 12 and so on ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mul2(first, second) {\n return _pushOperation(\"mul2\", [first, second]);\n}", "function multiplizieren(a,b) {\r\n return a * b;\r\n}", "function multiplizieren(a,b) {\n return a * b;\n}", "function sc_multi() {\n var product = 1;\n for (var i = 0; i < arguments.length; i++)\n\tproduct ...
[ "0.7002958", "0.6737845", "0.66982806", "0.66805404", "0.6636067", "0.6573242", "0.6548616", "0.6486926", "0.6452383", "0.6423926", "0.6422989", "0.64204717", "0.64009887", "0.63913214", "0.63913214", "0.6359604", "0.6353996", "0.63500386", "0.6343975", "0.634247", "0.6318136...
0.0
-1
KATA 3 POWER FUNCTION
function power(x, n) { let pwr = 1 for(let counter = 0; counter < n; counter++) { pwr = multiply(pwr, multiply(x, 1)) //Same as Kata 2, the first run of code executes 2*2 //Code keeps running until the answer is 256! } return pwr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function power3(){\n\tcurrent = Math.pow(eval(current), 3);\n\tdocument.getElementById('screen').value = current;\n}", "static get POWER() { return { LOW: 10, MEDIUM: 50, HIGH: 90 }; }", "function transmogrifier(num1,num2,num3){\n\n var totalfirstsecond = num1 * num2;\n\n var power = Math.pow(totalfirstsecon...
[ "0.7000223", "0.6990324", "0.6495863", "0.62797743", "0.6192832", "0.6160521", "0.6156838", "0.6137197", "0.6136467", "0.6063856", "0.5924071", "0.5832998", "0.5825371", "0.57948446", "0.57627165", "0.5760078", "0.57512647", "0.57394236", "0.5732645", "0.5728454", "0.57236344...
0.5727991
20
KATA 4 FACTORIAL FUNCTION
function factorial(n) { let fact = n for(let counter = 1; counter < n; counter++) { fact = multiply(fact, multiply(counter, 1)) //The first run of code MUST make the factorial answer '20'! } return fact }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fyv(){\n \n }", "function name_phase(elongazione,LG){\n\n // nome delle fasi lunari.\n // elongazione della Luna. \n // LG=lingua \"ITA\" , \"ENG\"\n // Salvatore Ruiu Gennaio 2012.\n\n var elong=elongazione+360;\n var nome_fase=\"*\";\n\nif (elong>360) {elong=elong-360; ...
[ "0.63226044", "0.6266248", "0.6212108", "0.6195215", "0.6144432", "0.61111057", "0.6088637", "0.6085957", "0.60679775", "0.60233563", "0.6011958", "0.6008214", "0.5931963", "0.591924", "0.58955306", "0.5878664", "0.5878472", "0.58617103", "0.585154", "0.5829785", "0.58269054"...
0.0
-1
KATA BONUS FIBONACCI FUNCTION
function fibonacci(n) { let num1 = 0; let num2 = 1; let total = num2; for (counter = 0; counter < n; counter ++) { total = add(total, add(num2, 1)) } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hitungFVA() {\n\t\tvar MASKBr = document.getElementById(\"fva1\").value;\n\t\tvar MASKBi = document.getElementById(\"fva2\").value;\n\t\tvar MASKBn = document.getElementById(\"fva3\").value;\n\n\t\tvar Br = MASKBr.split(',').join('');\n\t\tvar Bi = MASKBi.split(',').join('');\n\t\tvar Bn = MASKBn.split(',...
[ "0.63076806", "0.62235796", "0.61316293", "0.61292356", "0.59941363", "0.59563285", "0.59559965", "0.5909329", "0.58940625", "0.5877482", "0.5871923", "0.5863269", "0.58612937", "0.58550084", "0.5836041", "0.5836041", "0.5836041", "0.5809717", "0.5784051", "0.5782931", "0.577...
0.0
-1
When the compile button is pressed
function compileCode() { // Disables the compile button disableCompileButton(); // Get the classes from the editor let classes = []; editor.getClasses().forEach(element => { classes.push({ name: element.name, code: element.doc.getValue() }); }); resultsComponent.componentWillReceiv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileClicked() {\r\n\t\tvar enabledSections = {};\r\n\t\t$('.secCheck').each(function(cb) {\r\n\t\t\tif (cb.checked)\r\n\t\t\t\tenabledSections[cb.id.substr(4)] = 1;\r\n\t\t});\r\n\t\t\r\n\t\tvar src = compile(s.sections, s.sectionMap, enabledSections);\r\n\t\tvar header = serializeEnabledSections(s.sec...
[ "0.70232964", "0.6740939", "0.6704253", "0.6608953", "0.66001046", "0.65864563", "0.64945686", "0.6364402", "0.61785126", "0.611636", "0.6030802", "0.5958405", "0.59089804", "0.59032416", "0.5893801", "0.58845496", "0.58687633", "0.58536935", "0.5809295", "0.5805369", "0.5762...
0.6777749
1
Called when compilation has started. Hide compile button
function disableCompileButton() { if (compileButton === undefined) { compileButton = document.getElementById("compile-button"); } compileButton.className += " pure-button-disabled"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileClicked() {\r\n\t\tvar enabledSections = {};\r\n\t\t$('.secCheck').each(function(cb) {\r\n\t\t\tif (cb.checked)\r\n\t\t\t\tenabledSections[cb.id.substr(4)] = 1;\r\n\t\t});\r\n\t\t\r\n\t\tvar src = compile(s.sections, s.sectionMap, enabledSections);\r\n\t\tvar header = serializeEnabledSections(s.sec...
[ "0.63426846", "0.62148297", "0.6128531", "0.6101382", "0.60574347", "0.6054912", "0.5967753", "0.5967753", "0.5967753", "0.5967753", "0.5967753", "0.5831672", "0.58079624", "0.57944536", "0.5792883", "0.5789122", "0.5782397", "0.5728342", "0.56887513", "0.56643784", "0.566061...
0.6774588
0
Called when compilation is done. Show compile button
function enableCompileButton() { compileButton.className = compileButton.className.replace( /(?:^|\s)pure-button-disabled(?!\S)/g, "" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileClicked() {\r\n\t\tvar enabledSections = {};\r\n\t\t$('.secCheck').each(function(cb) {\r\n\t\t\tif (cb.checked)\r\n\t\t\t\tenabledSections[cb.id.substr(4)] = 1;\r\n\t\t});\r\n\t\t\r\n\t\tvar src = compile(s.sections, s.sectionMap, enabledSections);\r\n\t\tvar header = serializeEnabledSections(s.sec...
[ "0.72119415", "0.6420971", "0.6280209", "0.6166022", "0.6112023", "0.6087286", "0.6058038", "0.60554403", "0.6040169", "0.59703434", "0.59668684", "0.57410735", "0.5736891", "0.5720143", "0.5644855", "0.5639966", "0.55922145", "0.556919", "0.5546482", "0.5532011", "0.55180174...
0.50890577
54
Lecture: Functions returning functions (ref:line:224)
function interviewQuestion(job){ if (job === 'designer'){ return function(name){ console.log(`${name}, can you please explain what UX design is?`); } } else if (job === 'teacher'){ return function(name){ console.log(`What subject do you teach, ${name}?`); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function question4() {\n question2('functions in functions');\n}", "function Func_s() {\n}", "function exercise11() {}", "function fuction() {\n\n}", "function miFuncion (){}", "function exercise07() {}", "function exercise06() {}", "function Addition(x){\r\n // it is return some reference no nam...
[ "0.7096603", "0.68282527", "0.6657988", "0.6485775", "0.6424028", "0.64062685", "0.6402441", "0.64010835", "0.6393258", "0.6380023", "0.6307822", "0.6298998", "0.6290901", "0.62851423", "0.6256812", "0.6247977", "0.62446404", "0.62171954", "0.62171954", "0.62171954", "0.62043...
0.0
-1
An IIFE is not to create a piece of reusable code, but for data privacy / Lecture: Closures (IMPORTANT!)
function retirement(retirementAge){ let a = ' years left until retirement.'; return function(yearOfBirth){ let age = 2016 - yearOfBirth; console.log((retirementAge - age) + a); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myIIFE() {\n (function () {\n console.log(\"Diese Funktion wird deklariert und direkt aufgerufen.\");\n console.log(\"Diese Funktion ist ein Ausdruck. Keine Deklaration.\");\n console.log(\"Ich werde nur ein mal aufgerufen. Mit mir kannst du Block Scopes emulieren.\...
[ "0.6823709", "0.66833866", "0.65250266", "0.65250015", "0.6499526", "0.6442854", "0.6356983", "0.63568634", "0.6263445", "0.62022656", "0.6169762", "0.6169762", "0.6167095", "0.6150025", "0.61331826", "0.6126088", "0.6126088", "0.6126088", "0.6125284", "0.61162615", "0.610001...
0.0
-1
CLOSURES SUMMARY: An inner function always has access to the variables and parameters of its outer function, even after the outer function has returned. / CLOSURES CHALLENGE: rewrite "interviewQuestion" function with closures (ref:line:160)
function interviewQuestionChallenge(job){ return function(name){ if (job === 'designer'){ console.log(`${name}, can you please explain what UX design is?`); } else if (job === 'teacher'){ console.log(`What subject do you teach, ${name}?`); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function question(){\n const fearLoved = `Would I rather be feared or loved?`;\n function answer(){\n const easyBoth = `Easy. Both. I want people to be afraid of how much they love me.`;\n console.log(fearLoved); // Okay, because the answer function is inside the scope of the question function which the fe...
[ "0.656751", "0.63506526", "0.63311225", "0.62846327", "0.6070759", "0.60445267", "0.6004853", "0.59616756", "0.589639", "0.58925", "0.58741647", "0.58718455", "0.587006", "0.5861736", "0.583332", "0.583164", "0.58252275", "0.58075386", "0.5778171", "0.57662827", "0.5765221", ...
0.58999634
8
BONUS | 10. Track the user's score. (Hint: Use the power of closures for this)
function userScore(){ let user_sc = 0; return function(answer){ if(answer){ user_sc++; } return user_sc; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raiseScore() {\r\n\tscore += 1;\r\n}", "function addToScore () {\n userScore++;\n}", "function trackScore() {\n if (totalScore === goalNum) {\n wins++;\n console.log(\"wins\");\n award();\n reset();\n\n\n }\n else if (totalScore > goa...
[ "0.76028347", "0.75893545", "0.74248886", "0.73703223", "0.7270499", "0.7243654", "0.71826446", "0.70968294", "0.70904464", "0.70793283", "0.7035105", "0.6989268", "0.6974817", "0.6947112", "0.6900619", "0.6897619", "0.68756807", "0.6853427", "0.6852497", "0.6852497", "0.6852...
0.71320045
7
Line:426 BONUS | 8. After you display the result, display the next random question
function nextQuestion(){ // 4. Select one random question let n = Math.floor(Math.random() * questions.length); questions[n].displayQuestion(); //Display the Questions // 5. Use the 'prompt' function to ask the user for the correct answer. let user_submit = prompt('Please ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQuestion() {\n indexFinder = Math.floor(Math.random() * questionArray.length);\n question.innerText = \"\";\n question.innerText = questionArray[indexFinder].q;\n currentCorrectAnswer = questionArray[indexFinder].correct;\n}", "function setNextQuestion() {\n showQuestion(shuffledQuestions[curr...
[ "0.781073", "0.7767938", "0.76338935", "0.76198083", "0.7613526", "0.76112926", "0.757125", "0.75369424", "0.75212574", "0.7506914", "0.7466344", "0.74294853", "0.7408483", "0.7395489", "0.73853016", "0.73659974", "0.7364832", "0.7352313", "0.7344083", "0.7333759", "0.7321992...
0.7063673
46
TODO: not yet any code to maintain list
get length(){return undefined;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findLists() {}", "list() {\n }", "function NewList() {\r\n}", "function Listify() {\r\n}", "[Symbol.iterator]() {\n this._update();\n return this._list[Symbol.iterator]();\n }", "getListName() {}", "function NCList() {\n}", "constructor() {\n this._list = [];\n }", "addDemoLi...
[ "0.6166113", "0.59953207", "0.58483934", "0.5843058", "0.58342725", "0.58215237", "0.5797619", "0.5756599", "0.57426584", "0.5738266", "0.5716371", "0.5716113", "0.5702039", "0.56847775", "0.5648615", "0.56315607", "0.56155944", "0.55742025", "0.55688024", "0.5548745", "0.554...
0.0
-1
Time related functions see timer.js clearTimeout clearInterval setTimeout setInterval / Events related functions see event.js addEventListener attachEvent detachEvent removeEventListener These functions are identical to the Element equivalents. / UIEvents related functions see uievent.js blur focus These functions are ...
function __extend__(a,b) { for ( var i in b ) { var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i); if ( g || s ) { if ( g ) a.__defineGetter__(i, g); if ( s ) a.__defineSetter__(i, s); } else a[i] = b[i]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extendEventObject() {\n\tEvent.prototype.__defineSetter__(\"returnValue\", function (b) {\n\t\tif (!b) this.preventDefault();\n\t\treturn b;\n\t});\n\t\n\tEvent.prototype.__defineSetter__(\"cancelBubble\", function (b) {\n\t\tif (b) this.stopPropagation();\n\t\treturn b;\n\t});\n\t\n\tEvent.prototype.__de...
[ "0.5584165", "0.5236317", "0.5140713", "0.5139213", "0.5139213", "0.5137312", "0.5093408", "0.5088256", "0.5085395", "0.50413084", "0.502104", "0.50125486", "0.49944335", "0.49796805", "0.49707183", "0.49595296", "0.49578398", "0.49562845", "0.4956107", "0.4956107", "0.495610...
0.49588257
17
from ariel flesler this might be a good utility function to provide in the env.core as in might be useful to the parser and other areas as well
function trim( str ){ return (str || "").replace( /^\s+|\s+$/g, "" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static parse(content: string): any {\n let parser = new Parser();\n parser.doParse(content);\n return parser.getEnv();\n }", "function genEnv() {\n\n\n}", "_generateParserConfig() {\n\t\treturn {\n\t\t\tdecodeEntities: true,\n\t\t\tignoreWhitespace: true,\n\t\t\tlowerCaseTags: true,\n\t\t\trecognizeS...
[ "0.5638346", "0.54354805", "0.5358289", "0.5099108", "0.5077155", "0.5057184", "0.5030525", "0.5019176", "0.4947922", "0.4917809", "0.4916819", "0.49111357", "0.48886415", "0.48864767", "0.4886446", "0.48549807", "0.48542914", "0.48456317", "0.48198733", "0.48078", "0.4799569...
0.0
-1
the name of this attribute
get name(){ return this.nodeName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNameAttribute() {\n return this.name\n }", "getName() {\n return this.getAttribute('name');\n }", "get name() {\n return this.getStringAttribute('name');\n }", "get name() {\n return this.getStringAttribute('name');\n }", "get name() {\n return this.getStringAttr...
[ "0.8005343", "0.76883316", "0.76388466", "0.76388466", "0.76388466", "0.76388466", "0.76388466", "0.7303969", "0.7302815", "0.7302815", "0.7302815", "0.7302815", "0.7302815", "0.7302815", "0.7302815", "0.7211674", "0.7211674", "0.7211674", "0.7211674", "0.7211674", "0.7211674...
0.0
-1
the value of the attribute is returned as a string
get value(){ return this.nodeValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get attributeString() {\n console.log(JSON.stringify(self.attributes))\n return JSON.stringify(self.attributes)\n }", "get value() {\n return this.getStringAttribute('value');\n }", "get value() {\n return this.getStringAttribute('value');\n }", "asString() {\n if (validat...
[ "0.8024798", "0.74448806", "0.74448806", "0.7220417", "0.71320343", "0.689014", "0.68774605", "0.68153274", "0.67566377", "0.67538077", "0.6613687", "0.65857023", "0.6578077", "0.651122", "0.6508113", "0.6489274", "0.64803356", "0.64803356", "0.64803356", "0.64803356", "0.642...
0.0
-1
The name of the element.
get tagName(){ return this.nodeName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getName(elem) {\n return elem.name;\n }", "get name() {\n return new ValueEmbedder(this.getAsElem(0).value, \"name\");\n }", "function getName(element){\n return element.attr('id').toString() /*retorna o nome do elemento*/\n }", "getName() {\n return this.getAt...
[ "0.80309683", "0.77418184", "0.7568145", "0.7509641", "0.7438201", "0.7425794", "0.74112403", "0.74112403", "0.74112403", "0.74112403", "0.74112403", "0.74112403", "0.74112403", "0.73879075", "0.7353406", "0.7249916", "0.7199992", "0.7187927", "0.7175049", "0.7059819", "0.705...
0.0
-1
Defined 'globally' to this scope. Remember everything is wrapped in a closure so this doesnt show up in the outer most global scope. process SAX events
function __parseLoop__(impl, doc, p, isWindowDocument) { var iEvt, iNode, iAttr, strName; var iNodeParent = doc; var el_close_count = 0; var entitiesList = new Array(); var textNodesList = new Array(); // if namespaceAware, add default namespace if (impl.namespaceAware) { var iNS ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processDataFromXML() {\n\treturn function($event) {\n\t\tparseXML($event.target.result);\n\t\ttoolSetting();\n\t}\n}", "function initialize_current_event_handler()\n {\n var docel = xmlDoc.documentElement;\n var schema = docel.selectSingleNode(\"schema\");\n if (!schema)\n schem...
[ "0.6596027", "0.60007995", "0.570313", "0.5676873", "0.56740016", "0.561605", "0.5587635", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0.55492353", "0....
0.56938565
4
set/get cookie see cookie.js
get domain(){ return this._domain||window.location.domain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_cookie(name, value) {\n document.cookie = name + '=' + value + '; Path=/;';\n}", "setCookie () {\n if (this.token && this.remember) {\n cookies.set('username', this.username);\n cookies.set('token', this.token);\n }\n }", "function setCookie(name,value,exp...
[ "0.751188", "0.73957664", "0.73694044", "0.7356436", "0.735315", "0.73507804", "0.7345585", "0.7345585", "0.733928", "0.7330071", "0.7327844", "0.7318303", "0.73150796", "0.7313569", "0.729938", "0.72660494", "0.72489583", "0.72476524", "0.7247426", "0.7242577", "0.7221396", ...
0.0
-1
Not in the specs but I'll leave it here for now.
get outerHTML(){ return this.xml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "static transient final private internal function m43() {}", "transient protect...
[ "0.6773039", "0.65932065", "0.6287849", "0.6166392", "0.60927224", "0.6087833", "0.6038993", "0.5916662", "0.59041715", "0.5881305", "0.58190686", "0.5773459", "0.57118547", "0.5674959", "0.56613094", "0.5643782", "0.56421006", "0.5577547", "0.556505", "0.5543905", "0.5543905...
0.0
-1
override the value setter in HTMLTypeValueInputs
set value(newValue) { var options = this.options, i, index; for (i=0; i<options.length; i++) { if (options[i].value == newValue) { index = i; break; } } if (index !== undefined) { this.setAttribute('value', n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onInputValueChange() {\n assert && assert( this.node.inputValue !== undefined, 'use null to remove input value attribute' );\n\n if ( this.node.inputValue === null ) {\n this.removeAttributeFromElement( 'value' );\n }\n else {\n\n // type conversion for DOM spec\n const valueString = `${...
[ "0.7368193", "0.7229178", "0.70532954", "0.70293254", "0.6981118", "0.6949845", "0.6937147", "0.68665874", "0.6802787", "0.6771541", "0.67689365", "0.66960573", "0.66953707", "0.6654684", "0.66480255", "0.66263163", "0.6599154", "0.65991527", "0.65834814", "0.65808344", "0.65...
0.0
-1
ch gets or sets the alignment character for cells in a column.
set chOff(chOff) { this.setAttribute("chOff", chOff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alignedCell(row,col,alignDirection){\n let cell = \"\";\n switch (alignDirection) {\n case RIGHT:\n cell = alignRight(row * col,COLUMN_WIDTH);\n break;\n case LEFT:\n cell = alignLeft(row * col,COLUMN_WIDTH);\n break;\n case CENTER:\n ...
[ "0.6685545", "0.5810305", "0.55688584", "0.54815316", "0.54044825", "0.5380183", "0.53656733", "0.5293489", "0.52915466", "0.5288954", "0.5280361", "0.52511054", "0.52463573", "0.52353585", "0.5200177", "0.5187848", "0.5171124", "0.51635265", "0.5138506", "0.51172704", "0.511...
0.0
-1
align gets or sets the horizontal alignment of data within cells of the row.
get align() { return this.getAttribute("align"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set alignment(value) {}", "function cell (alignment) {\n var attributes = attribs\n if (alignment) {\n attributes.style = 'text-align:' + alignment\n } else {\n delete attributes.style\n }\n return {\n tagName: tagName,\n attribs: attributes\n }\n }", "function alignedCel...
[ "0.68070894", "0.65171766", "0.6483708", "0.62317884", "0.6055071", "0.5972147", "0.5960549", "0.58996314", "0.57666534", "0.5720174", "0.5678081", "0.5663554", "0.5619575", "0.559719", "0.55383927", "0.54974884", "0.54278785", "0.5419452", "0.5419368", "0.5407322", "0.539380...
0.60899496
5
ch gets or sets the alignment character for cells in a column.
set chOff(chOff) { this.setAttribute("chOff", chOff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alignedCell(row,col,alignDirection){\n let cell = \"\";\n switch (alignDirection) {\n case RIGHT:\n cell = alignRight(row * col,COLUMN_WIDTH);\n break;\n case LEFT:\n cell = alignLeft(row * col,COLUMN_WIDTH);\n break;\n case CENTER:\n ...
[ "0.6685986", "0.58110577", "0.55696166", "0.54836416", "0.54037863", "0.5379467", "0.5366099", "0.5292409", "0.52904814", "0.5288495", "0.5280172", "0.52506906", "0.52445894", "0.5235586", "0.51991177", "0.51882964", "0.51710963", "0.516397", "0.51374185", "0.5115352", "0.511...
0.0
-1
IE may be deprecated
get href(){return $href;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mg_is_old_IE() {\r\n\t\tif( navigator.appVersion.indexOf(\"MSIE 8.\") != -1 ) {return true;}\r\n\t\telse {return false;}\r\n\t}", "function compIE(){\r\n\tvar agent = navigator.userAgent;\r\n\tif(agent.indexOf(\"MSIE 7.0\") > -1 || agent.indexOf(\"MSIE 8.0\") > - 1 || agent.indexOf(\"Trident 4.0\") > -1...
[ "0.6770021", "0.6670207", "0.66466844", "0.66466844", "0.6641298", "0.6619446", "0.65740675", "0.65689975", "0.65407133", "0.65300685", "0.65300685", "0.6448804", "0.6439604", "0.6366634", "0.63108444", "0.630013", "0.627662", "0.62718433", "0.6250262", "0.62447387", "0.62435...
0.0
-1
below is possible because bank.js module's function was given a parameter, instead of simply leaving it blank.
function store(price) { wallet.setPrice(price); console.log('the new price is ' + price); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ba(){}", "function ba(){}", "function ba(){}", "function ba(){}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "withdraw(param,callback){\n const api_data = {\n api_name:'/withdraw',\n coin:this.coin,\n api_key: this.apikey,\n ...
[ "0.60743743", "0.60743743", "0.60743743", "0.60743743", "0.59336996", "0.59336996", "0.59336996", "0.5908651", "0.5708114", "0.5708114", "0.5708114", "0.57019156", "0.5616233", "0.5612127", "0.5612127", "0.56017387", "0.5539019", "0.55108106", "0.5503916", "0.5498499", "0.548...
0.0
-1
or write setInterval only autotrade feature start.
function autoBuySell(price) { if (price <= 44.6) { wallet.buy(); cashFlow(); } else if ( price >= 61.5) { wallet.sell(); cashFlow(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startInterval() {\n setInterval(collectAutoUpgrades, 1000);\n}", "startTicker() {\n this._intervalRef = window.setInterval(this.tick, this._config.frequency || 1000);\n }", "function startInterval() {\n let collectionInterval = setInterval(calcAutoUpgrade, 3000);\n\n}", "function startInte...
[ "0.71187675", "0.69063", "0.68524575", "0.66156095", "0.65354353", "0.6533678", "0.64589393", "0.6427548", "0.6418345", "0.6415326", "0.6348241", "0.63094187", "0.62594455", "0.6244381", "0.62247986", "0.61667633", "0.6083439", "0.6079511", "0.60678965", "0.60588545", "0.6028...
0.0
-1
Generic implementation of `replicateM` in terms of `bind_RIO`.
function replicateM_RIO(n, x) { if(n == 0) { return function() {}; } else { return bind_RIO(x, function(_) { return replicateM_RIO(n-1, x); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _repeat(operation, num) {\n if (num>=1) {\n operation();\n return _repeat.bind(null, operation, num-1);\n }\n }", "function replicatePackages() {\n console.error('replicate packages (around 1/256th of the registry)')\n new Replicator({\n from: 'http://couch.ctx.io/registry',\n t...
[ "0.507901", "0.49586344", "0.47104725", "0.46229145", "0.46133462", "0.4612739", "0.4465881", "0.44618332", "0.4396904", "0.4361468", "0.43586358", "0.43490568", "0.43405375", "0.43288893", "0.43210673", "0.43201774", "0.43007728", "0.4297134", "0.42969877", "0.42969877", "0....
0.73183703
0
populate post in redux store with object received from api
async componentDidMount() { try { const { post, id } = this.props; if(!post){ await this.props.getPostDetailFromApi(id); } // if post id doesnt exist => wrongPage = true if (this.props.post === '') { this.setState({ isLoading: false, wrongPage: true }); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async store ({ params, request }) {\n const property = await Property.findOrFail(params.id)\n const data = request.only([\n 'title',\n 'coment'\n ])\n\n const post = await Post.create({ ...data, property_id: property })\n\n return post\n }", "async cpSingle({state, commit, dispatch}, sl...
[ "0.6622812", "0.60216844", "0.6018838", "0.59680563", "0.59576887", "0.59377056", "0.5930183", "0.5774665", "0.5754737", "0.5754496", "0.57456243", "0.5743333", "0.57223547", "0.5713552", "0.5713344", "0.56964725", "0.56844527", "0.5604301", "0.56019026", "0.5592828", "0.5589...
0.0
-1
delete post from backend and redux store redirect to homepage
async handleDelete() { await this.props.deletePostFromApi(this.props.post.id); this.props.history.push('/'); this.props.deletePostFromSeen(this.props.post.id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handlePostDelete() {\n dispatch(deletePostWithApi(postId));\n history.push(\"/\");\n }", "deletePost(){\n\t\tconst { id } = this.props.currentPost;\n\n\t\tthis.props.deletePost(id).then(()=>{\n\t\t\tthis.setState({redirect: true});\n\t\t});\n\t}", "handleDelete() {\n let id = this.props.matc...
[ "0.818686", "0.8123633", "0.7847742", "0.7580748", "0.75066334", "0.7398333", "0.7391444", "0.7119433", "0.7098707", "0.7091336", "0.7061839", "0.70151544", "0.6819912", "0.6792488", "0.67746663", "0.6742089", "0.6710706", "0.66694814", "0.6660188", "0.6658597", "0.66540056",...
0.7621828
3