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
Create a function that takes in a number and the number of significant digits then formats the number with that number of significant digits
function formatNumber(num, numPositions) { return num.toFixed(numPositions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applySignificantDigits(significantDigits) {\n const that = this;\n\n significantDigits = Math.max(1, Math.min(significantDigits, 21));\n\n // removes insignificant trailing zeroes\n function removeTrailingZeroes(value) {\n while (value.charAt(value.length - 1) === '0') {\n ...
[ "0.7018559", "0.66918874", "0.65846694", "0.65390515", "0.65306187", "0.6469882", "0.64355946", "0.64352745", "0.6392378", "0.6349712", "0.63256216", "0.63121367", "0.6300515", "0.6291873", "0.6287839", "0.6287839", "0.62753266", "0.62596166", "0.6243021", "0.6208232", "0.619...
0.60259306
39
Create a function that takes in one string argument and converts it to an integer
function convertToInt (str) { return parseInt(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringToNum(arg){\n return parseInt(arg);\n}", "function convert2Integer(str){\n return parseInt(str);\n}", "function convertToInt(stringValue) {\r\n var parseValue = parseInt(\"stringValue\");\r\n return parseValue;\r\n\r\n}", "function toNumber(str) { //create the function with a string argu...
[ "0.7700572", "0.7186422", "0.7170025", "0.71615577", "0.71460897", "0.70807666", "0.7080013", "0.7080013", "0.7015015", "0.6990239", "0.6989836", "0.6989836", "0.6974839", "0.6974839", "0.6968882", "0.69618595", "0.6940667", "0.6868117", "0.6850086", "0.68473274", "0.6827785"...
0.72150177
1
Create a function that takes in one string argument and converts it to an float
function convertToFloat(str) { return parseFloat(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToFloat(stringAmount) {\r\n var parseStringAmount = parseFloat(\"stringAmount\");\r\n return parseFloat;\r\n\r\n}", "function parseFloat_(a){return\"string\"==typeof a?parseFloat(a):a}", "ParseFloat(s){\r\n\t\tif(s == '' || s == 'undefined' || s == null){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\t...
[ "0.7903768", "0.7296301", "0.719005", "0.71103936", "0.7085305", "0.7011258", "0.69791245", "0.67944205", "0.673864", "0.6686189", "0.6651192", "0.6536455", "0.6395118", "0.6390193", "0.63584924", "0.6330611", "0.6324419", "0.6297377", "0.6297377", "0.6297377", "0.6297377", ...
0.7603113
1
Prevents input from having injected markup
function cleanInput (input) { return $('<div/>').text(input).text(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeInput(rawInput) {\n var placeholder = HtmlService.createHtmlOutput(\" \");\n placeholder.appendUntrusted(rawInput);\n\n return placeholder.getContent();\n}", "function cleanInput (input) {\n return $('<div/>').text(input).html();\n }", "function cleanInput (input) {\n return $(...
[ "0.69444716", "0.66734606", "0.66734606", "0.66734606", "0.66471237", "0.6578526", "0.6576424", "0.6576424", "0.6576424", "0.6576424", "0.65684867", "0.6546654", "0.6546654", "0.6494175", "0.6402121", "0.63540787", "0.6328329", "0.6328329", "0.6314707", "0.63008624", "0.62405...
0.6445453
14
(time TODO) Updates distance, time and speed.
function updateTravelInfo() { let m = data.consts.turbo/10 + 1 let d = data.consts.distance.n if (d >= data.consts.distanceMax || d <= data.consts.speed.n * 2 || d <= 2 && !data.consts.isStopped) { if (d == 0 && d <= 0) { data.consts.distance.n = 0 data.consts.speed.n = 0 } else { updateDistan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcSpeed(distance, time){\n return distance/time;\n}", "function mode_distance_update(playerLocation) {\n\t// Currently, we don't do anything special\n\t// when the location gets updated.\n}", "calcSpeed(){\n\treturn this.distance/(this.time/60);//miles per hour\n }", "updateSpeed (speed) {\n...
[ "0.69993395", "0.6804416", "0.66626394", "0.6654199", "0.66455287", "0.66455287", "0.6530147", "0.65277714", "0.6467887", "0.6451251", "0.6416266", "0.6412492", "0.6410955", "0.6337379", "0.63327146", "0.6235525", "0.6206", "0.61946154", "0.61789036", "0.61774427", "0.6161294...
0.7597409
0
Loops the active lasers and calls asteroidObj.mine(). Returns an array of uIDs if some asteroids need to be destroyed.
function updateMining() { let inv = game.resources let ls = data.canvas.lasers let as = game.asteroidsData let removeIDs = null data._s.rPrio.reverse() let prio = data._s.rPrio[data.consts.miningPriority] data._s.rPrio.reverse() for (let i = 0; i < ls.length; i++) { for (let j = 0; j < as.length; j++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAsteroids() {\r\n\tspawnAsteroids();\r\n\t\r\n\tfor (astroid in asteroidsHolder) {\r\n\t\tasteroidsHolder[astroid].move();\r\n\t\tasteroidsHolder[astroid].draw();\r\n\t\tdetectCollision(asteroidsHolder[astroid], playerShip);\r\n\t\tfor (bullet in bulletsHolder) {\r\n\t\t\tdetectCollision(asteroidsHo...
[ "0.6455828", "0.6308445", "0.61116314", "0.6102902", "0.60438114", "0.59133697", "0.5835909", "0.57573503", "0.57554513", "0.570108", "0.55669767", "0.5538956", "0.5504831", "0.5489656", "0.5487843", "0.54764605", "0.54676306", "0.5444546", "0.54330915", "0.5430861", "0.54248...
0.58133435
7
Removes the lasers with a uniqueID = those in ids
function removeLasers(ls, ids) { let toRemove = [] if (typeof ls[0] == 'undefined') { return [] } for (let i = 0; i < ls.length; i++) { for (let j = ids.length - 1; j >= 0; j--) { if (ids[j] == ls[i].uniqueID) { ls.splice(i, 1) } } } return ls }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeIds(eventera) {\n delete eventera._id\n // console.log(eventeras)\n}", "removeAll (id) {\n this._pairs = this._pairs.filter((p) => (\n p[0].indexOf(id) !== 4 && p[1].indexOf(id) !== 4\n ))\n }", "function clearBoats() {\n for (var x = 0; x < boats_to_remove.length; x++) {\n ...
[ "0.6751028", "0.6434259", "0.60215676", "0.60131973", "0.5952818", "0.59355533", "0.5931216", "0.58889925", "0.58325744", "0.5830919", "0.5804643", "0.5800568", "0.578185", "0.5758236", "0.575774", "0.57541245", "0.57493263", "0.57440585", "0.5729315", "0.5701938", "0.5692326...
0.7478339
0
flag 0 for joined community flag 1 for pending community flag 2 for my community flag 3 for invite community
function createCommunityDivForPanel(response,flag,extClass){ console.log(response); var badge = ''; var badge2 = ''; var panelForwarded = 'discussion'; var numberUser = ''; try{ if(flag==0 || flag==2){ var panelComImage = response.image; var panelComId = response._id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendInvite(event){\n if(this.state.friendsInvited.length > 0){\n const participants = this.state.friendsInvitedIds.map(participant => {\n return {\n participant: participant,\n confirmed: false\n }\n })\n\n participants.push({\n participant: this.props.golfe...
[ "0.55648357", "0.5376256", "0.5265746", "0.51472175", "0.514123", "0.5140855", "0.5110005", "0.5082537", "0.50569004", "0.5049", "0.49987185", "0.49735817", "0.49722615", "0.49505317", "0.4919499", "0.49163988", "0.4889708", "0.486296", "0.48603132", "0.48513132", "0.48363963...
0.5248371
3
Load the requests based on the tutor's id
function display_requests(data) { var html = ``; db.collection('sessions').where("tutor_id", "==", uuid).where("requested_session", "==", true).get().then((doc) => { console.log(doc.empty); if (doc.empty){ html += `<h1 class="text-center">No Session Requests</h1>`; $('#requests')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadRequests(){\n var result = RequestsService.get({param:AuthService.getId()}, function() {\n $scope.requests = result.requests;\n }, function(){\n Loading.showText('No se pudo cargar las solicitudes favoritas.');\n Loading.hideTimeout();\n });\n }", "function loadMyActorss() {...
[ "0.6003323", "0.5980482", "0.56285137", "0.5623111", "0.5614628", "0.556967", "0.5502819", "0.54733956", "0.5460926", "0.5432789", "0.5408061", "0.5407571", "0.5403893", "0.5401311", "0.53934425", "0.5386623", "0.5378222", "0.5348909", "0.53373694", "0.533219", "0.5330155", ...
0.0
-1
Change the session status to accepted and change the button to be Join Session
function accept_session(data) { // modal.style.display = "block"; console.log(data); db.collection('sessions').doc(data).update({ requested_session : false, accepted_session : true, }); db.collection('users').doc(uuid).update({ "notifications.sessions": firebase.firestore.FieldValue.arrayRemove...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeStatus() {\n if (showVideo) {\n window.location.reload();\n } else {\n myUsernameRef.current = currentUsername;\n socketRef.current.emit(\"join room\", { roomID, currentUsername });\n }\n changeVideoState(!showVideo);\n }", "function ...
[ "0.6335295", "0.60646737", "0.6063734", "0.6014965", "0.596795", "0.58880645", "0.58284044", "0.582605", "0.5791868", "0.5779672", "0.5761124", "0.57496476", "0.57110405", "0.5679278", "0.5645791", "0.562123", "0.56185716", "0.55945104", "0.5587489", "0.55472064", "0.5535293"...
0.0
-1
over the container of the card
function onMouseMove(e, element) { var rect = element.getBoundingClientRect(); var cursor_relative_x = e.clientX - rect.left; //x position within the element. var cursor_relative_y = e.clientY - rect.top; //y position within the element. var x_from_center = rect.width/2 - cursor_relative_x var y_from_ce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Card(props) {\n return (\n <div style={styles.card} id={props.id}>\n <img style={styles.card_img} src={props.picsum} alt=\"ok\"/> \n <div style={{backgroundColor:\"rgba(7, 9, 40, 1)\", position:\"absolute\", width:\"100vw\", height:\"100vh\", top:\"0\", left:\"0\", zIndex:\...
[ "0.64910555", "0.63977027", "0.6270966", "0.6236339", "0.6227838", "0.6207708", "0.6192894", "0.6162478", "0.613597", "0.6134981", "0.6043808", "0.6037249", "0.60344326", "0.60203576", "0.6018418", "0.6014165", "0.6008471", "0.6005596", "0.59869426", "0.5977143", "0.59529036"...
0.0
-1
defining some data structures
function Square( letter ) { this.row = null; this.column = null; this.letter = letter.toUpperCase(); this.across = new Clue(true); this.down = new Clue(false); this.circle = (letter.toUpperCase() !== letter); //functions that mostly return informati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static initialize(obj, type, name, operator, elements) { \n obj['type'] = type;\n obj['name'] = name;\n obj['operator'] = operator;\n obj['elements'] = elements;\n }", "function Struct() {}", "static initialize(obj) { \n obj['left'] = left;\n obj['right'] = right;\n...
[ "0.6395981", "0.6261076", "0.6036863", "0.60116774", "0.5989269", "0.5881469", "0.5832717", "0.5824834", "0.58004683", "0.57761544", "0.5727006", "0.57204026", "0.57183164", "0.5693124", "0.56734467", "0.56547296", "0.564985", "0.5648252", "0.5636519", "0.5617927", "0.5600337...
0.0
-1
createMarkup takes a crossword object and creates markup and click handlers
function createMarkup(crossword){ //empty the crossword container $('#crossword').html(""); //by default, we want to show references $('#crossword').addClass('show-references'); //add the two main sub-containers $('#crossword').append("<div id='le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMarkup () {\r\n\tvar html = '<div class=\"bpfb_actions_container\">' +\r\n\t\t'<div class=\"bpfb_toolbar_container\">' +\r\n\t\t\t'<a href=\"#cancel\" id=\"bpfb_cancel_action\"><img src=\"' + _bpfbRootUrl + '/img/system/plus.png\" border=\"0\" /></a>' +\r\n\t\t\t'&nbsp;' +\r\n\t\t\t'<a href=\"#photo...
[ "0.62116784", "0.5878259", "0.5687123", "0.5644027", "0.56296206", "0.55905205", "0.5566043", "0.55572116", "0.5555263", "0.5553524", "0.5542471", "0.551862", "0.55107176", "0.5463827", "0.5417158", "0.5370932", "0.532718", "0.5305291", "0.52945745", "0.529172", "0.52697897",...
0.63453394
0
updateDisplay takes state and reclasses all of the markup based on it.
function updateDisplay( focus, noActive ){ //focus and noActive are booleans //remove current classes $('.active').removeClass('active'); $('.highlight').removeClass('highlight'); $('.reference').removeClass('reference'); //make the active square active ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Interpreter_UpdateDisplay()\n{\n\t//helpers\n\tvar uidObject, theObject;\n\t//loop through all of our iframes\n\tfor (uidObject in this.LoadedIFrames)\n\t{\n\t\t//get the object\n\t\ttheObject = this.LoadedIFrames[uidObject];\n\t\t//valid?\n\t\tif (theObject && theObject.HTML)\n\t\t{\n\t\t\t//purge all cs...
[ "0.72363645", "0.679557", "0.6719523", "0.6664462", "0.6587119", "0.65618724", "0.65325373", "0.6516188", "0.6497077", "0.64880013", "0.64862746", "0.6465988", "0.6277237", "0.6271877", "0.6241105", "0.62336206", "0.6217761", "0.6204642", "0.6183839", "0.61692977", "0.6124707...
0.5605143
80
functions that modify state directly
function move( right , down ){ if( (state.column() + right >= 0) && (state.column() + right < state.crossword.numColumns()) && (state.crossword.getLetter(state.row(), state.column() + right) !== ".") ){ state.activeSquare = state.crossword.getSquare(state.row(), state.column() + right); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onChangeState() {\n\n\n }", "function newState(state) {\n alert(\"This functionality is yet to be implemented!\");\n }", "stateChanged(state) { }", "function state_update(st) {\n state = st;\n if (callback) {\n callback(st);\n }\n}", "changeState(state) {\r\n if (!this.states[state...
[ "0.7090287", "0.69981176", "0.6978129", "0.68583465", "0.6762559", "0.67444384", "0.6719971", "0.67130476", "0.6701557", "0.6690919", "0.66761357", "0.66565275", "0.66342425", "0.6628842", "0.662031", "0.6611521", "0.66005135", "0.6598415", "0.658723", "0.6586178", "0.6582671...
0.0
-1
adds the user parameter instance to the local users array
function createUser(newUser) { var url = "/api/assignment/user"; return $http.post(url, newUser) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addUserToGameLoad(user){\n this.users.push(user);\n }", "function addToRegisteredUsers( obj ) {\n\t// alter this function if mongoDB is used later\n\tconsole.log(\"pushing the new user to the storage\");\n\tregisteredUsers.push(obj);\n\t//obj = {};\n}", "function _setUsers(pUser){\n var usersLis...
[ "0.6872478", "0.6684967", "0.66211545", "0.652554", "0.63978714", "0.6395365", "0.6369815", "0.63648456", "0.6364576", "0.63302344", "0.6318521", "0.6286499", "0.6257434", "0.6243659", "0.62333506", "0.6203839", "0.61220723", "0.61132795", "0.6087643", "0.60404485", "0.603855...
0.0
-1
returns the user in local users array whose _id matches the userId parameter
function findUserById(userId) { var url = "/api/assignment/user/" + userId; return $http.get(url) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findUserById(userId) {\n for (let i = 0; i < users.length; i++) {\n if (users[i].id === userId) {\n return users[i];\n }\n }\n }", "function findUserById(userId) {\n\tvar userIdx = findUserIndexById(userId);\n\treturn users[userIdx];\n}", "async ge...
[ "0.8380678", "0.8163998", "0.7715412", "0.7676317", "0.76590973", "0.7602088", "0.75661004", "0.7488708", "0.74723595", "0.74144495", "0.7400065", "0.73142457", "0.73142457", "0.7308683", "0.72104543", "0.7204071", "0.7171168", "0.71642756", "0.7158154", "0.7135954", "0.71355...
0.73441404
11
returns the user in local users array whose username matches the parameter username
function findUserByUsername(username) { var url = "/api/assignment/user?username=" + username; return $http.get(url) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findUser (username) {\n for (let i = 0; i < this.users.length; i++) {\n if (username === this.users[i].name) {\n return this.users[i];\n }\n }\n return null;\n }", "function getUserFromUsername(username) {\n let users = getUsers();\n if(users === nul...
[ "0.8016836", "0.7825663", "0.7771618", "0.7604122", "0.75757825", "0.74714386", "0.74527735", "0.7420948", "0.7383761", "0.7232317", "0.7181867", "0.7171316", "0.71611303", "0.71442175", "0.7132745", "0.71094924", "0.70963615", "0.7083353", "0.7075592", "0.7058566", "0.704305...
0.7127186
15
returns the user whose username and password match the username and password parameters
function findUserByCredentials(username, password) { var url = "/api/assignment/user?username=" + username + "&password=" + password; return $http.get(url) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findUser(req, res) {\n var username = req.query.username;\n var password = req.query.password;\n if (!username) {\n return res.sendStatus(400);\n } else if (username && password) {\n return findUserByCredentials(req, res, username, password);\n } else {\n return findUse...
[ "0.7635202", "0.76116323", "0.7479394", "0.74357027", "0.7428683", "0.736658", "0.73654467", "0.7323174", "0.73174375", "0.7290007", "0.72449064", "0.72261465", "0.71965176", "0.71541065", "0.71338856", "0.70942324", "0.70696044", "0.7065525", "0.7058573", "0.70426357", "0.70...
0.74203557
5
updates the user in local users array whose _id matches the userId parameter
function updateUser(userId, user) { var url = "/api/assignment/user/" + userId; return $http.put(url, user) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUser(userId,user) {\n var deferred = q.defer();\n //delete user._id;\n userModel\n .update({_id: userId}, {\n $set: user\n }, function (err, status) {\n deferred.resolve(status);\n });\n return deferred.promise;\n ...
[ "0.7637417", "0.7554736", "0.74353963", "0.7349977", "0.7345456", "0.72999376", "0.7273409", "0.7235327", "0.69765246", "0.6965428", "0.6928513", "0.69176775", "0.69013256", "0.6875194", "0.6858857", "0.68494374", "0.6829945", "0.68153", "0.6801629", "0.6791319", "0.6779659",...
0.72310185
8
removes the user whose _id matches the userId parameter
function deleteUser(userId) { var url = "/api/assignment/user/" + userId; return $http.delete(url) .then(function(response) { return response.data; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteUser(userId) {\n return UserModel.remove(\n {_id: userId}\n );\n }", "function deleteUserById(userId) {\n\t\n\t// Check if the user ID exists.\n\tif (userId === undefined)\n\t\treturn Response(404);\n\n\t//Retrieve the index of the object from the User list\n\tvar userI...
[ "0.80202866", "0.7762432", "0.77357084", "0.76032764", "0.7575115", "0.7568786", "0.74840707", "0.74207056", "0.7386826", "0.734524", "0.7274753", "0.7209963", "0.7197619", "0.7188329", "0.71666515", "0.7125683", "0.71179444", "0.7094278", "0.7092532", "0.7079567", "0.7052816...
0.7267783
11
do i like tomatoes
function theTomatoGame() { var likeTomatoes = prompt('Do you think she likes tomatoes?').toLowerCase(); if (likeTomatoes === 'yes') { alert('Correct! I do love tomatoes with salt!'); points = points + 1; //gives the user a point if answer is correct } else if (likeTomatoes === 'y') { alert('Correct! I...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r...
[ "0.6277418", "0.6225672", "0.6155198", "0.5982209", "0.5934684", "0.59266925", "0.5910457", "0.5822472", "0.578399", "0.57594013", "0.5756772", "0.56446", "0.563172", "0.5590996", "0.5590996", "0.5579407", "0.556943", "0.55411935", "0.5539046", "0.55357647", "0.55198145", "...
0.53020746
41
is heights biggest fear
function amIafraid() { var bigFear = prompt('Is her biggest fear heights?').toLowerCase(); if (bigFear === 'no') { alert('Correct! My biggest fear is spiders!'); points = points + 1; } else if (bigFear === 'n') { alert('Correct! My biggest fear is spiders!'); } else { alert('Sorry, my biggest fe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isBottom(taille_max,largeur)\n {\n var i,j,max=0;\n for(i=0;i<4;i++)\n {\n for(j=0;j<4;j++)\n {\n if(max<this.mats[i][j])\n {\n max=this.mats[i][j];\n }\n }\n }\n max=max/largeur;\n ...
[ "0.6734426", "0.6440997", "0.64110976", "0.640953", "0.6406845", "0.6280507", "0.6230106", "0.62174606", "0.61796415", "0.61629295", "0.6154217", "0.61353254", "0.6132259", "0.61313194", "0.61222184", "0.61082584", "0.6095582", "0.60614485", "0.6028005", "0.60245866", "0.5992...
0.0
-1
have i been to australia
function haveIbeentoAustralia() { var visitedAus = prompt('Has she ever been to Australia?').toLowerCase(); if (visitedAus === 'no') { alert('Correct, I have not been to Australia!'); points = points + 1; } else if (visitedAus === 'n') { alert('Correct, I have not been to Australia!'); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get iso3166() {\n\t\treturn 'FR';\n\t}", "static get iso3166() {\n\t\treturn 'HU';\n\t}", "function local() {\r\n let country = \"Portugal\";\r\n }", "static get iso3166() {\n\t\treturn 'BE';\n\t}", "function isEuCountryCode(twoCharCountryCode) {\n var twoCharCountryCode = twoCharCountr...
[ "0.6418368", "0.63058794", "0.6225766", "0.6164187", "0.60881", "0.608599", "0.6075622", "0.59592986", "0.5911406", "0.57572764", "0.5698923", "0.5668841", "0.5586687", "0.5585658", "0.55730987", "0.5537345", "0.55099446", "0.55021024", "0.55008024", "0.54933363", "0.5452288"...
0.5707703
10
giving user 4 guesses to try to guess the number 2 for how many dogs I have
function theDogGame() { for (var i = 0; i < 4; i++) { var numDogs = parseInt(prompt('We know that Cheyna is a dog lover. You have 4 guesses to tell me how many dogs do you think she has?')); numGuesses = numGuesses + 1; console.log('total guesses '+ numGuesses); if (numDogs === 2) { alert(corre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dogsOwned() {\n var badGuess = 0\n\n while (badGuess < 3) {\n var dogGuess = prompt('How many dogs do you think I\\'ve owned ? ');\n\n if (dogGuess == 30) {\n alert('Yep! I\\'ve owned at least 30 dogs');\n break;\n }\n\n if (dogGuess > 30) {\n alert('Nope! Too high.');\n ...
[ "0.6896792", "0.6814035", "0.6763269", "0.6724233", "0.6425868", "0.62459284", "0.62443155", "0.62095624", "0.61802447", "0.61550355", "0.6073611", "0.60155904", "0.60113025", "0.59863234", "0.5977281", "0.5975228", "0.59685737", "0.59608555", "0.59572804", "0.5950207", "0.59...
0.71279144
0
total points after game
function finalScore() { if (points === 1) { alert('Total Points: ' + points); console.log('user has ' + points + ' point'); } else { alert('Total Points: ' + points); console.log('user has ' + points + ' points'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "points() {\n var total = 0\n // NOTE a for..in loop does not guarantee property ordering. This is fine for points()\n for(var name in this.games) {\n total += this.games[name].points()\n }\n return total\n }", "function getTotalPts(){\n\t\ttotalPts = attendanceTot...
[ "0.8029493", "0.74047345", "0.7372578", "0.73280007", "0.7236073", "0.7050419", "0.7028892", "0.7000017", "0.6958481", "0.6956751", "0.694898", "0.69279486", "0.69114804", "0.69114804", "0.69114804", "0.6909226", "0.6899723", "0.6883807", "0.68747365", "0.6874512", "0.6873765...
0.67971975
29
SESSION STORAGE ARGUMENTO OBLIGATORIO: pobj
function valueToSStorage(pobj){ //pobj debe ser un elemento o id de elemento válido /*SI el navegador dispone del objeto Storage*/ if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); //comprueba si pobj es válido para operar console.log('aux:'); console.log(aux.value); /*SI pobj es válido Y pobj.v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "saveToSessionStorage() {\n Object.keys(this).forEach(key =>\n sessionStorage.setItem(key, JSON.stringify(this[key]))\n );\n setTimeout(() => sessionStorage.clear(), 200000);\n }", "function saveinStorage() {\n\tsessionStorage.setItem('idList', JSON.stringify(idList));\n\tsessionStorage.setItem('cu...
[ "0.63773644", "0.6373691", "0.6350493", "0.63207483", "0.630975", "0.6300974", "0.6198845", "0.61938226", "0.61885625", "0.6157553", "0.609614", "0.6077504", "0.60749084", "0.5965707", "0.59572613", "0.5950171", "0.5948546", "0.59441173", "0.5917723", "0.59020275", "0.5892915...
0.69695663
0
ARGUMENTO OBLIGATORIO: pobj OPCIONAL: pid (si no se utiliza se entiende que pid===pobj.id)
function sStorageToValue(pobj, pid){ //pobj debe ser un elemento o id de elemento válido /*SI el navegador dispone del objeto Storage*/ if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); //comprueba si pobj es válido para operar var idaux=pid; /*SI pobj es válido Y pobj.value SI existe*/ if ((aux...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteObjByPid(id) {\n\tvar lisObj = getAllData();\n\tfor(var i = 0; i < lisObj.length; i++) {\n\t\tif(lisObj[i].pid == id) {\n\t\t\tlisObj.splice(i, 1);\n\t\t\tbreak;\n\t\t}\n\t}\n\tupdateData(lisObj);\n\treturn lisObj;\n}", "function RL__Pr(obj, id) {\n var cla = 0;\n var image = this.im...
[ "0.62503153", "0.61892027", "0.6088698", "0.60671735", "0.6007267", "0.6002827", "0.5982545", "0.59804493", "0.5923352", "0.5922055", "0.5922055", "0.5852522", "0.5760018", "0.565124", "0.56297535", "0.56172967", "0.55539936", "0.54551107", "0.54524696", "0.5409472", "0.53063...
0.0
-1
ARGUMENTO OBLIGATORIO: pobj OPCIONAL: pid
function sStorageToInhtml(pobj, pid){ //pobj debe ser un elemento o id de elemento válido if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); var idaux=pid; if ((aux!==null) && (aux.innerHTML!==undefined)){ if (idaux=== undefined) {idaux=aux.id;} aux.innerHTML=sessionStorage.getItem(idaux); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function neoip_xdomrpc_cb_new_obj_id(obj)\n{\n\tvar\tobj_id;\n\t// draw a new random obj_id until a free one is found\n\tdo {\n\t\tobj_id\t= Math.floor(Math.random() * 65536);\n\t}while( neoip_xdomrpc_cb_arr[obj_id] != null );\n\t// return the obj_id\n\treturn obj_id;\n}", "function neoip_xdomrpc_cb_new_obj_id(o...
[ "0.5951348", "0.5951348", "0.5797085", "0.57437724", "0.5593509", "0.53661114", "0.5355404", "0.53525054", "0.5327356", "0.5314125", "0.5300224", "0.52749634", "0.52691305", "0.5249321", "0.5223286", "0.52219146", "0.5210679", "0.51943725", "0.518469", "0.51829517", "0.517827...
0.0
-1
LOCAL STORAGE ARGUMENTO OBLIGATORIO: pobj
function valueToLStorage(pobj){ //pobj debe ser un elemento o id de elemento válido if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); if ((aux!==null) && (aux.value!==undefined)){ localStorage.setItem(aux.id, aux.value); } else { console.log('ERROR: Objeto o propiedad value inexistente'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLocalObject(objName, obj) {\n localStorage.setItem(objName, JSON.stringify(obj)); \n }", "function storeLocal(obj) {\n\n Object.keys(obj).forEach((key) => {\n console.log(`Set ${key} = ${obj[key]}`);\n localStorage.setItem(key, obj[key]);\n });\n // localStorage.setItem('fullname',...
[ "0.64587617", "0.6366374", "0.6254711", "0.6201135", "0.6201135", "0.6201135", "0.6201135", "0.6201135", "0.6155638", "0.61366427", "0.61094934", "0.6088755", "0.60383755", "0.60275024", "0.6007793", "0.5989799", "0.5980499", "0.5972242", "0.59482235", "0.59413654", "0.584980...
0.6239156
3
ARGUMENTO OBLIGATORIO: pobj OPCIONAL: pid
function lStorageToValue(pobj, pid){ //pobj debe ser un elemento o id de elemento válido if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); var idaux=pid; if ((aux!==null) && (aux.value!==undefined)){ if (idaux=== undefined) {idaux=aux.id;} aux.value=localStorage.getItem(idaux); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function neoip_xdomrpc_cb_new_obj_id(obj)\n{\n\tvar\tobj_id;\n\t// draw a new random obj_id until a free one is found\n\tdo {\n\t\tobj_id\t= Math.floor(Math.random() * 65536);\n\t}while( neoip_xdomrpc_cb_arr[obj_id] != null );\n\t// return the obj_id\n\treturn obj_id;\n}", "function neoip_xdomrpc_cb_new_obj_id(o...
[ "0.5951348", "0.5951348", "0.5797085", "0.57437724", "0.5593509", "0.53661114", "0.5355404", "0.53525054", "0.5327356", "0.5314125", "0.5300224", "0.52749634", "0.52691305", "0.5249321", "0.5223286", "0.52219146", "0.5210679", "0.51943725", "0.518469", "0.51829517", "0.517827...
0.0
-1
ARGUMENTO OBLIGATORIO: pobj OPCIONAL: pid
function lStorageToInhtml(pobj, pid){ //pobj debe ser un elemento o id de elemento válido if (typeof(Storage)!== 'undefined'){ var aux=selectObjId(pobj); var idaux=pid; if ((aux!==null) && (aux.inneHTML!==undefined)){ if (idaux=== undefined) {idaux=aux.id;} aux.innerHTML=localStorage.getItem(idaux); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function neoip_xdomrpc_cb_new_obj_id(obj)\n{\n\tvar\tobj_id;\n\t// draw a new random obj_id until a free one is found\n\tdo {\n\t\tobj_id\t= Math.floor(Math.random() * 65536);\n\t}while( neoip_xdomrpc_cb_arr[obj_id] != null );\n\t// return the obj_id\n\treturn obj_id;\n}", "function neoip_xdomrpc_cb_new_obj_id(o...
[ "0.5951348", "0.5951348", "0.5797085", "0.57437724", "0.5593509", "0.53661114", "0.5355404", "0.53525054", "0.5327356", "0.5314125", "0.5300224", "0.52749634", "0.52691305", "0.5249321", "0.5223286", "0.52219146", "0.5210679", "0.51943725", "0.518469", "0.51829517", "0.517827...
0.0
-1
Grid has been defined.We draw from database provided Grid model.
function DrawFinalizedGrid(map,group,grid_json,grid_collection) { group.clearLayers(); _.each(grid_json,function(grid) { var southWest = new L.LatLng(grid.sw.lat,grid.sw.lng), northEast = new L.LatLng(grid.ne.lat,grid.ne.lng), bounds = new L.LatLngBounds(southWest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadGrid() {\n \n }", "function drawGrid() {\n\t\t\t// add container styles\n\t\t\t$container.addClass('container gantt');\n\t\t\t\n\t\t\t// empty container\n\t\t\t$container.empty();\n\t\t\t\t\t\t\n\t\t\t// render contents into container\n\t\t\t$container.append(gridTmpl(controller));\t...
[ "0.72633094", "0.715689", "0.69407105", "0.684917", "0.67690223", "0.6746435", "0.6738359", "0.6737601", "0.6648116", "0.6633695", "0.6626957", "0.6603019", "0.65963256", "0.65929586", "0.6588725", "0.658587", "0.653415", "0.6523253", "0.6513323", "0.6463684", "0.64118034", ...
0.6059989
48
This draws an example grid for locate pages. We draw according to Viewport of map.
function DrawGrid(bounds,group,grid_collection,columns,rows) { //Wipe the existing one. We may have one. grid_collection.reset(); group.clearLayers(); bigbounds = bounds var gridN = bigbounds.getNorthEast().lat, gridS = bigbounds.getSouthWest().lat, gri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawMap() {\n //Draw background tiles\n image(imgBackground, 0, 0, windowWidth, (windowWidth * 0.5));\n //Set tile size based on window size\n let tileSize = windowWidth / 20;\n // set grid dimensions based on tilesize\n let gridWidth = tileSize;\n let gridHeight = tileSize;\n // Draw vertical lin...
[ "0.7083548", "0.6654852", "0.6583816", "0.6548577", "0.6511474", "0.6466784", "0.6405359", "0.63071483", "0.6302093", "0.62838346", "0.6282941", "0.62825507", "0.6237751", "0.62348217", "0.61871713", "0.6155266", "0.61546504", "0.6143548", "0.60929155", "0.6083332", "0.607597...
0.58547753
41
maybe ill need it again someday
getDailyStockInfoCompanyIdAndDateId(company_id, date_id) { return knex('daily_stock_info') .select('daily_stock_info_id', 'date_id', 'company_id', 'open_price', 'closing_price', 'eod_to_eod_percent_change', 'sod_to_eod_percent_change', 'volume', 'today_market_cap') .whereIn('date_id', [date_id - 1, date_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient private internal function m185() {}", "transient protected internal fun...
[ "0.71085316", "0.6650959", "0.6480592", "0.64037", "0.6390818", "0.6350201", "0.6342632", "0.6089465", "0.60277903", "0.5988239", "0.59589535", "0.58532727", "0.5832647", "0.57882863", "0.57591915", "0.57472366", "0.5733317", "0.57031417", "0.56753254", "0.5661743", "0.559400...
0.0
-1
Valida todos los elementos que tengan la propiedad Requerido = SI Usa ademas las propiedades Dato Tipo Funciones relacionadas:
function chequearRequeridos() { oPublicar=document.forms[0]; for (i=0; i < oPublicar.elements.length; i++) { if (oPublicar.elements[i].getAttribute("Requerido")!= null){ if (oPublicar.elements[i].getAttribute("Requerido") == "Si"){ //if (!oPublicar.elements[i].readO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validacionCampos(nombreCampo, valorCampo, tipoCampo) {\n\n var expSoloCaracteres = /^[A-Za-zÁÉÍÓÚñáéíóúÑ]{3,10}?$/;\n var expMatricula = /^([A-Za-z]{1}?)+([1-9]{2}?)$/;\n\n if (tipoCampo == 'select') {\n valorComparar = 0;\n } else {\n valorComparar = '';\...
[ "0.7179117", "0.67277867", "0.6718451", "0.66876113", "0.666181", "0.6659499", "0.6647782", "0.66458225", "0.6633785", "0.66196567", "0.66033804", "0.6586287", "0.6586287", "0.651618", "0.6507948", "0.6486315", "0.6479469", "0.64317316", "0.6407708", "0.64025223", "0.6394664"...
0.0
-1
Se utiliza para mostrar la ayuda del objeto seleccionado
function MostrarAyuda(oElemento) { if (browser=="IE"){ document.all.ayudaTitulo.innerHTML = oElemento.Dato; document.all.ayudaTexto.innerHTML = oElemento.Ayuda; } else { document.getElementById("ayudaTitulo").innerHTML = oElemento.getAttribute("Dato"); document.getElementById("ay...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cambiamenu(){\n\n\t\t\tseleccionado=form1.epsnueva.selectedIndex;\n\t\t\tp = form1.epsnueva[form1.epsnueva.selectedIndex].value;\n \t\tt = form1.epsnueva[form1.epsnueva.selectedIndex].text;\n\t\t\ttextoseleccionado=\"\"+p+\"-\"+t;\n\t\t\tcodigoseleccionado=p;\n\n\t\t\t//alert(\"\"+p+\"-\"+t);\n\t\t\tes...
[ "0.63401085", "0.62963456", "0.6129914", "0.61177146", "0.6072833", "0.60607624", "0.604463", "0.60294056", "0.60249066", "0.6018402", "0.59636885", "0.59556293", "0.59424406", "0.59355074", "0.59239936", "0.59019595", "0.58836246", "0.58797777", "0.58768076", "0.587349", "0....
0.0
-1
Hace un AllTrim JavaScript
function trim_string() { var ichar, icount; var strValue = this; ichar = strValue.length - 1; icount = -1; while (strValue.charAt(ichar)==' ' && ichar > icount) {--ichar;} // End While if (ichar!=(strValue.length-1)) {strValue = strValue.slice(0,ichar+1)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myTrim(x) {\n \n return x.replace(/^\\s+|\\s+$/gm,'');\n }", "function ltrim()\n{\n return this.replace( /^\\s+/g,'');\n}", "function trim( value )\n{\n\n return LTrim(RTrim(value));\n\n}", "function di_trim(s) {\n var temp = s;\n return temp.replace(/^\\s+/,'').replace(/\\s+$/,'');\n...
[ "0.7217408", "0.7037787", "0.7021558", "0.69861984", "0.69745725", "0.6947129", "0.6946907", "0.69332224", "0.6926366", "0.6923964", "0.6921601", "0.69210505", "0.69134396", "0.6874968", "0.68743056", "0.6859683", "0.6852811", "0.68399817", "0.68284035", "0.6817873", "0.68178...
0.0
-1
API fetching for all posts and my posts
componentDidMount() { axios.get("https://jsonplaceholder.typicode.com/posts") .then(response => { const posts = response.data; console.log(posts); this.setState({ posts }); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getAllPosts() {\n return fetch('https://dev-selfiegram.consumertrack.com/users/1/feed').then(response => {\n return response.json();\n }).catch(error => {\n return error;\n });\n }", "function loadPosts() {\n // Note: \"posts\" is the [API] -> [endpoint] -> [name] in src...
[ "0.775746", "0.7580196", "0.7413956", "0.7390907", "0.73882174", "0.7360864", "0.73244834", "0.7307523", "0.7270868", "0.7240573", "0.7234731", "0.7173112", "0.7141704", "0.7102703", "0.70466506", "0.7040643", "0.7003613", "0.6983792", "0.6969255", "0.69675297", "0.6953726", ...
0.0
-1
Calculate a list of numsteps coefficients with a shape defined by curvename
function getcoefs(curvename, numsteps) { let coefs = new Array(numsteps).fill(0); switch (curvename) { case "CONCAVA": coefs = coefs.map((coef, i) => { return ( 4 - (12 * (i + 0.5)) / numsteps + (12 * (i + 0.5) * (i + 0.5)) / (numsteps * numsteps) ); })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calc_steps() {\r\n for (var key in rgb_values) {\r\n if (rgb_values.hasOwnProperty(key)) {\r\n for(var i = 0; i < 3; i++) {\r\n rgb_values[key][i] = gradients[currentIndex][key][i];\r\n rgb_steps[key][i] = calc_step_size(gradients[nextIndex][key][i],rgb_values[key][i]);\r\n }\r...
[ "0.5175935", "0.51669896", "0.5117628", "0.4948341", "0.48918417", "0.48576507", "0.48254618", "0.47844553", "0.47738335", "0.47111106", "0.47060114", "0.4644466", "0.4611829", "0.45798934", "0.45542246", "0.45378363", "0.44978005", "0.44876972", "0.44806", "0.44756937", "0.4...
0.74572724
0
get new timestep values using curvename, newtotalenergy and currentvalues
function getValues(curvename, newtotalenergy, currentvalues) { let values = []; let scale = newtotalenergy; const currenttotalenergy = currentvalues.reduce((a, b) => a + b, 0); const numsteps = currentvalues.length; if (currenttotalenergy === 0) { const val = newtotalenergy / numsteps; values = curre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getValuesInternal_(startTime, stepSize, count) {\n const values = [];\n let nextPoint = 0;\n let currentValue = 0;\n let time = startTime;\n for (let i = 0; i < count; ++i) {\n while (nextPoint < this.dataPoints_.length &&\n this.dataPoints_[nextPoint].time < time) {\n curren...
[ "0.58954555", "0.5501574", "0.54829556", "0.54680854", "0.5464234", "0.5442016", "0.5413268", "0.54090905", "0.5378346", "0.5377853", "0.5361723", "0.5360805", "0.5356343", "0.53255194", "0.53255194", "0.5315408", "0.52898806", "0.52808744", "0.52468866", "0.5207045", "0.5176...
0.74882644
0
Handle changes in ctype, csubtype and carrier select boxes It tries to keep coherent values
handleChange(e) { const { selectedkey, cdata, onEdit } = this.props; let prop = e.target.name.replace(/^select/, ""); let value = e.target.value; let currentcomponent = { ...cdata[selectedkey] }; if (currentcomponent[prop] === value) { return; } if (prop === "ctype") { const cs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function y_select_change(self) {\n $(self).parent().find(\".attr-options\").fadeOut();\n var type = $(self).find(\":selected\").attr('type');\n if(type == \"gene\"){\n $(self).parent().find('.y-gene-attribute-select option:contains(\"select a specification\")').prop('selected', true...
[ "0.6267683", "0.61363494", "0.6037213", "0.60280377", "0.60119444", "0.59727734", "0.5941395", "0.5916114", "0.5898792", "0.58550984", "0.5854183", "0.58407706", "0.583832", "0.58260036", "0.58004415", "0.57928973", "0.57766926", "0.5768816", "0.57626057", "0.5762196", "0.575...
0.7112516
0
Handle changes in total energy entry through UI
handleChangeTotalEnergyEntry(e) { if (e.keyCode !== 13) { this.setState({ totalenergyOnEdit: true }); return; } this.setState({ totalenergyOnEdit: false }); let newvalue = this.parseTotalEnergyValue(e.target.value); if (newvalue === null || this.totalEnergyEntry.value === newvalue) retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleChangeTotalEnergyRange(e) {\n this.totalEnergyEntry.value = parseFloat(\n e.target.value.replace(\",\", \".\")\n ).toFixed(2);\n this.updateValues();\n }", "update() {\n if (this.energy <= 0) {\n this.element.innerHTML = this.name + \" has run away because you don't know ho...
[ "0.69836307", "0.67559075", "0.65020853", "0.6217343", "0.61239254", "0.611812", "0.61111456", "0.61071295", "0.6093751", "0.6084485", "0.60593325", "0.60534173", "0.59861463", "0.5981972", "0.59636766", "0.592707", "0.59083915", "0.59053344", "0.5867251", "0.58634216", "0.58...
0.7039071
0
Handle changes in total energy range through UI
handleChangeTotalEnergyRange(e) { this.totalEnergyEntry.value = parseFloat( e.target.value.replace(",", ".") ).toFixed(2); this.updateValues(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleChangeTotalEnergyEntry(e) {\n if (e.keyCode !== 13) {\n this.setState({ totalenergyOnEdit: true });\n return;\n }\n this.setState({ totalenergyOnEdit: false });\n let newvalue = this.parseTotalEnergyValue(e.target.value);\n if (newvalue === null || this.totalEnergyEntry.value === new...
[ "0.7000172", "0.6383457", "0.6227435", "0.6184715", "0.6140704", "0.6101623", "0.6066257", "0.6060954", "0.6041849", "0.6029658", "0.60230654", "0.60081846", "0.5966445", "0.5942938", "0.5933503", "0.5909087", "0.5828192", "0.580957", "0.5800777", "0.5792016", "0.57831067", ...
0.7464311
0
Update current energycomponent values using editor UI state
updateValues() { const { selectedkey, cdata, onEdit } = this.props; let currentcomponent = { ...cdata[selectedkey] }; let newvalues = getValues( this.CurveSelect.value, parseFloat(this.totalEnergyEntry.value.replace(",", ".")), currentcomponent.values ); currentcomponent.values = n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onComponentShow() {\n this.subcomponents.form.updateValues();\n }", "update() {\n const state = this.store.getState();\n\n if (this.isPresenting !== state.webvr.isPresenting) {\n this.vrEffect.setFullScreen(state.webvr.isPresenting);\n this.isPresenting = state.webvr.isPresenting;\n }\n\n ...
[ "0.63517284", "0.6285354", "0.6236667", "0.62300724", "0.6118021", "0.60280854", "0.60254866", "0.5980333", "0.59755415", "0.5899382", "0.5883646", "0.5858733", "0.5853588", "0.58352274", "0.58257735", "0.58257735", "0.58257735", "0.581098", "0.578613", "0.5771603", "0.573674...
0.75288254
0
Restore current component to stored state
handleRestore(_event) { const { selectedkey, storedcomponent, onEdit } = this.props; const currenttotalenergy = storedcomponent.values.reduce( (a, b) => a + b, 0 ); this.CurveSelect.value = CURVENAMES[0]; this.totalEnergyRange.max = Math.max( 10, 10 + 2 * Math.round(currentt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\r\n this.currentState = this.initial;\r\n }", "RevertToPreviousState()\n {\n this.ChangeState(this.m_pPreviousState);\n }", "function reset() {\n\t setState(null);\n\t} // in case of reload", "restoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis....
[ "0.6915516", "0.68677974", "0.6837446", "0.683215", "0.68076074", "0.67772174", "0.67571676", "0.6749093", "0.67463696", "0.6719346", "0.6713745", "0.6688514", "0.6688514", "0.6688514", "0.6688514", "0.66687155", "0.6543374", "0.65063006", "0.65003335", "0.6481671", "0.646905...
0.57963556
96
Set active color for tones
setToggleColor() { this.toneToggles.forEach((item) => { const row = item.row; // Update display color item.toneColor = this.toneDisplays[row].color; if (!this.beatMode) { item.toggleColors(item.activeTone, item.toneColor); } })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "oncolor() {\n let color = Haya.Utils.Color.rgbHex($.color.red, $.color.green, $.color.blue, \"0x\");\n this.target.sprite.color = color;\n this.target.sprite.tint = color;\n }", "function setColor(e) {\n var target = e.target,\n status = e.target.classList.contains('...
[ "0.675793", "0.6565955", "0.64323443", "0.6414491", "0.6402917", "0.6286082", "0.62286925", "0.61696625", "0.6164925", "0.6084165", "0.60056895", "0.5970767", "0.5938468", "0.5938246", "0.5932758", "0.5922333", "0.591533", "0.59038943", "0.5848415", "0.58400255", "0.5835509",...
0.628414
6
Calcuates the length of 1 beat
setAnimationDelay(bpm = 120) { this.animationDelay = utils.calcDelay(bpm); this.intervalDelay = this.animationDelay * this.numberofTogglesPerRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_beatsToDuration (args, beats) {\n console.log(\"get Tempo\" + this.getTempoEach(args));\n var nDuration = Math.round(((60 / this.getTempoEach(args)) * beats) * 100);\n return nDuration;\n }", "function calcAnimationLength() {\r\n return data[data.length - 1].time / 1000 + \"s\"\r\n}",...
[ "0.6332499", "0.6313848", "0.6233519", "0.6163132", "0.601081", "0.6006683", "0.58852077", "0.5875661", "0.5834648", "0.5829703", "0.58285636", "0.5812911", "0.57887155", "0.57772887", "0.576659", "0.5752569", "0.5743112", "0.5743112", "0.57290226", "0.5704101", "0.5671313", ...
0.0
-1
Get local JSON file
function getJson() { fetch('products.json') .then(res => res.json()) .then(data => { let output = ''; data.forEach(function(post) { output += ` <div class="product product_horizontal"> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getJSON(json_file) {\n\tvar request = new XMLHttpRequest();\n\trequest.open(\"GET\", json_file, false);\n\trequest.send(null);\n\tvar json = request.responseText;\n\treturn json;\n}", "function get() {\n // 'touch' file\n fs.openSync(fileName, 'a+', (err, fd) => {\n err ? console.log(err) : fs.clos...
[ "0.7572406", "0.75688785", "0.753952", "0.73290455", "0.72573316", "0.7148553", "0.71424794", "0.71018016", "0.7099877", "0.70722073", "0.70702213", "0.70322734", "0.70289063", "0.7025279", "0.7018296", "0.6992272", "0.69413483", "0.69193834", "0.6887132", "0.6866777", "0.684...
0.0
-1
Create bindings/tunnels to each room
createRoad(room1, room2, available) { var x1 = room1.column, x2 = room2.column; var y1 = room1.row, y2 = room2.row; while (x1 !== x2) { this.refs[xLength * room1.row + x1].setEntity("white"); available.push(xLength * room1.row + x1); x1 = x1 < x2 ? x1 + 1 : x1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupRooms () {\n\t\tvar roomConfig = game.gameData.room;\n\n\t\t// split the options from the rest of the settings object:\n\t\t_options = roomConfig.options;\n\t\tdelete roomConfig.options;\n\n\t\t// save the variables from the options:\n\t\tcurrentRoom = _options.currentRoom;\n\n\t\t// make rooms from ...
[ "0.6168679", "0.6150259", "0.6050027", "0.6022509", "0.6005338", "0.59180385", "0.5894964", "0.5894082", "0.5857651", "0.5756264", "0.57439226", "0.5635033", "0.5622562", "0.5576751", "0.5523449", "0.5514136", "0.54987836", "0.54634523", "0.5462276", "0.54509807", "0.5430274"...
0.48908466
77
update the area revealed
updateFog(move){ var position = parseInt(move, 10); for(var i = -2; i < 3; i++){ this.refs[position-2*xLength+i].fog(); this.refs[position-xLength+i].fog(); this.refs[position-i].fog(); this.refs[position+xLength+i].fog(); this.refs[po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAreaList() {\n\n}", "function areaUpdate(selectCode) {\n d3.select(\".areaSvg\")\n .remove()\n d3.select(\".title.area\")\n .remove()\n\n areaMaker(selectCode, codeData);\n}", "function updateAll() {\n\tthis.circle.show();\n\tthis.mid.show();\n\tfor (var i = 0; i < this.holes....
[ "0.62549275", "0.6197108", "0.60826427", "0.6056295", "0.60305035", "0.60280174", "0.59872055", "0.5974569", "0.591251", "0.59111917", "0.5911023", "0.5888933", "0.585019", "0.5845287", "0.58338815", "0.5798804", "0.5782368", "0.57812166", "0.57784414", "0.5760295", "0.576013...
0.0
-1
Cheating, not the react way
updateStats(){ document.getElementById("hp").innerHTML = health; document.getElementById("wp").innerHTML = weapon; document.getElementById("xp").innerHTML = exp; document.getElementById("lvl").innerHTML = level; document.getElementById("dng").innerHTML = dungeon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "eachCell(cell){\r\n return (\r\n <Cell x={cell.x} y={cell.y} color={cell.color} highlighted={cell.hl} \r\n onClick={this.clicked.bind(this, this.pointToKey(cell.x, cell.y))}\r\n key={this.pointToKey(cell.x, cell.y)} \r\n piece={cell.piece ? cell.piece...
[ "0.56770885", "0.558988", "0.5567462", "0.5535562", "0.5490378", "0.54759276", "0.54516125", "0.5410227", "0.5408211", "0.54044235", "0.5401808", "0.53988785", "0.53838354", "0.5375155", "0.5371767", "0.5367653", "0.53512716", "0.5345104", "0.5326953", "0.5317682", "0.5312086...
0.0
-1
=====Makes a request to the server and grabs everything from the class
componentDidMount(){ this.handleGetForm() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassList(){\n request(classListUrl,processClassList);\n}", "fetch () {\n this._makeRequest('GET', resources);\n }", "_request( url){\r\n\t\treturn fetch( url)\t//response = what we get from fetch = json with server response \r\n\t\t\t.then( ( response) => {\r\n\t\t\t\tif( resp...
[ "0.60531884", "0.59432536", "0.59081334", "0.59075916", "0.5883357", "0.57962203", "0.5768176", "0.5759729", "0.5752103", "0.56688505", "0.56602556", "0.5647529", "0.5619699", "0.5617362", "0.5602263", "0.55881214", "0.55881214", "0.5583711", "0.5583705", "0.5574923", "0.5569...
0.0
-1
=======State with initial values for the inputs========
handleProduct(val){ this.setState({ product: val }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputInit() {\n this.value = 0;\n this.flag = false;\n}", "setupInitialValues() {\n this.__xSpacingInput.value = \"1.0\";\n this.__ySpacingInput.value = \"1.0\";\n\n this.__xDimInput.value = 5;\n this.__yDimInput.value = 1;\n }", "function setInitialValues() {\n /...
[ "0.71083075", "0.7007549", "0.6769238", "0.67362326", "0.67263573", "0.6714294", "0.6558775", "0.6496932", "0.6472272", "0.6470913", "0.6446146", "0.6381759", "0.6347978", "0.63465834", "0.6315577", "0.63140595", "0.6302196", "0.6301898", "0.6301898", "0.62727284", "0.6271294...
0.0
-1
call navigate for AppNavigator here:
someEvent(someRouteName) { this.navigator && this.navigator.dispatch( NavigationActions.navigate({routeName: someRouteName}), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "navigateToApp(navProps) {\n this.props.navigation.navigate(\"App\", navProps);\n }", "_navigate (){\n this.props.navigator.push({title: 'Home Screen', index: 0})\n }", "navigate(route) {\n return this.props.navigation.dispatch(\n NavigationActions.navigate({ routeName: route })\n );\n }", ...
[ "0.7513242", "0.73095137", "0.68904227", "0.67951703", "0.6631721", "0.6607414", "0.651451", "0.6373218", "0.63462454", "0.6331881", "0.62982994", "0.6263822", "0.6259712", "0.6247727", "0.6202457", "0.61925197", "0.619226", "0.6177793", "0.6145647", "0.61422145", "0.6137237"...
0.6220217
14
Creates the DOM elements needed to render basic UI and contextual information, including the title, description, and attribute field select
function updatePanel() { var panelDiv = document.getElementById("panel"); panelDiv.style.textAlign = "center"; // title var titleElement = document.createElement("h2"); titleElement.innerText = title; panelDiv.appendChild(titleElement); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generate() {\n const body = document.getElementsByTagName('body')[0];\n const div = document.createElement('div');\n div.id = this.id;\n div.style = \"width: fit-content; height: fit-content; background-color: #92a8d1; box-shadow: 10px 10px 5px #888888; text-align: center; position: abs...
[ "0.6616794", "0.6333836", "0.6254467", "0.6231467", "0.6203426", "0.6122985", "0.6120737", "0.59615", "0.59314424", "0.59288085", "0.5927026", "0.58607423", "0.5831903", "0.58060104", "0.5803711", "0.5794046", "0.5788833", "0.57749206", "0.5762686", "0.57440525", "0.5742191",...
0.5526163
56
Callback that executes each time the user selects a new variable to visualize.
function selectVariable(event) { return __awaiter(this, void 0, void 0, function () { var selectedValue, selectedInfo, rendererResponse; return __generator(this, function (_a) { switch (_a.label) { case 0: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(selection) {\n // Select the input value from the form\n plottingAll(selection);\n}", "function optionChanged() {\n // Obtain selected sample from dropdown\n var selectedSample = Plotly.d3.select('select').property('value'); \n console.log('selectsamle_value : ' , selectedSa...
[ "0.70020086", "0.6762254", "0.67157483", "0.67014116", "0.665781", "0.66402555", "0.6629704", "0.6619903", "0.6614251", "0.6535079", "0.65067184", "0.65007466", "0.6499621", "0.6488798", "0.6461427", "0.6447971", "0.6430804", "0.6428771", "0.6353854", "0.63388336", "0.6323930...
0.66031605
9
Register all screens of the app
registerScreens() { Navigation.registerComponent( 'app.ChartCatalogScreen', () => ChartCatalogScreen ); Navigation.registerComponent( 'app.ChartDetailScreen', () => ChartDetailScreen ); Navigation.registerComponent( 'app.LoginScreen', () => LoginScreen ); Navigation.registe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerScreens() {\n Navigation.registerComponent('Main', () => Main);\n Navigation.registerComponent('Dashboard', () => Dashboard);\n Navigation.registerComponent('Profile', () => Profile);\n Navigation.registerComponent('Repositories', () => Repositories); \n Navigation.registerComponent('WebView'...
[ "0.8369343", "0.6472031", "0.6139538", "0.606428", "0.5986947", "0.5978951", "0.57801217", "0.56741834", "0.56670296", "0.5518653", "0.5505215", "0.5496201", "0.54862696", "0.5460816", "0.54417056", "0.538717", "0.5380888", "0.5372244", "0.5324416", "0.529644", "0.5294883", ...
0.8036435
1
Show main tab bar
showMainScreen(animated) { const createTabs = () => { let tabs = [ { label: 'Charts', screen: 'app.ChartCatalogScreen', icon: require('../img/tabBarCharts.png'), selectedIcon: require('../img/tabBarCharts.png'), title: 'Charts', navigatorStyl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_tabs( tabs ) {\n var tabs_code = $(tabs);\n\n set_active_tab( tabs_code );\n preapare_tabs_interface( tabs_code );\n\n $('#app-table>header').empty();\n $('#app-table>header').append( tabs_code );\n }", "function showTab(tabId) {\n $('#mainTab a[href=\"#'...
[ "0.6929623", "0.69265646", "0.6854535", "0.6763624", "0.67466325", "0.6717535", "0.66582525", "0.66318786", "0.6620859", "0.6617886", "0.6594391", "0.65086055", "0.6507468", "0.64993566", "0.6480358", "0.6478358", "0.64699686", "0.64401674", "0.64104146", "0.6408155", "0.6401...
0.6537109
11
collectdataobject config node function definition
function CoreStaffSensor(config) { RED.nodes.createNode(this, config); this.sensorId = config.sensorId; this.configObject = config.configObject; this.on('input', function (msg) {}); this.on('close', function () {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "apply_config_data(d) {\n }", "function DataSetCollector(blob){\n\t\t\tthis.simpleDataName = blob.simpleDataName;\n\t\t\tthis.dataName = blob.dataName;\n\t\t\tthis.categories = blob.categories;\n\t\t\t/*\n\t\t\t * This is what is run for each dataset that is collected\n\t\t\t */\n\t\t\tthis.inputParser = funct...
[ "0.64841175", "0.55576056", "0.5374538", "0.5364247", "0.52812636", "0.5263496", "0.51300037", "0.5022821", "0.4988403", "0.49634153", "0.49574983", "0.49304125", "0.49267524", "0.4899566", "0.48922515", "0.48911107", "0.48846102", "0.48467556", "0.48440495", "0.48440495", "0...
0.0
-1
when we press our mouse we should activate our particle(s)!
function mousePressed() { // Here's Wispy to keep you company while I work on oscillation. // wispy.activate( // 50, // amplitude // 10, // period // 10 // delay // ) for (let particle of particles) { particle.activate( 16, // amplitude 8, // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseClicked() {\n x = mouseX;\n y = mouseY;\n particle = new Particle(x,y);\n}", "function mouseDragged() {\n\n \n\t\n\t\n\tif(particleDraggingMode){\n\t\tparticles[particleDragging].x = (mouseX-height/2)/linearSpeed;\n\t\tparticles[particleDragging].y = (mouseY-width/2)/linearSpeed;\n\t\tparticl...
[ "0.77375704", "0.71221554", "0.7006718", "0.69259644", "0.6896488", "0.68678224", "0.6828428", "0.68055296", "0.68048155", "0.6783271", "0.67594725", "0.66873896", "0.66664594", "0.6623786", "0.65657246", "0.65190756", "0.65172374", "0.6516515", "0.65135807", "0.6501526", "0....
0.7645394
1
Grant write permissions for this stream and its contents to an IAM principal (Role/Group/User). If an encryption key is used, permission to ues the key to decrypt the contents of the stream will also be granted.
grantRead(grantee) { const ret = this.grant(grantee, ...READ_OPERATIONS); if (this.encryptionKey) { this.encryptionKey.grantDecrypt(grantee); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grant(grantee, ...actions) {\n return iam.Grant.addToPrincipal({\n grantee,\n actions,\n resourceArns: [this.streamArn],\n scope: this,\n });\n }", "grantWrite(grantee) {\n var _a;\n const ret = this.grant(grantee, ...WRITE_OPERATIONS);\n...
[ "0.6316987", "0.5938697", "0.589654", "0.56637454", "0.55848914", "0.5472328", "0.5351032", "0.51796854", "0.50566435", "0.50566435", "0.5014744", "0.48072493", "0.47461867", "0.4670675", "0.46591467", "0.46591467", "0.46516448", "0.46213388", "0.46116522", "0.44994742", "0.4...
0.38745487
54
Grant read permissions for this stream and its contents to an IAM principal (Role/Group/User). If an encryption key is used, permission to ues the key to decrypt the contents of the stream will also be granted.
grantWrite(grantee) { var _a; const ret = this.grant(grantee, ...WRITE_OPERATIONS); (_a = this.encryptionKey) === null || _a === void 0 ? void 0 : _a.grantEncrypt(grantee); return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grantRead(identity, objectsKeyPattern = '*') {\n return this.grant(identity, perms.BUCKET_READ_ACTIONS, perms.KEY_READ_ACTIONS, this.bucketArn, this.arnForObjects(objectsKeyPattern));\n }", "grant(grantee, ...actions) {\n return iam.Grant.addToPrincipal({\n grantee,\n actio...
[ "0.58033514", "0.5788931", "0.56502265", "0.5630799", "0.5488136", "0.5346999", "0.49231544", "0.489032", "0.47477946", "0.4618824", "0.4606065", "0.46024248", "0.45725954", "0.4513967", "0.4505311", "0.4446144", "0.44108534", "0.4391662", "0.43879116", "0.4359456", "0.434954...
0.43189323
24
Grants read/write permissions for this stream and its contents to an IAM principal (Role/Group/User). If an encryption key is used, permission to use the key for encrypt/decrypt will also be granted.
grantReadWrite(grantee) { var _a; const ret = this.grant(grantee, ...Array.from(new Set([...READ_OPERATIONS, ...WRITE_OPERATIONS]))); (_a = this.encryptionKey) === null || _a === void 0 ? void 0 : _a.grantEncryptDecrypt(grantee); return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grant(grantee, ...actions) {\n return iam.Grant.addToPrincipal({\n grantee,\n actions,\n resourceArns: [this.streamArn],\n scope: this,\n });\n }", "grantReadWrite(identity, objectsKeyPattern = '*') {\n const bucketActions = perms.BUCKET_READ_AC...
[ "0.5792441", "0.5682211", "0.5511981", "0.53910714", "0.5335322", "0.50781375", "0.5065329", "0.49149948", "0.49008307", "0.4859451", "0.4851795", "0.4833929", "0.48013383", "0.4798999", "0.47376627", "0.47291145", "0.46648785", "0.46547186", "0.46401173", "0.4601887", "0.459...
0.5808463
0
Grant the indicated permissions on this stream to the given IAM principal (Role/Group/User).
grant(grantee, ...actions) { return iam.Grant.addToPrincipal({ grantee, actions, resourceArns: [this.streamArn], scope: this, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grantPublish(grantee) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(grantee);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, this.grantPublish);\n ...
[ "0.62977904", "0.62503386", "0.60050786", "0.59562004", "0.59562004", "0.5693347", "0.5551078", "0.5464682", "0.5437594", "0.5406978", "0.509521", "0.5031615", "0.5030033", "0.50112075", "0.49778593", "0.49550816", "0.4836414", "0.47938177", "0.47296372", "0.47296372", "0.469...
0.6926162
0
Import an existing Kinesis Stream provided an ARN.
static fromStreamArn(scope, id, streamArn) { return Stream.fromStreamAttributes(scope, id, { streamArn }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getKinesis() {\n let params = {\n apiVersion: '2013-12-02',\n region: 'us-east-2',\n };\n\n return new aws.Kinesis(params);\n}", "async registerStream(stream) {\n await this.objectLoader.import(stream);\n }", "static fromStreamAttributes(scope, id, attrs) {\n class Import ext...
[ "0.53977805", "0.5200883", "0.50993747", "0.4613765", "0.45193636", "0.45051187", "0.4471037", "0.44540632", "0.4404511", "0.4376027", "0.43444782", "0.43149748", "0.42828825", "0.42741147", "0.42475122", "0.4234488", "0.41925865", "0.41922575", "0.41285175", "0.41080675", "0...
0.5270747
1
Creates a Stream construct that represents an external stream.
static fromStreamAttributes(scope, id, attrs) { class Import extends StreamBase { constructor() { super(...arguments); this.streamArn = attrs.streamArn; this.streamName = core_1.Stack.of(scope).parseArn(attrs.streamArn).resourceName; th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createStream() {\n const [status, ctx] = binding.CreateStream(this._impl);\n if (status !== 0) {\n throw `CreateStream failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`;\n }\n return new StreamImpl(ctx);\n }", "createStream () {\n\n }", "f...
[ "0.7121956", "0.6877644", "0.6711808", "0.6640133", "0.6637946", "0.6612368", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0.65368897", "0...
0.0
-1
Set up key properties and return the Stream encryption property from the user's configuration.
parseEncryption(props) { var _a; // if encryption properties are not set, default to KMS in regions where KMS is available if (!props.encryption && !props.encryptionKey) { const conditionName = 'AwsCdkKinesisEncryptedStreamsUnsupportedRegions'; const existing = core_1.Sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get encryptionConfigInput() {\n return this._encryptionConfig;\n }", "function setKeyAndSecret() {\n PROPERTY_STORE.setProperties({\n 'consumer_key': 'PUT YOUR KEY HERE',\n 'consumer_secret': 'PUT YOUR SECRET HERE'\n })\n}", "parseEncryption(props) {\n // default to unencrypted.\n ...
[ "0.6353735", "0.5765448", "0.5749195", "0.56630546", "0.5605808", "0.55709356", "0.55438995", "0.54779464", "0.5462092", "0.5398925", "0.53443664", "0.52961874", "0.52508545", "0.520581", "0.5182428", "0.5128114", "0.51130813", "0.50802535", "0.5074246", "0.50729215", "0.5070...
0.6092348
1
Send rating feedback to User factory.
function sendFeedback(bool) { if (bool) { User.addFavourite($scope.currentSong); } $scope.currentSong.rated = bool; $scope.currentSong.hide = true; Recommendations.nextSong(); $timeout(function () { $scope.currentSong = Recommendations.queue[0]; $scope.currentSong.loaded = false; }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "rateUser(channelId, userId) {\n let rating = this.ratings.getRating(userId);\n let response = 'Hey <@' + userId + '>! ';\n let isNew = true;\n let deltaTime = 0;\n\n if ( rating ) {\n deltaTime = Date.now() - rating.time;\n if ( deltaTime < RATING_TIME ) {\n...
[ "0.63928044", "0.60338885", "0.6015394", "0.5957109", "0.5907222", "0.5795212", "0.56847537", "0.56598437", "0.5595796", "0.559241", "0.5560404", "0.5556763", "0.55248743", "0.54665864", "0.54317665", "0.54288495", "0.54273295", "0.5411168", "0.5396502", "0.53763175", "0.5362...
0.49903902
71
Caches the album image in index 1 to circumvent slow loads
function nextAlbumImg() { if (Recommendations.queue.length > 1) { return Recommendations.queue[1 ].image_large; } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cacheImage(sIndex, dir) {\n\t\t\n\t\tactiveStream = sIndex;\n\t\tif(dir == \"prev\") {\n\t\t\tcurrFSImage = fsiArr[sIndex][1];\n\t\t\tfsiArr[sIndex][0] = new FSImage(0, null, null, null);\n\t\t} else {\n\t\t\tcurrFSImage = fsiArr[sIndex][2];\n\t\t\tfsiArr[sIndex][3] = new FSImage(3, null, null, null);\n\t...
[ "0.69563246", "0.6403452", "0.6043765", "0.60386246", "0.6018179", "0.58760417", "0.58200026", "0.5762095", "0.57546234", "0.5731089", "0.57243454", "0.5641127", "0.56306595", "0.5585866", "0.5581831", "0.5572742", "0.5565134", "0.5564144", "0.5551183", "0.5542684", "0.553030...
0.53847885
39
Get version of a sample group visible to this user
getSampleGroupVersion(sampleGroupId){ let sg = SampleGroups.findOne(sampleGroupId); let version = ""; if(sg){ version = sg.version; } return version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGroup() { return group; }", "async get(groupID) {\r\n let store = await this.groupsAccessStore(\"readwrite\")\r\n return store.get(groupID)\r\n }", "function getItemsFromGroup(group) {\r\n return list.createFiltered(function (item) {\r\n if (item.isFinished == \"t...
[ "0.5639868", "0.5441092", "0.5385598", "0.5288728", "0.51171076", "0.50851786", "0.5084108", "0.5065949", "0.50463307", "0.5037069", "0.50028485", "0.50028485", "0.50028485", "0.5000241", "0.4990437", "0.49297956", "0.4923976", "0.49116945", "0.4879198", "0.48287672", "0.4827...
0.7335977
0
Called when any field except State is updated
updateProfileAddressField(event) { const field = event.target.name; let newProfile = update(this.state.profile, { address: { [field]: {$set: event.target.value} } } ); return this.setState({profile: newProfile})...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_iStateOnValueChange() {\n this.dirty = true;\n }", "_onChangeState() {\n\n\n }", "_onChange () {\n this.forceUpdate()\n }", "handleUpdatedState(state) {\n this.lastTechnology = state.selectedTechnology;\n this.totalClicks = state.clickCounter;\n }", "updateOffice(field, eve...
[ "0.6994671", "0.67296433", "0.6659198", "0.6654559", "0.65938675", "0.65853214", "0.65853214", "0.65829074", "0.6573313", "0.6537712", "0.6533989", "0.6513999", "0.6503793", "0.6503793", "0.6482266", "0.6482266", "0.64806366", "0.6467081", "0.64577425", "0.64577425", "0.64577...
0.0
-1
match begins at in the first submission, the index that the match begins at in the second submission, and the length of the match
constructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_prepareMatches(matchesWithLength, matches, matchesLength) {\n function isSubTerm(currentIndex) {\n const currentElem = matchesWithLength[currentIndex];\n const nextElem = matchesWithLength[currentIndex + 1];\n\n // Check for cases like \"TAMEd TAME\".\n if (\n currentInde...
[ "0.65114707", "0.64753044", "0.62653637", "0.60897386", "0.59975886", "0.593144", "0.5894678", "0.58559525", "0.5825409", "0.5808606", "0.5805253", "0.5755062", "0.5673183", "0.56578076", "0.56440455", "0.5623736", "0.5621887", "0.5595885", "0.5591681", "0.556922", "0.5530475...
0.0
-1
Populate the form with gift data
componentDidMount(){ this.handleAddingGiftToState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function giftDetails(newGift){\r\n\r\n\t\thideEdit();\r\n\t\tshowEdit();\r\n\r\n\t\t//create circle with icon if it is given for this misison\r\n\t\t$('.edit ul.mission-neutral').append($('<li class=\"circle-big\">' + (newGift.icon ? '<img src='+ newGift.icon +'>' : \"\") + '</li>'))\r\n\r\n\t\t//creates empty f...
[ "0.63732594", "0.6290946", "0.62745416", "0.6207915", "0.61933744", "0.61350125", "0.6120653", "0.60485035", "0.59923565", "0.5978563", "0.5947287", "0.5931315", "0.5920489", "0.5856111", "0.58389175", "0.58199465", "0.58117646", "0.58084875", "0.5779413", "0.57772744", "0.57...
0.0
-1
Set value in the form to the state
handleNameChange(event){ this.setState({ _name: event.target.value }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFormValue(value, state) {\n if (this.elementInternals) {\n this.elementInternals.setFormValue(value, state || value);\n }\n }", "updateFormFieldInState(formField, value) {\n\n }", "updateToStore() {\r\n if (this.props.formSetValue)\r\n this.props.formSetValue(this.prop...
[ "0.7694834", "0.75045025", "0.71544135", "0.71544135", "0.6911501", "0.68807983", "0.6868977", "0.67840797", "0.6777289", "0.6769347", "0.67505544", "0.6731062", "0.6674651", "0.6656101", "0.66162586", "0.6610128", "0.6587234", "0.65845954", "0.65722495", "0.65614706", "0.656...
0.0
-1
lpad("A",2,0) ==> 0A rpad("A",2,0) ==> A0
function lpad(str, padLength, padString){ while(str.length < padLength) str = padString+s; return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tp_zero_pad(n, l)\n{\n\tn = n.toString();\n\tl = Number(l);\n\tvar pad = '0';\n\twhile (n.length < l) {n = pad + n;}\n\treturn n;\n}", "function lpad(n, width) {\n n = n + '';\n return n.length >= width ? n : new Array(width - n.length + 1).join('0') + n;\n}", "function padZero(str, len, isRight...
[ "0.7263762", "0.71874917", "0.7079043", "0.7075916", "0.7072273", "0.7013544", "0.7004687", "0.69954693", "0.6930998", "0.69249666", "0.69198704", "0.6899541", "0.68910265", "0.6835567", "0.6811705", "0.6800512", "0.67956555", "0.6779913", "0.67772317", "0.67763007", "0.67680...
0.0
-1
Make all API calls as soon as our GenreRow component mounts.
componentDidMount() { this.getTrending(); this.getTopRated(); this.getDurflixContent(); this.getGenreRows(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.fetchCars();\n }", "componentDidMount(props) {\n // only called when exhibitor page is created or updated.\n this.apiFetcher(props, false)\n }", "componentDidMount(){\n this.loadPartner();\n this.loadCustomerTable();\n }", "componentDid...
[ "0.6352021", "0.6275618", "0.62689054", "0.6233073", "0.6232891", "0.6229949", "0.62186193", "0.62147576", "0.61736786", "0.61527336", "0.61243194", "0.6123194", "0.6111187", "0.607961", "0.60626197", "0.5989594", "0.59669244", "0.5965799", "0.59603536", "0.594995", "0.594045...
0.6532838
0
DESCR: 1 slides to the left
slideLeft() { $('#dialog').animate({left: '-40vw'}, 380) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideLeft(){\r\n\t\treset();\r\n\t\tsliderImages[current - 1].style.display = 'block';\r\n\t\tcurrent--;\r\n\t}", "function slideForward() {\n if ($run.activeIndex < ($conf.slides.length - 1)) {\n $run.activeIndex += 1;\n } else if ($conf.cycle) {\n $run.activeIndex =...
[ "0.7462595", "0.7296142", "0.72636694", "0.7258978", "0.71266085", "0.7124731", "0.70808494", "0.7036737", "0.6992424", "0.6956965", "0.6945642", "0.69025356", "0.68972516", "0.68593776", "0.68490416", "0.68407243", "0.6824662", "0.6824662", "0.6824662", "0.6824662", "0.68246...
0.0
-1
DESCR: 2 slides to the right
slideRight() { $('#dialog').animate({left: '40vw'}, 380) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideRight(){\r\n\t\treset();\r\n\t\tsliderImages[current + 1].style.display = 'block';\r\n\t\tcurrent++;\r\n\t}", "function slideRight() {\n reset();\n sliderImages[current + 1].style.display = 'block'; // Show image when right left.\n current++; // Increase dot.\n temporal[current].innerHT...
[ "0.68640226", "0.6855265", "0.6727294", "0.6588644", "0.65705085", "0.64892226", "0.64869577", "0.6485081", "0.64604604", "0.6431196", "0.6346728", "0.63370675", "0.6327598", "0.63013786", "0.62906015", "0.6277472", "0.6243543", "0.62246466", "0.6216958", "0.62090784", "0.618...
0.0
-1
DESCR: 3 selects a player's DIV & makes it fade out
playerFadeOut(activePlayerIndex) { $('#player' + activePlayerIndex).fadeTo(400, 0.2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fadeEffect() {\n $(\".selectPlayer\")\n .fadeOut(100)\n .fadeIn(100)\n .fadeOut(100)\n .fadeIn(100);\n}", "playerFadeIn(activePlayerIndex) {\r\n $('#player' + activePlayerIndex).fadeTo(400, 1)\r\n }", "function chooseBox(choice) {\n $('#' + choice).css(\"opacity\", \"0.2\");\n s...
[ "0.81677026", "0.73403835", "0.6596079", "0.64834654", "0.646894", "0.6425329", "0.63864386", "0.63804233", "0.6349138", "0.6303211", "0.6291317", "0.6252915", "0.62082666", "0.6201682", "0.6139475", "0.6127816", "0.61267674", "0.6121613", "0.61141914", "0.60949713", "0.60747...
0.7706213
1
DESCR: 4 selects a player's DIV & makes it fade in
playerFadeIn(activePlayerIndex) { $('#player' + activePlayerIndex).fadeTo(400, 1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fadeEffect() {\n $(\".selectPlayer\")\n .fadeOut(100)\n .fadeIn(100)\n .fadeOut(100)\n .fadeIn(100);\n}", "playerFadeOut(activePlayerIndex) {\r\n $('#player' + activePlayerIndex).fadeTo(400, 0.2)\r\n }", "function fadeIn() {\n\t\t$(\"#ourvideo\").addClass('selected');\n\t\tif (isMute)...
[ "0.79222447", "0.72924757", "0.6756624", "0.6745277", "0.6736587", "0.66899985", "0.6543632", "0.6519749", "0.64498806", "0.64320517", "0.64240026", "0.6409972", "0.63956666", "0.6355013", "0.6350953", "0.62824404", "0.62117237", "0.61743087", "0.61731434", "0.61292434", "0.6...
0.7772317
1
DESCR: 5 selects the dialog box's DIV & makes it fade out
dialogFadeOut() { $('#dialog').fadeOut() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fadeDialog(flag, dialogboxid) \n{\n var dialog = document.getElementById(dialogboxid);\n var value;\n if(flag>0) {\n value = dialog.alpha + DIALOG_SPEED;\n } else {\n value = dialog.alpha - DIALOG_SPEED;\n }\n\n dialog.alpha = value;\n dialog.style.opacity = (value / 100);\n dialog.style.fil...
[ "0.7625275", "0.68935275", "0.67661387", "0.6727024", "0.66458243", "0.66078", "0.6585425", "0.65686166", "0.65340483", "0.6495402", "0.64464843", "0.6396926", "0.6336774", "0.63227373", "0.6319416", "0.6313538", "0.6303251", "0.6302708", "0.6285697", "0.62797815", "0.6279186...
0.7124572
1
Add ShowAgentOffice by UMAR on 05Jul2018
function ShowAgentOffice() { if ($('#Text_OfficeType').val() == "GSA" || $('#Text_OfficeType').val() == "CSA") { $('#tbl tbody tr:eq(15)').show(); $('input[name=AllowCreditLimitOfOffice][value="0"]').prop('checked', true); $('input[name=AllowCreditLimitOnAgent][value="1"]').prop('checked', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addOffice(office){\n\t\t//TODO - no duplicate offices\n\t\t//we must have all three properties\n\t\tif(!office.country || !office.city || !office.address){\n\t\t\tconsole.log(\"bad office\");\n\t\t\treturn false;\n\t\t}\n\n\t\t//send office to the DB\n\t\tconst request = new Request('/new_office',{\n\t\t\tmethod: ...
[ "0.56978047", "0.53964937", "0.5244247", "0.51652324", "0.5160991", "0.51480776", "0.51098573", "0.501694", "0.49766678", "0.49699906", "0.49513677", "0.49398676", "0.49186802", "0.4900331", "0.48984408", "0.4889915", "0.48712015", "0.48639888", "0.48553318", "0.48472303", "0...
0.0
-1
Author : chandra prakash singh Modification Date : 27/12/2016 Description : 1 Added condition that in EDIT MODE officetype drop down change value in self mode can not show self mode that show the first time value of office type dropdown
function changeOfficeType() { $('#Text_ParentID').data("kendoAutoComplete").value(''); //Added by devendra 2may2019 $('#Text_ParentID').data("kendoAutoComplete").key(''); //Added by devendra 2may2019 ShowAgentOffice(); OfficeTypechange(); if (getQueryStringValue("FormAction").toUpperCase() == "EDIT"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crmShowCuVeForEdit( crmData ){\n $( '#billaddr-greetings' ).html( '' );\n $( '#billaddr-greetings' ).append( '<option value=\"\">' + kivi.t8( \"Salutation as below\" ) + '</option>' );\n if( isIterable( crmData.greetings ) ){\n for( let description of crmData.greetings ) $( '#billaddr-gree...
[ "0.65998274", "0.6452075", "0.6340128", "0.62460905", "0.62373227", "0.62313485", "0.62135583", "0.61682284", "0.609741", "0.6076473", "0.6008551", "0.598715", "0.59871215", "0.5953672", "0.5940683", "0.5922836", "0.58970237", "0.58802146", "0.58705795", "0.58547676", "0.5850...
0.67865056
0
added by arman ali Date : 20171004
function setdatevalue() { var date = new Date(); $('[id^="tblOfficeAirlineTrans_ValidTo_"]').each(function () { var rowno = $(this).attr('id').split('_')[2] var minm = $("#" + $(this).attr('id')).val() var validfrom = $("#tblOfficeAirlineTrans_ValidFrom_" + rowno).val() == "" ? date : $(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static private internal function m121() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "transient private internal fun...
[ "0.64556646", "0.6225643", "0.61078054", "0.60635644", "0.59740615", "0.59008336", "0.58966935", "0.5787152", "0.56871927", "0.5672155", "0.56085175", "0.5573548", "0.553251", "0.55313396", "0.55111873", "0.5430864", "0.5421562", "0.53994286", "0.5397982", "0.53889066", "0.53...
0.0
-1
Start Drag ... gateway to making our drag gesture actually work... when the mousedown/touchstart events are overheard / [Something] to call out about the position. Calculating it involves both the current position along with subtracting the values for xOffset and yOffset. Both xOffset and yOffset are initially set to 0...
function dragStart(e) { //setting the initial position of our pointer if (e.type === "touchstart") { // is it a touch event? initialX = e.touches[0].clientX - xOffset; initialY = e.touches[0].clientY - yOffset; } else { // if not... ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dragStart (e) {\n e = e || window.event;\n e.preventDefault();\n posInitial = items.offsetLeft;\n\n if (e.type === 'touchstart') {\n posX1 = e.touches[0].clientX;\n } else {\n posX1 = e.clientX...
[ "0.74298465", "0.7347373", "0.7161297", "0.7136961", "0.7064893", "0.70449007", "0.70059615", "0.69693655", "0.6956643", "0.69361967", "0.68938184", "0.6878052", "0.68502855", "0.6826019", "0.67565554", "0.670769", "0.66916883", "0.6676129", "0.6660756", "0.66563094", "0.6652...
0.755393
0
Drag When the mousemove or touchmove events get fired, drag
function drag(e) { if (active) { //check whether the drag is active //tell the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be (MDN) e.preventDefault(); //set the value of currentX and c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CdkDragMove() {}", "function CdkDragMove() {}", "function Dragging_Move(event)\n{\n\t//has drag data?\n\tif (__DRAG_DATA && __DRAG_DATA.OnMove && __DRAG_DATA.TouchDetail === Browser_GetTouchId(event))\n\t{\n\t\t//call it\n\t\t__DRAG_DATA.OnMove(event);\n\t}\n}", "dragMove(event) {\n\t\tif (!this.isD...
[ "0.76334614", "0.76334614", "0.7580651", "0.7465771", "0.74626946", "0.73751044", "0.73533434", "0.7338356", "0.7338064", "0.7338064", "0.73350483", "0.73350483", "0.7330282", "0.73299515", "0.7308034", "0.7302682", "0.73025376", "0.7297372", "0.72847337", "0.72826505", "0.72...
0.77503663
0
Principle 1 code example for Window Binding
function greetFunction(greet) { console.log(this.greet); return greet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listenWindow() {\n this.initDefaultUI();\n this.initFastClick();\n this.setMoblie();\n }", "function Window() {}", "function windowbinding() {\n console.log(this);\n}", "onOpenedWindow() {\n throw new NotImplementedException();\n }", "function windowBind (param) {\n console.log(this);\n...
[ "0.6708435", "0.6286664", "0.62779236", "0.61939377", "0.61888003", "0.60452956", "0.6039229", "0.6009125", "0.5941998", "0.592551", "0.59144175", "0.58645284", "0.58612055", "0.58260834", "0.5783843", "0.5771466", "0.5730992", "0.57171625", "0.5713832", "0.57082963", "0.5684...
0.0
-1
Principle 3 code example for New Binding
function newCar(model) { this.year = 1975; this.location = 'USA' this.info = function(model) { console.log(this.model +"is from "+this.year); console.log(this); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Component_BindingHandler() {}", "function NewBinding(message, name) {\nthis.name = name;\nthis.message = message;\nthis.say = function(){\n return `${this.name} has a message for you: ${this.message}.`\n}\n}", "function BindFactory(){}", "function moduleBinding(name, bindings){\n this.name =...
[ "0.69899845", "0.6887838", "0.6785255", "0.6202083", "0.6165166", "0.61402607", "0.61162895", "0.6058128", "0.6039367", "0.60357714", "0.59840363", "0.59252936", "0.58935064", "0.58935064", "0.5873889", "0.5873889", "0.58523065", "0.58366257", "0.58196187", "0.5776518", "0.57...
0.0
-1
Principle 4 code example for Explicit Binding
function State(stateattributes){ Country.call(this, stateattributes); //State inherits all the properties from Country this.population = stateattributes.population; this.area = stateattributes.area; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Component_BindingHandler() {}", "function Bind_A_A_A() {\r\n}", "function Bind_A_Oother() {\r\n}", "function Bind_A_Obound() {\r\n}", "function bindable(){\n\t\t\n\t}", "Bind(IDispatch, string, string) {\n\n }", "constructor() { \n autoBind(this); \n }", "function Bind_A_A_R() {\r\n}"...
[ "0.6447483", "0.6242783", "0.61487275", "0.61337143", "0.6118641", "0.6040933", "0.6023827", "0.5958874", "0.5940821", "0.5874887", "0.5873397", "0.58557445", "0.5764696", "0.567705", "0.5673003", "0.5655911", "0.5655911", "0.5655911", "0.5617473", "0.5592617", "0.55375355", ...
0.0
-1
close the connection to the Backend
off() { firebase.database().ref('chatrooms').off(); firebase.database().ref('chatroomPMs').off(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n\t\tthis.connection.close();\n\t}", "close() {\n this.conn.close()\n }", "close() {\n this.connectionManager.close();\n }", "close() {\n this.connectionManager.close();\n }", "dispose() {\n connection.end();\n }", "close()\n {\n //-----------------------------...
[ "0.79468817", "0.78515935", "0.780198", "0.780198", "0.7484853", "0.74719864", "0.7412642", "0.7261167", "0.72576123", "0.7245603", "0.7231685", "0.71693146", "0.716742", "0.708562", "0.7067745", "0.7064487", "0.7047596", "0.70194703", "0.69801325", "0.69764817", "0.69655037"...
0.0
-1
this function updates the database in increasing the reaction type of a message by 1
react(message, reactionType, updatedCount) { const { room, _id } = message const ref = firebase.database().ref('chatrooms').child(room).child(_id) // set number of likes/loves ref.child(reactionType).set({count : updatedCount}) //set users object ref.child(reactionType)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function onReactionChange(message, emoji, userID, add) {\n if (emoji.id) {\n emoji = `${emoji.name}:${emoji.id}`;\n\n if (!message.author) message = await client.bot.getMessage(message.channel.id, message.id);\n message.author.bot = client.bot.users.get(userID).bot;\n messageCr...
[ "0.5727118", "0.56975996", "0.5692194", "0.5623243", "0.5507682", "0.54554117", "0.54478616", "0.5397251", "0.53824973", "0.53366274", "0.5326945", "0.53265476", "0.5279135", "0.5263402", "0.5259638", "0.524914", "0.52470076", "0.5240645", "0.5220481", "0.5215857", "0.5208878...
0.69683284
0
region measure & native method
setNativeProps(nativeProps) { this.root && this.root.setNativeProps(nativeProps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get measure() {\n\t\treturn this.__measure;\n\t}", "get measure () {\n\t\treturn this._measure;\n\t}", "function measure(fn) {\n\t const start = exports.debugNow();\n\t fn();\n\t return exports.debugNow() - start;\n\t}", "totalTime() {\n let time = 0\n this.measures.forEach(m => time +...
[ "0.66541255", "0.6526575", "0.61535305", "0.59008175", "0.58988464", "0.58796614", "0.5852528", "0.5841163", "0.58102286", "0.5798819", "0.5786864", "0.5786864", "0.57786655", "0.57786655", "0.57618946", "0.57532656", "0.57200867", "0.571994", "0.5686001", "0.56723577", "0.56...
0.0
-1
Handles all incoming comunication
function onIncoming (connection) { // Be verbose while debugging debug('Opened for %s', connection._cluster ? 'Hub' : `Worker on Channel ${connection.channel}`) // Return event return (worker, message) => { // Only the hub knows the worker if (message === undefined) { message = worker wor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleBusMessages() {\n const bus = this.runtime.bus();\n\n Object.values(REQUESTS).forEach((msgType) => {\n bus.on(msgType, (msgData) => {\n this.sendCommMessage(msgType, msgData);\n });\n });\n }", "function handleMessage(...
[ "0.7364707", "0.6503059", "0.61433953", "0.60506654", "0.59946513", "0.5986795", "0.58424497", "0.5818796", "0.5810983", "0.5809124", "0.58027333", "0.5790913", "0.5759681", "0.5722326", "0.56861776", "0.5685634", "0.56842095", "0.5682677", "0.56613946", "0.56580013", "0.5655...
0.0
-1
Fires only on request messages
function onRequest (connection, worker, message) { // Create a new request let req = new Request(connection, worker, message) // Set the final handler, hopefully we don't reach it. let done = err => { // set default status code to 500 let status = 500 // Ignore ghost requests (handled requests wit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onBeforeRespond (message)\n {\n }", "respondToMessages() { }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "listenRequests() {\n this.request(event.detail.request);\n }", "onMessage() {}", "onMessage() {}", "l...
[ "0.65952045", "0.65542746", "0.6480997", "0.6480997", "0.6480997", "0.6413904", "0.64032036", "0.64032036", "0.6370847", "0.6369709", "0.63159066", "0.6232464", "0.61806047", "0.6109549", "0.6106397", "0.6104772", "0.6076417", "0.6046535", "0.6022259", "0.60164404", "0.596979...
0.0
-1
Fires only on response messages
function onResponse (connection, message) { let key = message.key // Only the hub routes responses if (message.channel && connection._cluster) { // Get channel from message let channel = message.channel delete message.channel // Get worker (id) for channel let worker = connection._workers[ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onBeforeRespond (message)\n {\n }", "_onResponse(msg) {\n let _this = this;\n\n let event = {\n type: msg.type,\n url: msg.body.source,\n code: msg.body.code\n };\n\n if (_this._onResponseHandler) {\n _this._onResponseHandler(event);\n }\n }", "respondToMessages() { }"...
[ "0.734416", "0.7204882", "0.7140576", "0.70500976", "0.64329165", "0.6341313", "0.63174033", "0.6306564", "0.62960905", "0.62710375", "0.6232224", "0.62283295", "0.6185788", "0.61554813", "0.6096591", "0.6095465", "0.6076271", "0.6076271", "0.6065936", "0.6030871", "0.5984726...
0.0
-1
accept a nested array, return a flattened and sorted array flatten array use built in flatten method (?) sort array use built in sort method (?)
function flatten(arr) { const returnArr = [] for (let i = 0; i < arr.length; i++) { if (Array.isArray(arr[i])) { returnArr.push(...flatten(arr[i])) } else { returnArr.push(arr[i]) } } return returnArr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flattenAndSort(arr) {\n console.log(arr);\n let out = [];\n if (arr.length === 0) return [];\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].length !== 0) out.push(arr[i]);\n }\n return out.length === 0 ? []\n : out.join(',').split(',').map(el => el * 1).sort((a, b) => a-b);\n}", "func...
[ "0.6902033", "0.68001676", "0.6662215", "0.6564301", "0.6503139", "0.64249974", "0.63422185", "0.63233775", "0.6317295", "0.6299839", "0.62421453", "0.6228832", "0.6223221", "0.62193066", "0.61911434", "0.61863786", "0.61860657", "0.6175358", "0.6169698", "0.6166258", "0.6163...
0.6018399
40
Round this value to this many places
function roundTo(value, places) { places = places || 0; var factor = Math.pow(10, places); return Math.round(value * factor) / factor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundme(val) {\n return val;\n }", "round(place = 0) {\r\n const factor = Math.pow(10, place)\r\n return FNumber(Math.round(this.data * factor) / factor)\r\n }", "function myRound(val,places) {\n\tvar c = 1;\n\tfor (var i = 0; i < places; i++)\n\t\tc *= 10;\n\treturn Math.round(val*c)...
[ "0.73796326", "0.7120067", "0.7044028", "0.7034044", "0.68065715", "0.6797394", "0.67893076", "0.6786999", "0.6757557", "0.67288464", "0.6697183", "0.6695291", "0.66894466", "0.6671817", "0.6661739", "0.6661739", "0.6661739", "0.6661739", "0.6627118", "0.66010386", "0.6600269...
0.6802685
5
Round all the values in this object to this many places
function roundResult(result, places) { return _.reduce(result, function(result, value, key) { result[key] = roundTo(value, places); return result; }, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "round() {\n return new Vector(\n Math.round(this.x),\n Math.round(this.y)\n )\n }", "round(place = 0) {\r\n const factor = Math.pow(10, place)\r\n return FNumber(Math.round(this.data * factor) / factor)\r\n }", "function roundme(val) {\n return val;\n }",...
[ "0.6469724", "0.6193248", "0.6017322", "0.5893877", "0.57541686", "0.5741481", "0.5644052", "0.5638217", "0.5630769", "0.56155384", "0.558977", "0.558977", "0.5586691", "0.55307263", "0.55286413", "0.5514296", "0.5463795", "0.54558283", "0.5452303", "0.5451999", "0.5393505", ...
0.57098764
6
Inititializes the pics uploader/post creator.
constructor(){// Firebase SDK this.database=firebase.database();this.auth=firebase.auth();this.storage=firebase.storage();this.addPolyfills();$(document).ready(()=>{// DOM Elements this.addButton=$('#add');this.addButtonFloating=$('#add-floating');this.imageInput=$('#fp-mediacapture');this.overlay=$('.fp-overlay','#pag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n setupThumbnailGallery(0);\n bindEvents();\n }", "function init() {\n log.info(\"[Gallery] Initializing \");\n\n setupNav();\n\n if (todoItem.get('photoCount')) {\n createGallery();\n galleryExists = true;\n }\n}", "function init() {\n\t...
[ "0.6511124", "0.6371601", "0.6120322", "0.5984695", "0.59509736", "0.59489375", "0.5858188", "0.579121", "0.57392406", "0.5733387", "0.57294375", "0.5723142", "0.57165754", "0.5699335", "0.56767774", "0.5673589", "0.56619155", "0.56178075", "0.561686", "0.55412173", "0.553917...
0.0
-1