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
Gets the household the logged in user owns. If they don't have a household it will create a new one.
async getMyHousehold(req, res, next) { try { const myHousehold = await householdsService.getMyHousehold(req.userInfo.id) res.send(myHousehold) } catch (error) { next(error) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function profile_get_houses(){\n\tif (!this.home_profile) this.profile_update_house_info();\n\n\tif (this.home_profile){\n\t\treturn this.home_profile;\n\t} else {\n\t\treturn {};\n\t}\n}", "function GetHouseHoldCount() {\n return $resource(_URLS.BASE_API + 'report/households' + _URLS.TOKEN_API + $loc...
[ "0.62189704", "0.5494595", "0.5355794", "0.5315094", "0.53141505", "0.5294896", "0.5215343", "0.5128307", "0.509018", "0.50632155", "0.5029449", "0.49993598", "0.4960515", "0.4953811", "0.48804674", "0.486493", "0.48549953", "0.48293796", "0.4821601", "0.47807992", "0.4774631...
0.6396528
0
Edits the profile of the user who is logged in
async editProfile(req, res, next) { try { req.body.accountId = req.userInfo.id const account = await accountService.editProfile(req.body) res.send(account) } catch (error) { next(error) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editProfile() {\n setErrorsVisible(true);\n setCurrentPasswordServerError(\"\");\n setUsernameServerError(\"\");\n setEmailServerError(\"\");\n console.log(getProfileUsernameError(true, true, fieldsStateUser.username, currentUser.username, usernameServerError));\n ...
[ "0.7923699", "0.77791226", "0.7647892", "0.73306066", "0.7282449", "0.72568834", "0.7235422", "0.72122943", "0.72117907", "0.7150783", "0.71499443", "0.7129573", "0.70975035", "0.7083454", "0.7065713", "0.7062671", "0.7062671", "0.70393187", "0.7039317", "0.70164186", "0.7004...
0.6960345
21
The player; Will be set by the initializing switch
function Update () { if (isOn && !shownOne) { daPlayer.GetComponent("ThirdPersonController").enabled = false; leChecker.GetComponent("ShellGameCheck").theBox = shells[Random.Range(0, shells.Length-1)]; leChecker.GetComponent("ShellGameCheck").theBox.GetComponentInChildren(Shell).oYeah = true; lesShells.GetC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentPlayer (player){\r\n _currentPlayer = player;\r\n }", "function setupPlayer() {\n\t\"use strict\";\n\tjsReady = true;\n\tif ( 'undefined' === typeof player ) {\n\t\tplayer = GetPlayer();\n\t}\n\t\n}", "constructor(player) {\n this.player = player;\n }", "function setupPlaye...
[ "0.80097854", "0.7485265", "0.74548155", "0.74520236", "0.7439483", "0.7432481", "0.7432481", "0.7432481", "0.7431285", "0.7394019", "0.7380937", "0.7359397", "0.7355298", "0.73433673", "0.7292722", "0.72855526", "0.72808003", "0.72764266", "0.7265523", "0.7182572", "0.713429...
0.0
-1
STEP 2: Define how to show a raptor
function show_raptor(id,boat_time) { if (!(boat_time >= 60)) boat_time = 60; var raptorSprite = raptorSprites[id%raptorSprites.length]; tagpro.renderer.layers.ui.addChild(raptorSprite); raptorSprite.x = tagpro.renderer.renderer.width; raptorSprite.y = tagpro.renderer.renderer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async show() {\r\n\t\ttry {\r\n\t\t\tif (!this.server.states.trivia) throw 'Not currently playing rated trivia!';\r\n\t\t\tthis.gen();\r\n\t\t} catch (e) {\r\n\t\t\tif (e) this.Output.onError(e);\r\n\t\t}\r\n\t}", "function showQr() {\n new QRCode(qr,{\n text: `${name.value.toUpperCase()}\nNUMB...
[ "0.6014041", "0.59905165", "0.5949861", "0.572968", "0.57252324", "0.5720647", "0.56281126", "0.5598934", "0.55839735", "0.55534256", "0.5542332", "0.5541311", "0.5534508", "0.553357", "0.5531446", "0.5518551", "0.5493567", "0.5490226", "0.54654664", "0.54592466", "0.5455104"...
0.5600017
7
Define a function called calculator that receives an operation and two numbers and returns the result of the operation applied to the values passed as parameters calculator("suma",10,5) // 15 calculator("resta",10,5) // 5 calculator("multiplicacion",10,5) // 50 calculator("division",10,5) // 2
function calculator(act, num1, num2) { if (act === "suma") { return num1 + num2; } else if (act === "resta") { return num1 - num2; } else if (act === "mult") { return num1 * num2; } else if (act === "div") { return num1 / num2; } else { return "escribe suma, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculator(a, b){\n\n}", "function calculator() {\n \"use strict\";\n var num1, num2, action, result;\n\n num1 = parseInt(window.prompt(\"Choose a number:\"));\n num2 = parseInt(window.prompt(\"Choose another number:\"));\n action = window.prompt(\"Choose an operation: add, subtract, mult...
[ "0.81615585", "0.8140606", "0.8055078", "0.7994126", "0.784878", "0.7826437", "0.7819018", "0.78047216", "0.77912426", "0.7790281", "0.7748312", "0.7686961", "0.7652591", "0.76514536", "0.7599933", "0.7537232", "0.75170654", "0.74637866", "0.7460323", "0.74451816", "0.7441370...
0.7942274
4
Calculator Plus Define a function called calculator that receives an operation and several numbers (can be 2 or 10 or whatever) returns the result of the operation applied to the values passed as parameters calculator("suma",10,5,2,3) // 20 calculator("resta",10,5,1) // 4 calculator("multiplicacion",10,5,2) // 100 calc...
function calculator() { var nums = Array.from(arguments); switch (nums.shift()) { case 'sum': return nums.reduce((total, item) => total + item); case 'subtract': return nums.reduce((total, item) => total - item); case 'multiply': return nums.reduce((t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculator() {\n \"use strict\";\n var num1, num2, action, result;\n\n num1 = parseInt(window.prompt(\"Choose a number:\"));\n num2 = parseInt(window.prompt(\"Choose another number:\"));\n action = window.prompt(\"Choose an operation: add, subtract, multiply or divider\");\n\n function a...
[ "0.7618991", "0.74167013", "0.73446614", "0.7333296", "0.73202646", "0.7302834", "0.7298113", "0.72961956", "0.7282227", "0.7281445", "0.72753847", "0.72664726", "0.719087", "0.7173475", "0.71594906", "0.715074", "0.71496475", "0.71345663", "0.7112964", "0.70295984", "0.70007...
0.7737901
0
encodeWordPlus Improve the previous function to add a random number between 0 and 1000 every 7 characters
function encodeWordPlus(string) { string = string.toLowerCase().split(''); var i; for (var i = 7; i < string.length; i += 7) { string.splice(i, 0, Math.floor((Math.random() * 1000) + 0)); } var result = string.join(''); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mn_encode(a){for(var b=[],c=mn_words.length,d=0;d<a.length;d+=8){var e=parseInt(a.substr(d,8),16),f=e%c,g=(Math.floor(e/c)+f)%c,h=(Math.floor(Math.floor(e/c)/c)+g)%c;b=b.concat([mn_words[f],mn_words[g],mn_words[h]])}return b.splice(8,4),b.join(\" \")}", "function randomizer (word) {\n\t\treturn Math.flo...
[ "0.669064", "0.66090405", "0.65693784", "0.64758736", "0.64141774", "0.6410001", "0.641", "0.64012486", "0.6329851", "0.63129634", "0.6300836", "0.6299197", "0.6276526", "0.62702566", "0.6260111", "0.6255038", "0.6230405", "0.6204297", "0.61860555", "0.6167651", "0.6156065", ...
0.8056584
0
Function setting all controll
function setting() { BEST = 50; speed = 1; level = 1; score = 50; numberMonsterShow = 1; boom = 3; stop = 3; heart = 5; isRun = true; isStop = false; isPause = false; lastStop = false; lastUpdateTime = Date.now(); listBlood = new Array(); $("#content").append...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCajasDefault(num) {\n for (var i = 0; i < self.datosProyecto.businesModel.length; i++) {\n var cajas = [];\n for (var x = 0; x < num; x++) {\n var idContador = x + 1;\n var caja = {\n id: idContador,\n titulo: \"\",\n descripcion: \"\",\n color: \"#bad9f9\",...
[ "0.59369427", "0.57749146", "0.575301", "0.57320756", "0.5681398", "0.5599161", "0.5595727", "0.5584682", "0.555351", "0.55139303", "0.5510614", "0.5465718", "0.5440052", "0.5415159", "0.54024506", "0.53955585", "0.5393944", "0.53814846", "0.5377264", "0.53672826", "0.5356211...
0.0
-1
Function draw all buttons in canvas action
function drawAction() { contextAction.clearRect(0, 0, action.width, action.height); boomImage.onload = () => { drawButton(); } drawButton(); contextAction.fillStyle = "rgba(255,255,255,.87)"; contextAction.font = "20px Arial"; contextAction.fillText("Score:" + score, 10, 30); con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_Buttons() {\r\n btnDown.drawButton(context1.context);\r\n btnUp.drawButton(context1.context);\r\n btnLeft.drawButton(context1.context);\r\n btnRight.drawButton(context1.context);\r\n btnFire.drawButton(context1.context);\r\n btnMiddle.drawButton(context1.context);\r\n }", "functi...
[ "0.8066693", "0.7402233", "0.71334714", "0.69839805", "0.67776144", "0.67374164", "0.67154753", "0.66927177", "0.66647375", "0.6584018", "0.6532619", "0.65323067", "0.6531465", "0.65313315", "0.6508896", "0.647832", "0.64256346", "0.6404269", "0.6394405", "0.63646716", "0.635...
0.63716924
19
adding each input to the array as an object
function addToDo(newTodoItem) { const obj = { id: uuidv1(), // OR Date.now() // test is set to the text from the input text: newTodoItem, // giving a value of false so that it can be // changed to true when clicked and vice versa completed: false } // spread att...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,arr[i]);}}return res;}", "function toObject(arr){var res={};for(var i=0;i<arr.length;i++){if(arr[i]){extend(res,a...
[ "0.63341546", "0.63341546", "0.63341546", "0.6146914", "0.6084628", "0.60793746", "0.60585654", "0.6001998", "0.59960943", "0.59249306", "0.5895717", "0.57944834", "0.5779813", "0.576916", "0.576916", "0.5758977", "0.57561225", "0.5745344", "0.5745344", "0.573202", "0.571679"...
0.0
-1
this function will be used for changing the completed, working on it button that is displaye don the card.
function setCompleted(id) { setToDoArr((todos) => { // map over the todos and get each value return todos.map(function (todo) { // if id is equal to todo.id return the "completed" code. if (id === todo.id) { // using the vang operator that will change the boolean value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCompletedEvent() {\r\n let allCompleteBtn = Array.from(document.querySelectorAll(\".complete-btn\"));\r\n\r\n allCompleteBtn.forEach(button => {\r\n button.addEventListener(\"click\", function() {\r\n let index = allCompleteBtn.indexOf(button);\r\n\r\n if (myLibrary[i...
[ "0.7255078", "0.7004425", "0.67609763", "0.6689015", "0.6642587", "0.6604053", "0.63774055", "0.6370092", "0.62971705", "0.6284569", "0.62547326", "0.6234056", "0.61831594", "0.6178681", "0.61758715", "0.6173682", "0.61720496", "0.61639947", "0.61637104", "0.615111", "0.61394...
0.0
-1
route middleware to make sure a user is logged in
function isLoggedIn(req, res, next) { // if user is authenticated in the session, carry on if (req.isAuthenticated()) return next(); // if they aren't redirect them to the home page res.redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLoggedIn(req, res, next) {\n\tconsole.log('isLoggedIn middleware');\n if (req.isAuthenticated()) {\n \treturn next();\n } else {\n \tres.redirect('/users');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n else res.redirect('/signin');\n }", "...
[ "0.78756756", "0.7838942", "0.7822098", "0.78155315", "0.77986485", "0.77795565", "0.77720815", "0.7754788", "0.7752611", "0.77517444", "0.7750372", "0.7749515", "0.7748903", "0.77365285", "0.7729117", "0.7725971", "0.7717677", "0.771586", "0.77155524", "0.77146655", "0.77142...
0.7629707
67
defining vertex array and adjacent list
constructor(noOfVertices) { this.noOfVertices = noOfVertices; this.AdjList = new Map(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addVertex(v) \n { \n // initialize the adjacent list with a \n // null array \n this.AdjList.set(v, []); \n }", "addVertex(v) {\n // initialize the adjacent list with a \n // null array \n this.AdjList.set(v, []);\n }", "addVert...
[ "0.7285079", "0.7171926", "0.71577907", "0.71577907", "0.69449973", "0.6893123", "0.6838787", "0.6807422", "0.67655444", "0.6750881", "0.67474854", "0.6719918", "0.66782486", "0.665192", "0.6618678", "0.66140026", "0.66140026", "0.66140026", "0.65621567", "0.655881", "0.65233...
0.0
-1
functions to be implemented
addVertex(v) { // initialize the adjacent list with a // null array this.AdjList.set(v, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "function miFuncion (){}", "private internal function m248() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function _____SHARED_functions_____(){}", "transient protected internal function m189() {}", "function comportement ()...
[ "0.65818113", "0.6527638", "0.6466106", "0.63627887", "0.63627887", "0.63627887", "0.6305638", "0.62467295", "0.6185442", "0.6172942", "0.6130849", "0.60664445", "0.60484326", "0.5980583", "0.59195894", "0.5847442", "0.5836162", "0.5806453", "0.5801899", "0.5778661", "0.57638...
0.0
-1
bfs(v) Main DFS method
dfs(startingNode, target) { this.paths = []; this.target = target; var visited = []; for (var i = 0; i < this.noOfVertices; i++) visited[i] = false; this.path = {}; this.path[startingNode] = {pat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bfs() {\n\n /* Calling search the main algo written to achieve the shortest path using BFS */\n search(matrix);\n}", "function dfs(vertex) {\n // if there is no vertex return null\n if (!vertex) return null;\n // set the vertex in visited\n vistied[vertex] = true;\n // push th...
[ "0.7704946", "0.76104295", "0.73459464", "0.73459464", "0.73031425", "0.72414255", "0.722601", "0.7224883", "0.7210303", "0.7164824", "0.7160109", "0.71434283", "0.70826507", "0.7072802", "0.70711654", "0.70551205", "0.70267534", "0.7020396", "0.701776", "0.70150363", "0.7012...
0.65264213
56
Recursive function which process and explore all the adjacent vertex of the vertex with which it is called
DFSUtil(vert, visited) { visited[vert] = true; if (vert === this.target) { this.paths.push({ probability: this.path[vert].probability, path: this.path[vert].path }) } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DFS(vertex) {\n // if the vertex is empty, return null\n if (!vertex) return null\n // place vertex into visited object\n visited[vertex] = true\n // push vertex into result array\n result.push(vertex)\n // loop over all values i...
[ "0.6760346", "0.67602026", "0.6682678", "0.6671999", "0.66511196", "0.664034", "0.6605557", "0.6578533", "0.657297", "0.65581185", "0.65576726", "0.65567577", "0.65436876", "0.65346617", "0.65084606", "0.640068", "0.63543946", "0.6266967", "0.62513804", "0.6249658", "0.623097...
0.6465503
15
Fired for changes at languages filters
function onLanguageFiltersChange() { // `vm.filters.languages` is still out of sync at this point, // but in next cycle after `$timeout` we have updated version. $timeout(function () { // Save new value to cache FiltersService.set('languages', vm.filters.languages || []); onFi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onchange() {\n\n updateLanguage();\n\n}", "function filterLang(filtVal){\n if(filtVal != \"none\"){\n langFilter.filtVal = filtVal;\n lastFilter = langFilter.key;\n }\n//If the none option is selected, we turn off the lang filter. We also check if it was the most recently accessed filter. If it...
[ "0.7155163", "0.7129216", "0.6784957", "0.6599256", "0.65846455", "0.65576756", "0.6454128", "0.64228886", "0.6381479", "0.63333213", "0.63259566", "0.63154835", "0.6285461", "0.6277417", "0.6273669", "0.62352705", "0.62247866", "0.62247866", "0.6184897", "0.61548907", "0.614...
0.8103815
0
Fired for changes at seen filter
function onSeenFilterChange() { vm.filters.seen.months = vm.onlineInPast6Months ? 6 : 24; // `vm.filters.seen` is still out of sync at this point, // but in next cycle after `$timeout` we have updated version. $timeout(function () { // Save new value to cache FiltersService.set(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterChange() {\n updateFilter();\n pullEvents();\n //put events in page\n}", "onStateFilterUpdated() {\n }", "onStoreFilter() {\n if (!this.storeTrackingSupended && this.rendered) {\n this.updateColumnFilterFields();\n }\n }", "onStoreFilter() {\n if (!this.storeTrackingSupended...
[ "0.71927863", "0.6828606", "0.65544415", "0.64780957", "0.64717036", "0.6466224", "0.6416334", "0.64057004", "0.63911176", "0.63592404", "0.6303626", "0.6292226", "0.62870693", "0.6284596", "0.6275434", "0.62402594", "0.61904013", "0.61758304", "0.6167333", "0.6156159", "0.61...
0.7577217
0
Closes offer when filters are changed and updates the map
function onFiltersUpdated() { // Close possible open offers if (vm.offer) { vm.offer = false; // Tells `SearchMapController` and `SearchSidebarController` // to close anything offer related $scope.$broadcast('search.closeOffer'); } // Tells map controller to reset...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyFilters(appliedFilters) {\n this.handleOnChangeFilters(appliedFilters);\n this.handleOnCloseDialog();\n }", "function filterInternshipData(){\r\n\t//This takes any action that is bound to clicking the filter button with intent to close it\r\n\t$('#FilterToggle').trigger('click');\t\r\n\tgetInternship...
[ "0.6114929", "0.60596746", "0.5991438", "0.5823752", "0.57482857", "0.5717335", "0.569757", "0.56851375", "0.56779253", "0.5653918", "0.5617474", "0.5579548", "0.55785537", "0.5568015", "0.5564009", "0.55605185", "0.555724", "0.55524975", "0.55273986", "0.5508897", "0.5503554...
0.7432424
0
Open search place input on small screens
function openSearchPlaceInput() { vm.isPlaceSearchVisible = true; closeSidebar(); $timeout(function () { // Focus to search input angular.element('#search-query').focus(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openSearch() {\n this.element_main.style.visibility = \"visible\"; // show search box\n this.element_input.focus(); // put focus in input box so you can just start typing\n this.visible = true; // search visible\n }", "function openSearch() {...
[ "0.7462713", "0.7024917", "0.697491", "0.69485724", "0.68451697", "0.6843196", "0.6842769", "0.6804102", "0.67912996", "0.66860676", "0.6659249", "0.6586994", "0.6468795", "0.6466182", "0.6444544", "0.6444235", "0.6404102", "0.63933367", "0.63798755", "0.63682765", "0.6354189...
0.77950215
0
Broadcast information about changed search location
function onPlaceSearch(data, type) { vm.isPlaceSearchVisible = false; if (data && type === 'center') { $scope.$broadcast('search.mapCenter', data); } else if (data && type === 'bounds') { $scope.$broadcast('search.mapBounds', data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePosition() {\n\t\n\t//change time box to show updated message\n\t$('#time').val(\"Getting data...\");\n\t\n\t//instruct location service to get position with appropriate callbacks\n\twatchID = navigator.geolocation.watchPosition(successPosition, failPosition, locationOptions);\n}", "function liste...
[ "0.6344596", "0.63395655", "0.6260239", "0.61990887", "0.6160599", "0.60834056", "0.6069384", "0.60091794", "0.599489", "0.59565306", "0.5937487", "0.590702", "0.5900777", "0.5899726", "0.5887482", "0.58838147", "0.5882278", "0.58762926", "0.58421427", "0.58396626", "0.581505...
0.5757641
25
Toggles search results / filters sidebar
function toggleSidebar(activeTab) { if (vm.isSidebarOpen) { closeSidebar(activeTab); } else { openSidebar(activeTab); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggle(){\r\n\ttoggleResult();\r\n\t// toggleSearch();\r\n}", "toggleSearchResults() {\n\t\tif (this._toggleSearchResultsBtn.getAttribute('data-collapse') === 'show') {\n\t\t\tthis.hideSearchResults();\n\t\t}\n\t\telse {\n\t\t\tthis.showSearchResults();\n\t\t}\n\t}", "function handleShowFilter() {\n ...
[ "0.79916406", "0.7418892", "0.7343858", "0.7225544", "0.72088784", "0.7142315", "0.7095798", "0.6989399", "0.69699603", "0.6904544", "0.6888763", "0.6844423", "0.6783419", "0.673918", "0.672514", "0.66902596", "0.66812617", "0.66812617", "0.66574174", "0.66112745", "0.6595977...
0.0
-1
Close search results / filters sidebar
function closeSidebar(activeTab) { vm.isSidebarOpen = false; // Close offer(s) $scope.$broadcast('search.closeOffer'); // Activate specific tab if (activeTab) { vm.sidebarTab = activeTab; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeSearch() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($body.hasClass('ascend') || $('body[data-header-format=\"left-header\"]').length > 0 && $('body.material').length == 0) {\r\n\t\t\t\t\t\t\t$('#search-outer').stop().transition({\r\n\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t}, 300, 'cubic-bezier(0.2, 1...
[ "0.7427615", "0.7257617", "0.7027744", "0.7005352", "0.6958833", "0.68488735", "0.68310356", "0.67892987", "0.67607874", "0.66644293", "0.66566205", "0.6582452", "0.6579446", "0.654573", "0.6498711", "0.64850134", "0.6457471", "0.6449023", "0.6444687", "0.6422267", "0.6382257...
0.0
-1
Open search results / filters sidebar
function openSidebar(activeTab) { vm.isSidebarOpen = true; // Activate specific tab if (activeTab) { vm.sidebarTab = activeTab; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function opensearch(){\n\tsummer.openWin({\n\t\tid : \"search\",\n\t\turl : \"comps/summer-component-contacts/www/html/search.html\"\n\t});\n}", "function handleShowFilter() {\n $('.primary-sidebar').toggleClass('open');\n }", "function openSearch() {\n // shows all levels - we wan...
[ "0.70166606", "0.6798719", "0.6610582", "0.6412625", "0.64124435", "0.6359276", "0.6359005", "0.632211", "0.6288209", "0.6281463", "0.6281463", "0.6257647", "0.62174493", "0.6196015", "0.61956424", "0.61780876", "0.6150031", "0.6150031", "0.6125532", "0.6124638", "0.61181843"...
0.0
-1
set a handler function for the range slider
function rangeChange() { heightElem = document.getElementById("height").value; drawPyramid(heightElem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeHandler(){\n\n // shortcut\n const $this = $(this);\n\n // set value in slider\n if( $this.data('type') == 'min' ) {\n $els.sliderCont.slider( 'values', 0, $this.val() );\n } else {\n $els.sliderCont.slider( 'values', 1, $this.val() );\n }\n\n }", "createSlider() {\n ...
[ "0.74320334", "0.7007974", "0.69852483", "0.6918602", "0.66885567", "0.65626067", "0.65601623", "0.6555738", "0.65380603", "0.6517415", "0.6485563", "0.64578736", "0.6438386", "0.6401725", "0.6372966", "0.6356019", "0.63343346", "0.63170004", "0.6309981", "0.6297383", "0.6292...
0.0
-1
Clean up when necessary.
function cleanup() { if ( jquery_data_key ) { elem.removeData( jquery_data_key ); } else if ( id ) { delete cache[ id ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__cleanUp() {\n // Data cursor cleanup\n if (this._dataCursor) {\n this.removeChild(this._dataCursor);\n this._dataCursor = null;\n }\n\n if (this.EventManager) {\n // Tooltip cleanup\n this.EventManager.hideHoverFeedback();\n\n // Event handler cleanup\n ...
[ "0.7408152", "0.74024683", "0.74024177", "0.74024177", "0.7347209", "0.73049617", "0.7252698", "0.72304547", "0.7213364", "0.71892035", "0.71269476", "0.70479953", "0.7029508", "0.7019943", "0.7006617", "0.699909", "0.6987011", "0.69842", "0.69544625", "0.69544625", "0.693681...
0.64804566
41
Yes, there actually is a setTimeout call in here!
function actually_setTimeout() { data.id = setTimeout( function(){ data.fn(); }, delay ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runsetTimeout() {\n console.log(\"\\n--->> runsetTimeout\");\n (0, _setTimeout.setTimeout01)();\n (0, _setTimeout.setTimeout02)();\n}", "function I(){return a.setTimeout(function(){eb=void 0}),eb=fa.now()}", "function o(){throw new Error(\"setTimeout has not been defined\")}", "onTimeout() {}", ...
[ "0.7382346", "0.7228901", "0.71976066", "0.7175842", "0.71360075", "0.71051335", "0.7055015", "0.6985182", "0.6860691", "0.68587816", "0.6831544", "0.6792921", "0.67428017", "0.67421377", "0.6729576", "0.6729576", "0.6729576", "0.6729576", "0.6729576", "0.6729576", "0.6729576...
0.8023618
0
Verifies the provided tag is in the whitelist.
function verify(tagName) { for (var i = 0; i < whitelist.length; i++) if (tagName === whitelist[i]) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async tagIsAvailable() {\n // get tag from state\n let tag = await this.state.tag\n tag = tag.toLowerCase()\n\n // is tag proper length\n if (tag.length<3 || tag.length>18)\n return false\n\n // is tag proper format\n if (tag.match(/^[a-z0-9]+$/i) === null)\n return false\n\n // i...
[ "0.6484035", "0.62840784", "0.61227435", "0.61227435", "0.61227435", "0.5998822", "0.5977357", "0.5974433", "0.58886635", "0.5830204", "0.5830204", "0.5830204", "0.5830204", "0.5830204", "0.5769395", "0.576513", "0.5687929", "0.5532777", "0.5509625", "0.54905117", "0.5458524"...
0.7782027
1
DO NOT EDIT. Use zipCodeMaker.py to generate.
function constructZipCodeArray() { var zipCoords = [ new google.maps.LatLng( 0.469917620000000E+02, -0.119169527000000E+03), new google.maps.LatLng( 0.469907790000000E+02, -0.119166055000000E+03), new google.maps.LatLng( 0.469933830000000E+02, -0.11916...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n var year_zip = define_zippy('year');\n var month_zip = define_zippy('month');\n var topic_zip = define_zippy('topic');\n var collection_zip = define_zippy('collection');\n}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip() {...
[ "0.62617874", "0.61700463", "0.61700463", "0.61700463", "0.61401784", "0.5890329", "0.58719826", "0.58719826", "0.58719826", "0.58719826", "0.5870302", "0.5865504", "0.58324796", "0.58245313", "0.5812556", "0.5686346", "0.5640527", "0.56226015", "0.5590591", "0.55527484", "0....
0.0
-1
Assumes `a` and `b` is the same type but if either one is `null` or `undefined`, it will be just ignored.
function mergeOptions(a, b) { if (a == null) return b if (b == null) return a if (Array.isArray(a)) { return a.concat(b) } if (typeof a === 'object' && !(a instanceof RegExp)) { const res = {} mergedKeys(a, b).forEach(key => { res[key] = mergeOptions(a[key], b[key]) }) return res ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function andForMaybe(a, b) {\n if (Maybe_1.isNotNullAndUndefined(a)) {\n return b;\n }\n return a;\n}", "function isBothUndefined(a,b){return isUndefined(a)&&isUndefined(b);}", "function AorB(a,b) {\n return isDefined(a) ? a : b;\n}", "function fillIfDefined(a, b) {\n var allowDeletion = ...
[ "0.73263335", "0.7256211", "0.72419864", "0.6685232", "0.6685232", "0.62039244", "0.6133014", "0.6120619", "0.6120619", "0.6120619", "0.6120619", "0.6120619", "0.6120619", "0.6120619", "0.6120619", "0.6107505", "0.60715127", "0.6068717", "0.6061582", "0.60608184", "0.60574305...
0.0
-1
Is a given value equal to null?
function isNull(obj) { return obj === NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNull(value) {\n return value === null;\n}", "function isNull(value) {\n return value === null;\n}", "__is_null(value) {\n return value === null;\n }", "function isNullish(value) {\n\t return value === null || value === undefined || value !== value;\n\t}", "function isNullish(val...
[ "0.8365561", "0.8365561", "0.8361783", "0.8298096", "0.8297686", "0.8297686", "0.8297686", "0.8297686", "0.82375073", "0.82337135", "0.8165487", "0.81478465", "0.814558", "0.80916256", "0.795918", "0.79017603", "0.7900505", "0.7900505", "0.7900505", "0.7900505", "0.7900505", ...
0.76255155
37
Is a given variable undefined?
function isUndefined(obj) { return obj === void 0; // return obj === undefined; // return typeOf(obj,"undefined"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUndefined(variable) {\n return typeof variable == 'undefined';\n}", "function isdefined( variable)\r\n{\r\n return (typeof(window[variable]) == \"undefined\")? false: true;\r\n}", "function isUndefined(value) {\n\n}", "function isDefined(variable){\n/* 609 */ \t\treturn (!(!( variable||fal...
[ "0.82473296", "0.78702843", "0.77174735", "0.763959", "0.76391363", "0.7593897", "0.7590858", "0.7585083", "0.757637", "0.75604385", "0.75590396", "0.75590396", "0.75590396", "0.75576335", "0.7540913", "0.7540913", "0.7540913", "0.7540913", "0.7540913", "0.7540913", "0.754091...
0.0
-1
Is a given value a boolean?
function isBoolean(obj) { return obj === TRUE || obj === FALSE || typeOf(obj, "boolean") // || toString.call(obj) == '[object Boolean]' ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool (value) {\n\t return typeof value === 'boolean'\n\t}", "function isBoolean(value) {\n return typeof value === \"boolean\";\n}", "function isBoolean(value) {\n return typeof value === 'boolean';\n}", "function boolean(value) {\r\n return value === TRUE || value === FALSE;\r\n }", "f...
[ "0.87254035", "0.8464433", "0.845991", "0.84368384", "0.8242233", "0.820203", "0.81686336", "0.80585575", "0.804857", "0.7939177", "0.7938544", "0.78901595", "0.7866401", "0.78528774", "0.78527814", "0.78527814", "0.7841903", "0.78380424", "0.77843535", "0.775716", "0.7740911...
0.72409827
62
Is a given value a number?
function isNumber(obj) { return typeOf(obj, "number"); // return toString.call(obj) == '[object Number]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function number(value) {\r\n return typeof value === 'number' && !isNaN(value);\r\n }", "function IsANumber(value) {//returns true if the given variable is a number.\n return (typeof value === \"number\");\n}", "__is_number(value) {\n return typeof value === 'number' && isFinite(value);\n }"...
[ "0.83858484", "0.82949686", "0.8284468", "0.8123776", "0.811777", "0.8064213", "0.8047468", "0.80220205", "0.8005295", "0.79971576", "0.79971576", "0.79971576", "0.79895425", "0.79895425", "0.7963627", "0.7925284", "0.7918646", "0.7918646", "0.7918646", "0.7878705", "0.786052...
0.0
-1
Is a given value a date?
function isDate(obj) { return typename(obj) === "date"; // return toString.call(obj) == '[object Date]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDate(value) {\n return getType(value) === \"[object Date]\";\n}", "isDate(value) {\n return (\n value &&\n Object.prototype.toString.call(value) === \"[object Date]\" &&\n !isNaN(value)\n );\n }", "function isDate(value) {\n return value instanceof Date && !isNaN(+value);...
[ "0.86448157", "0.835096", "0.820388", "0.81868577", "0.8152876", "0.811266", "0.80283123", "0.79937613", "0.79649323", "0.79552215", "0.77670306", "0.7751071", "0.7624838", "0.75908154", "0.75908154", "0.7563018", "0.7563018", "0.7563018", "0.74873734", "0.74208444", "0.74103...
0.7562937
18
Is a given value a string?
function isString(obj) { return typeOf(obj, "string"); // return toString.call(obj) == '[object String]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string$1(value) {\r\n return typeof value === 'string';\r\n }", "__is_string(value) {\n return typeof value === 'string' || value instanceof String;\n }", "is_string(val) {\n return (typeof val === 'string');\n }", "isString(value) {\n return typeof value === \"string\";...
[ "0.84317005", "0.8200684", "0.7986278", "0.7976516", "0.79641193", "0.79453975", "0.79128975", "0.78964317", "0.78964317", "0.78761256", "0.7840727", "0.78229105", "0.78185105", "0.7784941", "0.7784941", "0.7784941", "0.7784941", "0.77568316", "0.77182114", "0.77182114", "0.7...
0.0
-1
Is the given value a regular expression?
function isRegExp(obj) { return typename(obj) === "regexp"; // return toString.call(obj) == '[object RegExp]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRegexp(value) {\n return Object.prototype.toString.call(value) === '[object RegExp]';\n}", "function isRegExp(val) {\n return val && val.constructor && val.constructor === RegExp;\n}", "function isRegExp(val) {\n return val instanceof RegExp;\n ...
[ "0.8439218", "0.7884978", "0.782896", "0.7764003", "0.7754622", "0.766311", "0.76151955", "0.76151955", "0.7287636", "0.7212322", "0.7147958", "0.706148", "0.6996805", "0.6972782", "0.68671936", "0.6795439", "0.6787684", "0.6785632", "0.67700875", "0.6741561", "0.6719774", ...
0.7332725
8
Is a given value a function?
function isFunction(obj) { return typeOf(obj, "function"); // return toString.call(obj) == '[object Function]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function func(value) {\r\n return typeof value === RAW_FUNCTION;\r\n }", "is_function(value) {\n return typeof(value) === 'function';\n }", "function isFunction(val) {\n return isValue(val) && typeof val === 'function';\n}", "function isFn (x) { return typeof x === 'function' }", "functi...
[ "0.82698584", "0.8211478", "0.8188376", "0.8127446", "0.8103121", "0.80919087", "0.80902296", "0.80902296", "0.80902296", "0.80839723", "0.80763704", "0.80367714", "0.8026835", "0.8026835", "0.8026835", "0.8026835", "0.8024826", "0.80163383", "0.79149836", "0.79149836", "0.77...
0.0
-1
Is a given variable an object?
function isObject(obj) { return obj === Object(obj); // return obj instanceof Object; // return typeOf(obj, "object"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_object(param){\n\t\tif(Object.prototype.toString.call(param) == \"[object Object]\" || param.constructor == Object){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function bs_isObject(theVar) {\n ret = false;\n if (typeof(theVar) == 'object') {\n ret = !bs_isNull(theVar);\n }\n return ...
[ "0.7716266", "0.76582724", "0.76488197", "0.7386834", "0.73841476", "0.7350965", "0.73449117", "0.73449117", "0.73449117", "0.7338951", "0.7332886", "0.73231757", "0.7260884", "0.7260884", "0.7260884", "0.7260884", "0.7260884", "0.7260884", "0.7260884", "0.7260884", "0.726088...
0.0
-1
Is a given value a DOM element?
function isElement(obj) { return obj && obj.nodeType == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isElement(value) { return Boolean(value) && value.nodeType === 1; }", "function isElement(value) {\n return isType(value, 'Element');\n}", "function isElement(o) {\n return !!o && o.nodeType === 1;\n}", "function isElement(o) {\n return o && (typeof o === 'undefined' ? 'undefined' : _typeof(o))...
[ "0.8723542", "0.80527323", "0.7547688", "0.7490324", "0.7477909", "0.7461511", "0.74145967", "0.74087673", "0.7406908", "0.73991036", "0.7397286", "0.7373203", "0.73614055", "0.7358896", "0.7358896", "0.7358896", "0.7358896", "0.7358896", "0.7358896", "0.7358896", "0.7358896"...
0.7468091
5
Is the given value `NaN`?
function isNaN(obj) { // `NaN` is the only value for which `===` is not reflexive. return obj !== obj; // return obj == NULL || !rdigit.test(obj) || window.isNaN(obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _isActualNaN(value) {\n\t\t\treturn typeof value === 'number' && value !== value;\n\t\t}", "function isNan(v) {\n return v !== v\n}", "function isNan(o) {\n return o !== o;\n }", "function isNaN(value) {\n return Number(value) !== value;\n}", "function isNaN(value) {\n if (Number....
[ "0.84347075", "0.8192438", "0.7946235", "0.7933588", "0.7920289", "0.7897284", "0.78422076", "0.78422076", "0.78422076", "0.7819826", "0.7793464", "0.77796113", "0.77369547", "0.7665244", "0.7657622", "0.7420783", "0.7326512", "0.73238856", "0.73238856", "0.71884793", "0.7161...
0.7248225
19
Is a given array, string, or object empty? An "empty" object has no enumerable ownproperties.
function isEmpty(obj) { if (obj == NULL) { return TRUE; } if (isArray(obj) || isString(obj)) { return obj.length === 0; } for (var key in obj) { if (hasOwnProperty(obj, key)) { return FALSE; } } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyObject (data) {\n return object(data) && Object.keys(data).length === 0;\n }", "function nonEmptyObject (data) {\n return object(data) && Object.keys(data).length > 0;\n }", "function emptyObject (data) {\n return object(data) && Object.keys(data).length === 0;\n }", "function...
[ "0.73593056", "0.73236954", "0.7318654", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.73143095", "0.7301589", "0.72587943", "0.7244329", "0.72328585", "0.72119737", "0.7167711", "0.7167711", "0.7153867", "0...
0.72168934
16
A crude way of determining if an object is a window
function isWindow(obj) { return obj && isObject(obj) && "setInterval" in obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWindow(obj) {\n return obj !== null && obj === obj.window;\n}", "function isWindow(obj) {\n return obj !== null && obj === obj.window;\n }", "function isWindow(obj) {\n return obj !== null && obj === obj.window;\n }", "function isWindow(obj) {\n return obj !== null && obj === obj.win...
[ "0.850032", "0.8427498", "0.8427498", "0.8427498", "0.8427498", "0.8427498", "0.8427498", "0.8408737", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.8392342", "0.83816147", "...
0.0
-1
args is for internal usage only
function each(object, callback, args) { if (!object) return; var name, i = 0, length = object.length, isObj = isUndefined(length) || isFunction(object); if (args) { if (isObj) { for (name in object) { if (callback.apply(object[name], args) === FALSE) { break; } } } else { for (; i < l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function args() {\n\n}", "function argsFor() {\n\n}", "apply(args) {\n // ... //\n }", "function SimpleArgs() {\r\n}", "function packageArgs(args) {\n\t\tvar params = slice.call(args);\n\t\tparams.isArgs = true;\n\t\treturn params;\n\t}", "function setArgs(args){\n\t\tvar removalItems = [];\n\t...
[ "0.7574697", "0.68659234", "0.680716", "0.65311235", "0.65039647", "0.63960105", "0.6394928", "0.6388257", "0.62979805", "0.62975466", "0.622974", "0.6183195", "0.6167297", "0.6160872", "0.61281997", "0.6057077", "0.60570765", "0.60570306", "0.5996803", "0.59931463", "0.59912...
0.0
-1
Convert Stringformatted flags into Objectformatted ones and store in cache
function createFlags(flags) { return flagsCache[flags] = hash(flags); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFlags(flags){var object=flagsCache[flags]={},i,length;flags=flags.split(/\\s+/);for(i=0,length=flags.length;i<length;i++){object[flags[i]]=true;}return object;}", "function createFlags( flags ) {\n var object = flagsCache[ flags ] = {},\n i, length;\n flags = flags.split( /\\s+/ );\n for ( i...
[ "0.71981597", "0.6888528", "0.6888528", "0.6888528", "0.6888528", "0.6888528", "0.6874316", "0.6842411", "0.6842411", "0.6842411", "0.6842411", "0.6842411", "0.6842411", "0.6842411", "0.5715296", "0.55618745", "0.55346507", "0.54250264", "0.54197", "0.5409351", "0.54049665", ...
0.54431254
17
Define the main callback that's given as `this` to the steps.
function next() { counter = pending = 0; // Check if there are no steps left if (steps.length === 0) { // Throw uncaught errors if (arguments[0]) { throw arguments[0]; } return; } // Get the next step to execute var fn = steps.shift(), result; results = []; // Ru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onStepClicked(step) {\r\n if (this.props.hasOwnProperty('onStepClicked') && \r\n typeof this.props.onStepClicked === 'function') {\r\n \r\n // Wrap the function in a generic handler so we can pass in custom args\r\n let callback = this.props.onStepClicked\r\n ...
[ "0.6150383", "0.6046543", "0.5952939", "0.58753425", "0.5753678", "0.55930823", "0.555991", "0.5557839", "0.5553341", "0.5533715", "0.54985225", "0.54939437", "0.5485685", "0.54475504", "0.5443336", "0.5436293", "0.5423454", "0.5423454", "0.5423454", "0.5423454", "0.5423454",...
0.0
-1
validation rules. customer id. customer Name. town code. part Number. description. price. quantity.
function validData() { // Customer id validation. if (!customerId.value) { document.getElementById('style').style.display ='block'; document.getElementById('popup1').innerHTML='Customer Id is missing'; return false; } // Customer Name validation. if (!customerName.value) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validation(customer) {\n const schema = {\n name: Joi.string().min(3).required(),\n phone: Joi.number(),\n isGold: Joi.boolean(),\n discount: Joi.number().min(0).max(1),\n };\n\n return Joi.validate(customer, schema);\n}", "function validatecost(){\n\t\t/*Invalid field if name is > 50 cha...
[ "0.63526034", "0.62365294", "0.6104025", "0.60859036", "0.6035848", "0.6033752", "0.5962602", "0.59118176", "0.58432186", "0.57860494", "0.57564074", "0.5720194", "0.5705629", "0.56460655", "0.5632019", "0.562427", "0.5609375", "0.55931133", "0.55849296", "0.5559572", "0.5553...
0.63176334
1
End of validation rules. Returning cost value
function costoutput() { cost =price.value*quantity.value; document.getElementById('cost').innerHTML='$'+cost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validatecost(){\n\t\t/*Invalid field if name is > 50 characters*/\n\t\tif (cost.val().length > 4)\n\t\t{\n\t\t\tcost.removeClass(\"valid\");\n\t\t\tcost.addClass(\"error\");\n\t\t\tcostMsg.removeClass(\"valid\");\n\t\t\tcostMsg.addClass(\"error\");\n\t\t\tcostMsg.text(\"9999 max!\");\n\t\t\tcostFlag = tru...
[ "0.61015266", "0.5773087", "0.57269716", "0.56555104", "0.560222", "0.5574779", "0.5501424", "0.54913104", "0.5486916", "0.54816693", "0.5419538", "0.54137486", "0.5398477", "0.53943825", "0.53940016", "0.537219", "0.5370393", "0.5358611", "0.5336034", "0.52924013", "0.528706...
0.4886637
80
returning values depending on charge returning values depending on shipment method returning values depending on charge and shipment method
function shippingHandling() { var ups= document.getElementById('ups'); var feg= document.getElementById('feg'); var upa= document.getElementById('upa') var fea =document.getElementById('fea') switch (overSizeContainer.checked) { case true: charge = (q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shipCost(large, medium, small){ //this is the \"normal\" function to find out the total cost of shipping based on the number of each sized packages being shipped multiplied by the individual cost to ship that particular size. \n\tvar largeRate = 9.95; //this variable represents the cost for one large pac...
[ "0.64236164", "0.62228686", "0.5768383", "0.57660156", "0.5740481", "0.5678826", "0.5650397", "0.56465155", "0.5639024", "0.5569444", "0.5557541", "0.5525991", "0.55128586", "0.5477997", "0.54380363", "0.5434972", "0.53873605", "0.5381842", "0.53393155", "0.53371006", "0.5331...
0.4929416
77
You may assume the two numbers do not contain any leading zero, except the number 0 itself. Input: (2 > 4 > 3) + (5 > 6 > 4) Output: 7 > 0 > 8
function ListNode(val) { this.val = val || ''; this.next = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkNumber(a, b) {\n if (a == 8 || b == 8) {\n console.log(true);\n } else if (a + b == 8) {\n console.log(true);\n } else if (a - b == 8 || b - a == 8) {\n console.log(true);\n } else {\n console.log(false);\n }\n}", "function add(a, b) {\n var res = '', c...
[ "0.64079225", "0.6405643", "0.63914347", "0.635419", "0.6301464", "0.6253891", "0.62327063", "0.6195687", "0.61805725", "0.61666334", "0.6103205", "0.6095103", "0.60774195", "0.60666364", "0.60456026", "0.6022177", "0.6015464", "0.60109967", "0.6009143", "0.5977878", "0.59709...
0.0
-1
Lazy load the task dependencies.
loadDependencies() { gulpNunjucksRender = require('gulp-nunjucks-render'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTask ( taskName ) {\n\n if( !config.gulp.lazy ) return log.error( {\n message: 'Trying to lazy load a task, but gulp is not set in lazy mode?!',\n sender: 'gulpDecorator'\n } );\n\n if( _loadedTasks[ taskName ] === undefined ) {\n\n\t\tvar taskPath = path.normalize( '../../../ta...
[ "0.665481", "0.65471417", "0.6496546", "0.6407991", "0.6407991", "0.6407991", "0.6407991", "0.64055336", "0.6392545", "0.63685906", "0.63685906", "0.6341331", "0.629162", "0.61640316", "0.61065", "0.6052811", "0.5963979", "0.5963019", "0.59141815", "0.59131634", "0.5896869", ...
0.0
-1
Build the Gulp task.
gulpTask($) { return ( gulp .src(this.src.path) .pipe(this.nunjucks()) .on('error', this.onError()) .pipe($.if(!this.output.isDir, $.rename(this.output.name))) .pipe(this.saveAs(gulp)) .pipe(this.onSuccess()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "build () {\r\n // glob tasks\r\n let done = [];\r\n let tasks = glob.sync (this.files ('tasks/*.js'));\r\n let watchers = [];\r\n let installers = [];\r\n\r\n // loop tasks\r\n for (var i = 0; i < tasks.length; i++) {\r\n // load task\r\n let task = parser.task (tasks[i]...
[ "0.77516556", "0.6435669", "0.63249594", "0.6314723", "0.63079816", "0.61868316", "0.6184032", "0.6158415", "0.61567914", "0.6085954", "0.60654265", "0.59969586", "0.5991847", "0.59191173", "0.5894538", "0.5877176", "0.5856852", "0.5837745", "0.58283556", "0.5802977", "0.5801...
0.60930187
9
Run the files through Nunjucks.
nunjucks() { this.recordStep('Running Nunjucks'); return gulpNunjucksRender(Object.assign( Elixir.config.nunjucks.options, this.options )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html() {\n // Gets .html and .nunjucks files in pages\n return gulp.src('src/pages/**/*.+(html|nunjucks)')\n // Renders template with nunjucks\n .pipe(nunjucksRender({\n path: ['src/templates']\n }))\n // output files in src folder\n .pipe(gulp.dest('app'));\n}", "function ...
[ "0.6385008", "0.63489586", "0.625131", "0.62151", "0.61876893", "0.59827954", "0.5895659", "0.5680864", "0.5599034", "0.5568862", "0.54534876", "0.5445698", "0.5439511", "0.542609", "0.54214686", "0.54206276", "0.54158527", "0.5387023", "0.53717816", "0.5343082", "0.5320264",...
0.6527204
0
route middleware to make sure
function isLoggedIn(req, res, next) { // if user is authenticated in the session, carry on if (req.isAuthenticated()) return next(); // if they aren't redirect them to the home page res.redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function middleware(request, response, next) {}", "function routeMiddleWare(req, res, next) {\n console.warn(req.method + ' ' + req.url + ' with ' + JSON.stringify(req.body))\n next()\n}", "setupRoute(route) {\n let controller = this.controllers[route.controller];\n let action = controller[...
[ "0.74284405", "0.7036556", "0.6687348", "0.66039693", "0.6474101", "0.64559895", "0.6397725", "0.63971585", "0.63918555", "0.63887274", "0.63881433", "0.6380517", "0.6363804", "0.63444084", "0.63354117", "0.63053715", "0.63036287", "0.62684625", "0.6257528", "0.6252608", "0.6...
0.0
-1
PRE_SUBMIT CHECKING_PASSWORD MATCH TOOLTIPS FOR valid password condition information
function checkStrength() { var testThis = jQuery.trim(jQuery("#NewPassword").val()); var onlyLetters = /[a-zA-Z]/; var onlyNumbers = /[0-9]/; var specialCharacters = /[^\w\s]/; var matches = 0; var checkIcon = "form-img/check_icon.png"; var crossIcon = "form-img/cross-icon.png"; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkPassword() {\n if (this.value.length >= 8) {\n setAccepted('password-validated');\n } else {\n setUnaccepted('password-validated');\n }\n}", "processPassRep() {\n if (this.password.value !== this.passwordRepeat.value) {\n this.passwordRepeat.err = true;\n ...
[ "0.6778656", "0.6455868", "0.641809", "0.6395293", "0.638506", "0.63825804", "0.63749075", "0.6360682", "0.63545084", "0.63474387", "0.63437486", "0.634", "0.63185364", "0.6273992", "0.626638", "0.6232418", "0.6223615", "0.62168837", "0.62076396", "0.6206514", "0.6191641", ...
0.0
-1
END OF PASSWORD STRENGTH ANIMATION
function removeErrorMsg(id){ var clearError=document.getElementById('error_'+id).innerHTML=""; return clearError; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextPhase() {\n attempt = 3;\n\n // Show End UI if password Type is 3\n if(passwordType != 3) {\n passwordType++;\n $(\"#ui_3\").fadeOut(null,()=>{\n showPasswordInput();\n });\n }\n else {\n showEnd();\n }\n}", "function checkStrength() {\r\n\t\t...
[ "0.62326884", "0.6016234", "0.5809922", "0.56494576", "0.56419855", "0.56189287", "0.55894995", "0.5589021", "0.5588488", "0.55701125", "0.5569683", "0.55651253", "0.55574894", "0.55485964", "0.5547149", "0.55413884", "0.5475317", "0.547474", "0.5452237", "0.5442781", "0.5424...
0.0
-1
Sample Output : "0 is even" "1 is odd" "2 is even"
function iterate() { var num=0; do{ num++; if(num % 2 === 1) { alert (num + " is odd"); } else { alert (num + " is even"); } } while (num < 15); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEven() {\n if (num % 2 == 0)\n return (\"even\");\n else \n return (\"odd\");\n }", "function evenOdd(number){\n if( number % 2 === 0){\n return \"even\";\n } else {\n return \"odd\";\n } \n ...
[ "0.7530177", "0.74565905", "0.7364492", "0.7339435", "0.73000234", "0.72598547", "0.72499347", "0.7226583", "0.7157107", "0.7149877", "0.71446306", "0.71426105", "0.7136716", "0.71254903", "0.7124221", "0.71216017", "0.7101602", "0.70874286", "0.708096", "0.7069623", "0.70468...
0.0
-1
For Example: [ [1, 2, 3, 4, 5], // minimum value of row is 1 [5, 6, 7, 8, 9], // minimum value of row is 5 [20, 21, 34, 56, 100] // minimum value of row is 20 ] So, the function should return 26 because sum of minimums is as 1 + 5 + 20 = 26 Note: You will be always given nonempty array containing Positive values. ENJOY...
function sumOfMinimums(arr) { const array1 = math.min(...[1,2,3,4]) const array2 = math.min(...[10,11,12,12]) const array3 = math.min(...[20,21,22,23]) const arr = array1.concat(array2) const finalArr = arr.concat(array3) console.log( finalArr.reduce(function(acc, val) { return acc + val; }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minSum(arr) {\n // your code here\n var minSum = 0;\n var lastElement = arr.length - 1;\n \n function sortArray( a, b ){\n return a - b;\n }\n\n arr.sort(sortArray);\n\n for( var i = 0; i < arr.length; i++ ){\n if(i == arr.length / 2) return minSum;\n minSum += arr[i] * arr[lastElement - i]...
[ "0.69340944", "0.6900381", "0.6883047", "0.68269634", "0.6805537", "0.6713385", "0.6624847", "0.6603378", "0.65929055", "0.6580615", "0.6563868", "0.6558476", "0.65281063", "0.65231156", "0.6516339", "0.6500952", "0.64973277", "0.6481505", "0.6470542", "0.6451438", "0.6438296...
0.6581906
9
Destructively modify MDAST to rename all footnote ids to be unique and based on the contents of the footnote. Id is short and friendly id including a hash of the contents, e.g. the text " ends up with footnote id "^investoped.dreyz4".
function normalizeFootnoteIds(mdast) { const footnoteIdMapping = {}; const newFootnoteIds = new Set(); const missingFootnoteIds = new Set(); const orphanedFootnoteIds = new Set(); const footnoteTextSet = new Set(); let footnoteRefCount = 0; // Calculate new footnote ids based on present definitions and a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newId(_id)\n{\n if(_id == \"watchHeader\")\n {\n return \"tutHeader\";\n }\n else\n {\n return \"watchHeader\";\n }\n}", "function idify ($) {\n $('h1, h2, h3, h4, h5, h6').each(function () {\n var $this = $(this)\n $this.attr('id', slugify($this.text()).toLowerCas...
[ "0.6084076", "0.6066698", "0.5764126", "0.5761146", "0.5689625", "0.56801695", "0.5632008", "0.558655", "0.5578283", "0.55499405", "0.5538282", "0.55094653", "0.5465561", "0.54429525", "0.5420061", "0.5388195", "0.53697073", "0.53697073", "0.53697073", "0.5318107", "0.5317409...
0.73492754
0
Query menus added by modules. Only returns menus that user is allowed to see.
function queryMenu(name, defaultMenu) { Menus.query({ name: name, defaultMenu: defaultMenu }, function (menu) { $scope.menus[name] = menu; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadManagerMenu() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n // Load the possible manager menu options, pass in the products data\n loadManagerOptions(res);\n });\n}", "function loadMenus() {\r\n debugger;\r\n API.getMenus()\r\n ...
[ "0.6543928", "0.6509169", "0.6277638", "0.621289", "0.621289", "0.6194843", "0.6194843", "0.61914057", "0.6183225", "0.61399376", "0.61019635", "0.6099731", "0.6084971", "0.6061181", "0.60553455", "0.6041762", "0.6025689", "0.60108185", "0.60016036", "0.5996353", "0.59680396"...
0.6199971
5
moment function to create time association for each hour
function timeCodingAM(){ if (moment().format("H") > 1 && moment().format("H") < 9) { $(`.am`).addClass("present"); } else if (moment().format("H") >= 9){ $(`.am`).addClass("past"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "newSchedule() {\n const\n startHour = 9,\n endHour = 17;\n \n let\n currentHour = startHour,\n schedule = {\n date: moment().format(\"YYYY-MM-DD\"),\n events: []\n };\n \n while (currentHour <= endHour) {\n let currentMoment = moment({hour: currentHour});\n\...
[ "0.69619465", "0.64106935", "0.6247416", "0.6191878", "0.6189085", "0.61188555", "0.61137784", "0.61137784", "0.61137784", "0.61137784", "0.61137784", "0.61137784", "0.61137784", "0.59978884", "0.5986263", "0.5901129", "0.59002966", "0.5892206", "0.5879179", "0.5877562", "0.5...
0.5432885
65
returns random integer from min to max
randi( min=0, max=1 ) { return Math.floor( this.randf(min,max) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "getRandomInteger(min, max) {\n return Math.floor(Math.rand...
[ "0.9031352", "0.9031352", "0.8976035", "0.896478", "0.8964115", "0.89150465", "0.8897092", "0.8893896", "0.8886422", "0.8885373", "0.8880314", "0.88777345", "0.88745826", "0.8870834", "0.88673496", "0.8861266", "0.8858506", "0.88573945", "0.88555783", "0.8852908", "0.8852908"...
0.0
-1
returns random float from min to max
randf( min=0, max=1 ) { return min + ( max - min ) * this.random(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomFloat(min,max){\n return min+(Math.random()*(max-min));\n}", "function randomFloat(min, max){\r\n\treturn Math.random() * (max - min) + min;\r\n} // END - Random value", "function getRandomFloat(min, max) {\n return min + Math.random() * (max - min);\n}", "function randomFloat(min, max) {\...
[ "0.88626707", "0.8855244", "0.8821432", "0.87953633", "0.8763196", "0.8752971", "0.8752971", "0.8717658", "0.86287415", "0.86012226", "0.851984", "0.849105", "0.8489791", "0.80604494", "0.80109495", "0.79954726", "0.7988802", "0.7984162", "0.7979933", "0.7954668", "0.7935567"...
0.7995135
16
what if the array is odd number or when we split the array the results are odd? let's take one step at a time.. first work on the comparision function, then think about this
function mergeSort (arr) { // console.log('in mergesort', arr) if (arr.length === 1) { return arr; } // split the array into right and left const left = arr.splice(0, arr.length/2); const right = arr; return merge( mergeSort(left), mergeSort(right) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function specialArray(array){\n for (var i = 0; i <array.length; i++){\n if (i % 2 === 1) {\n if (array[i] % 2 ===0){\n return false\n }\n }\n if (i % 2 === 0){\n if (array[i] % 2 ===1){\n return false\n }\n }\...
[ "0.7038018", "0.7017383", "0.6989393", "0.69777256", "0.69649976", "0.6958977", "0.69323534", "0.686943", "0.68617326", "0.6845085", "0.6804707", "0.6781272", "0.67798793", "0.67584914", "0.67541444", "0.67390746", "0.6733305", "0.6717603", "0.67033786", "0.6691026", "0.66838...
0.0
-1
Functions add todo to the list of tasks
function addTodo(event) { if (event.key == "Enter") { // prevent form from submit event.preventDefault(); // Create todo div to display the input result const todoDiv = document.createElement("div"); todoDiv.classList.add("todo"); todoDiv.classList.add(SortbyCat.valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTodo(){\n\t\t\tself.todoList.push({task: self.text, done: false});\n\t\t\tself.text = null;\n\t\t}", "function addTask(){\n\t\tif (item.value.length >= 1) {\n\t\t\tincompleteUl.append('<li>' + '<p>' + item.value + '</p>' + complete + remove + '</li>');\n\t\t\ttoDoList.push(item.value);\n\t\t}else {\n...
[ "0.81761295", "0.81281245", "0.81018627", "0.8089917", "0.8000579", "0.7864736", "0.7792056", "0.772633", "0.76856476", "0.7684559", "0.76208174", "0.761257", "0.7600186", "0.75841606", "0.75809574", "0.7576875", "0.7534544", "0.7534106", "0.75271827", "0.75124747", "0.751004...
0.0
-1
delete the item from the task also check the task if the task completed
function deletcheck(even) { const item = even.target; //Delete task if it completed if (item.classList[0] === "deletedBtn") { const todo = item.parentElement; deletetodo(todo); todo.remove(); } //check Task if it completed if (item.classList[0] === "completedBtn") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteSubtask(event) {\n\n let idToDelete = event.target.name;\n let subtasks = this.subtasks;\n let subtaskIndex;\n let recordIdToDelete;\n\n this.processing = true;\n\n for (let i = 0; i < subtasks.length; i++) {\n if (idToDelete === subtasks[i].id) {\n ...
[ "0.74124515", "0.73442787", "0.71578753", "0.7064872", "0.70238197", "0.70185643", "0.7005507", "0.70026207", "0.69714403", "0.69684863", "0.69625777", "0.69042647", "0.6867297", "0.68609023", "0.6799663", "0.6757236", "0.67324895", "0.67175317", "0.6651393", "0.66435426", "0...
0.0
-1
On double click make an update on current todo
function updateondoubleclick(even) { const item = even.target; // get target if (item.classList[0] === "todo-item") { // check if item has class var id = item.childNodes[1].value; // create input field and make it visible also affect the the value of the element that will be updated ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function todoDblClicked(todo) {\n var div = document.getElementById('li_' + todo._id);\n var inputEditTodo = document.getElementById('input_' + todo._id);\n div.className = 'editing';\n inputEditTodo.focus();\n }", "function todoDblClicked(todo) {\n var div = document.getElementById('li_' + todo....
[ "0.73370844", "0.73370844", "0.7018862", "0.6883981", "0.6746146", "0.6657809", "0.66080016", "0.6581881", "0.6535197", "0.64487374", "0.6439795", "0.6427428", "0.6404987", "0.63625586", "0.62886643", "0.62501776", "0.6244926", "0.6240432", "0.6225419", "0.6201381", "0.618685...
0.7461667
0
sort the list of tasks by clicking on options
function sortTodo(even) { const todos = todoList.childNodes; todos.forEach(function (todoF) { switch (even.target.innerText) { case "All": todoF.style.display = "flex"; getTodolist(); break; case "Completed": if (tod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sortedTasks(state){\n //criar uma variavel para ordernar nossas tarefas sem alterar o estado original(state)\n let sorted = state.tasks\n return sorted.sort((a,b) => {\n //se o a for menor então ele retorna para corrigir a ordenação\n if(a.name.toLowerCase() < b.name.toLo...
[ "0.73142225", "0.6974253", "0.6923264", "0.6870205", "0.6818897", "0.6754876", "0.675081", "0.6728766", "0.67215323", "0.67126113", "0.6661508", "0.65046996", "0.6475985", "0.64106506", "0.64097947", "0.6359519", "0.6351951", "0.6329261", "0.63080066", "0.6303059", "0.6294560...
0.6345932
17
Get the count of the all todo list available
function getTodolist() { const listcountItem = todoList.childNodes; itemcount.innerText = listcountItem.length; if (listcountItem.length === 0) { filderDiv.style.display = "none"; } else { filderDiv.style.display = "flex"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTotalCount() {\n return _.size(this.todos);\n }", "function remainingTodos(){\n\t\t\tvar count = 0;\n\t\t\tfor(var i = 0; i < self.todoList.length; i++){\n\t\t\t\tif(self.todoList[i].done === false){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t}", "function toDoCount() {\n\t\tvar c...
[ "0.7903833", "0.77045673", "0.75958085", "0.75282973", "0.75067455", "0.7439719", "0.7419774", "0.72797394", "0.7227143", "0.72254527", "0.71714985", "0.7144293", "0.7141336", "0.71217024", "0.7028173", "0.69939125", "0.69768244", "0.6916274", "0.68262535", "0.677396", "0.677...
0.0
-1
save the added input to ajax and send it to controller
function savetodo(todo, cat) { $.ajaxSetup({ headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"), }, }); var ajxRst = $.ajax({ type: "POST", async: "false", url: "/Taskadded", data: { taskname: todo, task...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveAdd() {\n var name = $('#newlist input[name=\"addnew\"]').attr('value');\n jQuery.ajax({url: '/add_frameelement/', type: 'POST', dataType: 'text',\n data: {\n fe_name: name,\n frame_name: frameName\n },\n success: function(data) {\n location....
[ "0.665766", "0.6377055", "0.6257072", "0.6253536", "0.61795765", "0.6174611", "0.6155347", "0.61433434", "0.61285377", "0.6119382", "0.61047417", "0.6096546", "0.60664225", "0.606154", "0.60571784", "0.6048715", "0.6032935", "0.6019931", "0.60108876", "0.60055953", "0.6004398...
0.0
-1
delete a todo from the list if it's completed.
function deletetodo(todo) { const id = todo.children[1].childNodes[1].value; $.ajaxSetup({ headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"), }, }); $.ajax({ type: "delete", url: "/deleteTask/" + id, data: { id: id }, succ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAllCompletedTodos() {\nlet allLis = document.getElementsByTagName(\"li\");\n for (let i = 0; i < allLis.length; i++) {\n if (allLis[i].classList.contains(\"apply-line-through\")) {\n let removedItem = { task: `${allLis[i].value}`, completed: `${todos[i].compl...
[ "0.7157022", "0.7155213", "0.71420574", "0.7135923", "0.71299005", "0.70929414", "0.70361036", "0.7026677", "0.694623", "0.6882849", "0.6876477", "0.6867558", "0.68492657", "0.6841433", "0.68394655", "0.6802931", "0.6769243", "0.6749453", "0.6744335", "0.6733546", "0.67309415...
0.63042635
91
blast, detonation, explosion is exception (antimagic resistance)
function isMagic(attack){ for(var i=0; i<magicAttack.length; i++){ if(attack==magicAttack[i]){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcExplosion(rabbits, bombs) {\n _.each(bombs, function (bomb) {\n rabbits = _.filter(rabbits, function (rabbit) {\n return !(inRadius(rabbit, bomb, kill_radius));\n });\n });\n return rabbits;\n}", "explodeBomb(bomb, r) {\n\t\tvar x = bomb.getXPosition();\n\t\tvar y =...
[ "0.6256821", "0.62195146", "0.6198757", "0.6045903", "0.6010954", "0.5984153", "0.5983245", "0.5973851", "0.5960165", "0.59473014", "0.59439373", "0.5895372", "0.5881169", "0.58345175", "0.5817043", "0.58084035", "0.58034766", "0.57878506", "0.5745538", "0.5733324", "0.573329...
0.0
-1
two different functions for request one for each server
function handleRequestOne(request, response) { response.end("you're awesome!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRequestTwo(request, response) { //whats the request? req to the url.\n//console.log(request.url);\n // Send the below string to the client when the user visits the PORT URL\n response.end(\"I guess javasccript is not your forte! \" + request.url);\n} //creates the strung & sends it back to the bro...
[ "0.6312448", "0.6204202", "0.6086761", "0.6075123", "0.6031192", "0.597728", "0.59577245", "0.59191984", "0.58954227", "0.5867865", "0.58555514", "0.5835566", "0.58311665", "0.5827857", "0.58273685", "0.5796675", "0.579545", "0.57943165", "0.5787531", "0.5781063", "0.5775862"...
0.5573512
39
Routing function, this is executed by Calipso in response to a http request (if enabled)
function route(req, res, module, app, next) { // Menu items res.menu.primary.addMenuItem(req, {name:'Repository',path:'repo',url:'/repo',description:'Module and theme repository ...',permit:"admin:core:configuration"}); // Router module.router.route(req, res, next); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "doRoute() {\n let routename = 'HTTP:' + this.request.method + ':' + this.url.pathname;\n this.run(routename, this.restnio.routes, \n Parser.parseFullHttpParams, this.request, this.url);\n }", "startLinkRouting() {}", "function route() {\n\t\tvar o = status(); //get current hash obje...
[ "0.74935997", "0.66045433", "0.6556622", "0.6481778", "0.64798623", "0.6475255", "0.6449303", "0.6432673", "0.63613653", "0.63349533", "0.63138604", "0.6296917", "0.62348795", "0.62202454", "0.62056357", "0.62056357", "0.62056357", "0.62056357", "0.62056357", "0.62056357", "0...
0.0
-1
Initialisation function, this is executed by calipso as the application boots up
function init(module, app, next) { // Register events for the REPO Module calipso.e.addEvent('REPO_CREATE'); calipso.e.addEvent('REPO_UPDATE'); calipso.e.addEvent('REPO_DELETE'); calipso.e.addEvent('REPO_VERSION'); // General purpose calipso.e.addEvent('REPO_COMMENT'); // General purpose calipso.lib....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init () {\n // Here below all inits you need\n }", "function _init() {\n }", "function init() {\n\t \t\n\t }", "function init() {\n\n }", "function init() {\n\n }", "function init() {\r\n\r\n }", "function init() {\n }", "funct...
[ "0.8022445", "0.78438634", "0.7816605", "0.77452296", "0.77452296", "0.77220464", "0.7712229", "0.76932055", "0.767745", "0.7645696", "0.7621669", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0.76103795", "0....
0.0
-1
Helper to check if user is the author of an object
function isAuthor(req,author) { return req.session && req.session.user && ((req.session.user.username === author) || req.session.user.isAdmin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCommentAuthor(author) {\n return divvy.currentUser == author;\n }", "function isDiscussionAuthor(author) {\n return divvy.currentUser == author;\n }", "function checkAuthor(){\n\tvar AuthorInfo = getCookie(\"nick\");\n\tscope.AuthorUID = AuthorInfo ? AuthorInfo.match(/\\(\\d{5,10...
[ "0.7275501", "0.7170985", "0.70242625", "0.6999578", "0.699284", "0.69908", "0.69801337", "0.68980086", "0.6508022", "0.6484471", "0.6463662", "0.64533645", "0.63084364", "0.6276223", "0.62517023", "0.6218541", "0.6200519", "0.61051214", "0.609591", "0.6054168", "0.6039951", ...
0.73623544
0
Helper functions to manage the forms
function repoForm() { return {id:'repo-form',title:'Add your module or theme ...',type:'form',method:'POST',action:'',tabs:false, fields:[ {label:'Name',name:'repo[name]',type:'text',description:'Enter the name of your module or theme (no spaces or invalid chars).'}, {label:'Type',na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeForms()\n{\n\t\n\t// Headers\n\t$('fieldset legend').each(function(){\n\t\t$(this).parent().prepend('<h2>'+$(this).css({display:'none'}).html()+'</h2>');\n\t\t\n\t});\n\t\n\t\n\t// Inputs\n\t$('.form input').each(function(){\n\t\t\n\t\tswitch( $(this).attr('type') )\n\t\t{\n\t\t\tcase 'submit':\n\t\t\...
[ "0.6846274", "0.66113436", "0.6582719", "0.65741885", "0.65372336", "0.65266395", "0.6511496", "0.65055114", "0.64212", "0.64196134", "0.6387625", "0.62995195", "0.6294998", "0.62884164", "0.62430936", "0.6239812", "0.62207913", "0.62162787", "0.62142295", "0.6197269", "0.617...
0.0
-1
Simple home page function
function repoHome(req, res, template, block, next) { var Repo = calipso.db.model('Repo'); Repo.find({}) .sort('name') .limit(100) .find(function(err,all) { Repo.find({type:'module'}) .sort('-updated type name') .limit(20) .find(function(err,mods) { R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showHome(request){\n\trequest.respond(\"This is the home page.\");\n}", "function pageHome(request, response) {\r\n response.send('<h1>Welcome to Phonebook</h1>')\r\n}", "function home(){\n\tapp.getView().render('vipinsider/insider_home.isml');\n}", "function home(req,res){\n query.getAll().then(f...
[ "0.75831246", "0.74083245", "0.72959656", "0.72607046", "0.7161929", "0.7097574", "0.7090788", "0.7075568", "0.70640665", "0.70619154", "0.70441043", "0.69994843", "0.69816214", "0.6958438", "0.6922643", "0.6920384", "0.69094414", "0.6873043", "0.6808911", "0.6800968", "0.678...
0.0
-1
List all items from the repostiory
function repoList(req, res, template, block, next) { var Repo = calipso.db.model('Repo'); var type = req.moduleParams.type || "module"; // TODO - Add pager Repo.find({type:type}) .sort('name') .limit(100) .find(function(err,all) { calipso.theme.renderItem(req,res,template,block,{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "list() {\n this._followRelService(\"list\", \"List\");\n }", "getAll() {\n\t\treturn this.dao.all(`SELECT * FROM items`);\n\t}", "list(req, res) {\n Item.findAll()\n .then((items) => {\n res.status(200).json(items);\n })\n .catch((error) => {\n res.status(500).json(error);\n...
[ "0.7031487", "0.6628512", "0.6503002", "0.64886713", "0.6487595", "0.6472746", "0.6358808", "0.635482", "0.63212603", "0.63048404", "0.62933075", "0.6289764", "0.62876964", "0.6255385", "0.62355965", "0.6221591", "0.6221164", "0.6217209", "0.6214862", "0.616976", "0.61443025"...
0.5756208
65
API : Get a specific item from the repo
function repoGetJson(req, res, template, block, next) { var Repo = calipso.db.model('Repo'); var type = req.moduleParams.type || "module"; var name = req.moduleParams.name || ""; var version = req.moduleParams.version || "master"; // TODO - Add pager Repo.find({type:type, name:name}) .sort('name') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchInventoryItem(id){\r\n return Api().get('/inventory/' + id)\r\n }", "getGearItem(id) {\n // console.log(\"fetch\", id)\n return fetch(`${remoteURL}/gearItems/${id}`).then(e => e.json());\n }", "getItem(req, res) {\n db.items.getById(req.params.id)\n .then((result) => {\n ...
[ "0.70024526", "0.6533521", "0.65169466", "0.644562", "0.62665623", "0.61719155", "0.61655664", "0.6159248", "0.60536915", "0.60451806", "0.60428536", "0.6014922", "0.6000087", "0.5987395", "0.5982781", "0.59610003", "0.59572476", "0.59562063", "0.5946474", "0.5927659", "0.590...
0.0
-1
API : Search the repository
function repoFindJson(req, res, template, block, next) { var Repo = calipso.db.model('Repo'); var query = req.moduleParams.query || "*"; var type = req.moduleParams.type || "module"; // Deal with wildcards var qryRegex = new RegExp(query,"ig"); Repo.find({type:type, $or: [{name: qryRegex}, {description: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async search() {\n let username = this.searchBox.value;\n let repositories = await repo.getRepositories(username);\n\n // Clear results\n this.results.innerHTML = \"\";\n\n for(let repositoryIndex in repositories) {\n let repository = repositories[repositoryIndex];\n ...
[ "0.7045461", "0.6818506", "0.67943734", "0.6704405", "0.66934854", "0.66692203", "0.65789056", "0.65064496", "0.6499411", "0.64744836", "0.6392078", "0.63909954", "0.63849115", "0.635553", "0.635553", "0.63384336", "0.6333545", "0.6333126", "0.6324627", "0.63230425", "0.62906...
0.60415137
63
TODO this should be removed once object properties are refactored as members of children
constructor(element, value, attributes) {_defineProperty(this, "_attributes", void 0);_defineProperty(this, "_children", void 0);_defineProperty(this, "_orderedChildren", void 0);_defineProperty(this, "element", void 0);_defineProperty(this, "value", void 0); this._attributes = {}; // organizes children data-e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install_components_as_object_properties(parentObj) {\r\n\r\n if (!parentObj) {\r\n return;\r\n }\r\n\r\n const addressSpace = parentObj.addressSpace;\r\n const hierarchicalRefs = parentObj.findHierarchicalReferences();\r\n\r\n const children = hierarchicalRefs.map(function(r){\r\n ...
[ "0.6102119", "0.60390246", "0.5959412", "0.5893354", "0.5887995", "0.5846568", "0.5798037", "0.57380265", "0.572914", "0.57005423", "0.5680199", "0.56065834", "0.55879873", "0.55660546", "0.5560993", "0.5546303", "0.5540406", "0.5530207", "0.55108744", "0.55070484", "0.550460...
0.0
-1
Get the attributes, filtering out any that are empty
getFilteredAttributes() { const attributes = this._attributes; if (Object.keys(attributes).length) { const attr = Object.entries(attributes). filter(([key, value]) => { return value !== undefined; }). reduce((obj, [key, value]) => { obj[key] = attributes[key]; ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n let new_attr = {}\n\n Object.entries(this.attr).forEach(([key, value]) => {\n if (value.length > 0) {\n new_attr[key] = value\n }\n })\n\n return new_attr\n }", "get attributes() {\n return Object.values(this.attr).reduce((result, cur) => {\n return re...
[ "0.72493476", "0.70277673", "0.6698661", "0.662499", "0.6578705", "0.6547791", "0.65339106", "0.6489852", "0.6465454", "0.6441832", "0.6432007", "0.63868695", "0.6337309", "0.6177607", "0.6175533", "0.6144483", "0.6144483", "0.6143499", "0.61375934", "0.61375934", "0.6132493"...
0.82052225
0
Generate the actual xml data
async getXml(isFragment = false) { const preparedObject = this.prepareForXml(); const xml = await (0, _xml.generateXml)(preparedObject, isFragment); return xml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateXML() {\n\t\tvar XML = \n\n\t\t\t'<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\\n'+\n\t\t\t'<!DOCTYPE workspaceElements PUBLIC \"-//CPN//DTD CPNXML 1.0//EN\" \"http://cpntools.org/DTD/6/cpn.dtd\">\\n'+\n\n\t\t\t'<workspaceElements>\\n'+\n\t\t\t'<generator tool=\"CPN Tools\" version=\"4.0.0\" fo...
[ "0.6922698", "0.6275366", "0.6217502", "0.6104138", "0.6101862", "0.60234207", "0.5989333", "0.5920276", "0.5918105", "0.5916064", "0.58288527", "0.5807601", "0.5783972", "0.57741106", "0.5773474", "0.575691", "0.57167107", "0.56915957", "0.5664174", "0.5636043", "0.5612357",...
0.58669317
10
Convert self into a plain data object, recursing children as needed. This data can be passed to xml2Js builder method to convert to xml
prepareForXml() { let data = {}; const dataElement = this; for (let [key, value] of Object.entries(dataElement)) { if (key === "_attributes") { const attr = this.getFilteredAttributes(); if (attr) { data.attr = attr; } } else if (key === "value" && value) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static build(data) { return buildTree(data); }", "toJSON() {\n return {\n id: this.id,\n type: this.type,\n data: this.data,\n children: this.hasChildren() ? this._children.map(child => {\n return child.toJSON();\n }) : []\n };\n...
[ "0.6506694", "0.63102347", "0.6282093", "0.5908202", "0.5864108", "0.5810506", "0.5699688", "0.5621065", "0.5523343", "0.5511828", "0.5493334", "0.53645694", "0.53219986", "0.5271542", "0.52649987", "0.52597", "0.525836", "0.52521515", "0.5238851", "0.52312034", "0.5204912", ...
0.66558284
0
const eyes = require('eyes'), p = _.bind(eyes.inspect, eyes)
function testErrors(errors) { describe('ClientError', function() { it('Works with an Error object', function () { let param = new Error('foo') param.something = 'bar' let err expect(() => { err = new errors.ClientError(param, { a: 'foo', someth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f(e){const t={inspect:function(){return e}};return l.inspect.custom&&(t[l.inspect.custom]=t.inspect),t}", "[Symbol.for('nodejs.util.inspect.custom')]() {\n return this.inspect();\n }", "function insp(ins){\n console.log('Type: ' + typeof ins);\n console.log('Methods:');\n for (let m in in...
[ "0.59934145", "0.5582529", "0.54499644", "0.532742", "0.532742", "0.5300357", "0.52815574", "0.52815574", "0.5275371", "0.52237403", "0.52090216", "0.52049714", "0.52049714", "0.51628", "0.5132845", "0.50364864", "0.50136966", "0.49752593", "0.49260348", "0.49227083", "0.4914...
0.0
-1
Check if bearing is less than 0 or greater than 360
function magBearing(Bearing, declination) { let magBearing = Number(Bearing) + declination; if (magBearing < 0) { magBearing = 360 + magBearing; } else if (magBearing > 360) { magBearing = magBearing - 360; } return magBearing; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toBearing(num) {\r\n\treturn (toDeg(num) + 360) % 360;\r\n}", "function bearingCompare(firstBearing, secondBearing) {\n //convert to [0, 360]\n var firstBearing = (firstBearing % 360 + 360) % 360;\n\n var secondBearing = (secondBearing % 360 + 360) % 360;\n\n return secondBearing < firstBearing;\n}"...
[ "0.72399074", "0.71055746", "0.65653616", "0.6339885", "0.6278806", "0.6150602", "0.6118881", "0.6093466", "0.60195225", "0.600942", "0.600158", "0.5989526", "0.59621704", "0.5944762", "0.59239334", "0.59173155", "0.59173036", "0.5889564", "0.58664125", "0.5823611", "0.580403...
0.6918859
2
base2 var selectedMenu = "e0ffe0";
function horizontalMenuCreator(menuWidth, menuHeight, menuPadding, itemCount) { this.menuWidth = menuWidth; this.menuHeight = menuHeight; this.menuPadding = menuPadding; this.curX = Crafty.viewport.width - 200; this.curY = Crafty.viewport.height - (menuMargin + this.menuHeight); this.nextMenuI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DfoMenu(/**string*/ menu)\r\n{\r\n\tSeS(\"G_Menu\").DoMenu(menu);\r\n\tDfoWait();\r\n}", "function select_default_menu_item()\r\n{\r\n\tmenu_item_selected(document.getElementById('mi_home'));\r\n\t//menu_item_selected(document.getElementById('mi_custreqs'));\r\n}", "function menuOptions() {}", "func...
[ "0.66361713", "0.642698", "0.62568593", "0.6234799", "0.6216935", "0.6208226", "0.6151085", "0.612356", "0.6113095", "0.6113095", "0.60855824", "0.6082684", "0.6050689", "0.6048511", "0.60329115", "0.60041904", "0.5998078", "0.5992402", "0.5949378", "0.59469575", "0.5908553",...
0.0
-1
handles the response, adds the html
function drawOutput(responseText) { var container = document.getElementById('output'); container.innerHTML = responseText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseReceivedHandler() {\n if ( !this.response[ \"error\" ] ) {\n let html = \"<ol>\";\n this.response.forEach( elm => {\n html += `<li>${ elm.quote } - ${ elm.source }</li>`;\n });\n html += \"</ol>\";\n document.querySelector(\"#quotes\").innerHTML = html;\n } els...
[ "0.7011606", "0.69179934", "0.69077474", "0.6822883", "0.67729604", "0.66268015", "0.6578743", "0.6495191", "0.64847213", "0.6380795", "0.6327718", "0.63245016", "0.63207316", "0.63205093", "0.6306134", "0.6294831", "0.6269746", "0.62577295", "0.6253385", "0.62470925", "0.624...
0.0
-1
handles the response, adds the html
function drawOutput2(responseText) { var container = document.getElementById('outputsg'); container.innerHTML = responseText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseReceivedHandler() {\n if ( !this.response[ \"error\" ] ) {\n let html = \"<ol>\";\n this.response.forEach( elm => {\n html += `<li>${ elm.quote } - ${ elm.source }</li>`;\n });\n html += \"</ol>\";\n document.querySelector(\"#quotes\").innerHTML = html;\n } els...
[ "0.7011606", "0.69179934", "0.69077474", "0.6822883", "0.67729604", "0.66268015", "0.6578743", "0.6495191", "0.64847213", "0.6380795", "0.6327718", "0.63245016", "0.63207316", "0.63205093", "0.6306134", "0.6294831", "0.6269746", "0.62577295", "0.6253385", "0.62470925", "0.624...
0.0
-1
helper function for crossbrowser request object
function getRequest(url, success, error) { var req = false; try{ // most browsers req = new XMLHttpRequest(); } catch (e){ // IE try{ req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { // try an older version try{ req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRequestObject(){\nvar req;\nif(window.XMLHttpRequest){\n\nreq = new XMLHttpRequest();\n}\nelse if(window.ActiveXObject){\n//For IE 5+\nreq = new ActiveXObject(\"Microsoft.XMLHTTP\");\n}\nelse{\n}\n\nreturn req;\n}", "function makeRequestObject() {\r\n\t\t\t/*This function forks for IE and returns ...
[ "0.67631584", "0.675058", "0.6740598", "0.6712589", "0.6641961", "0.6572435", "0.65644926", "0.6550355", "0.6545515", "0.64892393", "0.64409184", "0.64240885", "0.6355384", "0.6332124", "0.6294186", "0.6261697", "0.6261619", "0.62549627", "0.6237274", "0.62326187", "0.6226975...
0.0
-1
handles the response, adds the html
function drawOutput2(responseText) { var container = document.getElementById('outputsg'); container.innerHTML = responseText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseReceivedHandler() {\n if ( !this.response[ \"error\" ] ) {\n let html = \"<ol>\";\n this.response.forEach( elm => {\n html += `<li>${ elm.quote } - ${ elm.source }</li>`;\n });\n html += \"</ol>\";\n document.querySelector(\"#quotes\").innerHTML = html;\n } els...
[ "0.7011733", "0.6917863", "0.69078696", "0.6821829", "0.6772284", "0.6626727", "0.65769124", "0.6493979", "0.6483964", "0.63807887", "0.6326186", "0.632371", "0.63199437", "0.6319663", "0.63070565", "0.6292836", "0.6269699", "0.6256252", "0.62539107", "0.6245181", "0.6242849"...
0.0
-1
old 35.172.224.44 new 34.237.144.227 i08fb702af0031be3f
function remote(cmd, quotes = "'") { res = execSync(`ssh eycost-db ${quotes}${cmd}${quotes}`); console.log(res.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IP() {\n // return \"47.106.171.247\";\n return \"tcjump.anyh5.com\";\n // return \"tcrhythm.anyh5.com\";\n }", "resolveLocalHost(url) {\n let strToReplace = url.toString();\n //strToReplace = strToReplace.replace('localhost', '192.168.1.7'); //put here the address of localMachine\n ...
[ "0.5786238", "0.56582457", "0.54492664", "0.5390552", "0.53725934", "0.5369308", "0.53610843", "0.52714443", "0.5235709", "0.5209648", "0.5184349", "0.5164387", "0.5152795", "0.5095746", "0.5080587", "0.5059792", "0.5048533", "0.50448763", "0.5022081", "0.5015177", "0.4988624...
0.0
-1
init html and frameworks
function initSpectrum(){ $(".cm-colorPicker").spectrum({ clickoutFiresChange: true, hide: function(color){ $(".cm-dialog").addClass("cm-inactive") }, change: function(color){ colorScheme[currentClass] = createColorCSS( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init()\n{\n //initalize the application\n meDominance='';\n reset();\n //setFrameUrl('header','header.htm');\n //setFrameUrl('left','selectdomleft.htm');\n //setFrameUrl('right','selectdomright.htm');\n\n blnInitCalled=true;\n}", "function init() {\n initializeVariables();\n initi...
[ "0.71242696", "0.7015052", "0.6767994", "0.6751548", "0.67384887", "0.6711863", "0.6683804", "0.6681404", "0.6628409", "0.660475", "0.6561463", "0.65024066", "0.6464891", "0.64625096", "0.6457312", "0.64470446", "0.64402246", "0.6437273", "0.6423378", "0.64055914", "0.6400359...
0.0
-1
The purpose of this function is to get all of the markers, art and historical, from the Nashville Gov API and place them in one array.
function getAllPlaces(){ return $q.all( [AllPlacesFact.getAllHistoricalMarkers(), AllPlacesFact.getAllArtInPublicPlacesMarkers(), AllPlacesFact.getAllMetroPublicArtMarkers()] ) .then((data)=>{ $scope.AllPlaces = data[0].concat(data[1]).concat(data[2]); $scope.AllPlaces = $scope...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractNeededData(data) {\n // declare empty array\n const venuesForMap = [];\n // Loop through json response\n data.forEach(venue => {\n // Push the name, ID, and latlng into an array to use for the map\n venuesForMap.push({\n name: venue.name,\n id: venue.id,\n ...
[ "0.645326", "0.6335888", "0.6228245", "0.6199471", "0.61825013", "0.61392695", "0.6129379", "0.61275285", "0.6045566", "0.6041301", "0.6033124", "0.60208327", "0.5987195", "0.59706104", "0.5934063", "0.59325415", "0.5917314", "0.58980596", "0.58858424", "0.58769816", "0.58683...
0.55300254
67
Determines if the place is a historical marker or artwork Returns the name of the place to be used when sorting
function getPlaceName(place) { if (place.title) { return place.title.toLowerCase(); } else if (place.artwork) { return place.artwork.toLowerCase(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plotPlace(place)\n {\n // 1. get and check\n if ((place.replace !== undefined) && (place.replace(/\\s/g, '') === ''))\n {\n return false;\n }\n\n // 2. get some information!\n var oPlace = place;\n if (typeof oPlace === \"string\")\n {\...
[ "0.52683204", "0.5229688", "0.51584613", "0.5127423", "0.5030738", "0.50176144", "0.5006295", "0.49296504", "0.49138096", "0.4847373", "0.48434144", "0.48184106", "0.48116377", "0.47999623", "0.47904894", "0.47736067", "0.47694474", "0.47595444", "0.47576553", "0.4748331", "0...
0.6682553
0
Retrieve user bookmarks and update AllPlaces with new detail
function areMarkersBookmarked (user){ BookmarkFact.getAllBookmarks(user.uid) .then((bookmarks)=>{ console.log("bookmarked markers", bookmarks); Object.keys(bookmarks).map((key)=>{ $scope.AllPlaces.forEach((marker, index)=>{ if (bookmarks[key].uid === marker.uid){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBookmarksOfHouses() {\n getBookmarksOfUser(user).then(getBookmarksOfHousesHandler);\n\n function getBookmarksOfHousesHandler(bookmarks) {\n addBookmarksToHouses(bookmarks, vm.houses)\n }\n\n function addBookmarksToHouses(bookmarks, houses) {\n houses.fo...
[ "0.6232193", "0.6224735", "0.6058475", "0.59901214", "0.5973698", "0.59304214", "0.589957", "0.58090585", "0.57445955", "0.5721215", "0.56557804", "0.562724", "0.5620631", "0.5574075", "0.55507547", "0.55389553", "0.5525897", "0.5479719", "0.543596", "0.5431832", "0.5399045",...
0.6203196
2
Copyright (c)2014 Jerry Gable ( Except where otherwise noted, this work is licensed under a Creative Commons AttributionNonCommercial 4.0 International License.
function loadPrediction () { // hide all of the options in the window to start $('#predictCSV').jqxButtonGroup('setSelection', -1); $('#CSVType').jqxButtonGroup('setSelection', -1); $("#selectLocalFileDiv").hide(); $('#csvLoadOptions').hide(); $('#loadLocalFile').jqxWindow('resize', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "function getLicenseInfo() {\n...
[ "0.6081227", "0.5974384", "0.5919067", "0.57534295", "0.5675798", "0.56743693", "0.56588626", "0.5556137", "0.5519446", "0.5392346", "0.528434", "0.5282165", "0.52745426", "0.5272159", "0.52699846", "0.52628374", "0.5256724", "0.52551365", "0.52243245", "0.5214333", "0.518624...
0.0
-1
this gets called when someone selects the load Prediction or Load Flight
function loadFileTypeSelected () { // LoadPrediction=0 LoadFlight=1 $("#selectLocalFileDiv").show(); // show the load file box if (loadLocalGlobals.predictOrCSV == 0) { // we are loading a prediction $('#csvLoadOptions').hide(); $('#loadLocalFile').jqxWindow('resize', 60...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "localLoad() {\n if (this.loadView.existingSceneSelect.selectedIndex > -1) {\n Utilitary.showFullPageLoading();\n var option = this.loadView.existingSceneSelect.options[this.loadView.existingSceneSelect.selectedIndex];\n var name = option.value;\n this.sceneCurrent...
[ "0.6347642", "0.58003926", "0.57868844", "0.5779078", "0.5700928", "0.5700827", "0.5649621", "0.5637554", "0.56347466", "0.5624717", "0.55855197", "0.5558584", "0.55400157", "0.5534089", "0.5493753", "0.54923844", "0.5492217", "0.5471993", "0.53870946", "0.5355082", "0.535440...
0.56216264
10
this function fills the prediction input page to match the loaded flight
function fillPredictionInputData (thisFlight) { // first see if the box is checked on the form if ($('#fillPredictionInput').is(':checked')) { // uncheck all 3 checkboxes $('#PIAutoLnch').prop('checked', false); // Auto Launch Altitude (checkbox) $('#PIFloatChk').prop('checked'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestPredictionSuccess(response){\n i = 0;\n\n while(i < response.length && i < 4){\n addPrediction(i, response[i]);\n i++;\n }\n resetNumberOfPanels(i);\n }", "function getPrediction(minTemp, maxTemp, rainfall, evaporation, sunshine,\n windGustS...
[ "0.5953344", "0.58269817", "0.5641198", "0.54977334", "0.54478955", "0.5433109", "0.5413808", "0.5408308", "0.5406697", "0.53929055", "0.5369427", "0.53555006", "0.5353588", "0.5320444", "0.5285524", "0.5281317", "0.52786946", "0.5273485", "0.5255623", "0.52363026", "0.523270...
0.65056205
0