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
get time interval based on what speed the user selects if start is disabled, clear and reset the timer and run the animation
function speedchange() { time = this.value; if(document.getElementById("start").disabled) { clearInterval(timer); timer = setInterval(run, time); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSpeed() {\n if (id(\"start\").disabled) {\n clearInterval(timer);\n let speed = parseInt(id(\"speed\").value);\n timer = setInterval(handleText, speed);\n }\n }", "function start () {\n var FPS = Math.round(1000 / options.speed);\n timerHandler = setInterval(ani...
[ "0.7486035", "0.68723375", "0.66942114", "0.66757256", "0.66163343", "0.65620685", "0.6537545", "0.6491211", "0.64904034", "0.64721024", "0.64661056", "0.64387786", "0.6433051", "0.64322495", "0.64311975", "0.63752955", "0.6375102", "0.63686526", "0.6362549", "0.63584137", "0...
0.77133524
0
if stop button is disabled disable start button and animation droplist, and enable stop button otherwise enable start button and animation droplist, and disable stop button
function disable() { if(document.getElementById("stop").disabled) { document.getElementById("start").disabled = true; document.getElementById("stop").disabled = false; document.getElementById("animation").disabled = true; } else { document.getElementById("stop").disabled = true; document.getElementById("sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disable() {\n this.eButtonStartStop_.disabled = true;\n }", "enable() {\n this.eButtonStartStop_.disabled = false;\n }", "function flipDisableOption() {\n\t\t$(\"start_button\").disabled = !$(\"start_button\").disabled;\n\t\t$(\"stop_button\").disabled = !$(\"stop_button\").disabled;\n\t\t$(\"animation...
[ "0.732677", "0.72716516", "0.7206507", "0.7172044", "0.71125317", "0.70612067", "0.69758314", "0.6960936", "0.6863941", "0.67348284", "0.662891", "0.6584649", "0.64912397", "0.64820707", "0.64799285", "0.64636236", "0.64449376", "0.6411235", "0.63996273", "0.6388684", "0.6354...
0.7369225
0
This sample demonstrates how to Update an exiting AppComplianceAutomation report.
async function reportUpdate() { const reportName = "testReportName"; const parameters = { properties: { offerGuid: "0000", resources: [ { resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateReport({ commit, rootState }, report) {\n return axios.patch(\n `${constant.api.enframe}apps/${rootState.application.id}/reports/${report._id}`,\n report,\n ).then(() => {\n commit('updateReport', report);\n }).catch(({ response }) => {\n this.dispatch('snackbar/sho...
[ "0.57661694", "0.5480536", "0.53786457", "0.5309165", "0.5253225", "0.5232653", "0.5223175", "0.5107659", "0.5074898", "0.50269705", "0.50109977", "0.500382", "0.50008243", "0.49902973", "0.49811652", "0.49714547", "0.49681425", "0.49437296", "0.49399784", "0.49294", "0.49177...
0.7132201
0
Open/Close Buttons used if a paremeter of a particular section is set
function openSectionManually(sectionName){ $("#" + sectionName).show() sectionOpenButton = $("#showButtonSection").find("button[openSectionID=\'" + sectionName + "\']") $(sectionOpenButton).hide() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openSection () {\n openSectionBindClick('sliderServiciosEsp', 'slideServiciosEspeciales', 'slideServiciosEspecialesMobile')\n openSectionBindClick('sliderEquipajeExtra', 'slideEquipajeExtra', 'slideEquipajeExtraMobile')\n openSectionBindClick('sliderDeportivoInstrumento', 'slideDeportivoInstrumen...
[ "0.6262434", "0.61591053", "0.60098046", "0.59665513", "0.592066", "0.58772486", "0.5790033", "0.578304", "0.5731019", "0.5706925", "0.5685499", "0.5654724", "0.5647356", "0.56444615", "0.5623962", "0.55848926", "0.55826676", "0.5580255", "0.5568865", "0.55281955", "0.5526455...
0.70465326
0
removes the player by id
function removePlayer(id) { ids.splice(ids.indexOf(id), 1); delete players[id]; status.names.splice(status.names.indexOf(id), 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removePlayer(id){\n\t\tif (id in this.players){\n\t\t\tthis.removed_players[id] = ({score: this.players[id].score, health: this.players[id].health, bullets: this.players[id].bullets});\n\t\t\tthis.removeSquare(this.players[id]);\n\t\t}\n\t}", "removePlayer(id) {\n let index = this.findPlayerIndex(id);\n ...
[ "0.8107222", "0.8045779", "0.7863962", "0.78471446", "0.76118195", "0.7581774", "0.7552822", "0.7536721", "0.7418838", "0.7222386", "0.7212421", "0.7072292", "0.70668286", "0.7044797", "0.70445937", "0.7013153", "0.699167", "0.69865763", "0.69511724", "0.693371", "0.6894806",...
0.829203
0
Check if the database file exists resolves true if it exists, rejects false if it does not Currently does not work
static dbExists() { return fileExists(`${config.database.path}/db-${config.production ? 'production' : 'testing'}.db`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doesDatabaseExist() {\n const command = `psql -l ${dbConfig.connection.url} | head`; // will fail if database does not exist\n\n return new Promise((resolve, reject) => {\n exec(command, (err, stdout, stderr) => {\n if (stderr.match(/database \"\\w+\" does not exist/)) {\n re...
[ "0.736825", "0.70152485", "0.6650857", "0.6546337", "0.6330832", "0.6323302", "0.6267518", "0.6244585", "0.61872923", "0.6164684", "0.6088517", "0.6057658", "0.60162383", "0.5993037", "0.59651226", "0.59624714", "0.59600765", "0.5929039", "0.5929039", "0.59192336", "0.5913465...
0.78096104
0
Instances of this interface represent nested FX slots in devices.
function DeviceSlot() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get slots() {\n return {};\n }", "slots(slots) {\n if (slots) {\n for (const slot of Object.keys(slots)) {\n const slotValue = slots[slot];\n this.slot(slot, slotValue);\n } \n }\n return this;\n }", "getSlots() {\n\t\tr...
[ "0.54381883", "0.52620995", "0.5110314", "0.49830827", "0.49656743", "0.49232075", "0.49008638", "0.48755476", "0.48501673", "0.48140663", "0.48139822", "0.48060462", "0.4789669", "0.47637862", "0.4760383", "0.47341904", "0.4708351", "0.47062543", "0.4671238", "0.46607217", "...
0.62166315
0
Check before sunmitting whether all the coordinated including X,Y, height(h) and width(w). All coordinated are required for cropping. Alert the user otherwise.
function checkCoords(){ if (parseInt($('#w').val())) return true; alert('Please select a crop region then press submit.'); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkExpanse(x, y){\n\n\t//check bounds\n\tvar w = drawing.style(\"width\");\n\tvar h = drawing.style(\"height\");\n\n\tif(x>w){\n\t\tdrawing.style(\"width\", w+x);\n\t}\n\tif(y>h){\n\t\tdrawing.style(\"height\", h+y);\n\t}\n\n}", "function check_pos(){\n\t//Write our checking of all positions\n\n\tif (...
[ "0.6541318", "0.6070013", "0.5919871", "0.590055", "0.5893416", "0.5876563", "0.5870217", "0.58600354", "0.58345383", "0.5793332", "0.57344264", "0.5734302", "0.5718321", "0.5709358", "0.56805515", "0.5648229", "0.56450754", "0.5614456", "0.560816", "0.55942965", "0.5559548",...
0.6874022
0
rotateLeft function is used to rotate to left. This rotates the whole div in stead of just image.
function rotateLeft(){ // Subtract 90 from current angle to rotate by 90 in anti-clockwise direction. angle -=90; // Rotate the jcrop-holder div by angle value. $(".jcrop-holder").rotate(angle); // Bedore setting rotate variable, make it positive angle if it is negative // T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "rotateLeft() {\r\n if (this.actual.rotateLeft()) {\r\n this.sounds.play(\"rotate\");\r\n }\r\n }", "leftRotate(node) {\n if (node.right) {\n const rightNode = node.right;\n node.right = rightNode.left;\n rightNode.left = node;\n \n node.height = Math.max(th...
[ "0.7093524", "0.6990932", "0.6978652", "0.6917869", "0.69042414", "0.689975", "0.68817693", "0.6863244", "0.6842459", "0.68417275", "0.6768749", "0.6655536", "0.66084844", "0.6570547", "0.6561532", "0.6535354", "0.6530418", "0.6522412", "0.6514318", "0.6477058", "0.64489543",...
0.803145
0
rotateRight function is used to rotate to right. This rotates the whole div in stead of just image.
function rotateRight(){ // Subtract 90 from current angle to rotate by 90 in anti-clockwise direction. angle +=90; // Rotate the jcrop-holder div by angle value $(".jcrop-holder").rotate(angle); jcrop_api.setOptions({rotate : angle}); // Wrap around the angle to 0 because a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "turnRight(){\n this.orientation++;\n if(this.orientation > 3){\n this.orientation = 0;\n }\n this.graphicalObject.rotateY(-Math.PI/2);\n }", "rotateRight() {\r\n if (this.actual.rotateRight()) {\r\n this.sounds.play(\"rotate\");\r\n }\r\n }", ...
[ "0.72121614", "0.7136876", "0.7028132", "0.699025", "0.69705623", "0.6856979", "0.68268746", "0.67391443", "0.67051923", "0.67021775", "0.66955507", "0.6568175", "0.6501345", "0.6493086", "0.6424151", "0.6414018", "0.6345991", "0.6341055", "0.63127947", "0.6303479", "0.629050...
0.79624844
0
updateCoords function is called whenever the new area is selected or the selector box is dragged around the image.
function updateCoords(c){ // Update the co-ordinates after every mouse drag or select event. $('#x').val(c.x) $('#y').val(c.y) $('#w').val(c.w) $('#h').val(c.h) $('#d').val(angle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectBox() {\n\tclear();\n\t$('#imgcanvas').imgAreaSelect({\n\t\thandles : true,\n\t\tonSelectEnd : function(img, selection) {\n\t\t\t// create box\n\t\t\tvar box = [selection.x1, selection.y1, selection.width, selection.height];\n\t\t\t// do fitting\n\t\t\tpositions = estimatePositions(box);\n\t\t\tif (...
[ "0.6438222", "0.637046", "0.62379813", "0.6222115", "0.61966133", "0.608107", "0.60324144", "0.6024351", "0.60215926", "0.60136575", "0.5967221", "0.5965064", "0.59519506", "0.5927299", "0.59100574", "0.58981556", "0.5895585", "0.5885388", "0.5872907", "0.58640325", "0.585474...
0.66788775
0
Color a Cell based on Cell Number
function color(cellNum, color) { document.getElementById(cellNum.toString()).style.backgroundColor = color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorCell(i, j, strColor) {\n //model\n var cell = gBoard[i][j];\n\n //if clicked on a cell decrement the counter\n if (strColor !== 'red' && !cell.isShown) gClickedCellsCounter--;\n cell.isShown = true;\n\n //DOM\n var elCell = document.querySelector(`#cell${i}-${j}`);\n elCell.style.backgroundCo...
[ "0.7468015", "0.7292235", "0.7256162", "0.72552025", "0.70631063", "0.7025409", "0.6997822", "0.6941539", "0.68994796", "0.68590504", "0.68575996", "0.6809859", "0.68008715", "0.67652744", "0.6756527", "0.67492336", "0.66729033", "0.66472954", "0.6627778", "0.661967", "0.6593...
0.75526386
0
draw the currently slected color
function drawCurrentColor() { $('#selected').html(' '); let div = '<div id="colorSelected"></div>'; $('#selected').append(div); $('#colorSelected').css('background', SQUARE_COLORS_ARRAY[colorIndexWeAreDrawing]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw(e) {\n e.target.style.backgroundColor = choosenColor();\n}", "function draw()\n{\n\tif (select != color && color != null) {\n\t\tselect.backgroundColor = color;\n\t}\n\trequestAnimationFrame(draw);\t\n}", "selectColor(x, y, wd, ht){\n this.colorSec = this.colorPromedio(x, y, wd, ht);\n ...
[ "0.77691376", "0.75226504", "0.7346586", "0.7161896", "0.70876926", "0.70750475", "0.70233816", "0.7019335", "0.7018212", "0.70035744", "0.697785", "0.6914351", "0.69110066", "0.6893277", "0.6893055", "0.6850367", "0.6804736", "0.67931116", "0.6784391", "0.6772463", "0.676242...
0.8042133
0
Sets the ray from world coordinates and a camera
FromCamera(coords, camera) { if ("SetRayFromCoords" in camera) { camera.SetRayFromCoords(coords, this.ray); ray3.normalize(this.ray, this.ray); } else { throw new Error("Camera does not support ray casting"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFromCamera ( coords, camera ) {\n\n\t\tif ( ( camera && camera.isPerspectiveCamera ) ) {\n\n\t\t\tthis.ray.origin.setFromMatrixPosition( camera.matrixWorld );\n\t\t\tthis.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();\n\t\t\tthis.camera = camera;\n\n\t\t} el...
[ "0.70201707", "0.69107646", "0.67152035", "0.65508646", "0.6379754", "0.6374137", "0.6333948", "0.632209", "0.6268024", "0.61132437", "0.6077057", "0.6015619", "0.5981698", "0.5954189", "0.5945527", "0.5897394", "0.5888202", "0.588143", "0.5860581", "0.583836", "0.5805735", ...
0.7332112
0
check that you need to use `for await` statement to yank ayncgenerator
async function useAsyncGenerator () { for await (let item of asyncGenerator(3)) { console.log(item) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "[Symbol.asyncIterator]() {\n return __asyncGenerator(this, arguments, function* _a() {\n yield __await(yield* __asyncDelegator(__asyncValues(this.iterate())));\n });\n }", "async function g() {\n for await (const x of createAsyncIterable(['e', 'f', 'g'])) {\n conso...
[ "0.7008035", "0.68274033", "0.6575567", "0.6487422", "0.6464693", "0.6401273", "0.6401273", "0.62942487", "0.62577665", "0.62263876", "0.6209907", "0.6146894", "0.61177367", "0.6112428", "0.6070282", "0.60137105", "0.59811753", "0.59811753", "0.59811753", "0.59811753", "0.598...
0.7718801
0
Constructor The constructor receives as input, in addition to the root query calculation node which owns it, also the ID of the path in the indexer which it projects. This path is given relative to the root of the indexer.
function ProjectionQueryCalc(rootQueryCalc, pathId) { // call base constructor this.InternalQueryCalc(rootQueryCalc); // initialize derived class fields (selection-projection related fields are // constructed only when needed). this.projMatches = undefined; this.pathId = pathId; /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ProjectImpl$(path/*:String*/) {\n this.super$wRDq(path);ADD_MEMBERS_URI_SEGMENT_.call(this);REMOVE_MEMBERS_URI_SEGMENT_.call(this);ADD_CONTENTS_URI_SEGMENT_.call(this);REMOVE_CONTENTS_URI_SEGMENT_.call(this);;\n }", "function GraphQueryable(baseUrl, path) {\r\n var _this = _super.call(this) |...
[ "0.5373062", "0.5369259", "0.5349878", "0.5332875", "0.5307138", "0.5297616", "0.5263731", "0.52418077", "0.51956683", "0.51716745", "0.514473", "0.51198316", "0.508801", "0.5062726", "0.5062726", "0.50610137", "0.5060942", "0.5035517", "0.5017973", "0.50155437", "0.5004649",...
0.6459734
0
draws ellipse inside given rectangle
function draw_ellipse(ctx, x, y, width, height) { let radius_x = width / 2; let radius_y = height / 2; let center_x = x + radius_x; let center_y = y + radius_y; ctx.beginPath(); ctx.ellipse(center_x, center_y, radius_x, radius_y, 0, 0, 2 * Math.PI, false); ctx.closePath(); ctx.stroke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawEllipse(centerX, centerY, width, height) {\n //start a shape\n context.beginPath();\n //Set cursor a ellipse top center\n context.moveTo(centerX, centerY - height / 2);\n //right part\n context.bezierCurveTo(\n centerX + width / 2, centerY - height / 2,\n centerX + widt...
[ "0.76551944", "0.7294987", "0.72706866", "0.72699153", "0.7243779", "0.7148503", "0.7082527", "0.70803994", "0.7067102", "0.7054131", "0.70023525", "0.6978541", "0.69400823", "0.6939952", "0.69191515", "0.6908184", "0.6867579", "0.6862641", "0.67984134", "0.6782915", "0.67735...
0.7735339
0
Loop over every row in table view and validate the contents
function validateForm() { var messageString = ""; // Start with blank error message var tableViewRows = $.tableView.data[0].rows; for (var i = 0; i < tableViewRows.length; ++i) { var fieldObject = tableViewRows[i].fieldObject; var value = getFieldValue(tableViewRows[i]); if (fieldObject.field_type ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkInvalidRow() {\n\ttry {\n\t\tvar check \t= 0;\n\t\tvar flag \t= false;\n\t\t$('#table-internal-order tbody tr').each(function() {\t\n\t\t\tcheck \t= \t0;\n\t\t\tvar product_cd \t\t= \t$(this).closest('tr').find('.TXT_product_cd').val();\n\t\t\tvar in_order_qty \t=\t$(this).closest('tr').find('.TXT_in...
[ "0.6251775", "0.6250267", "0.61712253", "0.61267185", "0.6082043", "0.6003462", "0.59960574", "0.59806937", "0.5939484", "0.5878373", "0.58321273", "0.5820824", "0.58169574", "0.5766329", "0.575334", "0.5744147", "0.57355", "0.5728173", "0.57232654", "0.57084066", "0.5705368"...
0.6588952
0
Returns the value from the corresponding textField, switchers, etc. (Not all fields have textFields)
function getFieldValue(tableViewRow) { if (tableViewRow.fieldObject.field_type == 'Text') { return tableViewRow.textField.value } else if (tableViewRow.fieldObject.field_type == 'Checkbox') { return tableViewRow.switcher.value } else if (tableViewRow.fieldObject.field_type == 'Integer') { return tableViewRow.textFi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTextValue( stField )\n{\n var oValue = getObject(stField); // document.getElementById(stField);\n if ( oValue != null )\n {\n if( oValue.value != null )\n {\n return oValue.value;\n }\n }\n return \"\";\n}", "get textField() {\n return this.i.jv;\n }", "function getFiel...
[ "0.7039853", "0.7028343", "0.675303", "0.6700474", "0.66334254", "0.65785694", "0.6422913", "0.6387506", "0.63566804", "0.6321269", "0.6316597", "0.6315536", "0.6299868", "0.6276631", "0.6194154", "0.6160707", "0.61405915", "0.61265343", "0.60991925", "0.60973", "0.60897636",...
0.7135163
0
losowanie 5 kart pokerSet
function drawSet(deck){ let set=[]; for(let i=0;i<5;i++){ let randomNumber = Math.floor(Math.random()*deck.length); let randomCard = deck[randomNumber]; set.push(randomCard); deck.splice(randomNumber,1); } return set; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jelPoker(niz)\n{\n\tvar skup = napraviSet(niz);\n\n\t/* since we dont have [] operator for sets in java script */\n\tvar tmpn = Array.from(skup);\n\n\t/* ako je velicina skupa 1, imamo yamb sto je vec poker */\n\tif (skup.size === 1)\n\t{\n\t\treturn 4*tmpn[0] + 50;\n\t}\n\n\t\t\n\t/* ako je velicina skup...
[ "0.73403543", "0.6859843", "0.6627732", "0.623485", "0.6211297", "0.61935353", "0.61502266", "0.6049103", "0.5977612", "0.5976898", "0.59749365", "0.5942855", "0.5934735", "0.592866", "0.58671945", "0.58489144", "0.5848128", "0.5834411", "0.5828774", "0.5826405", "0.5812958",...
0.69196093
1
get a value by the componentid
getValueByComponentId(componentId) { const tuple = this.hashMap.get(componentId.toString()); if (!tuple) return null; return tuple[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValue(id) {\r\n return getElm(id).value;\r\n}", "get(component) {\n return this.hashMap.get(component.id.toString());\n }", "function idOfComponent(v) {\n return id[v];\n }", "function getValue(id) {\n return $(`#${id}`).val();\n}", "function getValue(id) {\n return document.getE...
[ "0.7196426", "0.690505", "0.66586846", "0.66362274", "0.66080534", "0.65013117", "0.6472691", "0.6455032", "0.6430892", "0.636203", "0.6330448", "0.63103604", "0.6293164", "0.61775523", "0.6167678", "0.61613697", "0.6149085", "0.6130247", "0.6097602", "0.60420156", "0.6032122...
0.8036252
0
map entries and return a new component map.
map(predicate) { const tuples = this.toArray().map(([component, value]) => { const newValue = predicate(value, component); return [component.id.toString(), [component, newValue]]; }); return new ComponentMap(new Map(tuples)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMap( entries ){\n\tvar map = new Map();\n\n\tfor (var i = 0;i < entries.length;i++)\n\t\tmap.set(entries[i][0], entries[i][1]);\n\n\treturn map;\n}", "static as(components, predicate) {\n const tuples = components.map(component => {\n return [component.id.toString(), [component, predicate(...
[ "0.6455436", "0.61813074", "0.58921105", "0.557772", "0.55056596", "0.5464094", "0.54330254", "0.54189414", "0.54184335", "0.54147625", "0.539521", "0.5389632", "0.5350272", "0.5339484", "0.52950037", "0.52754194", "0.5208477", "0.5193997", "0.5137028", "0.51325095", "0.51291...
0.70768183
0
flatten values of all components into a single array.
flattenValue() { return this.toArray().reduce((acc, [, value]) => { acc = acc.concat(value); return acc; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flatten() {\n return [].concat(...this.map(v => (Array.isArray(v) ? flatten(v) : v)));\n}", "function flatten(arr){return Array.prototype.concat.apply([],arr);}", "function flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n }", "function flatten(arr) {\n const result = ...
[ "0.71538985", "0.7069112", "0.6977382", "0.6935856", "0.6926775", "0.686598", "0.68515444", "0.6841322", "0.68259984", "0.68190324", "0.67569715", "0.67511654", "0.67107373", "0.66890204", "0.66859263", "0.6683901", "0.6683901", "0.6683901", "0.6683901", "0.6683901", "0.66839...
0.7932869
0
create a component map from components and a value predicate.
static as(components, predicate) { const tuples = components.map(component => { return [component.id.toString(), [component, predicate(component)]]; }); return new ComponentMap(new Map(tuples)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "map(predicate) {\n const tuples = this.toArray().map(([component, value]) => {\n const newValue = predicate(value, component);\n return [component.id.toString(), [component, newValue]];\n });\n return new ComponentMap(new Map(tuples));\n }", "filter(predicate) {\n const tuples = this.toArr...
[ "0.76787925", "0.7186699", "0.5037826", "0.48955703", "0.48665735", "0.48094335", "0.4731133", "0.47284082", "0.47284082", "0.4696755", "0.46443662", "0.45914087", "0.45609683", "0.45338425", "0.45225593", "0.45191747", "0.45104012", "0.4509275", "0.44959378", "0.44670212", "...
0.784139
0
Ventas por mes: Total de enero 2019: 1250 Total de febrero 2019: 4210 renderPorSucursal(): Muestra una lista del importe total vendido por cada sucursal
function renderPorSucursal() { var ventasPorSucursal = []; for (i = 0; i < local.sucursales.length; i++) { ventasPorSucursal.push('Total de ' + local.sucursales[0] + ': ' + ventasSucursal(local.sucursales[0])); ventasPorSucursal.push(' Total de ' + local.sucursales[1] + ': ' + ventasSucursal(local.sucursale...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarCantEjResueltos(){\r\n let cantidadEntregas = cantEntregasDocente();\r\n document.querySelector(\"#divMostrarResueltos\").innerHTML = `Usted tiene en total ${cantidadEntregas} entregas de sus alumnos`;\r\n}", "function mostrarCarritoRecuperado()\n{\n for (const precio of carritoRecuperad...
[ "0.6570443", "0.6538286", "0.62216794", "0.62049544", "0.6177658", "0.6120666", "0.61050576", "0.6081549", "0.6052189", "0.6029268", "0.6006507", "0.5964725", "0.59410363", "0.5914239", "0.5911224", "0.5893164", "0.5892713", "0.5878135", "0.5874684", "0.58674055", "0.5863224"...
0.80627203
0
This gives ability to change sort order. By name, by date, or by starred. I'll need to be able to distinguish whether to use jasondata JSON data or filteredRepoList. (May need to make fRL global?)
function sortRepos(wantAsc) { // if we don't have an existing filter in place, use jsondata as our list of elements if (filteredRepoList.length == 0) { for (var m = 0; m < jsondata.length; m++) { filteredRepoList[m] = jsondata[m]; } } // we'll need to do different things bas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortJSON() {\n filteredObjects.sort(function(a, b) {\n var valueA, valueB;\n\n switch (sortParam) {\n // ascending by project name\n case 'asc':\n valueA = a.title.toLowerCase();\n valueB = b.title.toLowerCase();\n break;\...
[ "0.67514884", "0.64345044", "0.6422834", "0.62934226", "0.62934226", "0.6279715", "0.6269604", "0.6257073", "0.625077", "0.62275517", "0.6223963", "0.61654806", "0.6155898", "0.6102434", "0.60951555", "0.6085513", "0.60839164", "0.6077955", "0.6067625", "0.6062566", "0.602668...
0.72713286
0
Parse team member data
parseData() { const data = { members: [], subtotals: { teams: {} }, totals: { roles: {}, sprints: {} } }; let offset = 0; let hours = 0; let lastTeam = ''; // Sort by Team, then Name arraySort(team, 'team', 'name'); // Parse data f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseParticipantInfo(event) {\n\tparticipantInfo = event.data.replace(\"currentParticipantInfo\", \"\");\n\tparticipantInfo = JSON.parse(participantInfo);\n\tcurrentStage = participantInfo.stages;\n}", "function parseMember(object, member, parseArgs={}) {\n\t\n\t//debug(\"Parsing member \"+dispTokens(me...
[ "0.59313345", "0.5891985", "0.5850116", "0.5815249", "0.5782415", "0.5757404", "0.5722605", "0.5572982", "0.55610126", "0.5499868", "0.5414148", "0.5413054", "0.5407879", "0.53626454", "0.5339677", "0.5318596", "0.531776", "0.5313268", "0.52854955", "0.52533484", "0.52236027"...
0.62556446
0
Draw the team member table
renderTeams() { // Parse the data before beginning const data = this.parseData(); let cls = ''; let currentTeam = ''; let sprintHours let sprintCount = 0; let totalMemberHours = 0; let sprintData = ''; // Construct Sprint Header this.renderSprintHeaderRow(); // Get the ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTable(){\n for (employee of allEmployees){\n newRow(employee);\n }\n}", "render() {\n return (\n <div>\n <h2 className=\"text-center\">Football League Table</h2>\n <table cellSpacing=\"10\" className=\"text-left\">\n <thead>\n ...
[ "0.64084786", "0.63154656", "0.6282253", "0.6276129", "0.6239016", "0.6229335", "0.6222006", "0.6200579", "0.6189364", "0.618671", "0.61588115", "0.61472565", "0.6124787", "0.6094453", "0.60775733", "0.60732675", "0.6055459", "0.6049873", "0.60476744", "0.60351527", "0.60099"...
0.6875215
0
Render Team Name Row Draws the team name row in the Team chart
renderTeamNameRow(name, target, columns) { const sprintHeaders = markobj(`<tr><td colspan="${(5+columns)}" class="title">${name} Team</td></tr>`); target.appendChild(sprintHeaders); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderTeams() {\n\n // Parse the data before beginning\n const data = this.parseData();\n\n let cls = '';\n let currentTeam = '';\n let sprintHours\n let sprintCount = 0;\n let totalMemberHours = 0;\n let sprintData = '';\n\n // Construct Sprint Header\n this.renderSprintHeaderRow();\...
[ "0.72437096", "0.6812405", "0.6726941", "0.67260075", "0.6514941", "0.62880576", "0.626225", "0.6160466", "0.61593306", "0.61572003", "0.6130227", "0.61112046", "0.6000342", "0.59941334", "0.5918467", "0.5849688", "0.58363646", "0.5833766", "0.5810457", "0.5810222", "0.579874...
0.75067204
0
Renders Sprint Header Row
renderSprintHeaderRow() { const template = markobj(`<table> <thead> <tr> <th class="left">Member</th> <th>Role</th> <th>Time</th> <th>Hours</th> <!-- Inject Sprints --> </tr> </thead> <tbody> </tbody> </table>`); cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderHeader() {\n var tableHeader = document.createElement('tr')\n table.append(tableHeader)\n var cityLabel = document.createElement('th');\n cityLabel.textContent = 'Store Location';\n tableHeader.append(cityLabel);\n for (var i = 0; i < hours.length; i++) {\n var headerCellHour = document.cre...
[ "0.7457483", "0.7455025", "0.7426636", "0.7289442", "0.72507966", "0.72317874", "0.70984375", "0.70496726", "0.7033647", "0.69691867", "0.69461465", "0.6942331", "0.6882639", "0.6850387", "0.6824959", "0.6809808", "0.675988", "0.675988", "0.67494273", "0.67396855", "0.6728843...
0.79210466
0
Renders SubTotal Rows for Each Team
renderSubTotalRow(data, team) { const body = document.querySelector('#team-data table tbody'); const sprints = data.subtotals.teams[team]; let tr; let sprintCount = 0; let teamTotal = 0; let pointCount = 0; let sprintSubTotal = ''; let pointSubTotal = ''; for (let key in sprints) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderTeams() {\n\n // Parse the data before beginning\n const data = this.parseData();\n\n let cls = '';\n let currentTeam = '';\n let sprintHours\n let sprintCount = 0;\n let totalMemberHours = 0;\n let sprintData = '';\n\n // Construct Sprint Header\n this.renderSprintHeaderRow();\...
[ "0.77683365", "0.6403912", "0.6184389", "0.61461616", "0.6136004", "0.6084637", "0.60799897", "0.602834", "0.5991155", "0.59468406", "0.5937285", "0.59184706", "0.582418", "0.58206064", "0.58127487", "0.5806344", "0.58053553", "0.5760582", "0.57314116", "0.57172495", "0.56931...
0.79017276
0
================================================================================ 2D ARRAY SEARCH KEY ================================================================================
function Array2DSearchKey(arrayDict, key) { // search for the key for (var z = 0; z < arrayDict.length; z++) { if (arrayDict[z].indexOf(key) !== -1) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchIndexFromMultiDimArray(columnName, columnValue, arr) {\n for (var key in arr) {\n row = JSON.parse(arr[key]);\n if(row[columnName] === columnValue) {\n return key;\n break;\n }\n }\n\n return 'false';\n}", "function multiDimArraySearch(x, y, a) {...
[ "0.70707524", "0.69960696", "0.6791991", "0.6728486", "0.6699962", "0.6648457", "0.6576885", "0.65736085", "0.6504298", "0.64521855", "0.63895684", "0.6384529", "0.63724273", "0.63190895", "0.62667483", "0.61819035", "0.6174752", "0.61466265", "0.61053085", "0.6094178", "0.60...
0.7222838
0
================================================================================ Create Trainer Card ================================================================================
function CreateTrainerCard (trainer, titleContent) { var output = ""; // Trainer Pokemon Arrays // ------------------------------------------------------------------- var partyPokemon = []; var boxedPokemon = []; // loop through all of the t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBeercard() {\n var beername = document.getElementById('beerName').value;\n var beertype = document.getElementById('beerTypeInput').value;\n var abv = document.getElementById('abv').value;\n var hopType = document.getElementById('hopType').value;\n var shortDescription = document.getElementById(...
[ "0.62349725", "0.5974044", "0.5958437", "0.58822465", "0.5859861", "0.5819153", "0.5786784", "0.56759876", "0.56611323", "0.5646289", "0.56222624", "0.55858946", "0.55722916", "0.5551769", "0.5527333", "0.5521522", "0.5512147", "0.55076855", "0.55076844", "0.55075395", "0.548...
0.65834063
0
This function initialize the game. set default XM set empty inventory
function init() { setXM(XM_INITIAL_VALUE); span_xm_max.html(XM_INITIAL_VALUE); inventory = []; updateItem("resonateur", 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\r\n _lives = 5;\r\n _weapons = 10;\r\n }", "function initGame() {\n first_item_timestamp = Math.round((new Date().getTime()) / 100) / 10;\n initializeSetsOfChoices();\n adjustSlider(set[round][stage][1], set[round][stage][2], set[round][stage][3], set[round][stag...
[ "0.6706352", "0.6705376", "0.63611525", "0.62861323", "0.6067893", "0.6062566", "0.603768", "0.6026427", "0.5948538", "0.593558", "0.5931903", "0.58804965", "0.58687454", "0.5864483", "0.5863809", "0.5847592", "0.5846979", "0.58425015", "0.5834973", "0.5834125", "0.5832764", ...
0.7420369
0
Bind keys to section button.
function bindKeyEvent(section) { // Game is not fully loaded. if (keyboard_navigation == undefined) return; section.find("button").each(function (index) { let char = String.fromCharCode(keyboard_navigation[index]); $(this).data("charCode", keyboard_navigatio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupKeys () {\n this.inputKeys[this.keyMap['job']].onDown.add(() => {\n this.selectionMode = 'job';\n });\n\n this.inputKeys[this.keyMap['info']].onDown.add(() => {\n this.selectionMode = 'info';\n });\n }", "function registerKeyBindings() {\n // keys: alt+1 -> time frame favorite ...
[ "0.5988206", "0.5984526", "0.5744883", "0.5739324", "0.5735975", "0.5726648", "0.5647439", "0.562476", "0.55540013", "0.5552641", "0.55432016", "0.5538573", "0.552266", "0.5486384", "0.5476631", "0.54073125", "0.5406289", "0.5361908", "0.53501314", "0.5346699", "0.5335077", ...
0.75648606
0
This function update, add, or remove an image.
function updateImage(rule, selector, value, imageDataName, newName) { let img; if (rule == "add") { img = $("<img>"); img.attr("src", "images/" + value); let str = "100px"; img.css("width", str).css("height", str); // TODO Make a better CSS im...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async updateImage({ imageHash, tagList, md5 }) {\n if (!module.exports.enable()) return null;\n\n // update img\n let res = await _imgur.api.image.updateImage({ imageHash, tagList, md5 });\n if (res != true) return null;\n\n // get new data...
[ "0.6999572", "0.6697343", "0.66098064", "0.6576579", "0.6571857", "0.6527033", "0.63942385", "0.6387503", "0.63668525", "0.6307946", "0.62336475", "0.62223125", "0.62173116", "0.6169929", "0.615524", "0.60802686", "0.60790837", "0.60742795", "0.60687125", "0.60481375", "0.602...
0.68451077
1
Handle a single action
function handleSingleAction(action, next) { let actionName = action.attr("name"); let showInto; let item; log && console.log("Action received : " + actionName); switch (actionName) { case "start": init(); agentName = undefined; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAction(action) {\n console.log(\"action: %s\", action);\n}", "handleActions(action){\n\n switch(action.type){\n case \"DISPATCH_SALE\":\n this.dispatchSale(action.id);\n break;\n\n default: break;\n }\n }", "action() {}", ...
[ "0.7645057", "0.7236876", "0.714687", "0.7052078", "0.7039691", "0.69539416", "0.6934942", "0.6777827", "0.6763353", "0.6744235", "0.67205787", "0.665878", "0.66162646", "0.66120386", "0.6553386", "0.6543689", "0.6520099", "0.6451785", "0.64316565", "0.64316565", "0.64198005"...
0.74865866
1
Display solution of a glyph, for a given time.
function showSolution(time, glyphPictures, level) { let ol = $("<ol>"); let li; ol.html("Solution : "); for (let i = 0; i < level; i++) { li = $("<li>"); ol.append(li); } $("#glyphGame").prepend(ol); for (let i = 1; i <= level; i++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTime() {\n buf.clear();\n buf.setColor(1);\n var d = new Date();\n var da = d.toString().split(\" \");\n var time = da[4];\n buf.setFont(\"Vector\",50);\n buf.setFontAlign(0,-1);\n buf.drawString(time,buf.getWidth()/2,0);\n buf.setFont(\"Vector\",18);\n buf.setFontAlign(0,-1);\n var date = ...
[ "0.6266833", "0.62356377", "0.62195337", "0.62033045", "0.60225314", "0.5978403", "0.5961885", "0.5953747", "0.5905396", "0.5900851", "0.5895", "0.58898467", "0.5867045", "0.58569175", "0.5845125", "0.5828359", "0.5787773", "0.57844305", "0.575923", "0.5741932", "0.5721033", ...
0.6445667
0
Handle multiple actions, one after the others.
function handleActions(key, next) { let actions = $("#" + key).find("action"); if (actions.size() == 0) return; actions.each(function (index, action) { handleSingleAction($(action), next); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleActions(action){\n\n switch(action.type){\n case \"DISPATCH_SALE\":\n this.dispatchSale(action.id);\n break;\n\n default: break;\n }\n }", "handleActions(action) {\n // it is check by a switch and will have a type that id it\n switc...
[ "0.677798", "0.67722803", "0.66474366", "0.6566928", "0.6459983", "0.64534885", "0.64377844", "0.63350326", "0.6260467", "0.6257498", "0.6175933", "0.61218846", "0.6030343", "0.6028164", "0.60145426", "0.5966685", "0.5963981", "0.5922923", "0.58705103", "0.5829602", "0.581682...
0.68299896
0
Set XM of the player
function setXM(v) { span_xm.html(v); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPosXPlayers(posX, posXDiff) {\n players[0].x = posX;\n\n if (numberOfPlayers == 2) {\n if (posXDiff != undefined) {\n players[0].x = posX;\n players[1].x = posXDiff;\n } else { \n players[0].x = posX;\n players[1].x = canvas.wid...
[ "0.62905794", "0.62399524", "0.621302", "0.6196378", "0.61674803", "0.6139395", "0.6069049", "0.60237676", "0.5997198", "0.59951776", "0.5958489", "0.59412354", "0.5932783", "0.59166527", "0.5916309", "0.590966", "0.5908181", "0.5898945", "0.5877164", "0.5875645", "0.58690405...
0.6541838
0
This function reset counter of all cheatCode, except the one given in parameters
function resetCounterExcept(cheatCodeName) { let resetCode; if (cheatsCodes == undefined) return; if (cheatCodeName != undefined) { resetCode = $(cheatsCodes).filter(function () { return this.name != cheatCodeName; }); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCounter() {\r\n console.log(`${num} and the counter reset now`);\r\n num = 1;\r\n}", "function resetFruitTally() {\n grapes = 0;\n bananas = 0;\n oranges = 0;\n cherries = 0;\n bars = 0;\n bells = 0;\n sevens = 0;\n blanks = 0;\n}", "function resetFruitTally() {\n gra...
[ "0.66568106", "0.65585643", "0.65585643", "0.65516585", "0.6480074", "0.64726055", "0.6462892", "0.6455465", "0.644955", "0.64007527", "0.63875014", "0.6384434", "0.61932003", "0.61554766", "0.61495036", "0.60675305", "0.60606897", "0.60393155", "0.60393155", "0.6033903", "0....
0.7751834
0
get the list of all storages (external usb and internal hdd)
function getStorageInfo () { var snList = {}; // set of all serial numbers with amount of partitions on each // get mount points var info = JSON.parse(gSTB.GetStorageInfo('{}')); // valid non-empty data if ( Array.isArray(info.result) && info.errMsg === '' && info.result.length > 0 ) { info.result.forEach(func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDrives(command) {\n var result = exec(command, 2000);\n var drives = result.stdout.split('\\n');\n\n drives.splice(0, 1);\n drives.splice(-1, 1);\n\n // Removes ram drives\n return drives.filter(function(item){ return item != 'none';});\n}", "async getAllBlockDevices() {\n const ...
[ "0.66156113", "0.64510155", "0.63866806", "0.6219217", "0.6164863", "0.60202044", "0.5898776", "0.58514625", "0.56748646", "0.56530523", "0.5647218", "0.5633176", "0.5574458", "0.5574458", "0.55692613", "0.556839", "0.555349", "0.55423725", "0.55282015", "0.5521925", "0.55098...
0.74209213
0
This isn't actually being used for the following reason: The way the game scaling works (via CSS to the canvas element) doesn't play well with the vignette shader and the scanlines rendering proposed here. In order for this to work, a manual scaling would be needed to a bigger canvas. A different method for scanlines (...
function fakeCRT(options) { var glcanvas, source, srcctx, texture, w, h, hw, hh, w75; try { glcanvas = fx.canvas(); } catch (e) {return;} source = document.getElementsByTagName('canvas')[0]; //srcctx = source.getContext('2d'); // This tells glfx what to use as a source ima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "preRendering() {\n // ignore antialiasing\n this.ctx.mozImageSmoothingEnabled = false;\n this.ctx.webkitImageSmoothingEnabled = false;\n this.ctx.msImageSmoothingEnabled = false;\n this.ctx.imageSmoothingEnabled = false;\n // save state\n this.ctx.save();\n /...
[ "0.60183173", "0.5948088", "0.5853404", "0.5851193", "0.5832707", "0.58097464", "0.57961345", "0.57959443", "0.5769799", "0.5741919", "0.57403606", "0.5737587", "0.57264996", "0.5725725", "0.57221514", "0.57194394", "0.5712383", "0.566849", "0.56630147", "0.56542265", "0.5645...
0.73767436
0
Push A New Block To Chain
addBlock(newBlock) { newBlock.previousHash = this.getLatestBlock().hash newBlock.mineBlock(this.difficulty) this.chain.push(newBlock) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addBlock(block) {\n this.chain.push(block)\n // reset pending Transactions\n this.pendingTransactions = []\n }", "addBlock(data){\n let newBlock = new Block(this.getLatestBlock().index +1 , data, this.getLatestBlock().hash);\n this.mineBlock(this.difficulty, newBlock); ...
[ "0.7672761", "0.749999", "0.74230224", "0.73949087", "0.73629284", "0.7292093", "0.7289364", "0.72150284", "0.71640253", "0.7150288", "0.70970345", "0.707087", "0.7070499", "0.6884373", "0.68589675", "0.6766609", "0.6662721", "0.66515857", "0.6607328", "0.6590469", "0.6585603...
0.7543562
1
A Feather Passport adapter so that it plays nicely with Feathers services but remains engine and transport agnostic.
function feathersPassport(options) { var app = this; debug('Initializing Feathers passport adapter'); return { initialize: _initialize2.default.call(app, options), authenticate: _authenticate2.default.call(app, options) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupPassport() {\n console.log(\"Setting up passport\")\n passport.use(new LocalStrategy(\n async function(username, password, done) {\n db.get(`SELECT * FROM Employees WHERE email = ?`,[username], async (err, user) => {\n if (password && user && username && password)\n {\n ...
[ "0.65156263", "0.6482609", "0.63956726", "0.6079192", "0.59767455", "0.5975271", "0.5837456", "0.580953", "0.5803716", "0.57863736", "0.57130605", "0.5609264", "0.5602578", "0.5534548", "0.5488779", "0.5460989", "0.54202104", "0.5389562", "0.5348969", "0.53234965", "0.5313875...
0.7906166
0
Set url to receive incoming Telegram updates to the webAppUrl of the published Google script
function setWebhook() { var url = telegramUrl + "/setWebhook?url=" + webAppUrl; var response = UrlFetchApp.fetch(url); Logger.log(response.getContentText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setWebhook() {\r\n //Taken from \"Current Web App Url\" under Publish... Deploy as Web App...\r\n messagePayload.url =\r\n \"\";\r\n var method = \"setWebhook\";\r\n var response = sendPayload(method, messagePayload);\r\n console.log(JSON.stringify(response.getContentText()));\r\n}", "function s...
[ "0.63425165", "0.6260429", "0.60431445", "0.5785985", "0.5736924", "0.56656736", "0.5553568", "0.5548076", "0.55373824", "0.54957455", "0.5485183", "0.5482055", "0.5457598", "0.5446241", "0.54374045", "0.5415455", "0.5411284", "0.5404081", "0.5390589", "0.5345461", "0.5338322...
0.7135972
0
Get borrowed items by user
function getBorrowed(user) { var sheet = SpreadsheetApp.openById(ssId).getSheets()[0]; var row = 3; var column = 11; var items = sheet.getRange(row, column, sheet.getLastRow()).getValues().clean(''); var borrower = sheet.getRange(row, column+1, sheet.getLastRow()).getValues().clean(''); if (!user) { /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static findAllRequestOfUser(userId) {\n return db.execute(`SELECT * FROM bookings WHERE itemId IN (SELECT id FROM items WHERE ownerId = '${userId}') ORDER BY id DESC;`);\n }", "function userBorrowed(req,res,next) {\n db.any(`SELECT * from items inner join users on items.borrower_id=users.user_id where...
[ "0.65361625", "0.6511559", "0.62196696", "0.61639524", "0.6128775", "0.6126811", "0.605494", "0.6021999", "0.60107493", "0.59942424", "0.59780353", "0.5973284", "0.5895807", "0.5878364", "0.58179194", "0.58106357", "0.5805406", "0.5751932", "0.5730184", "0.57164097", "0.57160...
0.73530036
0
Make a custom keyboard layout for the items
function makeKeyboard(items) { var cols = items.length; var rows = 1; var grid = []; for (var j = 0; j < cols; j++) { grid[j] = Array(rows); } for (var i = 0; i < rows; i++) { for (var k = 0; k < cols; k++) { grid[k][i] = "/palauta " + items[k]; } } return grid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setKeyLayout() {\n escRow = [\"Esc\", 'hid', 'hid', 'hid', 'hid', 'hid', 'hid',\n configurationKey('3d', 'toggle_3d_keyboard'),\n configurationKey('Screen brightness', 'toggle_screen_brightness'),\n configurationKey('Keyboard size', 'toggle_keyboard_size') ];\n numberRow = ['hid', two...
[ "0.692964", "0.5877524", "0.564213", "0.5544781", "0.551723", "0.54816663", "0.54811364", "0.5456184", "0.54496586", "0.53939426", "0.5392843", "0.53421265", "0.5322295", "0.5307294", "0.5248369", "0.52383524", "0.5203842", "0.51917607", "0.5182987", "0.5156893", "0.51558447"...
0.6158994
1
Check if the user exists in the wallet
function userExists(userName, config) { return __awaiter(this, void 0, void 0, function () { var wallet; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, getWallet(config)]; case 1: wallet = _a.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIfUserExists (callback) { \n connection.query(`SELECT * FROM user WHERE userid=${connection.escape(id)}`, (err, res)=>{\n if (err) {message.channel.send(embeds.errorOccured(message, err));}\n callback(res[0] !== undefined); \n });\n }", "as...
[ "0.7307517", "0.69858515", "0.6941721", "0.68829787", "0.68256766", "0.68032855", "0.6781126", "0.6740946", "0.6738849", "0.66891384", "0.6685503", "0.6679644", "0.6663562", "0.66600007", "0.6659972", "0.66535926", "0.6627081", "0.6616097", "0.6576553", "0.6571487", "0.654600...
0.7168555
1
get facets for filter, with a facetLimit equal to filter length or, if none selected, a fixed size (15)
getFilterFacets() { // if nothing is selected then ask for a default limit of facets. else ask for selected facets only. let limit = this.state.selected.length || this.state.limit; // should facets be shown when nothing is selected? if (this.props.hideFacetsWhenAll && this.state.selected.length === 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildMoreFiltersList() {\r\n $searchFacetItems.each(function () {\r\n var $this = $(this);\r\n setChecked($('#x_' + $this.attr('id')), $this.hasClass('visible') ? 1 : 0);\r\n });\r\n\r\n $moreFilters = $('div.more-filters'); \r\n var checked = $(\"input[type=checkbox]:checked\", ...
[ "0.60384434", "0.5880586", "0.5616054", "0.5567601", "0.54673916", "0.5322213", "0.53011113", "0.5254604", "0.52108294", "0.5208144", "0.5194021", "0.5156743", "0.51449525", "0.51403284", "0.51196146", "0.5108186", "0.50901604", "0.508572", "0.50807834", "0.50140864", "0.5006...
0.59815323
1
Wrap an element in another element.
wrap(element, wrapper) { element.parentNode.insertBefore(wrapper, element); wrapper.appendChild(element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrap(el, wrapper) {\n\t el.parentNode.insertBefore(wrapper, el);\n\t wrapper.appendChild(el);\n\t}", "function wrapElement( element, css ) {\n var $wrapper = $tag(div, '-wrapper', css);\n\n $(element).before($wrapper);\n $(element).appendTo($wrapper);\n }", "function wrap...
[ "0.73092496", "0.716015", "0.6877026", "0.6768527", "0.6682987", "0.6671143", "0.6611452", "0.65716547", "0.65716547", "0.65652823", "0.65652823", "0.65652823", "0.6537251", "0.64941806", "0.6389643", "0.6374949", "0.6368856", "0.6364396", "0.6339027", "0.63181967", "0.631819...
0.78470606
0
As above but works for wrapping multiple elements.
wrapAll(elements, wrapper) { elements[0].parentNode.insertBefore(wrapper, elements[0]); elements.forEach(x => wrapper.appendChild(x)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrap(toWrap, wrapper, isWrapAll) {\r\n var newParent;\r\n wrapper = wrapper || document.createElement('div');\r\n for(var i = 0; i < toWrap.length; i++){\r\n var item = toWrap[i];\r\n if(isWrapAll && !i || !isWrapAll){\r\n newParent = wrapper.clone...
[ "0.708074", "0.708074", "0.70567054", "0.70567054", "0.70567054", "0.7040861", "0.68850344", "0.6799829", "0.6722121", "0.6648875", "0.65976316", "0.65976316", "0.65464044", "0.65464044", "0.65464044", "0.6524478", "0.6519173", "0.6519173", "0.6490733", "0.6474859", "0.647485...
0.76620805
0
init delete button field
function _init_delete_btn(){ try{ var delete_button_field = Ti.UI.createTableViewRow({ className:'set_delete_button', filter_class:'set_delete_button', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initDeleteButton(){\n var deleteButton = document.createElement('a');\n var deleteButtonText = document.createTextNode('x');\n deleteButton.appendChild(deleteButtonText);\n deleteButton.className='hidden';\n deleteButton.id = 'todoClose';\n\n deleteButton.addEvent...
[ "0.6976899", "0.69523656", "0.66183275", "0.65411425", "0.6532309", "0.6513517", "0.64848226", "0.6474137", "0.64402115", "0.64399725", "0.6432505", "0.6411711", "0.64081866", "0.63932323", "0.6390091", "0.6384819", "0.6377109", "0.6361681", "0.6355564", "0.6350102", "0.63330...
0.75603616
0
check if exist any change
function _check_if_exist_change(){ try{ if(win.action_for_custom_report == 'add_job_custom_report'){ return true; } var is_make_changed = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@api hasChanges() {\n console.log('[hasChanges]');\n\n connection.trigger('setActivityDirtyState', true);\n }", "function setHasChanges() {\n if (!HasChanges)\n HasChanges = true;\n}", "hasChanged(key) {\n return !key ? this.getChangedAttributes().length > 0 : !isUndefined(thi...
[ "0.6782011", "0.664902", "0.65567034", "0.65461564", "0.64476943", "0.63631964", "0.63522035", "0.6319355", "0.6315729", "0.6313359", "0.62942", "0.6221858", "0.6207568", "0.6184223", "0.6180619", "0.61657894", "0.6136612", "0.6127355", "0.61080205", "0.6066846", "0.6051453",...
0.7375458
0
Adds one vote to a candidates total on their card.
onVote(candidate) { console.log(`Vote for ${candidate.name}`); candidate.votes++; this.candidates.sort(function (a, b) { return a.votes - b.votes; }); this.candidates.reverse(); const reducer = ((accumulator, currentValue) => ({ vot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function voteForCandidate() {\n candidateName = $(\"#candidate\").val();\n contractInstance.IncrementVote(candidateName, {from: web3.eth.accounts[0]}, function() {\n let div_id = candidates[candidateName];\n $(\"#\" + div_id).html(contractInstance.NumVotes.call(candidateName).toString());\n });\n}", "fu...
[ "0.7014413", "0.60363823", "0.6018742", "0.6011228", "0.6008739", "0.59873307", "0.59730697", "0.59499776", "0.5727558", "0.5725303", "0.5723067", "0.57135373", "0.56527305", "0.56416196", "0.5601505", "0.5530855", "0.55220777", "0.550041", "0.5401048", "0.54000103", "0.53858...
0.6940028
1
Finds the percent of the total votes that each cadidate has.
findPercentage(totalVotes) { this.candidates.forEach(function (element) { let percent = (element.votes / totalVotes.votes) * 100; let percentOfVotes = Math.round(percent); console.log(percentOfVotes); element.percent = percentOfVotes; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function porcentajes(x) {\n let i = x.map(member => member.votes_with_party_pct).reduce((a, b) => (a + b) || 0)\n return (i / x.length);\n}", "function getPercentage(membersArray){\n var sumPrct = 0;\n for (var i =0; i< membersArray.length; i++){\n sumPrct += +(membersArray[i].votes_with_par...
[ "0.72590065", "0.7144079", "0.7126406", "0.70039964", "0.69216126", "0.6781429", "0.6755074", "0.67352295", "0.663142", "0.6597542", "0.6528582", "0.6512936", "0.64865124", "0.64602727", "0.6408579", "0.6398881", "0.6348686", "0.632821", "0.6308682", "0.6250179", "0.6210028",...
0.7823463
0
Adds a candidate to the contest if one of the same name does not exist.
onAddCandidate(candidate) { console.log(candidate); for (var i = this.candidates.length - 1; i >= 0; i--) { if (this.candidates[i].name === candidate.name) { console.log('Candidate already exists.'); return 0; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCandidate(name, solid, likely, leaning, tilting) {\n\t//clearDelegates();\n\n\tif(name === undefined) {\n\t\tvar nameHTML = document.getElementById('name');\n\t\tif(nameHTML !== null) {\n\t\t\tname = nameHTML.value;\n\t\t} else {\n\t\t\tname = \"Error\";\n\t\t}\n\t}\n\n\t// ignore white space candidate...
[ "0.64766437", "0.5878812", "0.57053375", "0.562504", "0.5412831", "0.53234506", "0.52852064", "0.527311", "0.52377415", "0.5183721", "0.51831424", "0.5158572", "0.51525176", "0.5151385", "0.5146193", "0.51305073", "0.5108344", "0.5094089", "0.50186753", "0.5000608", "0.499324...
0.7618613
0
Removes a candidate from the contest.
onRemoveCandidate(candidate) { for (var i = this.candidates.length - 1; i >= 0; i--) { if (this.candidates[i] === candidate) { this.candidates.splice(i, 1); } } console.log(`Removed candidate ${candidate.name}`); swal({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeCandidate(applicantId) {\n /* Do AJAX Stuff here to remove the candidate from the DB. */\n // console.log($(\"#queue-\" + applicantId));\n $(\"#queue-\" + applicantId).remove();\n }", "initRemoveCandidateListener(candidate) {\n AddCandidate.view.btnRemove.click(function ()...
[ "0.6295891", "0.56556576", "0.5582349", "0.55300534", "0.5505031", "0.5479004", "0.53994805", "0.5387063", "0.5387063", "0.52687275", "0.52600485", "0.51833224", "0.5139186", "0.51142794", "0.5107744", "0.50955385", "0.5089204", "0.5083502", "0.50829965", "0.5082563", "0.5072...
0.7121775
0
saving party details using factory
function savePartyDetails(partyDetails) { debugger; vm.partyFactory.saveData(partyDetails); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveParty(party) {\n localStorage.setItem('party', JSON.stringify(party));\n}", "function party_create(){\n\n\t//log.error('party_create for '+this.tsid);\n\n\tthis.party = apiNewGroup('party');\n\n\tthis.party.init(this);\n}", "function create( data, callback ) {\n\tdata.created = new Date();\n\tP...
[ "0.6605794", "0.64920336", "0.6402759", "0.6360593", "0.6157053", "0.6063339", "0.5775465", "0.57541996", "0.57434464", "0.57094556", "0.5704553", "0.5691008", "0.5560003", "0.5541845", "0.55372214", "0.5529392", "0.55029714", "0.5486318", "0.5473568", "0.54599804", "0.545545...
0.80942875
0
metodo de voltar foto universal
function voltarFoto(imagens,rotaBase){ var resultadoSplit=imagens.id.split("-"); if(resultadoSplit[1]!=1){ var sum=parseInt(resultadoSplit[1])-1; imagens.src="../imagens/databases/"+rotaBase+"/"+resultadoSplit[0]+"-"+sum+".png"; imagens.id=resultadoSplit[0]+"-"+sum; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "phototaked(file) {}", "function subirFoto (event, template, anuncianteId, id) {\n\n let archivo = document.getElementById(id);\n\n if ('files' in archivo) {\n\n \n\n if (archivo.files.length == 0) {\n console.log('Selecciona una foto');\n } else if (archivo.files.length > 1) {\...
[ "0.6671272", "0.65315825", "0.6489617", "0.64267445", "0.631315", "0.6264475", "0.6211498", "0.6207982", "0.6204492", "0.6149604", "0.6131212", "0.6125278", "0.61216944", "0.60666937", "0.60632104", "0.5995362", "0.599227", "0.59474796", "0.5935796", "0.5932925", "0.59266216"...
0.7013525
0
Function to SHOW description panel from right
function showDesc(){ getOverlay(); $("#flyin").show(); $("#flyout").show(); $(".independent").show(); $(".independent").animate({ 'right' : '0' }, 100, "swing"); $("#flyout").animate({ 'right' : '940' }, 130, "swing"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showDescription() {\n ui.toggleDescription();\n }", "function showDescription(){\n\t$(this).find('.description').toggle();\n}", "function showdesc(thisdesc) {\n\t\t\t\tthisdesc.intpause();\t//clear interval\n\t\t\t\ttitle.style.display=\"none\";\n\t\t\t\tvar readTimer = setTimeout(function() {hidedesc(...
[ "0.7318059", "0.69484967", "0.68767715", "0.67726636", "0.6753111", "0.65924513", "0.65870005", "0.64803326", "0.6478367", "0.6473314", "0.64669585", "0.6461759", "0.6457552", "0.6442196", "0.64399225", "0.6397729", "0.6331014", "0.6320393", "0.6293127", "0.62918055", "0.6258...
0.7149261
1
Effect for Nav MouseIn
function hoverIn(){ //Hide independent hideDesc(); $(".content").animate({scrollLeft:0}, '500', 'swing', function(){ /* do nothing */ }); //Mouseover $('.st-menu').css({ '-webkit-transform' : 'translate3d(0, 0, 0)', '-moz-transform' : 'translate3d(0, 0, 0)', '-ms-transform' : 'translate3d(0, 0, 0)', '-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navMouseHover () {\n\tvar lis = $$('#nav li');\n\tif (lis && lis.length) {\n\t\tlis.each (function(li){\n\t\t\tli.onMouseover = toggleMenu (li, 1);\n\t\t\tli.onMouseout = toggleMenu (li, 0);\n\t\t});\n\t}\n}", "function pointer_overIN(e){\n e.currentTarget.Sprites.d._filters = [new PIXI.filters.O...
[ "0.6879916", "0.67330503", "0.6265807", "0.62518185", "0.62255526", "0.61884224", "0.61822474", "0.61676913", "0.6162605", "0.61385006", "0.6087101", "0.6079931", "0.60717773", "0.6044077", "0.6033866", "0.60225767", "0.6008358", "0.60053545", "0.5952889", "0.5940907", "0.590...
0.69665533
0
Effect for Nav MouseOut
function hoverOut(){ //Mouseout $(".main-nav ul").finish(); $('.st-menu').css({ '-webkit-transform' : 'translate3d(-200px, 0, 0)', '-moz-transform' : 'translate3d(-200px, 0, 0)', '-ms-transform' : 'translate3d(-200px, 0, 0)', '-o-transform' : 'translate3d(-200px, 0, 0)' }); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NavBar_Item_MouseOut(event)\n{\n\t//get html\n\tvar html = Browser_GetEventSourceElement(event);\n\t//this a sub component?\n\tif (html.Style_Parent)\n\t{\n\t\t//use the parent\n\t\thtml = html.Style_Parent;\n\t}\n\t//valid?\n\tif (html && html.Style_MouseOver)\n\t{\n\t\t//trigger style\n\t\thtml.style.ba...
[ "0.7397199", "0.6849989", "0.680713", "0.6656302", "0.6622713", "0.6608618", "0.65746546", "0.6556024", "0.6541191", "0.6498346", "0.6444501", "0.6422932", "0.6415666", "0.64033484", "0.6384746", "0.6382916", "0.6348099", "0.6347372", "0.63460153", "0.63443357", "0.63188136",...
0.7540813
0
Main Page Transition to new viewPane
function doMagicTransition(e, page){ //Show the pane to be flown in e.show(); $(".content").html(''); //Remove content dom.css({ 'overflow' : 'auto' }); dom.scrollTop(viewPane.offset().top); //Set scroll position to the current viewPane dom.animate({ scrollTop: e.offset().top }, 500, function(){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changePage() {\n const url = window.location.href;\n const main = document.querySelector('main');\n loadPage(url).then((responseText) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = responseText;\n const oldContent = document.querySelector('.mainWrapper'...
[ "0.6423385", "0.6403984", "0.6365522", "0.6132519", "0.6081609", "0.60193247", "0.59853107", "0.5966207", "0.59660333", "0.5949783", "0.5939745", "0.59137124", "0.5892037", "0.58428407", "0.58382654", "0.58162653", "0.58093685", "0.5801", "0.5790955", "0.5784388", "0.5756462"...
0.6502536
0
Sets the object's team.
setTeam(teamId) { this.visibleByTeam.delete(this.teamId); this.teamId = teamId; this.visibleByTeam.add(this.teamId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Team(teamName) {\n this.teamName = teamName;\n }", "function Team(teamName) {\n this.teamName = teamName;\n }", "get team() {\r\n return new Team(this);\r\n }", "function getUserTeam() {\n API.getTeam(user.email)\n .then(res => {\n if (res.data != null) {...
[ "0.6616185", "0.6616185", "0.6286748", "0.62790346", "0.62569165", "0.62182295", "0.6011561", "0.59303755", "0.591465", "0.57866734", "0.5756478", "0.5688571", "0.56785285", "0.56693786", "0.5586464", "0.5555091", "0.55442977", "0.5531781", "0.54754674", "0.5455847", "0.54539...
0.7019436
0
Replaces a link to a YouTube video with an EMBED element.
function embedYouTubeLink(link) { youTubeLink = $(link); videoID = youTubeLink.attr('href').replace(/^[^v]+v.(.{11}).*/, '$1'); /* * TODO: This is a truly ugly method of replacing the link with an embedded * object. I should probably create a function that intelligently parses * the most common audio and vid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function youtubeLinkReplace() {\r\n (function ($) {\r\n var videoClass = '.youtubeVideoLink';\r\n var iframeTag = '<iframe width=\"100%\" height=\"100%\" src=\"{PROTOCOL}//www.youtube.com/embed/{VIDEO_ID}\" frameborder=\"0\" allowfullscreen></iframe>';\r\n\r\n videoContainers = $(videoClass...
[ "0.7417157", "0.7390366", "0.71775347", "0.6896997", "0.6873521", "0.67765564", "0.6712643", "0.6698811", "0.66939217", "0.6688397", "0.66118073", "0.6591607", "0.654962", "0.65440816", "0.6516196", "0.64922917", "0.6488519", "0.6433889", "0.64320815", "0.6414575", "0.6386774...
0.7860455
0
this function creates the report by using report name, column name, and report type passed by the call on the main function exports report on sheet, creating sheet per account
function report(REPORT_NAME,spreadSheet,COLUMN_NAMES,REPORT_TYPE){ var ACCOUNT = ['463-431-6322']; // comma delimited, single quoted list of account ids from Adwords (not the account names) var FILTER = "Impressions > 0"; var DATE_RANGE = "LAST_30_DAYS"; var column = COLUMN_NAMES.split(","); var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareReport(spreadsheet,report) {\n\n spreadsheet.addEditor(\"alan@webfordoctors.com\");\n report.exportToSheet(spreadsheet.getActiveSheet()); \n var sheet = spreadsheet.getActiveSheet();\n Logger.log(sheet.getSheetName());\n //increase numColumns if you want to run reports with more than 9 cate...
[ "0.69361967", "0.6438126", "0.6247471", "0.61614025", "0.6053001", "0.60283065", "0.59811646", "0.5947561", "0.5870327", "0.5824067", "0.5820912", "0.5815015", "0.5797133", "0.5785686", "0.5766849", "0.5729767", "0.57269007", "0.5676547", "0.56368864", "0.5622819", "0.5621174...
0.66292965
1
Loads default shop and country fixtures
initialize () { return Promise.all([ lib.Utils.buildShopFixtures(this.app) .then(fixtures => { this.shopFixtures = fixtures return lib.Utils.loadShopFixtures(this.app) }), lib.Utils.buildCountryFixtures(this.app) .then(fixtures => { this.countryFixtu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFixtures(){\n _.each(app.fixtures, function(fixture){\n var collection = app.collections[fixture.collection];\n if(!collection){\n throw new Error('Invalid collection \"' + fixture.collection + '\" in fixture.');\n }\n\n // Only load the fixture if the collection is empty\n if(col...
[ "0.5832544", "0.5727904", "0.5558774", "0.554996", "0.55362207", "0.55149007", "0.54909015", "0.54498667", "0.5441521", "0.54359925", "0.54265535", "0.54126525", "0.53703576", "0.5303881", "0.53005624", "0.5291768", "0.5283899", "0.5218318", "0.52136636", "0.5212211", "0.5194...
0.6651854
0
Checks if the clientId has already voted and removes its vote.
function removeVote(voteState, entry, clientId) { const vote = voteState.getIn(['votes', clientId]); if (vote) { return voteState.updateIn(['tally', vote], 0, tally => tally - 1) .removeIn(['votes', clientId]); } return voteState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteVotes(id, offerid){\n\t\n\t\tbootbox.confirm(__(\"Are you sure you want to delete this vote?\"),__('No'),__('Yes'),function(r){\n\t\n\t\n\t\tif(!r){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tdeleteVote(id, offerid);\n\t\t}\n\t\t\n\t});\n}", "function vote(votID) {\n if ( ! VotingService...
[ "0.5856964", "0.56666964", "0.54863954", "0.54317087", "0.52973944", "0.52370065", "0.522935", "0.5220151", "0.5205512", "0.5189543", "0.51383084", "0.51267755", "0.51168174", "0.50760967", "0.5074695", "0.5063599", "0.5041156", "0.4971615", "0.49549174", "0.49510035", "0.494...
0.67140055
0
Custom function callback for datatables Will generate img tags at render time (pseudo lazy loading)
function customFnRowCallback( nRow, aData, iDisplayIndex ) { console.log("called") $('td:eq(0)', nRow).html( "<img src='https://www.osrsbox.com/osrsbox-db/items-icons/" + aData["id"] + ".png'></img>" ); return nRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(dataSet){\n \tdataSet.data.forEach(function(item,i){\n \tvar gif = dataSet.data[i].images.fixed_height.url;\n \t$(\"#main\").append(\"<img class='img-thumbnail'src='\" + gif + \"'>\"); // mind the single vs. double quotes!\n \t});\n\t}", "function initRenderFunction(labelToRender){\n\...
[ "0.6744417", "0.6478112", "0.635532", "0.6278465", "0.60418004", "0.60041666", "0.595631", "0.59415865", "0.59000784", "0.58859503", "0.58516294", "0.57928455", "0.5786163", "0.57691425", "0.57618505", "0.57581395", "0.5713211", "0.57068527", "0.57030106", "0.5689575", "0.567...
0.6682867
1
Draw all items in the game
function drawAll() { // color in the background ctx.fillStyle = "#000000"; ctx.fill(0, 0, canvasWidth, canvasHeight); // draw ship ship.draw(); // draw rocks for (var i = 0; i < rocks.length; i++) { rocks[i].draw(); } // draw bullets for (var i = 0; i < bullets.length; i++) { bullets[i]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawElements() {\n that.gameArea.paint(that.contex);\n that.food.paint(that.contex, that.gameArea.cellSize);\n that.snake.paint(that.contex, that.gameArea.cellSize);\n }", "draw() {\n // Limpa a tela antes de desenhar\n Game.Drawing.clearCanvas();\n Game.Draw...
[ "0.7484365", "0.74837524", "0.73787796", "0.73603404", "0.7350454", "0.73477286", "0.7304107", "0.72889113", "0.7218236", "0.7215001", "0.7187563", "0.71724445", "0.71556604", "0.71484774", "0.71188325", "0.7100604", "0.70969164", "0.70580316", "0.70471513", "0.70050824", "0....
0.76810205
0
Constructor for a Dictionary of [propertyValue::Object]. For example, given a keyName of id, and a list of FolderType objects, create a map of [id,
constructor(valueList, keyName) { this.keyName = keyName; this.values = Dictionary.toMap(valueList || [], keyName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMap(objects, expectedKey){\n var myMap = new Map();\n\n // objects.keys().forEach(function(key){\n // myMap.set(objects[key][expectedKey], objects[key]);\n // })\n\n for (var key in objects){\n myMap.set(objects[key][expectedKey], objects[key]);\n }\n\n return myMap;\n}...
[ "0.5948533", "0.54938805", "0.5358032", "0.5285337", "0.5226386", "0.5188949", "0.5121135", "0.5002147", "0.49958584", "0.4965363", "0.4954695", "0.49316895", "0.4930319", "0.4877638", "0.48517945", "0.48437533", "0.48366123", "0.47988898", "0.47884348", "0.47884348", "0.4788...
0.58509445
1
add an initial time to all open tabs
function initialiseAllTabs() { chrome.tabs.query({}, function(tabs) { var i; for (i = 0; i < tabs.length; i++) { gsTimes[tabs[i].id] = new Date(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timestampTabCreation(tab)\n{\n\t_tabTimes.set(tab.id, new tabTimes(tab.id, tab.title, tab.URL));\n}", "function init() {\n\tlet gettingTabs = browser.tabs.query({status: \"complete\"});\n\tgettingTabs.then((tabs) => {\n\t\tfor (let tab of tabs) {\n\t\t\tconst hostname = getHostname(tab.url);\n\t\t\tif(h...
[ "0.688836", "0.6699044", "0.65249723", "0.6345727", "0.628993", "0.60428196", "0.5934814", "0.5862266", "0.58154684", "0.5764902", "0.5753541", "0.5741487", "0.57380867", "0.5681033", "0.5679824", "0.5666345", "0.5656985", "0.5655209", "0.5643312", "0.56418496", "0.557991", ...
0.73205006
0
Returns customer's list. This method need to request to custmer url. However, because the data shape of fake server, It is fetched out of vehicles resource.
async getCustomers() { const customers = await this.request('/vehicles', 'GET'); let customersList = []; if (customers.status === 'success' && customers.data !== undefined) { customersList = customers.data .map(customer => customer.ownerName) .filter((value, index, self) => self.indexO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomerList() {\n\t// TODO: add logic to call backend system\n\n\n}", "list() {\n return this.iugu.makePagedRequest('GET', '/customers');\n }", "function getCustomers() {\n console.log('8');\n $.get(\"/api/customers\", renderCustomerList);\n }", "get customersList() {\n\t\tretur...
[ "0.8056603", "0.7736817", "0.74091554", "0.7389519", "0.71732515", "0.71696216", "0.7164881", "0.7150581", "0.7082732", "0.70037735", "0.692568", "0.6871044", "0.6851667", "0.6835917", "0.6778918", "0.6772547", "0.6767373", "0.67339694", "0.67192775", "0.6689859", "0.6669577"...
0.7866699
1
create the composite resultant pattern from two individual patterns
function createComposite(drummer1, drummer2) { // composite will be an array of arrays var composite = new Array(12); var numPatterns = 1; // iterate through the 12 8th notes in a bar of 12/8 for (var i = 0; i < composite.length; i++) { if (drummer1[i] != -1 && drummer2[i] != -1) { // composite[i] ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CompositePattern()\r\n{\r\n\t//WARNING! do not add anything here, it will never be called\r\n}", "function CompositePattern()\r\n{\r\n\t//WARNING! do not add anything here, it will never be called\r\n}", "function patternFactory() {\n var len,\n j,\n newPattern,\n ...
[ "0.66019434", "0.66019434", "0.6290388", "0.57610434", "0.56931525", "0.5498", "0.5436811", "0.5329315", "0.53268963", "0.5252499", "0.5180757", "0.5179244", "0.5174452", "0.5171564", "0.5155942", "0.5092732", "0.50686985", "0.49847588", "0.4973771", "0.49694583", "0.49270704...
0.66658664
0
number of turns in melodic contour, including from last note to first note in the pattern 05 turns possible
function numMelodicTurns(pattern) { var i = 0; var melody = new Array(); // melody consists of the sequence of notes in the pattern without rests for (var i = 0; i < pattern.length; i++) { if (pattern[i] != -1) { melody.push(pattern[i]); } } var numTurns = 0; var ascending = 0; var descending ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "countBlockTurns(move) {\n let layerCount = move.getLayerCount();\n let layerMask = move.getLayerMask();\n let turns = Math.abs(move.getAngle()) % 4;\n if (turns == 0) {\n return 0;\n } else {\n let previousTurnedLayer = 0;\n let countTurned = 0;\n let previousImmobileLayer = 1;\n...
[ "0.6373617", "0.63618416", "0.6337502", "0.61753935", "0.59492373", "0.5893998", "0.58766764", "0.57844263", "0.5752806", "0.5725963", "0.5684876", "0.5676624", "0.5665746", "0.56503326", "0.55989635", "0.5587353", "0.5583297", "0.55762374", "0.55673444", "0.54983205", "0.548...
0.7477452
0
Function for displaying message row
function showMessageRow(message) { $('#sodar-pr-project-list-message td').text(message); $('#sodar-pr-project-list-message').show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayMessages(messages) {\n\t// Remove messages from html\n\t$('#messageTable tbody').html('');\n\t// Fill the table messages\n\t$.each(messages, function(index, message){\n\t\tvar line = $('#messageTable ').append('<tr><td>'+message.username+'</td><td>'+message.message+'</td></tr>');\n\t\t\n\t});\n}", ...
[ "0.7201644", "0.6757368", "0.65593207", "0.6542497", "0.6506676", "0.64998204", "0.64407974", "0.64265037", "0.6395998", "0.6394899", "0.63922715", "0.6360884", "0.6304397", "0.6251773", "0.6227437", "0.6217477", "0.6211701", "0.6207279", "0.61809534", "0.6162873", "0.614106"...
0.754739
0
Function for hiding message row
function hideMessageRow() { $('#sodar-pr-project-list-message').hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideMessage () {\n if (uiOnboarding.messageHolder.is(\":visible\")) uiOnboarding.messageHolder.hide();\n }", "function hide(row, col) {\n\t\tdocument.getElementById(row+\"_\"+col).style.visibility=\"hidden\";\n\t}", "function displayMessage( colNum, message ) {\r\n $( '#msgBox' + colNum...
[ "0.68299425", "0.6685763", "0.6632655", "0.660121", "0.65670997", "0.65212363", "0.6507", "0.64672273", "0.64627624", "0.6436198", "0.6410989", "0.64060074", "0.64043164", "0.6392434", "0.6378029", "0.63446337", "0.63248545", "0.63235307", "0.63220596", "0.63082266", "0.62913...
0.77058715
0
Callback used by the type="script/cache" callback that indicates a script has finished downloading.
function scriptCacheCallback(evt) { var node = evt.currentTarget || evt.srcElement, i, moduleName, resource; if (evt.type === "load" || readyRegExp.test(node.readyState)) { //Pull out the name of the module and the context. moduleName = node.getAttribute("data-requiremodule"); //Mark this cach...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _complete() {\n\t if (!_iscomplete) {\n\t _iscomplete = true;\n\t _status = scriptloader.loaderstatus.COMPLETE;\n\t _this.trigger(events.COMPLETE);\n\t }\n\t }", "async onFinished() {}", "function handleDownload(results) {\r\n ...
[ "0.6150835", "0.6005962", "0.5954121", "0.5862674", "0.57550275", "0.5683218", "0.5683218", "0.56746393", "0.56099635", "0.5583049", "0.55419487", "0.55045515", "0.5492654", "0.5469602", "0.546204", "0.546204", "0.546204", "0.54579467", "0.5449542", "0.54264396", "0.5413796",...
0.61132425
1
attaches the valueless attributes to the input
function attachValuelessAttrs() { try { iLog("attachValuelessAttrs", "Called"); if (!_input) return; var str = _input.attr("valuelessAttrs"); if (!str) return; var arr = str.match(/[a-zA-Z0-9#_]+/g); if (arr == null) return; for (var i = 0; i < arr.length; i++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detachValuelessAttrs() {\n\t\t\ttry {\n\t\t\t\tiLog(\"detachValuelessAttrs\", \"Called\");\n\n\t\t\t\tif (!_input)\n\t\t\t\t\treturn;\n\t\t\t\tvar str = _input.attr(\"valuelessAttrs\");\n\t\t\t\tif (!str)\n\t\t\t\t\treturn;\n\t\t\t\tvar arr = str.match(/[a-zA-Z0-9#_]+/g);\n\t\t\t\tif (arr == null)\n\t\t\t...
[ "0.7170066", "0.6816984", "0.675407", "0.6485272", "0.63293666", "0.6287766", "0.6253597", "0.62490594", "0.62490594", "0.62455815", "0.6243685", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.62063515", "0.6...
0.8279112
0
detaches the valueless attributes from the input
function detachValuelessAttrs() { try { iLog("detachValuelessAttrs", "Called"); if (!_input) return; var str = _input.attr("valuelessAttrs"); if (!str) return; var arr = str.match(/[a-zA-Z0-9#_]+/g); if (arr == null) return; for (var i = 0; i < arr.length; i++) { try ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attachValuelessAttrs() {\n\t\t\ttry {\n\t\t\t\tiLog(\"attachValuelessAttrs\", \"Called\");\n\t\t\t\t\n\t\t\t\tif (!_input)\n\t\t\t\t\treturn;\n\t\t\t\tvar str = _input.attr(\"valuelessAttrs\");\n\t\t\t\tif (!str)\n\t\t\t\t\treturn;\n\t\t\t\tvar arr = str.match(/[a-zA-Z0-9#_]+/g);\n\t\t\t\tif (arr == null)...
[ "0.77782077", "0.6521928", "0.64514554", "0.63584936", "0.6325824", "0.62816274", "0.61681247", "0.61593837", "0.6119854", "0.6054475", "0.60378283", "0.59171385", "0.5899307", "0.5896943", "0.5896627", "0.5835351", "0.5824134", "0.5813934", "0.5808043", "0.5807227", "0.57983...
0.8150745
0
Resets all Commands/Responses Ajax backgrounds
function ResetBackgrounds() { try { iLog("ResetBackgrounds", "Called"); _cmdDiv.find("div").css("background-color", "#fff"); _resDiv.find("div").css("background-color", "#fff"); } catch (err) { iLog("ResetBackgrounds", err, Log.Type.Error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetAllDivs() {\n\t$('#response').html('');\n\t$('#info').html('');\n\t$('#err').html('');\n}", "reset() {\r\n intervalMode = false\r\n interval = 3000\r\n repeatTimes = 0\r\n // Empty the array\r\n commandQueue.splice(0)\r\n }", "function...
[ "0.67165506", "0.6533559", "0.62239283", "0.6166678", "0.611004", "0.6062512", "0.6057349", "0.605424", "0.60328484", "0.60197467", "0.59901", "0.5974631", "0.5957227", "0.59542733", "0.5946529", "0.5936839", "0.5918538", "0.5905949", "0.58863074", "0.5883259", "0.58827525", ...
0.67264616
0
removes features from the control that were previously added
function RemoveFeatures() { try { if (!featuresAdded) return; iLog("RemoveFeatures", "Called"); control.draggable("destroy") .resizable("destroy") .removeClass("editing"); input.removeClass("moving"); span.removeClass("moving"); featuresAdded = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RemoveFeatures() {\n\t\t\t\ttry {\n\t\t\t\t\tif (!featuresAdded)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tiLog(\"RemoveFeatures\", \"Called\");\n\t\t\t\t\t\n\t\t\t\t\tlabel.removeClass(\"moving\");\n\t\t\t\t\tcontrol\n\t\t\t\t\t\t.draggable(\"destroy\")\n\t\t\t\t\t\t.resizable(\"destroy\")\n\t\t\t\t\t\t.removeClas...
[ "0.7839872", "0.7719254", "0.7710703", "0.7707558", "0.77041185", "0.7683558", "0.76774883", "0.764585", "0.7633481", "0.7631851", "0.75292957", "0.75231564", "0.74853635", "0.747266", "0.7454295", "0.7442904", "0.7343426", "0.7212804", "0.7187759", "0.68659455", "0.68446434"...
0.7724353
1
removes features from the control that were previously added
function RemoveFeatures() { try { if (!featuresAdded) return; iLog("RemoveFeatures", "Called"); label.removeClass("moving"); control .draggable("destroy") .resizable("destroy") .removeClass("editing") .removeClass("moving"); featuresAdded = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RemoveFeatures() {\n\t\t\t\ttry {\n\t\t\t\t\tif (!featuresAdded)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tiLog(\"RemoveFeatures\", \"Called\");\n\t\t\t\t\t\n\t\t\t\t\tcontrol.draggable(\"destroy\")\n\t\t\t\t\t\t.resizable(\"destroy\")\n\t\t\t\t\t\t.removeClass(\"editing\");\n\t\t\t\t\tinput.removeClass(\"moving\")...
[ "0.7724353", "0.7719254", "0.7710703", "0.7707558", "0.77041185", "0.7683558", "0.76774883", "0.764585", "0.7633481", "0.7631851", "0.75292957", "0.75231564", "0.74853635", "0.747266", "0.7454295", "0.7442904", "0.7343426", "0.7212804", "0.7187759", "0.68659455", "0.68446434"...
0.7839872
0
sizes the control around the textarea element
function ResizeControl() { try { iLog("ResizeControl", "Called"); // Do not update elements which have no or wrong size! (hidden) var w = self.GetWidth(); var h = self.GetHeight(); if (w < 1 || h < 1) return; input.width(w).height(h); span.width(w).height(h); } c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ResizeControl() {\n\t\t\t\ttry {\n\t\t\t\t\tiLog(\"ResizeControl\", \"Called\");\n\t\t\t\t\t\n\t\t\t\t\tvar width = input.outerWidth();\n\t\t\t\t\tvar height = input.outerHeight();\n\t\t\t\t\twidth = width + Utilities.ToNumber(control.css(\"padding-left\")) + Utilities.ToNumber(control.css(\"padding-right...
[ "0.6967657", "0.69106", "0.675709", "0.6699448", "0.6667432", "0.66380465", "0.65297437", "0.64997137", "0.64349407", "0.64348865", "0.6434708", "0.6426086", "0.6360613", "0.63331497", "0.6330354", "0.63275427", "0.63256973", "0.6315678", "0.6275735", "0.6220434", "0.62152773...
0.714648
0
adds features to the control based on the rules specified for this type of control
function AddFeatures() { try { if (featuresAdded) return; iLog("AddFeatures", "Called"); control.css("display", "block"); h3.addClass("moving"); featuresAdded = true; } catch (err) { iLog("AddFeatures", err, Log.Type.Error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFeatureControl(fullFeature) {\n\n\n let parentContainer = document.querySelector('.container-column');\n let control = new FeatureControl(\"control-template-old\", fullFeature);\n\n // let droplist = {};\n // if (fullFeature) {\n // droplist = addMathFunctionOptionToTemplate(control....
[ "0.67547715", "0.6379843", "0.6206038", "0.6199292", "0.61959463", "0.61943144", "0.61594874", "0.61521155", "0.61383367", "0.6137864", "0.6137864", "0.6119072", "0.6119072", "0.6118608", "0.610332", "0.610332", "0.6078542", "0.60736656", "0.60733724", "0.60513186", "0.596942...
0.6427011
1
[FS] IRAD1053 20201217 to clear the custom styles in the selected paragraph
clearCustomStyles(tr: Transform<any>, editorState: EditorState) { const { selection, doc } = editorState; const { from, to } = selection; let customStyleName = RESERVED_STYLE_NONE; doc.nodesBetween(from, to, (node, pos) => { if (node.attrs.styleName) { customStyleName = node.attrs.styleNam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatReset() {\n DocumentApp.getActiveDocument().getBody().editAsText().setBold(false).setUnderline(false);\n}", "function removeParaHighlights() {\nconst paras = document.querySelectorAll('p.highlight'); for(let p of paras) {\n p.classList.remove('highlight');\n }\n}", "function r...
[ "0.7131887", "0.668419", "0.65587646", "0.64792615", "0.6353406", "0.63495594", "0.6278911", "0.6245744", "0.62344724", "0.6231696", "0.6222549", "0.61998016", "0.61968124", "0.61914265", "0.61777514", "0.6128854", "0.6097201", "0.6056332", "0.6040678", "0.6016165", "0.601337...
0.701389
1
[FS] IRAD1238 20210308 Check for the style with previous numbering level exists
function isValidHeirarchy( styleName /* New style to be applied */, level: number ) { const styleLevel = level > 0 ? level : getStyleLevel(styleName); // to find if the previous level of this level present const previousLevel = styleLevel - 1; return isPreviousLevelExists(previousLevel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasMismatchHeirarchy(\n state: EditorState,\n tr: Transform,\n node: Node /* The current node */,\n startPos: number,\n endPos: number,\n styleName /* New style to be applied */\n) {\n const styleLevel = Number(getStyleLevel(styleName ? styleName : ''));\n const currentLevel = getStyleLevel(node.a...
[ "0.6418533", "0.59944063", "0.583267", "0.5740305", "0.5740305", "0.5666791", "0.5541963", "0.5519228", "0.54179645", "0.5405049", "0.5394902", "0.5347994", "0.5313911", "0.5276807", "0.52709585", "0.52575886", "0.5224938", "0.52032465", "0.52032465", "0.52032465", "0.5203246...
0.6516709
0
Mange heirarchy for the elements after selection
function manageElementsAfterSelection(nodeArray, state, tr) { let selectedLevel = Number(MISSED_HEIRACHY_ELEMENT.previousLevel); let subsequantLevel = 0; let counter = 0; for (let index = 0; index < nodeArray.length; index++) { const item = nodeArray[index]; subsequantLevel = Number(getStyleLevel(item....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(nodes) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n if (node.isSelected()) {\n result.push(node);\n }\n else {\n // if not selected, then if it's a group, a...
[ "0.57785076", "0.57785076", "0.57785076", "0.57785076", "0.57785076", "0.5775222", "0.55798554", "0.5528717", "0.5517066", "0.5515176", "0.55126786", "0.54847884", "0.54537606", "0.54302585", "0.54229105", "0.54118884", "0.5349302", "0.53439873", "0.53432137", "0.53230304", "...
0.6726998
0
check the styles with specified levels are defined
function checkLevlsAvailable() { let isAvailable = true; if (MISSED_HEIRACHY_ELEMENT.attrs) { for ( let index = 1; index < MISSED_HEIRACHY_ELEMENT.attrs.styleLevel; index++ ) { const styleLevel = getCustomStyleByLevel(index); if (!styleLevel) { isAvailable = false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidHeirarchy(\n styleName /* New style to be applied */,\n level: number\n) {\n const styleLevel = level > 0 ? level : getStyleLevel(styleName);\n // to find if the previous level of this level present\n const previousLevel = styleLevel - 1;\n return isPreviousLevelExists(previousLevel);\n}", ...
[ "0.71140355", "0.5947477", "0.56597126", "0.5627474", "0.5408707", "0.54053015", "0.54053015", "0.54053015", "0.54053015", "0.54053015", "0.54053015", "0.5358303", "0.5358303", "0.5350231", "0.5339218", "0.5328568", "0.53109175", "0.5295249", "0.5292211", "0.5279402", "0.5269...
0.63853693
1
[FS] IRAD1243 20210505 To reset the previous numbering custom style attribute values.
function resetNodeAttrs(nodeAttrs, customStyle) { nodeAttrs.styleName = customStyle ? customStyle.styleName : ''; nodeAttrs.indent = null; nodeAttrs.lineSpacing = null; nodeAttrs.paddingBottom = null; nodeAttrs.paddingTop = null; return nodeAttrs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetStyles () {\n\t\tthis.selection\n\t\t\t.attr('data-rel', '')\n\t\t\t.attr('data-hidden', '')\n\t}", "reset() {\n Utils.deepCopyProperties(this, defaultStyle, defaultStyle);\n }", "removeAttribute(attrName) {\n if (attrName === \"style\") {\n for (let styleName in this[\"style\"...
[ "0.6306802", "0.6246396", "0.6094819", "0.60929877", "0.5984671", "0.5848734", "0.5773159", "0.5758178", "0.5729137", "0.5710303", "0.56936073", "0.5665122", "0.5665122", "0.56053287", "0.5589349", "0.5571644", "0.5565585", "0.5565585", "0.5565585", "0.5565585", "0.55150497",...
0.66878486
0
Returns an array of amounts by taking array of src or exp.
function getTargetAmountArr(arrayType) { const arrayOfAmount = arrayType.map(function(element) { return element.amount; }); return arrayOfAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayCalc(arr, fn) {\r\n var arrRes = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n arrRes.push(fn(arr[i]));\r\n }\r\n return arrRes;\r\n}", "function arrayCalc(array, fn) {\n var result = [];\n array.forEach(element => {\n result.push(fn(element));\n });\n ret...
[ "0.54053336", "0.5394187", "0.53502727", "0.5295501", "0.5295501", "0.5237698", "0.52326936", "0.5215437", "0.51838326", "0.517932", "0.51679504", "0.51582366", "0.5093414", "0.5031629", "0.50283545", "0.49999046", "0.49987593", "0.4978353", "0.49741903", "0.4960242", "0.4956...
0.5803243
0
Get an existing Detector resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
static get(name, id, state, opts) { return new Detector(name, state, Object.assign(Object.assign({}, opts), { id: id })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStateInternal(id) {\n var obj = id;\n if (! obj.startsWith(this.namespace + '.'))\n obj = this.namespace + '.' + id;\n return currentStateValues[obj];\n }", "static get(name, id, state, opts) {\n return new ResourceServer(name, state, Object.assign(Object.assign({}, opts), { id: id...
[ "0.5587931", "0.54821754", "0.5336218", "0.5309014", "0.53072834", "0.52275395", "0.5174481", "0.5152028", "0.5128809", "0.5075333", "0.5044966", "0.5041565", "0.504062", "0.5038858", "0.50353783", "0.5021523", "0.50198156", "0.50152147", "0.50108796", "0.50040406", "0.498118...
0.69527286
0
Returns true if the given object is an instance of Detector. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Detector.__pulumiType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === StorageTarget.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n ...
[ "0.6783855", "0.67829597", "0.6723141", "0.6704385", "0.6642139", "0.6625681", "0.6600078", "0.65990865", "0.6584648", "0.6549849", "0.6542453", "0.6538756", "0.6529763", "0.65174824", "0.65127134", "0.6494571", "0.64883417", "0.6474867", "0.64683604", "0.64238465", "0.641131...
0.7834434
0
Fetch the data from firebase and Populate the Courses Selector
function populateCourseSelectList() { // $('select[name="current_course_select"]').html(''); $('select[name="current_course_select"]').html(` <option selected disabled>Select Courses</option> `); let ref = firebase.database().ref("Test"); ref.on("child_added", data => { let courses = data.val(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadCourses() {\n rtdb.ref(\"/courses\").once('value',(snap)=>{\n snap.forEach((childSnap) => {\n let dat = childSnap.val();\n const opt = \"<option name=\\\"\"+ dat.name + \"\\\" value=\\\"\" + dat.courseUID + \"\\\">\" + dat.name + \"</option>\";\n let dom = new DOMParser().pars...
[ "0.68420434", "0.624243", "0.6237681", "0.62291455", "0.61995304", "0.6039803", "0.60360354", "0.602468", "0.6007676", "0.5999122", "0.5996938", "0.59415996", "0.5931162", "0.58691853", "0.58567196", "0.5845905", "0.5836303", "0.5835981", "0.5830748", "0.58128387", "0.578806"...
0.71367025
1
Add true_false to the Firebase
function addtrue_false() { let true_false = getInputValue(); let typeId = 2; let typeref = firebase .database() .ref("Types") .child(typeId); true_false.qID = typeref.push().key; typeref.child(true_false.qID).set(true_false); let testref = firebase .database() .ref("Test") .child(_co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatetrue_false() {\n let true_false = getEditInput();\n let typeId = 2;\n let true_falseref = firebase\n .database()\n .ref(\"Types\")\n .child(typeId)\n .child(true_false.qID)\n .set(true_false);\n listQuesList();\n}", "toggleRented() {\n let bool;\n let spot_bool = firebase\...
[ "0.6888204", "0.67040443", "0.65219355", "0.62465435", "0.59883285", "0.5875939", "0.5853268", "0.5853133", "0.57413965", "0.5693894", "0.5619223", "0.5559162", "0.5528589", "0.5524905", "0.55207723", "0.54125464", "0.53732336", "0.53299266", "0.5329854", "0.5329854", "0.5329...
0.70937455
0
List All true_false on Firebase
function listQuesList() { $("#true_false-list").html(""); let qref = firebase .database() .ref("Test") .child(_courseID) .child("Levels") .child(_levelID) .child("ques"); qref.on("child_added", data => { let que = data.val(); if (que.typeId == 2) { // console.log("true_false ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYesList() {\n var userId = firebase.auth().currentUser.uid;\n var rootRef = firebase.database().ref();\n var userRef = rootRef.child('users');\n var currYesListRef = userRef.child(userId);\n\n currYesListRef.on('value', function(snapshot) {\n // Stores yes list from Firebase\n ...
[ "0.5894786", "0.57710624", "0.5740272", "0.57180053", "0.57118297", "0.57118297", "0.5706146", "0.56456906", "0.5644143", "0.5633669", "0.5631075", "0.56185216", "0.5610372", "0.5586415", "0.5547616", "0.54833424", "0.5396036", "0.53668535", "0.5355897", "0.53311706", "0.5298...
0.66901666
0
Update the true_false details on Firebase
function updatetrue_false() { let true_false = getEditInput(); let typeId = 2; let true_falseref = firebase .database() .ref("Types") .child(typeId) .child(true_false.qID) .set(true_false); listQuesList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function participateData(name, bool) {\n var updates = {};\n updates['/resas/' + getDate() + '/' + name] = bool;\n firebase.database().ref().update(updates);\n}", "toggleRented() {\n let bool;\n let spot_bool = firebase\n .database()\n .ref(`spots/${this.props.navigation.state.params.spo...
[ "0.71845263", "0.68567204", "0.6786182", "0.6766721", "0.6525915", "0.6435407", "0.63025874", "0.62403494", "0.61547273", "0.61424214", "0.6074527", "0.6071846", "0.6044981", "0.6025074", "0.5955155", "0.58956116", "0.58827287", "0.58782244", "0.58735335", "0.5870005", "0.586...
0.79254675
0
Delete the true_false using id and update the table
function deletetrue_false(id) { let f = confirm("Are you Sure"); if (f == true) { firebase .database() .ref("Types") .child(_typeId) .child(id) .remove(); firebase .database() .ref("Test") .child(_courseID) .child("Levels") .child(_levelID) ....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatetrue_false() {\n let true_false = getEditInput();\n let typeId = 2;\n let true_falseref = firebase\n .database()\n .ref(\"Types\")\n .child(typeId)\n .child(true_false.qID)\n .set(true_false);\n listQuesList();\n}", "deleteLogicUser({ idUser }, { disabled }, result) {\r\n let...
[ "0.60873425", "0.5992533", "0.5913384", "0.5763306", "0.57132256", "0.5643004", "0.5533375", "0.54672533", "0.5461279", "0.5414644", "0.5401625", "0.5397812", "0.539585", "0.53599787", "0.5357789", "0.5355728", "0.53455496", "0.5343825", "0.534356", "0.5333832", "0.5321188", ...
0.6891828
0
connect() is a function that injects Reduxrelated props into your component. You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) { // It lets us inject component as the last step so people can use it as a decorator. // Generally you don't need to worry about it. return function (WrappedComponent) { // It returns a component return class extends React.Component { rend...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static connectStore(reduxStore) {\n store = reduxStore;\n }", "function Redux() {\n return {\n connect: () => (BaseComponent) => (props) =>\n <BaseComponent\n {...props}\n dispatch={ ({ type }) => console.log(type + ' dispatched') }\n />\n }\n}", "componentWillMount() {\n...
[ "0.6569922", "0.6492058", "0.63688385", "0.63688385", "0.6269518", "0.6227942", "0.6176366", "0.6176366", "0.6176366", "0.6176366", "0.6176366", "0.61743134", "0.61625695", "0.6151415", "0.61494035", "0.61405003", "0.613337", "0.613337", "0.613337", "0.613337", "0.613337", ...
0.7411168
0