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
Fetch post from API
async function getPosts() { const res = await fetch( `https://jsonplaceholder.typicode.com/posts?_limit=${limit}&_page=${page}` ); const data = await res.json(); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async post(url, post) {\n const res = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-type': 'application/json'\n },\n body: JSON.stringify(post)\n });\n const data = await res.json();\n return data;\n }", "function getPosts() {\n return fetch(api(\"post\"), ...
[ "0.7559702", "0.71282095", "0.70907336", "0.7033433", "0.69720817", "0.6923683", "0.67994183", "0.6790302", "0.67873573", "0.676451", "0.6744846", "0.67374223", "0.6722925", "0.6715896", "0.6707711", "0.6698409", "0.6697612", "0.6693393", "0.66898036", "0.6685425", "0.6674924...
0.0
-1
The Fetch API provides an interface for fetching resources (including across the network). show posts to DOM
async function showPosts() { const posts = await getPosts(); posts.forEach((post) => { const postEl = document.createElement("div"); postEl.classList.add("post"); postEl.innerHTML = ` <div class="post-number">${post.id}</div> <div class="post-info"> <h2 class="post-title">${post.title}</h2>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadData() {\n fetch(postLink)\n .then(e => e.json())\n .then(showData);\n}", "async function showPosts() {\n\tconst posts = await getPosts();\n\n\t// Get post one by one\n\tposts.forEach((post) => {\n\t\t// ! Create post container from api\n\t\tconst postEl = document.createElement('div');\n\t\t...
[ "0.74419624", "0.71538347", "0.70447767", "0.7032081", "0.7028631", "0.687506", "0.68692005", "0.6867765", "0.68661284", "0.6739684", "0.67341655", "0.6729106", "0.67176783", "0.66780096", "0.66379803", "0.6632766", "0.65112484", "0.6497501", "0.6469943", "0.6447617", "0.6403...
0.7526253
0
method during render of GestureHandlerRootView
function maybeInitializeFabric() { if ((0, _utils.isFabric)() && !fabricInitialized) { _RNGestureHandlerModule.default.install(); fabricInitialized = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onViewParsed() {\n\n }", "render() {\n return <Layout>\n <h3>Active Gestures</h3>\n\n {this.renderActiveGestures()}\n </Layout>\n }", "handleTap(){\n\n }", "onRender () {\n\n }", "onAfterRendering() {}", "_onTap(e) {}", "onKeypress(...
[ "0.6176459", "0.61698705", "0.61143565", "0.6111397", "0.6033665", "0.5984918", "0.5952146", "0.5952146", "0.58375955", "0.58236116", "0.57983714", "0.57983714", "0.5796099", "0.57953334", "0.5781384", "0.57781327", "0.57546425", "0.5750078", "0.5731611", "0.5730827", "0.5719...
0.0
-1
This function provides a common style for most of the TextBlocks. Some of these values may be overridden in a particular TextBlock.
function textStyle() { return { font: "9pt Segoe UI,sans-serif", stroke: "white" }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStyle() {\n const style = {};\n if (this.blockDef.bold) {\n style.fontWeight = \"bold\";\n }\n if (this.blockDef.italic) {\n style.fontStyle = \"italic\";\n }\n if (this.blockDef.underline) {\n style.textDecoration = \"underline\";\n ...
[ "0.64349777", "0.6312895", "0.6121684", "0.6059635", "0.6053667", "0.5828471", "0.5799658", "0.5799658", "0.5770236", "0.5770236", "0.56254065", "0.56151104", "0.5603219", "0.5603219", "0.5601277", "0.55873525", "0.55589926", "0.5544488", "0.55123895", "0.54869", "0.5482464",...
0.60670143
3
This converter is used by the Picture.
function findHeadShot(key) { return "../images/avatars/" + key + ".png" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst imageUtils = editor.plugins.get( 'ImageUtils' );\n\t\tconst t = editor.t;\n\n\t\t// View -> model converter for the data pipeline.\n\t\teditor.conversion.for( 'upcast' ).elementToElement( {\n\t\t\tview: element ...
[ "0.62757576", "0.6170519", "0.6147382", "0.60040486", "0.56372494", "0.5569796", "0.54578924", "0.5372656", "0.5372656", "0.5372656", "0.5372656", "0.53563005", "0.53520244", "0.531053", "0.5303572", "0.5272814", "0.5253806", "0.5225063", "0.5222201", "0.522157", "0.52188534"...
0.0
-1
An object to contain AStar searches, only one exists in this implementation.
function AStar() { // The frontier for the IDA* search. this.frontier = new PriorityMinQueue(); // Specifies where output info goes. this.htmlElement = ""; // The starting node of the search (essential for search restarts). this.startNode = null; // Initialized high here t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AstarSearch(obj){\r\n\r\n if(obj == undefined || obj.diagonal == undefined ){this.diagonal=false;}\r\n else{this.diagonal=obj.diagonal}\r\n\r\n if(obj==undefined || obj.weight ==undefined){this.weight=1;}\r\n else{this.weight=obj.weight;}\r\n\r\n if (this.diagonal === true) {\r\n if(...
[ "0.71599406", "0.60364926", "0.57202363", "0.5683997", "0.5681379", "0.5304008", "0.5223115", "0.51803565", "0.5169926", "0.51053154", "0.50768125", "0.50394446", "0.49954617", "0.4952211", "0.49450734", "0.4919258", "0.48994195", "0.48936102", "0.48666346", "0.48666346", "0....
0.63239753
1
gets called when this route is navigated to
componentDidMount() { // start a timer for the clock: this.timer = setInterval(this.updateTime, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onNavigate (routeData) {\n this.channel.trigger('before:navigate', routeData.linked)\n\n routeData.linked.show(routeData.params)\n .then(() => {\n this.channel.trigger('navigate', routeData.linked)\n })\n .catch((error) => {\n console.error(error)\n this.channel.trigger('error')\n ...
[ "0.68338245", "0.65659153", "0.6555451", "0.6555451", "0.6555451", "0.6555451", "0.6555451", "0.6555451", "0.6545883", "0.6496693", "0.6496693", "0.6496693", "0.6496693", "0.6496693", "0.6496693", "0.6496693", "0.6426429", "0.6353698", "0.627753", "0.6274653", "0.6261695", ...
0.0
-1
gets called just before navigating away from the route
componentWillUnmount() { clearInterval(this.timer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "beforeRouteLeave(to, from, next) {\n this.stopAutoUpdate();\n this.$destroy();\n next();\n }", "_outOfRouteChain(){\n // *Changing the route chain state:\n this._isInRouteChain = false;\n }", "function onBack() {\n resetPageState();\n }", "_onBack () {\n this....
[ "0.688825", "0.6794189", "0.6604459", "0.65926844", "0.6569644", "0.6568063", "0.65385914", "0.64972353", "0.648198", "0.6480898", "0.64605445", "0.6451676", "0.6444764", "0.6396431", "0.63944477", "0.6373002", "0.6348221", "0.631446", "0.6312613", "0.63111824", "0.63111824",...
0.0
-1
Note: `user` comes from the URL, courtesy of our router
render({ user }, {time, count}) { return (<div class={`page main-container ${style.profile}`}> <div style={{ width: 'fit-content', margin: '9vh auto 6vh auto', // maxWidth: '600px', backgroundColor: 'hsla(356, 11%, 7%, 0.85)', color: 'hsl(24, 18%, 88%)'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get user() { return this.args.user }", "function getUser () {return user;}", "user(username) {\n return this.request(`/users/${username}`);\n }", "function user(){\r\n uProfile(req, res);\r\n }", "getUser(user) {\n authClient.get(`https://myflix-2388-app.herokuapp.com/users/${user}`)\n ...
[ "0.69664514", "0.6874107", "0.6832463", "0.67756075", "0.67066455", "0.66096276", "0.6608816", "0.6597052", "0.6592026", "0.65807235", "0.6545667", "0.6543421", "0.65150684", "0.63773525", "0.63659865", "0.6340899", "0.63398033", "0.63236856", "0.63219887", "0.631782", "0.630...
0.0
-1
Tip: The reverse() method reverses an array in place. Tip: Reduce helper Solution 1
function reverse(str) { const arr = str.split(''); arr.reverse(); return arr.join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reverse(arr) {\n return arr.reverse();\n}", "function reverse(arr) {\n return arr.reverse()\n }", "reverse(arr) {\n return arr.reverse();\n }", "function reverse(arr){\n //code\n}", "function reverseInPlace(array) {\n let len = array.length;\n for (let i = len - 1; i >=...
[ "0.8292486", "0.8224611", "0.8081727", "0.8052224", "0.8038023", "0.8019703", "0.7978663", "0.7976147", "0.7967312", "0.79442996", "0.7925208", "0.7889584", "0.7878411", "0.7875457", "0.7852717", "0.78505206", "0.7848043", "0.7834084", "0.7817289", "0.7812016", "0.7809878", ...
0.0
-1
Clean up of Solution 1
function reverse(str) { return str.split('').reverse().join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(s) {\n\n}", "function solution(A) {\n\n}", "function solution(arr){\n\n}", "test(){\r\n\r\n const __quickSolver = (sudoku) =>{\r\n while(sudoku.simpleDeletion().status){}\r\n for(let i=1; i<=9; i++){\r\n for(let j=1; j<=9; j++){\r\n ...
[ "0.5858731", "0.5838681", "0.569938", "0.5345101", "0.5322961", "0.5228551", "0.52271223", "0.5216875", "0.5206701", "0.52002233", "0.51915056", "0.5176045", "0.51347184", "0.51238114", "0.512325", "0.51192194", "0.5110707", "0.50989705", "0.50980246", "0.50898635", "0.508408...
0.0
-1
Solution 2 (For Loop)
function reverse(str) { let reversed = ''; // for (var i = 0; i < str.length; i++) for (let character of str) { reversed = character + reversed; } return reversed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doubleFor(array) {\n let newArray = []\n for(let i = 0; i < array.length; i++) {\n for(let j = i + 1; j < array.length; j++) {\n console.log(i, j)\n \n }\n }\n return newArray\n \n}", "function forLoop(array) {\nfor (var i = 0; i < 25; i++)\n{\n if (i===1 || i===0){\n array.push(`...
[ "0.5994709", "0.58173466", "0.5785553", "0.5749754", "0.57314074", "0.5717916", "0.5696487", "0.56328976", "0.5604011", "0.5602563", "0.5602563", "0.5602563", "0.5599945", "0.5599945", "0.5571571", "0.5565091", "0.555728", "0.55502707", "0.5537464", "0.5530943", "0.55232567",...
0.0
-1
Solution 3 (Array Helper)
function reverse(str) { return str.split('').reduce((reversed, character) => { return character + reversed; }, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(arr){\n\n}", "function solution(arr) {\n var answer = [];\n return answer;\n}", "function ArrayUtils() {}", "function ex_8_I(a){\n n=Math.sqrt(a.length);\n b=[];\n for(var i=0; i<n; i++){\n b[i]=[];\n for(var j=0;j<n;j++){\n \tb[i][j]=a[n*i+j];\n }\n ...
[ "0.71926844", "0.6835646", "0.6641478", "0.6587351", "0.64432317", "0.64018494", "0.639177", "0.6379656", "0.6350011", "0.63288885", "0.6319846", "0.6310924", "0.6253616", "0.62482125", "0.6235627", "0.6233876", "0.62323904", "0.6224451", "0.62189454", "0.62124676", "0.621076...
0.0
-1
Clean up of Solution 3
function reverse(str) { return str.split('').reduce((rev, char) => char + rev, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(s) {\n\n}", "function solution(arr){\n\n}", "function optimal_compos_golden(adr)//mam sklad 7, szukam czy ktos na lawce sie nadaje//szukanie lepszego perfo-nie roz problem\n{\n if(adr==1)\n {\n \ttea = team1;//z tempo odczyt, a do tempz zapisuje;\n }\n else \n {\n \ttea = team2;//z tem...
[ "0.556119", "0.54721975", "0.54581124", "0.5430588", "0.5302449", "0.524653", "0.52215815", "0.5210049", "0.5204148", "0.519045", "0.5184723", "0.516493", "0.5157985", "0.514118", "0.5115263", "0.50983137", "0.50979894", "0.506491", "0.50638056", "0.5053945", "0.50534755", ...
0.0
-1
Created by ozt on 20140930.
function Poo() { this.posX = 0; this.posY = 0; this.width = 10; this.height = 10; this.vX = 0; this.vY = 2.5; this.isVisible = true; this.image = new Image(); this.image.src = "http://www.charbase.com/images/glyph/128169"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient final protected i...
[ "0.6538688", "0.6326312", "0.6098457", "0.60184646", "0.6001592", "0.59504956", "0.5861689", "0.58305264", "0.57340366", "0.5732795", "0.5675963", "0.56567734", "0.5640725", "0.5636125", "0.5636125", "0.56293344", "0.5616666", "0.55933607", "0.5578134", "0.5577411", "0.556286...
0.0
-1
Function to return a random integer between and including min and max arguments
function getRandInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randInt() {\n\tvar min = arguments[0];\n\tvar max = arguments[1];\n\tvar range = max - min;\n\tvar num = min + Math.floor((range + 1) * Math.random());\n\treturn num;\n}", "getRndInteger(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "function getRndInteger(min, max) {\...
[ "0.88184875", "0.8797317", "0.878879", "0.87869817", "0.8764561", "0.8757431", "0.8757431", "0.87365043", "0.87362987", "0.87318295", "0.8725864", "0.87201047", "0.87031525", "0.8697946", "0.8696858", "0.86965054", "0.86881584", "0.86868817", "0.8685729", "0.8685729", "0.8684...
0.0
-1
Function to randomly choose a new word from wordBank
function chooseWord() { // Create random number from 0 to wordBank index max let random = getRandInt(0, wordBank.length - 1); // Create currentWord object with random word from wordBank currentWord = new Word(wordBank[random]); // Create letter objects and add them to letters in word object currentWord.gen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseWord() {\n // Create random number from 0 to wordBank index max\n var random = randomInt(0, wordBank.length - 1);\n // Create currentWord object with random word from wordBank using the constructor from words.js\n currentWord = new Word(wordBank[random]);\n\n // Create letter objects and add th...
[ "0.8555273", "0.818587", "0.8111057", "0.8074363", "0.80542827", "0.7991704", "0.79684067", "0.7946945", "0.7898965", "0.78854203", "0.7883168", "0.7882043", "0.7880174", "0.7879379", "0.78751934", "0.7862138", "0.7808482", "0.7780909", "0.77594554", "0.77505565", "0.774826",...
0.86449313
0
Function to reinitialize variables.
function resetVars() { wordBank = defaults.words; score = defaults.score; lives = defaults.lives; userGuesses = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetVars() {\r\n this._current = undefined;\r\n this._nextRevisionNr = exports.INITIAL_REVISION_NEXT_NR;\r\n }", "function resetVars() {\n\t\tidArrays = [];\n\t\t_3DArrays = [];\n\t\t$scope.dataSetName = \"\";\n\t\tdataName = null;\n\t\tdragZone = {'left':-1, 'top':-1, 'right':-1, 'bottom':-1, ...
[ "0.7656313", "0.7572328", "0.71533126", "0.7106179", "0.6937581", "0.69221395", "0.6885531", "0.6884333", "0.680906", "0.67947006", "0.67320865", "0.6726475", "0.6721567", "0.6692336", "0.6658853", "0.6639621", "0.66331375", "0.66296875", "0.65978825", "0.6532834", "0.6513395...
0.6909996
7
Function to begin game;
function startGame() { // Reset variables resetVars(); // Get a random word chooseWord(); // Show current guesses and remaining lives printGuesses(); console.log("Lives left: " + lives + '\n'); // Print the word currentWord.printWord(); // Prompt user for input promptLetter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function startGame() {\n init();\n}", "function startGame(){\n initialiseGame();\n}", "function startGame(){\n countdown();\n question();\n solution();\n }", "function startgame() {\t\r\n\tloadImages();\r\nsetupKeyboardListeners();\r\nmain();\r\n}",...
[ "0.8687813", "0.82016855", "0.8190925", "0.8097429", "0.8078298", "0.78690165", "0.78665346", "0.7808455", "0.7792109", "0.77903175", "0.7764171", "0.7754266", "0.7720451", "0.77196246", "0.7708944", "0.76996636", "0.7670071", "0.76664764", "0.7665557", "0.7644971", "0.764496...
0.0
-1
Function to display win status and ask if the user would like to play again
function endGame(status) { switch (status) { case 'lose': console.log("You lost all of your lives!\n"); if (wordBank.length > 0) { playAgain(); } break; case 'win': console.log("Congratulations, you guessed all the letters!\n"); if (wordBank.length > 0) { pl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function win(){\n displayNoneList()\n document.getElementById(\"text\").innerHTML = \"Congratulations, Player420.6969, you've escaped the infinite hangover death loop, you should feel proud of yourself! Would you like to play again? \";\n document.getElementById('buttonConfirm').style.display = \"none\";\...
[ "0.7675656", "0.7601703", "0.7532081", "0.7445692", "0.74410015", "0.73686475", "0.73424596", "0.7325958", "0.72821945", "0.7275383", "0.726562", "0.7263805", "0.72453773", "0.72447604", "0.72446805", "0.72427154", "0.72332305", "0.7232507", "0.72317386", "0.72272664", "0.722...
0.0
-1
Function to prompt the user if they would like to play again
function playAgain() { inquirer.prompt([ { type: 'confirm', name: 'again', message: 'Would you like to play again?', default: false } ]).then(function(response) { switch (response.again) { case true: if (lives <= 0) { gameRun = false; startGame()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playAgain(){\n\tinquirer.prompt([\n\t{\n\t\ttype: \"confirm\",\n\t\tmessage: \"Would you like to play again?\",\n\t\tname: \"again\"\n\t}\n\t]).then(function(yes){\n\t\t\n\t\tif(yes.again){\n\t\t\tconsole.log(\"---------------------------------------------------\");\n\t\t\tstartGame();\n\n\t\t}else {\n\t\...
[ "0.83358514", "0.8203522", "0.8170647", "0.81642234", "0.8109461", "0.80720973", "0.80486", "0.795347", "0.7943593", "0.78686595", "0.78214484", "0.76789236", "0.76721525", "0.76692283", "0.76483124", "0.76178914", "0.76082885", "0.76017225", "0.75990313", "0.7573284", "0.757...
0.7951271
8
Function that loops through all userGuesses and sees if returns whether or not that letter has been guessed.
function checkIfGuessed(guess) { let hasBeenGuessed = false; userGuesses.forEach(function(currentGuess, index) { if (currentGuess === guess) { hasBeenGuessed = true; } }); return hasBeenGuessed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuessedLetters() {\n //This is checking that if users guess is in alailableLetters\n if(availableLetters.indexOf(this.event.key) > -1) {\n //Looping through guessed letters for the length of word\n for(var i = 0; i < word.length; i++) {\n //If the users guess has alread...
[ "0.838792", "0.8317343", "0.8242898", "0.81449354", "0.8142788", "0.812255", "0.81095076", "0.8064178", "0.80036825", "0.7893379", "0.7865603", "0.7826291", "0.7811593", "0.77324796", "0.7731187", "0.7684389", "0.7680051", "0.7596682", "0.75860053", "0.7562084", "0.75249696",...
0.74571955
24
Function to prompt the user for a letter.
function promptLetter() { inquirer.prompt([ { type: 'input', name: 'letter', message: 'Please guess a letter:', // Validate using is-letter npm package and our own // function to see if the letter has been guessed. validate: function(letter) { if (isLetter(letter) && !c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function promptUser() {\n return inquirer.prompt([\n {\n type: \"input\",\n name: \"letter\",\n message: \"Enter your letter\"\n }\n ])\n}", "function userInput(letter){\n \n\n}", "function letterPosition() {\n \"use strict\";\n var name, charName, ...
[ "0.7850778", "0.77714366", "0.755964", "0.7461222", "0.7094757", "0.709277", "0.6986323", "0.6833205", "0.6757313", "0.6738915", "0.671837", "0.6707147", "0.66763455", "0.66512483", "0.6600174", "0.65680695", "0.656369", "0.65481657", "0.6534844", "0.6529741", "0.6500355", ...
0.68739027
7
this method is called when click on query button of query form param oCondition is the field from query form
handleQuery(oCondition) { const {querySupplier} = this.props.actions; this.state.oCondition = oCondition; this.state.pagination.current = 1; querySupplier({ ...oCondition, pageSize: this.state.pagination.pageSize, currentPage: 1 - 1 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOnButtonClick(btn) {\r\n switch (btn) {\r\n case 'FILTER':\r\n var dividendEventId = dividendReportListGrid1.recordset(\"ID\").value;\r\n var policyNo = getObjectValue(\"policyNoCriteria\");\r\n var filterStr;\r\n if (dti.oasis.page.useJqxGrid())...
[ "0.6064433", "0.592777", "0.584314", "0.5842308", "0.58287376", "0.5780875", "0.5670018", "0.5662923", "0.5632468", "0.56311685", "0.5613117", "0.55855614", "0.5567933", "0.5559644", "0.5527981", "0.5526733", "0.5502213", "0.54927707", "0.549115", "0.54846835", "0.54783607", ...
0.69359463
0
this method is called when paging of the grid
handleGridChange(pagin){ const {querySupplier} = this.props.actions; querySupplier({ ...this.state.oCondition, pageSize: pagin.pageSize, currentPage: pagin.current - 1 }); this.state.pagination = pagin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handlePaging() {\n if (!this.settings.paging) {\n return;\n }\n\n this.element.addClass('paginated');\n this.tableBody.pager({\n componentAPI: this,\n dataset: this.settings.dataset,\n hideOnOnePage: this.settings.hidePagerOnOnePage,\n source: this.settings.source,\n pages...
[ "0.7410535", "0.7295641", "0.7198345", "0.6844984", "0.680218", "0.6745268", "0.67236155", "0.6619827", "0.65909016", "0.6586229", "0.6541389", "0.6463429", "0.64538", "0.64537436", "0.6443551", "0.6435947", "0.64354914", "0.6433076", "0.6428804", "0.64140064", "0.6379255", ...
0.64930815
11
Applies the styles saved in the style array to the style element in the head of the document
function updateStyles() { styleElement.innerHTML = styles[0] + styles[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static add_style_to_document(ul) {\n let head = document.head || document.getElementsByTagName('head')[0];\n let style = document.createElement('style');\n head.appendChild(style);\n if (style.styleSheet) {\n style.styleSheet.cssText = get_init_style(ul.config[\"container_id\...
[ "0.69793904", "0.6944215", "0.6850251", "0.6797895", "0.6765459", "0.6765459", "0.6745086", "0.6741137", "0.6715493", "0.6710543", "0.66678125", "0.65955806", "0.65662515", "0.655782", "0.65431446", "0.65137887", "0.65024376", "0.6499575", "0.6457291", "0.6446612", "0.6420762...
0.69109666
2
Updates the background gradients of the sliders given their value Updates the hex colour and its preview Updates the minipicker according to the computed hex colour
function updateSliderValue (sliderIndex, updateMini = true) { let toUpdate; let slider; let input; let hexColour; let sliderValues; toUpdate = sliders[sliderIndex - 1]; slider = toUpdate.getElementsByTagName("input")[0]; input = toUpdate.getElementsByTagName("input")[1]; /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMiniSlider(hex) {\n let rgb = hexToRgb(hex);\n\n styles[1] = \"input[type=range]#cp-minipicker-slider::-webkit-slider-runnable-track { background: rgb(2,0,36);\";\n styles[1] += \"background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, \" +\n \"rgba(\" + rgb.r + \",\" + r...
[ "0.7623087", "0.72919846", "0.72702235", "0.72383374", "0.7162956", "0.7145312", "0.70181954", "0.67534995", "0.6634518", "0.6621798", "0.65861493", "0.65740365", "0.6573322", "0.65558726", "0.65448445", "0.6539877", "0.6511901", "0.6508667", "0.64989346", "0.6485981", "0.646...
0.69189817
7
Calculates the css gradient for a slider
function getSliderCSS(index, sliderValues) { let ret = 'input[type=range]#'; let sliderId; let gradientMin; let gradientMax; let hueGradient; let rgbColour; switch (index) { case 1: sliderId = 'first-slider'; switch (currentPickerMode) { case ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCSS() {\n\tconst colors = document.querySelectorAll('.colors input');\n\tconst positions = document.querySelectorAll('.slide');\n\tconst sliderExample = document.querySelector('.gradient-slider');\n\tconst linearSettings = document.querySelector('.linear-settings');\n\tconst output = document.getEle...
[ "0.7164866", "0.7047488", "0.6797685", "0.6776318", "0.6753741", "0.67064893", "0.66621137", "0.6614999", "0.65933895", "0.6569071", "0.6561581", "0.65472084", "0.6522057", "0.64290726", "0.64222074", "0.6371233", "0.6328548", "0.6274076", "0.625322", "0.6223653", "0.62173754...
0.72744405
0
Computes the hue gradient used for hsl
function getHueGradientHSL(sliderValues) { return 'linear-gradient(90deg, rgba(2,0,36,1) 0%, \ hsl(0,' + sliderValues[1] + '%,' + sliderValues[2]+ '%) 0%, \ hsl(60,' + sliderValues[1] + '%,' + sliderValues[2]+ '%) 16.6666%, \ hsl(120,' + sliderValues[1] + '%,' + sliderValues[2]+ '%) 33.3333333333%, \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hsl(hue) {\n return function(start, end) {\n var h = hue((start = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"d\" /* hsl */])(start)).h, (end = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_d3_color__[\"d\" /* hsl */])(end)).h),\n s = __webpack_require__.i(__WEBPACK_IMPOR...
[ "0.81514555", "0.81514555", "0.81514555", "0.80045736", "0.78701645", "0.78488785", "0.7805904", "0.7805904", "0.7805904", "0.7805904", "0.7803876", "0.7730187", "0.7683818", "0.7593797", "0.7593797", "0.7577699", "0.75394034", "0.75012624", "0.75012624", "0.75012624", "0.748...
0.75147206
17
Computes the hue gradient used for hsv
function getHueGradientHSV(sliderValues) { let col = hsvToRgb(0, sliderValues[1], sliderValues[2]); let ret = 'linear-gradient(90deg, rgba(2,0,36,1) 0%, '; ret += 'rgba(' + col[0] + ',' + col[1] + ',' + col[2] + ',1) 0%,' col = hsvToRgb(60, sliderValues[1], sliderValues[2]); ret += 'rgba(' + col[0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateHSV(){\n\n // set a temporary value\n var t = hsl.s * (hsl.l < 50 ? hsl.l : 100 - hsl.l) / 100;\n\n // store the HSV components\n hsv =\n {\n 'h' : hsl.h,\n 's' : 200 * t / (hsl.l + t),\n 'v' : t + hsl.l\n };\n\n // correct a division-by-zer...
[ "0.7223048", "0.71848476", "0.7079962", "0.7079962", "0.7079962", "0.7017792", "0.7017792", "0.69814605", "0.69580877", "0.6892702", "0.6832795", "0.6821723", "0.6767787", "0.6766114", "0.67411995", "0.67257947", "0.6719863", "0.6711172", "0.66972744", "0.66865176", "0.666135...
0.7337112
0
Fired when the values in the labels are changed
function inputChanged(target, index) { let sliderIndex = index - 1; sliders[sliderIndex].getElementsByTagName("input")[0].value = target.value; updateSliderValue(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLabel() {\n\t\tlabelVal.text( slider._getLabelValCallback( brush.extent()[0] ) );\n\t\tlabelLabel.attr(\"transform\", \"translate(\" + (+sliderWidth + \n \t\t\t\t\t\t \t +labelVal[0][0].offsetWidth + \n \t\t\t\t\t\t \t +margin.labelSpace) + \n \t \",\" + sliderHeigh...
[ "0.7369538", "0.69230366", "0.6741552", "0.6529455", "0.64070755", "0.64018744", "0.6393689", "0.6385809", "0.6350522", "0.63362056", "0.6326101", "0.62850994", "0.62795395", "0.62736493", "0.6253503", "0.6198914", "0.6194642", "0.6188322", "0.6176222", "0.6170774", "0.615871...
0.0
-1
Updates the colour model used to pick colours
function changePickerMode(target, newMode) { let maxRange; let colArray; let rgbTmp; let hexColour = colourValue.value.replace('#', ''); currentPickerMode = newMode; document.getElementsByClassName("cp-selected-mode")[0].classList.remove("cp-selected-mode"); target.classList.add("cp-selecte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateColors () {\n // ADJUST COLOR VARIABLES FOR COLOR VALUE\n r = redSlider.value;\n g = greenSlider.value;\n b = blueSlider.value;\n\n // UPDATE ALL COLORS WITH NEW VALUES\n setColors(r, g, b);\n}", "function ChangeColorPallette(){\n updateColorPallette();\n}", "function overwriteColour(){...
[ "0.6693606", "0.6535804", "0.65151614", "0.6514942", "0.6484258", "0.64665616", "0.63591164", "0.63372105", "0.63244313", "0.62756455", "0.6274235", "0.626316", "0.6221296", "0.6208585", "0.6204839", "0.618921", "0.61864144", "0.61843586", "0.61573356", "0.6137225", "0.611976...
0.0
-1
Returns an array containing the values of the sliders
function getSlidersValues() { return [parseInt(sliders[0].getElementsByTagName("input")[0].value), parseInt(sliders[1].getElementsByTagName("input")[0].value), parseInt(sliders[2].getElementsByTagName("input")[0].value)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addSliders() {\n this.sliders = this.config.map(function createSlider(obj) {\n var slider = document.createElement('input'),\n valueElement = document.createElement('span');\n slider.type = 'range';\n slider.min = 0;\n slider...
[ "0.6951087", "0.6925286", "0.6922892", "0.6740015", "0.6632817", "0.6632376", "0.65413314", "0.65413314", "0.6456133", "0.64264333", "0.6391771", "0.63835293", "0.6372479", "0.6372479", "0.6362735", "0.6353035", "0.63232255", "0.6314245", "0.627993", "0.627993", "0.62774795",...
0.84798086
0
SECTION: MINIPICKER Moves the picker icon according to the mouse position on the canvas
function movePickerIcon(event) { event.preventDefault(); if (event.which == 1 || draggingCursor) { let cursorPos = getCursorPosMinipicker(event); let canvasRect = miniPickerCanvas.getBoundingClientRect(); let left = (cursorPos[0] - startPickerIconPos[0][0] - 8); let top = (curs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCursorPosMinipicker(e) {\n var x;\n var y;\n \n if (e.pageX != undefined && e.pageY != undefined) {\n x = e.pageX;\n y = e.pageY;\n }\n else {\n x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\n y = e.clientY + document.body....
[ "0.6795702", "0.65421295", "0.6513174", "0.61751384", "0.6168228", "0.6127829", "0.61052614", "0.608537", "0.6062295", "0.599393", "0.59084165", "0.5887206", "0.5858635", "0.58548737", "0.5837629", "0.5807242", "0.5774699", "0.5761147", "0.5745759", "0.5716377", "0.5692618", ...
0.75349456
0
Updates the main sliders given a hex value computed with the minipicker
function updateSlidersByHex(hex, updateMini = true) { let colour; let mySliders = [sliders[0].getElementsByTagName("input")[0], sliders[1].getElementsByTagName("input")[0], sliders[2].getElementsByTagName("input")[0]]; switch (currentPickerMode) { case 'rgb': colour = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMiniSlider(hex) {\n let rgb = hexToRgb(hex);\n\n styles[1] = \"input[type=range]#cp-minipicker-slider::-webkit-slider-runnable-track { background: rgb(2,0,36);\";\n styles[1] += \"background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, \" +\n \"rgba(\" + rgb.r + \",\" + r...
[ "0.7891417", "0.74427086", "0.7120436", "0.69189423", "0.6875367", "0.6763056", "0.6721239", "0.67102814", "0.6693423", "0.65908", "0.65312237", "0.6457617", "0.64180547", "0.64012855", "0.63318497", "0.6280493", "0.6276699", "0.6275693", "0.62584865", "0.6221675", "0.6213633...
0.8059992
0
Gets the position of the picker cursor relative to the canvas
function getCursorPosMinipicker(e) { var x; var y; if (e.pageX != undefined && e.pageY != undefined) { x = e.pageX; y = e.pageY; } else { x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; y = e.clientY + document.body.scrollTop + doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCursorPositionXY(e) {\n const rect = canvas.getBoundingClientRect();\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n cursorXPosition = x;\n cursorYPosition = y;\n}", "GetCursorStartPos()\n {\n let win = this.getCurrentWindowRead();\n return Vec2....
[ "0.7132261", "0.7117657", "0.6897535", "0.6894056", "0.6812906", "0.6803046", "0.6774244", "0.6666452", "0.666335", "0.66467017", "0.6644508", "0.66246", "0.662372", "0.6609835", "0.6585511", "0.6585511", "0.6585511", "0.6585511", "0.6585511", "0.6585511", "0.6585511", "0.6...
0.77732116
0
Updates the minipicker given a hex computed by the main sliders Moves the cursor
function updatePickerByHex(hex) { let hsv = rgbToHsv(hexToRgb(hex)); let xPos = miniPickerCanvas.width * hsv.h - 8; let yPos = miniPickerCanvas.height * hsv.s + 8; miniPickerSlider.value = hsv.v * 100; currPickerIconPos[0][0] = xPos; currPickerIconPos[0][1] = miniPickerCanvas.height - yPos; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMiniSlider(hex) {\n let rgb = hexToRgb(hex);\n\n styles[1] = \"input[type=range]#cp-minipicker-slider::-webkit-slider-runnable-track { background: rgb(2,0,36);\";\n styles[1] += \"background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, \" +\n \"rgba(\" + rgb.r + \",\" + r...
[ "0.7195309", "0.7045406", "0.65709704", "0.65290064", "0.6129676", "0.60460544", "0.60171634", "0.59333277", "0.5868387", "0.58656603", "0.58486253", "0.58171153", "0.58151555", "0.58150804", "0.5791165", "0.5731216", "0.5707151", "0.56547076", "0.5611488", "0.5609617", "0.55...
0.75789934
0
Fired when the value of the minislider changes: updates the spectrum gradient and the hex colour
function miniSliderInput(event) { let newHex; let newHsv = rgbToHsv(hexToRgb(getMiniPickerColour())); let rgb; // Adding slider value to value newHsv.v = parseInt(event.target.value); // Updating hex rgb = hsvToRgb(newHsv.h * 360, newHsv.s * 100, newHsv.v); newHex = rgbToHex(Math.round(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMiniPickerSpectrum() {\n let ctx = miniPickerCanvas.getContext('2d');\n let hsv = rgbToHsv(hexToRgb(colourValue.value));\n let tmp;\n let white = {h:hsv.h * 360, s:0, v: parseInt(miniPickerSlider.value)};\n\n white = hsvToRgb(white.h, white.s, white.v);\n\n ctx.clearRect(0, 0, mini...
[ "0.7187809", "0.70742494", "0.70721376", "0.6748724", "0.6589501", "0.64588416", "0.6372241", "0.63653004", "0.632334", "0.6291481", "0.6270426", "0.6267593", "0.62520707", "0.62520707", "0.6242041", "0.62204266", "0.6173809", "0.61635697", "0.6158816", "0.6158816", "0.610818...
0.70361936
3
Updates the hex colour after having changed the minislider (MERGE)
function updateMiniPickerColour() { let hex = getMiniPickerColour(); activePickerIcon.style.backgroundColor = '#' + hex; // Update hex and sliders based on hex colourValue.value = '#' + hex; colourPreview.style.backgroundColor = '#' + hex; updateSlidersByHex(hex); updateMiniSlider(hex); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMiniSlider(hex) {\n let rgb = hexToRgb(hex);\n\n styles[1] = \"input[type=range]#cp-minipicker-slider::-webkit-slider-runnable-track { background: rgb(2,0,36);\";\n styles[1] += \"background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, \" +\n \"rgba(\" + rgb.r + \",\" + r...
[ "0.70327085", "0.6896969", "0.68828744", "0.66933763", "0.66117114", "0.660606", "0.6585943", "0.65394765", "0.6488322", "0.6409884", "0.6398179", "0.6388493", "0.63884413", "0.6378171", "0.6341874", "0.63400626", "0.63388175", "0.6290063", "0.62876743", "0.6249063", "0.62311...
0.7215955
0
Returns the current colour of the minipicker
function getMiniPickerColour() { let hex; let pickedColour; pickedColour = miniPickerCanvas.getContext('2d').getImageData(currPickerIconPos[0][0] + 8, currPickerIconPos[0][1] + 8, 1, 1).data; hex = rgbToHex(pickedColour[0], pickedColour[1], pickedColour[2]); return hex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get color() {\n return this._color ||\n (this._datepickerInput ? this._datepickerInput.getThemePalette() : undefined);\n }", "get color() {\n return this._color ||\n (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);\n }", "current_color() {\n...
[ "0.690367", "0.6888732", "0.6817114", "0.6744643", "0.6631324", "0.6629423", "0.6611035", "0.65612656", "0.6481581", "0.6439832", "0.6410422", "0.64007527", "0.63376564", "0.6320402", "0.6313827", "0.6278648", "0.627671", "0.62722087", "0.6268578", "0.6259782", "0.62319684", ...
0.77693206
0
Update the background gradient of the slider in the minipicker
function updateMiniSlider(hex) { let rgb = hexToRgb(hex); styles[1] = "input[type=range]#cp-minipicker-slider::-webkit-slider-runnable-track { background: rgb(2,0,36);"; styles[1] += "background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,0,0,1) 0%, " + "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorSlider() {\n seek_slider.oninput = function() {\n\n var value = (this.value-this.min)/(this.max-this.min)*100;\n this.style.background = 'linear-gradient(to right, #fff 0%, #fff ' + value + '%, rgb(156, 152, 152) ' + value + '%, rgb(156, 152, 152) 100%)';\n };\n \n \n}", "...
[ "0.6849897", "0.68373704", "0.6762771", "0.67307335", "0.67259246", "0.65694726", "0.6469855", "0.6466286", "0.633865", "0.6289822", "0.6237684", "0.62313634", "0.6218333", "0.6197968", "0.6190118", "0.61628664", "0.61404866", "0.60897744", "0.60759145", "0.60184366", "0.6006...
0.7056918
0
Updates the gradient of the spectrum canvas in the minipicker
function updateMiniPickerSpectrum() { let ctx = miniPickerCanvas.getContext('2d'); let hsv = rgbToHsv(hexToRgb(colourValue.value)); let tmp; let white = {h:hsv.h * 360, s:0, v: parseInt(miniPickerSlider.value)}; white = hsvToRgb(white.h, white.s, white.v); ctx.clearRect(0, 0, miniPickerCanvas....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateGradient(inspiration) {\n const degreeValue = inspiration.degrees;\n picker1.value = inspiration.firstColor;\n picker2.value = inspiration.secondColor;\n split.value = inspiration.split;\n styleGradientForm(degreeValue);\n updateSplit();\n setContrastingColor();\n}", "function updateCanvas(...
[ "0.63528675", "0.62035865", "0.6089693", "0.6001857", "0.5973808", "0.59710246", "0.5969004", "0.59494835", "0.59450597", "0.59008515", "0.5879661", "0.5821259", "0.58198106", "0.5815837", "0.58046126", "0.5787751", "0.57277423", "0.5725452", "0.5692209", "0.5653289", "0.5632...
0.7389416
0
take in a color and return its brightness
function colorBrightness (color) { var r = parseInt(color.slice(1, 3), 16); var g = parseInt(color.slice(3, 5), 16); var b = parseInt(color.slice(5, 7), 16); return Math.round(((parseInt(r) * 299) + (parseInt(g) * 587) + (parseInt(b) * 114)) / 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brightness(hex){\n var r = parseInt(hex.slice(1, 3), 16);\n var g = parseInt(hex.slice(3, 5), 16);\n var b = parseInt(hex.slice(5, 7), 16);\n return Math.sqrt(0.299 * r**2 + 0.587 * g**2 + 0.114 * b**2);\n}", "function colorMagnitude(color) {\n var r = (color & 0xFF0000) >>> 16;\n var g = (color &...
[ "0.72816837", "0.7044865", "0.70430404", "0.70033336", "0.69810385", "0.6937023", "0.6935564", "0.6927607", "0.69137853", "0.6907604", "0.68489474", "0.68436277", "0.6766752", "0.67535025", "0.67213154", "0.6602332", "0.6602332", "0.6599936", "0.6579986", "0.6579414", "0.6570...
0.8257985
0
Generate some test data
function _getDummyData(){ return [ { "id": "fba28a4a-177d-444c-8901-3cf65232cfe8", "Company": "odlo-ch", "Url": "http://www.sap.com", "Picture": "http:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateTest() {\n // TODO\n}", "function generateSampleData() {\n \n console.log('Generating sample DB - remove before launch!');\n data = createSamplePrimitiveDB();\n\n console.log(data);\n\n}", "function generateExerciseData() {\n return {\n name: faker.name.title(),\n weigh...
[ "0.71974194", "0.6924941", "0.65888155", "0.65402895", "0.6516833", "0.65085363", "0.6422578", "0.6286714", "0.62628525", "0.6247895", "0.62126154", "0.6202463", "0.6181136", "0.6133605", "0.6082771", "0.60766304", "0.6075728", "0.5968762", "0.5937178", "0.5901524", "0.587976...
0.0
-1
include ('jscadutilscolor.jscad') include ('jscadutilsparts.jscad')
function getParameterDefinitions() { return [{ name: 'resolution', type: 'choice', values: [0, 1, 2, 3, 4], captions: ['very low (6,16)', 'low (8,24)', 'normal (12,32)', 'high (24,64)', 'very high (48,128)'], initial: 3, caption: 'Resolution:' }]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initJSColor(){\n\tjscolor.installByClassName('jscolor');\n}", "function DiagnosesComponentStyle(){\r\n this.initByNamespace(\"dx\");\r\n}", "function init()\n{\n\tdebug('init');\n\t//make_color_coll();\n\tmake_color_defs_for_Littlefoot();\n}", "function setup() {\n createCanvas(windowWidth, wind...
[ "0.6274485", "0.56229734", "0.55492234", "0.5502617", "0.5454931", "0.54522955", "0.5433973", "0.5384154", "0.53756386", "0.53441215", "0.53285813", "0.5322718", "0.5294608", "0.52915704", "0.528343", "0.5229289", "0.52167547", "0.51922303", "0.51783377", "0.5149654", "0.5134...
0.0
-1
agrega a cada nombre del estado(cantidad de input) su respectivo valor
render() { if (this.props.isAuthenticated) {// se valida el estado del usuario por medio de la variable autenticacion return <Redirect to="/" />; // se se encuentra autenticado se retorna a la pagina principal } const { username, password } = this.state; // asocia las variables de la...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Selecionar(Nombre){\n \n if(Inicio != 0){\n if(Estado < 10){\n if(Estados[Nombre - 1].Estado == 2){\n if(Estado % 2 != 0){\n $(\"#\"+Nombre).text('x');\n Estados[Nombre -1].Estado = 1; \n \n ...
[ "0.658742", "0.59965897", "0.599193", "0.598887", "0.59407485", "0.5919835", "0.58643246", "0.576649", "0.57660544", "0.57530344", "0.5734226", "0.57176137", "0.56971437", "0.5678584", "0.567005", "0.56670356", "0.5653692", "0.56435317", "0.56416065", "0.56316364", "0.5612263...
0.0
-1
called after the scene loads
function onLoad(framework) { var scene = framework.scene; var camera = framework.camera; var renderer = framework.renderer; var gui = framework.gui; var stats = framework.stats; // load basic house var objLoader = new THREE.OBJLoader(); objLoader.load('geo/house.obj', function(obj) { var cubeGeo = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeScene(){}", "onCreate(scene, custom) {}", "function InitScene() {\n\tthis.mPersist = false;\n}", "onGraphLoaded() {\n\n this.camera = this.gameOrchestrator.theme.camera;\n\n this.interface.setActiveCamera(this.camera);\n\n this.axis = new CGFaxis(this, this.gameOrchestrator.the...
[ "0.70820403", "0.69506437", "0.6949333", "0.69193465", "0.6895598", "0.6876942", "0.6850007", "0.6849232", "0.6784582", "0.67342114", "0.6733077", "0.66534495", "0.6560797", "0.6557133", "0.6540043", "0.65120363", "0.65120363", "0.65062696", "0.6494452", "0.6492269", "0.64922...
0.0
-1
clears the scene by removing all geometries added by turtle.js
function clearScene(turtle) { var obj; for( var i = turtle.scene.children.length - 1; i > 3; i--) { obj = turtle.scene.children[i]; turtle.scene.remove(obj); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearScene() {\n for (var i = scene.children.length - 1; i >= 0; --i) {\n var obj = scene.children[i];\n scene.remove(obj);\n }\n}", "clear() {\n this.stop();\n this.scene.remove.apply(this.scene, this.scene.children);\n this.scene.background = null;\n thi...
[ "0.78594", "0.779116", "0.77634645", "0.77521825", "0.77497494", "0.76082706", "0.75433624", "0.7503136", "0.74327326", "0.7387261", "0.7377607", "0.73739994", "0.7361249", "0.73186255", "0.7314044", "0.7127234", "0.71202075", "0.70964575", "0.702416", "0.7017996", "0.6982997...
0.8173036
0
called on frame updates
function onUpdate(framework) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onFrame() \n{\n\tupdate();\n}", "function do_frame() {\n\t\t\tupdate_stats();\n\t\t\tif(!call_user_callbacks()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tupdate();\n\t\t\tdraw();\n\n\t\t\tmedeactx.frame_flags = 0;\n\t\t}", "updateFrame() {\n this._drawFrame();\n }", "didUpdate() { }", "afterUpdate...
[ "0.7842113", "0.72574705", "0.72541094", "0.71250457", "0.70214397", "0.6789228", "0.678447", "0.6766292", "0.6743076", "0.6743076", "0.6726378", "0.6712846", "0.66751945", "0.659663", "0.6577417", "0.6545766", "0.6511005", "0.6496999", "0.64746845", "0.6463169", "0.6444191",...
0.6550783
15
Fetch the matches' name, birth, sex when page loads.
async function fetchMatchInfo() { try { const token = currentUser && (await currentUser.getIdToken()); var config = { method: 'post', url: bp.buildPath('api/getbasicuser'), headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}`, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadSexList() {\n\tLookup.all({where: {'lookup_type':'SEX'}}, function(err, lookups){\n\t this.sex_list = lookups;\n\t next(); // process the next tick. If you don't put it here, it will stuck at this point.\n\t}.bind(this));\n}", "function reqPerson() {\n\t\tif(this.status === 404){\n\t\tthrowError();...
[ "0.56617963", "0.5392866", "0.5372811", "0.5359427", "0.53593427", "0.52498126", "0.5235926", "0.52100146", "0.52081627", "0.518369", "0.5166389", "0.5148274", "0.51230353", "0.5116277", "0.5112946", "0.51084", "0.5089134", "0.5031472", "0.5017642", "0.50146085", "0.50031596"...
0.0
-1
This disconnects then sends to the /after page with a state.
function leavePageWith(stateString) { socketRef.current.emit('leave-room-silently', currentUser.uid, room); history.push('/after', { state: { match_id: match_id, type: stateString }, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disconnectPeer(){\n\twindow.location.href = homeURL;\n}", "afterConnect() {}", "afterConnect() {}", "disconnect(){}", "onDisconnect()\n {\n this.connected = false;\n this.clearStates();\n this.emit(Connection.onDisconnect);\n }", "_after() {\n this._exitContext(...
[ "0.5837242", "0.580259", "0.580259", "0.5758276", "0.56853753", "0.5682406", "0.56140375", "0.56013155", "0.55978674", "0.5574904", "0.55334383", "0.55154663", "0.5505318", "0.5504323", "0.5501121", "0.5481239", "0.5447392", "0.5441719", "0.5436133", "0.5425909", "0.5419253",...
0.5371343
25
This sets both eachothe to success matches, if we get actually get there.
async function setSuccessMatches() { await firestore .collection('users') .doc(currentUser.uid) .update({ SuccessMatch: firebase.firestore.FieldValue.arrayUnion(match_id), }); await firestore .collection('users') .doc(match_id) .update({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "replaceSucceeded() {}", "function setMatchScoreSuccess(teams) {\n setStandings(teams);\n CURRENT_MATCH = null;\n}", "function matchSuccess() {\n matchCard1.addClass(\"animated pulse matched\");\n matchCard2.addClass(\"animated pulse matched\");\n matches++;\n if (matches === pairs) {\n s...
[ "0.60724974", "0.58008265", "0.5772556", "0.56514025", "0.55773544", "0.5469245", "0.54457474", "0.5436714", "0.54034954", "0.54027814", "0.53325695", "0.53325695", "0.53325695", "0.53325695", "0.53325695", "0.5253873", "0.5221285", "0.5215306", "0.52075684", "0.5190597", "0....
0.61458945
0
eslintdisableline reacthooks/exhaustivedeps restore previous messages if the localStorage array indicates that some key was used
function restorePreviousMessages() { var temp = 1701; while (localStorage.getItem(JSON.stringify(temp)) !== null) { if (localStorage.getItem(JSON.stringify(temp)) === 'me') { temp += 7; displayMessage(localStorage.getItem(JSON.stringify(temp)), 'sent'); } else { temp += 7; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useLocalStorage(initialValue, key) {\n // We check that there is a property with that name that has content\n const stored = localStorage.getItem(key)\n // if there is content we parse it or if we don't define initial to the value provided by the params\n const initial = stored ? JSON.parse(stored) : ...
[ "0.6592875", "0.6363786", "0.6286123", "0.6278008", "0.60710484", "0.60319644", "0.60050094", "0.60050094", "0.5991381", "0.58992296", "0.58961785", "0.5884435", "0.58579963", "0.5845656", "0.5844834", "0.5836135", "0.5829064", "0.58235526", "0.5800028", "0.57964724", "0.5789...
0.6416449
1
Two modes added for some extra processing (like maybe classes or etc)
function displayMessage(message, mode, messageID = '', is_offline) { if (window.location.pathname === '/chat') { var suffix = ''; if (mode === 'received') { suffix = ' (them)'; // const div = document.createElement('div'); // div.textContent = message + suffix; // documen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get mode() {}", "get mode() { return this._mode; }", "get mode() { return this._mode; }", "function modeSwitch(mode) {\n\tresetViews();\n resetCameras();\n\tswitch(mode) {\n\t\tcase \"absolute\":\n\t\t\tupdateShipData(true);\n\t\t\tstepSize = 1; // reset step size\n\t\t\tcurrentMode = 1;\n\t\tbreak;\n\t\t...
[ "0.60898", "0.5941015", "0.5941015", "0.5885112", "0.5875414", "0.582483", "0.5797865", "0.5751088", "0.5712354", "0.5701046", "0.56893945", "0.56803584", "0.56559336", "0.5648929", "0.5617866", "0.5606812", "0.5595702", "0.5566664", "0.5566664", "0.55664384", "0.5552048", ...
0.0
-1
erase chat log stored in local storage
function clearChatData() { if (observer.current !== null) observer.current(); var temp = 1701; console.log('Cleared chat data.'); localStorage.removeItem('inActiveChat'); localStorage.removeItem('activeSocket'); while (localStorage.getItem(JSON.stringify(temp)) !== null) { localStorage.rem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear_client_log()\n\t{\n\t\t// Remove indicator icon\n\t\tjQuery('#topmenu_info_error').remove();\n\n\t\tif (!window.localStorage) return false;\n\n\t\tvar max = MAX_LOGS;\n\t\t// check if we have more log entries then allowed, happens if MAX_LOGS get changed in code\n\t\tif (window.localStorage[LASTLOG]...
[ "0.6556904", "0.6539631", "0.6539631", "0.6512531", "0.6470639", "0.63755417", "0.6372349", "0.63322", "0.629571", "0.6248678", "0.62435055", "0.6211823", "0.618885", "0.6180128", "0.61794275", "0.61715895", "0.613786", "0.6117248", "0.6106037", "0.6103138", "0.6091908", "0...
0.7471623
0
redirect authorized user to dashboard
static validateAuthorization(props) { if (localStorage.getItem('user')) props.history.push('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dashboardRedirect(req, res, next){\n\tif(req.user){\n\t\tres.redirect('/dashboard');\n\t}\n\telse{\n\t\tnext();\n\t}\n}", "function redirectUserToThePageAccordingToHisRole() {\n UserService.requestUser((res) => {\n if (!res.data.success) {\n return Notificati...
[ "0.7914973", "0.7266033", "0.7249962", "0.72182965", "0.69525003", "0.6833333", "0.68332577", "0.68223846", "0.68111616", "0.6805445", "0.68002415", "0.6765005", "0.6758395", "0.667449", "0.6655709", "0.66117686", "0.6549193", "0.6546745", "0.6541862", "0.65393883", "0.653274...
0.6059317
78
Each bar represents a single discrete quantity.
function createData(dataName, currSM){ var values = []; var dataObject = allData[dataName][currSM]; var keys = Object.keys(dataObject); for (var i = 0; i < keys.length; i++) { var individualDataObject = { "label": keys[i], "value": dataObject[keys[i]] }; values.push(individualDataObject)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderBars() {\n return sortEnergy().map( (item,i)=>{\n return <Bar \n bar={item} \n key={i} \n select={select} \n index={i} \n onClick={()=>setSelect(i)} \n onMouseLeave={()=>setSelect(-1)}>\n {item.name} {...
[ "0.70589733", "0.6571535", "0.6505752", "0.63379353", "0.63288575", "0.6286221", "0.62281454", "0.6205997", "0.61551404", "0.6096244", "0.6076104", "0.6065118", "0.6060768", "0.6057073", "0.6052691", "0.6048513", "0.6044129", "0.6020159", "0.601573", "0.598036", "0.5976621", ...
0.0
-1
you can only write your code here!
function shop(shoppers,item){ var person = []; var profit = 0; var stok = item[2]; for (var i = 0; i < shoppers.length; i++){ if(shoppers[i].product === item[0] && shoppers[i].amount <= stok){ stok -= shoppers[i].amount; profit += item[1]*shopp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "function _____SHARED_functions_____(){}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "static private internal function ...
[ "0.6697473", "0.64510566", "0.6395561", "0.62958", "0.61033803", "0.6083399", "0.6074526", "0.60422486", "0.60295534", "0.602307", "0.599555", "0.59687126", "0.59435284", "0.59124917", "0.59124917", "0.59124917", "0.59124917", "0.59124917", "0.59124917", "0.59124917", "0.5912...
0.0
-1
grabPageTextFromHTML returns how it is stored, but it makes more sense for it to be a single line
function cleanUpPageText (text) { return text.replace(/[\n\r]/g, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTextFromHtml(html) {\n\treturn htmlToText.fromString(html);\n}", "function getText(html) { // Returns text from HTML while trying to preserve structure\n return html.replace(/<[^>]+>/g, '');\n // https://stackoverflow.com/a/41756926/6364386\n}", "async function getText(source) {\n // initialize ...
[ "0.65567404", "0.6477874", "0.6205231", "0.61764944", "0.61355716", "0.6106261", "0.60287607", "0.5880657", "0.5873498", "0.57928276", "0.57147735", "0.5701033", "0.5693323", "0.56578386", "0.5631307", "0.5619349", "0.5610189", "0.5610189", "0.5610189", "0.5610189", "0.561018...
0.5786777
10
Note: on search.html there is this element: unsure as to what it is used for It might be some verification that they actually loaded the page so we'll include it as a param
async function search (text, autoSplit=true) { if (typeof(text) !== 'string') { throw new TypeError("Text was not string"); } // We limit it to 3000chars max just to be ultra safe if (!autoSplit && text.length > 3000) { throw new Error("search text length was greater than 3000 characters (LoB limits to 3200, b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get tag(){return\"site-search\"}", "function defaultFind() {\n var search1 = $(\"input#search1\").val()\n var search2 = $(\"input#search2\").val()\n var csrfid = $(\"input#csrf_id_find\").val()\n var findUrl;\n if(typeof(finderValues[actTab]) !== 'undefined') {\n ...
[ "0.6882871", "0.6367997", "0.6319673", "0.62617415", "0.6237156", "0.6210044", "0.61925286", "0.6169918", "0.61684936", "0.60566366", "0.6015626", "0.5982122", "0.5964545", "0.59466994", "0.5865156", "0.5853393", "0.58530235", "0.5852056", "0.58421266", "0.5836707", "0.583575...
0.0
-1
Word Cloud Encapsulate the word cloud functionality
function wordCloud(selector) { var fill = color; //Construct the word cloud's SVG element var svg = d3.select(selector).append("svg") .attr("width", 500) .attr("height", 500) .append("g") .attr("transform",...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateWordCloud() {\r\n var wordCloud = [];\r\n var wordFreq = getFrequencyDict(g_words);\r\n\r\n // Build D3 word-cloud object\r\n Object.keys(wordFreq).forEach((word) => {\r\n wordCloud.push({\r\n 'text': word,\r\n 'size': wordFreq[word] * 180 // px sqrt scale\r\n });\r\n });\r\n\r\...
[ "0.7517151", "0.74966156", "0.7268667", "0.70920527", "0.7079743", "0.70612663", "0.7034486", "0.6982095", "0.69713235", "0.69235295", "0.68655014", "0.6706465", "0.6683265", "0.66645956", "0.657967", "0.6468548", "0.63972414", "0.6314138", "0.630062", "0.627336", "0.6241463"...
0.72296333
3
Draw the word cloud
function draw(words) { var cloud = svg.selectAll("g text") .data(words, function(d) { return d.text; }); //Entering words cloud.enter() .append("text") .style("font-family", "Impact") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw(words)\n\t\t{\n\t\t\td3.select(\"#\" + TAGS_CONTAINER).append(\"svg\")\n\t\t\t\t.attr(\"width\", CONTAINER_WIDTH)\n\t\t\t\t.attr(\"height\", CONTAINER_HEIGHT)\n\t\t\t\t.attr(\"id\", WORD_CLOUD_ID)\n\t\t\t\t.append(\"g\")\n\t\t\t\t.attr(\"transform\", \"translate(30, \" + HEADER_HEIGHT + \")\")\n\t\t\...
[ "0.7814927", "0.7767438", "0.7548907", "0.74932706", "0.7480319", "0.74487406", "0.73883486", "0.7382088", "0.7361733", "0.73538446", "0.7342063", "0.7342063", "0.73321533", "0.732126", "0.72579294", "0.7240162", "0.72391605", "0.7231103", "0.72193295", "0.7197217", "0.717097...
0.7083751
26
Returns an array of tick angles and values for a given group and step.
function groupTicks(d, step, senses) { var k = (d.endAngle - d.startAngle) / d.value; return d3.range(0, d.value, step).map(function(value) { return {value: senses[d.index], angle: value * k + d.startAngle}; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupTicks(d, step) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, step).map(function(value) {\n return {value: value, angle: value * k + d.startAngle};\n });\n }", "function groupTicks(d, step) {\r\n\t\t var k = (d.endAngle - d.start...
[ "0.71193457", "0.7093029", "0.7072128", "0.6945058", "0.6945058", "0.6945058", "0.6945058", "0.615595", "0.6144701", "0.6048196", "0.5990625", "0.58919233", "0.58919233", "0.58899146", "0.5695938", "0.5640856", "0.54994607", "0.5299352", "0.5121278", "0.5063496", "0.5061687",...
0.68299466
7
We have to check the brush before we draw the focus chart's lines. Purely because if we add or remove a line, it might change the xdomain, and this could mean that if there's a brush, it might be partially or entirely off either end of the context chart.
function setBrushAndLines() { if (! brush.empty()) { var brushExtent = brush.extent(); var xDomain = contextXScale.domain(); if (brushExtent[0] > xDomain[1] || brushExtent[1] < xDomain[0] ) { // Things have changed so much the brush is now ent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderBrush() {\n // So that we don't draw another brush when updating an existing chart:\n if (d3.select('g.brush').empty()) {\n\n brush = d3.svg.brush().x(contextXScale)\n .on('brush', brushed);\n \n renderLines('context');\...
[ "0.7303953", "0.72198", "0.7217625", "0.69630045", "0.6901276", "0.6880491", "0.6876514", "0.67948985", "0.67153406", "0.66590506", "0.65168417", "0.65153587", "0.65153587", "0.65079737", "0.65079737", "0.646837", "0.6462653", "0.6437387", "0.64239913", "0.6416022", "0.638679...
0.8093433
0
Adds horizontal lines halfway up chart and at top.
function renderFocusGrid() { focusAxesG.selectAll('path.line.grid') .data([ [ [focusXScale.domain()[0], 0.5], [focusXScale.domain()[1], 0.5] ], [ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawLines() {\n // Early bailout for timeaxis without start date\n if (!this.client.timeAxis.startDate) {\n return;\n }\n\n // We cannot rely on timeAxisViewModel because rendered header may not include full top header.\n // This means we should generate whole top level tick and then iterate ov...
[ "0.62655115", "0.5996166", "0.58883345", "0.58804935", "0.58644193", "0.58447754", "0.5706209", "0.56964666", "0.56964666", "0.56964666", "0.56231964", "0.5611999", "0.56078094", "0.56078094", "0.56071836", "0.5605806", "0.5598828", "0.55927587", "0.55702096", "0.5560092", "0...
0.0
-1
Draw each of the lines, on either of the charts. `chart` is either 'focus' or 'context'.
function renderLines(chart) { // Each chart has its own element that we draw in, and its own line object. if (chart == 'context') { var chartEl = contextG; var chartLine = contextLine; } else { var chartEl = focusG; var chartLine = focusLine; }; var line =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCharts() {\n // Set the variables for the first chart and its context\n // and call the drawLineChart function\n var ordersCan = $(\"#ordersChart\"),\n ordersCtx = ordersCan[0].getContext(\"2d\");\n drawLineChart(ordersData, ordersCtx, ordersCan);\n\n // Set the context variable for the seco...
[ "0.6737688", "0.63400024", "0.63036364", "0.6165566", "0.60672987", "0.5957367", "0.59329724", "0.5849167", "0.5849167", "0.58329517", "0.581995", "0.57915044", "0.57705706", "0.56702477", "0.5613608", "0.55989444", "0.5598294", "0.5585694", "0.5554824", "0.55340976", "0.5522...
0.74855673
0
Most of the stuff for drawing the context/brush chart.
function renderBrush() { // So that we don't draw another brush when updating an existing chart: if (d3.select('g.brush').empty()) { brush = d3.svg.brush().x(contextXScale) .on('brush', brushed); renderLines('context'); con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderPaintBrush(wL,wH,hL,hH,kPoints) {\n\t\t// abstract\n\t}", "draw() {\n this._updateWidthHeight();\n\n this.initSvg();\n // bar char\n if (this.keysBar) {\n this.aggregateLabelsByKeys(this.selection, this.keysBar);\n }\n\n if (this.keysX && this.keysY) {\n this.aggregateValuesByKe...
[ "0.7014181", "0.6954644", "0.691845", "0.6841074", "0.6833615", "0.6778203", "0.67246693", "0.6691893", "0.66901493", "0.66802835", "0.6660752", "0.665157", "0.662748", "0.6606468", "0.65876144", "0.6514067", "0.64962244", "0.6485318", "0.6467052", "0.6467052", "0.64466447", ...
0.6957061
1
What happens when the brush in the context area is moved / changed.
function brushed() { focusXScale.domain(brush.empty() ? contextXScale.domain() : brush.extent()); // Redraw lines. focusG.selectAll('path.line.feeling') .attr('d', function(d) { return focusLine(d.values); }); // Redraw x-axis. focusG.select(".x.axis").call(focusXAxis); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brushUpdated(newSelection) {\n\t __.brushed = newSelection;\n\t events.brush.call(pc, __.brushed);\n\t pc.renderBrushed();\n\t }", "function d3_svg_brushMove(e) {\n if (d3_svg_brushOffset) {\n var bgOffset = $(d3_svg_brushTarget).offset();\n var mouse = [e.pageX - bgOffset.left, e.pageY...
[ "0.6815073", "0.6563864", "0.64739406", "0.6391566", "0.6387365", "0.6327872", "0.62112665", "0.61571246", "0.6153633", "0.61504143", "0.6141097", "0.61341953", "0.613414", "0.6098593", "0.6091969", "0.60848576", "0.6083747", "0.6069089", "0.6063319", "0.6022371", "0.6016679"...
0.5641102
71
Draws the invisible circles on each point which, when hovered over, show the tooltip with info about that point.
function renderTooltips() { // Add a container for each line to hold all of its dots. var dotsG = focusG.selectAll('g.dots') .data(function(d) { return d; }, function(d) { return d.id; }); dotsG.enter().append('g') .a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTooltip(d, i) {\n // Save the chosen circle (so not the voronoi)\n const element = d3.select(`.marks.${d[idVariable]}`)\n\n const el = element._groups[0]\n // Define and show the tooltip\n $(el).popover({\n placement: 'auto top',\n container: '#chart',\n trigger: 'manual'...
[ "0.69084257", "0.6839212", "0.6625896", "0.64857256", "0.63751084", "0.63298714", "0.630099", "0.62565416", "0.6228558", "0.61996084", "0.6192965", "0.61911464", "0.61761737", "0.6175684", "0.61635995", "0.61476034", "0.61253244", "0.61189103", "0.609083", "0.609083", "0.6075...
0.682886
2
Called when the user hovers over one of the invisible circles on a point.
function tooltipOn(d) { tooltip.html(tooltipContent(d)); var tooltipWidth = parseInt(tooltip.style('width'), 10); var tooltipHeight = parseInt(tooltip.style('height'), 10); var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; // Default positions, a bit to th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseOverCircle() {\n $(this).css(\"opacity\", \"0.5\");\n }", "function mouseoverCircle() {\n\n\t// Get circle\n\tvar circle = d3.select(this);\n\n\t// Display activated circle\n\tcircle.attr(\"r\", circle.attr(\"r\") * circleEnlargeConstant);\n\n}", "function handlePointHoverEnter (e) {\n ...
[ "0.7475283", "0.7269089", "0.7102883", "0.7102883", "0.69271845", "0.6873232", "0.6807543", "0.6740487", "0.6731371", "0.6701888", "0.6701888", "0.6592596", "0.65687037", "0.65389025", "0.652215", "0.65195304", "0.6510633", "0.6473344", "0.6458675", "0.64481795", "0.63936824"...
0.0
-1
Called when the user hovers out of one of the circles.
function tooltipOff(d) { tooltip.style('left', '-10000px'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onMouseOut_() {\n this.updateHoverStying_(false);\n }", "function mouseOutCircle() {\n $(this).css(\"opacity\", \"1\");\n }", "onElementMouseOut(event) {\n super.onElementMouseOut(event);\n\n const me = this;\n\n // We must be over the event bar\n if (\n event.target.cl...
[ "0.7500674", "0.7116317", "0.70763224", "0.7017349", "0.70099396", "0.7006785", "0.6989266", "0.69671047", "0.6883179", "0.68314207", "0.6793793", "0.6778375", "0.6777406", "0.67543554", "0.66333896", "0.66244304", "0.66134053", "0.65633005", "0.6547455", "0.65338653", "0.652...
0.0
-1
Generates the content for an individual tooltip. The HTML is in mappiness.templates.
function tooltipContent(d) { // https://github.com/mbostock/d3/wiki/Time-Formatting var formatTime = d3.time.format('%H:%M %a %e %b %Y'); // Go from 0.082341 to 8. var formatFeeling = function(f) { return Math.round(f*100); }; var tooltipData = { start_time: formatT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get tooltipTemplate() {\n return html`<simple-tooltip\n id=\"tooltip\"\n for=\"button\"\n ?hidden=\"${!this.currentTooltip && !this.currentLabel}\"\n position=\"${this.tooltipDirection || \"bottom\"}\"\n >${this.currentTooltip || this.currentLabel}</simple-tooltip\n >`;...
[ "0.70861846", "0.6829594", "0.6557458", "0.6543802", "0.6517999", "0.6493227", "0.64816976", "0.64487994", "0.6437747", "0.6433328", "0.6384675", "0.63764924", "0.63662046", "0.63471943", "0.6288963", "0.62716955", "0.62520427", "0.6245438", "0.6242975", "0.6234308", "0.62141...
0.60613954
36
Return the string used for a line's CSS ID. id is the numeric ID of the line. chart is 'context' or 'focus'.
function lineCSSID(id, chart) { return chart + '-' + id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lineOfId(id) {\n return parseInt(id.charAt(4));\n}", "function id(d) {\n return d.id;\n }", "getCSS(_id) {\n return this._elements[_id].style.cssText;\n }", "getCSS(_id) {\n return this._elements[_id].style.cssText;\n }", "function linePrefix(id, seq) {\n\treturn \"0x\" + id.toS...
[ "0.6143846", "0.59092534", "0.5628908", "0.5628908", "0.5524137", "0.53304684", "0.53187966", "0.5304156", "0.5253399", "0.5248065", "0.5213485", "0.51900643", "0.51746905", "0.5171697", "0.5165244", "0.5151581", "0.5122799", "0.5089443", "0.50866735", "0.5071746", "0.5063388...
0.8803654
0
? array[Math.floor(array.length / 2)] : (array[array.length / 2] + array[(array.length / 2) 1]) / 2
function getMiddle(array){ if(array.length % 2){ const middelIndex = Math.floor(array.length / 2); return array[middelIndex]; }else{ const index1 = array.length / 2; const index2 = index1 - 1; return (array[index1] + array[index2]) / 2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMiddle(arr) {\n let half = Math.floor(arr.length / 2);\n if (arr.length % 2 === 0) {\n return (arr[half] + arr[half - 1]) / 2;\n } else {\n return arr[half];\n }\n}", "function med(arr) {\r\n let a = arr.length;\r\n if (a % 2 == 1) {\r\n console.log(arr[(a - 1) / 2]);\r...
[ "0.7449576", "0.72337455", "0.72242725", "0.6824808", "0.6680769", "0.663656", "0.66289943", "0.65929264", "0.65744907", "0.65691847", "0.6565117", "0.65600514", "0.65595406", "0.6542907", "0.6511841", "0.6499996", "0.64536285", "0.6448863", "0.6415407", "0.64128923", "0.6394...
0.70797795
3
Stores the data for the guided tours.
constructor(data, cropVis) { this.data = data; this.cropVis = cropVis; this.cropVis.guidedTours = this; this.almondsString = "In 1961, Spain produced more than twice as many almonds as any other country. Spain's production did not change much overall between 1961 and 2014, but during the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveData(){\n \n plan = $(`[data-time=\"${event.target.dataset.time}\"]`).val();\n\n timeBlock = $(this).attr(\"data-time\");\n\n var plannerData = JSON.parse(localStorage.getItem(\"plannerDataKey\"));\n\n for(i=0;i<plannerData.length;i++)\n {\n if(plannerD...
[ "0.63353366", "0.6328076", "0.62862486", "0.6281893", "0.61182535", "0.60423374", "0.60245043", "0.602315", "0.59968305", "0.59591514", "0.5945383", "0.59346205", "0.58710396", "0.5829831", "0.5809716", "0.57990444", "0.57798034", "0.5763438", "0.5762165", "0.57431525", "0.57...
0.0
-1
Deletes the overlay that shows up when you click on a tour.
deleteOverlay() { d3.selectAll(".overlay").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n\n this.overlay.remove();\n this.overlay = null;\n\n }", "function removeOverlay( e ) {\n //console.debug( \"removing overlay\" );\n $(\"overlay\").hide();\n}", "function removeOverlay() {\n if (!getCurrentOpen()) {\n removeClass(overlay, fadeClass);\n overlay.remove();\n ...
[ "0.7239105", "0.7068339", "0.6909926", "0.67343473", "0.6681621", "0.6673516", "0.6659202", "0.6557496", "0.64743245", "0.64647794", "0.64361733", "0.6401802", "0.6368689", "0.6368186", "0.636191", "0.63539284", "0.6307468", "0.62814623", "0.6242633", "0.622475", "0.62176627"...
0.66814697
5
Sets up the guided tours on click functions.
drawGuidedTours() { let that = this; d3.select("#almondsImg").on("click", function () { that.almondsTour(that); that.cropVis.worldMap.highlightBoundariesOfAllSelectedCountries(); }); d3.select("#cranberriesImg").on("click", function () { that.cranberri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n $(TOGGLES).on('click', (ev) => {\n ev.preventDefault()\n goToSidebarTab(ev.currentTarget.getAttribute('data-tab'))\n })\n}", "function addClickListeners() {\n\t$('#start').click(triviaGame);\n}", "function setUpClickListeners() {\n $(\"#content a\").live('click', function() ...
[ "0.67389196", "0.6552782", "0.65115225", "0.621277", "0.61860514", "0.6166922", "0.61654526", "0.6089137", "0.60865915", "0.60747874", "0.6074387", "0.59997195", "0.5998408", "0.5993176", "0.59664124", "0.5958015", "0.5956231", "0.59544224", "0.59018195", "0.5896872", "0.5895...
0.61051583
7
Displays the almond tour.
almondsTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "almondsOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Almonds"); overlay.append("p") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours);\n\t}", "function displayDirections() {\n console.log(` \n ...
[ "0.6642294", "0.6070921", "0.60517013", "0.60038376", "0.6000518", "0.5972505", "0.5917655", "0.5807706", "0.5800356", "0.5748252", "0.5713309", "0.5695415", "0.56424916", "0.5641363", "0.5609412", "0.5526172", "0.55174696", "0.5510411", "0.5501281", "0.5492159", "0.5487935",...
0.0
-1
Displays the cranberries tour.
cranberriesTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "cranberriesOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Cranberries"); overlay.app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours);\n\t}", "function display_toys() {\n \n }// displays toys in the int...
[ "0.6130757", "0.5904648", "0.5835731", "0.5684327", "0.5658707", "0.564043", "0.563443", "0.56234235", "0.55130684", "0.54790133", "0.54363114", "0.5430021", "0.5425885", "0.5398674", "0.5379671", "0.5355036", "0.533908", "0.53278524", "0.53263515", "0.53251183", "0.5324827",...
0.5367394
15
Displays the dates tour.
datesTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "datesOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Dates"); overlay.append("p") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayDates() {\n //Display right year\n var year = x.getFullYear();\n document.getElementById(\"thisYear\").innerText = year;\n //Display right month\n const months = {\n 0: \"January\", 1: \"February\", 2: \"March\", 3: \"April\", 4: \"May\", 5: \"June\", 6: \"July\",\n 7: ...
[ "0.66568816", "0.6117188", "0.60457605", "0.60264635", "0.59600574", "0.5922807", "0.58939606", "0.58593297", "0.58324224", "0.5820126", "0.5763976", "0.576245", "0.5757993", "0.57334447", "0.572274", "0.5714108", "0.57093596", "0.5702038", "0.5696122", "0.56823814", "0.56652...
0.5639323
25
Displays the vanilla tour.
vanillaTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "vanillaOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Vanilla"); overlay.append("p") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours);\n\t}", "showTour() {\n if (!window.localStorage.getItem('show-tour')) {\n ...
[ "0.6654915", "0.60840267", "0.60027546", "0.59115976", "0.58569974", "0.58565485", "0.5757238", "0.5748097", "0.5737712", "0.5690333", "0.5671486", "0.56232136", "0.5589103", "0.55309886", "0.55111486", "0.55018294", "0.5497947", "0.54791784", "0.54665416", "0.5444487", "0.54...
0.0
-1
Displays the apricots tour.
apricotsTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "apricotsOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Apricots"); overlay.append("p") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours);\n\t}", "function displayDirections() {\n console.log(` \n ...
[ "0.6376116", "0.59423894", "0.5934781", "0.5805758", "0.57635194", "0.57607514", "0.57497376", "0.5729673", "0.5548319", "0.5536005", "0.5505189", "0.5490312", "0.54656553", "0.54232675", "0.5413833", "0.5395843", "0.5382207", "0.5366819", "0.53663594", "0.5359068", "0.534530...
0.502076
71
Displays the gooseberries tour.
gooseberriesTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "gooseberriesOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Gooseberries"); overlay....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_toys() {\n \n }// displays toys in the interface", "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours)...
[ "0.62670964", "0.61968434", "0.5855429", "0.57352096", "0.56894714", "0.5641729", "0.55920327", "0.5580009", "0.557423", "0.55228424", "0.5501655", "0.5501051", "0.54828167", "0.54763144", "0.5457427", "0.54221", "0.54154515", "0.54073274", "0.5406695", "0.5403348", "0.540078...
0.5109427
77
Displays the peppermint tour.
peppermintTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "peppermintOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Peppermint"); overlay.append...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TPLAN_PTS(id)\n{\n var pParams = tree_getPrintPreferences();\n parent.workframe.location = fRoot+menuUrl+\"?level=testsuite&id=\"+id+args+\"&\"+pParams;\n}", "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_...
[ "0.5952574", "0.5849683", "0.5804362", "0.5782569", "0.57727164", "0.57445073", "0.56783736", "0.55427146", "0.54122424", "0.5393672", "0.5377573", "0.5344386", "0.53103983", "0.52979857", "0.52919245", "0.52520156", "0.5221676", "0.51692134", "0.51190567", "0.5118357", "0.51...
0.0
-1
Displays the olives tour.
oliveTour(that) { let overlay = d3.select("#guided_tours_wrapper") .append("div") .attr("id", "oliveOverlay") .classed("overlay", true); overlay.append("h1") .classed("overlayHeading", true) .text("Olives"); overlay.append("p") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAllTours(){\n\t\tvar tours = Topology.getCurrentTours();\n\t\tif (tours === null || tours.length === 0) {\n\t\t\t$(\"#message_for_tours\").text(\"Please load a tour file.\");\n\t\t\treturn;\n\t\t}\n\t\tdisplayTours(tours);\n\t}", "function display_toys() {\n \n }// displays toys in the int...
[ "0.6640911", "0.6217836", "0.5855881", "0.5694589", "0.55896974", "0.55773026", "0.5547524", "0.5475918", "0.54692125", "0.5400223", "0.5395897", "0.5395641", "0.5395641", "0.53815854", "0.5365499", "0.5337031", "0.5331082", "0.533077", "0.5322327", "0.5321263", "0.53121185",...
0.52170074
30
Is called when databases are connected and adapter received configuration.
async onReady() { // Reset the connection indicator during startup this.setState("info.connection", false, true); if (this.config.interval < 30) { this.log.info("Set interval to minimum 30"); this.config.interval = 30; } this.updateInterval = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async onReady() {\n // Initialize your adapter here\n // Reset the connection indicator during startup\n this.setState('info.connection', false, true);\n if (!this.config.host) {\n this.log.error(`No host is configured, will not start anything!`);\n return;\n ...
[ "0.6458084", "0.63340235", "0.6321511", "0.62119645", "0.6099627", "0.5976761", "0.59760445", "0.59535784", "0.5942816", "0.5930063", "0.59002703", "0.58887136", "0.5882137", "0.5853184", "0.58242583", "0.57406783", "0.57322663", "0.5729255", "0.5722853", "0.57113254", "0.570...
0.0
-1
This file is connected to the project via Shared/_Layout.cshtml
function AddTeacher() { //goal: send a request which looks like this: //POST : http://localhost:50354/api/TeacherData/AddTeacher //with POST data of teacher first name, teacher last name var URL = "http://localhost:50354/api/TeacherData/AddTeacher"; var rq = new XMLHttpRequest(); // where is this request sent ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function home(){\n\tapp.getView().render('vipinsider/insider_home.isml');\n}", "function renderMainLayoutWith(view) {\n if(view == 'Login'){\n BlazeLayout.render(\"LoginLayout\");\n } else {\n BlazeLayout.render(\"PublicLayout\", {main : view});\n }\n}", "function Layout()\n{\n \n}", "function Ap...
[ "0.594004", "0.5892378", "0.58757585", "0.58407265", "0.57489395", "0.56471723", "0.56186485", "0.55877054", "0.55231625", "0.5501998", "0.5501998", "0.5460645", "0.54336953", "0.54121125", "0.54025066", "0.53976536", "0.53937936", "0.5375979", "0.5362636", "0.5342878", "0.53...
0.0
-1
Deletes the HTML5 local storage.
function deleteSave() { localStorage.removeItem("ArkanusSave"); displayMessage("Save deleted.", 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarLocalStorage(){\n\tlocalStorage.clear();\n}", "function vaciar_local_storage(){\n localStorage.clear();\n}", "function vaciarLocalStorage() {\r\n localStorage.clear();\r\n}", "function vaciarLocalStorage() {\n localStorage.clear();\n}", "function vaciarLocalStorage() {\n localSto...
[ "0.80469465", "0.78975236", "0.7848442", "0.7806953", "0.7806953", "0.779806", "0.7791164", "0.7791164", "0.7772828", "0.77566254", "0.7740865", "0.77322036", "0.7712128", "0.76955074", "0.76450354", "0.76156694", "0.7605851", "0.7588976", "0.7545451", "0.7532962", "0.747959"...
0.0
-1
Make numbers look good.
function enumerate(x) { if (isNaN(x)) return x; if (x <= 9999) return x; if (x <= 100000) return (x/1000).toFixed(2) + "K"; if (x <= 1000000) return (x/1000).toFixed(1) + "K"; if (x <= 10000000) return (x/1000000).toFixed(3) + "M"; if (x <= 100000000) return (x/1000000).toFixed(2) + "M"; if (x <= 1000000000) ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numFormat(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \"&nbsp;\");\n}", "function formatNumber (num) {\n\t\tif(num < 1000 & num > 100){\n\t\treturn ' ' + num.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, \"$1,\") + '\\t\\t'\n\t\t}else if(num < 100 & num > 10){\n\t\treturn ' '...
[ "0.6913315", "0.67955065", "0.6714976", "0.66832805", "0.65521234", "0.65151644", "0.65098983", "0.6442507", "0.6430743", "0.6412596", "0.63799417", "0.6332525", "0.6300192", "0.6295815", "0.6295369", "0.62841415", "0.62573886", "0.6245617", "0.6239934", "0.62363046", "0.6234...
0.0
-1
All functions to be called on $(document).ready() should be in this function
function qodeOnDocumentReady() { qodePortfolioProjectSlider(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function initOnDomReady() {}", "function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobil...
[ "0.76384974", "0.7297246", "0.72918177", "0.71479", "0.7066525", "0.69979167", "0.6958097", "0.69497776", "0.6937184", "0.68806094", "0.6833583", "0.6826539", "0.6826539", "0.6826539", "0.6826539", "0.6761683", "0.67540544", "0.67202896", "0.668726", "0.6669341", "0.6669192",...
0.6179572
70
Funcao que identa do jeito pedido
function formatDate(date) { var d = new Date(date), month = '' + (d.getMonth() + 1), day = '' + d.getDate(), year = d.getFullYear(); if (month.length < 2) month = '0' + month; if (day.length < 2) day = '0' + day; return [year, month, day].join('-'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extraerNodoP(){\r\n\tvar nuevo = this.raiz;\r\n\tif(!this.vacia()){\r\n\t\tthis.raiz = this.raiz.sig;\r\n\t\t//window.alert(nuevo.nombre);\r\n\t}\r\n\treturn nuevo;\r\n\t\r\n}", "function deletaId(id){\n console.log('eita foi!!!: ', id)\n}", "alterarIdade(idade){\n this.$emit('idadeMudou...
[ "0.56168985", "0.5455795", "0.54128426", "0.53933865", "0.5324574", "0.5308323", "0.52733576", "0.52704245", "0.5245104", "0.52161527", "0.51862186", "0.5170241", "0.5122928", "0.51078695", "0.5087704", "0.5087704", "0.5087704", "0.5087704", "0.5087704", "0.5087704", "0.50877...
0.0
-1
Funcao que pega o cpf e checa se e valido ou nao
function checagemCPF(postCPF) { var aux1 = parseInt(postCPF.charAt(0)); var aux2 = parseInt(postCPF.charAt(1)); var aux3 = parseInt(postCPF.charAt(2)); var aux4 = parseInt(postCPF.charAt(4)); var aux5 = parseInt(postCPF.charAt(5)); var aux6 = parseInt(postCPF.charAt(6)); var aux7 = parseInt(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ValidarCPF(Objcpf) {\n var cpf = Objcpf.value;\n exp = /\\.|\\-/g\n cpf = cpf.toString().replace(exp, \"\");\n var digitoDigitado = eval(cpf.charAt(9) + cpf.charAt(10));\n var soma1 = 0, soma2 = 0;\n var vlr = 11;\n\n for (i = 0; i < 9; i++) {\n soma1 += eval(cpf.charAt(i) * (v...
[ "0.7024944", "0.69382954", "0.6701365", "0.66422915", "0.66033435", "0.6220032", "0.6175224", "0.6169452", "0.61494094", "0.61128074", "0.6061386", "0.6028699", "0.59417105", "0.5834139", "0.58285296", "0.57692224", "0.576869", "0.576869", "0.57683975", "0.57672584", "0.57616...
0.52947694
45
Function for Approved Requests
function approvedRec(data){ let timeStamp; let request = data.val(); let keys = Object.keys(request); for(let i=0;i<keys.length;i++){ let k=keys[i]; let message=request[k].message; let timeofAction=request[k].currentTime; console.log(timeofAction); console.log(message); let k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestApproval() {\n tokenInst.approve(\n addrHOLD,\n truePlanCost,\n { gasPrice: web3.toWei('50', 'gwei') },\n function (error, result) {\n\n if (!error && result) {\n var data;\n console.log('approval sent to network.');\n ...
[ "0.6936666", "0.67306614", "0.6718884", "0.67007643", "0.66790104", "0.65522", "0.6528268", "0.6502752", "0.6434595", "0.63940495", "0.6375962", "0.63468874", "0.63398373", "0.6161521", "0.61465853", "0.6142462", "0.6141699", "0.6135911", "0.6040688", "0.602209", "0.6020646",...
0.0
-1
catch method for errors
function errData(err){ console.log('Error!'); console.log(err); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Catch( onerr, ap ) {\r\n}", "handleError(error) {\n throw error.response.data;\n }", "onerror() {}", "onerror() {}", "function handleError(err) {\n\tif (err) throw err;\n}", "function catch_error(error) {\n console.error(error);\n switch (error.statusCode) {\n case 400: break;\n ...
[ "0.7023373", "0.67985773", "0.675644", "0.675644", "0.66549253", "0.6571158", "0.65460837", "0.6498975", "0.64737415", "0.6463995", "0.6448546", "0.64092994", "0.63934463", "0.6381708", "0.6374835", "0.6336407", "0.6326357", "0.6265267", "0.6265267", "0.62651074", "0.62451994...
0.0
-1
Get the time difference for each message
function timeDifference(timeofAction,keyword){ let now; //now is the current time let millSecDiff; //difference between the 2 milliseconds let dateDiff; let days; let hours; let minutes; let seconds; now=new Date().getTime(); millSecDiff=now-timeofAction; days = Math....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateTimeDifferenceBetweenTwoMessages(messageOne, messageTwo) {\n let startTime = messageOne.createdTimestamp;\n let endTime = messageTwo.createdTimestamp;\n let pingValue = endTime - startTime;\n return pingValue;\n}", "getTimeDiffMinutes(time) {\n const selfTime = this.timeHuman...
[ "0.69371957", "0.6171051", "0.60919315", "0.60656756", "0.6040584", "0.6017162", "0.59477466", "0.5918457", "0.5918457", "0.59173054", "0.57949686", "0.5762823", "0.57559896", "0.5743195", "0.57291937", "0.5726067", "0.5687332", "0.56562877", "0.56419706", "0.5638955", "0.563...
0.57224727
16
DISPLAY METHODS Display for Rejections
function displayRejectionAnnouncement(message,rejectionReason,timeStamp){ let rejectionList=document.getElementById('rejection'); let div = document.createElement('div'); let template= ` <div class="message"> <div> <p class="messageSpecific">${message}</p> </div> <div> <h>Reason:</...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayMessage(){\n return alert(\"Due to API limitations - we are unable to add beneficiaries\")\n }", "function signDisplayNoneBadFunctionChangeThis() {\n store.dispatch({\n type: \"SHOW_SIGN\",\n payload: {\n display: \"none\"\n }\n });\n }", "render_explanation () {}", "_...
[ "0.56699467", "0.5547903", "0.5532781", "0.5481054", "0.5453388", "0.5359943", "0.5334541", "0.53270036", "0.5316478", "0.5309696", "0.5261663", "0.52426744", "0.5234952", "0.5221429", "0.52212036", "0.521519", "0.5202333", "0.5195256", "0.51911813", "0.5168602", "0.5145208",...
0.0
-1
Display for Requests sent to Admin
function displayRequestAnnouncement(message,timeStamp){ let requestList=document.getElementById('requests'); let div = document.createElement('div'); let template= ` <div class="message"> <div> <p class="messageSpecific">${message}</p> </div> <div> <p>${timeStamp}</p> </div> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "index ( req, res ) {\n return res.send(this.templates['admin']());\n }", "function renderShowUserAdmin(data){\n $('#users_info_admin').html(\"<h3 id=admin_user>\"+ \"ID: \" +data.id+ \" Name: \"+ data.name + \" Email: \" + data.email +\" Privileges: \"+ data.privileges+ \"</h3>\");\n }", "functio...
[ "0.6335368", "0.60354567", "0.6017357", "0.58491725", "0.57736117", "0.5729255", "0.57064927", "0.570133", "0.5689252", "0.5680554", "0.568023", "0.5679304", "0.566051", "0.56598413", "0.5639439", "0.5637786", "0.5634155", "0.56229746", "0.5619531", "0.56125236", "0.5608118",...
0.0
-1
Display for Approved Announcements
function displayApprovedAnnouncement(message,timeStamp){ let approvedList=document.getElementById('approvedRequests'); let div = document.createElement('div'); let template= ` <div class="message"> <div> <p class="messageSpecific">${message}</p> </div> <div> <p>${timeStamp}</p> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Announcements(props) {\n return (\n <div className={Styles.visuallyhidden} role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {props.message}\n </div>\n );\n}", "function displayAnn() {\n\tfor (var index = 0; index < annDetails.length; index += 1) {\n\t\tif (annGrade[index] === st...
[ "0.62431294", "0.59590596", "0.5836416", "0.57564354", "0.56537676", "0.55904365", "0.5589243", "0.55377483", "0.5522595", "0.5475619", "0.5458426", "0.5421242", "0.53844726", "0.537114", "0.535305", "0.5336783", "0.5316441", "0.52777344", "0.5276851", "0.5272533", "0.5260346...
0.5921947
2
Display for Sent Announcements
function displaySentAnnouncement(message,timeStamp){ let sentList=document.getElementById('requests'); let div = document.createElement('div'); let template= ` <div class="message"> <div> <p class="messageSpecific">${message}</p> </div> <div> <p>${timeStamp}</p> </div> </div> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Announcements(props) {\n return (\n <div className={Styles.visuallyhidden} role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {props.message}\n </div>\n );\n}", "function displayApprovedAnnouncement(message,timeStamp){\r\n let approvedList=document.getElementById('approvedRequests...
[ "0.6126511", "0.60980535", "0.58959335", "0.5839787", "0.58131206", "0.5782555", "0.57605004", "0.5753452", "0.5720291", "0.55654967", "0.55451137", "0.5498917", "0.5487477", "0.5448777", "0.53665644", "0.53516585", "0.52752364", "0.52638006", "0.52426", "0.5240519", "0.52007...
0.6452046
0
Show the location if any and the form after the detection have been made
function process(data) { $("#form-subscription").removeClass("hidden") $("#dialog-welcome").addClass("hidden") var location = ""; if (data.country) { location = data.country } if (data.areaLvl1) { location += ", " + data.areaLvl1 } if (data.areaLvl2) { location...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trackLocation() { \r\n\tif (navigator.geolocation) {\r\n\t\tnavigator.geolocation.watchPosition(showPosition); //Call show position function\r\n\t\tnavigator.geolocation.watchPosition(closestFormPoint);\r\n\t} else { \r\n\t\tdocument.getElementById('showLocation').innerHTML = \"Geolocation is not support...
[ "0.703103", "0.70072657", "0.68134713", "0.6787915", "0.65735173", "0.65728664", "0.6526608", "0.65237135", "0.6520384", "0.6475563", "0.6467671", "0.6466409", "0.646029", "0.644606", "0.6443807", "0.642343", "0.63680446", "0.63649386", "0.6353785", "0.6345358", "0.63451", ...
0.0
-1