query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Split line into tokens
function tokenize (line) { return line.replace(/^\s*/, '').split(' ') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitLargeTokens(lineContent, tokens, onlyAtSpaces) {\r\n var lastTokenEndIndex = 0;\r\n var result = [], resultLen = 0;\r\n if (onlyAtSpaces) {\r\n // Split only at spaces => we need to walk each character\r\n for (var i = 0, len = tokens.length; i < len; i++) {\r\n var ...
[ "0.6666079", "0.64599365", "0.6321741", "0.6263333", "0.619605", "0.6137088", "0.6032414", "0.60083264", "0.59998405", "0.59969074", "0.5821944", "0.5804984", "0.57552373", "0.5746154", "0.5746154", "0.5746154", "0.5746154", "0.5746154", "0.5746154", "0.5746154", "0.5746154",...
0.78362364
0
Change the mode to replay By default, pause
replay(){ Meteor.clearInterval(this.intervalHandle); this.rmode.set("replay"); this.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "replay(){\n\n }", "function replay() {\n let wannaReplay = readlineSync.keyInYN(chalk.bold.green.inverse('\\n\\n Do you want to play Again? \\n NOTE: Only Enter small case values: '));\n if (wannaReplay | String(wannaReplay).toLowerCase()) {\n playLoop();\n showScores(a);\n replay();\n } else {...
[ "0.7056223", "0.69563967", "0.68070984", "0.68050486", "0.68050486", "0.67873895", "0.6738131", "0.6714282", "0.6714282", "0.6700726", "0.6672155", "0.66051644", "0.6579653", "0.6515599", "0.65004706", "0.6477134", "0.63685095", "0.630028", "0.62962013", "0.6293496", "0.62924...
0.7727229
0
Define a function for moving the cursor in the results list
function moveCursor(pos) { for(let x = 0; x < results.children.length; x++){ results.children[x].classList.remove('highlighted'); } results.children[pos].classList.add("highlighted"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveSourceCursorToTheNextPosition () {\n\n }", "cursorTo() {}", "function MoveCursor(pos, step) {\n guiData.cursorPos = pos;\n year.current = pos;\n year.step = step;\n refreshBubbles();\n refreshDisplay();\n}", "addToCursor(state, n){\n state.cursor += n\n }", "function move(cur...
[ "0.75587094", "0.676623", "0.6461653", "0.6379219", "0.6255969", "0.6169426", "0.61334985", "0.6073452", "0.6031591", "0.60132194", "0.59940267", "0.5980015", "0.5941195", "0.59356326", "0.5888047", "0.5871625", "0.584848", "0.5847366", "0.58304715", "0.58271414", "0.58271414...
0.6788565
1
creating td element by function
function td(){ return document.createElement('td') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function new_td(value) {\n var td = '<td>' + value + '</td>';\n\n return td;\n}", "function makeTd(dado,classe){\n var td = document.createElement(\"td\");\n td.classList.add(classe);\n td.textContent = dado;\n return td;\n}", "function insertTd(ele){\n var td = document.createElement(\"td...
[ "0.78750837", "0.7185066", "0.7165674", "0.70041466", "0.6927398", "0.69159067", "0.68990666", "0.6886673", "0.685706", "0.6792234", "0.67415696", "0.6733341", "0.6708018", "0.6693883", "0.6663718", "0.6632725", "0.66300535", "0.6583651", "0.65797377", "0.65776664", "0.657311...
0.7628877
1
appending state names according to country that selected by user
function appState(countryValue){ cs.then(data=>{ var keys = Object.keys(data[0].country) keys.forEach(key =>{ if(data[0].country[key]== countryValue){ data[0].states[key].map(state =>{ let option = document.createElement('option') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function country_load(){\n var countries = [ { value: \"country\", text: \"State\"},\n {value: \"AK\", text:\"Alaska - AK\"},\n {value: \"AL\", text:\"Alabama - AL\"},\n {value: \"AR\", text:\"Arkansas - AR\"},\n {value: \"AZ\", text:\"Arizona - AZ\"},\n {value: \"CA\", text:\"California - CA\"},...
[ "0.6809476", "0.6750817", "0.6747766", "0.66598636", "0.665919", "0.66023356", "0.6566906", "0.64764106", "0.64531744", "0.645151", "0.64197314", "0.63757", "0.6360628", "0.63455606", "0.6315213", "0.6301837", "0.6288359", "0.6284535", "0.6265651", "0.62375474", "0.6221312", ...
0.67751527
1
Does a given xhr contain html and does that html contain a given string?
function _findStringInResponseHTML( xhr, searchString ) { if ( !xhr.responseText ) { return false; } var contentType = xhr.getResponseHeader( "Content-Type" ); if ( (contentType.indexOf("text/html") >= 0) && (xhr.responseText.indexOf(searchString) >= 0) ) { return true; } return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasHtml(input)\n{\n\treturn (input.indexOf('<html') != -1 || input.indexOf('<Html') != -1 || input.indexOf('<HTML') != -1);\n}", "containsHTML(html) {\n return this._compareContains(html, this.getHTML());\n }", "hasHTML(html) {\n return this._compareHas(html, this.getHTML());\n }",...
[ "0.65041757", "0.61789453", "0.6174106", "0.60785687", "0.605552", "0.60080427", "0.60065496", "0.6002995", "0.591918", "0.58721554", "0.58536977", "0.5853056", "0.58412415", "0.5838544", "0.58172256", "0.57963365", "0.57355624", "0.5702998", "0.56969213", "0.56875086", "0.56...
0.752292
0
the function restores settings based on type, cardId.
function doRestore(type, cardId, forceDisabled) { // build the key for asyncStorage. var key = 'tethering.' + type + '.simstate.card-' + cardId; asyncStorage.getItem(key, function callback(value) { // if forceDisable is true, we need to disable it always. var simState = forceDisabled ?...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "restoreCards(){\n this._cards = this.buildCardSet();\n }", "function restore_options() {\n //Defaults\n chrome.storage.sync.get({\n cardSize: 'medium',\n displayCard: true,\n caseSensitive: true,\n cardMatch: true,\n linkMatch: true,\n deckButton: true\n }, function(items) {\n d...
[ "0.65560687", "0.6346782", "0.6215581", "0.61580384", "0.58879435", "0.58602303", "0.58597285", "0.5808054", "0.5795132", "0.5780637", "0.57020843", "0.5659191", "0.5643133", "0.56159645", "0.5581616", "0.5578015", "0.5578015", "0.55600023", "0.55503774", "0.5550219", "0.5545...
0.6474099
1
Make all bricks appear
function showAllBricks() { bricks.forEach(column => { column.forEach(brick => (brick.visible = true)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllBricks() {\n bricks.forEach((column) => {\n column.forEach((brick) => (brick.visible = true));\n });\n}", "function showAllBricks() {\r\n bricks.forEach(column => {\r\n column.forEach(brick => {\r\n brick.visible = true;\r\n })\r\n })\r\n}", "function drawBri...
[ "0.8001946", "0.78371304", "0.74371344", "0.74229103", "0.73947924", "0.7346361", "0.7010409", "0.6976006", "0.6866909", "0.68543816", "0.6812377", "0.6747278", "0.67463344", "0.6741336", "0.6699781", "0.6670565", "0.66497123", "0.661261", "0.6597605", "0.65912175", "0.657711...
0.78911203
1
funcion para validar el guardado de la primera sucursal
function validarGuardadoPrimeraSucursal(){ var sw = 0; // variable para determinar si existen campos sin diligenciar if( $("#sucursal_nombre").val().trim().length == 0 ){ $("#label_sucursal_nombre").addClass( "active" ); $("#sucursal_nombre").addClass( "invalid" ); sw = 1; } if( $("#sucursal_telefo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarCampos5 () {\n\tsaveTransaccion();\n}", "function validarCampos5 () {\n\tsaveTransaccion();\n}", "function validaPesquisaFaixaQuadra(){\r\n\tvar form = document.ImovelOutrosCriteriosActionForm;\r\n\t\r\n\tretorno = true;\r\n\t\r\n\tif(form.quadraOrigemID.value != form.quadraDestinoID.value){\r\...
[ "0.6564631", "0.6564631", "0.6511214", "0.6470364", "0.6469096", "0.6451288", "0.6446307", "0.64040226", "0.63745135", "0.63686794", "0.63662493", "0.63524616", "0.63345873", "0.6321526", "0.63202405", "0.63088185", "0.6260179", "0.6245789", "0.62407947", "0.6204523", "0.6202...
0.708764
0
para enviar el cambio de sucursal
function enviarCambioSucursal(){ $("#form_cambiarSucursal").submit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function sendPicture() {\n const req = {\n imagebytes: bas64,\n }\n alert('Enviado com sucesso');\n }", "function guardarCambios(){\n //declaro la variable link, toma el <a id=\"descargar\">Descargar</a>\n let link = document.querySelector(\"#descargar\");\n //Declaro la...
[ "0.6130891", "0.60943645", "0.5910372", "0.5805841", "0.57898515", "0.57399946", "0.57323253", "0.5718257", "0.5681247", "0.56254095", "0.56143016", "0.5602306", "0.55939347", "0.5582713", "0.55727166", "0.5485251", "0.54558015", "0.5447109", "0.5426238", "0.5422231", "0.5420...
0.67944276
0
funcion para el intro del home
function startIntroHome(btn1,btn2,btn3,btn4,t1,t2,t3,t4,t7,t8,t9,t10,t11,t12,t13,t15,t16){ //se adicionan los data a los elementos del menu var intro = introJs(); intro.setOptions({ steps: [ { intro: t1 }, { int...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function introduction (game) {\n out(GAME_INTRODUCTION);\n scenes_tick(game);\n look(game);\n update_statusbar(game);\n}", "function walkHome(){\r\n\tbackground(0);\r\n\tfirstOption.hide();\r\n\tsecondOption.hide();\r\n\tuserName.hide();\r\n\r\n\t//change the text for the title\r\n\ttitle.html(\"You have gon...
[ "0.71195394", "0.6898293", "0.6840928", "0.6822966", "0.67849636", "0.67711025", "0.67281497", "0.67034936", "0.6669854", "0.6669054", "0.665965", "0.6652732", "0.66483694", "0.6639904", "0.6590825", "0.6578656", "0.6554911", "0.6543244", "0.6521905", "0.6477078", "0.6474108"...
0.72282463
0
Fetches the WLANSSID of the server via a GETRequest to "/local_streaming_sink/ssid" and puts the result in the HTMLElement with id="wifi_ssid"
async function fillInSsid() { try { let response = await fetch("/local_streaming_sink/current_ssid.txt"); if (response.status != 200) { throw new Error(`Response status: ${response.status}`); }; let fetchedObject = await response.text(); wifi_ssid_elt.innerHTML = fetchedObject; } catc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSSIDList() {\n openNotification(\"Getting network names...\", 0);\n sendRequest(\"getSSIDList\", getSSIDListHandler);\n}", "function setWiFiSettings() {\n var ssid = document.getElementById(\"ssid\").value;\n var pass = document.getElementById(\"pass\").value;\n console.log(\"ssid: \" ...
[ "0.66278744", "0.56758565", "0.53339005", "0.52170277", "0.51783437", "0.51552397", "0.5126443", "0.49810797", "0.49421918", "0.49152973", "0.4901524", "0.48542973", "0.48364213", "0.48157603", "0.4805773", "0.48004252", "0.47463334", "0.47406906", "0.47366622", "0.47268555", ...
0.70331573
0
Fetches the four possilbe URLS from the server via a GETRequest to "/local_streaming_sink/urls" and puts them into the HTMLElements with ids "url_1" ..."url_4"
async function fillInUrls() { try { let response = await fetch("/local_streaming_sink/current_urls.txt") if (response.status != 200) { throw new Error(`Response status: ${response.status}`); }; let fetchedUrls = await response.text(); let urls; try { urls = fetchedUrls.split...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function get_urls() {\n const getUrls = await fetch(\"http://localhost:3000\").then((data) => data.json());\n \n getUrls.urls.map( ({name, url}) => writeUrl({name, url}) ); // Add all URLs.\n}", "function getUrls(givenUrl, urls) {\n\tvar page = require('webpage').create();\n\n\tpage.onUrlChanged =...
[ "0.66095054", "0.6391097", "0.6210682", "0.6080171", "0.5973447", "0.5925978", "0.58838207", "0.5873188", "0.58446395", "0.579994", "0.5749697", "0.57442385", "0.57382494", "0.5724049", "0.5717946", "0.5702949", "0.56978273", "0.5696158", "0.56450695", "0.56369966", "0.562703...
0.7802101
0
get total supply for native token
async fetchTotalSupply() { const data = await this.request('https://dex.binance.org/api/v1/tokens?limit=999999999'); const record = data.find((item) => item.symbol === 'BNB'); return record ? Number(record.total_supply) : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async fetchTotalSupply() {\n const { data: { tokenIssued: total } } = await this.request({\n url: 'https://www.btse.com/api/tokentransparency',\n headers: {\n 'User-Agent': 'PostmanRuntime/7.24.1', // tmp hack: without UserAgent definition url will not work\n },\n });\n\n return Numb...
[ "0.73180395", "0.66774696", "0.66636324", "0.65394795", "0.64198995", "0.6377827", "0.59458786", "0.5928099", "0.58865273", "0.58599377", "0.58445114", "0.58167243", "0.58070934", "0.5802305", "0.56317145", "0.56247103", "0.5613116", "0.5606238", "0.55946845", "0.55924135", "...
0.7068238
1
Comment & like area
function cmtLikeArea(){ var Counter = 0; let eachPost = $.querySelector('.each-post'); const mainWrap = $.createElement('div'); mainWrap.setAttribute('class', 'cmt-like-wrap') const like = $.createElement('div'); like.setAttribute('class', 'like-wrap') const likeBtn = $.createElement('button...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comment() {\n //Disselect all highlighted annotations\n $( \".annot\").removeClass( \"annot-highlight\");\n //Hide the comment button\n $('.highlighter-container').hide();\n //Scroll to the comment form\n $(document).scrollTop( $(\"#respond\").offset().top );\n\n ...
[ "0.6777015", "0.66130537", "0.65851176", "0.6493061", "0.6415763", "0.62865233", "0.6276599", "0.61483", "0.6122593", "0.6090656", "0.60787606", "0.6062213", "0.60585755", "0.5995929", "0.59684455", "0.5956406", "0.5955085", "0.59302306", "0.58853114", "0.587562", "0.586702",...
0.74674505
0
Retorna array com o nomes dos arquivos do diretorio
static listaArquivos(dirPath) { return new Promise((resolve, reject)=> { try { fs.readdir(dirPath, (err, files) => { if (err) { reject(err); } else { resolve(files); } }); } catch (err) { reject(err); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listFileNames(path) {\n return fs_1.readdirSync(path) || [];\n }", "getFilenames() {\n let DDD = DeviceDriverDisk;\n let filenames = [];\n for (let s = 0; s < TSOS.Disk.sectorCount; ++s) {\n for (let b = 0; b < TSOS.Disk.sectorCount; ++b) {\n ...
[ "0.67853904", "0.65257907", "0.6467789", "0.6382655", "0.63458484", "0.6332637", "0.62952614", "0.62513554", "0.6217457", "0.61528414", "0.6140779", "0.6125281", "0.61187667", "0.6111996", "0.61048096", "0.60819685", "0.6077886", "0.607688", "0.60638416", "0.60638416", "0.605...
0.6584663
1
Esta funcion crea los campos del formulario el funcion del tipo de producto que se vaya a insertar. Tambien asigna un evento onclick al boton guardar del modal insertProduct
function modalInsertProduct() { var contenedor = $("#insertProduct").find("form")[0]; //Cogemos el formulario var type = $("#tipos").val(); //Cogemos el valor del select para saber el tipo de producto var select = $("#categorias")[0]; //Cogemos el select de categorias var groups = $("#insertProduct").find("....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregarProducto() {\n // Se obtiene la cantidad, la unidad, el id de la unidad, la descripcion, el id del producto, el valor, el monto\n let cantidad = document.getElementById('inputCantidad').value;\n let unidad = document.getElementById('inputDescripcion').value.split('~')[3];\n let unidad_id = docu...
[ "0.6986945", "0.68695194", "0.68187016", "0.67826873", "0.67714506", "0.67485917", "0.6721138", "0.6701116", "0.66297245", "0.66292447", "0.6562067", "0.6480187", "0.64775276", "0.64760053", "0.6473792", "0.6460267", "0.6455275", "0.6425294", "0.64188933", "0.6406456", "0.640...
0.72485924
0
Set the clients grid configuration
function configureClientsGrid() { var columnList = [ { name: 'clientId', header: 'Client Id', isFilter: false, isOrder: true }, { name: 'description', header: 'Description', isFilter: false, isOrder: true }, { name: 'applicationType.description', head...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set gridOptions(gridOptions) {\n this._gridOptions = gridOptions;\n }", "function clientSettings(){\n document.getElementById('box-settings').style.display = 'grid';\n }", "function initialize() {\n configureClientsGrid();\n getClientsForSetup();\n }", "functi...
[ "0.6455541", "0.63008165", "0.62172306", "0.62172306", "0.6069913", "0.60412484", "0.60412484", "0.5943765", "0.58866835", "0.5853046", "0.57926", "0.57923675", "0.5784238", "0.5765007", "0.5759998", "0.57446283", "0.5687093", "0.5683685", "0.55907696", "0.55453044", "0.55327...
0.7480415
1
Query ES index for the provided term
queryTerm(term, offset = 0) { const body = { from: offset, query: { multi_match: { query: term, fields: ['name^5', 'address^3', 'city', 'type^2'], // fuzziness: '6', fuzziness: 'AUTO', }, }, highlight: { fields: { name: {} } }, }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "queryTerm (term, offset = 0) {\n const body = {\n from: offset,\n query: {\n multi_match: {\n \"type\": \"best_fields\",\n \"query\": term,\n \"lenient\": true\n }\n },\n highlight: {\n fields: {\"*\": {}},\n \"pre_tags\": [\"<em>\"],\n ...
[ "0.7356747", "0.68833387", "0.64096266", "0.6368393", "0.62928426", "0.6048438", "0.599743", "0.59927076", "0.59912646", "0.59477264", "0.59178764", "0.5901023", "0.58928007", "0.58918744", "0.58560807", "0.58398235", "0.5822752", "0.5805779", "0.58044934", "0.57949847", "0.5...
0.71609914
1
methods and properties that are exposed to code in the story/passage via the 'p' variable or 'window.passage'
function Passage(twinePassageData, passageContainer) { this.id = twinePassageData.getAttribute("pid"); this.name = twinePassageData.getAttribute("name"); this.tags = twinePassageData.getAttribute("tags"); this.position = getPassageTwinePosition(twinePassageData); this.source = twinePassageData.textContent; this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup(p){\n\n}", "function Presenter(name) {\n this.name = name;\n this.speak = function(line) {\n console.log(this.name,\"says: '\" + line +\"'.\");\n };\n}", "get Prologic() {}", "function presentation(){\r\n\tvar presentation = {name: \"Toni\", city: \"Barcelona\", age: \"40\", job: \"progr...
[ "0.5920974", "0.57492924", "0.54876554", "0.54778045", "0.54778045", "0.5457991", "0.54481936", "0.5424113", "0.54140866", "0.5345416", "0.53336596", "0.53067076", "0.53054094", "0.52977586", "0.52949226", "0.5263862", "0.5253624", "0.5251045", "0.52286977", "0.52104706", "0....
0.58071125
1
If function to select which betweem Engagment or loyalty tables to be executed
function selectTable() { switch (window.location.pathname) { case ("/senate_attendance_statistics.html" ) : console.log("1"); leastEngagedTable(); mostEngagedTable(); break; case ("/house_attendance_st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTablesForATM(){\n try{\n \n theTables = originalWindow.document.getElementsByTagName(\"table\");\n for (var x = 0; x < theTables.length; x++) {\n var headers = theTables[x].querySelectorAll(\"tbody tr th\");\n for (var y = 0; y < hea...
[ "0.56176776", "0.5568396", "0.5535461", "0.55111384", "0.54451245", "0.53153306", "0.5265596", "0.52564484", "0.52517116", "0.5211426", "0.51856697", "0.5168492", "0.51505977", "0.5094316", "0.5072545", "0.50610167", "0.5036277", "0.5034471", "0.5022734", "0.501063", "0.49671...
0.5837919
0
Hash function from binary string to array of doors. For example, '1101' > ['top', 'right', '', 'left']
static hashDoor(hashStr = '') { const doorMap = ['top', 'right', 'bottom', 'left'] // Make sure hashStr has four digits hashStr = '0000'.substring(hashStr.length) + hashStr return hashStr.split('').map((doorIndicator, index) => { if (doorIndicator === '1') { return doorMap[index] }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hashCode (str) {\n return str.split('').reduce((prevHash, currVal) =>\n (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0, 0)\n }", "function hash(s) {\n return s.split(\"\").reduce(\n function (a, b) {\n a = ((a << 5) - a) + b.charCodeAt(0); return a & a\n }, ...
[ "0.65543056", "0.65423775", "0.65296245", "0.64772063", "0.64742696", "0.63565737", "0.6348728", "0.63343316", "0.6317592", "0.629687", "0.6241575", "0.6230183", "0.62201935", "0.6209905", "0.6205783", "0.6205783", "0.6194398", "0.6191957", "0.61721206", "0.61717033", "0.6169...
0.6606545
0
Get Class Dependency from Domain Definition Recursively search for the matching class
getClassDependency(className) { const classDep = domainService.getClassDependency(className); return classDep ? classDep.replace(ConfigProperties.PACKAGE_ROOT, this.PACKAGE_ROOT) : undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "classType () {\n const depTypeFn = depTypes[String(this.currentAstNode)]\n if (!depTypeFn) {\n throw Object.assign(\n new Error(`\\`${String(this.currentAstNode)}\\` is not a supported dependency type.`),\n { code: 'EQUERYNODEPTYPE' }\n )\n }\n const nextResults = depTypeFn(this...
[ "0.5751904", "0.5639624", "0.55979407", "0.5521729", "0.5473323", "0.5237214", "0.5230773", "0.5218954", "0.5148108", "0.51327926", "0.5113726", "0.5077776", "0.5070518", "0.5018426", "0.49894136", "0.49474686", "0.49373466", "0.4935498", "0.49315357", "0.491931", "0.48846468...
0.6104345
0
Valida y GUarda una Unidad en REST
GuardarUnidad(){ if(this.Nombre == '' || this.Abrev == ''){ this.validate = true } else{ //Creando el JSON para enviar al REST var unidad = { Nombre: this.Nombre, Abrev: this.Abrev, } axios .post('https://truora-rest-daniel-gaviria.c9users...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUnidad(req,res){\n var unidadmedida=req.params.id;\n Unidad.findById(unidadmedida,(err,unidad)=>{\n if(err){\n return res.status(500).send({message:'error en la peticion'});\n }\n else{\n if(!unidad){\n return res.status(404).send({message...
[ "0.5568029", "0.5438921", "0.5416289", "0.5415254", "0.5405933", "0.5385733", "0.52768564", "0.5244488", "0.52117735", "0.52117735", "0.5209869", "0.5152978", "0.51191115", "0.5118673", "0.5070467", "0.5047441", "0.5045621", "0.50437623", "0.50401455", "0.503014", "0.5025485"...
0.671766
0
Actually generates the files
generate() { // Make sure the temporary directory is empty before starting gen_utils_1.deleteDirRecursive(this.tempDir); fs_extra_1.default.mkdirsSync(this.tempDir); try { // Generate each model const models = [...this.models.values()]; for (const mode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate() {\n fs.writeFileSync(outputPath, render(teamMembers), \"utf-8\");\n process.exit(0);\n}", "function build() {\n //conditional statement that checks if the output directory has been created\n if(!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR)\n\n }\n //validat...
[ "0.6883176", "0.68743", "0.68713605", "0.6658443", "0.6629692", "0.65685296", "0.6320793", "0.631269", "0.6311975", "0.6308136", "0.6259727", "0.6252294", "0.62309647", "0.6226634", "0.6226108", "0.6135039", "0.61314464", "0.6116025", "0.6106535", "0.6099586", "0.6067663", ...
0.77462703
0
Checks if user is a curator
isCurator() { let decoded_token = jwt_decode(this.state.auth); if (decoded_token.domains.includes("self.GWAS_Curator")) { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isConnected() {\n return user != null;\n }", "isAuthorized(state, getters, rootState) {\n const playSpace = state.current\n if (!playSpace || !playSpace.users) return false\n if (!rootState.user.username) return false\n if (playSpace.users[rootState.user.username] =...
[ "0.5872983", "0.5855976", "0.5837732", "0.5730362", "0.5730362", "0.57181567", "0.5615617", "0.5605729", "0.5605729", "0.55988586", "0.5568801", "0.5536027", "0.55355537", "0.55299014", "0.5505852", "0.54595613", "0.54528797", "0.54401195", "0.5435766", "0.542099", "0.5417548...
0.6791621
0
var Mark_Line_Key=""; var Mark_Line_Value="";
async function Set_Mark_Line() { // Set Mark Line //var key = 'Gen 1:5'; //var value = 'G'; await set2(Mark_Line_Key,Mark_Line_Value); //log(`Key ${key} was saved with value ${value}.`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DefineKeys(line, DefKey, Count) {\r\n //var countFeat = 0;\r\n var key = new Array();\r\n var condition ;\r\n \r\n for(i in line) {\r\n \r\n \r\n if (line[i].indexOf(DefKey[0]) > -1 || line[i].indexOf(DefKey[1]) > -1){\r\n \r\n var myString...
[ "0.5662975", "0.5307574", "0.5295203", "0.5185739", "0.5139243", "0.50470984", "0.5021647", "0.5017752", "0.5015422", "0.49822214", "0.49688217", "0.49528176", "0.49463645", "0.49376464", "0.49324924", "0.4920268", "0.4913597", "0.4911945", "0.48998913", "0.4898445", "0.48983...
0.6478528
0
Validate a Shop object for creating a new shop
function validateShop(shop) { try { assert(typeof shop === 'object', 'Invalid shop object') assert(typeof shop.name === 'string', 'Shop name should be a string') assert(shop.name !== '', 'Shop name missing') assert(shop.listingId, 'Shop needs a listing ID') assert(shop.authToken, 'Shop needs an au...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _createCoffeeShop(email, brandId, address, phone, coffeeCode, longitude, latitude, callback) // this creates a new CoffeeShop\n{\n\n validate.valCoffeeshop(email, brandId, address, phone, coffeeCode, longitude, latitude, function (data)\n {\n if (data)\n {\n CoffeeShop.creat...
[ "0.5739117", "0.53218156", "0.5284298", "0.52297485", "0.5204499", "0.51947284", "0.51797855", "0.5166722", "0.515702", "0.51524466", "0.51511043", "0.5123944", "0.51213825", "0.5113114", "0.50428665", "0.49761388", "0.4974234", "0.4965613", "0.49267602", "0.4911538", "0.4889...
0.7122471
0
function to change the larger image in album.html using a switch
function changeImage(img) { switch (img) { case "img1": document.getElementById("largePicture").src = imageArray[0]; break; case "img2": document.getElementById("largePicture").src = imageArray[1]; break; case "img3": document.getElementById("largePicture").src = imageArray[2]; break; case "i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeMe(dom) {\r\n // Test which dom element called me\r\n console.log(dom);\r\n // Variable for getting the starting index for finding the specfic number image\r\n var start = dom.src.indexOf(\"/gallery\") + 8;\r\n // Vairable for finding the end index for finding specfic number image\r\n var end ...
[ "0.7064386", "0.7024753", "0.6896108", "0.68817645", "0.68443084", "0.6815944", "0.6790532", "0.67469335", "0.6684751", "0.6654317", "0.6612629", "0.66002023", "0.6594059", "0.65774536", "0.6567424", "0.6534154", "0.6519116", "0.65104246", "0.6489253", "0.6486662", "0.6484675...
0.7177857
0
Step 3: Poll until the download is complete. There is a onChanged event, but it doesn't seem to fire for a `state` change?
function poll() { setTimeout(() => { chrome.downloads.search({id:download_id}, ([{state}]) => { if (state === 'complete') { fake_click(); } else { poll(); } }); }, 20); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleDownload(results) {\r\n if (results === 'downloaded') {\r\n console.log('sia download function complete and set true');\r\n DwnldCheck = true;\r\n } else {\r\n DwnldCheck = false;\r\n ...
[ "0.64042753", "0.60671324", "0.60671324", "0.60671324", "0.604052", "0.59054226", "0.59035414", "0.59035414", "0.5821865", "0.57465106", "0.5673635", "0.5648427", "0.5636624", "0.5628626", "0.558191", "0.55703527", "0.55466175", "0.55076236", "0.5498159", "0.54497594", "0.544...
0.66130775
0
Step 4: Let this tab "debug" itself. Then, through the debug API, send a fake mouse click, which counts as "user interaction".
function fake_click() { chrome.tabs.getCurrent(({id: tabId}) => { chrome.debugger.attach({tabId}, '1.1', () => { // mouse click: push button, then release it chrome.debugger.sendCommand({tabId}, 'Input.dispatchMouseEvent', { type: 'mousePressed', x:50, y:50, button: 'left', clickCount: 1 });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDebuggingClick() {\r\n if (debuggingInput.checked) {\r\n debuggingToggleSwitch.click();\r\n } else {\r\n tau.openPopup(debuggingPopup);\r\n }\r\n }", "handleClickOnContext(evt) {\n if (evt.altKey) {\n // panning\n retur...
[ "0.6674271", "0.6477549", "0.632136", "0.62416714", "0.62370306", "0.62270194", "0.62270194", "0.62270194", "0.62270194", "0.61929154", "0.6141527", "0.6108928", "0.60900855", "0.60897774", "0.6036844", "0.60092515", "0.6001853", "0.5993578", "0.5979194", "0.59754217", "0.596...
0.81493014
0
A step can contain a title.
function StepTitle(props) { var children = props.children, className = props.className, title = props.title; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('title', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps */])(StepTitle, props); va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StepTitle(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('title', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getUnhandledProps */])(StepTi...
[ "0.74862725", "0.74862725", "0.7441214", "0.74346405", "0.7432509", "0.74189794", "0.7418386", "0.7376569", "0.7376569", "0.72559303", "0.6584903", "0.647626", "0.644336", "0.63013536", "0.6170544", "0.61691844", "0.6114242", "0.60989815", "0.6085983", "0.60551876", "0.604644...
0.75178814
0
A card can contain a description with one or more paragraphs.
function CardDescription(props) { var children = props.children, className = props.className, content = props.content, textAlign = props.textAlign; var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_5__lib__["C" /* useTextAlignProp */])(textAlign), '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CardDescription(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n textAlign = props.textAlign;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()(Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useTextAlignProp\"])(textAlign), ...
[ "0.65466416", "0.65466416", "0.6544895", "0.6544895", "0.6537334", "0.65190315", "0.6511597", "0.6503709", "0.65036356", "0.65031165", "0.6471138", "0.6424404", "0.6399555", "0.63149226", "0.6290076", "0.58859867", "0.5814638", "0.5777714", "0.577705", "0.5716414", "0.5701136...
0.65752774
0
A feed can contain a meta.
function FeedMeta(props) { var children = props.children, className = props.className, content = props.content, like = props.like; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('meta', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FeedMeta(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n like = props.like;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('meta', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* get...
[ "0.65360963", "0.65360963", "0.65305376", "0.65305376", "0.6487086", "0.64519846", "0.64519846", "0.6451286", "0.6443734", "0.6431483", "0.6426349", "0.6216141", "0.61028945", "0.6004103", "0.58528394", "0.5740587", "0.56645304", "0.5653604", "0.56513256", "0.5646174", "0.556...
0.6546906
0
An item can contain extra content meant to be formatted separately from the main content.
function ItemExtra(props) { var children = props.children, className = props.className, content = props.content; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('extra', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps */])(ItemExtra, props); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ItemExtra(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('extra', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getUnhandledProps */])(ItemEx...
[ "0.65063584", "0.65063584", "0.6491676", "0.64876044", "0.6484476", "0.64585626", "0.64585626", "0.64522636", "0.64522636", "0.6440595", "0.64053506", "0.6177704", "0.5741776", "0.5727559", "0.5658624", "0.56535465", "0.56371635", "0.56360275", "0.5566925", "0.5552695", "0.55...
0.6518116
0
Several icons can be used together as a group.
function IconGroup(props) { var children = props.children, className = props.className, size = props.size; var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()(size, 'icons', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__["q" /* getUnhandledProps */])(IconGroup, props); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGroupIcons(group) {\r\n\tvar icons = new Object();\r\n\tvar audLangs = new Array();\r\n\tvar subLangs = new Array();\r\n\tif (group.audioLangs) {\r\n\t\tfor (var i = 0; i < group.audioLangs.length; i++)\r\n\t\t\taudLangs.push(createIcon(null, mapLanguage(group.audioLangs[i]), '', '', 'audio lang: '+...
[ "0.74362254", "0.709685", "0.7081915", "0.70608", "0.70604557", "0.70604557", "0.70401657", "0.7007599", "0.70074034", "0.70005375", "0.6945853", "0.6945853", "0.6938407", "0.6853871", "0.68380487", "0.6509839", "0.63216853", "0.6317946", "0.6228373", "0.62196714", "0.6064346...
0.71635455
1
A group of images.
function ImageGroup(props) { var children = props.children, className = props.className, size = props.size; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('ui', size, className, 'images'); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps */])(ImageGroup,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ImageGroup(props) {\n\t var children = props.children,\n\t className = props.className,\n\t size = props.size;\n\n\t var classes = (0, _classnames2.default)('ui', size, className, 'images');\n\t var rest = (0, _lib.getUnhandledProps)(ImageGroup, props);\n\t var ElementType = (0, _lib.getElem...
[ "0.69819653", "0.68849134", "0.6868206", "0.6858634", "0.6849576", "0.6847155", "0.68348974", "0.68348974", "0.68205464", "0.68201673", "0.68164307", "0.68164307", "0.68137443", "0.68065023", "0.67903906", "0.6704097", "0.6665089", "0.66461784", "0.6609167", "0.65548927", "0....
0.69232994
1
A message can contain a list of items.
function MessageList(props) { var children = props.children, className = props.className, items = props.items; var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('list', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__["q" /* getUnhandledProps */])(MessageList, props); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MessageList(props) {\n var children = props.children,\n className = props.className,\n items = props.items;\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('list', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(MessageList...
[ "0.6116109", "0.61112493", "0.61112493", "0.6110824", "0.6110824", "0.61013126", "0.60890836", "0.60745645", "0.60656905", "0.60656905", "0.5691459", "0.5691459", "0.5691459", "0.5691459", "0.5689802", "0.5667876", "0.5643619", "0.5569821", "0.5565388", "0.55545586", "0.54954...
0.6113827
1
A content subcomponent for the Reveal.
function RevealContent(props) { var children = props.children, className = props.className, hidden = props.hidden, visible = props.visible; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('ui', Object(__WEBPACK_IMPORTED_MODULE_4__lib__["z" /* useKeyOnly */])(hidden, 'hidden'), O...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RevealContent(props) {\n var children = props.children,\n className = props.className,\n hidden = props.hidden,\n visible = props.visible;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('ui', __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__lib__[\"a\" /* useKeyO...
[ "0.68492395", "0.6832489", "0.6832489", "0.68270224", "0.68016905", "0.68016905", "0.6766948", "0.6764943", "0.6740147", "0.6695511", "0.66721964", "0.6111287", "0.5981201", "0.5941786", "0.58828187", "0.5860926", "0.5836301", "0.5836301", "0.5824955", "0.5821922", "0.5807018...
0.68697625
0
A step can contain a content.
function StepContent(props) { var children = props.children, className = props.className, description = props.description, title = props.title; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('content', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StepContent(props) {\n var children = props.children,\n className = props.className,\n description = props.description,\n title = props.title;\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('content', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED...
[ "0.6319602", "0.6214389", "0.6214389", "0.6203516", "0.6201032", "0.6066961", "0.6066961", "0.606259", "0.60000086", "0.5947725", "0.5846954", "0.5755873", "0.556758", "0.550107", "0.54256296", "0.5403186", "0.540232", "0.53378373", "0.5175443", "0.51703596", "0.5111781", "...
0.6362083
0
A pushable subcomponent for Sidebar.
function SidebarPushable(props) { var className = props.className, children = props.children; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('pushable', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps */])(SidebarPushable, props); var ElementTyp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SidebarPushable(props) {\n var className = props.className,\n children = props.children;\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('pushable', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__lib__[\"b\" /* getUnhandledProps */])(SidebarPushabl...
[ "0.75968915", "0.75861835", "0.7557974", "0.75507784", "0.75405115", "0.75405115", "0.751423", "0.751423", "0.7507424", "0.75049156", "0.75036377", "0.72800714", "0.7263608", "0.7263608", "0.7249238", "0.7241848", "0.7231599", "0.7214975", "0.7191705", "0.7191705", "0.7141928...
0.76123154
0
A tab pane holds the content of a tab.
function TabPane(props) { var active = props.active, children = props.children, className = props.className, content = props.content, loading = props.loading; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_4__lib__["z" /* useKeyOnly */])(a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TabPane(props) {\n var active = props.active,\n children = props.children,\n className = props.className,\n content = props.content,\n loading = props.loading;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"B\" /* us...
[ "0.6907631", "0.6907631", "0.68556666", "0.6842633", "0.68216425", "0.678597", "0.678597", "0.67733157", "0.67280394", "0.66967344", "0.6652791", "0.659395", "0.64659965", "0.6446087", "0.64417845", "0.64280176", "0.64132875", "0.6373466", "0.6369013", "0.63672876", "0.631493...
0.692345
0
A statistic can contain a label to help provide context for the presented value.
function StatisticLabel(props) { var children = props.children, className = props.className, label = props.label; var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('label', className); var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__["q" /* getUnhandledProps */])(StatisticLabel, pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDataLabel(attr, val) {\n switch (attr) {\n case \"population\":\n return (val / 1000).toLocaleString(\"en-US\") + \"K\";\n case \"illiteracy\":\n default:\n return val + \"%\";\n }\n}", "function StatisticLabel(props) {\n var children = props.children,\n className = prop...
[ "0.6370214", "0.6342571", "0.62893945", "0.6263426", "0.6244179", "0.6244179", "0.62361735", "0.6219308", "0.6131109", "0.61219376", "0.61219376", "0.6121003", "0.60558116", "0.5839239", "0.58351034", "0.57983124", "0.5794947", "0.5794947", "0.57873315", "0.5781866", "0.56837...
0.6342959
1
shim for P/CouchDB adapters that don't directly implement _bulk_get
function bulkGet(db, opts, callback) { var requests = opts.docs; // consolidate into one request per doc if possible var requestsById = {}; requests.forEach(function (request) { if (request.id in requestsById) { requestsById[request.id].push(request); } else { requestsById[request....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bulkGet(db, opts, callback) {\n var requests = opts.docs;\n\n // consolidate into one request per doc if possible\n var requestsById = new __WEBPACK_IMPORTED_MODULE_3_pouchdb_collections__[\"a\" /* Map */]();\n requests.forEach(function (request) {\n if (requestsById.has(request.id)) {\n reque...
[ "0.67984396", "0.64722615", "0.6427767", "0.6427767", "0.6427767", "0.6427767", "0.6427767", "0.6427767", "0.6427767", "0.6410978", "0.6410978", "0.6410978", "0.6410978", "0.63868064", "0.63853633", "0.6328257", "0.6215398", "0.6138197", "0.61376655", "0.60166293", "0.5795854...
0.6520186
1
Pretty much all below can be combined into a higher order function to traverse revisions The return value from the callback will be passed as context to all children of that node
function traverseRevTree(revs, callback) { var toVisit = revs.slice(); var node; while ((node = toVisit.pop())) { var pos = node.pos; var tree = node.ids; var branches = tree[2]; var newCtx = callback(branches.length === 0, pos, tree[0], node.ctx, tree[1]); for (var i = 0, len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverseRevTree(revs, callback) {\n var toVisit = revs.slice();\n\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var branches = tree[2];\n var newCtx =\n callback(branches.length === 0, pos, tree[0], node.ct...
[ "0.7190537", "0.71264285", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.70733666", "0.61790186", "0.6032535", "0.5885809", "0.56751513", "0.56751513", "0.5654358", "0.56537324", "0.55857915", ...
0.71474713
1
To ensure we dont grow the revision tree infinitely, we stem old revisions
function stem(tree, depth) { // First we break out the tree into a complete list of root to leaf paths var paths = rootToLeaf(tree); var maybeStem = {}; var result; for (var i = 0, len = paths.length; i < len; i++) { // Then for each path, we cut off the start of the path based on the // `dep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stem(tree, depth) {\n // First we break out the tree into a complete list of root to leaf paths\n var paths = rootToLeaf(tree);\n var maybeStem = {};\n\n var result;\n for (var i = 0, len = paths.length; i < len; i++) {\n // Then for each path, we cut off the start of the path based on the\n //...
[ "0.6133227", "0.6133227", "0.6133227", "0.6133227", "0.6088587", "0.6088587", "0.6088587", "0.6088587", "0.6088587", "0.6008957", "0.6006048", "0.58123976", "0.58123976", "0.5370463", "0.53195107", "0.53195107", "0.5208916", "0.5185748", "0.5133625", "0.5062513", "0.502224", ...
0.61448956
0
return true if a rev exists in the rev tree, false otherwise
function revExists(revs, rev) { var toVisit = revs.slice(); var splitRev = rev.split('-'); var targetPos = parseInt(splitRev[0], 10); var targetId = splitRev[1]; var node; while ((node = toVisit.pop())) { if (node.pos === targetPos && node.ids[0] === targetId) { return true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function revExists(revs, rev) {\n var toVisit = revs.slice();\n var splitRev = rev.split('-');\n var targetPos = parseInt(splitRev[0], 10);\n var targetId = splitRev[1];\n\n var node;\n while ((node = toVisit.pop())) {\n if (node.pos === targetPos && node.ids[0] === targetId) {...
[ "0.7953056", "0.7923763", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.79010415", "0.6367172", "0.63029426", "0.62968445", "0.62914515", "0.62914515", "0.62914515", "0.62914515", "0.62914515", ...
0.7929473
1
returns first element of arr satisfying callback predicate
function arrayFirst(arr, callback) { for (var i = 0; i < arr.length; i++) { if (callback(arr[i], i) === true) { return arr[i]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayFirst(arr, callback) {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i], i) === true) {\n return arr[i];\n }\n }\n return false;\n}", "function arrayFirst(arr, callback) {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i], i) === true) {\n return ar...
[ "0.8414352", "0.8414352", "0.84006804", "0.84006804", "0.84006804", "0.84006804", "0.76454014", "0.7572634", "0.7467119", "0.73620105", "0.7361049", "0.7357801", "0.7344717", "0.72558105", "0.72177577", "0.71970046", "0.7185459", "0.71788496", "0.7175621", "0.710479", "0.7072...
0.8449133
0
read the doc back out from the database. we don't store the _id or _rev because we already have _doc_id_rev.
function decodeDoc(doc) { if (!doc) { return doc; } var idx = doc._doc_id_rev.lastIndexOf(':'); doc._id = doc._doc_id_rev.substring(0, idx - 1); doc._rev = doc._doc_id_rev.substring(idx + 1); delete doc._doc_id_rev; return doc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decodeDoc(doc) {\n if (!doc) {\n return doc;\n }\n var idx = doc._doc_id_rev.lastIndexOf(':');\n doc._id = doc._doc_id_rev.substring(0, idx - 1);\n doc._rev = doc._doc_id_rev.substring(idx + 1);\n delete doc._doc_id_rev;\n return doc;\n }", "function decodeDo...
[ "0.6856784", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6777426", "0.6450261", "0.6348575", "0.62954473", "0.62509793", "0.6238484", "0.62164396", "0.62164396", "0.62164396", "0.62096685", "0.62096685", "0.620966...
0.68597144
0
migration to version 2 unfortunately "deletedOrLocal" is a misnomer now that we no longer store local docs in the main docstore, but whaddyagonnado
function addDeletedOrLocalIndex(txn, callback) { var docStore = txn.objectStore(DOC_STORE); docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false}); docStore.openCursor().onsuccess = function (event) { var cursor = event.target.result; if (cursor) { var metadat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDeletedOrLocalIndex(txn, callback) {\n var docStore = txn.objectStore(DOC_STORE);\n docStore.createIndex('deletedOrLocal', 'deletedOrLocal', {unique : false});\n\n docStore.openCursor().onsuccess = function (event) {\n var cursor = event.target.result;\n if (curso...
[ "0.6630279", "0.66130316", "0.65728396", "0.65728396", "0.65728396", "0.65728396", "0.65728396", "0.65728396", "0.65728396", "0.6563211", "0.6563211", "0.65396106", "0.6076188", "0.59934765", "0.5988134", "0.59692156", "0.5955835", "0.5955835", "0.59353", "0.59353", "0.592643...
0.67979103
0
escapeBlob and unescapeBlob are workarounds for a websql bug: The goal is to never actually insert the \u0000 character in the database.
function escapeBlob(str) { return str .replace(/\u0002/g, '\u0002\u0002') .replace(/\u0001/g, '\u0001\u0002') .replace(/\u0000/g, '\u0001\u0001'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n .replace(/\\u0000/g, '\\u0001\\u0001');\n}", "function escapeBlob(str) {\n return str\n .replace(/\\u0002/g, '\\u0002\\u0002')\n .replace(/\\u0001/g, '\\u0001\\u0002')\n ...
[ "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.7792752", "0.60004884", "0.60004884", "0.59679675", "0.59679675", "0.59679675", "0.59679675", "0.59679675", "0.59679675", "0.59679675", "0.5897448", "0.5765...
0.78572357
0
question mark groups IN queries, e.g. 3 > '(?,?,?)'
function qMarks(num) { var s = '('; while (num--) { s += '?'; if (num) { s += ','; } } return s + ')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qMarks(num) {\n var s = '(';\n while (num--) {\n s += '?';\n if (num) {\n s += ',';\n }\n }\n return s + ')';\n}", "function qMarks(num) {\n var s = '(';\n while (num--) {\n s += '?';\n if (num) {\n s += ',';\n }\n }\n return s + ')';\n}", "function qMarks(num) {\n ...
[ "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.5324151", "0.50149554", "0.4973643", "0.49450013", "0.49067724", "0.4822053", "0.4787132", "0.47869888", "0.4749389", "0.47430944", "0.47418112", "0.4733935...
0.5535672
0
map seqs to attachment digests, which we will need later during compaction
function insertAttachmentMappings(seq, callback) { var attsAdded = 0; var attsToAdd = Object.keys(data._attachments || {}); if (!attsToAdd.length) { return callback(); } function checkDone() { if (++attsAdded === attsToAdd.length) { callb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertAttachmentMappings(seq, callback) {\n var attsAdded = 0;\n var attsToAdd = Object.keys(data._attachments || {});\n\n if (!attsToAdd.length) {\n return callback();\n }\n function checkDone() {\n if (++attsAdded === attsToAdd.length) {\n ...
[ "0.67182493", "0.67182493", "0.67182493", "0.67182493", "0.67182493", "0.67182493", "0.67182493", "0.6713422", "0.6713422", "0.6713422", "0.63491225", "0.63491225", "0.63491225", "0.63491225", "0.63491225", "0.63491225", "0.63491225", "0.63491225", "0.63358027", "0.6324418", ...
0.6761789
0
openDatabase passed in through opts (e.g. for nodewebsql)
function openDatabaseWithOpts(opts) { return opts.websql(opts.name, opts.version, opts.description, opts.size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openDatabaseWithOpts(opts) {\n return opts.websql(opts.name, opts.version, opts.description, opts.size);\n}", "function openDatabaseWithOpts(opts) {\n return opts.websql(opts.name, opts.version, opts.description, opts.size);\n}", "function openDatabaseWithOpts(opts) {\n return opts.websql(opts.name...
[ "0.83753806", "0.83753806", "0.83753806", "0.83753806", "0.83753806", "0.83753806", "0.83753806", "0.688448", "0.65395176", "0.6309499", "0.62717247", "0.6262938", "0.6184122", "0.61415815", "0.61270374", "0.61083585", "0.60899085", "0.60794663", "0.6058267", "0.60380775", "0...
0.8391577
0
convert the given key to a string that would be appropriate for lexical sorting, e.g. within a database, where the sorting is the same given by the collate() function.
function toIndexableString(key) { var zero = '\u0000'; key = normalizeKey(key); return collationIndex(key) + SEP + indexify(key) + zero; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toIndexableString(key) {\n var zero = '\\u0000';\n key = normalizeKey(key);\n return collationIndex(key) + SEP + indexify(key) + zero;\n }", "translateKey(key) {\n switch(key) {\n case 'firstName':\n return 'First Name';\n case 'lastName':\n ...
[ "0.64806575", "0.6460058", "0.6441298", "0.6441298", "0.6441298", "0.6441298", "0.6441298", "0.6441298", "0.6441298", "0.6441298", "0.6354172", "0.63409215", "0.62738544", "0.6230986", "0.6219719", "0.62114877", "0.615268", "0.61477023", "0.61477023", "0.61451435", "0.6145143...
0.65074307
1
SparkMD5 OOP implementation. Use this class to perform an incremental md5, otherwise use the static methods instead.
function SparkMD5() { // call reset to init the instance this.reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SparkMD5() {\n // call reset to init the instance\n this.reset();\n }", "function SparkMD5() {\n // call reset to init the instance\n this.reset();\n }", "function SparkMD5() {\n // call reset to init the instance\n this.reset();\n }", "...
[ "0.793492", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.7916262", "0.6577859", "0.6572468", "0.6572468", "0.6450196", "0.6450196", "0.6450196", "0...
0.79537976
0
create function to create scrollmagic scene based on window width
function multipleScrollMagicScenes(trigger, className) { if(window.innerWidth <= 1200) { let elements = Array.from(document.querySelectorAll(className)); elements.forEach(element => {createScrollMagicScene(element, element)}); } else { createScrollMagicScene(trigger, className); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeScene() {\n if (cx > windowWidth - 120) {\n scene += 1;\n }\n}", "function Scroll(){\n\n const content = document.querySelector(\".content\");\n const sidebar = document.querySelector(\".sidebar\");\n const controller = new ScrollMagic.Controller();\n const scene = new ScrollMagic.Scene({...
[ "0.6595836", "0.6525412", "0.6459745", "0.6391035", "0.62227315", "0.61992174", "0.6191736", "0.61780185", "0.61650956", "0.6046032", "0.60434794", "0.6010674", "0.5976501", "0.59676456", "0.59557396", "0.58896863", "0.5870927", "0.5851222", "0.58409053", "0.5836675", "0.5824...
0.683021
0
Updating Expense item percentage
function updateExpPercentage(){ let percentages = budget.getPercentages(); ui.displayPercentage(percentages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#updatePercentage() {\n //1. calculate the percentage\n model.calculatePercentages();\n //2. Read the percentage from th budget controller\n var percentage = model.getPercentages();\n //3. display the percentage to the UI\n addItemsView.displayPercentage(percentage);\n ...
[ "0.7822816", "0.67950964", "0.67799926", "0.677817", "0.66652834", "0.6571356", "0.63457865", "0.63004273", "0.6292931", "0.62818974", "0.6233407", "0.61778057", "0.6168531", "0.615565", "0.61241424", "0.6121973", "0.60791904", "0.6075496", "0.60712403", "0.60697764", "0.6062...
0.8170844
0
When delete button pressed in index.html, delete row in table and data in storage.sync
function deleteRow() { try { var table = document.getElementById("dataTable"); // get the table from index.html var rowCount = table.rows.length; for (var i = 0; i < rowCount; i++) { var row = table.rows[i]; var chkbox = row.cells[0].childNodes[0]; // only delete project that is checked ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteRow(index){\n let tableData = JSON.parse(localStorage.getItem(database));\n tableData.splice(index,1);\n let newData = JSON.stringify(tableData);\n localStorage.setItem(database,newData);\n loadTable();\n}", "function deleteTableRow(index){\n var table = document.getElementById(\"regtable\...
[ "0.7253183", "0.7168582", "0.7061736", "0.6997535", "0.6939008", "0.69291234", "0.6924416", "0.6888819", "0.68848175", "0.68540347", "0.6851587", "0.66411215", "0.6631104", "0.66165817", "0.65730745", "0.65658885", "0.65647006", "0.65560806", "0.65558314", "0.65542895", "0.65...
0.72245026
1
set drop down menu with time zones
function set_selector(){ var str = ""; for (var key in time_zone_dict){ str += '<option value="' + time_zone_dict[key] + '">' + key + '</option>' } selector = document.getElementById("time_zone_selector"); selector.insertAdjacentHTML('beforeend', str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSupportedTimeZones(values)\r\n{\r\n if (values && values.length > 0)\r\n {\r\n // Add all time zones to our map and update choices in the header menu\r\n for (var timeZoneIndex = 0; timeZoneIndex < values.length; timeZoneIndex++)\r\n {\r\n supportedTimeZonesMap[val...
[ "0.706356", "0.67145187", "0.66786766", "0.65926325", "0.650313", "0.64569503", "0.6388839", "0.62380797", "0.61961365", "0.6109683", "0.59815747", "0.59463274", "0.5938179", "0.5917013", "0.59084004", "0.59006304", "0.58874685", "0.5886473", "0.57786435", "0.5719826", "0.571...
0.6759128
1
XRReferenceSpace offset is immutable, so return a new reference space that has an updated orientation.
get referenceSpace() { if (this.dirty) { // Represent the rotational component of the reference space as a // quaternion. let invOrient = quat.create(); quat.rotateX(invOrient, invOrient, -this.lookPitch); quat.rotateY(invOrient, invOrient, -this.lookYaw); let xform = new XRRigid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "translate (offset) {\n this.position = this.tempPosition.plus(offset);\n }", "get rel() {\n\tvar rev;\n\tvar xy;\n\t\n\trev = this._get_ac_rev();\n\txy = _pnt_transform(this.orig.x, this.orig.y, rev);\n\n\treturn {x: xy[0], y: xy[1]};\n }", "recenterAnchorInSubtree(){\n if(!this.getChildrenList()...
[ "0.52977955", "0.49291176", "0.48002613", "0.47807676", "0.47798732", "0.47191384", "0.4681524", "0.46803275", "0.46346703", "0.46293756", "0.46198174", "0.4591328", "0.4565956", "0.4562411", "0.4562411", "0.453036", "0.4489549", "0.4486812", "0.44531018", "0.4443559", "0.444...
0.7081979
0
Converts to native tuple type
function toNative(self) { return self.tuple; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tuple() {\n var typeSpec = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n typeSpec[_i] = arguments[_i];\n }\n return new TTuple(typeSpec.map(function (t) { return parseSpec(t); }));\n}", "function tuple(t) {\r\n var ntuple = \"Tuple\" + t.length;\r\n t.constructor = Tup...
[ "0.7286567", "0.71512747", "0.6909418", "0.6822625", "0.6818033", "0.66840696", "0.65823597", "0.63534576", "0.63534576", "0.63534576", "0.63534576", "0.63534576", "0.6288407", "0.6288407", "0.6288407", "0.6288407", "0.6288407", "0.623447", "0.62174606", "0.61214995", "0.6097...
0.7498084
0
Appends a value to a tuple
function append_(self, k) { return new Tuple([...self.tuple, k]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "append(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName$1(name);\n\t\tvalidateValue$1(value);\n\t\tconst key = find$1(this[MAP$1], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP$1][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP$1][name] = [value];\n\t\t}\n\t}", "append(name...
[ "0.57021755", "0.56554145", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", "0.5650627", ...
0.63525724
0
Prepends a value to a tuple
function prepend_(self, k) { return new Tuple([k, ...self.tuple]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepend(value, list) {\n return {value, rest: list};\n}", "function prepend(value, list) {\n return {\n value: value,\n rest: list\n };\n}", "function ex_prepend(value, list) {\n return {\n value: value,\n rest: list\n };\n}", "function encode_as_tuple(value, spec, buffer) {\n ...
[ "0.56113374", "0.55733234", "0.54907066", "0.5481081", "0.5401857", "0.5400567", "0.50923574", "0.50472444", "0.4952137", "0.49431995", "0.4938654", "0.48920807", "0.48803625", "0.48323628", "0.48323628", "0.48323628", "0.48323628", "0.48323628", "0.48323628", "0.48323628", "...
0.59880406
0
Operators can add a truck Requires a truck_name, truck_img_url, cuisine_type, and departure_time be given owner id will be added via the users JWT
function registerTruck(truck){ const {owner_id , truck_name , truck_img_url , cuisine_type , departure_time , truck_lat , truck_long , truck_location } = truck return db('trucks_table') .insert({owner_id , truck_name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addOwnedTruck(truck) {\n return db('trucks')\n .insert(truck)\n}", "function addCar({ carName, carMake, carModel, carYear, carMPG, carPrice, owner }) {\n console.log(` Defining car: ${carYear} ${carMake} ${carModel}`);\n UserVehicles.collection.insert({ carName, carMake, carModel, carYear, c...
[ "0.66215366", "0.57511675", "0.5573798", "0.5568123", "0.5521495", "0.5424776", "0.5393894", "0.5356577", "0.53124005", "0.5308094", "0.5304593", "0.5295695", "0.52863836", "0.5278432", "0.5267267", "0.5237077", "0.5226368", "0.52207196", "0.5215555", "0.521017", "0.51874864"...
0.729664
0
Operators can view a list of trucks registered under their id
function getTrucks(id){ return db('trucks_table') .where('owner_id', id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truckItems(id){\n return db('items')\n .where('truck_id', id)\n}", "function getSpecificTruck(id, truckId){\n return db('trucks_table')\n .where('owner_id', id)\n .andWhere('id', truckId)\n .first()\n}", "async show() {\n // select * from ticket\n const resu...
[ "0.6425781", "0.57579994", "0.5736776", "0.56121325", "0.56121325", "0.5609697", "0.56024283", "0.56024283", "0.5548202", "0.55416656", "0.5491204", "0.54422253", "0.53948396", "0.5368954", "0.5351175", "0.53408074", "0.5336798", "0.53110904", "0.52957684", "0.52874076", "0.5...
0.6996469
0
allows operators to delete a specific truck they own
function deleteTruck(id, truckId){ return db('trucks_table') .where('owner_id', id) .andWhere('id', truckId) .del() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static delete(to,t,p,op,couleur,cb){\n\t\tconsole.log(couleur.substr(couleur.length -1));\n\t\tquery.execute(conn, 'echec','delete data {:cell'+to+' rdf:type <'+op+'> . :cell'+to+' rdf:type <'+couleur+'>}',\n\t\t'application/sparql-results+json', {\n\t\t\toffset:0,\n\t\t\treasoning: true\n\t\t}).then(res =>{\n\t\t...
[ "0.60741985", "0.6012959", "0.5955342", "0.5937775", "0.58618814", "0.5837802", "0.5832775", "0.5824975", "0.57563776", "0.57382923", "0.5723523", "0.5704999", "0.56980705", "0.5697152", "0.56765604", "0.5672775", "0.56628186", "0.56603396", "0.5657462", "0.5653775", "0.56494...
0.68914765
0
Allows Operators to view a list of truck ratings for specific trucks they own
function truckRatings(truckId){ return db('visited_trucks') .select('rating') .where('truck_id', truckId) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get get_ratings () {\n return this._ratings;\n }", "static getRatings() {\n // console.log(\"getRatings()\");\n return store.get('CURRENT_RATINGS');\n }", "function addRatings() {\n OMDBProvider.getMovie(vm.film.imdb_id).then(movie => {\n vm.film.ratings = m...
[ "0.5990507", "0.57096976", "0.5586152", "0.5557977", "0.53870887", "0.53727037", "0.5339285", "0.5333098", "0.5319194", "0.5287436", "0.52483076", "0.5125228", "0.51216775", "0.5110961", "0.5109349", "0.5108458", "0.5091557", "0.50861996", "0.50704855", "0.5062441", "0.502548...
0.7093456
0
Allows operators to view all the ratings for a specific item
function itemRatings(itemId){ return db('diner_item_ratings') .select('rating') .where('item_id', itemId) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get get_ratings () {\n return this._ratings;\n }", "function getRatings(userId){\n\tgetCurrentRatingAction(userId, function(data){ \n\t\tsetMyRatings(data.selfEvaluation, data.managerEvaluation, data.score, data.selfEvaluationSubmitted, data.managerEvaluationSubmitted);\n\t});\n}", "static getRatings...
[ "0.6602629", "0.6183021", "0.6134712", "0.6020459", "0.5964257", "0.5951566", "0.5794529", "0.5785419", "0.57014024", "0.5696298", "0.56406933", "0.5630862", "0.5602222", "0.5588984", "0.5584361", "0.5582279", "0.5557236", "0.5549969", "0.55326056", "0.5492265", "0.5483544", ...
0.71983355
0
operators can create items for their trucks to sell. the truck id should be pulled from req.params.id items require item_name, item_description, and a price photo url's are optional for the items
function createItem(item){ const {truck_id, item_name, item_description, item_photo_url, item_price} = item return db('items') .insert({truck_id, item_name, item_description, item_photo_url, item_price}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sellItem(req, res, next) {\n const newItem = req.body;\n delete newItem.categories;\n const sellerId = (req.user ? req.user.user.id : 39);\n\n newItem.images = JSON.stringify(newItem.images);\n console.log('Creating new item,', newItem);\n db.items.create(newItem)\n .then(product => {\n d...
[ "0.71184903", "0.64060277", "0.63712", "0.6355065", "0.6312656", "0.6237528", "0.6221679", "0.61836827", "0.6180359", "0.61669093", "0.61521167", "0.6143501", "0.6104593", "0.6081305", "0.60702604", "0.60537964", "0.6036646", "0.60070187", "0.5999714", "0.59924394", "0.595859...
0.70986277
1
operators can view a list of items listed for a truck item is pulled from req.params.id
function truckItems(id){ return db('items') .where('truck_id', id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listItems(tripId) {\n $.get(\"/trips/\" + tripId + \"/items\", function(response) {\n var items = response;\n var itemsList = '<ul id=items>';\n items.forEach(function(item) {\n var i = item.trip_items.find(function(tripItem) {return tripItem.trip_id === parseInt(tripId)})\n itemsList ...
[ "0.6040888", "0.60062945", "0.5926433", "0.5884363", "0.5859186", "0.58418673", "0.5831058", "0.5778077", "0.5733079", "0.5712876", "0.56959367", "0.5679616", "0.5666533", "0.559665", "0.558134", "0.55583197", "0.55168325", "0.5515849", "0.5506298", "0.5505329", "0.5479562", ...
0.6103177
0
fn_movealllistitems(leftlist,rightlist,id,courseid,lid) Function to move from one list to another list leftlist id of the draggable left/right list box rightlist id of the draggable right/left list box id type of call made 0 move all, 1 particular item courseid id of the item moved if the type is 1 lid lesson id
function fn_movealllistitems(leftlist,rightlist,id,courseid,lid) { if(id == 0) { $("div[id^="+leftlist+"_]").each(function() { var clas = $(this).attr('class'); var temp = $(this).attr('id').replace(leftlist,rightlist); $(this).attr('id',temp); $('#'+rightlist).append($(this)); if($(this).a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fn_movealllistitems(leftlist,rightlist,id,userid)\n{\t\n\tif(id == 0)\n\t{\n\t\t$(\"div[id^=\"+leftlist+\"_]\").each(function()\n\t\t{ \n\t\t\tvar clas = $(this).attr('class');\n\t\t\tvar temp = $(this).attr('id').replace(leftlist,rightlist);\n\t\t\t\n\t\t\t$(this).attr('id',temp);\n\t\...
[ "0.8234567", "0.61495364", "0.598688", "0.5885655", "0.5885655", "0.5865672", "0.5841735", "0.5730423", "0.56865454", "0.5528253", "0.5480527", "0.54790133", "0.54681945", "0.5438656", "0.5405663", "0.5402952", "0.5402024", "0.53811365", "0.53668535", "0.5342203", "0.5337545"...
0.8875402
0
Save Step6 fn_saveclassreview() Function to save a class final step
function fn_saveclassreview(classid,stepid) { var dataparam = "oper=saveclassreview"+"&classid="+classid; $.ajax({ type: 'post', url: 'class/newclass/class-newclass-classajax.php', data: dataparam, beforeSend: function(){ showloadingalert("Loading, please wait."); }, success:function(data) { var d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Save() {}", "function updateClassDB(){\n\n}", "function saveClass(classId) {\n //If meeting pattern has no days default to Saturday\n if (classModalData.meetingPattern.split(' ')[0].length === 0) {\n classModalData.meetingPattern = 'Sa' + classModalData.meetingPattern;\n }\n\n //set Cha...
[ "0.54036576", "0.53725356", "0.5303089", "0.5269292", "0.5266103", "0.5233966", "0.52143395", "0.5211393", "0.51888174", "0.51799005", "0.51777494", "0.5158812", "0.5149072", "0.512019", "0.50752175", "0.50581056", "0.50485283", "0.50414705", "0.5025829", "0.5015559", "0.5012...
0.705492
0
This sample demonstrates how to Creates or updates an Application Insights web test definition.
async function webTestCreate() { const subscriptionId = "subid"; const resourceGroupName = "my-resource-group"; const webTestName = "my-webtest-my-component"; const webTestDefinition = { configuration: { webTest: '<WebTest Name="my-webtest" Id="678ddf96-1ab8-44c8-9274-123456789abc" Enabled="Tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function webTestUpdate() {\n const subscriptionId = \"subid\";\n const resourceGroupName = \"my-resource-group\";\n const webTestName = \"my-webtest-my-component\";\n const webTestDefinition = {\n configuration: {\n webTest:\n '<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-1234...
[ "0.6794488", "0.5834819", "0.57163376", "0.5167891", "0.5112684", "0.5023388", "0.499531", "0.4987013", "0.4937224", "0.48994702", "0.47845554", "0.47713736", "0.47597602", "0.4749512", "0.47284693", "0.4727616", "0.46803576", "0.46680212", "0.46234754", "0.46221918", "0.4619...
0.64566076
1
This sample demonstrates how to Creates or updates an Application Insights web test definition.
async function webTestUpdate() { const subscriptionId = "subid"; const resourceGroupName = "my-resource-group"; const webTestName = "my-webtest-my-component"; const webTestDefinition = { configuration: { webTest: '<WebTest Name="my-webtest" Id="678ddf96-1ab8-44c8-9274-123456789abc" Enabled="Tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function webTestCreate() {\n const subscriptionId = \"subid\";\n const resourceGroupName = \"my-resource-group\";\n const webTestName = \"my-webtest-my-component\";\n const webTestDefinition = {\n configuration: {\n webTest:\n '<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-1234...
[ "0.6457935", "0.5834112", "0.5716152", "0.51677346", "0.511025", "0.50225496", "0.4995957", "0.49864978", "0.49352705", "0.48986512", "0.4781872", "0.47719464", "0.4757952", "0.47497725", "0.47287256", "0.47267184", "0.46831354", "0.46671504", "0.46219516", "0.4620743", "0.46...
0.6796372
0
check if a function exists
function function_exists(function_name) { if (typeof function_name == 'string') return (typeof window[function_name] == 'function'); return (function_name instanceof Function); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function function_exists(function_name)\n{\n\tif (typeof function_name == 'string')\n\t\treturn (typeof window[function_name] == 'function');\n\treturn (function_name instanceof Function);\n}", "function existFunction(strNameFunction)\n{\n return (!empty(window[strNameFunction])) ? isFunction(window[strNameFu...
[ "0.8222967", "0.8115277", "0.80704427", "0.7920262", "0.76122284", "0.75433725", "0.73023456", "0.72193325", "0.7013975", "0.7012263", "0.6854636", "0.68449163", "0.6816809", "0.6816809", "0.6782556", "0.67772406", "0.67570376", "0.6746328", "0.6742004", "0.66848975", "0.6639...
0.82761
0
Constructs a new Payment.
function Payment() { _classCallCheck(this, Payment); Payment.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(payment) {\n this.paymentType = payment.paymentType\n this.doneBy = payment.doneBy;\n this.description = payment.description;\n this.reducingBalance = payment.reducingBalance;\n this.priorBalance = payment.priorBalance;\n this.amount = payment.amount;\n ...
[ "0.7253057", "0.69759995", "0.6792135", "0.6608334", "0.6398519", "0.6272069", "0.5949777", "0.58617055", "0.5841474", "0.5793966", "0.5670283", "0.5661715", "0.5661131", "0.56472373", "0.5626042", "0.5622586", "0.557255", "0.55517125", "0.55510503", "0.5547458", "0.55063146"...
0.82744825
0
parseHeaders Parse headers returned by UPnP server into info
parseHeaders({ LOCATION, USN }) { const u = url.parse(LOCATION); const hostname = u.hostname; const port = u.port; const uuid = USN.split(':')[1]; log.info(`Hostname: ${hostname} port: ${port}`); return { hostname, port, uuid }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseHeaders() { \n var headers = new Object();\n var responseHeaders = (this.getAllResponseHeaders());\n\n // Faz a correspondencia de sequencias de caracteres que antecedem os caracteres de controle\n // em um array.\n var headerArray = (responseHeaders.match(/[^\\u000D\\u000A].*/gi));\n\...
[ "0.75936943", "0.6750721", "0.6671439", "0.65701777", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.65101075", "0.6501548", "0.6484668", "0.6479056", "...
0.6953512
1
visualizes player's point count with information from cookie
function updatePoints() { const playerPoints = cookie.get('points'); document.getElementById("pointDisplay").innerHTML = "points: " + playerPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countScore() {\n \n var CookieValue = 0;\n // get page increment\n var page = dataLayer[0].pageType;\n if (page == \"detail\") {\n var increment = 2;\n } else {\n var increment = 1;\n }\n\n // create cookie if does not exist\n if( $.cookie('PopupCounter') === null ...
[ "0.64354384", "0.6419986", "0.63750315", "0.6245256", "0.62232393", "0.6176929", "0.6167749", "0.6129984", "0.604327", "0.6026001", "0.60242975", "0.5981444", "0.5872528", "0.57683045", "0.57371074", "0.57049626", "0.5679696", "0.5657852", "0.56305516", "0.55787235", "0.55674...
0.7923086
0
updates the cookie after play i.e. takes a point and adds winnings
function registerWinnings(winnings) { var oldPoints = cookie.get('points'); var newPoints = oldPoints - 1 + winnings; cookie.set('points', newPoints); updatePoints(); if(newPoints === 0) { updateHeaderText("Game over!") document.getElementById("playButton").innerHTML = ":("; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePoints() {\n const playerPoints = cookie.get('points');\n document.getElementById(\"pointDisplay\").innerHTML = \"points: \" + playerPoints;\n}", "function cookieClick() {\n score++;\n cookies++;\n updateStats();\n}", "function updateCookies() {\n score += cps * (UPDATE_SCORE_MILLI...
[ "0.7359954", "0.6770462", "0.6348034", "0.6310365", "0.6255193", "0.6231588", "0.62063974", "0.61707246", "0.6165661", "0.61537075", "0.61010844", "0.6040163", "0.5944731", "0.5943989", "0.5890943", "0.5890083", "0.5873323", "0.5842962", "0.581127", "0.5804717", "0.5786445", ...
0.7360608
0
called when clicked the play button send a get request to /play to get the value of the counter
function playClicked() { var playerPoints = cookie.get('points'); if (playerPoints > 0) { var counter = "-1"; var xhr = new XMLHttpRequest(); xhr.addEventListener('load', () => { counter = xhr.response; const winnings = assessWinnings(counter); registerWinnings(winnings); }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "playRandom(){\n this.request(this.routes.randomTrack, this.play);\n }", "update() {\n if (this.exists) {\n if (PARAMS.PLAY) {\n this.playCounter++;\n if (this.playCounter > 5) {\n PARAMS.PLAY = false;\n }\n }\n...
[ "0.65942407", "0.63970304", "0.6263242", "0.6199307", "0.618613", "0.6142964", "0.6073512", "0.6068469", "0.602784", "0.60206175", "0.60113126", "0.59789616", "0.5975448", "0.59571373", "0.5924384", "0.5902917", "0.58965725", "0.58964485", "0.586904", "0.5866446", "0.5855093"...
0.6982977
0
Layout Vertically Centered ========================================================================== This function vertically centers an object element within its parent element by calculating the height of the parent, the height of the child and adding padding to the top and bottom of the child element. Parent Elemen...
function vertCenter(element, child) { var parentHeight = element.parent().height(); // This will give the element the same height // and line-height as it's parent container. element.css({ 'height': parentHeight + 'px', 'line-height': parentHeight + 'px' }); element.childre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verticalCenter(elem) {\n var elemHeight = elem.clientHeight;\n var containerHeight = elem.parentElement.clientHeight;\n elem.style.marginTop = ( containerHeight - elemHeight ) / 2 + \"px\";\n}", "function centerVertically() {\n\t\tjQuery('.formOverlay').css({\n\t\t\t'top' : '50%',\n\t\t\t'margin-top'...
[ "0.63586265", "0.5995462", "0.59712183", "0.5962324", "0.5957148", "0.59551334", "0.582516", "0.58122694", "0.58109343", "0.5760199", "0.5568897", "0.5557073", "0.55090404", "0.53613746", "0.5272811", "0.5156824", "0.50584304", "0.5031563", "0.502166", "0.4922432", "0.4880939...
0.6595145
0
Create a call block and add the 'input list' option
function setupListInputBlocks(callback) { driver.addBlock('evaluate').accept(block => { // Add list input let multiArgs = block.children[2]; SnapActions.addListInput(multiArgs, 1).accept(() => { driver.addBlock('reportNe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupListInputBlocks(callback) {\n driver.addBlock('reifyScript').accept(ring => {\n driver.addBlock('doFaceTowards').accept(block => {\n const slot = ring.inputs()\n .find(child => child instanceof RingCommandSlotMorph)\n...
[ "0.6423233", "0.573893", "0.5652546", "0.5557388", "0.5544701", "0.54889834", "0.54464775", "0.5356667", "0.5343607", "0.53384864", "0.53312695", "0.53256947", "0.5325099", "0.53047544", "0.530393", "0.5298819", "0.529333", "0.52817494", "0.52817494", "0.52817494", "0.5281749...
0.67990166
0
Create a call block and add the 'input list' option
function setupListInputBlocks(callback) { driver.addBlock('reifyScript').accept(ring => { driver.addBlock('doFaceTowards').accept(block => { const slot = ring.inputs() .find(child => child instanceof RingCommandSlotMorph) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupListInputBlocks(callback) {\n driver.addBlock('evaluate').accept(block => {\n // Add list input\n let multiArgs = block.children[2];\n SnapActions.addListInput(multiArgs, 1).accept(() => {\n driver.addBlock...
[ "0.67990166", "0.573893", "0.5652546", "0.5557388", "0.5544701", "0.54889834", "0.54464775", "0.5356667", "0.5343607", "0.53384864", "0.53312695", "0.53256947", "0.5325099", "0.53047544", "0.530393", "0.5298819", "0.529333", "0.52817494", "0.52817494", "0.52817494", "0.528174...
0.6423233
1
Function to change focus from one dot to the next
function changeDotFocus(currentDot, nextDot) { currentDot .removeClass('selected') .addClass('deselected'); nextDot .removeClass('deselected') .addClass('selected'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focus(){}", "focus() {\n this.setFocus(0, 1);\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n if (this.outline_) {\n this.updateOutline();\n }\n if (this.la...
[ "0.686745", "0.6720389", "0.66911733", "0.66782707", "0.6670452", "0.6662713", "0.6627901", "0.66029024", "0.64895844", "0.6466155", "0.645436", "0.64412624", "0.64214873", "0.64214873", "0.63815385", "0.63815385", "0.63028425", "0.62837136", "0.62591344", "0.6182409", "0.617...
0.78055346
0
Function to swap the current and next (or chosen) picture by fading them in and out
function fadeOutAndIn(chosenPic) { var current = $('.visible'), next; // if parameter is empty, get index of next picture if(!chosenPic) { // if the current picture is the last in list, set index of the first picture ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchToNextImage() {\n i = (i + 1) % images.length;\n galleryImage.fadeOut(function() {\n galleryImage.attr(\"src\", images[i]).fadeIn();\n });\n }", "function changeImg() {\n // Fade out old image\n $('#imageDisplay').fadeOut('slow', function() {\n // Change background imag...
[ "0.73233974", "0.6986779", "0.69128233", "0.6882522", "0.686211", "0.6827363", "0.6807246", "0.6792689", "0.675169", "0.67421", "0.67076665", "0.6693733", "0.6678821", "0.6670462", "0.66561455", "0.6629409", "0.6622048", "0.6597117", "0.6588474", "0.6587054", "0.6586143", "...
0.7576787
0
Function to show the picture counter within the gallery
function imgCounter(imageId) { // append the counter container $('<div id="counter"></div>') .appendTo('#ms-lightbox'); // append the counter text $('<span></span>') .appendTo('#counter') .text((imageId + 1) + '/' + imgCount...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imgCounter(imgId) {\n\n // append the counter container\n $('<div id=\"counter\"></div>')\n .appendTo('#emwi-lightbox');\n\n // append the counter text\n $('<span></span>')\n .appendTo('#counter')\n .t...
[ "0.7717591", "0.7150613", "0.69741356", "0.6913316", "0.69013584", "0.6860491", "0.6849101", "0.66910255", "0.66749364", "0.6666321", "0.66030437", "0.6597827", "0.6568729", "0.6539854", "0.65261453", "0.6516614", "0.64893645", "0.6451781", "0.6448529", "0.64217067", "0.64073...
0.7984991
0
modify path for destination
function modifyStringForDestination(path) { // chnage location from src to dist and then remove file name... // replace src to dist var fileDistination = path.replace("src", 'build'); var arrayOfString = null; if (fileDistination.split('/').length > 1) { arrayOfString = fileDistination.spl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "appendPath(path) {\n if (path) {\n let currentPath = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n if (path.startsWith(\"/\")) {\n path = path.s...
[ "0.6374766", "0.6374766", "0.6345864", "0.62536335", "0.6187639", "0.6107336", "0.6107336", "0.6107336", "0.6107336", "0.6103979", "0.6049667", "0.59885675", "0.59784955", "0.59635705", "0.5944567", "0.5908425", "0.5776957", "0.5750067", "0.57387114", "0.57082313", "0.5704932...
0.6709914
0
return promise to list all the new jobs that are created
function getNewJobs () { return new Promise(function (resolve, reject) { var Job = mongoose.model('Job'); Job.find({ $and: [ { status: 'A' }, { current: { $exists: false } } ] }).sort('-created').exec(function (err, jobs) { if (err) { reject(ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async getAllJobs(data={}) {\n let res = await this.request('jobs/', data);\n return res.jobs;\n }", "get(){\n return new Promise((resolve, reject) => {\n resolve(this.jobs)\n })\n }", "function joblist() {\n console.log('Inside factory now');\n v...
[ "0.69620204", "0.68488944", "0.681688", "0.6782396", "0.6715641", "0.66954046", "0.6641477", "0.66089344", "0.65975773", "0.65805155", "0.65433735", "0.6457698", "0.6424553", "0.6410379", "0.6410246", "0.6380287", "0.6336603", "0.6313137", "0.6245137", "0.621255", "0.61835426...
0.7894725
0
return promise to list all the ongoing active jobs
function getActiveJobs () { return new Promise(function (resolve, reject) { var Job = mongoose.model('Job'); Job.find({ $and: [ { status: 'A' }, { current: { $exists: true } } ] }).sort('-created').exec(function (err, jobs) { if (err) { reject(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewJobs () {\n return new Promise(function (resolve, reject) {\n var Job = mongoose.model('Job');\n Job.find({\n $and: [\n { status: 'A' },\n { current: { $exists: false } }\n ]\n }).sort('-created').exec(function (err, jobs) {\n if (err) {\n ...
[ "0.7481951", "0.74366754", "0.72341555", "0.6990148", "0.69854295", "0.6972776", "0.6839734", "0.67519814", "0.6705533", "0.6654126", "0.6619022", "0.6583218", "0.6545713", "0.6477871", "0.6394325", "0.63253903", "0.6237384", "0.62217945", "0.61959237", "0.6179336", "0.617499...
0.77838784
0
return promise to list all the completed jobs
function getCompletedJobs () { return new Promise(function (resolve, reject) { var Job = mongoose.model('Job'); Job.find({ $and: [ { status: 'C' }, { current: { $exists: true } } ] }).sort('-current.completedOn').exec(function (err, jobs) { if (err) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(){\n return new Promise((resolve, reject) => {\n resolve(this.jobs)\n })\n }", "static async getAllJobs(data={}) {\n let res = await this.request('jobs/', data);\n return res.jobs;\n }", "function onCleanJobs () {\r\n state.jobs\r\n .filter(job => (job.state !== 'wait...
[ "0.7022263", "0.688492", "0.6537457", "0.64898", "0.6459096", "0.6434406", "0.6404366", "0.64037067", "0.6367744", "0.63528454", "0.6340913", "0.63097745", "0.6283585", "0.62663573", "0.6240028", "0.6203215", "0.6168233", "0.61292124", "0.59376", "0.5921906", "0.59032106", ...
0.7566829
0
return promise to a course to a user
function assignCourse(courseId, start, end, userid, eid) { return new Promise(function (resolve, reject) { var course = [], startDate = start.toISOString().replace('T', ' ').replace('Z', ''), endDate = end.toISOString().replace('T', ' ').replace('Z', ''); course.push(courseId); //(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "returnSingleCourse(course) {\r\n this.log(`Getting single course...`);\r\n this.log(course.id + '-- from courses database.js');\r\n return this.context\r\n .retrieveSingle(`\r\n SELECT title, Users.firstName || \" \" || Users.lastName As user\r\n FROM Courses \r\n INNER JOIN Use...
[ "0.62086743", "0.6156368", "0.6060802", "0.6031179", "0.59921193", "0.59901744", "0.5908947", "0.58916014", "0.58398277", "0.5832047", "0.5808898", "0.5808102", "0.5790301", "0.57892555", "0.57785654", "0.5769432", "0.5738928", "0.5731051", "0.5728497", "0.56988645", "0.56756...
0.6315378
0
return a promise to get status of a course for a user
function getCourseStatus(courseid, userid, eid) { return new Promise(function (resolve, reject) { var queryString = { course_id: courseid, user_id: userid, eid: eid, }; var options = { uri: 'https://api.capabiliti.co/utility/api/v2/courses.php?f_name=get_course_sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAccuserStatus(accuser, gameid) {\n return new Promise((resolve, reject) => {\n db.findOne({ player: accuser,gameid:gameid }, { status: 1, _id: 0 }, (err, docs) => {\n if (err) console.error(\"There's a problem with the database: \", err);\n else if (docs) console.log(\"accuser life chec...
[ "0.6308321", "0.6037749", "0.5997813", "0.59612304", "0.5958208", "0.5957212", "0.59263366", "0.58789396", "0.58746606", "0.5787396", "0.57731193", "0.57389677", "0.570011", "0.5700107", "0.5693548", "0.5682217", "0.56783146", "0.566924", "0.5646284", "0.56276935", "0.5618790...
0.7315961
0
function to create job logs in the reporting module.
function createJobLogs(updatedJobData, currentStateData){ var ReportLog = mongoose.model('ReportLog'); var jobLog = new ReportLog(); jobLog.type = 'job'; updatedJobData.current = currentStateData; jobLog.log = updatedJobData.toObject(); jobLog.eid = updatedJobData.eid; jobLog.save(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createLog(){\n var a = \"log_\" + moment().format('YYMMDD-HHmm') + \".txt\";\n logName = a;\n fs.writeFile(a,\"Starting Log:\\n\",(err)=>{\n if(err) throw(err); \n });\n}", "function generateReport(){\n\t//create reports folder (if it doesn't already exist)\n\tif(!fs.existsSync...
[ "0.6275153", "0.58635193", "0.57366544", "0.5702901", "0.5697663", "0.5687558", "0.5681265", "0.5640653", "0.558549", "0.55688274", "0.55258423", "0.55178034", "0.5485724", "0.5473364", "0.54533684", "0.54388195", "0.540997", "0.5390594", "0.533423", "0.53332984", "0.532058",...
0.6540068
0
function to update existing duration logs in the reporting module.
function updateDurationLogs(job, updateObj) { var ReportLog = mongoose.model('ReportLog'); ReportLog.findOneAndUpdate( { 'type': 'durationLog', 'log.jobId': job._id, 'log.stateId': job.current.stateId, 'log.userId': job.userid, 'log.workflow': job.workflow }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function completeDurationLogs(jobId) {\n var ReportLog = mongoose.model('ReportLog');\n var updateObj = {\n 'log.jobStatus': 'F'\n };\n ReportLog.update(\n {\n 'type': 'durationLog',\n 'log.jobId': jobId,\n },\n updateObj,{ multi: true } ,function(err, updatedReportLog...
[ "0.6553084", "0.61129683", "0.5951553", "0.59469134", "0.5754624", "0.5650343", "0.5650133", "0.56094944", "0.55340946", "0.5513256", "0.54034096", "0.5396024", "0.5396024", "0.5312107", "0.52946097", "0.5223684", "0.52236223", "0.5220663", "0.5212127", "0.5183001", "0.516399...
0.6463587
1
function to update existing duration logs in the reporting module.
function completeDurationLogs(jobId) { var ReportLog = mongoose.model('ReportLog'); var updateObj = { 'log.jobStatus': 'F' }; ReportLog.update( { 'type': 'durationLog', 'log.jobId': jobId, }, updateObj,{ multi: true } ,function(err, updatedReportLog){ if(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateDurationLogs(job, updateObj) {\n var ReportLog = mongoose.model('ReportLog');\n ReportLog.findOneAndUpdate(\n {\n 'type': 'durationLog',\n 'log.jobId': job._id,\n 'log.stateId': job.current.stateId,\n 'log.userId': job.userid,\n 'log.workflow': job.workf...
[ "0.6463587", "0.61129683", "0.5951553", "0.59469134", "0.5754624", "0.5650343", "0.5650133", "0.56094944", "0.55340946", "0.5513256", "0.54034096", "0.5396024", "0.5396024", "0.5312107", "0.52946097", "0.5223684", "0.52236223", "0.5220663", "0.5212127", "0.5183001", "0.516399...
0.6553084
0
check completed jobs and mark them finalized
function finalizeJobs() { getCompletedJobs().then(function (jobs) { var Job = mongoose.model('Job'); var ReportLog = mongoose.model('ReportLog'); jobs.forEach(function (job) { var current=job.current; var modDate = new Date(); Job.findOneAndUpdate({ '_id' : new mongoose.Ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "finishProcessing() {\n this.busy = false;\n this.successful = true;\n }", "function handleFinish(values) {\n job.current = getJob(values, job.current, writeMessage);\n setBusy(job.current.pendingTime);\n }", "function successCb(){\n\t\t\t\tdbm.updateJobFinish(uuid, function(err, rows, f...
[ "0.684998", "0.6675176", "0.6572128", "0.6545436", "0.6513003", "0.6513003", "0.65071195", "0.65055686", "0.64247304", "0.6385964", "0.6382631", "0.63017094", "0.6286299", "0.62789977", "0.6265965", "0.6256079", "0.6254534", "0.622615", "0.6206055", "0.61417395", "0.61335146"...
0.67720425
1
This function calls the deleteMatch function from db.js, containing the data from the request(sent from the frontend)
async function deleteMatch (context, req){ try { let payload = req.body; await db.deleteMatch(payload); context.res = { body: {status: JSON.stringify(payload)} } } catch (error){ context.res = { status: 400, body: error.mess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function delet_me(){\n const match = await DButils.execQuery(\n `select match_id from dbo.matches WHERE \n home_team = 1 and out_team = 3 AND league_id = 1 and season_name = '2021-2022'`\n );\n await DButils.execQuery(\n `delete from dbo.matches where match_id = '${match[0].matc...
[ "0.7088452", "0.6717827", "0.66999125", "0.6685835", "0.6595074", "0.6583584", "0.65647495", "0.6540242", "0.6539686", "0.65238166", "0.6482338", "0.6451814", "0.64451504", "0.6433543", "0.6360836", "0.6351683", "0.63486224", "0.6344071", "0.63400924", "0.6339927", "0.6330674...
0.7513207
0
takes an array of trigger objects: see sample_trigger_config
function add_trigger( arr_in ) { var i, il, random_clip = null; for ( i = 0, il = arr_in.length; i < il; i++ ) { try { //create random fire object if (clipNames[arr_in[i].name]) { return; } if ( arr_in[i].type === 'random_fire' ) { clipNames[arr_in[i].name] = true; random_clip = GM4L.Ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "$trigger (types, ...args) {\n xeach(types, (type) => {\n const events = $events.get(this)\n if (events) events.trigger(this, type, args)\n })\n }", "function getTriggers(trigger) {\n var show = (trigger || options.trigger || defaultTriggerShow).split(' ');\n ...
[ "0.6405146", "0.63516206", "0.63318807", "0.6305287", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", "0.62904274", ...
0.6484846
0
busqueda especifica , busca por coleccion metodo GET buscarPorColeccion : busca por colleciion /////////////////////////////////////////////////// / en usuarios , medicos , controles etc etc hay busquedas por cada coleccion ej : en post man : aqui es por coleccion y por documento /api/busquedas/coleccion/:tabla/:bus se...
function buscarPorColeccion(req, res) { // viene x los params de la url let busqueda = req.params.bus; let tabla = req.params.tabla; // busqueda es el parametro de la url // 'i' may y minus es insensible let regex = new RegExp(busqueda, 'i'); // aqui convertimos la busqueda con la ex regula...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "busqueda(termino, parametro) {\n // preparacion de variables //\n // ------ Uso de la funcion to lower case [a minusculas] para evitar confuciones en el proceso\n // ------/------ La busqueda distingue mayusculas de minusculas //\n termino = termino.toLowerCase();\n parametro = p...
[ "0.74113995", "0.7158147", "0.6989979", "0.6900675", "0.68052775", "0.6667315", "0.6640449", "0.6526045", "0.6509941", "0.6500681", "0.6485538", "0.6477066", "0.64758164", "0.64691967", "0.6444768", "0.64288616", "0.64159715", "0.6414228", "0.6344046", "0.63029736", "0.629684...
0.76866615
0