Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns cached user data without hitting our backend. Only works for 'UsernamePasswordAuthentication' flow. Does not work with 'AccessTokenAuthentication' flow. Get the current user based on the available token. If there is no current token, returns null.
async getCurrentUserAsync(options) { await this._getSessionLock.acquire(); try { const currentUser = this._currentUser; // If user is cached and there is an accessToken or sessionSecret, return the user if (currentUser && (currentUser.accessToken || currentUser.sessionSecret)) { return cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cachedUser() {\n return cachedUserInfo;\n}", "async getCurrentUser() {\n const options = this.buildOptions({\n path: `${this.path}/user`,\n method: \"get\",\n body: {},\n });\n\n return this.apiCall(options);\n }", "function getUserFromToken() {\n const token = getToken();...
[ "0.68420565", "0.68093425", "0.6800618", "0.66771835", "0.6632023", "0.6546754", "0.64609283", "0.643925", "0.64231926", "0.63948387", "0.6390512", "0.63502115", "0.630849", "0.6267935", "0.62527215", "0.624274", "0.6233765", "0.6225478", "0.6182929", "0.6180221", "0.6174847"...
0.70672333
0
Get the current user and check if it's a robot. If the user is not a robot, it will throw an error.
async getCurrentUserOnlyAsync() { const user = await this.getCurrentUserAsync(); if (user && user.kind !== 'user') { throw new (_internal().XDLError)('ROBOT_ACCOUNT_ERROR', 'This action is not supported for robot users.'); } return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getCurrentRobotUserOnlyAsync() {\n const user = await this.getCurrentUserAsync();\n\n if (user && user.kind !== 'robot') {\n throw new (_internal().XDLError)('USER_ACCOUNT_ERROR', 'This action is not supported for normal users.');\n }\n\n return user;\n }", "function isRobot(data) {\n ...
[ "0.72765326", "0.7177657", "0.564083", "0.54886866", "0.5480409", "0.5469603", "0.54591894", "0.5455224", "0.5444476", "0.5370395", "0.53214926", "0.5300247", "0.53002226", "0.52726394", "0.52312326", "0.5152079", "0.5148409", "0.51452255", "0.51429933", "0.51270527", "0.5086...
0.6703834
2
Get the current user and check if it's a robot. If the user is not a robot, it will throw an error.
async getCurrentRobotUserOnlyAsync() { const user = await this.getCurrentUserAsync(); if (user && user.kind !== 'robot') { throw new (_internal().XDLError)('USER_ACCOUNT_ERROR', 'This action is not supported for normal users.'); } return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRobot(data) {\n return (data.user &&\n data.user.logged_in &&\n data.user.approved &&\n (data.user.role === 'robot'));\n}", "async getCurrentUserOnlyAsync() {\n const user = await this.getCurrentUserAsync();\n\n if (user && user.kind !== 'user') {\n throw...
[ "0.71772885", "0.67034227", "0.5642816", "0.5489442", "0.5480982", "0.5470623", "0.5460249", "0.545681", "0.54461145", "0.5371464", "0.53229225", "0.530282", "0.5301987", "0.5274027", "0.5231725", "0.5153536", "0.51493984", "0.514749", "0.51442194", "0.5127128", "0.5087219", ...
0.72757435
0
Create or update a user.
async createOrUpdateUserAsync(userData) { var _currentUser; let currentUser = this._currentUser; if (!currentUser) { // attempt to get the current user currentUser = await this.getCurrentUserAsync(); } if (((_currentUser = currentUser) === null || _currentUser === void 0 ? void 0 : _c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateUser (context, user) {\n context.commit('updateUser', user)\n }", "function putUser(req, res) {\n\tvar user = req.body.username;\n\tvar pass = req.body.password;\n\tvar date = new Date().toISOString().slice(0, 10);\n\tvar last = req.session.uid;\n\tif (req.body.usertype == 'Admin') {\n\t\tvar userType ...
[ "0.7044808", "0.6822449", "0.6738267", "0.67360353", "0.6708388", "0.6672474", "0.66653216", "0.65755874", "0.6558276", "0.65435624", "0.653205", "0.65137076", "0.65115577", "0.65090126", "0.64857674", "0.6480277", "0.6472934", "0.64674854", "0.64631635", "0.64630526", "0.643...
0.6342123
25
Make the character fade between an idle and a run animation when the player starts to move.
function Update () { if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1) anim.CrossFade("run"); else anim.CrossFade("idle"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Start () { \r\n animation.wrapMode = WrapMode.Loop; \r\n animation.Stop(); \r\n Idle();\r\n}", "function Start() {\n\t// set animation wrap modes for player avatar\n\tcharDummy.animation[\"death\"].wrapMode = WrapMode.ClampForever;\n\tcharDummy.animation[\"hit\"].wrapMode = WrapMode.Once;\n\tch...
[ "0.6783634", "0.656824", "0.63810754", "0.62557274", "0.62329143", "0.6224555", "0.6224555", "0.6215695", "0.6215679", "0.62020326", "0.6199786", "0.61560863", "0.61508125", "0.61023545", "0.60938644", "0.6078535", "0.60413915", "0.60375977", "0.598637", "0.5977657", "0.59701...
0.6757374
1
callback when the modal is loaded
function modelReady(){ console.log('Model is ready'); // predict the image, takes time, select callback mobileNet.predict(image, gotResults); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerModalLoad() {\n $(document).on('shown.bs.modal shown.bs.popover', function() {\n registerRelationFormSubmit();\n registerEntityCalendarModal();\n });\n}", "loading() {\n this.modal.jQueryModalFade.addClass('modal_fade_trick');\n this.modal.jQueryModalAwait.css('display'...
[ "0.7014832", "0.6928672", "0.67918587", "0.67718965", "0.66646075", "0.65824276", "0.6477764", "0.64330375", "0.63886935", "0.63806796", "0.63805705", "0.63704246", "0.63623786", "0.63607347", "0.63547415", "0.6280796", "0.627875", "0.6241053", "0.62291765", "0.6227331", "0.6...
0.0
-1
error first syntax, must be with mobileNet Model
function gotResults(error, results){ if(error){ console.error(error); } else { console.log(results); let index = 1; let label = results[index].label; let confidence = "confidence: "+ results[index].confidence; document.getElementById("label").innerHTML = label; document.getElementById("confidence").inne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotModel(){\n console.log(\"MobileNet Loaded!\");\n}", "static getDeviceModel() {\n return \"yeelink.light.fancl5\";\n }", "function userMobile(model, os, ram, version, versionName, rooted) {\n this.model = model;\n this.os = os;\n this.ram = ram;\n this.version = version;\n this.versionNa...
[ "0.6587809", "0.5820891", "0.5817992", "0.57878834", "0.5676611", "0.56152636", "0.55534935", "0.5501038", "0.5461735", "0.54158413", "0.5393098", "0.52502036", "0.52426636", "0.51733124", "0.5133404", "0.5125243", "0.51224244", "0.51052994", "0.51052994", "0.50933397", "0.50...
0.0
-1
Internal function to update page. Since this code required a lot of time it has been encapsulated into a self containing module as it is never needed in the global space.
function updatePage(index, count) { if (activePage === count) { $pageArray[index] .text(count) .removeClass('Ellipsis') .addClass('Active'); } else { $pageArray[index] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePage() {\n \tcountLinks();\n \tgetDropDowns();\n \tquery();\n }", "function update_page() {\n // gets local json file\n /*global $*/\n /*global ODS_api*/\n \n // update Permit and Transit info\n update_permits();\n \n // update items info\n update_items();\n \n ...
[ "0.7675284", "0.7302305", "0.72840446", "0.71636444", "0.7156126", "0.705651", "0.7004209", "0.68962234", "0.68887156", "0.6857934", "0.681892", "0.6777634", "0.6704657", "0.6696755", "0.6676627", "0.6635103", "0.66328144", "0.6562227", "0.65440077", "0.6521009", "0.64083797"...
0.0
-1
Returns an array of distinct matches;
static getDistinctMatches () { return new Promise(function (resolve, reject) { Database.connection.query( 'SELECT DISTINCT match_id FROM predictions', function (err, rows) { if (err) { reject(err) } resolve(rows) } ) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "distinct() {\n return this.reduce(\n (seen, element) => {\n if (!seen.includes(element)) {\n seen.push(element);\n }\n return seen;\n },\n []\n );\n }", "function findUniques(a){\n let result = []\n for (num of a){\n let match = false;\n for...
[ "0.66942453", "0.65121764", "0.6492176", "0.6329344", "0.6228", "0.62198824", "0.6189068", "0.60928273", "0.6073508", "0.6054212", "0.60387486", "0.6005266", "0.6004127", "0.5947444", "0.5940345", "0.5933943", "0.5902595", "0.5867868", "0.5859012", "0.5856505", "0.5850129", ...
0.68920404
0
Deletes predictions with concluded matches from the database
static deletePredictions (id) { return new Promise(function (resolve, reject) { Database.connection.query( `DELETE FROM predictions WHERE match_id=${id}`, function (err, rows) { if (err) { return Logger.error(`[SQL] Could not DELETE from PR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearPreds() {\n let predImage = document.querySelector('.pred-image');\n let labelInfo = document.querySelector('.label-description');\n let slider = document.querySelector('.slider');\n slider.removeChild(predImage);\n slider.removeChild(labelInfo);\n document.querySelector('#get-predictions').sty...
[ "0.5874553", "0.58560866", "0.56881756", "0.54165596", "0.5224582", "0.51970613", "0.5129079", "0.5099544", "0.5091507", "0.5063023", "0.5018624", "0.50065565", "0.50039613", "0.49601734", "0.49586987", "0.49478218", "0.49411744", "0.49386415", "0.49385178", "0.49367106", "0....
0.68657106
0
query params: navmode: displays dropdown list for all courses (optional) coursekey: course for which to display info (required if not navmode)
function _initializeSettings() { var result = false; var params = {}; var urlParams = new URLSearchParams(window.location.search); params.navmode = urlParams.has('navmode'); params.coursekey = urlParams.has('coursekey') ? urlParams.get('coursekey') : null; settings.navmode = params.navmode; settings.cou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayData() {\n // Get URL\n const url = new URL(window.location.href);\n\n // Display data based on URL get parameters\n if (url.searchParams.get('courses') === 'enrolled') {\n // Display 'Enrolled Courses' section if requested\n document.getElementById('enrolled-courses-btn')...
[ "0.63628125", "0.6272193", "0.61834097", "0.61340296", "0.6123017", "0.6034089", "0.60318214", "0.6006911", "0.59585786", "0.5859224", "0.58126616", "0.57497627", "0.57251", "0.56934494", "0.56776464", "0.5647635", "0.5647273", "0.56429774", "0.5631766", "0.56284827", "0.5628...
0.0
-1
initialization of output page including optional controls section for navmode
function _initHeader() { page.header.classList.add('wl-header'); page.header.toolname.innerHTML = PAGE_TITLE; var elemCourseSelect = _createCourseSelect(); var elemEmbedControl = _createEmbedControl(); page.header.courses.appendChild(elemCourseSelect); page.header.courses.appendChild(elemEmbedCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePage);\n\t\t\t// Enable button again\n\t\t\tbuttonOff();\n\t\t}", "function initPage(sMode) {\n \n bindConfigurationTemplate();\n setFocusToField(\"lkpDepotCode...
[ "0.729011", "0.6904184", "0.65597916", "0.6534296", "0.6281364", "0.620795", "0.6197754", "0.6162348", "0.61208326", "0.6119186", "0.6117814", "0.61105436", "0.6107591", "0.6070753", "0.6067929", "0.605248", "0.60414416", "0.6039385", "0.6035902", "0.5973873", "0.59683806", ...
0.0
-1
gather config information and call to start rendering
function _generateCourseInfo() { _getCourseInfoLayout(_renderCourseInfoMain); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n\n landingModule.initiate(render);\n resultsModule.initiate(render);\n render(STORE);\n }", "async main(params) {\n var [res, req] = this.extract_request(params);\n if (!(await this.gui_is_enabled()))\n return this.render_error(res, 'GUI is not enabled.');\n ...
[ "0.67730814", "0.6457992", "0.63730955", "0.61824584", "0.6040751", "0.6015572", "0.5994235", "0.5874091", "0.5854235", "0.583862", "0.58240885", "0.57940525", "0.57905406", "0.57838404", "0.5774913", "0.5758263", "0.5753314", "0.5727459", "0.57172745", "0.57081306", "0.57026...
0.0
-1
use settings.config to load HTML include files
function _renderCourseInfoMain() { page.title.innerHTML = 'Expectations and FAQs for ' + settings.fulllayout.fullname; page.title.style.display = 'block'; _renderCourseInfoSubsections(page.contents); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend(config, ctx) {\n config.module.rules.push(\n {\n test: /\\.html$/,\n loader: 'raw-loader'\n }\n )\n }", "function includeHTmlFile(pageUrl) {\n if(pageId > 0) {\n $(\".pageView\").attr(\"include-html\", pageUrl+\".html\");\n $(\".pageView\").att...
[ "0.64696574", "0.61535776", "0.6115079", "0.6017511", "0.59358954", "0.5934281", "0.5928618", "0.5869639", "0.5835661", "0.5796931", "0.5795111", "0.5780847", "0.578049", "0.57639647", "0.5751546", "0.5730828", "0.5730828", "0.57112676", "0.5684317", "0.5669158", "0.5661894",...
0.0
-1
build URL for use with Google sheet web API
function _buildApiUrl (datasetname, coursekey) { let url = API_BASE; url += '?key=' + API_KEY; url += datasetname && datasetname !== null ? '&dataset=' + datasetname : ''; url += coursekey && coursekey !== null ? '&coursekey=' + coursekey : ''; //console.log('buildApiUrl: url=' + url); return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSheetUrl() {\n const SS = SpreadsheetApp.getActiveSpreadsheet();\n const ss = SS.getActiveSheet();\n let url = '';\n url += SS.getUrl();\n url += '#gid=';\n url += ss.getSheetId();\n return url;\n}", "function createGoogleURL(id){ \n return \"https://drive.google.com/file/d/\" + id + \"...
[ "0.7202003", "0.65931076", "0.6385487", "0.63531977", "0.6147096", "0.6067612", "0.60527515", "0.5998497", "0.5951631", "0.5951384", "0.59193367", "0.59154475", "0.5866708", "0.58119726", "0.58079636", "0.57923836", "0.578803", "0.5759011", "0.5726529", "0.5717315", "0.570682...
0.5753451
18
use Google Sheet web API to get course list
function _getCourseList (callback) { _setNotice('loading course list...'); fetch(_buildApiUrl('courselist')) .then((response) => response.json()) .then((json) => { //console.log('json.status=' + json.status); if (json.status !== 'success') { _setNotice(json.message); } //console.log('jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCourses() {\n console.log('It is hitting listCourses')\n var request = gapi.client.classroom.courses.list({\n pageSize: 10\n });\n\n request.execute(function(resp) {\n var courses = resp.courses;\n appendPre('Courses:');\n\n if (courses...
[ "0.74456185", "0.7329512", "0.7004545", "0.68584514", "0.6846796", "0.67422533", "0.6665037", "0.6554409", "0.6487081", "0.63424253", "0.6322208", "0.6321875", "0.63065255", "0.6261514", "0.62605405", "0.6226978", "0.6209612", "0.6197772", "0.609865", "0.60806066", "0.6071522...
0.6825769
5
use Google Sheet web API to get layout for course
function _getCourseInfoLayout (callback) { _setNotice('loading layout for course...'); fetch(_buildApiUrl('layout', settings.coursekey)) .then((response) => response.json()) .then((json) => { //console.log('json.status=' + json.status); if (json.status !== 'success') { _setNotice(json.message)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDepartment(dept, sheet, minSems){\n if(dept == undefined){ \n throw \"ERROR: NO DEPARTMENT SPECIFIED\";\n return;\n }\n if(sheet == undefined){\n sheet = SpreadsheetApp.openByUrl(\"https://docs.google.com/spreadsheets/d/11tRpkgU0JoV_qTa_KsI8yEO6aLz8KY9wtGmIQXkdaXs/edit#gid...
[ "0.5931675", "0.5914672", "0.57574105", "0.5685091", "0.557905", "0.5429997", "0.5428464", "0.54255086", "0.5418067", "0.5371904", "0.5359438", "0.53428847", "0.530627", "0.5241175", "0.52238476", "0.52156055", "0.5209841", "0.51852304", "0.5179121", "0.5174873", "0.51612926"...
0.657107
0
iframe responsive height post message to parent (if in an iframe) to resizeBy
function _postHeightChangeMessage() { var msg = document.body.scrollHeight + '-' + 'CourseInfoGenerator'; //console.log('posting to parent: ' + msg); window.parent.postMessage(msg, "*"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postResizeMessage() {\n \n if (top !== self) {\n var newHeight = document.getElementById(\"privlyHeightWrapper\").offsetHeight;\n parent.postMessage(window.name+\",\"+newHeight,\"*\");\n\n var evt = document.createEvent(\"Events\"); \n evt.initEvent(\"IframeResizeEvent\", true, false);\n ...
[ "0.8091792", "0.78570926", "0.77250725", "0.74730283", "0.72439873", "0.7193721", "0.7140891", "0.71222824", "0.7085598", "0.70599836", "0.70491314", "0.7012735", "0.69942665", "0.695132", "0.6935486", "0.6924309", "0.6919663", "0.6900533", "0.6868072", "0.681834", "0.6676708...
0.7138155
7
create embed code and copy to clipboard
function _handleEmbedButton(evt) { if (page.courseselect.value == NO_COURSE) return; _copyEmbedCodeToClipboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyCode(elem) {\n let text = document.getElementById('embedcode');\n let selection = window.getSelection();\n let range = document.createRange();\n range.selectNodeContents(text);\n selection.removeAllRanges();\n selection.addRange(range);\n document.execCommand('copy');\n documen...
[ "0.7164051", "0.6641365", "0.6585668", "0.65208447", "0.64649546", "0.64437973", "0.63731056", "0.63715", "0.6341934", "0.6279757", "0.6268308", "0.62358415", "0.6227742", "0.6220505", "0.6216213", "0.6203198", "0.62019444", "0.6195782", "0.6180854", "0.6176729", "0.61628896"...
0.62894243
9
Definimos el constructor Persona
function Persona(primerNombre) { this.primerNombre = primerNombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Persona(nombre,apellido) {\r\n this.nombre = nombre\r\n this.apellido = apellido\r\n}", "function Persona(){\n // propiedades públicas (atributos)\n this.nombre;\n this.edad;\n }", "function Persona(nombre, apellido, altura){\n this.nombre = nombre\n this.apellido = apellido\n t...
[ "0.8633685", "0.8549903", "0.8419505", "0.8381225", "0.83698416", "0.8311476", "0.82187146", "0.81830454", "0.81774473", "0.8128605", "0.79610217", "0.7829883", "0.7760717", "0.7759403", "0.7745188", "0.76475936", "0.75453013", "0.7497275", "0.7475211", "0.74619746", "0.74483...
0.8051649
10
Definimos el constructor Estudiante
function Estudiante(primerNombre, asignatura) { // Llamamos al constructor padre, nos aseguramos (utilizando Function#call) que "this" se // ha establecido correctamente durante la llamada Persona.call(this, primerNombre); //Inicializamos las propiedades específicas de Estudiante this.asignatura = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "constructor(nombre,urgencia){\n this.nombre = nombre //Se agrega this. para saber a que instancia pertenece\n this.urgencia = urgencia\n }", "constructor(nome, idade) {\n this.nome = nome\n this.idade = idade\n }", "constructor(nome, idade){\n this.nome = nome; //th...
[ "0.80768216", "0.77408904", "0.7452379", "0.73501104", "0.72848904", "0.72515506", "0.72282815", "0.71920663", "0.7167916", "0.7157909", "0.71266997", "0.71230024", "0.71224695", "0.7108885", "0.71055406", "0.71054626", "0.71054626", "0.71054626", "0.71054626", "0.71054626", ...
0.7182834
8
Retrieve all films in plain text
function allFilmsText(){ console.log("allFilmsText Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=string", "#results", "text"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function showallfilms(films) {\n items.innerHTML = \"\";\n for (var i=0;i<films.length;i++){\n items.innerHTML +=...
[ "0.62993246", "0.602434", "0.5967408", "0.58365", "0.57909733", "0.56356215", "0.56196475", "0.5550588", "0.5529781", "0.55269057", "0.54140234", "0.53957725", "0.538021", "0.52360886", "0.5234109", "0.5229354", "0.51702505", "0.51625395", "0.51563543", "0.5142658", "0.512589...
0.6365667
0
Retrieve all films as json
function allFilmsJSON(){ console.log("allFilmsJSON Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=json", "#results", "json"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function GetFilms() {\n $.ajax({\n url: \"/api/films\",\n type: \"GET\",\n contentType...
[ "0.7484855", "0.67432845", "0.6555464", "0.64135325", "0.6287405", "0.6222295", "0.6209996", "0.6093518", "0.6049365", "0.6018124", "0.6012009", "0.59683436", "0.5945824", "0.5904802", "0.5870994", "0.5838105", "0.58233804", "0.5813349", "0.58112305", "0.57924783", "0.5777623...
0.718542
1
Retrieve all films as xml
function allFilmsXML(){ console.log("allFilmsXML Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=xml", "#results", "xml"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function showallfilms(films) {\n items.innerHTML = \"\";\n for (var i=0;i<films.length;i++){\n items.innerHTML +=...
[ "0.603631", "0.592544", "0.5823774", "0.5707611", "0.5580072", "0.5558011", "0.55178654", "0.5384213", "0.537906", "0.5371391", "0.5346617", "0.53352535", "0.532201", "0.5294087", "0.5286781", "0.52657443", "0.5247863", "0.522775", "0.5142333", "0.51271546", "0.5124222", "0...
0.7301042
0
Retrieve ID for Update field
function retrieveID(){ var retrievedID = $('#updateId').val(); retrieveMovie("https://eloquent-yew-227217.appspot.com/GetFilm?ID="+retrievedID+"&format=json"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get updatableId () {\n const isUpdatable = this.isPending || this.isRejected\n return isUpdatable ? String(this.id) : '0'\n }", "getLongId() {\n return this.form_.id_ + '-' + this.id_;\n }", "getId() {\n\t\treturn this.props.id || this.generatedId;\n\t}", "getId() {\n\t\treturn this.props.id || th...
[ "0.64960766", "0.6277111", "0.62575847", "0.62575847", "0.6203971", "0.6164369", "0.61588687", "0.61020726", "0.60967255", "0.60932195", "0.60932195", "0.6056475", "0.6040974", "0.600965", "0.59843004", "0.59834576", "0.59834576", "0.59834576", "0.59834576", "0.59834576", "0....
0.0
-1
Insert new film by user
function insertFilm(){ var addTitle = $('#addTitle').val(); var addYear = $('#addYear').val(); var addDirector = $('#addDirector').val(); var addStars = $('#addStars').val(); var addReview = $('#addReview').val(); console.log("https://eloquent-yew-227217.appspot.com/InsertFilm?Title="+addTitle+"&Year="+addYear+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async addFilm(film){\n return movie.create(film)\n }", "async addFilm(film){\n return Movie.create(film)\n }", "function insertMovieIntoWatched(user, movie) {\n\n findOne(user, function (err, account) {\n if (err) throw err;\n console.log('this user is', user)\n account.watched.unsh...
[ "0.73221254", "0.73079133", "0.6590128", "0.6507211", "0.6405196", "0.63007516", "0.6112185", "0.60798305", "0.6068742", "0.590161", "0.5881466", "0.58581114", "0.5851505", "0.58492565", "0.5847636", "0.5845693", "0.58275634", "0.5815586", "0.5773026", "0.57411134", "0.572006...
0.6144337
6
Retrieve update fields with data
function updateFilm(){ var stringRequest = ""; var updateID = $('#updateId').val(); var updateTitle = $('#updateTitle').val(); var updateYear = $('#updateYear').val(); var updateDirector = $('#updateDirector').val(); var updateStars = $('#updateStars').val(); var updateReview = $('#updateReview').val(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProductsFromUpdate() {\n productName.value = CRUDSArray[updateIndex].name;\n productPrice.value = CRUDSArray[updateIndex].price;\n productCategory.value = CRUDSArray[updateIndex].cat;\n productDescription.value = CRUDSArray[updateIndex].desc;\n}", "function populateDataFields() {}", "on...
[ "0.67003846", "0.65195584", "0.6294572", "0.6289369", "0.62881494", "0.607457", "0.6056597", "0.6013838", "0.59550387", "0.59326327", "0.59305066", "0.59055537", "0.58116406", "0.58046186", "0.5778463", "0.5770959", "0.5751414", "0.57465774", "0.5740373", "0.57397944", "0.573...
0.0
-1
Removing film by id
function deleteFilm(){ deleteId = $('#deleteId').val(); deleteAjax("https://eloquent-yew-227217.appspot.com/DeleteFilm?ID="+deleteId+"","#results"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async deleteFilm({id: id}) {\n const idFound = movie.findOne({id: id})\n return idFound.remove()\n }", "async deleteFilm({ id: id }) {\n const idFound = Film.findOneAndDelete({ id: id })\n return idFound.remove()\n }", "async deleteFilm(id) {\n return Movie.findByIdAndR...
[ "0.8440527", "0.8364083", "0.8130348", "0.7785274", "0.76617396", "0.7506237", "0.74902874", "0.74002683", "0.7383807", "0.72406846", "0.7185792", "0.6963605", "0.69409156", "0.69398427", "0.6921304", "0.6764344", "0.67364204", "0.6717817", "0.6694076", "0.66938955", "0.66152...
0.7040916
11
Searching for data for one film with radio buttons for each type (json,xml,text)
function searchFilm(){ var checkJSON = $('#radio-4').prop('checked'); var checkXML = $('#radio-5').prop('checked'); var checkSTRING = $('#radio-6').prop('checked'); var formatValue; var movieName = $("#movieName").val(); if(checkJSON == true){ formatValue = "json"; } else if(checkXML == true){ fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchFilmName(){\n\t var checkJSON = $('#radio-7').prop('checked');\n\t var checkXML = $('#radio-8').prop('checked');\n\t var checkSTRING = $('#radio-9').prop('checked');\n\t var formatValue;\n\t var movieName = $(\"#movieNameName\").val();\n\t movieName = encodeURIComponent(movieName.trim());\n\n\...
[ "0.65453905", "0.6461823", "0.6271259", "0.6164069", "0.6109039", "0.606818", "0.60309917", "0.6004584", "0.5941981", "0.59335196", "0.5922275", "0.58942086", "0.5880765", "0.5863567", "0.585908", "0.58584505", "0.58108884", "0.5792101", "0.57852256", "0.57834375", "0.5759288...
0.68464357
0
Search film by name
function searchFilmName(){ var checkJSON = $('#radio-7').prop('checked'); var checkXML = $('#radio-8').prop('checked'); var checkSTRING = $('#radio-9').prop('checked'); var formatValue; var movieName = $("#movieNameName").val(); movieName = encodeURIComponent(movieName.trim()); if(checkJSON == tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFilm(search) {\n\n\tomdb.getMovie(search)\n\n}", "function searchFilm() {\n if (searchQuery.length === 0) {\n searchQuery = \"Mr. Nobody\"\n }\n request(`http://www.omdbapi.com/?t=${searchQuery}&plot=short&apikey=5d94fa00`, function (error, response, body) {\n if (!error && res...
[ "0.76290697", "0.73173356", "0.7309572", "0.71369797", "0.7059531", "0.6987228", "0.69536096", "0.6840419", "0.67399657", "0.67273235", "0.67239606", "0.6680002", "0.66212153", "0.6617153", "0.6608576", "0.657966", "0.65611815", "0.65463156", "0.6545956", "0.6523653", "0.6492...
0.6223655
31
Add new film based on format
function insertAjaxResult(address, resultRegion, format) { if(format == "xml") { $.ajax({ url: address, success: function(text) { insertXML(text, resultRegion, address); } }); } else if(format == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async addFilm(newMovie) {\n return Film.create(newMovie);\n }", "async addFilm(film){\n return movie.create(film)\n }", "async addFilm(film){\n return Movie.create(film)\n }", "function applyFormat(identifier, file, episode, anime, group) {\r\n\tvar originalIdentifier = identifier...
[ "0.5985028", "0.59338284", "0.58199966", "0.5539052", "0.55170846", "0.55019665", "0.54276466", "0.53201836", "0.5246842", "0.5240548", "0.5232035", "0.52076674", "0.5201092", "0.5180877", "0.51247555", "0.512022", "0.5090473", "0.50755936", "0.50667965", "0.50428987", "0.503...
0.0
-1
Updating input fields in update form
function retrieveMovie(address){ $.ajax({ url: address, success: function(text) { //Update other input fields $("#updateTitle").val(text.title); $("#updateYear").val(text.year); $("#updateDirector").val(text.di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\t\tvar updateField = \"\";\n\t\tif ((newName.value != \"\") && (newName.value != name.innerHTML)) {\n\t\t\tupdateField += \"name will be updated from \" + name.innerHTML + \" to \" + newName.value +\"\\n\";\n\t\t}\n\t\tif ((newEmail.value != \"\") && (newEmail.value != email.innerHTML)) {\n\t...
[ "0.7069076", "0.6990553", "0.6791662", "0.6722422", "0.6722422", "0.6722422", "0.6675824", "0.6675824", "0.6592015", "0.6590645", "0.6581497", "0.6577138", "0.6556363", "0.65346867", "0.6520531", "0.65046793", "0.64939344", "0.6478551", "0.646799", "0.6450883", "0.6412272", ...
0.0
-1
Updating results for update
function updateAjax(address,dataArray,resultRegion){ $.ajax({ url: address, success: function(text) { $(resultRegion).html(""); $(resultRegion).append(text); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(){}", "update(){}", "update(){}", "function updateResult(){\n\t\n\tvar results = getSortedResults();\n\tvar editId = document.getElementById('editid').value;\n\tvar key = findResultKeyById(editId);\n\t\t\n\t//update values\n\t\n\tif(key !== ''){\n\t\tresults[key].groupingdate = formatGroupingDate(docu...
[ "0.715666", "0.715666", "0.715666", "0.7054771", "0.6963071", "0.6801176", "0.67600286", "0.6705428", "0.6624503", "0.66222185", "0.66222185", "0.66209555", "0.6585019", "0.6584487", "0.6525588", "0.6519611", "0.65162456", "0.6448409", "0.64312136", "0.6406456", "0.64064455",...
0.0
-1
Updating results for delete
function deleteAjax(address,resultRegion){ $.ajax({ url: address, success: function(text) { $(resultRegion).html(""); $(resultRegion).append(text); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteResult()\n{\n\t\t\n\tvar results = getSortedResults();\n\tvar editId = document.getElementById('editid').value;\n\tvar key = findResultKeyById(editId);\n\t\n\tresults.splice(key,1);\n\tsaveResults(results);\n\n\tupdateList('editform');\n\t\n\treturn false;\n}", "function deleteIndividualRecord() {...
[ "0.68539363", "0.6220683", "0.6183939", "0.61086416", "0.61020523", "0.6093425", "0.6078659", "0.60460436", "0.60076296", "0.60014296", "0.5995403", "0.5993455", "0.5987595", "0.59789985", "0.59729093", "0.596788", "0.59592915", "0.59567934", "0.5944064", "0.59394693", "0.593...
0.0
-1
Updating results for insert all films as text
function insertText(text, resultRegion) { console.log(text); var obj = JSON.parse(text); $(resultRegion).html(""); $(resultRegion).append("<table id='results-table'>"); $(resultRegion).append("<tr>"); $(resultRegion).append("<th style='width: 100px;'>ID</th>"); $(resultRegion).append("<th s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFilmsText(){\n console.log(\"allFilmsText Clicked\");\n insertAjaxResult(\"https://eloquent-yew-227217.appspot.com/GetAllFilms?format=string\", \"#results\", \"text\");\n}", "function updateFilm() {\n\tvar resultRegion = \"update-film-result\";\n\tvar info = $(\"#update-film-form\").serialize();\n\...
[ "0.6165258", "0.593613", "0.56586134", "0.5418686", "0.53310364", "0.53302395", "0.53279626", "0.5323049", "0.5306844", "0.52898115", "0.52882665", "0.5270744", "0.5261419", "0.5199689", "0.519576", "0.5178567", "0.5120821", "0.50792813", "0.5066333", "0.50464165", "0.5035754...
0.46218678
72
Updating results for insert all films as xml
function insertXML(text, resultRegion, address) { $(resultRegion).html(""); console.log(text); var xmlObject = $(text).find("film").each(function(){ var id = $(this).find("id").text(); var title = $(this).find("title").text(); var year = $(this).find("year").text(); var director = $(this).find("director").te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFilmsXML(){\n console.log(\"allFilmsXML Clicked\");\n insertAjaxResult(\"https://eloquent-yew-227217.appspot.com/GetAllFilms?format=xml\", \"#results\", \"xml\");\n}", "function showSearchXmlFilmInfo(responseText) {\n var xmlDocument = responseText;\n var films = xmlDocument.getElementsByTagN...
[ "0.7022471", "0.58032227", "0.5350247", "0.5237386", "0.5150121", "0.5050606", "0.49571896", "0.49242768", "0.49139178", "0.4900817", "0.48700637", "0.48270053", "0.4814382", "0.48003456", "0.47931507", "0.47888234", "0.47732472", "0.47727558", "0.47694895", "0.47652796", "0....
0.5999771
1
Updating results for insert all films as json
function insertJSON(text, resultRegion, address) { console.log(text); //Load content of jsp (which is json string of all films) $(resultRegion).load(address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFilmsJSON(){\n console.log(\"allFilmsJSON Clicked\");\n insertAjaxResult(\"https://eloquent-yew-227217.appspot.com/GetAllFilms?format=json\", \"#results\", \"json\");\n}", "function addFilmsToCollection(req, res) {\n var films = req.body.films;\n films.forEach(function (film, index, arr) {\n i...
[ "0.64997834", "0.6476006", "0.5822244", "0.576916", "0.5644999", "0.56258434", "0.55808264", "0.55488557", "0.552961", "0.55067337", "0.5484096", "0.54703486", "0.54685616", "0.5461462", "0.5454929", "0.54458755", "0.54413295", "0.54409623", "0.5434356", "0.54085976", "0.5375...
0.0
-1
Updating results for insert of single films as text
function insertTextSingle(text, resultRegion) { console.log(text); var obj = JSON.parse(text); $(resultRegion).html(""); $(resultRegion).append("<table id='results-table'>"); $(resultRegion).append("<tr>"); $(resultRegion).append("<th style='width: 100px;'>ID</th>"); $(resultRegion).append...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateFilm() {\n\tvar resultRegion = \"update-film-result\";\n\tvar info = $(\"#update-film-form\").serialize();\n\t$.ajax({\n\t\turl : \"./UpdateServlet\",\n\t\tdata : \"format=text&\" + info,\n\t\tdatatype : \"text\",\n\t\tsuccess : function(rawData) {\n\t\t\thtmlInsert(resultRegion, rawData)\n\t\t},\n\...
[ "0.598335", "0.57622874", "0.56312525", "0.556408", "0.5373383", "0.53134173", "0.5310493", "0.5258247", "0.52545536", "0.524331", "0.5195936", "0.51846313", "0.5181506", "0.5176821", "0.5141557", "0.51125187", "0.50691473", "0.5063864", "0.50496686", "0.4936964", "0.49190164...
0.4974428
19
2. val_flag funcion para limpiar las variables globales y tablas para cuando se vuelven a llamar desde el link
function val_flag() { if (flag) { pag_active = 0; Json_ped = {DATA : []}; Json_ped_pos = {DATA : []}; Json_sol_ped = {DATA : []}; Json_sol_ped_pos = {DATA : []}; Json_sol_ped_pos_lib = {DATA : []}; array_pag = new Array(); $('#sol_ped').empty(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getvars(val) {\nvar out=all[val];\nall[val]=false;\n\treturn out;\n}", "function longFlag() {\n cursor += 2; // skip leading dashes\n var flagName = nextString(\"=\");\n if (boolFlag(flagName)) {\n result[flagName] = true;\n } else {\n ...
[ "0.60737234", "0.52841425", "0.52107245", "0.5134843", "0.5134226", "0.5134226", "0.50744635", "0.50720614", "0.50720614", "0.5071102", "0.5032222", "0.5011832", "0.5006257", "0.49932545", "0.49760616", "0.49350217", "0.4901814", "0.4892391", "0.48544872", "0.48543307", "0.48...
0.52569324
2
3. val_ie funcion validar si es esta usando ie y no usar preventDefault
function val_ie(event){ if (event.preventDefault) { event.preventDefault(); }else{ event.returnValue = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validerAmEdi(){\n var result=true;msg=\"\";\n if(document.getElementById(\"txtedNomEditeur\").value==\"\")\n msg=\"ajouter un Nom d'Editeur s'il te plait\";\n // if(msg==\"\" && document.getElementById(\"cboxedPays\").value==0)\n // msg=\"ajouter un pays s'il te plait\";\n if(msg==\"\" && docume...
[ "0.6428197", "0.64013064", "0.6310463", "0.6303928", "0.6247519", "0.61460096", "0.6142362", "0.6132334", "0.6123498", "0.61158645", "0.6107241", "0.6106448", "0.60723394", "0.6055793", "0.6033365", "0.602909", "0.6027064", "0.6022683", "0.60208446", "0.60206366", "0.6020563"...
0.7323643
0
4. make_table funcion para inicializar la data table recibe el id de la tabla a construir
function make_table(tabla){ $(tabla).dataTable({ "bDestroy": true, "sPaginationType": "full_numbers", "oLanguage": { "sProcessing": "Procesando...", "sLengthMenu": "Mostrar _MENU_ registros", "sZeroRecords": "N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTable(id) {\r\n let table = document.createElement(\"table\");\r\n table.setAttribute(\"id\", id);\r\n let tbody = document.createElement(\"tbody\");\r\n table.appendChild(tbody);\r\n return table;\r\n}", "function createTable(tableId) {\n var tableSection = document.getElementById('table-da...
[ "0.6969316", "0.69412565", "0.6906844", "0.67892057", "0.65497535", "0.65115756", "0.6475661", "0.64738667", "0.6473521", "0.64549875", "0.64396954", "0.642774", "0.6414438", "0.6397548", "0.6396199", "0.635952", "0.6353699", "0.6311551", "0.63059646", "0.63028556", "0.630083...
0.6249403
22
5. showMessage para configurar mensaje con boton y muestra o oculta el div que se le envie
function showMessage(type, div, text, ShowOrHide, estilo) { $(div).removeClass(); $(div).empty(); $(div).removeAttr('style'); switch (type) { case 'E': //un div con mensaje y botton para cerrar el div var html = "<button type=\"button\" class=\"close\" onclick=\"showMessage(\'S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMessageDialog(){\n\tif($('#message').length){\n\t\tshowMessage($('#message').text());\n\t}\n}", "function message(ar) {\n\tif(ar==1){\n\t document.getElementById('successMsg').innerHTML +=\n\t \"<div id='snackbar' class=''>Projekt wurde genehmigt!</div>\";\n\t}\n\telse{\n\t\tdocument.getElementById...
[ "0.75918484", "0.74937624", "0.74361396", "0.7390277", "0.7337088", "0.7318361", "0.730788", "0.7266875", "0.72349036", "0.7226281", "0.7202171", "0.7182006", "0.7167751", "0.7138555", "0.7090852", "0.7087057", "0.7054895", "0.70489556", "0.7045833", "0.70148927", "0.70053524...
0.69390607
29
6. iniciarSesion funcion para iniciar Sesion
function iniciarSesion(event) { var u3r, pA$; u3r = $('input:text').val(); pA$ = $('input:password').val(); if (u3r.length > 0 && pA$.length > 0) { try{ val_ie(event); $.ajax({ url: "php/soap.php", type: "POST", cache: false, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iniciar() {\n \n }", "function inicio() {\n\t\tacao('move_x', sc1_chamada1, 'ida', chamada_1);\n\t\tacao('move_x', sc1_chamada2, 'ida', chamada_2);\n\t\tacao('move_x', sc1_chamada3, 'ida', chamada_3, saiChamadas);\n\t}", "function iniciar(){\n\t\tif( _mensaje !== null){\n\t\t\tshow_mod...
[ "0.7792079", "0.6968258", "0.68503183", "0.6826014", "0.6347778", "0.625606", "0.62194324", "0.6174556", "0.6141776", "0.6113064", "0.607571", "0.6038241", "0.6009619", "0.6009619", "0.6003272", "0.6002526", "0.60000855", "0.59992325", "0.5996945", "0.5953394", "0.5948161", ...
0.0
-1
7. cerrarSesion funcion para cerrar Sesion
function cerrarSesion(event){ val_ie(event); $.ajax({ url: "logout.php", type: "POST", cache: false, success: function (mensaje) { if (mensaje === 'logout'){ location.href = '../index.html'; } else{ showMessage('E', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cerrar(){\n\ttry {\n\t\twindow.close();\n\t} catch(e){\n\t\tjsTrace(\"No se pudo cerrar la ventana\\n\"+e);\n\t}\n}", "function cerrar(){\n //$('#modalSolicitud').html(modalSolicitud);\n start = 0;\n \tsocket.emit(\"procesarSolicitud\", {\"estado\": false});\n \tsocket.disconnect();\n ...
[ "0.7504735", "0.7475318", "0.72736317", "0.7225588", "0.70323807", "0.70074946", "0.70025295", "0.6818397", "0.6757369", "0.6742047", "0.6713141", "0.6631079", "0.6459259", "0.64020956", "0.6399826", "0.6317746", "0.6290271", "0.62480336", "0.62281513", "0.61659074", "0.61466...
0.6383921
15
8. cerrarSesion funcion para validar Sesion
function val_sesion(event){ $.ajax({ url: 'timeout.php', type: "POST", cache: false, success: function (mensaje){ if(mensaje === '0'){ //event.stopImmediatePropagation(); val_flag(); if(document.title == 'detallle'){ wind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cerrar(){\n ventana.close();\n Ext.getCmp('editarBanco').setDisabled(true);\n Ext.getCmp('eliminarBanco').setDisabled(true);\n }", "function quitarValidacionesAElemento(elemento)\n{\n\t$('#' + elemento).rules('remove');\n\t$('#' + elemento).removeClass(\"error\");\n}", "functio...
[ "0.67162347", "0.63546944", "0.63546944", "0.63546944", "0.6322925", "0.6301174", "0.6282381", "0.6282381", "0.6250946", "0.619083", "0.61044335", "0.6018195", "0.6006257", "0.5936787", "0.5874053", "0.5841251", "0.58354956", "0.5822778", "0.5822161", "0.5802532", "0.57786435...
0.0
-1
9. listar funcion para mostrar en la vista liberaciones o los items que se chequean
function listar(data){ var lista = $('<ul></ul>'); var li; var div = $('#update'); var flag_ped = false, flag_sol_ped = false; div.empty(); div.removeClass(); div.toggle(true); $.each(data, function(index, obj){ if(obj['POSICION'] && !(obj['MESSAGE']) && (obj['NUMERO'])){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarArreglo() { //carga en la tabla html los elementos que ya se encuentran \"precargados\" en el arreglo\n for (const pedido of pedidos) {\n mostrarItem(pedido);\n }\n}", "function iniciarListaBusqueda(){\n var ciclos = selectDatoErasmu();\n for(var aux = 0, help = 0 ; aux < erasmu.le...
[ "0.6779031", "0.6629267", "0.6582055", "0.62264574", "0.6204002", "0.6198617", "0.6170878", "0.6113909", "0.61117166", "0.60827315", "0.6076913", "0.60560095", "0.60534215", "0.6040916", "0.6033852", "0.6012906", "0.60044575", "0.59663683", "0.5963905", "0.59604627", "0.59330...
0.58535415
38
10. Rechazar funcion para Rechazar pedidos o solicitudes de pedido
function Rechazar(type){ val_sesion(this); var tipo_rechazo, json, elementos; if(type === 'ped' ){ elementos = Json_ped.DATA.length ;}else{ elementos = Json_sol_ped.DATA.length;} var text = 'Esta seguro que desea Rechazar los '+elementos+' registros seleccionados?. Revise su seleccion antes de Rechazar'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function operadorRechazoSolicitud(req,res){\n console.log('rechazo solicitud');\n let id_operador= req.params.id, id_solicitante = req.params.id_solicitante;\n let solicitud = buscarSolicitud(id_solicitante);\n solicitudes[solicitud].estatus='pendiente';\n arregloSolicitudRechazada.push({idSolicitan...
[ "0.66334206", "0.6553733", "0.6309372", "0.6234091", "0.6136617", "0.61312526", "0.61280286", "0.6103099", "0.6071393", "0.598186", "0.59572554", "0.595388", "0.5927683", "0.5836908", "0.58343786", "0.58255285", "0.5812248", "0.5784865", "0.5776304", "0.57724524", "0.5770198"...
0.59426284
12
11. liberar funcion para liberar pedidos o solicitudes de pedido
function liberar(type){ val_sesion(this); var tipo_lib, json, elementos; if(type === 'ped' ){ elementos = Json_ped.DATA.length ;}else{ elementos = Json_sol_ped.DATA.length;} var text = 'Esta seguro que desea liberar los '+elementos+' registros seleccionados?. Revise su seleccion antes de liberar'; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async obtenerPedidos(req,res){\n\n try{\n //Busco los ID de todos los pedidos.\n let listaIdsPedido = await querysAdmin.findIdsPedidos();\n\n let arrayIds = [];\n //Guardo en un array solo los numeros de los pedidos.\n for(let i = 0; i < listaIdsPedido....
[ "0.64427257", "0.61143607", "0.59473854", "0.5942137", "0.56875616", "0.5631494", "0.56308496", "0.5616554", "0.56134176", "0.5582561", "0.5568342", "0.5562148", "0.554268", "0.54643875", "0.54470396", "0.5439899", "0.5438934", "0.5434196", "0.5433681", "0.5419888", "0.541938...
0.5453861
14
12. RemovePed funcion para quitar el pidido de la lista de liberacion
function RemovePed(array, property, value) { var numero, result, i; $.each(array, function(index){ result = array[index]; switch (result[property]) { case value: i = index; return false; break; } }); array.splice(i,1);//quitar del json }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quitarpregrado(iddiv){\n var eliminar = document.getElementById(\"pg\" + iddiv);\n\n var contenedor= document.getElementById(\"pr\");\n contenedor.removeChild(eliminar);\n}//Fin quitarpo", "function quitarpostgrado(iddiv){\n var eliminar = document.getElementById(\"pt\" + iddiv);\n\n var contenedor...
[ "0.6751414", "0.67312115", "0.67147595", "0.65683526", "0.6552454", "0.6520581", "0.65018356", "0.6479935", "0.6456818", "0.64398193", "0.64022326", "0.6372259", "0.63198656", "0.62977386", "0.6270329", "0.6266716", "0.62660015", "0.6242699", "0.62398046", "0.62380224", "0.62...
0.0
-1
13. RemoveSol funcion para quitar la solicitud de la lista de liberacion
function RemoveSol(array, property, value){ var pos=[], result; $.each(array, function(index,data){ if(data.NUMERO === value){ pos.push(index); } }); result = $.grep(array, function(n, i) { return $.inArray(i, pos) ==-1; }); Json_sol_ped_pos_lib ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CleanUpPlayer(netPl : NetworkPlayer){ \n\tfor(var i : int = 0; i < playerList.Count; i++){ \n \tif(netPl == playerList[i].netPlr){\n \t\tif(gameManager.gameFields.gameStarted)gameManager.CleanUpPlayer(playerList[i]);\n \t\tplayerList.RemoveAt(i); \n \t\tbreak;\n \t}\n }\t\t\n}", "funct...
[ "0.6388283", "0.6354307", "0.62916005", "0.6267102", "0.62374294", "0.62344027", "0.6182147", "0.61614543", "0.61063766", "0.6098042", "0.60958", "0.6079641", "0.6049774", "0.604821", "0.6022159", "0.60219646", "0.60104233", "0.59876466", "0.5986513", "0.59860194", "0.5972652...
0.0
-1
14. removeStyle funcion para quitar los estilos inline de las tablas
function removeStyle(tabla){ tabla.removeAttr('style'); var th = tabla.children('thead').children('tr').children('th');//para quitar los estilos de los th $.each(th,function(index, child){ $(child).removeAttr('style'); $(child).removeAttr('aria-label'); $(child).removeAttr('ari...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeInlineStyle() {\n const that = this,\n tabStrip = that.$.tabStrip;\n\n if (that._inlineStyleTabStripChildren) {\n const tabStripChildren = tabStrip.children;\n\n for (let i = 0; i < tabStripChildren.length; i++) {\n tabStripChildren[i].removeAttr...
[ "0.6993515", "0.6960619", "0.64179397", "0.6383201", "0.63197136", "0.6319074", "0.6317999", "0.6305767", "0.62147135", "0.6149531", "0.6123079", "0.6101956", "0.6101321", "0.6091296", "0.6085713", "0.60790914", "0.6069092", "0.60622406", "0.60459894", "0.5995485", "0.5981898...
0.7730845
0
15. agrupar funcion para agrupar los ped o sol_ped a la lista de liberacion
function agrupar(type,cod){ var id = $('#'+cod); switch (type) { case 'ped': if(id.is(':checked')){ Json_ped.DATA.push( {"NUMERO": id.val()}); listar(Json_ped.DATA); }else{ RemovePed(Json_ped.DATA, "NUMERO", id.val()); listar(Json_ped.DATA); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function group_comms() {\n // Create an array of all committees\n // These are the names associated with the \n // nodes on the chart.\n // We'll pull out the top 'ntop' comms after the first generation\n comm_group={}; // reset\n comm_type={}; //reset\n for (i=0; i < nc; i++) {\n mycan...
[ "0.6046092", "0.5756737", "0.5579506", "0.5533362", "0.552577", "0.5516815", "0.5506177", "0.5451584", "0.5436744", "0.53204024", "0.5312721", "0.5305708", "0.5301854", "0.52980995", "0.52885544", "0.5280246", "0.5279673", "0.52391785", "0.5232932", "0.521545", "0.51923215", ...
0.57157403
2
16. verDetalle funcion para ver el detalle de el ped o sol_ped
function verDetalle(numero,tipo){ var Json = {DATA :[]}; val_ie(this); val_sesion(this); if(tipo === 'ped'){ $.each(Json_ped_pos.DATA, function(index, data){ if(numero === data['PO_NUMBER'] ){ Json.DATA.push(data); } }); }else{ $.each(Json_sol_ped_pos.DATA, functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mursVdessin(tab, nx, pas){\r\n\tfor(i = 0; i < tab.length; ++i){\r\n\t\tcoord = mursVtoCoord(tab[i], nx);\r\n\t\t\r\n\t\tpu(); rt(90); fd(coord.x*pas);\r\n\t\trt(90); fd(coord.y*pas);\r\n\t\tpd(); fd(pas); pu();\r\n\t\tbk(pas); bk(coord.y*pas);\r\n\t\tlt(90); bk(coord.x*pas); lt(90);\r\n\t\tpd();\r\n\t}\r...
[ "0.54452085", "0.5344881", "0.5300039", "0.5286946", "0.5207442", "0.5204416", "0.52033937", "0.5117928", "0.5114746", "0.50880575", "0.50848085", "0.5060725", "0.503929", "0.50040615", "0.5001207", "0.4932919", "0.4913303", "0.48850057", "0.48825946", "0.48589557", "0.485383...
0.51002985
9
17. chg_array_value se verifica en el array de las paginas para colocar que se seleccionaron todos los elementos de esa pagina
function chg_array_value(paginas,value){ $.each(paginas, function(index, pagina){ if(pagina['className'] === 'paginate_active'){ $.each(array_pag,function(index,obj_pag){ if(array_pag[index][0] === parseInt(pagina['innerHTML'])){ array_pag[index][1] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeValueInArray(id, nameOfVariable, valuetoChange, nameofArray) {\r\n\r\n// code that makes changes in the programmingButtonArray or the programmingLinksArray.\r\n// this function is needed for bens open frameworks code to change the values within your code\r\n// you can use the atomicUpdateArray() fun...
[ "0.59711766", "0.58771384", "0.5800333", "0.5690381", "0.56678885", "0.56551623", "0.55623215", "0.5537246", "0.54908544", "0.5441999", "0.5365634", "0.53284967", "0.5315559", "0.53123015", "0.5308221", "0.5303016", "0.5299545", "0.5295176", "0.5288846", "0.5258363", "0.52500...
0.80014485
0
18. sel_todo funcion selecciona todos los items de la tabla
function sel_todo(tabla, id_check, event){ event.stopImmediatePropagation(); var checkboxs = $(tabla).children('tbody').children('tr').children('td').children('input'); var paginas = $(tabla+'_wrapper').children('div'+tabla+'_paginate').children('span').children('a'); if($(id_check).is(':checked')){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectRows(data) {\n \t\n }", "function selecionaLinha(div,actpos,cell){\n\tsetTimeout(\n\t\tfunction(){\n\t\t\t$(div + \" tr[posicao=\"+actpos+\"] input:eq(\"+cell+\") \").focus().select();\n\t\t},10\n\t);\n}", "function ConsultaItemSelect(tx) { console.log(\"ConsultaItemSelect\...
[ "0.64474547", "0.63534695", "0.63489115", "0.61281097", "0.6108675", "0.6108095", "0.6108095", "0.6089044", "0.60842764", "0.6003563", "0.6001054", "0.59677666", "0.59427774", "0.5931947", "0.58797383", "0.58391416", "0.58374006", "0.58176607", "0.58137596", "0.5811293", "0.5...
0.63408333
3
19. existe_pag funcion de validacion si la pagina existe en el array de paginas, sino existe se agrega al array de paginas
function existe_pag(pag_active,tabla,sel_all){ var exist; for (i = 0; i < array_pag.length; i++) { if(array_pag[i][0] === parseInt(pag_active)){ exist = true; break; }else{ exist = false; } } if(!exist){ //en caso que la pagina no este ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consultarTuplasExistentesPaginacion_pagina(pagina) {\n\t$(\"#template_celdaPaginacion\").hide();\n\t$(\"#contenedorConsulta\").html(\"Cargando...\");\n\t\n\tarrayCamposConsulta[\"pagina\"] = pagina;\n\t\n\tvar ajax = $.ajax({\n\t\turl: \"lib_php/\"+nombrePHPConsultar,\n\t\ttype: \"POST\",\n\t\tdataType: \...
[ "0.61180824", "0.61180824", "0.59333277", "0.59333277", "0.58743125", "0.58223325", "0.5724792", "0.5720725", "0.5679904", "0.5678522", "0.5628316", "0.5554109", "0.5508507", "0.55025446", "0.547595", "0.53917503", "0.53406453", "0.5311172", "0.5283919", "0.52263904", "0.5223...
0.78351605
0
20. chk_a funcion de validacion del checkbox de seleccionar todo cada ves que cambia de pagina
function chk_a(tabla){ var new_array_pag=new Array(); var temp_array_pag=new Array(); var index,i=0; var sel_all = $($(tabla).children('thead')[0]).children('tr').children('th').children('input'); var paginas = $(tabla+'_wrapper').children('div'+tabla+'_paginate').children('span').children...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valida(){\n \n ida = document.getElementsByName(\"ida_vuelo\");\n\n var seleccionado = false;\n\n for(var i=0; i<ida.length; i++) { \n if(ida[i].checked) {\n seleccionado = true;\n break;\n }\n }\n \n if(!seleccionado) {\n\n alert(\"Debe seleccionar ...
[ "0.7679352", "0.7109331", "0.7095369", "0.70637274", "0.69876724", "0.6911114", "0.6848413", "0.66662025", "0.66224915", "0.6612846", "0.660058", "0.6578818", "0.65677077", "0.6562059", "0.6527889", "0.65229964", "0.6453365", "0.64451504", "0.6441843", "0.64225465", "0.636856...
0.7265221
1
21. addCommas funcion para dar formatos a valores de moneda
function addCommas(nStr){ nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + '.' + '$2'); } return x1 + x2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addCommas(num) {\n return num.toString().replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n }", "function addCommas(x) {\n\t if (!isNumeric(x)) {\n\t return isString(x) ? x : '-';\n\t }\n\t\n\t var parts = (x + '').split('.');\n\t return parts[0].replace(/(\\d{1,3})(?=(?:\\d{...
[ "0.7049134", "0.69266176", "0.69024134", "0.6869508", "0.6735137", "0.6735137", "0.6722854", "0.6673573", "0.6653809", "0.6609212", "0.6606617", "0.65591216", "0.6488171", "0.6392886", "0.6387083", "0.6357107", "0.63494754", "0.6345654", "0.6344762", "0.6329671", "0.6320679",...
0.6246061
30
22. con_ped_cab funcion que consulta los pedidos y los muestra en la tabla
function con_ped_cab(event){ var tabla,json,linea,arrayValores,paginas,paginadores; val_ie(event); val_flag(); val_sesion(event); $.ajax({ url: "con_ped.php", type: "POST", cache: false, beforeSend: function () { console.log('empezando proceso'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarDatosPedidoChef1(idPedido){\n\tvar txt = '<h5>Encabezado pedido '+ pedidos[i][\"idPedido\"] +' </h5>';\n\tvar txt = '<table class=\"table table-hover table-striped\">';\n\ttxt +='<thead><tr><th>Descripcion</th><th>Cantidad</th><th>Valor Uunit.</th><th>Total</th></thead>';\n\ttxt +='<tr><td>Churrasco...
[ "0.6029574", "0.59801364", "0.58545274", "0.5817684", "0.57945335", "0.576263", "0.5755034", "0.5749676", "0.5729043", "0.567736", "0.56454283", "0.5610425", "0.5577135", "0.55640167", "0.554718", "0.5518897", "0.55168", "0.54987836", "0.54911333", "0.5489413", "0.5484561", ...
0.6631844
0
fin funcion / 23. con_ped_cab funcion que consulta las sol_ped y los muestra en la tabla
function con_sol_ped(event){ var tabla,json,linea,arrayValores,paginas,paginadores; val_ie(event); val_flag(); val_sesion(this); $.ajax({ url: "con_sol_ped.php", type: "POST", cache: false, beforeSend: function () { console.log('empezando proceso'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compilar()\r\n{\r\n\t// limpar tabelas\r\n\tvar tabela = document.getElementById('tabela-binario');\r\n\ttbody = tabela.getElementsByTagName('tbody')[0];\r\n\ttbody.innerHTML = '';\r\n\tvar tabela = document.getElementById('tabela-verdade');\r\n\ttbody = tabela.getElementsByTagName('tbody')[0];\r\n\ttbody...
[ "0.60995823", "0.60593283", "0.59658134", "0.58434296", "0.58258724", "0.5712152", "0.56920475", "0.56131464", "0.5604021", "0.5566196", "0.5524643", "0.5512547", "0.5499802", "0.5452303", "0.5444754", "0.54384893", "0.5435208", "0.54343295", "0.5420578", "0.5415542", "0.5412...
0.51244855
67
add sound to channel
record(audio) { const time = Date.now() - this.timeOffset const duration = time + audio.audio.duration this.soundsTrack.push({ time, audio }) this.duration < duration && (this.duration = duration) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putSound(so) {\r\n// console.log('puSound');\r\n// obj=document.createElement(\"embed\");\r\n// obj.setAttribute(\"src\",so);\r\n// obj.setAttribute(\"type\",\"audio/wav\");\r\n// this.capa.appendChild(obj);\r\n// return;\r\n \r\n obj=document.createElement(\"embed\");\r\n obj.set...
[ "0.70861745", "0.7078667", "0.70611364", "0.7042034", "0.69316137", "0.69212043", "0.6907994", "0.68325204", "0.6812711", "0.67799294", "0.6778375", "0.676084", "0.6759406", "0.67566633", "0.67505527", "0.6748965", "0.67484385", "0.67447394", "0.671755", "0.66945726", "0.6672...
0.0
-1
enable or disable 'play in loop' mode, default change state in toggle mode
loop(on = !this.loop) { // @todo this.loop not exists! this.mode = on ? MODE_LOOP : MODE_PLAY }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleRepeat() {\n if(audioPlayer.loop === true) {\n audioPlayer.loop = false;\n repeatToggle.toggleClass(\"btn__loop--enabled\");\n } else {\n audioPlayer.loop = true;\n repeatToggle.toggleClass(\"btn__loop--enabled\");\n }\n}", "toggle() {\n if (this._playingState === 'idle') {\n...
[ "0.7381236", "0.72821546", "0.7176242", "0.71607137", "0.71417767", "0.7131452", "0.7114427", "0.7114427", "0.7114427", "0.7114427", "0.7114427", "0.7092974", "0.7029037", "0.7002171", "0.6972738", "0.69687563", "0.69687563", "0.69265723", "0.68293124", "0.6821655", "0.681399...
0.804061
0
enable or disable muted, default change state in toggle mode
mute(on = !this.muted) { this.muted = on }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleMute() {\n if (this.get('isMuted')) {\n this.set('volume', this.get('unmuteVolume'));\n }\n else {\n this.set('volume', 0);\n }\n }", "function muteOrUnmute() {\n video.muted = !video.muted;\n mutebutton.value = video.muted ? 'Unmute' : 'Mute';\n}", "function toggleMute() {\n ...
[ "0.74449813", "0.71514255", "0.7083768", "0.7067099", "0.7018488", "0.6982144", "0.6841047", "0.68211925", "0.675787", "0.67570484", "0.6735495", "0.67299545", "0.6722857", "0.6676351", "0.6675486", "0.666941", "0.6644992", "0.6629853", "0.6599219", "0.6589889", "0.6583378", ...
0.730948
1
makes the server listen on Port 8080 and print smessage into console copied from order_page
function isNonNegInt(q, returnErrors = false) { errors = []; // assume no errors at first if (q== '') {q=0}; //if quantity is empty or 0 if (Number(q) != q) errors.push('Not a number!'); // Check if string is a number value if (q < 0) errors.push('Negative value!'); // Check if it is non-negative if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listening(){\n console.log(\"server running\");\n console.log(`running on localhost: {$port}`);\n}", "function listening(){\n console.log(\"server running\"); \n console.log(`running on localhost: ${port}`);\n}", "function listening(){\n console.log(\"server running\"); \n consol...
[ "0.66771877", "0.666891", "0.6594394", "0.6554812", "0.64688784", "0.64176947", "0.6392223", "0.63559806", "0.63393134", "0.6326055", "0.6315163", "0.6315163", "0.62785065", "0.6256188", "0.62287056", "0.6224288", "0.62002355", "0.61969966", "0.6179466", "0.6161891", "0.61224...
0.0
-1
They are good at taking orders, but they don't know how to capitalize words, or use a space bar! All the orders they create look something like this: "milkshakepizzachickenfriescokeburgerpizzasandwichmilkshakepizza" The kitchen staff are threatening to quit, because of how difficult it is to read the orders. Their pref...
function getOrder(input) { // split into individual characters const splitOrder = input.split(""); // unsorted order array const orderArr = []; // temp variable for each order item let orderItem = ""; // loop through characters to create order items for (let i = 0; i < splitOrder.length;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acronym(word){\r\n //take in string and return new string with first letter of each word\r\n //\"self contained underwater breathing apparatus\"\r\n //-> \"SCUBA\"\r\n newWord = \"\";\r\n prevSpace = true;\r\n for(let i = 0; i < word.length; ++i){\r\n if(word[i] != \" \" && prevSp...
[ "0.61631304", "0.61458474", "0.61324936", "0.6114756", "0.6017866", "0.6010531", "0.5995309", "0.59507316", "0.59086007", "0.58983815", "0.58657086", "0.58590245", "0.5857666", "0.5846499", "0.58433723", "0.5833487", "0.5825791", "0.5817294", "0.5815572", "0.5782803", "0.5768...
0.6371584
0
TODO this should be a prototype function like the rest / This function resets (or initializes) the jumping animations
function resetJumpingAnimation(player) { player.animations.right[JUMPING] = new Animation(dwarfRight, player.spriteSize.x, player.spriteSize.y, player.spriteSize.y * 3, player.spriteSize.x, 3, 0.1, true, null, true); player.animations.left[JUMPING] = new Animation(dwarfLeft, player.spriteSize.x, player....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetJump() {\n this.z = 0;\n this.verticalVelocity = null;\n }", "reset() {\n this.yPos = this.groundYPos;\n this.jumpVelocity = 0;\n this.jumping = false;\n this.ducking = false;\n this.update(0, Trex.status.RUNNING);\n this.midair = false;\n this.speedDrop = false;\n t...
[ "0.7434881", "0.72375727", "0.71492183", "0.7115256", "0.71064276", "0.69790524", "0.69130456", "0.6900733", "0.6886642", "0.6815983", "0.67119604", "0.6620972", "0.6615754", "0.66030014", "0.658014", "0.6570695", "0.6539962", "0.6523652", "0.648233", "0.6481484", "0.6457119"...
0.78592455
0
Draw debugging visual elements
function renderDebug(player, ctx) { var bounds = player.boundingBox(); ctx.save(); // Draw player bounding box ctx.strokeStyle = "red"; ctx.beginPath(); ctx.moveTo(bounds.left, bounds.top); ctx.lineTo(bounds.right, bounds.top); ctx.lineTo(bounds.right, bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "debug(state) {\n if (state) {\n this.debugGraphics = new PIXI.Graphics;\n this.debugGraphics.lineStyle(2, 0xFF0000, 1);\n this.ent.addChild(this.debugGraphics);\n } else {\n this.debugGraphics = undefined;\n }\n }", "function drawDebugInfo() {\n\tfill(255);\n\ttext(\"x: \"+ mouseX +...
[ "0.7095937", "0.6897086", "0.67805696", "0.6679102", "0.66387904", "0.66297865", "0.6589443", "0.65674156", "0.65084493", "0.6497982", "0.6358639", "0.6303238", "0.62803507", "0.62528604", "0.6217785", "0.6197611", "0.61776096", "0.61661804", "0.6159561", "0.612054", "0.61168...
0.5760191
86
create the helium model View model Status listening
function pageStatus( arguments ){ var loading = document.getElementById("loading"); var loaded = document.getElementById("loaded"); if( arguments[0] == PageStatus.LOADED ){ loading.hidden = true; loaded.hidden = false; }else if ( arguments[0] == PageStatus.LOADING ){ loaded.hidden = true;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callHandler(model){\n model.info=model.status;\n model.emit(globalCallBackRouter,model)\n}", "function vxlModelManager(){\r\n\tthis.toLoad = []; \r\n\tthis.models = [];\r\n\t\r\n\tvar e = vxl.events;\r\n\tvxl.go.notifier.publish([\r\n\t e.MODELS_LOADING,\r\n\t e.MODEL_NEW,\r\n\t ...
[ "0.59432375", "0.5936407", "0.5936407", "0.5758456", "0.5661601", "0.5609813", "0.5603958", "0.5584349", "0.55632997", "0.5553434", "0.55512005", "0.5537092", "0.5496639", "0.54802305", "0.54791623", "0.54640794", "0.54416347", "0.5435979", "0.54282844", "0.5365568", "0.53131...
0.0
-1
View model data listening
function newStream( arguments ){ var list = document.getElementById("helium_list"); var item = list.appendItem( arguments[0].getUrl() ); item.label = arguments[0].getUrl(); item.tooltip = "info"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onViewModelChange(e) {\r\n\r\n }", "function onViewModelChange(e) {\r\n\r\n\t}", "function ViewData() {}", "function ViewData() {}", "function ViewData() {}", "_bindEvents () {\n this.listenTo(this.model.get('rats'), 'change sync', this._showRats)\n }", "function ViewData() { }", "fun...
[ "0.65540504", "0.6508599", "0.64346635", "0.64346635", "0.64346635", "0.63765365", "0.6352504", "0.6352504", "0.63215274", "0.6198366", "0.61520696", "0.61023074", "0.60910046", "0.6082884", "0.60632956", "0.60274297", "0.5986918", "0.59638715", "0.5905437", "0.5900696", "0.5...
0.0
-1
RCP application state listening a usefull toggle method
function toggleStatus( status ){ var strings = document.getElementById("he_strings"); if( status == "statusLoading" ) document.getElementById("status_icon").src = "chrome://helium/content/view/loading.gif"; else if( status == "statusOk") document.getElementById("status_icon").src = "chrome://helium/content...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onSwitch() {}", "onSwitch() {}", "onSwitch() {}", "onToggle() {}", "toggle() {\n\t\tthis._$pwActive = !this._$pwActive;\n\t\tthis.broadcast('toggle', true);\n\t}", "function _toggle() {\n var _editor = EditorManager.getCurrentFullEditor();\n _enabled = !_enabled;\n // Set the new st...
[ "0.6918657", "0.6918657", "0.6918657", "0.6844923", "0.6601856", "0.61802685", "0.61268866", "0.61000234", "0.60824686", "0.60729015", "0.6043541", "0.60377955", "0.6003938", "0.60033303", "0.5999511", "0.5993631", "0.5975179", "0.5955497", "0.59295684", "0.5900768", "0.58965...
0.0
-1
Event fired when the tooltip is being shown
function show( event ){ var listitem = document.tooltipNode; var streamobj = heliummodel.getStreamObject( listitem.getAttribute("label") ); //Set stream content-type and size document.getElementById("ctype").value = streamobj.getCType(); document.getElementById("size").value = streamobj.getDataSize...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showToolTip_(event) {\n this.updateToolTip_(event);\n }", "tooltipClicked() {}", "async showTooltip() {\n this.actionEventHandler();\n }", "function mouseOver() {\n\t\ttooltip.style(\"display\", \"block\")\n\t\t\t .style(\"visibility\", \"visible\");\n\t}", "function showTooltip(content, ev...
[ "0.8079887", "0.7772575", "0.7457758", "0.74355125", "0.736173", "0.7360146", "0.7344294", "0.73331916", "0.7332413", "0.73195994", "0.73120743", "0.7233056", "0.7191452", "0.71641654", "0.7139522", "0.71090966", "0.7103275", "0.7103275", "0.7103275", "0.7103275", "0.7103275"...
0.0
-1
Send stream to the RCP application (Send stream button event)
function alertJWS(){ if( !window.rcp_checker.isRunning() ){ var strings = document.getElementById("he_strings"); var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); var check = {value: false}; var flags = prompts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StartStreamMode() {\n\n // Set flag\n streaming_mode = true;\n\n // Notify other widgets\n}", "function playButton(){\n\n\tsocket.emit(\"p\");\n}", "function gotRemoteStream(event) {\n // Associate the remote video element with the retrieved stream\n remoteVideo.srcObject = event.s...
[ "0.6249598", "0.5873033", "0.5851632", "0.58357656", "0.5818368", "0.5755396", "0.57494175", "0.5749314", "0.5717245", "0.571153", "0.56914353", "0.5678243", "0.5637053", "0.5628184", "0.5614006", "0.5604694", "0.5596659", "0.55928403", "0.5579806", "0.55792314", "0.5544135",...
0.0
-1
Randomly picks a number from 19120 inclusive, this is the number the user needs to reach
function requiredCrystals() { required = Math.floor(Math.random() * (120 - 19 + 1) + 19); log(`Points needed: ${required}`); $requiredCrystals.text(required); return required; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNum() {\n goalNumber = Math.floor((Math.random() * 120) + 19);\n }", "function getRandomInt() {\n\treturn Math.floor(Math.random() * (120-19+1))+19; \n}", "function targetNumber(min, max) {\n return Math.floor(Math.random() * (120 - 19 + 1) + 19);\n }", "function setRandomNumT...
[ "0.79791284", "0.78844845", "0.78098273", "0.78037673", "0.77761984", "0.77319545", "0.75796014", "0.7577113", "0.75566036", "0.75250447", "0.7516219", "0.7514248", "0.7506291", "0.7500157", "0.7486242", "0.74725354", "0.7425527", "0.73678815", "0.7361972", "0.7361455", "0.73...
0.0
-1
Generates the value of the four crystals randomly
function crystalValueSetter() { let crystals = []; crystals.length = howManyCrystals; for (let i = 0; i < howManyCrystals; i++) { randomNum = Math.floor(Math.random() * (12 - 1 + 1) + 1); crystals[i] = randomNum; $("#crystal-" + (i + 1)).attr("crystal-value", randomNum); }; log(`...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomlizeCrystals() {\n blueValue = Math.floor(Math.random() * 12) + 1;\n greenValue = Math.floor(Math.random() * 12) + 1;\n redValue = Math.floor(Math.random() * 12) + 1;\n purpleValue = Math.floor(Math.random() * 12) + 1;\n}", "function assignCrystalRand(){\n \n for(var i = 0; i...
[ "0.834535", "0.8285881", "0.7999745", "0.7920867", "0.77849984", "0.76294565", "0.76259035", "0.76213175", "0.7595862", "0.7593417", "0.75331414", "0.74679404", "0.74053216", "0.73915166", "0.73549473", "0.7347989", "0.72817594", "0.7251637", "0.7240163", "0.7240163", "0.7237...
0.67384607
90
get a random record from collection
async function getMysteryWordFromDb() { let wordsCollection = await getWordsCollection(); //Get a 1 random record from collection let wordResult = await wordsCollection.aggregate( [{$sample:{size:1}}, {"$project": {word: 1, category: 1, _id: 0}} ]); //let wordResult = awa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomElementFrom(collection) {\n\n var itemNumber = Math.floor(Math.random() * collection.length);\n return collection[itemNumber];\n}", "function sample(collection) {\n if (collection instanceof Array) {\n let size = array.length;\n let indx = Math.floor(Math.random() * siz...
[ "0.79537034", "0.7521006", "0.7182788", "0.7182788", "0.7038597", "0.7038597", "0.7036721", "0.69658285", "0.69658285", "0.688783", "0.6754396", "0.6713898", "0.66395694", "0.65762734", "0.64462453", "0.64442945", "0.6401988", "0.62761456", "0.6239842", "0.6234969", "0.621121...
0.6276841
17
obj.name: name obj.title: title obj.age: age obj.color: color obj.size: size obj.prize: prize
function a(obj) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function phone (shape,version,color,brands,application,price){\n//we use this to create a property of an object'\n//this property name should be the same as the parameter\nthis.shape=shape\nthis.version=version\nthis.color=color\nthis.brands=brands\nthis.application=application\nthis.price=price\n}", "function s...
[ "0.555423", "0.5531076", "0.5353655", "0.5352095", "0.527302", "0.52671105", "0.5257213", "0.52554005", "0.52118605", "0.52011913", "0.51952803", "0.51655203", "0.5143342", "0.51344913", "0.51336765", "0.5128196", "0.51084584", "0.5100527", "0.50940424", "0.50849813", "0.5078...
0.0
-1
Get data from variable
function getDataFromVariable(variable, token, callback) { var url = 'https://industrial.api.ubidots.com/api/v1.6/variables/' + variable + '/values'; var headers = { 'X-Auth-Token': token, 'Content-Type': 'application/json' }; $.ajax({ url: url, method: 'GET', headers: headers, success: function (res) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_data() {}", "getData(){}", "function dereferenceData(bitterapple, data) {\n\t\tvar value\n\t\tif (typeof(data) === 'string') {\n\t\t\tvalue = bitterapple.getGlobalVariable(data)\n\t\t\tif (value === undefined) {\n\t\t\t\tvalue = bitterapple.scenarioVariables[data]\n\t\t\t}\n\t\t}\n\t\tif (value ==...
[ "0.69064146", "0.66859984", "0.65553355", "0.6525368", "0.64310175", "0.63299936", "0.6318971", "0.61721027", "0.6150931", "0.6131828", "0.60953504", "0.6092028", "0.6080727", "0.60405546", "0.6028288", "0.59700346", "0.595529", "0.59303766", "0.59047496", "0.5889691", "0.587...
0.66497254
2
Update widget UI based on status
function updateUI(status) { ui_status = status; if (ui_status === UI_NO_RESPONSE) { } else if (status === UI_DONE) { // Leds leds.show(); // Spinner spinner.hide(); } else if (status === UI_WAITING) { // Button leds.hide(); // Spinner spinner.show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static tickUiUpdate() {\n // Fill badge data\n let updateParcel = {\n text: \"\",\n color: \"#d352ad\",\n tooltip: \"\"\n };\n\n this.setUpdateObjTexts(updateParcel);\n\n // Apply to UI\n if (this.networkOk) {\n this.applyBadgeCo...
[ "0.7082267", "0.70480657", "0.68539083", "0.6816267", "0.6688856", "0.66492116", "0.659456", "0.65839803", "0.6547893", "0.6455714", "0.6426828", "0.6393643", "0.6383343", "0.63781166", "0.63738406", "0.6357595", "0.6330902", "0.63284373", "0.6310802", "0.6291562", "0.6266916...
0.7698556
0
jquery.mb.YTPlayer 25072016 _ jquery.mb.components
function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thememascot_YTPlayer() {\n $(\".player\").mb_YTPlayer();\n }", "function videoPlayer() {\n if ($(\".playerVideo\").length>0) { //If there are video backgrounds\n $(\".playerVideo\").mb_YTPlayer();\n jQuery('.playerVideo').on(\"YTPPause\",function(){\n jQuery('.play-video').removeCl...
[ "0.8416701", "0.70149803", "0.67455435", "0.65646255", "0.64997476", "0.64060307", "0.63825846", "0.6357772", "0.6282292", "0.62549245", "0.62549245", "0.62549245", "0.6206441", "0.6178231", "0.6160298", "0.6155226", "0.6152816", "0.61399996", "0.61238945", "0.6121365", "0.60...
0.6312812
20
Adds content to Footer
createFooter(footer) { footer.appendChild(footerTemplate.content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendFooter(){\n var footer = \"<div class='footer'>\";\n footer += \"<center><div class='copyrightText'>&copy; 2017 ITEE Group Canada</div></center>\";\n footer += \"</div>\";\n $('body').append(footer);\n }", "function insertFooter () {\n \"use strict\";\n try {\n...
[ "0.7676134", "0.7307338", "0.7305253", "0.72496825", "0.7103195", "0.70680934", "0.70506424", "0.6942721", "0.6910287", "0.68720347", "0.6856142", "0.68537635", "0.6839219", "0.6769875", "0.67662483", "0.6756002", "0.67289454", "0.6706619", "0.6698485", "0.6611359", "0.656569...
0.7942572
0
given a comment, return how a comment will look
function make_comment(comment){ const section = createElement('section', null); let author_date = createElement('div', null, {class: 'author-date-container'}); section.appendChild(author_date); author_date.appendChild(createElement('h3', comment.author)); const date = new Date(parseFloat(comment.pub...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCommentLengthDeduction(comment) {\r\n\tvar minimumCommentLength = 3; \r\n\tvar commentLength = comment.split(/\\s+/).length;\r\n\treturn (commentLength <= minimumCommentLength) ? -commentLengthDeduction : 0; \r\n}", "function getCommentContents (comment) {\n return comment.replace('/**', '')\n ...
[ "0.6762293", "0.658208", "0.64752245", "0.63499004", "0.62838674", "0.61235815", "0.61235815", "0.60545826", "0.6028781", "0.6005043", "0.5991631", "0.5985375", "0.59579444", "0.59579444", "0.59579444", "0.59579444", "0.5933142", "0.5933142", "0.5929223", "0.5927488", "0.5916...
0.5870013
24
A bit of doubly written code below consider refactoring or rewriting a bit... :)
function SaveDescription() { // // Save the updated description for beef // // Not yet implemented return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal fun...
[ "0.6844573", "0.64705026", "0.6460063", "0.63252264", "0.6319496", "0.62451893", "0.6095125", "0.6072296", "0.604989", "0.6028234", "0.5822403", "0.5783114", "0.57804656", "0.5766687", "0.5685339", "0.5652832", "0.5612526", "0.5568752", "0.55481154", "0.55132717", "0.55111146...
0.0
-1
Save the text entered in the left argument 'textarea' into the database
function successfulCallback(data) { if( data["flag"]!=0 ) { console.log("Error: Failed to save updated argument :("); return false; } $('#SaveLeft').hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveTextarea(){\n Storage.set({\n 'text': textarea.value\n }, function(items){\n if(chrome.runtime.lastError){\n message('Text coudn\\'t be saved by chrome.');\n _gaq.push(['_trackEvent', 'Errors', 'saveTextarea set ...
[ "0.72448456", "0.7216681", "0.7207866", "0.71453446", "0.6619605", "0.6520775", "0.63479954", "0.63393795", "0.63344985", "0.6294621", "0.62769264", "0.6267552", "0.6188146", "0.61830604", "0.6174021", "0.6066613", "0.60660607", "0.604403", "0.6016432", "0.600305", "0.5998165...
0.0
-1
Save the text entered in the right argument 'textarea' into the database
function successfulCallback(data) { if( data["flag"]!=0 ) { console.log("Error: Failed to save updated argument :("); return false; } $('#SaveRight').hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveTextarea(){\n Storage.set({\n 'text': textarea.value\n }, function(items){\n if(chrome.runtime.lastError){\n message('Text coudn\\'t be saved by chrome.');\n _gaq.push(['_trackEvent', 'Errors', 'saveTextarea set ...
[ "0.7244327", "0.70903146", "0.70779395", "0.7015976", "0.649641", "0.6483944", "0.6286875", "0.62851995", "0.6267237", "0.6254162", "0.62525517", "0.6248582", "0.61982197", "0.6143902", "0.60467476", "0.6015392", "0.6010304", "0.60039693", "0.5990281", "0.59776163", "0.592655...
0.0
-1
Take the content in the 'AddComment' field, send it to the db to be save, and if this is successful, show the comment in html Create our callbacks (both good and evil)
function successfulCallback(data) { if( data["flag"]!=0 ) { console.log("Error: Failed to add comment :("); return false; } // Get the comment div var comment_div = data["comment_div"]; console.log("Comment Div:"); console.log(comment_div); // Clear the editable comment and add // the new comment t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCommentClick(event){\n\n event.stopPropagation();\n \n //get user inputs\n var comTitle = $('input[name=\"commTitle\"]').val().trim();\n var comContent = $('textarea[name=\"commContent\"]').val().trim();\n\tvar articleId = $('article[data-value]').attr('data-value');\n\tvar errorComment ...
[ "0.7144222", "0.7025924", "0.692378", "0.6916028", "0.68264157", "0.6817973", "0.67024344", "0.6679954", "0.66771466", "0.6621163", "0.65821487", "0.65738726", "0.65490574", "0.6528184", "0.64968", "0.6490924", "0.6488116", "0.6486194", "0.64847744", "0.64759207", "0.6475655"...
0.7136796
1
Retrieving an icon for the card's header:
function retrieveHeaderIcon(iconNum) { iconNum = iconNum ? iconNum : 0 switch(iconNum) { // Devices Cards case '1': return <FontAwesomeIcon icon={faMapMarkedAlt}/>; // Warehouses Cards case '2': return <FontAwesomeIcon icon={faBox}/>; case '3': return <FontA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getCardIcon(name) {\n\t\t//Get all of the card icons\n\t\tvar all = document.getElementById(\"bottombar\").getElementsByTagName(\"div\");\n\t\t//Find the one\n\t\tfor(var i = 0; i < all.length; i++) {\n\t\t\t//Check\n\t\t\tif(all[i].getAttribute(\"cardname\") == name) {\n\t\t\t\treturn all[i];\n\t\t\t}\n\t\...
[ "0.66242826", "0.6618082", "0.65170133", "0.6503699", "0.64136094", "0.63688755", "0.63534284", "0.63065153", "0.6278361", "0.625415", "0.6183666", "0.61366606", "0.60930717", "0.60848516", "0.60804886", "0.607332", "0.60324234", "0.59609276", "0.594217", "0.5928092", "0.5901...
0.7692812
0
Retrieving an icon for the card's footer:
function retrieveFooterIcon(iconNum) { iconNum = iconNum ? iconNum : 0 switch(iconNum) { // Devices Cards case '1': return <FontAwesomeIcon icon={faMapMarkerAlt} style={{width: '20px', height: '20px'}} />; // Warehouses Cards case '2': return <FontAwesomeIcon icon={faWare...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get_icon(dt) { return dt ? \"icons:close\" : \"icons:arrow-back\"; }", "static getCardIcon(name) {\n\t\t//Get all of the card icons\n\t\tvar all = document.getElementById(\"bottombar\").getElementsByTagName(\"div\");\n\t\t//Find the one\n\t\tfor(var i = 0; i < all.length; i++) {\n\t\t\t//Check\n\t\t\tif(all[i].g...
[ "0.6722481", "0.6497497", "0.6428209", "0.6385484", "0.6252603", "0.6178428", "0.61434716", "0.6108224", "0.606428", "0.60444295", "0.602139", "0.5969082", "0.5967012", "0.59556", "0.5895435", "0.5883067", "0.5835511", "0.5831806", "0.58250225", "0.58250225", "0.5805743", "...
0.75824285
0
connect to a bluetooth device
connect(device){ this.setState({connecting: true}) BluetoothSerial.connect(device.id) .then((res) => { console.log(`Connected to device ${device.name}`); this.bluetoothListener() ToastAndroid.show(`Connected to device ${device.name}`, ToastAndroid.SHORT); }) .catch((err) => console...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect() {\n exponentialBackoff(3 /* max retries */, 2 /* seconds delay */,\n function toTry() {\n if (bluetoothDevice) {\n console.log('Connecting to Bluetooth Device... ');\n return bluetoothDevice.gatt.connect()\n .then(server => {\n ...
[ "0.77677613", "0.73400295", "0.7297643", "0.72353", "0.7153811", "0.70938075", "0.68957114", "0.6836653", "0.67991894", "0.67526525", "0.6734778", "0.66968364", "0.6695869", "0.6674027", "0.6653975", "0.65769523", "0.65361047", "0.64949644", "0.6472039", "0.6448015", "0.64174...
0.8277398
0
this will "listen" all incoming data
bluetoothListener(){ //Each command from Arduino ends with a ";" //This is to determine when an command ends BluetoothSerial.withDelimiter(';') .then((res)=>{ BluetoothSerial.on('read', (data)=>{ //commands recived are recieved as strings. We remove all unnecessary characters let ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "function handleListen() {\n console.log(\"Listening\");\n }", "function handleListen() {\n console.log(\"Listening\");\n }", "function listening(){console.log(\"listening. . .\");}", "listen() {\n ...
[ "0.7089249", "0.7079527", "0.7079527", "0.69214654", "0.6916853", "0.68881685", "0.6836033", "0.67982185", "0.66738176", "0.66382027", "0.6626648", "0.65945554", "0.6586012", "0.65800583", "0.65717393", "0.6555555", "0.6537321", "0.6533851", "0.65211874", "0.64912957", "0.645...
0.0
-1
this function is used to tell Arduino that we recieved message
respondToArduino(command){ BluetoothSerial.write(command) .then((res) => { console.log(res, command) }) .catch((err) => console.log(err.message)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subscriberEvent() {\n// var contents = fs.readFileSync('/arduino_notification_out.txt').toString();\n// console.log(\"Message from Arduino:\" + contents); \n}", "_onRecieveMessage() {\n this.client.on(\"data\", data => {\n console.log(data.toString());\n });\n }", "function rece...
[ "0.6524485", "0.6366838", "0.6303426", "0.63000315", "0.6267987", "0.6236487", "0.623539", "0.62282324", "0.62175333", "0.6176466", "0.61717504", "0.6169706", "0.6163184", "0.6155045", "0.611625", "0.6076351", "0.60749936", "0.6054975", "0.60530627", "0.605071", "0.605071", ...
0.6193555
9
Construct a CachedResponse from a cache entry. Project code should never need to call this.
constructor({entry = {}, req, res}) { this._found = !!entry.found this._key = entry.key this._namespace = entry.namespace this._data = entry.data this._metadata = entry.metadata || {} this._expiration = entry.expiration this._req = req this._res = res ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToCachedResponse(response) {\n return {\n statusCode: response.statusCode,\n statusMessage: response.statusMessage,\n headers: cloneDeep_1.default(response.getHeaders()),\n body: response.body,\n };\n}", "function convertToCachedResponse(response) {\n return {...
[ "0.63567704", "0.62525976", "0.6180787", "0.5870254", "0.5847203", "0.5847203", "0.5731109", "0.5660207", "0.5630805", "0.560663", "0.56028676", "0.5521177", "0.55149466", "0.5437872", "0.54255116", "0.5423145", "0.5396316", "0.5365149", "0.53576565", "0.5282169", "0.52619684...
0.58350897
6
Get the key used to retrieve this CachedResponse
get key() { return this._key }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCacheKey(ctx) { return ctx.url }", "get key()\n\t{\n\t\tvar priv = PRIVATE.get(this);\n\t\treturn priv.key;\n\t}", "getStorageKey(_request) {\n\t\tconst storageName = this.strings.storageName;\n\t\tconst key = storageName + '-' + _request;\n\t\treturn key;\n\t}", "getKey() {\n return this....
[ "0.6443469", "0.62926", "0.62580293", "0.62529594", "0.6131183", "0.6131183", "0.6131183", "0.6131183", "0.6117239", "0.6117239", "0.61099404", "0.6074385", "0.6042556", "0.604051", "0.6031959", "0.60317427", "0.6020625", "0.5868917", "0.585456", "0.585456", "0.5837097", "0...
0.63694036
1
Get the namespace used to retrieve this CachedResponse
get namespace() { return this._namespace }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get namespaceLookup() {\n return this.cache.getOrAdd('namespaceLookup', () => this.buildNamespaceLookup());\n }", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "get namespace() {\n return this.collection;...
[ "0.6658846", "0.663786", "0.63724977", "0.63222724", "0.59905165", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.56406456", "0.5639807", ...
0.74516267
0
Send any queued metrics. Returns a Promise that resolves when all sending is done. The Promise will never reject.
flush() { // Pending Promises for _putMetricData calls const promises = [] // Get a CloudWatch client (this will be falsy if we're not // really sending) const cw = this._setup() while (this._queue.length) { // Grab a batch of metrics from the queue - the max...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushQueue() {\n return localforage.getItem('queue').then(queue => {\n if (!queue || (queue && !queue.length)) {\n return Promise.resolve();\n }\n\n console.log('Sending ', queue.length, ' requests...');\n return sendInOrder(queue).then(() => localforage.setItem('...
[ "0.62498975", "0.62358636", "0.6121252", "0.5997689", "0.5945961", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.58649164", "0.5860253", "0.58090585", "0.5553014", "0.55392665", "0.5425512", "0.5415078", "0.5395192"...
0.7818859
0
Construct a new PerformanceTimer, with the given name as a 'namespace' within which all durations can be measured. When the object is deleted, it clears all entries under this namespace, so multiple PerformanceTimer instances can be used at once.
constructor(name) { this._namespace = `${name}-` // Length of the namespace prefix (with the '-' postfix) const nslen = this._namespace.length this._names = {} const results = (this._results = []) this._observer = new PerformanceObserver((list) => { list.getE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Timer(name) {\n Variable.call(this, name);\n this.total = 0;\n this.samples = 0;\n }", "function timerNew(element, tp, start, stop, step, pause, startDelay, stopDelay, callback) {\n\t\tvar i = owl.Property.Get(element, tp);\n\t\tif (i == null) i = timer.length;\n\t\towl.Property.Set(element, t...
[ "0.6115564", "0.57659966", "0.5516357", "0.5513277", "0.5345585", "0.5297901", "0.52543736", "0.51908976", "0.5187935", "0.5177433", "0.51416665", "0.50983286", "0.5045841", "0.5035116", "0.50347084", "0.5014029", "0.49909884", "0.49585107", "0.49452668", "0.4932937", "0.4931...
0.78748
0
Given a name, return a namespaced version of it, with the optional extension, and include teh result in the _names object.
_getMarkName(name, extension) { const ext = extension ? `-${extension}` : '' const mark = `${this._namespace}${name}${ext}` this._names[mark] = true return mark }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseName(ext, name) {\n if(typeof(name) === 'string' && ext.length > 0) {\n // const ext = id.slice(id.lastIndexOf('.'));\n const filename = name.split('.')[0];\n return filename + '.' + ext;\n }\n else return '';\n}", "function getName(name, ext) {\n var exceptions...
[ "0.6428246", "0.6270055", "0.60355496", "0.5979957", "0.57667434", "0.57444966", "0.573305", "0.5594191", "0.55863535", "0.55828947", "0.5555568", "0.55425924", "0.5534043", "0.546658", "0.54592085", "0.544835", "0.54226255", "0.54214793", "0.5416841", "0.54128957", "0.537869...
0.61133283
2
Finish with this PerformanceObserver
finish() { Object.keys(this._names).forEach((mark) => performance.clearMarks(mark)) this._names = {} this._observer.disconnect() this._observer = null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "complete() {\n\n if (!this._running) return;\n this._running = false;\n\n // get sure all measures are completed\n this.completeMeasure();\n\n let values = [];\n\n for (let profile of this._profiles) {\n values.push(profile.elapsed);\n }\n\n // Bui...
[ "0.5971818", "0.59296", "0.57774234", "0.5775667", "0.5738979", "0.5732177", "0.5649373", "0.56393206", "0.55967665", "0.5563513", "0.5549622", "0.55298656", "0.55214524", "0.5519871", "0.55003905", "0.5498098", "0.54642344", "0.5463822", "0.5459349", "0.54370046", "0.5433126...
0.6537428
0
Get an object (that can be JSONserialized) for all measured times.
get summary() { return this._results }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeObject(time) {\r\n\t\r\n\tvar hours = Math.floor(time / secondsInHours);\r\n\tvar totalTime = ((time / secondsInHours) - hours) * secondsInHours;\r\n\r\n\tvar minutes = 0;\r\n\twhile (totalTime >= 60) {\r\n\t\t\r\n\t\ttotalTime -= 60;\r\n\t\tminutes++;\r\n\t}\r\n\r\n\tvar seconds = totalTime;\r\n\r...
[ "0.6284193", "0.6154757", "0.5638283", "0.56346875", "0.562833", "0.5625938", "0.5616624", "0.5591363", "0.5538485", "0.55279493", "0.5526572", "0.5486905", "0.5471993", "0.5468968", "0.5466895", "0.5414996", "0.5414706", "0.5401726", "0.53822535", "0.534875", "0.5331831", ...
0.0
-1
This is a decorator definition.
function tracksTransactions(target, name, descriptor) { var original = descriptor.value; descriptor.value = function () { var _this = this; for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var lastArg = args[args.length - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AttributeDecorator$1(){}", "function AttributeDecorator$1() {}", "function AttributeDecorator$1() {}", "function AttributeDecorator$1() {}", "function AttributeDecorator$1() { }", "function AttributeDecorator$1() { }", "function SelfDecorator() {}", "function SelfDecorator() {}", "function...
[ "0.7342221", "0.720935", "0.720935", "0.720935", "0.7109764", "0.7109764", "0.68068403", "0.68068403", "0.68068403", "0.67976487", "0.67976487", "0.67976487", "0.6766586", "0.67480385", "0.67480385", "0.66885173", "0.66885173", "0.6686511", "0.6666497", "0.6666497", "0.660283...
0.0
-1
new scope is required to be able to perform previous tests on Enum.global
function doTest(names) { if(names) { names = names.props.props Object.keys(names).forEach(function (key) { names[ key.substring(1) ] = names[ key ] delete names[ key ] }) } var test, test2, item, Enum = _ // Enum.MAX_LENGTH assert('MAX_LENGTH' in E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get UseGlobal() {}", "getScope() {}", "function isGlobalScope() {\n return !context.getScope().upper;\n }", "function checkscope2() {\n\tscope = \"local\"; // Oops! We just changed the global variable.\n\tmyscope = \"local\"; // This implicitly declares a new global variable.\n\treturn [ scope, myscope ]...
[ "0.63579875", "0.61411595", "0.6051223", "0.60264194", "0.595717", "0.5915766", "0.58779776", "0.58708805", "0.58561337", "0.5789594", "0.57875645", "0.5782411", "0.5713308", "0.5619752", "0.5574282", "0.5525769", "0.55223125", "0.5460591", "0.5439879", "0.5437265", "0.543071...
0.0
-1