query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
checks whether callback offsets always trigger
function _cbOffsets() { return [o.callbacks.alwaysTriggerOffsets || contentPos >= limit[0] + tso, o.callbacks.alwaysTriggerOffsets || contentPos <= -tsbo]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _cbOffsets(){\n\t\t\t\treturn [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo];\n\t\t\t}", "function _cbOffsets(){\n\t\t\t\treturn [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || content...
[ "0.730318", "0.730318", "0.730318", "0.730318", "0.730318", "0.730318", "0.72847867", "0.72847867", "0.72847867", "0.72847867", "0.72295904", "0.7215775", "0.7143817", "0.6180903", "0.6092995", "0.5875565", "0.58546376", "0.584878", "0.5817316", "0.57878184", "0.5720075", "...
0.7478563
0
Remove day on click btn with text 'Remove'
function removeDay(element) { var day = $(element).closest('.day-block'); var day_id = day.data('id'); if (day_id) { $('input[name="RemoveStrengthDay[' + day_id + ']"]').attr('checked', true); } day.slideUp('fast', function () { $(this).remove(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteTimeElement(button)\n{\n $(button).parent().remove();\n}", "function removeButton(){\n $(\"#car-view\").empty();\n var topic = $(this).attr('data-name');\n var itemindex = topics.indexOf(topic);\n if (itemindex > -1) {\n topics.splice(itemindex, 1);\n renderBut...
[ "0.69473785", "0.6450859", "0.64304715", "0.6430371", "0.6369098", "0.6258421", "0.6217348", "0.61816657", "0.61776096", "0.6172211", "0.61021644", "0.60399526", "0.6013124", "0.60113245", "0.60110253", "0.59609985", "0.59453386", "0.5915439", "0.5890092", "0.5876187", "0.586...
0.6808138
1
Paste exercise to table on click btn 'Add Exercise'
function pasteToTable() { var _selectedValue = $('select#exercise_name').val(); var _exercisesData = $.parseJSON($('select#exercise_name').attr('data-exercises')); var _single = getSingleExercise(_selectedValue, _exercisesData); var exercise_template = $('#exercise-template').html()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createExercise(table, exercise){\r\n const newExerciseRow = table.insertRow(-1);\r\n const sets = newExerciseRow.insertCell(0);\r\n sets.appendChild(newText(exercise.sets + \" Sets\"));\r\n\r\n const reps = newExerciseRow.insertCell(1);\r\n reps.appendChild(newText(exercise.reps + \" Reps\"...
[ "0.7449798", "0.67766887", "0.63862103", "0.62218744", "0.6210242", "0.62057024", "0.62019664", "0.6143841", "0.6105447", "0.6068292", "0.6055893", "0.6030779", "0.6019339", "0.6018997", "0.59801465", "0.5967371", "0.5935607", "0.58435243", "0.5836388", "0.5830441", "0.582447...
0.8089063
0
Turn object with citation data into an mla, apa, or etc citation string
function formatCitationData(citationData) { const getField = field => (citationData[field] || '').trim() // safe access which wont return undefined const dateInfo = new Date().toDateString().split(' ') switch (getField('format') || 'MLA') { default: return `${getField('Authors')}.` + ` "${...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatBib(bib){\n // Grab only the string (strip outer divs)\n let bibString = bib.match(\"csl-entry\\\">(.+)</div>\")[1];\n // Use a textarea element to decode HTML\n let formatter = document.createElement(\"textarea\");\n formatter.innerHTML = bibString;\n ...
[ "0.62903476", "0.5710109", "0.5565532", "0.555865", "0.54675627", "0.5373372", "0.52881753", "0.52486134", "0.5244982", "0.5230014", "0.5224772", "0.5199984", "0.5178904", "0.5137136", "0.5107298", "0.507488", "0.5058079", "0.5051437", "0.50470215", "0.5039665", "0.49636212",...
0.64432186
0
Return if A is an ancestor of B.
function isAncestor(instA, instB) { while (instB) { if (instA === instB || instA === instB.alternate) { return true; } instB = getParent(instB); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAncestor(instA, instB) {\n for (;instB; ) {\n if (instA === instB || instA === instB.alternate) return !0;\n instB = getParent(instB);\n }\n return !1;\n}", "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(fa...
[ "0.7750915", "0.76587915", "0.76587915", "0.76587915", "0.7651243", "0.7651243", "0.7651243", "0.7619279", "0.7558237", "0.75575995", "0.7540301", "0.75398135", "0.75398135", "0.75398135", "0.75398135", "0.75398135", "0.75398135", "0.75398135", "0.75355095", "0.75355095", "0....
0.7910443
0
Test filter; removes all translations with a code comment that does not include the string '/frontend/'
function testFilter(gt, locale, callback) { const clientSideSource = '/frontend/'; const domain = 'messages'; const { translations } = gt.catalogs[locale][domain]; gt.setLocale(locale); // Needed for when getComment is called Object.keys(translations).forEach((ctxt) => { Object.keys(translations[ctxt]).f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripComments(code) {\n const re = /\\/\\/.*|\\/\\*[^]*\\*\\//g;\n const re1 = /\\/\\/.*|\\/\\*[^]*?\\*\\//g;\n\n return `${code.replace(re, \"\")} -vs- ${code.replace(re1, \"\")}`;\n}", "function _filter(gt, domain, callback) {\n\tvar clientSideSource = '/frontend/';\n\tvar err;\n\n\tgt.listKeys(dom...
[ "0.6156352", "0.5912785", "0.57018584", "0.56375957", "0.5543733", "0.5521595", "0.5501538", "0.54969233", "0.54779184", "0.5454044", "0.5436197", "0.53829247", "0.5375493", "0.52425665", "0.52425665", "0.52425665", "0.5240232", "0.52365357", "0.52248293", "0.52222145", "0.51...
0.69551337
0
Returns a function to distribute an operation to a connection.
getDistributor(name) { const self = this return function() { const connection = self.pickRandomConnection(); const commandFunction = connection[name]; if (!commandFunction) { self.log.error('Connection missing the %s function', name); return; } const result = commandFunction.apply(connecti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDistributor(name)\n\t{\n\t\treturn function()\n\t\t{\n\t\t\tvar connection = pickRandomConnection();\n\t\t\tvar commandFunction = connection[name];\n\t\t\tif (!commandFunction)\n\t\t\t{\n\t\t\t\tlog.error('Connection missing the %s function', name);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcommandFunction.appl...
[ "0.6125666", "0.55050635", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54969466", "0.54771125",...
0.5993545
1
Test get, set and delete.
function testGetSetDelete(callback) { const key = 'test#' + token.create(); const value = { a: 'b', }; runTest(11235, function(client, rest) { client.set(key, value, 10, function(error, result) { testing.check(error, 'Could not set value', callback); testing.assertEquals(result, true, 'Invalid set resu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testGetSetDelete(callback)\n{\n\tvar key = 'test#' + token.create();\n\tvar value = {\n\t\ta: 'b',\n\t};\n\trunTest(11235, function(client, rest)\n\t{\n\t\tclient.set(key, value, 10, function(error, result)\n\t\t{\n\t\t\ttesting.check(error, 'Could not set value', callback);\n\t\t\ttesting.assertEquals(re...
[ "0.6831955", "0.6280865", "0.5975705", "0.5884937", "0.5687114", "0.55726045", "0.5560109", "0.55230254", "0.5517808", "0.54490036", "0.5375059", "0.5238162", "0.5173551", "0.51709324", "0.5170684", "0.5166522", "0.5165792", "0.5127789", "0.5093052", "0.5082233", "0.5079955",...
0.6805191
1
Test append and prepend.
function testAppendPrepend(callback) { const key = 'test#' + token.create(); const value = { a: 'b', }; runTest(11245, function(client, rest) { client.set(key, value, 10, function(error, result) { testing.check(error, 'Could not set value', callback); testing.assertEquals(result, true, 'Invalid set res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testAppendPrepend(callback)\n{\n\tvar key = 'test#' + token.create();\n\tvar value = {\n\t\ta: 'b',\n\t};\n\trunTest(11245, function(client, rest)\n\t{\n\t\tclient.set(key, value, 10, function(error, result)\n\t\t{\n\t\t\ttesting.check(error, 'Could not set value', callback);\n\t\t\ttesting.assertEquals(r...
[ "0.6713674", "0.6395994", "0.5946503", "0.5911291", "0.5860782", "0.57951295", "0.57951295", "0.57556915", "0.57140976", "0.56408566", "0.5617475", "0.56064993", "0.55175304", "0.5421188", "0.542033", "0.5417862", "0.54015267", "0.5396381", "0.538798", "0.536612", "0.53381723...
0.6718918
0
Run a test against a local server. Params: port: to open for the server. test: function(client, rest) to call after the test has run.
function runTest(port, test, callback) { const options = { port: port, }; const location = 'localhost:' + options.port; const server = create() server.start(options, function(error) { testing.check(error, 'Could not start server', callback); const client = new Client(location, options, function(error) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runTest(port, test, callback)\n{\n\tvar options = {\n\t\tport: port,\n\t};\n\tvar location = 'localhost:' + options.port;\n\tserver.start(options, function(error, nodecached)\n\t{\n\t\ttesting.check(error, 'Could not start server', callback);\n\t\tvar client = new exports.Client(location, options, functio...
[ "0.83235085", "0.68263257", "0.65911865", "0.6495825", "0.6338434", "0.60934496", "0.6088798", "0.6054285", "0.5968391", "0.592667", "0.59247977", "0.5921549", "0.59045994", "0.5833114", "0.5826106", "0.58010924", "0.5765558", "0.5759045", "0.57300776", "0.56937003", "0.56649...
0.8248508
1
Shuffle cards by randomly rearanging the values within the array!
function shuffleCards() { var curr_index = cards.length, temp_value, rand_index; while (0 !== curr_index){ // Pick random value rand_index = Math.floor(Math.random() * curr_index); curr_index--; // Swap the randomly picked value with the current one temp_value = cards[curr_index]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shuffleCards(a) {\n for(let i=a.length-1;i>0;i--){\n const j = Math.floor(Math.random() * (i + 1));\n [a[i], a[j]] = [a[j], a[i]];\n }\n }", "shuffleCards() {\n for (var i = cards.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i ...
[ "0.832496", "0.8229721", "0.81806433", "0.8146582", "0.81314445", "0.81226134", "0.81102014", "0.8109084", "0.809546", "0.80843014", "0.8072171", "0.8048146", "0.7990943", "0.7974631", "0.7973966", "0.79616874", "0.7956117", "0.79113984", "0.78884965", "0.78884965", "0.787472...
0.8340714
0
Start game (shuffle cards, start timer)
function gameStart(){ shuffleCards(); time = 0; starttime = Date.now(); timer = setInterval(function(){ time++; $(".info .timer .sec").text(time); }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startGame() {\n this.cardToCheck = null;\n this.totalClicks = 0;\n this.timeRemaining = this.totalTime;\n this.matchedCards = [];\n this.busy = true;\n this.playBackgroundMusic();\n setTimeout(() => {\n this.shuffleCards(this.cardArray);\n this...
[ "0.8224271", "0.81628287", "0.8147931", "0.8049259", "0.7993353", "0.7982525", "0.781514", "0.7746694", "0.76542455", "0.75671726", "0.75198627", "0.749235", "0.74560636", "0.74259335", "0.7414064", "0.7394926", "0.7366381", "0.73514086", "0.7341193", "0.73218673", "0.7306443...
0.82606125
0
Show action text (zooming in and fading out on top of gameboard)
function showAction(text){ $(".actiontext").html(text).show().animate({ "font-size" : "700%", "opacity" : 0 }, 1300, function(){ $(".actiontext").hide().css({ "font-size" : "100%", "opacity" : 1 }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gameStart() {//game start, hide texts\n}", "function textOnScreen() {\n createP('Refresh The Page To Reset');\n createP('Press W to Remove Obstacles');\n createP('Press Q To Increase Number of Obstacles');\n }", "show() {\n // applyTextTheme\n image(this.image, this.x, this.y, ...
[ "0.64194655", "0.63571304", "0.6346524", "0.63347495", "0.6291224", "0.6109682", "0.60879356", "0.6074451", "0.60645765", "0.6014145", "0.60138506", "0.5989967", "0.5967185", "0.59573054", "0.59562397", "0.59509176", "0.59432954", "0.5931892", "0.59273833", "0.59218234", "0.5...
0.74554455
0
AJAX interface Get current high scores from database and write them in list
function getHighscores(){ $.ajax({ "url" : "ajax/get_highscore.php", "dataType" : "json" }).done(function(content){ $(".highscore ul.scores").empty(); for(i=0; i<content.length; i++){ var name = content[i].name; if(name.length > settings.cutname){ name = "<span title='" + name + "'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_high_scores(num_scores, new_name, new_score){\r\n $.ajax({\r\n type: \"POST\",\r\n url: \"backend/scores.php\",\r\n data: {\r\n // pass values (format = paramName: value)\r\n num_scores: num_scores,\r\n name : new_name,\r\n score: new_score\r\n },\r\n dataType: \"te...
[ "0.7521679", "0.71944684", "0.7175322", "0.7093306", "0.6982425", "0.6900604", "0.6842611", "0.68364286", "0.6833493", "0.67999226", "0.67824864", "0.6778641", "0.6768281", "0.6767334", "0.6757907", "0.67146736", "0.6706733", "0.6704518", "0.6704018", "0.66927385", "0.6676907...
0.7793931
0
Hide popup div(s) and background
function hidePopup(){ $("#popup-background").fadeOut(500); $(".popup").fadeOut(500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function div_hide(){\ndocument.getElementById('popupContact').style.display = \"none\";\ndocument.getElementById(\"background\").style.opacity = \"1\";\n}", "function hidePopup() {\r\n if ($('#fxPopupContainer')) {\r\n $('#fxPopupContainer').style.display = 'none';\r\n $('#fxShadow')...
[ "0.76333517", "0.7514084", "0.7402597", "0.7322258", "0.7314484", "0.7298675", "0.7285294", "0.7266072", "0.7235079", "0.7234179", "0.7227058", "0.71534896", "0.71534896", "0.71534896", "0.7149479", "0.71385354", "0.7133803", "0.7093051", "0.70464057", "0.69917065", "0.695036...
0.7719136
0
hook any and all ticket forms on the page
function hook_ticket_forms() { $('div.section#ticketSection form').each(function(index, item) { // hook in our ajax form plugin $(item).ajaxForm({ success: ticket_save_success, error: ticket_save_error, }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addHooksToAf() {\n _(that.pageMap).pluck('form').forEach(function(formId) {\n if (formId) {\n AutoForm.addHooks(formId, that.autoFormHooks(), true);\n }\n }\n )\n }", "function leadActivityForms() {\n $('form').submit(function anonFormActivity() {\n ...
[ "0.6576349", "0.59842205", "0.59770626", "0.5969781", "0.5961603", "0.5951325", "0.5872155", "0.5817431", "0.5814992", "0.58085793", "0.5699797", "0.56860536", "0.56070966", "0.55815697", "0.54844344", "0.54476917", "0.54401267", "0.54351485", "0.54344016", "0.5425938", "0.53...
0.81009537
0
ARRAY EXECUTE FUNCTION executes a function that belongs to objects in array
function arrExecute(arr, foo){ for (var k in arr){ arr[k][foo](); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeForEach(array, func) {\r\n for (let i = 0; i < array.length; i++) {\r\n func(array[i]);\r\n }\r\n return array;\r\n}", "function executeForEach(arr, func) {\n for (let i = 0; i < arr.length; i++) {\n func(arr[i]);\n }\n}", "function executeforEach(arr, func) {\n arr.forE...
[ "0.74082756", "0.70290095", "0.68910867", "0.6756397", "0.6680185", "0.6641564", "0.6540521", "0.64750075", "0.64183265", "0.6371048", "0.6265929", "0.6237873", "0.61882114", "0.61834604", "0.61741674", "0.6173811", "0.6171317", "0.6165739", "0.61501884", "0.613365", "0.61153...
0.7392278
1
ARRAY CALL FUNCTION calls a function on all objects in array, accepts up to 3 arguments
function arrCall(arr, foo, arg1=null, arg2=null, arg3=null, arg4=null){ for (var k in arr){ foo.call(arr[k], arg1, arg2, arg3, arg4); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeForEach(array, func) {\r\n for (let i = 0; i < array.length; i++) {\r\n func(array[i]);\r\n }\r\n return array;\r\n}", "function arrExecute(arr, foo){\n\tfor (var k in arr){\n\t\tarr[k][foo]();\n\t}\n}", "function myForEach(arr, func) {\n // loop thorought the array\n for ...
[ "0.7027808", "0.6953224", "0.6819092", "0.67344624", "0.66610205", "0.6582929", "0.6580207", "0.6556437", "0.6530486", "0.6500814", "0.6472688", "0.64714974", "0.64680153", "0.6423569", "0.63833976", "0.63639504", "0.63593787", "0.63568765", "0.63489807", "0.63489807", "0.634...
0.77882993
0
RUN FUNCTION FOR ALL GRID VALUES
function gridForAll(grid, foo){ for (var r=0; r<grid.length; r++){ for (var c=0; c<grid[0].length; c++){ foo(r, c, grid); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "all(callback){\n\t\tfor (let i = 0 ; i < this.GRID_DOM.length; i++) {\n\t\t\tfor (let j = 0 ; j < this.GRID_DOM[i].length; j++) {\n\t\t\t\tcallback(this.GRID_DOM[i][j])\n\t\t\t}\n\t\t}\n\t}", "function foreachCell(f) {\n for (var i = 0; i < GRID_H; i++) {\n\tfor (var j = 0; j < GRID_W; j++) {\n\t f(i, j);\...
[ "0.72548395", "0.6860067", "0.6438079", "0.60927355", "0.60872674", "0.6069518", "0.6009297", "0.60076684", "0.5974405", "0.59524304", "0.5952405", "0.5943509", "0.5924762", "0.58757836", "0.5867834", "0.58057773", "0.57595366", "0.57586074", "0.5726069", "0.57178766", "0.570...
0.69351506
1
Add select to query.
select(select = []) { this.query = squel.select(); //select per column if (!h.empty(select)) { select.map(field => this.query.field(field)); } this.query.from(this.getTable()); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSelectToQuery(query, type) {\n var selectedColumns = type.getColumns();\n\n for (var i=0; i<selectedColumns.length; ++i) {\n // TODO: autogenerate nicer names for variables\n // variables have to be unambiguous\n\n var variable = kb.variable(\"_col\" + i);...
[ "0.70662373", "0.69206744", "0.63355815", "0.62158626", "0.6174537", "0.6094313", "0.60714614", "0.5859383", "0.57690144", "0.57621825", "0.57621825", "0.5721325", "0.556674", "0.55524683", "0.5474176", "0.54708904", "0.54354835", "0.5416231", "0.5416231", "0.5416231", "0.541...
0.6985822
1
Query global scope. Add posibility to modify query with some scopes. return this.
scopes() { return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScope(scope){ _scope = scope || 'all' }", "function setScope(scope){ _scope = scope || 'all' }", "function setScope(scope){ _scope = scope || 'all' }", "function setScope(scope){ _scope = scope || 'all' }", "function setScope(scope){ _scope = scope || 'all' }", "function setScope(scope){ _sco...
[ "0.6325003", "0.6325003", "0.6325003", "0.6325003", "0.6325003", "0.6325003", "0.6325003", "0.6325003", "0.6046749", "0.59800816", "0.5895512", "0.5858678", "0.58476156", "0.58476156", "0.57839686", "0.5530597", "0.5504604", "0.54581743", "0.5393985", "0.53916436", "0.5382291...
0.64448816
0
for NTAG it will read 4 page_addr(16bytes) or 1 block addr of mifare(16 bytes)
block_read_PK(page_addr, auth_mode = CODE.NTAG_NO_PWD_AUTH_MODE, key) { if (auth_mode !== CODE.NTAG_PWD_AUTH_MODE) { auth_mode = CODE.NTAG_NO_PWD_AUTH_MODE; key = new Buffer.alloc(6, 0); } else { if (key == undefined) { key = new Buffer.alloc(6, 0); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addressToByteOffset(address) {\n // Offset in the binary of first byte of chunk.\n let offset = 0;\n for (const chunk of this.chunks) {\n if (chunk instanceof CmdLoadBlockChunk) {\n if (address >= chunk.address && address < chunk.address + chunk.loadData.length) {\n ...
[ "0.5118696", "0.5093979", "0.49888265", "0.4967693", "0.4967693", "0.4967693", "0.4967693", "0.4957533", "0.47956276", "0.47439227", "0.4721442", "0.4675136", "0.4675136", "0.46026412", "0.45955598", "0.45337966", "0.4526522", "0.4523445", "0.4514924", "0.45063213", "0.447736...
0.51167357
1
for NTAG it will write 1 page_addr(4 bytes) although the input is wraped as 16 byte for compatible with 1 block mifare(16 bytes) of Mifare API
block_write_PK(data_buff, page_addr, auth_mode = CODE.NTAG_NO_PWD_AUTH_MODE, key) { if (auth_mode !== CODE.NTAG_PWD_AUTH_MODE) { auth_mode = CODE.NTAG_NO_PWD_AUTH_MODE; key = new Buffer.alloc(6, 0); } else { if (key == undefined) { key = new Buffer.al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "appendPointer(n) {\n this.appendUint32(n);\n }", "function encodeTagTweak(out, prefix, blockNr) {\n\tout.set(new Uint8Array(12));\n\tnew DataView(out.buffer).setUint32(12 + out.byteOffset, blockNr, false);\n\tout[0] = prefix << prefixShift;\n}", "onAddressWrite(data) {\n if (!this._writeToggle...
[ "0.53790647", "0.5090918", "0.5014974", "0.494511", "0.4914534", "0.48253417", "0.4817119", "0.4815615", "0.47878867", "0.4770537", "0.4770537", "0.4770537", "0.4770537", "0.47686476", "0.47250623", "0.46529472", "0.46521547", "0.46214128", "0.46004307", "0.4577823", "0.45778...
0.5459687
0
GET_CARD_ID_EX (0x2C) : Use this function for cards with UID longer than 4 byte
get_card_id_ex() { return new Promise((resolve, reject) => { let on_frame = (frame) => { // remove_listener();//remove to resever for next time switch (frame.type) { case CODE.ERR_HEADER: /* No card */ let err_cod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readUid(){\n checkLen(16);\n var res = hexBlock(0, 4, true) + '-' + hexBlock(4, 2, true) + '-' + hexBlock(6, 2, true) + '-' + hexBlock(8, 2) + '-' + hexBlock(10, 6);\n pos += 16;\n return res;\n }", "checkCard() {\n if(this.cardId.length != int) {\n return res.status(401)....
[ "0.6238142", "0.59143484", "0.5624683", "0.5620274", "0.56152797", "0.5578417", "0.55266315", "0.5514681", "0.5488146", "0.5488146", "0.5488146", "0.5488146", "0.5461741", "0.5458537", "0.54079616", "0.5397465", "0.5380052", "0.53590816", "0.534993", "0.5349227", "0.53435034"...
0.7252455
0
Creates a commit with all the pending changes, generates a tag(if provided) and pushes(commit and tags) to origin/master branch. Note: this performs a force push
static async gitPublish ({commitMessage, tag}: { commitMessage: string, tag: string }) { await this.gitAdd() await this.gitCommit(commitMessage) if (tag) { await this.gitTag(tag) } await this.gitPush({force: true, tags: tag}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gitPush () {\n const version = npmGetVersion();\n let doGHRelease = false;\n\n if (process.env['GH_RELEASE_GITHUB_API_TOKEN']) {\n const changes = fs.readFileSync('CHANGELOG.md', 'utf8');\n\n if (changes.includes(`## ${version}`)) {\n doGHRelease = true;\n } else if (version.endsWith('.1'...
[ "0.643347", "0.59337187", "0.5764226", "0.5747778", "0.5737852", "0.56363446", "0.55743617", "0.55383104", "0.55049926", "0.5495273", "0.54723793", "0.54500455", "0.5449174", "0.5362566", "0.5352412", "0.53097326", "0.52995276", "0.52991664", "0.52984095", "0.52267396", "0.51...
0.66111845
0
CREATE MAZE By looping the outer array, the frame to the game is created.
function maze(){ //The funktion values if the command is true. The command is y < lane1.length. //If the command is true, the function create(y) will run. //y++ is autoincrement. It means y increases with 1 for every loop. for(y = 0; y < lane4.length; y++){ create(y); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGame(frame){ // creates the game area by looping on the createTile function\n for(var i = 0; i < GAME_SIZE; i++)\n frame.appendChild(createTile());\n}", "function newgameblocks() \n{\n\tblocks = new Array(rows)\n\n\tfor (i=0; i < rows; i++) \n\t{\n\t\tblocks[i] = new Array(columns)\n\n\t\tfor ...
[ "0.63634616", "0.6141269", "0.6083785", "0.6047814", "0.5973777", "0.5949748", "0.59454197", "0.59053874", "0.5872075", "0.5841162", "0.582928", "0.5822945", "0.5814286", "0.57694316", "0.5736762", "0.5731401", "0.5723798", "0.5692373", "0.5688987", "0.5686118", "0.5685381", ...
0.6349271
1
The function createlane(y,x) handles color and size to the boardtiles.
function createlane(y,x){ if(lane4[y][x] == player){ //Define playerposition as y,x where the value of y is y and the value of x is x. playerposition = {y:y,x:x}; ctx4.fillStyle = "brown"; ctx4.fillRect(x*tilesize, y*tilesize, tilesize, tilesize); }else if(lane4[y][x] == wall){ ctx4.fillStyle ="blac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createBoard() {\n\t\tfor (let i = 0; i < 6; i++) {\n\t\t\tfor (let j = 0; j < 6; j++) {\n\t\t\t\tlet tile = new MyTile(this.scene, this);\n\t\t\t\tlet pieceSize = 0.395 + 0.005;\n\t\t\t\ttile.addTransformation(['translation', -3 * pieceSize + pieceSize * j, -3 * pieceSize + pieceSize * i, 0]);\n\t\t\t\tthis.tiles....
[ "0.643539", "0.6389572", "0.61338854", "0.60453385", "0.6010533", "0.59466285", "0.58862084", "0.5768982", "0.5738346", "0.56607354", "0.560346", "0.5578885", "0.5571244", "0.55698884", "0.5550684", "0.55236274", "0.5514892", "0.551273", "0.5506898", "0.55021036", "0.5495507"...
0.69481725
0
Get the configuration for this component. Overrides are as follows: default values globallyset overrides projectspecific overrides commandline arguments. The CLI args aren't processed here; this config is used when no CLI argument is provided.
function getConfig() { const home = os.homedir(); const currentPath = process.cwd(); const globalOverrides = requireOptional( `/${home}/.new-component-config.json` ); const localOverrides = requireOptional( `/${currentPath}/.new-component-config.json` ); return { ...defaults, ...globalOverrides, ......
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCliConfig(): RNConfig {\n const cliArgs = minimist(process.argv.slice(2));\n const config = cliArgs.config != null\n ? Config.load(path.resolve(__dirname, cliArgs.config))\n : Config.findOptional(__dirname);\n\n return {...defaultRNConfig, ...config};\n}", "function get_config() {\n // Th...
[ "0.69016063", "0.66780525", "0.6656049", "0.6451389", "0.6142645", "0.59019375", "0.5860254", "0.5854539", "0.58352983", "0.5798617", "0.57575345", "0.57332873", "0.5601077", "0.55903846", "0.55750614", "0.5571601", "0.55700314", "0.55412084", "0.55375063", "0.5512505", "0.54...
0.67234445
1
Handle request Update clear.
_handleRequestUpdateClear(options) { this._updater.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClear(callback) {\n this.set('handleClear', callback);\n }", "clear() {\n this.sendAction('clear');\n }", "handleClear() {\n this.providerName = \"All Providers\";\n this.specialityName = \"Select All Specialities\";\n this.selectedRatings = [];\n this.postIn...
[ "0.6316058", "0.6239047", "0.601812", "0.60129714", "0.5977031", "0.5956638", "0.5894753", "0.58616096", "0.5837915", "0.5824686", "0.5801772", "0.57678324", "0.57440007", "0.5739821", "0.5729347", "0.5711832", "0.57068104", "0.56978494", "0.569784", "0.56925106", "0.5674121"...
0.8232043
0
Count Up and Down O(n) EXAMPLE
function countUpAndDown(n) { console.log("Going up!"); for (let i = 0; i < n; i++) { console.log(i); } console.log("At the top!\nGoing down..."); for (let j = n - 1; j >= 0; j--) { console.log(j); } console.log("Back down. Bye!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countUpAndDown(n) {\n\tconsole.log('Going up!');\n\tfor (let i = 0; i < n; i++) {\n\t\tconsole.log(i);\n\t}\n\tconsole.log('At the top!\\nGoing down...');\n\tfor (let j = n - 1; j >= 0; j--) {\n\t\tconsole.log(j);\n\t}\n\tconsole.log('Back down. Bye!');\n}", "function countDown (start, end, count) {\n\t...
[ "0.8007148", "0.734698", "0.7119475", "0.6908133", "0.6713329", "0.6620403", "0.65566534", "0.6535225", "0.6406307", "0.6348995", "0.6300691", "0.6278486", "0.6273059", "0.62500286", "0.6230258", "0.6226414", "0.6214466", "0.6211888", "0.6186966", "0.6172847", "0.61591595", ...
0.80093986
0
Checks 'no attachment' restrictions for this card when attempting to attach the passed attachment card.
allowAttachment(attachment) { if(_.any(this.allowedAttachmentTraits, trait => attachment.hasTrait(trait))) { return true; } return ( this.isBlank() || this.allowedAttachmentTraits.length === 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canAttach(parent, context) { // eslint-disable-line no-unused-vars\n return parent && parent.getType() === CardTypes.Character && this.getType() === CardTypes.Attachment;\n }", "canAttach(player, card) {\n if(!card) {\n return false;\n }\n\n if((this.getType() !== 'goods...
[ "0.6655036", "0.61493593", "0.5861479", "0.5832406", "0.55631495", "0.5517163", "0.54940706", "0.5406566", "0.5235655", "0.5203777", "0.51745766", "0.5153044", "0.5146233", "0.5105166", "0.5086346", "0.5085937", "0.50650215", "0.50087947", "0.49457422", "0.4945453", "0.491096...
0.672207
0
Applies an effect with the specified properties while the current card is attached to another card. By default the effect will target the parent card, but you can provide a match function to narrow down whether the effect is applied (for cases where the effect only applies to specific characters).
whileAttached(properties) { this.persistentEffect({ condition: properties.condition || (() => true), match: (card, context) => card === this.parent && (!properties.match || properties.match(card, context)), targetController: Players.Any, effect: properties.effect ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupCardAbilities(ability) {\n this.persistentEffect({\n condition: (context) =>\n context.player.creaturesInPlay.some(\n (card) =>\n card !== context.source &&\n card.type === 'creature' &&\n ...
[ "0.6040135", "0.60046047", "0.5931977", "0.5403861", "0.51492584", "0.514748", "0.51205486", "0.5084229", "0.50408965", "0.5036023", "0.50210756", "0.5002577", "0.5000309", "0.49995783", "0.49984962", "0.49268305", "0.4874047", "0.48438165", "0.48375916", "0.483632", "0.48247...
0.6618236
0
Checks whether the passed card meets the attachment restrictions (e.g. Opponent cards only, specific factions, etc) for this card.
canAttach(parent, context) { // eslint-disable-line no-unused-vars return parent && parent.getType() === CardTypes.Character && this.getType() === CardTypes.Attachment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canAttach(player, card) {\n if(!card) {\n return false;\n }\n\n if((this.getType() !== 'goods') && (this.getType() !== 'spell')) {\n return false;\n }\n if(card.getType() !== 'dude' && card.getType() !== 'outfit' && card.getType() !== 'deed') {\n ...
[ "0.7387649", "0.66562974", "0.65583104", "0.6425718", "0.59387285", "0.5846418", "0.58100265", "0.57705885", "0.5737379", "0.5666385", "0.56577843", "0.5591714", "0.5531856", "0.5521944", "0.55148226", "0.5480625", "0.5432123", "0.53791827", "0.5366539", "0.5364711", "0.53384...
0.68637365
1
Deals with the engine effects of leaving play, making sure all statuses are removed. Anything which changes the state of the card should be here. This is also called in some strange corner cases e.g. for attachments which aren't actually in play themselves when their parent (which is in play) leaves play.
leavesPlay() { // If this is an attachment and is attached to another card, we need to remove all links between them if(this.parent && this.parent.attachments) { this.parent.removeAttachment(this); this.parent = null; } if(this.isParticipating()) { th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outOfPlay(){\n\n\t$.each(trackedCards,function(i, card){\n\t\t$(\".flipped\").off(\"click\", flipCard);});\n\t\ttrackedCards = [];\n\t\tcardsInPlay = [];\n\n}", "handleOpponentLeaving()\n {\n console.log(\"opponent left\")\n playSound(\"oppLeft\");\n if(game.state.current===\"tic...
[ "0.6590717", "0.62675995", "0.6220814", "0.61254895", "0.61107975", "0.6003112", "0.5985439", "0.5797881", "0.5779388", "0.5723046", "0.57161826", "0.5703732", "0.5694286", "0.56863195", "0.5683561", "0.56730115", "0.5658545", "0.561175", "0.5606863", "0.5601145", "0.5587489"...
0.7229403
0
Function for generating the Crystal number between 1 and 12
function crystalNumGenerator () { randomCrystal = Math.floor(Math.random() * 12 + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crystalNumber() {\n var minNumber = 1;\n var maxNumber = 12;\n var randomNumber = Math.floor(Math.random() * (maxNumber) + minNumber);\n return randomNumber;\n}", "function getCrystalValue(){\n let min = Math.ceil(1);\n let max = Math.floor(12);\n crystalValue = Math.floor(Math.random() * (...
[ "0.7925132", "0.7894267", "0.7842026", "0.78395975", "0.759118", "0.7504228", "0.7410129", "0.73685634", "0.7350614", "0.7201478", "0.71564597", "0.7133257", "0.7067283", "0.68426746", "0.68395215", "0.68179005", "0.6764214", "0.6754392", "0.66789895", "0.6577533", "0.6463288...
0.84358877
0
TAGS: string,list LANG: node.js FUNCTION: implode (delimiter,list)
function implode(delimiter,list){ return list.join(delimiter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "looper(tags) {\n\t\tvar tagString = \"\";\n\t\tif (Array.isArray(tags)) {\n\t\t\tfor (var i = 0; i < tags.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\ttagString = tagString + \", \" + tags[i];\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttagString = tagString + tags[i];\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn tagString;\n\t}", "fu...
[ "0.70504427", "0.6707893", "0.6439939", "0.6333665", "0.6099628", "0.6068369", "0.6035739", "0.6026796", "0.6013474", "0.5996673", "0.59843725", "0.5962463", "0.5955717", "0.5955717", "0.5955717", "0.59531593", "0.5931126", "0.5902513", "0.5888638", "0.5880541", "0.5822307", ...
0.73207325
0
This property defines the Core schema.
static get CoreSchema() { if (!_CoreSchema) { log.info(`Define the schema for ${MODEL_NAME}`); _CoreSchema = new mongoose.Schema({ corename: String, corecode: Number, coreemail: String, dateCreated: { type: Date, default: Date.now }, dateUpdated: { type: D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get schema() {\n return {};\n }", "get schema() {\r\n return this.i.schema;\r\n }", "get schema() {\n return this.config.schema;\n }", "schema() {\n return this.field.schema;\n }", "schema() { }", "static get schema() {\n return {\n name: { type: 'string' },\n ...
[ "0.71410286", "0.6930044", "0.6785067", "0.6666523", "0.665261", "0.6591613", "0.6532207", "0.6521532", "0.65077406", "0.64366823", "0.6333674", "0.63245803", "0.6288616", "0.62033767", "0.61787057", "0.6161927", "0.60540086", "0.603178", "0.59707624", "0.592305", "0.58481", ...
0.73579514
0
save image to cloudinary
function saveImageToCloud(){ cloudinary.v2.uploader.upload(path, { crop : "fill", aspect_ratio: "1:1" }, function(error, result) { if(error) return next(error); channel.image = result.url; saveChannel(); }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveCanvasImage() {\n let stream = canvas.createPNGStream();\n minioClient.putObject(imageBucketName, imagePath, stream, function(err, etag) {\n if (err) {\n console.log('Failed to upload canvas image.');\n return console.log(err);\n }\n return console.log('Saved canvas image successf...
[ "0.6814127", "0.6459118", "0.6435168", "0.6420985", "0.63393337", "0.62167794", "0.6204952", "0.61295915", "0.6126493", "0.61109936", "0.6096852", "0.6046588", "0.6033832", "0.6033832", "0.5955122", "0.59203476", "0.5901391", "0.5871823", "0.5855103", "0.585102", "0.5847841",...
0.8126528
0
save channel to db
function saveChannel(){ channelapi.add(channel, function(error, channel){ if(error) return next(error); redirect(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save(){\r\n\tconsole.log(\"Auto-saving Database..\");\r\n\tjsonfile.writeFile(\"./channels.json\", channels, function (err) {\r\n\t\tif (err){\r\n\t\t\tconsole.log(err);\r\n\t\t}\r\n\t})\r\n\tchanges=false;\r\n\tconsole.log(\"Autosave Complete\");\r\n}", "saveChannelDb(cid, db) {\n co(ChannelDb.u...
[ "0.7258193", "0.697102", "0.6838157", "0.6465773", "0.6424438", "0.604037", "0.6039924", "0.6038509", "0.59592026", "0.5865905", "0.58316576", "0.58187276", "0.5817528", "0.576206", "0.569859", "0.5645731", "0.5634354", "0.56339455", "0.56271136", "0.5618116", "0.5605531", ...
0.7741932
0
save session var and redirect to channel
function redirect(){ req.session.channel = channel.id; res.redirect('/channel/' + channel.id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveChannel(){\n channelapi.add(channel, function(error, channel){\n if(error)\n return next(error);\n\n redirect();\n });\n }", "function goMessage(req, res){\n req.session.pagename = \"Profile Settings\";\n req.session.header = \"Profile Settings...
[ "0.6819239", "0.670395", "0.6190551", "0.616713", "0.6147778", "0.6027881", "0.59952646", "0.59557456", "0.5914903", "0.5909574", "0.5894328", "0.5889629", "0.5842448", "0.5752728", "0.571385", "0.56931055", "0.5677638", "0.5671399", "0.5645619", "0.5643815", "0.56393254", ...
0.8206399
0
sum of received bytes
function getSumReceivedBytes () { return getActiveDownloads().reduce((acc, item) => acc + item.getReceivedBytes(), 0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcLength() {\n return buffers.reduce(function (a, b) {\n return a + b.length;\n }, 0);\n }", "function calcLength () {\n return buffers.reduce(function (a, b) {\n return a + b.length\n }, 0)\n }", "function calcLength () {\n return buffers.reduce(function (a, b) {\n r...
[ "0.6342272", "0.6317896", "0.6317896", "0.6317896", "0.6317896", "0.61893004", "0.61598766", "0.6147151", "0.61185473", "0.61185473", "0.5981129", "0.5891195", "0.580775", "0.5756183", "0.5739476", "0.56577164", "0.5508316", "0.5508316", "0.5508316", "0.54940575", "0.5492378"...
0.69020575
0
sum of total bytes
function getSumTotalBytes () { return getActiveDownloads().reduce((acc, item) => acc + item.getTotalBytes(), 0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function totalBytes(results) {\n var result = 0;\n for(var j in results.pageStats) {\n if(j.match(/Bytes/g)) {\n result += Number(results.pageStats[j]); \n }\n }\n return result;\n}", "function totalBytes(results) {\n var total = 0;\n var pageStats = results.pageStats;\n for(v...
[ "0.7122305", "0.6990603", "0.6912704", "0.6674611", "0.6641441", "0.6516104", "0.6460977", "0.6438931", "0.6438931", "0.6438931", "0.6438931", "0.6401387", "0.63766474", "0.63114595", "0.62635285", "0.61611474", "0.6086469", "0.6073498", "0.60586417", "0.60547876", "0.6050954...
0.7432927
0
Utility function to create a new element. This creates the element and sets the 'src' attribute to the srcPath given. It arranges for the given handler function to be run when the element is ready. Answers the newly created script element, or null if it failed. Note that this doesn't put the element in the DOM, which m...
function scriptLoaderElement( srcPath, handlerFunc ) { var scriptTag = document.createElement('script'); if( !scriptTag ) return null; scriptTag.setAttribute("type","text/javascript"); scriptTag.setAttribute("src", srcPath); // Set up a handler which jumps off to the next part of the chain...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadScripting(src, callback){\n\tvar elem = document.createElement(\"script\");\n\telem.setAttribute(\"type\", \"text/javascript\");\n\telem.setAttribute(\"src\", src);\n\telem.onload = function(){ callback(null, src)};\n\telem.onerror = function() { callback(\"Error al cargar: \" + src, null)};\n\tdocume...
[ "0.5795918", "0.56548774", "0.5581002", "0.5542794", "0.54616964", "0.5425704", "0.5425704", "0.54088587", "0.5400682", "0.5398972", "0.53641814", "0.5327231", "0.5326484", "0.5326484", "0.5319799", "0.53061724", "0.52991545", "0.5291634", "0.5286872", "0.5283881", "0.5259033...
0.79133546
0
STAGE 3 Load KnockoutJS
function scriptLoadHandlerKnockoutJS() { // Same approach as above, just turn the handle once more. // var scriptTag = scriptLoaderElement("http://knockoutjs.com/downloads/knockout-"+REQUIRED_KNOCKOUT_VERSION+".js", main); (document.getElementsByTagName("head")[0] || document.documentElement).app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startApp() {\n ko.applyBindings(new viewModel());\n}", "function initialize_knockout() {\n\t// load everything\n\tload_builder(function(builder) {\n\t\tload_model(function(model) {\n\t\t\tvar old_model = escher.utils.clone(model);\n\t\t\toptimize_loop(builder, model);\n\t\t\td3.select('#reset-button'...
[ "0.68434525", "0.67228925", "0.66960824", "0.6322589", "0.6193284", "0.61023647", "0.6101081", "0.5913825", "0.58823687", "0.57814485", "0.5770753", "0.5753271", "0.57279986", "0.57238084", "0.5698793", "0.5681511", "0.56040114", "0.5584746", "0.55826813", "0.55062896", "0.54...
0.76901746
0
geocode all locations in doc. saves multiple docs to db: copies of original with a geocoded location for each name in locationName.
function geocodeAndSave(doc) { var locationNames = doc.locationName; var latLngs = doc.latLon; // array of strings matching order of location names locationNames.forEach((loc, i) => { syncPromises(function* () { var latlng = latLngs[i].split(','), lat = latlng[0], lng = latlng[1]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveLocationsAutocomplete(){\n $scope.locations.forEach(function(location, i, arr){\n location.location = document.getElementById('location_' + i).value;\n location.cities = document.getElementById('locality_' + i).value;\n location.p...
[ "0.58283436", "0.58170086", "0.5735279", "0.5677669", "0.55405253", "0.5516553", "0.54973066", "0.54478395", "0.5439471", "0.5428807", "0.54103583", "0.53825474", "0.5379395", "0.53768516", "0.5365764", "0.53352875", "0.53013384", "0.5284079", "0.52800834", "0.52758825", "0.5...
0.76748407
0
parser>Set_Column(++column, "Frame Number", TELEMETRY_LOG_STRUCT, framenumber, U32_Type); parser>Set_Column(++column, "Phi", TELEMETRY_LOG_STRUCT, eulers.phi, F32_Type); parser>Set_Column(++column, "Theta", TELEMETRY_LOG_STRUCT, eulers.theta, F32_Type); parser>Set_Column(++column, "Psi", TELEMETRY_LOG_STRUCT, eulers.ps...
function parse_pkt(pkt) { /* var c0 = Columns[0].start; var c1 = Columns[0].end; var c2 = Columns[0].name; console.log(c0); console.log(c1); console.log(c2); var frame = bin2hex(Buffer.from(pkt.slice(1,5))); var digit = parseInt(frame, 16); console.log(digit); var phi = Buff...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(buf, off=0) { // Create a new RowParser from a DataRow message buffer.\n this.buf = buf; this.off = off; this.columns = []; this.columnNames = []; // Set up parsing state.\n const columnCount = r16(buf, off+5); off += 7; // Read in the array of column descriptions.\n for (let i = 0...
[ "0.61822534", "0.5720491", "0.544156", "0.52980083", "0.52958655", "0.520629", "0.51269686", "0.51214695", "0.5098671", "0.5091385", "0.5084486", "0.50646055", "0.504725", "0.5032216", "0.50192636", "0.4987944", "0.49869817", "0.49687096", "0.49447984", "0.49336186", "0.48944...
0.670222
0
Returns true if value is a FileWrapper
function isFileWrapper(value) { return value instanceof FileWrapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFileObject(obj) {\n return typeof obj === 'object' && (obj.path || obj.content);\n}", "function isFileObject (obj) {\n return typeof obj === 'object' && (obj.path || obj.content)\n}", "function isFileObject (obj) {\n return typeof obj === 'object' && (obj.path || obj.content)\n}", "function i...
[ "0.66454136", "0.66087663", "0.66087663", "0.6557906", "0.6513863", "0.6408546", "0.63926244", "0.636808", "0.636808", "0.6328119", "0.63208115", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", "0.6310943", ...
0.8994709
0
Returns a deep clone of the FileWrapper instance
function cloneFileWrapper(fileWrapper) { var options; if (fileWrapper.options) { options = cloneFileWrapperOptions(fileWrapper.options); } return new FileWrapper(fileWrapper.file, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clone() {\n\t\tlet data = JSON.parse(JSON.stringify(this.Serialize()));\n\t\treturn new this.constructor(data);\n\t}", "clone() {\r\n return new FieldElement(this.data);\r\n }", "_cloneDocument() {\n const copy = documents.createImpl(\n this._globalObject,\n {\n contentType: this....
[ "0.610989", "0.60825574", "0.5812962", "0.5719483", "0.56982034", "0.5664353", "0.5609969", "0.55903363", "0.55822235", "0.55822235", "0.55515146", "0.5549842", "0.5547642", "0.5544942", "0.55232996", "0.5518811", "0.55030227", "0.54807216", "0.54764056", "0.54736984", "0.547...
0.79037416
0
Actually sends the result by XHR Should only EVER be called by sendResponseByXHR, as it ignores things like setting up XHR and blocking, and just forces the sending over an assumed open XHR
function sendResult(result) { //TODO: Iterate over tabs checking their status SWAT.xmlHttpRequest.send(result + "\nEOResponse\n"); console.log("Sent result by XHR: " + JSON.stringify(result)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendResponseByXHR(result, wait) {\r\n console.log(\"Sending result by XHR: \" + result);\r\n if (ChromeDriver.xmlHttpRequest != null) {\r\n ChromeDriver.xmlHttpRequest.abort();\r\n }\n ChromeDriver.xmlHttpRequest = new XMLHttpRequest();\r\n ChromeDriver.xmlHttpRequest.onreadystatechange = handleXm...
[ "0.7467134", "0.69525284", "0.64831054", "0.64169383", "0.6407182", "0.6407182", "0.6407182", "0.64060247", "0.6372128", "0.6342864", "0.6326655", "0.6326655", "0.6243036", "0.61989397", "0.617222", "0.611826", "0.6112642", "0.60402584", "0.6019553", "0.59977937", "0.5990334"...
0.7104471
1
Ejercicio 2 Definir una funcion que muestre la informacion de un texto Que se introduce como argumento y determinar si el texto contiene mayusculas , minusculas o ambas
function determinaTexto(texto){ if(texto == texto.toUpperCase() ){ console.log("El texto esta en mayuscula "+texto) } else if(texto == texto.toLowerCase()){ console.log("El texto esta en + minusculas "+texto); } else if(texto!=texto.toUpperCase() ){ console.log("El te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function determinaTexto (texto){\n if (texto == texto.toUpperCase()){\n console.log(\"El texto está en mayúsculas\");\n }\n else{\n console.log(\"El texto está en minúsculas\");\n }\n}", "function minusculamayuscula(texto){\n return texto.toUpperCase()\n}", "function comprobarTipo(...
[ "0.65757406", "0.653621", "0.65052193", "0.6427941", "0.62895477", "0.6272484", "0.6190227", "0.61443007", "0.61272144", "0.6092976", "0.6075602", "0.5993188", "0.59785056", "0.59156215", "0.5870188", "0.58690566", "0.5860122", "0.58452266", "0.5844244", "0.5842918", "0.58375...
0.70413464
0
Function to add a gameState to the gameStateList.
add(gameState, name) { //Checks if the given object is of type GameObjectList. if (gameState instanceof GameObjectList) { // add game state to children this.children[name] = gameState; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addState(state) {\n if (!this.states.includes(state)) {\n this.states.push(state);\n }\n }", "addGameStates() {\n this.game.state.add('MainMenu', MainMenu, false);\n this.game.state.add('Login', Login, false);\n this.game.state.add('SelectLevel', SelectLevel, false);\n thi...
[ "0.71191645", "0.7058588", "0.6752999", "0.6408448", "0.6371506", "0.6146813", "0.5990208", "0.58853054", "0.586976", "0.5868597", "0.5809331", "0.58032894", "0.579279", "0.57848364", "0.57823735", "0.577674", "0.57176083", "0.5708216", "0.5697958", "0.56765443", "0.56708103"...
0.7489406
0
called when the page version is changed
function onChangePageVersion(event) { var pageVersionId = $(event.currentTarget).val(); this.changePageVersion(pageVersionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onPageUpdate(pageProps) {\n const updatePagesReference = () => this.getAllPagesPromise().then((allPages) => {\n allPages.update(pageProps)\n })\n\n this.navigateToPageAndDisplayChange(pageProps, updatePagesReference)\n }", "function pageChanged(newPage) {\n\t\tgetArticles(newPa...
[ "0.6618437", "0.6610843", "0.6605826", "0.6362735", "0.62939405", "0.6283814", "0.6255733", "0.62360114", "0.6156553", "0.61471885", "0.6137269", "0.6128526", "0.612723", "0.60581785", "0.6057927", "0.6051529", "0.6028938", "0.60255563", "0.6022258", "0.5991222", "0.5989024",...
0.7630255
0
handle when the add page version button is clicked
function onAddPageVersionBtnClicked(event) { var pageName = prompt('What would you like to name this new page version?'); if (pageName) this.addPageVersion(pageName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChangePageVersion(event)\n\t{\n\t\tvar pageVersionId = $(event.currentTarget).val();\n\n\t\tthis.changePageVersion(pageVersionId);\n\t}", "function onChangePageVersion(event)\n\t{\n\t\tvar pageVersionId = $(event.currentTarget).val();\n\n\t\tthis.changePageVersion(pageVersionId);\n\t}", "function ad...
[ "0.695484", "0.695484", "0.65651834", "0.64677817", "0.6301906", "0.6083603", "0.60026604", "0.59401417", "0.5934446", "0.5878045", "0.5810536", "0.5790647", "0.5785405", "0.57785225", "0.57731676", "0.5758228", "0.57134", "0.5687597", "0.5670779", "0.5641736", "0.56394994", ...
0.8164586
0
handle when language selector changes
function onLanguageSelectorChanged(event) { var url = $(event.currentTarget).find(':selected').data('url'); var id = $(event.currentTarget).val(); if (id != this.page.languageId) { location.href = url; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onchange() {\n\n updateLanguage();\n\n}", "function LanguageClickEventHandler(lang) {\r\n SetLanguage(lang);\r\n}", "changeLanguage(e) {\n\t\tconst lang = e.target.value;\n\t\tif (lang !== undefined && possibleLanguages.indexOf(lang !== -1)) {\n\t\t\tcookie.save(\"lang\", lang, {path: cookiesPath,...
[ "0.8000294", "0.75628483", "0.7519994", "0.7492291", "0.7355823", "0.7317819", "0.7314041", "0.71474326", "0.7128186", "0.7101387", "0.70917106", "0.70863456", "0.70575243", "0.70506406", "0.7041615", "0.7041496", "0.703953", "0.7022871", "0.6997015", "0.6919239", "0.69038534...
0.7726841
1
Converts an AST into a string, using one set of reasonable formatting rules.
function formatAst(ast) { return (0, _language.visit)(ast, { leave: printDocASTReducer }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function church_ast_to_string(ast) {\n\tif (util.is_leaf(ast)) {\n\t\treturn ast.text;\n\t} else {\n\t\treturn \"(\" + ast.children.map(function(x) {return church_ast_to_string(x)}).join(\" \") + \")\"\n\t}\n}", "function formatAST(node)\n\t\t{\n\t\t\tif(!Array.isArray(node))\n\t\t\t{\n\t\t\t\t// Flatten enum va...
[ "0.6658709", "0.64763826", "0.57551503", "0.57519037", "0.57148486", "0.55270946", "0.5510983", "0.5510983", "0.5510983", "0.5489868", "0.5480407", "0.5476735", "0.54718816", "0.5463142", "0.54609615", "0.5440716", "0.5437396", "0.5419792", "0.5419664", "0.54123235", "0.53808...
0.6907318
0
Create a new ICE key with the specified level.
constructor(level) { this.cipherHolder = new Uint8Array(8); this.plainHolder = new Uint8Array(8); if (!IceKey.spBoxInitialised) { this.spBoxInit(); IceKey.spBoxInitialised = true; } if (level < 1) { this.size = 1; this.rounds = 8; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create( label, privateKey ){\n\treturn new KeyPair(label, privateKey);\n}", "function createKey() {\n return ec2.createKeyPair({ KeyName: `${UID}-${uuid()}` });\n}", "function createLevelInstruction()\n{\n //Fetch the level instruction from game data by reusing the current_level formed before hand.\...
[ "0.59178305", "0.55964804", "0.5557828", "0.5455204", "0.5432988", "0.54270136", "0.53923047", "0.5371264", "0.5296996", "0.52389085", "0.5175308", "0.50409067", "0.4996472", "0.49743757", "0.49675927", "0.49624175", "0.49337497", "0.49337497", "0.49144575", "0.49122146", "0....
0.60716766
0
Return the key size, in bytes.
keySize() { return this.size * 8; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getKeyLength(key) {\n return key.length;\n }", "_getKeyLength( key ){\n\t\treturn key.length;\n\t}", "function GetSize() : int\n\t{\n\t\tvar n = 0;\n\t\tfor( var i = 0; i < key2down.length; i++ )\n\t\t{\n\t\t\tif( key2down[i] )\n\t\t\t\tn++;\n\t\t}\n\t\treturn n;\n\t}", "function getLength(){\r\...
[ "0.7907605", "0.7906857", "0.78984964", "0.7507477", "0.6989063", "0.6913776", "0.68637383", "0.6663583", "0.6569478", "0.6564413", "0.6494935", "0.6456448", "0.6445955", "0.6385931", "0.63672084", "0.63429147", "0.6342078", "0.6327819", "0.6268465", "0.62662774", "0.6241391"...
0.80348915
0
Clear the key schedule to prevent memory snooping.
clear() { for (let i = 0; i < this.rounds; i++) for (let j = 0; j < 3; j++) this.keySchedule[i][j] = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n stopBlink()\n currentKeys = []\n bottom.innerHTML = spannify('_')\n interval = setInterval(selector, 500)\n }", "function clearAllKeyboardEvents() {\n mem.clear();\n mt.reset();\n }", "clear() {\n this.activeKeyCodes = [];\n \n ...
[ "0.7013588", "0.68907124", "0.6887997", "0.68500465", "0.6666607", "0.6604305", "0.65318334", "0.65253675", "0.6436705", "0.6436705", "0.63721037", "0.63297343", "0.6312415", "0.6295408", "0.6275274", "0.6275274", "0.6275274", "0.6251578", "0.62489605", "0.62451315", "0.62377...
0.74797624
0
8bit Galois Field multiplication of a by b, modulo m. Just like arithmetic multiplication, except that additions and subtractions are replaced by XOR.
gf_mult(a, b, m) { let res = 0; while (b !== 0) { if ((b & 1) !== 0) res ^= a; a <<= 1; b >>>= 1; if (a >= 256) a ^= m; } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gmul(a, b) {\n let p = 0,\n counter,\n carry;\n\n for (counter = 0; counter < 8; counter++) {\n if (b & 1) {\n p ^= a;\n }\n\n carry = a & 0x80; // detect if x^8 term is about to be generated\n\n a = (a << 1) & 0xff;\n\n if (carry) {\n a ^= 0xc3;\n ...
[ "0.7708949", "0.7174573", "0.69065", "0.6703896", "0.66641563", "0.66350114", "0.66313344", "0.659865", "0.6581663", "0.6581663", "0.65640545", "0.65640545", "0.65640545", "0.65640545", "0.65640545", "0.65640545", "0.65640545", "0.65583044", "0.65501297", "0.65381616", "0.652...
0.7918466
0
8bit Galois Field exponentiation. Raise the base to the power of 7, modulo m.
gf_exp7(b, m) { let x; if (b === 0) return 0; x = this.gf_mult(b, b, m); x = this.gf_mult(b, x, m); x = this.gf_mult(x, x, m); return this.gf_mult(b, x, m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bnModPow(e,m){var i=e.bitLength(),k,r=nbv(1),z;if(i<=0)return r;else if(i<18)k=1;else if(i<48)k=3;else if(i<144)k=4;else if(i<768)k=5;else k=6;if(i<8)z=new Classic(m);else if(m.isEven())z=new Barrett(m);else z=new Montgomery(m);// precomputation\n\tvar g=new Array(),n=3,k1=k-1,km=(1<<k)-1;g[1]=z.convert(t...
[ "0.61285716", "0.6098416", "0.5991661", "0.5991661", "0.59912264", "0.5984197", "0.5978857", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", "0.5969458", ...
0.686948
0
Carry out the ICE 32bit permutation.
perm32(x) { let res = 0; let i = 0; while (x !== 0) { if ((x & 1) !== 0) res |= IceKey.pBox[i]; i++; x >>>= 1; } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function permute22(S) { // Refactored and better solution, Easy to understand and easy to Digest\n let A = [...S], output = [];\n\n (function permute(l = 0) {\n if (l === A.length - 1) output.push(A.toString());\n else {\n for (let k = l; k <= A.length - 1; k++) {\n [A...
[ "0.56081605", "0.55920374", "0.55224156", "0.5517444", "0.53440166", "0.5341636", "0.5299779", "0.5292029", "0.5266927", "0.5239075", "0.5227464", "0.5182813", "0.5173362", "0.51237494", "0.5122227", "0.5118118", "0.5095266", "0.508522", "0.50716513", "0.5062254", "0.50600004...
0.70767146
0
Set 8 rounds [n, n+7] of the key schedule of an ICE key.
scheduleBuild(kb, n, krotIdx) { let i; for (i = 0; i < 8; i++) { let j; const kr = IceKey.keyrot[krotIdx + i]; const subkey = this.keySchedule[n + i]; for (j = 0; j < 3; j++) this.keySchedule[n + i][j] = 0; for (j = 0; j < 15; j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set(key) {\n const kb = new Uint16Array(4);\n for (let i = 0; i < 4; i++)\n kb[i] = 0;\n if (this.rounds === 8) {\n for (let i = 0; i < 4; i++)\n kb[3 - i] = ((key[i * 2] & 0xff) << 8) | (key[i * 2 + 1] & 0xff);\n this.scheduleBuild(kb, 0, 0);\n ...
[ "0.6432844", "0.59050345", "0.56552", "0.5607833", "0.55376065", "0.5408176", "0.5172425", "0.5134164", "0.5127834", "0.5095633", "0.50488967", "0.50097513", "0.49963722", "0.49865556", "0.49865556", "0.49513584", "0.48682243", "0.482105", "0.482105", "0.482105", "0.482105", ...
0.6783551
0
helper function for the parseCar() function; loops through some of the CAR's repeating data structures to find HGVS terms and add them to the variant object
function parseCarHgvsLoop(alleles, variant) { variant['tempAlleles'] = []; alleles.map(function(allele, i) { if (allele.hgvs && allele.hgvs.length > 0) { allele.hgvs.map(function(hgvs_temp, j) { variant = parseCarHgvsHandler(hgvs_temp, variant); }); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseCarHgvsHandler(hgvs_temp, variant) {\n if (!variant.hgvsNames.others) {\n variant.hgvsNames.others = [];\n }\n variant.hgvsNames.others.push(hgvs_temp);\n return variant;\n}", "function parseClinvarExtended(variant, allele, hgvs_list, dataset, molecularConsequenceNodes) {\n va...
[ "0.6860298", "0.5995632", "0.5429085", "0.52536625", "0.5252408", "0.5150207", "0.51466364", "0.4994885", "0.4964189", "0.49587876", "0.49541953", "0.49240142", "0.49055645", "0.4888338", "0.48637187", "0.4848945", "0.48378193", "0.48341104", "0.4825277", "0.48242044", "0.481...
0.72462654
0
helper function for the parseCar() function: checks to see if the variant object's hgvsNames' others variable is set, creates it if not, and adds an HGVS term to it
function parseCarHgvsHandler(hgvs_temp, variant) { if (!variant.hgvsNames.others) { variant.hgvsNames.others = []; } variant.hgvsNames.others.push(hgvs_temp); return variant; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseCarHgvsLoop(alleles, variant) {\n variant['tempAlleles'] = [];\n alleles.map(function(allele, i) {\n if (allele.hgvs && allele.hgvs.length > 0) {\n allele.hgvs.map(function(hgvs_temp, j) {\n variant = parseCarHgvsHandler(hgvs_temp, variant);\n });\n ...
[ "0.6129432", "0.5321859", "0.50119257", "0.4994478", "0.4685322", "0.46621752", "0.4596936", "0.45923015", "0.45895153", "0.45277628", "0.45277345", "0.45231274", "0.4520396", "0.44748646", "0.44549474", "0.44481182", "0.4443661", "0.44073722", "0.4393869", "0.4391764", "0.43...
0.76095027
0
the view has sidebar & children passed in
function view(sidebar, children) { return div([ nav([sidebar]), div([children]) ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SidebarView() {\n if (!(this instanceof SidebarView)) {\n return new SidebarView();\n };\n\n StatefulView.call(this, template);\n this.filtercontainer = this.find('#filter-container');\n this.listcontainer = this.find('#list-container');\n}", "render({ children, inverted }) {\n\t\treturn (\n\t\t...
[ "0.6525121", "0.62053627", "0.60539305", "0.5982647", "0.5950307", "0.59232163", "0.59114856", "0.5889186", "0.58672714", "0.58672714", "0.58672714", "0.5863449", "0.5848783", "0.58190477", "0.58190477", "0.58127797", "0.57767284", "0.5759658", "0.57584745", "0.57035923", "0....
0.7259344
0
! ArrayView.js Version 1.1.0
function ArrayView(array, offset, length) { // ArrayView(array[, offset[, length]]) // Inspired by TypedArray and DataView // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray this.array = array; this.viewOffset = offset|0; this.viewLength = length === u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toArray () {\n return this.list.slice()\n }", "function ViewSequence(options) {\n\t if (!options)\n\t options = [];\n\t if (options instanceof Array)\n\t options = { array: options };\n\t this._ = null;\n\t this.index = options.index || 0;\n\t if (options.array)\n\t this._...
[ "0.5937431", "0.5928829", "0.5920223", "0.591815", "0.590898", "0.5903262", "0.5903262", "0.5903262", "0.5894187", "0.5803767", "0.58026963", "0.57945573", "0.57826006", "0.57803136", "0.57684726", "0.5757155", "0.5752727", "0.5721979", "0.56943774", "0.5688775", "0.5682419",...
0.6675362
0
=== Fixes the position of buttons group in content header and top user navigation ===
function fix_position() { var uwidth = $('#user-nav > ul').width(); $('#user-nav > ul').css({width:uwidth,'margin-left':'-' + uwidth / 2 + 'px'}); var cwidth = $('#content-header .btn-group').width(); $('#content-header .btn-group').css({width:cwidth,'margin-left':'-' + uwidth / 2 + 'px'})...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix_position()\r\n\t{\r\n\t\tvar uwidth = $('#user-nav > ul').width();\r\n\t\t$('#user-nav > ul').css({width:uwidth,'margin-left':'-' + uwidth / 2 + 'px'});\r\n \r\n var cwidth = $('#content-header .btn-group').width();\r\n $('#content-header .btn-group').css({width:cwidth,'margin-lef...
[ "0.7366989", "0.727656", "0.625024", "0.6248987", "0.61244035", "0.6119248", "0.6006678", "0.5859479", "0.58480257", "0.5826974", "0.5812442", "0.5810713", "0.5759944", "0.5745475", "0.57220083", "0.5719302", "0.567098", "0.565402", "0.5618373", "0.560636", "0.5587456", "0....
0.73766047
0
little function that moves particle to where you click. was for debugging, now a feature!
function mouseClicked() { x = mouseX; y = mouseY; particle = new Particle(x,y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "move(_x) {\r\n console.log(\"clicked\");\r\n this.p1x = _x - (this.pwidth / 2);\r\n }", "clickHandler(event) {\n let p = this.mouse.add(this.cartography._view);\n if (event.shiftKey) {\n this.state.player.data.input.fire = new Vector(p);\n } else {\n this.state.cur...
[ "0.6846333", "0.6723982", "0.66857934", "0.66713893", "0.6651968", "0.6637996", "0.66353464", "0.6611632", "0.6520383", "0.649461", "0.6493369", "0.6493298", "0.649092", "0.64668876", "0.64352214", "0.6434613", "0.6433807", "0.643325", "0.64200073", "0.64179504", "0.6415779",...
0.72846186
0
Gets the gradient data as a string and parse into json format
function parse_gradient(gradient) { gradient = gradient.substring(30, gradient.length - 1).split("%"); var clear_char = [",", " "]; var colorStops = []; for (var i = 0; i < gradient.length; i++) { if (gradient[i] != "") { for (var j = 0; j < 2; j++) { if (clear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateGradientString(){\n let gradient = \"linear-gradient(\"\n let nrItems = 1\n for (const [key, color] of Object.entries(this.colors)) {\n gradient += color.rgb\n\n if(nrItems == Object.keys(this.colors).length){\n gradient += \")\"\n } else {...
[ "0.60979444", "0.6050984", "0.5960917", "0.56690407", "0.56690407", "0.56690407", "0.55790496", "0.5553786", "0.55413264", "0.550521", "0.5487499", "0.5412775", "0.53900397", "0.53852123", "0.53758126", "0.5319459", "0.53110987", "0.53019094", "0.52208", "0.5184234", "0.51561...
0.71921563
0
Sets given object's gradient (Gradient takes JSON format)
function set_gradient(json_gradient) { var obj = canvas.getActiveObject(); if (obj) { if (obj.type == 'i-text') { obj.set('fill', new fabric.Gradient({ type: 'linear', coords: { x1: 0, y1: 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_gradient_slider(json_gradient) {\r\n var gp = new Grapick({\r\n el: '#gp',\r\n min: 1,\r\n max: 99,\r\n width: 25\r\n });\r\n\r\n // Handlers are color stops\r\n // in format : gp.addHandler(25, 'rgb(255, 0, 0)'); If the given offset is 0.25 then the handler for...
[ "0.69467455", "0.6663209", "0.6630959", "0.64532983", "0.63768685", "0.6371355", "0.6243639", "0.6177902", "0.60208184", "0.6018261", "0.5926083", "0.58602726", "0.585418", "0.5850324", "0.58425444", "0.58024484", "0.58021003", "0.5798601", "0.57936466", "0.5777575", "0.57704...
0.7890995
0
Returns true if a custom field is enabled in the plugin config
function is_enabled_custom_field(src_element, custom_field, src_custom_fields) { try { if (src_element.extra_info !== undefined && src_element.extra_info[custom_field] !== undefined && src_element.extra_info[custom_field] && src_element.extra_info...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isEnabled() {\n return !!this.config[this.name];\n }", "isEnabled() {\n return !!this.config[this.name];\n }", "_isEnabled() {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }", "_isEnabled() {\n return this.getOptions().enabled !== false && this._dsn ...
[ "0.66889304", "0.66889304", "0.63101274", "0.6282349", "0.62195903", "0.621289", "0.60195374", "0.5956231", "0.5943904", "0.5892418", "0.58893687", "0.5806857", "0.57961637", "0.57866293", "0.5726669", "0.5726669", "0.5726669", "0.5726669", "0.567727", "0.56755656", "0.567349...
0.7924138
0
Get Actor Data sourced from ThePornDB
async function get_info_from_tpdb(actor_name, settings) { $log("[AMDX] MSG: START TPDB Data Extraction"); let result = { 'id': 'tpdb', 'img_urls': [], 'bio': new Set() }; const tpdb_perf_search_url = `https://master.metadataapi.net/api/performer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMeteorData() {\n return {\n chapter: Chapters.findOne({ seq: Number(this.props.params.chapterSeq) })\n }\n }", "getDatabase() {\n return this.__db;\n }", "getDatabase() {\n return this.database;\n }", "prepareData() {\n super.prepareData();\n\n const actorData...
[ "0.56994325", "0.5328257", "0.5254352", "0.52342916", "0.51914966", "0.51914966", "0.516528", "0.5129287", "0.508285", "0.505824", "0.50446075", "0.50292057", "0.50194067", "0.50076026", "0.5006575", "0.49861997", "0.49817887", "0.49800044", "0.49667403", "0.49387917", "0.491...
0.5913489
0
Render data on color map
renderColor(dom_elements, data){ // Save object (Color map) instance var self = this; // Update color map selected map (Moisture, Temperature, etc) self.selected_map = dom_elements.selected_map; // d3.selection.prototype.moveToFront = function(){ return thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_mapDataToColors() {\n // switch rendering destination to our framebuffer\n twgl.bindFramebufferInfo(this._gl, this._framebuffers.gridded);\n\n glDraw(this._gl, this._programs.colormap, this._buffers.colormap, {\n u_data: this._textures.data,\n u_colormap: this._textures.colormap,\n u_color...
[ "0.7534085", "0.6641094", "0.66360515", "0.65368706", "0.65028614", "0.6402923", "0.6365824", "0.6324437", "0.63074565", "0.6235735", "0.6229544", "0.62231314", "0.6206651", "0.616832", "0.6097082", "0.6065878", "0.6055865", "0.60553414", "0.60346717", "0.6029559", "0.5966435...
0.6660691
1
Checks if items prices data are fresh. Refreshes them if needed
async _ensureFreshData() { let itemsData = await this._instance.get('zombieItems').value(); let exchangeData = await this._instance.get('exchangeData').value(); /* since the data are updated every 24h hours, and itemsData.timestamp is part of the data, * checking if `itemsData.timestamp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async fetchItems() {\n this.setState({isFetching: true});\n\n const serverdata = await this.getServerData();\n const items = await this.getMarketPrices();\n const ItemsHistory = [];\n\n for (const [i, item] of items.entries()) {\n this.setState({\n progress: i/items.length*100,\n ...
[ "0.6209539", "0.61140543", "0.59660965", "0.5884233", "0.583858", "0.5827488", "0.5671836", "0.56574", "0.5626119", "0.55984014", "0.55822057", "0.552235", "0.55089456", "0.5508929", "0.5500324", "0.5479434", "0.54779476", "0.54603004", "0.5453375", "0.5437579", "0.5436822", ...
0.7207818
0
Returns a Promise containing all zombies
getAllZombies() { this._ensureConnected(); return this._instance.get('zombies').value(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detectZombies() {\n for (let i = 0; i < plants.length; i++) {\n plants[i].detectZombies();\n }\n}", "function zombieAttack() {\n for (let i = 0; i < zombies.length; i++) {\n zombies[i].detectObject();\n }\n}", "cleanZombies(){\n let zombies = new CuteSet();\n fo...
[ "0.6365605", "0.5897622", "0.56723046", "0.5562627", "0.5562627", "0.5562627", "0.5562627", "0.5562627", "0.5562627", "0.5562627", "0.5562627", "0.5470543", "0.54616904", "0.5417111", "0.5390021", "0.53807324", "0.5338545", "0.52891475", "0.5279724", "0.52238137", "0.52203834...
0.72627217
0
Make sure the extension is running, or is stopped, depending on current options and URL
async function updateExecution() { const options = await loadOptions(); const currentUrl = window.location.href; if ( !isUrlAccepted( currentUrl, options.enabledSites, options.disabledSites ) ) { interru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkExitURLStatus() {\n\n }", "function initialCheck(){\n\t\n\t/*I forgot I could've used this\n\tchrome.storage.sync.get('Enabled', function(data){\n\t\talert(data.Enabled);\t\n\t});*/\n\t\n\tchrome.runtime.sendMessage(\"StartOrNot\");\n\n\tchrome.runtime.onMessage.addListener(function(msg){\n\t\n\...
[ "0.63995355", "0.63180757", "0.60282004", "0.59790504", "0.5915544", "0.58907866", "0.579911", "0.5784837", "0.5723263", "0.5699517", "0.56538266", "0.56510806", "0.5638431", "0.5632019", "0.5560351", "0.5560351", "0.5548364", "0.5541359", "0.5516572", "0.5492811", "0.5474943...
0.65255773
0
Interrupt any current execution
function interrupt() { if (stopCurrentExecution) { stopCurrentExecution(); stopCurrentExecution = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Interrupt() {\n\n }", "interrupted(/* motions */) {\n }", "interrupt() {\n this.running = false;\n }", "interrupt() {\n if (!this._executingStack) {\n logError('Tried to interrupt but there is no executing stack');\n return;\n }\n this._interruptedStacksOfUnknownCircumstances...
[ "0.7811384", "0.7411871", "0.730033", "0.71544194", "0.69077456", "0.67398995", "0.6437182", "0.63753754", "0.6305122", "0.6304864", "0.63022", "0.6291203", "0.6291203", "0.6223861", "0.6157358", "0.6154915", "0.6058942", "0.6025954", "0.60153985", "0.60052186", "0.59608275",...
0.82778376
0
Callback whenever the history changes and window.location could have changed.
function onHistoryChange(callback) { browser.runtime.onMessage.addListener(message => { if (message === 'hyper-gwent/history-changed') { callback(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _urlChangedCallback() {\n if (_oldHref == location.href) {\n return;\n }\n _oldHref = location.href\n var parsedUrl = {href: location.href};\n if (urlParser) {\n parsedUrl = urlParser.parse(location.href);\n }\...
[ "0.73790216", "0.73780423", "0.709773", "0.692201", "0.68429077", "0.6748227", "0.66229135", "0.6579183", "0.65733844", "0.65733844", "0.65733844", "0.6562636", "0.6539833", "0.65354073", "0.6516285", "0.6501413", "0.64845157", "0.64727104", "0.6466576", "0.64605504", "0.6450...
0.76874524
0
returns true if checkStr contains only characters specified in checkOK probably can be replaced with a more efficient regular expression
function isValidString( checkStr, checkOK ) { if ( !checkOK ) var checkOK = ''; var allValid = true; //return checkStr.match( '^(['+checkOk+']+)$' ); for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function illegalCharsFound(checkString)\n{\n //var specialCharacters = \"<>@!#$%^&*()_+[]{}?:;|'\\\"\\\\,./~`-=\";\n var specialCharacters = \"<>~`\";\n var result = false;\n if (checkString.indexOf('>')!=-1 || checkString.indexOf('<')!=-1 ) // dan is het gevonden\n {\n result = true; \n }...
[ "0.6950404", "0.69439334", "0.682272", "0.6724227", "0.6528704", "0.6428803", "0.6425757", "0.6419003", "0.6303958", "0.62769556", "0.62710714", "0.62341833", "0.6231846", "0.6223777", "0.6185467", "0.61813277", "0.6164672", "0.6164672", "0.6134283", "0.60971856", "0.6042843"...
0.75954425
0
returns true if fieldValue is a valid hex color code, with in front like FA329C
function isColorCode( fieldValue ) { var checkOK = "#0123456789ABCDEFabcdef"; var checkStr = fieldValue; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidColor(text) {\n return hexColorRegEx.test(text);\n}", "function isHexColor(value) {\n return typeof value === 'string' && validator_lib_isHexColor__WEBPACK_IMPORTED_MODULE_1___default()(value);\n}", "function isHexaColor(sNum) {\n return (typeof sNum === \"string\") && sNum.length === 6\...
[ "0.77653986", "0.7738444", "0.75161713", "0.7478128", "0.7446082", "0.74374187", "0.7436696", "0.7400084", "0.7399717", "0.7368246", "0.7294285", "0.7289046", "0.7213643", "0.7132274", "0.7125417", "0.71038073", "0.6995606", "0.69593304", "0.6947995", "0.69048744", "0.690166"...
0.79959685
0
Inizialize configuration for change version task
initializeChangeVersion(config) { return inquirer .prompt([ { type: 'input', name: 'replacingTag', message: 'sources.updateVersion.replacingTag', default: '{version}' }, { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function version(){\n console.log(\"Version:\" , _cfg.version );\n}", "async publishVersion() {\n const actOpts = await this.putVersionOpts('/activate');\n this.tick(0, 'Activating version', 'activating version');\n return request(actOpts).then((r) => {\n this.tick(1, `Activated version ${r.number...
[ "0.64865434", "0.61434865", "0.593047", "0.58931774", "0.57382625", "0.5621919", "0.5602294", "0.55921173", "0.5496317", "0.5474672", "0.54529285", "0.5421251", "0.5396763", "0.5384134", "0.5379109", "0.5366572", "0.5360082", "0.5348829", "0.53400344", "0.53121096", "0.530639...
0.6910904
0
Returns a configuration for an SQS queue to subscribe to an SNS topic
bind(topic) { try { jsiiDeprecationWarnings.aws_cdk_lib_aws_sns_ITopic(topic); } catch (error) { if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") { Error.captureStackTrace(error, this.bind); } throw error; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subscribe(topic, queue) {\n if (topic === undefined) throw \"A topic must be given\"\n\n params = {\n Protocol: 'sqs',\n TopicArn: \"arn:aws:sns:us-west-2:123456789012:\" + topic,\n Endpoint: 'arn:aws:sqs:elasticmq:000000000000:' + queue,\n };\n\n sns.subscribe(params, return_function)\n}", ...
[ "0.71178836", "0.58402693", "0.56268996", "0.5584803", "0.553904", "0.5521771", "0.54817015", "0.54681855", "0.5308041", "0.52508414", "0.52358264", "0.5195251", "0.5191139", "0.5123378", "0.5098361", "0.5082334", "0.5082334", "0.50314754", "0.5030072", "0.5028724", "0.502224...
0.6239067
1
Normalize all injections into Objectbased format
function normalizeInject (options, vm) { var inject = options.inject; if (!inject) { return } var normalized = options.inject = {}; if (Array.isArray(inject)) { for (var i = 0; i < inject.length; i++) { normalized[inject[i]] = { from: inject[i] }; } } else if (isPlainObject(inject)) { for (v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeInject(options) {\n\t var inject = options.inject;\n\t if (Array.isArray(inject)) {\n\t var normalized = options.inject = {};\n\t for (var i = 0; i < inject.length; i++) {\n\t normalized[inject[i]] = inject[i];\n\t }\n\t }\n\t}", "function normalizeInject(options) {\n\t var in...
[ "0.66638887", "0.66638887", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.66517854", "0.6636966", "0.6636966", "0.6634573", "0.6634573", "0.65853214", "0.65853214", "0.65853214", "0.65853214", "0.6558584", "...
0.6755964
0
The rational behind the verbose Reflectfeature check below is the fact that there are polyfills which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys. Without this check consumers will encounter hard to track down runtime errors.
function reflectionIsSupported() { return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetadataKeys(e)).forEach(function(r){var o=n?Reflect.getOwnMetadata(r,e,n):Reflect.getOwnMetadata(r,e);n?Reflect.defineMetadata(r,o,t,n):Reflect.defineMetadata(r,o,t)})}", "function i(t,e,n){(n?Reflect.getOwnMetadataKeys(e,n):Reflect.getOwnMetada...
[ "0.66556376", "0.66556376", "0.6645698", "0.6545216", "0.6080112", "0.6061335", "0.6020652", "0.5977435", "0.594409", "0.58824563", "0.5749071", "0.56965065", "0.56473094", "0.56256866", "0.5582051", "0.558094", "0.55521643", "0.5518378", "0.54961973", "0.54961973", "0.549619...
0.75041354
0
decorator of a reactive inject
function InjectReactive(options) { return createDecorator(function (componentOptions, key) { if (typeof componentOptions.inject === 'undefined') { componentOptions.inject = {}; } if (!Array.isArray(componentOptions.inject)) { var fromKey_1 = !!options ? options.from |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inject() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return function (target) {\n target.inject = args; // Provide IOC framework with a place to find out what to inject.\n };\n}", "function i...
[ "0.6185937", "0.6156243", "0.61496747", "0.61496747", "0.61367196", "0.60742956", "0.60742956", "0.60345143", "0.6024208", "0.6020175", "0.5999896", "0.5999465", "0.5987074", "0.5987074", "0.5987074", "0.5970673", "0.59637123", "0.59607446", "0.589769", "0.5895964", "0.585310...
0.6233387
0
decorator of a provide
function Provide(key) { return createDecorator(function (componentOptions, k) { var provide = componentOptions.provide; if (needToProduceProvide(provide)) { provide = componentOptions.provide = produceProvide(provide); } provide.managed[k] = key || k; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Provide(key) {\n return createDecorator(function (componentOptions, k) {\n var provide = componentOptions.provide;\n if (typeof provide !== 'function' || !provide.managed) {\n var original_1 = componentOptions.provide;\n provide = componentOptions.provide = function ...
[ "0.64277136", "0.64277136", "0.6390884", "0.63209796", "0.62104046", "0.61934245", "0.6191901", "0.6181016", "0.61724865", "0.61724865", "0.61724865", "0.60959625", "0.60867465", "0.5987795", "0.5954921", "0.5954921", "0.5954921", "0.59197485", "0.5874324", "0.5763999", "0.57...
0.6641938
0
decorator of a synced prop
function PropSync(propName, options) { if (options === void 0) { options = {}; } // @ts-ignore return function (target, key) { applyMetadata(options, target, key); createDecorator(function (componentOptions, k) { ; (componentOptions.props || (componentOptions.props = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PropSync(propName, options) {\n if (options === void 0) { options = {}; }\n // @ts-ignore\n return function (target, key) {\n applyMetadata(options, target, key);\n Object(vue_class_component__WEBPACK_IMPORTED_MODULE_1__[\"createDecorator\"])(function (componentOptions, k) {\n ...
[ "0.6298405", "0.6172723", "0.5624531", "0.560434", "0.55631906", "0.55430317", "0.5522831", "0.53962797", "0.53610986", "0.5335693", "0.53168666", "0.52447367", "0.52447367", "0.52413297", "0.5237659", "0.52259547", "0.52245677", "0.51777124", "0.5173442", "0.515738", "0.5157...
0.61899495
1
Converts HSVA to RGBA. Based on formula from
function HSVAtoRGBA(hsva) { const { h, s, v, a } = hsva; const f = n => { const k = (n + h / 60) % 6; return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0); }; const rgb = [f(5), f(3), f(1)].map(v => Math.round(v * 255)); return { r: rgb[0], g: rgb[1], b: rgb[2], a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RgbToHsv(a,e,i){var c=Math.min(a,e,i),j=Math.max(a,e,i),l=j-c,d,m,k=j;k=Math.floor(j/255*100);if(j==0){return[0,0,0]}m=Math.floor(l/j*100);var f=l==0?1:l;if(a==j){d=(e-i)/f}else{if(e==j){d=2+(i-a)/f}else{d=4+(a-e)/f}}d=Math.floor(d*60);if(d<0){d+=360}return{h:d,s:m,v:k}}", "function hex2rgba(h) {return ...
[ "0.7845078", "0.7804882", "0.78008604", "0.78008604", "0.78008604", "0.78008604", "0.78008604", "0.78008604", "0.78008604", "0.74784446", "0.737449", "0.7370155", "0.7368779", "0.73086345", "0.7290596", "0.7265298", "0.7256513", "0.7256513", "0.7256513", "0.7256513", "0.72565...
0.7912392
0
When setting css, check for element and apply new values / eslintdisablenextline accessorpairs
set css(val) { if (this.vueMeta) { if (this.isVueMeta23) { this.applyVueMeta23(); } return; } this.checkOrCreateStyleElement() && (this.styleEl.innerHTML = val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateStyles() {\n if (this.$element) {\n const cssText = createCssText(createDOMStyles(this.state, this.attributes));\n if (cssText !== this._lastCssText) {\n this.$element.style.cssText = cssText;\n this._lastCssText = cssText;\n }\n }\n }", "applyStyleValues() {\n if (t...
[ "0.6610036", "0.60850394", "0.59433526", "0.59344363", "0.59344363", "0.5890677", "0.58889997", "0.5826869", "0.58209974", "0.57834804", "0.5718843", "0.5681712", "0.56767607", "0.5650283", "0.56187505", "0.5607577", "0.56039673", "0.5603208", "0.5582643", "0.5582643", "0.558...
0.62238073
1
Check for existence of style element
checkOrCreateStyleElement() { this.styleEl = document.getElementById('vuetify-theme-stylesheet'); /* istanbul ignore next */ if (this.styleEl) return true; this.genStyleElement(); // If doesn't have it, create it return Boolean(this.styleEl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasStyleAttr(element) {\n\treturn element.attr && element.attr.style;\n}", "function hasStyle(input)\n{\n\treturn (input.indexOf('<style') != -1 || input.indexOf('<Style') != -1 || input.indexOf('<STYLE') != -1);\n}", "function hasStyleAttribute( tagNode )\n{\n return( tagNode.getAttribute( strStyle...
[ "0.7726551", "0.7563984", "0.7550616", "0.74411005", "0.7109592", "0.71090186", "0.698312", "0.65703225", "0.6500827", "0.64787835", "0.62098026", "0.6195582", "0.6121575", "0.60691744", "0.60441756", "0.60441756", "0.60441756", "0.60441756", "0.60441756", "0.60441756", "0.60...
0.763219
1
Is using v2.3 of vuemeta
get isVueMeta23() { return typeof this.vueMeta.addApp === 'function'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMeta () {\n }", "function _meta_(v,m){var ms=v['__meta__']||{};for(var k in m){ms[k]=m[k]};v['__meta__']=ms;return v}", "meta(meta) {\n return meta\n }", "function version(){ return \"0.13.0\" }", "get meta() { return this.get('meta'); }", "get version() {\n return \"3.1.4\";\n }", "has...
[ "0.6474948", "0.6343337", "0.6205793", "0.5877179", "0.5875238", "0.58286834", "0.57942474", "0.5764672", "0.57195985", "0.5672876", "0.5670245", "0.5665408", "0.56089973", "0.560681", "0.55563855", "0.5525372", "0.55219483", "0.5515762", "0.54707843", "0.5410557", "0.5371246...
0.7463433
0
Gets the first visible child in the openMenuNode Necessary incase menu nodes are being dynamically hidden
function firstVisibleChild() { for (var i = 0; i < openMenuNode.children.length; ++i) { if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') { return openMenuNode.children[i]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstVisibleChild(){for(var i=0;i<openMenuNode.children.length;++i){if($window.getComputedStyle(openMenuNode.children[i]).display!='none'){return openMenuNode.children[i];}}}", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if (window.getComputed...
[ "0.89793664", "0.89350384", "0.62130666", "0.6061701", "0.6019986", "0.59450936", "0.5931709", "0.59267825", "0.5833989", "0.5821697", "0.58136415", "0.57864517", "0.57707655", "0.5678464", "0.56645966", "0.56645966", "0.56645966", "0.56645966", "0.56645966", "0.56645966", "0...
0.8965349
1
Submits the generation data to the server and returns a list of pokemon for the selected generations.
async function submitGeneration(evt) { evt.preventDefault(); let generations = []; for (let i = 1; i < $gens.length + 1; i++) { generations.push($gens[i - 1].is(':checked')); } resp = await axios.post('/api/sorter/generate', { generations }); if (resp.data['error']) { window.location.replace('/sorter'); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAll () {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemon...
[ "0.60633266", "0.6047596", "0.6047596", "0.6047596", "0.6047596", "0.6047596", "0.60160655", "0.60033935", "0.5973268", "0.59648204", "0.566658", "0.5656137", "0.56246287", "0.56032634", "0.55763125", "0.5511878", "0.5497983", "0.54858863", "0.542889", "0.5413004", "0.5412741...
0.6289206
0
Setup for all pokemon sorting.
function start_sort(pokemonList) { idList = pokemonList; leftArr = []; rightArr = []; position = 0; generatePositions(0, idList.length - 1); preloadImages(); initializeValues(); showSorter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareSortingAndOrders(container) {\n\n\t\t\tvar opt = getOptions(container);\n\n\t\t\t/************************************************\n\t\t\t\t-\tHANDLING OF SORTING ISSUES -\n\t\t\t*************************************************/\n\n\t\t\t// PREPARE THE DATE SRINGS AND MAKE A TIMESTAMP OF IT\n\t\...
[ "0.61605215", "0.6146671", "0.6125519", "0.6023437", "0.5974727", "0.59689194", "0.59285563", "0.59110135", "0.59000033", "0.5895109", "0.5868067", "0.57779914", "0.57371277", "0.57291186", "0.5717289", "0.569634", "0.56774807", "0.56562245", "0.56315523", "0.5630292", "0.561...
0.6429492
0
Loads the pokemon data into the sorter.
async function loadPokemonData() { buttonsOn(false); pokemon1 = idList[currentL]; resp = await axios.get(`/api/pokemon/${idList[currentL]}`); poke1 = resp.data; pokemon2 = idList[currentR]; resp = await axios.get(`/api/pokemon/${idList[currentR]}`); poke2 = resp.data; loadHTML(poke1, 1); loadHTML(poke2, 2); g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readInFile() {\n //Goes through the json files and populate the pokemon list\n for (var i = 0; i < pokemon.length; ++i) {\n var currentPokemon = pokemon[i];\n\n var id = currentPokemon.id\n var name = currentPokemon.name;\n var type = currentPokemon.type;\n...
[ "0.63093394", "0.6224002", "0.61987793", "0.6192055", "0.6008714", "0.5969065", "0.5868196", "0.5842294", "0.58328", "0.58113927", "0.5806991", "0.58033645", "0.57851344", "0.5744903", "0.5702332", "0.56884426", "0.5653876", "0.5629792", "0.55953574", "0.55596614", "0.5555416...
0.6378874
0
Estimated number of comparisons to sort the list.
function estimatedComparisons() { n = idList.length; result = n * Math.log(n) - Math.pow(2, Math.log(n)) + 1; return Math.floor(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ComparisonSort(e,t,n){this.init(e,t,n)}", "function sorter(a, b) {\n var diff = concordance.getCount(b) - concordance.getCount(a);\n return diff;\n }", "function sorter(a, b) {\n var diff = concordance.getCount(b) - concordance.getCount(a);\n return diff;\n }", "funct...
[ "0.6227397", "0.61897945", "0.61645186", "0.6140679", "0.60942686", "0.60630727", "0.60630727", "0.60157406", "0.59775496", "0.5970317", "0.5892305", "0.5892072", "0.5875437", "0.5875437", "0.5863734", "0.58611566", "0.5848181", "0.5841922", "0.5827277", "0.5795507", "0.57770...
0.6765743
0
Repositions the position in the leftArr and rightArr.
function reposition() { for (let i = 0; i < tempArr.length; i++) { idList[left + i] = tempArr[i]; } position++; if (!finishedSorting()) { initializeValues(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchIndexValues(arr, leftIndex, rightIndex) {\n // Hold the left indexes value because it will get overridden;\n var placeholder = arr[leftIndex];\n\n // Set the left indexes value to the right\n arr[leftIndex] = arr[rightIndex];\n\n // Set the right indexes value to t...
[ "0.6601457", "0.6323525", "0.6222218", "0.6206747", "0.61330986", "0.58899647", "0.5831031", "0.58199", "0.5809129", "0.5796956", "0.57311094", "0.569525", "0.5670327", "0.56482995", "0.55940866", "0.5576509", "0.5559751", "0.55572516", "0.5539779", "0.542567", "0.542169", ...
0.65262634
1
Loads the HTML for the pokemon.
function loadHTML(pokemon, side) { $selector = $(`#pokemon-${side}-container`); $selector.find('img').first().attr('src', `${ART_URL}${pokemon.id}.png`); $selector.find('.pokemon-id').first().text(pokemon.id); $selector.find('.pokemon-name').first().text(pokemon.name); $selector.find('.pokemon-region').first().tex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadPoke(){\n\t\t//testing\n\t\t//console.log(this.pokes[this.current].abilities);\n\n\t\tpokeName.innerHTML = this.pokes[this.current].name;\n\t\tpokePic.src=this.pokes[this.current].img;\n\t\tpokePic.alt=\"Image of \"+this.pokes.name;\n\t\t//console.log(this.pokes[this.current].img);\n\t\t$(\"#hp\").html(this.po...
[ "0.68958837", "0.6801201", "0.6420661", "0.6381561", "0.63720626", "0.63460827", "0.6338755", "0.62713414", "0.6264703", "0.6213644", "0.62122047", "0.61304384", "0.6091856", "0.60304564", "0.5973808", "0.59696615", "0.5948789", "0.59217983", "0.59123445", "0.5909545", "0.585...
0.76228297
0
Generates the move list for the current pokemon
function generateMoveList(pokemon, side) { $selector = $(`#move-${side}-table`); $selector.html(''); pokemon.moves.forEach(function(move) { $template = $('<div>').html(MOVE_TEMPLATE); $template.find('.move-name').text(move.name); $template.find('.move-damage-class').text(move.damage_class); $template.find('....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayYourPokemonMoves(pokemon) {\n // for (i = 0; i < pokemon.moves.length; i++) { \n // console.log(pokemon.moves[i].move.name); \n // }\n yourPokemonMoves = pokemon.moves.map((move) => {\n return move.move\n })\n moves = pokemon.moves.map((move) => {\n return move.move.na...
[ "0.7651938", "0.67835444", "0.65841246", "0.6550736", "0.6215371", "0.6155965", "0.6004769", "0.5979668", "0.59319705", "0.5922045", "0.5910674", "0.5878292", "0.5868019", "0.58654976", "0.58495855", "0.58265054", "0.58252114", "0.581983", "0.5813649", "0.5804153", "0.5800783...
0.7973696
0
Define uma action/middleware para a rota.
defineAction(middleware) { this.action = middleware; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function middleware(request, response, next) {}", "function log(req,res,next){\n\n // console.log('hello osho middleware function is running');\n next();// next function helps to change in req,res cycle\n}", "function set_routes() {\n\n // Check your current user and roles\n app.get( '/status/:id'...
[ "0.6085372", "0.60139465", "0.5918525", "0.5859936", "0.5800409", "0.57863605", "0.57021654", "0.56875443", "0.5639196", "0.5610983", "0.5563516", "0.55556774", "0.5548468", "0.55385774", "0.5538148", "0.5537647", "0.55337876", "0.5515461", "0.5513462", "0.551305", "0.5508901...
0.7357193
0