Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
get json data from server
function doJsonReq(method, uri, content, responseFunc, myarg) { if (!session) { return; } if (uri.indexOf('http://') !== 0 && uri.indexOf('https://') !== 0) { uri = postmile.api.uri + uri; } // Calculate Signature var authHeader = MAC.getAuthorizationHeader(method, uri, /**/session, (content !== '' || method === 'POST' || method === 'PUT' ? content : null), null); // DELETE? // Create the io callback/configuration var configuration = { headers: { 'Authorization': authHeader }, // YUI won't to cross-domain even with native xdr xdr: { use: 'native' }, // required for YUI to allow processing of a cross-domain request (and not try to use flash) (but still does not work) timeout: 3000, method: method, // defaults to GET on: { success: function (x, o) { // Y.log("RAW JSON DATA: " + o.responseText); var jsonResponse = []; // Process the JSON data returned from the server if (o.responseText) { try { jsonResponse = /*Y.*/JSON.parse(o.responseText); jsonResponse._networkRequestStatusCode = x.status; } catch (e) { xLog("JSON Parse failed!"); return; } } else { xLog("JSON no data to parse!"); return; } if (jsonResponse.error) { // different/lower/earlier than jsonResponse.status !== 'ok' ) xFire('postmile:networkError', jsonResponse); } // no permission, redirect/prompt for login if (jsonResponse.code === 401) { refreshCredentials(); } // confirm join, retry event if user joins, etc if (jsonResponse.code === 403) { var retryRequest = function () { doJsonReq(method, uri, content, responseFunc, myarg); }; if (jsonResponse.message === 'Insufficient TOS accepted') { // getCredentials(function () {}/*, true*/); // not refreshCredentials(); window.location = postmile.api.uri + '/login'; } else { xFire('postmile:askJoinCurrentProject', true, retryRequest); } } if (responseFunc) { responseFunc(jsonResponse, myarg); } }, failure: function (x, o) { xLog("Async call failed!"); } } }; // YUI x-domain calls broken - may need this before YUI loaded now anyways // Y.io.header( 'Authorization', authHeader ) ; // try hardcoding default headers just for testing // set Content-Type and pass content // var transaction = Y.io(uri, configuration); // YUI does not allow x-domain call, even use xdr use native var request = new XMLHttpRequest(); request.onreadystatechange = function () { if (request.readyState === 4) { // Y.log( "getJson's XMLHttpRequest: " + request.readyState + " " + request.responseText ) ; if (request.status !== 200 && request.status !== 201) { // alert( 'Request failed ' + JSON.stringify( request ) ) ; xLog('Request failed ' + JSON.stringify(request)); } configuration.on.success(request, request); } }; request.open(method, uri); request.uri = uri; request.setRequestHeader('Authorization', authHeader); request.setRequestHeader('Content-Type', 'application/json'); // or application/x-www-form-urlencoded if not json request.send(content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function json() {\n\n var body = '';\n request = http.get('https://mcapi.ca/query/198.24.171.162:25955/list', function(theJson){\n\n\t\ttheJson.on('data', function (chunk){\n\t\t\tbody += chunk;\n\t\t}).on('end', function(){\n\t\t\tconsole.log('Data stream end: ' + body);\n\t\t\tbody = JSON.stringify(body);\...
[ "0.69929576", "0.6948993", "0.6927239", "0.69119483", "0.68703055", "0.68030655", "0.67936033", "0.6688731", "0.66820455", "0.6641274", "0.66055816", "0.6575541", "0.65369374", "0.64949924", "0.64899343", "0.64572775", "0.6431581", "0.64292836", "0.64092344", "0.63933337", "0...
0.0
-1
get json data from server
function getJson(uri, to, myarg) { doJsonReq("GET", uri, null, to, myarg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function json() {\n\n var body = '';\n request = http.get('https://mcapi.ca/query/198.24.171.162:25955/list', function(theJson){\n\n\t\ttheJson.on('data', function (chunk){\n\t\t\tbody += chunk;\n\t\t}).on('end', function(){\n\t\t\tconsole.log('Data stream end: ' + body);\n\t\t\tbody = JSON.stringify(body);\...
[ "0.69938433", "0.694996", "0.69281083", "0.6912812", "0.68705165", "0.680345", "0.6795085", "0.6688686", "0.668211", "0.66411805", "0.6606838", "0.65775114", "0.65382504", "0.6494608", "0.64910555", "0.64581424", "0.6432308", "0.64304155", "0.64105225", "0.63931364", "0.63913...
0.6198862
40
put json data to server new stuff/resouces
function putJson(uri, content, to, myarg) { doJsonReq("PUT", uri, content, to, myarg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setInfo( json ) { rescate = json; }", "function setData (jsonData) { //we create a function to call later when the data is retrieved from the server in a new variable\n data = jsonData; // this is also called deserializing our JSON\n console.log(data);\n}", "_pushJSONPost() {\n if (! this._po...
[ "0.66319674", "0.6332492", "0.629263", "0.62244755", "0.61996615", "0.6188956", "0.6181801", "0.6172174", "0.6164782", "0.61597824", "0.6154559", "0.61471343", "0.6138891", "0.61078817", "0.6101744", "0.6095818", "0.6069685", "0.6042519", "0.60368454", "0.60187477", "0.600714...
0.62131715
4
post json data to server changing existing stuff
function postJson(uri, content, to, myarg) { if (content === null) { content = ''; } doJsonReq("POST", uri, content, to, myarg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_pushJSONPost() {\n if (! this._post) {\n this.push('\"}');\n this._post = true;\n }\n }", "function post_tracking_data(json_data) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", data_endpoint);\n xhr.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');\n ...
[ "0.71889704", "0.6475795", "0.6323562", "0.6309741", "0.62543386", "0.62313", "0.6194462", "0.60550576", "0.60549194", "0.6048695", "0.60395795", "0.60381514", "0.6035293", "0.6000339", "0.59972817", "0.59895355", "0.5971904", "0.5968645", "0.5961731", "0.5952519", "0.5938116...
0.5826402
30
delete json data to server delete existing stuff
function deleteJson(uri, content, to, myarg) { doJsonReq("DELETE", uri, content, to, myarg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearJSON() {\n //console.log(\"hello from clear json\");\ndb.boards.remove( { } );\ndownloadFile();\n}", "function deleteJSON(obj) {\n\n console.log(\"deleteJSON\" + obj);\n\n xmlFileToJs('Books.xml', function (err, result) {\n\n if (err) throw (err);\n\n id = result.books.section[obj....
[ "0.7357436", "0.6788424", "0.6768494", "0.67513746", "0.6745359", "0.66962713", "0.6641185", "0.6641185", "0.6553824", "0.6502378", "0.6469999", "0.6415969", "0.6413825", "0.63956195", "0.63947517", "0.63761497", "0.6343053", "0.6340092", "0.63290685", "0.6313269", "0.6297425...
0.6544204
9
add acceptance_request end export start
function exportFile(fileType) { if ('pdf' === fileType) { vm.objExport.constAcceptanceRequestId = vm.pycntObj.constAcceptanceRequestId; vm.objExport.fileType = 'pdf'; vm.objExport.contractId = vm.item.contractId; $('#loading').show(); pycntService.exportFile(vm.objExport).then(function (data) { window.location = Constant.BASE_SERVICE_URL + "fileservice/downloadFileATTT?" + data.fileName; }).catch( function(){ toastr.error(gettextCatalog.getString("Lỗi khi export!")); return; }).finally(function(){ $('#loading').hide(); }); } else { vm.objExport.constAcceptanceRequestId = vm.pycntObj.constAcceptanceRequestId; vm.objExport.fileType = 'doc'; vm.objExport.contractId = vm.item.contractId; $('#loading').show(); pycntService.exportFile(vm.objExport).then(function (data) { window.location = Constant.BASE_SERVICE_URL + "fileservice/downloadFileATTT?" + data.fileName; }).catch( function(){ toastr.error(gettextCatalog.getString("Lỗi khi export!")); return; }).finally(function(){ $('#loading').hide(); }); } /*var selectedRow = []; var grid = vm.acceptanceGrid; vm.acceptanceGrid.select("tr:eq(1)"); grid.table.find("tr").each(function (idx, item) { var row = $(item); var checkbox = $('[name="gridcheckbox"]', row); if (checkbox.is(':checked')) { // Push id into selectedRow var tr = grid.select().closest("tr"); var dataItem = grid.dataItem(item); selectedRow.push(dataItem.constAcceptanceRequestId); } }); if (selectedRow.length > 0) { pycntService.exportList(selectedRow).then(function (data) { window.location = "/ktts-service/fileservice/downloadFileATTT?" + data.fileName; }); } else { if (vm.objExport.constAcceptanceRequestId == null) { toastr.warning(gettextCatalog.getString("Chưa chọn bản ghi nào!")); return; } else { } }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareExportRequest() {\n return { type : ActionTypes.PREPARE_EXPORT_REQUEST }\n}", "function exportIt() {\n\n\t\talert('The Export-Feature is currently being implemented. When finished, it will give you a handy ZIP file which includes a standalone version of your Hypervideo.');\n\n\t}", "function ...
[ "0.57768536", "0.57261664", "0.5615349", "0.55542934", "0.5512626", "0.54387873", "0.53165704", "0.5249854", "0.5215417", "0.5176246", "0.5173403", "0.5143896", "0.514197", "0.51136136", "0.50748163", "0.5071731", "0.5070714", "0.50420505", "0.5011728", "0.49986392", "0.49985...
0.5438347
6
khong cho edit trong grid
function nonEditor(container, options) { container.text(options.model[options.field]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RenderGrid(gridSettings) {\n $('#MainDiv').html('<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display\" id=\"DataGrid\"></table>');\n oTable = $('#DataGrid').dataTable(gridSettings);\n $('td', oTable.fnGetNodes()).editable('/EditTable/' + objGrid_Main.Config.tblToUpdate, {\n ...
[ "0.6673586", "0.64059365", "0.6349705", "0.62982553", "0.62784225", "0.62553257", "0.6246832", "0.6205272", "0.61929", "0.6182223", "0.6130424", "0.6127048", "0.61069703", "0.60950184", "0.60784197", "0.6075733", "0.6021982", "0.6007545", "0.5934928", "0.59322923", "0.5915287...
0.0
-1
function convert from string vietnamese data to mililsecon
function chanceDateToString(stringDate, mode) { if (stringDate != undefined && mode == 'M_TO_DATE') { var date = new Date(stringDate); return (date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear()); } if (stringDate != undefined && mode == 'DATE_TO_M') { var arrDate = stringDate.split("/"); var date = new Date(arrDate[2], arrDate[1] - 1, arrDate[0], 0, 0, 0, 0); return date.getTime(); } if (stringDate != undefined && mode == 'DATEMONTH_TO_M') { // chuyển từ ngày tháng năm giờ phút giấy sang millisecon var arrDate = stringDate.split(" "); var DdMMYYYY = arrDate[0].split("/"); var HHMmSs = arrDate[1].split(":"); var date = new Date(DdMMYYYY[2], DdMMYYYY[1] - 1, DdMMYYYY[0], HHMmSs[0], HHMmSs[1], HHMmSs[2], 0); return date.getTime(); } if (stringDate != undefined && mode == 'M_TO_DATEMONTH') { var date = new Date(stringDate); return (date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert(str){\n return str;\n}", "static beatufierString(k, v, avcs){\n var str=v;\n\n str=str.toLowerCase();\n str=str.replace(/â|ä|à|á|@/gi, \"a\");\n str=str.replace(/ê|ë|è|é|€/gi, \"e\");\n str=str.replace(/î|ï|ì|í/gi, \"i\");\n str=str.replace(/ô|ö|ò|ó/g...
[ "0.5942925", "0.57862663", "0.5769782", "0.5769782", "0.5764578", "0.57613134", "0.5745159", "0.57339233", "0.57333636", "0.5729357", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324", "0.5724324",...
0.0
-1
visits.set(users[0], new Date().getMilliseconds() 1000) visits.set(users[1], new Date(new Date().getTime() + 1000 60)) visits.set(users[2], new Date())
function lastVisit(name){ return visits.get(users.find(person => person.name === name)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMetricsTime(key) { //appending the value to a record\n var d = new Date();\n metrics.set(key, d.getTime() - startTime);\n}", "function addVisitTimestampForUser(user_id, short_url) {\n let formatted = moment().subtract(7, 'hours').format('MMMM Do YYYY, h:mm:ss a');\n\n if(!databases.urlVisits[...
[ "0.63098127", "0.62506664", "0.6069061", "0.59323704", "0.5886424", "0.586866", "0.5863078", "0.5644686", "0.56238943", "0.55179024", "0.5510928", "0.5462541", "0.5459088", "0.54362595", "0.5430301", "0.5380081", "0.53798276", "0.53179437", "0.53164995", "0.53138274", "0.5301...
0.0
-1
update force layout (called automatically each iteration)
function tick() { // draw directed edges with proper padding from node centers }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateLayoutAutomatically() {\n if ( this._enabled ) {\n this.updateLayout();\n }\n }", "updateLayout() {\n if ( !this.isLocked ) {\n this.lock();\n\n this.layout();\n\n this.unlock();\n }\n }", "function fixLayout() {\r\n nodes.forEach(function(d) {\r\n d.fixed = true...
[ "0.7305056", "0.72352076", "0.6839469", "0.6820593", "0.6667432", "0.66366446", "0.66296047", "0.66113067", "0.6526464", "0.649139", "0.64884317", "0.64498395", "0.6429313", "0.64039433", "0.6366602", "0.6327181", "0.63258237", "0.6311104", "0.62711847", "0.62625235", "0.6260...
0.0
-1
clone the first and last cards this creates the illusion of a carousel
componentDidMount() { //clone of first card let first_card_clone = this.card_container.children[0].cloneNode(true); //clone of lst card let last_card_clone = this.card_container.children[ this.card_container.children.length - 1 ].cloneNode(true); this.card_container.insertBefore( last_card_clone, this.card_container.children[0] ); this.card_container.append(first_card_clone); //instant transtition to card index 1 this.card_container.style.transitionDuration = "0.0s"; this.card_container.style.transform = `translate(-${0}px)`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function caroselFunction(){\r\n $('.multi-item-carousel').carousel({\r\n interval: false\r\n });\r\n $('.multi-item-carousel .item').each(function(){\r\n var next = $(this).next();\r\n if (!next.length) {\r\n next = $(this).siblings(':first');\r\n }\r\n next.children(':firs...
[ "0.7140755", "0.7091071", "0.7027064", "0.6858387", "0.67747116", "0.6651948", "0.6615437", "0.6418059", "0.63578063", "0.6301323", "0.6258727", "0.6236849", "0.61762834", "0.6147509", "0.6129502", "0.61272055", "0.60904247", "0.6087424", "0.60767406", "0.6049898", "0.6012605...
0.615179
13
FUNCTION TO START A NEW GAME
function startGame() { // SHUFFLE CARDS cards = shuffle(cards); // REMOVES EXISTING CLASSES FROM CARDS for (var i = 0; i < cards.length; i++) { deck.innerHTML = ""; [].forEach.call(cards, function (item) { deck.appendChild(item); }); cards[i].classList.remove("show", "open", "match", "disabled"); } // RESET MOVES moves = 0; counter.innerHTML = moves; // RESET TIMER second = 0; minute = 0; hour = 0; var timer = document.querySelector(".timer"); timer.innerHTML = "0 mins 0 secs"; clearInterval(interval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function startNewGame() {\n const newGame = new GameLoop();\n newGame.startGame(true);\n}", "function startGame() {\n logger.log('Staring a new game');\n // Hide any dialog that might have started this game\n $('.modal').modal('hide');\n\n // Reset the ...
[ "0.851455", "0.8087785", "0.7931846", "0.7886934", "0.78617454", "0.78389066", "0.78377265", "0.77638555", "0.77280134", "0.77160126", "0.77152324", "0.7715051", "0.7698284", "0.76467", "0.76288027", "0.7627771", "0.7589574", "0.75890994", "0.7529229", "0.7518346", "0.7513888...
0.0
-1
ADD OPEN CARDS TO OPENEDCARDS LIST AND CHECK IF THEY MATCH
function cardOpen() { openedCards.push(this); var len = openedCards.length; if (len === 2) { moveCounter(); if (openedCards[0].type === openedCards[1].type) { matched(); } else { unmatched(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCardsToMatchedCardsList() {\n\tfor (const q of openCards) {\n\t\tmatchedCards.push(q);\n\t\t//empty the openCards List\n\t\topenCards = [];\n\t}\n\n}", "function addToOpenCards(clickedCard) {\n clickedCard.classList.add('open');\n openCards.push(clickedCard);\n\n if (openCards.le...
[ "0.6822301", "0.6772566", "0.67088526", "0.6584701", "0.6541815", "0.65226096", "0.6504329", "0.6488852", "0.64583457", "0.64423364", "0.64234775", "0.6393802", "0.63208747", "0.62699854", "0.6256391", "0.6235106", "0.6158807", "0.61476624", "0.61476624", "0.6145029", "0.6144...
0.6731787
2
WHEN CARDS DO MATCH
function matched() { openedCards[0].classList.add("match", "disabled"); openedCards[1].classList.add("match", "disabled"); openedCards[0].classList.remove("show", "open", "no-event"); openedCards[1].classList.remove("show", "open", "no-event"); openedCards = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hit (car) {\n if(car.y < this.y + this.pipeHeight && car.y > this.y) {\n if(car.x < this.left || car.x > width - this.right) {\n this.highlight = true;\n return true;\n }\n }\n return false;\n }", "function checkForCardMatch(){\r\n\r\n //CHECK TO SEE IF CARDS ...
[ "0.5936714", "0.5836075", "0.5754851", "0.57285607", "0.57026935", "0.56593114", "0.5632837", "0.5597515", "0.55570424", "0.5520885", "0.54834974", "0.54747796", "0.5468014", "0.54469824", "0.54367864", "0.54111314", "0.54072344", "0.53917587", "0.53699684", "0.5363239", "0.5...
0.0
-1
WHEN CARDS DON'T MATCH
function unmatched() { openedCards[0].classList.add("unmatched"); openedCards[1].classList.add("unmatched"); disable(); setTimeout(function () { openedCards[0].classList.remove("show", "open", "no-event", "unmatched"); openedCards[1].classList.remove("show", "open", "no-event", "unmatched"); enable(); openedCards = []; }, 1100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForCardMatch(){\r\n\r\n //CHECK TO SEE IF CARDS MATCH VIA MATCHING DATASETS\r\n let isCardMatch = firstCard.dataset.carmaker === secondCard.dataset.carmaker;\r\n\r\n //ADD SCORE TO PLAYERS\r\n if( isCardMatch === true ){\r\n matchedCards.push(firstCard,secondCard);\r\n check...
[ "0.60045326", "0.59384644", "0.59135586", "0.5858373", "0.5828135", "0.5820269", "0.5812954", "0.57977545", "0.57732344", "0.5742349", "0.5732131", "0.57014376", "0.5685868", "0.56850845", "0.5683626", "0.5674702", "0.5666015", "0.5664979", "0.5662931", "0.56187266", "0.56138...
0.0
-1
ENABLE CARDS, DISABLE MATCHED CARDS
function enable() { Array.prototype.filter.call(cards, function (card) { card.classList.remove("disabled"); for (var i = 0; i < matchedCard.length; i++) { matchedCard[i].classList.add("disabled"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enableColliders(){\n this.colliderShapes.forEach((e)=>{\n e.setEnabled(true);\n });\n }", "function enable() {\n Array.prototype.filter.call(cards, function(card) {\n card.classList.remove(\"disabled\");\n for (var i = 0; i < matchedCard.length; i++) {\n matchedCard[i].cla...
[ "0.6082297", "0.6010906", "0.5988318", "0.59053767", "0.58881074", "0.58737797", "0.58110255", "0.57092714", "0.5706498", "0.5694758", "0.5632029", "0.55822647", "0.555612", "0.55486435", "0.55291563", "0.55271745", "0.5514294", "0.55085593", "0.5491912", "0.548705", "0.54841...
0.5993801
2
CONGRATULATIONS WHEN WIN, POP UP WITH MOVES & TIME
function congratulations() { if (matchedCard.length == 16) { clearInterval(interval); finalTime = timer.innerHTML; // CONGRATULATIONS modal.classList.add("show"); //MOVES AND TIME document.getElementById("finalMove").innerHTML = moves; document.getElementById("totalTime").innerHTML = finalTime; //EXIT POP UP closeModal(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function winCheck() {\n\tif(matches === 8){\n\t\ttimerEnd();\n\t\taddRating(moves);\n\t\tpopUpModal();\n\t\tpopUp.classList.remove('display-none');\n\t}\n}", "win() {\n stopwatch.stop();\n spawnPopup(this.moves, stopwatch.format(stopwatch.times), this.stars);\n }", "function win() {\n\ttime.St...
[ "0.68084496", "0.6736463", "0.67201334", "0.6705491", "0.6627408", "0.66148347", "0.6528555", "0.6525294", "0.65246135", "0.65165246", "0.6483523", "0.6454043", "0.64183366", "0.6406737", "0.6400199", "0.6387227", "0.6374664", "0.6346361", "0.6344069", "0.6329669", "0.6327812...
0.6121342
51
ensure the exchange rate modified field is set to false
function pageInit_resetCustomField(type){ try { if(type=='copy'){ nlapiSetFieldValue('custbody_default_exchange_rate', nlapiGetFieldValue('exchangerate')); nlapiSetFieldValue('custbody_current_exchange_rate',nlapiGetFieldValue('exchangerate')); } //nlapiSetFieldValue('custbody_exch_rate_modified', 'F'); } catch(error) { if (error.getDetails != undefined) { nlapiLogExecution('ERROR', 'Process Error', error.getCode() + ': ' + error.getDetails()); throw error; } else { nlapiLogExecution('ERROR', 'Unexpected Error', error.toString()); throw nlapiCreateError('99999', error.toString()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSave_validateExchangeRateMod(){\n\ttry {\n\t\t//fetch the global script parameter tolerance\n\t\tvar tolerancepercentage = parseFloat(nlapiGetContext().getPreference('custscript_tolerance'));\n\t\t\n\t\t\n\t\t\t//fetch the default exchange rate defined on the transaction\n\t\t\tvar defaultExchangeRate =...
[ "0.7020188", "0.6199199", "0.60683507", "0.60060185", "0.5946105", "0.59436953", "0.58819556", "0.5841436", "0.5801106", "0.5785416", "0.57569975", "0.57534987", "0.57460433", "0.5644607", "0.5630143", "0.56098795", "0.56087625", "0.5572158", "0.5566397", "0.55009466", "0.548...
0.0
-1
set default exchange rate when user sets the currency/name field
function postSourcing_setDefaultExchangeRate(type, name, linenum){ try { if (name == 'currency' || name == 'entity' || name == 'trandate') { var defaultExchangeRate = parseFloat(nlapiGetFieldValue('exchangerate')); nlapiSetFieldValue('custbody_default_exchange_rate', defaultExchangeRate); } return true; } catch(error) { if (error.getDetails != undefined) { nlapiLogExecution('ERROR', 'Process Error', error.getCode() + ': ' + error.getDetails()); throw error; } else { nlapiLogExecution('ERROR', 'Unexpected Error', error.toString()); throw nlapiCreateError('99999', error.toString()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor ( exchangeRate = 0.01 ) {\n\t\tthis.baseExchangeRate = exchangeRate;\n\t\tthis.exchangeRate = exchangeRate;\n\t}", "function setValueRate(currency, useCached, callback) {\n var issuer = valueCurrencies[currency];\n\n if (currency === 'XRP') {\n $scope.valueRate = 1;\n $scope.valueRate...
[ "0.74702775", "0.72213805", "0.7176704", "0.6937032", "0.678292", "0.67110306", "0.6542206", "0.6406394", "0.63372546", "0.62875605", "0.6276481", "0.62249005", "0.621857", "0.6171754", "0.6104258", "0.6103492", "0.60999864", "0.604242", "0.60199875", "0.60161614", "0.6011886...
0.7147506
3
on save validate if exchange rate has been modified and if above tolerance raise an alert, if confirmed set custom field
function onSave_validateExchangeRateMod(){ try { //fetch the global script parameter tolerance var tolerancepercentage = parseFloat(nlapiGetContext().getPreference('custscript_tolerance')); //fetch the default exchange rate defined on the transaction var defaultExchangeRate = parseFloat(nlapiGetFieldValue('custbody_default_exchange_rate')); //fetch the current exchange rate defined on the transaction var currentExchangeRate = parseFloat(nlapiGetFieldValue('exchangerate')); //calculate the difference in exchange rate % var exchangeRateDiff = Math.abs(currentExchangeRate - defaultExchangeRate); var exchangeRateDiffPercent = (exchangeRateDiff / defaultExchangeRate) * 100; //alert("exchangeRateDiffPercent=" + exchangeRateDiffPercent) var exchangeRateModified = nlapiGetFieldValue('custbody_exch_rate_modified'); var definedExchangeRate = parseFloat(nlapiGetFieldValue('custbody_current_exchange_rate')) //alert("definedExchangeRate=" + definedExchangeRate) //if exchange rate difference is greater than tolerance raise alert to current user, if confirmed set custom checkbox, if disagreed reset to default exchange rate if (exchangeRateDiffPercent > tolerancepercentage) { if (definedExchangeRate != currentExchangeRate) { var ans = confirm(nlapiGetContext().getPreference('custscript_alert_settolerance')); if (ans) { nlapiSetFieldValue('custbody_exch_rate_modified', 'T'); //nlapiSetFieldValue('custbody_revert_exchange_rate','F'); } else { nlapiSetFieldValue('custbody_exch_rate_modified', 'F'); nlapiSetFieldValue('custbody_revert_exchange_rate', 'T'); nlapiSetFieldValue('exchangerate', defaultExchangeRate, true, true); } } } else { nlapiSetFieldValue('custbody_exch_rate_modified', 'F'); } return true; } catch(error) { if (error.getDetails != undefined) { nlapiLogExecution('ERROR', 'Process Error', error.getCode() + ': ' + error.getDetails()); throw error; } else { nlapiLogExecution('ERROR', 'Unexpected Error', error.toString()); throw nlapiCreateError('99999', error.toString()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSave(type){\r\n\t//validating Cheque Number\r\n\tconsole.log(\"***** on Save fired ****\");\r\n\tvar okToSave=true;\r\n var sentby_cheque = nlapiGetFieldValue(\"custbody_tsa_sentbycheque\");\r\n \tvar sentby_cash = nlapiGetFieldValue(\"custbodytsa_sentbycash\");\r\n var sentby_bank = nlapiGetFiel...
[ "0.6132964", "0.61108583", "0.59567714", "0.5929183", "0.5866318", "0.5789001", "0.5761761", "0.5704211", "0.5692704", "0.56209093", "0.5607836", "0.5550161", "0.5540007", "0.54832846", "0.5475157", "0.5428714", "0.54048777", "0.53975147", "0.53936255", "0.53765374", "0.53689...
0.7756294
0
set the exchange rate if user rejected change client side script is not triggering update therefore running on server side.
function beforeSubmit_setExchangeRate(type){ try { var CONTEXT_USERINTERFACE = 'userinterface'; var CONTEXT_USEREVENT = 'userevent'; var CONTEXT_SUITELET = 'suitelet' var context = nlapiGetContext().getExecutionContext(); nlapiLogExecution('DEBUG','context',context); if (type != 'delete') { if (context == CONTEXT_USERINTERFACE) { //if (context == CONTEXT_USERINTERFACE || context == CONTEXT_USEREVENT) { var revertExchangeRate = nlapiGetFieldValue('custbody_revert_exchange_rate'); if (revertExchangeRate == 'T') { var defaultExchangeRate = nlapiGetFieldValue('custbody_default_exchange_rate'); nlapiSetFieldValue('exchangerate', defaultExchangeRate); } else{ nlapiSetFieldValue('custbody_current_exchange_rate', nlapiGetFieldValue('exchangerate')); } } } if (type=='create'){ if (context == CONTEXT_SUITELET){ var exchangeRate = nlapiGetFieldValue('exchangerate'); nlapiSetFieldValue('custbody_default_exchange_rate', exchangeRate); } } } catch (error) { if (error.getDetails != undefined) { nlapiLogExecution('ERROR', 'Process Error', error.getCode() + ': ' + error.getDetails()); throw error; } else { nlapiLogExecution('ERROR', 'Unexpected Error', error.toString()); throw nlapiCreateError('99999', error.toString()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSave_validateExchangeRateMod(){\n\ttry {\n\t\t//fetch the global script parameter tolerance\n\t\tvar tolerancepercentage = parseFloat(nlapiGetContext().getPreference('custscript_tolerance'));\n\t\t\n\t\t\n\t\t\t//fetch the default exchange rate defined on the transaction\n\t\t\tvar defaultExchangeRate =...
[ "0.7027427", "0.701633", "0.67473584", "0.65498966", "0.6444692", "0.64413124", "0.6375052", "0.63068557", "0.6282538", "0.618217", "0.6146214", "0.6103206", "0.60990435", "0.609778", "0.605703", "0.5961545", "0.5959528", "0.59356135", "0.59159744", "0.5878836", "0.58694243",...
0.6396979
6
PSEUDO CODE check if number is less than 2. If it is, it will not be prime check if number is whole number. If it isn't, it will not be prime check every whole number from 2 to sqrt of n if any divides n exactly (remainder == 0), return false else return true
function primeTime(num){ if(num < 2){ return false; } if(num != Math.round(num)){ return false; } for(var i = 2; i <= Math.sqrt(num); i++){ if(num % i == 0){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkNumPrime(n){\n\n // Check whether the number is 1,2 or 3\n if (n<4){\n return true;\n }\n\n // Check the number isn't directly divisible by 2 or 3\n if (n%2 == 0 || n%3 == 0){\n return false;\n }\n\n var di=2;\n var i = 5;\n\n // Don't calculcate higher than t...
[ "0.78142935", "0.77838165", "0.7772162", "0.7719827", "0.7706071", "0.7665027", "0.76348627", "0.7623053", "0.76196134", "0.75912935", "0.7575199", "0.7573611", "0.75647366", "0.75348026", "0.75173384", "0.7509051", "0.74997824", "0.7478206", "0.74665767", "0.74619466", "0.74...
0.75971127
9
Update the board in the browser
function renderBoard(board, boardStatus) { for (var i = 0; i < 9; i++) { if (boardStatus[i] == "X" || boardStatus[i] == "O") { $(board[i]).html('<p>' + boardStatus[i] + '</p>'); } else { $(board[i]).html('<p></p>'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n this.drawBoard();\n }", "function updateScreen () {\r\n // Loop over the 4x4 grid.\r\n for (let i = 0; i < 4; i++) {\r\n for (let j = 0; j < 4; j++) {\r\n // Get the HTML button at position (i,j).\r\n let button = document.querySelector (`#board${i}${j}`);\r\n // Read the sta...
[ "0.71139765", "0.70688134", "0.69393027", "0.6857711", "0.6811936", "0.6698523", "0.6681892", "0.6607867", "0.65129465", "0.6487944", "0.6470685", "0.64473784", "0.64270234", "0.63985467", "0.63663554", "0.63355315", "0.62881404", "0.62791765", "0.62588763", "0.6257471", "0.6...
0.0
-1
Tile click event function
function tileClick(tile) { var response = fetch("/api/game/gameboard/updateBoard/" + tile) .then((resp) => resp.json()) .then(function(data) { return data }); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tileClick() {\n\tmoveOneTile(this);\n}", "function tileClick() {\n\tvar position = parseInt(this.dataset.position);\n\tif (board.isValidMove(position)) {\n\t\tboard.placeTile(current, position);\n\t\tthis.getElementsByClassName('tile-image')[0].src = current.img;\n\t\tif (board.isWinningState(current, p...
[ "0.8487526", "0.7887676", "0.7771932", "0.76437527", "0.76157135", "0.76157135", "0.75651383", "0.73769647", "0.73554116", "0.7281272", "0.7225341", "0.72236234", "0.7205788", "0.71731615", "0.7100063", "0.70552266", "0.703842", "0.69394", "0.6925989", "0.6897355", "0.6856437...
0.62967515
53
formats the active text editor
formatActiveTextEditor() { if ((editor = atom.workspace.getActiveTextEditor())) { if (editorHelper.hasElixirGrammar(editor)) { this.formatTextEditor(editor, editorHelper.getSelectedRange(editor)); } else { atom.notifications.addInfo( "Elixir Formatter only formats Elixir source code", { dismissable: false } ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateEditor() {\n\t\ttextToEditor();\n\t\tpositionEditorCaret();\n\t}", "function textToEditor() {\n\t\t$(editor.text_panel)\n\t\t\t.html(\"\")\n\t\t\t.append(window.TheEditor.highlighter(text_area.value));\n\t\t$(editor.text_panel)\n\t\t\t.css('minWidth', (editor.outer.clientWidth - 44) + 'px')\n\t\t\...
[ "0.69751346", "0.69360846", "0.6857964", "0.67042273", "0.66853774", "0.6573826", "0.64906734", "0.6425286", "0.63676745", "0.6340261", "0.63351995", "0.6303457", "0.62494797", "0.6204858", "0.6161732", "0.6157111", "0.61500436", "0.61416626", "0.6116504", "0.6085523", "0.607...
0.7030607
0
formats the given text editor
formatTextEditor(editor, range = null) { try { const { status, stdout, stderr, error } = this.runFormat( editorHelper.getTextInRange(editor, range), editor ); if (status == 0 && (!stderr || !stderr.length) && !error) { editorHelper.insertText(editor, range, stdout.toString()); notificationHelper.dismissNotifications(); } else { notificationHelper.showErrorNotifcation("Elixir Formatter Error", { detail: stderr || error }); } } catch (exception) { notificationHelper.showErrorNotifcation("Elixir Formatter Exception", { detail: exception, stack: exception.stack }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textToEditor() {\n\t\t$(editor.text_panel)\n\t\t\t.html(\"\")\n\t\t\t.append(window.TheEditor.highlighter(text_area.value));\n\t\t$(editor.text_panel)\n\t\t\t.css('minWidth', (editor.outer.clientWidth - 44) + 'px')\n\t\t\t.css('minHeight', (editor.outer.clientHeight - 4) + 'px');\n\t\t$(editor.back_panel)...
[ "0.69515586", "0.68006986", "0.6605308", "0.65490085", "0.6498912", "0.63389677", "0.6307022", "0.6286916", "0.6279183", "0.6265914", "0.62246615", "0.6198948", "0.6184738", "0.6068427", "0.60125405", "0.5995622", "0.59751546", "0.5923309", "0.59079903", "0.58919775", "0.5891...
0.66884017
2
runs mix format process and returns response
runFormat(text, editor) { let command = "mix"; let args = ["format", "--check-equivalent", "-"]; let options = this.getCommandOptions(text, editor); if (!settings.shouldRunMixDirectly()) { command = settings.getElixirPath(); args.unshift(settings.getMixPath()); } return process.spawnSync(command, args, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processing(error, stdout, stderr) {\n if (error) {\n console.log(error);\n }\n if (stderr) {\n console.log(stderr);\n }\n\n if (stdout) {\n console.log(stdout);\n var output = fs.readFileSync('results/results.json');\n var results = JSON.parse(ou...
[ "0.59593815", "0.5850932", "0.57102793", "0.57102793", "0.5229701", "0.5194917", "0.51871717", "0.5157416", "0.51562387", "0.5146795", "0.5122793", "0.510342", "0.5100218", "0.5100218", "0.50450325", "0.5032547", "0.5024934", "0.5017019", "0.49905592", "0.49759758", "0.496975...
0.58144325
2
Liste des points forts
function getLink(baseadmin,getlang){ $.nicenotify({ ntype: "ajax", uri: '/'+baseadmin+'/plugins.php?name=blocklink&getlang='+getlang+'&action=getlist', typesend: 'get', beforeParams:function(){ var loader = $(document.createElement("tr")).attr('id','loader').append( $(document.createElement("td")).addClass('text-center').append( $(document.createElement("span")).addClass("loader offset5").append( $(document.createElement("img")) .attr('src','/'+baseadmin+'/template/img/loader/small_loading.gif') .attr('width','20px') .attr('height','20px') ) ) ); $('#no-entry').before(loader); }, successParams:function(data){ $('#loader').remove(); $.nicenotify.initbox(data,{ display:false }); if(data === undefined){ console.log(data); } if(data !== null){ $('#no-entry').before(data); } updateList(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPoints() {}", "function getPoints() {\n return [\n new google.maps.LatLng(45.391982833,-93.367101333),new google.maps.LatLng(45.391982833,-93.367101333),new google.maps.LatLng(45.391982833,-93.367101333),new google.maps.LatLng(45.391982833,-93.367101333),\n \n ];\n }", "getPo...
[ "0.71159136", "0.65576184", "0.6462688", "0.64557576", "0.64272666", "0.6419925", "0.63863254", "0.6289717", "0.6121037", "0.6100835", "0.603093", "0.60192925", "0.598239", "0.59814245", "0.59049535", "0.58896124", "0.587681", "0.5854859", "0.5850393", "0.58431184", "0.584189...
0.0
-1
Adjusts the height of all .jseqheighttarget elements to the height of .jseqheightsource
function eqHeight() { $('.js-eq-height').each(function (index, item) { var $item = $(item), sourceHeight = $item.find('.js-eq-height-source').height(), $targets = $item.find('.js-eq-height-target'); $targets.each(function (index, target) { var $target = $(target); if (sourceHeight > $target.height()) { $target.height(sourceHeight); } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTargetHeights() {\r\n var tId, elem;\r\n for (tId in aTargetIds) {\r\n if (aTargetIds.hasOwnProperty(tId)) {\r\n elem = document.getElementById(tId);\r\n aTargetIds[tId].height = elem.clientHeight;\r\n }\r\n }\r\n }", "function setHeight2() {\n f...
[ "0.658584", "0.5789859", "0.5770313", "0.5759572", "0.57518566", "0.57514596", "0.56952816", "0.5660807", "0.5643168", "0.5617095", "0.561675", "0.5581584", "0.556448", "0.5506992", "0.5504726", "0.54488844", "0.54241174", "0.5399001", "0.53974926", "0.53948087", "0.53923374"...
0.62943
2
Retourne true si le site est valide
isValid(){ try { fs.existsSync(this.websiteFolder) || raise(`Le site à l'adresse ${this.websiteFolder} est introuvable…`) this.url || raise("Il faut absolument l'URL du site, pour le tester en intégration.") return true } catch (e) { App.onError(e) return false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasWebsiteSettings(site){\n return websiteMap.hasOwnProperty(site);\n}", "function siteIsSupported() {\n // Check if the site is supported then set top bar\n return !!supportedSites.find(function (s) { return !!location.host.match(s.host); });\n}", "function checkUK() {\n\tp = new String(docu...
[ "0.6672669", "0.6644974", "0.6522264", "0.64420336", "0.6407991", "0.6254281", "0.62354326", "0.6170001", "0.6142926", "0.610869", "0.6107838", "0.60716015", "0.6063655", "0.6043992", "0.6024343", "0.59655446", "0.59578675", "0.59437525", "0.59244126", "0.59227073", "0.589807...
0.6769938
0
Raccourci pour communiquer avec le site
sendToSite(data){ this.interface.send(data) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Action()\n{\n\tweb.url(\n\t\t{\n\t\t\t\t\t\tname : 'www.elcorteingles.es', \n\t\t\turl : 'http://www.elcorteingles.es/', \n\t\t\ttargetFrame : '', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'text/html', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't1.inf', \n\t\t\tmode : 'HTML', \n\t\t\textraRes : [\n\t...
[ "0.5845002", "0.5839247", "0.5838444", "0.57483894", "0.57020557", "0.56649697", "0.5632061", "0.56149644", "0.56092775", "0.56059164", "0.5594947", "0.55944705", "0.558901", "0.55369335", "0.55070966", "0.5496906", "0.5468227", "0.5441253", "0.54398894", "0.543104", "0.54287...
0.532567
37
Todo, Maybe merge update and add into a single function call.
updateAttribFloat(){ if(arguments.length < 2){ console.error("Need to send at least 2 parameters to updateAttribFloat"); return false; } var name = arguments[0]; switch(arguments.length){ //Just a single float case 2: this.mGL.vertexAttrib1f(this.attribs[name],arguments[1]); return true; //Passing Two Floats case 3: this.mGL.vertexAttrib2f(this.attribs[name],arguments[1],arguments[2]); return true; //Passing 3 case 4: this.mGL.vertexAttrib3f(this.attribs[name],arguments[1],arguments[2],arguments[3]); return true; } console.error("updateAttribFloat did not handle the argument count"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {}", "update(){}", "update(){}", "update(){}", "updateToAll() {}", "async update() {}", "_update() {\n }", "function add() {}", "setUpdates (fns) {\n this._updates = fns;\n }", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() ...
[ "0.6724005", "0.6538578", "0.6538578", "0.6538578", "0.6375342", "0.62813514", "0.62404364", "0.62213385", "0.6177139", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6168173", "0.6116564", "0.61109763", "0.6106839",...
0.0
-1
TODO can be replaced by attribFAryBuf
addAttribAryBuffer(attrName,dataLen,buffer){ if(this.program == null) return false; var loc = this.mGL.getAttribLocation(this.program,attrName); //like an param array, get the index of the shader property if(loc < 0){ console.error("Unable to find attribute",attrName); return false; } this.mGL.enableVertexAttribArray(loc); //Make it usable. if(buffer){ this.mGL.bindBuffer(cgl.mGL.ARRAY_BUFFER,buffer); this.mGL.vertexAttribPointer(loc,dataLen,this.mGL.FLOAT,false,Float32Array.BYTES_PER_ELEMENT * dataLen,0); this.mGL.bindBuffer(cgl.mGL.ARRAY_BUFFER,null); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appxextraattributeshandler(x) { }", "getAttributes() {}", "bufferVertexAttributes(){\r\n super.bufferVertexAttributes();\r\n this.GLext.vertexAttribDivisorANGLE(this.attributeLocation.offset, 1);\r\n // We repeat our offset data only once (1) per instance (Each jellyfish has different offset)...
[ "0.633378", "0.61259705", "0.6096758", "0.6028291", "0.59767", "0.5968402", "0.59677553", "0.5951786", "0.58953303", "0.589007", "0.5861326", "0.5837255", "0.58359605", "0.578862", "0.5763944", "0.5750301", "0.5750301", "0.5750301", "0.5750301", "0.573941", "0.57073706", "0...
0.59115875
8
Your cursor size y
function Start() { Screen.showCursor = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cursor_box_size() { return { x: 10, y: 10 }; }", "get cursorY() {\n\t\treturn this._cursorPos[1];\n\t}", "get cursorDeltaY() {\n\t\treturn this._cursorDeltaPos[1];\n\t}", "function setCursor(el) { \n el.scrollTop = el.scrollHeight;\n }", "function getCursorYoffset(){\n\t//Get Frame width...
[ "0.75115967", "0.7333391", "0.7102372", "0.6661145", "0.6648935", "0.6425002", "0.63600737", "0.62921005", "0.62836623", "0.627935", "0.6231708", "0.62026113", "0.6195657", "0.6175679", "0.6153687", "0.61447185", "0.61264354", "0.6119207", "0.6107019", "0.6093539", "0.6087545...
0.0
-1
Function to change time block colors according to time of day
function changeColor() { currentTime = moment().hours() $(".time-block").each(function () { var timeEvent = $(this).attr("id") if (currentTime == timeEvent) { $(this).addClass("present") } else if (currentTime < timeEvent) { $(this).addClass("future") } else { $(this).addClass("past") } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTimeColor(item) {\n //Set block to past\n if (item.time < now) {\n return \"past\";\n }\n //Set block to present\n else if (item.time == now) {\n return \"present\";\n }\n //Set block to future\n else {\n return \"future\";\n }\n }", "function setColors() {\...
[ "0.7635888", "0.759264", "0.75454664", "0.75299746", "0.74851054", "0.7447753", "0.743925", "0.7425834", "0.7414484", "0.73932457", "0.7368018", "0.7366188", "0.7355206", "0.7306004", "0.72328454", "0.7210442", "0.7161798", "0.7099933", "0.70313495", "0.7030791", "0.7027066",...
0.70021737
24
On personal pages, inject plugin UI; on all other pages, do the work.
function processPage() { path = document.location.pathname; // If we're at a user page. if (path.match(/\/user\/\w+$/)) { console.log("At " + path.split("/")[2] + "'s home page."); // Do nothing to a friend. if ($('span#friend_flag > small.fade').length) return; // Do nothing to myself. if ($('a[href="/settings"]').length) return; spanString = $("h1.nameSingle span.avatarSize75")[0].outerHTML; numericalId = spanString.match(/\/(\d+|icon)\.jpg/)[1]; stringId = path.match(/\/user\/(\w+)$/)[1]; console.log("The user's numerical id is " + numericalId + "."); if (numericalId == "icon") console.log("Oh shit, that's a default icon!"); console.log("The user's string id is " + stringId + "."); buttonBox = $('h1.nameSingle > div.rr'); buttonBox.prepend('<a href="javascript:void(0)" class="chiiBtn" id="blockBtn"><span>屏蔽</span></a>'); buttonBox.prepend('<a href="javascript:void(0)" class="chiiBtn" id="unblockBtn"><span>解除屏蔽</span></a>'); friendFlag = $('span#friend_flag'); friendFlag.after('<span id="blocked_flag"><small class="fade">/ 当前被屏蔽</small></span>'); $('a#blockBtn').click(function() { blockBtnClicked(numericalId, stringId); }); $('a#unblockBtn').click(function() { unblockBtnClicked(numericalId, stringId); }); if ($.inArray(stringId, usernames) != -1) { // This user is blocked. $('a#blockBtn').css('display', 'none'); $('a#connectFrd').css('display', 'none'); } else { $('a#unblockBtn').css('display', 'none'); $('span#blocked_flag').css('display', 'none'); } } else { // It's not a user page. Start attacking! attttack(path, targets, usernames); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runPlugin(){\n\t\n\t\t//menu doesn't exist\n\t\tif(isMobile() && !menuExists()){\n\t\t\t\n\t\t\t//if user wants to combine menus, create a single <select>\n\t\t\tif(settings.combine){\n\t\t\t\tvar $menu = combineLists();\n\t\t\t\tcreateSelect($menu);\n\t\t\t}\n\t\t\t\n\t\t\t//otherwise, create a select fo...
[ "0.63145614", "0.6206636", "0.6172653", "0.61635077", "0.61602044", "0.6076108", "0.60531735", "0.6007757", "0.60014975", "0.59872556", "0.59794813", "0.5967399", "0.5943816", "0.5930321", "0.59126467", "0.59126467", "0.5911484", "0.5896139", "0.58890116", "0.58890116", "0.58...
0.0
-1
this is the function that will handle all addresses
function recursiveHandler(items, iterator, callback) { var counter = 0; function report() { counter++; if (counter === items.length) callback(); } for (var i = 0; i < items.length; i++) { iterator(items[i], report) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addresses() {\n return __awaiter(this, void 0, void 0, function* () {\n return api_1.addresses(this);\n });\n }", "getAddresses() {\n this.node.logger.silly(`Get adresses: ${this.id.addresses}`)\n return this.id.addresses\n }", "address(value) {\n return Object(address...
[ "0.6737088", "0.66924644", "0.65357316", "0.6478869", "0.64770657", "0.6422604", "0.6401402", "0.63087225", "0.629673", "0.6259517", "0.6194858", "0.6189555", "0.6163885", "0.61596066", "0.6146743", "0.6135885", "0.6107473", "0.60806334", "0.6065274", "0.60573685", "0.6031974...
0.0
-1
End SPServices.defaults Set up SOAP envelope
function SOAPEnvelope() { return { header: "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " + "xmlns:xsd='http://www.w3.org/2001/XMLSchema' " + "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body>", footer: "</soap:Body></soap:Envelope>", payload: "" } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSoapEnvelope (options) {\n\tvar xmlns;\n\n\t// set the defaults \n\toptions \t = options || {};\n\txmlns = options.xmlns || 'http://www.w3.org/2003/05/soap-envelope';\n\n\t// return an envelope object\n\treturn {\n\t\tname: 'soap:Envelope',\n\t\tattrs: {\n\t\t\t'xmlns:...
[ "0.6301461", "0.5890987", "0.5800482", "0.56425625", "0.5513299", "0.54684746", "0.52760035", "0.52726597", "0.5241356", "0.52332723", "0.5207904", "0.51964116", "0.51693666", "0.51604015", "0.49433827", "0.48207316", "0.47946647", "0.47737053", "0.47726497", "0.47440758", "0...
0.63289195
0
The SiteData operations have the same names as other Web Service operations. To make them easy to call and unique, I'm using the SiteData prefix on their names. This function replaces that name with the right name in the soapEnvelope.
function siteDataFixSOAPEnvelope(SOAPEnvelope, siteDataOperation) { var siteDataOp = siteDataOperation.substring(8); SOAPEnvelope.opheader = SOAPEnvelope.opheader.replace(siteDataOperation, siteDataOp); SOAPEnvelope.opfooter = SOAPEnvelope.opfooter.replace(siteDataOperation, siteDataOp); return SOAPEnvelope; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateWebServiceRequestData() {\r\n var header = \"\";\r\n header += \"<soapenv:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' \";\r\n header += \" xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' \";\r\n\r\n if (argumen...
[ "0.52009475", "0.49380314", "0.48353764", "0.46762687", "0.4617355", "0.45910066", "0.45658016", "0.45456755", "0.45442015", "0.44621295", "0.444951", "0.44347504", "0.4433453", "0.438075", "0.43348035", "0.43110144", "0.43056098", "0.42878824", "0.42867768", "0.42796552", "0...
0.70927954
0
End $.fn.SPFilterNode //// PRIVATE FUNCTIONS //////// Wrap an XML node (n) around a value (v)
function wrapNode(n, v) { var thisValue = typeof v !== "undefined" ? v : ""; return "<" + n + ">" + thisValue + "</" + n + ">"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodeValue() {}", "function getNode(xml,value,name,com)\n {\n if(value!=\"\"){ return xml.com(com).ele(name).txt(value).up(); }\n\n else { return xml.com(com).ele(name).up(); }\n }", "function escapeXML(value){\n return value.toString().replace(/&/g, '&amp;').replace(/</g, \"&lt;\").repl...
[ "0.5396251", "0.53785986", "0.5316047", "0.5316047", "0.52445763", "0.5226867", "0.5207691", "0.5207691", "0.51729465", "0.5164243", "0.5149329", "0.5137297", "0.5135753", "0.5038598", "0.5035719", "0.50250536", "0.5022644", "0.5011717", "0.49961904", "0.4984979", "0.49849778...
0.7144404
0
Get the filename from the full URL
function fileName(s) { return s.substring(s.lastIndexOf("/") + 1, s.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetFilename(url){\n if (url){\n var m = url.toString().match(/.*\\/(.+?)\\./);\n if (m && m.length > 1){\n return m[1];\n }\n }\n return \"\";\n}", "function getFilename(url) {\n return url.split('/').pop();\n }", "function getFileName(url) {\r\n var tmp,last;\r\n...
[ "0.83754647", "0.8353012", "0.8167954", "0.8154465", "0.8037365", "0.8010936", "0.7950196", "0.7430115", "0.73806936", "0.71335185", "0.7124062", "0.69327754", "0.69143355", "0.6899351", "0.67477906", "0.67477906", "0.67477906", "0.67477906", "0.67477906", "0.6684791", "0.667...
0.65527105
26
Taken from Escape column values
function escapeColumnValue(s) { if (typeof s === "string") { return s.replace(/&(?![a-zA-Z]{1,8};)/g, "&amp;"); } else { return s; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Column_CHAR() {}", "function quote (value, escapeChar, quotedChars) {\n let output = ''\n for (let i = 0; i < value.length; i++) {\n if (value[i] === escapeChar) {\n if (quotedChars[value[i]] || value[i] === escapeChar) {\n output += escapeChar\n output += quotedChars[value[i]] |...
[ "0.62430453", "0.5774128", "0.577345", "0.5611216", "0.5521678", "0.54386026", "0.54306686", "0.54209423", "0.54157674", "0.5403987", "0.5367161", "0.5364982", "0.5361213", "0.53582895", "0.53332675", "0.53332675", "0.53332675", "0.53332675", "0.53332675", "0.53332675", "0.53...
0.66972816
0
method used to change the state of the component
onFieldChange(event) { this.setState({ [event.target.name]: event.target.value }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onChangeState() {\n\n\n }", "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "_handleComponentChange() {\n this.setState(this._getStateFromStore());\n }", "function OnStateUpdate(self, state)\n {\n set_view(self, state)\n }", "function OnStateUpdate(self, state)\n {\n ...
[ "0.7063264", "0.6959465", "0.69377977", "0.691968", "0.691968", "0.691968", "0.6908805", "0.6852251", "0.68464136", "0.68166363", "0.6810951", "0.67783", "0.67550534", "0.67243713", "0.67157805", "0.67154026", "0.6681948", "0.66643566", "0.66640353", "0.6657982", "0.6580578",...
0.0
-1
Functions HTML: Handlebars runtime The Handlebars runtime from the local module dist directory is used to ensure the version matches that which was used to compile the templates. 'bundle' must be false in order for 'Handlebar' to be available at runtime.
function buildTemplatesRuntime() { esbuild.build({ ...commonOptions, outdir: htmlOutDir, entryPoints: ['node_modules/handlebars/dist/handlebars.runtime.js'], bundle: false, }).catch(() => process.exit(1)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handlebars(cb) {\n return exec('./node_modules/handlebars/bin/handlebars -m ./source/templates/> ./Chrome/src/templates.js',\n (err, stdout, stderr) => {\n util.log(stdout);\n util.log(stderr);\n cb(err);\n });\n}", "function handlebars(hljs) {\n var BUILT_INS = {'builtin-name': '...
[ "0.6742719", "0.61016107", "0.60682964", "0.60469204", "0.60469204", "0.60469204", "0.6036064", "0.58746034", "0.58721966", "0.58721966", "0.5858718", "0.5858718", "0.57901895", "0.57827276", "0.57494515", "0.5710431", "0.5663553", "0.565085", "0.5638899", "0.5633388", "0.562...
0.61002344
2
Docs generation (used in watch mode only)
function generateDocs(formatter) { console.log(`Building ${formatter} docs`) process.chdir('../') child_process.execSync('mix compile --force') child_process.execSync(`mix docs --formatter ${formatter}`) process.chdir('./assets/') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GenerateDocs () {\n\t\t\t\tif (!!PT._docs) return;\n\t\t\t\t// ------------------------------------------\n\t\t\t\tlet THS = this,\n\t\t\t\t\ttget = (w)=>(n)=>(w[n]),\n\t\t\t\t\ttadd = (w)=>(t)=>(w[t.unique(t.name)]=t.toDoc()),\n\t\t\t\t\tikey = ['L','O'], omit = [\n\t\t\t\t\t\t\t\t'GenerateDocs','Docs','Exa...
[ "0.75673807", "0.732304", "0.6839891", "0.652221", "0.65118015", "0.65107816", "0.6428957", "0.64036226", "0.6398027", "0.6387549", "0.63787276", "0.6364653", "0.6305427", "0.6243984", "0.62378097", "0.62095076", "0.619273", "0.61427325", "0.6135054", "0.60985607", "0.6089989...
0.68582666
2
name: drawGraphic DESCRIPTION:Main drawing function to draw to DOM initial scarter plot view. CALLED FROM:Pym in CALLS: REQUIRES: n/a RETURNS: n/a
function drawGraphic() { var w = window.innerWidth; var h = window.innerHeight; // clear out existing graphics and footer graphic.empty(); deadspace.empty(); footer.empty(); var requiredResolution = 'thunderbolt'; /* graphSpace = { width:screenResolution[requiredResolution].width , height:screenResolution[requiredResolution].height*ratios.topRatio } deadSpace= { width:screenResolution[requiredResolution].width , height:screenResolution[requiredResolution].height*ratios.bottomRatio } */ /* graphSpace = { width:screenResolution[requiredResolution].width , height:screenResolution[requiredResolution].height*0.75 } deadSpace= { width:screenResolution[requiredResolution].width , height:screenResolution[requiredResolution].height*0.0 } */ var aspectRatio = [ 16, 9 ]; graphSpace = { width : graphic.width() , height : Math.ceil(((graphic.width() - margin.top.left - margin.top.right) * aspectRatio[1]) / aspectRatio[0]) - margin.top.top - margin.top.bottom } deadSpace= { width:graphic.width() , height:0.0 } /* TOP BAR CHART */ d3.select("#graphic").append("h1").attr("id" , "viewCounter").style("text-align" , "center").text(titles[viewCounter]); svg = d3.select("#graphic") .append("svg") .attr("class" , "svg") .attr("id" , "svg") .attr("width" , graphSpace.width ) .attr("height" , graphSpace.height*ratios.topRatio ) .attr("x" , 0 ) .attr("y" , 0 ); // define and construct y axis domain and ranges vis.yTop = d3.scale.linear().domain([yAxisRanges.top.minimum , yAxisRanges.top.maximum]).range([ ((graphSpace.height*ratios.topRatio)-margin.top.top-margin.top.bottom) , margin.top.top ]); vis.yAxisTop = d3.svg.axis().scale(vis.yTop).orient("left").ticks(10).tickFormat(d3.format(",.1f")); d3.select("#svg") .append("g") .attr("class", "y axis") .attr("id", "topYAxis") .attr("transform", "translate(" + margin.top.left + "," + margin.top.top + ")") .call(vis.yAxisTop); vis.yticksTop = svg.selectAll('#topYAxis').selectAll('.tick'); vis.yticksTop.append('svg:line') .attr( 'id' , "yAxisTicksTop" ) .attr( 'y0' , 0 ) .attr( 'y1' , 0 ) .attr( 'x1' , 0 ) .attr( 'x2', graphSpace.width-margin.bottom.left*2) .style("opacity" , 0.05); // define and construct y axis domain and ranges vis.xTop = d3.time.scale().range([margin.top.left, (graphSpace.width - margin.top.left/* - margin.top.right*/)]); vis.xTop.domain(d3.extent(view2, function(d) { return d.formattedDate; })); vis.xAxisTop = d3.svg.axis().scale(vis.xTop).orient("bottom"); vis.xAxisTop = d3.svg.axis() .scale(vis.xTop) .orient("bottom") .tickFormat(function(d,i) { var fmt = d3.time.format("%I%p"); str = fmt(d); return (str.toString())[0] == '0' ? str = str.slice(1,str.length) : str = str.slice(0,str.length); }) .tickPadding(5); d3.select("#svg") .append("text") .attr( "class" , "yAxisLabels") .attr( "id" , function(d,i){ return "yAxisLabel"; }) .attr("x" , margin.top.left) .attr("y" , 25) .style("font-size" , "1.0em") .style("fill" , "white") .text("Sentiment"); var dots = svg.selectAll(".dots1") .data(View1_dots['sentiment']) .enter() .append("circle"); var circleAttributes = dots .attr("class", function (d,i) { var classStr = "dots1 index-" + d.index; if ( d.color_1 != 0 ) { classStr = classStr + " view0"; } if ( d.color_2 != 0 ) { classStr = classStr + " view1"; } if ( d.index == 33 ) { classStr = classStr + " mainTweet pulse"; } if ( d.color_3 != 0 ) { classStr = classStr + " view2"; } if ( d.color_4 != 0 ) { classStr = classStr + " view3"; } return classStr; }) .attr("id", function (d,i) { return "dot1-" + d.index; }) .attr("cx", function (d,i) { return vis.xTop(d.formattedDate); }) .attr("cy", function (d,i) { return margin.top.top+vis.yTop(d.sentiment); }) .attr("r", function (d,i) { return 5/*circleScale(d.markersize_1)*/; }) .style("opacity", function(d,i) { return 1.0; }) .style("fill" , function(d,i){ return colors[d.color_1]; }) .style("stroke" , function(d,i){ if ( d.index == 33 ) { return "#FFFFFF"; } else { return colors[d.color_1]; } }) .style("stroke-width" , "2px") .style("fill-opacity" , 0.50); //create x axis d3.select("#svg") .append('g') .attr('class', 'x axis') .attr('id', 'topXAxis') .attr('transform', function(d, i){ return "translate(" + (0) + "," + (margin.top.top + vis.yTop(0)) + ")"; }) .call(vis.xAxisTop); /* BOTTOM BAR CHART */ svgBottom = d3.select("#graphic") .append("svg") .attr("class" , "svg") .attr("id" , "svgBottom") .attr("width" , graphSpace.width ) .attr("height" , graphSpace.height*ratios.bottomRatio ) .attr("x" , 0 ) .attr("y" , 0 ); vis.xBottom = d3.time.scale().range([margin.top.left, (graphSpace.width - margin.top.left/* - margin.top.right*/)]); vis.xBottom.domain(d3.extent(view1, function(d) { return d.formattedDate; })); vis.xAxisBottom = d3.svg.axis().scale(vis.xBottom).orient("bottom"); // define and construct y axis domain and ranges vis.yBottom = d3.scale.linear().domain([yAxisRanges.bottom.minimum , yAxisRanges.bottom.maximum]).range([ ((graphSpace.height*ratios.bottomRatio)-margin.bottom.top-margin.bottom.bottom) , margin.bottom.top ]); vis.yAxisBottom = d3.svg.axis().scale(vis.yBottom).orient("left").ticks(10).tickFormat(d3.format(",.0f")); var dots = svgBottom.selectAll(".dots2") .data(View2_dots['number_articles_per_minute']) .enter() .append("circle"); var circleAttributes = dots .attr("class", function (d,i) { return "dots2 index"; }) .attr("id", function (d,i) { return "dot2-" + d.index; }) .attr("cx", function (d,i) { return vis.xBottom(d.formattedDate); }) .attr("cy", function (d,i) { return vis.yBottom(d.number_articles_per_minute); }) .attr("r", function (d,i) { return 1; }) .style("opacity", function(d,i) { return 1.0; }) .style("fill" , "#00497F") .style("stroke" , "#00497F") .style("stroke-width" , "1px") .style("fill-opacity" , 1.00); // define clipPath around scatter plot frame svgBottom.append("defs").append("clipPath") .attr("id", "clip") .append("rect") .attr("width", graphSpace.width ) .attr("height", graphSpace.height*ratios.bottomRatio - margin.bottom.top - margin.bottom.bottom ) .attr("transform" , "translate(" + margin.bottom.left + "," + 0 + ")"); var line = d3.svg.line() .x(function(d) { return vis.xBottom(d.formattedDate); }) .y(function(d) { return vis.yBottom(+d.number_articles_per_minute); }) var area = d3.svg.area() .x(function(d) { return vis.xBottom(d.formattedDate); }) .y0(graphSpace.height*ratios.bottomRatio) .y1(function(d) { return vis.yBottom(+d.number_articles_per_minute);; }); svgBottom.append("path") .datum(view2) .attr("class", "line") .attr("id", "line") .style("fill" , "#none") .style("stroke" , "#005DA2") .style("stroke-width" , "2px") .style("fill-opacity" , 0.5) .attr("clip-path", "url(#clip)") .attr("d", line); svgBottom.append("path") .datum(view2) .attr("class", "area") .attr("id", "area") .style("fill" , "#005DA2") .style("stroke" , "#005DA2") .style("stroke-width" , "2px") .style("fill-opacity" , 0.5) .attr("clip-path", "url(#clip)") .attr("d", area); /* svgBottom.append("linearGradient") .attr("id", "temperature-gradient") .attr("gradientUnits", "userSpaceOnUse") .attr("x1", 0) .attr("y1", vis.yBottom(0) ) .attr("x2", 900) .attr("y2", vis.yBottom(4) ) .selectAll("stop") .data([ {offset: "0%", color: "steelblue"}, {offset: "50%", color: "gray"}, {offset: "100%", color: "red"} ]) .enter().append("stop") .attr("offset", function(d) { return d.offset; }) .attr("stop-color", function(d) { return d.color; }); */ d3.select("#svgBottom") .append("g") .attr("class", "y axis") .attr("id", "bottomYAxis") .attr("transform", "translate(" + margin.bottom.left + "," + (0) + ")") .call(vis.yAxisBottom); d3.select("#svgBottom") .append("text") .attr( "class" , "yAxisLabels") .attr( "id" , function(d,i){ return "yAxisLabel"; }) .attr("x" , margin.bottom.left) .attr("y" , 20) .style("font-size" , "1.0em") .style("fill" , "white") .text("Number of tweets per minute"); vis.yticksBottom = svgBottom.selectAll('#bottomYAxis').selectAll('.tick'); vis.yticksBottom.append('svg:line') .attr( 'id' , "yAxisTicksBottom" ) .attr( 'y0' , 0 ) .attr( 'y1' , 0 ) .attr( 'x1' , 0 ) .attr( 'x2', graphSpace.width-margin.bottom.left*2) .style("opacity" , 0.05); vis.xAxisBottom = d3.svg.axis() .scale(vis.xBottom) .orient("bottom") .tickFormat(function(d,i) { var fmt = d3.time.format("%I%p"); str = fmt(d); return (str.toString())[0] == '0' ? str = str.slice(1,str.length) : str = str.slice(0,str.length); }) .tickPadding(5); //create brush x axis d3.select("#svgBottom") .append('g') .attr('class', 'x axis') .attr('id', 'bottomXAxis') .attr('transform', function(d, i){ return "translate(" + (0) + "," + ( + vis.yBottom(0)) + ")"; }) .call(vis.xAxisBottom); svgDeadSpace = d3.select("#deadspace") .append("svg") .attr("class" , "svg") .attr("id" , "svgDeadSpace") .attr("width" , deadSpace.width ) .attr("height" , deadSpace.height ) .attr("x" , 0 ) .attr("y" , 0 ); d3.select("#footer") .append("a") .attr("href", "http://innovation.thomsonreuters.com/en/labs.html") .attr("target" , "_blank") .html("</br>Data visualisation by Thomson Reuters Labs"); drawLegend(); if ( auto == true ){ myInterval = setInterval(function () { transitionData(); viewCounter++; if ( viewCounter === 4 ) { clearInterval(myInterval); } }, 6000); } //use pym to calculate chart dimensions if (pymChild) { pymChild.sendHeight(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doInitialization() {\n\t\tvar svg = \"\";\n\n\t\tif (typeof theSvgElement === \"undefined\") {\n\t\t\t// Add event to body: each time a key is hit -> launch function 'doUpdate'\n\t\t\tdocument.body.addEventListener(\"keyup\", doUpdate, false);\n\n\t\t\t// Open new window for drawing\n\t\t\tvar myWindow = ...
[ "0.66603285", "0.6604996", "0.6550923", "0.6484517", "0.64447147", "0.6406745", "0.6390901", "0.6367884", "0.63138676", "0.6283113", "0.6163386", "0.61332345", "0.6093935", "0.6058411", "0.6057095", "0.6033338", "0.6028048", "0.6006771", "0.59900874", "0.59829247", "0.5970223...
0.7016864
0
end function drawGraphic() / NAME: buildUI DESCRIPTION: function to build intitial UI interface. CALLED FROM:Modernizr.inlinesvg CALLS:n/a REQUIRES: n/a RETURNS: n/a
function buildUI(){ return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeUI(svg){\r\n //the black background\r\n var UIBG = svg.selectAll(\"rect.UIBG\")\r\n .data([7])\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"ui\")\r\n .attr(\"x\", 0)\r\n .attr(\"y\", function(d){if(UItop){\r\n return ...
[ "0.69417053", "0.63422674", "0.6265335", "0.6251061", "0.6199879", "0.61776257", "0.60995865", "0.6023423", "0.5981638", "0.5955341", "0.5945328", "0.5922914", "0.59201884", "0.58503807", "0.58107233", "0.57875615", "0.57727045", "0.57727045", "0.57727045", "0.576655", "0.573...
0.62701464
2
end function buildUI() / NAME: transitionData DESCRIPTION: CALLED FROM: CALLS: REQUIRES: n/a RETURNS: n/a
function transitionData() { var index = 0; d3.select("#viewCounter").text(titles[viewCounter]); if ( viewCounter == 0 ) { // opening page ... } else if ( viewCounter == 1 ) { d3.selectAll(".dots1") .transition() .duration(2500) .attr("r", function (d,i) { return circleScale(+d.markersize_2); }) .style("fill" , function(d,i){ return colors[d.color_2]; }) .style("stroke" , function(d,i){ if ( d.color_2 == 0 ) { return "none"; } else if ( d.color_2 == 1 ) { return colors[d.color_2]; } else if ( d.color_2 == 2 ) { return "white"; } }) .style("stroke-width" , function(d,i){ if ( d.color_2 == 0 ){ return "0px"; } else { return "2px"; } }) .style("fill-opacity" , function(d,i){ if ( d.color_2 == 0 ){ return 0.25; } else { return 0.75; } }); var sel = d3.selectAll(".dots1.view1"); sel.moveToFront(); var sel = d3.selectAll(".mainTweet"); sel.moveToFront(); }// end else if ... else if ( viewCounter == 2 ) { d3.selectAll(".dots1") .transition() .duration(2500) .attr("r", function (d,i) { return circleScale(+d.markersize_3); }) .style("fill" , function(d,i){ return colors[d.color_3]; }) .style("stroke" , function(d,i){ if ( d.index == 33 ) { return "#FFFFFF"; } else if ( calloutIndexes[2].indexOf(+d.index) != -1 ) { return "#FFFFFF"; } else { return colors[d.color_3]; } }) .style("stroke-width" , function(d,i){ if ( d.color_3 == 0 ){ return "0px"; } else { return "2px"; } }) .style("fill-opacity" , function(d,i){ if ( d.color_3 == 0 ){ return 0.25; } else { return 0.75; } }); var sel = d3.selectAll(".dots1.view2"); sel.moveToFront(); var sel = d3.selectAll(".mainTweet"); sel.moveToFront(); }// end else if ... else if ( viewCounter == 3 ) { d3.selectAll(".dots1") .transition() .duration(2500) .attr("r", function (d,i) { return circleScale(+d.markersize_4); }) .style("fill" , function(d,i){ return colors[d.color_4]; }) .style("stroke" , function(d,i){ if ( d.index == 33 ) { return "#FFFFFF"; } else if ( calloutIndexes[3].indexOf(+d.index) != -1 ) { return "#FFFFFF"; } else { return colors[d.color_4]; } }) .style("stroke-width" , function(d,i){ if ( d.color_4 == 0 ){ return "0px"; } else { return "2px"; } }) .style("fill-opacity" , function(d,i){ if ( d.color_4 == 0 ){ return 0.25; } else { return 0.75; } }); var sel = d3.selectAll(".dots1.view3"); sel.moveToFront(); var sel = d3.selectAll(".mainTweet"); sel.moveToFront(); } // end else if ... drawLegend(); return; }// end transitionData()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildUI(){\t\n\t\t\n\t\treturn;\n\t\t\n\t}", "function Transitions()\n{ \n log.debug(\"browser version \" + window.opera.version());\n \n if (window.opera)\n {\n if (window.opera.version() >= 12.10)\n {\n log.debug(\"GUI Browser version verified. Continuing with sta...
[ "0.66184807", "0.64217645", "0.6286766", "0.6110449", "0.5869184", "0.5864858", "0.58593357", "0.58593357", "0.58593357", "0.5857861", "0.5857861", "0.5810919", "0.56951934", "0.5679197", "0.5659293", "0.56490517", "0.5578986", "0.5572931", "0.5568432", "0.55626637", "0.55246...
0.5523078
21
$.index.open(); $.downloadWin.getView().currentTab = $.index.activeTab;
function loadLoginWindow() { if (OS_IOS) { var loginWindow = Alloy.createController("LoginWindow").getView(); loginWindow.open(); } else { var federetionListWindow = Alloy.createController("federationList").getView(); federetionListWindow.fullscreen = false; federetionListWindow.open(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openIndex(){\n\tchrome.tabs.create({active:true, url:window.SERVER_URL+window.DASHBOARD_URL})\n}", "openRequestInTab() {\n let win = Services.wm.getMostRecentWindow();\n win.openUILinkIn(this.selectedRequest.url, \"tab\", { relatedToCurrent: true });\n }", "function verMemo2(nroMemo, nameArchiv...
[ "0.66019243", "0.61715317", "0.61012405", "0.6098455", "0.60926825", "0.6049338", "0.60406774", "0.601959", "0.5976806", "0.597321", "0.597321", "0.59570915", "0.59570915", "0.59470624", "0.59253913", "0.5919092", "0.5917125", "0.5889232", "0.5886125", "0.58712083", "0.585989...
0.0
-1
return a jQuery object with draggable or resizable in progress, or empty jQuery object otherwise
function getWindowWithInteraction() { var $windowDragging = $( "." + self.classes.window + "." + self.classes.uiDraggableDragging ), $windowResizing = $( "." + self.classes.window + "." + self.classes.uiResizableResizing ), windowInstance; if ( $windowDragging.length || $windowResizing.length ) { var $elem = ( $windowDragging.length ? $windowDragging : $windowResizing ) .children( "." + self.classes.windowContent ); if ( $elem.is( self.windows() ) ) { return $elem; } } return $(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeAndDragHandler(imgDiv, newCreated, handleElem) {\n \n //image yeni upload edildi ise\n if (newCreated) {\n \n console.log(\"resizeAndDragHandler --> new object called\");\n \n ...
[ "0.59885365", "0.57002515", "0.5664395", "0.5659391", "0.5621182", "0.55429876", "0.5514386", "0.54873", "0.5484228", "0.5480086", "0.5449908", "0.5439512", "0.53840494", "0.53407943", "0.53382784", "0.53258574", "0.531579", "0.52560216", "0.5243764", "0.5238034", "0.5220346"...
0.49353403
52
global window, document, isNumber Alignment.js Alignment Class Version 0.1
function Alignment(obj){ this.vertical = ('vertical' in obj) ? obj.vertical : 'top'; // top || center || bottom this.horizontal = ('horizontal' in obj) ? obj.horizontal : 'left'; // left || center || right this.registration = ('registration' in obj) ? obj.registration : 'inside'; // inside || fixed || outside. If target = window != outside this.registration_x = 0; this.registration_y = 0; if('registration_x' in obj || 'registration_y' in obj){ this.registration = 'fixed'; this.registration_x = ('registration_x' in obj) ? obj.registration_x : 0; this.registration_y = ('registration_y' in obj) ? obj.registration_y : 0; } this.target = ('target' in obj) ? obj.target : document; //target or element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set alignment(value) {}", "get alignment() {}", "set align(pAlign) {\n\t\tthis.__Internal__Dont__Modify__.align = Validate.type(pAlign, \"number\", 0, true);\n\t}", "getAlignment(center, num, width, gap, index) {\n\t\treturn center + width*(index+1-(num+1)/2) + gap*(index-(num-1)/2)\n\t}", "get align() {\n...
[ "0.63088346", "0.6285923", "0.5961286", "0.5934321", "0.5775267", "0.5692866", "0.56608737", "0.5657694", "0.5633777", "0.56302625", "0.5557158", "0.5535133", "0.5488002", "0.54568034", "0.5447444", "0.54403853", "0.54403853", "0.5439028", "0.5436419", "0.5400556", "0.5396932...
0.63280135
0
refresh page every day (at 00:00) set date in header
function writeCurrentDate() { //upisivanje u header let headerDate = document.querySelector("#headerDate"); todayDate = new Date(); yesterdayDate = new Date(Date.now() - 86400000); let weekday = todayDate.toLocaleDateString(undefined, { weekday: "long" }); //undefined bi trebalo dati system default let day = todayDate.getDate(); let month = todayDate.toLocaleDateString(undefined, { month: "long" }); headerDate.innerHTML = weekday + ", " + day + " " + month; //zakazanje sljedeceg "refresha" let dateInSec = todayDate.getHours() * 3600 + todayDate.getMinutes() * 60 + todayDate.getSeconds(); let remainingTime = 86400 - dateInSec; //86400 console.log(remainingTime); setTimeout(() => { writeCurrentDate(); }, remainingTime * 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshPage() {\n // we're on the scheduled page and there is a scheduled date (ie not cancellation)\n // and calendar view is active and the scheduledDateTime is not on the calendar\n // force calendar to go to the new scheduled date\n if ($('.scheduled-page').length > 0 && sc...
[ "0.6835971", "0.6739318", "0.65262234", "0.64610285", "0.64463973", "0.6400676", "0.6278655", "0.6266924", "0.62640953", "0.6082614", "0.6077523", "0.60462475", "0.5999736", "0.59835416", "0.59806734", "0.5964779", "0.5960622", "0.595833", "0.5949389", "0.59417015", "0.594170...
0.6832804
1
Set temp in header
function getGeolocation() { navigator.geolocation.getCurrentPosition(async function (position) { let lat = await position.coords.latitude; let long = await position.coords.longitude; getWeather(lat, long); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set Header(value) {\n this._header = value;\n }", "set header(value) {\n this._header = value;\n }", "set hdr(value) {}", "header(name, info) {\n this.headingName.setContent(name)\n this.headingInfo.setContent(info)\n }", "function setHeader() {\n metaService.s...
[ "0.6593625", "0.65436935", "0.6528132", "0.63442546", "0.6224626", "0.6203944", "0.6202853", "0.6135463", "0.6102696", "0.60783356", "0.6065304", "0.6052307", "0.6000566", "0.59989446", "0.59633803", "0.59437317", "0.5919731", "0.5880347", "0.5880347", "0.58555245", "0.583405...
0.0
-1
Mijenja vidljivost footer elemenata i fokusira input
function footerVisibilitySwitch(footerSelection, editCircle) { const inputBox = document.querySelector("#taskInput"); //provjerava se dali se dodaje novi task ili edita stari: //ako se dodaje novi task: if (footerSelection == "add") { inputBox.style.display = "initial"; document.querySelector(".newTaskBtn").style.display = "none"; document.querySelector(".editTaskBtn").style.display = "none"; document.querySelector(".cancelDateBtn").style.display = "none"; document.querySelector(".addTaskBtn").style.display = "initial"; } //ako se edita stari task: else if (footerSelection == "edit") { let task = editCircle.parentNode.parentNode; let taskContent = task.querySelector(".taskText").innerHTML; currentlySelectedTask = task; inputBox.value = taskContent; inputBox.style.display = "initial"; document.querySelector(".newTaskBtn").style.display = "none"; document.querySelector(".addTaskBtn").style.display = "none"; document.querySelector(".cancelDateBtn").style.display = "none"; document.querySelector(".editTaskBtn").style.display = "initial"; expandRightButton(task.querySelector(".optionsCircle")); } //ako se gasi kalendar else if (footerSelection == "dateCancel") { inputBox.style.display = "none"; document.querySelector(".newTaskBtn").style.display = "none"; document.querySelector(".addTaskBtn").style.display = "none"; document.querySelector(".editTaskBtn").style.display = "none"; document.querySelector(".cancelDateBtn").style.display = "initial"; } //samo new task btn else if (footerSelection == "default") { inputBox.style.display = "none"; document.querySelector(".newTaskBtn").style.display = "initial"; document.querySelector(".editTaskBtn").style.display = "none"; document.querySelector(".cancelDateBtn").style.display = "none"; document.querySelector(".addTaskBtn").style.display = "none"; setVisibilityOfTask(); } //fokusira se na input inputBox.focus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function footer() {\n //eliminando las clases para tener la medida correcta total\n $(\"footer\").removeClass(\"uno\"); \n $(\"footer\").removeClass(\"dos\");\n let elem = $(\"body\").find(\"div\").first().height();//medida de todo el html\n let windowh = window.innerHeight; //me...
[ "0.63845426", "0.61646295", "0.61518306", "0.5976209", "0.5903061", "0.5901719", "0.5802323", "0.57871103", "0.5756228", "0.57391715", "0.57242256", "0.5693151", "0.5643612", "0.56404746", "0.5633108", "0.56316984", "0.56262773", "0.55980843", "0.55966777", "0.55854785", "0.5...
0.5120818
69
Funkcija za dodavanje novog taska (kreiranje li i ubacivanje u html):
function addNewTask() { let textInput = document.querySelector("#taskInput"); let allTasksFromMemory = JSON.parse(localStorage.getItem("tasks")); if (textInput.value == "") { return; } // dio za kreiranje novog taska: let newLi = document.createElement("li"); let textNode = document.createTextNode(""); newLi.appendChild(textNode); newLi.classList.add("task", "unfinished"); //dole je novo newLi.innerHTML = '<img class="emptyCircle" src="SVG/empty-circle.svg" onclick="completeTask(this)"/><img class="tickedCircle" src="SVG/ticked-circle.svg"/><div class="textPartofTask"><p class="taskText">' + textInput.value + '</p><p class="taskDate"></p></div><div class="right-task-buttons"><img src="SVG/edit-circle.svg" class="right-hidden-button editCircle" onclick="footerVisibilitySwitch(\'edit\',this)"/><img src="SVG/thrash-circle.svg" class="right-hidden-button thrashCircle" onclick="deleteTask(this)"/><img src="SVG/date-circle.svg" class="right-hidden-button dateCircle" onclick="showCalendar(this)"/><img src="SVG/options-circle.svg" class="optionsCircle" onclick="expandRightButton(this)"/></div>'; newLi.setAttribute("id", taskCounter); document.querySelector(".allTasksUl").appendChild(newLi); let attrib; if (allTasksFromMemory) { attrib = { id: taskCounter, taskText: textInput.value, state: "unfinished", }; } else { attrib = [ { id: taskCounter, taskText: textInput.value, state: "unfinished", }, ]; } if (allTasksFromMemory) { allTasksFromMemory.push(attrib); localStorage.setItem("tasks", JSON.stringify(allTasksFromMemory)); } else { localStorage.setItem("tasks", JSON.stringify(attrib)); } //skrivanje footera i clear-anje input forme taskCounter++; localStorage.setItem("taskCounter", taskCounter); textInput.value = ""; footerVisibilitySwitch("default"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createHTMLtask() {\n const htmlstring = '<div class=\"task\" draggable=\"true\" id=\"' + this.id + '\" ondragstart=\"drag(event)\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\">' +\n '<big><strong>' + this.name + \" \" + '</strong></big>' +\n this.date.replace('T', ' ').substr...
[ "0.6686512", "0.63873947", "0.6322338", "0.6315041", "0.63023174", "0.6271007", "0.62680006", "0.6259205", "0.62539315", "0.6195803", "0.61935407", "0.61879396", "0.61786425", "0.6169272", "0.61657345", "0.61517394", "0.61393476", "0.61348814", "0.61284816", "0.610974", "0.61...
0.5889722
57
Funkcija za skrivanje i prikazivanje taskova ovisno koji tab je aktivan
function setVisibilityOfTask() { let finishedTasks = document.querySelectorAll(".finished"); let unfinishedTasks = document.querySelectorAll(".unfinished"); //ako smo na unfinished tabu: prikazi unfinished i sakri finished if (document.querySelector("#unfinishedTab").classList.contains("active")) { unfinishedTasks.forEach((element) => { element.style.display = "flex"; }); finishedTasks.forEach((element) => { element.style.opacity = "0"; element.style.display = "none"; }); document.querySelector(".newTaskBtn").style.display = "initial"; } //ako smo na finished tabu: prikazi finished i sakri unfinished else { unfinishedTasks.forEach((element) => { element.style.opacity = "0"; element.style.display = "none"; }); finishedTasks.forEach((element) => { console.log(element); element.querySelector(".emptyCircle").style.opacity = "0"; element.querySelector(".tickedCircle").style.opacity = "1"; element.querySelector(".taskText").style.textDecoration = "line-through"; element.style.display = "flex"; }); document.querySelector(".newTaskBtn").style.display = "none"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showList() {\n \n if (!!tabLista.length) {\n getLastTaskId();\n for (var item in tabLista) {\n var task = tabLista[item];\n //addTaskToList(task);\n }\n syncEvents();\n }\n \n }", "function switchTab(tab) {\r\n const finishTabs = document...
[ "0.69881564", "0.67224824", "0.6585687", "0.6341676", "0.62941897", "0.62839085", "0.6246538", "0.6202857", "0.61839086", "0.6181053", "0.61791885", "0.6157046", "0.61475223", "0.6125629", "0.60913604", "0.6054212", "0.6036174", "0.6006565", "0.5955201", "0.5942724", "0.59375...
0.6311441
4
Funkcija koja switcha finished/unfinished tab
function switchTab(tab) { const finishTabs = document.querySelectorAll(".finishDiv p"); const allTasks = document.querySelector(".allTasksUl"); //provjerava koji gumb je stisnut (dali je stisnut vec aktivan) i postavlja odgovoran tab u .active if (tab.classList.contains("active")) { return; } else { finishTabs.forEach((element) => { element.classList.toggle("active"); }); } setVisibilityOfTask(); //skriva odgovarajuce taskove animateTabSwitch(tab.id); //animira switchanje taba }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSwitchTab()\n\t{\n\t\tvar idx = jQuery(this).index();\n\t\t_preferences.tab = parseInt(idx, 10);\n\n\t\tClient.loadFile(DB.INTERFACE_PATH + 'basic_interface/tab_itm_0'+ (idx+1) +'.bmp', function(data){\n\t\t\tCashShop.ui.find('.tabs').css('backgroundImage', 'url(' + data + ')');\n\t\t\t//reques...
[ "0.665012", "0.65898675", "0.6518596", "0.64349174", "0.6392403", "0.6386014", "0.6385237", "0.6369289", "0.6356762", "0.6328874", "0.6327466", "0.63023645", "0.63018066", "0.62666446", "0.6265744", "0.6231329", "0.62206507", "0.62161493", "0.6184817", "0.6179875", "0.6160604...
0.7264688
0
funkcija koja animira switchanje taba ovisno na koji tab se prelazi
function animateTabSwitch(activeTab) { let finishedTasks = document.querySelectorAll(".finished"); let unfinishedTasks = document.querySelectorAll(".unfinished"); //ako se prebacujemo na finished tab ova animacija se radi: if (activeTab == "finishedTab") { for (let i = 0; i < finishedTasks.length; i++) { //finishedTasks[i].style.opacity = "0"; finishedTasks[i].style.animation = `200ms LeftToRightFadeIn ${ i * 200 }ms ease-in forwards`; //nakon sto prode animacija ulaza vraca opacity u 1 jer inace kada unDo-amo task onda krene od opacity 0 pa skoci na 1 setTimeout(() => { finishedTasks[i].style.opacity = "1"; }, i * 200); } } //ako se prebacujemo na unfiinshed tab ova animacija se radi: else { for (let i = 0; i < unfinishedTasks.length; i++) { unfinishedTasks[i].style.opacity = "0"; unfinishedTasks[i].style.animation = `200ms RightToLeftFadeIn ${ i * 200 }ms ease-in forwards`; //nakon sto prode animacija ulaza vraca opacity u 1 jer inace kada unDo-amo task onda krene od opacity 0 pa skoci na 1 setTimeout(() => { unfinishedTasks[i].style.opacity = "1"; }, i * 200); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchTab(tab) {\r\n const finishTabs = document.querySelectorAll(\".finishDiv p\");\r\n const allTasks = document.querySelector(\".allTasksUl\");\r\n\r\n //provjerava koji gumb je stisnut (dali je stisnut vec aktivan) i postavlja odgovoran tab u .active\r\n if (tab.classList.contains(\"active\")) {\r...
[ "0.7429974", "0.723", "0.7128494", "0.7047527", "0.69383025", "0.68805933", "0.68654233", "0.68352234", "0.68112916", "0.67872643", "0.67708427", "0.6767779", "0.67391014", "0.6712397", "0.6700245", "0.66992044", "0.6682223", "0.66623163", "0.6653915", "0.6647224", "0.6639306...
0.6762017
12
funkcija expanda moreoptions gumb:
function expandRightButton(optionsBtn) { let rightButtonsDiv = optionsBtn.parentNode; let allHidenBtns = rightButtonsDiv.querySelectorAll(".right-hidden-button"); let thrashBtn = rightButtonsDiv.querySelector(".thrashCircle"); let editBtn = rightButtonsDiv.querySelector(".editCircle"); let dateBtn = rightButtonsDiv.querySelector(".dateCircle"); //ako gumbi nisu expandani if (thrashBtn.style.zIndex != 1) { allHidenBtns.forEach((element) => { element.style.zIndex = "1"; element.style.opacity = "1"; }); optionsBtn.style.transform = "translateX(32px)"; thrashBtn.style.transform = "translateY(-28px)"; editBtn.style.transform = "translateX(-32px)"; dateBtn.style.transform = " translateY(28px)"; } //ako su gumbi vec expandani onda ih smanji else { allHidenBtns.forEach((element) => { element.style.opacity = "0"; element.style.transform = "translate(0)"; setTimeout(() => { element.style.zIndex = "-1"; }, 200); }); optionsBtn.style.transform = "translateX(0px)"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function includeMoreOption(k, link) {\n var temp, prodId, newProdList, moreOptionEnabled;\n temp = link.id.split('_');\n prodId = temp[1];\n newProdList = true;\n if (typeof(jsonPartNumbers) !== \"undefined\" && jsonPartNumbers !== null && jsonPartNumbers.length !== 0) {\n moreOptionEnabled = t...
[ "0.6336546", "0.6048116", "0.5949176", "0.5949176", "0.59362286", "0.59362286", "0.5925001", "0.5894988", "0.58020747", "0.578447", "0.57792145", "0.57630527", "0.573515", "0.5682701", "0.5631441", "0.5569092", "0.5528764", "0.55223846", "0.552082", "0.5503931", "0.5491012", ...
0.0
-1
globalna varijabla kako bi se mogao editati task (da mozemo promjeniti na odredenom tasku text)
function submitEditTask() { let textInput = document.querySelector("#taskInput"); if (textInput.value == "") { return; } let allTasksFromMemory = JSON.parse(localStorage.getItem("tasks")); for (let i = 0; i < allTasksFromMemory.length; i++) { if (allTasksFromMemory[i].id == currentlySelectedTask.id) { allTasksFromMemory[i].taskText = textInput.value; } } localStorage.setItem("tasks", JSON.stringify(allTasksFromMemory)); currentlySelectedTask.querySelector(".taskText").innerHTML = textInput.value; textInput.value = ""; footerVisibilitySwitch("default"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateText() {\n new_task = task.value;\n console.log(new_task);\n}", "function editTask(event){\n\n //gets button id\n let id = event.target.id;\n idGlobal = id;\n\n //gets task position from button id\n let taskPosition = id.replace(/\\D/g,'');\n\n document.getElementById(\"edit-bo...
[ "0.75434273", "0.7098584", "0.68495905", "0.6800498", "0.67430454", "0.6733192", "0.6732261", "0.6680331", "0.665591", "0.6644775", "0.66175187", "0.6565526", "0.65170646", "0.6515065", "0.64917684", "0.64861465", "0.6475423", "0.64090383", "0.6382502", "0.63799834", "0.63012...
0.67175233
7
Loop class used for updating objects on a framebyframe. Synchronizes the `update` method invocations to the refresh rate of the screen. Does not normalize the high resolution timestamp when being consecutively started and stopped.
function ContainerLoop() { this._updates = []; this._stoppedAt = now(); this._sleep = 0; this.start(); var _this = this; window.addEventListener('message', function(ev) { _this._onWindowMessage(ev); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLoop(){\n\t\t\t\t\tvar time = this.update();\n\n\t\t\t\t\t// set timer for next update\n\t\t\t\t\tthis.updateTimer = setTimeout(updateLoop.bind(this), 1000 - time.getMilliseconds());\n\t\t\t\t}", "loop() {\n if (document.hidden) { this.running = false }\n\n let now = Date.now(),\n ...
[ "0.7619545", "0.7580692", "0.75065607", "0.74287397", "0.74005985", "0.73214036", "0.7155023", "0.7137998", "0.7127618", "0.71267825", "0.7120625", "0.71187073", "0.7107115", "0.709329", "0.70322055", "0.70304006", "0.70035076", "0.6974383", "0.696919", "0.69480383", "0.69394...
0.64107615
81
which will contain only two elements, both of which will represent an array of positive integers. For example: if strArr is ["[1, 2, 5, 6]", "[5, 2, 8, 11]"], then both elements in the input represent two integer arrays, and your goal for this challenge is to add the elements in corresponding locations from both arrays. For the example input, your program should do the following additions: [(1 + 5), (2 + 2), (5 + 8), (6 + 11)] which then equals [6, 4, 13, 17]. Your program should finally return this resulting array in a string format with each element separated by a hyphen: 641317. If the two arrays do not have the same amount of elements, then simply append the remaining elements onto the new array (example shown below). Both arrays will be in the format: [e1, e2, e3, ...] where at least one element will exist in each array. Sample Test Cases Input:"[5, 2, 3]", "[2, 2, 3, 10, 6]" Output:"746106" Input:"[1, 2, 1]", "[2, 1, 5, 2]" Output:"3362"
function ArrayMatching(strArr) { var array = []; strArr.forEach(el => array.push(JSON.parse(el))) var answer = []; for (var i = 0; i < array[0].length; i++) { if (array[1][i]){ answer.push(array[0][i] + array[1][i]); } else { answer.push(array[0][i]) } } if (array[1].length > array[0].length){ for (var j = array[0].length; j < array[1].length; j++){ answer.push(array[1][j]) } } strArr = answer.join('-') // code goes here return strArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ArrayMatching(strArr) {\n var a = strArr[0].match(/d+/g).map(Number);\n var b = strArr[1].match(/d+/g).map(Number);\n\n var longest = a.length >= b.length ? a : b;\n var other = longest === a ? b : a;\n\n return longest.map((e, i) => (other[i] ? e + other[i] : e)).join(\"-\");\n}", "function TwoSum...
[ "0.6549324", "0.65275425", "0.64346135", "0.6361779", "0.63208145", "0.6317059", "0.61515796", "0.614273", "0.6049516", "0.6024606", "0.5989183", "0.59866315", "0.5959455", "0.5944094", "0.5926533", "0.58654714", "0.586237", "0.5860907", "0.5856926", "0.57903045", "0.57777196...
0.69724166
0
Value returns the value of the object, not necessarily whats in the input box
value(obj){ return obj == null ? null : obj.name || obj.full_name || obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getValue() { return this.input.value; }", "get valueInput() {\n return this._value;\n }", "get value() {\n return this.input.value;\n }", "get value() {\n return this.input_.value;\n }", "get value(){ return this.input.value; }", "get value() { return this._inputValueAccessor.valu...
[ "0.8047646", "0.79138196", "0.77911997", "0.7635505", "0.755162", "0.75397104", "0.74958384", "0.73973054", "0.72368634", "0.719753", "0.718122", "0.7045973", "0.7044151", "0.70230234", "0.696791", "0.6961732", "0.6961732", "0.6961732", "0.6961732", "0.6961732", "0.6961732", ...
0.0
-1
en el constructor, estamos inicializando el state, por eso es que si onstruimos los componentes que definen el ciclo de vida el reloj para poder lograr la actualizacion este componente permite crear el mecanismo que permite, mantener vivo el proceso de mostrar la actualizacion del reloj
componentDidMount() { this.timerID = setInterval( () => this.tick(),1000 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(){\n super()\n this.state = { contador: 1 } // estado inicial del componente es 1 \n }", "constructor(props) {\n super(props);\n\n // El ESTADO Es un valor de cualquier tipo que puede tener un valor por defecto y se puede actualizar cuantas veces lo requiramos\n // En ...
[ "0.6971151", "0.6847885", "0.6745781", "0.67323554", "0.6695476", "0.66194403", "0.66175103", "0.660836", "0.6595902", "0.658628", "0.65739506", "0.65646124", "0.65563315", "0.6532488", "0.6506684", "0.6482898", "0.6463309", "0.64624107", "0.64475876", "0.6431898", "0.6419848...
0.0
-1
commonCharacters / Write a function that accepts two strings as arguments, and returns only the characters that are common to both strings. Your function should return the common characters in the same order that they appear in the first argument. Do not return duplicate characters and ignore whitespace in your returned string.
function commonCharacters(str1,str2) { // YOUR CODE HERE let arr1=str1.split(" ").split("") let arr2=str2.split(" ").split("") let array=[] for(let i=0;i<arr1.length;i++){ if(arr2.includes(arr1[i])){ array.push(arr1[i]) } } return array.join("") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commonChars (a,b){\n let result = \"\";\n for(let i = 0; i < a.length; i++){\n\n if(b.indexOf(a.charAt(i)) !== -1){\n result = result + a.charAt(i);\n }\n\n }\n console.log(a.length, b.length);\n \n return result;\n}", "function getCommonLetters(s1, s2) {\n ...
[ "0.8120203", "0.79673576", "0.76563114", "0.72697407", "0.7059452", "0.6967727", "0.69538313", "0.6898407", "0.6865393", "0.67703354", "0.67369366", "0.6715461", "0.6601517", "0.65424764", "0.6538032", "0.65006477", "0.6428463", "0.6374519", "0.6369463", "0.63598895", "0.6354...
0.8151252
0
getting the input text
function putNumber(num){ // for buttons line.value = line.value + num.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get TEXT_INPUT() {\r\n return 2;\r\n }", "function getTextInput(event) {\n console.log(event.target.value);\n }", "function getText() {\n let txtIn = document.getElementById(\"textInput\");\n return txtIn.value;\n}", "getText() {\n return this.player_input_text.text;\n }"...
[ "0.7580997", "0.7510105", "0.7271787", "0.7114844", "0.6849409", "0.6738182", "0.67138284", "0.6684795", "0.6618345", "0.6618345", "0.66073114", "0.6569687", "0.65617514", "0.6510441", "0.6504357", "0.6413825", "0.6400485", "0.6383354", "0.63749295", "0.6358849", "0.6358168",...
0.0
-1
It's best to start with a fresh clone of Dogo Arena at for the labs. Implement the ability to select doggos Clicking a.doggo.fighter adds the selected class to it.A doggo with the selected class is considered selected. Only one doggo can have the selected class. Clicking a team's name, moves a selected doggo to that team. Stretch Clicking anywhere else on the page, unselects all selected.doggo.fighters. ==================== Return the selected doggo
function getSelectedDoggo() { return document.querySelector(".doggo.fighter.selected"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedDoggo() {\n return document.querySelector('.doggo.fighter.selected');\n}", "function heroSelect() {\r\n\t\t// remove divs that are no longer needed\r\n\t\t$(\"#instructions\").hide();\r\n\t\t$(\"#announcement\").hide();\r\n\t\t$(\"#fightStats\").hide();\r\n\r\n\t\t\r\n \r\n // ...
[ "0.78451294", "0.58623195", "0.5563691", "0.5431061", "0.54100966", "0.5385987", "0.53579223", "0.53488976", "0.5345971", "0.53050035", "0.52716446", "0.5252459", "0.5251773", "0.52109927", "0.5206746", "0.5185923", "0.51679385", "0.5166758", "0.51661503", "0.515492", "0.5137...
0.78532124
0
Remove selected doggos, if one exist
function removeSelected() { const selected = getSelectedDoggo(); if (selected) { selected.classList.remove("selected"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_selected(){\n\tfoodlst = SELECTED_DAY_ID == \"R\" ? MY_EXPRESS_PLAN : MY_CURRENT_PLAN[SELECTED_DAY_ID] ;\n\tvar j = 0;\n\t$(\".food_list_item\").each(function(){\n\t\tif(this.checked) { foodlst.splice( parseInt(this.getAttribute(\"id_tag\")) - j , 1 ); j++;}\n\t});\n\tdisplay_grocery_list();\n\tsel...
[ "0.7659911", "0.7591672", "0.7467119", "0.7406064", "0.7298669", "0.72876436", "0.72422594", "0.7161201", "0.7145862", "0.7144703", "0.7100161", "0.70950115", "0.70822805", "0.7023835", "0.6987106", "0.6972872", "0.69574624", "0.69292337", "0.6878332", "0.6829651", "0.6823652...
0.7454757
3
Write a function firstListItem that does not accept any parameters. The function should use a firstchild selector to return the first list item in the ul with the ID piclist.
function firstListItem(){ // console.log($('#pic-list:first-child')) return $('#pic-list li:first-child') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstListItem() {\n return $('ul li:first-child')\n}", "function test3() {\n console.log($('li:first(\"new\")'));\n}", "function BOT_first(list) {\r\n\tif(list.length>0) return list[0]\r\n\telse return (undefined);\r\n}", "function first_dropdown_item() {\n\t\t\tdebugger;\n\t\t\treturn $(\"li\",...
[ "0.78049374", "0.64071894", "0.6281813", "0.6226565", "0.6001289", "0.5926203", "0.58501446", "0.5691074", "0.56855524", "0.5568919", "0.55113626", "0.55031794", "0.5414506", "0.5306649", "0.53033227", "0.52870625", "0.5282798", "0.5271727", "0.5255282", "0.5255282", "0.52514...
0.86586493
0
toggleDiv function toggles visibility of menu
function toggleDiv(me) { me.style.visibility = (me.style.visibility=="hidden") ? "visible" : "hidden"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleVisibility(div1, div2){\n let divElement = document.getElementById(div1);\n let divElement2 = document.getElementById(div2);\n\n //Ocultando la division del inicio\n if(divElement.style.display == 'none'){\n divElement.style.display = 'block';\n }\n else {\n divElement.style.display = 'n...
[ "0.74743426", "0.73303765", "0.7205864", "0.7130844", "0.7130474", "0.7128891", "0.7116695", "0.70865256", "0.7000289", "0.6959611", "0.6950192", "0.68822706", "0.68772256", "0.68734354", "0.68562293", "0.68017316", "0.67956024", "0.6793279", "0.6784826", "0.6780072", "0.6779...
0.76354074
0
Event Listener to toggle menu on click
function divAction(uh) { uh.addEventListener( "click", function() { // function to use on click toggleDiv(cheatMenu); return false; }, false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function togglemenu(){\n this.isopen = !this.isopen;\n }", "function toggleMenu(e) {\n if (menu.classList.contains('show')) {\n menu.classList.remove('show')\n } else {\n menu.classList.add('show')\n }\n}", "function toggleMenu(menu) {\n menu.toggleClass('show');\n}", "function ...
[ "0.78831863", "0.76694983", "0.746726", "0.74640536", "0.7457366", "0.7451305", "0.74477243", "0.7434061", "0.7433043", "0.74262786", "0.7366033", "0.73631054", "0.7346235", "0.7327497", "0.73273504", "0.732209", "0.7318222", "0.73059374", "0.73013985", "0.728344", "0.7283115...
0.0
-1
Another event listener to listen on click of specific link
function respondEvent(uh) { uh.addEventListener( "click", function() { findEmbed(); return false; }, false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function links_click_event(event) {\n console.log(\"works link\");\n}", "function clickListener() {\n document.addEventListener( \"click\", function(e) {\n var clickeElIsLink = clickInsideElement( e, contextMenuLinkClassName );\n\n if ( clickeElIsLink ) {\n e.preventDefault();\n men...
[ "0.75303566", "0.687461", "0.6792053", "0.6716468", "0.66839606", "0.6683314", "0.6586836", "0.65821284", "0.6546654", "0.6464975", "0.6462979", "0.64519525", "0.6437306", "0.6426235", "0.64190316", "0.6391419", "0.6387804", "0.6386425", "0.63707393", "0.6332395", "0.63206464...
0.0
-1
Translates the schema attributes in messages delivered from Pub/Sub. All resulting fields may end up being blank.
static metadataFromMessage(attributes) { return { name: attributes['googclient_schemaname'], encoding: attributes['googclient_schemaencoding'], }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_translateAttributes(el) {\n const attributes = el.attrs;\n const i18nParsedMessageMeta = {};\n attributes.forEach(attr => {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n _par...
[ "0.5464854", "0.5464854", "0.5432602", "0.5432602", "0.5118102", "0.5048039", "0.5033983", "0.49145126", "0.48971528", "0.4858885", "0.4846493", "0.4846493", "0.4823067", "0.48204103", "0.4774452", "0.47232667", "0.471474", "0.4692436", "0.4692436", "0.4692436", "0.4692436", ...
0.54248154
4
Text go in, preview come out.
render(){ return( <div id='container'> <textarea onChange={this.handleChange} id='text' defaultValue={defaultText}></textarea> <div className='markdown-preview'> <Markdown markup={ this.state.text } style='min-width: 100%' /> </div> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function monitorText(event){\r\n\tvar frame = frames['editorText'];\r\n\tvar text = document.getElementById('htmlText');\r\n\r\n\tframe.srcdoc = \"<!DOCTYPE html><html><head><link href='editor/embedded.css' rel='stylesheet' type='text/css'></head><body><pre class='postTextPre'>\" + text.value + \"</pre></body></ht...
[ "0.66933405", "0.638995", "0.6216807", "0.6192279", "0.6177838", "0.6146039", "0.61439383", "0.6105448", "0.60904115", "0.6086854", "0.60719156", "0.6061495", "0.6017033", "0.5994321", "0.5969847", "0.5947226", "0.5944311", "0.59383756", "0.59138817", "0.58885306", "0.5888530...
0.0
-1
Function to Validate Tour Details
function validateTour(tour) { const schema = { title: Joi.string().min(5).max(255).required(), description: Joi.string().min(10).max(9999).required(), location: Joi.string().min(5).max(255).required(), guide: Joi.string().min(5).max(255) } return Joi.validate(tour, schema); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateEntries() {\n let modalErrors = \"\";\n //check text entries for train name and destination\n let textCheck = [$(\"#train-input\").val().trim(), $(\"#dest\").val().trim()];\n $.each(textCheck, function(i, textIn) {\n if (textIn === \"\" && i === 0) {\n modalErrors = \...
[ "0.5839794", "0.5833125", "0.57583123", "0.57566375", "0.57347906", "0.5729543", "0.5686355", "0.56360376", "0.5626824", "0.5576555", "0.5572596", "0.55670995", "0.55594546", "0.55225694", "0.55103403", "0.5490648", "0.54776", "0.5460402", "0.545071", "0.5447002", "0.5445134"...
0.7169799
0
If there's no local storage, then initialize new local storage
function newPage(){ userInProgress = 1; pages = 1 savePage('pages',pages); savePage('options',JSON.stringify(options)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initStorage() {\n _storage = localStorage;\n}", "function initLocalStorage() {\n try {\n if ('localStorage' in window && ['localStorage'] !== null) {}\n } catch (e) {\n alert(\"localstorage not supported\");\n }\n }", "function initLocalStorage() {\n\t//\...
[ "0.7887946", "0.7796383", "0.75253934", "0.7503801", "0.73757017", "0.7191612", "0.7184365", "0.7175144", "0.71597874", "0.71519977", "0.7047435", "0.7022907", "0.6991296", "0.6907664", "0.6896019", "0.6886685", "0.6886604", "0.68816245", "0.6853177", "0.68352866", "0.6827792...
0.0
-1
stores desired variables and app state on localStorage
function savePage(index = undefined, value = undefined){ if (!supportsLocalStorage()) { return false; } localStorage.setItem('userInProg', userInProgress); if((typeof(index) !== 'string') || (value==undefined)){ return; } else{ localStorage.setItem(index, value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeAppState() {\n\tapp_state['global_vars'] = global_vars;\n\tsetItemInLocalStorage(\"dx_app_state\",btoa(JSON.stringify(app_state)));\n}", "function storeState() {\n\n localStorage.setItem(STORAGE_KEY, JSON.stringify(data));\n }", "function storingBottlesaAndState(){\n\n\t\tvar purchaseDe...
[ "0.8197272", "0.7550367", "0.71618915", "0.7113716", "0.70881957", "0.7088141", "0.7063441", "0.7013405", "0.7005143", "0.6994274", "0.698872", "0.69758666", "0.69729793", "0.6953341", "0.6941248", "0.6925683", "0.689458", "0.6883918", "0.6882478", "0.68701226", "0.68435085",...
0.0
-1
loads all of the stored variables and app state from localStorage
function resumePage() { if (!supportsLocalStorage()) { return false; } userInProgress = parseInt(localStorage.getItem('userInProg')); if (!isInt(userInProgress)) { return false; } /******load stuff in vars/arrays (as strings) here*******/ pages = parseInt(localStorage.getItem('pages')); options = JSON.parse(localStorage.getItem('options', options) || "[]"); if(options.optionalServices.length > 1){ for(let i=1; i<options.optionalServices.length; i++){ let tempVal = options.optionalServices[i]; if(Number.isInteger(tempVal)){ let tempString = "0x"; tempString += tempVal.toString(16); tempVal = tempString; } optionalServs.innerHTML+="<option id=\""+tempVal+"\" value=\""+tempVal+"\">"; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preLoad() {\n\n\t\t\tangular.forEach($localStorage, function(value, key) {\n\t\t\t\tlocalStorageObj[key] = value\n\t\t\t});\n\n\t\t}", "restoreAll() {\n const all = window.localStorage.getItem('state');\n if (all !== null)\n this.loadAll(all);\n }", "function loadStoredInfo...
[ "0.74176955", "0.72476834", "0.7164585", "0.71381277", "0.7126024", "0.70688796", "0.7033654", "0.69888246", "0.698715", "0.6967091", "0.69626486", "0.6948965", "0.69184935", "0.68971175", "0.6895407", "0.6895407", "0.6835878", "0.68217903", "0.68081826", "0.6799128", "0.6772...
0.0
-1
/gets StorageEvent, and has a IE fallback mech.
function handle_storage(storageEvent) { if (!storageEvent) { storageEvent = window.event; } //fallback for IE userLocalStorage = storageEvent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStorage(e) {\n try {\n return wx.getStorageSync(e)\n } catch (e) {\n errorEvent(\"getStorageSync\", e)\n }\n}", "function storageHandler(event) {\r\n console.log(\"connected!\");\r\n if(event.newValue){\r\n var newValue = JSON.parse(event.newValue);\r\n ...
[ "0.7261632", "0.6518907", "0.64171034", "0.6316653", "0.62457144", "0.6045479", "0.6030311", "0.60174984", "0.5995046", "0.59949887", "0.594806", "0.594806", "0.594806", "0.59080607", "0.58470166", "0.58178484", "0.5780319", "0.5746289", "0.5735846", "0.5728662", "0.5689354",...
0.7640349
0
Returns true if current browser supports localStorage
function supportsLocalStorage() { return ('localStorage' in window) && window['localStorage'] !== null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function localStorageSupported() {\n try {\n return \"localStorage\" in window && window[\"localStorage\"] !== null;\n } catch (e) {\n return false;\n }\n}", "function supportsLocalStorage() {\n try {\n return 'localStorage' in window && window['localStorage'] !== null;\n } catch (e) {...
[ "0.8897461", "0.8841862", "0.88418096", "0.8824754", "0.88170576", "0.8816925", "0.8811079", "0.8767056", "0.8755475", "0.87411803", "0.87249553", "0.87249553", "0.87249553", "0.87249553", "0.87249553", "0.8721821", "0.87111264", "0.8669343", "0.8579554", "0.85351366", "0.852...
0.87452054
9
return true if passed argument is of type Integer
function isInt(value) { return !isNaN(value) && (function(x) { return (x | 0) === x; })(parseFloat(value)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInteger(value)\r\n{ \r\n return Number.isInteger(value);\r\n \r\n \r\n}", "function isInteger(num) {\n return Number.isInteger(num);\n }", "function isInt() {\n\treturn (Number(value) === parseInt(value, 10));\n}", "fun...
[ "0.79499424", "0.78406245", "0.78316087", "0.7776263", "0.76904607", "0.76904607", "0.7686213", "0.76737106", "0.76416695", "0.7626222", "0.75223947", "0.7488142", "0.7488142", "0.74807286", "0.74612653", "0.7354463", "0.72989315", "0.7291674", "0.72904414", "0.72419083", "0....
0.68076307
65
Ignore after this point. Used only for demo purposes
function mimicServerCall(url="http://mimicServer.example.com", config={}) { return new Promise(function(resolve, reject) { setTimeout(function() { let isRandomFailure = Math.random() < .2 if (isRandomFailure) { reject("Random server error. Try again."); } else { resolve("Pretend remote server notified of action!"); } }, 300); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__skipStep() {\n this.skipStep();\n }", "function ignore() { }", "ignoreCall() {\r\n var callId = firstCallId; //getSelectedCall();\r\n kandy.ignoreCall(callId);\r\n }", "ignoreCall() {\r\n var callId = firstCallId; //getSelectedCall();\r\n kandy.ignoreCall(callId);\r...
[ "0.62220097", "0.6115209", "0.6074134", "0.6074134", "0.599897", "0.58680683", "0.58404577", "0.58020407", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "0.57906073", "...
0.0
-1
The user's selected shelf for the book in the MyReads or Search page.
newShelf(event) { let currentShelf = event.target.value; this.removeBook(currentShelf); this.updateShelf(currentShelf); this.props.changeShelf(this.props.books); this.updateBook(this.props.book, currentShelf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getShelf(book) {\n var shelf = \"none\"\n this.props.books.forEach(function (element){\n if(element.id === book.id)\n shelf = element.shelf\n }\n )\n return shelf\n }", "getShelf(book_id){\n const index = this.state.books.findIndex((book, index) => {\n return book.id ===...
[ "0.70194066", "0.65237373", "0.61398053", "0.5955581", "0.59248465", "0.5850529", "0.57394195", "0.56253546", "0.5622033", "0.5568765", "0.5545165", "0.55335194", "0.5501791", "0.5440537", "0.543056", "0.54074275", "0.5386847", "0.5382973", "0.53765905", "0.53576624", "0.5260...
0.5435364
14
Removes the book from the books array and from the shelf when the user has slected the "None" shelf.
removeBook(currentShelf) { if (currentShelf === 'none') { this.props.books.forEach((book, index) => { if (book.id === this.props.bookId) { this.props.books.splice(index, 1); } } ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateShelf(book, shelf) {\n if(shelf.value === 'none') {\n const bookIndex = this.state.books.findIndex(bk => bk.id === book.id);\n this.state.books.splice(bookIndex, 1);\n } else {\n book.shelf = shelf;\n }\n this.setState(this.state);\n }", "function removeBook() {\n const book ...
[ "0.7598857", "0.7045978", "0.68340105", "0.6768518", "0.6696449", "0.6674183", "0.6664989", "0.66485214", "0.6616507", "0.66162664", "0.6596198", "0.6586488", "0.6585704", "0.6578524", "0.6538765", "0.652772", "0.65158504", "0.6505075", "0.6461612", "0.6441622", "0.6433798", ...
0.8154177
0
Adds the user's selected book to the books array. This book's shelf was originally marked as "none". Removes the book which shelf has changed and adds it back with the new shelf value.
updateShelf(currentShelf) { if (this.props.bookShelf === 'none') { this.props.books.push(this.props.book); this.props.book.shelf = currentShelf; } else { this.props.books.forEach((book, index) => { if (book.id === this.props.bookId) { this.props.books.splice(index, 1); this.props.books.push(this.props.book); } } ); this.props.book.shelf = currentShelf; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateShelf(book, shelf) {\n if(shelf.value === 'none') {\n const bookIndex = this.state.books.findIndex(bk => bk.id === book.id);\n this.state.books.splice(bookIndex, 1);\n } else {\n book.shelf = shelf;\n }\n this.setState(this.state);\n }", "addBook(book, shelf) {\n book.shelf =...
[ "0.741307", "0.71733356", "0.6907651", "0.6787758", "0.66787875", "0.66330004", "0.6523659", "0.64446825", "0.6423142", "0.6320696", "0.63132215", "0.6288778", "0.6208454", "0.62084", "0.6181526", "0.61673963", "0.6160456", "0.61499065", "0.61116725", "0.6084235", "0.6056298"...
0.75541615
0
Updates the book information to the server.
updateBook(book, shelf) { BooksAPI.update(book, shelf) .then(resp => { console.log("Response for the book's update method ", resp); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateBook() {\n let id = $('#updatebookId').text();\n let title = $('#updatebookTitle').val();\n let author = $('#updatebookAuthor').val();\n let isbn = $('#updatebookIsbn').val();\n\n let book = { title, author, isbn };\n request.put(id, JSON.stringify(book), updateCurrentBookInList, o...
[ "0.7732297", "0.7665377", "0.7397895", "0.70422786", "0.701283", "0.6944953", "0.69446224", "0.6867653", "0.68312323", "0.6793257", "0.67551494", "0.6649302", "0.65143466", "0.6511059", "0.6454146", "0.641734", "0.6375487", "0.62722445", "0.6236813", "0.62307215", "0.6106884"...
0.7156894
3
a function that rerenders the todo list
function renderList() { //use a for loop to render the list items var html = "" for (let i = 0; i < arr.length; i++) { if (arr[i].isCompleted) { html += `<li class="todo-list-item completed" id=${i}>${arr[i].task}</li>` } else { html += `<li class="todo-list-item" id=${i}>${arr[i].task}</li>` } } todoList.innerHTML = html }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTodo(todo) {\n //This function renders a todo to the page.\n //If the todo already exists then this function will update it\n\n //Check if todo already exists in dom\n var $existingElem = $('#'+ todo.id);\n if ($existingElem.length) {\n //Update text (possible it's not changed)...
[ "0.76191586", "0.75798565", "0.75723356", "0.75478965", "0.74510413", "0.7392609", "0.73723286", "0.73633087", "0.73284054", "0.7297757", "0.72736853", "0.72710127", "0.7241428", "0.72323024", "0.72195405", "0.72001994", "0.7192204", "0.71584976", "0.7150966", "0.7137282", "0...
0.72698337
12
read all notes from database
function publicReadAllNotes(callback) { db.find({}, function (err, notes) { if (callback) { callback(err, notes); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async loadAllNotes() {\n try {\n const { rows } = await this.db.allDocs({ include_docs: true });\n const notes = rows.map(({ doc }) => doc);\n\n this.setState({ notes });\n } catch (error) {\n console.error(error);\n }\n }", "function getAllNotes() {\n let todoNotesDB = storage.g...
[ "0.78324383", "0.7662801", "0.76428545", "0.76294523", "0.74880177", "0.73991704", "0.73099226", "0.7226127", "0.7129189", "0.7089006", "0.7073582", "0.7034716", "0.7027464", "0.7022753", "0.70204276", "0.6939478", "0.69369954", "0.68821985", "0.68379915", "0.6831398", "0.681...
0.76515126
2
! Vue.js v2.5.3 (c) 20142017 Evan You Released under the MIT License.
function i(e){return void 0===e||null===e}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mounted() {\n }", "mounted() {\n\n }", "mounted() {\n\n }", "constructor() {\n this.vue = new Vue();\n }", "mounted() {\n /* eslint-disable no-console */\n console.log('Mounted!');\n /* eslint-enable no-console */\n }", "created () {\n\n }", "created () {...
[ "0.6957922", "0.69139284", "0.6889623", "0.655565", "0.6501094", "0.6373531", "0.6373531", "0.63334", "0.6331142", "0.6319454", "0.6306353", "0.6303973", "0.6235979", "0.6223704", "0.6221788", "0.6185488", "0.6185057", "0.61683774", "0.6163978", "0.6163978", "0.6161374", "0...
0.0
-1
I guess this is like the "enable" in extension.js : something called each time he user try to access the settings' window
function buildPrefsWidget() { let widget = new OSDSettingsWidget(); widget.show_all(); return widget; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showSettings() {\n // Implement in your WM\n }", "function settings(e) {\n e.detail.applicationcommands = {\n \"divAccount\": { href: \"accountSettings.html\", title: \"Account\" },\n \"divPrivacy\": { href: \"privacySettings.html\", title: \"Privacy\" },\n };\n Win...
[ "0.7326077", "0.69586617", "0.6860055", "0.66769075", "0.66344506", "0.660895", "0.657592", "0.6548859", "0.6474186", "0.6447041", "0.64144355", "0.6400333", "0.6384667", "0.63742924", "0.6374046", "0.63682723", "0.6324024", "0.63161576", "0.6301981", "0.627884", "0.6239135",...
0.0
-1
end document.ready() Function to display the Grid that limits the width based on the viewport height, so the grid fits on the screen
function displayGrid(n) { var viewportSize = $(window).height(); var heightLimit = viewportSize*.75; $('.wrapper').width(heightLimit); // Hacky element here to remove the 2 pixels of border var boxSize = (heightLimit/n) - 2; var wrapper = $('.wrapper').html(""); for (var i=0;i<n;i++){ for (var j=0;j<n;j++){ wrapper.append($('<div></div>').addClass('tile').width(boxSize).css('padding-bottom', boxSize)); } //wrapper.append($('<div></div>').css('clear', 'both')); } wrapper.append($('<div></div>').css('clear', 'both')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fullscreen(){\n if (WIDTH == 80) {\n canvas.height = window.innerHeight; \n canvas.width = window.innerWidth;\n HEIGHT = window.innerHeight/10;\n WIDTH = window.innerWidth/10;\n } else {\n canvas.height = 600;\n canvas.width = 600;\n HEIGHT = 60;\n ...
[ "0.66805094", "0.66418034", "0.6546604", "0.6528491", "0.6452422", "0.63764465", "0.63392824", "0.629543", "0.6279183", "0.6277434", "0.6271291", "0.627036", "0.62672174", "0.6257393", "0.6240945", "0.6238988", "0.6229438", "0.6217161", "0.621198", "0.6204772", "0.61856073", ...
0.61229557
26
Assume lsa mb3tsh l AI move //modify Asssume not my turn so no clicks
function showRecommendedMove(moveType, move){ var alerted = 0; blurFilter.blur = 5; var lastMove if(!LastMove_pass) { lastMove= app.stage.getChildAt(app.stage.children.length-1); app.stage.removeChildAt(app.stage.children.length-1); } fontStyle2 = utilities.getFontStyle(30); msg1Txt = new PIXI.Text("Recommended Move",fontStyle2); msg1Txt.x = x/2 - msg1Txt.width/2; msg1Txt.y = 200 msg1Txt.name = "alert1"; msg1Txt.filters = [blurFilter2]; app.stage.addChild(msg1Txt); msg2Txt = new PIXI.Text("Click here to Continue",fontStyle2); msg2Txt.x = x/2 - msg2Txt.width/2; msg2Txt.y = 300 msg2Txt.name = "alert2"; msg2Txt.interactive = true; msg2Txt.buttonMode = true; msg2Txt.filters = [blurFilter2]; app.stage.addChild(msg2Txt); msg2Txt.on("click",function(){ alerted = 1; blurFilter.blur = 0; utilities.removeChildByName("alert1",app); utilities.removeChildByName("alert2",app); utilities.removeChildByName("green",app); if(!LastMove_pass) app.stage.addChild(lastMove); }); if (moveType == '0'){ const stone = PIXI.Sprite.fromImage('../images/green.png'); var row = parseInt(move[1], 10); var col = parseInt(move[0], 10); //console.log("added stone col: ", col , " row ", row); --row; --col; col = col*blockSz + x; row = row*blockSz + y; //console.log("added stone col: ", col , " row ", row); col = Math.round(col / blockSz) * blockSz; row = Math.floor(row / blockSz) * blockSz; stone.x = col - blockSz/2; stone.y = row; stone.height = 25; stone.width = 25; stone.name = "green" stone.filters = [blurFilter2]; app.stage.addChild(stone); } else{ if(moveType == '1') msg = "Resign" else msg = "Pass" fontStyle2 = utilities.getFontStyle(30); msg3Txt = new PIXI.Text(msg,fontStyle2); msg3Txt.x = x + (blockNum*blockSz)/2 - msg3Txt.width/2; msg3Txt.y = 200 msg3Txt.name = "green" msg3Txt.filters = [blurFilter2]; app.stage.addChild(msg3Txt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "aiGo() {\r\n let cloneState = new GameState(this.gameState.state);\r\n let aiMove = this.AI.aiMove(cloneState);\r\n this.gameState.makeMove(aiMove, this.curPlayer);\r\n this.updateBoard();\r\n this.curPlayer = 1;\r\n }", "function takeABlindMove(turn) { ... }", "function i...
[ "0.66672957", "0.66278833", "0.6558301", "0.6545912", "0.65368754", "0.6509753", "0.64904404", "0.64556766", "0.64079964", "0.63721603", "0.63589734", "0.6351947", "0.6348955", "0.6309862", "0.63080597", "0.6298734", "0.62921846", "0.6281916", "0.6240118", "0.6208176", "0.618...
0.0
-1
THE FUNCTION renderButtons(); WILL CREATE NEW BUTTONS FOR EVERY PLATER IN THE ABOVE ARRAY
function renderButtons() { // Deleting the player buttons prior to adding new player buttons $('#players-view').empty(); for (var i = 0; i < players.length; i++) { var a = $('<button>') .addClass('player') .attr('data-name', players[i]) .text(i + 1 + '. ' + players[i]) .css({ width: '175px', height: '175px', border: 'none', color: '#ffffff', background: "url('http://laoblogger.com/images/basket-clipart-free-4.jpg')", 'background-size': '175px 175px', font: 'italic 25px "Fira Sans", serif', 'border-radius': '100%', float: 'left', display: 'inline-block', margin: '20px', }); $('#players-view').append(a); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderButtons() {\n // start by emptying the button-area div every time so that there are no duplicates\n $(\"#button-area\").empty();\n for (var i=0; i < topics.length; i++) {\n // create button element for each array item\n var button = $(\"<button>\");\n ...
[ "0.83193976", "0.83065426", "0.8283204", "0.82630956", "0.8260062", "0.82586986", "0.8255658", "0.8252639", "0.8245149", "0.82296777", "0.8221899", "0.82086176", "0.82016784", "0.8195769", "0.81837744", "0.8181524", "0.81678385", "0.81610125", "0.8151869", "0.81481826", "0.81...
0.78949976
73
AJAX REQUEST TO GET GIFS OF PEOPLE WHEN BUTTONS ARE CLICKED
function displayGreatestPlayers() { var person = $(this).attr('data-name'); var queryURL = 'https://api.giphy.com/v1/gifs/search?q=' + person + '&api_key=SrsCEPVeiqgySRa6p1rVSatJAA8qOBGD&limit=10'; $.ajax({ url: queryURL, method: 'GET', }).done( function( response ) { var results = response.data; for (var i = 0; i < results.length; i++) { var gifDiv = $("<div class='item' id='wrapper'>"); gifDiv.css({ width: '25%', float: 'left', display: 'inline-block', margin: '20px', //background: "url('https://www.toptal.com/designers/subtlepatterns/patterns/sports.png')", //'background-size': 'auto', padding: '1px', 'text-align': 'center', }); var rating = results[i].rating; var title = results[i].title; var personImage = $('<img>').addClass('gif'); personImage.attr('src', results[i].images.fixed_height_still.url); personImage.attr('data-still', results[i].images.fixed_height_still.url); personImage.attr('data-animate', results[i].images.fixed_height.url); personImage.css({ padding: '5px', margin: '0px auto', width: '100%', }); var p = $('<p>').text('GIF Title: ' + title + ' & Rating: ' + rating); p.css({ padding: '5px', margin: '0px, auto', width: '100%', color: '#333', 'font-size': '15px', }); gifDiv.prepend(p); gifDiv.prepend(personImage); $('#gifs-appear-here').prepend(gifDiv); } /* PAUSING AND UNPAUSING GIFS */ $('.gif').on('click', function() { var state = $(this).attr('data-state'); //console.log(state); if (state === 'still') { $(this).attr('src', $(this).attr('data-animate')); $(this).attr('data-state', 'animate'); } else { $(this).attr('src', $(this).attr('data-still')); $(this).attr('data-state', 'still'); } }); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gameRequest() {\n $(\"pokedex-view\").classList.add(\"hidden\");\n $(\"their-card\").classList.remove(\"hidden\");\n qs(\"#my-card .hp-info\").classList.remove(\"hidden\");\n $(\"results-container\").classList.remove(\"hidden\");\n $(\"p1-turn-results\").classList.remove...
[ "0.66019636", "0.6296155", "0.62762845", "0.6254826", "0.61503154", "0.6138633", "0.6128967", "0.61009127", "0.60951376", "0.6090448", "0.6085519", "0.60721356", "0.60683984", "0.6034937", "0.6022404", "0.60216254", "0.601253", "0.5991479", "0.5980394", "0.5979193", "0.597211...
0.0
-1
Get all of the mermaid code block and transform them into the format can be parsed by mermaid.
function initMermaid() { let codes = document.getElementsByClassName("language-mermaid"); while( codes.length > 0 ) { let code = codes[0]; let content = code.innerText; let chart = document.createElement("div"); chart.className = "mermaid"; chart.innerHTML = content; let p = code.parentNode; while( p.tagName != "DIV" ) { p = p.parentNode; } p.replaceChild(chart, code.parentNode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse(){\n var syntax = esprima.parse(editor.getValue());\n codeArray = [];\n expand(syntax.body, codeArray, 0);\n}", "function parse_code(code, lang, outputFormat, template, callback) {\n var parsed_code = [],\n this_line,\n in_comment,\n in_code,\n spaces,\n co...
[ "0.6397769", "0.60020643", "0.59928775", "0.58870715", "0.5882498", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.58664995", "0.57723165", "0.5756081", "0.5748881", "0.57382214", "0.5669864", "0.5669864", "0...
0.5702092
18
if called on, makes game character start the conversation
function init() { character.say("Hi!") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start () {\n room.sendToPeers(GAME_START)\n onStart()\n}", "function start() {\n room.sendToPeers(GAME_START);\n onStart();\n}", "function C012_AfterClass_Jennifer_StartChat() {\n\tif (!ActorIsGagged()) {\n\t\tActorSetPose(\"\");\n\t\tC012_AfterClass_Jennifer_CurrentStage = 500;\n\t\tGameLogAdd(\"...
[ "0.70371747", "0.7036938", "0.70233774", "0.67707825", "0.67651016", "0.67046773", "0.67016745", "0.6615028", "0.6553669", "0.65125644", "0.6464118", "0.6439643", "0.6429121", "0.6381582", "0.63181347", "0.6308386", "0.63083506", "0.63059527", "0.63004136", "0.62932485", "0.6...
0.0
-1
if called on, handles game character response to player's wrong choice
function tryAgain() { character.say("Uh..."); var tryAgain = Scene.createTextBillboard(0, 5, 3); tryAgain.setText("Try Again"); tryAgain.onActivate(function() { tryAgain.deleteFromScene(); init(); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnCorrectChoice() {\n //Gets player name input: executes once\n if (!nameInputted) {\n if ($(\"name\").value !== \"\") {\n name = $(\"name\").value;\n //If inputted value is null, the character's name remains the default\n }\n nameInputted = true;\n }\n ...
[ "0.7138294", "0.68256134", "0.68145365", "0.66872793", "0.66732115", "0.6672416", "0.66116387", "0.65642065", "0.65183073", "0.65111005", "0.64832336", "0.64782935", "0.6437079", "0.6433205", "0.6395242", "0.6370516", "0.6364631", "0.6351367", "0.6349858", "0.63372666", "0.63...
0.0
-1
if called, makes game character continue the conversation if correct choice was clicked by player
function next() { function newLine() { character.say("How's it going?"); } //one choice player could make and the results if that choice is clicked var response1 = Scene.createTextBillboard(-5, 5, 0); response1.setText("Good! And you?") response1.onActivate(function() { player.say("Good! And you?"); Scene.schedule(final, 1); response1.deleteFromScene(); response2.deleteFromScene(); response3.deleteFromScene(); }) //if called, handles game character response to player's wrong choice function tryAgain() { character.say("Uh..."); var tryAgain = Scene.createTextBillboard(0, 5, 3); tryAgain.setText("Try Again"); tryAgain.onActivate(function() { tryAgain.deleteFromScene(); newLine(); }) } //one choice player could make and the results if that choice is clicked var response2 = Scene.createTextBillboard(0, 5, 0); response2.setText("No.") response2.onActivate(function() { player.say("No."); Scene.schedule(tryAgain, 1); }) //one choice player could make and the results if that choice is clicked var response3 = Scene.createTextBillboard(5, 5, 0); response3.setText("Yes?") response3.onActivate(function() { player.say("Yes?"); Scene.schedule(tryAgain, 1); }) //if called, makes game character end the conversation if correct choice was clicked by player function final() { character.say("Good, thank you!") var win = Scene.createTextBillboard(0, 5, 3); win.setText("Awesome job!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnCorrectChoice() {\n //Gets player name input: executes once\n if (!nameInputted) {\n if ($(\"name\").value !== \"\") {\n name = $(\"name\").value;\n //If inputted value is null, the character's name remains the default\n }\n nameInputted = true;\n }\n ...
[ "0.71560913", "0.71418583", "0.7029957", "0.6939079", "0.6868527", "0.6770163", "0.67572236", "0.672928", "0.67242396", "0.6713372", "0.6700118", "0.6694876", "0.6681348", "0.66773814", "0.6669113", "0.6657008", "0.6647015", "0.6619862", "0.6618829", "0.6615122", "0.6612399",...
0.64911944
34
if called, handles game character response to player's wrong choice
function tryAgain() { character.say("Uh..."); var tryAgain = Scene.createTextBillboard(0, 5, 3); tryAgain.setText("Try Again"); tryAgain.onActivate(function() { tryAgain.deleteFromScene(); newLine(); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnCorrectChoice() {\n //Gets player name input: executes once\n if (!nameInputted) {\n if ($(\"name\").value !== \"\") {\n name = $(\"name\").value;\n //If inputted value is null, the character's name remains the default\n }\n nameInputted = true;\n }\n ...
[ "0.72499734", "0.68660337", "0.686473", "0.68063927", "0.67798346", "0.6767542", "0.6735627", "0.66823184", "0.66747284", "0.6646965", "0.6628738", "0.6611131", "0.65729815", "0.6529697", "0.6525301", "0.65116334", "0.6480326", "0.64433473", "0.64432204", "0.6434685", "0.6433...
0.0
-1
if called, makes game character end the conversation if correct choice was clicked by player
function final() { character.say("Good, thank you!") var win = Scene.createTextBillboard(0, 5, 3); win.setText("Awesome job!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "endPlayerTurn(){\n\t\tthis.setState({'playerTurn': false}); // this should cause clickable buttons to become unclickable?\n\t\tthis.updateConsole('player ended turn!'); \n\t\t\n\t\t// get the selected search method from dropdown \n\t\tlet selectedMethod = document.getElementById('searchMethod');\n\t\tthis.enemyTur...
[ "0.70069325", "0.674751", "0.67229366", "0.6714205", "0.6678435", "0.6672675", "0.66456175", "0.6621449", "0.6609713", "0.6606424", "0.6567685", "0.6546247", "0.6530104", "0.64809614", "0.6470125", "0.6469867", "0.6469337", "0.64680904", "0.64672434", "0.64567125", "0.6453588...
0.0
-1