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
For each message from the provider, check for a match in the local db. If any changes, get its _id and _rev to update the record instead of inserting a new one. But if no changes, just discard the record from the update batch. If no match, just insert the record asis.
function detectUpdates (fetched, existing) { const existingByProviderId = keyBy(existing, 'key') return fetched.map((msg) => { const match = existingByProviderId[msg.providerId] if (match) { if (msg.status !== match.value.status) { // Changes detected (we only care about status at the moment)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _patchLocal(data, callback) {\n _patchServiceDB(data);\n view_model.lastChecked = generateTimestamp();\n if( _hasIndexedDB() ) {\n _putArrayToIndexedDB(data, function() {\n callback(\"Patched records to ServiceDB & IndexedDB.\");\n });\n } else {\n callbac...
[ "0.5628675", "0.5542125", "0.5396335", "0.5357955", "0.5272311", "0.5257271", "0.52004373", "0.5168438", "0.51678044", "0.51521236", "0.5144698", "0.5129431", "0.5113655", "0.5103172", "0.5092716", "0.50787765", "0.50736153", "0.5071947", "0.504469", "0.50335366", "0.5023428"...
0.6407937
0
Creating The Chart Function
function Chartresult() { var ctx = document.getElementById('myChart').getContext('2d'); var chart = new Chart(ctx, { // The type of chart we want to create type: 'bar', // The data for our dataset data: { labels: imagesArray, datasets: [{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCharts() {\n issueChart();\n countChart();\n averageChart();\n}", "_drawChart()\n {\n\n }", "function initialChart(datain,CTY,TYPE) { \r\n\r\ngenChart(datain[0],datain[1],datain[2],CTY,TYPE); //Generates the chart\r\n \r\n}", "function ChartsBarchart() {\n}", "get Charting() {}", ...
[ "0.75549275", "0.75058764", "0.73437464", "0.72343814", "0.717549", "0.6865518", "0.68653417", "0.6842991", "0.6838302", "0.68046504", "0.67779726", "0.67569363", "0.67406154", "0.6727261", "0.67221355", "0.6712124", "0.67052543", "0.66992074", "0.6698448", "0.66899294", "0.6...
0.0
-1
Storing Votes n local Storage
function localdata() { for (var i = 0; i < imagesArray.length-1; i++) { TotalSeen += productsArray[i].TimesSeen } for (var i = 0; i < imagesArray.length-1; i++) { if (localStorage.getItem('Votes / Times Seen for ' + imagesArray[i]) === null) { localStorage.setItem('Votes / Times...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function localSaveVotes(){\n var savedProducts = JSON.stringify(products);\n localStorage.setItem('votes', savedProducts);\n}", "function updateVotes() {\n\n var trackVotesArray = [];\n for (var i = 0; i < BusMall.all.length; i++) {\n var trackvotes = BusMall.all[i];\n trackVotesArray.push(trackvotes)\...
[ "0.7341685", "0.72560143", "0.70115316", "0.650258", "0.6448595", "0.63981044", "0.6336852", "0.62856615", "0.6120321", "0.61123085", "0.61025804", "0.606566", "0.60595584", "0.6050316", "0.60277456", "0.6013646", "0.60063744", "0.5992031", "0.5936435", "0.5892767", "0.588881...
0.5674988
57
Select size input When size is submitted by the user, call makeGrid()
function makeGrid() { // Your code goes here! const height = $("#input_height").val(); const width = $("#input_width").val(); const table = $("#pixel_canvas"); // Remove previous table table.children().remove(); // Set the table for(let r = 0; r < height; r++ ){ let tr = document.createElement("tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectGridSizeFunc() {\n container.innerHTML = \"\";\n const input = prompt(\"Please select a grid resolution. (input 64 for a 64 x 64 sketchpad)\", 16);\n setUpSketch(input);\n}", "function gridSize() {\n size = prompt(\"What size do you want the grid?\");\n createGrid(size, size);\n\n}"...
[ "0.752996", "0.74222815", "0.7343776", "0.73155427", "0.7262196", "0.72579473", "0.71997696", "0.7170834", "0.7091701", "0.7061775", "0.69966835", "0.6958301", "0.6853224", "0.68189573", "0.67986304", "0.67369723", "0.6725082", "0.6717656", "0.66267514", "0.6626309", "0.65712...
0.5782231
89
get session values (logged in or not)
componentDidMount(){ this.UpdateData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSession() {\n return $window.sessionStorage['user'];\n }", "function buscarSessionUser() {\r\n return JSON.parse(sessionStorage.getItem('login'))\r\n}", "function currentUser (){\n return JSON.parse(window.sessionStorage.getItem(\"user_info\"));\n}", "function getSession(){...
[ "0.7335166", "0.7320769", "0.71433794", "0.7071943", "0.69977605", "0.69943887", "0.6974383", "0.6924709", "0.68505716", "0.6808738", "0.67884123", "0.67695075", "0.6736364", "0.6650335", "0.6638568", "0.6598658", "0.65703654", "0.65366435", "0.65093505", "0.647144", "0.64612...
0.0
-1
This function updates session data gets called from RequireLogin.js
UpdateData(){ this.setState({ UserLoggedIn: localStorage.getItem('UserLoggedIn') }) this.setState({ UserName: localStorage.getItem('UserName') }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginUserData(data) {\n var flag = \"active\";\n sessionStorage.setItem(\"LoginJson\", flag);\n sessionStorage.setItem(\"FullName\", data.fname + \" \" + data.mname);//for fname\n sessionStorage.setItem(\"MiddleName\", data.mname);//for mname\n sessionStorage.setItem(\"LastName\", data.lnam...
[ "0.7076083", "0.6953998", "0.6824311", "0.6824311", "0.65878445", "0.65720516", "0.6563773", "0.6526395", "0.65236324", "0.6491002", "0.64781386", "0.6455403", "0.64435214", "0.64361686", "0.6432542", "0.64188385", "0.6402803", "0.6368569", "0.6357257", "0.6357032", "0.635525...
0.594275
75
Stack implemented using LinkedList
function Stack() { this.first = null; this.size = 0; this.push = (data) => { var newNode = new Node(data); newNode.next = this.first; //Special attention this.first = newNode; this.size += 1; } this.pop = () => { if(this.first) { var temp = this.first; this.first = this.first...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Stack() {\n this.list = new LinkedList();\n }", "function Stack() {\n this.list = new LinkedList();\n }", "function Stack() {\n this.list = new LinkedList_1.default();\n }", "function LinkedListStack() {\n this.head = null;\n}", "function Stack() {\n this.le...
[ "0.7958934", "0.7945678", "0.77234507", "0.7601649", "0.7343377", "0.72961324", "0.72624207", "0.7138196", "0.710708", "0.69803035", "0.6960319", "0.6954564", "0.6900423", "0.6878416", "0.68654346", "0.68646914", "0.68017095", "0.67957187", "0.67842656", "0.67620045", "0.6753...
0.7687762
3
Publish on Google drive reports of all subrdinates of the specified LM to the directory with LM name
function publishSubordinateReports(lmId, res, cb) { User.findById(lmId, function(err, lm) { if (err) { return next(new HttpError(400, err.message)); } consultant.exportBulk(lmId, 'pdf', res, function(err, consultantResult, consultantReports) { manager.exportBulk(lmId, 'pdf', res, function(err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addReportFile(folder, name) {\n var spreadsheet = SpreadsheetApp.create(name, 1, 4);\n var sheet = spreadsheet.getActiveSheet();\n sheet.setName(\"QS history\");\n // Put in the table headings\n sheet.getRange(1, 1, 1, 4).setValues([[\"Campaign\", \"AdGroup\", \"Keyword\", \"ID string\"]]);...
[ "0.53484786", "0.5203295", "0.513397", "0.51130426", "0.5068771", "0.50220376", "0.49349335", "0.49321502", "0.49226052", "0.491312", "0.4912075", "0.49113414", "0.4886892", "0.48855162", "0.4858115", "0.4841191", "0.48392937", "0.4837547", "0.4820589", "0.47809938", "0.47437...
0.6590875
0
function changed newwpaper page
function changeNewspaperPage(new_paper) { newspaper_page = new_paper; console.log(newspaper_page + 'の' + newspaper_page + 'ページを開きました。'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageChanged(newPage) {\n\t\tgetArticles(newPage);\n\t}", "function changePage(page) { \n clearPage();\n extractData(page);\n }", "function pgChange3(){\r\n pageNo = 3\r\n \r\n}", "function pgChange2(){\r\n pageNo = 2\r\n \r\n}", "function modifyPage(search) {\n\n\t//Parse the response ...
[ "0.71076655", "0.69101566", "0.6563448", "0.65278345", "0.64424205", "0.6360666", "0.6359586", "0.63536316", "0.6308589", "0.6275346", "0.625404", "0.62477875", "0.6187116", "0.61481434", "0.61346555", "0.61279297", "0.6120621", "0.6114105", "0.60951114", "0.60929155", "0.608...
0.7999115
0
function read neww paper
function readNewspaper() { console.log(newspaper_page + 'の' + newspaper_page + 'ページを読みました。'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function justRead () {\n var encoded = fs.readFileSync ('transpile_drawio_to_swipl.drawio', 'utf-8');\n fs.writeFileSync ('_raw3.raw', encoded, null);\n}", "function Paper_format_other(){\n\n}", "function readPgm(filename) {\n var _bytes = snarf(filename, \"binary\"); // Uint8Array\n var loc = 0;\n...
[ "0.5286311", "0.51197165", "0.5063997", "0.50513774", "0.49747407", "0.4924465", "0.48782453", "0.4837972", "0.47661182", "0.4724458", "0.47161874", "0.47096294", "0.46982267", "0.46962819", "0.46906805", "0.46897358", "0.46868274", "0.46617004", "0.46280894", "0.46228695", "...
0.6550977
0
Pass scope to the subscribe() method.
subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, locationSelected, (message) => { console.log('---> subscribing to location selected message', 'start') t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subscribe($scope) {\n socket.on('create reach', function (item) {\n listContainer.push(item);\n\n if (typeof(onListChangedFn) !== 'undefined') {\n onListChangedFn(listContainer);\n }\n });\n\n // Clean up.\n ...
[ "0.6734875", "0.6104429", "0.59388775", "0.59088534", "0.58997136", "0.5842393", "0.5842393", "0.5842393", "0.5842393", "0.5831821", "0.5828253", "0.5816915", "0.5797574", "0.57807684", "0.5771273", "0.5723127", "0.56957865", "0.56933177", "0.5606732", "0.5606732", "0.5603132...
0.0
-1
Handler for message received by component
handleMessage(message) { console.log('---> location message received in home session component', message) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "onMessageReceive() {}", "onMessage() {}", "onMessage() {}", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);...
[ "0.75221837", "0.7263803", "0.7151968", "0.7151968", "0.71241885", "0.6972168", "0.6959935", "0.6959935", "0.6959935", "0.693945", "0.6891903", "0.6888057", "0.68730676", "0.6843233", "0.68329126", "0.6812576", "0.6811467", "0.67926407", "0.67817706", "0.67095065", "0.6687046...
0.6194577
72
include x, y, suggest to use getter and setter to react the new values
constructor(shape=null,pos=null){ this.fsm = createDragStateMachine(); this.fsm.observe({ onLeftMouseMove:this.onLeftMouseMove.bind(this), onLeftMouseDown:this.onLeftMouseDown.bind(this), onEnterSelected:this.onEnterSelected.bind(this) }); if(!shape ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set data ({x, y}){\n this._x = x\n this._y = y\n }", "update() {\n this.x\n this.y\n }", "set(x = null,y = null){\n //12.3 or \"12.3\"\n if(typeof x === 'number' || typeof x === 'string'){\n this.x = parseFloat(x);\n if(y !== null){\n t...
[ "0.79151386", "0.7465439", "0.72924715", "0.72706246", "0.72542244", "0.71578693", "0.71382135", "0.71327084", "0.7059859", "0.70480525", "0.7035327", "0.69963026", "0.69265723", "0.6884375", "0.6836651", "0.68305486", "0.6829569", "0.68255496", "0.68097895", "0.67587507", "0...
0.0
-1
Start from the first quote
start() { this.do("start") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startsWith(c){ return c==this.quotation }", "firstToken({token, counter}) {\n\t\tif (['quote'].includes(token.name)) {\n\t\t\tthis.openQuote = token.value;\n\t\t\tthis.listener.candidates = this.listener.candidates.filter(c=> c.name === 'string');\n\t\t\tthis.listener.checking = 'middleTokens';\n\t\t\treturn tru...
[ "0.6544238", "0.6311368", "0.6280852", "0.6280852", "0.6280852", "0.6168013", "0.60332423", "0.59699833", "0.595173", "0.5900412", "0.5890977", "0.58689946", "0.5835912", "0.57884854", "0.5784368", "0.5753255", "0.5655399", "0.56397986", "0.5597602", "0.5591066", "0.5591066",...
0.0
-1
Create a quote from the bot
createQuoteBot(node) { let self = this window.setTimeout(function () { //creo i div di conversazione let quote = document.createElement('div') quote.classList.add('freud-quote', '__bot') let sentence = document.createElement('div') sentence.cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function newQuote() {\n let url = 'http://quotes.rest/qod.json';\n\t\tconst result = await fetch(url);\n\t\tif(!result.ok) {\n\t\t\tthrow new Error(`status: ${result.status}`);\n\t\t}\n\t\treturn await result.json();\n }", "function makingQuote(quoteOb) {\n message = makingTags(quoteOb.tags);\n messa...
[ "0.6614835", "0.6558999", "0.6527881", "0.6478681", "0.6382853", "0.6340497", "0.6327054", "0.6304614", "0.630021", "0.629175", "0.628352", "0.6274607", "0.6238084", "0.62326705", "0.62222904", "0.6174516", "0.6169922", "0.61635524", "0.614904", "0.61440116", "0.61421514", ...
0.0
-1
Create a quote from the user
createQuoteHuman(v) { let quote = document.createElement('div') quote.classList.add('freud-quote') let sentence = document.createElement('div') sentence.classList.add('freud-sentence') quote.appendChild(sentence) let element = document.createElement('div') element...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addQuotes () {\r\n\r\n // ask the user to input the author and then the quote\r\n inquirer.prompt([\r\n {\r\n type: \"input\",\r\n message: \"Who said this quote?\",\r\n name: \"author\"\r\n },\r\n {\r\n type: \"input\",\r\n message: \"What is the quote?\",\r\n name: \"quote...
[ "0.68796736", "0.67978156", "0.6665791", "0.6523669", "0.6373495", "0.63376015", "0.6326829", "0.6185461", "0.6151672", "0.6148862", "0.61482424", "0.6139593", "0.6130201", "0.6097758", "0.60966533", "0.608487", "0.6044258", "0.6041701", "0.599285", "0.5984935", "0.5979089", ...
0.0
-1
Aggiunge un nodo di talk
addNode(key, node) { this._nodes[key] = node }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nelsonTalk() {\n var nelsonTalk = new Talk(\n \"Come, Follow Me\",\n \"https://www.churchofjesuschrist.org/study/general-conference/2019/04/46nelson?lang=eng\",\n \"Jesus Christ invites us to take the covenant path back home to our Heavenly Parents and be with those we love.\",\n \"Sunday Mor...
[ "0.7363197", "0.7236393", "0.72353745", "0.7078629", "0.6525562", "0.65120333", "0.6509771", "0.6442375", "0.64272416", "0.63740355", "0.6295206", "0.62834585", "0.6275735", "0.6269438", "0.6239409", "0.6236625", "0.62247294", "0.6213793", "0.6135503", "0.6116226", "0.6095478...
0.0
-1
Set tutti i nodi
setNodes(nodes) { this._nodes = nodes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function atualizaTempo(tempo) {\n\ttempoInicial = tempo;\n\t$(\"#tempo-digitacao\").text(tempo);\n}", "function setNew() {\n curPos = 4\n rndT = nextRnd\n nextRnd = Math.floor(Math.random()*tetrominoes.length)\n curT = tetrominoes[rndT][curRot]\n }", "function setPlayTime(t) {\n ...
[ "0.561847", "0.55432373", "0.5407266", "0.53629464", "0.52583545", "0.52383024", "0.5214047", "0.5199282", "0.5180894", "0.5179572", "0.5179572", "0.5179572", "0.5179572", "0.5179572", "0.5179572", "0.5148836", "0.5132693", "0.5121814", "0.5112944", "0.51042587", "0.5094677",...
0.0
-1
Runtime Imperatives Dialogs Open
PresentUIToScanOneQRCodeString ( fn // (err?, string) -> Void ) { const self = this const errStr = 'Override PresentUIToScanOneQRCodeString in ' + self.constructor.name fn(new Error(errStr)) throw errStr // to break development builds }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function open(dialog) {\n\t\n}", "function dialogOn() {\n\n if (typeof uiVersion != 'undefined' && uiVersion === 'Minuet' && dialog !== 'active') {\n openMinuetWarningDialog();\n }\n else {\n dialog = openWarningDialog();\n }\n ...
[ "0.67283064", "0.6519391", "0.6389133", "0.6356131", "0.6249224", "0.61392623", "0.6110857", "0.6091912", "0.60681", "0.6066794", "0.6047171", "0.5985506", "0.5968233", "0.5964155", "0.5946293", "0.5939286", "0.59347177", "0.5853696", "0.58450145", "0.5833979", "0.5821221", ...
0.0
-1
Call the Will Mount to set the auth Flag to false
componentWillMount() { this.setState({ authFlag: false }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillMount() {\r\n this.setState({\r\n authFlag: false\r\n })\r\n }", "componentWillMount() {\n this.setState({\n authFlag: false,\n });\n }", "componentWillMount () {\n this.setState({\n authFlag: false\n })\n }", "componentWillMount() {\n this.setState({\n...
[ "0.62727404", "0.62294865", "0.6215816", "0.6198193", "0.6198193", "0.6163447", "0.6163447", "0.6163447", "0.6163447", "0.6154269", "0.6154269", "0.6154269", "0.6154269", "0.6104157", "0.58736676", "0.5744775", "0.56929594", "0.56440467", "0.5640474", "0.56115484", "0.5599078...
0.6257303
3
increment speed. Object for the cloud in order to do lerps based on initial values or with a persistent lerp.
function Cloud(p_object, p_initialSize, p_initialLocation){ this.object = p_object; this.initialSize = p_initialSize; this.initialLoc = p_initialLocation; this.animationFloat = 0; this.animationBounces = true; this.animationReversing = false; } // END - constructor.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "accelerate(){\n this.speed += 10;\n }", "function inc_speed()\n{\n if(speed == speed_normal)\n speed = speed_fast;\t\n}", "updateSpeed (speed) {\n this.speed = speed;\n }", "increaseSpeed() {\n\n this.speed = Math.max(this.speed - Snake.SPEED_INCREMENT, Snake.MAX_SP...
[ "0.7287871", "0.7042348", "0.70416236", "0.6979714", "0.6919031", "0.6911426", "0.6911426", "0.6887514", "0.67779666", "0.66589713", "0.6555078", "0.65422153", "0.63737684", "0.6366733", "0.6334532", "0.63268137", "0.627877", "0.62686807", "0.62642294", "0.6257419", "0.625656...
0.0
-1
CONVENIENCE FUNCTIONS. Returns a random integer within the provided minmax range.
function randomInt(min, max){ return Math.floor(Math.random() * (max - min) + min); } // END - random value.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }", "getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n }", "static getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min) + min)\n }", "getRand...
[ "0.79942477", "0.7969933", "0.7954734", "0.79384524", "0.7932309", "0.7930381", "0.79278", "0.7924837", "0.7904472", "0.78911096", "0.7887336", "0.78724295", "0.78685236", "0.785951", "0.7857231", "0.78558356", "0.7852983", "0.78521377", "0.78511405", "0.78481257", "0.7848125...
0.7791904
45
Returns a random float within the provided minmax range.
function randomFloat(min, max){ return Math.random() * (max - min) + min; } // END - Random value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomFloat(min, max) {\n return min + Math.random() * (max - min);\n}", "function randomFloat(min, max) {\n return min + Math.random() * (max - min);\n }", "function getFloatRandom(min, max) {\r\n return Math.random() * (max - min) + min;\r\n}", "function getRandomFloat(min, max) {...
[ "0.87267464", "0.8724303", "0.8674062", "0.86646473", "0.86646473", "0.86058956", "0.86043423", "0.860126", "0.8513492", "0.8416304", "0.832141", "0.7852196", "0.78392047", "0.7715826", "0.76962894", "0.768729", "0.76603794", "0.7658741", "0.7655863", "0.7652018", "0.7635117"...
0.8470013
9
Function to clean up 3D Objects from a scene by disposing of geometry and materials before removing the object from scene..
function cleanup3DObject(object){ object.geometry.dispose(); object.material.dispose(); scene.remove(object); } // END - Cleanup function
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.myScene.remove(this.threeObject);\n this.threeObject = null;\n }", "removeFromScene() {\n if (this.scene)\n this.scene.remove(this.mObject3D);\n }", "cleanupScene(groupOrScene = null) {\n if (groupOrScene === null) {\n groupOrScene = th...
[ "0.79019415", "0.7551317", "0.75387484", "0.7424245", "0.7419502", "0.74059635", "0.73851925", "0.73709524", "0.7346252", "0.732237", "0.7288052", "0.7280065", "0.7164749", "0.71505857", "0.7117825", "0.7110827", "0.7089376", "0.708164", "0.70516014", "0.7023211", "0.700483",...
0.889605
0
END OF CONVENIENCE FUNCTIONS
function createScene() { scene = new THREE.Scene(); aspect = window.innerWidth / window.innerHeight; fov = 60; nearVal = 1; farVal = 950; scene.fog = new THREE.Fog(0xff5566, 120, 800); camera = new THREE.PerspectiveCamera(fov,aspect,nearVal,farVal); camera.position.x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function Constr() {}", "function Cnds() {}", "protected internal function m252() {}", "static private internal function m121() {}", "function CIQ(){}", "cocina(){}", "function Squaring(){\n }", "function comportement (){\n\t }", "private public function...
[ "0.5708856", "0.5492735", "0.54596746", "0.5415806", "0.5393721", "0.5372048", "0.5314331", "0.53106004", "0.5295508", "0.52575326", "0.5248906", "0.5234313", "0.5231627", "0.52228284", "0.5210417", "0.518919", "0.5155716", "0.51511574", "0.51445967", "0.5134951", "0.5123593"...
0.0
-1
var quaternion = new THREE.Quaternion(); quaternion.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 ); var vector = new THREE.Vector3( 1, 0, 0 ); vector.applyQuaternion( quaternion );
function createTree(x , y, z){ //holds all of the below as a function //treeTrunk the brown trunk of the tree var g1 = new THREE.CylinderGeometry( 0.6, 0.6, 4.5, 20); ///(top, bottom, size, shapeish) var m1 = new THREE.MeshToonMaterial({color:0x603B14,transparent:false,flatShading:false}); m1.shininess = 7; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get quaternion() {\n return new Quaternion({ scalar: 0, vector: this });\n }", "function render() {\n\n var rotation = new THREE.Euler( 0, 0, 0, 'YXZ' );\n \n var qR = computeQuaternion();\n var tmpQuat = new THREE.Quaternion(qR[0],qR[1],+qR[2],qR[3]);\n\n var xRot = rotation.setFromQuaternion( tmpQuat, ...
[ "0.73095", "0.72610736", "0.71722066", "0.7123993", "0.7013817", "0.6782107", "0.669506", "0.6635915", "0.66320837", "0.66166276", "0.65798146", "0.6509466", "0.6507568", "0.6503738", "0.64911366", "0.6457765", "0.64351106", "0.6410655", "0.64008915", "0.6383862", "0.6377777"...
0.0
-1
The actual function that gets called whenever the event listener is triggered.
function eventFuncTouchStart( event ) { // Not needed because the event target holder is passive. Uncommenting will prompt errors about this. // event.preventDefault(); // Variable to hold the x and y input coordinates. // The mathematical operations normalise the input; so that the value is between -1 an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEvent() {\n \n }", "handleEvent() {}", "handleEvent() {}", "function Listener() { }", "function initEventListener() {\n \n }", "function Listener() {}", "function Listener() {}", "handleEvents() {\n }", "listener() {}", "handleEventChange() {\n }", "_evtChange(event) ...
[ "0.72889096", "0.6764487", "0.6764487", "0.6724855", "0.6703935", "0.6674106", "0.6674106", "0.6670336", "0.66314", "0.6589077", "0.65570176", "0.65224195", "0.6443552", "0.6429053", "0.6386561", "0.6386561", "0.6386561", "0.6386561", "0.6386561", "0.6341344", "0.63266826", ...
0.0
-1
Kept in function to keep animate clean.
function updateGlobalLerpValue(){ // Perform clamping or bouncing of lerp value. // If lerp value is LESS than 0... if(globalLerpValue < 0){ // Snap value back to 0, and set reversing value to false. globalLerpReversing = false; globalLerpValue = 0; } // END - if global lerp is reversing. // Else, if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reAnimate(){\n\t\tthis.keyFrameStyle.parentNode.removeChild(this.keyFrameStyle);\n\t\tthis.keyFrameStyle = null;\n\t\tthis.keyFrameAnimate();\n\t}", "function stop() {\r\n animating = false;\r\n }", "animate_stop() {\r\n this.sprite.animate = false;\r\n }", "_resetAnimation() {\n /...
[ "0.7263442", "0.7121229", "0.6833765", "0.680324", "0.6783706", "0.67652506", "0.67481035", "0.67373985", "0.67343944", "0.6732134", "0.6715589", "0.6645241", "0.664387", "0.6628045", "0.6626414", "0.6626414", "0.662126", "0.6596393", "0.6592641", "0.658388", "0.658388", "0...
0.0
-1
A modified updateGlobalLerpValue to take an object which contains compatable object subtypes (lerp/animatable).
function updateObjectLerp( objectToModify ){ // Perform clamping or bouncing of lerp value. if(objectToModify.animationFloat < 0){ // Snap value back to 0, and set reversing value to false. objectToModify.animationReversing = false; objectToModify.animationFloat = 0; } // END - if global lerp is reversin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateGlobalLerpValue(){\r\n\t// Perform clamping or bouncing of lerp value.\r\n\t// If lerp value is LESS than 0...\r\n\tif(globalLerpValue < 0){\r\n\t\t// Snap value back to 0, and set reversing value to false.\r\n\t\tglobalLerpReversing = false;\r\n\t\tglobalLerpValue = 0;\r\n\t} // END - if global ler...
[ "0.712549", "0.5439802", "0.5407007", "0.53918153", "0.52628845", "0.52441394", "0.52203596", "0.5194479", "0.5170766", "0.51698256", "0.50672144", "0.49962673", "0.49778146", "0.49462998", "0.49318582", "0.4916775", "0.489351", "0.48728788", "0.48521623", "0.48360083", "0.48...
0.72863024
0
add targetStep, but not resolve targetStep's outgoing target
function _parseNext(nodes, step, refs) { const output = []; if(step.isEnd){ return output; } if(!step.out || !step.out.length) throw `node ${step.id} have no outputs`; step.out.forEach(line=>{ const lineNode = _findLine(nodes, line.id); if(!lineNode) throw `no se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addTarget() {\n throw new Error('Extend the addTarget method to add your plugin to another plugin\\'s target');\n }", "async addAutoPassStep(silo, targetObj) {\n const stepId = await this.knexConnectionAsync.insert([{\n currentSiloId: silo.dbId,\n ruleSetName: 'autoPass',\n priority: 1000, ...
[ "0.5997291", "0.5878346", "0.5549582", "0.55476564", "0.5544846", "0.5468995", "0.5448689", "0.5439655", "0.54350585", "0.543002", "0.542287", "0.53181684", "0.52781194", "0.5256718", "0.5243599", "0.51830536", "0.51830536", "0.51830536", "0.51830536", "0.51830536", "0.515234...
0.50722444
29
Helper Functions Checks if an element has a class.
function hasClass(element, cls) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasClass(element, clas)\n{\n return (' ' + element.className + ' ').indexOf(' ' + clas + ' ') > -1;\n}", "function hasClass(element, cls) {\n return element.classList.contains(cls);\n}", "function verifyIsClass(element, nameOfClass){\n if(element != null){\n if(element.attr('class').indexOf(...
[ "0.8496227", "0.83868444", "0.83235204", "0.83164924", "0.828473", "0.828473", "0.828473", "0.8233917", "0.82230306", "0.81897163", "0.81763834", "0.8166916", "0.8166916", "0.8165932", "0.8154812", "0.814809", "0.8138781", "0.81339335", "0.81339335", "0.81339335", "0.81339335...
0.8260407
7
Toggles a class on elements with a specific class.
function toggleClassOnElementWithClass(matchClass, addClass) { var elems = document.getElementsByTagName('*'), i; for (i in elems) { if((' ' + elems[i].className + ' ').indexOf(' ' + matchClass + ' ') > -1) { classie.toggle(elems[i], addClass); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleClass(className) {\n var classes = className.split(/\\s+/)\n , name\n , i;\n for(i = 0;i < classes.length;i++) {\n name = classes[i];\n if(this.hasClass(name)) {\n this.removeClass(name)\n }else{\n this.addClass(name)\n }\n }\n}", "function toggleClass(element, class...
[ "0.7680112", "0.73390853", "0.73075473", "0.73016757", "0.72978306", "0.72836673", "0.7282263", "0.7238954", "0.71577466", "0.714713", "0.71367276", "0.7097657", "0.70414776", "0.7038596", "0.70121723", "0.7001492", "0.7001492", "0.69995767", "0.6991174", "0.6971027", "0.6962...
0.7216108
8
create a new instances of sale
constructor(){ this.sales = [] // set property of sale and set it to an empty array this.adapter = new SalesAdapter() // create adapter // this.bindEventListeners() this.fetchAndLoadSales() this.createSales() // this.clearCommission() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async create({ brand_id, sales_item_name, sales_item_uuid }) {\n return db\n .query(\n `INSERT INTO sales_item(brand_id,\n sales_item_uuid,\n sales_item_name)\n VALUES ($1, $2, $3) RETURNING *`,\n [brand_id, sales_item_uuid...
[ "0.5983404", "0.5942628", "0.58485675", "0.5845935", "0.5708195", "0.5590028", "0.55855465", "0.5555529", "0.55540186", "0.5527645", "0.5524985", "0.55055046", "0.5498997", "0.54971945", "0.5478306", "0.54668516", "0.54549795", "0.54534227", "0.54403514", "0.5413414", "0.5401...
0.55880404
6
validateForm() validate form by selector string.
function validateForm(formSelector) { var isValid = true; $(formSelector + ' :input').each(function() { if ($(this).val() === '') { isValid = false; } }); return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateForm(selector) {\n var formInput = $(selector).find('input');\n $.each(formInput, function(index, _input) {\n $(_input).on('focus', function() {\n // -------------------------------When focus on input ---------------------------------------------------\n $(_input...
[ "0.67448467", "0.65959346", "0.6462639", "0.636946", "0.59862995", "0.5976459", "0.59722906", "0.594177", "0.5899047", "0.58980185", "0.5871631", "0.5867758", "0.585019", "0.5838626", "0.58349013", "0.5789055", "0.5788806", "0.57767963", "0.5738808", "0.5715723", "0.5699007",...
0.648889
2
getCookie() get CSRF cookie.
function getCookie(name) { var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); if (cookie.substring(0,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function csrfcookie () {\n var cookieValue = null,\n name = 'csrftoken';\n if (document.cookie && document.cookie !== '') {\n var cookies = document.cookie.split(';');\n for (var i = 0; i < cookies.length; i++) {\n var cookie = cookies[i].trim();\n if (cookie.substr...
[ "0.80601245", "0.80209386", "0.7975315", "0.79567957", "0.70088995", "0.69183916", "0.68589664", "0.6802252", "0.6763289", "0.6641691", "0.6622045", "0.6598849", "0.65397525", "0.65147835", "0.6503101", "0.6495262", "0.64921814", "0.64658403", "0.64603716", "0.64295155", "0.6...
0.6031208
72
csrfSafeMethod() these HTTP methods do not require CSRF protection.
function csrfSafeMethod(method) { return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function csrfSafeMethod(method) {\n\t // these HTTP methods do not require CSRF protection\n\t return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));\n\t }", "function csrfSafeMethod(method) {\n// these HTTP methods do not require CSRF protection\nreturn (/^(GET|HEAD|OPTIONS|TRACE)$/.te...
[ "0.8502617", "0.8448504", "0.84455997", "0.8421866", "0.8421866", "0.8421866", "0.8421631", "0.839149", "0.8374523", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.8336507", "0.83308566", "0.83308566", "0.83308566", ...
0.7953583
40
sameOrigin() test that a given url is a sameorigin URL. Url could be relative or scheme relative or absolute.
function sameOrigin(url) { var host = document.location.host, protocol = document.location.protocol, sr_origin = '//' + host, origin = protocol + sr_origin; return (url == origin || url.slice(0, origin.length + 1) == origin + '/') || (url == sr_origin || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sameOrigin (url) {\n // Url could be relative or scheme relative or absolute\n var sr_origin = '//' + document.location.host,\n origin = document.location.protocol + sr_origin;\n\n // Allow absolute or scheme relative URLs to same origin\n return (url == origin || ur...
[ "0.843504", "0.7679328", "0.7623121", "0.7370065", "0.7309821", "0.7309821", "0.7309821", "0.7254329", "0.7099114", "0.7099114", "0.7099114", "0.7099114", "0.70799434", "0.70799434", "0.7049594", "0.70393306", "0.70393306", "0.70393306", "0.70393306", "0.70393306", "0.7039330...
0.84728515
0
sendData() send data via post request.
function sendData(data, successCb, errorCb) { var csrftoken = getCookie('csrftoken'); $.ajaxSetup({ beforeSend: function(xhr, settings) { if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) { xhr.setRequestHeader("X-CSRFToken", csrftoken); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendData(requestMethod, postURL, dataToSubmit) {\n let request = new XMLHttpRequest();\n\n request.open(requestMethod, postURL, true);\n request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n request.send(dataToSubmit);\n }", "sendData(reque...
[ "0.6932507", "0.6932507", "0.6836339", "0.6713825", "0.6649343", "0.65926427", "0.6560687", "0.6556802", "0.65054226", "0.6485511", "0.6460434", "0.6416603", "0.6415888", "0.6412817", "0.6412572", "0.63982004", "0.6380699", "0.6366727", "0.63596374", "0.63534594", "0.6321976"...
0.0
-1
Displays and hides cards depending on what the user selected
function filterMajors() { let menu = document.querySelector('select'); let selected = menu.options[menu.selectedIndex].text; let cards = document.querySelectorAll('.card'); for (let i = 0; i < cards.length; i++) { if (cards[i].classList.contains("d-none")) { cards[i].classList.remove...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCard(){\n $(\".rehearse_card\").hide();\n $(\".card-title-question\").hide();\n $(\".card-text-answer\").hide();\n $(\".rehearse_card:eq(\" + visibleCard + \")\").show();\n $(\".card-title-question\").show();\n}", "function toggleCards() {\n if (typeof data === 'undefined') {\n ...
[ "0.7106892", "0.7103846", "0.69929266", "0.6968872", "0.6947049", "0.6903098", "0.6778681", "0.6770809", "0.67636245", "0.67420655", "0.6734902", "0.67277277", "0.67166984", "0.6647408", "0.66249126", "0.6622975", "0.6578236", "0.6542416", "0.6523601", "0.6510359", "0.6505258...
0.0
-1
tworze konstruktor gry wlasciwosci i metody
function Game(){ this.board = document.querySelectorAll('section#board div');//plansza gry this.furry = new Furry();//egzemplarz stworka this.coin = new Coin();//moneta, jej pozycja x i y jest juz gotowa this.score = 0;//aktualny wynik gracza this.index = function(x, y){ return x + (y * 10);//przelicza ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escoltaDictat () {\r\n this.capa.innerHTML=\"\";\r\n if(!this.validate) {\r\n this.putSound (this.paraules[this.wordActual].so);\r\n this.capa.innerHTML += this.actual+this.putCursor ('black');\r\n }\r\n else {\r\n this.putSound(this.paraules[this.wordActual].so);\r\n this.putImg(this.dirImg +...
[ "0.569646", "0.5602836", "0.5485706", "0.5483454", "0.54334605", "0.5425114", "0.53979206", "0.5360927", "0.5345566", "0.53444153", "0.53362715", "0.532879", "0.532264", "0.5315222", "0.53151643", "0.53082275", "0.5304127", "0.53021896", "0.52902585", "0.5288144", "0.52878326...
0.0
-1
Build a query by user id
function userIdQuery(user) { return { userId: user.userId }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserQuery(userId) {\n let query = {};\n if(userId) {\n if (userId.match(/^[0-9a-fA-F]{24}$/)) {\n query = { _id: userId }\n } else {\n query = { username: userId }\n }\n }\n\n return query;\n}", "function getUserByIdQuery(_id) {\n return User.findById(_id);\n}", "function Se...
[ "0.7212307", "0.6474261", "0.63711685", "0.62333405", "0.59662193", "0.5873114", "0.5858225", "0.5834849", "0.5798587", "0.5790747", "0.57841116", "0.5771733", "0.5754266", "0.5749882", "0.5739208", "0.57223105", "0.5703775", "0.5685125", "0.5683078", "0.56682956", "0.5656321...
0.731066
0
Initializes the CDN library downloader.
function init() { var destDirPath, projectItem = ProjectManager.getSelectedItem(); if (projectItem.isDirectory) { destDirPath = projectItem.fullPath; } else { destDirPath = ProjectManager.getProjectRoot().fullPath; } _showDialog().done(functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initDownload() {\n downloadStartTime = new Date().getTime();\n downloadImg(0);\n }", "function initDownload(){\n\tvar initUrl = URLUtil.getFeedUrl();\n\tconsole.log(initUrl)\n\tdownloadAllFeeds([initUrl]);\t\n}", "function init() {\n cacheDom();\n loadImage();\n }", ...
[ "0.61587715", "0.6120726", "0.5980616", "0.5955116", "0.5917145", "0.5842045", "0.58133143", "0.5719346", "0.5719346", "0.57077205", "0.57023996", "0.5697397", "0.56926703", "0.56912565", "0.5666983", "0.5617944", "0.5615616", "0.5610714", "0.5607033", "0.5600208", "0.5554744...
0.55664
20
let colors = [[96,168,98], [196,92,162], [180,148,62], [119,122,205], [203,90,76]];
function setup() { // http://datamx.io/dataset/salario-minimo-historico-1877-2019 loadTable('../../data/mx_salariominimo_1877-2019.csv', 'csv', 'header', gotData); createCanvas(windowWidth, windowHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeColors() {\n colors.push([\"rgb(205,230,245)\",\"rgb(141,167,190)\"])\n colors.push([\"rgb(24,169,153)\",\"rgb(72,67,73)\"])\n colors.push([\"rgb(24,169,153)\",\"rgb(242,244,243)\"])\n colors.push([\"rgb(237,242,244)\",\"rgb(43,45,66)\"])\n colors.push([\"rgb(192,248,209)\",\"rgb(189,207,181)\"])...
[ "0.72900283", "0.72145736", "0.71249884", "0.7089931", "0.70095515", "0.68770665", "0.6848165", "0.6838774", "0.6803002", "0.67866945", "0.67469114", "0.6743884", "0.67289686", "0.671771", "0.67100936", "0.6707575", "0.6706507", "0.6685481", "0.6633589", "0.6629389", "0.66285...
0.0
-1
The snowfall This function adds snow to the DOM and apply's some random styling
function addSnow() { // Creating the snow element const snow = document.createElement('span'); // Setting random positions to the snow on the x-axis const left = Math.round(Math.random() * window.innerWidth); snow.style.left = left + 'px'; // Setting random sizes to the snow const radius = Math.round(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSnow() { // shoud possibly be an object / constructo function\n var snow = document.createElement(\"div\");\n var _ = document.createTextNode(\".\");\n var main = document.getElementById(\"snowArea\"); // .createElement(\"div\");\n snow.appendChild(_);\n snow.classList.add(\"snow\");\...
[ "0.7632841", "0.754819", "0.7506265", "0.7359253", "0.7127745", "0.67426664", "0.6549764", "0.6423981", "0.6388537", "0.6336541", "0.63323164", "0.62478966", "0.61484957", "0.6058834", "0.6011207", "0.59943867", "0.59890306", "0.5971632", "0.593542", "0.58539915", "0.58454865...
0.8026701
0
The onclick function which is on the the snowflake icon
function letItSnow() { // Calling the addSnow function in a loop to add 50 snow elements for (let i = 0; i < 50; i++) { addSnow(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onClick({x,y,object}) {\n console.log(\"Clicked icon:\",object);\n }", "onClick() {\n }", "function onClick() {\n}", "onclick(){}", "handleJDotterClick() {}", "function onClick(e) {\n }", "function Click() {\n}", "function onBrowserActionClick() {\n info(\"event: browser action icon was c...
[ "0.7116801", "0.6899422", "0.68865144", "0.68220514", "0.6755415", "0.67301244", "0.6519582", "0.6447334", "0.6281522", "0.62723565", "0.6269966", "0.6255333", "0.6250979", "0.624553", "0.6218259", "0.6215519", "0.6208778", "0.61409074", "0.6130031", "0.6117342", "0.6114941",...
0.0
-1
li list element ul unordered list
function StudentList({students}) { function renderStudents(){ return students.map((student, i)=>{ var studentData = [student.firstName, student.lastName, student.svnNumber].join(" "); return <li key = {i}>{studentData}</li> }) }; return ( <div> <ul> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalizeList(dom) {\n for (let child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n let name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child)\n child = prevItem\...
[ "0.63991344", "0.63866127", "0.6310928", "0.6248032", "0.6240962", "0.62173426", "0.6197212", "0.61554277", "0.6136265", "0.61175907", "0.61175907", "0.61164314", "0.60909325", "0.6089951", "0.6049871", "0.60284925", "0.59704155", "0.59695816", "0.59684134", "0.5961793", "0.5...
0.0
-1
takes the json from cardtext.js as a parameter and returns an array of black cards
getBlackCards(json){ var blackCardsRaw = json.blackCards; var blackCardsRefined = []; for(var card of blackCardsRaw){ if(card.pick == 1){ blackCardsRefined.push(card.text); } } return blackCardsRefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getWhiteCards(json){\n return json.whiteCards;\n }", "function getCards(data){\n\tvar cards = data.items.MTG.cards;\n\tfor(c in cards){\n\t\tvar name = cards[c].split(\"-\")[0];\n\t\tvar span = $(\"<span>\"+name+\"</span><br>\");\n\t\t$(\"#mtg-list\").append(span);\n\t}\n\treturn null;\n}", "function c...
[ "0.74409986", "0.66615003", "0.6045272", "0.60004544", "0.59735185", "0.5952333", "0.5909625", "0.5899814", "0.58983094", "0.58823556", "0.5880223", "0.58478355", "0.5814674", "0.5728323", "0.57154405", "0.5688162", "0.56524587", "0.5623733", "0.5619616", "0.56141514", "0.561...
0.87322396
0
takes the json from cardtext.js as a parameter and returns an array of white cards
getWhiteCards(json){ return json.whiteCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBlackCards(json){\n var blackCardsRaw = json.blackCards;\n var blackCardsRefined = [];\n for(var card of blackCardsRaw){\n if(card.pick == 1){\n blackCardsRefined.push(card.text);\n }\n }\n return blackCardsRefined;\n }", "function getCards(data){\n\tvar card...
[ "0.8210676", "0.6722568", "0.6196194", "0.6124625", "0.6065196", "0.6040029", "0.600154", "0.5948894", "0.58616453", "0.58579737", "0.58498895", "0.584558", "0.57844186", "0.57745796", "0.57662165", "0.57256377", "0.5700944", "0.570047", "0.5642667", "0.5634249", "0.5610377",...
0.76214325
1
Variable hoisting: start easy: Why can't we get the console to log any of the a's?
function foo() { var a = 7; function bar() { // var a is hoisted here (don't write this until after) console.log(a) var a = 3 } bar(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo() {\n var a;\n console.log( a );\n var a = 2;\n}", "function foo(){\n\ta = 3;\n\n\tconsole.log( a );\n\n\tvar a;\t\t\t\t// declaration is \"hoisted\" to top of foo.\n\n}", "function foo(){\n\ta = 3;\n\n\tconsole.log(a); //3\n\n\tvar a;\t\t// declaration is hoisted at top of foo.\n}", "functio...
[ "0.72118473", "0.7019086", "0.6983794", "0.69248724", "0.6908453", "0.68406683", "0.68113464", "0.6803133", "0.6790225", "0.6780439", "0.677071", "0.66323876", "0.6569807", "0.656771", "0.6475423", "0.6388807", "0.6367336", "0.6358963", "0.6347891", "0.633064", "0.633064", ...
0.7297764
0
return prior to declaring function b()
function b() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function b() {\n\treturn doSomething();\n}", "function b() {\n}", "function b(){\n \n}", "function b() {\n\tconsole.log('Called b');\n}", "function a() {\n b();\n console.log('I an a function a');\n}", "function b(){\n console.log('Called b');\n}", "function b(){f.call(this)}", "function b(...
[ "0.7704876", "0.7617843", "0.7488174", "0.71260774", "0.7116076", "0.69878525", "0.6900003", "0.68656015", "0.68651724", "0.67736363", "0.66854113", "0.66850024", "0.66850024", "0.66850024", "0.66850024", "0.6677642", "0.6633063", "0.66072047", "0.66033137", "0.6599044", "0.6...
0.78171366
1
Hoisted b function definition
function b() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ba(){}", "function ba(){}", "function ba(){}", "function ba(){}", "function b() {\n}", "function Bo(t,e){0}", "function b(){\n \n}", "function b(){\n console.log('Called b');\n}", "function Ha(){}", "function b() {\n\tconsole.log('Called b');\n}", "function Bevy() {}", "function ...
[ "0.7471411", "0.7471411", "0.7471411", "0.7471411", "0.72615397", "0.71583223", "0.7034969", "0.6852821", "0.68467975", "0.68266106", "0.6799481", "0.67558056", "0.67402947", "0.67230123", "0.6679206", "0.6624308", "0.6608131", "0.6597286", "0.656898", "0.6506699", "0.6455955...
0.75755507
0
TODO: Create a function to write README file
function writeToFile(fileName, data) { fs.writeFile(`./${fileName}.md`,data, (err) => { if (err){ console.log(err) } console.log ("Generating README..."); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeREADME(savefileName, data) {\n fs.writeFile(savefileName, data, () => {});\n \n console.log('Your README has been generated, check the dist folder')\n}", "function writeToFile(data) {\n fs.writeFile(\"./README.md\", generatePage(data), (err) => {\n if (err) throw new Error(err);\n\n conso...
[ "0.80459154", "0.769568", "0.7688438", "0.7662486", "0.7625201", "0.7613852", "0.7600793", "0.75778055", "0.7540343", "0.7540213", "0.75199854", "0.75136596", "0.7454612", "0.74240106", "0.7417176", "0.7403209", "0.7387397", "0.73748857", "0.736913", "0.7356774", "0.7356653",...
0.7187643
29
TODO: Create a function to initialize app
function init() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initApp() {\n var router = new App.Router();\n var dispatcher = new App.Dispatcher();\n\n router.once('route', function() {\n dispatcher.runAction(router.getCurrent(), router.getParams());\n });\n\n // Start!\n router.startHistory();\n}", "function initApp() {\n\tinitSounds();\n\tinitSensors();...
[ "0.79483765", "0.77004915", "0.75859904", "0.7392242", "0.73389673", "0.7337566", "0.7098709", "0.7094714", "0.70335907", "0.70264256", "0.70233685", "0.69898516", "0.6983825", "0.6980272", "0.69399434", "0.6926202", "0.69252443", "0.69087744", "0.68747747", "0.6861737", "0.6...
0.0
-1
date may be null or if it is entered it should be date
function check_text_datenull(InpDateObj) { var InpDate=InpDateObj.value; if(InpDate != "") { return check_text_date(InpDateObj); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDate(input) {\n return input && input.getDate && !isNaN(input.valueOf());\n }", "function dateCheck(date){\n let finalDate;\n if (date==null){\n finalDate='';\n }else{\n finalDate= date;\n }\n return finalDate;\n}", "get date() {\n return...
[ "0.75898683", "0.728999", "0.72037995", "0.70714414", "0.6936811", "0.6865594", "0.67343247", "0.6655354", "0.6600792", "0.6585052", "0.6583183", "0.656694", "0.65499693", "0.65420526", "0.6535592", "0.6521928", "0.6507404", "0.65072006", "0.6499294", "0.6479706", "0.64716333...
0.6181998
56
Function to check the field is empty.If there is no data true is returned else false is returned.
function checkFieldEmpty(FieldData,cntErrField) { if(FieldData.length) { return false; } else { cntErrField.value=""; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_field_empty(field) {\n if (field == undefined || field == '')\n return true;\n else\n return false;\n}", "checkFieldIfEmpty(field) {\n var empty = false;\n if (this.salutationForm.get(field).value == null ||\n this.salutationForm.get(field).value == '') {\...
[ "0.8195775", "0.81227344", "0.80921924", "0.8033589", "0.7949832", "0.7820507", "0.7785254", "0.7696803", "0.76803434", "0.76574886", "0.7600648", "0.75945216", "0.7564241", "0.7542774", "0.75282973", "0.75060576", "0.74979615", "0.7483086", "0.74465925", "0.74423015", "0.738...
0.8005818
4
Function for comparing two dates
function checkDates(dateField1,dateField2,errorMsg) { frmDate=dateField1.value; frmDate=Date.UTC(frmDate.substr(6,4),frmDate.substr(3,2)-1,frmDate.substr(0,2)); toDate=dateField2.value; toDate=Date.UTC(toDate.substr(6,4),toDate.substr(3,2)-1,toDate.substr(0,2)); if(frmDate > toDate) { alert(errorMsg);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareDates(date1, date2)\r\n{\r\n if(date1 < date2)\r\n return -1;\r\n else if(date1 > date2)\r\n return 1;\r\n else\r\n return 0;\r\n}", "function compare_dates(fecha, fecha2) \r\n { \r\n\t\r\n var xMonth=fecha.substring(3, 5); \r\n var xDay=fecha.substring(...
[ "0.7933325", "0.79294527", "0.78513306", "0.782929", "0.7825834", "0.7821799", "0.7812741", "0.7737143", "0.7702262", "0.76856935", "0.76489323", "0.76326287", "0.76181084", "0.7574218", "0.75381714", "0.75355226", "0.75211674", "0.74805105", "0.7459372", "0.74500567", "0.744...
0.6813696
69
Function to compare two dates from date and to date
function checkTodateLess(dateField1,dateField2,patname,errorMsg1) { frmDate=dateField1.value; frmDate=Date.UTC(frmDate.substr(6,4),frmDate.substr(3,2)-1,frmDate.substr(0,2)); toDate=dateField2.value; toDate=Date.UTC(toDate.substr(6,4),toDate.substr(3,2)-1,toDate.substr(0,2)); if(frmDate > toDate) { al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareDate(fromDate, toDate) {\r\r\tvar dt1 = parseInt(fromDate.substring(0, 2), 10);\r\r\tvar mon1 = parseInt(fromDate.substring(3, 5), 10);\r\r\tvar yr1 = parseInt(fromDate.substring(6, 10), 10);\r\r\tvar dt2 = parseInt(toDate.substring(0, 2), 10);\r\r\tvar mon2 = parseInt(toDate.substring(3, 5), 10);\...
[ "0.80404806", "0.7633265", "0.7597395", "0.75823194", "0.74235076", "0.74127644", "0.7399676", "0.73860925", "0.7352716", "0.7342239", "0.73357934", "0.7276899", "0.72608376", "0.72474813", "0.7247469", "0.7189725", "0.7170247", "0.71696043", "0.7167364", "0.7134652", "0.7129...
0.64847404
87
Function for comparing dates with time
function dateTimeDiff(D1,D2,errorMsg,patname) { if(!(patname.test(trim(D1.value)))) { alert(errorMsg); D1.focus(); return false; } if(!(patname.test(trim(D2.value)))) { alert(errorMsg); D2.focus(); return false; } D1Arr=D1.value.split(" "); D2Arr=D2.value.split(" "); D1Da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkDate(date, time) {\r\n let inputDate = new Date(date);\r\n if (time) {\r\n let hours = time.slice(0, 2);\r\n let minutes = time.slice(3, 5);\r\n inputDate.setHours(hours);\r\n inputDate.setMinutes(minutes);\r\n inputDate.setSeconds(99);\r\n }\r\n else {\...
[ "0.72111106", "0.70316315", "0.69489896", "0.6844882", "0.6834171", "0.68082154", "0.6789528", "0.6788058", "0.67773443", "0.67773443", "0.67773443", "0.67773443", "0.67773443", "0.6774891", "0.67360973", "0.6703634", "0.6702823", "0.6657916", "0.6647032", "0.6594081", "0.658...
0.0
-1
This for loop is a short cut for var hourNine = localStorage.getItem("hour9"); $("hour9").val(hourNine); get localstorage
function getLocalStorage() { for (var i = 9; i < 18; i++) { $("#hour-" + i).val(localStorage.getItem("hour-" + i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFromLocalStorage(){\n for (let i = 9; i <= 19; i++) {\n let x = \"#hour\" + i\n if(localStorage.getItem(x)){\n let w = (localStorage.getItem(x))\n let p = document.querySelector(x)\n p.value = w\n }\n } \n }", "function pullStora...
[ "0.86230123", "0.80268705", "0.7852098", "0.7702467", "0.76558906", "0.7558315", "0.75356066", "0.75214106", "0.7485002", "0.7454084", "0.7450706", "0.7421565", "0.7331226", "0.72987926", "0.72912514", "0.7288431", "0.72093576", "0.71646327", "0.7162778", "0.7157344", "0.7122...
0.8944891
0
NEED TO WRITE THIS
function displayAPIError(error) { console.log(error) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient private internal fun...
[ "0.69926625", "0.6989841", "0.6688535", "0.646041", "0.636054", "0.62876743", "0.62683284", "0.61563766", "0.603724", "0.5990397", "0.59748524", "0.5955284", "0.5923668", "0.5817267", "0.58090395", "0.57964027", "0.57955754", "0.57710284", "0.570799", "0.57046545", "0.5691451...
0.0
-1
ONLY ALLOW SUBMIT ON VALID FORM
function postcodeValid(postcode) { var regex = /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([AZa-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z]))))[0-9][A-Za-z]{2})/ var postcode = noSpacesPostcode(postcodeInput.value); if (regex.test(postcode)) { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "preventSubmitUnlessValid() {\n }", "function validateForm() {\n isFormValid = true;\n\n validateName();\n validateEmail();\n validateDemand();\n validateOptions();\n\n if (isFormValid) {\n submit.disabled = false;\n } else {\n submit.disabled = true;\n\n }\n}", "functio...
[ "0.7320016", "0.6967807", "0.68231094", "0.67942876", "0.67665464", "0.67456996", "0.66651106", "0.66377074", "0.6615927", "0.66136545", "0.6575135", "0.65385044", "0.6482504", "0.64814436", "0.64771837", "0.64771837", "0.64767236", "0.6468344", "0.6438692", "0.6426258", "0.6...
0.0
-1
Set ID (This is not UUID and referenceID). _id(getter/setter) is only used by TomlToolsaveToml().
set _id(value) { this.__id = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set id(newId) {\n this._id = newId;\n }", "set id(id) {\n idMap.set(this, id);\n }", "set id(val) {\n WBORecord.prototype.__lookupSetter__(\"id\").call(this, val);\n return this.cleartext.id = val;\n }", "set id(val) {\n if (this._id) {\n throw new Error(`Can't change id!`);\...
[ "0.76849127", "0.7471364", "0.74624246", "0.7422186", "0.7422186", "0.7387025", "0.7381058", "0.73128563", "0.72201145", "0.70381755", "0.6826656", "0.68070596", "0.6764782", "0.6601154", "0.6582511", "0.6549231", "0.65355337", "0.63716114", "0.63267523", "0.6324163", "0.6324...
0.81020015
0
Set ID (This is not UUID and referenceID). _id(getter/setter) is only used by TomlToolsaveToml().
get _id() { return this.__id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set _id(value) {\n this.__id = value;\n }", "set id(newId) {\n this._id = newId;\n }", "set id(id) {\n idMap.set(this, id);\n }", "set id(val) {\n WBORecord.prototype.__lookupSetter__(\"id\").call(this, val);\n return this.cleartext.id = val;\n }", "set id(val) {\n if (this....
[ "0.8099904", "0.7683534", "0.7470728", "0.74606913", "0.74206096", "0.74206096", "0.7385624", "0.73805606", "0.73115206", "0.7219508", "0.7036794", "0.6826004", "0.68052125", "0.6762678", "0.6600304", "0.6581386", "0.65478384", "0.65333813", "0.63705504", "0.6325781", "0.6323...
0.59183425
44
Returns annotation object Identifier (Unique in all(highlight and relation) object). For Annoui annoListDropDown. This interface calls `annotation.uuid` as the identifier.
get uuid() { return this._uuid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get id() {\n return this._annotation.id; \n }", "get id() {\n return this._annotation.id; \n }", "make_new_annotation_id() {\n var unq_str = uuidv4();\n return unq_str;\n }", "function getAnnotDomLabelId(annot) {\n return 'ideogramLabel_' + annot.domId;\n}", "get identifier() {\n ...
[ "0.6778263", "0.6778263", "0.62571913", "0.6094283", "0.58449215", "0.57478523", "0.5612665", "0.5571824", "0.54780704", "0.5450957", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0.54036146", "0...
0.0
-1
Returns annotation label. For Annoui annoListDropDown.
get text() { return this.content(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get label() {\n if (this.isObject(this.options)) {\n return this.options.label;\n }\n else {\n return '';\n }\n }", "function fieldLabel(field) { return [field, \"Label\"].join(\"\"); }", "function getAnnotationLabel(type) {\n switch (type) {\n case \"hasAuthor\": return (\"Author\")...
[ "0.6301896", "0.62988013", "0.62872624", "0.6115363", "0.608621", "0.608621", "0.60073674", "0.59397244", "0.591458", "0.5904751", "0.58789295", "0.58787245", "0.58555835", "0.58535427", "0.58475655", "0.5830161", "0.58241767", "0.58131635", "0.579886", "0.5786961", "0.574218...
0.0
-1
Returns the Y coordinate of the annotation object. this method expects ths subclass to override.
get scrollTop() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getY() {\n return this.getLocation().y;\n }", "function getY() {\n\n\t\treturn this.y;\n\n\t}", "getY() {\r\n return this.y;\r\n }", "getY() { return this.y; }", "get yPosition() { return this._yPosition; }", "y() {\n\t\t\treturn this.data.y;\n\t\t}", "get y()\n\t{\n\t\treturn this....
[ "0.7557413", "0.74654126", "0.74554354", "0.7351826", "0.7262106", "0.6817039", "0.6802404", "0.67948943", "0.67748374", "0.6756833", "0.67024595", "0.66239476", "0.6620285", "0.6562736", "0.65587634", "0.6535927", "0.65312093", "0.6529185", "0.6520481", "0.6487486", "0.64446...
0.0
-1
Set annotation selected status (on GUI)
set selected(value) { this._selected = value; this._selectedTimestamp = value ? new Date() : undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAnnotationSelected (annotation) {\n if (_getSelectedAnnotations().length === 1) {\n core.enable({ uuid : annotation.uuid, text : annotation.text })\n } else {\n core.disable()\n }\n}", "function handleAnnotationDeselected () {\n const annos = _getSelectedAnnotations()\n ...
[ "0.73485893", "0.696681", "0.65656424", "0.6559516", "0.64885503", "0.638613", "0.61712563", "0.6130372", "0.6099815", "0.6093777", "0.60884976", "0.6076604", "0.6060837", "0.5995455", "0.5978938", "0.5919111", "0.5896099", "0.58631575", "0.5861555", "0.58434194", "0.5803437"...
0.54909724
62
true is Primary annotation Note: _fileContent.primary can not use for primary/reference check, because that is shared between primary and reference.
isPrimary() { return undefined == this.referenceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasPrimaryConstraint () {\n\t\treturn this.primary;\n\t}", "get isPrimary(){\n return ( 0 != ( ( this.kind ) & 1 ) );\n }", "isMasterFile(filePath) {\n if (!fs.existsSync(filePath)) { return false; }\n\n const rawFile = fs.readFileSync(filePath, {encoding: \"utf-8\"});\n return masterFilePattern.t...
[ "0.5884931", "0.5697689", "0.5275228", "0.5264234", "0.5197476", "0.50885594", "0.5078971", "0.5072613", "0.5071844", "0.5070136", "0.5059471", "0.5041854", "0.49961802", "0.49455085", "0.49119756", "0.48955786", "0.48535967", "0.48521483", "0.48089176", "0.47884634", "0.4783...
0.622368
0
true is Reference annotation Note: _fileContent.primary can not use for primary/reference check, because that is shared between primary and reference.
isReference() { return undefined != this.referenceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isPrimary() {\n return undefined == this.referenceId;\n }", "function isReference(schema) {\n var refd_type;\n // simple reference\n if ((refd_type = schema.options.ref)) return refd_type;\n // array of references\n if ((refd_type = schema.options.type && schema.options.type[0] && schema.optio...
[ "0.59585893", "0.58717", "0.5810642", "0.5454659", "0.54032135", "0.53507644", "0.53270566", "0.5291847", "0.51848084", "0.51848084", "0.51796234", "0.51642704", "0.5157608", "0.515552", "0.51153517", "0.5100766", "0.5075157", "0.5075157", "0.50634056", "0.5057964", "0.504568...
0.6586814
0
set fileContent that is created by FileContainerloadFiles(), other name is "AnnotationFileObj".
setFileContent(newValue) { this._fileContent = newValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set file(value) { this._file = value; }", "setContent(content) {\r\n return this.clone(File, \"$value\", false).postCore({\r\n body: content,\r\n headers: {\r\n \"X-HTTP-Method\": \"PUT\",\r\n },\r\n }).then(_ => new File(this));\r\n }", "setFile...
[ "0.65016633", "0.61474425", "0.5982911", "0.58341795", "0.57520753", "0.5708736", "0.5687193", "0.56840855", "0.55140245", "0.54164326", "0.53752667", "0.537014", "0.53221846", "0.5307187", "0.52614194", "0.5253248", "0.5249531", "0.5239421", "0.5221207", "0.5221207", "0.5220...
0.6707207
0
true is the annotation can edit and delete.(reference annotation can not editable)
isEditable() { return !this.isReference(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEditAllowed()\n {\n return activeInitData.editAllowed === true;\n }", "isDeletePermitted() {\n return this.checkAdminPermission('delete')\n }", "function enableEdit() {\n\t if (_enabled) {\n\t return;\n\t }\n\t\n\t _enabled = true;\n\t (0, _event.addEventListener)...
[ "0.6486427", "0.62201023", "0.61864936", "0.6171139", "0.6167592", "0.6165052", "0.6141391", "0.6068531", "0.59469014", "0.5883192", "0.58586323", "0.5834798", "0.58292973", "0.5796771", "0.5766032", "0.57651377", "0.57182676", "0.57016087", "0.5696573", "0.5664246", "0.56029...
0.6775833
0
Common function to call the Get services
function doGet($q, $http, url) { var def = $q.defer(); $http({ method: "GET", url: url, headers : { 'Content-Type': 'application/json; charset=UTF-8', 'token' : token} }).then(function (data) { def.resolve(data); },function (error) { validateResponse(error); def...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getServicesList() {\n\t\t\tcustApi.getServices().\n\t\t\tsuccess(function (data, status, header, config) {\n\t\t\t\tconsole.log(\"Services retrieved successfully\");\n\t\t\t\tvm.apptCost = data.payload[0].rate;\n\t\t\t\tvar serviceMap = buildServicesMap(data.payload);\n\t\t\t\tvm.physiotherapyId = service...
[ "0.6364921", "0.6284468", "0.62560415", "0.6241337", "0.6175913", "0.61678267", "0.61564416", "0.61005366", "0.59716976", "0.59592485", "0.59331256", "0.59169436", "0.58721495", "0.58526474", "0.58176726", "0.58158094", "0.5809898", "0.5781479", "0.575934", "0.5754267", "0.57...
0.0
-1
================== Private functions ================== Draws a single segment of the circle, together with its assigned icon
function drawSegment(i, color) { var centerAngle = i * segmentAngle + Math.PI / 2;; var startAngle = centerAngle - segmentAngle / 2; var endAngle = centerAngle + segmentAngle / 2 var img; // Draw the segment ctx.strokeStyle = "#000000"; ctx.lineWidth = 5;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawIcon()\n\t{\n\t\tlet size = this.size / 2\n\t\tthis.iconHeight = size\n\t\tthis.iconWidth = size\n\t\tconst circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle')\n\t\tcircle.setAttribute('cx', this.x + size / 2)\n\t\tcircle.setAttribute('cy', this.y + size / 2)\n\t\tcircle.setAttribute('r',...
[ "0.6846003", "0.67414945", "0.6738644", "0.6661633", "0.6590151", "0.6566648", "0.65329975", "0.65204126", "0.6518095", "0.6454955", "0.64397025", "0.6384671", "0.6378076", "0.6377569", "0.6371192", "0.6362803", "0.6352011", "0.6351579", "0.6350299", "0.63487315", "0.6344933"...
0.7755988
0
Updates size paramterers to match the current size of the canvas
function updateSize() { innerRadius = innerRadiusArg * canvas.width / 2; outerRadius = outerRadiusArg * canvas.width / 2; centerX = centerXArg * canvas.width; centerY = centerYArg * canvas.height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateSize(newCanvasWidth, newCanvasHeight) {\n canvasWidth = newCanvasWidth;\n canvasHeight = newCanvasHeight;\n isCanvasDirty = true;\n }", "function updateCanvasSize() {\n canvasContainer.style.width = \"100vw\";\n var size = getCanvasSize();\n if (fu...
[ "0.84102035", "0.8063861", "0.80084884", "0.7964988", "0.77420676", "0.7595204", "0.7562139", "0.75555253", "0.7453296", "0.7445349", "0.74272376", "0.73913634", "0.7354414", "0.73262084", "0.72478503", "0.72351235", "0.72351235", "0.7226023", "0.72064805", "0.7167985", "0.71...
0.8304707
1
clear any errors already their
function clearErrors(){ let msg = document.getElementById("error"); if(msg) msg.remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetErrors() {\n this.errorCount = 0;\n this.seenErrors.clear();\n }", "clearError() {\n this.error = false;\n this._errortext = this.__initalErrorText;\n }", "clearError() {\n this.error = false;\n this._errortext = this.__initalErrorText;\n }", "clearErrors() {\n this.bar...
[ "0.8039984", "0.80155706", "0.80155706", "0.7847727", "0.7802759", "0.7645962", "0.76060516", "0.7572854", "0.74863553", "0.73013073", "0.72021604", "0.7003249", "0.6952078", "0.691546", "0.6897805", "0.68899345", "0.68687606", "0.68572915", "0.6806489", "0.67930603", "0.6736...
0.6399344
44
sets error message if user hasnt entered form correct
function errorMsg(text){ document.getElementById("form") .insertAdjacentHTML("beforeend", `<div id = "error"> Error: ${text}!</div>`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showFormValidationAlert() {\n\tformIsValid()\n\t\t? null\n\t\t: alert('Please complete the order form and try again.')\n}", "function checkFormSubmit() {\n var errCode = getURLVar(\"error\");\n if (errCode !== false) {\n if (errCode == \"0\") {\n $('#errorMSG').cs...
[ "0.6951915", "0.677835", "0.6755606", "0.6749636", "0.6743643", "0.6723397", "0.6706985", "0.6673913", "0.6644014", "0.6643277", "0.6616356", "0.6599352", "0.6585044", "0.65827453", "0.6580768", "0.65548605", "0.6544394", "0.6534897", "0.6534437", "0.6530584", "0.6530242", ...
0.0
-1
checks if the email is in the database
function checkDB(email, msg) { axios.get('https://ift-bot-default-rtdb.firebaseio.com/attendees.json') .then((res) => res.data) .then((data) => { var found = false; for (let i = 0; i < data.length; i++) { if (email == data[i]) { // success msg.channel.send("yay"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkEmail(usersDB, email, callback){\n usersDB.find({Email:email}, function(err, doc){\n if(!err && doc.length > 0){\n console.log(\"emial: \",doc);\n callback(false);\n } else {\n callback(true);\n }\n });\n}", "function checkExistingEmail(em...
[ "0.7767635", "0.7669948", "0.75848085", "0.74351454", "0.7400646", "0.73669106", "0.73538303", "0.73212266", "0.73073894", "0.7269829", "0.71567494", "0.7148885", "0.7141706", "0.71338475", "0.7083601", "0.70819086", "0.7062965", "0.7059417", "0.70411104", "0.7016574", "0.700...
0.6362355
90
var textArr = upset(randColorArr); console.log(textArr);
function allReset() { randFontArr = upset(randFontArr); randColorArr = upset(randColorArr); mainFont.innerHTML = randFontArr[Math.floor(Math.random() * 5)]; mainFont.style.color = randColorArr[Math.floor(Math.random() * 5)]; for (var i = 0; i < fontArr.length; i++) { fontArr[i].innerHTML = randFontArr[i]; fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createColorPicker() {\n\n // Shuffle color array\n\n\n\n // Push to text color array\n\n\n\n // Shuffle text color array\n\n\n // Loop through all colors in the array\n // Create element to hold word\n // Output a word\n // Make word a random color\n\n }...
[ "0.6421091", "0.59906214", "0.5901348", "0.5840064", "0.5830631", "0.5826966", "0.58205366", "0.5719183", "0.57159007", "0.570526", "0.56829214", "0.5641998", "0.5638426", "0.5607687", "0.5601075", "0.5600142", "0.55981666", "0.55981666", "0.55859697", "0.55839777", "0.558385...
0.57818675
7
The data manager. let dataManager = require(__dirname + "/data/testDataManager.js")(db, engine, fs, promise) The data object manager. let dataObjectManager Run the test suite.
async function run() { let test // await db.init() // TODO : Run the data manager's test data setup // dataObjectManager = await require(__dirname + '/../../server/dataObjects/dataObjectManager.js')(engine, db, fs, promise) for (test in config) { if (config[test] === 1) { if (test === "extens...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DataManager() {}", "function DataManager() {\n\t\t(0, _classCallCheck3.default)(this, DataManager);\n\n\t\tthis.dataset = [];\n\t}", "function DataManager(dataModel) {\n this.model = dataModel;\n }", "function DataManager() {\n\n /**\n * Stores all documents by UID.\n * @property do...
[ "0.7521985", "0.66531396", "0.65599114", "0.620891", "0.5735846", "0.5647061", "0.5647061", "0.56161046", "0.56161046", "0.5453702", "0.540025", "0.5370829", "0.5329403", "0.5265055", "0.52623004", "0.5245484", "0.52412397", "0.5164236", "0.5144205", "0.51281166", "0.51258636...
0.6504151
3
Load json data for incidents of gun violence. On success, instantiate knockout and pass it the data. Note: this function won't fire until map is ready.
function loadData(){ var getData = $.getJSON( "dev/data/shooting_incidents.json", function() { }) .done(function(data){ mapData = data; viewModel = new AppViewModel(); ko.applyBindings(viewModel); }) .fail(function(msg){ console.log('error: ' + msg); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function googleSuccess() {\r\n //Apply knockout bindings and load the appViewModel\r\n vm = new appViewModel();\r\n ko.applyBindings(vm);\r\n //Initialize map\r\n mapInit();\r\n}", "function initMap() {\n $.getJSON('/places/json', function (data) {\n // showDescription will toggle show a...
[ "0.6078788", "0.6063336", "0.5899132", "0.5871862", "0.5844824", "0.5825501", "0.5770714", "0.5756883", "0.5754548", "0.5720824", "0.5688869", "0.56272286", "0.5610027", "0.5609219", "0.5587147", "0.555395", "0.55471843", "0.5515513", "0.5497687", "0.549619", "0.5492076", "...
0.7577973
0
Render Google map This function is called by the google map's API
function initMap() { var myLatLng = {lat: 37.856365, lng: -98.341694}; var googleMap = new google.maps.Map(document.getElementById('map'), { center: {lat: 37.856365, lng: -98.341694}, zoom: 5 }); app.init(googleMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rendermap() {\n var mapProp = {\n mapTypeId : google.maps.MapTypeId.ROADMAP\n };\n // map = new google.maps.Map(document.getElementById(\"map-canvas\"), mapProp);\n // // using vanilla js\n map = new google.maps.Map($(\"#map-canvas\")[0], mapProp); // using jQuery\n}", "function view_contact_dra...
[ "0.7545261", "0.7425938", "0.72546303", "0.71053195", "0.70590353", "0.68960327", "0.68725973", "0.68332267", "0.6823726", "0.67919797", "0.6773188", "0.6769728", "0.67246395", "0.66746", "0.6673334", "0.6670847", "0.66198725", "0.66020983", "0.6586666", "0.65740573", "0.6565...
0.0
-1
Return a string representing a GetFeatureInfo request URL for the current map, based on the passed parameters: serviceUrl: the URL of the WMS service layer: layer to query srs: the SRS of the layer (x,y): (pixel) coordinates of query point
function createWMSGetFeatureInfoRequestURL (serviceUrl, layer, srs, x, y) { var extent = app.map.getExtent(); if (seldon.gisServerType === "ArcGIS") { extent = extent.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection(seldon.projection)); } return M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFeatureInfo(e)\n{\n if (essc_wms != null)\n {\n $('featureInfo').innerHTML = \"Getting feature info...\";\n var url = essc_wms.getFullRequestString({\n REQUEST: \"GetFeatureInfo\",\n BBOX: essc_wms.map.getExtent().toBBOX(),\n I: e.xy.x,\n ...
[ "0.58978796", "0.58761376", "0.58641654", "0.5815814", "0.55984324", "0.5595393", "0.54485154", "0.53228074", "0.53182685", "0.5278114", "0.5267468", "0.5250905", "0.52450705", "0.52346385", "0.5212982", "0.5202399", "0.51577806", "0.5073578", "0.5063595", "0.50612813", "0.50...
0.8137526
0
Setup the global Notification test fixture.
function setupNotification (options) { options = options || {}; global.window.Notification = { permission: options.permission || 'denied' }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setup() {\n this.setupLayout();\n this.setupNotifications();\n }", "function setupNotification() {\n if (!Notification) {\n console.log(\"This browser does not support notifications\")\n }\n\n if (Notification.permission !== \"granted\") Notification.requestPermission();\n}", ...
[ "0.66008073", "0.6420947", "0.6063453", "0.6061382", "0.604477", "0.5881562", "0.58416516", "0.5809288", "0.5793239", "0.5790415", "0.57823956", "0.5749585", "0.5735981", "0.5735981", "0.5735981", "0.57286215", "0.56707954", "0.56110406", "0.5605891", "0.5576941", "0.5574333"...
0.54572386
29
Redirect to the correct page once we establish where that should be.
componentDidUpdate(prevProps) { const { activeWallet, activeWalletSettings, hasWallets, history, isWalletOpen, lightningGrpcActive, walletUnlockerGrpcActive, startActiveWallet } = this.props // If we have just determined that the user has an active wallet, at...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "redirect() {\n const hash = Radio.request('utils/Url', 'getHash');\n\n // Redirect back only if it's notebooks page\n if (hash.search(/notebooks/) !== -1) {\n Radio.request('utils/Url', 'navigate', {\n trigger : false,\n url : '/notebo...
[ "0.688686", "0.688005", "0.68734115", "0.66168904", "0.6590932", "0.64717966", "0.64498144", "0.64107895", "0.6407647", "0.6356509", "0.63378304", "0.6324629", "0.6323785", "0.6253995", "0.6249762", "0.6243455", "0.62314206", "0.622608", "0.62212086", "0.6219932", "0.6216191"...
0.0
-1
here is a helper function to shuffle an array it returns the same array with values shuffled it is based on an algorithm called Fisher Yates if you want ot research more
function shuffle(array) { let counter = array.length; // While there are elements in the array while (counter > 0) { // Pick a random index let index = Math.floor(Math.random() * counter); // Decrease counter by 1 counter--; // And swap the last element with it let temp = array[counter]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shuffle(array){\n\t\t\t\t\t\t\t\t \tvar currentIndex = array.length;\n\t\t\t\t\t\t\t\t \tvar temporaryValue;\n\t\t\t\t\t\t\t\t \t//var randIndex;\n\n\t\t\t\t\t\t\t\t \twhile (currentIndex > 0){\n\t\t\t\t\t\t\t\t \t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\t\t\t\t\t\t\t \t\tcurrentIndex...
[ "0.87211084", "0.8681844", "0.8630306", "0.8548764", "0.85450006", "0.85450006", "0.85450006", "0.85113394", "0.8506239", "0.8480198", "0.8478456", "0.8476418", "0.845436", "0.84507453", "0.84393394", "0.8432883", "0.843198", "0.8429092", "0.84288573", "0.8423802", "0.8415672...
0.0
-1
this function loops over the array of colors it creates a new div and gives it a class with the value of the color it also adds an event listener for a click for each card
function createDivsForColors(colorArray) { gameContainer.innerHTML = ''; let cardId = 0; shuffle(COLORS); scoreBoard.innerText = ''; if(lowScores.length >= 1) { scoreBoard.innerHTML = '<p><br></p>'; const lowScore = document.createElement('p'); lowScore.className = "score"; lowScore.innerText = `The ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCards(colors) {\n let gameBoard = document.getElementById(\"game\");\n\n for (let color of colors) {\n let newDiv = document.createElement(\"div\");\n newDiv.classList.add(`${color}`);\n newDiv.addEventListener(\"click\", function (e) {\n handleCardClick(e);\n });\n gameBoard.a...
[ "0.834697", "0.82764417", "0.8223376", "0.8177341", "0.8173253", "0.8118955", "0.8051726", "0.80365855", "0.8033395", "0.8033306", "0.8025407", "0.8008537", "0.80012107", "0.80012107", "0.80012107", "0.80012107", "0.80012107", "0.7987586", "0.7986394", "0.7934706", "0.7930237...
0.78776777
23
generic function for sending requests through a $httplike http service obj is the api object that makes the request action and error are promises to be run on success and error respectively and after the corresponding default promises have been run
function sendRequest(obj, request, httpService, action, error) { obj.running = true; obj.valid = null; obj.raw = null; // action and error are functions for the promise. if defined they'll be run after the default action and error functions let _action = function (result) { obj.raw = result; obj.vali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_http(url,method,data)\r\n {\r\n var defer = $q.defer();\r\n\r\n url = HOST+url;\r\n $http({\r\n 'method':method,\r\n 'url':url,\r\n 'data':data\r\n }).then(\r\n function(res)\r\n {\r\n defer.resolve(r...
[ "0.6736197", "0.66600055", "0.6587212", "0.65860957", "0.6478822", "0.6451742", "0.6240921", "0.6240921", "0.6129252", "0.61199594", "0.6053019", "0.60494494", "0.6043353", "0.6043353", "0.6043353", "0.6043353", "0.6043353", "0.6005646", "0.5918464", "0.59064585", "0.5866175"...
0.73862135
0
Description: this will read items form array and append the div into number screen for each number in list
function screenView(){ boardItems.forEach((item, index) =>{ // this will add the items to web screen view $("#number-screen").append(`<div class="col-md-4"> <div class="card screen-card" style="background-color:`+ colors[index]+`">`+ item +`</div> </div>`); // this will add...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readDisplay() {\n // delete all arr item\n while (theFullDisplay.length > 0) {\n theFullDisplay.pop();\n }\n for (let i = 0; i < dispSize; i++) {\n theFullDisplay.push(\n document.querySelectorAll(\".digit.pos\" + (i + 1) + \" .segment\")\n );\n }\n}", "function showItems(arr) {\r\n ...
[ "0.6590578", "0.64869386", "0.6464906", "0.6448085", "0.6432464", "0.63927585", "0.63749", "0.63395625", "0.6336661", "0.6308334", "0.6206958", "0.6171083", "0.6170295", "0.6167196", "0.6164353", "0.616267", "0.613647", "0.6121676", "0.610843", "0.61018384", "0.60835385", "...
0.64540213
3
Description: this will shuffle the numbers in
function shuffleBoard(array) { this.clearBoards() boardItems.sort(() => Math.random() - 0.5); screenView() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shuffle() {\n // TODO\n }", "shuffle()\n\t{\n\t\tlet temp;\n\t\tlet arraySpot;\n\t\tlet arraySpot2;\n\t\tfor (let x = 0; x < 1000000; x++)\n\t\t{\n\t\t\tarraySpot = Math.floor(Math.random() * this.numCards);\n\t\t\tarraySpot2 = Math.floor(Math.random() * this.numCards);\n\n\t\t\ttemp = this.cards[array...
[ "0.76403165", "0.7630073", "0.7626577", "0.74867874", "0.73588365", "0.7339221", "0.7332727", "0.7319219", "0.728344", "0.72733736", "0.723786", "0.72317904", "0.72301614", "0.7219366", "0.7194882", "0.7194467", "0.7157791", "0.7142489", "0.7142117", "0.71336997", "0.71317905...
0.0
-1
Description: this will sort the numbers array
function sortNumberBoard(){ this.clearBoards() boardItems.sort(); screenView() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortNumbers(arr) {\n arr.sort((a, b) => {\n return a - b;\n });\n return arr;\n}", "function Numsort(a,b) { return a - b; }", "function numsort(a, b) {return (a - b);}", "function nSort(numArray) {\n return numArray.sort((function (a, b) { return a - b; }));\n}", "function numSort(a,b) { ...
[ "0.8030156", "0.7556718", "0.7548461", "0.75326174", "0.74906075", "0.74823415", "0.7468869", "0.74661523", "0.7354888", "0.73415333", "0.7325714", "0.7317334", "0.73063064", "0.72526586", "0.7228599", "0.7224971", "0.72163576", "0.72051525", "0.71884114", "0.7185287", "0.718...
0.0
-1
Function that updates the list of Online TA's If the user is a TA then he/she does not get a join/leave option while a student does
function get_ta_status(data) { var parser = document.createElement('a'); parser.href = window.location.href; var ta_net_id = parser.pathname.split('/')[2]; // student var mydiv = document.getElementById('ta_status'); // Creates HTML List with all TA's if (data){ var html_data = ""; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateActivityStatus(list){\n\tif(list[\"selectedKeys\"][0]==\"1\")\n\t\taudienceStatus=true;\n\telse\n\t\taudienceStatus=false;\n\t//kony.print(\"\\nActivity:-\"+audienceStatus);\n}", "function updateMissionUserList(){\n var userString = \"\";\n var mission = clientGame.missions[clientGame.missio...
[ "0.5897628", "0.5866655", "0.56738603", "0.56585455", "0.5641588", "0.5548418", "0.55180913", "0.55110157", "0.5487486", "0.5478259", "0.5402353", "0.53743976", "0.53704494", "0.53670806", "0.5355145", "0.5333174", "0.53196067", "0.5303543", "0.5302797", "0.52695954", "0.5264...
0.4961183
68
Function to remove student from Queue on click of "LEAVE" button
function remove_queue(id){ socket.emit('remove_student', {"net_id":id.id}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeStudent(){\n var parentIndex = $(this).parents('tr').index();\n var idOfStudentInArray = student_array[parentIndex].id;\n student_array.splice(parentIndex,1);\n $(this).parents(\"tr\").remove();\n calculateGradeAverage();\n deleteStudentFromServer(idOfStudentInArray);\n\n}", "removeStu...
[ "0.6608754", "0.647318", "0.63003695", "0.6284494", "0.62583566", "0.6242361", "0.62414056", "0.6158881", "0.60977745", "0.6072461", "0.6058396", "0.6016377", "0.59667987", "0.595647", "0.59081304", "0.58904797", "0.58578426", "0.58553135", "0.58446056", "0.5841992", "0.57771...
0.7036834
0
Emits a socket io call to add a student to a TA's queue
function add_queue(id){ socket.emit('add_student', {"net_id":id.id}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_queue(id){\n socket.emit('remove_student', {\"net_id\":id.id});\n}", "function addStudentToList(id,name) {\n students2.push({\n id: id,\n name: name,\n isLoggeIn: false,\n requestConection() {\n console.log('deseo ingresar a clases');\n }\n }...
[ "0.61795473", "0.58577627", "0.5786658", "0.5741299", "0.570077", "0.5604715", "0.5521087", "0.55009866", "0.5495581", "0.5489731", "0.5484213", "0.545972", "0.54183316", "0.53658456", "0.5354781", "0.5344661", "0.5322557", "0.5321873", "0.53205395", "0.5311347", "0.53083426"...
0.78472954
0
Function to get the list of students who have requested the TA
function get_ta_queue(data){ var parser = document.createElement('a'); parser.href = window.location.href; var ta_net_id = parser.pathname.split('/')[2]; var mydiv = document.getElementById('ta_queue'); // Updates the Queue with students if (Object.keys(data).length > 0 ){ var html_d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStudents () {\n\n }", "function getStudentList() {\n return studentList.requestCall().$promise;\n }", "getStudentByCourse(courseName) {\n let st = new Set()\n for (let s of this.stumap.values()) {\n s.courses.forEach(courses => {\n courses.forEach(name => {\n ...
[ "0.63743", "0.60571116", "0.5973549", "0.5918051", "0.5905689", "0.5887439", "0.5831493", "0.5788952", "0.57851154", "0.5757927", "0.574433", "0.5693335", "0.55559397", "0.5550836", "0.55329716", "0.55142766", "0.55097264", "0.5503222", "0.548827", "0.54304487", "0.5419017", ...
0.0
-1
On clicking to answer a particular student, student is removed from queue and a answer_student signal is emitted to the socket_io server
function answer_student(id) { var parser = document.createElement('a'); parser.href = window.location.href; var ta = parser.pathname.split('/')[2]; socket.emit('remove_student_answer', {net_id: id.id, ta:ta}); socket.emit('answer_student', {"net_id":id.id, "ta": ta}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_queue(id){\n socket.emit('remove_student', {\"net_id\":id.id});\n}", "function confusedStudent (name){\n\t\tsocket.emit('confusion', {\n\t\t\tlectureID: 'RECURSION',\n\t\t\tstudentID: name\n\t\t});\n\t\tconsole.log('I done got clicked.');\n\t}", "function add_queue(id){\n\n socket.emit('a...
[ "0.67255735", "0.61885655", "0.59951884", "0.5993209", "0.5807907", "0.5644999", "0.56057674", "0.55827785", "0.5540802", "0.5437159", "0.53528893", "0.5333017", "0.53039205", "0.5303282", "0.53011197", "0.52789617", "0.52638525", "0.5257674", "0.524586", "0.52416897", "0.521...
0.63670987
1
bencoding functions translated from original Bram's bencode.py
function python_int(s) { var n = parseInt(s,10); if (isNaN(n)) { throw Error('ValueError'); } return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeB(string, startCode) {\n\t\tvar result = \"\";\n\t\tvar sum = 0;\n\n\t\tfor (var i = 0, j = string.length; i < j; i++) {\n\t\t\tresult += encodingByChar(string[i]);\n\t\t\tsum += weightByCharacter(string[i]) * (i + 1);\n\t\t}\n\t\treturn {\n\t\t\tresult: result,\n\t\t\tchecksum: (sum + startCode) % ...
[ "0.7016315", "0.65492195", "0.65492195", "0.6526923", "0.64819664", "0.641104", "0.6382256", "0.63691306", "0.6358403", "0.63233805", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.629638", "0.62963...
0.0
-1
initial function to fill drop down menu and allow selecting id
function init() { d3.json("samples.json").then(bbData => { data = bbData; var options = bbData.names; var selection = d3.select("#selDataset"); options.forEach(value => { selection .append("option") .text(value) .attr("value", function() { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LoadDropdown(result, id) {\n $(id).get(0).options.length = 0;\n if (id.attr('id') == 'ddlItemHead') {\n itmList = [];\n itmList = result;\n }\n var content = '<option value=\"-1\">-- Select --</option>';\n if (result != null) {\n $.each(result, function (i, obj) {\n ...
[ "0.6895468", "0.6756443", "0.66494143", "0.6561827", "0.6535589", "0.65343916", "0.65343916", "0.65126604", "0.65086895", "0.64875376", "0.6465358", "0.6452348", "0.644516", "0.6441505", "0.64396673", "0.6436632", "0.6433997", "0.6426939", "0.6422995", "0.641178", "0.6391944"...
0.0
-1
create functions to return name and id of each bacteria
function bacName(name) { var baclist = [] for (var i = 0; i < name.length; i++) { var stringName = name[i].toString() var splitValue = stringName.split(";") if (splitValue.length > 1) { baclist.push(splitValue[splitValue.length - 1]) } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function treatBacName(name) {\n var bacteriaList = [];\n\n for (var i = 0; i < name.length; i++) {\n var stringName = name[i].toString();\n var splitValue = stringName.split(\";\");\n if (splitValue.length > 1) {\n bacteriaList.push(splitValue[splitValue.length - 1]);\n } else {\n bacte...
[ "0.58329076", "0.5774267", "0.5766436", "0.5766436", "0.56945586", "0.5642876", "0.548231", "0.5467554", "0.5464553", "0.5456094", "0.5434128", "0.5378381", "0.537817", "0.5354723", "0.53507924", "0.5348313", "0.53237027", "0.5322983", "0.53094774", "0.52982455", "0.5289025",...
0.0
-1
create first plot function filling in demo panel
function demographics(selector) { var filter1 = data.metadata.filter(value => value.id == selector); var div = d3.select(".panel-body") div.html(""); div.append("p").text(`ID: ${filter1[0].id}`) div.append("p").text(`ETHNICITY: ${filter1[0].ethnicity}`) div.append("p").text(`GENDER: ${filter1[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plot() {\n\n}", "function plot() {\n \n }", "function render_panel() {\n\n elem.html(\"\");\n\n var el = elem[0];\n\n var parent_width = elem.parent().width(),\n height = parseInt(scope.panel.height),\n padding = 50,\n o...
[ "0.6249919", "0.62155414", "0.58387506", "0.5757968", "0.5735147", "0.5719106", "0.55970645", "0.5596848", "0.55888844", "0.55833197", "0.55628353", "0.5550831", "0.5550831", "0.5543863", "0.5539228", "0.55335075", "0.5516783", "0.5491746", "0.54781574", "0.5470076", "0.54633...
0.5201949
45
create chart to show top 10 bacteria
function bacteria(selector) { var filter2 = data.samples.filter(value => value.id == selector) var otu_id = filter2.map(v => v.otu_ids) otu_id = otuNumber(otu_id[0].slice(0, 10)); var x_value = filter2.map(v => v.sample_values) x_value = x_value[0].slice(0, 10) var otu_label = filter2.map(v => ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function peopleWithMostBookings(){\n var data = google.visualization.arrayToDataTable(peopleWithMostBookings_arr);\n var height = 100 + 20*peopleWithMostBookings_arr.length;\n\n var options = {\n height: height,\n backgroundColor: \"#f9e7d5\",\n chartArea: {width: '65%'},\n ...
[ "0.65312976", "0.6491264", "0.6420873", "0.6375188", "0.63717747", "0.63275135", "0.6252533", "0.61294657", "0.611863", "0.6028655", "0.59649205", "0.59522897", "0.5949413", "0.5921982", "0.59217566", "0.59129816", "0.58902776", "0.5859833", "0.58506334", "0.5850547", "0.5850...
0.6097072
9