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
wrap code within anonymous function: a private namespace replace '$zoomLight2' and '$zoomLight2' below in your own plugin... constructor function for the logical object bound to a single DOM element
function $zoomLight2(elem, options) { console.log ( "$zoomLight2: Constructor called!" ); // remember this object as self var self = this; // remember the DOM element that this object is bound to self.$elem = $(elem); // default options var defaults = { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\r\n // -- singleton\r\n //console.info('--- init() zoombox', o);\r\n\r\n\r\n\r\n var aux = '<div class=\"zoombox-maincon disabled\"><div class=\"zoombox-bg\" onclick=\"\"></div><div class=\"gallery-menu-con\"></div><div class=\"bigimage-con\"></div>';\r\n\r\n ...
[ "0.61009085", "0.6004655", "0.5991387", "0.5989897", "0.5884927", "0.5878411", "0.58046687", "0.57596195", "0.5654771", "0.56412566", "0.5626897", "0.561874", "0.55701953", "0.55690664", "0.55675113", "0.55585164", "0.5548347", "0.5544995", "0.5512293", "0.55063397", "0.54992...
0.71349925
0
Chama O Servlet Para Update
function callUpdateServlet(modelo) { $.ajax({ url : 'CRUDModeloServlet', type : 'POST', data : { 'operation' : 'update', 'id-modelo' : modelo.idModelo, 'desc-modelo' : modelo.descModelo, 'id-marca' : modelo.idMarca, 'id-tipoV' : modelo.idTipoV,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function affecter (){\n var idProg = document.getElementById(\"nomProg\").value;\n var idClient = document.getElementById(\"idClient\").value;\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\",\"ServletAffecter?idProg=\" + idProg+\"&idClient=\"+idClient);\n xhr.send();\n ...
[ "0.66367984", "0.6623793", "0.6601253", "0.6584247", "0.65364546", "0.6528514", "0.65239656", "0.6421545", "0.64145356", "0.6412822", "0.6407851", "0.6407851", "0.6407851", "0.6407851", "0.6407851", "0.6407851", "0.6407851", "0.63939834", "0.63856524", "0.63620824", "0.636208...
0.66577697
0
commonHandler for all request to get record from DB and sending response
async function commonHandler(req, res, next, query, params){ const execParamQuery = require('./mysql').execParamQuery; try { //get result from db let result = await execParamQuery(query, params); //if no result from execParamQuery if(typeof result != "undefined") res.send(200...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getResults_Read_(req, res) {\n let returnedData = {}; // to construct response\n let rowID = req.params.id; // to Recieve table ID\n\n Model._GET_getResults_DATA_(rowID)\n .then(result => {\n // Check Error\n if (result.errno) throw result.sqlMessage;\n\n // Constructing Resp...
[ "0.67823154", "0.65394205", "0.6341277", "0.6340682", "0.63263136", "0.62787926", "0.62577283", "0.6248027", "0.6227839", "0.6214494", "0.61924505", "0.6125773", "0.610091", "0.60878277", "0.6079096", "0.6051194", "0.59960735", "0.5988705", "0.5978881", "0.59749335", "0.59676...
0.6691028
1
Get the account App Security Status from the clientSecurityPolicy API(boolean)
function getAppSecurity(org) { if (!org || org === '') { return $q.reject('A Valid organization ID must be Entered'); } var url = getDeviceSettingsUrl(org) + '/clientSecurityPolicy'; return $http.get(url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAppSecurity(org, appSecurityStatus) {\n if (!org || org === '') {\n return $q.reject('A Valid organization ID must be Entered');\n }\n\n var url = getDeviceSettingsUrl(org) + '/clientSecurityPolicy';\n\n return $http.put(url, {\n clientSecurityPolicy: appSecurityStatus...
[ "0.581747", "0.5352693", "0.52865714", "0.52651596", "0.5203136", "0.50665516", "0.5058455", "0.5025176", "0.49933642", "0.49762806", "0.49762806", "0.4973998", "0.49713036", "0.49325034", "0.49218863", "0.4903878", "0.48940283", "0.4884659", "0.48079252", "0.4795072", "0.478...
0.6412409
0
Sets the updated App Security Status to clientSecurityPolicy API on Save button event
function setAppSecurity(org, appSecurityStatus) { if (!org || org === '') { return $q.reject('A Valid organization ID must be Entered'); } var url = getDeviceSettingsUrl(org) + '/clientSecurityPolicy'; return $http.put(url, { clientSecurityPolicy: appSecurityStatus }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save(evt) {\n evt.preventDefault();\n let {$el} = this,\n scopes = this.stores.essentials.getAllScopes(),\n ownerscopes = this.ownerscopeList\n .getSelection()\n .map(s => s.split('.'))\n .map(([res...
[ "0.57589805", "0.5400429", "0.5391007", "0.53879046", "0.53879046", "0.5382807", "0.5344595", "0.5297624", "0.52225786", "0.5218878", "0.521565", "0.5204822", "0.51965827", "0.5172197", "0.5138955", "0.51374745", "0.50815547", "0.506665", "0.5040616", "0.504044", "0.502754", ...
0.6437358
0
renders html for a course. goes right before the closing li below
function render_course_listing(course) { var html = ''; var html = html + '<li style="overflow:hidden;" class="available_course" id="list_'+course.id+'">'; var html = html + '<span class="fa fa-plus-square fa-2x" style="color:green;" alt="'+course.additional_info+'" id='+course.id+'></span>'; var html = html + '<sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function courseTemplate(name, details){\n return `<li class=\"course\">\n ${name}\n <div class=\"details\">\n ${details}\n </div>\n </li>`\n}", "function formatCourses(res){\n var myCourses = \"\";\n for(x in res){\n myCourses += \n '<a class=\"courseLink\" href=\"/c...
[ "0.6736274", "0.67305535", "0.6712844", "0.6670324", "0.6571993", "0.65484846", "0.6464477", "0.63584346", "0.6318626", "0.62707394", "0.62407494", "0.6237047", "0.62290573", "0.6091246", "0.605301", "0.6047322", "0.60385805", "0.60013634", "0.5983282", "0.59710366", "0.59537...
0.75742996
0
fills classlisttarget with all of the courses.
function populate_course_list() { $('#classlisttarget').empty(); $.each(window.courses, function(index, course) { html = render_course_listing(course); $('#classlisttarget').append(html); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n this.c.forEach(course => this.addClass(course));\n }", "function initializeCourses() {\n\t// loadCourses(fillAccordion);\n\t\t// not used so far\n}", "rearrageCourses(){\n\t\tthis.major1Courses=[];\n\t\tthis.major2Courses=[];\n\t\tthis.outsideCourses=[];\n\t\tfor(var i=0;i<this.allCourses.l...
[ "0.60611016", "0.60015076", "0.5915198", "0.55650496", "0.5552811", "0.5534785", "0.5475368", "0.5431384", "0.52753866", "0.52703565", "0.5253845", "0.52511", "0.52405775", "0.52338123", "0.52196246", "0.51860344", "0.5182255", "0.51525116", "0.51382893", "0.5108103", "0.5097...
0.74429834
0
Function will load shortcode settings for selected ID.
function vc_timetable_load_settings(on_editor_load) { if(typeof(on_editor_load)==="undefined") on_editor_load = false; var shortcodeId = $(".vc_ui-panel-content .vc_shortcode-param select[name='shortcode_id']").val(); if(!on_editor_load) vc_timetable_settings_reset(); if(shortcodeId!="-1") { var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function settings_load(){\n\t\tvar send_params = {};\n\t\tsend_params['_object'] = 'settings';\n\t\tsend_params['_action'] = 'get';\n\t\tapi_get(send_params, settings_load_callback);\n\t}", "function loadSettings() {\n\tconst unit = dataStore.readSettings('unit') || 'px';\n\tconst size = dataStore.readSettings('...
[ "0.6100973", "0.56592005", "0.5552432", "0.55293983", "0.5474727", "0.545368", "0.5349928", "0.5310011", "0.5276132", "0.5249878", "0.52331215", "0.52041763", "0.51747227", "0.5161723", "0.51476014", "0.512923", "0.5120994", "0.50667673", "0.50538933", "0.5050248", "0.5025625...
0.6154875
0
visual composer clear timetable configuration
function vc_timetable_settings_reset() { for(var prop in vc_tt_fields) { if(!vc_tt_fields.hasOwnProperty(prop)) continue; var field = vc_tt_fields[prop], $field = $(field.selector); if(["textfield", "textarea","multidropdown", "dropdown"].indexOf(field.type)!==-1) $field.val(field.default); i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTimeTableState() {\n setTimeTable([]);\n }", "refreshTimeline() {\n this.items.clear();\n\n scenarioRepo.getAllPhases(currentScenario).forEach(p => {\n if (selectedPhases.includes(p.phaseID)) {\n this.addNewData(p.events, true);\n } else {\n ...
[ "0.60896575", "0.56603545", "0.565475", "0.561999", "0.5572613", "0.5550831", "0.55030245", "0.54910165", "0.5462008", "0.5445161", "0.5440117", "0.54052716", "0.54052716", "0.54052716", "0.54052716", "0.53821456", "0.53418976", "0.53300226", "0.53229856", "0.53229856", "0.53...
0.58875906
1
For moving witch towards left
function moveLeft(){ let initialPosLeft = witch.getBoundingClientRect().left; let lifeLeft = witch_lifeline.getBoundingClientRect().left; if(initialPosLeft > 32){ witch_lifeline.style.left = lifeLeft - 20 + 'px'; witch.style.left = initialPosLeft - 20 + 'px'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "leftTurn() {\r\n this.fltire.rotateY(16);\r\n this.frtire.rotateY(16);\r\n }", "function left_move() {\n if (coord_pos[0] > 0) {\n coord_pos[0] -= 1;\n }\n else if(coord_pos[1] > 0) { // If we need to wrap around (and have room to)\n coord_pos[0] = n;\n coord_pos[1] -= 1;\n ...
[ "0.7249471", "0.7222354", "0.7185683", "0.71202034", "0.71077204", "0.7096112", "0.70754623", "0.70580965", "0.7057664", "0.70355636", "0.6983956", "0.69792676", "0.69743353", "0.6958847", "0.6947837", "0.6942206", "0.69414884", "0.6928281", "0.6891801", "0.68427104", "0.6830...
0.7742962
0
Change the page to results
toResults() { this.setState({ page: 4 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageUpdate() {\n tabledData.beginSlice(pageStart);\n tabledData.endSlice(pageStart + pageEntries);\n showResults();\n }", "function resultsPageDirect() {\n if (c === 100) {\n localStorage.setItem(\"userSelections\",userSelections)\n location.replace(\"results.html\")\n ...
[ "0.67218935", "0.6640692", "0.66340995", "0.6627083", "0.65679395", "0.6530145", "0.6485815", "0.6461513", "0.64343935", "0.6401681", "0.63535166", "0.6294052", "0.62827146", "0.6265425", "0.6211571", "0.6206213", "0.62024903", "0.6195659", "0.6195026", "0.61800474", "0.61739...
0.6856351
0
choose a category and a question
function catAndQuest() { start.style.display = 'none'; showButtons(); document.getElementById('points').innerHTML= 'Points: ' + (points); document.getElementById('count').innerHTML= 'Question ' + (++count) + ' \/ 5'; currentCategory = Questions.map(function(question) { return question.category; }); cat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function category(category){\n var movies = 0;\n var sports = 1;\n var history = 2;\n var philosophy = 3;\n var random = 4;\n var music = 5;\n \n //Category chosen\n categoryChosen = category;\n \n \n \n switch(categoryChosen){\n \n case movies:\n cor...
[ "0.77759707", "0.66725785", "0.6591117", "0.6439364", "0.6326415", "0.62888473", "0.6278886", "0.6246505", "0.61958057", "0.6170097", "0.6160043", "0.614956", "0.613408", "0.6101726", "0.6080481", "0.60571957", "0.5994995", "0.5990655", "0.59260184", "0.59094936", "0.590653",...
0.697827
1
1. No EAS project ID in config, then use anonymous scope key 2. When offline or not logged in a. If code signing not accepted by client (only legacy manifest signing is supported), then use anonymous scope key b. If code signing accepted by client and no development code signing certificate is cached, then use anonymou...
async function shouldUseAnonymousManifestAsync(easProjectId, codeSigningInfo) { if (!easProjectId || _settings.APISettings.isOffline && codeSigningInfo === null) { return true; } return !await (0, _user).getUserAsync(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f(e, t) {\n var n = t || e.options.issuer;\n return s.a.get(e, n + \"/.well-known/openid-configuration\", {\n cacheResponse: !0\n });\n }", "function identity (string = undefined) {\n if (string) return PrivateKey.fromString(string)\n // Create a ...
[ "0.5521909", "0.55120194", "0.5401035", "0.538551", "0.53846824", "0.53127444", "0.5301159", "0.52999943", "0.5288791", "0.5285222", "0.5256731", "0.52504236", "0.5247619", "0.52365196", "0.5226941", "0.5222008", "0.5207295", "0.51835066", "0.51811314", "0.5157466", "0.514591...
0.5551499
0
Establish a connection to the signal server, and itialize our swarm
connect() { this.hub = signalhub(this.channel, [ CONSTANTS.SIGNAL_SERVER ]); this.sw = swarm(this.hub, this.options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onConnect() {\n console.log(\"STretch Connected\");\n }", "start() {\n this.setupDoorbellSocket();\n this.setupMQTT();\n this.initLogin();\n }", "start(cb) {\n let app = require('../pomelo').app;\n let self = this;\n\n let gensocket = function(socket) {\n let hybridsocket = ne...
[ "0.65586007", "0.65537417", "0.6380191", "0.63654095", "0.6288045", "0.62850136", "0.6234456", "0.6227542", "0.62224287", "0.61588305", "0.6105516", "0.6094133", "0.608064", "0.60775554", "0.6047396", "0.6038784", "0.60348666", "0.6030205", "0.60238045", "0.60112023", "0.6009...
0.83429486
0
Disconnect from our hub and close our swarm
disconnect(callback = _.noop) { this.hub.close(() => { this.sw.close(); callback(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n console.log(\"disconnecting\");\n this._distributeMessage('remove', '');\n clearInterval(this._swarmUpdater);\n this._server.close();\n Object.keys(this._connections).forEach(function(key) {\n this._connections[key].socket.end();\n }, this);\n }",...
[ "0.745177", "0.7407844", "0.7365909", "0.72258073", "0.71573687", "0.7153987", "0.7083499", "0.70064116", "0.6991165", "0.6990788", "0.697558", "0.6971589", "0.6962188", "0.69306165", "0.6852989", "0.6852942", "0.6842108", "0.681906", "0.6815608", "0.68014747", "0.6799751", ...
0.7890423
0
Read the structured config to determine which broadcast engine we'll use, then set the data needed for it.
function selectBroadcastEngine(cfg) { if (!cfg.broadcastEngine.selected) { // FIXME - add to config schema if (cfg.broadcastEngine.pubnub) { cfg.broadcastEngine.selected = 'pubnub'; } else if (Object.keys(cfg.broadcastEngine.codestreamBroadcaster).length != 0) { cfg.broadcastEngine.selected = 'codestreamBr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function init_config() {\n var regex = {\n param: /^\\s*([\\w\\.\\-\\_]+)\\s*=\\s*(.*?)\\s*$/,\n comment: /^\\s*;.*$/\n };\n var local = {\n urltime: 60,\n softrefresh: 86400,\n zoom: 1,\n init_page_delay: 0.5, // how many seconds does this page take to fini...
[ "0.54297197", "0.5308147", "0.5232976", "0.5224677", "0.52095306", "0.5170536", "0.5158077", "0.51245606", "0.51141834", "0.51037395", "0.5062406", "0.5041469", "0.5032897", "0.50149906", "0.50047696", "0.49992955", "0.4995524", "0.49864385", "0.49822617", "0.4956974", "0.493...
0.6171731
0
Read the structured config to determine which queuing engine we'll use and then set the data needed for it
function selectQueuingEngine(cfg) { if (!cfg.queuingEngine.selected) { // FIXME - add to config schema cfg.queuingEngine.selected = cfg.queuingEngine.rabbitmq ? 'rabbitmq' : 'awsSQS'; } if (!cfg.queuingEngine[cfg.queuingEngine.selected].outboundEmailQueueName) { cfg.queuingEngine[cfg.queuingEngine.selected].ou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n // percorrer o jobs\n jobs.forEach(({ key, handle }) => {\n // configuracoes:\n this.queues[key] = {\n bee: new Bee(key, {\n redis: redisConfig, // importada de ../config/redis'\n }),\n handle, // metodo que processa o Job (executa as tarefas)\n };\n ...
[ "0.57612014", "0.54783154", "0.5407738", "0.53535104", "0.5241094", "0.52355176", "0.5230158", "0.51834947", "0.5148067", "0.5143675", "0.50901586", "0.5066378", "0.50598156", "0.50483906", "0.5037108", "0.5026297", "0.50080806", "0.4961033", "0.4955225", "0.49221292", "0.490...
0.6547389
0
A special wrapper for that knows how to handle "sub"routes by passing them in a `routes` prop to the component it renders.
function RouteWithSubRoutes(route) { return ( <Route path={route.path} render={(props) => ( // pass the sub-routes down to keep nesting <route.component {...props} routes={route.routes} /> )} /> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RouteWithSubRoutes(route) {\n return (\n <Route\n path={route.path}\n render={props => (\n // pass the sub-routes down to keep nesting\n <route.component {...props} routes={route.routes} />\n )}\n />\n );\n}", "function RouteWithSubRoutes(route) {\n return (\n <R...
[ "0.7579681", "0.7449727", "0.6814118", "0.6589318", "0.65810376", "0.6572813", "0.6572033", "0.64619994", "0.636954", "0.636954", "0.636954", "0.6364925", "0.6353245", "0.62527883", "0.62525624", "0.6159269", "0.61215997", "0.6062567", "0.59980273", "0.5975609", "0.5934989", ...
0.76199234
0
resize Phaser game window
function resizeGameWindow() { Game.engine.scale.setGameSize($( window ).width(), $( window ).height()*0.8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resize() {\n // Div containing the generated canvas of the game\n let div = document.getElementById(\"phaser\");\n // The generated game canvas\n let canvas = document.querySelector(\"canvas\");\n // Grabbing the values of the window height and width\n let windowW...
[ "0.8054125", "0.7922565", "0.7859949", "0.7818191", "0.75934905", "0.75934905", "0.74643826", "0.7463228", "0.7439138", "0.7428166", "0.74210376", "0.7397648", "0.7393592", "0.7350557", "0.73187834", "0.73052084", "0.72927976", "0.72766364", "0.72766364", "0.7276266", "0.7269...
0.82878715
0
map the distance (0 closeness) to 0255 for color mapping
function mapCloseness(dist) { return (closeness - dist) * 255 / closeness; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getColorFromDistanceFromNearestCircle(distance) {\n if (distance <= 0) {\n return [0, 0, 0, 255];\n }\n else if (distance <= this.cutOff && this.cutOff > 0.00001) { // Interpolate from black to red.\n const val = Math.max(Math.min(Math.round(255*distance/this.cutOff), 255), 0);\n return [va...
[ "0.7261468", "0.6539189", "0.6516217", "0.6505559", "0.64115584", "0.6311168", "0.6309449", "0.6304532", "0.6304532", "0.6212132", "0.62095577", "0.62013566", "0.6175196", "0.61371464", "0.607808", "0.60623646", "0.6056303", "0.6031251", "0.60279316", "0.5986762", "0.5899576"...
0.71814424
1
Get GIF url from src and replace it.
function showGif() { $('img').each(function(){ var old_src = $(this).prop('src'); if (old_src.indexOf('gifUrl=') != -1) $(this).prop('src', old_src.substring(old_src.indexOf('gifUrl=') + 7)); // 'gifUrl='.length = 7 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showGif(){\r\n $('img').each(function(){\r\n var old_src = $(this).prop('src');\r\n\r\n if (old_src.includes('?gifUrl='))\r\n $(this).prop('src', old_src.substring(old_src.indexOf('gifUrl') + 7)); // 'gifUrl='.length = 7\r\n });\r\n}", "function resetGif(gif){\n\t\tvar gif...
[ "0.74774253", "0.70307106", "0.6822137", "0.6822137", "0.6808501", "0.6614531", "0.6584346", "0.6530758", "0.65018857", "0.64835644", "0.6468448", "0.64311975", "0.6415594", "0.63626724", "0.63563675", "0.6305811", "0.6300653", "0.6240911", "0.62385684", "0.62375927", "0.6236...
0.74953675
0
Method to organise pairs of flights that match
setPairs(origin, dest) { var pairsList = []; origin.forEach(originFlight => { dest.forEach(destFlight => { if (((originFlight.departDate !== destFlight.departDate) || (originFlight.arriveTime < destFlight.departTime))) { pairsList...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFlightsWithAirports(input, originAirport, destinationAirport) {\n\n\n var res = {\n \"outgoingFlights\": []\n };\n\n var resRT = {\n \"outgoingFlights\": [],\n \"returnFlights\": []\n };\n\n if (Object.keys(input).length === 1) {\n\n for (var i = 0; i < input.outgoingFlights.length; i+...
[ "0.6022277", "0.5636645", "0.5549501", "0.5530341", "0.5442987", "0.53948146", "0.5327022", "0.53072584", "0.5306678", "0.5297726", "0.5296297", "0.5295712", "0.5282722", "0.52418965", "0.52290094", "0.52110803", "0.5208784", "0.52024454", "0.518943", "0.51756084", "0.5175608...
0.59545213
1
Filter object by keys
function filterObjectByKeys(object, filterKeys = []) { let newObject = {}; filterKeys.forEach((key) => { if (object.hasOwnProperty(key)) { newObject[key] = object[key]; } }); return newObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterKeys(keys) {\n return _.filter(keys, (key) => !_.includes(exports.options.ignore, key));\n}", "function filterByKeys(inputObject, keep) {\n if (!Array.isArray(keep) || keep.length === 0) {\n return inputObject;\n }\n var result = {};\n for (var i = 0, len = keep.length; i < l...
[ "0.687314", "0.675204", "0.6570429", "0.6499819", "0.64322877", "0.6428684", "0.6388087", "0.63648593", "0.6247708", "0.6180108", "0.60936165", "0.60454875", "0.5944344", "0.58786684", "0.5855573", "0.5787695", "0.5787378", "0.5782779", "0.57166386", "0.56942266", "0.5688688"...
0.69178087
0
Private Draws list of layers and viewports into the picking buffer Note: does not sample the buffer, that has to be done by the caller
_drawPickingBuffer({ layers, layerFilter, views, viewports, onViewportActive, pickingFBO, deviceRect: {x, y, width, height}, pass = 'picking', redrawReason, pickZ }) { const gl = this.gl; this.pickZ = pickZ; // Track encoded layer indices const encodedColors = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw() {\n // always draw our ping pong planes first!\n this.drawPingPongStack();\n\n // enable first frame buffer for shader passes if needed\n this.enableShaderPass();\n\n // our planes that are drawn onto a render target\n this.drawStack(\"renderTargets\");\n\n /...
[ "0.64158016", "0.6386303", "0.63620156", "0.632061", "0.6205799", "0.6200768", "0.61920094", "0.6074679", "0.6068167", "0.60516983", "0.60516983", "0.60180146", "0.59808135", "0.5971477", "0.59323674", "0.58830976", "0.5878732", "0.5854212", "0.5846633", "0.5836045", "0.58340...
0.67802083
0
Returns the list of all articles on database
function list() { return db.allDocs({ /*This tells the server to get all docs that start with article*/ startkey: 'article', endkey: 'article{}', inclusive_end: true, /*Include not just the key but all fields...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAll() {\n return new Promise((resolve, reject) =>\n this.db.query(\"SELECT * FROM articles ORDER BY list_id, articles\")\n .then(res => resolve(res.rows))\n .catch(e => reject(e)))\n }", "function findAll() {\n return fs.readFile(dbPath, \"utf-8\").then((jso...
[ "0.76595944", "0.76392007", "0.7429106", "0.71426684", "0.70065755", "0.69091094", "0.6873282", "0.67843425", "0.66747826", "0.6613103", "0.64482445", "0.6394513", "0.6390519", "0.6284813", "0.6229811", "0.62250507", "0.62232405", "0.6176672", "0.61338913", "0.6129539", "0.61...
0.8149787
0
Create a new article and save to database
function create(article) { article.type = 'article'; article._id = 'article-' + (new Date()).toISOString(); return db.put(article); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savePost(req,res,article)\n{\n article.title = req.body.name;\n article.description = req.body.description;\n article.save()\n res.redirect(`/articles/${article.slug}`)\n \n}", "function createArticle (articleInfo) {\n try {\n return fetch('/api/newarticle', {\n method: 'POST',\n...
[ "0.7090717", "0.70399684", "0.7004329", "0.68807733", "0.6837882", "0.67527515", "0.6729141", "0.65849197", "0.6529233", "0.6528619", "0.6462121", "0.6411903", "0.6365108", "0.63517815", "0.6348342", "0.63436353", "0.6336426", "0.6331926", "0.63033545", "0.6297065", "0.622151...
0.767287
0
Update (edit) article by article object
function update(article) { return db.put(article); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateArticle(article) {\n\t\t\treturn $http.put('http://localhost:4000/articles', article).success(function (res) {\n\t\t\t\treturn res;\n\t\t\t});\n\n\t\t}", "async function updateArticle(article) {\n try {\n const response = await HTTP.put('/services/articles/'+article.id,article);\n ...
[ "0.7351625", "0.69841385", "0.6352509", "0.6342967", "0.6244682", "0.62408143", "0.60097367", "0.5901078", "0.5878853", "0.5869779", "0.5867619", "0.5866037", "0.5862043", "0.5842567", "0.583448", "0.58316255", "0.5797903", "0.57769394", "0.5742967", "0.5723585", "0.57156754"...
0.7422383
0
Query a custom view for articles by classroom id
function listByClass(id) { return db.query('my_index/by_classroom', { key: id, include_docs: true }) .then(function(res) { /*Gets*/ console.log(res.rows); return res.rows.map(f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findArticles() {}", "function displayArticle() {\n\n var article = $(this).attr(\"article-name\");\n var queryURL = 'https://api.nytimes.com/svc/search/v2/articlesearch.json?q=' + articleRequest + '=election&api-key=LYzWgxYCysNiAmcwGN5cXJnHCfBcsUYR'\n }", "async show({ params, request...
[ "0.5855391", "0.55953133", "0.54458123", "0.54113406", "0.53749925", "0.53257185", "0.52583104", "0.5204763", "0.51657766", "0.5101397", "0.50941193", "0.50858545", "0.50600666", "0.5044859", "0.5044515", "0.5015876", "0.5015876", "0.5012203", "0.50067586", "0.49919528", "0.4...
0.58067834
1
reveals all mines (called on gameover)
function reveal_all_mines() { var i, j; for( i = 0; i < w_input; i++ ) { for( j = 0; j < h_input; j++ ) { if( minefield[ i ][ j ] == 9 ) { reveal( i, j ); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMines() {\n if (currentMine >= minesTotal) return\n setTimeout(() => {\n showMine(mines[currentMine++])\n showMines()\n }, 50)\n }", "function revealMines() {\n for (let mine in mineMap) {\n const div = document.querySelector(`[data-position='${m...
[ "0.75596184", "0.6709606", "0.6697027", "0.66888833", "0.6671171", "0.65560955", "0.6555378", "0.63752985", "0.63174886", "0.63101226", "0.62266195", "0.6149769", "0.61476904", "0.6120714", "0.60621256", "0.60437983", "0.59909344", "0.59434307", "0.5940061", "0.59087235", "0....
0.69830287
1
check whether subject exists or not
function checkSubject(sSubject){ var iCounter=0; var sSubjectName = ""; for(iCounter = 0; iCounter < oSubjectList.length; iCounter++){ if(oSubjectList[iCounter]["SubjectCode"] === sSubject){ sSubjectName = oSubjectList[iCounter]["Subject"]; break; } } for(iCounter = 0; iCounter < sHeade...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exists(subject) {\n let sqlRequest = \"SELECT (count(*) > 0) as found FROM todo WHERE subject=$subject\";\n let sqlParams = {$subject: subject};\n return this.common.run(sqlRequest, sqlParams);\n }", "function initialSubject(subject) {\n return subject.id === option;\n }", "func...
[ "0.72510284", "0.64303154", "0.64303154", "0.6426648", "0.6359355", "0.6267834", "0.6267834", "0.6267834", "0.6267834", "0.6267834", "0.6252078", "0.6171268", "0.5932371", "0.5928095", "0.5928095", "0.5928095", "0.5928095", "0.5928095", "0.59215814", "0.5766095", "0.57367414"...
0.66872793
1
to get the subject average
function getSubjectAverage(){ var iCounter = 0; var iSize=0; var iInnerCounter=0; var oSubjectAverage1; var iSum=0; var sValue=""; var iSubjectCounter=0; oSubjectAverage={}; for(iInnerCounter=2;iInnerCounter<sHeaderList.length;iInnerCounter++){ iSum=0; if(sHeaderList[iInnerCounter] !== "" && sHeaderList[iInnerCoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArithmeticAverage (data) {\n let _data = data.reduce((acc, item) => {\n if (!Number(item.grade)) return acc;\n acc.subjects++;\n acc.acc += item.grade;\n return acc;\n }, { subjects: 0, acc: 0 });\n return (_data.acc / _data.subjects).toFixed(4);\n }", "function calculat...
[ "0.73789316", "0.7099788", "0.703095", "0.6937708", "0.68310136", "0.68199795", "0.67937416", "0.6771678", "0.67511797", "0.674572", "0.6737708", "0.6735253", "0.6708125", "0.6698212", "0.6672302", "0.66648006", "0.66627073", "0.6662185", "0.66243", "0.66210896", "0.66179097"...
0.80281246
0
to get the top students
function getTopStudents(){ var iCounter = 0; var iCounterInner = 0; var sTableBody=""; var sResult=""; var oTopStudents = oSubject1; oTopStudents.sort(function (a,b){ return b.Percentage-a.Percentage; }); for(iCounter = 0; iCounter < 5; iCounter++){ if(oSubject1){ sTableBody = sTableBody...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function topStudents (grades, numStudents) {\n let averages = studentAverages(grades)\n let sortedStudents = Object.keys(averages).sort(function (a, b) {\n return averages[b] - averages[a]\n })\n return sortedStudents.slice(0, numStudents)\n}", "function retrieve_top_ten(){\n\tlet params = {\n\t\t\t\t met...
[ "0.73270077", "0.64616936", "0.6428875", "0.6424104", "0.64018905", "0.6356962", "0.6301133", "0.62682873", "0.62610924", "0.6226984", "0.62101203", "0.6180107", "0.6127353", "0.6114897", "0.60290354", "0.6025276", "0.60001934", "0.5999779", "0.59544337", "0.5941077", "0.5897...
0.75305086
0
calculate vector value range
calculateRange() { if (!this.grid || !this.grid[0]) { return } let rows = this.grid.length let cols = this.grid[0].length // const vectors = []; let min let max // @from: https://stackoverflow.com/questions/13544476/how-to-find-max-and-min-in-array-using-minimum-comparisons for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RangeVector(p1, p2) {\nthis.vars = new Array(clSize);\n\nfor (var i=0; i<clSize; i++) /*foreach element in the new linguistic scale*/\n\t{\n\tif ((linLimits[i]>=p1)&&(linLimits[i]<=p2)) /*range limits contain the whole scale element*/\n\t\tthis.vars[i] = 1;\n\telse /*range limits intersect with the scale ...
[ "0.6755551", "0.67407215", "0.63448346", "0.6273742", "0.62180746", "0.61811006", "0.6176648", "0.6137546", "0.6104186", "0.6100745", "0.60750353", "0.60712934", "0.5960626", "0.59507376", "0.58914477", "0.58486587", "0.5841895", "0.5820371", "0.58140045", "0.58140045", "0.58...
0.71107006
0
Get interpolated grid value lonlat coordinates
interpolatedValueAt(lon, lat) { if (!this.contains(lon, lat)) { return null } let _a = this.getDecimalIndexes(lon, lat), i = _a[0], j = _a[1] return this.interpolatePoint(i, j) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "valueAt(lon, lat) {\n if (!this.contains(lon, lat)) {\n return null\n }\n let indexes = this.getDecimalIndexes(lon, lat)\n let ii = Math.floor(indexes[0])\n let jj = Math.floor(indexes[1])\n let ci = this.clampColumnIndex(ii)\n let cj = this.clampRowIndex(jj)\n return this.valueAtIndex...
[ "0.64294547", "0.6411606", "0.63531584", "0.6294522", "0.62511826", "0.6187588", "0.615391", "0.6085605", "0.6064252", "0.604391", "0.58876646", "0.5868163", "0.58546203", "0.58353764", "0.58054185", "0.58052295", "0.57760465", "0.57646656", "0.5702828", "0.5666059", "0.56563...
0.7467099
0
Creates an image loader for input file. This provides lazy cached loading of image data.
function createimageLoader(inputFilePath) { return funcUtils.memo(async () => { const [fileBuffer, loadedSharp] = await Promise.all([fse.readFile(inputFilePath), sharp.load()]); const metadata = await loadedSharp(fileBuffer).metadata(); return { buffer: fileBuffer, metadata: metadata }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LazyLoader( img, flickity ) {\n this.img = img;\n this.flickity = flickity;\n this.load();\n}", "function LazyLoader( img, flickity ) {\n this.img = img;\n this.flickity = flickity;\n this.load();\n}", "function LazyLoader( img, flickity ) {\n this.img = img;\n this.flickity = flickity;\n thi...
[ "0.6184591", "0.6184591", "0.6184591", "0.6184591", "0.6184591", "0.6184591", "0.59111387", "0.59108", "0.5899368", "0.58785105", "0.58777493", "0.5868106", "0.58312076", "0.582816", "0.58124256", "0.58124256", "0.58124256", "0.58124256", "0.58124256", "0.58124256", "0.578451...
0.79190993
0
Ensures that the resultign PNG file exists on the fileystem. In case the file does not exist yet, or it is older than the current configuration, it will be generated. Otherwise the existing file will be left in place, and its last modified time will be updated.
async function ensurePngUpToDate(imageLoader, scale, outputFilePath, outputOptions) { if (await cache.isFileOutdated(outputFilePath, await asyncConfig)) { const inputFile = await imageLoader(); await generatePng(inputFile, scale, outputFilePath, outputOptions); } else { await fsUtils.updateLastModifiedT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFile() {\n fileName = document.getElementById(\"miiText\").value\n newDir = path.join(FileSystem.currentDirectory, fileName)\n absolutePath = path.resolve(newDir);\n correctedPath = path.normalize(absolutePath);\n errorMessage = document.createElement(\"P\")\n errorMessage.style.po...
[ "0.631913", "0.5765798", "0.5760902", "0.56726104", "0.5619978", "0.556486", "0.5501445", "0.54478586", "0.5410544", "0.54026455", "0.53381234", "0.5301118", "0.5278565", "0.5267582", "0.52510405", "0.5229268", "0.52133834", "0.5192899", "0.51883835", "0.5181036", "0.517902",...
0.63729256
0
draws line from previous dot
function draw_line(e){ //console.log("PrevX:"+prevX); draw_dot(e); ctx.lineTo(e.offsetX,e.offsetY); ctx.stroke(); //console.log("PrevX:"+prevX); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawline() {\n\n if (isDrawing) {\n linePoint2 = d3.mouse(this);\n gContainer.select('line').remove();\n gContainer.append('line')\n .attr(\"x1\", linePoint1.x)\n .attr(\"y1\", linePoint1.y)\n ...
[ "0.7424513", "0.73573416", "0.71610445", "0.7150764", "0.7097041", "0.70884466", "0.70607597", "0.6958104", "0.69408184", "0.6919063", "0.6869451", "0.68376565", "0.68376565", "0.67998874", "0.67951983", "0.6785989", "0.67665297", "0.67649895", "0.67162293", "0.670335", "0.66...
0.7805798
0
the function create an array of points so that the object can move along a bezier curve
function setAnimationPoints(){ var a = vec4(0, 0, 0, 1); var b = vec4(-5, -25, 0, 1); var c = vec4(5, -25, 0, 1); var d = vec4(0, 0, 0, 1); var bezier = new Bezier([a, b, c, d]); animationPoints = bezier.vertices; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPath() {\n\n path = [];\n\n for (let p = 0; p < points.length; p++) {\n if (points[p] !== undefined) {\n path.push(new PathPoint(points[p].x, points[p].y, getPointDistance(p), getPointCurvature(p), getPointVelocity(p)));\n }\n }\n\n for (let p = points.length - 2...
[ "0.7340581", "0.7146957", "0.70882", "0.70305705", "0.7018614", "0.7008011", "0.6913996", "0.67581624", "0.6727744", "0.6667292", "0.6622232", "0.65702444", "0.6534445", "0.65331894", "0.6518656", "0.64847136", "0.646452", "0.64584625", "0.64537114", "0.64130974", "0.6387743"...
0.72365624
1
Selecting board's main focused image
function selectBoardImage(_board) { if (_board === 'Horseboard') { if (isAndroid) { return "/images/hbMainFocus.png"; } else { return "hbMainFocus@2x.png"; } } else if (_board === 'Salesboard') { if (isAndroid) { return "/images/sbMainFocus.png"; } else { return "sbMainFocus@2x.png"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_active_image() {\n // detecto la imagen que esta al frente.\n if (getComputedStyle(ref_image_1).zIndex == 1) { image = 1; return ref_image_1.src }\n if (getComputedStyle(ref_image_2).zIndex == 1) { image = 2; return ref_image_2.src }\n if (getComputedStyle(ref_image_3).zIndex == 1) { image...
[ "0.6227093", "0.61982554", "0.6158079", "0.6157006", "0.60551363", "0.6043889", "0.60275286", "0.6005152", "0.5997721", "0.5976611", "0.5956931", "0.59549963", "0.59461886", "0.59400856", "0.59208775", "0.59125304", "0.5892689", "0.5882897", "0.58788055", "0.5872318", "0.5823...
0.7313307
0
Every time custom label is selected it will be saved as label in the current `commitType` context
async function askCustomLabel(input) { try { const label = await promptInput_1.promptInput(constants_1.ASK_FOR_CUSTOM_LABEL); const key = input.commitType.key.toLowerCase(); /** * When this is not the first label for this `commitType` context */ const loaded = packa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addLabel() {\n this.scope_['value']['value']['label_names'].push(\n {type: 'unicode', value: this.defaultLabel_});\n }", "getAddNewLabel() {\n return 'Add New';\n }", "function createlabel(label, callback) {\n // upload a label to the repository\n _post('createlabel', label, callback);\n}"...
[ "0.59932244", "0.574324", "0.57160443", "0.5708049", "0.55977416", "0.55800015", "0.5574979", "0.55531675", "0.5540977", "0.5506582", "0.54883945", "0.5483463", "0.5458408", "0.5435566", "0.54217505", "0.54026824", "0.53791475", "0.53421307", "0.5288399", "0.5254768", "0.5253...
0.69428086
0
RENDER NAV BUTTONS BASED ON SUBSCRIPTION OR SESSION
renderButton(course) { if (this.subscription(course.id)) { return <NavLink to={`/courses/${course.id}`}><button>Go to {course.title}</button></NavLink> } else if (this.props.user) { return <button class="subscribe" onClick={() => this.props.createSubscription(this.props.user.id, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderMenu(){\r\n return TokenService.hasAuthToken() ? this.renderLogoutLink() : this.renderLoginLink();\r\n }", "function app_render_navigation() {\r\n\r\n $('nav').empty();\r\n appData.tagList.forEach(function (value, index) {\r\n let myHTML = `<button class=\"app_nav_cell\" data-index=\...
[ "0.65357107", "0.6231987", "0.6141174", "0.6001693", "0.5991362", "0.5966187", "0.59640664", "0.59116393", "0.5871816", "0.5862352", "0.58513445", "0.5835921", "0.5798478", "0.57962614", "0.5793909", "0.5779621", "0.5756681", "0.5740764", "0.57361215", "0.57339907", "0.569550...
0.63434976
1
EXAMPLE 2 Make a promisebased function for reading properties from window
function readPropertyFromWindow (propertyName) { return new Promise((resolve) => { workerProof( (propName, callback) => { callback(window[propName]) }, { args: propertyName, multipleCallbacks: false, callback: resolve } ) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readPropertyFromWindow (propertyName) {\n return new Promise(function (resolve) {\n workerProof(\n function (propName, callback) {\n callback(window[propName]);\n },\n {\n args: propertyName,\n multipleCallbacks: false,\n callback: resolve\n }\n );\n ...
[ "0.77969587", "0.5885585", "0.573764", "0.573764", "0.573764", "0.5679379", "0.56549853", "0.5557791", "0.55551255", "0.5550846", "0.54969215", "0.5401124", "0.5388719", "0.5352512", "0.5328916", "0.52799356", "0.52373767", "0.5218797", "0.5214842", "0.52122384", "0.52093494"...
0.77962095
1
Display shortened forms of url
urlShorten(url) { let name = url; if (url.length > 50) { name = url.substr(0, 33); name += "..."; name += url.substr(-14); } return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayShortenedUrl(res) {\n link.textContext = res.data.shortUrl;\n link.setAttribute('href', res.data.shortUrl);\n shrBox.style.opacity = '1';\n urlBox.value = '';\n}", "function expandShortUrlToLongUrl(req, res, next) {\n\tif(!req.query.shortUrl) {\n return res.status(400).send({\"status\": \"...
[ "0.7373044", "0.71128136", "0.7048883", "0.6996192", "0.6782515", "0.6695542", "0.66748565", "0.6575434", "0.64613146", "0.63683337", "0.63679755", "0.63225484", "0.631079", "0.6243177", "0.62342006", "0.62078166", "0.6176099", "0.6174629", "0.6173265", "0.614483", "0.6134107...
0.734003
1
Implement a function called insertBefore() in the class that inserts a new node before a given node containing a key. O(n)
insertBefore(key, value) { if(this.head === null) { this.head = new _Node(value, this.head) } else { let currNode = this.head let prevNode = this.head while(currNode !== null && currNode.value !== key) { prevNode = currNode ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertBefore(item, key) {\n //start at list head\n let currNode = this.head;\n //if no head, list is empty\n if (!currNode) {\n return null;\n }\n //if the node containing the key is the head, use insertFirst\n if (currNode.value === key) {\n t...
[ "0.80753654", "0.8058147", "0.7412678", "0.7235713", "0.72184515", "0.7210064", "0.7160423", "0.7115891", "0.7091858", "0.7091858", "0.6952018", "0.68583626", "0.68384635", "0.6823863", "0.6746415", "0.6711083", "0.66955817", "0.66869205", "0.66683066", "0.6646659", "0.662376...
0.8089801
0
Implement a function called insertAfter() in the class that inserts a new node after a node containing the key. O(n)
insertAfter(key, value) { if(this.head === null) { this.head = new _Node(value, this.head) } let currNode = this.head while(currNode !== null & currNode.value !== key) { currNode = currNode.next } currNode.next = new _Node(value, currNode.next) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertAfter(value, itemToInsert){ \n //find the item after which you want to insert\n //create node\n //keep track of node after it\n //new node tracker will point to that\n if(!this.head){\n return null;\n }\n let currNode = this.head;\n while((c...
[ "0.7201317", "0.70361805", "0.6937841", "0.68753386", "0.67820865", "0.67704517", "0.6731059", "0.67281675", "0.67281675", "0.6716001", "0.6695259", "0.6693421", "0.6692898", "0.6679813", "0.6654693", "0.66450137", "0.6641732", "0.6641199", "0.6641187", "0.66230565", "0.66230...
0.7977101
0
Implement a function called insertAt() that inserts an item at a specific position in the linked list. O(n)
insertAt(item, position) { if(this.head === null) { this.head = new _Node(item, this.head) } let currNode = this.head let count = 0 while(count < position - 1) { currNode = currNode.next count++ } currNode.next = new _Node(item,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertAt(position,item){\n \n if(this.head === null){\n this.insertFirst(item);\n }\n \n let ticker = 0;\n let currNode = this.head;\n let nextNode = this.head;\n \n while ((nextNode !== null) && (ticker !== position)) {\n //save the previous node \n currNode = nextNode;\n ...
[ "0.8109776", "0.7962819", "0.795737", "0.7937804", "0.7857174", "0.7781875", "0.77744216", "0.7754465", "0.77361596", "0.7714042", "0.76878756", "0.76584464", "0.76479715", "0.7620544", "0.76154757", "0.76057994", "0.7598698", "0.7584709", "0.7563773", "0.75233865", "0.750074...
0.80733186
1
================ Week Represents a week. Functions (Methods): .nextWeek() returns a Week object sequentially in the future .prevWeek() returns a Week object sequentially in the past .contains(date) returns true if this week's sunday is the same as date's sunday; false otherwise .getDates() returns an Array containing 7...
function Week(initial_d) { "use strict"; this.sunday = initial_d.getSunday(); this.nextWeek = function () { return new Week(this.sunday.deltaDays(7)); }; this.prevWeek = function () { return new Week(this.sunday.deltaDays(-7)); }; this.contains = function (d) { return (this.sunday.valueOf() === d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "next_week() {\n this.start_date = this.start_date.next_day(7);\n return this.update_data();\n }", "function nextWeek()\n{\n\tfor(var i in datesPerWeek)\n\t{\n\t\tvar selectedDate = datesPerWeek[i].split(\"/\");\n\t\tif( parseInt(selectedDate[0]) + 7 > parseInt(daysPerMonth[selectedDate[1]-1]))\n...
[ "0.6751463", "0.6555777", "0.65463716", "0.6500371", "0.64326435", "0.640856", "0.63831127", "0.6325537", "0.6318344", "0.6275845", "0.6270744", "0.62651795", "0.62622595", "0.62101626", "0.6208402", "0.6201906", "0.6198944", "0.61138445", "0.6071061", "0.60707074", "0.606986...
0.7297915
1
Month Represents a month. Properties: .year == the year associated with the month .month == the month number (January = 0) Functions (Methods): .nextMonth() returns a Month object sequentially in the future .prevMonth() returns a Month object sequentially in the past .getDateObject(d) returns a Date object representing...
function Month(year, month) { "use strict"; this.year = year; this.month = month; this.nextMonth = function () { return new Month( year + Math.floor((month+1)/12), (month+1) % 12); }; this.prevMonth = function () { return new Month( year + Math.floor((month-1)/12), (month+11) % 12); }; this.getDateO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Month(year, month) {\n\t\"use strict\";\n\tthis.year = year;\n\tthis.month = month;\n\tthis.nextMonth = function () {\n\t\treturn new Month( year + Math.floor((month+1)/12), (month+1) % 12);\n\t};\n\t\n\tthis.prevMonth = function () {\n\t\treturn new Month( year + Math.floor((month-1)/12), (month+11) % 12...
[ "0.81912535", "0.65011144", "0.6411306", "0.62646765", "0.61807925", "0.61031944", "0.6072162", "0.60246766", "0.59966", "0.5961054", "0.5920992", "0.58819187", "0.58817244", "0.5860221", "0.5849077", "0.58217466", "0.58157706", "0.5791366", "0.57827616", "0.5715861", "0.5698...
0.8179893
1
Check to see if a card is a face card
function isFaceCard(card) { if (card === 'J' || card === 'Q' || card === 'K') { return true; } else { return false; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allPictures (player) {\n for (var j = 0; j < player.cards.length; j++) {\n if (player.cards[j].face == 'Ace') {\n return false\n }\n if (!isNaN(player.cards[j].face)){\n return false\n }\n }\n return true\n}", "canFlipCard(card) {\n return !this.busy && !this.matchedCards...
[ "0.68126386", "0.6573216", "0.6573216", "0.6573216", "0.65444607", "0.6537094", "0.64191675", "0.63943565", "0.6287685", "0.6268117", "0.62590605", "0.6217421", "0.6198047", "0.61771035", "0.61590815", "0.61523646", "0.612827", "0.60889316", "0.60678935", "0.60183567", "0.599...
0.82838506
0
A funcao pedidosComExtras recebe um array de objectos (as contas) em que cada objecto contem as seguintes keys: Id, Nome de quem pede e o pedido em si (array) que inclui os pedidos especificos (objectos) e em que cada pedido especifico inclui o nome e potenciais extras e devolve os Ids dos pedidos com extras
function pedidosComExtras(pedidos) { var array1 = [] for (let index = 0; index < pedidos.length; index++) { //console.log(pedidos[index].pedidoConcreto.length) //para debug for (let i = 0; i < pedidos[index].pedidoConcreto.length; i++) { //console.log(pedidos[index].pedidoConcreto[i]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enhanceProduct(products, extras) {\n products.map((prod) => {\n const extra = this.constructor.findItem(prod.name.replace(/\\s+/g, '-').toLowerCase(), 'id', extras);\n if (extra !== null) {\n return Object.assign(prod, extra);\n }\n return prod;\n });\n return products;\n }", ...
[ "0.5655434", "0.56006116", "0.55340165", "0.5398136", "0.52532756", "0.52391857", "0.5062268", "0.505896", "0.5028995", "0.5027891", "0.4998842", "0.49525958", "0.49419263", "0.49335137", "0.4928656", "0.49230602", "0.49189585", "0.4882979", "0.48761022", "0.4871231", "0.4870...
0.6551514
0
Convert a blob to a README, attempting to parse as markdown.
function readmeFromBlob(blob, renderer) { let readme = blob.toString(); // Parse the README from markdown into html. try { return marked(readme, { renderer: renderer }); } catch(err) { log.info('README parsing error.'); log.error(err); return readme; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readmeToMarkdown() {\n\treturn src( [ 'readme.txt' ] )\n\t\t.pipe( readme( {\n\t\t\tdetails: false,\n\t\t\tscreenshot_ext: [ 'jpg', 'jpg', 'png' ], // eslint-disable-line\n\t\t\textract: {\n\t\t\t\tchangelog: 'CHANGELOG',\n\t\t\t\t'Frequently Asked Questions': 'FAQ',\n\t\t\t},\n\t\t} ) )\n\t\t.pipe( dest(...
[ "0.6119579", "0.59548545", "0.58473605", "0.58369064", "0.5696807", "0.5603285", "0.5592522", "0.5563419", "0.5539653", "0.5508493", "0.545562", "0.5419192", "0.54055995", "0.53683764", "0.5312088", "0.5304773", "0.5299205", "0.5292841", "0.5286803", "0.5286113", "0.5277512",...
0.8208931
0
Get information about the commit.
function getCommitInfo(commit) { let author = commit.author(); let date = moment(commit.date()); let sha = new Sha(commit.sha()); return { author: author.name(), date: date.format('MMM D, YYYY'), sha: sha }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "message() {\n return GitCommit.justMessage(this._commit)\n }", "message () {\n return GitCommit.justMessage(this._commit)\n }", "getCurrentCommit() {\n return new Promise((resolve, reject) => {\n child_process_1.exec(\"git rev-list --no-merges --abbrev-commit -n 1 HEAD\", (error, stdo...
[ "0.70033664", "0.69901574", "0.6896597", "0.68414927", "0.6566389", "0.6386729", "0.6325536", "0.6186337", "0.6185085", "0.613572", "0.6113501", "0.61122644", "0.6088955", "0.6023793", "0.59045184", "0.5903248", "0.5878313", "0.58049697", "0.5581961", "0.5564765", "0.5558018"...
0.772724
0
FETCH BACKLOG RECORDS FOR SPECIFIED DATE
backlogRecords(date){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEntriesByDate(date) {\n return rest.one('date', date).get();\n }", "function retrieveAllOnDate(req, res, next){\n // *Getting the master resource id:\n let id = req.params.id;\n let date = req.params.date;\n\n // *Querying the database for all resources:\n ...
[ "0.6501064", "0.57985675", "0.5788644", "0.5784065", "0.5736363", "0.57139826", "0.5638746", "0.56170714", "0.5602453", "0.55674154", "0.55556875", "0.5531363", "0.5466074", "0.5465136", "0.54526734", "0.5427635", "0.5425866", "0.5416841", "0.54055387", "0.53872925", "0.53734...
0.7357199
0
PROJECT DATA PROJECT MESSAGES
projectMessages(number){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessages(){\r\n let messageRequest = new XMLHttpRequest();\r\n messageRequest.open('GET', './data.json');\r\n messageRequest.onload = function() {\r\n let messageData = JSON.parse(messageRequest.responseText);\r\n\r\n\r\n //Gets and uses message information from JSON array:\r\n document.que...
[ "0.60135055", "0.5824321", "0.5794389", "0.5753095", "0.5702483", "0.56836784", "0.5679407", "0.5607136", "0.5553714", "0.54666185", "0.5464548", "0.54487014", "0.54484314", "0.5439275", "0.5427883", "0.5341306", "0.5335133", "0.5331481", "0.53277385", "0.5323407", "0.5310923...
0.6267072
0
PROJECT TIMELINE PROJECT LABOR HOUR
projectLaborHours(number){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHours() {\n if (hourNow >=11) {\n hour = hourNow - 12\n }\n else {\n hour = hourNow;\n }\n if (minNow > 30) {\n\t\thour++;\n }\n return arrHours[hour];\n}", "function calTime (hour) {\n\n if (hour == now.hours()) {\n //code goes in here to add css to color code the page to pres...
[ "0.6138841", "0.61255926", "0.61245465", "0.6103849", "0.6055369", "0.5938377", "0.5935197", "0.592988", "0.5917051", "0.5909481", "0.5891847", "0.5864361", "0.5843558", "0.5843558", "0.5843558", "0.5838113", "0.5830259", "0.5815281", "0.5812866", "0.5812866", "0.5812866", ...
0.68686795
0
ABSTRACT BASE CLASS IMPLEMENTATIONS Returns true if `actual` equals `expected`. Both `actual` and `expected` are supposed to be of the same type. By default, the comparison is only implemented for the types `string`, `number`, `boolean` `undefined` and `null`. If the implementation is missing for the type of `actual` a...
__equals(actual, expected) { if (helpers_1.isEmpty(actual) && helpers_1.isEmpty(expected)) { return true; } else if (typeof actual === 'string' || typeof expected === 'string' || typeof actual === 'number' || typeof expected === 'number' || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepEqual(actual, expected) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n\n } else if (typeof Buffer !== \"undefined\" && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {\n ...
[ "0.70784545", "0.68327975", "0.68076843", "0.6641581", "0.6621382", "0.66081405", "0.65849555", "0.6523329", "0.6480218", "0.63210446", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", "0.62999284", ...
0.8722627
0
Returns true if `actual` has any value. By default, the comparison is only implemented for the types `string`, `number` and `boolean`. If `actual` is of type `number` or `boolean`, this function always returns true unless the value of `actual` is `undefined` or `null`. If the implementation is missing for the type of `...
__any(actual) { if (helpers_1.isEmpty(actual)) { return false; } else if (typeof actual === 'string') { return (actual) ? actual.length > 0 : false; } else if (typeof actual === 'number') { return true; } else if (typeof actual ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__equals(actual, expected) {\n if (helpers_1.isEmpty(actual) && helpers_1.isEmpty(expected)) {\n return true;\n }\n else if (typeof actual === 'string' ||\n typeof expected === 'string' ||\n typeof actual === 'number' ||\n typeof expected === 'number...
[ "0.6939317", "0.58028257", "0.573917", "0.57091117", "0.56591934", "0.5564726", "0.55190146", "0.5500528", "0.54695785", "0.5410613", "0.5399455", "0.5375146", "0.53361046", "0.5279578", "0.52550757", "0.5254476", "0.52496254", "0.5239077", "0.5230526", "0.52290577", "0.52290...
0.7630563
0
Returns true if `actual` contains `expected`. Both `actual` and `expected` are supposed to be of the same type. By default, the comparison is only implemented for the type `string`. If the implementation is missing for the type of `actual` and `expected`, an error will be thrown.
__contains(actual, expected) { if (helpers_1.isEmpty(actual) && helpers_1.isEmpty(expected)) { return true; } else if (helpers_1.isEmpty(actual) && typeof expected === 'string' && expected.length > 0) { return false; } else if (typeof actual === 'string') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__equals(actual, expected) {\n if (helpers_1.isEmpty(actual) && helpers_1.isEmpty(expected)) {\n return true;\n }\n else if (typeof actual === 'string' ||\n typeof expected === 'string' ||\n typeof actual === 'number' ||\n typeof expected === 'number...
[ "0.7328028", "0.66518795", "0.6309209", "0.6128629", "0.5955381", "0.58417106", "0.58117497", "0.5692708", "0.5689723", "0.56445813", "0.56445813", "0.5624651", "0.5624488", "0.561602", "0.5595379", "0.55893654", "0.5586078", "0.5579744", "0.5568278", "0.5553949", "0.5553949"...
0.75951076
0
Converts `value` to the type `string`. This function is used to write a value of an arbitrary type into error messages and log outputs. By default, the comparison is only implemented for the types `string`, `number`, `boolean`, `undefined` and for the value `null`. If the implementation is missing for the type of `valu...
__typeToString(value) { if (helpers_1.isNullOrUndefined(value)) { return value; } else if (typeof value === 'string') { return (value.length > 0) ? `"${value}"` : '""'; } else if (typeof value === 'number') { return value.toString(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}", "function s...
[ "0.68840826", "0.6825557", "0.6825557", "0.6825557", "0.6825557", "0.6825557", "0.6825557", "0.6825557", "0.67995405", "0.67904", "0.6762555", "0.67056704", "0.6663312", "0.66462815", "0.65649724", "0.65640545", "0.653607", "0.6500597", "0.64511675", "0.64390546", "0.64165646...
0.7924829
0
Public GETTER FUNCTIONS (return state after initial wait) Returns true if the PageElement is enabled after performing the initial waiting condition.
getIsEnabled() { return this._executeAfterInitialWait(() => this.currently.isEnabled()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async elementIsEnabled(selector) {\n await selector.waitForExist();\n await selector.waitForEnabled();\n const isEnabled = await selector.isEnabled();\n return await browser.waitUntil(async function () {\n return isEnabled;\n }, this.timeout);\n }", "isEnabled() {\n return this._node....
[ "0.70359486", "0.6901891", "0.62511915", "0.62427616", "0.62334955", "0.6211983", "0.6109445", "0.6087549", "0.60619307", "0.60205853", "0.60205853", "0.60205853", "0.60205853", "0.5960731", "0.5947962", "0.594011", "0.5893567", "0.5879435", "0.5879435", "0.5879435", "0.58746...
0.7029565
1
Returns PageElement's HTML after performing the initial waiting condition.
getHTML() { return this._executeAfterInitialWait(() => this.currently.getHTML()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async waitForPageToLoad(elementSelector) {\n browser.maximizeWindow();\n const selector = await $(elementSelector);\n await selector.waitForDisplayed();\n const isDisplayed = await selector.isDisplayed();\n if (!isDisplayed) {\n return await $(elementSelector).waitForDisplayed();\n }\n }", ...
[ "0.62492716", "0.61267215", "0.60743415", "0.60488695", "0.5994242", "0.588981", "0.5732931", "0.5690201", "0.56694996", "0.56111246", "0.5578508", "0.55695504", "0.5528824", "0.551818", "0.5511071", "0.54917586", "0.54844594", "0.54709345", "0.54699117", "0.5467229", "0.5465...
0.6598334
0
Returns PageElement's direct text after performing the initial waiting condition. A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.
getDirectText() { return this._executeAfterInitialWait(() => this.currently.getDirectText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDirectText() {\n const html = this.getHTML();\n if (html.length === 0) {\n return '';\n }\n let text = '';\n const constructorName = this._node.constructor.name;\n const handler = new htmlParser.DomHandler(function (error, dom) {\n if (error) {\n ...
[ "0.6571555", "0.60157907", "0.6007564", "0.5877514", "0.5797176", "0.57843035", "0.5679829", "0.5679829", "0.5667103", "0.56340164", "0.56075186", "0.5576546", "0.5553108", "0.55153704", "0.5498796", "0.5485039", "0.5447457", "0.5416059", "0.53604484", "0.5348511", "0.5338669...
0.65786654
0
Returns PageElement's text after performing the initial waiting condition.
getText() { return this._executeAfterInitialWait(() => this.currently.getText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getElementText(element) {\n await element.waitForExist();\n await element.waitForDisplayed();\n return element.getText();\n }", "function waitMsg (text) {\n WaitMsg.textContent = text;\n}", "text() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield (yiel...
[ "0.66703176", "0.6502362", "0.6441871", "0.6429845", "0.62420225", "0.62201804", "0.60711175", "0.58212686", "0.57778674", "0.5756062", "0.5706421", "0.5699937", "0.56880856", "0.56128", "0.5612136", "0.55694586", "0.5548779", "0.55407363", "0.5526385", "0.5495125", "0.547614...
0.6668901
1
Returns the value of PageElement's 'class' HTML attribute after performing the initial waiting condition.
getClass() { return this._executeAfterInitialWait(() => this.currently.getAttribute('class')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getClass() {\n return this.getAttribute('class');\n }", "findElementByClassName(className, waitForElement = this.defaultWaitTime) {\n return __awaiter(this, void 0, void 0, function* () {\n return new ui_element_1.UIElement(yield this._driver.waitForElementByClassName(className, waitF...
[ "0.60044396", "0.57292104", "0.5702411", "0.5684542", "0.56264764", "0.5547243", "0.5465689", "0.54578453", "0.5414441", "0.53722733", "0.536926", "0.5355423", "0.5355289", "0.5327306", "0.53010726", "0.5295818", "0.5295818", "0.52758145", "0.52427435", "0.5240717", "0.523392...
0.75151426
0
Returns the value of PageElement's 'id' HTML attribute after performing the initial waiting condition.
getId() { return this._executeAfterInitialWait(() => this.currently.getAttribute('id')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async findById(id) {\n const selectorId = await $(id);\n await selectorId.waitForExist();\n await selectorId.waitForDisplayed();\n return selectorId;\n }", "get id() {\n return new ElementAttribute(this.get(0), \"id\");\n }", "get id() {\n return new ElementAttribute(this.get(0), ...
[ "0.6341364", "0.6099917", "0.6099917", "0.5807957", "0.5807957", "0.58048356", "0.57594836", "0.56567514", "0.56501776", "0.56501776", "0.56501776", "0.56501776", "0.56501776", "0.56501776", "0.56501776", "0.5625002", "0.56126964", "0.5594769", "0.5567868", "0.55490816", "0.5...
0.7211012
0
Returns the value of PageElement's 'name' HTML attribute after performing the initial waiting condition.
getName() { return this._executeAfterInitialWait(() => this.currently.getAttribute('name')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getName(){\n\tconst name = document.querySelector(\"#get-name\")\n\treturn name.value\n}", "async getAttribute(name) {\n await this._stabilize();\n return this._executeScript((element, attribute) => element.getAttribute(attribute), this.element(), name);\n }", "get name() {\n\t\tretur...
[ "0.6000683", "0.59902376", "0.592175", "0.58958954", "0.58958954", "0.58958954", "0.5735241", "0.5718658", "0.5675842", "0.5587124", "0.55856025", "0.5568798", "0.55505997", "0.55084264", "0.55034524", "0.5491565", "0.54662496", "0.5436938", "0.5366212", "0.5364266", "0.53577...
0.7109659
0
Returns the width of PageElement in pixels after performing the initial waiting condition.
getWidth() { return this._executeAfterInitialWait(() => this.currently.getWidth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getElementWidth(selector) {\n const elementStyle = await page.evaluate(sel => {\n const element = document.querySelector(sel);\n return JSON.parse(JSON.stringify(getComputedStyle(element)));\n }, selector);\n return parseInt(elementStyle.width);\n }", ...
[ "0.69039965", "0.66477203", "0.65950996", "0.647531", "0.6439596", "0.6383195", "0.6369545", "0.63361347", "0.6311422", "0.62946236", "0.6240709", "0.62073094", "0.6207269", "0.61807185", "0.6163845", "0.61513937", "0.61407083", "0.6100293", "0.6098708", "0.60706526", "0.6051...
0.71547526
0
Returns the height of PageElement in pixels after performing the initial waiting condition.
getHeight() { return this._executeAfterInitialWait(() => this.currently.getHeight()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHeight(element) {\n\t\treturn parseInt(element.css('height'));\n\t}", "static _getContentHeight(element) {\n if (!element) return 0;\n const styles = window.getComputedStyle(element);\n const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);\n return Math.ceil(eleme...
[ "0.6780897", "0.6729122", "0.66855925", "0.6639592", "0.660806", "0.6523941", "0.65091485", "0.64375854", "0.64090395", "0.6399043", "0.63603014", "0.6355131", "0.6343743", "0.6282719", "0.6237726", "0.62104857", "0.62018585", "0.6196936", "0.61900973", "0.6157654", "0.613863...
0.72287136
0
Returns a PageElement's 'hasText' status after performing the initial waiting condition. A PageElement's 'hasText' status is set to true if its actual text equals the expected text.
getHasText(text) { return this._executeAfterInitialWait(() => this.currently.hasText(text)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasText(text) {\n return this._node.eachCheck(this._node.all, (element, expected) => element.currently.hasText(expected), text);\n }", "getHasText(text) {\n return this.eachCompare(this.all, (element, expected) => element.currently.hasText(expected), text);\n }", "getHasAnyText() {\n ...
[ "0.71259403", "0.70865107", "0.70733005", "0.7039344", "0.69899774", "0.69564277", "0.6951483", "0.6885375", "0.6837218", "0.6710467", "0.66502905", "0.65946126", "0.6532004", "0.6460823", "0.63797283", "0.63754725", "0.62488306", "0.62344515", "0.618262", "0.61353934", "0.61...
0.76843673
0
Returns a PageElement's 'hasAnyText' status after performing the initial waiting condition. A PageElement's 'hasAnyText' status is set to true if it has any text.
getHasAnyText() { return this._executeAfterInitialWait(() => this.currently.hasAnyText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHasText(text) {\n return this._executeAfterInitialWait(() => this.currently.hasText(text));\n }", "hasAnyText(opts) {\n return this._waitHasAnyProperty('text', () => this._node.currently.hasAnyText(), opts);\n }", "hasAnyText() {\n return this._compareHasAny(this.getText());\n ...
[ "0.72979754", "0.71907675", "0.7157228", "0.7099999", "0.6959644", "0.6899014", "0.688677", "0.6689866", "0.66892475", "0.667502", "0.665036", "0.6636831", "0.6633368", "0.6460837", "0.64476585", "0.6320863", "0.62869847", "0.6204604", "0.62000316", "0.61696315", "0.60968405"...
0.79860187
0
Returns a PageElement's 'containsText' status after performing the initial waiting condition. A PageElement's 'containsText' status is set to true if its actual text contains the expected text.
getContainsText(text) { return this._executeAfterInitialWait(() => this.currently.containsText(text)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHasText(text) {\n return this._executeAfterInitialWait(() => this.currently.hasText(text));\n }", "containsText(text) {\n return this._node.eachCheck(this._node.all, (element, expected) => element.currently.containsText(expected), text);\n }", "containsText(text, opts) {\n return ...
[ "0.7406078", "0.6979766", "0.6887364", "0.6882593", "0.68756455", "0.6855198", "0.6780353", "0.67102516", "0.664973", "0.6636003", "0.6622873", "0.6617216", "0.6612635", "0.646211", "0.6361157", "0.6323959", "0.62509644", "0.6240752", "0.6186384", "0.61196727", "0.604626", ...
0.7541359
0
Returns a PageElement's 'hasAnyDirectText' status after performing the initial waiting condition. A PageElement's 'hasAnyDirectText' status is set to true if it has any direct text.
getHasAnyDirectText() { return this._executeAfterInitialWait(() => this.currently.hasAnyDirectText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHasDirectText(directText) {\n return this._executeAfterInitialWait(() => this.currently.hasDirectText(directText));\n }", "hasDirectText(directText) {\n return this._node.eachCheck(this._node.all, (element, expected) => element.currently.hasDirectText(expected), directText);\n }", "hasDi...
[ "0.7715487", "0.73922765", "0.73807263", "0.7358422", "0.7291817", "0.7290219", "0.7180188", "0.71780866", "0.71195066", "0.69936323", "0.6986593", "0.6975445", "0.69189596", "0.6901383", "0.6879334", "0.6873154", "0.68026567", "0.6784408", "0.67042446", "0.6550286", "0.64927...
0.80314773
0
INTERACTION FUNCTIONS (interact with state after initial wait) Clicks on PageElement after performing PageElement's initial waiting condition. Before clicking on PageElement, it is scrolled into the viewport. If the clicked HTML element is obscured by another HTML element, the click will be repeated until the clicked H...
click(opts = {}) { const interval = opts.interval || this._interval; const timeout = opts.timeout || this._timeout; let remainingTimeout = timeout; let errorMessage = ''; this.initialWait(); if (!opts) { opts = {}; } if (opts && !opts.customScr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function waitAndClick(selector, Page) {\n\n await Page.waitForSelector(selector, { visible: true });\n\n let selectorClickPromise = Page.click(selector);\n\n return selectorClickPromise;\n}", "clickOnClaim(){\n // wait for page load is before click ?? Failing at this step- disabled it - Monica\...
[ "0.5890608", "0.5872683", "0.57530725", "0.57530725", "0.5639167", "0.56311876", "0.5549599", "0.5534706", "0.5525853", "0.5426402", "0.5409271", "0.5392023", "0.53432304", "0.52856255", "0.5241905", "0.52265567", "0.5223755", "0.51281655", "0.5106978", "0.51031226", "0.50598...
0.7472721
0
Returns PageElement's current HTML. Overwriting this function affects the behavior of the functions `getHTML`, `hasHTML`, `containsHTML` and `hasAnyHTML` in PageElement and its `currently`, `wait` and `eventually` APIs.
getHTML() { const result = browser.selectorExecute( // tslint:disable-next-line:ter-prefer-arrow-callback [this._node.getSelector()], function (elems, elementSelector) { const error = { notFound: [], }; if (elems.length === 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHTML() {\n return this._executeAfterInitialWait(() => this.currently.getHTML());\n }", "get html() {\n return this._html;\n }", "function getHtml() {\n jsdom.env(\n options.url,\n parseHtml\n );\n }", "get documentElement() {\n return this.querySelector('html');...
[ "0.75647855", "0.605006", "0.5866126", "0.5776908", "0.57603127", "0.5723602", "0.5689962", "0.5630092", "0.5630092", "0.5608898", "0.56070334", "0.55564976", "0.55564976", "0.5522013", "0.55020255", "0.54906905", "0.54906905", "0.5390243", "0.5368239", "0.5361519", "0.535443...
0.67790896
1
Returns PageElement's current direct text. A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements. Overwriting this function affects the behavior of the functions `getDirectText`, `hasDirectText`, `cont...
getDirectText() { const html = this.getHTML(); if (html.length === 0) { return ''; } let text = ''; const constructorName = this._node.constructor.name; const handler = new htmlParser.DomHandler(function (error, dom) { if (error) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDirectText() {\n return this._executeAfterInitialWait(() => this.currently.getDirectText());\n }", "getHasDirectText(directText) {\n return this._node.eachCompare(this._node.all, (element, expected) => element.currently.hasDirectText(expected), directText);\n }", "hasDirectText(directTex...
[ "0.7692071", "0.6734853", "0.65798295", "0.6570425", "0.65149677", "0.6510163", "0.6503848", "0.6462801", "0.6451666", "0.6407493", "0.6252724", "0.62506765", "0.6249746", "0.6246637", "0.62441367", "0.6040474", "0.59863997", "0.5968702", "0.596598", "0.59366125", "0.5902431"...
0.75433356
1
Returns the current value of PageElement's 'class' HTML attribute. Overwriting this function affects the behavior of the functions `getClass`, `hasClass`, `containsClass` and `hasAnyClass` in PageElement and its `currently`, `wait` and `eventually` APIs.
getClass() { return this.getAttribute('class'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getClass() {\n return this._executeAfterInitialWait(() => this.currently.getAttribute('class'));\n }", "get className() { \n return this.getAttribute('class'); \n }", "get className() {\n return this.classList.toString();\n }", "get asAttribute() {\n const keys = Array.fr...
[ "0.8080336", "0.6458226", "0.6313226", "0.59706956", "0.59355974", "0.5814017", "0.5764933", "0.5729377", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0.57081795", "0...
0.72669476
1
Returns the current value of PageElement's 'name' HTML attribute. Overwriting this function affects the behavior of the functions `getName`, `hasName`, `containsName` and `hasAnyName` in PageElement and its `currently`, `wait` and `eventually` APIs.
getName() { return this.getAttribute('name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getName() {\n return this._executeAfterInitialWait(() => this.currently.getAttribute('name'));\n }", "get name() {\n return this.getAttribute('name') ?? '';\n }", "get name() {\n return this.getAttribute('name') ?? '';\n }", "get name() {\n return this.getAttribute('name'...
[ "0.8050796", "0.729309", "0.729309", "0.729309", "0.72044027", "0.7182845", "0.69989693", "0.69989693", "0.69989693", "0.69989693", "0.69989693", "0.69862634", "0.6825544", "0.6780284", "0.6715533", "0.6708744", "0.6691303", "0.66901463", "0.66000503", "0.66000503", "0.660005...
0.7381213
1
Returns the current location of PageElement in pixels. Overwriting this function affects the behavior of the functions `getLocation`, `hasLocation`, `containsLocation` and `hasAnyLocation` in PageElement and its `currently`, `wait` and `eventually` APIs.
getLocation() { return this._node.__execute(() => this.element.getLocation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pageLocation() {\n return new HPoint(this.pageX(), this.pageY());\n }", "location() {\n return __awaiter(this, void 0, void 0, function* () {\n const location = yield (yield this.element()).getLocation();\n const point = new point_1.Point(location.x, location.y);\n ret...
[ "0.6881827", "0.66400784", "0.63304114", "0.6237049", "0.62228584", "0.62228584", "0.62228584", "0.62168384", "0.62110806", "0.62110806", "0.6185866", "0.6185866", "0.6185866", "0.6185866", "0.6185866", "0.6185866", "0.6185866", "0.61587936", "0.60451084", "0.5979955", "0.597...
0.71265686
0
Returns the current size of PageElement in pixels. Overwriting this function affects the behavior of the functions `getSize`, `hasSize`, `containsSize` and `hasAnySize` in PageElement and its `currently`, `wait` and `eventually` APIs.
getSize() { return this._node.__execute(() => this.element.getElementSize()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getElementSize() {\n const that = this;\n return { width: that.elementWidth, height: that.elementHeight };\n }", "size() {\n return __awaiter(this, void 0, void 0, function* () {\n const size = yield (yield this.element()).getSize();\n const point = new point_1.Point...
[ "0.6767821", "0.638914", "0.6378442", "0.6351981", "0.6313129", "0.63017136", "0.63017136", "0.6254304", "0.62053555", "0.616926", "0.6161876", "0.61507815", "0.61507815", "0.6139583", "0.6080942", "0.60458046", "0.60259676", "0.6025336", "0.5962657", "0.59440523", "0.5929913...
0.71346855
0
Returns PageElement's current 'hasAnyText' status. A PageElement's 'hasAnyText' status is set to true if it has any text.
getHasAnyText() { return this.hasAnyText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasAnyText() {\n return this._compareHasAny(this.getText());\n }", "getHasAnyText() {\n return this._executeAfterInitialWait(() => this.currently.hasAnyText());\n }", "hasAnyText(opts) {\n return this._waitHasAnyProperty('text', () => this._node.currently.hasAnyText(), opts);\n }"...
[ "0.803053", "0.77640355", "0.72599983", "0.7106309", "0.7004989", "0.69703484", "0.6909739", "0.6901168", "0.6880497", "0.68604606", "0.67753685", "0.67618066", "0.6694363", "0.6615414", "0.6546731", "0.6516143", "0.6516143", "0.6460257", "0.6437165", "0.64090425", "0.6375966...
0.79985785
1
CHECK STATE Returns true if PageElement currently exists. Overwriting this function affects the behavior of the function `exists` in PageElement and its `currently`, `wait` and `eventually` APIs.
exists() { return this.element.isExisting(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exists() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.element() === null ? false : true;\n });\n }", "exists(opts = {}) {\n return this._waitWdioCheckFunc('existed', opts => this._node.currently.element.waitForExist(opts.timeout, opts.reverse), opts);...
[ "0.7139716", "0.637776", "0.6175672", "0.5983478", "0.59384245", "0.5914303", "0.58072835", "0.5799173", "0.5799173", "0.5761966", "0.5708601", "0.5670104", "0.5645568", "0.56443566", "0.56331325", "0.5630532", "0.5629461", "0.55896443", "0.55515933", "0.5544338", "0.55212826...
0.69667053
1
Returns true if PageElement is currently visible. Overwriting this function affects the behavior of the function `isVisible` in PageElement and its `currently`, `wait` and `eventually` APIs.
isVisible() { return this.element.isVisible(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isVisible() {\n return this._visibility === 'visible';\n }", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n ...
[ "0.7452392", "0.72341603", "0.72341603", "0.72341603", "0.71686786", "0.71289766", "0.7103766", "0.7103766", "0.70599085", "0.7010743", "0.69460267", "0.6895396", "0.68739", "0.68691635", "0.6846593", "0.68421125", "0.68421125", "0.68421125", "0.68421125", "0.68421125", "0.68...
0.7837934
0
Returns true if PageElement is currently enabled. Overwriting this function affects the behavior of the function `isEnabled` in PageElement and its `currently`, `wait` and `eventually` APIs.
isEnabled() { return this._node.__execute(() => this.element.isEnabled()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIsEnabled() {\n return this._executeAfterInitialWait(() => this.currently.isEnabled());\n }", "isEnabled() {\n return this._isEnabled;\n }", "getIsEnabled() {\n return this.isEnabled();\n }", "function YCurrent_get_enabled()\n {\n var res; // enumBO...
[ "0.7677507", "0.6770203", "0.6757972", "0.6611264", "0.65175724", "0.6494842", "0.6305977", "0.6305977", "0.6258141", "0.6205068", "0.61866194", "0.6168773", "0.61655146", "0.6115494", "0.59333146", "0.59100795", "0.58796173", "0.5850485", "0.584235", "0.5829161", "0.57898194...
0.7384545
1
Returns true if PageElement is currently selected. Overwriting this function affects the behavior of the function `isSelected` in PageElement and its `currently`, `wait` and `eventually` APIs.
isSelected() { return this._node.__execute(() => this.element.isSelected()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isSelected() {\n return __awaiter(this, void 0, void 0, function* () {\n const el = (yield this.element());\n if (!el)\n return false;\n if (this._args.isAndroid) {\n try {\n yield el.getAttribute(\"selected\");\n ...
[ "0.6923212", "0.67712826", "0.66676444", "0.66676444", "0.65506625", "0.6293782", "0.61441797", "0.591527", "0.58955175", "0.5889732", "0.5889732", "0.58861953", "0.5883974", "0.5883974", "0.58574563", "0.58574563", "0.5833286", "0.5809139", "0.5781322", "0.5768358", "0.57578...
0.7093075
0
Returns true if PageElement is currently checked. Overwriting this function affects the behavior of the function `isChecked` in PageElement and its `currently`, `wait` and `eventually` APIs.
isChecked() { return this.hasAnyAttribute('checked'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isChecked() {\n return __awaiter(this, void 0, void 0, function* () {\n const el = (yield this.element());\n if (!el)\n return false;\n if (this._args.isAndroid) {\n try {\n const isChecked = yield el.getAttribute(\"checked\")...
[ "0.6939172", "0.62165827", "0.60775894", "0.5986033", "0.5929398", "0.5929398", "0.5888609", "0.5865626", "0.58241993", "0.56627333", "0.5653106", "0.55957353", "0.5582117", "0.5565629", "0.5533071", "0.5510786", "0.5477096", "0.5477096", "0.5477096", "0.5455348", "0.5432721"...
0.68208224
1
Returns true if the PageElement's actual HTML currently equals the expected HTML.
hasHTML(html) { return this._compareHas(html, this.getHTML()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasAnyHTML() {\n return this._compareHasAny(this.getHTML());\n }", "evaluate(property, a, b) {\n if (property === 'html' && typeof a.value !== 'string') {\n // DocumentFragment, compare separately supplied html\n return a.object.compareHtml === b.object.compareHtml;\n }\n }",...
[ "0.6635654", "0.6350451", "0.6337869", "0.62928927", "0.58869255", "0.5622706", "0.5479859", "0.5453626", "0.5449823", "0.5365151", "0.53202516", "0.53013676", "0.52587277", "0.5234451", "0.523388", "0.52232146", "0.512582", "0.50865746", "0.50361663", "0.49735704", "0.494256...
0.6435444
1
Returns true if the PageElement currently has any HTML.
hasAnyHTML() { return this._compareHasAny(this.getHTML()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get hasContent() {\n return Boolean(typeof this.html === 'string' && this.html.length || this.items.length);\n }", "hasAnyHTML(opts) {\n return this._waitHasAnyProperty('HTML', () => this._node.currently.hasAnyHTML(), opts);\n }", "function isPageEmpty() {\n return $.isEmptyObject(widgetBy...
[ "0.7264861", "0.69361484", "0.66240174", "0.6536195", "0.6435541", "0.6337335", "0.63133", "0.6290206", "0.6247059", "0.6113564", "0.6083797", "0.6083797", "0.59942997", "0.5994223", "0.5975605", "0.5940397", "0.5926475", "0.5926475", "0.5923539", "0.5866467", "0.5861375", ...
0.79381
0
Returns true if currently the location of PageElement matches the specified coordinates or if its location deviates no more than the specified tolerances from the specified coordinates.
hasLocation(coordinates, tolerances = { x: 0, y: 0 }) { const actualCoords = this.getLocation(); this._writeLastDiff(helpers_1.tolerancesToString(actualCoords)); return this._withinTolerance(coordinates.x, actualCoords.x, tolerances.x) && this._withinTolerance(coordinates.y, actualCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasLocation(coordinates, opts = { tolerances: { x: 0, y: 0 } }) {\n const { tolerances } = opts, otherOpts = __rest(opts, [\"tolerances\"]);\n if (tolerances && (tolerances.x > 0 || tolerances.y > 0)) {\n return this._waitWithinProperty('location', helpers_1.tolerancesToString(coordinates,...
[ "0.64011574", "0.6364731", "0.5842743", "0.5745776", "0.5568725", "0.55504787", "0.5546516", "0.55319047", "0.54925233", "0.54897416", "0.5485535", "0.54747206", "0.5401036", "0.5401036", "0.5401036", "0.5369435", "0.53343284", "0.533269", "0.53236717", "0.53056467", "0.52962...
0.67327964
0
Returns true if currently the xlocation of PageElement matches the specified xlocation or if PageElement's xlocation deviates no more than the specified tolerance from the specified xlocation.
hasX(x, tolerance) { const actual = this.getX(); this._writeLastDiff(helpers_1.tolerancesToString(actual)); return this._withinTolerance(x, actual, tolerance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasX(x, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __rest(opts, [\"tolerance\"]);\n if (tolerance) {\n return this._waitWithinProperty('X-location', helpers_1.tolerancesToString(x, tolerance), () => this._node.currently.hasX(x, tolerance), otherOpts);\n }\n...
[ "0.5945101", "0.5695547", "0.5695547", "0.5600053", "0.5543163", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "0.5511714", "...
0.61803037
0
Returns true if currently the ylocation of PageElement matches the specified ylocation or if PageElement's ylocation deviates no more than the specified tolerance from the specified ylocation.
hasY(y, tolerance) { const actual = this.getY(); this._writeLastDiff(helpers_1.tolerancesToString(actual)); return this._withinTolerance(y, actual, tolerance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasY(y, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __rest(opts, [\"tolerance\"]);\n if (tolerance) {\n return this._waitWithinProperty('Y-location', helpers_1.tolerancesToString(y, tolerance), () => this._node.currently.hasY(y, tolerance), otherOpts);\n }\n...
[ "0.6408845", "0.59575933", "0.57674617", "0.5628198", "0.5623598", "0.5587861", "0.5480453", "0.52890897", "0.5162444", "0.50944036", "0.5069753", "0.5065478", "0.49765348", "0.49701577", "0.4903506", "0.489821", "0.48961017", "0.48754746", "0.48647058", "0.48599815", "0.4843...
0.6655038
0
Returns true if currently the size of PageElement matches the specified size or if PageElement's size deviates no more than the specified tolerances from the specified size.
hasSize(size, tolerances = { width: 0, height: 0 }) { const actualSize = this.getSize(); this._writeLastDiff(helpers_1.tolerancesToString(actualSize)); return this._withinTolerance(size.width, actualSize.width, tolerances.width) && this._withinTolerance(size.height, actualSize.height...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasSize(size, opts = { tolerances: { width: 0, height: 0 } }) {\n const { tolerances } = opts, otherOpts = __rest(opts, [\"tolerances\"]);\n if (tolerances && (tolerances.width > 0 || tolerances.height > 0)) {\n return this._waitWithinProperty('size', helpers_1.tolerancesToString(size, tol...
[ "0.6031218", "0.5890314", "0.58640945", "0.5705337", "0.5685835", "0.5625222", "0.5560677", "0.5555305", "0.5517953", "0.5414666", "0.52684176", "0.52682394", "0.5264661", "0.5245377", "0.5233846", "0.5222841", "0.5183997", "0.5161232", "0.51377577", "0.5125846", "0.5018124",...
0.70742875
0
Returns true if currently the width of PageElement matches the specified width or if PageElement's width deviates no more than the specified tolerance from the specified width.
hasWidth(width, tolerance) { const actual = this.getWidth(); this._writeLastDiff(helpers_1.tolerancesToString(actual)); return this._withinTolerance(width, actual, tolerance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasWidth(width, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __rest(opts, [\"tolerance\"]);\n if (tolerance) {\n return this._waitWithinProperty('width', helpers_1.tolerancesToString(width, tolerance), () => this._node.currently.hasWidth(width, tolerance), otherOpts...
[ "0.6532392", "0.64286804", "0.63186", "0.60948455", "0.56570596", "0.5597226", "0.5479833", "0.546053", "0.54470134", "0.5264517", "0.51895887", "0.51232624", "0.5074413", "0.50591654", "0.50425214", "0.50425214", "0.50425214", "0.5038983", "0.5013482", "0.49964958", "0.49376...
0.75214314
0
Returns true if currently the height of PageElement matches the specified height or if PageElement's height deviates no more than the specified tolerance from the specified height.
hasHeight(height, tolerance) { const actual = this.getHeight(); this._writeLastDiff(helpers_1.tolerancesToString(actual)); return this._withinTolerance(height, actual, tolerance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasHeight(height, opts = { tolerance: 0 }) {\n const { tolerance } = opts, otherOpts = __rest(opts, [\"tolerance\"]);\n if (tolerance) {\n return this._waitWithinProperty('height', helpers_1.tolerancesToString(height, tolerance), () => this._node.currently.hasHeight(height, tolerance), oth...
[ "0.69315976", "0.6818943", "0.6112385", "0.60814387", "0.57381535", "0.5655957", "0.5607731", "0.5588124", "0.54195714", "0.532947", "0.53221375", "0.53120005", "0.53067166", "0.52752036", "0.5272456", "0.52660024", "0.52499497", "0.52301097", "0.52301097", "0.52301097", "0.5...
0.7327312
0
returns the negated variants of PageElementCurrently's state check functions
get not() { return { /** * Returns true if PageElement currently does not exist. */ exists: () => !this.exists(), /** * Returns true if PageElement is currently not visible. */ isVisible: () => !this.isVisible(),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get not() {\n return {\n /**\n * Returns true if PageElementList is currently not empty.\n */\n isEmpty: () => !this.isEmpty(),\n /**\n * Returns the current negated result of the comparison between PageElementList's actual length and an e...
[ "0.6519525", "0.6477639", "0.64254373", "0.62800866", "0.62636656", "0.62394845", "0.5999292", "0.5947126", "0.5874361", "0.5765669", "0.57514507", "0.5742732", "0.5687826", "0.5670642", "0.56609464", "0.5608892", "0.5537145", "0.54834646", "0.5462892", "0.5453837", "0.545229...
0.6971711
0
Waits for the xlocation of PageElement to equal the expected xlocation or to deviate no more than the specified tolerance from the expected xlocation. Throws an error if the condition is not met within a specific timeout.
hasX(x, opts = { tolerance: 0 }) { const { tolerance } = opts, otherOpts = __rest(opts, ["tolerance"]); if (tolerance) { return this._waitWithinProperty('X-location', helpers_1.tolerancesToString(x, tolerance), () => this._node.currently.hasX(x, tolerance), otherOpts); } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasX(x, opts = { tolerance: 0 }) {\n return this._node.__eventually(() => this._node.wait.hasX(x, { tolerance: opts.tolerance, timeout: opts.timeout }));\n }", "function EXPECT_NEAR(x1, x2, tolerance, stringOnFail) {\n if (isNaN(x1) || isNaN(x2)) {\n LOG('EXPECT_NEAR FAILED');\n LOG('x1: ' + x1)...
[ "0.5447637", "0.5313412", "0.5248509", "0.5224123", "0.5026717", "0.5001636", "0.49829158", "0.49829158", "0.4980341", "0.4919873", "0.48951632", "0.4890956", "0.4838731", "0.4826244", "0.4794393", "0.47793686", "0.4759936", "0.4755883", "0.47507647", "0.47342408", "0.4732327...
0.537768
1
Waits for the ylocation of PageElement to equal the expected ylocation or to deviate no more than the specified tolerance from the expected ylocation. Throws an error if the condition is not met within a specific timeout.
hasY(y, opts = { tolerance: 0 }) { const { tolerance } = opts, otherOpts = __rest(opts, ["tolerance"]); if (tolerance) { return this._waitWithinProperty('Y-location', helpers_1.tolerancesToString(y, tolerance), () => this._node.currently.hasY(y, tolerance), otherOpts); } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasY(y, opts = { tolerance: 0 }) {\n return this._node.__eventually(() => this._node.wait.hasY(y, { tolerance: opts.tolerance, timeout: opts.timeout }));\n }", "function waitForStillness() {\n var element = dancingDotsElement();\n\n // Currently, the dots sometimes stop & start again. We're introduci...
[ "0.5617503", "0.51949835", "0.51448095", "0.5021446", "0.4968415", "0.48458964", "0.48074788", "0.47916597", "0.47864783", "0.47864783", "0.47664878", "0.47601864", "0.46412203", "0.4634257", "0.46246085", "0.45978898", "0.45797777", "0.45771962", "0.45771962", "0.45771962", ...
0.5581871
1
Waits for the width of PageElement to equal the expected width or to deviate no more than the specified tolerance from the expected width. Throws an error if the condition is not met within a specific timeout.
hasWidth(width, opts = { tolerance: 0 }) { const { tolerance } = opts, otherOpts = __rest(opts, ["tolerance"]); if (tolerance) { return this._waitWithinProperty('width', helpers_1.tolerancesToString(width, tolerance), () => this._node.currently.hasWidth(width, tolerance), otherOpts); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasWidth(width, opts = { tolerance: 0 }) {\n return this._node.__eventually(() => this._node.wait.hasWidth(width, { tolerance: opts.tolerance, timeout: opts.timeout }));\n }", "hasWidth(width, tolerance) {\n const actual = this.getWidth();\n this._writeLastDiff(helpers_1.tolerancesToStrin...
[ "0.6162644", "0.552923", "0.5168776", "0.50630224", "0.504322", "0.49578968", "0.4914347", "0.48343217", "0.48066205", "0.47989255", "0.4788332", "0.47448733", "0.4734967", "0.4709178", "0.4709178", "0.46928638", "0.4691954", "0.46668485", "0.46422863", "0.46276304", "0.46254...
0.575193
1
Waits for the height of PageElement to equal the expected height or to deviate no more than the specified tolerance from the expected height. Throws an error if the condition is not met within a specific timeout.
hasHeight(height, opts = { tolerance: 0 }) { const { tolerance } = opts, otherOpts = __rest(opts, ["tolerance"]); if (tolerance) { return this._waitWithinProperty('height', helpers_1.tolerancesToString(height, tolerance), () => this._node.currently.hasHeight(height, tolerance), otherOpts); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasHeight(height, opts = { tolerance: 0 }) {\n return this._node.__eventually(() => this._node.wait.hasHeight(height, { tolerance: opts.tolerance, timeout: opts.timeout }));\n }", "function waitForNewBlock(height, cb) {\n var actualHeight = height;\n async.doWhilst(\n function (cb) {\n reques...
[ "0.6390795", "0.59575534", "0.5786382", "0.5778666", "0.57678103", "0.57446367", "0.57446367", "0.57446367", "0.5329589", "0.5190484", "0.5190484", "0.5187115", "0.50639635", "0.5061557", "0.50606847", "0.5041559", "0.502662", "0.49809247", "0.49786454", "0.49786454", "0.4949...
0.6108317
1
returns the negated variants of PageElementWait's state check functions
get not() { return { /** * Waits for a PageElement not to exist. * * Throws an error if the condition is not met within a specific timeout. * * @param opts includes the `timeout` within which the condition is expected to be met ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get not() {\n return {\n /**\n * Returns true if PageElement eventually does not exist within a specific timeout.\n *\n * @param opts includes the `timeout` within which the condition is expected to be met\n *\n * If no `timeout` is spec...
[ "0.75077623", "0.64501554", "0.64154", "0.605317", "0.59021264", "0.5901389", "0.5895934", "0.5725384", "0.5611111", "0.54348284", "0.54153275", "0.54094094", "0.5407168", "0.5389829", "0.5377329", "0.5372449", "0.5273945", "0.5259", "0.5251649", "0.5208061", "0.5183865", "...
0.7446626
1
Returns true if PageElement eventually has any HTML within a specific timeout.
hasAnyHTML(opts) { return this._node.__eventually(() => this._node.wait.hasAnyHTML(opts)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTimeout() {\n return timeRemaining() <= 0 ? true : false;\n}", "hasAnyHTML(opts) {\n return this._waitHasAnyProperty('HTML', () => this._node.currently.hasAnyHTML(), opts);\n }", "hasAnyHTML() {\n return this._compareHasAny(this.getHTML());\n }", "pageCompleted()\n {\n \...
[ "0.6268987", "0.6261051", "0.61579406", "0.6062096", "0.5956872", "0.592782", "0.585417", "0.58213395", "0.58018386", "0.5799493", "0.57535607", "0.564874", "0.5630137", "0.5498008", "0.54788935", "0.54573375", "0.5444012", "0.5419894", "0.54105073", "0.53935564", "0.5393314"...
0.6304766
0