query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
busqueda general metodo GET buscarAlgo : busca cualquier cosa en la base de datos busca en todas las colecciones que queremos que busque /////////////////////////////////////////////////// en post man : en post man :
function buscarAlgo(req, resp) { // bus es lo que viene en la url y que esta declarado en el get // la ruta es : //api.get('/busquedas/todo/:bus', [verificaToken], BusquedaController.buscarAlgo); let busqueda = req.params.bus; let regex = new RegExp(busqueda, 'i'); // es insensible a may y min...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buscarPorColeccion(req, res) {\n\n // viene x los params de la url \n let busqueda = req.params.bus;\n let tabla = req.params.tabla;\n\n // busqueda es el parametro de la url \n // 'i' may y minus es insensible\n let regex = new RegExp(busqueda, 'i'); // aqui convertimos la busqueda con...
[ "0.68410987", "0.67745745", "0.65792936", "0.65697837", "0.649093", "0.6473795", "0.6421159", "0.640605", "0.63607156", "0.63174146", "0.62570435", "0.62522966", "0.6228987", "0.6225387", "0.62136906", "0.6212013", "0.6202454", "0.61895525", "0.6183526", "0.6183", "0.61486495...
0.7433888
0
Init progressBar where elem is $("owldemo")
function progressBar(elem){ $elem = elem; //build progress bar elements buildProgressBar(); //start counting start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function progressBar( elem ) {\n jQueryelem = elem;\n // build progress bar elements\n buildProgressBar();\n // start counting\n start();\n }", "function progressBar(elem){\n $elem = elem;\n //build progress bar elements\n ...
[ "0.7465134", "0.7435458", "0.7435458", "0.7435458", "0.7435458", "0.7433613", "0.73815995", "0.73567283", "0.7179158", "0.70962995", "0.70962995", "0.70962995", "0.70962995", "0.70749944", "0.6996346", "0.69527245", "0.6946056", "0.6946056", "0.67005706", "0.65200585", "0.649...
0.7439372
1
root is handled after the branches left, right, root
function postOrder(root){ if(!root){ return; } if (root){ postOrder(root.left); postOrder(root.right); console.log(root.value); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preOrder(root) {\n console.log(root.data) \n root.left && preOrder(root.left) \n root.right && preOrder(root.right) \n }", "function traverse(root){\n //compair the root value with output value. replace output value if root value is greater than it\n if (!output) output=root.value;\n...
[ "0.7041503", "0.7011336", "0.6777675", "0.6759074", "0.6636411", "0.6634802", "0.66122794", "0.66077906", "0.6595361", "0.659205", "0.65855956", "0.65724814", "0.6564002", "0.65617764", "0.65201604", "0.6441385", "0.64407843", "0.64232713", "0.64228207", "0.6404132", "0.63607...
0.7297328
0
Creates and returns the AngularRender class. it's not defined at once because the window.FlowCarousel may not be available before the directive link method runs.
function createAngularRenderer() { var FlowCarousel = window.FlowCarousel; /** * The custom renderer for AngularJS that uses angular to render items. * * @class AngularRenderer * @extends AbstractRenderer * @param {angular.Scope} scope The angular scope * @param {string} template Item template ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Renderer() {\n RenderController.apply(this, arguments)\n this.container = new Container(this.options.spinner)\n}", "function FlowCarouselDirective() {\n\t\tthis._carousel = null;\n\t\tthis._scope = null;\n\t\tthis._itemName = null;\n\t}", "createRenderRoot() {\n return this;\n }", "functio...
[ "0.57079303", "0.57023895", "0.5667048", "0.557204", "0.5544217", "0.5523389", "0.5470449", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54383117", "0.54204905", "0.54079974", "0.53716505", "0.5339473", "0....
0.76987207
0
Angular FlowCarousel directive. Use it either as an argument: ... Or a tag: ... To use it in your application, include the "FlowCarousel" module dependency: var angularApp = angular.module('CarouselApp', ['FlowCarousel']) ...
function FlowCarouselDirective() { this._carousel = null; this._scope = null; this._itemName = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CarouselDemoCtrl($scope) {\n $scope.myInterval = 5000;\n var slides = $scope.slides = [];\n $scope.addSlide = function () {\n var newWidth = 200 + ((slides.length + (25 * slides.length)) % 150);\n slides.push({\n image: 'http://placekitten.com/' + newWidth + '/200',\n ...
[ "0.5510571", "0.5451694", "0.5249828", "0.50747085", "0.5048042", "0.50418967", "0.49844524", "0.49057645", "0.48889962", "0.48483032", "0.48358536", "0.4831528", "0.4808063", "0.47999755", "0.47891438", "0.47441155", "0.47400898", "0.4739148", "0.47203454", "0.4712641", "0.4...
0.79281276
0
get/set badge text color
async function showBadgeTextColor() { const color = await chrome.action.getBadgeTextColor({}); document.getElementById('current-badge-txt-color').value = JSON.stringify( color, null, 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getBadgeStyle(color){\n var dc = d3.rgb(color).darker();\n return 'style=\"background-color: '+color+'; border-color: '+dc+'; text-shadow: 1px 1px '+dc+';\"';\n }", "function applyBadgeText(_text, _color) {\n chrome.browserAction.setBadgeBackgroundColor({ color: _color });\n chro...
[ "0.7310679", "0.7219954", "0.7167766", "0.7028066", "0.6917653", "0.65287775", "0.65030235", "0.6477871", "0.6361549", "0.6272047", "0.62454027", "0.6188101", "0.6173777", "0.6122398", "0.6071123", "0.6027747", "0.6023626", "0.600465", "0.60040253", "0.599184", "0.5967139", ...
0.74895304
0
converting wind speed data to Knots
function metersPerSecondToKnots(x){ var knots = Math.round(x*1.94384); var endingString; if(knots == 1){ endingString = " Knot"; } else{ endingString = " Knots"; } return knots+endingString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getWind(data) {\n var windSpeed;\n windSpeed = data.windSpeed * 3.6; // convert m/s to kph\n return windSpeed.toFixed(0) + ' kph';\n }", "function degreesForKnots(airspeed) {\n\n\tlet degreesTotal = 0.0;\n\n\t// Degrees of rotation per knot\n\tconst degrees15to80 = 2.77;\n\tconst degrees80to190...
[ "0.68426555", "0.6520574", "0.6450923", "0.63845706", "0.6276805", "0.61988395", "0.6086057", "0.6061852", "0.6046849", "0.6037584", "0.5985174", "0.5968258", "0.586815", "0.5858456", "0.57425946", "0.57391125", "0.5705044", "0.5694813", "0.56473917", "0.5624661", "0.5602068"...
0.6987936
0
Send a POST request to the PetFinder API to ask for an access token
function send_access_token_request(authentication_cache, user_input, res){ let base64data = Buffer.from(`${credentials.client_id}:${credentials.client_secret}`).toString('base64'); let authorization = `Basic ${base64data}`; let post_data = querystring.stringify({//convert js obj to query string format: grant_type=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function petFinderAccess() {\n $.ajax({\n type: \"POST\",\n url: \"https://api.petfinder.com/v2/oauth2/token\",\n data: \"grant_type=client_credentials&client_id=VPazYlCS5jiHVKYEa29a1eAD74ZNDsYvXJ0JYtdykdrfmRjsiC&client_secret=EyTeV2BZo5Nve7dLybgTiCKaZ4GxNA9pFcIoaGGu\",\n success: function(r...
[ "0.7451288", "0.621316", "0.6170363", "0.60515594", "0.6023128", "0.59867704", "0.59233713", "0.5888005", "0.58448905", "0.5808849", "0.5793077", "0.5777622", "0.5754789", "0.57545614", "0.5750262", "0.57072926", "0.56840175", "0.56833285", "0.56658673", "0.56495523", "0.5646...
0.6534796
1
create a JSON file that contains the access_token and its expiration time
function create_access_token_cache(authentication_cache, petFinder_auth){ let petFinder_auth_json = JSON.stringify(petFinder_auth);//convert js obj to JSON string fs.writeFile(authentication_cache, petFinder_auth_json, function(err){//write petFinder_auth_json to authentication_cache if (err)throw err; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function generateAccessToken(currentUser, accessTokenLength) {\n //var accessToken = jwt.sign({currentUser: currentUser}, process.env.ACCESS_TOKEN_SECRET);\n //Minute\n //return jwt.sign({currentUser: currentUser}, process.env.ACCESS_TOKEN_SECRET, {expiresIn: '60s'}); \n\n //5 Minutes\n //retu...
[ "0.6417077", "0.62576115", "0.62572044", "0.61671984", "0.5981355", "0.59768593", "0.5961285", "0.59608924", "0.594293", "0.5817286", "0.5803022", "0.56869066", "0.56699926", "0.5605289", "0.5591646", "0.5579199", "0.556949", "0.55665094", "0.55510926", "0.5491623", "0.547343...
0.69406724
0
Send a GET request to the PetFinder API to request for the type of animal related to the users search query
function create_search_req(petFinder_auth, user_input, res){ let query = querystring.stringify({//convert from js obj to query string type:`${user_input.animals}` }); let access_token = `Bearer ${petFinder_auth.access_token}`; const animals_endpoint = `https://api.petfinder.com/v2/animals?${query}`; let animal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchAnimals(e) {\n e.preventDefault();\n\n let searchOpt = {\n type: animalEl.value\n };\n\n //Fetch animals\n client.animal\n .search(searchOpt)\n .then(resp => {\n showAnimals(resp.data.animals);\n })\n .catch(err => console.log(err));\n}", "function findPet(location, breed) ...
[ "0.6920501", "0.6075213", "0.5984905", "0.591536", "0.5896241", "0.5895823", "0.582266", "0.58009046", "0.574549", "0.5715835", "0.5692405", "0.56443083", "0.56331134", "0.5614673", "0.5571137", "0.55583227", "0.5546823", "0.5519961", "0.5517743", "0.54999214", "0.54970807", ...
0.675673
1
Send the GET request to the CatFact API to request for a random cat fact
function get_cat_fact(animals_array, user_input, res){ let max_length = Math.floor(Math.random() * 200) + 20; // returns a random integer from 20 to 219 const cat_fact_endpoint = `https://catfact.ninja/fact?max_length=${max_length}`; const cat_fact_req = https.request(cat_fact_endpoint, {method:"GET", headers:{"Acce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryCat () {\n var catUrl = \"http://trumpy-cat-api.herokuapp.com/cats\";\n return $.getJSON(catUrl).then(function(catResponseAll){\n var catResponse = catResponseAll[Math.floor(Math.random()*catResponseAll.length)];\n return catResponse;\n });\n}", "function fetchCat() {\n return axios({\n ...
[ "0.746797", "0.7100477", "0.69707286", "0.65752816", "0.65020597", "0.6498717", "0.6397737", "0.63267505", "0.63116896", "0.6305908", "0.6287767", "0.6255687", "0.6204676", "0.62016094", "0.6190721", "0.6189839", "0.61780417", "0.6160016", "0.6143621", "0.61238503", "0.611815...
0.7277916
1
When the program launches load all the songs from the DB
async function loadSongs() { for await (const song of dbmanager.getAllSongs()) { win.webContents.send("add-song-to-list", song); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadSongs(songs) {\n for (var song of songs)\n {\n this.addSong(song, \"end\");\n }\n }", "function loadSongs() {\n if (!store.getItem('songs')) createStore()\n var songArray = JSON.parse(store.getItem('songs'))\n for (var i = 0; i < songArray.length; i++) {\n var para = document.c...
[ "0.75890726", "0.7584689", "0.680061", "0.67674327", "0.6742294", "0.67330754", "0.6731247", "0.67075104", "0.6676073", "0.6642204", "0.66025484", "0.65884733", "0.6532476", "0.6405167", "0.6334473", "0.63298196", "0.6313166", "0.6304178", "0.62844574", "0.6246841", "0.624318...
0.77488273
0
State management Basically a `forceUpdate()` with `state.applications` updated
_setApplicationState() { const update = { applications: this.makeApplicationState() }; this.setState(update); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateAppState(appState){\n this.appState = appState\n }", "function updateAppStatus(app){\n if (app.running){\n if (app.state == \"STOPPED\"){\n app.state = \"MONITORING\";\n app.status = \"RUNNING\";\n }\n else if (app.state == \"STOPPING\"){\n ...
[ "0.69216645", "0.6613289", "0.6572187", "0.65261877", "0.6442783", "0.6442783", "0.61937696", "0.61603296", "0.60874635", "0.60549283", "0.60300076", "0.5997537", "0.5873302", "0.5860182", "0.5848286", "0.58258957", "0.581015", "0.5808027", "0.5805055", "0.57943535", "0.57809...
0.8126506
0
Parse the model version by extracting the year and the version into this year
static parseModelVersion(modelVersion) { const parseRegexp = new RegExp(/(\d{4})v(\d+)/); if (parseRegexp.test(modelVersion)) { const versionParts = parseRegexp.exec(modelVersion); return { year: parseInt(versionParts[1], 10), version: parseInt(versionParts[2], 10), }; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeYear(inputYear) {\n if (inputYear) parseYear = `&primary_release_year=${inputYear}`;\n}", "function computeYear(inputYear) {\n if (inputYear) parseYear = `&primary_release_year=${inputYear}`;\n}", "function parseVersion (V) {\n\tvar result = {};\n\t\n\tvar remainder = V;\n\t\n\t// Get the...
[ "0.61361283", "0.61361283", "0.60023534", "0.5963886", "0.58621705", "0.58621705", "0.58621705", "0.5798226", "0.57963717", "0.5766251", "0.570125", "0.567142", "0.56472516", "0.5614905", "0.56074333", "0.55718595", "0.5537151", "0.54579157", "0.54537135", "0.5451259", "0.541...
0.7880405
0
Get the billing model type of the VPS
static getBillingModelType(modelType, modelVersion) { if ( modelType === 'ssd' && (modelVersion === '2017v1' || modelVersion === '2018v2') ) { return 'ssd-discovery'; } return get(OFFER_AGORA_MAPPING, modelType, modelType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_type()\n\t{\n\t\treturn device_type;\n\t}", "function getService(typeService) {\n if (typeService == 1) {\n return costService.standard;\n } else if (typeService == 2) {\n return costService.premium;\n } else if (typeService == 3) {\n return cost...
[ "0.55921793", "0.5481265", "0.54683703", "0.5446197", "0.5445587", "0.5440485", "0.541064", "0.5377977", "0.5348265", "0.53185445", "0.5273381", "0.52654624", "0.52478945", "0.52440774", "0.51758355", "0.51341", "0.51276594", "0.5123825", "0.5117501", "0.51088464", "0.5106248...
0.728616
0
Find the monthly price object of given offer
static getMonthlyPrice(offer) { const prices = filter(offer.offer.details.prices, ({ capacities }) => capacities.includes('renew'), ); const totalPrice = sumBy(prices, 'price.value'); return { ...prices[0].price, value: totalPrice, text: prices[0].price.text.replace(/\d+(?:[.,]\d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getPricesMonth(ticker){\n let prices = [];\n\n return fetch(baseURLext + dailyQuery + ticker + dailyParams + key1)\n .then(doc => doc.json())\n .then((doc) => {\n if(doc[\"Meta Data\"]){\n const latestDate = new Date(doc[\"Meta Data\"][\"3. Last Refreshed\"]);\n let month = latestDat...
[ "0.5579826", "0.555933", "0.545624", "0.5376665", "0.52492154", "0.5188062", "0.5172992", "0.51598746", "0.51498944", "0.5145327", "0.5139708", "0.5085443", "0.4981953", "0.4978146", "0.49417037", "0.4941619", "0.4937992", "0.49367288", "0.49236187", "0.4907118", "0.48356342"...
0.7954162
0
creating bricks for the background
function bricks(x5, y5, bw, bh) { let brown = color(92, 39, 41); let lightbrown = color(174, 132, 123); let white = color(255, 231, 197); let mainbrown = color(202, 123, 70); let redbrown = color(97, 40, 48); let pink = color('rgba(251, 151, 158, 0.75)'); let pink05 = color('rgba(251,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBricks(){\n let brickX = 2,brickY=10,j=0,a=0;\n for(var i=0;i<60;i++){\n let brick={\n x: brickX,\n y: brickY,\n w: brickWidth,\n h: 10,\n color: colors[j]\n }\n bricks.push(brick);\n brickX+=brickWidth+2;\n if...
[ "0.7784869", "0.75261176", "0.7274735", "0.7231664", "0.71643156", "0.71044534", "0.7072744", "0.7060545", "0.7024341", "0.702368", "0.70139253", "0.70035833", "0.6944178", "0.69429296", "0.6907441", "0.6906995", "0.6896346", "0.68819654", "0.6857485", "0.6856502", "0.6848706...
0.7768665
1
update job status to archived
function updateJobStatusToArchived(req,res,next){ db.none(`update Jobs set status = $1 where id = $2`, ['archived', req.params.job_id]) .then(() => { console.log('Updated Job Status to Archived'); next() }) .catch((err) => { console.error('error updating job status: ', err); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleArchive() {\n MemberActions.updateArichiveStatus(this.props.archived, this.props.memberID);\n this.props.unselect();\n }", "function update_restore_status() {\n var $archive = this.ancestor('.archive');\n if ($archive.hasClass(\"processing\")) {\n return;\n ...
[ "0.66974634", "0.6591211", "0.6409105", "0.637154", "0.6330357", "0.6148585", "0.60656834", "0.60005933", "0.5992161", "0.5800052", "0.5720846", "0.5632823", "0.5610707", "0.5606706", "0.55701137", "0.55696", "0.5507475", "0.55040747", "0.5498136", "0.5486655", "0.5485743", ...
0.7231282
0
update job status to active
function updateJobStatusToActive(req,res,next){ db.none(`update Jobs set status = $1 where id = $2`, ['active', req.params.job_id]) .then(() => { console.log('Updated Job Status to Active'); next() }) .catch((err) => { console.error('error updating job status: ', err); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startJobStatusUpdates() {\n this.bus.emit(jcm.MESSAGE_TYPE.START_UPDATE, {\n [jcm.PARAM.JOB_ID]: this.jobId,\n });\n this.state.listeningForJob = true;\n }", "function updateJobStatus() {\n\treturn JobsService.updateJobStatus(_transactionId, _jobStatusTag)\n...
[ "0.7115131", "0.6873807", "0.6861061", "0.6551596", "0.6449894", "0.6402996", "0.6379772", "0.6345013", "0.62867594", "0.6251168", "0.6249748", "0.62148684", "0.6193526", "0.6192596", "0.6085753", "0.60296035", "0.6028117", "0.60093135", "0.6002695", "0.5956308", "0.5945574",...
0.7751671
0
Funzione che apre la pagina html della versione base
function baseVersion() { location = "baseVersion.html"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildPageBase(content) {\n let p = this.getCleanNavigationPanel();\n this.buildPage(p, content);\n if (!isVoidString(this.version)) {\n p.appendChild(this.betterCreateElement(\"div\", [\n [\"className\", \"version_label\"],\n [\"innerHTML\", this.versio...
[ "0.60551435", "0.5989087", "0.57867855", "0.57251924", "0.564339", "0.56042105", "0.5570408", "0.5569932", "0.55411875", "0.5521404", "0.5512087", "0.55074286", "0.54627055", "0.5444621", "0.5409743", "0.5407679", "0.53978723", "0.53917503", "0.5389425", "0.53861374", "0.5385...
0.67254823
0
venueNavigate will create route information from the starting location to the current venue.
function venueNavigate() { //code var eventObject = _.find(venueDetails, function (object) { return object.place_id === displayInfo.eventLocationId; }); navigateFlag = 1; var gposition = eventObject.geometry.location; var position; //problem with synchronization with _handeInviteCode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sharingNavigate(){\n/* from createInvite\n\n lat: venue.geometry.location.lat(), //lat,\n lng: venue.geometry.location.lng(), //lng,\n placeId: venue.place_id, // placeId,\n placeName: venue.name, //placeName,\n placeDescription: venue.description, //...
[ "0.6327344", "0.5783592", "0.57500577", "0.556658", "0.55520535", "0.55496967", "0.5536443", "0.54509807", "0.54345435", "0.53698885", "0.5341386", "0.5267026", "0.5263008", "0.5239067", "0.52332604", "0.52011853", "0.5192263", "0.5183071", "0.51813525", "0.51774424", "0.5173...
0.7490958
0
this is a subfunction that setsup startingLocation2 when the item is retrieved from several palces, must be given the eventObject and the position, will setup startingLocation2 correctly. Normally the eventObject is an item from the venueDetails or from invite hiacode retrieval
function _setupStartingLocation2wPlaceObject(eventObject,gposition){ var position; if (platform === 2) position = new convert2pluglatLng(gposition); else position = gposition; //this is to make sure the data is tehre var placeObject = new placeDetailObject(eventObject);//creating a palceobj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function venueNavigate() {\n //code\n var eventObject = _.find(venueDetails, function (object) {\n return object.place_id === displayInfo.eventLocationId;\n });\n navigateFlag = 1;\n var gposition = eventObject.geometry.location;\n var position;\n //problem with synchronization with _ha...
[ "0.6555312", "0.6136535", "0.605187", "0.58117825", "0.57126546", "0.54149574", "0.53837556", "0.53385663", "0.52864134", "0.5269308", "0.5203289", "0.5182954", "0.51447314", "0.51365924", "0.51017565", "0.5076034", "0.50711733", "0.50598305", "0.5058683", "0.5054811", "0.501...
0.7680825
0
support function for handleInviteCode
function processHandleInviteCodeReturn(data2, status) { var data; if (data2 !== "") data = JSON.parse(data2); else { data = {}; data.status = "error"; } // //with the advent of the enterprise query, it can return more than one row.... 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateInviteCode () {\n\t\tlet inviteCode = UUID();\n\t\tif (this.options.inviteInfo) {\n\t\t\tconst { serverUrl, disableStrictSSL } = this.options.inviteInfo;\n\t\t\tconst uuid = inviteCode.substring(0, 8);\n\t\t\tconst inviteInfo = `${uuid}${disableStrictSSL ? '1' : '0'}${serverUrl}`;\n\t\t\tinviteCode = '$01$...
[ "0.6568634", "0.6084034", "0.60668904", "0.6031084", "0.60307175", "0.57819384", "0.57452637", "0.5735237", "0.5734148", "0.57136923", "0.5690011", "0.5649388", "0.56351876", "0.562836", "0.5588781", "0.557895", "0.5574528", "0.55500823", "0.55410236", "0.55243856", "0.551211...
0.68033475
0
processClusterData() is used by Tourism, and other block search. Cluster Data is an enterprise version of the hiacode and displays all the icons that is associated with a hcode. This is also used by hiaMapSearch() which calls the mapSearch.php for posting Note that the posting should probably have scope='posting' Based...
function processClusterData(data,status){ var array = []; retstuff=JSON.parse(data); if(retstuff.rowcount===0 || retstuff.data.length===0) return; if(retstuff.status==="ok"){ array=retstuff.data; queryString = []; if (platform === 2) var bounds = new plugin.google.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clusterDataHandler(data) {\n\t\tvar test = buildClusterLayout(data);\n\t\tif(test){\n\t\t\tpositionClusterView(false);//if argument value set to false represent normal event. if it set to true represent resize event.\n\t\t\tregisterClicks();\n\t\t\tgetClusterHealth();\n\t\t}\n\t}", "function getClusterD...
[ "0.70851606", "0.66533816", "0.66006577", "0.59294534", "0.5920379", "0.58822215", "0.5746734", "0.5695794", "0.5659598", "0.5632913", "0.56264645", "0.5622715", "0.55892986", "0.5537408", "0.55017775", "0.5465632", "0.5437552", "0.5388196", "0.5382186", "0.53707117", "0.5335...
0.76038545
0
note tht this has to take two parallel arrays and make object.image and object.posting_id a single image array
function checkImagePlaceObject(object){ var image =[]; if(object.images){ var image_array=object.images.split(','); var id_array=object.posting_id.split(','); for(var i =0; i<image_array.length; i++){ image.push({image: image_array[i], id: id_array[i]}); } } return image;//empty array }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setImageIds(event) {\n let imageIds = null;\n if (event.value.length) {\n imageIds = [];\n for (let i = 0; i < event.value.length; i++) {\n imageIds.push(event.value[i].id);\n }\n }\n this.postsService.post.image_ids = imageIds;\n }", ...
[ "0.6682957", "0.6234466", "0.5946989", "0.59001744", "0.588013", "0.5613142", "0.55811197", "0.5542492", "0.55182916", "0.5491982", "0.5486355", "0.54744697", "0.54496676", "0.5411452", "0.5366605", "0.535946", "0.5348673", "0.53396064", "0.5335922", "0.5333992", "0.5329538",...
0.677811
0
createVenueList is used to create the cards used in the venueui
function createVenueList(){ var iconAddress, photo; for (var i = 0; i < venueDetails.length; i++) { $('#venue-text').append(venueDetails[i].venueUiFormatText(venueDetails[i])); //for block wewon't have photo's, just the icons if any if(venueDetails[i].location_icon){ iconAdd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function displayVenueList() {\n venueListEl.empty();\n totalPages = Math.ceil(venueList.length / 10); \n for (var i = (currentPage - 1) * perPage; i < venueList.length && i < currentPage * perPage; i++) {\n venueListEl.append(`\n <li class=\"col s12 m6 xl4\">\n <div ...
[ "0.6661571", "0.5958515", "0.589969", "0.5694115", "0.56448305", "0.5612105", "0.5602857", "0.55957425", "0.557332", "0.5559543", "0.55356246", "0.55173403", "0.55055654", "0.5466361", "0.5443379", "0.5438967", "0.541794", "0.5376571", "0.5375431", "0.5374282", "0.5370468", ...
0.6951253
0
position given in google coordinates, cvonert to plugin
function convert2pluglatLng(position) { return new plugin.google.maps.LatLng(position.lat(), position.lng()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPosition(position) {\n // User latitude\n KC_LAT = position.coords.latitude;\n\n // User longtude\n KC_LON = position.coords.longitude;\n\n}", "function UserLocation(position) {\r\n console.log(position.coords.latitude, position.coords.longitude);\r\n NearestCity(position.c...
[ "0.62631404", "0.6027473", "0.6005241", "0.6003034", "0.5968881", "0.5940424", "0.5939292", "0.5919115", "0.59097356", "0.58937055", "0.58933514", "0.58901197", "0.5878343", "0.58573014", "0.58417356", "0.5828819", "0.5815117", "0.5809173", "0.5799459", "0.57952", "0.5790392"...
0.6389707
0
_moveStartSub() made some changes to take into account an enterprise hcode that can have multipe locations. must requery for the closest location 11/10/2015
function _moveStartSub(position){ if(navigateFlag=== false){ if (startingLocation1.googlePosition !== null && startingLocation2.googlePosition !== null) { if(!navigateFlag){ navigateFlag = 1; } //this might be called before startingLocation2 is set ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _moveStart(markerObject, googleLocation){\n console.log('called _moveStart'+markerObject.inputfield.name);\n markerObject.googlePosition= googleLocation;//\n if(platform===2)\n markerObject.position=convert2pluglatLng(googleLocation);\n else\n markerObject.position=googleLocation...
[ "0.5326755", "0.5307966", "0.5216497", "0.51928866", "0.51738405", "0.5167633", "0.5167633", "0.5070146", "0.506149", "0.5046331", "0.50305206", "0.50253403", "0.5013368", "0.50099874", "0.50099874", "0.499524", "0.49925062", "0.49834782", "0.49777597", "0.49548715", "0.49509...
0.71020854
0
_resetMarkerObject will clear the place_id if it is given. If it is set, then check the eventinfo as well
function _resetMarkerObject(markerObject){ if(markerObject.place_id){ //should also remove venues in this case as this likely //a hcode/permanent destination clearVenues(); displayInfo.eventInformation = null; markerObject.customImage=false; markerObject.place_id=null...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetMarker(mark, i, eventCircle){\n setTimeout(() => { \n eventCircle.setMap(null);\n mark[i].setAnimation(null); \n }, 4000);\n}", "function reset() {\n\t\tmarkers.reset();\n\t}", "function resetMarkers() {\n deleteMarkers();\n updateShops();\n //setAllMarkers();\n}", "function cle...
[ "0.6307299", "0.63058466", "0.6291532", "0.6278803", "0.6181428", "0.6118328", "0.6100933", "0.6082785", "0.6048191", "0.60447985", "0.60134226", "0.59077156", "0.5882554", "0.5874456", "0.5853214", "0.58426994", "0.5837841", "0.5821466", "0.58089316", "0.58039284", "0.579991...
0.78896326
0
initilizeminipanel is to be changed from the minipanel to hiding different parts of the mainPanel
function initializeMiniPanel(){ var address; $("#mainPanelTopMenu").hide(200); $("#mainPanelInviteData").hide(200); if(miniLocation.type==='a'){ $("#mainPanelInputA").show(200); $("#mainPanelInputB").hide(200); }else{ $("#mainPanelInputA").hide(200); $("#mainPanelInpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initMainScreen() {\n //Initialize the user list for \"Contacts\" tab\n initContactList();\n\n //Initialize the chat list for \"Chats\" tab\n initChatList();\n\n // now show the side panel icon\n $('.rightSidePaneBtnDiv').show();\n}", "function initMod() {\n if (document.querySelecto...
[ "0.67857593", "0.6562795", "0.65527683", "0.6505688", "0.6451237", "0.64447457", "0.6426192", "0.6424627", "0.63718426", "0.6365179", "0.6294101", "0.62739074", "0.6260742", "0.62566775", "0.62505555", "0.6243426", "0.62059945", "0.6177835", "0.61666137", "0.61621433", "0.614...
0.70114034
0
markerWebListeners is used by the location markers setPosition routine.
function markerWebListeners(markerObject) { google.maps.event.addListener(markerObject.marker, 'click', function (evt) { _markerClickWorker(markerObject,evt.latLng); }); //code to listen to where the marker is, should display the 'street address'? //does evt provide latlng? google.maps.ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addListeners(marker) {\n\tgoogle.maps.event.addListener(marker, 'click', function(event) {\n\t\tvar item = this.data;\n\t\tvar url = item[\"url\"];\n\t\tplaceNews(url);\n\t\tplaceMetadata(item);\n\t});\n\n\tgoogle.maps.event.addListener(marker, 'mouseover', function(event) {\n\t\tthis.infowindow.open(map,...
[ "0.6193683", "0.5889301", "0.5876754", "0.5851679", "0.57848996", "0.57483447", "0.56738436", "0.5605583", "0.55971736", "0.55318743", "0.54898787", "0.5485446", "0.5477424", "0.5456943", "0.5448797", "0.54477054", "0.5445371", "0.54357105", "0.54246545", "0.541481", "0.54142...
0.7273548
0
cluterData and hiaSearch should be have similar data format and should be the same for copying datya over, as well as the permanent marker search. This is called after the placeDetailObject is created.
function copyPlaceData(placeObject){ if(placeObject.place_id===null || placeObject.place_id===''){ placeObject.place_id = placeObject.id; placeObject.long=true; placeObject.formatted_address = placeObject.address_1; placeObject.formatted_phone_number = placeObject.phone; plac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Place(dataObj) {\r\n 'use strict';\r\n this.name = dataObj.name;\r\n this.location = dataObj.location;\r\n this.id = dataObj.id;\r\n this.image = dataObj.image;\r\n this.marker = null;\r\n this.ratingImage = dataObj.ratingImage;\r\n this.reviewSnippet = dataObj.reviewSnippet;\r\n ...
[ "0.5686412", "0.56192666", "0.5510341", "0.54960823", "0.54960746", "0.5474523", "0.54509145", "0.5435453", "0.5431203", "0.54136336", "0.54084677", "0.537533", "0.53752786", "0.53461975", "0.5344869", "0.5329176", "0.5291751", "0.52863014", "0.5286294", "0.52557176", "0.5249...
0.6147709
0
the following routines will dim the markers when the popupMenus appear and set them to full opacity once the popup menus are closed. Note that this required that the relevant markerObjects have opacity methods created.
function dimAllMarkers(){ _markersSetOpacity(.3); dimVenues(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _updateLayers() {\n for(var i in map._layers) {\n\tif(map._layers[i]._latlng) {\n\t if(map._layers[i]._latlng.level) {\n\t if(map._layers[i]._latlng.level == map.getLevel()) {\n\t if(map._layers[i].setOpacity) {\n\t map._layers[i].setOpacity(1);\n\t } else if(map._layers[i]._cont...
[ "0.6314945", "0.62686014", "0.61979", "0.6010636", "0.5997812", "0.5992385", "0.599138", "0.595265", "0.5945009", "0.59328073", "0.59265196", "0.590889", "0.59042454", "0.5884203", "0.58462834", "0.5829148", "0.5798556", "0.57939994", "0.57750064", "0.5775004", "0.57679707", ...
0.7860133
0
calculateRoute() will, given point1 and point2, find the route between the two points and draw them. If it is suppose to do the midpoint/halfway it will find the route, get the halfway point and find the subroutes. startingLocation1 has to exist and startingLocation2 might have to exist note to extended it to dropBounc...
function calculateRoute() { var request = { origin: startingLocation1.googlePosition, destination: startingLocation2.googlePosition, provideRouteAlternatives: true, //valid travel modes DRIVING, BICYCLING, TRANSIT, WALKING travelMode: google.maps.TravelMode[displayInfo.travel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcRoute(){\n\t//clear the map of exisiting lines\n\tclearLines();\n\t//get the inputs from the forms\n\tvar startVal = parseInt($(\"#start\")[0].value);\n\tvar endVal = parseInt($(\"#end\")[0].value);\n\t//use the input to get the node and id represented by the input\n\tvar startNode = getNodeFromRoomRe...
[ "0.6471282", "0.640844", "0.626233", "0.6201937", "0.61537147", "0.61390364", "0.61183846", "0.61156327", "0.6039982", "0.60056233", "0.6004358", "0.58882403", "0.58806455", "0.5832815", "0.5804068", "0.5772121", "0.57432187", "0.5677155", "0.56712174", "0.5669139", "0.565302...
0.68785554
0
_resetDestination() is to clear invite information
function _resetDestination(){ displayInfo.searchLocation = null; displayInfo.eventInformation = null; _removeRoutes(); clearVenues(); displayInfo.pagination=null; $("#moreGoogle").addClass("ui-disabled"); $("#moreGoogleMain").hide(); $(startingLocation2.inputfield.name).next().trigger("c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearInvite() {\n _resetDestination();\n closeWindows(\"#mainPanel\");\n}", "function reset_() {\n init_();\n configSheet.getRange(ROW_ORIGIN_LI_ID,2).clearContent();\n configSheet.getRange(ROW_DESTINATION_LI,1,\n configSheet.getDataRange().getNumRows() - ROW_DESTINATION_LI + 1,1)\n ....
[ "0.74098086", "0.62853605", "0.59328693", "0.5922722", "0.58924145", "0.58103025", "0.5800003", "0.57494205", "0.5676905", "0.56622434", "0.5651882", "0.55596584", "0.55491686", "0.5546492", "0.54992604", "0.54720163", "0.5448214", "0.5442764", "0.5425352", "0.54007083", "0.5...
0.68092084
1
this function is called by the different function to setup the current travel mode, which is stored in displayInfo. mode will be of the form DRIVING, BICYCLING, WALKING or TRANSIT It will subsequently update all three
function setCurrentTravelMode(mode){ //this sets the main-pane., this will return var string='input[value="'+mode+'"]'; displayInfo.travelMode=mode; //this setsup the button updateDefaultTravelMode(mode); if (navigateFlag === 1) { calculateRoute(); } else i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modeSwitch(mode) {\n\tresetViews();\n resetCameras();\n\tswitch(mode) {\n\t\tcase \"absolute\":\n\t\t\tupdateShipData(true);\n\t\t\tstepSize = 1; // reset step size\n\t\t\tcurrentMode = 1;\n\t\tbreak;\n\t\tcase \"relative\":\n\t\t\tupdateShipData(false);\n\t\t\tstepSize = Math.PI/64; // reset step size...
[ "0.6979886", "0.66174495", "0.65876156", "0.6470812", "0.64345837", "0.635062", "0.60637015", "0.6062231", "0.5992077", "0.59205234", "0.59083974", "0.5895675", "0.58665913", "0.5862768", "0.58058614", "0.57601607", "0.5757474", "0.5751325", "0.5730412", "0.569071", "0.568417...
0.7186502
0
selectTravelMode() is called by the buttons to select
function selectTravelMode(mode){ setCurrentTravelMode(mode); closeWindowsReset(); $("#mode-menus").hide(200); $("#travel-mode-popup-menu").show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentTravelMode(mode){\n\n //this sets the main-pane., this will return\n var string='input[value=\"'+mode+'\"]';\n\n displayInfo.travelMode=mode;\n //this setsup the button\n\n updateDefaultTravelMode(mode);\n if (navigateFlag === 1) {\n calculateRoute();\n ...
[ "0.7488916", "0.7410623", "0.71718407", "0.70293164", "0.69588494", "0.69123805", "0.6909789", "0.6763543", "0.66172713", "0.6595229", "0.6183577", "0.6143184", "0.61390615", "0.61125183", "0.60012025", "0.60008615", "0.5985102", "0.59820163", "0.5947105", "0.5941345", "0.592...
0.78732294
0
handleOpenURL() was made as the single entry point when WebIntent was switched to EddieVanBerger on android from borismus this means that we can get hcode in parameters[0] which is the iOS case or in parameter[1] where it's part of we assume that the url given will be of the` form hinvite://[inviteCode] this must wait ...
function handleOpenURL(url) { var parameters = url.toUpperCase().split("//"); console.log(parameters); if(parameters[1].indexOf("HCODE")>=0){ var temp=parameters[1].split("="); inviteCode=temp[1]; }else{ inviteCode = parameters[1].toUpperCase(); } console.log('inviteCode=' + inviteCode); closeWind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOpenURL(url) {\n console.log(\"received url: \" + url);\n var urlParts = url.split('//'); //split url to remove 'secapp://'\n var addressInternal = urlParts[1]; //store remainder of string\n var addressInternalParts = addressInternal.split('/'); //split again\n if (addressInternalPart...
[ "0.6636192", "0.6169817", "0.6147398", "0.58867353", "0.5822523", "0.5757759", "0.5753943", "0.57082915", "0.5703534", "0.56916904", "0.5656154", "0.5616263", "0.56122965", "0.55505663", "0.55087525", "0.5500818", "0.5465019", "0.5415481", "0.5380712", "0.53801066", "0.537982...
0.81865627
0
sharingNavigate will navigate the creator of the invite to the venue that they chose. eventObject that was created for saving the invite data is still available so use that
function sharingNavigate(){ /* from createInvite lat: venue.geometry.location.lat(), //lat, lng: venue.geometry.location.lng(), //lng, placeId: venue.place_id, // placeId, placeName: venue.name, //placeName, placeDescription: venue.description, //placeDescrip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function venueNavigate() {\n //code\n var eventObject = _.find(venueDetails, function (object) {\n return object.place_id === displayInfo.eventLocationId;\n });\n navigateFlag = 1;\n var gposition = eventObject.geometry.location;\n var position;\n //problem with synchronization with _ha...
[ "0.7250871", "0.6191703", "0.56740755", "0.56503296", "0.5485043", "0.5461401", "0.53113496", "0.52839386", "0.52482355", "0.524279", "0.5233785", "0.5214789", "0.5197154", "0.51492643", "0.5146765", "0.5127487", "0.51160574", "0.51160574", "0.5113237", "0.5111437", "0.509390...
0.7897783
0
aboutsetup will initialize the screen
function aboutSetup(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run () {\n if (m.debug > m.NODEBUG) { console.log('screens.aboutScreen.run'); }\n \n // one-time initialization\n if (needsInit) {\n // draw logo\n var $canvasBox = $('#aboutLogoBox');\n m.logo.drawLogo($canvasBox, false, 0, 0, 0);\n\n $('#aboutMenuButton')\n // navi...
[ "0.7262421", "0.7017942", "0.70083046", "0.6895291", "0.6856892", "0.68522954", "0.6688068", "0.66529447", "0.6623626", "0.6616268", "0.6573969", "0.65664536", "0.65658176", "0.6564269", "0.65448606", "0.6494457", "0.64737743", "0.64703184", "0.6391438", "0.6385771", "0.63802...
0.7145599
1
drop_favorite should be similar to processClusterData() favorites should have an event window and allow you to get more details (if there is a place_id). The pin should appear in the venueList and the venueDetails if the information has a googlecode. If there is no googlecode, then this might only have an Address, Desc...
function drop_favorite(type){ var item=favorite_instance.findFavorite(type); createFavoriteMapObject(item); updateSearchBounds(); createVenueList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectFavourite(data) {\n console.log(data)\n this.populateInfoWindow(data.marker, this.foursquareInfoWindow);\n }", "function addPlaceMarker(placeData)\n {\n var marker = new Marker({\n map: map,\n position: placeData.geometry.location,\n title: placeD...
[ "0.6255023", "0.6015679", "0.58423537", "0.58419", "0.5785693", "0.57678765", "0.5646657", "0.56430113", "0.56271976", "0.559974", "0.55943704", "0.5581853", "0.557188", "0.5563574", "0.5552792", "0.5542504", "0.5541924", "0.55309427", "0.55233836", "0.55210716", "0.5477657",...
0.63850814
0
retrieve_pin_image given a favorite type, drop the pin somewhere on the screen
function retrieve_pin_image(type){ switch(type){ case 'home': return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAKL2lDQ1BJQ0MgcHJvZmlsZQAASMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEoqGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectPinImage(prepend,append,hidden,within,elements){var m={k:\"PIN_\"+(new Date).getTime(),checkDomain:{url:\"//api.pinterest.com/v2/domains/filter_nopin/\"},cdn:{\"https:\":\"https://a248.e.akamai.net/passets.pinterest.com.s3.amazonaws.com\",\"http:\":\"http://passets-cdn.pinterest.com\"},embed:\"//pin...
[ "0.62762636", "0.61110413", "0.57611877", "0.5693893", "0.5647175", "0.55259526", "0.5516597", "0.54708934", "0.5439813", "0.5338757", "0.53175884", "0.52944046", "0.52479786", "0.52366626", "0.52157897", "0.52139026", "0.5212274", "0.5170744", "0.5163209", "0.5156156", "0.51...
0.67152363
0
create the favorite data object. Initial menu item is blank, what menu items for the popup can there be? H/W/F1/F2? if they assign one in the edit then it will appear in the popup menu, we can have 5 popup menu items. Note that if data.menu_type is home or work that there is only one. So it will replace any new items.
function favoriteSave(name, address, googlecode, description, lat, lng, scope, menu_item){ var data = {}; data.name=name; data.address_1=address; data.description=description; data.googlecode=googlecode; data.lat=lat; data.lng=lng; data.scope=scope; da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _createFoodMenu( data ) {\n var html = '', note = data.notification ? \n '<div class=\"notification\">'+data.notification+'</div>' : '';\n \n if ( data.headline ) {\n var id = getAutoId(); \n html = '<h2 id=\"'+id+'\">'+data.headline+'</h2>'+note;\n } else if ( data.subline ) {\n html = ...
[ "0.65345", "0.581037", "0.57599896", "0.5617224", "0.56166154", "0.5565675", "0.5433852", "0.53900284", "0.5378798", "0.5318423", "0.5318413", "0.5312572", "0.5290256", "0.528875", "0.52652484", "0.5260533", "0.52562267", "0.5241813", "0.5241813", "0.5208656", "0.5195485", ...
0.63546896
1
updateefaultTravelModeIcon will set the default travelModeIcon to an ungreyed version all the icons must be set to the greyed version first
function updateDefaultTravelModeIcon(){ resetDefaultTravelModeIcons(); switch(displayInfo.travelMode){ case 'WALKING': $('#walkingl').removeClass('ui-icon-lool-walking-grey').addClass('ui-icon-lool-walking'); break; case 'DRIVING': $('#drivingl').removeClass('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_icon()\n {\n const icon = bookmarks.is_unlocked() ? \"unlocked-bookmarks.svg\" :\n \"locked-bookmarks.svg\";\n const path = `/icons/main/${icon}`;\n browser.browserAction.setIcon({\n path:\n {\n ...
[ "0.5877779", "0.58560413", "0.5814307", "0.5814307", "0.57403225", "0.5592496", "0.552629", "0.55091846", "0.5484483", "0.5457883", "0.54008156", "0.5372819", "0.53495353", "0.5345963", "0.5317577", "0.5268967", "0.5252517", "0.52511555", "0.52498114", "0.520999", "0.5207556"...
0.8360449
0
this will setup the bookmark pin code from powaintMarkerObject
function bookmarkDropPin(icon) { var image = icon;//pointed to bookmark previously var position; if (platform === 2) position = convert2pluglatLng(where.location); else position = where.location; if (bookmarkObject === null) { bookmarkObject = new powaintMarkerObject(null, wh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setBookmark(){\n\tclearBookmarks();\n\taddBookmark();\n}", "function onBookmarkClicked(oll, coll, zbll) {\n // add \"starred\" preset upon first use\n if (!zbllPresets.hasOwnProperty(mbPresetName)) {\n zbllPresets[mbPresetName] = \"{}\";\n }\n var needToRemove = isInBookmarks(oll, col...
[ "0.6194227", "0.5895763", "0.5852656", "0.58294106", "0.5700521", "0.5692125", "0.5621311", "0.5593392", "0.55905133", "0.5527924", "0.55117685", "0.5493396", "0.5466079", "0.5449139", "0.54488194", "0.54475844", "0.54211026", "0.5408538", "0.5401807", "0.53996956", "0.538528...
0.66789484
0
begin conversion with Roman thousands
function romanThousands(num, romanArr) { for (var i= 0; i<num; i++) { romanArr.push("M"); } return romanArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToRoman(num) {\n \n}", "function convertToRoman_2(num) {\n let m = [\"\", \"M\", \"MM\", \"MMM\"];\n let c = [\"\", \"C\", \"CC\", \"CCC\", \"CD\", \"D\", \"DC\", \"DCC\", \"DCCC\", \"CM\"];\n let x = [\"\", \"X\", \"XX\", \"XXX\", \"XL\", \"L\", \"LX\", \"LXX\", \"LXXX\", \"XC\"];\n let i =...
[ "0.7058934", "0.69285756", "0.6902956", "0.6872246", "0.6826131", "0.68106186", "0.67400885", "0.67151237", "0.66608316", "0.66266376", "0.65856564", "0.6540503", "0.65311277", "0.6526773", "0.6523305", "0.6521313", "0.65088004", "0.6508709", "0.64400667", "0.64340425", "0.64...
0.70762926
0
modify bookmarks array in this.state.currUser.bookmarks
updateCurrentUserBookmarksState(pid) { const updatedBookmarks = this.state.currentUser.bookmarks.filter( (p) => { return p !== pid; } ); this.state.currentUser.bookmarks = updatedBookmarks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set bookmarks(value) { this._bookmarks = value; }", "function updateBookmarkTable(bookmarks) {\n setbookmarkContainer(bookmarks);\n return;\n }", "function updateBookmarks() {\n bookmarksList.forEach((value) => {\n // Create a new div for bookmark to add it to the document\n const bookmark = docu...
[ "0.74845564", "0.6706486", "0.65396196", "0.6208571", "0.6187806", "0.60798633", "0.6074991", "0.60336477", "0.60329413", "0.6011467", "0.59862334", "0.59825593", "0.591959", "0.5874156", "0.5869249", "0.5799984", "0.576712", "0.5742947", "0.5671965", "0.5625095", "0.5591746"...
0.7746532
0
Get song by id
async getSongById(id) { const query = { text: 'SELECT * FROM songs WHERE id = $1', values: [id], }; const result = await this._pool.query(query); if (!result.rows.length) { throw new NotFoundError('Lagu tidak ditemukan'); } return result.rows.map(mapDBToModel)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSongObjectById(id){\n let song = player.songs.filter(songObject => {\n if(songObject.id === id){\n return songObject;\n }\n })\n if(song.length == false){\n throw \"undefined id\";\n }\n song = song[0];\n return song;\n}", "function getSong(vi...
[ "0.8322564", "0.7498637", "0.740929", "0.72804475", "0.7277085", "0.7252751", "0.71907526", "0.70603526", "0.7053896", "0.70169705", "0.7006503", "0.6959453", "0.6872865", "0.6842352", "0.6836804", "0.67233735", "0.6682855", "0.66655856", "0.6551101", "0.65333784", "0.6524065...
0.80881757
1
Edit song by id
async editSongById(id, { title, year, performer, genre, duration, }) { const updatedAt = new Date().toISOString; const query = { text: `UPDATE songs SET title = $1, year = $2, performer = $3, genre = $4, duration = $5, updated_at = $6 WHERE id = $7 RETURNI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edit(id){\n var form = $('#edit_form');\n if (form[0].line.value == id) {\n change();\n return;\n }\n \n var art = form.children('[name=artist]');\n var son = form.children('[name=song]');\n var line = $('#line_'+id).children('.info');\n \n form.insertBefore(line);...
[ "0.7245744", "0.69046324", "0.686722", "0.6744488", "0.6680375", "0.6618181", "0.66085315", "0.65831417", "0.6446897", "0.64379585", "0.6372761", "0.6350851", "0.63286644", "0.63281876", "0.627766", "0.62554395", "0.6237757", "0.61850333", "0.6176586", "0.61677766", "0.616639...
0.7372481
0
Delete song by id
async deleteSongById(id) { const query = { text: 'DELETE FROM songs WHERE id = $1 RETURNING id', values: [id], }; const result = await this._pool.query(query); if (!result.rows.length) { throw new NotFoundError('Lagu gagal dihapus. Id tidak ditemukan'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteFromQueue(id) {\n database.ref(path + 'songs/' + id).remove();\n}", "function deleteMedia(id) {\n Media.delete(id)\n .then(function onSuccess(response) {\n console.log(response);\n })\n .catch(function onError(response) {\n conso...
[ "0.7615508", "0.76132214", "0.7563905", "0.75371355", "0.7439178", "0.7343446", "0.73411965", "0.72169054", "0.7119205", "0.7113435", "0.7095489", "0.70414233", "0.6987223", "0.69631577", "0.69478154", "0.6877768", "0.6865021", "0.68613076", "0.6839915", "0.68389183", "0.6817...
0.8050917
0
Get all inbounds squares in a straight line starting from this point.
getStraightLines() { let points = []; points.push(this.getLine(-1, 0)); points.push(this.getLine(1, 0)); points.push(this.getLine(0, -1)); points.push(this.getLine(0, 1)); return points; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scanline(y, points) {\n const spans = [];\n let [x1, y1] = points[points.length - 1];\n\n for(const [x2, y2] of points) {\n const localMinY = Math.min(y1, y2);\n const localMaxY = Math.max(y1, y2);\n // consider only non-horizontal edges the scanline intersects\n // where scanline doesn't i...
[ "0.5947929", "0.58992267", "0.5858694", "0.58249044", "0.5824018", "0.58185285", "0.5817705", "0.5799898", "0.5793705", "0.5777021", "0.5713148", "0.5702572", "0.56513035", "0.56500447", "0.5634859", "0.5509318", "0.55050397", "0.5483217", "0.5462368", "0.545841", "0.5434206"...
0.61609554
0
Reindex the search index queued in redis Includes (1) Articles (2) Categories IF: The Article is not present in the Articles Collection (mongodb) OR The Article is unpublished in the Articles Collection (mongodb) OR The Category is not present in the Categories Collection (mongodb) THEN delete the entity from all the k...
function reIndex() { GLOBAL.redis_con = redis.createClient(); redis_con.smembers(etc.redisKey('index', 'articles'), function (err, to_index_articles) { if (err) { return redis_con.end() } redis_con.smembers(etc.redisKey('index', 'categories'), function (err, to_index_categori...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateIndex (oplog, added) {\n added.reverse().reduce((handled, item) => {\n if (handled.indexOf(item.payload.key) === -1) {\n handled.push(item.payload.key)\n if (item.payload.op === 'INSERT') {\n this._index[item.payload.id] = item.payload.value\n }\n }\n return ha...
[ "0.5356156", "0.5221755", "0.5101302", "0.50607806", "0.5058581", "0.49372393", "0.48971698", "0.48887813", "0.48844904", "0.48698303", "0.48686796", "0.48685366", "0.48445132", "0.4837619", "0.48254433", "0.4824783", "0.4823488", "0.48153427", "0.4809841", "0.48091578", "0.4...
0.74542755
0
Clone the array `list` one array deep within, eg: [[1,2],[3,4]]
function cloneArraySingleLevel(list) { var clone = []; for (var i = 0; i < list.length; i++) { clone.push([]); for (var j in list[i]) { clone[i].push(list[i][j]); } } return clone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copy(lista) {\n\tif (isEmpty(lista)) return lista\n\treturn cons(first(lista), rest(lista))\n}", "function cloneToLView(list) {\n if (LVIEW_EMPTY === undefined)\n LVIEW_EMPTY = new LViewArray();\n return LVIEW_EMPTY.concat(list);\n}", "function copyList(l){\n var lCopy = [];\n if (l.len...
[ "0.68625283", "0.65682954", "0.6547369", "0.63922215", "0.63922215", "0.6375706", "0.63516665", "0.6326331", "0.6295533", "0.6274302", "0.6227916", "0.6216258", "0.6213419", "0.6202423", "0.619502", "0.6174536", "0.61633605", "0.61475694", "0.61457616", "0.61237735", "0.61237...
0.8104163
0
Define the ensureReadiness method.
function ensureReadiness() { //Check state and status and return nothing if not ready. if(request.readyState < 4) { return; } if(request.status !== 200) { return; } //Check if ready. if(request.readyState === 4) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reportComponentReadiness() {\n\t\tif (this.is_loading) {return;}\n\t\tlet parent_component_obj = this.getParentComponent();\n\t\tif (this.sub_component_definitions.length === 0) {\n\t\t\tif (parent_component_obj != null) {\n\t\t\t\tparent_component_obj.reportSubComponentReady(this.getUid());\n\t\t\t} else {\n\t\t\...
[ "0.585259", "0.58049464", "0.57497174", "0.55577147", "0.53848606", "0.5378832", "0.53181803", "0.5263509", "0.5234537", "0.5213788", "0.5206933", "0.519919", "0.5171715", "0.5171715", "0.5171715", "0.5171715", "0.5171715", "0.5171715", "0.5171715", "0.5171715", "0.5171715", ...
0.71346533
0
Cleans raw text with a pipeline of replacing malformatted input
function cleanText(rawText) { return ( rawText.replace(/(?:(?:\r\n|\r|\n)\s*){2,}/gim, "\n\n") .replace(/ +(?= )/g,'') // Remove more than 2 spaces: .replace(/&nbsp;/gi," ") // Remove html-encoded characters .replace(/&amp;/gi,"&") .replace(/&quot;/gi,'"') .r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heavyCleanup(input) {\n // TODO: Some of the backslash escapes should be handled by Flowmark instead\n // being of unescaped here.\n return input\n .replace(/ {4}> /gim, ' ')\n .replace(/<!-- -->/gim, '')\n .replace(/\\\\'/gim, \"'\")\n .replace(/\\\\\"/gim, '\"')\n .replace(/\\\\\\$/...
[ "0.6393239", "0.63636315", "0.6344145", "0.6179083", "0.61461467", "0.61081445", "0.6093812", "0.5982875", "0.5942511", "0.5912282", "0.5906227", "0.589151", "0.5878709", "0.58669764", "0.5860188", "0.5857733", "0.57962763", "0.5731408", "0.57291216", "0.57138103", "0.5710688...
0.6796263
0
Construct a DOMdescending list of all noninline ancestors of the given element
function nonInlineAncestors(elt) { const result = []; while (elt != null && elt.tagName != 'BODY') { const eltDisplay = getComputedStyle(elt).display; switch (eltDisplay) { case 'inline': // Ignore this element break; default: result.unshift(elt); break; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _removeDescendents( elements, ancestors ) {\n\t\t\tif ( typeof ancestors === 'undefined' ) {\n\t\t\t\tancestors = elements;\n\t\t\t}\n\n\t\t\tvar topLevelElements = [];\n\t\t\tfor ( var elementIndex = 0; elementIndex < elements.length; elementIndex++ ) {\n\t\t\t\tvar ancestorFound = false;\n\t\t\t\tfor ( ...
[ "0.7054495", "0.64698404", "0.6379268", "0.63702404", "0.63160145", "0.63160145", "0.63160145", "0.63050014", "0.6302206", "0.62902546", "0.6283774", "0.6281578", "0.62502706", "0.6247884", "0.62386733", "0.6144953", "0.6144953", "0.6144953", "0.6142393", "0.6134449", "0.6110...
0.6894326
1
Rich Text Editor Function
editCommand(){const richtext=this.shadowRoot.getElementById("richtext"),editmode=richtext.contentDocument;editmode.designMode="on"}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TextEditor() {}", "get richText() {}", "set richText(value) {}", "function viewText(n) {\r\n var getDocument = document.getElementById(\"wysiwyg\" + n).contentWindow.document;\r\n var browserName = navigator.appName;\r\n\r\n\t// View Text for IE\r\n if (browserName == \"Microsoft Internet Explore...
[ "0.79584324", "0.73271763", "0.71241987", "0.6912698", "0.6825497", "0.6760582", "0.665989", "0.66303205", "0.6617762", "0.6617762", "0.6482108", "0.6471784", "0.64596754", "0.64418864", "0.64298534", "0.64177346", "0.6404693", "0.639951", "0.63184327", "0.6311954", "0.626952...
0.7510583
1
Utility funciotns gets data from dataIn object array and pushes to dataOut array
function fetchData(dataIn, dataOut) { for (var i = 0; i < dataIn.length; i++) { var year = dataIn[i]['date'].slice(0, 4); var month = dataIn[i]['date'].slice(5, 7); var day = dataIn[i]['date'].slice(8, 10); var d = Date.UTC(year, month, day); var value = [d, dataIn[i].value]; dataOut.push(value); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushDataArr(data, arr) {\n\n let obj = data,\n dataArr = arr;\n\n if (obj != \"undefine\") {\n arr.push(obj);\n }\n\n return arr;\n\n\n\n}", "function copyData(source, outFunctions) {\n var key, i, src, newData = { };\n \n for(i = 0; i < source.length; i++) {\n sr...
[ "0.62883747", "0.6139815", "0.604456", "0.59994626", "0.58912224", "0.5866363", "0.58507454", "0.57898843", "0.57699496", "0.571532", "0.56979233", "0.5636721", "0.5592334", "0.55787516", "0.5576819", "0.5575988", "0.55545336", "0.55527943", "0.55416346", "0.55416346", "0.553...
0.7447712
0
Promise returning the graph once springy calculated the layout. If the graph already contain layout, return it as is.
function resolver(resolve, reject) { try { var springy_graph = new Springy.Graph(), max_iterations = 100, // we stop layout after 100 iterations. loop = 0, springy_nodes = {}, drawn_nodes = {}, min_x=100, max_x=0, min_y=100, max_y=0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyLayout(){\n let cy = new Cytoscape({\n headless: true,\n elements: makeCyEles( this.elements() ),\n layout: { name: 'grid' },\n styleEnabled: true\n });\n\n let runLayout = () => {\n let layout = cy.layout( _.assign( {}, getCyLayoutOpts(), {\n animate: false,\n ...
[ "0.60970515", "0.59454215", "0.56091464", "0.5528676", "0.5526048", "0.54925114", "0.5462116", "0.5451078", "0.5432588", "0.54250383", "0.5389398", "0.53628516", "0.53404737", "0.53354996", "0.53302884", "0.53302884", "0.53129405", "0.5291043", "0.52747715", "0.52653706", "0....
0.65615785
0
DESCRIPTION: Loads assets for the main menu PARAMS: game (I,REQ) Game object
function preloadMainMenu(game) { game.load.image('menu-bg', 'assets/bg/main-menu.png'); game.load.image('button-medium', 'assets/ui/button-medium.png'); game.load.image('black', 'assets/ui/black.png'); game.load.audio('menu-bgm', ['assets/music/title.mp3']); game.load.audio('menu-accept', ['assets/sounds/acc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadGame(){\n\t// images\n\tbgImage.src = \"images/backgframe_480.jpg\";\n\tdude.src = \"images/person.png\";\n\tscrollImage.src = \"images/scroll.png\";\n\t\n\t// required buttons\n \tpauseButtonImage.src = \"images/gmenub1.png\";\n\t\n \tpauseButtonImage2.src = \"images/gpauseButton.png\";\n\t\n\t// tes...
[ "0.7175541", "0.69605255", "0.68066466", "0.6749148", "0.66671765", "0.6659007", "0.64789796", "0.64346236", "0.64305824", "0.64298224", "0.63916844", "0.63835245", "0.63734174", "0.6371932", "0.635784", "0.63434976", "0.6327793", "0.6326672", "0.6323321", "0.6309163", "0.628...
0.73529786
0
DESCRIPTION: Starts the game from the main menu PARAMS: game (I,REQ) Game object music (I,REQ) Currentlyplaying music, so it can be stopped
function startGame(game, music) { var accept = game.sound.add('menu-accept', { volume: 0.5 } ); accept.play(); game.time.delayedCall(1500, startGameAfterDelay, [game, music]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async start(game, data) {\n\t\t// Reset the times and flags.\n\t\tthis._jump_time = -1;\n\t\tthis._won = false;\n\t\tthis._lost = false;\n\t\tthis._lost_time = -1;\n\n\t\t// Start the music.\n\t\tthis._audio.volume = 1;\n\t\tthis._audio.currentTime = 0;\n\t\tthis._audio.play();\n\t}", "function startGame() {\n ...
[ "0.74471545", "0.7179195", "0.71352714", "0.6990709", "0.698927", "0.694863", "0.6914931", "0.6865144", "0.68576586", "0.68207943", "0.6809836", "0.6807488", "0.6787318", "0.6783884", "0.6767664", "0.6698527", "0.66719186", "0.6659885", "0.6659448", "0.66445744", "0.6617401",...
0.7983183
0
Constructor method Parameter: qd: The information required to generate a exercise. dict: The collection of Emdros objects for this question.
constructor(qd : QuizData, dict : Dictionary) { this.qd = qd; this.sentence = dict.sentenceSetQuiz; //////////////////////////////////////////////////////////////////// // Calculate the Bible reference (the 'location') for this sentence. // We base the location on the first mona...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Qd() {\n this.m = [];\n this.g = [];\n this.s = [];\n this.l = {};\n this.h = null;\n this.i = []\n }", "function Quiz(questions) {\n this.student = \"\";\n this.score = 0;\n this.questions = questions;\n this.questionIndex = 0;\n this.myAnswers = [];\n}...
[ "0.6744171", "0.6313328", "0.63126546", "0.62611157", "0.6195535", "0.6161682", "0.6161682", "0.61488193", "0.61488193", "0.61488193", "0.61407435", "0.60767514", "0.6064881", "0.6037014", "0.6026551", "0.6019225", "0.5904474", "0.5892614", "0.58922696", "0.5886256", "0.58805...
0.6343125
1
Paints the background alternating colours
function drawAlternateBackground(even, odd) { // Even and odd default to what's already in the ul element if (typeof even == 'undefined' && typeof odd == 'undefined') { var even = feedList.find('li:eq(1)').css('background'); var odd = feedList.find('li:eq(2)').css('background'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bg(ctx) {\n\tctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n\tctx.fillStyle = '#1c1c1c';\n\tfor (var x = -1; x < ctx.canvas.width + 1; x += cellSize) {\n\t\tctx.fillRect(x, 0, 2, ctx.canvas.height);\n\t}\n\tfor (var y = -1; y < ctx.canvas.height + 1; y += cellSize) {\n\t\tctx.fillRect(0, y, ct...
[ "0.6643571", "0.6553066", "0.65385157", "0.6416941", "0.64077216", "0.6369047", "0.63634384", "0.6294603", "0.62516046", "0.62481517", "0.6247368", "0.62317103", "0.62206614", "0.6217408", "0.6213589", "0.6194871", "0.6188924", "0.61878806", "0.6172632", "0.6170312", "0.61319...
0.67071116
0
Helper function. Sorts bury stats by count (desc).
function sortBuryStats() { var reason, i, byVotes = [], byReason = buryStats.byReason; for (reason in byReason) { for (i=0; i<byVotes.length; i++) { if (byReason[byVotes[i]] < byReason[reason]) { byVotes.splice(i,0,reason); break; } } if (i == byVotes.length) byVotes.push(reason); } b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByCountDesc(a, b) { return b.count - a.count; }", "function sortTrackCount()\n{\n\ttracks.sort( function(a,b) { if (a.playCount < b.playCount) return -1; else return 1; } );\n\tclearTable();\n\tfillTracksTable();\n}", "function sortArtistCount()\n{\n\tartists.sort( function(a,b) { if (a.playCount ...
[ "0.7589269", "0.7099384", "0.7016399", "0.68982136", "0.68404746", "0.6804533", "0.6715718", "0.63946426", "0.63035554", "0.6229052", "0.6138474", "0.6134051", "0.61258537", "0.6118624", "0.61107486", "0.6093534", "0.6092316", "0.60402054", "0.6035148", "0.6020388", "0.597476...
0.77239007
0
Adds bury reason stats into "burybox" (when available).
function writeBuryStats2() { var elems = document.querySelectorAll('.jbury li[data-reason]'), byReason = buryStats.byReason; for(var el, newEl, reason, i=0; i<elems.length; i++) { el = elems[i]; reason = MAP_BURY_REASONS[el.getAttribute('data-reason')]; if (byReason.hasOwnProperty(reason)) { var new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBuryStats() {\r\n\tvar html = [], el = document.querySelector('.content header ~ * a.showBury');\r\n\tif (!el) return;\r\n\t\r\n\tvar newEl = document.createElement('span');\r\n\t//newEl.setAtribute('href', '#justCommenting');\r\n\tnewEl.className = 'c555';\r\n\tnewEl.textContent = buryStats.abstainC...
[ "0.61524177", "0.5781918", "0.57809234", "0.5563676", "0.5501595", "0.54748994", "0.5427259", "0.5426174", "0.5386998", "0.53140926", "0.53068244", "0.5289533", "0.52706385", "0.52658683", "0.52535886", "0.52449846", "0.5200667", "0.5200667", "0.5195072", "0.51885676", "0.517...
0.6050537
1
mod.js // ////////// checkCollisionsMA override
checkCollisionsMA() { //get number of aliens shot var alienCount = this.aliens.length this.checkMA(); var casualties = alienCount - this.aliens.length if (casualties != 0) { this.score += casualties * SCORE_MULTIPLIER } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCollisions() {\n if (player.isCollidedWithAnyIn(allEnemies)) {\n // Lost\n if (isPlaying) {\n Sound.bump.play();\n }\n isPlaying = false;\n }\n }", "collision () {\n }", "checkItemsInPlayCollisions(ctx) {\n // NOTE:...
[ "0.69380224", "0.6835818", "0.6809062", "0.68060136", "0.67616194", "0.6746455", "0.67208505", "0.6693417", "0.66599655", "0.66219246", "0.6615366", "0.6605897", "0.6598877", "0.65873843", "0.65512425", "0.65236115", "0.6522464", "0.64776677", "0.6469031", "0.64604163", "0.64...
0.78097546
0
Returns a string, hopefully the full name of the External Program referenced by 'code'
function xtrn_name(code) { if(xtrn_area.prog[code] != undefined && xtrn_area.prog[code].name != undefined) return xtrn_area.prog[code].name; return code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSupplier(code) {\n let supplierCode, pos;\n pos = code.indexOf(\":\");\n supplierCode = code.substr(0, pos);\n return supplierCode;\n}", "function pidname(pid) {\n var pname = _(\"Program\")+\" \"+pid;\n\n if(pid===255||pid===99) {\n pname=_(\"Manual program\");\n } else i...
[ "0.6110118", "0.60399115", "0.60277385", "0.57933027", "0.5788179", "0.576102", "0.5700774", "0.5632792", "0.5615707", "0.56068254", "0.55807245", "0.5542934", "0.5467671", "0.546465", "0.5462389", "0.5440118", "0.54388225", "0.541856", "0.53671277", "0.53650147", "0.5352216"...
0.6975939
0
Returns a string, representing the current node connection (with a prepended space)
function node_connection_desc(node) { if(js.global.bbs) { switch(node.connection) { case NODE_CONNECTION_LOCAL: return " Locally"; /* obsolete */ break; case NODE_CONNECTION_TELNET: return bbs.text(NodeConnectionTelnet); break; case NODE_CONNECTION_RLOGIN: return bbs.text(NodeConnectionR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currentNetwork() {\n return connectedNetwork;\n }", "getNodeID() {\n\t\treturn os.hostname().toLowerCase();\n\t}", "toString(){\n let result = \"head → \";\n let current = this.head;\n while(current !== null){\n if(current.next !== null){\n resu...
[ "0.58501625", "0.58283556", "0.57791996", "0.57737607", "0.57177126", "0.56854475", "0.5683907", "0.5678198", "0.56131303", "0.5590504", "0.54515165", "0.54271203", "0.5422406", "0.5421402", "0.5397163", "0.53701496", "0.53548235", "0.5353792", "0.5301808", "0.5290803", "0.52...
0.66650933
0
Returns a string representation of the node "misc" flags
function node_misc(node, is_sysop) { var output = ''; var node_misc = node.misc; if(!is_sysop && node.status != NODE_INUSE) node_misc &= ~(NODE_AOFF|NODE_POFF|NODE_MSGW|NODE_NMSG); var flags = ''; if(node_misc&NODE_AOFF) flags += 'A'; if(node_misc&NODE_LOCK) flags += 'L'; if(node_misc&NODE_MSGW) flags +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFlags() {\r\n var flags = \"\"; // start with empty flags\r\n if (globalCheckbox.checked) {\r\n flags += \"g\";\r\n }\r\n if (caseInsensitiveCheckbox.checked) {\r\n flags += \"i\";\r\n }\r\n if (multilineCheckbox.checked) {\r\n flags += \"m\";\r\n }\r\n return flags;\r\n}", "flagsToS...
[ "0.654498", "0.6220245", "0.59083873", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.54944676", "0.5474064", "0.5464254", "0.5463645", "0.53968394", "0...
0.79691315
0
Returns a string describing the node status, suitable for printing on a single line num is zerobased options values supported/used: .include_age .include_gender .username_prefix .status_prefix .age_prefix .gender_prefix .gender_separator .connection_prefix .errors_prefix
function node_status(node, is_sysop, options, num) { var node_status = node.status; var misc = node.misc; var output = ''; switch(node_status) { case NODE_QUIET: if(!is_sysop) return format(NodeStatus[NODE_WFC],node.aux); /* Fall-through */ case NODE_INUSE: { if(misc&NODE_EXT) { output += ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodeStatus() {\n return this.query('/status', 'GET')\n }", "function getDotaStatusString(status) {\n\tswitch (status) {\n\t\tcase constants.DOTA.DISCONNECTED:\n\t\t\treturn 'Not connected.';\n\t\tcase constants.DOTA.LOOKING_FOR_GC:\n\t\t\treturn 'Searching for Game Coordinator';\n\t\tcase constants....
[ "0.65574276", "0.61082053", "0.5995743", "0.5970052", "0.596874", "0.5966192", "0.5912988", "0.58966094", "0.58050734", "0.57259315", "0.57224226", "0.57224226", "0.57224226", "0.57224226", "0.57224226", "0.57224226", "0.57224226", "0.57224226", "0.57145625", "0.5701375", "0....
0.7493066
0
Returns either: 1. number of nodes printed other than 'self' or (if print is false): 2. an array of lines suitable for printing In addition to the options properties supported by node_status(), also supports: options.format a printfstyle format for the node status line (e.g. "%d %s") options.include_web_users if false,...
function nodelist(print, active, listself, is_sysop, options) { var others = 0; var output = []; if(!options.format) options.format = "%3d %s"; var n; for(n = 0; n < system.node_list.length; n++) { var node = system.node_list[n]; if(active && node.status != NODE_INUSE) continue; if(js.global.bbs && n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function node_status(node, is_sysop, options, num)\n{\n\tvar node_status = node.status;\n\tvar misc = node.misc;\n\tvar output = '';\n\n\tswitch(node_status) {\n\t\tcase NODE_QUIET:\n\t\t\tif(!is_sysop)\n\t\t\t\treturn format(NodeStatus[NODE_WFC],node.aux);\n\t\t\t/* Fall-through */\n\t\tcase NODE_INUSE:\n\t\t{\n\...
[ "0.56194013", "0.54016924", "0.52994806", "0.51572603", "0.5133379", "0.5128759", "0.50973374", "0.5086714", "0.48577538", "0.48139834", "0.48049837", "0.48047552", "0.48047552", "0.48047552", "0.48047552", "0.48047552", "0.48047552", "0.47672382", "0.47329015", "0.4705847", ...
0.6750217
0
===================== Public Methods ===================== prepare fields before field initialize
beforeInit() { const { ele } = this.props; this._value = []; if (!ele.fieldClass) { FieldUtiles.prepareFieldsRec(ele); } this.ele = ele.fieldClass ? ele : FieldUtiles.getFieldData({ ele }, ObjectField); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeFields() {\n // Not used\n}", "prepare() {\n super.prepare()\n }", "prepareBaseData() { super.prepareBaseData(); }", "ensureFields() {\n if (this.options.fields === undefined) {\n this.options.fields = this.config.fieldNames.reduce((fields, field) => {\n ...
[ "0.70978755", "0.67499244", "0.6483155", "0.6421678", "0.6282448", "0.6216123", "0.6208419", "0.62043726", "0.6194408", "0.6161261", "0.61434406", "0.61427987", "0.6137664", "0.6126596", "0.6103095", "0.60913396", "0.60893047", "0.60330725", "0.6024261", "0.598141", "0.596715...
0.6821266
1
return field information like string, field name , field type etc.
getFieldInfo() { const info = super.getFieldInfo(); const ClassName = this.ele.fieldClass; const ele = new ClassName(this.ele.props); ele.setKey(this.key); info.ele = ele.getFieldInfo(); return info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFields() {\n const record = this.data[0];\n const fldKeys = Object.keys(record);\n return fldKeys;\n }", "getFieldsAsString() {\n let fields = Object.getOwnPropertyNames(this);\n return fields.toString();\n }", "fields( table ) {\n\t\tlet getType = ( type ) => {\n\t\t\treturn \tty...
[ "0.68780977", "0.6797089", "0.6736057", "0.6616511", "0.6552037", "0.65243226", "0.64512885", "0.6426754", "0.6353858", "0.6327195", "0.6274123", "0.6201721", "0.6199888", "0.6197913", "0.6194239", "0.6184346", "0.6184346", "0.61296016", "0.60295", "0.6024807", "0.6024807", ...
0.68876106
0
Ecma International makes this code available under the terms and conditions set forth on (the "Use Terms"). Any redistribution of this code must retain the above copyright and this notice and otherwise comply with the Use Terms. / info: > Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method of O to ...
function testcase() { var o = {}; var desc = { value: 1 }; Object.defineProperty(o, "foo", desc); var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); if (propDesc.value === 1 && // this is the value that was set propDesc.writable === false && // false by default ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testcase() {\n var obj = {};\n var firstArg = 12;\n var secondArg = 12;\n\n var setFunc = function (a, b) {\n firstArg = a;\n secondArg = b;\n };\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n obj.pro...
[ "0.6595416", "0.65929353", "0.65442693", "0.65442693", "0.65062207", "0.6375993", "0.6355105", "0.6239108", "0.62146395", "0.61884415", "0.6138727", "0.6060968", "0.60519934", "0.60313225", "0.60313225", "0.60243493", "0.5979522", "0.5977594", "0.59773237", "0.59409136", "0.5...
0.68819255
0
Iterate over a map of values and apply the keyValueFunction to each pair
function keyValueIteration(map, fct){ for (var key in map) { if (map.hasOwnProperty(key)) { fct(key, map[key]) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapValue(map, fn) {\n var result = Object.create(null);\n\n for (var _i2 = 0, _objectEntries2 = (0, _objectEntries3.default)(map); _i2 < _objectEntries2.length; _i2++) {\n var _ref2 = _objectEntries2[_i2];\n var _key = _ref2[0];\n var _value = _ref2[1];\n result[_key] = fn(_value, _key);\n ...
[ "0.6920678", "0.68985987", "0.6791872", "0.6540602", "0.6540602", "0.642246", "0.6416452", "0.6317197", "0.62856555", "0.6263792", "0.6263792", "0.6263792", "0.6231278", "0.6216349", "0.61876553", "0.61704427", "0.6161036", "0.6059765", "0.6047332", "0.6046377", "0.5992428", ...
0.7588503
0
generate blur and upload photos to s3
async function handlePhotos(file, photo_info) { try { const blur = await sharp(file.path).blur(20).toFile('tmp/blur.jpg'); const mainKey = path.basename(file.originalname, path.extname(file.originalname)) + '-' + Date.now() + path.extname(file.originalname); const mainData = await s3Upload({ Key: mai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function awsUpload() {\n\n //configuring the AWS environment\n AWS.config.update({\n accessKeyId: \"AKIAIYOTGRTBNHAJOWKQ\",\n secretAccessKey: \"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\"\n });\n var s3 = new AWS.S3();\n var filePath = \"./images/\" + imageLocation;\n\n //Configurin...
[ "0.6625377", "0.6486297", "0.63619953", "0.6321482", "0.6305362", "0.6305362", "0.62373286", "0.61209995", "0.6072855", "0.5969241", "0.59599704", "0.5952698", "0.59337854", "0.5917523", "0.58685225", "0.58549327", "0.5852118", "0.5847065", "0.58388925", "0.5826977", "0.57787...
0.6658642
0
Path should look like "/N:/berry/scripts/pluginpack.js" And transform to "N:\berry\scripts\pluginpack.js"
function fromPortablePath(p) { if (process.platform !== 'win32') return p; return p.match(PORTABLE_PATH_REGEXP) ? p.substring(1).replace(/\//g, `\\`) : p; } // Path should look like "N:/berry/scripts/plugin-pack.js"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyStringForDestination(path) {\n\n // chnage location from src to dist and then remove file name...\n // replace src to dist\n var fileDistination = path.replace(\"src\", 'build');\n\n var arrayOfString = null;\n if (fileDistination.split('/').length > 1) {\n arrayOfString = file...
[ "0.6295365", "0.60187155", "0.599522", "0.59840345", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.5943583", "0.58910114", "0.5844075", "0.5820395", "0.5757948", "0.5718429", "0.5716286", "0.5716286", ...
0.7274229
0
Safely install SIGINT listener. NOTE: this will only work on OSX and Linux.
function _safely_install_sigint_listener() { const listeners = process.listeners(SIGINT); const existingListeners = []; for (let i = 0, length = listeners.length; i < length; i++) { const lstnr = listeners[i]; /* istanbul ignore else */ if (lstnr.name === '_tmp$sigint_listener') { existingListe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _safely_install_exit_listener() {\n const listeners = process.listeners(EXIT);\n\n // collect any existing listeners\n const existingListeners = [];\n for (let i = 0, length = listeners.length; i < length; i++) {\n const lstnr = listeners[i];\n /* istanbul ignore else */\n // TODO: remove sup...
[ "0.63893837", "0.63893837", "0.63893837", "0.6122612", "0.56996536", "0.55251193", "0.54202116", "0.53922254", "0.5308321", "0.51024884", "0.5054934", "0.50520366", "0.5010454", "0.4945995", "0.49370024", "0.49146935", "0.49146935", "0.49146935", "0.48627278", "0.47932336", "...
0.8568933
1
Safely install process exit listener.
function _safely_install_exit_listener() { const listeners = process.listeners(EXIT); // collect any existing listeners const existingListeners = []; for (let i = 0, length = listeners.length; i < length; i++) { const lstnr = listeners[i]; /* istanbul ignore else */ // TODO: remove support for lega...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processExitHook(fn) {\n // @ts-ignore\n process.on('exit', fn);\n return () => {\n // @ts-ignore\n process.off('exit', fn);\n };\n}", "function closeOnProcessTermination() {\n if (cleanup_registered) {\n return;\n }\n cleanup_registered = true;\n process.on(\"exit\", fun...
[ "0.70880204", "0.67594063", "0.6645926", "0.6645926", "0.6645926", "0.6452931", "0.6429289", "0.6424378", "0.64212996", "0.62728643", "0.6268008", "0.6252061", "0.62461627", "0.62419105", "0.61981016", "0.617573", "0.6158105", "0.6136743", "0.6108952", "0.6099592", "0.6071705...
0.8298891
1
Returns the module that should be used to resolve require calls. It's usually the direct parent, except if we're inside an eval expression.
function getIssuerModule(parent) { let issuer = parent; while (issuer && (issuer.id === '[eval]' || issuer.id === '<repl>' || !issuer.filename)) issuer = issuer.parent; return issuer || null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getModulePathBasedOnParentModule(module) {\n const modulePath = module.indexOf('/') >= 0 || module.indexOf(path.sep) >= 0 ? path.join(path.dirname(getStack()[3].getFileName()), module) : module;\n return require.resolve(modulePath);\n}", "function getClosestCallerPackage() {\n var previousP...
[ "0.67638904", "0.624222", "0.6224012", "0.617922", "0.60145724", "0.5898912", "0.5898912", "0.5898912", "0.5898912", "0.5898912", "0.5831599", "0.57172996", "0.5687424", "0.5613331", "0.5599545", "0.5588376", "0.5553753", "0.55314046", "0.5501705", "0.5490252", "0.5446064", ...
0.65372574
1
Returns whether the specified locator is a dependency tree root (in which case it's part of the project) or not
function isDependencyTreeRoot(packageLocator) { if (packageLocator.name === null) return true; for (const dependencyTreeRoot of runtimeState.dependencyTreeRoots) if (dependencyTreeRoot.name === packageLocator.name && dependencyTreeRoot.reference === packageLocator.reference) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isRootFound() {\n return Boolean(this.config.root);\n }", "isRoot () {\r\n return this.parent === null\r\n }", "isRoot() {\nreturn this.parent === null;\n}", "isAtRootLevel() {\n return this.namespaceAndFunctionDepth === 0;\n }", "get isRoot() {\r\n return !this.parent;\r\n ...
[ "0.62153554", "0.60057", "0.57572395", "0.56010246", "0.54810584", "0.54521185", "0.5407273", "0.5397811", "0.53312737", "0.5272965", "0.52413565", "0.52413565", "0.51575935", "0.5139821", "0.5122858", "0.510603", "0.5064659", "0.5064659", "0.5064659", "0.5055045", "0.5055045...
0.80848247
0
Implements the node resolution for folder access and extension selection
function applyNodeExtensionResolution(unqualifiedPath, candidates, { extensions }) { // We use this "infinite while" so that we can restart the process as long as we hit package folders while (true) { let stat; try { candidates.push(unqualifiedPath); stat = opts.fakeFs.statSyn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lookup(connection, path, callback) {\n\tpath = paths.resolve(path);\n\tvar comps = paths.resolve(path).split('/');\n\twhile (comps[0] === '') comps.shift();\n\tvar currentNode = fileTree[\"/\"];\n\twhile (currentName = comps.shift()) {\n\t\tcurrentNode = currentNode.children[currentName];\n\t}\n\tconsole....
[ "0.6080341", "0.556997", "0.5475768", "0.53425395", "0.5327444", "0.52797383", "0.5182903", "0.51507294", "0.51165503", "0.51155084", "0.50772405", "0.50749105", "0.50620586", "0.5046822", "0.50042176", "0.49674863", "0.49645898", "0.49593568", "0.49524307", "0.49196836", "0....
0.5662524
1
This function creates fake modules that can be used with the _resolveFilename function. Ideally it would be nice to be able to avoid this, since it causes useless allocations and cannot be cached efficiently (we recompute the nodeModulePaths every time). Fortunately, this should only affect the fallback, and there hope...
function makeFakeModule(path) { // @ts-ignore const fakeModule = new module_1.Module(path, null); fakeModule.filename = path; fakeModule.paths = module_1.Module._nodeModulePaths(path); return fakeModule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_parseFile(requireName, filepath, cache, ifStoreSrc, fakeCode, coreModules) {\n let code, e;\n if (filepath in cache) { return cache[filepath]; }\n const isCore = (coreModules && (Array.from(coreModules).includes(requireName))) || !/[\\\\\\/]/.test(filepath);\n const isBinary = /\\.node...
[ "0.58937085", "0.5865473", "0.58628374", "0.56264573", "0.5525722", "0.5471305", "0.5442517", "0.5435531", "0.54081815", "0.5400361", "0.53341573", "0.5333859", "0.527817", "0.5271447", "0.52683705", "0.5255995", "0.5166523", "0.5164793", "0.51493305", "0.5101136", "0.5098594...
0.64787906
0
Gets the package information for a given locator. Returns null if they cannot be retrieved.
function getPackageInformation({ name, reference }) { const packageInformationStore = packageRegistry.get(name); if (!packageInformationStore) return null; const packageInformation = packageInformationStore.get(reference); if (!packageInformation) return null; return packageInformation; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPackageInformationSafe(packageLocator) {\n const packageInformation = getPackageInformation(packageLocator);\n\n if (!packageInformation) {\n throw internalTools_1.makeError(internalTools_1.ErrorCode.INTERNAL, `Couldn't find a matching entry in the dependency tree for the specified parent (t...
[ "0.6680652", "0.5774907", "0.55395955", "0.5332345", "0.52467936", "0.5244462", "0.51530325", "0.5129942", "0.5068427", "0.5026873", "0.49676764", "0.49477983", "0.4901498", "0.48812282", "0.48629504", "0.4843949", "0.48412132", "0.47876814", "0.47830856", "0.47391188", "0.47...
0.64161927
1
Finds the package locator that owns the specified path. If none is found, returns null instead.
function findPackageLocator(location) { let relativeLocation = normalizePath(fslib_2.ppath.relative(runtimeState.basePath, location)); if (!relativeLocation.match(isStrictRegExp)) relativeLocation = `./${relativeLocation}`; if (location.match(isDirRegExp) && !relativeLocation.endsWith(`/`)) relativeLocation...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_path(path) {\n gdir.forEach(it =>{\n if (it.path == path) return it;\n })\n}", "function findItemByPath(path) {\n var trimmedPath = path.trim();\n var elementsInPath = trimmedPath.split(\"/\");\n if (elementsInPath[elementsInPath.length - 1] == \"\") {\n element...
[ "0.58231413", "0.57042235", "0.5650306", "0.54149866", "0.53309053", "0.53309053", "0.53309053", "0.53309053", "0.53309053", "0.53309053", "0.53309053", "0.5305311", "0.530256", "0.5291209", "0.5241018", "0.5199438", "0.51871467", "0.51568604", "0.5152209", "0.51396656", "0.5...
0.6079169
0
Transforms a request (what's typically passed as argument to the require function) into an unqualified path. This path is called "unqualified" because it only changes the package name to the package location on the disk, which means that the end result still cannot be directly accessed (for example, it doesn't try to r...
function resolveToUnqualified(request, issuer, { considerBuiltins = true } = {}) { // The 'pnpapi' request is reserved and will always return the path to the PnP file, from everywhere if (request === `pnpapi`) return fslib_1.npath.toPortablePath(opts.pnpapiResolution); // Bailout if the request is a nativ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveRequest(request, issuer, {\n considerBuiltins,\n extensions\n } = {}) {\n let unqualifiedPath = resolveToUnqualified(request, issuer, {\n considerBuiltins\n });\n if (unqualifiedPath === null) return null;\n\n try {\n return resolveUnqualified(unqualifiedPath, {\n ...
[ "0.74767786", "0.6921143", "0.61834335", "0.50212824", "0.49842942", "0.4914553", "0.4887507", "0.48487443", "0.4841634", "0.48402143", "0.48060176", "0.48037374", "0.48037374", "0.48037374", "0.47963494", "0.4788932", "0.47824246", "0.47800478", "0.4770285", "0.4770285", "0....
0.7770594
0
Transforms a request into a fully qualified path. Note that it is extremely important that the `issuer` path ends with a forward slash if the issuer is to be treated as a folder (ie. "/tmp/foo/" rather than "/tmp/foo" if "foo" is a directory). Otherwise relative imports won't be computed correctly (they'll get resolved...
function resolveRequest(request, issuer, { considerBuiltins, extensions } = {}) { let unqualifiedPath = resolveToUnqualified(request, issuer, { considerBuiltins }); if (unqualifiedPath === null) return null; try { return resolveUnqualified(unqualifiedPath, { extensions ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveToUnqualified(request, issuer, {\n considerBuiltins = true\n } = {}) {\n // The 'pnpapi' request is reserved and will always return the path to the PnP file, from everywhere\n if (request === `pnpapi`) return fslib_1.npath.toPortablePath(opts.pnpapiResolution); // Bailout if the request i...
[ "0.6411281", "0.60117346", "0.53424734", "0.5249714", "0.5149162", "0.514148", "0.5123657", "0.5122436", "0.51074106", "0.508281", "0.50661254", "0.50661254", "0.50661254", "0.50661254", "0.5064614", "0.5064614", "0.5064614", "0.4950953", "0.49289432", "0.48961195", "0.488302...
0.66162086
0
in sourceNodes, we set metadata to an array of metadata node IDs. this will "hydrate" those IDs in the entire node
resolve(source, args, context) { return context.nodeModel.getNodesByIds({ ids: source.metadata, type: 'Metadata' }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setNodeMetadata(id, metadata) {\n let node = this.getNode(id);\n if (!node) { return; }\n\n this.checkTransactionStart();\n\n let before = clone(node.metadata);\n if (!node.metadata) { node.metadata = {}; }\n\n for (let item in metadata) {\n let val = metadata[item];\n if (val != null) ...
[ "0.64446175", "0.5222467", "0.5216902", "0.52079844", "0.51364756", "0.51249194", "0.5114072", "0.5111053", "0.50996894", "0.5088874", "0.5073193", "0.5052412", "0.5028524", "0.50104994", "0.50079274", "0.50079274", "0.50079274", "0.50079274", "0.5007456", "0.49357128", "0.49...
0.6876943
0
Init HyperMD Click addon. Where `this` is the editor instance. Note: if you need a "back" button before a footnote, please add "HyperMDgoback" into "gutters" option when init editor.
function init() { var cm = this if (!cm.hmd) cm.hmd = {} /** @type {HTMLDivElement} lineDiv */ var lineDiv = cm.display.lineDiv var hasBackButton = cm.options.gutters.indexOf("HyperMD-goback") != -1 if (hasBackButton) { var bookmark // where the footref is. designed for "back" button ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n this.editor.style.width = this.width;\n this.editor.style.height = this.height;\n this.bar.setupToolbar();\n\n this.createTag(\"\", this.getActiveTags(), this.getActiveStyle());\n\n let tools = document.querySelectorAll(\".editor-button\");\n tools.forEach(t => ...
[ "0.57962596", "0.5751021", "0.5568002", "0.550168", "0.547761", "0.54383683", "0.5413375", "0.5403583", "0.53858054", "0.53500634", "0.5344412", "0.5335226", "0.5302043", "0.5266318", "0.5258337", "0.513918", "0.5120122", "0.51178473", "0.5107567", "0.50996614", "0.50825745",...
0.68445736
0
Callback para el Origen y Destino. Recibe el array de predicciones, el status del request, el ID del input y el listview Genera el listado desplegable con las sugerencias del autocomplete
function callbackAutocomplete(predictions, status, id, listview) { if (status !== google.maps.places.PlacesServiceStatus.OK) { console.log(status); return; } var direccion, html = '', li = "<li class='prediccion' data-direccion='DIR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cobUsuarEtapaCobraDetalPostQueryActions(datos){\n\t//Primer comprovamos que hay datos. Si no hay datos lo indicamos, ocultamos las capas,\n\t//que estubiesen visibles, las minimizamos y finalizamos\n\tif(datos.length == 0){\n\t\tdocument.body.style.cursor='default';\n\t\tvisibilidad('cobUsuarEtapaCobraDe...
[ "0.5850621", "0.58448637", "0.5780805", "0.5710187", "0.56945217", "0.556529", "0.55564445", "0.55553603", "0.54877156", "0.5469543", "0.54288536", "0.5395048", "0.5363893", "0.53637475", "0.5343076", "0.5319482", "0.5307681", "0.530494", "0.53016317", "0.5294605", "0.5277169...
0.63076884
0
to send authentification status to parent
sendAuthStatusToParent() { this.props.parentCallback(this.state.authStatusToBe); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onAuthenticated(data) {\n this.status = STATUS_AUTHENTICATED;\n }", "authByToken() {\n const retrievedToken = localStorage.getItem('ourTreeToken');\n if (retrievedToken) {\n console.log('ret token: ' + retrievedToken);\n const data = { token: retrievedToken };\n ...
[ "0.69981885", "0.6582093", "0.6496227", "0.63167673", "0.62663347", "0.62018365", "0.6095813", "0.6040521", "0.6000099", "0.5994386", "0.5974113", "0.5960914", "0.59507143", "0.59333396", "0.5889582", "0.5866307", "0.5854105", "0.5835416", "0.5798756", "0.5789989", "0.5786983...
0.80206853
0
Choose theme depending n number
async function pickTheme() { await getNumbers(); if(count == 1){ document.body.style.backgroundImage =" url('image/coal.jpg')"; } else if (count==2){ document.body.style.backgroundImage =" url('image/0000.jpg')"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeTheme() {\n\n let y = selectTheme.selectedIndex;\n let themeChoice = document.getElementsByTagName(\"option\")[y].value;\n \n if (themeChoice == \"light\"){\n document.body.style.backgroundColor = \"#457B9D\";\n const itemsOdd = document.querySelectorAll('li:nth-child(2n +...
[ "0.6433015", "0.63531876", "0.62538564", "0.60670495", "0.60052204", "0.59085226", "0.5892465", "0.5819267", "0.574476", "0.56487423", "0.56275284", "0.5614636", "0.56073415", "0.5605145", "0.5604308", "0.5548561", "0.5513896", "0.5509686", "0.5505452", "0.54917294", "0.54887...
0.651821
0
if we are in the index.html page render all notes
function indexRenderNotes() { if($('body').is('.index')){ renderNotes(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderNotes() {\r\n for (var i = 0; i < notesListLS.length; i++) {\r\n createMarkup(i);\r\n }\r\n}", "function renderNotes() {\n noteArray = JSON.parse(localStorage.getItem(\"dayNotes\")) || [];\n $(noteArray).each(function () {\n $(\"#\" + this.id).find(\"textarea\").text(this.note)\n...
[ "0.7076621", "0.68125975", "0.67386", "0.6488869", "0.6484373", "0.63533574", "0.6344512", "0.62699336", "0.62678725", "0.625863", "0.62551516", "0.62478274", "0.6209081", "0.6188429", "0.6164548", "0.61630476", "0.6150247", "0.6143212", "0.6139809", "0.6129673", "0.6112684",...
0.775673
0
On load create a deck variable to use to use stack functions initalize hands and find the score box in the document
function init() { deck = new Stack(); dealerHand = new Hand("dealer") playerHand = new Hand("player"); playerScoreText =document.getElementById("playerScore"); dealerScoreText = document.getElementById("dealerScore"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeDeck() {\n \t\t// Create all the cards\n \t\t// Spades Suite\n \t\t// Ace of Spades\n \t\tvar card1 = new Card();\n \t\tcard1.newCard(\"S\", 1, \"SA\");\n \t\t// 2 of Spades\n \t\tvar card2 = new Card();\n \t\tcard2.newCard(\"S\", 2, \"S2\");\n \t\t// 3 of Spades\n \t\tvar card3 = new Card();\n \t\tcard3...
[ "0.72229576", "0.7208043", "0.715958", "0.6809371", "0.6741887", "0.6724877", "0.6724877", "0.6630668", "0.6594987", "0.6584153", "0.6496106", "0.6444271", "0.6437301", "0.64268607", "0.6404641", "0.64022887", "0.6398717", "0.6382392", "0.63809687", "0.6375092", "0.6368633", ...
0.75729835
0
Start Round function, where I reset hands and the round is dealt also load in the jquery draggable
function StartRound() { dealerHand.reset(); playerHand.reset(); //Index for dealing cards in order dealRound=1; //Deak round after start round DealRound(); //initalizing the jqery ui plugins after i create the draggable images th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startNewRound() {\n userObject.round = currentRound;\n userObject.currentSelection = \"\";\n databaseModify.update();\n userScreen.choose();\n }", "function startNewRound(r) {\n $('#actionButton').text(\"NEXT ROUND >>\");\n isReady = false;\n}", "function startRound() {\n handoutCard...
[ "0.66571957", "0.6568221", "0.65481573", "0.6520004", "0.6480405", "0.63514596", "0.634187", "0.63292223", "0.6260884", "0.6213754", "0.6188922", "0.6147663", "0.6129381", "0.6091396", "0.60820466", "0.60713667", "0.60636914", "0.6003496", "0.6001186", "0.5984315", "0.5965479...
0.69642603
0
The deal round, uses a switch statement to give card from player to dealer in order
function DealRound() { while(dealerHand.cards.length<1) { switch(dealRound) { case 1: playerHand.add(getHand()); break; case 2: dealerHand.add(getHand()); break; default: return; break...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dealCards() {\n dealToPlayer();\n dealToDealer();\n dealToPlayer();\n dealToDealer();\n}", "deal () {\n for (let i = 0; i < 2; i++) {\n this.dealPlayerCard();\n this.playerCardReveal();\n $(\".player-card-back\").attr(\"class\", \"card\");\n };\...
[ "0.71247816", "0.7098417", "0.6882111", "0.6863416", "0.68400407", "0.68151754", "0.6808425", "0.680445", "0.67870003", "0.6729358", "0.67160416", "0.6707766", "0.6703027", "0.6699108", "0.6676616", "0.6661482", "0.6650156", "0.66327226", "0.66144264", "0.65893954", "0.654816...
0.7884673
0
Wrapper method to activate/show QR scan modal
onQRPress() { this.showModal('qr'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showQRCamera() {\n if (this.isPushing)\n return;\n\n this.isPushing = true;\n this.navigator.push('qrScan', {_parent: this});\n setTimeout(() => {\n this.isPushing = false;\n }, 2000);\n\n // set parent's modal style\n if (this.props.parent && this.props.parent.setModalStyle)\n ...
[ "0.71518", "0.67753047", "0.6725049", "0.6587795", "0.65274906", "0.6475806", "0.6424859", "0.63922375", "0.63774073", "0.6319239", "0.6137671", "0.61282897", "0.6065323", "0.60239506", "0.6022942", "0.5971316", "0.593545", "0.58074087", "0.58020455", "0.57928765", "0.5758366...
0.772712
0
Returns the last value pushed on the stack, null if the stack is empty. This does not pop the value from the stack.
lastValue() { if(this.stack.length == 0) { return null } return this.stack[this.stack.length - 1] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pop() {\n if (stack_top === -1) {\n console.log('Stack is Empty');\n return null;\n }\n var topValue = stack_arr[stack_top--];\n stack_size--;\n return topValue;\n }", "getValue() {\n return getLast(this.stack);\n }", "getValue() {\n\t\tr...
[ "0.7799987", "0.7676241", "0.7618738", "0.74170583", "0.7356036", "0.7326927", "0.7280365", "0.7277459", "0.7277459", "0.72772497", "0.72643554", "0.71847916", "0.7163959", "0.7144676", "0.69837606", "0.69817984", "0.6961888", "0.6939173", "0.6936117", "0.690361", "0.69002724...
0.8599515
0
Traverses all focusable elements for the next element to focus. curentElement is where the traversal starts. reverse determines whether to traverse backwards or forwards. updateNextCandidate is a method that determines if the element is the best candidate to be focused next. A boolean is returned to stop the traversal ...
function eachTabIndexedElement(currentElement, reverse, updateNextCandidate, container) { const elements = (container || document).querySelectorAll('a, input, button, [tabindex]'); let index = Array.from(elements).indexOf(currentElement); const increment = reverse ? -1 : 1; for (let i = 1; i < elements.length;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processTab(container, elt, goReverse) {\n var $focussable = getFocusableElementsInContainer(container),\n curElt = elt,\n index, nextIndex, prevIndex, lastIndex;\n\n do {\n\n index = $focussable.index(curElt);\n nextIndex = index + 1;\n ...
[ "0.60578716", "0.5455353", "0.5455353", "0.5455353", "0.5455353", "0.5452158", "0.5452158", "0.5431033", "0.5413098", "0.52158064", "0.50919086", "0.50371724", "0.4988741", "0.49700287", "0.49309513", "0.49215797", "0.4838496", "0.481003", "0.47820857", "0.4778929", "0.477241...
0.6553716
0
Finds a parent of currentElement that satisfies the condition.
function findParentElement(currentElement, condition) { let element = currentElement; while (element && !condition(element)) { element = element.parentElement; } return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findParent( element, parentTag ) {\n while ( element.parentNode ) {\n element = element.parentNode;\n if ( element.tagName == parentTag ) {\n return element;\n }\n }\n return null;\n }", "function findParent(el0, predicate) {\n if (!el0) return null;\n ...
[ "0.6882536", "0.68497235", "0.6768699", "0.6768699", "0.66567117", "0.6492042", "0.6492042", "0.6492042", "0.6492042", "0.6492042", "0.6461884", "0.6461884", "0.6461884", "0.6461884", "0.64471066", "0.6429438", "0.6396923", "0.632428", "0.6322886", "0.6306571", "0.628164", ...
0.74765354
0