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
Builds the train ul
function trainItem(train, inc) { var output = "", nextStop = train.nextstop, late = train.late; output += "<ul class='train'>"; output += "<li class='stop-info'><a target='_blank' href='"+ getStationStopLink(nextStop) + "'><h4>Next Stop <stromg>" + reformatDestination(nextStop, 'pretty') + "</h4></a></li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildList(){\n var medOut = '';\n var researchOut = '';\n var academicOut = '';\n var athleticOut = '';\n var adminOut = '';\n \n for(i = 0; i < data.features.length; i++){\n var object = data.features[i];\n var button = '<button class=\"list-group-item building-b...
[ "0.6540097", "0.60070956", "0.58655155", "0.58084035", "0.5714165", "0.57133085", "0.5695271", "0.5691984", "0.5690422", "0.5684453", "0.56183034", "0.5591944", "0.55885184", "0.5580917", "0.5558074", "0.55473113", "0.5546638", "0.5534987", "0.55247456", "0.55170715", "0.5516...
0.6718966
0
Get next station stop information link
function getStationStopLink($stop) { var nextStop = $stop; var url = reformatDestination(nextStop, 'pretty').replace(/ /g,'').toLowerCase(); return septaStationUrl + url + '.html'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNextTrains(direction,stop_id,stationClicked) { \n var nextThree; \n if (direction == 'south') {\n var stop_headsign = 'Century%20Park';\n } else {\n var stop_headsign = 'Clareview';\n }\n var etsUrl = 'https://data.edmonton.ca/resource/xeux-ngrz.json?$query=SELECT%20arrival_ti...
[ "0.6118894", "0.58213276", "0.56603324", "0.5545626", "0.5530069", "0.5515678", "0.5515678", "0.5509671", "0.54978436", "0.546551", "0.5444175", "0.54073995", "0.53629893", "0.53111726", "0.5234484", "0.5224932", "0.52247787", "0.51943195", "0.51859295", "0.51699716", "0.5144...
0.73961586
0
Change dot opacity with random value.
function changeDotOpacity(dotNum) { let randomNum = Math.floor(Math.random() * 5); let opacValue = "0." + randomNum; document.querySelector(dotNum).style.opacity = opacValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shiftOpacity() {\n\t\tconst shift = (Math.random() - 0.5) * this.opacityVar;\n\t\tthis.opacity = shift;\n\t}", "function dotInterval() {\n const dotsArray = [\n \".dot-one\",\n \".dot-two\",\n \".dot-three\",\n \".dot-four\",\n \".dot-five\",\n ];\n let randomDot = Math.floor(Ma...
[ "0.7461718", "0.7331111", "0.6881876", "0.68171734", "0.6710612", "0.67000216", "0.66182345", "0.6501774", "0.64696676", "0.6399037", "0.63958985", "0.63394064", "0.6337362", "0.6324", "0.6268513", "0.6244415", "0.6211464", "0.6200528", "0.6199047", "0.6197939", "0.618306", ...
0.8304715
0
Creates an identity source map from JS script content. Can offset original line/column data for inline script elements.
function createJsIdentitySourcemap(sourceUrl, sourceContent, lineOffset, firstLineCharOffset) { const generator = new source_map_1.SourceMapGenerator(); const tokens = espree.tokenize(sourceContent, { loc: true, ecmaVersion: 2017, sourceType: 'module' }); tokens.forEach(token => { if (!token.loc) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_js_to_church_site_map(src_map) {\n\tvar site_map = {};\n\tvar smc = new source_map.SourceMapConsumer(JSON.parse(JSON.stringify(src_map)));\n\tsmc.eachMapping(function(m) {\n // Some of the mappings map to undefined locations for some reason, ignore those\n if (m.o...
[ "0.62981534", "0.5806745", "0.57655495", "0.5764704", "0.5675948", "0.56057286", "0.55667496", "0.55068165", "0.5446022", "0.53688174", "0.5340693", "0.533479", "0.5224427", "0.5187821", "0.5171294", "0.51614237", "0.51406544", "0.5109008", "0.5047596", "0.50084984", "0.50018...
0.72084916
0
Update mappings in source maps within inline script elements to reflect their absolute position within a bundle. Assumes existing mappings are relative to their position within the script tag itself.
function updateSourcemapLocations(document, ast) { // We need to serialize and reparse the dom for updated location information const documentContents = parse5.serialize(ast); ast = astUtils.parse(documentContents, { locationInfo: true }); const reparsedDoc = new polymer_analyzer_1.ParsedHtmlDocument({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addOrUpdateSourcemapsForInlineScripts(originalDoc, reparsedDoc, oldBaseUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n const inlineScripts = dom5.queryAll(reparsedDoc.ast, matchers.inlineNonModuleScript);\n const promises = inlineScripts.map((scriptAst) => {\n ...
[ "0.66316867", "0.5773838", "0.5615261", "0.53327644", "0.5313287", "0.5301171", "0.52829236", "0.524471", "0.52124447", "0.5157775", "0.5149177", "0.5104491", "0.509862", "0.50944763", "0.5092318", "0.50781405", "0.4989717", "0.49812838", "0.49786296", "0.49535853", "0.495158...
0.68117666
0
Imports a task definition from the specified task definition ARN.
static fromEc2TaskDefinitionArn(scope, id, ec2TaskDefinitionArn) { return new _imported_task_definition_1.ImportedTaskDefinition(scope, id, { taskDefinitionArn: ec2TaskDefinitionArn, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromEc2TaskDefinitionAttributes(scope, id, attrs) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_Ec2TaskDefinitionAttributes(attrs);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Err...
[ "0.6166086", "0.52764624", "0.5173077", "0.5098908", "0.495951", "0.4900793", "0.48026252", "0.4740554", "0.45903555", "0.45838898", "0.45807573", "0.4545126", "0.44963372", "0.4487972", "0.44743174", "0.44115776", "0.43943253", "0.4309681", "0.4282628", "0.42802396", "0.4279...
0.7394054
0
Imports an existing Ec2 task definition from its attributes
static fromEc2TaskDefinitionAttributes(scope, id, attrs) { try { jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_Ec2TaskDefinitionAttributes(attrs); } catch (error) { if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") { Error.captureStack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromEc2TaskDefinitionArn(scope, id, ec2TaskDefinitionArn) {\n return new _imported_task_definition_1.ImportedTaskDefinition(scope, id, {\n taskDefinitionArn: ec2TaskDefinitionArn,\n });\n }", "function ImportInstanceTaskDetails() {\n _classCallCheck(this, ImportInstanceTaskD...
[ "0.6314849", "0.5961798", "0.5835098", "0.57857853", "0.5608352", "0.5505799", "0.53809154", "0.52938884", "0.5269186", "0.5265105", "0.524648", "0.5194213", "0.5183878", "0.5183071", "0.5177272", "0.5163755", "0.5106913", "0.509775", "0.5066987", "0.5027108", "0.4984526", ...
0.7519302
0
Constructs a new instance of the Ec2TaskDefinition class.
constructor(scope, id, props = {}) { super(scope, id, { ...props, compatibility: task_definition_1.Compatibility.EC2, placementConstraints: props.placementConstraints, ipcMode: props.ipcMode, pidMode: props.pidMode, inferenceAccelerators: p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromEc2TaskDefinitionAttributes(scope, id, attrs) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_Ec2TaskDefinitionAttributes(attrs);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Err...
[ "0.6852065", "0.67504734", "0.5967168", "0.58984387", "0.58882225", "0.5779317", "0.5730579", "0.55452865", "0.55257016", "0.5523477", "0.5411355", "0.5405018", "0.53235567", "0.52859837", "0.52797115", "0.5244942", "0.51774824", "0.51704", "0.51507336", "0.5141995", "0.51313...
0.7186842
0
Cancel the pairing/discovery process.
cancelPairing() { if(this.discover) { this.discover.stop(); this.discover.removeAllListeners(); this.discover = undefined; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancelPairing() {\n this.deviceDiscovery.destroy();\n }", "terminate() {\n this.discovery.cancel(Cr.NS_BINDING_ABORTED)\n }", "cancel() {\n cancel();\n }", "cancel() {\n\n if (this.requestRunning === false) return;\n\n this.requestRunning = false;\n\n ...
[ "0.81880945", "0.65272343", "0.64572394", "0.634796", "0.63133407", "0.6268617", "0.62660295", "0.6136253", "0.61244494", "0.60610354", "0.60088456", "0.6007378", "0.60066617", "0.60020536", "0.59888643", "0.59779763", "0.5966417", "0.5959632", "0.59124947", "0.5877919", "0.5...
0.799032
1
object that provides methods for the modal visibility handling
function handler() { return { show: show, close: close, isHidden: isHidden }; // shows the modal function show() { scope[ngHideBinder] = false; } // hides the modal function close() { scope[ngHideBinder] = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show() {\n $$invalidate('modalIsVisible', modalIsVisible = true);\n }", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\t\t//show spinner dialogue\n\t\t\t//render o.template into o.target here\n\t\t}\n\t\t*/\n\t\tsaveTabindex();\n\t\ttdc.Grd.Modal.isVisible=true;\n\t}", "handleVisibi...
[ "0.68864596", "0.68467575", "0.67915714", "0.6706975", "0.6689656", "0.66745555", "0.66698635", "0.6667651", "0.66652477", "0.66477835", "0.66318667", "0.66318667", "0.6626791", "0.6624287", "0.66044515", "0.6589483", "0.6560597", "0.65496063", "0.6488647", "0.6486018", "0.64...
0.69142216
0
Retrieves an information about the views from the directive child elements and their attrs.
function readViews(childElements) { return Array.from(childElements).reduce(function (views, viewItem) { if (viewItem.localName === 'view-item') { views.push( ['name', 'url', 'root', 'parent'].reduce(function(view, attrName) { var attribute = viewItem.attribut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get views() {\n\t\treturn this.nativeElement ? this.nativeElement.views : undefined;\n\t}", "get childViews() {\n const childViews = [];\n let child = this.childHead;\n while (child) {\n childViews.push(child);\n child = child.next;\n }\n return childViews...
[ "0.6304204", "0.59880126", "0.59880126", "0.59880126", "0.59880126", "0.59880126", "0.59880126", "0.59599614", "0.593406", "0.58709913", "0.58709913", "0.58709913", "0.58709913", "0.58709913", "0.56986517", "0.56262517", "0.56203073", "0.5616402", "0.5467545", "0.54412264", "...
0.7070328
0
sets view with an appropriate name as active.
function activateView(name) { scope[views].forEach(function (view) { if (view.name === name) view.isActive = true; else delete view.isActive; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setActiveView(view) {\n app.activeView = view;\n }", "function setActiveView(items) {\n\n for (var index = 0; index < items.length; index++) {\n\n var item = items[index];\n\n if (item.active && item.view) {\n scope.activeView = item;\n ...
[ "0.7818288", "0.6936442", "0.6778803", "0.6636089", "0.6470941", "0.6442866", "0.63628125", "0.6318019", "0.6314949", "0.62780464", "0.6241013", "0.6239375", "0.6235251", "0.61942905", "0.6150977", "0.6075732", "0.59623003", "0.5956187", "0.5954736", "0.5949074", "0.5932701",...
0.791264
0
Gets this if statement's then statement.
getThenStatement() { return this._getNodeFromCompilerNode(this.compilerNode.thenStatement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getThen(value) {\n var t = typeof value;\n if (value && (t === 'object' || t === 'function')) {\n var then = value.then;\n if (typeof then === 'function') {\n return then;\n }\n }\n return null;\n }", "getElseStatement() {\r\n return this._getNodeFromCompilerNod...
[ "0.6548419", "0.5964521", "0.53629076", "0.5303576", "0.515937", "0.50670856", "0.5061958", "0.49933964", "0.49194828", "0.48329186", "0.48329186", "0.479196", "0.47868943", "0.47737327", "0.47513062", "0.47504377", "0.4747984", "0.47343552", "0.47343552", "0.47343552", "0.47...
0.792388
0
Gets this if statement's else statement.
getElseStatement() { return this._getNodeFromCompilerNodeIfExists(this.compilerNode.elseStatement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "else() {\n return this._elseNode(new Else());\n }", "elseIf(condition) {\n return this._elseNode(new If(condition));\n }", "addElse(elseBody) {\r\n\t\t\t\t\tif (this.isChain) {\r\n\t\t\t\t\t\tthis.elseBodyNode().addElse(elseBody);\r\n\t\t\t\t\t\tthis.locationData = mergeLocationData(this.lo...
[ "0.74262416", "0.69602555", "0.63035905", "0.6247468", "0.6239365", "0.62248194", "0.61068255", "0.6041376", "0.59672856", "0.59637815", "0.58596677", "0.5835072", "0.5723374", "0.57027715", "0.56816524", "0.5546761", "0.5541994", "0.5527947", "0.54650253", "0.54442954", "0.5...
0.8421741
0
Write a function laligatSequence(base, n) A number's laligat sum is the the sum of all the prime numbers less than or equal to that number. For example, the laligat sum of 10 is: 2 + 3 + 5 + 7 = 17 We can use the laligat sum to define a special sequence, called the laligat sequence. The laligat sequence of a number beg...
function laligatSequence(base, n){ var seq = []; while(seq.length < n) { seq.push(base); base = laligatSum(base); } return seq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function base(seqLength){\n let base = seqLength + 1;\n return base;\n}", "function geoSeq(sequence, n) {\n let a = sequence[0];\n let r = findGeoSeqConstant(sequence);\n return a * Math.pow(r, n - 1);\n}", "function powerSequence(base, length){\n var result = [];\n for(var i = 1; i <= length; i++){...
[ "0.6088873", "0.5708257", "0.55406725", "0.5498258", "0.5431171", "0.5378288", "0.53718215", "0.532906", "0.53113335", "0.5273135", "0.52487856", "0.5239617", "0.5182489", "0.515566", "0.5082686", "0.507946", "0.50699234", "0.5057517", "0.50470495", "0.5034995", "0.50268424",...
0.8490887
0
Return the definition of the media tab. See ckeditor/plugins/image/dialogs/image.js
function _eatlas_media_frame_ckeditor_create_media_tab() { // As defined in imageDialog function var IMAGE = 1, LINK = 2, PREVIEW = 4, CLEANUP = 8; var IMAGESTYLE_CLASS_PREFIX = 'img__view_mode__'; var IMAGEID_CLASS_PREFIX = 'img__fid__'; var onMediaStyleChange = function() { // This = input ele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trx_addons_show_media_manager(el) {\n\t\n\t\tTRX_ADDONS_STORAGE['media_id'] = jQuery(el).attr('id');\n\t\tTRX_ADDONS_STORAGE['media_link'][TRX_ADDONS_STORAGE['media_id']] = jQuery(el);\n\t\t// If the media frame already exists, reopen it.\n\t\tif ( TRX_ADDONS_STORAGE['media_frame'][TRX_ADDONS_STORAGE['med...
[ "0.61580044", "0.60757595", "0.5993555", "0.59674186", "0.5912809", "0.57521415", "0.5682077", "0.5681378", "0.5681167", "0.5672925", "0.5632758", "0.5625015", "0.56071657", "0.5574382", "0.5533191", "0.55259544", "0.54942906", "0.5490945", "0.5488402", "0.5463804", "0.541070...
0.75303334
0
element: CKEDITOR.dom.element The file ID is store in the class of the element: class="... img__fid__12 ...";
function _eatlas_media_frame_ckeditor_get_fid(element) { var classesStr = element.getAttribute('class'); var fidClassPrefix = 'img__fid__'; if (classesStr) { var classes = classesStr.split(" "); var _class = null; for (var i=0, len=classes.length; i<len; i++) { _class = classes[i]; if (_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementFileName (element) {\n // Get the name of the mp3 file\n var octave = element.closest('.octave-container');\n var octaveNumber = octave.id.match(/[0-9]$/);\n if (octaveNumber == null) {\n return null;\n }\n octaveNumber = octaveNumber[0];\n\n var fileName;\n for (v...
[ "0.57695746", "0.57313323", "0.5725926", "0.5627065", "0.5603946", "0.5562297", "0.5560259", "0.5542423", "0.5530651", "0.5489946", "0.5483544", "0.5467732", "0.54544723", "0.5414925", "0.5414611", "0.5414113", "0.5386471", "0.53797877", "0.53642994", "0.53642994", "0.5364245...
0.67983896
0
Initialise cloud data sync service for specified dataset.
function init(dataset_id, options, cb) { debug('[%s] init sync with options %j', dataset_id, options); datasets.init(dataset_id, options); //make sure we use the exported version here as the start function should be called only ONCE module.exports.api.start(function(err) { if (err) { return cb(err); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initDataSources() {\n vm.init = true;\n\n try {\n var type = REST_URI.TEIID_SERVICE;\n\n RepoRestService.getConnections(type).then(\n function (newDataSources) {\n RepoRestService.copy(newDataSources, vm.datasour...
[ "0.6027469", "0.5603395", "0.55067116", "0.5445674", "0.5412468", "0.5312253", "0.5292474", "0.5207184", "0.51984495", "0.51548094", "0.5148315", "0.5118667", "0.5107719", "0.5106469", "0.5046027", "0.5031785", "0.50248426", "0.50248104", "0.50045407", "0.49991533", "0.497428...
0.7110576
0
Stop cloud data sync for the specified dataset_id
function stop(dataset_id, cb) { if (!syncStarted) { return cb(); } debug('[%s] stop sync for dataset', dataset_id); syncStorage.updateManyDatasetClients({datasetId: dataset_id}, {stopped: true}, cb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopDataLoop() {\n clearInterval(this.intervalId);\n }", "function stopSync(_doodle)\n{\n _doodle.willSync = false;\n}", "function stopDMApp(data) {\n\n var DMAppId = data.DMAppId;\n\n // delete database\n return new Promise((resolve, reject) => {\n websocket.leaveRoom(DMAppId);\n ...
[ "0.64573246", "0.60816", "0.5847457", "0.577225", "0.5722007", "0.57216936", "0.57188016", "0.57147133", "0.5663241", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", "0.5658885", ...
0.87006557
0
Stop cloud data sync service for ALL datasets and reset. This should really only used by tests.
function stopAll(cb) { //sync is not started yet, but connect could be called already. In this case, just reset a few things if (!syncStarted) { interceptors.restore(); dataHandlers.restore(); hashProvider.restore(); mongoDbClient = null; redisClient = null; metricsClient = null; return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stop(dataset_id, cb) {\n if (!syncStarted) {\n return cb();\n }\n debug('[%s] stop sync for dataset', dataset_id);\n syncStorage.updateManyDatasetClients({datasetId: dataset_id}, {stopped: true}, cb);\n}", "static async stopServiceAll() {\n return await ForegroundServiceModule.stopServiceAll()...
[ "0.7082279", "0.6473784", "0.6464175", "0.6233845", "0.60782874", "0.60782874", "0.60671467", "0.6044491", "0.60274583", "0.6012865", "0.59752595", "0.5935896", "0.59256387", "0.5913543", "0.5913493", "0.5913493", "0.5913493", "0.5852241", "0.5843385", "0.5837742", "0.5808998...
0.71652037
0
Defines a handler function for deleting a collision from the collisions list. Should be called after the dataset is initialised.
function removeCollision(datasetId, params, cb) { debug('[%s] removeCollision'); dataHandlers.removeCollision(datasetId, params.hash, params.meta_data, cb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteHandler() {\n deleteItem($(this).data(\"id\"));\n} // end deleteHandler", "function DeleteShapeHandler(canvas, modeling) {\n this._canvas = canvas;\n this._modeling = modeling;\n}", "function DeleteShapeHandler(canvas, modeling) {\n this._canvas = canvas;\n this._modeling = modeling;\n}",...
[ "0.6216088", "0.6070334", "0.6070334", "0.6061235", "0.6036605", "0.5949527", "0.59275943", "0.5756607", "0.57369405", "0.5726159", "0.5726159", "0.5726159", "0.5726159", "0.5724549", "0.5677551", "0.566992", "0.566043", "0.563259", "0.55606955", "0.55203927", "0.5501712", ...
0.62393427
0
generate specified number of paragraphs of lorem ipsum
function generateLoremIpsum(numOfParagraphs) { for (let i = 0; i < numOfParagraphs; i++) { let myIpsum = ""; for (let j = 0; j < Math.floor((Math.random() * 100) + 40); j++) { let randomWord = icStrings[ Math.floor(Math.random() * icStrings.length)]; //capitalize first letter of paragrap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate() {\n return loremIpsum({\n count: 150 * FILE_SIZE,\n format: 'plain',\n units: 'words'\n });\n}", "function calcParagraphLength() {\n\treturn Math.ceil(Math.random() * 2);\n}", "function lorem (n) {\n return drawText ? JMVC.string.lorem(n) : '';\n }", "...
[ "0.71064776", "0.69991064", "0.68721116", "0.68290335", "0.67146003", "0.6614849", "0.6542659", "0.62315136", "0.61970454", "0.6192932", "0.6185604", "0.6178349", "0.6096476", "0.59719896", "0.59656644", "0.593815", "0.5937306", "0.58857965", "0.58847", "0.586917", "0.5865393...
0.76504064
0
Check user value is empty
static checkEmptyUserInput(userValue){ return (userValue==0 ? true : false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isValueEmpty(input) {\n return input ? true : false\n }", "function isEmpty(input){\r\n //console.log(input.val());\r\n if(input.val().length==0){\r\n return true;\r\n }\r\n return false;\r\n}", "function notEmpty(value){\n\t\treturn value && value != \"\";\n\t}", "function isEmpty() {\r\n\r...
[ "0.7637277", "0.738812", "0.72619826", "0.7251402", "0.72489035", "0.7234261", "0.72171575", "0.721667", "0.71979", "0.71786666", "0.716257", "0.7144596", "0.7140731", "0.71289927", "0.70757896", "0.70750165", "0.7074374", "0.70628196", "0.70548654", "0.70522666", "0.70469695...
0.7711221
0
Validating Account Number by checking empty input , numeric value and user value count digits
static checkAccountNumber(key, userValue){ var result = true; var msg = ''; // check account number is numeric var numeric = userValue.match(/^\d+$/); if (this.checkEmptyUserInput(userValue)) { result = false; // alert(key + ' cannot be empty'); msg = key + ' cannot be empty'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAcctValid(field, num) {\n return !isNaN($(field).val()) && ($(field).val().length == num || $(field).val() == \"\");\n }", "function isAcctGood(field, num) {\n return !isNaN($(field).val()) && $(field).val().length == num;\n }", "validateInput(value) {\n if (value.search(/...
[ "0.74030024", "0.7131773", "0.7092498", "0.6884558", "0.66659784", "0.663302", "0.66166407", "0.64774376", "0.6465584", "0.6459459", "0.6425068", "0.64196885", "0.64004403", "0.6382228", "0.6381326", "0.6372932", "0.63622767", "0.63603324", "0.6348985", "0.63465184", "0.63452...
0.7332314
1
Validating Mobile Number by checking empty input , numeric value and user value count digits
static checkMobileNumber(key, userValue){ var result = true; var msg = ''; // check mobile number is numeric var numeric = userValue.match(/^\d+$/); if (!numeric) { // alert(key + ' should be in numeric'); result = false; msg = key + ' should be in numeric'; } //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allnumeric_mobile(mobile, msgBox) {\n var num = /^[0-9]+$/;\n\n if (mobile.value.match(num) && (mobile.value.length == 10)) {\n document.getElementById(msgBox).innerHTML = '';\n return true;\n } else {\n document.getElementById(msgBox).innerHTML = '<font style=\"color: red;\"...
[ "0.77159995", "0.72882867", "0.7260965", "0.7203268", "0.715447", "0.71476245", "0.70350015", "0.7015778", "0.6991307", "0.69695604", "0.69635254", "0.69401145", "0.6936413", "0.6935762", "0.6904701", "0.6878623", "0.68542266", "0.6840425", "0.6805458", "0.6783757", "0.677365...
0.74724436
1
makeHtmlBoard: make HTML table and row of column tops
function makeHtmlBoard() { // make column tops (clickable area for adding a piece to that column) const headRow = document.createElement('tr'); headRow.setAttribute('id', 'head-row'); // 'column-top' === 'head-row'! headRow.addEventListener('click', handleClick); // eventListener and handleClick! for (let x = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeHtmlBoard() {\n let htmlBoard = document.querySelector(\"#board\");\n\n //set up and listen for clicks on top row\n let top = document.createElement(\"tr\");\n top.setAttribute(\"id\", \"column-top\");\n top.addEventListener(\"click\", handleClick);\n\n // adding id to top row for listening for ...
[ "0.7972831", "0.78590465", "0.78524494", "0.7839944", "0.7807046", "0.7751821", "0.77476656", "0.7747239", "0.7733777", "0.7656644", "0.7602741", "0.7591554", "0.75424385", "0.74704635", "0.7419354", "0.73972577", "0.730547", "0.7238427", "0.7136327", "0.7104964", "0.7056826"...
0.8038422
0
compare all the files generated by site.build against a set of known correct ones
function compareAllGeneratedFiles(folder) { const destPath = path.join("temp", folder); utils.ensureDirectoryExists("temp"); utils.ensureDirectoryExists(destPath); const srcPath = path.join(srcPrefix, folder); const compPath = path.join(compPrefix, folder); site.build(srcPath, destPath, function (uriPath)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function checkYMLs() {\n const knownYMLs = Object.assign({}, constants.COMPOSE_FILES);\n\n const updatableYMLs = Object.values(knownYMLs);\n\n const outdatedYMLs = [];\n\n for (const knownYMLFile of updatableYMLs) {\n try {\n const canonicalMd5 = md5Check.sync(constants.CANONICAL_YML_DIRECTORY.co...
[ "0.62294865", "0.61272866", "0.59096986", "0.5894648", "0.57074875", "0.5706694", "0.5670521", "0.566968", "0.5617557", "0.56000257", "0.55812514", "0.55647874", "0.5548703", "0.55326587", "0.55199045", "0.5519453", "0.5479267", "0.54597807", "0.54259926", "0.5413848", "0.539...
0.7367084
0
======== gpioInit ======== Initialize GPIO CS instance
function gpioInit() { return ({ comment: "%l /* SPI Flash Chip Select GPIO Instance */", mode: "Output", outputType: "Standard", outputState: "High" }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initIO() {\n // Make sure gpios 7 and 20 are available.\n b.pinMode('P9_42', b.INPUT);\n b.pinMode('P9_41', b.INPUT);\n \n // Initialize pwm\n}", "function onInit() {\n var spi = new SPI();\n spi.setup({ sck:B1, mosi:B10 });\n clearInterval();\n g = require(\"PCD8544\").connect(spi,B1...
[ "0.71885675", "0.65829104", "0.6550789", "0.64946634", "0.61826533", "0.61713487", "0.6121285", "0.59873384", "0.5847489", "0.5769913", "0.5714666", "0.5652101", "0.56244165", "0.5582731", "0.5558796", "0.5534194", "0.5534194", "0.5534194", "0.5534194", "0.5534194", "0.553419...
0.75417984
0
======== moduleInstances ======== returns a SPI CS GPIO instance
function moduleInstances(inst) { let modules = new Array(); /* Add GPIO instance if NVS driver asserts CS */ if (inst.spiCsManager == "NVS") { modules.push( { name: "spiCsnGpioInstance", displayName: "SPI Flash Chip Select GPIO Instance", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sharedModuleInstances(inst) {\r\n let sharedModules = new Array();\r\n\r\n /* Add SPI instance if NVS driver opens the SPI */\r\n if (inst.spiManager == \"NVS\") {\r\n sharedModules.push(\r\n {\r\n name: \"spiInstance\",\r\n displayName: \"SPI Flash...
[ "0.6976506", "0.6890841", "0.6384927", "0.62951875", "0.5485292", "0.5419998", "0.54162186", "0.54032695", "0.52705586", "0.51481396", "0.50585085", "0.5045936", "0.5011171", "0.49371576", "0.48993254", "0.48628697", "0.48516107", "0.47999415", "0.47764388", "0.47499123", "0....
0.79947215
0
======== sharedModuleInstances ======== returns a shared SPI instance
function sharedModuleInstances(inst) { let sharedModules = new Array(); /* Add SPI instance if NVS driver opens the SPI */ if (inst.spiManager == "NVS") { sharedModules.push( { name: "spiInstance", displayName: "SPI Flash SPI Instance", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moduleInstances(inst) {\r\n let modules = new Array();\r\n /* Add GPIO instance if NVS driver asserts CS */\r\n if (inst.spiCsManager == \"NVS\") {\r\n modules.push(\r\n {\r\n name: \"spiCsnGpioInstance\",\r\n displayName: \"SPI Flash Chip Select GP...
[ "0.68335867", "0.63089144", "0.628774", "0.6265029", "0.62546617", "0.609783", "0.59982723", "0.588829", "0.5886281", "0.5787057", "0.57500035", "0.5697894", "0.56939083", "0.5598909", "0.55448973", "0.54993534", "0.5475759", "0.54240906", "0.5396736", "0.53949255", "0.537451...
0.8425141
0
40 Ex 3 from Function Homework of Week 1 I changed the function name to 'loop' and changed the names of the parameters to 'start' and 'end.'
function loop (start, end) { for (var f = start; f <= end; f++) { console.log(f); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loop() {\r\n}", "function loop ( start, test, updt, body ) {\r\n let val = start;\r\n while (test(val)) {\r\n body (val)\r\n val = updt (val)\r\n } \r\n}", "loop() {}", "loop() {}", "function printNumbersWhile(start,finish) {\n while (start <= finish) {\n console.l...
[ "0.6798133", "0.63780636", "0.63618726", "0.63618726", "0.616673", "0.6150899", "0.6101143", "0.6075066", "0.60198826", "0.60115767", "0.5994781", "0.59744316", "0.5973502", "0.5954259", "0.5943758", "0.5885736", "0.58824605", "0.5870494", "0.58457315", "0.5838702", "0.581863...
0.7067641
0
If a Label control is assigned to the GroupElement and this Label control has a tooltip, use this tooltip. (As also the text of the given Label control is used.) Otherwise use the tooltip of the GroupElement
function _setTooltipToLabel(oLabel, oRelevantField) { if (oLabel == this._oSetLabel) { return; // don't change label set from outside } var sTooltip; if (this._oSetLabel && this._oSetLabel instanceof sap.ui.core.Control) { sTooltip = _getTooltipString.call(this._oSetLabel); } if (!sTooltip) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupGroupTooltips(groupElem) {\n $.each(groupElem.find(\"[data-toggle=tooltip]\"), function(i, elem) {\n $(elem).tooltip({\n animation: false, // slows down tooltip removal\n delay: {\n show: 500,\n hide: 0\n },\n title: ...
[ "0.60553837", "0.58927244", "0.58694446", "0.56657654", "0.56368536", "0.55607295", "0.55348617", "0.5518907", "0.5509769", "0.5490401", "0.5469989", "0.54645085", "0.5444342", "0.5433088", "0.5425575", "0.5414061", "0.53990036", "0.5394092", "0.5388304", "0.53822005", "0.536...
0.6664064
0
sortMeasurementType takes the input data array and sorts out the MeasurementType to be displayed in this case "blood sugar" output: new array sortedData[]
function sortMeasurementType() { for (let i = 0; i < measurements.length; i++) { if (measurements[i].type === MeasurementsTypes.BloodSugar) { sortedData.push(measurements[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Sorting(plotData,filteredData,chosenMetric) {\n let array = filteredData.map(e=>[e,plotData[e].metrics[chosenMetric]]);\n array.sort((a,b)=>b[1]-a[1]);\n return array.map(e => e[0]);\n }", "function sortByType(data) {\n // take isolated copy keep the reference safe\n let sortedByTyp...
[ "0.6563485", "0.65613115", "0.6441382", "0.6329183", "0.6183927", "0.6148088", "0.60905504", "0.6077041", "0.60234916", "0.601614", "0.6002259", "0.59944195", "0.5986633", "0.59475076", "0.5933177", "0.5852947", "0.57990795", "0.5794984", "0.5775306", "0.5767302", "0.5767302"...
0.8691158
0
Since blood sugar levels have different reference levels in different times of the day there can't be a function summing up the measurements for a day. sortByTime sorts the measurements taken before lunch to be displayed in the graph output: sortedByTime[]
function sortByTime() { for (let i = 0; i < sortedData.length; i++) { var x = sortedData[i].time; if (x < 12) { sortedByTime.push(sortedData[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortMeasurementType() {\n for (let i = 0; i < measurements.length; i++) {\n if (measurements[i].type === MeasurementsTypes.BloodSugar) {\n sortedData.push(measurements[i]);\n }\n }\n }", "function sortData(){\n setUpDefects();\n\n //initialise the packhouse data arrays\n ...
[ "0.6339865", "0.6041678", "0.59453666", "0.59415257", "0.58983934", "0.58748466", "0.5757434", "0.57180923", "0.5669891", "0.5600661", "0.5598388", "0.5575002", "0.5564581", "0.5551374", "0.5507304", "0.54645044", "0.538875", "0.5365963", "0.53600013", "0.5355457", "0.5335954...
0.66480875
0
getLatestValue retrieves the latest measurement value and sets the float precision for output in "Latest" card
function getLatestValue() { latestValue = sortedByTime[sortedByTime.length - 1].value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function YLightSensor_get_currentValue()\n { if(YAPI.applyCalibration) {\n var res = YAPI.applyCalibration(this);\n if(res != Y_CURRENTVALUE_INVALID) {\n var resol = this.get_resolution();\n res = Math.round(res / resol) * resol;\n return res;...
[ "0.6576342", "0.6554431", "0.5918472", "0.58730614", "0.5767132", "0.5645832", "0.5642209", "0.56371784", "0.5624637", "0.56059456", "0.5605621", "0.5594642", "0.55461836", "0.5506694", "0.548765", "0.5442045", "0.54416096", "0.54342765", "0.5391013", "0.5384779", "0.5352104"...
0.7366948
0
sliceArrayForGraph slices the sortedData array and pushes the values to display in the Graph to a new array output: dataReadyForGraph[]
function sliceArrayForGraph() { if (sortedByTime.length < seed) { for (let i = 0; i < (sortedByTime.length); i++) { dataReadyForGraph.push(sortedByTime[i]); } } else { startseed = ((sortedByTime.length) - seed); for (let y = startseed; y < (sortedByTime.length); y++) { da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sliceArrayForGraph() {\n if (sortedData.length < seed) {\n for (let i = 0; i < (sortedData.length); i++) {\n dataReadyForGraph.push(sortedData[i]);\n }\n } else {\n startseed = ((sortedData.length) - seed);\n for (let y = startseed; y < (sortedData.length); y++) {\n ...
[ "0.80729085", "0.6349149", "0.5768847", "0.57620215", "0.57050157", "0.56143415", "0.5605918", "0.5524627", "0.5515513", "0.54266405", "0.5372851", "0.5352246", "0.5335564", "0.5314894", "0.53085476", "0.52633935", "0.5259084", "0.52548254", "0.5252473", "0.52453256", "0.5238...
0.75585425
1
Initialize an empty Queue and empty LinkedList ready to receive messages
function Queue() { this.head = null; this.tail = null; this.queue_length = null; this.current_size = 0; this.message_backlog = new CustomLinkedList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Queue() {\n this.list = new LinkedList_1.default();\n }", "function Queue() {\n this.list = new LinkedList_1.default();\n }", "function Queue() {\n this.list = new LinkedList();\n }", "function Queue() {\n this.list = new LinkedList();\n }", "functio...
[ "0.7614399", "0.7614399", "0.7596024", "0.7575522", "0.7395546", "0.699706", "0.6968675", "0.6933156", "0.6925781", "0.6916795", "0.6836828", "0.6834206", "0.67504185", "0.6673168", "0.6660394", "0.66419333", "0.662581", "0.6613215", "0.6601264", "0.6547154", "0.65339035", ...
0.7803944
0
Activate gear (change color)
function activate(gear){ gear.fillStyle = active; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activate() {\n getBreweries();\n }", "function changeColor() {\n\n\t// Define variables.\n\tvar classes = this.class(),\n\t\tswatches = select('#swatches');\n\t\n\t// Toggle active class.\n\tif (classes.indexOf('active') >= 0) {\n\t\tthis.removeClass('active');\t\n\t} else {\n\t\tthis....
[ "0.6513232", "0.6478242", "0.64448035", "0.62509865", "0.6165399", "0.60055846", "0.59279764", "0.5896711", "0.58908236", "0.58665395", "0.58543825", "0.5815083", "0.5795081", "0.578238", "0.57762843", "0.5754215", "0.5746718", "0.57426655", "0.57355225", "0.5729179", "0.5725...
0.81695473
0
Disable gear (change color)
function disable(gear) { gear.fillStyle = inactive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableColors() {\n colors.disabled = ! colors.disabled;\n}", "function disable() {\n\thideIcon(false);\n\thideLabel(false);\n\thideArrow(false);\n}", "apagaColor(color) {\n this.colores[color].classList.remove(\"light\");\n }", "disable() {\n\t // leave empty in Widget.js\n\t }", "...
[ "0.64489233", "0.62023926", "0.6114324", "0.61114544", "0.60935533", "0.60861", "0.6060615", "0.6005739", "0.5997599", "0.5996334", "0.5898839", "0.5880337", "0.5855476", "0.5835146", "0.58222693", "0.5817135", "0.5813424", "0.58116686", "0.57994884", "0.5788569", "0.5768753"...
0.81998783
0
Change large gear rotation direction
function reverse(dir) { large_gear.direction = dir; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveL() {\n\n this.rotation -= (Math.PI / 180);\n\n }", "rotate(dir) {\n\n if (dir === 'rotateright') {\n\n if (this.rotation === 3){\n this.rotation = -1\n }\n this.rotation ++;\n this.checkGhost();\n this.render();\n\n ...
[ "0.6822448", "0.6746895", "0.669798", "0.65837485", "0.65575695", "0.6525714", "0.6425815", "0.64083624", "0.63919175", "0.6328197", "0.6324039", "0.6314269", "0.6307945", "0.6304671", "0.6281502", "0.6277105", "0.62767726", "0.6269639", "0.6257228", "0.62460285", "0.62386286...
0.6937485
0
G instructs the robot to move forward one step L instructs the robot to turn left R instructs the robot to turn right The robot cannot go backwards. After running all of the movement commands, check if robot returns to the starting location. Time complexity: O(n)
function checkRobotLocation(str) { const operation = str.split(""); let x = 0; let y = 0; let directions = ["N", "E", "S", "W"]; let direction = directions[0]; operation.forEach((task) => { if (task === "G") { direction === "N" && (y += 1); direction === "S" && (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveForward(robot) {\n\t//SI LA DIRECTION DU ROVER EST AU NORD ALORS IL AURA 2 OPTIONS\n\t//SOIT IL NE BOUGERA PAS CAR IL SE TROUVE A L'EXTREMITE NORD C EST A DIRE L'INDEX O DE L'ORDONEE \n\t// SINON IL FERA UN PAS EN DIRECTION DU NORD SUR L'AXE ORDONNEE C'EST A DIRE -1\n\tif (rover.direction === \"N\") {...
[ "0.66175824", "0.64893436", "0.64635885", "0.6454415", "0.6369397", "0.6341861", "0.6294012", "0.6191647", "0.61858827", "0.6185845", "0.6107436", "0.6102328", "0.6094027", "0.6077894", "0.6061142", "0.60430473", "0.6037415", "0.6022349", "0.59918785", "0.5984845", "0.5964904...
0.68263257
0
Saves the OAuth configuration and return to the detail view if successful. Shows notification otherwise.
save(evt) { evt.preventDefault(); let {$el} = this, scopes = this.stores.essentials.getAllScopes(), ownerscopes = this.ownerscopeList .getSelection() .map(s => s.split('.')) .map(([resourceId, id]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_oauth() {\n\n var options = {\n node_url: $('#node_url').val(),\n consumer_key: $('#consumer_key').val(),\n consumer_secret: $('#consumer_secret').val(),\n token: $('#token').val(),\n token_secret: $('#token_secret').val()\n };\n\n ...
[ "0.6372679", "0.58414024", "0.5583041", "0.5567264", "0.55414265", "0.5515463", "0.5509093", "0.54836166", "0.54604775", "0.543959", "0.5416618", "0.5363531", "0.5336633", "0.53070784", "0.5270663", "0.5262467", "0.5236106", "0.523068", "0.5219385", "0.52101964", "0.5198875",...
0.67347276
0
Iterate Perform one full iteration of the axiom replacing all variables with their associated rules.
iterate () { for (let i = 0; i < this.axiom.length; i++) { this.step(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transform2(axiom, rules, it) {\n for (let i = 0; i < it; i++) {\n let aux = \"\";\n for (let j = 0; j < axiom.length; j++) {\n aux = aux.concat(exchange(axiom.charAt(j, j + 1), rules));\n }\n axiom = aux;\n // return + transform(axiom.substring(1, axiom.length), rules);\n }\n return...
[ "0.53659254", "0.5336903", "0.52520454", "0.5074518", "0.49322936", "0.49297252", "0.49131343", "0.48703176", "0.4868872", "0.48586076", "0.48316213", "0.48244148", "0.47895175", "0.47570008", "0.47215644", "0.46966076", "0.4692137", "0.46727556", "0.46711773", "0.4657991", "...
0.6745995
0
Gets the DOM element associated with the databinding. Most of the time it's the binding.target but sometimes binding.target is an aurelia custom element, or custom attribute which is a javascript "class" instance, so we need to use the controller's container to retrieve the actual DOM element.
function getTargetDOMElement(binding, view) { var target = binding.target; // DOM element if (target instanceof Element) { return target; } // custom element or custom attribute // tslint:disable-next-line:prefer-const for (var i = 0, ii = view.control...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTargetDOMElement(binding, view) {\n var target = binding.target;\n // DOM element\n if (target instanceof Element) {\n return target;\n }\n // custom element or custom attribute\n // tslint:disable-next-line:prefer-const\n for (var i = 0, ii = view.controller...
[ "0.7629467", "0.6019526", "0.6019526", "0.60116094", "0.5929117", "0.5871796", "0.5812564", "0.58075815", "0.5785319", "0.5785319", "0.5752131", "0.5737765", "0.57028854", "0.5699031", "0.56577206", "0.56523645", "0.5650624", "0.5638778", "0.56307715", "0.56307715", "0.563041...
0.75748587
1
const TEAM_ID = "85"; this function get team_id and return list of player's id
async function getPlayerIdsByTeam(team_id) { let player_ids_list = []; const team = await axios.get(`${api_domain}/teams/${team_id}`, { params: { include: "squad", api_token: process.env.api_token, }, }); team.data.data.squad.data.map((player) => player_ids_list.push(player.player_id) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractTeamId(team_data){\n return team_data.id\n}", "function getTeamPlayers(match, teamId) {\n // since the participantIdentities portion doesn't track teamId\n // we determine it by looking at participants to find out the teamId\n // NOTE: it looks like participants is always in participantId sor...
[ "0.7259623", "0.71049196", "0.70085055", "0.7001112", "0.6953519", "0.6857062", "0.6857062", "0.68511933", "0.68436664", "0.6756501", "0.6736758", "0.673531", "0.66571164", "0.65912855", "0.65600526", "0.65332234", "0.6505728", "0.64066106", "0.63438445", "0.6339471", "0.6315...
0.7574079
1
this function get list of players info and extract specific fields
function extractRelevantPlayerData(players_info) { return players_info.map((player_info) => { if (player_info.data.data != undefined){ const { player_id ,fullname, image_path, position_id } = player_info.data.data; if(fullname == undefined){fullname = "";} const { name } = player_info.data.data.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractFullPlayerData(players_info) {\n return players_info.map((player_info) => {\n const { fullname, image_path, position_id, common_name, nationality,\n birthdate, birthcountry, height, weight} = player_info.data.data;\n const { name, id } = player_info.data.data.team.data;\n return {\n ...
[ "0.74515253", "0.6786413", "0.6765948", "0.6708382", "0.67024195", "0.6643644", "0.6631864", "0.6581684", "0.6537417", "0.6496638", "0.6494053", "0.6486315", "0.648395", "0.647583", "0.6473908", "0.64520115", "0.6443644", "0.6441365", "0.6418862", "0.63995415", "0.6384089", ...
0.77030313
0
this function get team_id and return all info about team's players
async function getPlayersByTeam(team_id) { let player_ids_list = await getPlayerIdsByTeam(team_id); let players_info = await getPlayersInfo(player_ids_list); return players_info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTeamId() {\n var queryURL = 'https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=' + userTeams;\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n console.log(respo...
[ "0.7784223", "0.77382624", "0.74770844", "0.7397255", "0.7366755", "0.7356988", "0.730686", "0.7201667", "0.7143603", "0.71427995", "0.71360594", "0.713212", "0.71274614", "0.7112839", "0.7112839", "0.7085509", "0.7058069", "0.7023429", "0.7008912", "0.68684274", "0.68426275"...
0.8027415
1
this function get player name and team name and return info of player that have specific name and associated to specific team
async function getPlayerbasicDetailsByTeam(player_name, team_name){ const all_player_with_same_name = await axios.get(`${api_domain}/players/search/${player_name}`, { params: { api_token: process.env.api_token, include: "team.league", }, }) return all_player_with_same_name.data.data.map...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getPlayerbasicDetailsByName(player_name){\n \n const all_player_with_same_name = await axios.get(`${api_domain}/players/search/${player_name}`, {\n params: {\n api_token: process.env.api_token,\n include: \"team.league\", \n },\n })\n return all_player_with_same_name.data.d...
[ "0.7356233", "0.7180231", "0.7146393", "0.69350845", "0.6866301", "0.67593545", "0.67552954", "0.67515063", "0.6606357", "0.6606307", "0.6602181", "0.6602181", "0.6579668", "0.651948", "0.65174854", "0.6516958", "0.6508425", "0.64962256", "0.6489672", "0.643581", "0.6423135",...
0.77805877
0
browse html to determine associated heads
function getHeads(htmlObj) { var heads = "" var type = typeof htmlObj if (type === "object") { // array var len = htmlObj.length if (len !== undefined) { for (var i = 0; i < len; ++i) heads += getHeads(htmlObj[i]) return heads } // object var tag = htmlObj.tag if (tag) { var head = Heads[t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHeadings(htmlBody) {\n const $ = cheerio.load(htmlBody);\n const headings = $('h2');\n return _.map(headings, heading => {\n const $el = $(heading);\n\n return {\n title: $el.text(),\n anchor: $el.attr('id'),\n };\n });\n }", "function findHeadings(root, sects)\n {...
[ "0.6067593", "0.58300555", "0.55899036", "0.5556932", "0.55535644", "0.5531245", "0.55044436", "0.54613554", "0.53646684", "0.5344739", "0.51783276", "0.5154373", "0.51230294", "0.51227444", "0.5121428", "0.5110168", "0.50975156", "0.5092288", "0.5056509", "0.5050005", "0.503...
0.59232146
1
Resets the backoff timer used to avoid event thrashing when many files change rapidly.
function resetBackoffTimer() { clearTimeout(backoffTimer); backoffTimer = setTimeout(() => { backoffTimer = null; for (const bundleName in hasChanged) { /* istanbul ignore if: Standard hasOwnProperty check, doesn't need to be tested */ if (!{}.hasOwnProperty.call(hasChanged, bundleName)) { continue; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "backoff() {\n this.connections.forEach((conn) => conn.backoff())\n\n if (this.backoffId) {\n clearTimeout(this.backoffId)\n }\n\n const onTimeout = () => {\n this.log('Backoff done')\n this.raise('try')\n }\n\n const delay = this.backoffTimer.getInterval() * 1000\n this.backoffI...
[ "0.67202586", "0.63760906", "0.6283237", "0.62653303", "0.61580205", "0.61084056", "0.60910946", "0.5946869", "0.591228", "0.5873983", "0.58382094", "0.5722931", "0.5718309", "0.5684", "0.56763285", "0.5612483", "0.5604744", "0.5595582", "0.5588063", "0.55798644", "0.55798644...
0.8030025
0
sets event behaviour button needs always be clickable even if nonClickable layer blocks it
function setEventBehaviour(){ button.style("pointer-events","all"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setClickBehaviour(){\n\t\t\tbutton.on(\"click\", changeButtonLabelAndSendEvent);\n\t\t}", "clickOnButton() {\n if (!this._disabled) {\n this.cancelBlur();\n this.focusOnButton();\n\n if (this._triggers === 'click') {\n this.toggleMenuVisibility();\n...
[ "0.7378056", "0.677904", "0.6677366", "0.666273", "0.6575705", "0.6566781", "0.65027165", "0.64674944", "0.6458099", "0.6418084", "0.6418062", "0.6417639", "0.6413064", "0.64051425", "0.6361492", "0.6346666", "0.63234186", "0.62910026", "0.62747484", "0.62696767", "0.62601316...
0.813162
0
changes the boolean isPlaying, the buttonLabel and dispatches the clickevent
function changeButtonLabelAndSendEvent(event){ setIsPlaying(); changeButtonLabel(); sendClickEvent(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePlayLabel(playState) {\n isPlaying = playState;\n var playLabel = isPlaying ? \"Stop\" : \"Play\";\n playStopButton.value = playLabel;\n}", "function changeButtonLabel(){\n\t\t\tif(that.isPlaying){\t\t\t\t\n\t\t\t\tbutton.attr(\"class\",pause);\t\n\t\t\t}\t\t\t\n\t\t\telse{\n\t\t\t\tbutto...
[ "0.7326983", "0.7221198", "0.7179593", "0.7036659", "0.6866099", "0.6757351", "0.67200744", "0.67200744", "0.67155457", "0.6655779", "0.65516406", "0.65482277", "0.6537323", "0.6497539", "0.64800155", "0.64614254", "0.6459365", "0.64495426", "0.64407253", "0.64107645", "0.639...
0.7482758
0
sets isPlaying true if it is false sets isPlaying false if it is true
function setIsPlaying(){ that.isPlaying = !that.isPlaying; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set isPlaying(value) {}", "set playing(value) {\n // Only update the value if it's actually different\n if (this.isPlaying !== value) {\n this.isPlaying = value;\n this.observePlaying();\n }\n }", "get isPlaying() {}", "function togglePlaying() {\n mm.Player.tone.context.resume();\n \n ...
[ "0.8599195", "0.81545484", "0.80843", "0.7792312", "0.7761405", "0.766089", "0.7653135", "0.76375407", "0.7628603", "0.7601056", "0.7595354", "0.7522035", "0.7501307", "0.74910897", "0.74831873", "0.74512833", "0.74351066", "0.7406831", "0.74067646", "0.7389894", "0.73867923"...
0.8506707
1
changes the label dending on if<d the player plays or if it is paused
function changeButtonLabel(){ if(that.isPlaying){ button.attr("class",pause); } else{ button.attr("class", play); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePlayLabel(playState) {\n isPlaying = playState;\n var playLabel = isPlaying ? \"Stop\" : \"Play\";\n playStopButton.value = playLabel;\n}", "function onPlayerStateChange(event) {\n if (player.getPlayerState() == 5) {\n changeStatus(\"Pause\");\n }\n ...
[ "0.681325", "0.64883363", "0.6407805", "0.6382247", "0.63260823", "0.6302147", "0.62981755", "0.6256642", "0.6246897", "0.6241428", "0.623245", "0.61954945", "0.618519", "0.6173774", "0.6154486", "0.6141093", "0.61401397", "0.61401397", "0.61401397", "0.61401397", "0.61401397...
0.68284166
0
Iterates all locations on disk. Takes an action lambda function of what to do with each location
iterateDisk(trackLocationStart, trackLocationEnd, action) { for (var track = trackLocationStart; track < trackLocationEnd; track++) { for (var sector = 0; sector < DISK_SECTOR_COUNT; sector++) { for (var block = 0; block < DISK_BLOCK_COUNT; block++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loopStores(){\n for (var i = 0; i < storeObjects.length; i++){\n allLocations(storeObjects[i]);\n }\n}", "iterateDiskChain(filename, action) {\n var location = this.locationForFilename(filename);\n if (location === null) {\n return false;\n }\n ...
[ "0.63328606", "0.6226144", "0.57806236", "0.56278783", "0.5577884", "0.55442023", "0.5441884", "0.5354168", "0.5354168", "0.53240037", "0.5309933", "0.52882326", "0.5258649", "0.5244796", "0.52336174", "0.5180723", "0.5156849", "0.5144185", "0.5075568", "0.5074305", "0.506252...
0.6414463
0
Iterates a disk chain (follows next location until null). Takes an action lambda function of what to do with each location
iterateDiskChain(filename, action) { var location = this.locationForFilename(filename); if (location === null) { return false; } while (location !== null) { var data = new DiskData(location); action(data); // Functional prog...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "iterateDisk(trackLocationStart, trackLocationEnd, action) {\n for (var track = trackLocationStart; track < trackLocationEnd; track++) {\n for (var sector = 0; sector < DISK_SECTOR_COUNT; sector++) {\n for (var block = 0; block < DISK_BLOCK_COUNT; block++) {\n ...
[ "0.69269454", "0.5525058", "0.5183015", "0.51335126", "0.5006797", "0.49869034", "0.49414444", "0.4927218", "0.49252126", "0.487166", "0.48476067", "0.48163223", "0.4812801", "0.48090324", "0.47901705", "0.47781876", "0.4752694", "0.4750614", "0.47424924", "0.47398877", "0.47...
0.72559196
0
Generates a heading selector based on the indexing level
function generateHeadingSelector(headingIndexingLevel) { let headingsSelector = 'h1'; for (let i = 2; i <= headingIndexingLevel; i += 1) { headingsSelector += `, h${i}`; } return headingsSelector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function headingNumbering() {\n\n jQuery('h2,h3').each(function (i, e) {\n var hIndex;\n\n hIndex = parseInt(this.nodeName.substring(1)) - 2;\n\n // Getting deeper into the heading hierarchy\n if (indices.length - 1 > hIndex) {\n indices = indices.slice(0, hIndex + 1);\n ...
[ "0.63592726", "0.6054393", "0.5978994", "0.5901372", "0.58310026", "0.573639", "0.55885196", "0.55489874", "0.5514481", "0.5489121", "0.5463326", "0.54549414", "0.5394765", "0.53930265", "0.53581375", "0.52686423", "0.5234816", "0.5224579", "0.522003", "0.52192014", "0.521560...
0.8256674
0
Check the Guess function
function checkGuess(){ // Increase the guess counter by 1 counterGuess++; // get value from the input element var guessedNum = $numberInput.val(); console.log(guessedNum); // test if value entered is valid var numIsValid = validateGuess(guessedNum, $messageOutput); // Check Guess against ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evaluateGuess(){ // Begin evaluateGuess\n // a) Compare the guess to the current number. If the guess is correct, return true, otherwise return false.\n if(Number(input.value) == currentNumber )\n {\n return true;\n }\n else\n {\n return false;\n }\n} // End of evaluateGuess", "function che...
[ "0.7690605", "0.76775116", "0.766342", "0.765056", "0.7578459", "0.74761266", "0.73806244", "0.73718", "0.7345652", "0.73067313", "0.72253287", "0.7224452", "0.72054327", "0.71694916", "0.71466386", "0.71124256", "0.7108976", "0.709406", "0.70775706", "0.706269", "0.70242834"...
0.7735274
0
returns: 'neutral', 'friendly', or 'hostile'
function getDiplomacy (aid) { if (Seed.allianceDiplomacies == null) return 'neutral'; if (Seed.allianceDiplomacies.friendly && Seed.allianceDiplomacies.friendly['a'+aid] != null) return 'friendly'; if (Seed.allianceDiplomacies.hostile && Seed.allianceDiplomacies.hostile['a'+aid] != null) return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDiplomacy2 (aid) {\r\n if (Seed.allianceDiplomacies == null)\r\n return 'Neutral';\r\n if (Seed.allianceDiplomacies.friendly && Seed.allianceDiplomacies.friendly['a'+aid] != null)\r\n return 'Friendly';\r\n if (Seed.allianceDiplomacies.hostile && Seed.allianceDiplomacies.hostile['a'+aid] != nu...
[ "0.65341043", "0.61553997", "0.5965066", "0.59223187", "0.5877884", "0.5863672", "0.5840831", "0.5820842", "0.58028984", "0.57952034", "0.5789981", "0.57777256", "0.5759338", "0.5725247", "0.5689504", "0.565292", "0.56029505", "0.5593882", "0.5585507", "0.55851346", "0.558507...
0.65916574
0
Check how many li elements exist
function checkList() { return document.getElementsByTagName('li').length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkListLen() {\n return ul.children.length;\n}", "function countLiData() {\n var ul = document.getElementById(\"products\");\n var liNodes = [];\n\n for (var i = 0; i < ul.childNodes.length; i++) {\n if (ul.childNodes[i].nodeName == \"LI\") {\n liNodes.push(ul.childNodes[i]);\n }\n }\n...
[ "0.8177335", "0.74435306", "0.69836307", "0.68241006", "0.66349345", "0.651486", "0.6506986", "0.65069586", "0.649088", "0.64113516", "0.641037", "0.63993233", "0.63767457", "0.634972", "0.6334381", "0.6310601", "0.6284121", "0.62838066", "0.6279756", "0.621278", "0.6197922",...
0.7734997
1
Replace the standard subSilver gifs/icons Viewforum Gif's source: DAJ_Glass created by Dustin Baccetti Folder icon source: davbo ( Note: empty folders tweaked by me[gollum] )
function replaceGifs() { var daj_gifs = new Object(); daj_gifs ={ "folder.gif":"data:image/gif;base64,R0lGODlhFAAOAPcAAP8A/4uLi4yMjI2NjZCQkJGRkZiYmJqamqKioqWlpampqaqqqqurq62tra6urq+vr7CwsLGxsbKysrOzs7S0tLe3t7i4uLm5ubq6ur29vb6+vr+/v8DAwMHBwcfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showGif() {\n $('img').each(function(){\n var old_src = $(this).prop('src');\n\n if (old_src.indexOf('gifUrl=') != -1)\n $(this).prop('src', old_src.substring(old_src.indexOf('gifUrl=') + 7)); // 'gifUrl='.length = 7\n });\n}", "function showGif(){\r\n $('img').each(fun...
[ "0.6316065", "0.62913346", "0.60512346", "0.5993354", "0.5983683", "0.5938729", "0.5889373", "0.58042365", "0.57635283", "0.5761695", "0.5705082", "0.5672173", "0.5667532", "0.5659709", "0.56458426", "0.5635137", "0.5617459", "0.56000453", "0.55924094", "0.557607", "0.5569403...
0.6893998
0
implement a row hover for the various pages exclude viewtopic.php
function rowHover() { var tnbr = 0; if (/viewforum|IBDOF-authorlist|IBDOF-serieslist|IBDOF-genrelist/i.test(window.location.pathname)) tnbr = 2; else if (/index/i.test(window.location.pathname)) tnbr = 3; else if (/search|getdaily/i.test(window.location.pathname)) tnbr = 4; if (tnb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comparePageRowHoverOver() {\n var $pageRow = $(this);\n $pageRow.children(\".leftCompareDetails\").children(\".detailText\").children(\".unchangedDetails\").addClass(\"unchangedDetailsVisible\");\n $pageRow.children(\".rightCompareDetails\").children(\".detailText\").children(\".uncha...
[ "0.68981886", "0.6588998", "0.63331336", "0.62480545", "0.6182928", "0.61733747", "0.61332", "0.60573107", "0.5935318", "0.5930892", "0.5930157", "0.58879954", "0.5876486", "0.5846199", "0.58415335", "0.5808201", "0.57984114", "0.5743851", "0.57022536", "0.57004267", "0.56853...
0.6820538
1
Prepare the header to receive styling Replace the ibdof logo gif with a background transparent version Note: cell addresses are relative to cell[0] == class 'bodyline'
function fixLogo() { var c = document.getElementsByTagName('td')[1]; // background to ibdof logo c.className = 'topbkg'; // replace the ibdof logo c.getElementsByTagName('img')[0].src = 'data:image/gif;base64,R0lGODlhaAFrAPcAAPr7/PT2/PT29PTy9Ozu7OTu9OTm5OTi5Nje5Nzd3NLa3NTT1MDW3MTS1MzO1MzNzMTOzMHO1L/KzMDG...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixHead() {\n var thead = $(settings.table).find(\"thead\");\n var tr = thead.find(\"tr\");\n var cells = thead.find(\"tr > *\");\n\n setBackground(cells);\n cells.css({\n 'position': 'relative'\n ...
[ "0.64971584", "0.6368952", "0.62716174", "0.58208704", "0.5817388", "0.5771158", "0.5771158", "0.5718137", "0.569407", "0.5598008", "0.55402756", "0.5533004", "0.55165696", "0.54868627", "0.5485438", "0.54818743", "0.5480951", "0.5443631", "0.542905", "0.541877", "0.54119265"...
0.64168644
1
Give the cells containing the mainmenu nav links a style class Make the links Buy Books, Add an Author, Add a Book have the same class as the other menu links Remove the colon wrappers around the menu links and add some spaces and seperate each by a diamond character. Note: cell addresses are relative to cell[0] == cla...
function fixMainMenu() { var c = document.getElementsByTagName('td'); // set style for main menu containers - ibdof's is on two lines c[3].className = 'topnav'; c[4].className = 'topnav'; // ibdof's main menu has been tweaked to add some extra menu items on the second menu line // unfortun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function csb_main(){\r\n navi = document.getElementById(\"navi_table\");\r\n if (navi) {\r\n if (REMOVE_HOME_LINK)\r\n navi.parentNode.childNodes[1].href=\"?\";\r\n \r\n navi=navi.childNodes[1].childNodes[0].childNodes[1];\r\n \r\n fun...
[ "0.56171864", "0.5573617", "0.5540961", "0.5468508", "0.54472923", "0.5230712", "0.51383924", "0.51042676", "0.5094996", "0.5094996", "0.50738865", "0.50303775", "0.50270236", "0.5007379", "0.49774906", "0.49750707", "0.49369502", "0.49119997", "0.48906183", "0.48859146", "0....
0.61654776
0
Implement some extra tweaks for the IBDoF site Cleanup the formatting in Index.php Cleanup the genre description formatting in IBDOFgenrelist.php Cleanup the Alphabetic links in the IBDOFauthorlist & IBDOFserieslist pages
function ibdof_tweaks() { // tweak the formatting for the forum listing on Index.php if (/index/i.test(window.location.pathname)) formatIndexPage(); // set a class-name for the genre description cell if (/IBDOF-genrelist/i.test(window.location.pathname)) { dev = document.evaluate( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoEdWikilinks(str) { //MAIN FUNCTION describes list of fixes\n \n //Get the list of all wikilinks with underscores\n var m = str.match(/\\[\\[[^\\[\\]]*_[^\\[\\]]*\\]\\]/g);\n if (m) {\n //For each wikilink in the list\n for (var i = 0; i < m.length; i++) {\n var x = m[i].toString() // Contains the ...
[ "0.5956131", "0.5924553", "0.57608974", "0.5659644", "0.56118184", "0.5607583", "0.5551593", "0.54780537", "0.54685634", "0.5458967", "0.54335755", "0.5421348", "0.54100436", "0.53975284", "0.53639156", "0.53302723", "0.53244215", "0.531785", "0.531676", "0.53135705", "0.5293...
0.72396475
0
Format the Index.php page Find the header titles 'Topic || Post || Last Post' and duplicate them above each forum category Insert a row seperator between forum categories
function formatIndexPage() { // grab the th header titles var dev = document.evaluate( "//table[3]//th", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); // create 3 new holding cells for the titles var x = document.createElement('td'); x.className = 'th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accordionHeader(category, i, filteredEntriesCount, filterString) {\n var hasFilterString = (filterString !== undefined && filterString.length > 0);\n var opened = (hasFilterString && filteredEntriesCount > 0) || filteredEntriesCount == 0;\n\n return '' +\n '<div class=\"panel\">' +\n ...
[ "0.5719936", "0.5719775", "0.5593674", "0.5566336", "0.5467881", "0.5404039", "0.54036474", "0.5387618", "0.5342869", "0.5331407", "0.5327865", "0.5319451", "0.5318049", "0.5308085", "0.53031206", "0.5291483", "0.528017", "0.5231121", "0.5212671", "0.5187019", "0.51703095", ...
0.7512455
0
Init a compte panel
function init_compte_panel(cid) { var id = PREFIX+cid; $(id).load("html/compte_panel.html", function() { ldc.opTable(PREFIX+cid+" div.op-table"); ldc.topPanel.update(cid); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(){\n buildComponent();\n attachHandlers();\n addComponents();\n }", "init() {\n\t\tlet config = this.config;\n\t\tlet btns = this.buttonSelector;\n\t\tlet panels = this.panelSelector;\n\t\tfor (let i = 0; i < btns.length; i++) {\n\t\t btns[i].addEventListener(\"click\", function() {\n\...
[ "0.68490934", "0.66643274", "0.6357212", "0.6354156", "0.6352076", "0.6328581", "0.6266902", "0.6187419", "0.61794084", "0.6172153", "0.6170291", "0.6142838", "0.6120565", "0.6112584", "0.60855716", "0.60632735", "0.60476667", "0.6039288", "0.60304964", "0.60113996", "0.60093...
0.7739126
0
Move admin menu into the gear when width is less than 980
function checkWidth(){ if($(window).width()<980){ // Display menu only in gear $("ul[class=dropdown-menu] li:lt(5)").css("display","inline"); $("ul[class=nav]").css("display","none"); } else{ // Display menu, and remove it from gear $("ul[class=dropdown-menu] li:lt(4)").css("display","none")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resize() {\n const $activeTab = $('.admin-menu-tab.active');\n const $separator = this.getSeparator($('#adminmenu .wp-menu-separator'));\n\n if (!$activeTab.is(':visible')) {\n this.hideCollapseMenu($separator);\n } else if (!$('li.menu-top:visible').length) {\n const tab = $activeTab.hasCl...
[ "0.6761428", "0.63290876", "0.632792", "0.6263446", "0.62613577", "0.6233001", "0.6185824", "0.61664635", "0.61606574", "0.6115541", "0.60924625", "0.6090661", "0.60653067", "0.6056209", "0.60561615", "0.60543513", "0.60252774", "0.6019618", "0.60119325", "0.60073", "0.598378...
0.67164224
1
JsonRpc 2.0 jquery sender constructor.
function JsonRpcSenderJquery(url, logger) { this.url = url; this.method = 'POST'; this.logger = logger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function JRMessage(){\n this.id = null;\n this.rpc_method = null;\n this.args = null;\n\n this.data = null;\n this.json = null;\n\n this.error = null;\n this.result = null;\n\n this.onresponse = null;\n this.success = null;\n\n this.to_json = function(){\n this.json = $.toJSON(this.data);\n retur...
[ "0.6187244", "0.61211693", "0.60213476", "0.595178", "0.5944983", "0.5912723", "0.5906959", "0.5901068", "0.5888873", "0.5840336", "0.58363473", "0.58118117", "0.57978684", "0.57565737", "0.57132804", "0.5711888", "0.57111937", "0.5699624", "0.567712", "0.56744975", "0.566837...
0.75324863
0
Cordova back button event
function onBackButton() { navigator.app.exitApp(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onBackKeyDown() {\n\t// Handle the back button\n\tconsole.log('device.onBackKeyDown');\n\twindow.history.back();\n}", "function onBackButton() {\r\n\tnavigator.app.exitApp();\r\n}", "function onBack() {\n resetPageState();\n }", "function onBackKeyDown() {\n \tif($.mobile.activePage.is(...
[ "0.7718565", "0.7610292", "0.749674", "0.73504823", "0.73269516", "0.72942317", "0.7293712", "0.7293712", "0.7287626", "0.72810036", "0.72667676", "0.72426087", "0.7178992", "0.7169287", "0.71585083", "0.71545726", "0.7113368", "0.71091056", "0.7095629", "0.7092069", "0.70704...
0.764122
1
Insert a task and return status 201 (created) on success
function Insert(task, response) { "use strict"; mongoClient.connect(connectionString, function (err, db) { if (err) { console.log('Connection Failed. Error: ', err); } else { autoIncrement.getNextSequence(db, TASKS_COLLECTION, function (err, indexValue) { if (!err) { task.id = indexValue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createTask(taskName,content,dueDate,TL_id,tags){\n let newTask = await Task({\"taskName\":taskName,\"content\":content,\"dueDate\":dueDate,\"taskListId\":TL_id,\"tags\":tags});\n try{\n await newTask.save();\n }catch(err){\n console.log(err);\n return false;\n }\n \n return n...
[ "0.7321213", "0.72797966", "0.70574677", "0.7039672", "0.69632095", "0.6961469", "0.6945096", "0.6909338", "0.6891919", "0.6774279", "0.6670506", "0.6623981", "0.6581572", "0.6502694", "0.6471362", "0.644565", "0.6438828", "0.6436216", "0.6414019", "0.6367908", "0.6349602", ...
0.74504447
0
Represents a propulsion unit.
function PropulsionUnit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PropulsionUnit() {\n\t}", "get unit () {\n\t\treturn this._unit;\n\t}", "unit() {\n return new Vector(Math.cos(this.phase), Math.sin(this.phase));\n }", "get unit() {\n\t\treturn this.__unit;\n\t}", "function Unit()\n{\n\tthis.red = 0;\n\tthis.blue = 0;\n\tthis.purple = 0;\n\tthis.white ...
[ "0.79079163", "0.6588922", "0.6377844", "0.63621086", "0.61210483", "0.6083693", "0.6024862", "0.6024862", "0.6024862", "0.5909984", "0.5827942", "0.5801347", "0.5715268", "0.5715268", "0.5715268", "0.56580925", "0.55750084", "0.5574026", "0.54986525", "0.5469554", "0.5449563...
0.7879655
1
Wheel inherits from PropulsionUnit.
function Wheel(radius) { this.radius = radius; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Wheel(params){\n\n this.car=params.car;\n this.revolving=params.revolving;\n this.powered=params.powered;\n this.width = params.width;\n this.height = params.height;\n RectangleEntity.call(this, params);\n}", "function Wheel() {\n const wheelGeometry = new THREE.TorusGeometry(0.8, 0.5, 16, 100);\...
[ "0.66175663", "0.64072293", "0.63081217", "0.63081217", "0.62648845", "0.62620205", "0.60685873", "0.60406286", "0.59899473", "0.59674877", "0.59545517", "0.5941791", "0.5937373", "0.59334147", "0.5909681", "0.59073216", "0.59073216", "0.59073216", "0.59073216", "0.59073216", ...
0.7084169
0
PropellingNozzle inherits from PropulsionUnit.
function PropellingNozzle(power, afterburnerState) { this.power = power; this.afterburnerState = afterburnerState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PropulsionUnit() {\n }", "function PropulsionUnit() {\n }", "function PropulsionUnit() {\n\t}", "function Propeller(numberOfFins,spineDirection) {\n\t\tthis.numberOfFins=numberOfFins;\n\t\tthis.spineDirection=spineDirection;\n\t}", "function Propeller(bladesNumber, rotationDirection) {\n ...
[ "0.6792657", "0.6792657", "0.6658915", "0.56610906", "0.53020525", "0.512206", "0.512206", "0.5121721", "0.5119885", "0.5119885", "0.5103657", "0.51011616", "0.5044143", "0.50019044", "0.4999597", "0.49825928", "0.49822366", "0.4976054", "0.49717638", "0.49668735", "0.4965117...
0.7213688
0
LandVehicle inherits from Vehicle.
function LandVehicle(speed, wheels) { Vehicle.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LandVehicle(speed,wheels) {\n\t\tVehicle.apply(this,arguments);\n\n\t}", "function Vehicle(name,type){\n this.name = name;\n this.type = type;\n this.usedForTransport = true; //Default parameter\n}", "function Vehicle(vehicleType){\n this.vehicleType = vehicleType || \"car\";\n this.model =...
[ "0.7268818", "0.6371741", "0.63359624", "0.6299367", "0.62659365", "0.6265385", "0.6169445", "0.6142395", "0.60388404", "0.58950657", "0.5847389", "0.5836147", "0.5809601", "0.5809601", "0.5793355", "0.5765883", "0.5765883", "0.5719097", "0.5708582", "0.5699747", "0.5693861",...
0.7401841
0
Aircraft inherits from Vehicle.
function Aircraft(speed, propellingNozzles) { Vehicle.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AirVehicle(speed,propellingNozzles) {\n\t\tVehicle.apply(this,arguments);\n\t}", "function Vehicle(name,type){\n this.name = name;\n this.type = type;\n this.usedForTransport = true; //Default parameter\n}", "generateAircraft() {\n this.emit('aircraft', {});\n }", "function Vehicl...
[ "0.6435766", "0.6269772", "0.61551815", "0.6036573", "0.5914864", "0.5878323", "0.5874754", "0.58626395", "0.5822719", "0.5811708", "0.5763149", "0.57617754", "0.57455593", "0.57455593", "0.574371", "0.57390785", "0.56934077", "0.566838", "0.5651084", "0.56192225", "0.5531242...
0.6749168
0
Watercraft inherits from Vehicle.
function Watercraft(speed, propellers) { Vehicle.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WaterVehicle(speed,propellers) {\n\t\tVehicle.apply(this,arguments);\n\t}", "function Vehicle(name,type){\n this.name = name;\n this.type = type;\n this.usedForTransport = true; //Default parameter\n}", "function vehicle() {\n this.wheels = null;\n this.tires = null;\n}", "function Water(...
[ "0.7140194", "0.644574", "0.63803023", "0.623127", "0.618849", "0.6183388", "0.6161727", "0.6089467", "0.608235", "0.6080123", "0.60677904", "0.6016804", "0.59999216", "0.58948076", "0.5883422", "0.58556765", "0.5822388", "0.58182377", "0.5817632", "0.5811073", "0.57927656", ...
0.75775504
0
Amphibian inherits from Vehicle and extends Watercraft.
function Amphibian(speed, propellers, wheels, mode) { var propulsionUnits = []; for (var i = 0; i < propellers.length; i++) { propulsionUnits.push(propellers[i]); } for (var j = 0; j < wheels.length; j++) { propulsionUnits.push(wheels[i]); } Veh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AquaticAnimal(typeOfWater,name,age,latinName){\n\nObject.setPrototypeOf(this,new Animal(name,age,latinName,'no'))\n\n this.typeOfWater=typeOfWater;\n this.liveInSaltWater=false;\n this.liveInFreshWater=false;\n this.changeLifeEnvironment=function(typeOfWater){\n if(typeOfWater==='salt')...
[ "0.6358123", "0.6304775", "0.60354215", "0.5963375", "0.595262", "0.59309083", "0.5628773", "0.56143314", "0.55507785", "0.55129087", "0.5481317", "0.5480602", "0.5478597", "0.547633", "0.54675245", "0.5452744", "0.54461557", "0.5432474", "0.54289156", "0.54114807", "0.540378...
0.63970745
0
Constant if drawing Convert an angle to pwm off value
function AngleToOff(angle){ var cycle = 1000/freq; var tickTime = 1000 * cycle / 4096; var ms = (angle * 100 / 9) + 500; return ms / tickTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setServoDegrees(value) {\n local scaledValue = (value + 81) / 161.0 * (SERVO_MAX - SERVO_MIN) + SERVO_MIN;\n Servo.write(scaledValue);\n imp.sleep(0.5);\n Servo.write(0);\n devicelog(false,\"servo angle \" + value + \" scaled valut \" + scaledValue);\n}", "function clampAngle(angle) {\n\t...
[ "0.6047084", "0.59368736", "0.5932705", "0.59168166", "0.58362925", "0.57799053", "0.5719682", "0.5654217", "0.5653427", "0.5633254", "0.56235", "0.5533524", "0.55280775", "0.5526865", "0.5526047", "0.5501516", "0.5488067", "0.5487953", "0.5467393", "0.54495203", "0.5438792",...
0.686702
0
Convert an x, y position to a set of 3 angles for the arm
function PositionToAngles(xIn, yIn){ var xPosEnd = xIn - xPosStart; //Convert global x to local x var yPosEnd = yIn - yPosStart; //Convert global y to local y var angle3Search = 0; //Value to search through angles around the final point to conect back from var xPos3 = -Math.sin(angle3Search/180*Math.PI)*l3 + xPosE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arm_coordinates() {\r\n \r\n // calculates the end effector's coordinates using kinematics theory.\r\n x_cor = //left arm\r\n x +\r\n cos(angle1) * segLength +\r\n cos(angle2 + angle1) * segLength;\r\n //cos(angle1 + angle2 + angle3) * segLength;\r\n y_cor = //left arm\r\n y +\r\...
[ "0.67600596", "0.66563714", "0.6556538", "0.6447994", "0.64338803", "0.63808227", "0.63789743", "0.633909", "0.62666893", "0.6151478", "0.6108753", "0.60649765", "0.59525776", "0.59255403", "0.5917069", "0.5914774", "0.5908639", "0.5906858", "0.5890262", "0.588649", "0.587654...
0.7040571
0
import ChildComponent from "./ChildrentClass";
function ParentComponent(props) { return ( <ChildComponent /> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n return (\n <ChildComponent {...this.props}/>\n );\n }", "render() {\n return <ChildComponent {...this.props} />;\n }", "render() {\n return <ChildComponent {...this.props} />;\n }", "constructor() {\n super();\n console.log('Ch...
[ "0.66920894", "0.6613982", "0.6613982", "0.66123307", "0.6593793", "0.6567291", "0.6555323", "0.6555323", "0.6427077", "0.6280304", "0.6276228", "0.62538123", "0.62165505", "0.61560804", "0.61560804", "0.6121241", "0.612119", "0.61139095", "0.6104797", "0.60975724", "0.607578...
0.68973285
0
btn.style.position = "absolute"; btn.style.width = Math.floor(vid.widht 0.15) + "px"; btn.style.height = Math.floor(vid.height 0.30) + "px"; btn.style.left = Math.floor(vid.widht 0.20) + "px"; btn.style.top = Math.floor(vid.height 0.8) + "px"; Comenzar Pausar Reiniciar
function btnComenzar() { vid.currentTime = 0; vid.play(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveBtn(btn) {\n var height = body.offsetHeight;\n var width = body.offsetWidth;\n var x = getRndInteger(0, width - 100);\n var y = getRndInteger(0, height - 80);\n\n btn.style.position = \"absolute\";\n btn.style.left = x + 'px';\n btn.style.top = y + 'px';\n}", "function frame() {...
[ "0.6640094", "0.6431703", "0.6421946", "0.6375432", "0.6358214", "0.62787086", "0.6264308", "0.6251359", "0.62418175", "0.6202725", "0.6178155", "0.6165417", "0.6164985", "0.61329514", "0.61115766", "0.610482", "0.6104084", "0.6097915", "0.60958374", "0.60940325", "0.6048953"...
0.65598255
1
auth is used for oAuth 2.0 client to stores email address of recipient sub stors the subject body is used to store text body of the mail(only text option in this app) if value of task is 'send' then mail is sent otherwise it is saved as draft
constructor(auth, to, sub, body, task){ this.task = task; this.auth = auth; this.to = to; this.sub = sub; this.body = body; // this stores the current user gmail credentials this.gmail = google.gmail({version: 'v1', auth}); // console.log(this.gmail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function sendMail(auth , to , subject , text){\n const gmail = google.gmail({version: 'v1' , auth});\n // the current user's email address is extracted my the getUser method\n let userInfo = await getUser(auth)\n // the message body is created using createMessage method\n let raw = createMessa...
[ "0.6219716", "0.60016054", "0.59958565", "0.5888243", "0.5756229", "0.56769174", "0.5650236", "0.5643168", "0.56289715", "0.538899", "0.5335934", "0.53141993", "0.5309879", "0.5296757", "0.5243642", "0.52330536", "0.52145815", "0.51909274", "0.51902795", "0.5181328", "0.51748...
0.7090414
0
Creates the mail body and encodes it to base64 format.
makeBody(){ // an object for mail let mail; mail = new mailComposer({ to: this.to, text: this.body, subject: this.sub, textEncoding: "base64" }); //Compiles and encodes the mail. mail.compile().build((err, msg) => { if (err){ return console.log('Error compiling email ' + error); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeBody(from, to, subject, message) {\n let str = [\n 'Content-Type: text/plain; charset=\"UTF-8\"\\n',\n \"MIME-Version: 1.0\\n\",\n \"Content-Transfer-Encoding: 7bit\\n\",\n \"to: \",\n to,\n \"\\n\",\n \"from: \",\n from,\n \"\\n\",\n \"subject: \",\n s...
[ "0.7578696", "0.7192052", "0.6529703", "0.59219027", "0.56917816", "0.5665439", "0.55993676", "0.5557518", "0.550206", "0.54998225", "0.5494745", "0.54821444", "0.545379", "0.541674", "0.53857464", "0.53806686", "0.5355402", "0.53477436", "0.5336463", "0.53327376", "0.5329025...
0.74081373
1
reset notification count at first of month for all users.
function resetNotificationCount() { return db("User") .where("notificationCount", ">", 0) .update({ notificationCount: 0 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetLastNotified() {\n lastNotified = new Date();\n}", "function resetUserMessageCounter() {\n recentUserMessages = 0\n}", "_resetNotifCounters() {\n this._notifCounters[Severity.CRITICAL] = 0;\n this._notifCounters[Severity.MAJOR] = 0;\n this._notifCounters[Severity.MINOR]...
[ "0.6998112", "0.6656712", "0.6244084", "0.61321986", "0.59064054", "0.5894995", "0.58739024", "0.5872071", "0.5870312", "0.57560354", "0.57206506", "0.56677556", "0.56496245", "0.5607663", "0.557995", "0.5568508", "0.5535213", "0.5525748", "0.54628974", "0.54605097", "0.54552...
0.7588628
0
Three cases may occur: 1. info.yml exists already > we can exit, the project is setup correctly 2. info.yml does not exist and we have no changelog entry files yet > new project, write initial config and set migration version to latest since it's implicitly uptodate 3. info.yml does not exist but we have changelog entr...
function ensureInitializedProject(config) { if (existsSync(getInfoFilePath(config))) { // Case 1 return; } const hasEntries = globSync(joinPath(config.path, '**/*')).length > 0; saveChangelogInfo(config, { version: hasEntries // Case 3 ? -1 // Case 2 : CURRENT_VERSION });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "migrateFromV1toV2() {\n // MIGRATION_DATE is set a day after we actually deploy, so the overlap\n // covers all timezones. This means for 1 day songbase will load slowly\n // because it redownloads every session.\n const MIGRATION_DATE = new Date('August 22, 2023 03:45:00').getTime();\n this.log('La...
[ "0.57021946", "0.561041", "0.56004745", "0.5493457", "0.5404129", "0.5404129", "0.5404129", "0.5404129", "0.5404129", "0.5389823", "0.5371924", "0.53430444", "0.5284806", "0.5188895", "0.50707954", "0.5002371", "0.49868855", "0.49320477", "0.49032223", "0.48675773", "0.484408...
0.6981348
0
Handle a newly connected port (internal from main.js or external for testing).
function handleConnect(port) { var id = g_listenerId++; g_listeners[id] = { 'port': port, 'tune': null, }; port.onMessage.addListener(function(msg) { // Respond to a settings change from the UI. if (msg.name === 'settingsChange') { g_settings = msg.settings; notifyListeners('settings...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnectedHandler (addr, port) {\r\n console.log(`* Connected to ${addr}:${port}`);\r\n mainWindow.webContents.send('connection','');\r\n}", "function onConnectedHandler (addr, port) {\r\n console.log(`* Connected to ${addr}:${port}`);\r\n \r\n}", "function onConnectedHandler(addr, port) {\r\n c...
[ "0.70518667", "0.68318075", "0.6696546", "0.6662991", "0.66442406", "0.66442406", "0.66442406", "0.66442406", "0.66442406", "0.66442406", "0.66374725", "0.6634057", "0.6634057", "0.6634057", "0.6634057", "0.6634057", "0.6627806", "0.66068256", "0.64818203", "0.6455114", "0.64...
0.6903713
1
Linked List to contain entities with allocated IDs for global reference
function LinkedList(){ this.Head = null; this.Tail = this.Head; this.Size = 0; this.FreeIDs = []; this.FindEntityNode = function(entity){ // Go through links looking for matching entity var currentNode = this.Head; while(currentNode != null){ var entityID = entity.EntityID; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillInIds() {\n entityObj.curRcrds = attachTempIds(entityObj.curRcrds); //console.log(\"entityObj.curRcrds = %O\", entityObj.curRcrds)\n }", "consumeNeoIdMap() {\n if (Neo.idMap) {\n this.add(Object.values(Neo.idMap));\n delete Neo.idMap;\n }\n }", "fu...
[ "0.61701274", "0.5992565", "0.58185774", "0.5729499", "0.56933266", "0.5577825", "0.5552691", "0.54372156", "0.5434517", "0.5392763", "0.53809947", "0.53475976", "0.5337252", "0.53339666", "0.53323406", "0.5302456", "0.5258569", "0.52343506", "0.523256", "0.52249813", "0.5202...
0.6838124
0
I'm making a UMD module myself for the following reasons: 1. Before checking availabilities of module, define(), and ES6, it should initiate itself if it is run in the web worker environment. 2. If none of above environments available it should be attacted to 'sqliteWasm' object, which is already defined using tag, as ...
function workerUMD(root, factory) { if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { var initWorker = factory(); initWorker(); } else if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' &&...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initCoreModule() {\n if (WebAssembly) {\n // WebAssembly.instantiateStreaming is not currently available in Safari\n if (WebAssembly && !WebAssembly.instantiateStreaming) {\n // polyfill\n WebAssembly.instantiateStreaming = async (resp, importObject) => {\n const source = await ...
[ "0.6059977", "0.6045662", "0.6030286", "0.5986552", "0.5971153", "0.59641707", "0.5958555", "0.5888074", "0.5863075", "0.5854169", "0.57912236", "0.5778677", "0.5777802", "0.5712299", "0.56655973", "0.5662599", "0.56171584", "0.5570362", "0.551009", "0.5509663", "0.54914784",...
0.6308489
0
Gets the first DOM element inside the first target element.
function firstChild() { var firstElement = this.elements[0].firstElementChild; return $.make(firstElement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first(selector, context) {return (context || document).querySelector(selector);}", "get firstElementChild() {\n const children = this.childElements;\n return children.length > 0 ? children[0] : null;\n }", "function getFirstChild(el){\n var firstChild = el.firstChild;\n while(fi...
[ "0.71222126", "0.6874031", "0.6683497", "0.66753286", "0.6506406", "0.6479442", "0.64653575", "0.63457346", "0.6300332", "0.6291361", "0.625193", "0.62434274", "0.62375814", "0.62375814", "0.62031525", "0.61617935", "0.6118021", "0.6114619", "0.61062956", "0.6051164", "0.6049...
0.7225165
0
Gets the last DOM element inside the last target element.
function lastChild() { var lastElement = this.elements[0].lastElementChild; return $.make(lastElement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get lastElementChild() {\n const children = this.childElements;\n return children.length > 0 ? children[children.length - 1] : null;\n }", "get lastChild() {\n return this.childNodes[this.childNodes.length - 1] || null;\n }", "function lastElementChild(element) {\n return element....
[ "0.7637903", "0.73340315", "0.71712345", "0.7026367", "0.6971974", "0.6971817", "0.6863041", "0.6823289", "0.6790723", "0.6708482", "0.6706061", "0.66400445", "0.6639484", "0.66257507", "0.65998393", "0.65496045", "0.6548293", "0.6548293", "0.6526243", "0.6524988", "0.6406358...
0.79092
0
Checks if elements has `className`
function hasClass(className) { var callback = function(element) { return element.classList.contains(className); } return $.some(this.elements, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function class_exists(ele,className){return new RegExp(' '+className+' ').test(' '+ele.className+' ');}", "function hasClassName(el, name)\r\n{\r\n\tvar list = el.className.split(\" \");\r\n\tfor (var i = 0; i < list.length; i++)\r\n\t\tif (list[i] == name)\r\n\t\t\treturn true;\r\n\r\n\treturn false;\r\n}", "...
[ "0.7810216", "0.7722291", "0.76919335", "0.7686206", "0.7669479", "0.76359135", "0.76346874", "0.76313746", "0.76200587", "0.7611703", "0.7576394", "0.7576394", "0.7576394", "0.7562332", "0.7526393", "0.75180525", "0.7514467", "0.74864465", "0.7474461", "0.74728847", "0.74637...
0.7985071
0
Adds `className` into `elements.classList`
function addClass(className) { var callback = function(element) { element.classList.add(className); } $.forEach(this.elements, callback); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _addClass(element, className) {\n var classes;\n classes = element.className.split(' ');\n\n if (classes.indexOf(className) === -1) {\n classes.push(className);\n element.className = classes.join(' ').trim();\n }\n }", "function addClass(element, clas...
[ "0.7703517", "0.76597637", "0.7616787", "0.75579274", "0.75579274", "0.7458053", "0.7455986", "0.73349655", "0.7328589", "0.7251251", "0.723225", "0.7192924", "0.71915114", "0.7154579", "0.7137656", "0.7130702", "0.7122294", "0.7101417", "0.7100905", "0.7091241", "0.7087179",...
0.7770585
0
Removes `className` from `elements.classList`
function removeClass(className) { var callback = function(element) { element.classList.remove(className); } $.forEach(this.elements, callback); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeClass(element, className) {\n var classes = element.className.split(' ');\n var index = classes.indexOf(className);\n if (index != -1) {\n classes.splice(index, 1);\n }\n element.className = classes.join(' ');\n }", "function removeClassFromElement(element, class...
[ "0.81619996", "0.7857383", "0.78192496", "0.78089786", "0.7763882", "0.7744769", "0.76960444", "0.7664695", "0.7664695", "0.76524913", "0.7628687", "0.7623164", "0.76195395", "0.7602345", "0.758948", "0.7589376", "0.7577607", "0.75616395", "0.75179845", "0.75142246", "0.74926...
0.79272777
1
Return the headerDep. Create if necessary.
function headerDep(obj) { if (!obj.headerDep) obj.headerDep = new Deps.Dependency(); return obj.headerDep; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHeader(element) {\n var header = element._header;\n if (!(header instanceof Header)) {\n header = new Header(element);\n header.init();\n element._header = header;\n }\n return header;\n}", "function Header() {\n return (null);\n}", "get headerField() {\n\t\tret...
[ "0.64863026", "0.6343372", "0.61786133", "0.6176119", "0.6103886", "0.6061867", "0.6003911", "0.5950214", "0.5950214", "0.582665", "0.582665", "0.58182395", "0.58168644", "0.580807", "0.5798187", "0.57967436", "0.5779843", "0.57793534", "0.57695425", "0.5763114", "0.57369804"...
0.7892488
0
API client does not make any requests immediately after creation so we simulate this by creating the emulator lazily. The outcome is that an attempt to access a queue that does not exist throws only at the access invocation, which is in line with API client.
_getEmulator() { if (!this.emulator) { this.emulator = new request_queue_emulator_1.RequestQueueEmulator({ queueDir: this.queueDir, dbConnections: this.dbConnections, }); } return this.emulator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initQueueMember(queueMember) {\n queueMember.status = \"NONE\";\n queueMember.nightmare = Nightmare({ show: NIGHTMARE_DEBUG , openDevTools: NIGHTMARE_DEBUG, waitTimeout: 30000});\n showDebug && console.log(\"initQueueMember: init a nightmare. index=\"+queueMember.index);\n}", "function init() {...
[ "0.5450178", "0.5339962", "0.5230624", "0.5205882", "0.51960784", "0.51298136", "0.51098543", "0.5091567", "0.5052698", "0.5039055", "0.5007846", "0.49805462", "0.49750844", "0.49553266", "0.49410054", "0.48877352", "0.4881797", "0.48787743", "0.48678765", "0.4854361", "0.484...
0.6630116
0
Set the status bar color to brown.
_setStatusBar() { StatusBar.setBackgroundColor(colors.primary); StatusBar.setBarStyle('light-content'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeThemeColor() {\n var hostEnv = cs.getHostEnvironment();\n var UIColorObj = new UIColor();\n\n UIColorObj = hostEnv.appSkinInfo.appBarBackgroundColor;\n var red = Math.round(UIColorObj.color.red);\n var green = Math.round(UIColorObj.color.green);\n var blue = Math.round(UIColorObj.c...
[ "0.6333966", "0.6289729", "0.62152547", "0.61535275", "0.6098935", "0.6070205", "0.6000258", "0.5749771", "0.57168657", "0.5685635", "0.565962", "0.56505007", "0.56363714", "0.5471977", "0.5470337", "0.5441061", "0.5427364", "0.5413696", "0.5382532", "0.53793204", "0.53745514...
0.68173164
0
Catch login data from message sent by CP ORION via postMessage function Caught by setting an event listener to 'message' event
receiveLoginData(event) { // For Chrome, the origin property is in the event.originalEvent object. const origin = event.origin || event.originalEvent.origin; const user = event.data; // MAKE SURE FUNCTION CALLER ORIGIN IS FROM CP ORION DOMAIN! SECURITY PURPOSES. if (API_PREFIX.startsWith(origin)) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onMessageReceived(e) {\n console.log('message received');\n console.log(e);\n var msg = JSON.parse(e.data);\n console.log(msg.event);\n switch (msg.event) {\n case 'ready':\n onReady();\n break;\n case 'finish': \n ...
[ "0.67628807", "0.66631687", "0.6635717", "0.65666497", "0.65666497", "0.65666497", "0.65633726", "0.6541683", "0.648964", "0.6471408", "0.64563227", "0.64563227", "0.6440455", "0.6421991", "0.6405178", "0.6395468", "0.63910514", "0.63794863", "0.63596725", "0.6353009", "0.632...
0.6791137
0
scrape live love polish for best sellers
function scrapeLiveLove(type, page, polish, cb) { let url; // check for pages if (page) { url = `https://www.livelovepolish.com/collections/${type}?page=${page}`; } else { url = `https://www.livelovepolish.com/collections/${type}`; } // grab page with axios axios.get(url).then(function (response...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrapeMain(url){\n return new Promise((resolve, reject)=>{\n let shirtsUrl= scrapeIt(url, {\n shirts: {\n listItem: \".products li\",\n data:{\n url:{\n selector: \"a\",\n attr: \"href\",\n ...
[ "0.6372794", "0.6221338", "0.61790305", "0.6087382", "0.60043836", "0.5978189", "0.5956804", "0.5898332", "0.58934194", "0.5867294", "0.58341694", "0.5776109", "0.57634497", "0.569278", "0.5662054", "0.563437", "0.5628923", "0.56155276", "0.55793077", "0.5573961", "0.5567574"...
0.7075136
0
This function will fetch a new set of serve opportunities between two dates The dates passed in should be in epoch formatted in milliseconds
function loadOpportunitiesByDate(fromDate, toDate) { return ServeOpportunities.ServeDays.query({ id: Session.exists('userId'), from: fromDate / 1000, to: toDate / 1000 }).$promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData (startDate, endDate) {\n\n let preds = fetch(predUrl + startDate + '/' + endDate).then( response => {\n return response.json();\n });\n\n let actuals = fetch(trueUrl + startDate + '/' + endDate).then( response => {\n return response.json();\n });\n\n return {'preds':pr...
[ "0.57785493", "0.5638277", "0.555821", "0.554584", "0.54902446", "0.5487268", "0.5482771", "0.54226315", "0.5419543", "0.5404012", "0.5389093", "0.5389068", "0.53817916", "0.53481394", "0.5320854", "0.53177726", "0.5300634", "0.5299379", "0.5289007", "0.5288757", "0.5259245",...
0.7065367
0