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
Function for when different data is selected
function optionChanged(id) { //Clear table var tbody = d3.select("tbody") var thead = d3.select("thead") tbody.html(""); thead.html(""); // Update table demBox(id); barChart(id); bubbleChart(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "chooseData() {\n // ******* TODO: PART I *******\n //Changed the selected data when a user selects a different\n // menu item from the drop down.\n\n }", "chooseData() {\n // ******* TODO: PART I *******\n //Changed the selected data when a user selects a different\n ...
[ "0.75035834", "0.75035834", "0.65795994", "0.6556717", "0.64762", "0.6413122", "0.6413122", "0.63926864", "0.63926864", "0.63926864", "0.63926864", "0.63683754", "0.6352936", "0.63273567", "0.6301807", "0.62894315", "0.6279214", "0.6245905", "0.62408465", "0.62360185", "0.623...
0.0
-1
Clicking the button ends up calling the 'redirectToSignIn()' method which generates an authentication request and redirects the user to the Blockstack Browser to approve the sign in request. The actual Blockstack signin dialog depends on whether the user already has an existing session in the Blockstack Browser Signing...
render() { return ( <main role="main"> {this.userSession.isUserSignedIn() ? <SignedIn /> : <Landing /> } </main> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleSignIn(e) {\n e.preventDefault();\n //generates an auth request and redirects the user to the blockstack Browser\n //to approve the sign in request\n userSession.redirectToSignIn();\n }", "_requestSignIn() {\n const event = new CustomEvent('sign-in', {\n detail: {\n 'sign-in': t...
[ "0.7415192", "0.66156787", "0.64947087", "0.64719397", "0.63364625", "0.6244466", "0.6156207", "0.6130104", "0.6119868", "0.61151266", "0.61114544", "0.61021805", "0.6092555", "0.60823315", "0.6067845", "0.60667324", "0.60667324", "0.60667324", "0.60667324", "0.60667324", "0....
0.0
-1
Get from Date type as String type, e.g.
function convertDate(d) { d = d.toString(); var parts = d.split(' '); var months = { Jan: '01', Feb: '02', Mar: '03', Apr: '04', May: '05', Jun: '06', Jul: '07', Aug: '08', Sep: '09', Oct: '10', Nov: '11', Dec: '12' }; return parts[3] + '-' + months[parts[1]] + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fullDateString(date) {\n return {\n day: this.getDayName(date.getDay()),\n month: this.getMonthName(date.getMonth()),\n year: date.getFullYear(),\n d: date.getDate()\n };\n }", "function _getDateString() {\n var myDate = new Date();\n // forward compatability with ES5 Shi...
[ "0.73599327", "0.71425456", "0.7117095", "0.71151245", "0.6997948", "0.6975717", "0.68586224", "0.68501574", "0.67695737", "0.6761322", "0.6742882", "0.6719452", "0.67154056", "0.67125607", "0.6692844", "0.66896373", "0.6675618", "0.6660008", "0.6653533", "0.6653533", "0.6647...
0.0
-1
Creates an instance of CollectionField.
function CollectionField(fieldName, _fieldOf, _fieldType, fieldOptions) { var _this = _super.call(this, fieldName, complex_type_field_1.getEntityConstructor(_fieldOf), fieldOptions) || this; _this._fieldOf = _fieldOf; _this._fieldType = _fieldType; return _this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newCollection(_scope, _params) {\n var col = new Collection();\n col.$isCollection = true;\n col.$type = Model;\n col.$scope = _scope;\n col.$params = _params;\n col.$resolved = false;\n // this.$initialize();\n return col;\n }", "constructor(collection) {\n ...
[ "0.6806561", "0.6510948", "0.64041907", "0.64041907", "0.64041907", "0.63175833", "0.63175833", "0.63175833", "0.6304069", "0.6290532", "0.6232492", "0.61612785", "0.6119463", "0.6041891", "0.6019976", "0.59996355", "0.59336406", "0.5928594", "0.5889516", "0.5889516", "0.5727...
0.7317114
0
/ GAMES : LOAD DEFAULT / / Loads the locked game symbols
function loadDefault() { displayGameLock(1); displayGameLock(2); displayGameLock(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load()\n {\n populateMap(gameInfo.jediList);\n init();\n gameInfo.gameState = \"pickChar\";\n }", "function loadGame(){\n\t// images\n\tbgImage.src = \"images/backgframe_480.jpg\";\n\tdude.src = \"images/person.png\";\n\tscrollImage.src = \"images/scroll.png\";\n\t\n\t// requi...
[ "0.68456507", "0.6541227", "0.63698614", "0.62426805", "0.6225194", "0.6224154", "0.6199113", "0.6185105", "0.6182725", "0.61430395", "0.61391485", "0.61088866", "0.6099591", "0.6065737", "0.605247", "0.6049663", "0.5973611", "0.59567815", "0.5933092", "0.59153265", "0.590734...
0.80440164
0
/ GAMES : LOAD UNLOCK DATA / / Chooses function to lock or unlock based on API data
function loadUnlockData() { for (var i = 0; i < unlockData.length; i++) { var gameId = unlockData[i].gameId; var unlockState = unlockData[i].unlockState; if (unlockState == true) { displayGame(gameId); } else { displayGameLock(gameId); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unlock(updateData=true) {\n return new Promise((resolve, reject) => {\n this._getCreds()\n .then((creds) => {\n if (creds) {\n this.creds.deviceID = creds.deviceID;\n this.creds.password = creds.password;\n this.creds.endpoint = creds.endpoint || null;\n }\n ...
[ "0.6315822", "0.6285329", "0.60672075", "0.5787447", "0.57394266", "0.5721651", "0.5633712", "0.5618606", "0.55934", "0.55820847", "0.55432975", "0.55281276", "0.5522349", "0.55048686", "0.55033946", "0.54841524", "0.5469611", "0.5452471", "0.54502475", "0.54424983", "0.54402...
0.64892787
0
/ GAMES : DISPLAY GAME / / Unlocks game based on unLockId variable
function displayGame(unLockId) { console.log("Display game ID = " + unLockId); switch (unLockId) { case 1: $('.gameCircles .row').append(` <div onclick="openShark();" class="col-md-4"> <div class="shark-logo"> </div> <h3>Shark vs Rubbish<...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDefault() {\n displayGameLock(1);\n displayGameLock(2);\n displayGameLock(3);\n}", "function loadUnlockData() {\n\n for (var i = 0; i < unlockData.length; i++) {\n\n var gameId = unlockData[i].gameId;\n var unlockState = unlockData[i].unlockState;\n\n if (unlockState == true) {\n ...
[ "0.68807095", "0.6777595", "0.65212363", "0.6476258", "0.63859177", "0.63731134", "0.6363267", "0.6350594", "0.6011314", "0.5942235", "0.59305173", "0.5909828", "0.5881164", "0.5878383", "0.58490264", "0.5846336", "0.5808233", "0.5786581", "0.5774506", "0.5749969", "0.5734823...
0.5809351
16
/ GAMES : DISPLAY GAME LOCK / / Locks game based on lockId variable
function displayGameLock(lockId) { console.log("Leave game ID = " + lockId + " locked"); switch (lockId) { case 1: $('.gameCircles .row').append(` <div class="col-md-4"> <div class="shark-logo-locked"> </div> <h3>Shark vs Rubbish</h3> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDefault() {\n displayGameLock(1);\n displayGameLock(2);\n displayGameLock(3);\n}", "function loadUnlockData() {\n\n for (var i = 0; i < unlockData.length; i++) {\n\n var gameId = unlockData[i].gameId;\n var unlockState = unlockData[i].unlockState;\n\n if (unlockState == true) {\n ...
[ "0.7000359", "0.64741355", "0.6298063", "0.62483084", "0.6218971", "0.61170524", "0.61099637", "0.5985417", "0.59448427", "0.5916469", "0.59044534", "0.58819276", "0.5830677", "0.57981074", "0.5764049", "0.57354915", "0.5730121", "0.57076585", "0.56977504", "0.569466", "0.568...
0.73835266
0
/ GAMES : OPEN SHARK VS RUBBISH / / Navigates to the shark page
function openShark() { var win = window.open('sharkvsrubbish', '_self'); if (win) { //Browser has allowed it to be opened win.focus(); } else { //Browser has blocked it console.log('Please allow popups for this website'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToGame() {\n window.location = 'game.html';\n}", "function Elevel()\r\n{\r\n\twindow.location.href = 'Su-Dope-Ku Game.html';\r\n}", "function gameover() {\n home();\n }", "['Navigates displaying the route in the address bar (using the correct history API)']({ page, assert, globals }) {\n p...
[ "0.6373699", "0.63378006", "0.63361853", "0.63032204", "0.6293597", "0.6283569", "0.6215884", "0.6143556", "0.6120013", "0.6002102", "0.59312725", "0.5928497", "0.5896701", "0.5893354", "0.58870226", "0.58833045", "0.58743256", "0.5865181", "0.5841621", "0.58306605", "0.58235...
0.5441902
97
/ GAMES : SUZIES TOOSIES / / Navigates to the Suzies Toosies page
function openPipe() { var win = window.open('suziestoosies', '_self'); if (win) { //Browser has allowed it to be opened win.focus(); } else { //Browser has blocked it console.log('Please allow popups for this website'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Elevel()\r\n{\r\n\twindow.location.href = 'Su-Dope-Ku Game.html';\r\n}", "function gameOver(){\r\n location.href='perdiste.html';\r\n}", "function display_toys() {\n \n }// displays toys in the interface", "function gameOver() {\n window.location.href = \"../html/youLose.html\";\n}", ...
[ "0.6167776", "0.61349565", "0.6035931", "0.59599257", "0.58892816", "0.5810185", "0.58042395", "0.57909954", "0.57844335", "0.57503986", "0.57413065", "0.57243514", "0.5720039", "0.5704629", "0.5661503", "0.5640419", "0.5637986", "0.5636025", "0.5627724", "0.56245315", "0.561...
0.0
-1
/ GAMES : CLOGGED MEMORY / / Navigates to the Clogged Memory page
function openCard() { var win = window.open('cloggedmemory', '_self'); if (win) { //Browser has allowed it to be opened win.focus(); } else { //Browser has blocked it console.log('Please allow popups for this website'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function open_memory() {\n window.open(\"https://boiling-refuge-87399.herokuapp.com/\")\n window.open(\"https://github.com/adventuroussheep/Memory-Game\")\n }", "function MapStoresHome() {\n MapStoreArray = [];\n StoreLocatorScreen.MapScreen.locationData = MapStoreArray...
[ "0.5799018", "0.55478084", "0.54896414", "0.5418627", "0.5231451", "0.52280223", "0.51978093", "0.5189831", "0.5188596", "0.51871413", "0.5186152", "0.51764596", "0.51715815", "0.5167103", "0.5164269", "0.5161045", "0.5108245", "0.5092968", "0.5084341", "0.5079775", "0.507732...
0.0
-1
/ GAMES : CLOSE SHARK GAME / / Reloads the page
function closeSharkGame() { location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n location.reload();\n}", "function GameOver() {\n document.location.reload();\n}", "function restart_game(){\n document.location.reload();\n }", "function resetGame(){\n console.log('stopGame clicked');\n window.location.reload();\n}", "function pla...
[ "0.80000514", "0.7443279", "0.7406637", "0.7365097", "0.7340427", "0.73207647", "0.7310387", "0.7309422", "0.730585", "0.7305179", "0.72937095", "0.7274311", "0.727085", "0.7263453", "0.72462654", "0.72196853", "0.72152656", "0.721077", "0.7209417", "0.72049475", "0.7198965",...
0.8614951
0
src/helpers/EditorModal.svelte generated by Svelte v3.38.3
function add_css$2() { var style = element("style"); style.id = "svelte-42yfje-style"; style.textContent = ".cl-editor-modal.svelte-42yfje.svelte-42yfje{position:absolute;top:37px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:520px;width:100%;height:140px;backface-visib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showModal(doc) {\n const modalMode = document.getElementById('modal-mode');\n const modalWindow = document.getElementById('modal-window');\n modalMode.classList.toggle('hide');\n modalWindow.innerHTML = `<section class=\"headerPost\"><h3>Edit</h3>\n <button title=\"Close\" class=\"modal-close\">Close...
[ "0.64328533", "0.62689203", "0.6174894", "0.6141976", "0.61322933", "0.61254543", "0.60674673", "0.5985687", "0.5979721", "0.5973308", "0.5908352", "0.5888551", "0.587616", "0.58702964", "0.5829761", "0.58031833", "0.5767668", "0.5753094", "0.57229406", "0.5693803", "0.569052...
0.6279597
1
src/helpers/EditorColorPicker.svelte generated by Svelte v3.38.3
function add_css$1() { var style = element("style"); style.id = "svelte-njq4pk-style"; style.textContent = ".color-picker-wrapper.svelte-njq4pk{border:1px solid #ecf0f1;border-top:none;background:#FFF;box-shadow:rgba(0,0,0,.1) 0 2px 3px;width:290px;left:50%;-webkit-transform:translateX(-50%);transform:tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editor_tools_handle_color()\n{\n editor_tools_store_range();\n\n // Display the color picker.\n var img_obj = document.getElementById('editor-tools-img-color');\n showColorPicker(img_obj);\n return;\n}", "function choosenColor() {\n return colorChooser.value;\n}", "function onColorCh...
[ "0.6687597", "0.6684367", "0.66476643", "0.6526716", "0.6453702", "0.64480984", "0.63869715", "0.63386714", "0.63168216", "0.62523293", "0.62495095", "0.6227405", "0.6126857", "0.6122772", "0.60959876", "0.6054923", "0.60508066", "0.60381824", "0.6037963", "0.60239756", "0.59...
0.64825904
4
Counts all occurences of a symbol in a string. Unicodeunsafe (because using `.split()`).
function count_occurences(symbol, string) { var count = 0; // Using `.split('')` to iterate through a string here // to avoid requiring `Symbol.iterator` polyfill. // `.split('')` is generally not safe for Unicode, // but in this particular case for counting brackets it is safe. // for (const character of string...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countOccurences(symbol, string) {\n var count = 0; // Using `.split('')` to iterate through a string here\n // to avoid requiring `Symbol.iterator` polyfill.\n // `.split('')` is generally not safe for Unicode,\n // but in this particular case for counting brackets it is safe.\n // for (const charact...
[ "0.78182507", "0.7805059", "0.7474349", "0.68063754", "0.67632335", "0.6685729", "0.6632167", "0.65546864", "0.6519316", "0.65167797", "0.6495341", "0.64880174", "0.64689696", "0.6448537", "0.6436276", "0.6436276", "0.6385123", "0.6348225", "0.6348225", "0.63335335", "0.63188...
0.7864367
1
Repeats a string (or a symbol) N times.
function repeat(string, times) { if (times < 1) { return ''; } var result = ''; while (times > 1) { if (times & 1) { result += string; } times >>= 1; string += string; } return result + string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function repeatStringNTimes(string, repCount) {\n let result = string.repeat(repCount);\n console.log(result);\n}", "function repeatNtimes(str, num) {\n\t//code here\n\tlet strg = \"\";\n\tlet i = 0;\n\twhile (i < num) {\n\t\tstrg += str;\n\t\ti++;\n\t}\n\treturn strg;\n}", "function repeat(string, numbe...
[ "0.83617383", "0.8004407", "0.7928135", "0.79205185", "0.78202456", "0.7804354", "0.7804089", "0.7804089", "0.7804089", "0.7795475", "0.7794175", "0.77929145", "0.7783571", "0.7754906", "0.7731761", "0.7679467", "0.7675651", "0.76433367", "0.7623824", "0.76178795", "0.7584655...
0.75195557
31
Calculates and returns the transformation matrices for the object afected by a circular animation, during its motion.
apply() { var transMatrix = mat4.create(); mat4.identity(transMatrix); mat4.translate(transMatrix, transMatrix, [this.centerX, this.centerY, this.centerZ]); mat4.translate(transMatrix, transMatrix, this.position); mat4.rotate(transMatrix, transMatrix, this.angle, [0, 1, 0]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "apply(){\n var transform = mat4.create();\n mat4.identity(transform);\n\n mat4.translate(transform, transform, [this.x_center,this.y_center,this.z_center]);\n mat4.rotate(transform, transform, this.elapsedAngle, [0, 1, 0]);\n\n mat4.translate(transform,transform,[this.radius,0,0]...
[ "0.66506994", "0.6576047", "0.6569144", "0.6220256", "0.6176523", "0.61606276", "0.60451156", "0.6043062", "0.5992905", "0.59546566", "0.5931103", "0.588292", "0.5827123", "0.5765041", "0.5702478", "0.56704324", "0.5668506", "0.55960613", "0.55837333", "0.55837333", "0.558080...
0.5974802
9
!After each loop, keydowns are cleared, as polling speed is fixed !and may not be in sync with the controllers.
clear_keydowns() { clear(this.keydowns); clear(this.quick_access); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loopReset() {\n controllerState.mouse.wheel = false;\n controllerState.mouse.rightClick = 0;\n controllerState.mouse.centralClick = 0;\n controllerState.mouse.leftClick = 0;\n\n controllerState.keyboard = [];\n\n drawingPile = [];\n }", "function clearAllKeyb...
[ "0.70334595", "0.68784595", "0.678124", "0.67361355", "0.666055", "0.65541804", "0.6495834", "0.6449208", "0.643256", "0.6429238", "0.63893723", "0.63500905", "0.62690693", "0.62554276", "0.6254647", "0.6254304", "0.6248337", "0.6197667", "0.6172471", "0.61653054", "0.6165305...
0.71228844
0
Samme bare for skuespillerer
function search_actor(search){ var sResult = []; for(let films in search_results){ var film = search_results[films]; if(film.folk){ if(film.folk.toLowerCase().includes(search.toLowerCase())){ actor.innerHTML+= "<li><a href= \"show_movie.html?id=" + films + "\">" + film.otitle + "</a> </li> <br>"; } }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sprinkles() {\n\n\t}", "function takeShurikenHandler() {\n \ttakeShurikens(1);\n }", "function SarahPlayerPunishGirls() {\n\tif (SarahShackled()) SarahUnlock();\n\tif (Amanda != null) Amanda.Stage = \"1000\";\n\tif (Sarah != null) Sarah.Stage = \"1000\";\n}", "function shivering() {\n\tfindHau...
[ "0.66175824", "0.6554416", "0.6021916", "0.599511", "0.58614683", "0.5837329", "0.582087", "0.5741177", "0.5736667", "0.57291824", "0.57122904", "0.57010156", "0.5676156", "0.5665643", "0.5648176", "0.5639669", "0.5626021", "0.5613091", "0.56053764", "0.55225694", "0.5511849"...
0.0
-1
Samme bare for sjangere
function search_genre(search){ var sResult = []; for(let films in search_results){ var film = search_results[films]; if(film.genre){ if(film.genre.toLowerCase().includes(search.toLowerCase())){ genre.innerHTML+= "<li><a href= \"show_movie.html?id=" + films + "\">" + film.otitle + "</a> </li> <br>"; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sprinkles() {\n\n\t}", "function wa(){}", "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "function Ha(){}", "function takeShurikenHandler() {\n \ttakeShurikens(1);\n }", "function Komunalne() {}", "function Sarissa...
[ "0.61599314", "0.59618145", "0.5932377", "0.5912758", "0.5890885", "0.57584757", "0.57537305", "0.57510066", "0.5734651", "0.5734651", "0.5734651", "0.57253516", "0.57213104", "0.56559294", "0.5646165", "0.56419045", "0.56290203", "0.56272143", "0.5625147", "0.5609595", "0.55...
0.0
-1
Samme bare for land
function search_country(search){ var sResult = []; for(let films in search_results){ var film = search_results[films]; if(film.country){ if(film.country.toLowerCase().includes(search.toLowerCase())){ country.innerHTML+= "<li><a href= \"show_movie.html?id=" + films + "\">" + film.otitle + "</a> </li> <br>"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "landBlock () {\n for (let x = 0; x < this.actualBlock.shape.length; x++) {\n for (let y = 0; y < this.actualBlock.shape[x].length; y++) {\n if (this.actualBlock.shape[x][y] === 1) {\n this.landed[this.actualBlock.x + x][this.actualBlock.y + y] = this.actualBlock.type\n }\n }\n ...
[ "0.59381306", "0.5826248", "0.5809507", "0.5805769", "0.57945293", "0.57945293", "0.5787387", "0.5784332", "0.57755166", "0.57169175", "0.57154167", "0.5669429", "0.56006765", "0.5598133", "0.55932015", "0.5547325", "0.55089307", "0.54994935", "0.54994935", "0.54983544", "0.5...
0.0
-1
Servive implementation goes bellow ////////////// / Get all staff member details.
function getAllStaffMembers() { return $http.get(staffUrl) .then(getDataCallback); // Get data success callback. function getDataCallback(response, status, headers, config) { return response.data; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStaff(){\n Synergy4Service.getSynergyStaff($scope.totalSynergyKey).then(function(success){\n if(success.data){\n $scope.data = success.data;\n sortEmails2(success.data, success.data.length);\n }\n });\n }", "static getAllStaffm(query) {\n retur...
[ "0.7006336", "0.6712478", "0.65654343", "0.63738614", "0.63343143", "0.6285018", "0.6176678", "0.6141522", "0.60760325", "0.6075446", "0.60419554", "0.6019875", "0.6012397", "0.6007173", "0.5981391", "0.598041", "0.598041", "0.59682465", "0.5959235", "0.5952083", "0.5939497",...
0.7995146
0
Get data success callback.
function getDataCallback(response, status, headers, config) { return response.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SuccessCallback(data, status, headers, config) {\n debugger;\n return data.data;\n }", "function onSuccess(data) {\n console.log(data);\n }", "function onSuccess(data) {\n console.log(data);\n }", "function get_data() {}", "function onSuccess(data) {\n conso...
[ "0.7606245", "0.7140067", "0.7140067", "0.69827557", "0.6883609", "0.68295926", "0.66533786", "0.65702885", "0.6568794", "0.65427804", "0.65122557", "0.64854527", "0.6451619", "0.6444553", "0.64299566", "0.6406934", "0.6384629", "0.6378036", "0.63540614", "0.63289905", "0.631...
0.7320589
1
Since AngularJS caches services, we need to give each transient service a distinct name. This guarantees that the injection code (above) will be called.
function modifyInjection(injection) { var result = injection; if (angular.isArray(injection)) { result = []; angular.forEach(injection, function (item) { var match = angular.isString(item) ? item.match(/^(.* as transient)(\d*).*$/) : null; var new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInternalInjector(cache, factory) { // 4469\n // 4470\n function getService(serviceName, caller) { ...
[ "0.6499814", "0.6069107", "0.59508103", "0.5925692", "0.5895756", "0.58799684", "0.5784896", "0.5700052", "0.561463", "0.5606401", "0.56018686", "0.55931216", "0.55729973", "0.55729973", "0.55549055", "0.5533821", "0.54888344", "0.54630226", "0.5461508", "0.54590213", "0.5444...
0.5479876
17
Opening the dialog for adding attraction the view time
function addingAttraction(recordCounter) { $("#addingAttraction") .data("recordCounter", recordCounter) .dialog("open"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onShowEstimation(){\n \tvar rest = new Ab.view.Restriction();\n\trest.addClause(\"wr.wr_id\",$(\"wr.wr_id\").value,\"=\");\n\tView.openDialog(\"ab-helpdesk-workrequest-estimation.axvw\",rest,false);\n}", "function viewDate(appuntamento_id, appuntamento_utente_id, appuntamento_title, appuntamento_start, ...
[ "0.61011803", "0.6015918", "0.600382", "0.5993185", "0.5977822", "0.58991295", "0.5831983", "0.5767572", "0.5711534", "0.564276", "0.5612024", "0.5590188", "0.5588757", "0.55464983", "0.55276024", "0.55189", "0.5497935", "0.54970294", "0.5480432", "0.54707927", "0.54701215", ...
0.5516312
16
Changing the Order List
function IsOrderUpdated(destinationAttractionId, recordCount, isUp, breakInformationId) { var angularScope = angular.element(document.getElementById('main')).scope(); angularScope.$apply(function () { angularScope.IsOrderUpdated(destinationAttractionId, recordCount, isUp, breakInformationId); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set order(value) {}", "set order(value) {}", "set sortingOrder(value) {}", "function updateOrder(){\n\t\t\telement.find(\"li\").each(function(i){\n\t\t\t\ti++;\n\t\t\t\tvar li = $(this);\n\t\t\t\tli.find(\"input.order\").val(i);\n\t\t\t});\n\t\t}", "function displayOrder(){\n setOrderHeader();\n se...
[ "0.7801929", "0.7801929", "0.72311884", "0.70351696", "0.680787", "0.66067356", "0.6585931", "0.6577859", "0.6574779", "0.6535854", "0.64924425", "0.6478444", "0.64699584", "0.64458925", "0.6436074", "0.64209306", "0.6414636", "0.6406994", "0.6385576", "0.63710284", "0.636138...
0.0
-1
Updating the tour information
function UpdateTourInformation() { var parameter = $(this).data("recordCounter"); var angularScope = angular.element(document.getElementById('main')).scope(); angularScope.$apply(function () { angularScope.UpdateTourInformation(parameter,$("#ViewTime").val()); }); $(this).dialog("c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupTourInfo() {\n //$(\"#setTourPoint\").click(setTourPoint);\n $(\"#saveTour\").click(function (e) {\n tourCanvas.saveTour(e);\n });\n $(\"#restoreTour\").click(function (e) {\n tourCanvas.restoreTour();\n });\n $(\"#addTourPoint\").click(function (e) {\n tourCanv...
[ "0.6499043", "0.647907", "0.6233232", "0.6128385", "0.61248595", "0.6025934", "0.5969219", "0.5968199", "0.58924514", "0.5847504", "0.5811436", "0.58042955", "0.5784624", "0.57622147", "0.57130307", "0.56866604", "0.56676525", "0.5652166", "0.5647094", "0.5646796", "0.5645989...
0.0
-1
TBD: setting handleExceptions=true causes memory leak
function getTransports(opts) { var options = opts || {}, fileOptions = options.file, consoleOptions = options.console || {}, transports = [new winston.transports.Console({ level: consoleOptions.level || 'debug', handleExceptions: typeof consoleOptions.handleExceptions...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_runtime_exceptions() {\n process.on('uncaughtException', function(err) {\n\tif ( err.rs ) {\n\t if ( err.message === cfg.MYSQL_STUPID_EXCEPTION ) {\n\t\tD.log('Ignoring stupid MySQL shutdown exception');\n\t\treturn;\n\t }\n\t var http_code = err.http_code ? err.http_code : C.HTTP_BAD_R...
[ "0.5876057", "0.5839644", "0.565974", "0.5576502", "0.5576502", "0.5499954", "0.5455269", "0.5418498", "0.53788227", "0.5364995", "0.53168905", "0.52973115", "0.52939105", "0.52514935", "0.5209547", "0.5142338", "0.5138349", "0.51114374", "0.5106518", "0.5094994", "0.5084527"...
0.0
-1
Borra marcadores del mapa y del array
function deleteMarkers() { var i; for (i = 0; i < markers.length; i++) { markers[i].setMap(null); } markers = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index_limpiarMapa() {\n\tobjetoLineas.setPath([]);\n\tobjetoLineas.setMap(map);\n\tarrayPuntos = new Array();\n\t\n\tif (arrayMarcas.length > 0) {\n\t\tfor (var x = 0; x < arrayMarcas.length; x++) {\n\t\t\tarrayMarcas[x].setMap(null);\n\t\t}\n\t}\n\t\t\n\tarrayMarcas = new Array();\n\t\n\tfor (var x = 0; ...
[ "0.7546528", "0.7355098", "0.71470517", "0.71470517", "0.671517", "0.6641057", "0.66127396", "0.6532057", "0.650729", "0.6500025", "0.6418472", "0.639658", "0.6379117", "0.634917", "0.6237521", "0.6169555", "0.61416924", "0.6136886", "0.6082959", "0.6073555", "0.60664904", ...
0.0
-1
busca una direccion y crea un marcador
function findAddress(address, callback) { if (markerAux) { markerAux.setMap(null); } geocoder.geocode({'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearCarpeta(path){fs.mkdir(path, { recursive: true }, (err) => {if (err) throw err;});}", "function criarDiretorios(element) {\n let newElemento = {} \n let tipo = element.TIPO\n\n \n if(tipo!=='CARTAFRETE') {\n sendLog('AVISO',`(005) Não é CARTAFRETE. (${JSON.stringify(elem...
[ "0.6574335", "0.64615905", "0.6116785", "0.60795206", "0.5992327", "0.5827646", "0.5822021", "0.5818058", "0.58011246", "0.5710341", "0.56827134", "0.56735265", "0.56296074", "0.55725724", "0.5548575", "0.5532275", "0.55280936", "0.5526662", "0.5509156", "0.54977673", "0.5492...
0.0
-1
Process the conversation response.
function processResponse(err, response) { if (err) { console.error(err); // something went wrong return; } // var endConversation = false; // // Check for action flags. // console.log(response.output.text[0]); // // If we're not done, prompt for the next round of input. // if (!endConversat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processResponse(){\n //\n }", "function responseHandler(data) {\n\n let action = data.output.action;\n\n if (data && !data.output.error) {\n // Check if message is handled by retrieve and rank and there is no message set\n if (action && !data.output.text) {\n // TODO add EIR l...
[ "0.6313099", "0.6229528", "0.62125444", "0.616951", "0.6164162", "0.606723", "0.59740657", "0.59429437", "0.58676326", "0.5854445", "0.5846019", "0.5817326", "0.58138674", "0.57908446", "0.578841", "0.5777275", "0.57681334", "0.57453805", "0.57405806", "0.57349175", "0.573491...
0.7471266
0
Calculates the Euclidian distance between the target color and the actual color
function getColorDistance(target, actual) { return Math.sqrt( (target.r - actual.r) * (target.r - actual.r) + (target.g - actual.g) * (target.g - actual.g) + (target.b - actual.b) * (target.b - actual.b) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColorDistance(target, actual) {\n return Math.sqrt(\n (target.r - actual.r) * (target.r - actual.r) +\n (target.g - actual.g) * (target.g - actual.g) +\n (target.b - actual.b) * (target.b - actual.b)\n );\n }", "function colorDistance(e1, e2) {\n //console.log(\"e1e2a: \"...
[ "0.78587836", "0.77666026", "0.7498544", "0.66812855", "0.666341", "0.648423", "0.6479509", "0.6257133", "0.6208685", "0.61585724", "0.60636586", "0.6048348", "0.59792507", "0.5958305", "0.5904769", "0.588193", "0.58504987", "0.5822596", "0.575454", "0.57476157", "0.5747317",...
0.78278846
2
Returns the color at the specified x/y location in the webcam video feed
function getColorAt(webcam, x, y) { // To be able to access pixel data from the webcam feed, we must first draw the current frame in // a temporary canvas. var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); canvas.width = webcam.width; canvas.height = webcam.height; con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColorAt(webcam, x, y) {\n\n // To be able to access pixel data from the webcam feed, we must first draw the current frame in\n // a temporary canvas.\n var canvas = document.createElement('canvas');\n var context = canvas.getContext('2d');\n canvas.width = webcam.width;\n canvas.height = webcam.h...
[ "0.842827", "0.74236685", "0.7208618", "0.7152968", "0.6952535", "0.6912741", "0.6912741", "0.68511564", "0.680527", "0.6798069", "0.6794621", "0.67120767", "0.67091954", "0.6694575", "0.66788775", "0.66610736", "0.66610736", "0.66165847", "0.6562042", "0.64573187", "0.643577...
0.8461016
0
Draw a colored rectangle on the canvas
function drawRect(rect, context, color) { context.strokeStyle = "rgb(" + color.r + ", " + color.g + ", " + color.b + ")"; context.strokeRect(rect.x, rect.y, rect.width, rect.height); console.log("Rect x, Rect y"); console.log(rect.x); console.log(rect.y); console.log("Volume"); if(on == true){ setV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawRectangle(x,y,width,height,color){\r\n ctx.fillStyle = color;\r\n ctx.fillRect(x,y,width,height);\r\n}", "function drawRectangle(begX,begY,theWidth,theHeight,theColor) {\n var canvas = document.getElementById(\"myCanvas\");\n var ctx = canvas.getContext(\"2d\");\n ctx.fillStyle = theC...
[ "0.8335499", "0.8144203", "0.81309503", "0.8084713", "0.80715424", "0.80153733", "0.7989304", "0.7986867", "0.7983781", "0.79798377", "0.79728144", "0.7949332", "0.79182464", "0.7900938", "0.7870363", "0.775507", "0.774797", "0.7722311", "0.7688833", "0.7680262", "0.76539564"...
0.0
-1
react sends 3 additional events after bind specified one 1) SyntheticFocusEvent 2) reactID 3) Event blur(ref, event, reactid, a)
blur(ref, event) { //TODO: LEFT OFF HERE //check if all 5 numbers are available let values = []; this.insertBalls (values, this.refs.ball1.value); this.insertBalls (values, this.refs.ball2.value); this.insertBalls (values, this.refs.ball3.value); this.insertBall...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleBlured(event) {\n this.setState({\n focused: false\n });\n\n if (typeof this.props.onBlur === 'function') {\n this.props.onBlur(event, { focused: false, value: event.target.value });\n }\n }", "_onBlur(event) {\n this.focused = false;\n this.setState({ active: false });\n\n ...
[ "0.75893545", "0.6970225", "0.6925173", "0.6832614", "0.6822472", "0.672599", "0.67100525", "0.6670109", "0.6664266", "0.6623448", "0.66203046", "0.6615722", "0.65575606", "0.64542204", "0.6447593", "0.63968086", "0.63850117", "0.6383823", "0.6383823", "0.6383823", "0.6366396...
0.57976234
83
This does a function call to Python. We assign the FFIDs, so we can assign them and send the call to Python. We also need to keep track of the Python objects so we can GC them.
async call (ffid, stack, args, kwargs, set, timeout) { const r = nextReq() const req = { r, c: 'pyi', action: set ? 'setval' : 'pcall', ffid: ffid, key: stack, val: [args, kwargs] } const payload = JSON.stringify(req, (k, v) => { if (!k) return v if (v && !v.r) { if (v.ffid) return { ffi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FF() {}", "function funcCall(f, p, e, fr){\n\t//stack of function arguments => [0] is the first argument\n\tthis._args = [];\t\t\t//=> ARRAY<CONTENT or ENTITY>\n\t//return value for the function\n\tthis._returnVal = null;\t\t//=> CONTENT or ENTITY\n\t//functinoid reference\n\tthis._funcRef = f;\t\t\t//=...
[ "0.53967154", "0.5174609", "0.50986606", "0.50986606", "0.50591385", "0.5050832", "0.49941906", "0.49720368", "0.49536774", "0.49498692", "0.48884276", "0.48620713", "0.48455888", "0.48155093", "0.4808659", "0.48077148", "0.48070505", "0.48032615", "0.4792435", "0.47804123", ...
0.68092203
0
1 2 3 [4,5,6]
function f2(...a) { console.log(a); console.log(...a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function data(){\n return [1,2,3]; \n}", "function data(){\n return [1,2,3]; \n}", "function i(t,e){for(var n,r=0,o=t.length;r<o;r++)n=t[r],Array.isArray(n)?i(n,e):e.push(n);return e}", "function fk() {\n return [1,2];\n}", "function f() {\n return [1, 2]; // [1 , 2]\n}", "function arrayToList(...
[ "0.6384903", "0.6384903", "0.6353734", "0.6350844", "0.63491577", "0.6300753", "0.6268931", "0.6268931", "0.6128241", "0.60415995", "0.6022923", "0.6022923", "0.6022923", "0.60174745", "0.6010367", "0.59920484", "0.59912235", "0.59912235", "0.59793794", "0.5975927", "0.594458...
0.0
-1
Convinent function to add a shape, because it is so clumsy to add a object into box2D world.
function addShape(world, positionVector, options, addShapeFunc){ var options = options || {}; var bd = new b2BodyDef(); bd.position = positionVector; for (var i in options){ if (typeof bd[i] !== 'undefined' && typeof options[i] !== 'undefined') { bd[i] = options[i]; } } var body = world.CreateBody(bd); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Shape2(){}", "function spawnShape() {\n let shape = new Shape(this.BAG[0], createVector(5, -2))\n this.SHAPE_LIST.push(shape)\n this.CURRENT_SHAPE = shape\n this.BAG.shift()\n\n if (this.BAG.length === 0) {\n fillBag()\n }\n}", "function addTheShape (shapeLayer, grpName, shape...
[ "0.7219996", "0.7040246", "0.6963364", "0.69356334", "0.69356334", "0.6904575", "0.68821645", "0.68527496", "0.6830273", "0.68192315", "0.67976636", "0.6788988", "0.6767309", "0.67483246", "0.66400236", "0.657928", "0.6573242", "0.656365", "0.64792776", "0.6471303", "0.646125...
0.68686247
7
recibe como parametro el objeto desencadenante del evento.
function mostrar(e) { zonaDatos.innerHTML = e.target.responseText; // si tenemos un video por ej: //zonaDatos.innerHTML = "Archivo leído!"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregarValorX(boton){\n parametroX = boton.variable;\n}", "function xl_GetEventTarg(e) \n{\n\tvar EventObj; \n\tvar e = xl_GetEvent(e); \n\t\n\tif (e.target) EventObj = e.target;\n\telse if (e.srcElement) EventObj = e.srcElement;\n\t\n\treturn EventObj; \n}", "function onInputChange(e) {\n consol...
[ "0.5594868", "0.55938315", "0.55376273", "0.5524604", "0.5521936", "0.53499925", "0.5310099", "0.529616", "0.5223879", "0.5213401", "0.5192037", "0.51723975", "0.516126", "0.51588327", "0.51458573", "0.51321834", "0.5132046", "0.5129837", "0.5117441", "0.50962526", "0.5079563...
0.0
-1
Scenarios: valid dir invalid dir default bower dir (valid, invalid) custom bower dir (valid, invalid) npm dir (valid, invalid)
function initTestDirs(done){ ncp( './test/fixtures/', './tmp/', {clobber: false}, function(err){ if (err){ // error done(err); } else { var isWindows = os.platform() == 'win32'; var linkType = isWindows ? 'junction' : 'dir'; // Link all the paths. for (var i in testLinks...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkProj(dir) {\n if (fs.existsSync(dir)) {\n if (fs.existsSync(path.join(dir, 'src'))) {\n atom.notifications.addError(`Your directory \"src\" cannot be replaced`);\n return false;\n } else if (fs.existsSync(path.join(dir, 'package.json'))) {\n atom.notifications.addError(`Your ...
[ "0.6145448", "0.57346714", "0.5680548", "0.5510741", "0.54330254", "0.5357477", "0.5288526", "0.5285919", "0.52795213", "0.5264765", "0.52585834", "0.5249195", "0.5219399", "0.5205284", "0.5158573", "0.5155361", "0.51417875", "0.5130591", "0.51214933", "0.51183546", "0.510729...
0.0
-1
define the factorial function (dynamic programming)
function factorial(num) { // ensure default size of DP array is always 2 let dpArr = new Array(num + 1); // initialize first 2 elements of DP array dpArr[0] = 1; // initialize the rest of the DP array for (let i = 1; i <= num; i++) { dpArr[i] = i * dpArr[i - 1]; } return dpArr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factorial(num){\n \n}", "function factorial(num){\n \n}", "function factorial(n) {\n\n}", "function factorial(num) {\n \n}", "function factorial() {\nvar x = currentInput ;\nfor (i = 1; i < x ; i++)\ncurrentInput = currentInput * (x - i)\ndisplayCurrentInput();\n}", "function factorial(n)...
[ "0.80410254", "0.80410254", "0.8010507", "0.80068076", "0.7702863", "0.7689703", "0.7653384", "0.76444155", "0.7635206", "0.7624547", "0.7621948", "0.7616128", "0.7614661", "0.7607555", "0.760661", "0.7593302", "0.75897825", "0.75781065", "0.7573701", "0.75683016", "0.7563455...
0.0
-1
define the permutation function (uses dp factorial function)
function permutation(n, r) { return factorial(n) / factorial(n - r); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function p(n,k) {\n let permutations = 1;\n for (let i = 0; i < k; i++) {\n permutations *= (n - i);\n }\n return permutations;\n }", "function factorial(n) {\n\n}", "function factorial(num){\n \n}", "function factorial(num){\n \n}", "function factorial(num) {\n \n}", ...
[ "0.6442285", "0.6413231", "0.62523246", "0.62523246", "0.6210245", "0.61868787", "0.61787665", "0.61469066", "0.6141084", "0.6086646", "0.6054683", "0.6054404", "0.6040858", "0.6022495", "0.59948725", "0.59835637", "0.59810406", "0.5979797", "0.59763986", "0.59708667", "0.596...
0.7018768
0
define the combination function (uses dp factorial function)
function combination(n, r) { return factorial(n) / (factorial(n - r) * factorial(r)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combination(n, r) {\n function factorial(n) {\n if (n <= 1)\n return 1;\n\n return n * factorial(n - 1);\n }\n return factorial(n) / (factorial(r) * factorial(n - r));\n}", "function combination_Function(a, b) { //Function returns a and b*c\n return (a + b) *c;\n}", "function factori...
[ "0.666905", "0.64114374", "0.6255524", "0.6187048", "0.61454844", "0.61454844", "0.6087473", "0.6073304", "0.60194695", "0.5930377", "0.58938366", "0.5869575", "0.586503", "0.5857161", "0.5828194", "0.5816882", "0.58100104", "0.58033895", "0.57883304", "0.5767614", "0.575919"...
0.6582662
1
We are creating our DataStore immediately after a component is mounted
componentDidMount() { this.onFetchData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n console.log('initializing store...')\n }", "constructor() {\n this.#database = new Datastore({\n filename: \"./server/database/rooms.db\",\n autoload: true,\n });\n }", "componentWillMount() {\n this.createDataSource();\n }", "async function init() {\n const store = await...
[ "0.6942269", "0.6803494", "0.6758831", "0.67550814", "0.6751143", "0.6751143", "0.66622186", "0.6563651", "0.6515451", "0.65105456", "0.65080684", "0.6496925", "0.640609", "0.63688296", "0.6364751", "0.63604873", "0.6357605", "0.63420683", "0.63173044", "0.63149214", "0.63095...
0.0
-1
Allow people to change the name of their hero using window.prompt
function enterName(){ hero.name = prompt("Please enter your hero name!"); if (hero.name != null) { document.getElementById("name").innerHTML = `Hero Name: ${hero.name}` } else { return true; }; displayStats() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function askName(){\n playerName=prompt(\"Introduce tu nombre\", \"Jugador\");\n}", "function setNames(){\r\n //prompts up a name for both comp and player and then displays it in appropriate area\r\n let playerName=prompt('Please enter your name','')\r\n document.getElementById('p-name').innerHTML=pl...
[ "0.7549757", "0.7325846", "0.7229532", "0.70963025", "0.7071505", "0.70533097", "0.7046059", "0.70102197", "0.6943938", "0.6916545", "0.6899638", "0.6893457", "0.6879952", "0.6875476", "0.6874537", "0.6869452", "0.68302405", "0.6821201", "0.68079865", "0.67965686", "0.6786509...
0.7340517
1
Write displayStats function that writes your hero's name, health, weapontype, weapon damage to the page. Call it at the end of your script
function displayStats(){ document.getElementById("healthLevel").innerHTML = `Health Level: ${hero.health}` }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayHeroStats(){\n const heroStats = document.getElementById('herostats')\n heroStats.innerHTML = `Hero name: ${ hero.name }<br>Health: ${ hero.health }<br>Weapon: ${ hero.weapon.type }<br>Damage: ${ hero.weapon.damage }`\n // const enemyStats = document.getElementById('enemystats')\n // en...
[ "0.74026257", "0.73052144", "0.7283563", "0.7149887", "0.70762795", "0.7047979", "0.6993928", "0.6907786", "0.68912536", "0.6873365", "0.6856747", "0.6855625", "0.67732704", "0.6759059", "0.6749173", "0.66676915", "0.6667192", "0.66301084", "0.6625119", "0.661225", "0.6530098...
0.7574521
0
parse response on constructor
constructor(response) { this.response = response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(response) {\n Object.assign(this, response); //Assign data properties to Class TODO\n }", "constructor(resp) {\r\n this.status = resp.statusCode;\r\n this.headers = resp.headers;\r\n let body = resp.body || \"\";\r\n this.text = _.isString(body) ? body : JSON.stringify(body);\r\...
[ "0.7458527", "0.7238342", "0.6714745", "0.6642873", "0.6603877", "0.63849896", "0.63573873", "0.6309227", "0.62900585", "0.62877077", "0.62748164", "0.62700707", "0.61868423", "0.6164963", "0.61577684", "0.615442", "0.61489016", "0.6126828", "0.6002653", "0.6002653", "0.59963...
0.7190675
2
Add value to array by pushing
push(value) { if (this.length >= this._capacity) { this._resize((this.length + 1) * Array.SIZE_RATIO); } memory.set(this.ptr + this.length, value); this.length++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "push(value) {\n this.array.push(value);\n }", "push(value) {\n this.array.push(value);\n }", "function add(array, value) {\n array.push(value);\n return value;\n}", "push(value) {\n if (this.size + 1 > this.elements.length) {\n const newArray = new PlainArray(Math.max(this.size * ...
[ "0.780185", "0.780185", "0.77315724", "0.7730764", "0.73983616", "0.73839414", "0.73609054", "0.7349143", "0.7328292", "0.727167", "0.7248289", "0.7183311", "0.71801305", "0.71735513", "0.7160242", "0.7124884", "0.7119435", "0.71144706", "0.71144706", "0.7110954", "0.71094096...
0.69839734
28
Allocate more memory for array
_resize(size) { const oldPtr = this.ptr; this.ptr = memory.allocate(size); if (this.ptr === null) { throw new Error("Out of memory"); } memory.copy(this.ptr, oldPtr, this.length); memory.free(oldPtr); this._capacity = size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mainmore(){\n Array.SIZE_RATIO = 3;\n let arr = new Array();\n arr.push(3);\n arr.push(5);\n arr.push(15);\n arr.push(19);\n arr.push(45);\n arr.push(10);\n console.log(arr);\n console.log(arr.length);\n console.log(arr._capacity);\n}", "constructor() {\n //starts...
[ "0.69584656", "0.6632512", "0.638512", "0.638512", "0.62689936", "0.6257307", "0.6237484", "0.62062734", "0.62062734", "0.6175418", "0.61317295", "0.61217284", "0.61217284", "0.61217284", "0.61217284", "0.60686386", "0.60590696", "0.60244495", "0.5996213", "0.5996213", "0.599...
0.0
-1
Retrieve a value by index
get(index) { if (index < 0 || index >= this.length) { throw new Error("Index error"); } return memory.get(this.ptr + index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAt(idx) {\n return this._get(idx).val;\n }", "get(idx) {\n\n }", "getAt(idx) {\n if(idx >= this.length || idx < 0) {\n throw new Error(\"Invalid index.\");\n }\n return this._get(idx).val;\n }", "getValue(index) {\n let node = this.findNode(index);\n let data = node ? node.value ...
[ "0.76219654", "0.7610309", "0.7584766", "0.74378324", "0.7402553", "0.7379067", "0.7373611", "0.7373611", "0.7373611", "0.7371905", "0.7341727", "0.7327562", "0.72582346", "0.71497494", "0.7127804", "0.7117093", "0.7080173", "0.7080173", "0.7080173", "0.7080173", "0.7080173",...
0.7440781
3
Remove a value from the end of the array
pop() { if (this.length === 0) { throw new Error("Index error"); } const value = memory.get(this.ptr + this.length - 1); this.length--; return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destructivelyRemoveElementFromEndOfArray(array){\narray.pop();\nreturn array;\n}", "function removeElementFromEndOfArray(array){\nreturn array.slice(0,array.length-1);\n}", "function removeElementFromEndOfArray(array){\nreturn array.slice(0,array.length -1);\n}", "function destructivelyRemoveElemen...
[ "0.7719778", "0.7703535", "0.76529914", "0.7638803", "0.7635632", "0.7619875", "0.7616331", "0.7611079", "0.75401294", "0.75358444", "0.7527996", "0.750653", "0.7502865", "0.7492354", "0.7388654", "0.73607564", "0.7330968", "0.7299171", "0.72975844", "0.7262878", "0.72390693"...
0.0
-1
Insert value into array at a given index
insert(index, value) { if (index < 0 || index >= this.length) { throw new Error("Index error"); } if (this.length >= this._capacity) { this._resize((this.length + 1) * Array.SIZE_RATIO); } memory.copy(this.ptr + index + 1, this.ptr + index, this.length - index); memory.set(this.ptr +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InsertArrayElementAtIndex() {}", "function arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n var end = array.length;\n\n while (end > index) {\n var previousEnd = end - 1;\n array[end] = array[p...
[ "0.8016812", "0.7954354", "0.79516196", "0.7917473", "0.7916316", "0.7916316", "0.79008925", "0.78792375", "0.7851453", "0.78392947", "0.78392947", "0.78392947", "0.78392947", "0.78392947", "0.78392947", "0.78392947", "0.78177595", "0.78079313", "0.7778957", "0.7770113", "0.7...
0.7722641
23
Remove values from the array at a given index
remove(index) { if (index < 0 || index >= this.length) { throw new Error("Index error"); } memory.copy( this.ptr + index, this.ptr + index + 1, this.length - index - 1 ); this.length--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(arr, index) {\n\n let new_arr = arr.filter(function (val, i) {\n return i != index;\n });\n\n return new_arr;\n }", "__remove_arr(arr, index) {\n let new_arr = arr.filter(function (val, i) {\n return !index.includes(i)\n });\n\n return new...
[ "0.8196276", "0.8144561", "0.79840374", "0.78603476", "0.78603476", "0.7787858", "0.7787858", "0.7787858", "0.7787858", "0.77074736", "0.7654442", "0.7651103", "0.76316184", "0.75442654", "0.7529431", "0.7513776", "0.74377626", "0.74362445", "0.7379343", "0.7323298", "0.73229...
0.68157506
52
Default (Root) View 1should list all available categories, which should link to a category view for that category 2should list all of the posts ordered by voteScore (highest score first) 3should have a control for changing the sort method for the list, including at minimum, order by voteScore and order by timestamp 4sh...
function mapStateToProps (store, ownprops) { const { postReducer, postsReducer, voteReducer, Comments} = store let comments = !Comments ? null : Object.values(Comments).reduce((a, b) => a.concat(b), []) let posts = !postsReducer ? null : Object.values(postsReducer)[0] let newPostVote = !voteReducer.id ? false :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewPosts(pst,category,limit){\n\n\tvar main = $(\"#postContainer\");\n\tmain.html(\"\");\n\tvar posts = pst;\n\tvar postsLength = posts.length;\n\tvar showMore = \"\";\n\tif(limit > postsLength){\n\t\tshowMore = \"\";\n\t}else{\n\t\tif(category){\n\t\t\tshowMore = '<button class=\"show-more btn btn-defau...
[ "0.59597254", "0.577933", "0.5635384", "0.552426", "0.5498932", "0.54946816", "0.5489213", "0.5476658", "0.5475455", "0.5468559", "0.5460361", "0.54555905", "0.5411592", "0.54075754", "0.5405146", "0.53903973", "0.53874743", "0.53368664", "0.5327428", "0.5318382", "0.5297468"...
0.0
-1
WARNING: capitalizing certain props could break other parts of WV that read these props, need to watch for that when integrating this code
function capitalizeFirstLetter(string) { return !string ? '' : string.charAt(0).toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nameProps(obj) {\n\n}", "static get properties() {\n return {\n \"cityProp\": {\n \"name\": \"cityProp\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflect\": true,\n \"attribute\": true,\n \"observer\": false\n },\n \"inputId\": {\n \"name\": \"inputId\",\n \"type\":...
[ "0.6270731", "0.6057865", "0.5984421", "0.59621227", "0.5949276", "0.5949252", "0.5899789", "0.5885904", "0.58703154", "0.58111066", "0.58111066", "0.5803876", "0.5781433", "0.5775003", "0.5759244", "0.57301897", "0.57299775", "0.571878", "0.56999826", "0.56955874", "0.569260...
0.0
-1
enables click tracking for sendgrid to know what recipients click
addClickTracking() { const trackingSettings = new helper.TrackingSettings(); const clickTracking = new helper.ClickTracking(true, true); trackingSettings.setClickTracking(clickTracking); this.addTrackingSettings(trackingSettings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addClickTracking() {\n //all sendgrid classes and methods\n\n const trackingSettings = new helper.TrackingSettings();\n const clickTracking = new helper.ClickTracking(true, true);\n\n trackingSettings.setClickTracking(clickTracking);\n this.addTrackingSettings(trackingSettings);\n }", "addClickTr...
[ "0.7916559", "0.7617628", "0.6868556", "0.6576912", "0.6498463", "0.6331137", "0.630861", "0.61985826", "0.59846634", "0.59422463", "0.5882376", "0.5797036", "0.57503605", "0.56144583", "0.56055343", "0.55943286", "0.55118966", "0.5505978", "0.5504367", "0.54937214", "0.54818...
0.6523135
5
async function to send the entire Mailer to sendgrid's api to send to recipients
async send() { const request = this.sgApi.emptyRequest({ method: "POST", path: "/v3/mail/send", body: this.toJSON() }); const response = await this.sgApi.API(request); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async send() {\n const request = this.sgApi.emptyRequest({\n method: 'POST',\n path: '/v3/mail/send',\n //toJSON() is defined by the helper.Mail base class\n body: this.toJSON()\n });\n\n //API() method is provided by the sendgrid library\n const response = await this.sgApi.API(requ...
[ "0.7787228", "0.77758914", "0.7214749", "0.7182045", "0.7180344", "0.7104711", "0.7103265", "0.7097485", "0.7063228", "0.702357", "0.7000533", "0.69282943", "0.692759", "0.6926658", "0.6904545", "0.69021976", "0.688024", "0.68765354", "0.6850258", "0.6835116", "0.6801333", ...
0.7171476
5
validasi poin (harus angka)
function isNumeric(poin){ if( $('#pointTB').val() != $('#pointTB').val().replace(/[^0-9]/g, '')){ // cek hanya angka $('#pointTB').val($('#pointTB').val().replace(/[^0-9]/g, '')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function angkaValid2(input,info,poin){\n\t\tvar n = $('#'+input).val();\n\n\t\tif($('#'+input).val()!=$('#'+input).val().replace(/[^0-9.]/g,'')){\n\t\t\t$('#'+input).val($('#'+input).val().replace(/[^0-9.]/g,''));\n\n\t\t\t$('#'+info).html('<span class=\"label label-important\"> hanya angka</span>').fadeIn();\n\t\...
[ "0.71336144", "0.6537804", "0.6529019", "0.6472896", "0.64371014", "0.64052945", "0.63819385", "0.63384503", "0.63329077", "0.63315535", "0.6324609", "0.6296111", "0.6280528", "0.6280528", "0.6279524", "0.6276536", "0.6230549", "0.6224784", "0.62234604", "0.6219464", "0.61998...
0.0
-1
end of hapus record kegiatan edit record kegiatan
function edittdonasi(id,tipe){ // alert(tipe); $.ajax({ url:dir, type:'get', data:'aksi=ambiledit&id_tdonasi='+id, dataType:'json', success:function(data){ if(data.status=='gagal'){ alert('database error'); }else{ kosongkan(); $('#idformTB').val(id); $('#typeH').val(tipe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EditRecord(Obj) {\n debugger;\n ChangeButtonPatchView('DepositAndWithdrawals', 'btnPatchAdd', 'EditOutGoing');\n var rowData = DataTables.OutGoingChequeTable.row($(Obj).parents('tr')).data();\n $('#OutGoingObj_ID').val(rowData.ID);\n PaintOutGoingCheques(rowData.ID);\n openNav();\n}", ...
[ "0.64022666", "0.639322", "0.6366374", "0.63086975", "0.6302152", "0.62855315", "0.6278886", "0.6269546", "0.62564045", "0.6256388", "0.62554526", "0.6239748", "0.62331945", "0.6207656", "0.6135855", "0.61071247", "0.6092083", "0.60887325", "0.6063151", "0.60597765", "0.60545...
0.59207875
33
simpan data ke database
function saveData(typ,add,idx){ var datax=''; var formData = $('form').serialize(); if(add!=''){ // ada upload file nya $.each(add.files, function(key, value){ formData +='&fileadd[]=' + value ; }); }else{ // tanpa upload file nya formData += formData; } if(typ=='add'){ //add aksi='tam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpanData(id, nama, stok, harga, deskripsi) {\n let tx = undefined;\n if (id == 0) {\n dbprom.then((db) => {\n tx = db.transaction('produk', 'readwrite'); //buka transaksi\n let dbstore = tx.objectStore('produk'); //pilih store ==>table\n return dbstore.a...
[ "0.62954456", "0.6092849", "0.6037005", "0.6031788", "0.6010718", "0.6010718", "0.595746", "0.5890358", "0.585508", "0.5835857", "0.58171785", "0.5801741", "0.57677466", "0.5756053", "0.5750628", "0.5699165", "0.5671323", "0.56496847", "0.5610248", "0.559823", "0.5591628", ...
0.0
-1
Empty the sack out
clear(){ this.master = []; this.unpickedKeys = new Set([]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n wipe_1.wipe(this.data);\n }", "clear() {\n\t\t\t\tthis.length = 0;\n\t\t\t}", "function Clear()\n{\n\tUnspawnAll();\n\tavailable.Clear();\n\tall.Clear();\n}", "clear() {}", "clear() {}", "clear() {}", "clear_queue() {\n this.queued.length = 0;\n }", "function empty() {...
[ "0.71254987", "0.71069765", "0.71041226", "0.6990994", "0.6990994", "0.6990994", "0.69436973", "0.6933264", "0.69030505", "0.6896184", "0.6896184", "0.6896184", "0.68013823", "0.6784981", "0.676591", "0.6742071", "0.674206", "0.6722476", "0.6720485", "0.670688", "0.6668374", ...
0.0
-1
Add any picked elements back into the sack and reset
reshuffle(){ this.unpickedKeys = new Set([...this.master.keys()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _reset () {\n _elements = [];\n }", "reset() {\n this._oe.reset('push');\n }", "clear(){\n this.master = [];\n this.unpickedKeys = new Set([]);\n }", "reset() {\r\n this.statesDone.clear();\r\n this.statesDone.push(this.initialState);\r\n }", "function cle...
[ "0.63618153", "0.614267", "0.61361367", "0.60997987", "0.6081305", "0.60749483", "0.6034514", "0.60089546", "0.5919916", "0.5913074", "0.59032035", "0.5893983", "0.5889442", "0.58856654", "0.58629984", "0.58561397", "0.58092105", "0.57974887", "0.57907784", "0.57381934", "0.5...
0.6150567
1
Select a key that hasn't been picked yet
_selectUnpickedKey(){ const values = Array.from(this.unpickedKeys); let randomIndex = Math.floor(Math.random() * this.unpickedKeys.size); return values[randomIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleSelection(key) {\n key = this.getKey(key);\n\n if (key == null) {\n return;\n }\n\n let keys = new $cc81f14158b02e1e259a5a46d24f0c$export$Selection(this.state.selectedKeys === 'all' ? this.getSelectAllKeys() : this.state.selectedKeys);\n\n if (keys.has(key)) {\n keys.delete(key); // ...
[ "0.68672216", "0.6729212", "0.6727991", "0.6606673", "0.6570575", "0.6427336", "0.629606", "0.60196567", "0.60155815", "0.5993965", "0.59576035", "0.5932082", "0.59129393", "0.5911155", "0.5911155", "0.5857469", "0.58138454", "0.57662725", "0.5705658", "0.57001483", "0.567848...
0.72048336
0
Normalize a port into a number, string, or false.
function normalizePort(val) { var port = parseInt(val, 10); if (isNaN(port)) { // named pipe return val; } if (port >= 0) { // port number return port; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalizePort(val){\n /**\n * Normalize a port into a number, string, or false.\n */\n var port = parseInt(val, 10);\n if (isNaN(port)) {\n // named pipe\n return val;\n }\n if (port >= 0) {\n // port number\n return port...
[ "0.8447796", "0.8434645", "0.8424954", "0.8402639", "0.83953214", "0.839435", "0.8387991", "0.8384593", "0.83790076", "0.83790076", "0.83711904", "0.83711904", "0.83711904", "0.83711904", "0.83711904", "0.83711904", "0.8370313", "0.83679503", "0.83601445", "0.8358881", "0.835...
0.0
-1
Event listener for HTTP server "error" event.
function onError(error) { if (error.syscall !== 'listen') { throw error; } var bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port; // handle specific listen errors with friendly messages switch (error.code) { case 'EACCES': console.error(bind + ' requires elevated privil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function httpOnError(error) {\n if (error.syscall !== 'listen') {\n throw error;\n }\n\n var bind = typeof port === 'string'\n ? 'Pipe ' + port\n : 'Port ' + port;\n\n // handle specific listen errors with friendly messages\n switch (error.code) {\n case 'EACCES':\n console.error(bind + '...
[ "0.7118962", "0.70567393", "0.70339364", "0.70246124", "0.6965733", "0.6882446", "0.68554044", "0.68311316", "0.6821094", "0.68109226", "0.6788116", "0.6782291", "0.6781704", "0.67701316", "0.6766919", "0.6750681", "0.6706457", "0.67013055", "0.66602784", "0.66561115", "0.664...
0.0
-1
Event listener for HTTP server "listening" event.
function onListening() { var addr = server.address(); var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port; debug('Listening on ' + bind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onListeningHTTP () {\n var addr = server.address()\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port\n debug('HTTP - Listening on ' + bind)\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' +...
[ "0.78544015", "0.7739864", "0.7633661", "0.7536681", "0.75315416", "0.73415786", "0.7334293", "0.7303103", "0.7302585", "0.7283272", "0.7272347", "0.72310024", "0.7227042", "0.7161825", "0.7126399", "0.7120529", "0.7105088", "0.7097603", "0.70819986", "0.7073328", "0.70719254...
0.0
-1
eslint nounusedvars:1 /eslint noconsole:0, semi: 2
function foo() { var bar; function zip() { var quux; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hello2() {\n const bye = \"bye\";\n\n /**\n * For disable the es-lint on the line\n * Please put the below comment\n * now instead of the error we will have the warning for below 2\n */\n // eslint-disable-next-line\n console.log(\"this is sample \", bye);\n\n /**\n * disabling a particular...
[ "0.64931285", "0.61262536", "0.59705794", "0.5900543", "0.5844026", "0.5830755", "0.5789989", "0.57310987", "0.5571289", "0.5534122", "0.5500614", "0.545606", "0.54104465", "0.54088855", "0.53836805", "0.5381826", "0.53802764", "0.5359616", "0.53462714", "0.5309088", "0.53054...
0.0
-1
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the ...
function divideLength(str, i) { return (parseInt(str) / i) + str.substring(str.length-2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.definePro...
[ "0.5982703", "0.5513585", "0.5513585", "0.5506823", "0.54280376", "0.53829443", "0.53619367", "0.5332809", "0.5332809", "0.5331315", "0.5275989", "0.5261886", "0.5260343", "0.52405035", "0.52208287", "0.5218197", "0.5218197", "0.5218197", "0.5174781", "0.5171059", "0.51635134...
0.0
-1
Returns the contextTypes declarations for our Runtime class.
get contextTypes() { return defaults({}, result('constructor.contextTypes'), { lodash: 'func', runtime: 'object', skypager: 'object', host: 'object', project: 'object', }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get contextType () {\n\t\treturn this._contextType;\n\t}", "get contextType() {\n return this.contextTypeInternal;\n }", "getTypeNodes() {\r\n return this.compilerNode.types.map(t => this._getNodeFromCompilerNode(t));\r\n }", "function availableTypes() {\n return (availableTypeNames()).m...
[ "0.61009824", "0.6084886", "0.60688907", "0.5494875", "0.5403384", "0.5361422", "0.53591067", "0.5346384", "0.5326482", "0.529827", "0.5290765", "0.5289672", "0.5238366", "0.52224714", "0.52095133", "0.52095133", "0.5208149", "0.52022564", "0.5201166", "0.5191738", "0.5188309...
0.7858602
0
the optionTypes declarations for our Runtime class
get optionTypes() { return result(this.constructor, 'optionTypes', {}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get contextTypes() {\n return defaults({}, result('constructor.contextTypes'), {\n lodash: 'func',\n runtime: 'object',\n skypager: 'object',\n host: 'object',\n project: 'object',\n })\n }", "_getTypesList(){\n return [\n {\"optText\": \"Select type\", \"optValue\":\"...
[ "0.62621456", "0.6061454", "0.60375226", "0.58438045", "0.5778211", "0.5692007", "0.56267107", "0.56100965", "0.5575798", "0.5388347", "0.529703", "0.5257347", "0.5256039", "0.5248381", "0.5237433", "0.5235167", "0.52300465", "0.51933163", "0.51877075", "0.5184788", "0.515880...
0.75039655
0
Returns the default context value for this runtime
get defaultContext() { return result(this.constructor, 'defaultContext', {}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get defaultContext() {\n return 'n3/contexts#default';\n }", "defaultBrowserContext() {\n return this._defaultContext;\n }", "defaultBrowserContext() {\n return this._defaultContext;\n }", "defaultBrowserContext() {\n return this._defaultContext;\n }", "function $$getDefau...
[ "0.6989788", "0.63218623", "0.63218623", "0.63218623", "0.5984321", "0.59369326", "0.5923027", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", "0.59157807", ...
0.78991616
0
Returns the default options for this runtime
get defaultOptions() { return defaults( {}, get(this, 'projectConfig'), result(this.constructor, 'defaultOptions'), // Find some way to be able to inject ARGV in projects which consume skypager via webpack global.SKYPAGER_ARGV, global.ARGV ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions() {\n\t\treturn defaultOptions;\n\t}", "function getOptions() {\n\t\treturn defaultOptions;\n\t}", "function getOptions() {\n\treturn defaultOptions;\n}", "function getOptions() {\n return defaultOptions;\n }", "function getOptions() {\n return defaultOptions;\n }", ...
[ "0.80587757", "0.80587757", "0.7878405", "0.78345853", "0.78345853", "0.78345853", "0.7055308", "0.7052389", "0.69941866", "0.69630945", "0.6911932", "0.66697997", "0.66370803", "0.66295916", "0.6623175", "0.6606751", "0.6582197", "0.6535111", "0.6503704", "0.6488303", "0.644...
0.79844505
2
A Runtime class will have certain initializer functions that it runs automatically as part of the startup lifecycle, which initializers will be dependent on the target (e.g. node, web) as well as the NODE_ENV environment (production, development, test)
applyRuntimeInitializers() { const { mapValues } = this.lodash const matches = this.runtimeInitializers Helper.attachAll(this, this.helperOptions) mapValues(matches, (fn, id) => { try { this.use(fn.bind(this), INITIALIZING) } catch (error) { this.error(`Error while applying...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static init(e) {\n if (process.env.NODE_ENV) {\n if (environment.indexOf(process.env.NODE_ENV) >= 0) {\n console.log(chalk.bold.green(`\\n[NODE_ENV] Application loaded using the ${process.env.NODE_ENV} environment configuration.\\n`));\n } else {\n console...
[ "0.702834", "0.68514585", "0.6696168", "0.6695396", "0.637716", "0.63376635", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0.62208045", "0...
0.0
-1
argv will refer to the initial options passed to the runtime, along with any default values that have been set
get argv() { return this.get('rawOptions', {}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set_arguments()\n {\n // Set up\n this.arguments = process.argv.slice( 2 )\n\n // Missing project name\n if( this.arguments.length === 0 )\n {\n // Stop process\n console.log( 'Missing arguments: first argument should be the projet name'.red )\n ...
[ "0.64981365", "0.64074296", "0.6366474", "0.6315587", "0.6297416", "0.6280216", "0.6274595", "0.62638974", "0.6219463", "0.6215147", "0.61916167", "0.6040807", "0.6009611", "0.5985598", "0.5975455", "0.59670556", "0.595379", "0.5942994", "0.593541", "0.59140205", "0.5886686",...
0.65924555
0
Helps the runtime search for helper packages based on the environment and target combo
get helperTags() { return this.get('options.helperTags', [ this.env, `${this.env}/${this.target}`, this.target, `${this.target}/${this.env}`, 'universal', ]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupDefaultModulePaths() {\n\n\tif (didSetup) {\n\t\t// ignoore secondary call\n\t\treturn;\n\t}\n\n\t// set flag\n\tdidSetup = true;\n\n\t// initialize it with all of the dependencies in the system\n\t// NOTE: Because of circular dependencies, if we use deferred requirement resolution on the jrequire he...
[ "0.56220925", "0.5584102", "0.55658895", "0.54689074", "0.5460323", "0.5413359", "0.5380791", "0.53724885", "0.5349461", "0.53481203", "0.529172", "0.5284485", "0.5246957", "0.52268493", "0.5217043", "0.52012295", "0.52012295", "0.51912946", "0.5149752", "0.5149752", "0.51265...
0.5298618
10
This will get called as part of the initialization sequence
beginTrackingState() { if (this.mainDisposer) { return this } const mainDisposer = autorun((...args) => { this.stateVersion = this.stateVersion + 1 const { currentState, stateVersion } = this this.emit('change', currentState, stateVersion, ...args) this.fireHook('stateDidChang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n }", "function init() {\n\t \t\n\t }", "function _init() {\n }", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {\n //\n }", "function init () {\n ...
[ "0.7964793", "0.7950488", "0.79481626", "0.79057086", "0.79057086", "0.79057086", "0.79057086", "0.79057086", "0.79057086", "0.7865059", "0.78487957", "0.7836299", "0.7836299", "0.7836299", "0.7836299", "0.7836299", "0.7801807", "0.77662987", "0.77662987", "0.77480745", "0.77...
0.0
-1
Creates an entity object from any slice of runtime properties / values
createEntityFrom(...properties) { const src = this.slice(...properties) return entity(toJS(src)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(entity, properties) {\n this.entity = entity + \"\";\n\n this.load(properties || {});\n }", "function handle_entity( raw ) {\n raw = _.isObject( raw ) ? raw : {}\n \n if( raw.entity$ ) {\n return seneca.make$( raw )\n }\n else {\n _.each( raw, function(v,k) {\n ...
[ "0.6153242", "0.5889377", "0.580528", "0.5803197", "0.57770723", "0.56176144", "0.56176144", "0.54570824", "0.5427732", "0.5413039", "0.53149617", "0.5301694", "0.528006", "0.5194311", "0.5185515", "0.5178727", "0.5140561", "0.5119568", "0.50816387", "0.50698346", "0.50696427...
0.77497405
0
Merge the objects found at k starting with at options, provider, projectConfig
mergeGet(key, namespaces = ['options', 'argv', 'config']) { key = typeof key === 'string' ? key.split('.') : key key = flatten(castArray(key)) return defaults({}, ...namespaces.map(n => this.get([n, ...key]))) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function merger(key, target, source, options) {\n var tval = target[key] || {};\n var sval = source[key];\n\n if (key === 'scales') {\n...
[ "0.5742068", "0.5689003", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.56244624", "0.55222213", "0.55222213", "0.55222213", "0.55003315", "0.5285369", "0.5285369", "0.52336", "0....
0.0
-1
Merge the objects found at k starting with at options, provider, projectConfig If the property is a function, it will be called in the scope of the helper, with the helpers options and context
mergeResult(key, namespaces = ['options', 'argv', 'config']) { key = typeof key === 'string' ? key.split('.') : key key = flatten(castArray(key)) const ifFunc = v => (typeof v === 'function' ? v.call(this, this.options, this.context) : v) return defaults({}, ...namespaces.map(n => this.get([n, ...key]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend(_config, _ctx) {}", "function mergeConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function merger(key, target, source, options) {\n var tval = target[key] || {};\n var sval = source[key];\n\n ...
[ "0.5020294", "0.5004149", "0.4998181", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "0.4955685", "...
0.0
-1
Function to create the card
function process(){ // Store user's First Name var textFn=document.card.textFn.value; // Store user's Last Name var textLn=document.card.textLn.value; // Store user's Childhood Dream Job var textDream=document.card.textDream.value; // Store user's Ideal Big-Kid Job va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCard() {\n let icebox = document.getElementById('icebox');\n let cardContent = new Assignment(getValue('#assignment'), getValue('#description'));\n let card = document.createElement('div');\n let cardTitle = document.createElement('h2');\n let cardDescription = document.createElement('p');\n\n ...
[ "0.7539865", "0.7469527", "0.7444573", "0.7428295", "0.742235", "0.74119365", "0.74092203", "0.74088484", "0.73916006", "0.7391243", "0.73743063", "0.7352706", "0.7336879", "0.729794", "0.729604", "0.72701806", "0.7266513", "0.7266142", "0.7250655", "0.7248515", "0.7238338", ...
0.0
-1
Initialize CKEditors for all the textareas on the page
function initialiseCKEditor() { // Any textarea tag with data-type=ckeditortype is replaced by CKEditor var textareas = Array.prototype.slice.call( document.querySelectorAll('textarea[data-type=ckeditortype]') ); for (var i=0; i<textareas.length; ++i) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initEditors(ids) {\n initializeIntersectionObserver()\n\n ids.forEach((id) => {\n const editorId = `tinymce_${id}`\n const textarea = document.getElementById(editorId)\n\n if (textarea) {\n tinymceIntersectionObserver.observe(textarea)\n } else {\n console.warn(`Could not initializ...
[ "0.7139739", "0.70861816", "0.70711696", "0.6807097", "0.6731705", "0.65888554", "0.64789397", "0.64187175", "0.6405061", "0.62975484", "0.6268332", "0.6257789", "0.6228575", "0.6210548", "0.6202246", "0.6184363", "0.6156276", "0.614603", "0.60681134", "0.60671973", "0.606616...
0.79517746
0
Change the precision of a style property of a given object.
function changePrecision(e, a, d) { var w = $(e).css(a); if (w.length > 0) { $(e).css(a, parseFloat(w).toFixed(d)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static updateStyle(el, style, adjustment) {\n if (!el || !el.style)\n return;\n const val = el.style[style];\n if (!val || val.length < 3)\n return;\n // only modify pixel values.\n if (val[val.length - 2] != \"p\")\n ...
[ "0.56992954", "0.56296337", "0.5583357", "0.5568651", "0.55254245", "0.5509066", "0.5408537", "0.5408537", "0.5371037", "0.5357786", "0.5320369", "0.5320369", "0.5281391", "0.52773863", "0.5273386", "0.5273386", "0.5255752", "0.5246445", "0.52425593", "0.5232736", "0.5229929"...
0.64257115
0
Determine if we're running in a standard browser environment This allows axios to run in a web worker, and reactnative. Both environments support XMLHttpRequest, but not fully standard globals. web workers: typeof window > undefined typeof document > undefined reactnative: navigator.product > 'ReactNative'
function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStandardBrowserEnv() {\n if (\n typeof navigator !== 'undefined' &&\n (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')\n ) {\n return false;\n }\n return typeof win...
[ "0.8144908", "0.81338334", "0.8129824", "0.8128983", "0.81198746", "0.81198746", "0.81182635", "0.81017965", "0.81017965", "0.81017965", "0.81017965", "0.81017965", "0.81017965", "0.81017965", "0.81017965", "0.80983514", "0.80983514", "0.80983514", "0.80983514", "0.80983514", ...
0.0
-1
Adapted from convertsourcemap (MIT)
function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractSourceMap(fs, logger, file) {\n var inline = convert_source_map_1.commentRegex.test(file.text);\n var external = convert_source_map_1.mapFileCommentRegex.exec(file.text);\n if (inline) {\n var inlineSourceMap = convert_source_map_1.fromSource(file.text);\n ...
[ "0.6964916", "0.6937077", "0.67628086", "0.64402395", "0.63267565", "0.62970984", "0.62525105", "0.62076676", "0.619188", "0.6179115", "0.61730963", "0.6158623", "0.6158623", "0.6158623", "0.6155814", "0.6092864", "0.60372883", "0.59867525", "0.59786624", "0.59781057", "0.597...
0.0
-1
For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _node_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'Node.js' ){ ret = true; }\n\treturn ret;\n }", "function node_error(err) {\r\n node.error(err, err);\r\n }", "private public function m246() {}", "function NodeFsHandler() {}", "function NodeFsHandler() {}", "static reset(...
[ "0.5863474", "0.5705808", "0.568645", "0.55544066", "0.55544066", "0.5446477", "0.5434516", "0.5381192", "0.5356294", "0.53282356", "0.53189546", "0.52043676", "0.51996946", "0.5156968", "0.51501393", "0.51281303", "0.51281303", "0.51281303", "0.5112595", "0.5100047", "0.5090...
0.0
-1
Throws a `Cancel` if cancellation has been requested.
function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancel() {\n throw new Error(this.cancelMessage);\n }", "cancel() {\n throw new Error(\"Not implemented.\")\n }", "isCanceled(cancelled) {\n if (cancelled) {\n throw new Error(\"Cancelled request\");\n }\n }", "function throwIfCancellationRequested(config) {\n ...
[ "0.79483205", "0.7736851", "0.7534211", "0.74465257", "0.742381", "0.7385535", "0.7385535", "0.7385535", "0.7385535", "0.7385535", "0.7205974", "0.71676105", "0.7164012", "0.71617556", "0.71423924", "0.7138887", "0.7138887", "0.7138887", "0.7138887", "0.7138887", "0.7138887",...
0.0
-1
update something when window resized
function resize() { _screenWidth = window.innerWidth _screenHeight = window.innerHeight // camera settings for to be actual size _mainCamera.aspect = _screenWidth / _screenHeight _mainCamera.updateProjectionMatrix() _mainCamera.position.z = (_screenHeight * 0.5) / Math.tan((_mainCamera.fov * 0.5) * Math.PI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowResize() {\n updateSizes();\n }", "function windowResized() {\n resize();\n redraw();\n}", "onWindowResize() {\n\t\tthis.windowHeight = this.getWindowHeight();\n\t\tthis.updatePosition();\n\t}", "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrappe...
[ "0.8557556", "0.8326061", "0.82986003", "0.7996166", "0.7897629", "0.78873175", "0.77803", "0.76457673", "0.7636884", "0.76355153", "0.76046354", "0.759381", "0.7587502", "0.7572792", "0.7567935", "0.75615096", "0.75531", "0.7540345", "0.75323224", "0.75323224", "0.75025314",...
0.0
-1
Js functions to install components and process a crud form
function install_form() { _install_form($(".form-editor")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async install(params)\n\t{\n\n\t\t// set self reference\n\t\tvar module_ref = this;\n\n\t\t// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t\t// %%% Initialize the UI %%%%%%%%%%%%%%%%\n\t\t// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t\t\t\t\n\t\t// Create UI html. You can load this however you want, it just needs to ...
[ "0.6315206", "0.6198592", "0.61732066", "0.61507636", "0.60903805", "0.6079115", "0.60482943", "0.6034333", "0.60289276", "0.59633154", "0.59109354", "0.5874013", "0.58650845", "0.5856891", "0.584391", "0.5813188", "0.5812509", "0.5792224", "0.57412606", "0.57404876", "0.5728...
0.6388161
0
Install components NOTE: Only install on the visible inputs, for dynamic created inputs, need to invoke install_plupload manually
function _install_components(container) { // Flatpickr // https://flatpickr.js.org/formatting/ container.find("input.date-time:visible").each(function (i, n) { $(n).flatpickr({ enableTime: true, dateFormat: "Y-m-d H:i:S", defaultHour: new Date().getHours(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async install(params)\n\t{\n\n\t\t// set self reference\n\t\tvar module_ref = this;\n\n\t\t// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t\t// %%% Initialize the UI %%%%%%%%%%%%%%%%\n\t\t// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t\t\t\t\n\t\t// Create UI html. You can load this however you want, it just needs to ...
[ "0.6215804", "0.61062753", "0.59518975", "0.58516586", "0.58516586", "0.58516586", "0.58516586", "0.5847378", "0.58256537", "0.5822422", "0.5596921", "0.55624866", "0.5558245", "0.55151176", "0.54875827", "0.54561603", "0.53611106", "0.5358667", "0.533632", "0.532657", "0.532...
0.7027732
0
gl.clearColor(0.2, 0, 0.8, 1); gl.clear(gl.COLOR_BUFFER_BIT);
function renderSomething() { var v = [ "attribute vec2 aVertexPosition;", "void main() {", "gl_Position = vec4(aVertexPosition, 0.0, 1.0);", "}", ].join("\n"); var f = [ "#ifdef GL_ES", "precision highp float;", "#endif", "uniform vec4 uColor;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearBuffers()\n {\n this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);\n }", "function render() {\r\n\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\tgl.drawArrays(gl.TRIANGLES, 0, 9);\r\n}", "function switchColor () {\n if (!gl) {\n gl = canvas.getContext(\"webgl\") || canvas.getContex...
[ "0.8453293", "0.7814142", "0.76476735", "0.75946826", "0.7584292", "0.7565144", "0.75469846", "0.75372165", "0.75191003", "0.74991196", "0.7438167", "0.72959936", "0.72829974", "0.7268616", "0.7195312", "0.71075296", "0.71040356", "0.71029454", "0.7082587", "0.707486", "0.707...
0.0
-1
Click Event for Player1
function blackJackPlayer1(){ if(blackjackGame.player_1 === true){ let card = randomCard(); showCard(card,P1); updateScore(card,P1); showScore(P1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickPlayer(thisPlayer, playerDisplay)\n{\n selectedPlayer = thisPlayer;\n selectedPlayerDisplay = playerDisplay;\n}", "function playerClick() {\n playerSequence.push(\"#\" +this.id);\n console.log(\"Player: \" + playerSequence);\n animate(this);\n currentClickCount+=1;\n checkForMatch(...
[ "0.7537485", "0.7522159", "0.7244738", "0.707168", "0.6881767", "0.68113744", "0.67273253", "0.66972935", "0.66930676", "0.6639161", "0.65695155", "0.6557586", "0.6541004", "0.65321934", "0.6530953", "0.6527131", "0.65120155", "0.651081", "0.6503633", "0.6483015", "0.6474248"...
0.0
-1
Click Event for Player2
function blackJackPlayer2(){ if(blackjackGame.player_2 === true){ blackjackGame.player_1 = false; let card = randomCard(); showCard(card,P2); updateScore(card,P2); showScore(P2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick () {\n super.handleClick()\n this.player_.trigger('next')\n }", "function clickPlayer(thisPlayer, playerDisplay)\n{\n selectedPlayer = thisPlayer;\n selectedPlayerDisplay = playerDisplay;\n}", "function playerClick() {\n playerSequence.push(\"#\" +this.id);\n console.log(\"Player: \"...
[ "0.7398216", "0.73173225", "0.72638416", "0.72484744", "0.681222", "0.6774088", "0.6768359", "0.6730705", "0.669865", "0.66967326", "0.6659599", "0.6643821", "0.6604561", "0.6577437", "0.6547143", "0.6540355", "0.6526807", "0.64958835", "0.64877677", "0.64744824", "0.64421725...
0.0
-1
Click Event for Deal
function blackjackDeal(){ if(blackjackGame.turnsOver === true && blackjackGame.player_1 === false){ blackjackGame.turnsOver === false; blackjackGame.player_2 = false; let winner = computeWinner(); showResult(winner); }}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "click() {\n this.sendAction('deal', this.get('result'));\n }", "function clickHandle( event ) {\n\t\tvar tagName = event.target.tagName.toLowerCase();\n\t\t\n\t\tif ( tagName !== 'button' || window.isGiveUp ) {\n\t\t\treturn;\n\t\t}\n\t\t// console.log( window.isGiveUp )\n\t\tvar id = event.target.id;\n\t\tv...
[ "0.723503", "0.67086446", "0.66584563", "0.6633576", "0.6633576", "0.6603273", "0.6485432", "0.6427569", "0.6401039", "0.6359341", "0.634575", "0.634531", "0.63383865", "0.632162", "0.63196856", "0.6318438", "0.62981886", "0.6293152", "0.6290936", "0.626636", "0.6232247", "...
0.0
-1
Function for Picking up RandomCard
function randomCard(){ let randomIndex = Math.floor(Math.random()*13); return blackjackGame.cards[randomIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pick(cards) {\n\treturn cards[Math.floor(Math.random()*cards.length)];\n }", "function newRndCard() {\n $.getJSON('https://api.scryfall.com/cards/random?q=-type%3Aland+legal%3Alegacy+not%3Atoken+not%3Asplit+not%3Atransform', function (data) {\n saveCard(data);\n })\n }", ...
[ "0.79110044", "0.774937", "0.7727089", "0.77160835", "0.7703184", "0.75951165", "0.7557827", "0.7517732", "0.74498236", "0.74335057", "0.7423939", "0.73806816", "0.72366464", "0.7215002", "0.720373", "0.7193441", "0.7192619", "0.7190679", "0.7190496", "0.7155407", "0.7153908"...
0.75768757
6
Fuction for poping up the card in Player1 or Player2 block
function showCard(card,activePlayer){ if(activePlayer.score <= 21){ let cardImage = document.createElement('img'); cardImage.src = `Images/${card}.png` document.querySelector(activePlayer.div).appendChild(cardImage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playercardturn(player){\n //show cards\n //ask to select cards to play\n //push them into action slot\n }", "function blackJackPlayer1(){\n if(blackjackGame.player_1 === true){\n let card = randomCard();\n showCard(card,P1);\n updateScore(card,P1);\n sho...
[ "0.7337701", "0.6988934", "0.6947537", "0.6717465", "0.6705517", "0.6654927", "0.6619665", "0.66111714", "0.6603904", "0.65486306", "0.6542236", "0.6514341", "0.6484362", "0.64674014", "0.6440998", "0.6427937", "0.6411754", "0.6410243", "0.6381356", "0.63796854", "0.6333205",...
0.60856694
61
Function for updating the Score
function updateScore(card,activePlayer){ if(card === 'A'){ if(activePlayer.score + blackjackGame.cardValue[card][1] <= 21){ activePlayer.score += blackjackGame.cardValue[card][1]; }else{ activePlayer.score += blackjackGame.cardValue[card][0]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateScore(value) {\n addScore(value);\n displayScore();\n}", "function updateScore() {\n score++;\n}", "UpdateScore(newScore){\n this.currentScore += newScore;\n }", "function updateScore() {\n document.querySelector(\"#score\").innerHTML = \"Score: \" + score;\n ...
[ "0.85091573", "0.8457032", "0.8431104", "0.82251215", "0.81860685", "0.8150452", "0.8140271", "0.81024003", "0.806424", "0.804801", "0.804801", "0.80145115", "0.8013166", "0.79885226", "0.79771197", "0.7954569", "0.7937593", "0.79286486", "0.7925353", "0.79172266", "0.791697"...
0.0
-1
Function for to display the Score
function showScore(activePlayer){ if(activePlayer.score > 21){ document.querySelector(activePlayer.scoreSpan).textContent = "BUSTED!"; document.querySelector(activePlayer.scoreSpan).style.color = 'red'; }else{ document.querySelector(activePlayer.scoreSpan).textContent = acti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayScore() {\n displayText(36, score, width / 2, height - 50);\n}", "function drawScore() {\n document.getElementById('score').innerText = score.toString();\n }", "function displayScores() {\n score0El.innerText = score0;\n score1El.innerText = score1;\n }", "functi...
[ "0.82312256", "0.8097955", "0.8084549", "0.79839665", "0.7972658", "0.79578733", "0.79567635", "0.7938851", "0.7905204", "0.789326", "0.7891477", "0.78845966", "0.7875189", "0.78644997", "0.7859351", "0.784969", "0.7849654", "0.7828482", "0.7807925", "0.77937406", "0.7789637"...
0.0
-1
Function to Compute the Winner
function computeWinner(){ let winner; if(P1.score <= 21){ if(P1.score > P2.score || P2.score>21){ blackjackGame.win++; winner = P1; }else if(P1.score < P2.score){ blackjackGame.loss++; winner = P2; }else if(P1.score === P2.score){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeWinner() {\n\n // TODO: Compare date numerology with the active roster\n // TODO: Push numerology values to the json object file.\n var num = Math.floor(Math.random() * 2);\n if(num === 0) {\n return 0;\n } else if(num === 1) {\n return 1;\n }\n}", "function computeWinner()\n{\n l...
[ "0.8231077", "0.75693786", "0.7542083", "0.74740195", "0.74714345", "0.73542726", "0.7338368", "0.733606", "0.7316667", "0.7291596", "0.72406137", "0.7174285", "0.7146976", "0.71318495", "0.71275073", "0.71256435", "0.7123679", "0.7117726", "0.70964086", "0.70770127", "0.7074...
0.78523916
1
Function to Show the Results
function showResult(winner){ let message,messageColor; if(blackjackGame.turnsOver === true){ if(winner === P1){ document.querySelector('#Wins').textContent = blackjackGame.win; message = 'PLAYER 1 WON!'; messageColor = 'green'; }else if(winner == P2){ document.querySele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showResults() {\n\t\t\t\tconsole.clear();\n\t\t\t\tconsole.log(data);\n\t\t\t}", "function showResults(results){\n\t\n}", "function showResults() {\n\n\t$(\"#resultstab\").removeClass('hide');\n\t$(\"#results\").removeClass('hide');\n\t$(\"#web100varstab\").removeClass('hide');\n\t$(\"#web100varsmessa...
[ "0.789863", "0.7796353", "0.77060056", "0.75586313", "0.74018717", "0.73646903", "0.733718", "0.7216275", "0.70768785", "0.70530236", "0.70492417", "0.7045392", "0.70396453", "0.7038989", "0.70146143", "0.70012623", "0.69828385", "0.69720364", "0.6967088", "0.6958775", "0.695...
0.0
-1
navbar sticking to the top
function sticktothetop() { var window_top = $(window).scrollTop(); var top = $('#stick-here').offset().top; if (window_top > top + 110) { $( "#navbar2" ).slideDown( 550 ); } if (window_top < top) { $( "#navbar2" ).hide(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stickyNav() {\n // Get the navbar\n var navbar = document.getElementById(\"navbar-section\");\n // Get the offset position of the navbar\n var sticky = navbar.offsetTop;\n if (window.pageYOffset > sticky) {\n navbar.classList.add(\"sticky\");\n $('#...
[ "0.7200857", "0.7130259", "0.70522106", "0.7000264", "0.69998837", "0.6986428", "0.698521", "0.68466717", "0.6829796", "0.676634", "0.6732235", "0.67034364", "0.6696103", "0.6691018", "0.66872054", "0.6678451", "0.6660759", "0.66490024", "0.6646645", "0.6641398", "0.6634306",...
0.67720896
9