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
The constructor: This intialises the variables on the state All of these are created in this component The statement "this.myMethod = this.myMethod.bind(this)"" is used so "this" can be accessed within that method
constructor(props) { super(props); this.state = { userFavourites: [], mainMessage: 'Here are your favourite artists!!' } this.getLikedArtists = this.getLikedArtists.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super(); // Gives context for \"this\" within component.\n this.state = { txt: \"Hi There\"};\n this.update = this.update.bind(this);\n }", "constructor(props){\n //Call the constructor of Super class i.e The Component\n super(props);\n //maintain ...
[ "0.7569844", "0.7505765", "0.7426846", "0.74147767", "0.7414556", "0.7402277", "0.7400325", "0.7314283", "0.73096555", "0.73023", "0.7255654", "0.7248451", "0.72370565", "0.7224979", "0.72246903", "0.7219343", "0.72184724", "0.7211505", "0.72112674", "0.7196452", "0.7181644",...
0.0
-1
This is the first method that is accessed after the constructor Calls getLikedArtists
componentDidMount() { this.getLikedArtists() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "allArtists()\n {\n return this.artistas;\n }", "constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n userFavourites: [],\r\n mainMessage: 'Here are your favourite artists!!'\r\n }\r\n\r\n this.getLikedArtists = this.getLikedArtists.bind(this);\r...
[ "0.6596665", "0.6372621", "0.634011", "0.6239626", "0.6211614", "0.61559165", "0.613706", "0.60649276", "0.60348094", "0.597199", "0.5922689", "0.5875722", "0.5872009", "0.5826973", "0.5823363", "0.58232033", "0.57799965", "0.57774836", "0.5734519", "0.57246476", "0.5711832",...
0.74023956
0
This is what the user will see Firstly, they will see either "Here are your favourite artists!!" or "You have not liked any artists. Please like some so you can easily find them here!!" This depends if the user has liked an artist If the user has liked artists, the artists they have liked will appear underneath the mes...
render() { return ( <div> <h2>{this.state.mainMessage}</h2> <ul className="lists"> {this.state.userFavourites.map((userFavourite) => { return <GetFavourite userFavourite={userFavourite} /> })} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static favouriteEntries() {\n const favouriteEntries = DummyDataHelpers.getFavEntries(dummyEntries);\n if (!favouriteEntries || favouriteEntries === undefined) {\n return this.notFound('No Favourites Entries');\n }\n return this.success('Favourite entry fetched successfully', favouriteEntries);\n ...
[ "0.6655809", "0.647046", "0.6457632", "0.6248685", "0.6218591", "0.6169983", "0.61497575", "0.6139675", "0.6099496", "0.6066499", "0.6055088", "0.6016251", "0.60140496", "0.5997012", "0.5967842", "0.59522355", "0.59301597", "0.59292823", "0.59086263", "0.5891499", "0.5891133"...
0.59360766
16
adding new chat documents
async AddChat(message) { //format of a chat object const now = new Date(); const chat = { message, username: this.username, room: this.room, created_at: firebase.firestore.Timestamp.fromDate(now), }; //save chat document const response = await this.chats.add(chat); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendChatMessage(msg) {\n // Add a new document in collection \"chats\"\n }", "async handleChatMessages(docs) {\n //TODO: List of chat messages, save into local db\n }", "createChat(messageData, isFirst, chatId = null) {\n if (!this.auth.currentUser) {\n return;\n }\n\n if (isFirst) {\n ...
[ "0.748751", "0.718422", "0.65885115", "0.6513257", "0.6494795", "0.6450997", "0.6306355", "0.6299171", "0.62701595", "0.6246747", "0.61874145", "0.61621577", "0.6153993", "0.61270934", "0.61194956", "0.6089136", "0.6079589", "0.6073665", "0.6053331", "0.60482156", "0.6040365"...
0.6645986
2
setting up a realtime listener to get new chats
getChats(callback) { this.unsub = this.chats .where("room", "==", this.room) .orderBy("created_at") .onSnapshot((snap) => { snap.docChanges().forEach((change) => { if (change.type === "added") { //update the ui callback(change.doc.data()); } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startListening() {\n // If this object doesn't have a uid it could potentially create problematic queries, so return.\n if (this.uid === undefined) return;\n // Get a reference to where the messages are stored.\n const ref = Fetch.getMessagesReference(this.uid).child(\"messages\");\n // Add a handle...
[ "0.66969955", "0.66045547", "0.6542562", "0.65283865", "0.6510654", "0.6476027", "0.6405096", "0.64038694", "0.63558686", "0.6308676", "0.62091076", "0.6199806", "0.619812", "0.61806303", "0.6157466", "0.614791", "0.6143197", "0.6141501", "0.61381984", "0.61323875", "0.613119...
0.59873754
36
core/isset.jsx Test if a variable exist
function isset(variable) { return typeof variable !== "undefined"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exists(variable) {\n\treturn typeof(variable)!=\"undefined\";\n}", "function isset(varname){\r\n return (typeof(varname)!='undefined');\r\n}", "function isset(varname){\r\n return (typeof(varname)!='undefined');\r\n}", "function isset(aVar)\r\n{\r\n\treturn (typeof aVar == \"undefined\")?false:tru...
[ "0.7801349", "0.75251985", "0.75251985", "0.7425028", "0.7369114", "0.72951084", "0.7194786", "0.718049", "0.7006585", "0.6927438", "0.68793285", "0.6746337", "0.663894", "0.6632782", "0.6632654", "0.6632654", "0.6632654", "0.6586974", "0.65640956", "0.6558246", "0.649564", ...
0.7596415
1
core/on.jsx Add event to element
function on(element, event, fn) { if (!(typeof element.nodeName === "string" || element === window || element === document) || typeof event !== "string" || typeof fn !== "function") { console.error("Invalid arguments `on`", { element: element, event: event, fn: fn }); return; } var that = { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEvent() {\n \n }", "on ( event, handler ) {\n\n this.addEventListener\n (event, this.renderable (handler))\n }", "onEvent() {\n const elements = document.querySelectorAll(\"[on]\");\n for (let i = 0; i < elements.length; i++) {\n const attr = elements[i].getAttribute(\"on\"...
[ "0.7013135", "0.6749138", "0.6676377", "0.6667078", "0.66297656", "0.66119474", "0.6510381", "0.6488747", "0.6483695", "0.6423362", "0.64166397", "0.6354333", "0.6303459", "0.6291204", "0.6283404", "0.62613076", "0.6255078", "0.6222191", "0.62088823", "0.6163561", "0.613959",...
0.0
-1
Fermat.js | Combinatorics (c) Mathigon ============================================================================
function facRec(x, acc) { if (x <= 1) return x; return x * facRec(x - 1, acc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MultiFlattener() {}", "function factorChain(arr) {\n\t\n}", "function Ff(a,b,c,d,f,g){qf.call(this,f,g);this.Mj=a;this.Qg=[];this.pj=!!b;this.Nl=!!c;this.ql=!!d;for(b=0;b<a.length;b++)vf(a[b],B(this.xj,this,b,j),B(this.xj,this,b,n));0==a.length&&!this.pj&&this.A(this.Qg)}", "function rF(a,b){this.C=...
[ "0.6105335", "0.6040351", "0.5848815", "0.57835436", "0.5722782", "0.5717555", "0.56860507", "0.5630546", "0.56249446", "0.5552962", "0.5504723", "0.5466926", "0.5450286", "0.54143405", "0.539654", "0.5383772", "0.53692013", "0.53327584", "0.52985775", "0.5265976", "0.5260243...
0.0
-1
Check if all params are provide by the request
function checkBodyParams(body){ if(typeof body.id !== 'string' || body.id.trim() === ''){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkParams(cb) {\n if (Array.isArray(request.params)) {\n\t //since were limiting to two request we're only taking first two items from params array\n makeRequests(request.params.slice(0, 2));\n } else {\n if (typeof request.params === 'string') {\n makeSingleRequest(r...
[ "0.73673695", "0.7346018", "0.7332901", "0.6971678", "0.6886377", "0.685838", "0.6850995", "0.67559993", "0.659358", "0.65833455", "0.65586394", "0.6508177", "0.64565694", "0.64467174", "0.6410683", "0.64057636", "0.63726836", "0.6261523", "0.6199517", "0.61639315", "0.613912...
0.614798
20
with the word, with a space ie: "Hello " should return the new string.
function hello(name) { // ADD YOUR CODE HERE return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeSpaces(word){\n var newString = word.split(' ').join('_');\n return newString;\n}", "function newWord(word) {\n mysteryWord = new Word(word);\n mysteryWord.guess(\" \");\n goalWord = word;\n goalWord = goalWord\n .split(\"\")\n .join(\" \")\n .concat(\" \");\n}", "function cle...
[ "0.7573603", "0.7004881", "0.68589985", "0.68386406", "0.6820858", "0.68006915", "0.67586195", "0.6739029", "0.66768897", "0.6640491", "0.6619145", "0.66180646", "0.65817547", "0.65494967", "0.65352625", "0.6512171", "0.6511413", "0.6494794", "0.64666873", "0.644678", "0.6418...
0.0
-1
Generate random number to choose secretPhrase from secretArray
function randomSelection() { secretPhrase = secretArray[Math.floor(Math.random() * secretArray.length)]; console.log(secretPhrase) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRandomPhrase() {\n let phraseArray = this.phrases;\n let randomPhrase = phraseArray[Math.floor(Math.random() * phraseArray.length)];\n return randomPhrase;\n }", "getRandomPhrase() {\n const randNum = Math.floor(Math.random() * Math.floor(5));\n const randomPhrase = this.phrases[randNum];\n ...
[ "0.7589087", "0.7543356", "0.7531092", "0.7530534", "0.74668854", "0.7443868", "0.740504", "0.7383348", "0.7383348", "0.7383348", "0.73623186", "0.73364866", "0.73262364", "0.72882", "0.7250857", "0.72351843", "0.72256446", "0.7212859", "0.7212753", "0.7179502", "0.7162596", ...
0.8216721
0
Create an array of letters in the secret phrase and a corresponding array for the blamk spaces
function createArrays() { phraseArray = []; blankArray = []; phraseArray = secretPhrase.split(""); phraseArray.forEach( () => blankArray.push("_")); spanSecretRandom.innerHTML = blankArray.join(" "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeWordIntoArray() {\n for (var i=0, j=0; i<wordToGuess.length; i++) {\n printWord[j] = wordToGuess.charAt(i);\n j++\n if (wordToGuess.charAt(i) != \" \") {\n printWord[j] = false;\n } else {\n printWord[j] = true;\n }\n j++\n }\n}", "function spinWords() {\n let inpu...
[ "0.68636537", "0.6632841", "0.6619199", "0.65505743", "0.6413714", "0.6404137", "0.6360585", "0.6349498", "0.6343994", "0.63207686", "0.6291688", "0.6283066", "0.62756443", "0.62407106", "0.61819917", "0.61790496", "0.61242086", "0.61217153", "0.6118172", "0.6118172", "0.6116...
0.73207
0
New Game function to start the play
function newGame() { randomSelection(); createArrays(); phraseArray.forEach( letter => letter === " "? ( blankArray.indexOf(letter) = "&nbsp;", spanSecretRandom.innerHTML = blankArray.join(" ") ) : ""); numGuesses = 10; lettersGuessed = []; spanLettersGuessed.innerHTML = lettersGuessed...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function startGame () {\n\tplay = true;\n\n}", "function playGame() {\n}", "function startGame() {\n init();\n}", "function startGame(){\n initialiseGame();\n}", "function start()\r\n{\r\ninit();\r\ngame.start();\r\n}", "function playGame(){\n createTimer();\n ju...
[ "0.8631924", "0.82945365", "0.8136466", "0.8101197", "0.7956163", "0.78526753", "0.7793306", "0.77449834", "0.7711152", "0.76935506", "0.76791996", "0.7671446", "0.7632936", "0.76180893", "0.7599155", "0.75873595", "0.75822", "0.7551368", "0.75429505", "0.75401133", "0.753773...
0.0
-1
Function called when user runs put of guesses
function gameOver() { losses++; spanLosses.innerHTML = losses; changeGameStatus.innerHTML = "THE SECRET PHRASE WAS " + secretPhrase + "."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function whenUserGuesses () {\n if (currentWord.alreadyPressedLetters.includes(userKey) && userWon === false && userLost === false) {\n $(\".already-pressed\").empty().append('You already guessed \"' + userKey + '\"').fadeIn(\"slow\").fadeOut(\"slow\");\n } else if (keyCode > 64 && keyCode < 91 && rem...
[ "0.73338115", "0.7138191", "0.71143436", "0.70880955", "0.70387185", "0.7001381", "0.6986467", "0.6978743", "0.69514924", "0.69358706", "0.69298005", "0.6926348", "0.6922047", "0.692035", "0.6918991", "0.69032687", "0.6873585", "0.6853491", "0.68422425", "0.68375117", "0.6837...
0.0
-1
function called when the user guesses the correct answer
function youWin() { wins++; spanWins.innerHTML = wins; changeGameStatus.innerHTML = "YOU WIN"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuess(){\r\n guesstext=guesstext.toUpperCase();//country array is in upper case, so change guess to uppercase\r\n if(guesstext==answer){//if the guess was correct\r\n answer=pickAnswer();//find a new answer\r\n chances=3; score+=10; guess.value=\"\";//reset chances...
[ "0.8039052", "0.75847113", "0.7580991", "0.7576875", "0.75102377", "0.7476938", "0.74388784", "0.73239315", "0.72534984", "0.7153973", "0.7150833", "0.71440154", "0.71388036", "0.7094767", "0.70900226", "0.7085364", "0.7080266", "0.70765024", "0.7076039", "0.7069489", "0.7049...
0.0
-1
function to check the letters guessed
function checkLetter() { if (validKeys.indexOf(currentGuess) > -1) { if ((secretPhrase.indexOf(currentGuess) > -1)) { for (var i = 0; i < secretPhrase.length; i++) { if (phraseArray[i] === currentGuess) { blankArray[i] = currentGuess; spanS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuess() {\n // Collect the text from the letters and the guess\n var letters = getLetters();\n var guess = getGuess();\n\n // Convert both to uppercase so we can compare equals\n guess = guess.toUpperCase();\n letters = letters.toUpperCase();\n\n // Determine if all the characters in the guess...
[ "0.8135706", "0.8118836", "0.79873943", "0.7975569", "0.7948541", "0.78946304", "0.7868224", "0.7825601", "0.7769816", "0.77274567", "0.7727414", "0.7713249", "0.77112675", "0.7702385", "0.76327074", "0.7624999", "0.76130295", "0.75973433", "0.75927424", "0.7591396", "0.75913...
0.76873755
14
function to check if all entries are present
CheckEntries(DeleteAll){ let correct = []; //iterate through all indexes of input fields for (let index = 1; index < 8; index++){ //fetch value of html input field let str = "input".concat(index.toString()); let value = document.getE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GotEverything() {\n return entryInfo.entries.length >= entryInfo.totalCount;\n }", "function allDefined(array){\n\t if (array == undefined){\n\t\treturn false;\n\t } else {\n\t\tfor (var key in array){\n\t\t if (array[key]==undefined){\n\t\t\treturn false;\n\t\t }\n\t\t}\n\t\tret...
[ "0.72302717", "0.6633731", "0.6464067", "0.64352", "0.64352", "0.63532084", "0.63046074", "0.62865406", "0.62639517", "0.62066156", "0.61919206", "0.6188319", "0.61664736", "0.6163344", "0.6148638", "0.6148638", "0.6147245", "0.6116702", "0.6112282", "0.6110017", "0.6108474",...
0.5832041
58
used in conjunction with CheckEntries to move user to different page on success
registerSubmit(DeleteAll) { if (this.CheckEntries(DeleteAll)) { this.props.history.push('/'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotFileEntry(fileEntry) \n \t{\n\t\twindow.location.href=strNextPage;\n \t}", "function proceed () {\n\t\t/*\n\t\t\tIf the user has been loaded determine where we should\n\t\t\tsend the user.\n\t\t*/\n if ( store.getters.getUserLoadStatus() == 2 ) {\n\t\t\t/*\n\t\t\t\tIf the user is not empty, ...
[ "0.63963836", "0.62973005", "0.6274337", "0.62143886", "0.62131965", "0.61459744", "0.6123593", "0.6090828", "0.6083119", "0.60721916", "0.59553236", "0.5950696", "0.5946882", "0.58825785", "0.5878728", "0.58753204", "0.58714134", "0.5867188", "0.5855003", "0.5855003", "0.583...
0.0
-1
make an update function
function update(data) { // data join var text = svg.selectAll(text).data(data); //update text.attr("class", "update"); //enter text.enter().append("text") .attr("class", "enter") .attr("x", function(d, i) { return i * 32 }) // cuz it's a monospaced font .attr("dy", ".35em"); //enter ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update(){}", "update(){}", "update(){}", "function update()\n{\n\n}", "update () {}", "_update() {\n }", "function update...
[ "0.8741249", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.80270535", "0.798089", "0.798089", "0.798089", "0.796349", "0.78856176", "0.7855773", "0.78332317", "0.7814154", "0.7681042", "0.76276004", "0.75466...
0.0
-1
Copied from reactrouter Link.js.
function isLeftClickEvent(ev) { return ev.button === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RouterLink(props) {\r\n const { color, underline, onClick, to } = props;\r\n return (\r\n <Link\r\n component={LinkBase}\r\n color={color}\r\n underline={underline}\r\n onClick={onClick ? () => onClick() : undefined }\r\n to={to}\r\n ...
[ "0.73602074", "0.71727175", "0.715508", "0.7025887", "0.6844194", "0.67589194", "0.6625388", "0.6553396", "0.6503237", "0.64677846", "0.6458905", "0.64511955", "0.64511895", "0.6424553", "0.6418622", "0.63389546", "0.6330159", "0.6268976", "0.62489533", "0.6239696", "0.621706...
0.0
-1
Return a shallow copy of the given object;
function shallowCopy(obj) { if (!obj) { return (obj); } var copy = {}; Object.keys(obj).forEach(function (k) { copy[k] = obj[k]; }); return (copy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copy(obj) {\n return JSON.parse(JSON.stringify(obj)); // deep copy but not methods, and not some other data structures\n}", "function shallowClone (obj) {\n\t var target = {};\n\t for (var i in obj) {\n\t if (obj.hasOwnProperty(i)) {\n\t target[i] = obj[i];\n\t }\n\t }\n\t return targe...
[ "0.79241925", "0.78797483", "0.78713155", "0.7846327", "0.78435516", "0.78414464", "0.7829258", "0.781079", "0.7795678", "0.7740802", "0.77201015", "0.77043784", "0.77043784", "0.7678069", "0.7665724", "0.7664779", "0.7557914", "0.7516532", "0.7516523", "0.75077045", "0.75051...
0.79636395
0
Return an array of lines wrapping the given text to the given width. This splits on whitespace. Single tokens longer than `width` are not broken up.
function textwrap(s, width) { var words = s.trim().split(/\s+/); var lines = []; var line = ''; words.forEach(function (w) { var newLength = line.length + w.length; if (line.length > 0) newLength += 1; if (newLength > width) { lines.push(line); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lineToRows(text, width) {\n const rows = [];\n let row = [];\n let wordsCount = 0;\n text.split(' ').forEach((word) => {\n if (wordsCount + (word.length + 1) > width) {\n /**\n * Push the number of whitespace left after the existing current\n * and the...
[ "0.72237945", "0.7073285", "0.64690197", "0.646415", "0.64319134", "0.6417196", "0.6412862", "0.6392131", "0.6390183", "0.6390183", "0.6387785", "0.63859713", "0.63850564", "0.6373318", "0.6368588", "0.63598895", "0.6345735", "0.63372654", "0.6310708", "0.63042337", "0.62971"...
0.71693045
1
Transform an option name to a "key" that is used as the field on the `opts` object returned from `.parse()`. Transformations: '' > '_': This allow one to use hyphen in option names (common) but not have to do silly things like `opt["dryrun"]` to access the parsed results.
function optionKeyFromName(name) { return name.replace(/-/g, '_'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getPropKey(propShortName) {\n const propFullName = `${propShortName}Prop`;\n\n if (this.opts[propFullName]) {\n return this.opts[propFullName];\n }\n else if (this.opts[propShortName]) {\n const propIndex = propShortName.indexOf('Prop');\n\n if (propIndex > -1) {\n const expected ...
[ "0.56654", "0.5516791", "0.5502642", "0.5491929", "0.5487417", "0.5423317", "0.52440387", "0.52440387", "0.5203411", "0.5156105", "0.51511633", "0.5081739", "0.50373185", "0.5032475", "0.50065315", "0.50065315", "0.49990207", "0.49921966", "0.4952646", "0.4950577", "0.4937198...
0.76551807
0
Supported date args: epoch second times (e.g. 1396031701) ISO 8601 format: YYYYMMDD[THH:MM:SS[.sss][Z]] 20140328T18:35:01.489Z 20140328T18:35:01.489 20140328T18:35:01Z 20140328T18:35:01 20140328
function parseDate(option, optstr, arg) { assert.string(arg, 'arg'); var date; if (/^\d+$/.test(arg)) { // epoch seconds date = new Date(Number(arg) * 1000); /* JSSTYLED */ } else if (/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z?)?$/i.test(arg)) { // ISO 8601 format ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseEpochTime(date) {\n\n let dateUnixTime = date.getTime()\n\n return {unixtime: dateUnixTime}\n}", "function convertDate(date){\n var epochDate = new Date(date);\n epochDate = epochDate.getTime()/1000;\n console.log(epochDate);\n return epochDate;\n}", "function getEpochDate(date){\n\n\tv...
[ "0.6144866", "0.60241747", "0.58601993", "0.58486915", "0.58163446", "0.5800538", "0.57940227", "0.5789242", "0.57817", "0.57754266", "0.5757467", "0.5754947", "0.57330537", "0.5679339", "0.5627147", "0.56130373", "0.5584988", "0.5573797", "0.55665946", "0.55635864", "0.55627...
0.0
-1
Initializes the fields of this object. This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mixins). Only for internal use.
static initialize(obj, email) { obj['email'] = email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "init() {\n this._super(...arguments);\n this._applyDefaults();\n }", "_init() {\n\t\tthis.life.init();\n\t\tthis.render.init();\n\n\t\tthis.emission.init();\n\t\tthis.trail.init(this.node);\n\n\t\tthis.color.init();\n\t}", "function Co...
[ "0.71317005", "0.6963911", "0.6814486", "0.6745524", "0.6716059", "0.66431403", "0.66351634", "0.6602826", "0.6580728", "0.6564862", "0.6410092", "0.6405785", "0.6335295", "0.6305965", "0.6297969", "0.6282496", "0.62683356", "0.62403655", "0.6238391", "0.62358636", "0.6234938...
0.0
-1
Turns the (possibly) relative path passed into the constructor into an absolute path
_parseConfigDir() { // We will be cautious and won't auto-make any directories other than ~/.wafflebot. // TODO: Possibly change this behaviour if (!this._configDir) { this.resolvedConfigDirectory = this.path.join(this.os.homedir(), '.wafflebot'); this.canCreateDir = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(path: string) {\n this.path = path;\n this.absolutePath = null;\n }", "constructor( aPath ) {\n this.fullpath = aPath;\n }", "resolveAsPath() { }", "formAbsolutePath (filename) {\n if (path.isAbsolute(filename)) {\n return filename\n }\n\n return path.join(process.cwd(), ...
[ "0.73089397", "0.709536", "0.6798457", "0.67380714", "0.66806304", "0.66759974", "0.65964687", "0.6510398", "0.6506779", "0.6428193", "0.63531286", "0.63196015", "0.62563986", "0.617621", "0.6128416", "0.6121982", "0.61160886", "0.605096", "0.6043521", "0.60395557", "0.603323...
0.0
-1
add space to textbox's content
function qwerty_addSpaceText() { qwerty_appendText(" "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSpaceText() {\n\tappendText(\" \");\n}", "function getInputValue(){\n var str=document.getElementById('textField').value;\n replaceSpaces(str);\n }", "function addTextToField(elem, text) {\r\n if (elem.selectionStart || elem.selectionStart === 0) {\r\n var startPo...
[ "0.72706205", "0.6742249", "0.6722462", "0.6679268", "0.6539835", "0.650297", "0.64210546", "0.6347758", "0.6337162", "0.6261944", "0.6179713", "0.6176185", "0.6155582", "0.61534685", "0.6145042", "0.6051059", "0.60494137", "0.6045527", "0.60426", "0.60345596", "0.5999078", ...
0.66622835
6
pre processing define when key pressed (for combination charset ex> hangle)
function setNewMode(nMode) { //do nothing }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processKeyPress(keycode) {\n if (keycode === 65) {\n playNote('a')\n }\n if (keycode === 83) {\n playNote('c')\n }\n if (keycode === 68) {\n playNote('d')\n }\n if (keycode === 70) {\n playNote('f')\n }\n}", "function rxKeyCode(keypressText) {//accumul...
[ "0.7104299", "0.70630854", "0.7058835", "0.69393295", "0.68989825", "0.6894426", "0.6893266", "0.6890073", "0.68735707", "0.6867727", "0.6867422", "0.68613243", "0.684504", "0.68450314", "0.68370473", "0.68095607", "0.6797129", "0.67904717", "0.678249", "0.6771453", "0.676604...
0.0
-1
create add text box
function addTextBox(){ textBoxCount++; var createHtml = ''; createHtml = '<span id="textBoxRemove'+textBoxCount+'"><div class="form-group">'; createHtml += '<label class="control-label col-sm-2" for="pwd">Question Option:</label>'; createHtml += '<div class="col-sm-10">'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTxtInput(itemNo) { \n\t\tvar txtIn = document.createElement(\"input\"); \t\t\t\t\t// create input element\n\t\t//delBut.name = \"TxtIn\" + itemNo;;\n\t\ttxtIn.type = \"text\";\t\t\t\t\t\t\t\t\t\t\t// of text type\n\t\ttxtIn.size = \"32\";\n\t\t//txtIn.className = \"css-class-name\";\t\t\t\t\t\t\t// set...
[ "0.75573725", "0.738642", "0.7361065", "0.71910626", "0.71899533", "0.70962715", "0.7083783", "0.7020845", "0.6928129", "0.6909309", "0.68766326", "0.68514884", "0.6845516", "0.6827922", "0.6821179", "0.67870384", "0.6756843", "0.6751103", "0.6737398", "0.6698394", "0.6698172...
0.7078904
7
validate input box value
function validateForm(){ var title = $('input[name="title"]').val(); var media = $("input[name='mediaType']:checked").val(); var checkAnswer = $("input[name='answerSheet']").val(); var answerQuestion = 1; if(title.length == 0){ $('input[name="title"]').css('border','solid 1px red'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateInput(input){\n if(input == \"\" || input == undefined){\n message(\"Lén verður að vera strengur\");\n return false;\n }\n return true;\n }", "function isinputvalid() {\r\n let inputstr = field.value;\r\n let patt = /^[0-9]{1,3}$/g; //1-999\r\n let cond = p...
[ "0.7363946", "0.73402816", "0.71816003", "0.71807337", "0.71729076", "0.7113976", "0.70318663", "0.69806427", "0.69616807", "0.69560975", "0.6955811", "0.6932929", "0.69234943", "0.6920651", "0.69089407", "0.67875636", "0.6765513", "0.67461604", "0.6730677", "0.6728998", "0.6...
0.0
-1
GAME HELPER FUNCTIONS Find player by ID
function playerById(id) { var i; for (i = 0; i < remotePlayers.length; i++) { if (remotePlayers[i].id == id) return remotePlayers[i]; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_playerid(id) {\r\n\r\n\tfor (var i = 0; i < player_lst.length; i++) {\r\n\r\n\t\tif (player_lst[i].id == id) {\r\n\t\t\treturn player_lst[i]; \r\n\t\t}\r\n\t}\r\n\tthrow \"Player not found\"\r\n}", "function findPlayer(id) {\n var player;\n var result = $.grep(players, function(item) ...
[ "0.8289752", "0.8114411", "0.7943789", "0.7942979", "0.79045373", "0.7898524", "0.7864159", "0.780959", "0.7757876", "0.7757876", "0.77558273", "0.77195555", "0.7709368", "0.76937103", "0.76937103", "0.768626", "0.7654398", "0.7639426", "0.7624789", "0.7596084", "0.7593688", ...
0.7691814
15
Takes array of tuples where tuple[0] is route name and [1] is the count of ticks
function addMostTickedAtThisGrade(mostTickedRoutesArray){ mostTickedRoutesArray.forEach(function(item,index){ appendMostTickedElements(item) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumberOfArrayUrlSegments(routesArray) {\n return routesArray.reduce((accNumSegments, currentRoute) => {\n // array members can be a RegEx -> convert them toString\n return accNumSegments + getNumberOfUrlSegments(currentRoute.toString());\n }, 0);\n }", "function getNumberOfArrayUrlSe...
[ "0.52598876", "0.5249006", "0.5182963", "0.5166878", "0.5109346", "0.5095357", "0.5032222", "0.5016203", "0.49620923", "0.49618453", "0.49000996", "0.4881334", "0.48607856", "0.4857868", "0.48104477", "0.48053148", "0.4796253", "0.4761565", "0.47553077", "0.4748357", "0.47457...
0.4836404
14
a data frame is an array of objects where all objects have the same keys
function isDataFrame(arr) { var first_keys = _.keys(arr[0]); if (first_keys.length > 0) { //check if same keys all the way through for (var i=0; i<arr.length; i++) { var ith_keys = _.keys(arr[i]); for (var j=0; j<arr.length; j++) { if (ith_keys[j] != first_keys[j]) { return fal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async table2list(cols, new_key_1, new_key_2, df = this.df) {\n var res = []\n df.forEach(row => {\n for (const [key, value] of Object.entries(row)) {\n if (!cols.includes(key)) {\n var temp = {}\n cols.forEach(c => temp[c] = row[c])\n ...
[ "0.58772147", "0.5875757", "0.5823267", "0.5607381", "0.5498761", "0.54668415", "0.5447543", "0.5412873", "0.5411363", "0.5396033", "0.5372984", "0.53387874", "0.5320728", "0.53194326", "0.53093237", "0.5299035", "0.5268546", "0.52269846", "0.52261746", "0.52175206", "0.51387...
0.53355783
12
are all the items in the support numbers?
function isNumericErpObject(x) { var keys = Object.keys(x); for (var i=0; i<keys.length; i++) { var key = keys[i]; var erp = x[key] if (isErpWithSupport(erp)) { var labels = erp.support(); if (!isNumeric(labels)) { return false; }; } else { return false; } } r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function couldDigitize() {\n return getDigitizeUses() < getMaximumDigitizeUses();\n}", "function canDigitize() {\n return couldDigitize() && getSkills().includes(Skills.Digitize);\n}", "function numbers (a) {\n\t return low.isArray(a) && a.every(low.number)\n\t}", "support(version = 1) {\n return e...
[ "0.642995", "0.6045021", "0.59041333", "0.5903689", "0.5812289", "0.57703", "0.57456356", "0.5624758", "0.56085664", "0.56049436", "0.5589355", "0.5543575", "0.5505072", "0.5498949", "0.5469273", "0.5465358", "0.546343", "0.54534286", "0.54429924", "0.5427843", "0.5420742", ...
0.531624
32
shows all 1d marginals and pairwise plots
function plotMarginals(labels, counts, resultDivSelector) { var categories = Object.keys(labels[0]); var result_div = d3.select(resultDivSelector); for (var i=0; i<categories.length; i++) { //marginals var category = categories[i]; var category_data = make_data(labels, counts); var values = _.un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plotAll() {\n d3.select(\"#scatter-macro-1 svg\").remove()\n d3.select(\"#scatter-macro-2 svg\").remove()\n d3.select(\"#scatter-micro-1 svg\").remove()\n d3.select(\"#scatter-micro-2 svg\").remove()\n doPlot(\"scatter-macro-1\", voltageArr, \"Voltage\", maxLinearVelocityArr, \"Max. Linear Velocity\"...
[ "0.56907946", "0.55425245", "0.53106654", "0.5264864", "0.5180758", "0.5119931", "0.50958735", "0.50872606", "0.50747114", "0.5072998", "0.5056941", "0.504958", "0.5043464", "0.50344753", "0.50300974", "0.5015125", "0.50113994", "0.49920547", "0.49891016", "0.4987028", "0.497...
0.64917433
0
no source() so webpack doesn't do add stuff to the bundle
size(){return this.content.length;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "chainWebpack(chain) {}", "function bundle() {\n stream.push(watcher.bundle())\n if (fs.once) {\n stream.push(null)\n }\n }", "function AssetsFilterWebpackPlugin() {}", "_addHMRClientCode(data) {\n// If we have it, grab supporting code...\n let prependage = fs.readFileSync('./lib/hmr/clientS...
[ "0.5824192", "0.57694894", "0.57523245", "0.56711674", "0.5613718", "0.55871093", "0.5514595", "0.5501353", "0.54861474", "0.5467306", "0.5465818", "0.54534686", "0.54140663", "0.5408014", "0.5398162", "0.53931034", "0.5370679", "0.5355215", "0.5352125", "0.5351554", "0.53487...
0.0
-1
I am a comment! I don't actually do much. But I can tell you what's going on! This is a 'function' It is a piece of code that runs when you call it (playGame()) We put things in functions when we might want to use them multiple times
function playGame(){ //Confirm is a box that displays "Cancel" or "Ok" //If the user enters "OK" it will return true, if they press "Cancel" it will return false var enter = confirm("You are outside a forest cabin. Press OK to enter."); //If the User presses "OK" and wants to play the game if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playGame() {\n}", "function startGame() { }", "function playGame(game) {\n console.log(\"Let's play \" + game + \" !\"); \n}", "function gameCheck(){\n\n}", "function playGame(){\r\n //set game to runnning and not paused\r\n gameRunning = true;\r\n gamePaused = false;\r\n hideMenuTab...
[ "0.8493262", "0.76545024", "0.7446018", "0.7412914", "0.7405198", "0.74003184", "0.73741287", "0.734987", "0.73411065", "0.7332196", "0.72767353", "0.7273073", "0.72350365", "0.7232611", "0.71663564", "0.71086675", "0.71082246", "0.7091831", "0.70736605", "0.70674944", "0.706...
0.0
-1
1. setup, unsetup functions. / setup: void Initialize actor wrapper
function setup( settings ){ // Initializes subplanes and actors. subplanes = new Array(); wrap_plane = new Clutter.Group(); wrap_plane_clone = new Clutter.Clone( {source:wrap_plane } ); // locate background and overview actor in UI hierarchy. background_plane = global.background_actor; overview_plane = Main....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setup () {\n }", "initializing () {\n require('./actions/init')(this)\n }", "setup() {}", "setup() {}", "setup() {}", "_setup() {\n this._controller.setup();\n }", "_setup() {\n this.wrapper = this._setupWrapper();\n this.canvas = this._setupCanvas();\n this.contex...
[ "0.6566531", "0.65177655", "0.65115136", "0.65115136", "0.65115136", "0.64890546", "0.64873564", "0.6416533", "0.6322004", "0.6286061", "0.62723696", "0.62585086", "0.6249667", "0.6222589", "0.6218144", "0.62026966", "0.61640555", "0.61621624", "0.6156983", "0.61552525", "0.6...
0.0
-1
2. Public functions to add or remove actor to wrap. / add_actor: void Adds actor to wrap. Added actor will be resized according to screen size, count of workspaces. actor: Clutter.Actor:Actor to be managed.
function add_actor( actor ){ wrap_plane.add_actor( actor ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_actor( actor ){\n\twrap_plane.remove_actor( actor );\n}", "function drawActors(actors){\n return elt('div',{},...actors.map((actor)=>{\n let rect = elt('div',{class:`actor ${actor.type}`});\n rect.style.height = `${actor.size.y*scale}px`\n rect.style.width = `$...
[ "0.5567224", "0.55541843", "0.54697263", "0.54112154", "0.505156", "0.4928749", "0.49143597", "0.48768112", "0.4818768", "0.46692696", "0.46060413", "0.45977655", "0.45927206", "0.45795995", "0.45472026", "0.4492298", "0.44846627", "0.44808328", "0.4450603", "0.44297335", "0....
0.6773751
0
remove_actor: void Removes actor being wrapped. actor: Clutter.Actor:Actor to be removed.
function remove_actor( actor ){ wrap_plane.remove_actor( actor ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_actor( actor ){\n\twrap_plane.add_actor( actor );\n}", "function remove_plane( plane ){\n\tsubplanes.pop( plane );\n\twrap_plane.remove_actor( plane.actor );\n}", "actor(newActor) {\n if (newActor) {\n this._actor = newActor;\n return this;\n }\n return this._actor;\n }", "_r...
[ "0.5696051", "0.5421322", "0.5392166", "0.5328029", "0.5223663", "0.52086556", "0.5206696", "0.5176346", "0.51187134", "0.50988203", "0.50600857", "0.5017125", "0.49025792", "0.48665988", "0.47968155", "0.47774807", "0.47548038", "0.47204635", "0.47091147", "0.46834093", "0.4...
0.799659
0
add_plane: void Adds plane to wrap. plane: PelletPlane:Plane to be managed.
function add_plane( plane ){ subplanes.push( plane ); wrap_plane.add_actor( plane.actor ); plane.set_size( plane_width, plane_height ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPlane(plane) {\n if(plane.type === \"PingPongPlane\") {\n this.stacks.pingPong.push(plane);\n }\n else if(plane.target) {\n this.addToRenderTargetsStack(plane);\n }\n else {\n if(plane._transparent) {\n // rebuild a stack of all ...
[ "0.76341707", "0.74438256", "0.66333336", "0.6465057", "0.6419589", "0.641548", "0.63797903", "0.62299603", "0.6211658", "0.6178474", "0.61637306", "0.60331434", "0.60110825", "0.59866416", "0.5911256", "0.5860877", "0.5829085", "0.5797217", "0.5719274", "0.56715125", "0.5648...
0.8337055
0
remove_plane: void Removes plane to wrap. plane: PelletPlane: Plane to be removed.
function remove_plane( plane ){ subplanes.pop( plane ); wrap_plane.remove_actor( plane.actor ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removePlane(plane) {\n this.resetPlaneStacks();\n }", "removePlane(plane) {\n if(plane.type === \"PingPongPlane\") {\n this.stacks.pingPong = this.stacks.pingPong.filter(el => el.uuid !== plane.uuid);\n }\n else if(plane.target) {\n this.stacks.renderTargets =...
[ "0.82298595", "0.76380014", "0.744926", "0.73891443", "0.7078366", "0.6416083", "0.63723505", "0.60376495", "0.59474045", "0.5705729", "0.5692731", "0.5620018", "0.5480937", "0.54689604", "0.543776", "0.54216415", "0.53758526", "0.53314865", "0.5247668", "0.5209648", "0.51854...
0.84941286
0
pause: void Pauses all animation of subplanes.
function pause(){ for( let i = 0; i < subplanes.length ; i++ ){ subplanes[i].pause(); } paused = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resume(){\n\tfor( let i = 0; i < subplanes.length ; i++ ){\n\t\tsubplanes[i].resume();\n\t}\n\tpaused = false;\n}", "function pause(_pause) {\n if (this.canvas&&this.canvas.parentNode&&(_pause===undefined||_pause!==this.paused)) {\n this.paused && animate.add(this.handleAnimate) || animate.remove(th...
[ "0.6848228", "0.6412809", "0.6306879", "0.628224", "0.6240362", "0.6163655", "0.61568034", "0.6151244", "0.6144668", "0.6094148", "0.606807", "0.6059813", "0.60098565", "0.5992353", "0.5992353", "0.5973268", "0.5953773", "0.5953773", "0.59207493", "0.590632", "0.58101314", ...
0.82830477
0
resume: void Resumes all animation of subplanes.
function resume(){ for( let i = 0; i < subplanes.length ; i++ ){ subplanes[i].resume(); } paused = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pause(){\n\tfor( let i = 0; i < subplanes.length ; i++ ){\n\t\tsubplanes[i].pause();\n\t}\n\tpaused = true;\n}", "function resumeAnimation() {\n startAnimation()\n}", "resume() { this.setPaused(false); }", "function resume() {\n\t\t\t\n\t\t\tisPaused = false;\n\t\t\t$progressBar.animate({ width :...
[ "0.6841102", "0.6541918", "0.6086581", "0.6072541", "0.6017805", "0.58494216", "0.58475685", "0.57997465", "0.57979417", "0.57979417", "0.5761861", "0.5703611", "0.567908", "0.567308", "0.5571729", "0.556679", "0.5511107", "0.5466383", "0.54038465", "0.5379184", "0.5352043", ...
0.8123195
0
3. Setter Functions / set_sliding_duration: void sets sliding duration, which is time sliding takes to completely done. If negative value came in, WindowManager.WINDOW_ANIMATION_TIME is used. duration: double: sliding duration.
function set_sliding_duration( duration ){ if( duration < 0 ) sliding_duration = WindowManager.WINDOW_ANIMATION_TIME; else sliding_duration = duration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_sliding_height( height ){\n\tif( height >= 0 ){\n\t\tsliding_height = height;\n\t\tconfigure_plane_offset();\n\t\tconfigure_plane_height();\n\t}\n}", "handleSetDuration(value) {\n this.props.setAnimationDuration(value);\n }", "function SlidePanels(action){\n var speed=900;\n var ea...
[ "0.56328595", "0.5616966", "0.5467383", "0.5442124", "0.54101485", "0.53150016", "0.5302958", "0.5296826", "0.52741367", "0.52319676", "0.52294105", "0.52040386", "0.52016455", "0.5192865", "0.5158141", "0.5140518", "0.51072973", "0.510143", "0.5097251", "0.50943863", "0.5078...
0.8923162
0
configure_plane_size: void Updates screen size and offset according to global.stage size and current index of workspace.
function configure_plane_size(){ plane_width = global.stage.width; configure_plane_height(); configure_plane_offset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configure_plane_height(){\n\tplane_height =\t((workspace_indexer.workspace_count - 1)\t*\n\t\t\t\t\t sliding_height )\t\t\t\t\t\t\t+\n\t\t\t\t\tglobal.stage.height;\n\tfor( let i in subplanes )\n\t\tsubplanes[i].set_size( plane_width, plane_height );\n}", "function configure_plane_offset(){\n\tplane_off...
[ "0.78159463", "0.67066485", "0.66337186", "0.63663334", "0.6360562", "0.5974625", "0.5962707", "0.5836086", "0.5784043", "0.5721597", "0.5663498", "0.5651652", "0.5615497", "0.5598171", "0.55719155", "0.55592924", "0.5554015", "0.5535155", "0.55240655", "0.5492966", "0.547287...
0.8404722
0
configure_plane_height: void updates plane height, according to workspace count and sliding height.
function configure_plane_height(){ plane_height = ((workspace_indexer.workspace_count - 1) * sliding_height ) + global.stage.height; for( let i in subplanes ) subplanes[i].set_size( plane_width, plane_height ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configure_plane_size(){\n\tplane_width = global.stage.width;\n\tconfigure_plane_height();\n\tconfigure_plane_offset();\n}", "function configure_plane_offset(){\n\tplane_offset = \tworkspace_indexer.workspace_index * sliding_height;\n\t\n\tif( wrap_plane != null ){\n\t\tlet anim_param = { time:\t\tslidin...
[ "0.6953069", "0.65473366", "0.63189167", "0.6088796", "0.59780335", "0.5781394", "0.5687336", "0.5606437", "0.55739605", "0.5511738", "0.54305136", "0.53505147", "0.5317601", "0.5245651", "0.5235922", "0.51500523", "0.51500523", "0.51319027", "0.5124482", "0.5123767", "0.5113...
0.8723586
0
configure_plane_offset: void Animates plane to slide up or down, according to current workspace index and sliding height.
function configure_plane_offset(){ plane_offset = workspace_indexer.workspace_index * sliding_height; if( wrap_plane != null ){ let anim_param = { time: sliding_duration, transition: 'easeOutQuad', onComplete: _sh_switch_workspace_tween_completed, y: -(plane_offset) }; Tweener.add...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configure_plane_height(){\n\tplane_height =\t((workspace_indexer.workspace_count - 1)\t*\n\t\t\t\t\t sliding_height )\t\t\t\t\t\t\t+\n\t\t\t\t\tglobal.stage.height;\n\tfor( let i in subplanes )\n\t\tsubplanes[i].set_size( plane_width, plane_height );\n}", "function configure_plane_size(){\n\tplane_width...
[ "0.6657581", "0.64853173", "0.5889338", "0.57313734", "0.55783063", "0.5545347", "0.55324566", "0.5520814", "0.5481791", "0.54256415", "0.53879917", "0.5325462", "0.5278737", "0.5268429", "0.5133127", "0.5109396", "0.5071152", "0.5052174", "0.5045569", "0.50337404", "0.503051...
0.8701154
0
4. Signal handlers. / _sh_settings_changed: void When setting has changed, it will update actorwrap. settings: Gio.Settings:settings. key: string:changed setting key.
function _sh_settings_changed( settings, key ){ switch( key ){ case 'sliding-height': set_sliding_height( settings.get_double( key ) ); break; case 'sliding-duration': set_sliding_duration( settings.get_int( key ) ); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_settings_changed() {\n \tif (!this.settings_already_changed) {\n \t\tMain.notify(\"Please restart BaBar extension to apply changes.\");\n \t\tthis.settings_already_changed = true;\n \t}\n }", "set_settings(settings) {\n this._child.send({\n cmd: 'settings',\n data: settings\n });\...
[ "0.7079616", "0.69794375", "0.687604", "0.6657633", "0.6609827", "0.65528244", "0.6475779", "0.64523304", "0.6397269", "0.6232993", "0.6197769", "0.61851394", "0.61545455", "0.61079836", "0.60730267", "0.60695153", "0.6050243", "0.60500324", "0.60048467", "0.59984154", "0.596...
0.708138
0
_sh_wrap_plane_lower: bool When windows are restacked and wrap_plane goes on top of them, this will move it below of them.
function _sh_wrap_plane_lower(){ wrap_plane.raise( background_plane ); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "movePlaneToFront(plane) {\n const drawType = plane._transparent ? \"transparent\" : \"opaque\";\n let stack = this.stacks[drawType][\"programs\"][\"program-\" + plane._program.id];\n\n stack = stack.filter(index => index !== plane.index);\n if(drawType === \"transparent\") {\n ...
[ "0.6357518", "0.61457473", "0.60824096", "0.60081446", "0.595634", "0.5913101", "0.585443", "0.58250415", "0.57391024", "0.57024556", "0.56654763", "0.5610391", "0.56033003", "0.5539631", "0.55325025", "0.55308765", "0.55308765", "0.5455611", "0.5452019", "0.5382791", "0.5375...
0.79641616
0
_sh_overview_showing: void When overview screen is becoming visible, show wrap_plane_clone as if it was part of overview screen.
function _sh_overview_showing(){ in_overview = true; wrap_plane_clone.visible = true; paused_preserve = (paused == undefined) ? false : paused; resume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sh_overview_hidden(){\n\tin_overview = false;\n\twrap_plane_clone.visible = false;\n\tif( paused_preserve ) pause();\n}", "function showOverviewMap() {\r\n $('.county-container').addClass('hide');\r\n $('#mapBusyPanel').addClass('hide');\r\n $('.overview-container').removeClass('hide');\r\n removeP...
[ "0.762667", "0.63198644", "0.62799233", "0.6035265", "0.60214484", "0.6004979", "0.5999813", "0.5965253", "0.59257185", "0.58521473", "0.58247656", "0.5795646", "0.5784701", "0.57813656", "0.57726043", "0.5718937", "0.57180345", "0.57005376", "0.56913763", "0.569133", "0.5683...
0.86903286
0
_sh_overview_hidden: void Just like _sh_overview_showing() but it hides wrap_plane_clone and it is activated when overview screen is gone.
function _sh_overview_hidden(){ in_overview = false; wrap_plane_clone.visible = false; if( paused_preserve ) pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sh_overview_showing(){\n\tin_overview = true;\n\twrap_plane_clone.visible = true;\n\tpaused_preserve = (paused == undefined) ? false : paused;\n\tresume();\n}", "function deactivateOverview() {\n\n // Only proceed if enabled in config\n if (config.overview) {\n\n clearTimeout(a...
[ "0.81061715", "0.66917914", "0.6568812", "0.6397002", "0.63952255", "0.6282954", "0.62610507", "0.6231224", "0.6153302", "0.6121686", "0.6115341", "0.61133426", "0.6106555", "0.6105689", "0.6095317", "0.6086913", "0.60772574", "0.60430586", "0.60386366", "0.60153806", "0.6009...
0.9055484
0
_sh_maximized: void When Maximized state detected.
function _sh_maximized(){ if( in_overview ) paused_preserve = true; else pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sh_unmaximized(){\n\tif( in_overview ) paused_preserve = false;\n\telse resume();\n}", "function maximize()\n\t{\n\t\tif (_container != null)\n\t\t{\n\t\t\t_container.css({\"overflow\": \"\", \"height\": \"\"});\n\t\t\t_minimized = false;\n\t\t}\n\t}", "function showMaximized () {\n\t\t$(\"body\").re...
[ "0.7248015", "0.678416", "0.66117275", "0.6585748", "0.6371655", "0.621075", "0.6177794", "0.61752754", "0.6171159", "0.61434364", "0.6012297", "0.6012297", "0.59831744", "0.5970452", "0.59217036", "0.5896471", "0.5856007", "0.57863563", "0.5770755", "0.57617956", "0.57545495...
0.78188205
0
_sh_unmaximized: void When Unmaximized state detected.
function _sh_unmaximized(){ if( in_overview ) paused_preserve = false; else resume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sh_maximized(){\n\tif( in_overview ) paused_preserve = true;\n\telse pause();\n}", "function hideShowMinMaxToggle() {\n if (minimizeWindow) {\n setMinimizeWindow(false);\n } else {\n setMinimizeWindow(true);\n }\n\n }", "function maximize()\n\t{\n\t\tif (...
[ "0.68672425", "0.60551196", "0.59614766", "0.59013534", "0.5876824", "0.5828833", "0.575924", "0.57041156", "0.5680417", "0.55435365", "0.5537007", "0.552834", "0.551645", "0.5515534", "0.54125494", "0.54125494", "0.53963953", "0.53032464", "0.5284432", "0.5275696", "0.519905...
0.78436023
0
_sh_screensize_changed: void When screen resolution is changed, it updates screen size it kepts. screen: Meta.Screen:signal source. pspec: GObject.ParamSpec:property spec.
function _sh_screensize_changed( screen, pspec ){ configure_plane_size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScreenResolution(value) {\n __params['sr'] = value;\n}", "getScreenSize(event) {\r\n this.scrHeight = window.innerHeight;\r\n }", "function updateScreenSize(){\n\t\tvar w = window,\n\t\td = document,\n\t\te = d.documentElement,\n\t\tg = d.getElementsByTagName('body')[0],\n\t\tx = w.inn...
[ "0.6700843", "0.63301104", "0.62829286", "0.624783", "0.624783", "0.62348145", "0.6226718", "0.6164125", "0.6028593", "0.59181046", "0.59181046", "0.58996415", "0.58143294", "0.58138347", "0.58111316", "0.5786988", "0.5705454", "0.56944543", "0.5667967", "0.5655312", "0.56530...
0.86793613
0
_sh_workspace_count_changed: void When workspaces are increased or decreased, it updates plane heights to provide constant shifting amount when switching workspaces. windexer: WorkspaceIndexer:signal source. count: int:workspace count.
function _sh_workspace_count_changed( windexer, count ){ plane_height = global.stage.height + ( (count - 1) * sliding_height ); for( let i in subplanes ) subplanes[i].set_size( plane_width, plane_height ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_update_ws() {\n \t// destroy old workspaces bar buttons and signals\n \tthis.ws_bar.destroy_all_children();\n \t\n \t// get number of workspaces\n this.ws_count = WM.get_n_workspaces();\n this.active_ws_index = WM.get_active_workspace_index();\n \t\t\n\t\t// display all current wo...
[ "0.6209076", "0.6139132", "0.59478515", "0.55002564", "0.5464145", "0.54121757", "0.5368589", "0.5202692", "0.5155456", "0.51535815", "0.5131633", "0.5118322", "0.51172066", "0.5052974", "0.50341326", "0.5018014", "0.5007236", "0.49938542", "0.49933106", "0.49880338", "0.4981...
0.82624006
0
_sh_switch_workspace: void When switching workspace, put sliding animation to planes. shellwm: Shell.WM:signal source. to: int:index of destination workspace.
function _sh_switch_workspace( shellwm, to ){ let anim_param = { time: sliding_duration, transition: 'easeOutQuad', onComplete: _sh_switch_workspace_tween_completed, y: -(sliding_height * to) }; Tweener.addTween( wrap_plane, anim_param ); Tweener.addTween( wrap_plane_clone, anim_param ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_move_to_next_workspace() {\n\t\tthis.ws_count = WM.get_n_workspaces();\n this.active_ws_index = WM.get_active_workspace_index();\n this.focused_window = global.display.get_focus_window();\n if (this.focused_window && this.active_ws_index < this.ws_count - 1) {\n \tthis.focused_window.c...
[ "0.67315847", "0.65092754", "0.63950443", "0.6199386", "0.61265373", "0.6042932", "0.59464616", "0.56665075", "0.558057", "0.54372853", "0.5405223", "0.53897923", "0.5388206", "0.5347029", "0.53327954", "0.53159887", "0.53039235", "0.52857405", "0.5265107", "0.5261651", "0.52...
0.87033224
0
_sh_switch_workspace_tween_completed: void When animation during switching workspace done, removes tweens from it.
function _sh_switch_workspace_tween_completed( ){ Tweener.removeTweens( this ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeAll() { this.tweens.length = 0; }", "function undoAnimationDone() {\n isUndoing = false;\n tiles.splice(tiles.length - 1, 1);\n removeNode(tilesContainer.lastElementChild);\n updateTileVisibility(numTilesShown);\n lastBlacklistedTile.elem.removeEventListener(\n 'webkitTransitionEnd', undoAnimatio...
[ "0.6247643", "0.62340957", "0.6202786", "0.5983384", "0.59801614", "0.5886131", "0.5764896", "0.5752892", "0.5708055", "0.5694838", "0.56714725", "0.56714725", "0.56714725", "0.5648097", "0.5647746", "0.5619545", "0.55929315", "0.5550028", "0.5547977", "0.5542823", "0.5496322...
0.9330786
0
set_sliding_height: void sets sliding height, which is amount of sliding distance per one workspace when switching workspace. Nonnegative values are allowed. height: double: sliding height.
function set_sliding_height( height ){ if( height >= 0 ){ sliding_height = height; configure_plane_offset(); configure_plane_height(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeight(height)\n {\n _height = height;\n }", "set height(height) {\n // this._height = height;\n }", "set height(height) {\n // this._height = height;\n }", "set height(value) {}", "set setHeight (height) {\n this.height = height;\n }", "function set...
[ "0.60466033", "0.5702384", "0.5702384", "0.5697578", "0.56928384", "0.5621582", "0.56134325", "0.5452572", "0.5421188", "0.5417431", "0.5410347", "0.53871787", "0.5370758", "0.5321083", "0.52728105", "0.52728105", "0.52728105", "0.52546597", "0.51728123", "0.513191", "0.51236...
0.8051721
0
5. Classes / MaximizeDetector: object Detects if the windows has been maximized and emits signals. Tiled windows are treated specially if two ( or more ) windows are tiled and placed both of side, they are considered to be maximized. Signals: maximized() : void: emitted when one of windows wrap screen. unmaximized() : ...
function MaximizeDetector( workspace ){ this._init( workspace ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async maximizeWindow() {\n return this.resizeWindow();\n }", "function _sh_maximized(){\n\tif( in_overview ) paused_preserve = true;\n\telse pause();\n}", "function onWindowMinimise() { \n console.log('window minimise'); \n win.minimize();\n}", "function maxRestoreWindow () {\n if (!win...
[ "0.66050065", "0.6552621", "0.6360635", "0.62547237", "0.6244428", "0.62227213", "0.61065644", "0.60655624", "0.6022811", "0.58873975", "0.5883799", "0.578173", "0.5718418", "0.57114697", "0.5698563", "0.5657711", "0.5622971", "0.5570415", "0.5558758", "0.55126494", "0.550739...
0.6440016
2
WorkspaceIndexer: object Detects workspace counts and index of current workspace. Signals: countchanged( count ) : void: emitted when a workspace is added or removed. count : int: count of workspaces. indexchanged( index ) : void: emitted when user switches workspace or one of previous workspaces removed. index : int: ...
function WorkspaceIndexer(){ this._init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_update_ws() {\n \t// destroy old workspaces bar buttons and signals\n \tthis.ws_bar.destroy_all_children();\n \t\n \t// get number of workspaces\n this.ws_count = WM.get_n_workspaces();\n this.active_ws_index = WM.get_active_workspace_index();\n \t\t\n\t\t// display all current wo...
[ "0.54376894", "0.5433878", "0.53595203", "0.53539217", "0.5305699", "0.52098733", "0.51613176", "0.5005069", "0.49906597", "0.4886402", "0.48628548", "0.47590727", "0.47212362", "0.46393555", "0.4591112", "0.45844677", "0.45601046", "0.4552529", "0.45393154", "0.4519126", "0....
0.73300374
0
endregion region Get data from .json
async function getStoryData() { const res = await fetch('assets/json/story.json'); return await res.json(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadJsonData() {\n }", "getAllData() {\n return this.jsonFile;\n }", "function readData(){\r\n let dataRead = fs.readFileSync('data.json');\r\n let infoRead = JSON.parse(dataRead);\r\n return infoRead;\r\n}", "async getData() {\n const data = await readFile(this.datafile, 'utf8');\n if ...
[ "0.6906053", "0.6898882", "0.6867547", "0.6857829", "0.68314147", "0.67754745", "0.6744212", "0.673112", "0.6681565", "0.6644609", "0.6604183", "0.6584461", "0.6582116", "0.6576107", "0.65667003", "0.65618694", "0.6559676", "0.649826", "0.6496066", "0.6482947", "0.6453439", ...
0.62005556
67
endregion Button function: Parse .json file to find specific element
function getThePage(id) { getStoryData().then((pages) => { for (let page of pages) { if (page.id == id) { storyPrint(page); } } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grabJSON(filepath, mode) {\n // access the JSON from the Codex directory\n // i could have done this with jquery, but i wanted to see what building\n // the request looks like in vanilla js\n var url = codex_url + filepath;\n var Httpreq = new XMLHttpRequest();\n Httpreq.open('GET', url);\n Httpreq...
[ "0.5902596", "0.5850963", "0.5666715", "0.5661483", "0.56485426", "0.5530453", "0.5448998", "0.5423497", "0.5396628", "0.5386623", "0.53592193", "0.5244967", "0.5207941", "0.52042425", "0.5195954", "0.51868147", "0.5178319", "0.51771706", "0.51762116", "0.51760715", "0.514818...
0.0
-1
Print needed elements on screen
function storyPrint(page) { leftImage(page.image); rightTitle(page.title); storyText(page.text); playerState(page.state); userQuestions(page.questions); chapter(page.chapter); return page.id == 0 || page.id == 1 ? pageNumber(page.id):pageNumber(parseInt(pageNumberDoc.innerHTML)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPrintingDiagnostics() {\n showPrintingCropMarks();\n showPrintingDescription();\n showPrintingRulers();\n}", "function printPage(elem) {\n\t\tpopup(jQuery(elem).html(), elem);\n\t}", "function drawelements() {\n\t// show state\n\tif (showstate) {\n\t\t//eoutstateman.firstChild.nodeValue =...
[ "0.6958866", "0.6562745", "0.65200335", "0.6508247", "0.6444512", "0.641834", "0.64038134", "0.6390559", "0.6357911", "0.6296596", "0.6292009", "0.62914634", "0.6288793", "0.62666804", "0.6263226", "0.6260434", "0.62426007", "0.62288", "0.6221812", "0.6212306", "0.6191347", ...
0.0
-1
this middleware will be injected into the request pipeline with json() , (req,res) next() will make sure all other middleware functions will be executed..
function log (req,res,next){ // console.log('logging..'); next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function middleware(request, response, next) {}", "function routeMiddleWare(req, res, next) {\n console.warn(req.method + ' ' + req.url + ' with ' + JSON.stringify(req.body))\n next()\n}", "function json(req, res, next) {\n res.json = function(code, val) {\n if (!val) {\n val = code;...
[ "0.8004306", "0.71297294", "0.7056807", "0.69393", "0.6927904", "0.69098145", "0.6896715", "0.68905526", "0.68708634", "0.6847339", "0.6847339", "0.6847339", "0.6847339", "0.6847339", "0.67687887", "0.67347485", "0.6678728", "0.66655815", "0.66533", "0.6642088", "0.66262954",...
0.5958926
67
Returns and array where the first element contains a message string for the winner of the round and the second element contains the score value that will be added to the running score.
function getWinnerArray(playerSelection, computerSelection) { // Make player selection case insensitive playerSelection = playerSelection.toLowerCase(); // Returns the winner array if (playerSelection == "rock" && computerSelection == "paper") { return ["You lose! Paper beats Rock", -1]; } else if (playe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "computeRoundScores() {\n //the only score guaranteed to match the gameState (which may have changed) is the latest one\n const roundNumber = this.state.gameState.roundNumber;\n const threshold42 = this.state.gameState.threshold42 || 999;\n for (var playerNumber in this.state.players) {\n var game ...
[ "0.6788974", "0.6716085", "0.6697061", "0.66875404", "0.66812456", "0.64231896", "0.64073265", "0.638881", "0.63882726", "0.6381023", "0.6340387", "0.63337976", "0.6333215", "0.63044447", "0.62757224", "0.62706906", "0.62440324", "0.62245405", "0.61711675", "0.6169121", "0.61...
0.57267576
94
Update the UI based on who won the round
function updateUI(winnerArray) { // Get message element const message = document.querySelector(".container-winner h3"); console.log(message); // Update message message.textContent = winnerArray[0]; // Update score score += winnerArray[1]; // Update Score UI const scoreElement = document.querySelect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayWinner() {\n var winningPiece = game.isXTurn ? 'x' : 'o'\n if(game.singleplayer || game.vsAi)\n game.winner = winningPiece\n else\n {\n if(game.player === winningPiece)\n game.winner = game.username\n else\n game.winn...
[ "0.70138854", "0.6992236", "0.6991183", "0.6938852", "0.6889909", "0.68612", "0.68601173", "0.68340147", "0.68048507", "0.67997366", "0.67997354", "0.678646", "0.67803043", "0.6776131", "0.6750581", "0.67443764", "0.6735265", "0.672779", "0.672769", "0.6717823", "0.6650832", ...
0.0
-1
push function through var refence into array
function myFunction(a,b) { return a+b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pusher(array) {\n return function(arg) {\n array.push(arg);\n };\n }", "function callee(array) {\n array.push('stuff');\n}", "push(val) {\n\n\n }", "function buildFunctions2() {\n var arr = [];\n\n for (var i = 0; i < 3; i++) {\n let j = i; // this var j...
[ "0.6228406", "0.6173762", "0.5921062", "0.59053266", "0.5883381", "0.5877387", "0.58690494", "0.58406055", "0.58292234", "0.58107394", "0.5787876", "0.57221705", "0.57146007", "0.570517", "0.5692704", "0.5679859", "0.56737256", "0.567016", "0.56453407", "0.56345797", "0.56119...
0.0
-1
Returns the next used entity id
function getFreeId() { while(entities[nextId] !== undefined) { nextId++; } return nextId++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grabNextId() {\n\n\treturn nextId++;\n\n }", "function nextArticleId() {\n let articles = allArticles();\n\n // find the highest id\n let id = articles[articles.length - 1].id;\n\n // pick next id\n let articleId = id + 1;\n return articleId;\n}", "function nextArticleId() {\n let articles = a...
[ "0.75214213", "0.7410672", "0.74011403", "0.74002784", "0.7342953", "0.72503823", "0.70905775", "0.7079563", "0.7079563", "0.6881927", "0.6780581", "0.6776848", "0.67382765", "0.6663126", "0.6632189", "0.66164047", "0.6522775", "0.6513268", "0.6505484", "0.650104", "0.649741"...
0.8576664
0
Get entity by id
function getEntityById(id) { return entities[id]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(id) {\n return internal(this).idToEntity.get(id);\n }", "entity(id) {\n if (arguments.length === 0) {\n return new Entity(this);\n } else {\n return internal(this).entities.get(id);\n }\n }", "function findById(id) {\n return _.find(entitie...
[ "0.8049982", "0.7976322", "0.759565", "0.74800277", "0.74545527", "0.73046976", "0.72383934", "0.71105015", "0.7089221", "0.7055131", "0.70510304", "0.7045045", "0.7011668", "0.69906616", "0.69199353", "0.6906883", "0.68873346", "0.6860117", "0.684353", "0.6838352", "0.683343...
0.84295106
0
Adds any entity to position of id
function addEntity(id, entity) { entities[id] = entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEntity(entity, id=uuid.v1()) {\n this.entities[id] = entity;\n this.spatialHashmap.addEntity(id, entity.position);\n this.manager.addEntity(id, entity);\n }", "add(entity) {\n if (!this.contains(entity)) {\n const id = internal(this).nextID++;\n internal(this)....
[ "0.71973133", "0.7160327", "0.65232855", "0.64735407", "0.64395034", "0.6280779", "0.6212474", "0.613231", "0.60951984", "0.59761554", "0.59255207", "0.5870934", "0.5816064", "0.58033127", "0.5785501", "0.5783473", "0.57725966", "0.5707309", "0.5703988", "0.56612414", "0.5660...
0.70397025
2
Delete an entity by id
function deleteEntityById(id) { delete entities[id]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async deleteById(id) {\r\n const item = await this.findById(id);\r\n const result = await item.destroy();\r\n if (result === false) {\r\n throw new Exception('can not delete resource', 1002);\r\n }\r\n return result;\r\n }", "deleteById(id) {\n let sqlRequest = \"DELETE FROM repo WHER...
[ "0.7435677", "0.7386501", "0.7332191", "0.7308262", "0.7219095", "0.7201032", "0.7149737", "0.7149737", "0.7129358", "0.7103043", "0.70887387", "0.70730203", "0.70660657", "0.7048573", "0.70056695", "0.6992689", "0.6986736", "0.6983448", "0.69763196", "0.6948767", "0.6945188"...
0.87572443
0
Returns all collisions as an array
function getCollisionsAsArray(entity) { let collisions = []; let rectSource = { x: entity.x, y: entity.y, width: entity.width, height: entity.height }; Object.keys(entities).forEach(key => { let e = entities[key]; if(e.id !== entity.id) { let rectTarget = { x: e.x, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCollisions (events) {\n\n //resets storage\n collisions = [];\n\n for (var i = 0; i < 36; i ++) {\n var time = [];\n for (var j = 0; j < events.length; j++) {\n time.push(0);\n }\n collisions.push(time);\n }\n\n events.forEach((event, id) => {\n let end = event.end;\n let st...
[ "0.69734186", "0.62517715", "0.61692464", "0.60937166", "0.5912801", "0.5853225", "0.5679952", "0.560079", "0.5568751", "0.5547044", "0.5533444", "0.54997796", "0.54184693", "0.5366451", "0.5308773", "0.5304956", "0.5299105", "0.52692723", "0.5240201", "0.52398384", "0.522010...
0.71473897
0
Helpers title, width and proj are optional if proj is null and key is "id" then it will default to the contract id if proj is null and key is not "id" then it will default to stringified single or array value of rowData.key
function createCol(key, title = toTitle(key), width = 80, proj) { return { key: key, title: title, createCell: ({ rowData }) => ({ type: "text", value: valueFunction(rowData, key, proj) }), sortable: true, width: width, weight: 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rowKey({ rowData }) {\n return rowData.id.title;\n}", "setProjectAttribute(projects, project) {\r\n let label = '';\r\n let description = '';\r\n return Object.keys(projects[project]).map((index) => {\r\n label = this.formatting.formatLabel(index, 2);\r\n ...
[ "0.6082077", "0.56501305", "0.55960023", "0.55960023", "0.54564965", "0.53083783", "0.5301513", "0.5174054", "0.51494396", "0.5078098", "0.50513434", "0.50505847", "0.5016378", "0.50153095", "0.50050086", "0.50018585", "0.4997217", "0.49821675", "0.494888", "0.49419355", "0.4...
0.66043895
0
inserts spaces into the usually camelcase key e.g. "assetISINCode" > "Asset ISIN Code"
function toTitle(key) { var spaced = key.replace(/([^A-Z])([A-Z])/g, '$1 $2').replace(/([A-Z])([A-Z][^A-Z])/g, '$1 $2'); return spaced[0].toUpperCase() + spaced.substr(1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static formatKey(inputStr) {\r\n return this.removeSpaces(inputStr).toUpperCase();\r\n }", "function keyify(template_title) {\n return template_title.toLowerCase().replace(\"_\",\" \");\n}", "function toLowercaseSeparator(key) {\n return key.replace(/([A-Z])/g, '-$1').toLowerCase();\n}", "functio...
[ "0.7317777", "0.72038436", "0.70927197", "0.70329726", "0.7023354", "0.7023354", "0.6972407", "0.6835737", "0.67620915", "0.66118175", "0.6596049", "0.6596049", "0.65831834", "0.641669", "0.63942784", "0.63589", "0.63589", "0.63315284", "0.63314396", "0.6321366", "0.6312837",...
0.7343128
0
Adding a User to a society array and adding the society to the users array
async function addUserToSoc(soc) { var getUser = JSON.parse(localStorage.getItem('user')) const addUser = { society: soc, user: getUser, user_id: getUser._id, } // Adds user to users array in society model. await axios.post('http://localhost:4000/societies/update', addUser) .then(function (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addUser(newUser) {\n userDataArray.push(newUser);\n updateDOM();\n}", "async addUserToSoc(soc) {\n\n var getUser = JSON.parse(localStorage.getItem('user'))\n\n console.log(soc);\n console.log(getUser._id);\n\n const addUser = {\n society: soc,\n us...
[ "0.66317225", "0.655609", "0.64615715", "0.6092115", "0.60568947", "0.6040567", "0.6035933", "0.6019532", "0.60173255", "0.600012", "0.5995785", "0.5987443", "0.5981492", "0.5973999", "0.59712994", "0.5935374", "0.59209627", "0.5895364", "0.5865006", "0.5837303", "0.5831251",...
0.6550942
2
this function fills in the value between HOME page and DL page
function myFunction_dl0(x) { document.getElementsByName("firstDL")[0].value=x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bottomRecordNavSetPage(form){\r\n\tform.page.value = form.bottomRecordNav.value;\r\n}", "function updatePageData(){\n // Update current step number\n $(\".kf-current-step\").each(function(index) {\n $(this).text(currentStep);\n });\n }", "function reportValue(str) {\...
[ "0.61147654", "0.6000716", "0.59941286", "0.59738696", "0.5942688", "0.58936065", "0.5862078", "0.5852566", "0.5830543", "0.5725548", "0.57154006", "0.57120353", "0.56977737", "0.5651992", "0.56036806", "0.56036425", "0.56035924", "0.56004775", "0.5592615", "0.55881774", "0.5...
0.0
-1
expand the table AUTO CALCULATE REVENUE DL Revenue
function calc_dl() { var one = Number(document.getElementById("dl_revenue_dl8").value); var two = Number(document.getElementById("dl_revenue_dl9").value); var three = Number(document.getElementById("dl_revenue_dl10").value); var four = Number(document.getElementById("dl_revenue_dl11").value); doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcExp() {\r\n // DVARO: Gets all the tr in the tbody of the travelExp table\r\n var expTable = document.querySelectorAll('table#travelExp tbody tr');\r\n // DLOOP: Loops throught the expTable and cchanges the value the subtotals\r\n for (var i = 0; i < expTable.length; i++) {\r\n ...
[ "0.6039916", "0.56911606", "0.5615973", "0.54559416", "0.5365778", "0.5347981", "0.5320281", "0.5290856", "0.5262084", "0.5256384", "0.5255989", "0.5227516", "0.52260536", "0.52176714", "0.5196818", "0.5193506", "0.5152328", "0.5121914", "0.5117998", "0.5113181", "0.50877935"...
0.51660997
16
Constructor can't be used reliably in polyfill'ed custom elements
static get style() { return /* css */ ` :host:before { color: var(--color); content: attr(data-hour); font-size: 0.75em; } :host { display: flex; flex-flow: column; align-items: center; } :host > hr { flex: auto; width: 0; margin: 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(ele) {\n super(ele);\n }", "constructor (element) {\n super(element);\n }", "function BaseLightningElementConstructor() {\n // This should be as performant as possible, while any initialization should be done lazily\n if (isNull(vmBeingConstructed)) {\n throw new Referenc...
[ "0.71586984", "0.70646363", "0.69573784", "0.6840387", "0.6835012", "0.6835012", "0.6835012", "0.68176055", "0.67539036", "0.672704", "0.670355", "0.6685116", "0.6668289", "0.6668289", "0.6668289", "0.6668289", "0.6668289", "0.6666259", "0.662633", "0.6611127", "0.65996957", ...
0.0
-1
Scale the length of a vector by the given amount.
scale(vec, m) { return [vec[0] * m, vec[1] * m]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scale(vector, factor) {\n\treturn [vector[0]*factor, vector[1] * factor];\n}", "function scaleToLength(x, c) {\n var norm = l2norm(x);\n for (var i = 0; i < x.length; i++) {\n c * x[i] / norm;\n };\n return x;\n}", "function scale(vec, setTo) {\n\t\tthis.transform(this.transformation.scale, vec...
[ "0.6606249", "0.6584042", "0.6447079", "0.6325507", "0.6294795", "0.6190926", "0.6149369", "0.6141349", "0.6116575", "0.60678095", "0.60122234", "0.5996562", "0.5946511", "0.5936686", "0.5932855", "0.5932855", "0.5932855", "0.5932855", "0.58874285", "0.58782285", "0.58177644"...
0.5873331
24
isStateExist is a private method Description: Checks if stateName is created and exists
function isStateExist(stateName) { var states = $state.get(); var isExist = false; if (states instanceof Array && typeof stateName === 'string' && stateName !== '') { states.filter(function(state) { if (state.name === stateName) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCreatingFromState(state) {\n return this._getSubState(state).creating || false;\n }", "function checkState(stateId) {\n if (stateId === undefined || stateId === null)\n return false;\n for (var i=0; i < stateArray.length; i++) {\n if (stateArray[i] == stateId)\n return true;\n }\n return fa...
[ "0.6589972", "0.6010507", "0.59621054", "0.5959686", "0.5940665", "0.59272695", "0.5776916", "0.55830145", "0.5576125", "0.54944843", "0.54867595", "0.5453289", "0.54066586", "0.54056877", "0.53948754", "0.53514355", "0.53469825", "0.53186053", "0.5310538", "0.5280254", "0.52...
0.77389556
0
Converts query to State Params Object
function convertQueryToStateParamsObj(query) { if (!query && typeof query !== 'string') { return; } var queryParamsArray = query.split('&'); var stateParamsObj = {}; queryParamsArray.filter(function(param) { var paramValu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toParams() {\n // The query params\n let data = this.build();\n\n // Transform it to params\n return Store.toParam(data);\n }", "function getQueryParams() {\n var queryParams = currentState.state.allQueryParams();\n var allParams = currentState.params;\n\n var params = {};\n\n for (var p...
[ "0.71976525", "0.6829111", "0.6609049", "0.66041523", "0.6554846", "0.65419394", "0.64280355", "0.63929677", "0.6382965", "0.6348235", "0.63082725", "0.628999", "0.62731874", "0.6267601", "0.62074673", "0.6165114", "0.6161996", "0.6152357", "0.6126731", "0.611059", "0.6092538...
0.80678654
0
loadCurrentOrDefaultState is a private method Description: On page Refresh, if state Url is present, it navigates to corresponding State, else to Home Page
function loadCurrentOrDefaultState() { var currentStateUrl = $location.$$url || '/home'; var currentStateUrlAndQuery = currentStateUrl.split('?'); var query = currentStateUrlAndQuery[1]; currentStateUrl = currentStateUrlAndQuery[0]; var currentStateName ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function state (url, no_push) {\n $('#main').load(url+(url.indexOf('?')>0?'&':'?')+'_main');\n load_page_data(url);\n if (no_push !== 'no push') {\n history.pushState({}, undefined, url);\n }\n}", "function checkHash() {\n if(window.location.href.indexOf(\"unity\") > -1) {\n currentState = pageSt...
[ "0.66685104", "0.6556766", "0.62833095", "0.62581825", "0.6256984", "0.61689115", "0.6133372", "0.6131823", "0.6112969", "0.61093605", "0.6089371", "0.60326076", "0.6024749", "0.6010336", "0.5991274", "0.5986418", "0.5952656", "0.5930987", "0.5925478", "0.5925478", "0.5925478...
0.8694442
0
createStates is a private method Description: createStates method is a recursive method, which recursively iterates through the items tree and creates the corresponding states.
function createStates(items, parentStateName) { if (!(items instanceof Array)) { return; } items.filter(function(statesInfoItem) { var stateName = parentStateName ? parentStateName + '.' + statesInfoItem.id : statesInfoItem.id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createLookupItems(items) {\n\n var TMPL_UL = '<ul class=\"ds-nav-lu-results-ul\">';\n\n var TMPL_BACK_ITEM = '<li class=\"ds-nav-lu-results-li\">&nbsp;<strong class=\"ds-nav-lu-results-li-item\"><a href=\"#\" class=\"ds-nav-lu-results-li-item-back\"> <i class=\"fa fa-level-up\"></i> </a></st...
[ "0.56707394", "0.561469", "0.559863", "0.55598736", "0.5514901", "0.5470929", "0.5358055", "0.5355455", "0.5340963", "0.53309447", "0.5289573", "0.5271757", "0.52553606", "0.5245882", "0.5233121", "0.5231662", "0.52094084", "0.5206982", "0.5152502", "0.51116264", "0.50935817"...
0.7487502
0
Check is the user has an authentication token, or just a user name.
isAuthenticated() { return !(this.user instanceof core.User); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateUser(token) {\n return this.name === token;\n }", "isLoggedIn() {\n return !!(getUsername() && getToken());\n }", "function isLoggedIn() {\n return (!can.isEmptyObject(userData) && !isEmpty(userData.access_token));\n}", "isTokenValid(authKey) {\n const userData = this.app.re...
[ "0.7277241", "0.6987942", "0.69285697", "0.68816763", "0.68422186", "0.6829453", "0.68264484", "0.6821903", "0.68193203", "0.68050724", "0.6789734", "0.6781074", "0.6744222", "0.6728659", "0.66642654", "0.6643923", "0.6632086", "0.66200113", "0.6603536", "0.65936404", "0.6586...
0.0
-1
Returns user identity in a form of authentication token.
getJWT() { return (this.user instanceof core.User) ? "" : this.user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserIdToken() {\n\t\treturn this.cognitoUser.getSignInUserSession().getIdToken().getJwtToken();\n\t}", "getUser() {\n return decode(this.getToken());\n }", "getUser() {\n return decode(this.getToken());\n }", "function getUserToken () {\n return getCurrentUser().then((currentUser) => ...
[ "0.7076643", "0.70444334", "0.70381457", "0.69374776", "0.6893625", "0.6849628", "0.6704805", "0.6641484", "0.66157186", "0.6573691", "0.6567487", "0.65218663", "0.6487297", "0.646566", "0.6441542", "0.6406294", "0.63895625", "0.63880795", "0.63856035", "0.6363979", "0.634848...
0.0
-1
Returns user identity in a form of a username.
getUser() { return (this.user instanceof core.User) ? this.user : core.User.fromJWT(this.user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "name(userId) {\n if (userId) {\n // find user from user id\n let user = Meteor.users.findOne(userId, {fields: {'username': 1}});\n // return username\n return user ? `@${user.username}`: '';\n }\n }", "function getUserName() {\n return _userInformation.UserName;\n }",...
[ "0.6714822", "0.6533403", "0.6517069", "0.65061766", "0.65003365", "0.64988565", "0.6479927", "0.6428014", "0.6428014", "0.6428014", "0.6428014", "0.6381835", "0.63615096", "0.6336214", "0.6315071", "0.63056153", "0.62966037", "0.6270574", "0.6270574", "0.6266962", "0.6225482...
0.0
-1
Reads a list of enrolled cards.
getEnrolledCards() { return this.context.enrollService .GetEnrollmentData(this.context.getUser(), core.Credential.SmartCard) .then(data => JSON.parse(core.Utf8.fromBase64Url(data))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCards() {\n\tfs.readFile(cardsFile, 'utf8', function(err, contents) {\n\t\tif (err) {\n\t\t\treturn console.log('Failed to read card tokens from disk: ' + err);\n\t\t}\n\t\ttry {\n\t\t\tcards = contents ? JSON.parse(contents) : {};\n\t\t}\n\t\tcatch (err) {\n\t\t\tconsole.log('Failed to parse card tok...
[ "0.65045696", "0.64920676", "0.59738815", "0.5714502", "0.5659781", "0.56288147", "0.56204325", "0.55442005", "0.5487222", "0.5401817", "0.5401259", "0.53890723", "0.5374648", "0.5340656", "0.5331796", "0.5319983", "0.5291083", "0.5253709", "0.52145135", "0.5199873", "0.51997...
0.64807934
2
Reads a card enrollment availability.
canEnroll() { return super._canEnroll(core.Credential.SmartCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getAvailability () {\n // Query backend api to find current availability of rental properties\n const response = await fetch('https://tafelberg-api.samtx.dev/availability');\n const data = await response.json();\n return data\n}", "get availability() {\n\t\treturn this.__availability;\...
[ "0.5359754", "0.5346048", "0.5326469", "0.5217043", "0.51284647", "0.5063894", "0.50397205", "0.491012", "0.48786506", "0.47898284", "0.4763951", "0.47489968", "0.4739978", "0.467405", "0.46400464", "0.45753348", "0.45639575", "0.4489797", "0.4473303", "0.44658965", "0.444940...
0.4250969
34
Deletes a specific smart card enrollment defined by its pubilc key hash.
unenroll(keyHash) { return super._unenroll(new core.Credential(core.Credential.SmartCard, keyHash)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteOwnedcar(primaryKey) {\n for (var i = 0; i < ownedcarsRootScope.ownedcarsData.length; i++) {\n if (primaryKey === ownedcarsRootScope.ownedcarsData[i].primaryKey) {\n ownedcarsRootScope.ownedcarsData.splice(i, 1);\n }\n }\n}", "function deleteCard() {\n var custome...
[ "0.5782131", "0.5658678", "0.5546636", "0.5325627", "0.52332157", "0.5230677", "0.51775426", "0.517677", "0.5165392", "0.5157213", "0.5155048", "0.5096791", "0.50891674", "0.50696766", "0.5018429", "0.5002524", "0.49712756", "0.49429852", "0.49183866", "0.4916231", "0.4902345...
0.59794384
0
Reads a card enrollment availability.
canEnroll() { return super._canEnroll(core.Credential.ContactlessCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getAvailability () {\n // Query backend api to find current availability of rental properties\n const response = await fetch('https://tafelberg-api.samtx.dev/availability');\n const data = await response.json();\n return data\n}", "get availability() {\n\t\treturn this.__availability;\...
[ "0.5359754", "0.5346048", "0.5326469", "0.5217043", "0.51284647", "0.5063894", "0.50397205", "0.491012", "0.48786506", "0.47898284", "0.4763951", "0.47489968", "0.4739978", "0.467405", "0.46400464", "0.45753348", "0.45639575", "0.4489797", "0.4473303", "0.44658965", "0.444940...
0.40994972
56
Deletes the card enrollment.
unenroll() { return super._unenroll(new core.Credential(core.Credential.ContactlessCard)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteCard() {\n var customerMgr = require('dw/customer/CustomerMgr');\n var registeredUsers = customerMgr.queryProfiles(\"\", \"customerNo ASC\");\n for each(var user in registeredUsers) {\n var wallet = user.getWallet();\n var creditCardsSaved = wallet.getPaymentInstruments('CREDI...
[ "0.6463847", "0.59964496", "0.5972752", "0.57481897", "0.56760573", "0.5656331", "0.5623636", "0.5524846", "0.54707485", "0.54704636", "0.5442341", "0.5388081", "0.5332918", "0.53255194", "0.53112644", "0.53040963", "0.52820355", "0.5280271", "0.52764803", "0.52728695", "0.52...
0.54896575
8
Reads a card enrollment availability.
canEnroll() { return super._canEnroll(core.Credential.ProximityCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getAvailability () {\n // Query backend api to find current availability of rental properties\n const response = await fetch('https://tafelberg-api.samtx.dev/availability');\n const data = await response.json();\n return data\n}", "get availability() {\n\t\treturn this.__availability;\...
[ "0.5359754", "0.5346048", "0.5326469", "0.5217043", "0.51284647", "0.5063894", "0.50397205", "0.491012", "0.48786506", "0.47898284", "0.4763951", "0.47489968", "0.4739978", "0.467405", "0.46400464", "0.45753348", "0.45639575", "0.4489797", "0.4473303", "0.44658965", "0.444940...
0.0
-1
Deletes the card enrollment.
unenroll() { return super._unenroll(new core.Credential(core.Credential.ProximityCard)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteCard() {\n var customerMgr = require('dw/customer/CustomerMgr');\n var registeredUsers = customerMgr.queryProfiles(\"\", \"customerNo ASC\");\n for each(var user in registeredUsers) {\n var wallet = user.getWallet();\n var creditCardsSaved = wallet.getPaymentInstruments('CREDI...
[ "0.6463847", "0.59964496", "0.5972752", "0.57481897", "0.56760573", "0.5656331", "0.5623636", "0.5524846", "0.54896575", "0.54707485", "0.54704636", "0.5442341", "0.5388081", "0.5332918", "0.53255194", "0.53112644", "0.53040963", "0.52820355", "0.5280271", "0.52764803", "0.52...
0.49653962
64
Reads a face enrollment availability.
canEnroll() { return super._canEnroll(core.Credential.Face); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitUntilDeviceAvailable() {\n return startSessionRequest.getAvailability(presentationUrl).then(\n function(availability) {\n console.log('availability ' + availability.value + '\\n');\n if (availability.value) {\n return stringifyAndSaveResult(true, '');\n } else {\n return new Promi...
[ "0.53088653", "0.53070384", "0.5227511", "0.50590616", "0.48744565", "0.46050134", "0.45991218", "0.45287365", "0.44783813", "0.44635832", "0.44498622", "0.4447603", "0.44402805", "0.4437844", "0.4434307", "0.44004178", "0.43964738", "0.43932655", "0.43375087", "0.43352693", ...
0.42822117
20
Deletes the face enrollment.
unenroll() { return super._unenroll(new core.Credential(core.Credential.Face)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function del_Face(){\n\t\t\t\t// The name of the bucket to access, e.g. \"my-bucket\"\n\t\t\t\tvar bucketName = 'smartmirrortest'\n\n\t\t\t\t// The name of the file to delete, e.g. \"file.txt\"\n\t\t\t\t const filename = formatted+'face.jpg';\n\n\t\t\t\t// Instantiates a client\n\t\t\t\n\n\t\t\t\t// Deletes the fi...
[ "0.5948605", "0.56235087", "0.56079006", "0.5447865", "0.5379278", "0.5347618", "0.5321449", "0.53173006", "0.5202605", "0.5186777", "0.5113764", "0.51122475", "0.5108398", "0.5101171", "0.5091895", "0.50746554", "0.50343966", "0.5019263", "0.5002116", "0.4991567", "0.4990495...
0.59827894
0
Reads a fingerprint enrollment status.
getEnrolledFingers() { return this.context.enrollService .GetEnrollmentData(this.context.getUser(), core.Credential.Fingerprints) .then(data => JSON.parse(core.Utf8.fromBase64Url(data)) .map(item => core.Finger.fromJson(item))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStudentsAttendanceStatus() {\n var data = {};\n data.lessonid = $stateParams[\"lessonId\"];\n server.requestPhp(data, \"GetStudentsAttendance\").then(function (data) {\n $scope.students = data;\n\t\t\t/*\n\t\t\t\t0 - attending\n\t\t\t\t1 - late\n\t\t\t\t2 - not attending...
[ "0.49380878", "0.48967537", "0.4820008", "0.47190937", "0.46858254", "0.46777937", "0.4671233", "0.46048033", "0.45897034", "0.45784265", "0.45768884", "0.4559772", "0.4554547", "0.45334643", "0.4530314", "0.4517023", "0.4505409", "0.44475135", "0.43488646", "0.42779148", "0....
0.5514198
0
Reads a fingerprint enrollment availability.
canEnroll() { return super._canEnroll(core.Credential.Fingerprints); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function waitUntilDeviceAvailable() {\n return startSessionRequest.getAvailability(presentationUrl).then(\n function(availability) {\n console.log('availability ' + availability.value + '\\n');\n if (availability.value) {\n return stringifyAndSaveResult(true, '');\n } else {\n return new Promi...
[ "0.5473203", "0.54524714", "0.5215167", "0.5194313", "0.5160608", "0.5126617", "0.5073841", "0.50685734", "0.49946022", "0.47925666", "0.47292286", "0.4642462", "0.4576623", "0.45579427", "0.44795752", "0.43588272", "0.435208", "0.43097538", "0.4301532", "0.427413", "0.425995...
0.402722
47
Deletes the fingerprint enrollment.
unenroll(position) { const data = typeof (position) === "number" ? [{ position }] : (position instanceof core.Finger) ? [position] : (position instanceof Array) ? position.map(p => (p instanceof core.Finger) ? p.position : p) : null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deletePublicKey() {\n var key = document.getElementById(\"deleteKey\").value;\n var keyList = JSON.parse(localStorage.getItem(EE_KEYLIST));\n delete keyList[key];\n \n localStorage.setItem(EE_KEYLIST, JSON.stringify(keyList));\n location.reload();\n}", "delete() {\n if (typeof this.ctxP...
[ "0.5628218", "0.5468255", "0.54263324", "0.53590906", "0.5339579", "0.52798814", "0.52520984", "0.52456284", "0.52235955", "0.5201016", "0.51625574", "0.5142739", "0.5124129", "0.51033294", "0.50957394", "0.50863266", "0.5078288", "0.50723624", "0.5062479", "0.5053234", "0.50...
0.48006633
61
Converts a secret key to a Key URI, which will be encode as a QR Code image to scan.
createKeyUri(key) { const type = "totp"; const jwt = this.context.getJWT(); const claims = core.JWT.claims(jwt); if (!claims) return Promise.reject(new Error('NoClaims')); const issuer = claims.dom || claims.iss; // will be used as a pref...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function anywhereizeURL(key) {\n return \"http://redirect.viglink.com?key=\" + key + \"&u=\" + encodeURIComponent(window.location.href);\n }", "async function generateSecretAndQR() {\n\t//Generate a secret key that will need to be inputted to Google Authenticator\n\tvar secret = speakeasy.generateSecret({\n\...
[ "0.5476937", "0.5209646", "0.50071067", "0.49796692", "0.49770832", "0.4934493", "0.489282", "0.4863917", "0.48354995", "0.48197475", "0.47814474", "0.47803673", "0.47644845", "0.47571412", "0.47536215", "0.47310573", "0.47130695", "0.47107807", "0.47007063", "0.46835786", "0...
0.54965246
0