Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set whether the landing info window is displayed or not.
setLandingInfoDisplayed(value) { this.landingInfoDisplayed = value; this.box2.visible = value; _.each(_.filter(this.nodes, (node) => node.showCloseToPlanet), (node) => { node.shape.visible = value; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setLandingInfoDisplayed(value) {\n this.topLeftUI.setLandingInfoDisplayed(value);\n }", "showLanding() {\n\t\tthis.setState({\n\t\t\tshow: 'landing',\n\t\t})\n\t}", "showInfobar() {\n this.visible = true;\n this._setState('InfoState');\n }", "show() {\n if (!this.facingCam...
[ "0.7875786", "0.67108124", "0.6601865", "0.64652485", "0.6362795", "0.62444764", "0.6105293", "0.6044705", "0.5932811", "0.59317374", "0.5892084", "0.58815444", "0.5835075", "0.5814657", "0.57946116", "0.57896465", "0.5789628", "0.5782255", "0.5765742", "0.57648313", "0.57601...
0.7035456
1
Set whether the popup is visible or not.
setVisible(value) { this.visible = value; _.each(this.shapes, (shape) => { shape.visible = value; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set visible(value) {}", "function setVisible(val) {\n\t\tif(val == undefined) {\n\t\t\tval = true;\n\t\t}\n\t\tthis.visible = val;\n\t}", "makePromptVisible() {\n // Loads popup only if it is disabled.\n if (this.popupStatus === false) {\n $(\"#\" + this.options.popupID).hide()....
[ "0.71283376", "0.7050954", "0.7046424", "0.66852766", "0.66402227", "0.66285855", "0.66278243", "0.6617764", "0.65780926", "0.6559973", "0.6532872", "0.6530874", "0.65250283", "0.65157956", "0.64986265", "0.6480826", "0.645812", "0.64497966", "0.6428147", "0.6427907", "0.6417...
0.6025774
52
Set the message for the popup. info: An object with header, message, and showRestartTip properties.
setMessage(info) { this.showRestartTip = info.showRestartTip; this.header.setText(info.header); this.message.setText(info.message); let headerWidth = this.header.getWidth(); let messageWidth = this.message.getWidth(); let longer = Math.max(headerWidth, messageWidth); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function infoMessageBox(message, title){\n $(\"#info-body\").html(message);\n $(\"#info-title\").html(title);\n $(\"#info-popup\").modal('show');\n}", "function infoMessageBox(message, title){\n $(\"#info-body\").html(message);\n $(\"#info-title\").html(title);\n $(\"#info-popup\").modal('show'...
[ "0.6790324", "0.6790324", "0.6523712", "0.6277202", "0.6126456", "0.611473", "0.60270387", "0.6000732", "0.60001415", "0.5951731", "0.5926067", "0.5886814", "0.58702236", "0.58330584", "0.58035576", "0.5778427", "0.5777081", "0.57740587", "0.5758006", "0.57533956", "0.5743494...
0.73671067
0
Reset all UI state.
reset() { _.each(this.indicators, (ind) => { _.each(ind.getShapes(), (shape) => _.pull(this.shapes, shape)); }); this.indicators = []; this.topLeftUI.setLandingInfoDisplayed(true); this.message.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset(){\n this.enable();\n this.init();\n this.buildAll();\n }", "reset() {\n this.setIrqMask(0);\n this.setNmiMask(0);\n this.resetCassette();\n this.keyboard.clearKeyboard();\n this.setTimerInterrupt(false);\n this.z80.reset();\n }", "rese...
[ "0.75466424", "0.7366616", "0.7309984", "0.7176905", "0.7147859", "0.7096001", "0.708665", "0.7070932", "0.6984577", "0.69589245", "0.6953898", "0.6926341", "0.6906877", "0.685086", "0.68091375", "0.68082047", "0.6784634", "0.6784634", "0.6784634", "0.67756647", "0.6770282", ...
0.6643685
40
Create a floating UI indicator to an x,y position on the map. point: An object with x,y properties. text: Text to display in the indicator, name of the point for example.
createIndicator(point, text) { let ind = new Indicator({ point: point, text: text, offset: 50 }); this.indicators.push(ind); this.shapes = ind.getShapes().concat(this.shapes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMarker(point, text) {\n var marker = new GMarker(point);\n\n GEvent.addListener(marker, \"click\", function() {\n\tmarker.openInfoWindowHtml('<div class=\"maptext\">' + text + '</div>');\n });\n return marker;\n}", "function displayPoint( point, highlight ){\n\n const OlPoint = [point...
[ "0.6447773", "0.6151139", "0.5976411", "0.59338325", "0.5697302", "0.5637526", "0.56050193", "0.55841315", "0.55839056", "0.5570022", "0.55494606", "0.55494606", "0.55060834", "0.5472484", "0.54714215", "0.54699343", "0.5464138", "0.5451981", "0.5428005", "0.54268754", "0.542...
0.6245217
1
Set whether the landing info panel should be displayed.
setLandingInfoDisplayed(value) { this.topLeftUI.setLandingInfoDisplayed(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setLandingInfoDisplayed(value) {\n this.landingInfoDisplayed = value;\n this.box2.visible = value;\n _.each(_.filter(this.nodes, (node) => node.showCloseToPlanet), (node) => {\n node.shape.visible = value;\n });\n }", "showLanding() {\n\t\tthis.setState({\n\t\t\tshow: 'l...
[ "0.6941682", "0.66509074", "0.6289452", "0.6036425", "0.5927755", "0.5837647", "0.58258384", "0.58092356", "0.5767216", "0.57385665", "0.5675931", "0.56528574", "0.56235534", "0.5607941", "0.55772865", "0.5562568", "0.5560529", "0.554888", "0.55399764", "0.5539575", "0.549393...
0.7563184
0
Update all UI elements with the latest game state.
update(info) { this.setLandingInfoDisplayed(info.closestPlanetDistance < GameConfig.SHOW_LANDING_INFO); this.topLeftUI.update(info); if (info.uiMessage) { this.message.setMessage(info.uiMessage); this.message.setVisible(true); } _.each(this.indicators, (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUI() {\n updatePlayerComponents(['points', 'teenagers', 'kettles', 'theaters', 'cps'])\n updatePriceComponents(['teenagers', 'kettles', 'theaters'])\n updateDoublePowerButton()\n}", "updateUI(){\n // we should\n MainGameScene.updateUI();\n }", "update() {\n const state = t...
[ "0.7386922", "0.72349775", "0.7143992", "0.7124126", "0.7004023", "0.6974517", "0.6945794", "0.6927239", "0.686162", "0.6847598", "0.6825257", "0.67891806", "0.67713696", "0.6718754", "0.6713322", "0.66569185", "0.66529834", "0.6635048", "0.6621058", "0.6618794", "0.6602035",...
0.0
-1
This example showcases the 2 different ways to use the webhook node: Synchronously (FindNearbyCabs) Asynchronously (BookTheCab) Make request to mockservice app
function findCabs(/*userLoc*/) { return new Promise(function(resolve, reject) { request({ url: mockServiceUrl + '/findcabs', method: 'get', }, function(err, res) { if (err) { return reject(err); } resolve(res.body); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function dowork() {\n try {\n const response = await makeReques('Google');\n console.log('response received');\n const processingResponse = await processRequest(response);\n console.log(processingResponse);\n\n }\n catch (err) {\n console.log(err);\n }\n}", "f...
[ "0.5930227", "0.5690928", "0.5643593", "0.56306905", "0.56302524", "0.5623063", "0.55204016", "0.55149513", "0.5511946", "0.5458072", "0.54469657", "0.54169345", "0.5409528", "0.53997976", "0.53988814", "0.53956735", "0.53413945", "0.5331776", "0.53273416", "0.531396", "0.530...
0.0
-1
Make request to mock service app, and call 'on_success' or 'on_failure' callback
function cabBookingService(requestId, cabId, userLoc, destination, callbacks) { return new Promise(function(resolve, reject) { request({ url: mockServiceUrl + '/findcabs', method: 'post', headers: { 'content-type' : 'application/json' }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mockCallBack() {\n}", "function request(url) {\n\t\t\t\tvar pingerResponseString\n\t\t\t\tvar writeHeadInvocation = 0\n\n\t\t\t\t// make sure ops initialized the url\n\t\t\t\tvar opsMiddleware = app.gets[url]\n\t\t\t\tassert.ok(opsMiddleware, 'test url was not registered by ops')\n\n\t\t\t\t// execute a...
[ "0.59695405", "0.5870087", "0.58444667", "0.55961585", "0.55599463", "0.5548869", "0.54965436", "0.5476965", "0.5475489", "0.54627633", "0.5461208", "0.5440379", "0.54117465", "0.53644294", "0.53546697", "0.5345204", "0.5340448", "0.5338443", "0.5314335", "0.5299333", "0.5298...
0.0
-1
Responds to the webhook asynchronously with the success flag.
function onBookingSuccess(requestId) { sdk.getSavedData(requestId) .then(function(data) { data.context.bookedCab = data.entities.selectedCab; data.context.successful = true; sdk.respondToHook(data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "done() {\n const eventData = EventData_1.EventData.createFromRequest(this.request.value, this.externalContext, Const_1.SUCCESS);\n //because some frameworks might decorate them over the context in the response\n const eventHandler = this.externalContext.getIf(Const_1.ON_EVENT).orElseLazy(() =>...
[ "0.63249004", "0.6311204", "0.6022147", "0.5987614", "0.59675187", "0.5908475", "0.5849593", "0.57588536", "0.56852895", "0.5676319", "0.5597995", "0.55913705", "0.55598134", "0.5498163", "0.5484237", "0.546802", "0.54578507", "0.5451504", "0.54339194", "0.54200155", "0.54077...
0.0
-1
call cabBookingService with the requestId. This service is expected to respond asynchronously. 'requestId' must be passed along all asynchronous flows, to allow the BotKit to respond back to the hook once the async process is completed.
function bookTheCab(requestId, cabId, userLoc, destination) { cabBookingService(requestId, cabId, userLoc, destination, { on_success : onBookingSuccess, on_failure : onBookingFailure }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cabBookingService(requestId, cabId, userLoc, destination, callbacks) {\n return new Promise(function(resolve, reject) {\n request({\n url: mockServiceUrl + '/findcabs',\n method: 'post',\n headers: {\n 'content-type' : 'application/json'\n ...
[ "0.7063101", "0.69083846", "0.5492", "0.5300377", "0.51052684", "0.5041928", "0.50367963", "0.4911046", "0.48777866", "0.48464707", "0.48177183", "0.4779389", "0.4756039", "0.47313315", "0.4724133", "0.46972921", "0.46617875", "0.46364236", "0.45601168", "0.45482638", "0.4543...
0.7399879
0
Gets the roster positions for your League
function getRosterData() { var ss = SpreadsheetApp.openById(GLOBALS.sheetId); var rosterInfoSheet = ss.getSheetByName("Roster Info"); if(!rosterInfoSheet){ ss.insertSheet("Roster Info", 2); var rosterInfoSheet = ss.getSheetByName("Roster Info"); } var service = getService(); if (service.hasAccess())...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllPosition() {\n var position =\n [ [[],[]], [[],[]], [[],[]], [[],[]], [] ];\n this.teams.forEach((team, i) => {\n team.getChildren().forEach((player, j) => {\n position[i][j][0] = player.x;\n position[i][j][1] = player.y;\n });\n });\n position[4][0] = this.ball.x;\n ...
[ "0.65242976", "0.63812435", "0.62374973", "0.62230074", "0.6205459", "0.6081037", "0.6070386", "0.5979687", "0.58648217", "0.582991", "0.5825753", "0.58167315", "0.5599209", "0.559156", "0.55872816", "0.5558969", "0.55100626", "0.54927385", "0.54543066", "0.54498804", "0.5405...
0.56946135
12
Gets the Statistics keys and names of statistics for your league
function getStatKeys(){ var ss = SpreadsheetApp.openById(GLOBALS.sheetId); var statKeysSheet = ss.getSheetByName("Stat Keys"); if(!statKeysSheet){ ss.insertSheet("Stat Keys", 3); var statKeysSheet = ss.getSheetByName("Stat Keys"); } var service = getService(); if (service.hasAccess()) { var url...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStats(){\n return stats;\n }", "stats() {\n var stats = {};\n\n for (var queryName in this._queries) {\n stats[queryName] = this._queries[queryName].stats();\n }\n\n return stats;\n }", "getStats() {\n const queryResult = this.features['DataQueryExecut...
[ "0.6262302", "0.608111", "0.6069024", "0.6043759", "0.5981547", "0.59613365", "0.5923186", "0.5921751", "0.59013736", "0.57350916", "0.5726359", "0.5699926", "0.56530434", "0.5648129", "0.5636669", "0.56144947", "0.5601513", "0.55971307", "0.55935824", "0.55725235", "0.556944...
0.0
-1
component did mount, fire off api call
componentDidMount() { API.getUsers() .then(res => { this.setState({ users: res.data.results, searchUsers: res.data.results }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.callAPI();\n }", "componentDidMount(props) {\n // only called when exhibitor page is created or updated.\n this.apiFetcher(props, false)\n }", "componentDidMount() {\n console.log('component loaded');\n console.log(apiKey);\n this.getApi();\n }"...
[ "0.786734", "0.7661747", "0.75222653", "0.7499843", "0.7402942", "0.73472667", "0.72949487", "0.7277989", "0.7258013", "0.7230852", "0.7177065", "0.71657044", "0.7162761", "0.71478057", "0.71319664", "0.71236616", "0.7116719", "0.71110547", "0.70643", "0.7053089", "0.70477265...
0.0
-1
We create two objects here: a keyvalue object for the dialog's listbox and an array for the Area dropdown.
function create_object () { var list = {}, areas = [], known = {}, actions = app.menuActions.everyItem().getElements(); for(var i = 0; i < actions.length; i++) { if (!ignore (actions[i])) { list[actions[i].name] = {area: actions[i].area, id: actions[i].id}; if (!known[actions[i].are...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeUI() \n{\n MENU_DN1 = new ListControl('DNComparison');\n MENU_DN2 = new ListControl('DNComparison2');\n\tMENU_DN3 = new ListControl('DNComparison3');\n\tMENU_DN1.setAll(selectListArray,selectValueArray);\n\tMENU_DN2.setAll(selectListArray,selectValueArray);\n\tMENU_DN3.setAll(selectListArray,s...
[ "0.59825104", "0.5850512", "0.5844748", "0.58194405", "0.5790763", "0.5752242", "0.5615345", "0.55536926", "0.55389386", "0.5484185", "0.54480374", "0.5430245", "0.5371796", "0.53706026", "0.53392273", "0.531714", "0.53164285", "0.52954775", "0.52686685", "0.52267426", "0.521...
0.629684
0
constructor(id, coin_id, price, content) Send the notification. Also, mark it as sent if it is single use.
send() { if (!this.hasBeenSent) { this.notification.show() if (this.singleUse) { this.hasBeenSent = true } } else { // console.log('Notification already sent') } // if (!this.hasBeenSent) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendCoinChoose(coin) {\n this.setState({\n send_coin: coin,\n fee_in_$: false\n });\n this.sendTotalAdjustCoinChange(coin);\n }", "function Coin()\n{\n\t// Spawn coin and float it up\n\tgm.GetComponent(ItemFactory).SpawnItemAndFloat(prize, giftPos.position, 0, 180, 0...
[ "0.5618921", "0.54941106", "0.5426859", "0.54227823", "0.54210156", "0.5402148", "0.5365523", "0.5339567", "0.53326046", "0.5276491", "0.52500445", "0.52361965", "0.5230102", "0.5186309", "0.5146711", "0.5142288", "0.5140866", "0.51351917", "0.5133374", "0.51031977", "0.50739...
0.58662784
0
Leaflet map loading Loading map with leaflet JS script, embeded in Jupytepide
function load_leaflet_map(mapContainer){ var mymap = leaflet.map(mapContainer).setView([51.505, -0.09], 13); //Jupyter.mymap = mymap; //TO JEST SUPERIMPORTANT THING!!!!!!!!!!!! Stworzyć interfejs z metodami do wywołania.....mymap to obiekt główny interfejsu leaflet.tileLayer('https://api.tiles....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadmap() {\n\n // Leaflet map object\n map = L.map('map', {\n\trenderer: L.canvas()});\n\n // set with initial coordinates at Roger Bacon 321 at Siena\n // College\n map.setView([42.719450, -73.752063], 16);\n\n // set up map tiles based on\n // https://github.com/leaflet-extras/leaf...
[ "0.7943488", "0.73857075", "0.7377925", "0.7348915", "0.7322211", "0.72840506", "0.7271946", "0.722102", "0.72196954", "0.7203797", "0.7162321", "0.7085361", "0.7081818", "0.7078375", "0.7073471", "0.70607656", "0.70521075", "0.7040814", "0.7030193", "0.70185053", "0.70174354...
0.7645085
1
God ray paras folder
function setGodRayDensity() { renderer.setGodRayDensity(controls.Density); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lerDir(path) {\n \n const pathh = \"./src/app/\"+path;\n console.log(\"teste de caminho \" + pathh)\n const diretorios = fs.readdirSync(pathh);\n console.log(\"dentro dos caminhas \" + path+diretorios)\n return {Lista: diretorios};\n \n}", "gameDir() { }", "function MakeDirectorie...
[ "0.62936985", "0.6168641", "0.59387106", "0.5664491", "0.56236744", "0.5611522", "0.5549693", "0.5509386", "0.5496495", "0.5465515", "0.5456494", "0.5449876", "0.54331934", "0.5427888", "0.539438", "0.5374337", "0.53092057", "0.52960134", "0.5294408", "0.5277091", "0.52747047...
0.0
-1
renderer.renderShadow(sun_pos, window.innerWidth / window.innerHeight, [mesh0, scatter0]);
function setTerreainUniformVariables() { // Terrain uniform variables terrainDeferred.bindTexToUnit("tex_Color", terrain_diffuse, 0); terrainDeferred.bindTexToUnit("tex_Normal", terrain_normal, 1); terrainDeferred.bindTexToUnit("tex_Specular", terrain_specular, 2); terrainDeferre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main(dat){\n camera = new THREE.PerspectiveCamera(70,dat.width/dat.height,0.1,500);\n scene = new THREE.Scene();\n renderer = new THREE.WebGLRenderer({canvas:dat.canvas});\n renderer.shadowMap.enabled = true;\n renderer.shadowMap.autoUpdate = false;\n renderer.shadowMap.type = THREE.PCFSoftShadowMap...
[ "0.69919926", "0.6947557", "0.6814621", "0.67101496", "0.66878015", "0.66476595", "0.6610538", "0.65630114", "0.654123", "0.6534167", "0.65224266", "0.64960384", "0.647968", "0.64300597", "0.64282936", "0.63910794", "0.6327102", "0.63241357", "0.6320609", "0.6314421", "0.6311...
0.0
-1
Bind the given Texture to the given texture unit
bindTexToUnit(handleName, tex, unit) { this.use(); var location = this.unifTexUnits.get(handleName); if (location !== undefined) { __WEBPACK_IMPORTED_MODULE_1__globals__["a" /* gl */].activeTexture(__WEBPACK_IMPORTED_MODULE_1__globals__["a" /* gl */].TEXTURE0 + unit); tex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useTextureUnitForTexture(unit, texture) {\n\tgl.activeTexture(gl.TEXTURE0 + unit);\n\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\tgl.uniform1i(samplerPointer, unit);\n\tgl.bindBuffer(gl.ARRAY_BUFFER, textureBuffer);\n\tgl.vertexAttribPointer(textureCoordinatesAttributePointer, textureBuffer.itemSize, gl.FL...
[ "0.8137728", "0.8084416", "0.7965856", "0.74083704", "0.6998107", "0.6803765", "0.67624503", "0.65785986", "0.63863105", "0.6303695", "0.6294631", "0.6281841", "0.62712026", "0.62651575", "0.61897504", "0.6181549", "0.6175449", "0.6121894", "0.6121894", "0.61152834", "0.61068...
0.7938008
3
Add a row to the end of the GUI or before another row.
function addRow(gui, dom, liBefore) { var li = document.createElement('li'); if (dom) li.appendChild(dom); if (liBefore) { gui.__ul.insertBefore(li, params.before); } else { gui.__ul.appendChild(li); } gui.onResize(); return li; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertRowAfter() {\n this.insertRow(1);\n }", "function addRow(table) {\n var row = table.insertRow(table.rows.length);\n var cell = null;\n for (var i = 0; i < 5; i++) {\n cell = row.insertCell(i);\n if (i == 0) {\n cell.innerHTML = table.rows.length - 1;\n } else {\n c...
[ "0.77142525", "0.7179631", "0.6926806", "0.6798047", "0.6749812", "0.6722868", "0.6697217", "0.66927636", "0.65279746", "0.6522833", "0.6516797", "0.65038574", "0.6497257", "0.64562905", "0.64153385", "0.64136374", "0.6406333", "0.6308319", "0.6264443", "0.625808", "0.6246878...
0.64101154
22
this is billboard square
function lerp(x, y, a) { //x×(1−a)+y×a var b = a / 0.50; return y * (1.0 - b) + x * b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Billboard(o, up, at, sz){\n\tvar args = arguments;\n\tvar a = vec3(-1,-1,0);\n\tvar b = vec3(1,-1,0);\n\tvar c = vec3(1,1,0);\n\tvar d = vec3(-1,1,0);\n\tvar n = vec3(0,0,1);\n\tvar size = !!sz ? sz : 1;\n\tif (!!o && !!up & !!at) {\n\t\tup = normalize(up);\n\t\tat = scale(size, normalize(at));\n\t\tvar s...
[ "0.6789806", "0.6710129", "0.6695661", "0.66821647", "0.65874904", "0.6583907", "0.65588784", "0.655047", "0.6464907", "0.6464344", "0.6420083", "0.64197683", "0.63949734", "0.637254", "0.63613594", "0.6355481", "0.63545585", "0.6353421", "0.634585", "0.63169503", "0.6310824"...
0.0
-1
cinematic key framed camera paras
updateDemoCamTime(deltaTime) { this.demoCamTime += deltaTime; // console.log(this.demoCamTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCamera(deltaTime){\n if(this.pente.active_game && this.pente.game_mode == 1){\n if(this.pente.next == \"w\"){\n if(this.cameraZindex < 30)\n this.cameraZindex += deltaTime/100;\n\n this.camera = new CGFcamera(0.4, 0.1, 500, vec3.fromValues(18...
[ "0.71032614", "0.7012171", "0.67921925", "0.67328966", "0.6712827", "0.6660375", "0.6627989", "0.6595264", "0.6592503", "0.65257823", "0.6508657", "0.650657", "0.64972067", "0.6486622", "0.6450033", "0.6447511", "0.6439826", "0.64366156", "0.6421143", "0.64056706", "0.6399445...
0.0
-1
will be replaced by glvec4 eventually
function vec4multMat4(out, a, m) { var x = a[0], y = a[1], z = a[2], w = a[3]; out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Vector4(x,y,z,w){this.x=x;this.y=y;this.z=z;this.w=w;}", "function Vec4 (x, y, z, t) {\n this.x = x\n this.y = y\n this.z = z\n this.t = t\n}", "function box_model() {\n var points = [];\n\n /*\n This code is derived from the code for chapter 4 in the text.\n */\n function q...
[ "0.6739747", "0.666561", "0.6542255", "0.6521687", "0.64900786", "0.64337045", "0.64321774", "0.64254534", "0.64227295", "0.64224386", "0.64105654", "0.64096373", "0.63911885", "0.6359764", "0.63538367", "0.63479257", "0.6330736", "0.63270205", "0.6300398", "0.6297893", "0.62...
0.0
-1
gets upperleft of a 4x4 matrix into a 3x3 of vectors
function mat3from4(out, mat4x4) { out[0][0] = mat4x4[0] out[0][1] = mat4x4[1] out[0][2] = mat4x4[2] out[1][0] = mat4x4[4] out[1][1] = mat4x4[5] out[1][2] = mat4x4[6] out[2][0] = mat4x4[8] out[2][1] = mat4x4[9] out[2][2] = mat4x4[10] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mat4To3(m) {\n return [\n m[0], m[1], m[2],\n m[4], m[5], m[6],\n m[8], m[9], m[10]\n ];\n }", "getUpperLook () {\n return GeometryUtils.unique(\n this.cubes.map(cube => [cube[0], cube[2]])\n )\n }", "function reverseRowsAndColumns(matrix) {\n le...
[ "0.59205616", "0.58690286", "0.564776", "0.56179684", "0.5502146", "0.54688066", "0.5457372", "0.54516375", "0.5438006", "0.53882", "0.53388405", "0.5327649", "0.5298706", "0.5292244", "0.5277804", "0.5254572", "0.525233", "0.5251246", "0.52498853", "0.5232243", "0.52266866",...
0.49340817
88
This brutal hack is needed
function getSizeBrutal(unit, element) { var testDIV = document.createElement('div') testDIV.style['font-size'] = '128' + unit element.appendChild(testDIV) var size = getPropertyInPX(testDIV, 'font-size') / 128 element.removeChild(testDIV) return size }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "transient private internal fun...
[ "0.7214787", "0.68021655", "0.6791583", "0.6568445", "0.65131253", "0.64814174", "0.636159", "0.6267355", "0.6250419", "0.6219257", "0.6204111", "0.6061958", "0.60327774", "0.60184324", "0.601119", "0.59601694", "0.58977157", "0.5887644", "0.5878155", "0.5822945", "0.58148885...
0.0
-1
set reflected view matrix for current camera
setReflectedView(camera) { // have correct view matrix of mirrored camera let clipPlane = new __WEBPACK_IMPORTED_MODULE_2__material_Plane__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_gl_matrix__["d" /* vec3 */].fromValues(0, this.offset[1] - 0.05, 0), __WEBPACK_IMPORTED_MODULE_0_gl_matrix__["d" /* v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set modelViewMatrix(mvMat) { this._modelViewMatrix = mvMat; }", "_setMVMatrix() {\n if(this._updateMVMatrix) {\n // compose our world transformation matrix from custom origin\n this._matrices.world.matrix = this._matrices.world.matrix.composeFromOrigin(this._translation, this.quatern...
[ "0.75230914", "0.7293615", "0.7247254", "0.71521884", "0.71312255", "0.7128424", "0.7089011", "0.7089011", "0.7025161", "0.7018535", "0.6971179", "0.6930486", "0.691864", "0.6882438", "0.6880139", "0.68567127", "0.67871827", "0.67676735", "0.67546755", "0.6741155", "0.6682416...
0.78862673
0
asynchrone Funktion zum Laden eines GeoJSON Layers
async function ladeGeojsonLayer(datenAttribute) { console.log(datenAttribute); console.log(datenAttribute.icon); const response = await fetch(datenAttribute.json); const response_json = await response.json(); // GeoJSON Geometrien hinzufügen und auf Ausschnitt zoomen const geojsonObjekt = L.geo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getDataArrond2() {\r\n const response = await fetch(\"php/arrondissements.php\");\r\n const data = await response.json();\r\n\tconst geojson = L.geoJSON(data, \r\n\t\t{style:{\r\n\t\t\tcolor: '#858585'\r\n\t\t},\r\n\t\tonEachFeature: function(feature, layer) {\r\n\t\t\t\tlayer.on({\r\n\t\t\t\t...
[ "0.7049258", "0.6791426", "0.6768748", "0.6645573", "0.66141194", "0.64787084", "0.6460858", "0.6441317", "0.6419588", "0.6378981", "0.63661236", "0.63249445", "0.63132995", "0.6284407", "0.62774503", "0.627033", "0.624693", "0.62105083", "0.621004", "0.6193029", "0.61831677"...
0.6243886
17
Sets style based on the wkt type, eg: point, linestring, ...
static getStyleByWKTType(wktGeometry) { var style; if (wktGeometry.toLowerCase().indexOf('point') > -1) { style = new ol.style.Style({ image: new ol.style.Circle({ radius: 4, stroke: new ol.style.Stroke({ color: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setStyle() {\n // Default style\n this.style = this.getStyle(this.styleKey)\n\n // Override Style\n if (this.styleKey === 'style_zone_urbaines') {\n this.style = { ...this.style, ...this.getStyle(`style_zone_urbaines__${this.feature.properties.typezone.toLowerCase()}`) }\n ...
[ "0.6537453", "0.5994602", "0.5928879", "0.5848196", "0.5846481", "0.5831737", "0.58303714", "0.57969785", "0.57440794", "0.57437336", "0.56644446", "0.56378853", "0.5611469", "0.5572628", "0.5565342", "0.55550015", "0.55331904", "0.5529922", "0.5524956", "0.55090773", "0.5507...
0.71688914
0
Handler function to wrap each route.
function asyncHandler(cb){ return async(req, res, next) => { try { await cb(req, res, next) } catch(error){ res.status(500).send(error); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "on(...pageRoutes) {\n //increment the number of routes registered\n this.numRegistered += 1;\n for (const {route, handler} of pageRoutes) {\n if (Array.isArray(route)) {\n for (const path of route) {\n const [regPath, params] = getRegexFromRouteStri...
[ "0.66923195", "0.66777176", "0.6529502", "0.640805", "0.6393017", "0.63683975", "0.6329381", "0.6255298", "0.62433386", "0.6242101", "0.6229308", "0.61636764", "0.61525965", "0.61198807", "0.61017776", "0.6048125", "0.60360044", "0.6026977", "0.60091776", "0.60078543", "0.599...
0.0
-1
Spread syntax allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more keyvalue pairs (for object literals) are expected. For func...
function SpreadTest(a, b, c) { console.log(a + ' ' + b + ' ' + c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spread(func, args) {\n return func(...args)\n}", "function spread(o) { return { ...o }; }", "function spreadArgs(fn){\n return function spread(args){\n return fn(...args)\n }\n}", "function spread(fn) {\r\n return function(args) {\r\n return fn.apply(this, args);\r\n };\r\n ...
[ "0.77466923", "0.70566046", "0.68930745", "0.6821164", "0.66259706", "0.6616595", "0.65568864", "0.65460205", "0.65200746", "0.63536596", "0.6245824", "0.6219093", "0.621828", "0.6202838", "0.6094888", "0.6060152", "0.600838", "0.60034245", "0.598555", "0.59753644", "0.596173...
0.52508783
74
Product's Data Access Object: handles all the necessary database interaction concerning the products.
function getAll (callback) { // returns all products Product.find({}) .populate('manufacturer') .exec((error, products) => { if (error) return callback(`Failed to get product. => ${error}.`); productsResults = []; each(products, (item) => { const productItem = buildProduct(item); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadProductData(data) {\n _product = data[0];\n}", "viewProduct(product) {\n const queryString = `SELECT * FROM products\n WHERE products.id = $1`;\n\n const queryParams = [product.productId];\n\n return db\n .query(queryString, queryParams)\n .t...
[ "0.634725", "0.6334781", "0.6296277", "0.6248103", "0.6216866", "0.62029237", "0.6180429", "0.61154324", "0.60844094", "0.60161364", "0.6005398", "0.599682", "0.5973183", "0.5971499", "0.5961511", "0.5945685", "0.5927029", "0.5921769", "0.59123474", "0.59121466", "0.5909007",...
0.0
-1
Once the service worker is registered set the initial state
function initialiseState(reg) { // Are Notifications supported in the service worker? if (!(reg.showNotification)) { // Show a message and activate the button subBtn.textContent = 'Subscribe to Push Messaging'; showMessage('Showing Notification is not suppoted in your browser'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialiseState() {\n\n if (!('showNotification' in ServiceWorkerRegistration.prototype)) {\n window.Demo.debug.log('Notifications aren\\'t supported.');\n return;\n }\n\n if (Notification.permission === 'denied') {\n window.Demo.debug.log('The user has blocked notifications.');\n return;\n...
[ "0.7114276", "0.6824227", "0.68187326", "0.646819", "0.64395547", "0.64395547", "0.6344202", "0.6335006", "0.633165", "0.6234476", "0.60901994", "0.6087264", "0.6069678", "0.6050336", "0.6027971", "0.59843564", "0.59418887", "0.58913845", "0.5848453", "0.5842831", "0.5839352"...
0.6402629
6
Constructor predeterminado del juego del tres en raya
constructor(_name = "", _description = "", _options = [], _players = 0) { super(_name, _description, _options, _players); this.players = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(x, y) {\n this.pos = createVector(x, y);\n this.rays = [];\n this.heading = 0;\n this.fov = 180;\n this.acc = createVector(0,0);\n //create array of rays within FOV range\n for (let a = -this.fov; a < this.fov; a += 1) {\n this.rays.push(new Ray(this.pos, radians(a)));\n }\...
[ "0.68960655", "0.6722335", "0.67005336", "0.6507247", "0.64870733", "0.6457562", "0.64295167", "0.6383122", "0.6363742", "0.63424236", "0.6322231", "0.6316776", "0.6302412", "0.6283573", "0.6272497", "0.6271426", "0.6252997", "0.62484217", "0.6243873", "0.6215932", "0.6204154...
0.0
-1
Determina si se debe o puede unir a una sala
setGameMenu() { this.players = []; this.addPlayer(new Player(currentUser.alias)); $("#Game-menu").animate( { left: '0vw' }); $("#game-menu-info-text").text(this.description); $('#GM-btn_1').text(this.options[0]); $('#GM-btn_2').text(this.o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valida_sesion_iniciada()\n{\n //validar si esta en alguna sesion\n id_plan = buscarlocal('id_plan');\n id_sesion = buscarlocal('id_sesion');\n\n\n if(id_plan === null && id_sesion === null)\n {\n console.log(\"no existe ninguno en local\");\n estadoPlan = false;\n estad...
[ "0.6234219", "0.6145044", "0.60110575", "0.5800673", "0.57929796", "0.57326484", "0.56783116", "0.56762284", "0.5662673", "0.56489325", "0.56191885", "0.55972314", "0.55955225", "0.55870646", "0.55471003", "0.55421597", "0.55324244", "0.552969", "0.5510199", "0.54857343", "0....
0.0
-1
Determina si se debe o puede unir a una sala
entrarEnLaSala() { let playerName = $("#RoomIdInput").val(); playerName = playerName.toUpperCase(); this.addPlayer(new Player(playerName)); this.refreshPanel(); $("#RoomIdInput").val(""); $("#closeModal").click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valida_sesion_iniciada()\n{\n //validar si esta en alguna sesion\n id_plan = buscarlocal('id_plan');\n id_sesion = buscarlocal('id_sesion');\n\n\n if(id_plan === null && id_sesion === null)\n {\n console.log(\"no existe ninguno en local\");\n estadoPlan = false;\n estad...
[ "0.6233291", "0.614307", "0.60097986", "0.580037", "0.57930833", "0.57329434", "0.56791884", "0.5675441", "0.566089", "0.5649267", "0.56191075", "0.55967987", "0.55942637", "0.5587301", "0.5545774", "0.55416137", "0.553212", "0.55285394", "0.5509301", "0.54853606", "0.5478551...
0.0
-1
Determina si se debe o puede unir a una sala
instanciateRoom() { //this.createRoom(); $("#GP-btn_2").text("Eliminar sala") $("#GP-btn_1").css("display", "block"); pageIndex = 4; app.goToPage("Game-Roulete"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valida_sesion_iniciada()\n{\n //validar si esta en alguna sesion\n id_plan = buscarlocal('id_plan');\n id_sesion = buscarlocal('id_sesion');\n\n\n if(id_plan === null && id_sesion === null)\n {\n console.log(\"no existe ninguno en local\");\n estadoPlan = false;\n estad...
[ "0.6233291", "0.614307", "0.60097986", "0.580037", "0.57930833", "0.57329434", "0.56791884", "0.5675441", "0.566089", "0.5649267", "0.56191075", "0.55967987", "0.55942637", "0.5587301", "0.5545774", "0.55416137", "0.553212", "0.55285394", "0.5509301", "0.54853606", "0.5478551...
0.0
-1
Over here because this function should be available to serving/add.js and serving/get.js
function addIngredientToList(ingredient) { console.log(ingredient); var ele = $(INGREDIENT_TEMPLATE); $("#add-ingredient .list-group").append(ele); ele.find(".amount").html(ingredient.numberOfUnits); ele.find(".unit").html(ingredient.ingredient.unit.name); ele.find(".name").html(ingredient...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async index({request, response}) {\r\n\r\n\t\t\r\n\t}", "'process'(req, res) {\n //console.log('Site_Images processing');\n\n // Escaping etc?\n // slashed in icon keys? escape and unescape them...?\n\n // change some keys...? avoid slashes in keys...\n\n\n\n\n // Should look ...
[ "0.5716074", "0.5545224", "0.5496909", "0.5468674", "0.54563475", "0.54439044", "0.5393169", "0.53560865", "0.53304785", "0.5313667", "0.5300603", "0.52980095", "0.5286511", "0.5262831", "0.52602583", "0.5240921", "0.5238391", "0.52270186", "0.52192825", "0.5216094", "0.52052...
0.0
-1
Process results when all items back
function processResults(err, results) { self.refillInProgress = false; self.emit('refill done', results); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processItems() {}", "function processResults (results, items, cb) {\n\n if (!items) return cb(null, results)\n\n var resultIds = results.map(function (item) { return item._id })\n\n async.mapSeries(items, function (item, cb) {\n\n if (item.isCustom) return cb(null)\n\n // if an overridden item...
[ "0.6946057", "0.63798845", "0.61032933", "0.59110653", "0.58262795", "0.58159363", "0.5792988", "0.5760935", "0.5749252", "0.56799394", "0.56527925", "0.5652522", "0.56471884", "0.5635486", "0.56232923", "0.5620064", "0.5609898", "0.5608017", "0.5571371", "0.55711913", "0.555...
0.609787
3
Portions of this code are from MochiKit, received by The Closure Authors under the MIT license. All other code is Copyright 20052009 The Closure Authors. All Rights Reserved.
function I(a, b) { this.h = []; this.O = b || null; this.b = this.c = !1; this.d = void 0; this.ja = this.D = this.m = !1; this.f = 0; this.g = null; this.J = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "protected internal function m252() {}", "transient private protected internal ...
[ "0.7015306", "0.6822514", "0.6472232", "0.6451659", "0.6363711", "0.6358107", "0.6283732", "0.6253628", "0.61815655", "0.60607934", "0.6005943", "0.59038526", "0.587823", "0.5856427", "0.5826295", "0.5813913", "0.5809147", "0.5794642", "0.57843405", "0.5770978", "0.5770763", ...
0.0
-1
Copyright 2012 YDN Authors, Yathit. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License");.
function T(a, b, c) { var d = c || {}; this.D = d.mechanisms || je; this.p = d.size; this.J = u(d.connectionTimeout) ? d.connectionTimeout : 6E4; this.b = null; this.f = []; this.nb = !1; var e; if (b instanceof Xd) { e = b; } else { if (D(b)) { d.autoSchema || !u(b.stores) ? e = new b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function DWRUtil() { }", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", ...
[ "0.5889651", "0.5715209", "0.54772836", "0.5430951", "0.542258", "0.53965974", "0.53610116", "0.51598924", "0.51462346", "0.51417994", "0.5140849", "0.5132219", "0.51288664", "0.5125024", "0.51201355", "0.5115476", "0.5093768", "0.5093768", "0.5074529", "0.50546074", "0.50534...
0.0
-1
Copyright 2012 YDN Authors, Yathit. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License");.
function Jj(a) { a.g || (a.g = new tg); return a.g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function DWRUtil() { }", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", ...
[ "0.5890281", "0.571594", "0.5477728", "0.5432041", "0.54236585", "0.539705", "0.53621596", "0.5159935", "0.5147101", "0.51417565", "0.5140254", "0.51317906", "0.5129113", "0.5125449", "0.51206684", "0.5115174", "0.50938404", "0.50938404", "0.5075099", "0.50554633", "0.5054539...
0.0
-1
Calls the fetchUser method when the component mounts
componentDidMount() { this.fetchUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n\t\tthis.fetchUser();\n\t}", "componentDidMount() {\n this.props.fetchUser();\n }", "componentDidMount() {\n this.props.fetchUser();\n }", "componentDidMount() {\n this.props.fetchUser();\n }", "componentDidMount() {\n this.props.fetchUser();\n }", "comp...
[ "0.82982665", "0.79756945", "0.79756945", "0.7952375", "0.7952375", "0.78713983", "0.7818642", "0.7609159", "0.73352796", "0.7257265", "0.7220508", "0.7216876", "0.7139183", "0.7115512", "0.70970833", "0.70580107", "0.7037558", "0.7004291", "0.7004291", "0.69919884", "0.69768...
0.8295872
1
Fetches the current user and sets the state of usersname so we can set the text on the sidebar
fetchUser() { axios('/api/auth/currentUser').then(res => { this.setState({ name: res.data.name }, function() { console.log(this.state.name); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userget(){\n document.getElementById('current-user').innerHTML = current_user;\n }", "function load_user() {\n // get user id from local storage\n const localStorageCurrentUserId = localStorage.getItem(\"currentUserId\");\n\n // make a REST HTTP request for all users using the app\n cons...
[ "0.751813", "0.7176168", "0.7053668", "0.69927067", "0.69907737", "0.6907868", "0.6889673", "0.6862794", "0.6774183", "0.67406017", "0.6735514", "0.6730273", "0.67038476", "0.6701399", "0.6689289", "0.665972", "0.66528326", "0.66403246", "0.6621832", "0.65950274", "0.65792894...
0.62978476
74
Function to change webpage background color
function changeBodyBg(color){ document.body.style.background = color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeBackground(hexColor){\n document.body.style.backgroundColor = hexColor;\n}", "function plainBackground(){\n document.body.style.backgroundColor = \"#ffffff\";\n}", "function setBackgroundColor() {\n document.body.style.backgroundColor = bg_color;\n}", "function changebackground(){\n\tdocume...
[ "0.8022239", "0.8021127", "0.80100036", "0.7981085", "0.79747075", "0.79530174", "0.79201114", "0.78521246", "0.77627814", "0.77564245", "0.7755485", "0.76873106", "0.76692075", "0.76466227", "0.76040626", "0.75910276", "0.75826746", "0.7578006", "0.75488603", "0.7519994", "0...
0.77318907
11
btn.dispatchEvent(new Event('click')) SOCKET API HANDLERS
function onclickSocket() { input_text = input.value socket.emit('frontend message', {data: input_text}) /* console.log('hhhhh'); shell.end(function (err, code, signal) { if (err) throw err; console.log('exit code: ', code); console....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onButtonClick(e) {\n var elem = e.target;\n // Here we send a button click event, letting the server know which button was clicked\n socket.emit('button_click', { id: elem.id });\n}", "btnClick() {\n\t\tthis.socket.emit(\"btn state\", this.props.btnValue);\n\t}", "handleButtonClick(){\n\t\tco...
[ "0.683252", "0.6803962", "0.6788154", "0.6628682", "0.6543369", "0.6481604", "0.6475768", "0.6474553", "0.63187706", "0.6315026", "0.62899804", "0.62723917", "0.61510384", "0.6145567", "0.6143951", "0.613923", "0.612502", "0.6106415", "0.60940707", "0.6088802", "0.6083146", ...
0.5697791
68
middleware to verify credentials using bcrypt
function restrictedUser(req, res, next) { if(req.session && req.session.user) { next(); } else { res.status(401).json({message: 'No Credentials Provided!'}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validatePassword(userPassword, reqPassword, req, res, next) {\n let password = crypto.pbkdf2Sync(reqPassword, req.userDetails.salt, 1000, 32, 'sha512').toString('hex');\n if(req.userDetails.password === password) {\n next();\n } else {\n res.status(409).json({status : 'error', message : 'User...
[ "0.71531624", "0.70679456", "0.6973738", "0.69469935", "0.6885315", "0.6884052", "0.6807788", "0.68060005", "0.67455786", "0.6690223", "0.66767263", "0.6634081", "0.6613221", "0.6583567", "0.6573899", "0.6554841", "0.6545418", "0.65360415", "0.65276706", "0.65007687", "0.6497...
0.0
-1
Character Generator Functions Function that accepts a string value as an argument and returns a random index number from the string argument
function randomIndex(str){ return Math.floor(Math.random() * str.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateCharacter(){\n var index;\n var character;\n //alert (\"Inside generateCharacter\");\n var characterType = getCharacterType(upper, lower, digits, spec);\n\n //alert(\"get \" + characterType)\n\n if (characterType == 0) {\n character= UPPER[Math.floor(Math.random()*UPPER.length)]\...
[ "0.74605364", "0.7349935", "0.73375225", "0.7325993", "0.72825944", "0.7247681", "0.7212039", "0.7180806", "0.7093573", "0.70820034", "0.7080191", "0.7069328", "0.6968544", "0.6965078", "0.6917589", "0.68858117", "0.68741685", "0.68458873", "0.68391836", "0.683871", "0.683811...
0.7786962
0
0, 1, 2, 3, 4, 5, 6 Function that returns a random lowercase letter
function getRandomLower(){ const letters = `abcdefghijklmnopqrstuvwxyz`; // Returning a random letter using a random index in the "letters" string return letters[randomIndex(letters)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random_lowercase() {\n return String.fromCharCode(Math.floor(Math.random() * 26) + 97);\n}", "function getLowercase() {\n return lowerLetters[Math.floor(Math.random() * lowerLetters.length)];\n}", "function getRandomLowerCase(){\n return String.fromCharCode(Math.floor(Math.random()*26)+97);\n}", ...
[ "0.8663768", "0.8582987", "0.8545809", "0.8504977", "0.8488496", "0.84575224", "0.84448516", "0.8435986", "0.84283006", "0.84249806", "0.841438", "0.84063053", "0.84011495", "0.84011495", "0.84011495", "0.84011495", "0.83989984", "0.83989984", "0.83989984", "0.83859736", "0.8...
0.85878664
1
Random lowercase letter Function that returns a random uppercase letter
function getRandomUpper(){ // Running the "getRandomLower" function to create a random letter and setting that value to the letter variable const letter = getRandomLower(); // Changing the random letter to an uppercase letter and returning it from the function return letter.toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomCapitalLetter(){\n return String.fromCharCode((Math.random()*26)+65);\n }", "function getRandomUpperCase(){\n return String.fromCharCode(Math.floor(Math.random()*26)+65);\n }", "function getUpperCase() {\n return String.fromCharCode(Math.floor(Math.random() * 26)+ 65); \n}", "function ge...
[ "0.86494976", "0.86321723", "0.8469265", "0.840476", "0.8379428", "0.83424276", "0.8275646", "0.8275098", "0.8271725", "0.8271725", "0.8253651", "0.82506865", "0.82334375", "0.8228517", "0.8220357", "0.8198295", "0.819499", "0.81448233", "0.81366515", "0.812416", "0.81132936"...
0.81377524
18
Random uppercase letter Function that returns a random number (AKA Random number as a string value)
function getRandomNumber(){ const numbers = `0123456789`; // Returning a random number using a random index in the "numbers" string return numbers[randomIndex(numbers)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateUpperCase() {\n // random number picker that uses ascii knowledge of Upper Case\n var value = Math.floor(Math.random() * (90 - 65) + 65);\n return String.fromCharCode(value);\n}", "function produceUpper() { \n var upperCase = String.fromCharCode(Math.floor(Math.random() * 26 + 65))\n ...
[ "0.8413488", "0.8251156", "0.8203341", "0.8200212", "0.81960696", "0.81747085", "0.81747085", "0.81717366", "0.8159154", "0.8156818", "0.81254965", "0.80939484", "0.8053973", "0.80326396", "0.80106777", "0.80010533", "0.7949094", "0.7911301", "0.7850611", "0.7792901", "0.7712...
0.0
-1
Random number from the "numbers" string Function that returns a random symbol
function getRandomSymbol(){ const symbols = `!@#$%^&*(){}[]=<>/,.`; // Returning a random symbol using a random index in the "symbols" string return symbols[randomIndex(symbols)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomSymbol() {\n // variable to grab letter from symbolString by running Math.random rounded down multiplied by length of symbolString\n var randSymbol = symbolString[Math.floor(Math.random() * symbolString.length)];\n return randSymbol;\n}", "function getRandomSymbol(){\n var symbol = \"!@#$%...
[ "0.79560727", "0.78859776", "0.78747404", "0.77987427", "0.7772015", "0.77633274", "0.7615423", "0.7516441", "0.74541897", "0.7425668", "0.7131888", "0.70815235", "0.7079757", "0.7052574", "0.7011104", "0.6999912", "0.69284934", "0.6886559", "0.687343", "0.6858848", "0.684392...
0.8011082
0
Function that accepts true or false values as well as a number as arguments NOTE: The checkbox inputs and number (AKA Length) input will determine the value/arguments entered into this function
function generatePassword(lower, upper, number, symbol, length){ console.log(lower, upper, number, symbol, length); // 1. CREATE THE PASSWORD VARIABLE let generatedPassword = ``; // 2. FILTER OUT UNCHECKED OPTIONS // True and false values can be added together (True is 1 and false is 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useNumbers()\n{\n var flag = document.getElementById(\"numbers\").checked;\n \n return flag;\n}", "function conditionCheck(val, counter){\n if (val == counter) { checkboxEnable(); }\n}", "function GetItemTrueFalseForm2(){\n var val1 = document.getElementById(\"item1check\").checked;\n ...
[ "0.6690163", "0.5941082", "0.5895455", "0.58290863", "0.58290863", "0.582843", "0.5750024", "0.5668728", "0.5657026", "0.5650352", "0.55981535", "0.5592452", "0.55569863", "0.5552303", "0.5525023", "0.5484638", "0.54832995", "0.5464867", "0.5435534", "0.5423111", "0.5418773",...
0.0
-1
Convert Minute to Hours
function convert_Min2Hour(time) { time = parseInt(time); if (time < 1) { return; } var hours = Math.floor(time / 60); var minutes = (time % 60); if(hours < 10) hours = "0" + hours; if(minutes < 10) minutes = "0" + minutes; var format = hours +":"+minutes; re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function convertHourMin (hours, minutes) {\n\tlet...
[ "0.7514018", "0.7514018", "0.7514018", "0.7514018", "0.7514018", "0.7514018", "0.7514018", "0.74347687", "0.7349245", "0.72717774", "0.69732875", "0.69617546", "0.69076633", "0.6897053", "0.68618965", "0.6859626", "0.6820522", "0.6817679", "0.6812536", "0.67407876", "0.671340...
0.7452724
7
Convert Time to Minutes
function convert_Hour2Min(time) { var data = null; var hour = null; var minute = null; var minutes = null; data = time.split(":"); hour = parseInt(data[0]); minute = parseInt(data[1]); minutes = hour*60 + minute; return minutes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertTimeToMinutes( time ) {\n\t\tvar min = 0, sec = '00';\n\t\tif ( ( time % 60 ) < 10 ) {\n\t\t\tsec = '0' + Math.floor( time % 60 );\n\t\t} else {\n\t\t\tsec = Math.floor( time % 60 );\n\t\t}\n\t\tif (time > 60) {\n\t\t\tmin = Math.floor( time / 60 );\n\t\t}\n\t\treturn min + ':' + sec;\n\t}", "fun...
[ "0.76810205", "0.7598875", "0.7342788", "0.73414147", "0.7273681", "0.7273063", "0.727082", "0.7266593", "0.7235176", "0.716614", "0.7121752", "0.7110861", "0.71053076", "0.7098369", "0.70973116", "0.7000215", "0.6968225", "0.6958163", "0.694235", "0.6902699", "0.6886535", ...
0.73795205
2
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // define association here Ticket.belongsTo(models.Event) Ticket.belongsToMany(models.User, {through: models.UserTicket}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.7641476", "0.7507344", "0.7312871", "0.7306175", "0.7306175", "0.7306175", "0.72937477", "0.7284903", "0.7277787", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.7...
0.0
-1
TO DO: WHEN I refresh the page THEN the saved events persist
function renderAppointments() { //get data from local storage var timeBlocks = $('.time-block'); var textAreas = $('textarea'); console.log(timeBlocks); console.log(textAreas); for(var i = 0; i < timeBlocks.length; i++) { var timeId = timeBlocks[i].id; var value = localStorage.getItem(timeId); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveEvents() {\n localStorage.setItem(\"EVENTS\", JSON.stringify(events));\n}", "function storeEvents(savedEvents){\n window.localStorage.setItem(\"savedEventsArray\", JSON.stringify(eventsArray)); \n }", "function save() {\n events.push({date:document.forms[0].taskDate.value, title: documen...
[ "0.76988935", "0.7461513", "0.7404144", "0.72608525", "0.71784925", "0.7105681", "0.7028704", "0.69942725", "0.6962909", "0.6900407", "0.6762358", "0.67440325", "0.67139196", "0.66946024", "0.66419256", "0.6595133", "0.6477541", "0.6450769", "0.63752896", "0.6335054", "0.6305...
0.0
-1
This is the two arrays, combined var c = a.concat(b) This is the array with no duplicates, currently empty var noDuplicate = [] function to take each element in each array
function mergeArray(a, b){ var c = a.concat(b) var noDuplicate = [] c.forEach(function(el){ //this sees if there are any duplicates if (noDuplicate.lastIndexOf(el) < 0) { //this pushes the element into noDuplicate noDuplicate.push(el) } }) console.log(noDuplicate) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatUnique(a,b) {\n\t\tvar c = [];\n\t\tc.concat(a);\n\t\tfor (var i = 0;i<b.length;i++) {\n\t\t\tif(!contains(c,b[i])) {\n\t\t\t\tc.push(b[i]);\n\t\t\t}\n\t\t}\n\t}", "function mergeOrderedArraysNoDups(a, b) {\n let ret = [];\n let idx_a = 0;\n let idx_b = 0;\n if (a[0] != null && b[0] !=...
[ "0.7889502", "0.74136007", "0.7335074", "0.7330862", "0.72996134", "0.7278765", "0.7245757", "0.7202981", "0.7194272", "0.71097803", "0.7108144", "0.7048153", "0.7034943", "0.700499", "0.6978163", "0.6944518", "0.69438016", "0.6937378", "0.69232696", "0.6896406", "0.6890804",...
0.8227747
0
end dom help / Create Tab Control
function TabBrowser(name,state) { this.buildTab(name,state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function T1_C2_Shell_Controls_TabedControl() {\n /// <summary>\n /// Initialises a new instance of the tabedControl control\n /// </summary>\n\n /*\n * Private Members\n */\n\n var myPublicApi;\n\n /*\n * Private Functions\n */\n\n functi...
[ "0.73057204", "0.7136391", "0.6869801", "0.686895", "0.6830119", "0.68237746", "0.6771364", "0.677061", "0.67422426", "0.6740012", "0.6705336", "0.6701986", "0.66944593", "0.6688936", "0.6668271", "0.6666618", "0.6666506", "0.6643807", "0.6633466", "0.66312677", "0.6623531", ...
0.0
-1
end public method / ResultBox
function ResultBox(name,state) { this.buildBox(name,state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get resultObj() {\n return this._resultObj;\n }", "getResult() {}", "function emptyResultBox() {\n while (resultBox.hasChildNodes())\n {\n resultBox.removeChild(resultBox.lastChild);\n } \n }", "get result() { return this._result; }", "result(index) {\n const resul...
[ "0.6150734", "0.61183465", "0.6083003", "0.6073019", "0.60530144", "0.59256756", "0.5862105", "0.57259965", "0.57159764", "0.5699074", "0.56857336", "0.56628495", "0.56581825", "0.56465286", "0.5606619", "0.5604184", "0.55973214", "0.55919325", "0.557674", "0.55598354", "0.55...
0.7377109
0
GAjax Google Ajax Search API
function GAjax(name) { this.buildSearchControl(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendRequestToGoogleApi(query) {\r\n var url = 'https://www.googleapis.com/customsearch/v1?key='\r\n + googleApiProps.key + '&cx=' + googleApiProps.cx + '&q=' + encodeURIComponent(query) + '&start=' + startPage + imageSearchStr;\r\n \r\n xmlHttp = new XML...
[ "0.70958304", "0.6941644", "0.6875121", "0.67663366", "0.6739064", "0.66493684", "0.6599131", "0.6581731", "0.6526747", "0.65223104", "0.6520743", "0.6508839", "0.64982", "0.6455688", "0.63894993", "0.638507", "0.63638055", "0.6336727", "0.63315254", "0.63178056", "0.6310169"...
0.67858046
3
Handler for Button Search Custom
function sendQuery() { loader = 0; DOMhelp.$(tab1name+'box').innerHTML=''; DOMhelp.$(tab2name+'box').innerHTML=''; DOMhelp.$(tab3name+'box').innerHTML=''; DOMhelp.$(tab4name+'box').innerHTML=''; audio.clea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSearchButton(event) {\n if (\n event.target.label ==\n gSearchBundle.GetStringFromName(\"labelForSearchButton\")\n ) {\n onSearch();\n } else {\n onSearchStop();\n }\n}", "function clickSearchButton(e){\n _self.getDefaultPlace(_self.scope.inputSearch.value); \n }", "funct...
[ "0.7979259", "0.7412966", "0.7263552", "0.70778036", "0.70174956", "0.6995198", "0.6976406", "0.69607794", "0.6949839", "0.69465035", "0.6931265", "0.6931022", "0.69210523", "0.68994385", "0.6896868", "0.6846482", "0.6838667", "0.67966086", "0.6789572", "0.67844445", "0.67186...
0.0
-1
Instances of this interface are used to navigate the available sessions in Bitwig Studio's contextual browser. The sessions are shown as tabs in the graphical user interface of the browser.
function BrowsingSessionBank() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SessionClickListener(iid) {\n console.log(iid);\n var tabs = JSON.parse(localStorage.getItem(iid));\n console.log(\"session123 \"+tabs.length);\n update_sessionWin(tabs);\n currentSessionID = iid;\n updateTabsNumber(0);\n var d1 = document.getElementById(\"midpane\");\n d1.innerHTML = iid.s...
[ "0.6256456", "0.60650367", "0.6057381", "0.59884024", "0.5803288", "0.5749122", "0.57370174", "0.5725548", "0.56768113", "0.558364", "0.55825627", "0.5570042", "0.55439764", "0.55290794", "0.5528908", "0.5514613", "0.5482277", "0.54810166", "0.5454745", "0.54437774", "0.54335...
0.6091859
1
Handles updating component state when the user types into the input field
function handleInputChange(event) { const { name, value } = event.target; setFormObject({ ...formObject, [name]: value }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inputOnChange(e) {\n e.target.value = e.target.value;\n this.props.dispatch(updateStateText(e.target.value));\n }", "internalOnInput(event) {\n const me = this; // Keep the value synced with the inputValue at all times.\n\n me.inputting = true;\n me.value = me.input.value;\n me.inputting = fal...
[ "0.76893264", "0.74040544", "0.7336218", "0.73118335", "0.7262551", "0.7248708", "0.7241429", "0.7216745", "0.7213995", "0.71486825", "0.71355516", "0.71310693", "0.7130072", "0.710336", "0.7102818", "0.7098976", "0.7095323", "0.70901716", "0.7078887", "0.70478", "0.7045969",...
0.0
-1
When the form is submitted, use the API.saveBook method to save the book data Then reload books from the database
function handleFormSubmit(event) { event.preventDefault(); if (formObject.title) { API.searchTitle(formObject.title) .then((res) => { console.log('TESTING2: ', res); setBooks(res.data.items); }) .catch((err) => console.log(err)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupBookForm() {\n\n\t$('form').submit(event => {\n\t\t\n\t\tconsole.log(\"Form submitted\");\n\t\tevent.preventDefault(); // prevents default form behaviour (reloads the page)\n\n\t\tconst book = {\n\t\t\ttitle: $('#title').val(),\n\t\t\tauthor: $('#author').val(),\n\t\t\tnumPages: parseInt($('#pages')....
[ "0.7791779", "0.7527431", "0.75066185", "0.7444735", "0.73885274", "0.7375375", "0.736906", "0.7310247", "0.7189312", "0.7172729", "0.71235526", "0.69503146", "0.6943439", "0.69139624", "0.6885333", "0.68750536", "0.68722844", "0.6799991", "0.67836684", "0.6750666", "0.672284...
0.6456917
41
aggiungo un evento al click dell'elemento che ha come classe .next
function next() { // attribuisco alla variabile l'immagine e il point che ha come classe active var forth = $("img.active"); var circleForth = $(".point i.active"); // rimuovo la classe active all'elemento che diventerà display:none forth.removeClass("active"); circleForth.removeClass("act...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setEvent_next(){\n $(this._controlSelectors.next).click(()=>{\n this.next();\n });\n }", "_nextButtonClickHandler() {\n const that = this;\n\n that.next();\n }", "function next() {\n changeSlide($nextel);\n }", "next() {\n // $(th...
[ "0.7849742", "0.76043135", "0.71339786", "0.70588595", "0.7043481", "0.6923132", "0.69132763", "0.67816156", "0.6703367", "0.67006344", "0.66685134", "0.66510427", "0.65821457", "0.6574352", "0.65462905", "0.65356463", "0.64859915", "0.6471569", "0.64711386", "0.6455342", "0....
0.6648092
12
remove shortest leading indentation from all lines
function stripIndent(data) { var match = data.match(/^[^\S\n]*(?=\S)/gm); if (match !== null) { var indent = Math.min.apply(Math, match.map(function (sp) { return sp.length; })); return data.replace(new RegExp("^.{" + indent + "}", "gm"), ""); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deindent(code) {\n const firstNewLine = code.indexOf('\\n');\n return code.slice(0, firstNewLine + 1) + // remove indentation from all lines except first.\n (0, _stripIndent.default)(code.slice(firstNewLine + 1));\n}", "function stripIndent(str) {\n const match = str.match(/^[ \\t]*(?=\\S)/gm)\n\n ...
[ "0.6683232", "0.64386654", "0.6419601", "0.6338705", "0.62003684", "0.61038834", "0.59404194", "0.5938137", "0.58909357", "0.58895713", "0.5850852", "0.5828347", "0.5795086", "0.5795086", "0.5791461", "0.5746982", "0.5739166", "0.5728336", "0.57265174", "0.57112896", "0.57077...
0.7133784
0
jquery.themepunch.revolution.js jQuery Plugin for Revolution Slider
function revslider_showDoubleJqueryError(e) { var t = "Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include."; t += "<br> This includes make eliminates the revolution slider libraries, and make it not work."; t += "<br><br> To fix it you can:<br>&nbsp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main_slider3(){\n if ( $('#main_slider3').length ){\n $(\"#main_slider3\").revolution({\n sliderType:\"standard\",\n sliderLayout:\"auto\",\n delay:4000,\n disableProgressBar:\"on\",\n navigation: {\n ...
[ "0.77614576", "0.7610094", "0.75983214", "0.7598247", "0.75469", "0.7530099", "0.746236", "0.7448891", "0.7439801", "0.7405537", "0.73684025", "0.73578674", "0.7303636", "0.72993463", "0.7263422", "0.7169434", "0.7116836", "0.70634323", "0.6931768", "0.68457335", "0.6420474",...
0.5626942
71
Event listener for HTTP server "error" event.
function onError(error) { if (error.syscall !== 'listen') { throw error; } const bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port; // handle specific listen errors with friendly messages switch (error.code) { case 'EACCES': console.error(`{bind} requires elevated privileges`);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function httpOnError(error) {\n if (error.syscall !== 'listen') {\n throw error;\n }\n\n var bind = typeof port === 'string'\n ? 'Pipe ' + port\n : 'Port ' + port;\n\n // handle specific listen errors with friendly messages\n switch (error.code) {\n case 'EACCES':\n console.error(bind + '...
[ "0.7118962", "0.70567393", "0.70339364", "0.70246124", "0.6965733", "0.6882446", "0.68554044", "0.68311316", "0.6821094", "0.68109226", "0.6788116", "0.6782291", "0.6781704", "0.67701316", "0.6766919", "0.6750681", "0.6706457", "0.67013055", "0.66602784", "0.66561115", "0.664...
0.6403406
58
Event listener for HTTP server "listening" event.
function onListening() { const addr = server.address(); const bind = typeof addr === 'string' ? `pipe ${addr}` : `port ${addr.port}`; debug(`Listening on ${bind}`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onListeningHTTP () {\n var addr = server.address()\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port\n debug('HTTP - Listening on ' + bind)\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' +...
[ "0.78543603", "0.7739916", "0.76332736", "0.75365347", "0.7531618", "0.7341063", "0.733379", "0.73028886", "0.7302802", "0.7282679", "0.7272048", "0.72311646", "0.72267777", "0.71615416", "0.71260625", "0.7120054", "0.7105148", "0.70975953", "0.7081919", "0.70732343", "0.7071...
0.0
-1
Sets the current channel. If the channel is already live, this is a noop. "data" either a json structure or null.
function setLiveChannel (data, force) { var oldc = LIVE_CHANNEL ? LIVE_CHANNEL['channel_name'] : null, newc = data ? data['channel_name'] : null, force = typeof force == 'undefined' ? false : force; var already_loaded = (!force && oldc && (oldc == newc)); if (data) { hideSpinner();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set Channel(value) {\r\n this.channel = value\r\n }", "function soft_set_channel(channel) {\n /* render UI */\n start_spinner();\n remove_player_error('channel');\n channel_error = false;\n\n /* send client-init */\n that.send_client_init(channel);\n\n /* reset stats */\n set_ch...
[ "0.64270926", "0.6398796", "0.60504335", "0.5978652", "0.5784757", "0.5769082", "0.57220775", "0.569868", "0.563039", "0.556573", "0.54726994", "0.545932", "0.54393303", "0.5396641", "0.53749967", "0.535198", "0.52395046", "0.52363575", "0.5234512", "0.52320737", "0.51899713"...
0.68311155
0
get all horror books
function getHorrorBooks() { let result = myBooks.filter((book) => book.genre === "horror"); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBooks () {\n\t\t\treturn backendService.getBooks()\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tallBooks = response; // keep a copy of all the books, without filtering.\n\t\t\t\t\treturn allBooks;\n\t\t\t\t});\n\t\t}", "function listBooks() {\n return initDB('thr').then(function(db) {\n ...
[ "0.7357443", "0.72866774", "0.7139198", "0.70521283", "0.6911523", "0.68091583", "0.67821014", "0.6778686", "0.6723855", "0.67209846", "0.66325444", "0.66175187", "0.65995455", "0.6588112", "0.6588112", "0.65764815", "0.65611017", "0.65522283", "0.65484244", "0.65279245", "0....
0.744548
0
get all scifi books
function getSciFiBooks() { let result = myBooks.filter((book) => book.genre === "sci-fi"); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBooks () {\n\t\t\treturn backendService.getBooks()\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tallBooks = response; // keep a copy of all the books, without filtering.\n\t\t\t\t\treturn allBooks;\n\t\t\t\t});\n\t\t}", "function getAllBooks(){\n fetch(baseURL)\n .then(res => res.json...
[ "0.7687074", "0.76630545", "0.75001806", "0.73308665", "0.72696877", "0.72624654", "0.72215086", "0.7170697", "0.7152246", "0.69535977", "0.6884287", "0.6878607", "0.6874178", "0.68703264", "0.68699616", "0.6854131", "0.67851156", "0.67645365", "0.6739059", "0.6736008", "0.67...
0.6698032
26
get all nonfiction books
function getNonFictionBooks() { let result = myBooks.filter((book) => book.genre === "non-fiction"); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBooks () {\n\t\t\treturn backendService.getBooks()\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tallBooks = response; // keep a copy of all the books, without filtering.\n\t\t\t\t\treturn allBooks;\n\t\t\t\t});\n\t\t}", "function getAllBooks(){\n fetch(baseURL)\n .then(res => res.json...
[ "0.6868983", "0.6694532", "0.6647936", "0.65858203", "0.64852214", "0.6450815", "0.6394136", "0.63698816", "0.6358742", "0.63549674", "0.631814", "0.6295727", "0.6286194", "0.6248195", "0.62242323", "0.62234545", "0.618044", "0.61702746", "0.6160361", "0.61439013", "0.6143901...
0.7542802
0
let filterByGenre = (book, genre) => book.genre === genre; this filterByGenre function will return the actual filtering function example: filterByGenre("horror") => (book) => book.genre === "horror" filterByGenre("scifi") => (book) => book.genre === "scifi"
function filterByGenre(genre) { return function (book) { return book.genre === genre; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterMoviesByGenre(genre) {\n return movies.filter(movie => movie.genre === genre);\n}", "function filterByGenre(movies, genres){\n return movies.filter(function(movie){\n for (let i = 0; i < genres.length; i++){\n if (movie.genres.includes(genres[i])) return true;\n }\n ...
[ "0.7829959", "0.7237785", "0.7189917", "0.70876324", "0.68966055", "0.6886113", "0.67785907", "0.6673166", "0.6653564", "0.65428835", "0.6518464", "0.651697", "0.64933586", "0.6491771", "0.64892524", "0.6489071", "0.648042", "0.6479807", "0.64061743", "0.63926613", "0.6366374...
0.8745062
0
Sets image of message
async setImage() { try { if (this.hasProperty(this.parsedMessage, "metadata")) { const metadata = this.parsedMessage.metadata; const injectedObject = metadata["@injected"]; if ( injectedObject && this.hasProperty(injectedObject, "extensions") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setImage()\n {\n var img = getId(\"captured_image\");\n \n var path = \"file:\" + Native.getImagePath();\n \n img.setAttribute(\"src\", path);\n }", "function setEmojiTag(emoji, image_path) {\r\n var emojiBase = host + image_path +\"/\";\r\n var img_url = emojiBase + emoji +\".gif\";\r\...
[ "0.6348536", "0.62622404", "0.622549", "0.6173553", "0.6107717", "0.60230905", "0.60059273", "0.6001941", "0.5981151", "0.58681124", "0.5867899", "0.58666396", "0.5812466", "0.57746315", "0.5770583", "0.5767874", "0.5751347", "0.5743554", "0.571891", "0.5705593", "0.57051396"...
0.6895889
0
MODULE 02 ep13 working with Fetch
async function getData() { const response = await fetch('/api'); const data = await response.json(); for (item of data) { const root = document.createElement('p'); const mood = document.createElement('div'); const date = document.createElement('div'); const geo = doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchDataPreES6() {\n const promise = fetch(newsurl);\n promise\n .then((res) => res.json())\n .then((data) => renderArticles(data.articles));\n}", "function fetch(fetchxml) {\n\n return fetchMore(fetchxml).then(function (result) {\n\n return result.entities;\n });\n ...
[ "0.6655704", "0.6338802", "0.62409127", "0.61844885", "0.6179067", "0.6179067", "0.61785156", "0.61710346", "0.61586636", "0.615002", "0.6142931", "0.6138642", "0.6122147", "0.6121046", "0.61194736", "0.6112151", "0.6067408", "0.60671353", "0.6059363", "0.60347885", "0.602254...
0.0
-1
either "asc" or "desc"
function sortAsc(a, b) { return a[1] - b[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static DEFAULT_SORT_BY_FIELD(){ return \"description\"}", "getOrderBy() {}", "sort() {\n if (this.sortOrder === 'asc') {\n this.set('sortOrder', 'desc');\n\n } else if (this.sortOrder === '') {\n this.set('sortOrder', 'asc');\n\n } else {\n this.set('sortOrder', '');\n\n ...
[ "0.7292354", "0.72680825", "0.69362503", "0.68980175", "0.68894386", "0.6845238", "0.668268", "0.65824854", "0.65578353", "0.65200126", "0.6517318", "0.64931417", "0.6490332", "0.6441587", "0.6441587", "0.6384126", "0.62711847", "0.6243975", "0.61694187", "0.61688316", "0.616...
0.0
-1
Returns an obj which contains keyval pairs of matched labels.
matchedLabels(selectorLabels, templateLabels) { let finalResult = {}; if (!selectorLabels || !templateLabels) return finalResult; Object.entries(selectorLabels).forEach(([key, val], index) => { if ( templateLabels.hasOwnProperty(key) && templateLabels[key] === val ) finalResult[key] = val; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabelMap() {\n var labelDictionary = {};\n for (const label in orig_labels) {\n labelDictionary[label] = {};\n\n for (var index = 0; index < orig_labels[label].length; index++) {\n var objProperty = orig_labels[label][index];\n labelDictionary[label][index + 1] = objProperty;\n }\n...
[ "0.6177446", "0.6117447", "0.60842735", "0.6009684", "0.59710777", "0.5679856", "0.5581091", "0.55739874", "0.543831", "0.54062533", "0.5384257", "0.5347741", "0.53067255", "0.528489", "0.52112585", "0.5198729", "0.5198729", "0.5198729", "0.5171981", "0.51253945", "0.51061213...
0.71084964
0
================================================================================== ===== Defining state params initially in constructor b/c it will serve first =====
constructor(props) { super(props); this.state = { email: "", password: "", errors: {}, secureTextEntry: true }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);//reference to parents constructor with props\n\n // now this can be referenced anywhere inside the class. Basically like a JAVA Object. we only use this.state once. then we use this.setState\n this.state={lat:null, errMessage:null};// 1st way to initialize ...
[ "0.71540797", "0.70846754", "0.707267", "0.69908965", "0.6987684", "0.6876278", "0.6873544", "0.6871756", "0.6855473", "0.68411326", "0.68155605", "0.677767", "0.67492104", "0.67329955", "0.6720916", "0.6711827", "0.6696288", "0.668747", "0.6671011", "0.66631997", "0.66502345...
0.0
-1
hpPropertyName: 'hp' || 'maxHp'
changeHp(event, index, hpPropertyName) { const value = event.target.value; event.target.value = ''; const number = parseInt(value); if(!number) return; const bar = this.listOfBars[index]; if(value.startsWith('-') || value.startsWith('+')) { bar[hpPropertyName] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "value(obj){\n return obj == null ? null : obj.name || obj.full_name || obj;\n }", "morto() {\r\n return this.hp <= 0;\r\n }", "static _attributeNameForProperty(name,options){const attribute=options.attribute;return!1===attribute?void 0:\"string\"===typeof attribute?attribute:\"string\"===ty...
[ "0.50583607", "0.50489545", "0.50358444", "0.49992582", "0.4964254", "0.49553505", "0.49468613", "0.49459654", "0.49348697", "0.49166352", "0.49154472", "0.4904989", "0.4882963", "0.48812953", "0.48578292", "0.48576352", "0.48542622", "0.48527429", "0.48513505", "0.48506775", ...
0.50827646
0
Rock Paper Scissors What would your total score be if everything goes exactly according to your strategy guide?
function solve(input) { let points = { 'A X': 4, 'A Y': 8, 'A Z': 3, 'B X': 1, 'B Y': 5, 'B Z': 9, 'C X': 7, 'C Y': 2, 'C Z': 6 }; let allPoints = input.split('\n').map(round => points[round]).reduce((a, b) => a + b, 0); return allP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playRound(playerSelection, computerSelection) {\n if (playerSelection.toLowerCase() == \"rock\" && computerSelection == \"scissors\") {\n console.log(\"You win! Rock crushes scissors\");\n writeAlert(\"You win! Rock crushes scissors\");\n score[0]++;\n return 0\n } else i...
[ "0.7345219", "0.7317487", "0.7179526", "0.69981986", "0.69835794", "0.6981197", "0.69098514", "0.69012797", "0.6877075", "0.68572843", "0.68405104", "0.6823202", "0.68194985", "0.68134505", "0.68114424", "0.67975587", "0.67854655", "0.67848206", "0.67829096", "0.6774899", "0....
0.0
-1
Updates the NTP based on the current theme.
function onThemeChange() { var info = apiHandle.themeBackgroundInfo; if (!info) return; var background = [info.colorRgba, info.imageUrl, info.imageTiling, info.imageHorizontalAlignment, info.imageVerticalAlignment].join(' ').trim(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTheme() {\n var info = ntpApiHandle.themeBackgroundInfo;\n var isThemeDark = getIsThemeDark(info);\n $(IDS.NTP_CONTENTS).classList.toggle(CLASSES.DARK, isThemeDark);\n if (!info) {\n return;\n }\n\n var background = [convertToRGBAColor(info.backgroundColorRgba),\n info.im...
[ "0.6360181", "0.60334665", "0.6024623", "0.60008246", "0.5874522", "0.5793908", "0.576589", "0.5749673", "0.56806344", "0.56697905", "0.56679356", "0.56577885", "0.5645822", "0.56373394", "0.56255776", "0.56171596", "0.5616719", "0.5601775", "0.5601775", "0.5587209", "0.55814...
0.0
-1
Handles a new set of Most Visited page data.
function onMostVisitedChange() { var pages = apiHandle.mostVisited; if (isBlacklisting) { // If this was called as a result of a blacklist, add a new replacement // (possibly filler) tile at the end and trigger the blacklist animation. var replacementTile = createTile(pages[MAX_NUM_TILES_TO_SHOW - 1]);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewMoreVisitHistory() {\r\n\tajaxSend( \"./findMoreVisit.json\" \r\n\t\t\t, { cmStorSeq\t\t: clickedCmStorSeq\r\n\t\t\t\t, pageNo \t\t: ++pageVisitNo\r\n\t\t\t }\r\n\t\t\t, viewMoreVisitHistoryAft );\r\n}", "function viewMore() {\r\n\t\r\n\t// Send ajax data.\r\n\tajaxSend( \"./findVisitHistory.json...
[ "0.64030147", "0.598268", "0.56837904", "0.553054", "0.5468516", "0.5465064", "0.5420341", "0.5344561", "0.53424287", "0.533773", "0.5330911", "0.53146106", "0.5309548", "0.5283822", "0.5276325", "0.5220691", "0.5210511", "0.5203918", "0.52021164", "0.5188503", "0.5188159", ...
0.4900459
78
Renders the current set of tiles without animation.
function renderTiles() { removeChildren(tilesContainer); for (var i = 0, length = tiles.length; i < length; ++i) { tilesContainer.appendChild(tiles[i].elem); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render()\n{\n requestAnimationFrame(render);\n\n\tctx.clearRect(0, 0, width, height);\n drawTiles();\n\tgui.draw(ctx, mouse);\n}", "function draw() {\n for (let i=0; i<tiles.length; i++) {\n tiles[i].display();\n }\n}", "function render() {\n loop(function (row, col) {\n x = (...
[ "0.75752574", "0.73062474", "0.70050514", "0.67506623", "0.65055066", "0.6494576", "0.64664185", "0.64639294", "0.64527774", "0.6449625", "0.64482975", "0.644586", "0.6431882", "0.6417091", "0.6410385", "0.6409946", "0.63986754", "0.63937855", "0.63734394", "0.63734394", "0.6...
0.7849702
0
Shows the blacklist notification and triggers a delay to hide it.
function showNotification() { notification.classList.remove(CLASSES.HIDE_NOTIFICATION); notification.classList.remove(CLASSES.DELAYED_HIDE_NOTIFICATION); notification.scrollTop; notification.classList.add(CLASSES.DELAYED_HIDE_NOTIFICATION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayBlacklist () {\n if ($blacklistCheck[0].checked) {\n $blacklistForm.fadeIn()\n } else {\n $blacklistForm.fadeOut()\n }\n }", "function scheduleHide() {\n clearDelayTimeouts();\n\n if (!instance.state.isVisible) {\n return removeFo...
[ "0.6512326", "0.63932043", "0.63658154", "0.62597144", "0.59396726", "0.5933116", "0.5928438", "0.5833411", "0.57272035", "0.5670142", "0.5630188", "0.5615517", "0.55970263", "0.55960625", "0.55960625", "0.5591101", "0.5578598", "0.5555949", "0.55463845", "0.5523131", "0.5520...
0.5274068
59
Hides the blacklist notification.
function hideNotification() { notification.classList.add(CLASSES.HIDE_NOTIFICATION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideNotification() {\n var notification = $(IDS.NOTIFICATION);\n notification.classList.add(CLASSES.HIDE_NOTIFICATION);\n notification.classList.remove(CLASSES.DELAYED_HIDE_NOTIFICATION);\n}", "hide() {\n if (this[$visible]) {\n this[$visible] = false;\n this[$updateVisib...
[ "0.6555031", "0.65475124", "0.65291274", "0.65185434", "0.63093156", "0.6297273", "0.6274523", "0.62667006", "0.6257303", "0.6252736", "0.6244669", "0.6148721", "0.6129563", "0.61265755", "0.6114408", "0.60895586", "0.60693", "0.60684144", "0.6057023", "0.60492873", "0.604023...
0.6363394
4
Handles the end of the blacklist animation by removing the blacklisted tile.
function blacklistAnimationDone() { tiles.splice(lastBlacklistedIndex, 1); removeNode(lastBlacklistedTile.elem); updateTileVisibility(numTilesShown); isBlacklisting = false; tilesContainer.classList.remove(CLASSES.HIDE_BLACKLIST_BUTTON); lastBlacklistedTile.elem.removeEventListener( 'webkitTransitionE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undoAnimationDone() {\n isUndoing = false;\n tiles.splice(tiles.length - 1, 1);\n removeNode(tilesContainer.lastElementChild);\n updateTileVisibility(numTilesShown);\n lastBlacklistedTile.elem.removeEventListener(\n 'webkitTransitionEnd', undoAnimationDone);\n}", "processTileDiscardChoice(tile...
[ "0.7033086", "0.61582756", "0.5895717", "0.58898675", "0.5875402", "0.5730509", "0.5703664", "0.57012206", "0.5700031", "0.5688529", "0.5683801", "0.56832755", "0.56791824", "0.5672443", "0.5644423", "0.56253624", "0.5607555", "0.5585934", "0.55626804", "0.55619025", "0.55274...
0.858313
0
Handles a click on the notification undo link by hiding the notification and informing Chrome.
function onUndo() { hideNotification(); var lastBlacklistedRID = lastBlacklistedTile.rid; if (typeof lastBlacklistedRID != 'undefined') { isUndoing = true; apiHandle.undoMostVisitedDeletion(lastBlacklistedRID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUndo() {\n hideNotification();\n if (lastBlacklistedTile != null) {\n ntpApiHandle.undoMostVisitedDeletion(lastBlacklistedTile);\n }\n}", "handleNotificationClicks(notificationId) {\n if (notificationId == 'info') {\n return;\n }\n goToTab('history');\n }", "...
[ "0.6794197", "0.6109464", "0.6027446", "0.5789854", "0.57710946", "0.5722515", "0.5720895", "0.56883353", "0.5665531", "0.5662065", "0.55986416", "0.5570045", "0.5550247", "0.55431676", "0.5516459", "0.5495863", "0.5464754", "0.54634196", "0.5429716", "0.541871", "0.5412075",...
0.64875245
1
Handles the end of the undo animation by removing the extraneous end tile.
function undoAnimationDone() { isUndoing = false; tiles.splice(tiles.length - 1, 1); removeNode(tilesContainer.lastElementChild); updateTileVisibility(numTilesShown); lastBlacklistedTile.elem.removeEventListener( 'webkitTransitionEnd', undoAnimationDone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "undo() {\n if (this.canUndo()) {\n this.shouldSaveHistory = false;\n const { index, state } = this.stack[(this.position -= 1)];\n this.onUpdate();\n\n this.editor.blocks.render({ blocks: state }).then(() => this.editor.caret.setToBlock(index, \"end\"));\n }\n }", "function undo() {\n ...
[ "0.6906686", "0.6672823", "0.66499764", "0.6640731", "0.64139706", "0.63555306", "0.6338546", "0.6303734", "0.6295941", "0.629365", "0.6288391", "0.62670743", "0.620828", "0.62013584", "0.6165515", "0.6155681", "0.615407", "0.61507225", "0.6141912", "0.6120862", "0.6117135", ...
0.7620215
0
Handles a click on the restore all notification link by hiding the notification and informing Chrome.
function onRestoreAll() { hideNotification(); apiHandle.undoAllMostVisitedDeletions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRestoreAll() {\n hideNotification();\n ntpApiHandle.undoAllMostVisitedDeletions();\n}", "function hideNotificationAndReset() {\n iSuccess.css('display', 'none');\n iError.css('display', 'none');\n iMessage.html('');\n notification.css('display', 'none');\n }", "handl...
[ "0.6878843", "0.6482332", "0.63628376", "0.6102701", "0.5968772", "0.5945113", "0.5890211", "0.5887303", "0.58504355", "0.57745016", "0.57214993", "0.57052785", "0.5696589", "0.5687323", "0.5685725", "0.563691", "0.5623898", "0.56162715", "0.5599503", "0.5586779", "0.5582335"...
0.67751837
1
Handles a resize by vertically centering the most visited section and triggering the tile show/hide animation if necessary.
function onResize() { var clientHeight = document.documentElement.clientHeight; topMarginElement.style.marginTop = Math.max(0, (clientHeight - MOST_VISITED_HEIGHT) / 2) + 'px'; var clientWidth = document.documentElement.clientWidth; var numTilesToShow = Math.floor( (clientWidth - MIN_TOTAL_HORIZONT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resize() {\n\t\tpositionExpandedLevels();\n\t}", "resized() {\n\t\tthis.position.y = this.halfSize.y;\n\t}", "function onResize() {\n updateSpanning();\n}", "async resized() {\n this.turnOff();\n await this.delay(25);\n this.moveToCurrent();\n await thi...
[ "0.7025445", "0.6804042", "0.6735754", "0.6700992", "0.65808713", "0.6547618", "0.65225655", "0.6508799", "0.649966", "0.64686644", "0.64685994", "0.6451885", "0.64514357", "0.6431644", "0.6347382", "0.6324831", "0.63135624", "0.6299599", "0.62863636", "0.62825245", "0.628214...
0.65773726
5
Prepares the New Tab Page by adding listeners, rendering the current theme, and the most visited pages section.
function init() { topMarginElement = document.getElementById(IDS.TOP_MARGIN); tilesContainer = document.getElementById(IDS.TILES); notification = document.getElementById(IDS.NOTIFICATION); attribution = document.getElementById(IDS.ATTRIBUTION); // TODO(jeremycho): i18n. var notificationMessage = document.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePage);\n\t\t\t// Enable button again\n\t\t\tbuttonOff();\n\t\t}", "function create(){\n for (var i = 0; i < pages; i++){\n var $newtab = $('<div id=\"tab-' + to...
[ "0.68220204", "0.6628846", "0.6379653", "0.63629633", "0.63521695", "0.619405", "0.6171271", "0.6066737", "0.6036517", "0.6020934", "0.6017949", "0.59905005", "0.5901725", "0.5894318", "0.5881299", "0.586186", "0.5850839", "0.58430743", "0.58405745", "0.57920367", "0.5789913"...
0.0
-1
need to access the element and scope
function getD3Rendering(scope, ele, attrs) { return function(d3) { var w = ele[0].offsetWidth; var h = ele[0].offsetHeight || 800; var keyc = true, keys = true, keyt = true, keyr = true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementScope(element) {\n return element.scope().$$childTail;\n }", "getElement(){return this.__element}", "getElem(selector, scope) {\n return this.getElementByXPath(selector, scope);\n }", "getElem(selector, scope) {\n return this.getElementByXPath(s...
[ "0.701404", "0.66318625", "0.6615557", "0.6615557", "0.6508874", "0.6442339", "0.63984406", "0.63548404", "0.62122905", "0.61901474", "0.61901474", "0.6166881", "0.60863775", "0.60863775", "0.6060003", "0.60536605", "0.60400295", "0.60104626", "0.59634316", "0.59046984", "0.5...
0.0
-1
need to access the element and scope
function getD3Rendering(scope, ele, attrs) { return function(d3) { var w = 800, h = 800; var nominal_text_size = 10; var nominal_base_node_size = 8; var margin = parseInt(attrs.margin) || 20, barHeight = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementScope(element) {\n return element.scope().$$childTail;\n }", "getElement(){return this.__element}", "getElem(selector, scope) {\n return this.getElementByXPath(selector, scope);\n }", "getElem(selector, scope) {\n return this.getElementByXPath(s...
[ "0.701404", "0.66318625", "0.6615557", "0.6615557", "0.6508874", "0.6442339", "0.63984406", "0.63548404", "0.62122905", "0.61901474", "0.61901474", "0.6166881", "0.60863775", "0.60863775", "0.6060003", "0.60536605", "0.60400295", "0.60104626", "0.59634316", "0.59046984", "0.5...
0.0
-1
need to access the element and scope
function getD3Rendering(scope, ele, attrs) { return function(d3) { var margin = parseInt(attrs.margin) || 20, barHeight = parseInt(attrs.barHeight) || 20, barPadding = parseInt(attrs.barPadding) || 5; // our d3 code will go here ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementScope(element) {\n return element.scope().$$childTail;\n }", "getElement(){return this.__element}", "getElem(selector, scope) {\n return this.getElementByXPath(selector, scope);\n }", "getElem(selector, scope) {\n return this.getElementByXPath(s...
[ "0.701404", "0.66318625", "0.6615557", "0.6615557", "0.6508874", "0.6442339", "0.63984406", "0.63548404", "0.62122905", "0.61901474", "0.61901474", "0.6166881", "0.60863775", "0.60863775", "0.6060003", "0.60536605", "0.60400295", "0.60104626", "0.59634316", "0.59046984", "0.5...
0.0
-1
Template Generators / Returns HTML to create Start Page. Dependancy: getAssets Function
function generateStartPage() { const assets = getAssets('startPage'); return `<div class="row"> <div class="col-6"> <img src="${assets.startImg}" alt="${assets.startImg}"> </div> <div class="col-6"> <p>${assets.startMsg}</p> <button type="button" class...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Asset(filename){\n return HtmlService.createTemplateFromFile(app.assets_dir+filename).evaluate().getContent();\n}", "function renderStartTemplate(){\r\n console.log(\"renderStartTemplate ran\")\r\n const startTemplateString = startTemplate();\r\n $('main').html(startTemplateString); \r\n}", "fun...
[ "0.6537611", "0.60668087", "0.6019136", "0.59435445", "0.58426213", "0.57206976", "0.5714298", "0.5664942", "0.562544", "0.55941874", "0.5587205", "0.5523668", "0.55188614", "0.548429", "0.54706055", "0.5453921", "0.5424649", "0.5412421", "0.5390082", "0.5387963", "0.53688776...
0.661824
0
Returns HTML for radio button and label for answer option.
function generateAnswerItem(answer, index) { return `<label for="${index}"> <input type="radio" id="${index}" name="questions" value="${answer}" required> ${answer} </label>`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createQuestionsHTML() {\n\treturn QUESTIONS[currentQuestionIndex].answers\n\t\t.map((question, index) => {\n\t\t\treturn `\n\t\t\t\t<div class=\"answer\">\n <input type=\"radio\" name=\"answer\" value=\"${index}\" id=\"option${index}\" class=\"pr-2\"/>\n\t\t\t\t\t<label for=\"option${in...
[ "0.74314016", "0.7341863", "0.7185528", "0.7097557", "0.69819033", "0.6956772", "0.6899322", "0.68683887", "0.68543184", "0.6777068", "0.67661947", "0.6758415", "0.67249846", "0.67210597", "0.66944003", "0.66710734", "0.665026", "0.66416925", "0.66315037", "0.65762436", "0.65...
0.663466
18
Runs the generateAnswerItem function on each answer in current question object. Dependancy: generateAnswerItem
function generateAnswerList(question) { //console.log("Generating answers list"); const answers = question.answers.map((answer, index) => generateAnswerItem(answer, index)); return answers.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateAnswers() {\n isGameOver()\n var question = questionsList[questionsIndex].question\n $(\"#question\").text(question)\n $(\"#question\").show()\n for (var i = 0; i < 4; i++) {\n var answerSelectList = questionsList[questionsIndex].answerChoices[i]\n ...
[ "0.7023219", "0.64446646", "0.63674515", "0.6326273", "0.62725425", "0.62567025", "0.6238812", "0.62122273", "0.6204901", "0.6185269", "0.6185269", "0.61718833", "0.61643463", "0.60996485", "0.60118234", "0.59859824", "0.5984711", "0.59822613", "0.59771943", "0.5977005", "0.5...
0.67655075
1
Returns HTML to create Question Page. Dependancy: generateAnswerList > generateAnswerItem
function generateQuestion(currQuestion) { //console.log('Generating question'); const answers = generateAnswerList(currQuestion); return `<form class="quiz-app"> <div class="row question"> <div class="col-12"> <fieldset> <legend>${currQuestion.questio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateQuestionPage(){\n //grabs current question, question number\n const allQuestions = store.questions;\n const currentQuestionNumber = store.questionNumber;\n const currentQuestionData = allQuestions[currentQuestionNumber];\n const currentQuestion = currentQuestionData.question;\n //grabs HTML ...
[ "0.7627568", "0.7322964", "0.7285114", "0.7139896", "0.71314824", "0.7065383", "0.7012888", "0.700276", "0.7002469", "0.70019877", "0.69997257", "0.698266", "0.6967344", "0.69582754", "0.69516885", "0.6950164", "0.6933355", "0.692757", "0.69256234", "0.6894928", "0.68739796",...
0.6654786
57