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
function to fire when user submits form
function onSubmit() { let setupObj = getFormSetup(); let postString = ""; if (setupObj) { postString = makePOSTParams(setupObj); console.log(`Sending postString of ${postString}`); } else { return false; } let xmlhttp = new XMLHttpRequest(); xmlhttp.onload = function() { console.log(this.responseXML.bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doSubmit() {\n alert(\"This has been submitted\");\n }", "onSubmit() {\n console.log(\"submit form\");\n }", "function submitIt(){\n $('form').on('submit', function(){\n alert (\"Your form is going to be submitted now.\")\n })\n}", "function myFunction() {\n alert(\"Th...
[ "0.7612037", "0.7591709", "0.7456332", "0.7432602", "0.7414333", "0.7400174", "0.7346618", "0.72521687", "0.72346413", "0.722527", "0.7220483", "0.71854633", "0.71838635", "0.7170947", "0.71604717", "0.715369", "0.7148444", "0.71325815", "0.7131485", "0.7116227", "0.709941", ...
0.0
-1
private: close back connect
function close(self) { var connect = self._connect; self._connect = null; self.connected = false; if (connect && typeof connect == 'object') { connect.idle(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n /* Disconnect Trueno session */\n process.exit();\n }", "function CloseConnectionHandler()\n{\n\tif(null != g_oSAFRemoteDesktopClient)\n\t{\n\t\tg_oSAFRemoteDesktopClient.DisConnectRemoteDesktop();\n\t}\n}", "disconnect() {\n if (!_.isNil(this._dataChanel)) {\n th...
[ "0.71235347", "0.6976648", "0.6973175", "0.6922574", "0.6909989", "0.69084996", "0.6839784", "0.6839225", "0.68286747", "0.68108374", "0.6807485", "0.67970246", "0.6768065", "0.6767642", "0.6760902", "0.67387533", "0.6736204", "0.66952693", "0.66870016", "0.6673506", "0.66708...
0.7623109
0
net error and connection error
function connectionErrorHandler(self, err) { close(self); console.error(err); var task = self._queue[0]; var cb = task ? task.cb : null; if (cb instanceof Query) { return cb.onError.trigger(err); } if (cb) { cb(err); } else { self.onerror.trigger(err); } dequeue(self); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnectionFailed() {\r\n\t\t console.error('Connection Failed!');\r\n\t\t}", "function connectionError() {\n throw new Error('Connection error');\n }", "function on_connect_error() {\n console.log(\"Connection failed\");\n }", "function connectionError(err) {\n // Record ...
[ "0.6936369", "0.69179046", "0.68856573", "0.6812458", "0.6803788", "0.6784133", "0.6753839", "0.6552108", "0.6529696", "0.6529696", "0.650874", "0.64684945", "0.64495265", "0.64375955", "0.63732356", "0.6368726", "0.6342335", "0.6264046", "0.6211753", "0.6211753", "0.6207032"...
0.5806075
44
start_cloud(section,plugin,cloud) This function sends an HTTP POST request to server.php with the type "start_cloud". You can add new parameters.
function start_cloud(section,plugin,cloud) { submit_data="section="+section+"&plugin="+plugin+"&cloud="+cloud+"&type=start_cloud"; $.ajax({ type: "POST", url: "index.php", data: submit_data, beforeSend: function() { $('#daemonStatus').removeClass("stopped"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stop_cloud(section,plugin,cloud)\n{\n submit_data=\"section=\"+section+\"&plugin=\"+plugin+\"&cloud=\"+cloud+\"&type=stop_cloud\";\n $.ajax({\n type: \"POST\",\n url: \"index.php\",\n data: submit_data,\n beforeSend: function() {\n $('#daemonStatus').removeClas...
[ "0.64558256", "0.6048425", "0.55544984", "0.50777984", "0.4948926", "0.49369833", "0.48580113", "0.48277077", "0.47953424", "0.47606775", "0.46982843", "0.46773916", "0.46603498", "0.46364087", "0.46178705", "0.4613776", "0.46072483", "0.45707965", "0.4560118", "0.45510846", ...
0.76591444
0
stop_cloud(section,plugin,cloud) This function sends an HTTP POST request to server.php with the type "stop_cloud". You can add new parameters.
function stop_cloud(section,plugin,cloud) { submit_data="section="+section+"&plugin="+plugin+"&cloud="+cloud+"&type=stop_cloud"; $.ajax({ type: "POST", url: "index.php", data: submit_data, beforeSend: function() { $('#daemonStatus').removeClass("stopped"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start_cloud(section,plugin,cloud)\n{\n submit_data=\"section=\"+section+\"&plugin=\"+plugin+\"&cloud=\"+cloud+\"&type=start_cloud\";\n $.ajax({\n type: \"POST\",\n url: \"index.php\",\n data: submit_data,\n beforeSend: function() {\n $('#daemonStatus').removeCl...
[ "0.651301", "0.58066607", "0.56488603", "0.54623914", "0.54402155", "0.53948265", "0.52780557", "0.5235241", "0.51979494", "0.5188444", "0.5157554", "0.50881475", "0.5072699", "0.50623035", "0.5046011", "0.50392663", "0.5037163", "0.50338364", "0.503309", "0.5017034", "0.5004...
0.7750523
0
save(section,plugin,cloud) This function sends an HTTP POST request to server.php with the type "save_cloud" and the parameters to store in the setup file. You can add new parameters.
function save_cloud(section,plugin,cloud) { //Take values from the form by #id: var form = $("#setup").serialize(); //send POST DATA submit_data="section="+section+"&plugin="+plugin+"&cloud="+cloud+"&type=save_cloud&"+form; $.ajax({ type: "POST", url: "index.php", data: submi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveProjectForServer() {\n\tif(project.name!=1) {\n\t\t$.ajax({\n\t \t\tmethod: \"POST\",\n\t \t\turl: ADDR_SERVER+\"/project/\"+project.name,\n\t \t\tasync: false,\n\t \t\tdata: { userId:project.user,tracks:project.track,filters:project.filter,regions:project.region},\n\t \t\tdataType: \"json\",\n\t \t\t...
[ "0.6059259", "0.5701378", "0.55374795", "0.5515655", "0.5438485", "0.5384315", "0.52686745", "0.5224738", "0.5208854", "0.51804435", "0.5172501", "0.5168499", "0.51637983", "0.51497", "0.51376116", "0.5117881", "0.5100261", "0.5090826", "0.5088107", "0.5063912", "0.50570303",...
0.7406868
0
Input: e = 2, a = [4, 6, 2, 8, 2, 2] Output array: [4, 6, 8]
function removeItemFromArray(array, n) { var newArray = []; for ( let i = 0; i < array.length; i++) { if(array[i] !== n) { newArray[newArray.length] = array[i]; } } return newArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function e(){return [0,0,0,1]}", "function e() {\n return [1, 0, 0, 1, 0, 0];\n }", "function e$e(r=g$4){return [r[0],r[1],r[2],r[3]]}", "function e$1(){return [1,0,0,0,1,0,0,0,1]}", "function ma(a){var b,c,d,e=[];for(b=0;b<a.length;b++)for(c=a[b],d=0;d<c.length;d++)e.push(c[d]);return e}", "...
[ "0.6436206", "0.6339931", "0.6193037", "0.6082504", "0.60541916", "0.60105765", "0.5988834", "0.5942575", "0.59301436", "0.592573", "0.59227824", "0.5840498", "0.5840498", "0.5789018", "0.5720413", "0.5697628", "0.5693474", "0.5693474", "0.5689608", "0.56885093", "0.56371117"...
0.0
-1
update the context variable with latest trade data and format into the same format context trading data variable format UPDATE THE CONTEXT VARIABLE
function updateTradingLog (contextTradingObj, exchange, symbol, input){ // console.log("updateTradingLog", contextTradingObj, exchange, symbol, input) var output = contextTradingObj; var cleanInput = handleTradeData(exchange, symbol, input) output[exchange][symbol].push(cleanInput); // console.log("output", out...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateLatestData(period) {\n console.log('updateData');\n }", "function updateTradeVars(weekNum) {\n\tweekResults.trade = true;\n\tlastTradeDate = subset[weekNum].date;\n\tlastTradeWeek = weekNum;\n\tlastTradePrice = subset[weekNum].close;\n\ttotalTrades++;\n}", "function updateCurrencyData () {\r\n\tgetCu...
[ "0.54870355", "0.53232723", "0.53208625", "0.5294482", "0.5282804", "0.52582556", "0.5252495", "0.5251905", "0.5241657", "0.5235648", "0.5233464", "0.5221768", "0.5200917", "0.5188324", "0.5173164", "0.51718426", "0.51677483", "0.51649857", "0.51495504", "0.5128951", "0.51213...
0.6106918
0
PARSE AND CLEAN 1 INSTANCE OF TRADING DATA
function handleTradeData (exchange, symbol, input){ var output = { symbol: "", time: "", price: "", quantity: "", exchange: exchange }; if (exchange == "binance") { output.symbol = input.s; output.time = input.E; output.price = input.p; output.quantity = input.q; }; if (exchange == "coinjar") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "parseData(data) {\n // Taken from https://gist.github.com/Jezternz/c8e9fafc2c114e079829974e3764db75\n const re = /(,|\\r?\\n|\\r|^)(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|([^,\\r\\n]*))/gi;\n const result = [[]];\n let matches;\n\n while ((matches = re.exec(data))) {\n if (matches[1].length && matches[1...
[ "0.60336584", "0.5695579", "0.5396848", "0.53901654", "0.5381563", "0.529743", "0.5296402", "0.5291728", "0.52784014", "0.52784014", "0.5275471", "0.5273424", "0.5243383", "0.51978713", "0.51877636", "0.51834774", "0.5172724", "0.5171742", "0.5151848", "0.515155", "0.5109814"...
0.0
-1
Update the data for the network graph
function update(data_node = nodeData, data_link = linkData) { node = node.data(data_node, function (d) { return d.name; }); node.exit().remove(); var newNode = node.enter().append('circle').attr('class', 'node') .attr('r', function (d) { return rad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function graphUpdate (nodes) {\n\n nodes = new vis.DataSet(nodes)\n network.redraw()\n}", "updateGraphData() {\n this.PieGraph.data.labels = this.labelsAndDataset.labels;\n this.PieGraph.data.datasets.forEach((dataset) => {\n dataset.data.push(...this.labelsAndDataset.dataset);\n });\n ...
[ "0.7510036", "0.7507039", "0.7385137", "0.73103905", "0.718214", "0.7172862", "0.7041305", "0.7015016", "0.6863681", "0.6799316", "0.66862386", "0.667182", "0.6669875", "0.6621469", "0.65168494", "0.6513564", "0.6484166", "0.6482846", "0.64822364", "0.64647514", "0.6458138", ...
0.58891064
71
Drag functions d is the node
function drag_start(d) { if (!d3.event.active) simulation.alphaTarget(0.3).restart(); d.fx = d.x; d.fy = d.y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drag(d)\n {\n if (d == weightedTreeView.root) { return; }\n \n if (weightedTreeView.dragStarted) \n {\n domNode = this;\n initiateDrag(d, domNode);\n }\n\n d.x0 += d3.event.dy;\n d.y0 += d3.event.dx;\n d3.select(this).attr(\"transform\", \"translate...
[ "0.78310895", "0.7675615", "0.76600736", "0.7591944", "0.7573885", "0.7496192", "0.7437028", "0.7430076", "0.74113524", "0.73985934", "0.7350656", "0.7301198", "0.7301198", "0.7301198", "0.72683316", "0.72523135", "0.72410804", "0.72006494", "0.71993726", "0.7195465", "0.7165...
0.6904498
44
make sure you can't drag the circle outside the box
function drag_drag(d) { d.fx = d3.event.x; d.fy = d3.event.y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseDragged() {\n\tif (circle.active) {\n\t\tcircle.x = constrain(circle.x + (mouseX - circle.x) * 0.1, 80, 600)\n\n\t\tcircle.y = constrain(circle.y + (mouseY - circle.y) * 0.1, 450, 450)\n\n\t}\n\treturn false;\n}", "function mouseDragged() {\n var max_circles = 300;\n if (circles.length < max_circ...
[ "0.7395764", "0.6285118", "0.6283107", "0.62806", "0.62290484", "0.62256616", "0.61621326", "0.6157321", "0.61464864", "0.612131", "0.6109008", "0.61017674", "0.60903627", "0.6085983", "0.6025288", "0.6014692", "0.60130876", "0.6012627", "0.5966568", "0.5959578", "0.5919048",...
0.0
-1
vuerouter v2.7.0 (c) 2017 Evan You
function n(t,e){if(!t)throw new Error("[vue-router] "+e)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "function TM(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return ...
[ "0.6039166", "0.60323036", "0.5884679", "0.58300084", "0.58297914", "0.58112895", "0.57451797", "0.57362986", "0.5705816", "0.5672793", "0.5635367", "0.5628047", "0.56109595", "0.56039315", "0.5593482", "0.55691975", "0.5563644", "0.55477864", "0.5530481", "0.55232745", "0.55...
0.0
-1
Generating jwt after creating a user and after login
async generateAuthToken() { const token = jwt.sign( { _id: this._id.toHexString(), userId: this.userId }, 'tokencode', { expiresIn: '30d', } ); await this.updateOne({ $push: { tokens: token, }, }); return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static generateToken(user) {\n const userData = {\n userId: user.id,\n userRoles: user.roles\n };\n return jwt.sign(userData, process.env.JWT_SECRET, {\n expiresIn : 60*60*72 //expires in 30 days\n });\n }", "function jwt() {\n return User.jwt();\n...
[ "0.77145743", "0.7694034", "0.7674673", "0.7577223", "0.75685805", "0.74515545", "0.74123454", "0.74101686", "0.7409686", "0.7393798", "0.7386797", "0.7385328", "0.73704356", "0.7360202", "0.73505247", "0.7345974", "0.7342705", "0.7342683", "0.7340697", "0.7340598", "0.734059...
0.69573504
75
start and stop button onClick handler
toggle() { this.setState({running: !this.state.running}, () => { this.state.running ? this.startTimer() : this.stopTimer(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leClick(){\n startOrStop = !startOrStop;\n if (!startOrStop){\n if (clockState===0){\n $(\"#workHard\").css(\"font-size\", \"35px\");\n $(\"#playHard\").css(\"font-size\", \"18px\");\n }\n else{\n $(\"#workHard\").css(\"font-size\", \"18px\");\n $(\"#playHa...
[ "0.7570862", "0.7565665", "0.75416154", "0.74819213", "0.7479481", "0.7476831", "0.7459085", "0.74078506", "0.7396196", "0.7394971", "0.73420614", "0.718427", "0.71820253", "0.7163284", "0.7125627", "0.7111441", "0.7085745", "0.70693314", "0.70681727", "0.70378685", "0.698280...
0.0
-1
calculates and updates the current stopwatch time
updateTime() { var ideal = Date.now() - this.startTime; this.setState({timeElapsed: ideal + this.state.stoppedAt}); // adjust the timeout to account for delays due to setTimeout var realTime = this.state.timeElapsed - this.state.stoppedAt; var diff = ideal - realTime; this.timer = setTimeou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopwatchUpdate(){\n rawTime += intervalRate\n stopwatchTime.innerHTML = formatTime(rawTime)\n}", "function stopwatchUpdate() {\r\n rawTime += intervalRate;\r\n stopwatchTime.innerHTML = formatTime(rawTime);\r\n}", "function updateTimer() {\n //console.log(currentTime);\n ...
[ "0.7957804", "0.79291266", "0.78033876", "0.77085257", "0.7513385", "0.74031377", "0.7396793", "0.7392996", "0.7305136", "0.7284629", "0.7217587", "0.7175991", "0.7118764", "0.71112126", "0.70997", "0.70540094", "0.70070046", "0.6977363", "0.6936116", "0.69361085", "0.6933577...
0.71480304
12
prepends a zero to single digit numbers
formatTime(n) { if ((n + '').length > 2) { return n; } const padding = new Array(2).join('0'); return (padding + n).slice(-2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepend0 (i) {\n\t\treturn i < 10 ? \"0\" + i : i;\n\t}", "function zeroIt(a) { return( a < 10 ? \"0\"+a : a ); }", "function $0(x) { return x<10 ? '0'+x : ''+x; }", "function $0(x) { return x<10 ? '0'+x : ''+x; }", "function $0(x) { return x<10 ? '0'+x : ''+x; }", "function $0(x) { return x < 1...
[ "0.8043885", "0.7985792", "0.79100233", "0.79100233", "0.79100233", "0.7880214", "0.78431785", "0.7821486", "0.78142285", "0.7784729", "0.7740005", "0.7732003", "0.7730564", "0.7726962", "0.7712434", "0.7667129", "0.7654437", "0.7644264", "0.7638766", "0.76341593", "0.7633275...
0.0
-1
parses the timeElapsed into hh:mm:hr:ss.ms
getUnits() { const seconds = this.props.timeElapsed / 1000; var hr = Math.floor(seconds / 3600).toString(); var min = Math.floor(seconds / 60).toString(); var sec = Math.floor(seconds % 60).toString(); var msec = (seconds % 1).toFixed(2).substring(2); return this.formatTime(hr) + ":" + this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeElapsed(){\n\tvar h = Math.floor(sec_elapsed / 3600);\n\tvar m = Math.floor(sec_elapsed / 60);\n\tvar s = sec_elapsed - (m*60);\n\t\n\tif(h<10){\n\t\th = '0' + h;\n\t}\n\tif(m<10){\n\t\tm = '0' + m;\n\t}\n\tif(s<10){\n\t\ts = '0' + s;\n\t}\t\n\t\n\treturn h + ':' + m + ':' + s;\n}", "parseStatsTime(...
[ "0.7384772", "0.6518117", "0.65019435", "0.63101566", "0.6299138", "0.6272719", "0.62543374", "0.6244674", "0.62034744", "0.6199762", "0.61624116", "0.61538136", "0.61469066", "0.6146215", "0.6141646", "0.6130158", "0.6127301", "0.61129737", "0.6088294", "0.60865325", "0.6072...
0.65073335
2
A class for matrices.
function Matrix(els) { this.els = els; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Matrix()\n{\n /**\n * @member {number}\n * @default 1\n */\n this.a = 1;\n\n /**\n * @member {number}\n * @default 0\n */\n this.b = 0;\n\n /**\n * @member {number}\n * @default 0\n */\n this.c = 0;\n\n /**\n * @member {number}\n * @default ...
[ "0.82012945", "0.8078185", "0.8066533", "0.77633333", "0.77164435", "0.7555319", "0.743233", "0.73398066", "0.7296801", "0.7215012", "0.71922445", "0.7078887", "0.6927466", "0.6907143", "0.67831075", "0.674943", "0.67427343", "0.6705669", "0.6682817", "0.66495764", "0.664427"...
0.72958285
9
Given a nonnegative integer, return an array containing a list of independent digits in reverse order. Example: 348597 => [7,9,5,8,4,3]
function reverseArray(i) { var num = i.toString(); array = [] for (x = num.length; x > 0; x--){ array.push(num[x - 1]) } return array }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numToArray(int) {\n var str = int.toString();\n var rev = str.split(\"\").reverse();\n var fin = rev.join(\"\");\n return fin\n}", "function integerToArray(int) {\n var integers = [];\n\n if (int === 0) {\n integers.push(0);\n }\n\n while (int > 0) {\n integers.push(int % 10);\n int = M...
[ "0.7804933", "0.7780085", "0.7753489", "0.7591289", "0.73847556", "0.7263255", "0.7207467", "0.71839845", "0.699926", "0.699626", "0.69955367", "0.6985848", "0.69172025", "0.686692", "0.6854557", "0.68538374", "0.67737246", "0.67657745", "0.6727641", "0.6718063", "0.666732", ...
0.74634343
4
Your online store likes to give out coupons for special occasions. Some customers try to cheat the system by entering invalid codes or using expired coupons. Write a function called checkCoupon to verify that a coupon is valid and not expired. If the coupon is good, return true. Otherwise, return false. A coupon expire...
function checkCoupon(coupon){ var expirationTime = new Date(coupon); expirationTime.setHours(23); expirationTime.setMinutes(59); expirationTime.setSeconds(59); if (expirationTime.getTime() > new Date().getTime()){ return true; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCoupon(enteredCode, correctCode, currentDate, expirationDate){\n\n}", "function checkCoupon(date) {\n\t\n\tvar expiration = new Date(\"June 15, 2014\");\n\n\tif (new Date(date) < expiration){\n\t\treturn true\n\t}else {\n\t\treturn false;\n\t}\n}", "function couponChecker(date) {\n\tvar today = D...
[ "0.83977187", "0.8041121", "0.7915959", "0.779797", "0.7644279", "0.62374234", "0.5961071", "0.586049", "0.58306", "0.57224315", "0.5676046", "0.56194496", "0.5488702", "0.5445038", "0.54280937", "0.5405959", "0.5394197", "0.5377924", "0.53697485", "0.5348047", "0.5332095", ...
0.7825759
3
Sets up ajax calls to the API so that they can be authenticated by spring security. Passes a token to the server.
setupAjax() { $.ajaxSetup({ headers: { 'Authorization': 'Bearer ' + localStorage.getItem('userToken') } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _callApiWithToken(url, method, dataToSend, accessToken) {\n \n return $.ajax({\n url: url,\n data: JSON.stringify(dataToSend | {}),\n dataType: 'json',\n contentType: 'application/json',\n type: method,\n ...
[ "0.7107567", "0.6891449", "0.66456056", "0.66107666", "0.657715", "0.652467", "0.6512196", "0.6490311", "0.64861494", "0.6443595", "0.64321953", "0.6382628", "0.63515204", "0.631347", "0.628365", "0.62665", "0.618107", "0.6159359", "0.6150961", "0.61175764", "0.6106707", "0...
0.7289618
0
get width of container and resize svg to fit it
function resize() { var targetWidth = window.innerWidth; svg.attr("width", targetWidth); svg.attr("height", Math.round(targetWidth / aspect)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resize() {\r\n var targetWidth = parseInt(container.style(\"width\"));\r\n svg.attr(\"width\", targetWidth);\r\n svg.attr(\"height\", Math.round(targetWidth / aspect));\r\n }", "function resize() {\n let targetWidth = parseInt(container.style(\"width\"));\n svg.attr(\"width...
[ "0.8328143", "0.8326342", "0.8312327", "0.8312327", "0.8306979", "0.8306979", "0.82915497", "0.8262772", "0.8262772", "0.8262772", "0.8262772", "0.8256269", "0.8236155", "0.8236155", "0.8179068", "0.8144525", "0.7784457", "0.77145046", "0.7432957", "0.734283", "0.72580904", ...
0.74716645
18
Soy una variable global
function inverso(){ var a = prompt("Escribe un número a continuación", "00156420"); if(a <=0 || a >0){ //Comprobar que realmente es un número a = a + ""; a = a.split("").reverse().join(""); a = parseInt(a) + ""; //Eliminar ceros en el extremo izquierdo, los que antes estaban en el izquierdo se mantienen docum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get UseGlobal() {}", "set UseGlobal(value) {}", "Global(varName){\n // return gameState.globals[varName];\n }", "function a(){ \n console.log(w); // consult Global for x and print 20 from Global\n }", "function sharingIsCaring() {\n console.log(globalVar)\n}", "function AccessVariableGloba...
[ "0.7057082", "0.6858137", "0.6801864", "0.67842233", "0.678325", "0.65878993", "0.65171355", "0.65149194", "0.6491843", "0.64391625", "0.6402367", "0.6379149", "0.63408273", "0.6322217", "0.6315911", "0.63081676", "0.6301956", "0.6271245", "0.6221023", "0.6220619", "0.6173652...
0.0
-1
Nuevas funciones para el lab 6
function myFunction() { document.getElementById("position").style.position = "absolute"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exercise06() {}", "function nombreFuncion(){\n \n}", "function exercise11() {}", "function exercise07() {}", "function fuctionPanier(){\n\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion (){}", "function check6() {\n\n}", "function...
[ "0.6558403", "0.6540954", "0.6487416", "0.6353226", "0.6313145", "0.62893856", "0.62893856", "0.62893856", "0.6172323", "0.6130391", "0.6088467", "0.6073353", "0.60717595", "0.6066236", "0.606611", "0.59204644", "0.5918913", "0.5906323", "0.5887355", "0.58747846", "0.58655596...
0.0
-1
Modify to have flight, airline, timestamp
fetchFlightStatus(flight, timestamp, callback) { let self = this; let payload = { airline: self.airlines[0], flight: flight, timestamp: timestamp } self.flightSuretyApp.methods .fetchFlightStatus(payload.airline, payload.flight, payload.ti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFlightData(allData) {\r\n var returnData = {\r\n 'time': allData.time,\r\n 'duration': allData.duration,\r\n 'airline': allData.airline,\r\n 'price': numberWithCommas(allData.price)\r\n };\r\n return returnData;\r\n}", "async updateFlight(req, res) {\n const {...
[ "0.5952328", "0.5682807", "0.56401235", "0.56058174", "0.5501085", "0.5298924", "0.5293848", "0.5265543", "0.52348465", "0.5233003", "0.5229484", "0.52191174", "0.5162303", "0.5144872", "0.5144344", "0.5114468", "0.5094119", "0.5079145", "0.50669163", "0.50648975", "0.5043112...
0.51221323
15
the function for the demo button
function displayInstructions() { document.getElementById('menu').style.visibility="hidden"; document.getElementById('instructions').style.visibility='visible'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function demoAction(button) {\n console.log(\"@demoAction\");\n\tvar action = button.attr(\"data-cp-action\");\n\tvar patientId =$(\"#patientrecord\").attr(\"data-cp-patientid\");\n\tvar data = \"\";\n\tswitch (action) {\n\t case \"get_testresult\": \n\t\t // Respond to \"Demo\" menu \"Get ... tes...
[ "0.6743485", "0.65874624", "0.6429286", "0.6418612", "0.6334992", "0.6297926", "0.6250681", "0.62420934", "0.6235218", "0.6234447", "0.62307274", "0.61906815", "0.6184085", "0.61429626", "0.6142551", "0.6140944", "0.61348104", "0.6124368", "0.6100962", "0.6091764", "0.6090507...
0.0
-1
the function for the demo button displays the demo of the game
function displayDemo() { document.getElementById('menu').style.visibility="hidden"; document.getElementById('demo').style.visibility='visible'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareDemoMode(){\n //* call the function that will reset the board for a new game\n htmlClearGame();\n //* define game for purposes of the demo mode\n var game = {};\n //* define game.hand with an array of pairs each matching the one following it\n game.hand = [ 'btrs', 'btyc', 'rsyc', 'rcyt...
[ "0.6956621", "0.6884973", "0.6717876", "0.66846746", "0.6661432", "0.6640304", "0.662533", "0.6615006", "0.6613649", "0.6606181", "0.6549368", "0.6546005", "0.65377676", "0.6520506", "0.6517033", "0.65098274", "0.6487534", "0.64746386", "0.645165", "0.64238316", "0.64184535",...
0.0
-1
the function for the saved games button displays the saved games
function displaySavedGames() { document.getElementById('menu').style.visibility="hidden"; document.getElementById('saved_games').style.visibility='visible'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveGame(){\n\t\t\n\t\tvar selectedValue = $('#difficultylevelselectmenu').find(':selected').val();\n\t\tvar allImagesSet = 'true';\n\t\t\n\t\t// check difficulty level drop down\n\t\tif(selectedValue === 'SELECT'){\n\t\t\t\n\t\t\t $('<div>').simpledialog2({\n\t\t\t\t mode: 'button',\n\t\t\t\t heade...
[ "0.71554875", "0.68802476", "0.6806328", "0.67282206", "0.6703052", "0.6542134", "0.650605", "0.64965516", "0.6489684", "0.6476135", "0.64355254", "0.6434341", "0.64290196", "0.64219", "0.640764", "0.6324131", "0.63182163", "0.63080114", "0.62345517", "0.6230908", "0.6229116"...
0.68769103
2
the function for the main menu button returns from the current page to the main menu
function mainMenu(page) { document.getElementById('menu').style.visibility="visible"; document.getElementById(page).style.visibility='hidden'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnToMainMenu() {\r\n\r\n // Reset the game state. \r\n resetGameState();\r\n\r\n // End game flag.\r\n gameHasStarted = false;\r\n\r\n // Reload main menu.\r\n startUp();\r\n}", "function mainMenu() {\n location.href=\"index.html\";\n}", "function returnToMenu() {\n window....
[ "0.7504885", "0.7312344", "0.7304128", "0.7074022", "0.69787115", "0.69113904", "0.6903835", "0.68905365", "0.6889152", "0.68585956", "0.68438196", "0.68231833", "0.6798484", "0.6723817", "0.67061865", "0.6684422", "0.6660216", "0.6641297", "0.66208357", "0.658458", "0.658268...
0.6407537
41
the function for the save game button saves the current progress made on the game for later use
function saveGame() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveGame() {\n if (store.getState().lastAction == 'GAME_SAVE' && store.getState().currentPage == 'LOAD_SAVED') {\n localStorage.setItem('kr_xp_save', JSON.stringify(store.getState().savedData));\n savedData = JSON.parse(localStorage.getItem('kr_xp_save'));\n loadGameStateChangeStarter();...
[ "0.7132816", "0.7017018", "0.69503593", "0.6869701", "0.6792583", "0.67903495", "0.67454976", "0.67209226", "0.6719482", "0.6685237", "0.6683167", "0.66827613", "0.66735715", "0.6662737", "0.6653056", "0.66522956", "0.6589739", "0.65775096", "0.6550824", "0.6490201", "0.64748...
0.7272664
0
the function for the exit game button returns from the game page to the main menu and resets the board to it's defaul state
function exitGame() { document.getElementById('menu').style.visibility="visible"; document.getElementById('ludo_game').style.visibility='hidden'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n $('.home').css({ 'margin-top': '0px' });\n disappear('.instructions');\n hide('.view-button');\n disappear('.follow-circle');\n disappear('.instructions');\n state = \"view\";\n }", "function returnToMainMenu() {\r\n\r\n // Reset the game sta...
[ "0.7279184", "0.72713673", "0.7255135", "0.72223544", "0.7021199", "0.6997587", "0.6977827", "0.69683194", "0.6910231", "0.68802816", "0.68774", "0.6875888", "0.6836575", "0.6831693", "0.6830867", "0.6825652", "0.68206453", "0.6801685", "0.67557156", "0.6744511", "0.674428", ...
0.6690798
27
adds the new position for the tile
function addPosition(x,y,positionArray) { var position={x,y}; positionArray.push(position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setTile(position, tile)\n {\n this.tiles[position.y * this.width + position.x] = tile;\n }", "update_tile(tile_pos){\n var tile = this.grid[tile_pos.x][tile_pos.y]\n if(tile != null){\n tile.update(this.grid)\n }\n }", "insertTile (tile) {\n this._cells[tile.posX]...
[ "0.7109774", "0.7042121", "0.6927265", "0.6873037", "0.66108435", "0.65802646", "0.65556175", "0.655515", "0.65141845", "0.6498988", "0.6458657", "0.64454406", "0.6399123", "0.63963336", "0.6387533", "0.6335632", "0.6332464", "0.63082504", "0.63082504", "0.63082504", "0.63082...
0.0
-1
removes all the stored positions except for the default i.e. the position of the tile in the base the first index
function removePositions(positionArray) { while (positionArray.length!=1) { positionArray.pop(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n\t\tfor (let x = 1; x <= this.#m; x++) this.#pos[this.#item[x]] = 0;\n\t\tthis.#m = 0; this.#offset = 0;\n\t}", "_deletPosition() {\n\n this.forEach((_, rowIndex) => {\n _.forEach((block, colIndex) => {\n\n /**\n * checks if there's a block on the piece...
[ "0.67280847", "0.67178226", "0.64083385", "0.63909566", "0.63539433", "0.6314955", "0.62757826", "0.6252571", "0.61653256", "0.6163679", "0.61503816", "0.61503816", "0.61298543", "0.61296874", "0.60940564", "0.60498816", "0.604544", "0.60306126", "0.59836453", "0.59822404", "...
0.0
-1
calculates the current position of the tile
function currentPosition(positionArray) { var size=positionArray.length; return size-1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateMapTilePosition(){\n\t\tvar mnwCurrentView = $('mnwCurrentView');\n\t\tvar calcLeft = mnwCurrentView.style.left;\n\t\tvar calcTop = mnwCurrentView.style.top;\t\t\n\t\tvar c_top = Math.floor(VIEWPORT_HEIGHT/2);\n\t\tvar c_left = Math.floor(VIEWPORT_WIDTH/2);\n\t\tcalcLeft = calcLeft.replace('px','...
[ "0.7830586", "0.7033514", "0.70334387", "0.6853866", "0.6755531", "0.6709334", "0.6676426", "0.6672207", "0.6634987", "0.65591246", "0.6550918", "0.6541465", "0.6538984", "0.64756644", "0.64540327", "0.64523673", "0.6355195", "0.63530225", "0.63428545", "0.631866", "0.6286792...
0.0
-1
Dice functions roll dice
function rollDice(){ var diceValue, diceValue1=Math.floor((Math.random()*6) + 1), diceValue2=Math.floor((Math.random()*6) + 1); // if (turn=="red") { // redDiceValue=[diceValue1,diceValue2]; // } else if (turn=="green") { // greenDiceValue=[diceValue1,diceValue2]; // } else if (turn=="yellow") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rollDice()\n{\n\tCurrentDiceGroup.rollDice();\n\n\tupdateHistory(CurrentDiceGroup.lastdiceroll);\n}", "function rollDice() {\n var dice1 = Math.ceil(Math.random() * (1 + 6 - 1));\n var dice2 = Math.ceil(Math.random() * (1 + 6 - 1));\n return dice1 + dice2;\n }", "static roll(di...
[ "0.8191708", "0.8001312", "0.7884153", "0.78692865", "0.783675", "0.7813794", "0.7775131", "0.7756359", "0.77507675", "0.76888084", "0.76886624", "0.7679399", "0.7603259", "0.7596675", "0.7587127", "0.75856435", "0.75856435", "0.7575534", "0.75532776", "0.7535971", "0.7530214...
0.0
-1
this function identifies whether a tile has been clicked and compares it with the different tile positions and confirms which tile was clicked by returning true if the tilePosition corresponds with the clicked spot
function tile(pos, tilePositions) { if (Math.pow(pos.x-tilePositions[currentPosition(tilePositions)].x,2)+Math.pow(pos.y-tilePositions[currentPosition(tilePositions)].y,2) < Math.pow(20,2)) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "doubleClickTile(row, col){\n\n let tile = this.grid[row][col];\n if(tile.isRevealed){\n let neighbours = MineSweeper.getNeighbours((row == 0), (row == this.rows - 1), (col == 0), (col == this.cols - 1));\n let flaggedNeighbours = 0;\n for(let neighbour of neighbo...
[ "0.7072798", "0.7048261", "0.70024437", "0.69969296", "0.6893139", "0.6829758", "0.6814215", "0.68067265", "0.6723113", "0.6667813", "0.65364146", "0.65062827", "0.6489396", "0.64879256", "0.64675665", "0.64614075", "0.64129174", "0.63920146", "0.63683087", "0.63435847", "0.6...
0.0
-1
this function identifies the position of the tile and returns the corresponding tile occupying the position clicked upon
function selectedTile(event) { const pos = { x: event.clientX, y: event.clientY }; // var selectedTile = "none"; if (tile(pos, greenTile1Positions)) { selectedPiece = "greenTile1"; ctx.beginPath(); ctx.arc(greenTile1Positions[currentPosition(greenTile1Positions)].x,greenTile1Positions[curre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tileClick() {\n\tmoveOneTile(this);\n}", "function getTile(e) {\n var g = grid();\n var regExp = new RegExp(gm.tileRegexp());\n for (var i = 0; i < g.length; i++) {\n if (e) {\n var isInside = ((g[i][0] <= e.y) &&\n ((g[i][0] + 256) > e....
[ "0.728746", "0.7263315", "0.7263315", "0.7156065", "0.71152174", "0.7050448", "0.69823134", "0.6961094", "0.68776023", "0.6800848", "0.677632", "0.6751745", "0.6744066", "0.67214125", "0.6712411", "0.67059714", "0.6687784", "0.6597047", "0.6593698", "0.65629506", "0.6539225",...
0.6612637
17
determines the winner of the game number of pieces that have landed in the base
function determineWinner() { var winner = "none"; if (redTilesPosition.rTile1 == 56 && redTilesPosition.rTile2 == 56 && redTilesPosition.rTile3 == 56 && redTilesPosition.rTile4 == 56) { winner = "red"; document.getElementById('winner').innerHTML.concat(" is RED"); } else if (yellowTilesPosition.yTile1 == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeWinner(){\n let winner;\n\n if(P1.score <= 21){\n if(P1.score > P2.score || P2.score>21){\n blackjackGame.win++;\n winner = P1;\n }else if(P1.score < P2.score){\n blackjackGame.loss++;\n winner = P2;\n }else if(P1.score === P2.s...
[ "0.67574584", "0.6563511", "0.64325607", "0.6425214", "0.6419462", "0.6418372", "0.64152867", "0.6410506", "0.6395922", "0.6392929", "0.6381", "0.6376406", "0.6375673", "0.6369658", "0.63522965", "0.6344501", "0.6343857", "0.63296545", "0.63205624", "0.63184285", "0.6296841",...
0.0
-1
FUNCTION DEFINITIONS Changing 24 hour time to 12 hour time
function twelveHr(hour) { if (hour > 12) { return hour - 12 + "PM"; } else { return hour + "AM"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function as12HourTime(number) {\n\t\tif (number == 0 || number == 24) {\n\t\t\treturn \"midnight\";\n\t\t}\n\t\tif (number < 12) {\n\t\t\treturn number + \"am\";\n\t\t}\n\t\tif (number == 12) {\n\t\t\treturn \"noon\";\n\t\t} else {\n\t\t\treturn (number - 12) + \"pm\";\n\t\t}\n\t}", "function convert24to12hr(tim...
[ "0.767342", "0.76623464", "0.76407593", "0.7519967", "0.7513106", "0.74903476", "0.744036", "0.7309842", "0.7261364", "0.72582823", "0.72401935", "0.7239536", "0.71843755", "0.716764", "0.7160335", "0.7149355", "0.71319264", "0.71140534", "0.70734996", "0.70402545", "0.702888...
0.7287745
8
Main page date and time
function renderDate() { if (myStorage.getItem("use24hr") == "true") { $("#currentDay").text(moment().format("MMMM Do YYYY, H:mm:")); } else { $("#currentDay").text(moment().format("MMMM Do YYYY, h:mm:")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayDateAndTime() {\n return new Date();\n}", "function printDate()\n\t{\n\t\tvar time = getTime();\n\n\t\t// Print time\n\t\ttaskline.obj.time_date.innerHTML = time.day + '.' + time.monthNameShort + ' ' + time.year;\n\t}", "function getTime() {\n\tvar today = new Date();\n\tseperator();\n\tOutput...
[ "0.68233603", "0.6644578", "0.66229266", "0.65890646", "0.6525726", "0.65205425", "0.6519003", "0.65103966", "0.6501086", "0.6497732", "0.645246", "0.63462603", "0.6256321", "0.6254418", "0.61971", "0.61912435", "0.61687374", "0.614154", "0.6133374", "0.612831", "0.6126676", ...
0.61866397
16
Dynamically creating the forms for scheduling
function renderPlanner() { var currentTime = moment().format("H"); var currentClass = ""; var isDisabled = ""; for (i = 0; i < 9; i++) { var time = ""; if (myStorage.getItem("use24hr") == "true") { time = 9 + i; } else { time = twelveHr(9 + i); } if (current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpForm()\r\n {\r\n var form = {\r\n patients : patients,\r\n phlebotomists : phlebotomists,\r\n pscs : pscs,\r\n labTests : labTests,\r\n diagnoses : diagnoses\r\n };\r\n\r\n if (appId)\r\...
[ "0.6604567", "0.65352213", "0.6377214", "0.630715", "0.6295433", "0.624398", "0.6208066", "0.6196741", "0.61908275", "0.6181818", "0.6123568", "0.6100461", "0.60973644", "0.60711133", "0.605552", "0.6038044", "0.6013293", "0.59951574", "0.59854156", "0.5975943", "0.5927266", ...
0.6463584
2
Switches planner to 12 hour time system
function renderAmPm() { $("#24hrs").removeClass("active"); $("#12hour").addClass("active"); myStorage.setItem("use24hr", false); $(".container").empty(); renderPlanner(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "usesTwelveHourTime() {\n return (\n _.endsWith(new Date().toLocaleString(), 'AM') ||\n _.endsWith(new Date().toLocaleString(), 'PM')\n )\n }", "function setTimeDisplay(time) {\n if (time <= 12) {\n toDoHour = time + \"am\";\n } else {\n toDoHour = (time - 12) + \"pm...
[ "0.6615264", "0.6533356", "0.651929", "0.64302427", "0.64180875", "0.64057106", "0.6356546", "0.6336219", "0.63207155", "0.63207155", "0.63207155", "0.63207155", "0.63207155", "0.63207155", "0.63207155", "0.6284713", "0.6186846", "0.6156995", "0.61242014", "0.6083426", "0.605...
0.66671646
0
Switches the planner to 24 hour time system
function render24hrs() { $("#12hour").removeClass("active"); $("#24hrs").addClass("active"); myStorage.setItem("use24hr", true); $(".container").empty(); renderPlanner(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchToHourMode(surpressAnimation) {\n\t\t\t\tif (selectionMode == 'HOUR') return;\n\t\t\t\trepaintClockHourCanvas();\n\t\t\t\tif (surpressAnimation) {\n\t\t\t\t\tclockMinuteCanvas.css('display', 'none');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclockMinuteCanvas.css('zIndex', 2).stop().animate({opacity: 0,...
[ "0.6404337", "0.63839924", "0.6380919", "0.63147795", "0.6232681", "0.62244105", "0.62244105", "0.62244105", "0.62244105", "0.62244105", "0.62244105", "0.62244105", "0.62159437", "0.61979234", "0.6185992", "0.61659014", "0.6152378", "0.6099032", "0.6056017", "0.603221", "0.59...
0.6735971
0
Updates the auto attach feature based on the user or workspace setting
function updateAutoAttach(context) { const newState = vscode.workspace.getConfiguration(DEBUG_SETTINGS).get(AUTO_ATTACH_SETTING); if (newState !== currentState) { if (newState === 'disabled') { // turn everything off if (statusItem) { statusItem.hide(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activate(context) {\r\n currentState = Promise.resolve({ context, state: null });\r\n context.subscriptions.push(vscode.commands.registerCommand(TOGGLE_COMMAND, toggleAutoAttachSetting.bind(null, context)));\r\n context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(e => {\r\n ...
[ "0.5398718", "0.53909904", "0.5329382", "0.52826494", "0.5136201", "0.5073226", "0.50707024", "0.50652665", "0.504782", "0.5038453", "0.50225824", "0.49857974", "0.49599627", "0.4906152", "0.4859012", "0.48212597", "0.48041964", "0.48020986", "0.47747692", "0.47735763", "0.47...
0.60123485
0
This function retrieves data for a specific project from the server INNER FUNCTION CALLS: setProjectHeader(), fillTabs_CLOSEOUT(), getDropdownItems_CLOSEOUT()
function getProjectEnums_CLOSEOUT(edit) { if (PAGETYPE_CLOSEOUT == 'closeout') { $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'get', id: projectID, }, success: function (data) { PROJECT_DATA = data; setProjectHeader...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProject_PROJECT_MANAGER(project_id, stopServerCalls) {\n console.log('ID = ', project_id);\n projectID = project_id;\n if (projectID !== null) {\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'get',\n id: projectID,\n ...
[ "0.7468013", "0.71844256", "0.7099187", "0.70610607", "0.68644214", "0.68122673", "0.6779349", "0.6727638", "0.6687907", "0.6672426", "0.65717494", "0.6549856", "0.6468382", "0.64567864", "0.6453308", "0.6437262", "0.6413249", "0.64103675", "0.6384407", "0.6354711", "0.634813...
0.6068843
40
This function retrieves the potential drop down items INNER FUNCTION CALLS: fillDropdowns_CLOSEOUT()
function getDropdownItems_CLOSEOUT() { $.ajax({ type: 'POST', url: 'Project', dataType: 'json', data: { domain: 'project', action: 'getSpecificObjects', closeoutstatus: true, }, success: function (data) { fillDropdowns_CLOSEOUT(data); }, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillDropdowns_CLOSEOUT(data) {\n var json = JSON.parse(data['closeoutstatus']);\n var d = document.createDocumentFragment();\n console.log('CLOSEOUT DATA = ', data);\n\n //sorts drop downs by id instead of alphabetical\n json.sort(function (a, b) {\n if (a.id < b.id) return -1;\n else if (a.id ...
[ "0.7477642", "0.6871906", "0.64544106", "0.64319533", "0.6394721", "0.6379934", "0.63615257", "0.621942", "0.6208018", "0.61677474", "0.609212", "0.60045844", "0.60045844", "0.60045844", "0.60045844", "0.60045844", "0.5989475", "0.5976652", "0.59168756", "0.5916337", "0.58875...
0.7874729
0
This function fills the closeout information for the project INNER FUNCTION CALLS: none
function fillTabs_CLOSEOUT(data) { var json = data; if (json.closeoutDetails != null) { $('#closeoutData').find('#airGas').val(json.closeoutDetails.airGas); $('#closeoutData').find('#permits').val(json.closeoutDetails.permitsClosed); $('#closeoutData').find('#asBuilts').val(json.closeoutDetails.asBuilts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Close_Instruction() {\r\n}", "function Close() {\n } // Close", "function closeAllInfoWindows() {\n if(originInfoWindowList != undefined){\n for (var i=0;i<originInfoWindowList.length;i++) {\n originInfoWindowList[i].close();\n }\n }\n if(currentInfoWindo...
[ "0.6004389", "0.594318", "0.59367275", "0.5930969", "0.5904877", "0.5865667", "0.5865667", "0.5865667", "0.5865667", "0.5787031", "0.5747849", "0.5717397", "0.5717397", "0.5715829", "0.57062304", "0.57042307", "0.5701024", "0.5697579", "0.5669149", "0.56657726", "0.5659129", ...
0.0
-1
This function fills the dropdowns in the closeoutData div
function fillDropdowns_CLOSEOUT(data) { var json = JSON.parse(data['closeoutstatus']); var d = document.createDocumentFragment(); console.log('CLOSEOUT DATA = ', data); //sorts drop downs by id instead of alphabetical json.sort(function (a, b) { if (a.id < b.id) return -1; else if (a.id > b.id) retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillDropdown(data)\n{\n\n\tfor (var i = 0; i < ITEM_TYPES.length; i++)\n\t{\n\t\tgenerateDropdown(data[ITEM_TYPES[i]], ITEM_TYPES[i]);\n\t}\n\tgenerateCloseoutDropdown();\n\n}", "function getDropdownItems_CLOSEOUT() {\n $.ajax({\n type: 'POST',\n url: 'Project',\n dataType: 'json',\n data: ...
[ "0.7270824", "0.68859756", "0.6777504", "0.66177446", "0.6568595", "0.64423275", "0.63703895", "0.6352041", "0.6340569", "0.63324744", "0.63142234", "0.6295504", "0.624404", "0.62113017", "0.62062466", "0.6194733", "0.61855644", "0.61841744", "0.6147584", "0.61377144", "0.612...
0.810736
0
This function saves the current project to the server based off of the values that the user entered INNER FUNCTION CALLS: isValidInput_CLOSEOUT()
function saveProject_CLOSEOUT() { console.log('Saving Closeout Information'); var costcoSignoff = $('#closeoutData').find('#costcoSignoff').val(); var punchList = $('#closeoutData').find('#punchList').val(); var alarmHvac = $('#closeoutData').find('#alarmHvac').val(); var verisae = $('#closeoutData').find('#v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeCreateProject() {\n // Control structure to check if you are both logged in, and have given your project a name\n if (domLogIn.innerHTML == \"<strong>Logged in as guest</strong>\" && domSetProjectNameValue != null) {\n domCreateProjectPopUp.style.visibility = \"hidden\";\n domCreateProjec...
[ "0.640724", "0.62060285", "0.61971", "0.6149118", "0.60098463", "0.59668696", "0.593496", "0.58667046", "0.58647317", "0.5841006", "0.5765754", "0.5759341", "0.5747897", "0.5739857", "0.57151484", "0.57020247", "0.5675507", "0.56510466", "0.56407183", "0.5640484", "0.56261885...
0.719273
0
This function checks the closeout data to make sure it is all valid INNER FUNCTION CALLS: none
function isValidInput_CLOSEOUT(dates_CLOSEOUT) { //Check if all of the dates are in the correct format for (var i = 0; i < dates_CLOSEOUT.length; i++) { var date = dates_CLOSEOUT[i]; if (date != '' && !isDate(date)) { console.log('----------'); console.log(date); console.log('----------')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closeOpenCalls() {\r\n\t\t\t\t\tvar action, condition;\r\n\t\t\t\t\tcondition = function(token, i) {\r\n\t\t\t\t\t\tvar ref;\r\n\t\t\t\t\t\treturn (ref = token[0]) === ')' || ref === 'CALL_END';\r\n\t\t\t\t\t};\r\n\t\t\t\t\taction = function(token, i) {\r\n\t\t\t\t\t\treturn token[0] = 'CALL_END';\r\n\t\t\t\t\t};\...
[ "0.5795701", "0.562622", "0.5537545", "0.5416039", "0.5382421", "0.53028023", "0.52751267", "0.5240203", "0.52022785", "0.51452625", "0.5134559", "0.50884825", "0.50302345", "0.50123847", "0.49944758", "0.498944", "0.4984908", "0.49848253", "0.49779198", "0.49707714", "0.4951...
0.0
-1
This function returns to the the ProjectManager.html page with a give projectID. NOT USED
function returnToProjectManager() { window.location.href = PROJECTMANAGER + '?id=' + projectID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navigateToSelectedProject () {\n\twindow.location.href = 'projects.html?id=' + selectedProjID + \"&from=taskBrowser\";\n}", "function onGoProject() {\n\t\n\tselectedProjectName = getSelected(projectSelect);\n\n\tif (!selectedProjectName)\n\t\talert('No project selected');\n\telse\n\t\twindow.location.as...
[ "0.71850216", "0.71683466", "0.71130496", "0.6718036", "0.64828724", "0.6458744", "0.6453268", "0.64189214", "0.6382789", "0.6355527", "0.6354989", "0.6285051", "0.6284542", "0.6247109", "0.6246889", "0.62038356", "0.6192971", "0.614387", "0.61168396", "0.6082972", "0.6010407...
0.8040787
0
This function retrieves a specific project from the database INNER FUNCTION CALLS: setProjectHeader(), fillTabs_PERMIT(), getTasks()
function getProject_PERMIT() { if (projectID !== null) { $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'get', id: projectID, }, success: function (data) { PROJECT_DATA = data; setProjectHeader(data, currentDivLocatio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function projget(p, cb) {\n var pn = p.projectName;\n debug && console.error(\"fetching individual project: \"+pn);\n axios.get(cfg.url+\"project/\"+pn, axopt).then((resp) => {\n // OK\n return cb(null, resp.data);\n }).catch((ex) => {\n console.log(\"Problems getting project details for: \"+pn+\" (\"...
[ "0.72136706", "0.71796227", "0.7164289", "0.7084351", "0.6997171", "0.684465", "0.68361366", "0.67891794", "0.67575854", "0.6756612", "0.66137254", "0.66090095", "0.6585812", "0.6573678", "0.65733147", "0.6556654", "0.6543437", "0.652552", "0.6492244", "0.64859563", "0.644570...
0.0
-1
This function retrieves all permit stages from database INNER FUNCTION CALLS: fillDropdowns_PERMIT(), fillTabs_PERMIT(), getProject_PERMIT()
function getProjectEnums_PERMIT() { $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'getSpecificObjects', permitstage: true, // 'permitreq' : true, inspectionstatus: true, }, success: function (data) { console.log('STATUSES', data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillDropdowns_PERMIT(json) {\n console.log('PERMIT/INSPECTION JSON = ', json);\n\n var permitStage = JSON.parse(json['permitstage']);\n permitStage.sort(function (a, b) {\n if (a.id < b.id) return -1;\n else if (a.id > b.id) return 1;\n else return 0;\n });\n\n var inspectionStage = JSON.par...
[ "0.6340311", "0.62879", "0.61358845", "0.59209234", "0.56676924", "0.5658897", "0.56073374", "0.5582996", "0.55806273", "0.5553793", "0.55362916", "0.5526361", "0.55230445", "0.5417431", "0.5382788", "0.53714865", "0.5341423", "0.5327722", "0.5305452", "0.5268105", "0.5242777...
0.62338036
2
This function retrieves a specific project from the database INNER FUNCTION CALLS: none
function fillDropdowns_PERMIT(json) { console.log('PERMIT/INSPECTION JSON = ', json); var permitStage = JSON.parse(json['permitstage']); permitStage.sort(function (a, b) { if (a.id < b.id) return -1; else if (a.id > b.id) return 1; else return 0; }); var inspectionStage = JSON.parse(json['inspec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getcurrentprojects() { }", "function getCurrentProjects(database = connection) {\n let allProjects = database(\"projects\")\n .select(\n \"id\",\n \"user_id\",\n \"name\",\n \"done\",\n \"image_url\",\n \"deadline\",\n \"color\",\n \"purpose\",\n \"friendOneEmail\...
[ "0.7090458", "0.70373917", "0.69781494", "0.6936916", "0.687815", "0.6800346", "0.6777983", "0.6749041", "0.670909", "0.66331923", "0.6572654", "0.65691525", "0.6553803", "0.651269", "0.6450131", "0.643361", "0.64272505", "0.6403434", "0.63893086", "0.636387", "0.6361593", ...
0.0
-1
This function fills all of the tabs in the permitData div INNER FUNCTION CALLS: none
function fillTabs_PERMIT(data) { var json = data; $('#permitData') .find('.projectIdentifier') .html( json.warehouse.city.name + ', ' + json.warehouse.state + ' --- ' + json.projectItem.name ); console.log(json); if (json.permits != null) { $('#permitData'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillPermitsAndInspections(data) {\n let tabData = data.permits;\n console.log('TAB DATA', tabData);\n\n // permits\n $('#projectManager')\n .find('#buildingPermitRequired')\n .text(convertRequired(tabData.buildingPermitRequired));\n $('#projectManager').find('#buildingPermitDate').text(tabData....
[ "0.65653366", "0.6458426", "0.6443014", "0.64053", "0.631863", "0.6308774", "0.62661815", "0.62470686", "0.6242445", "0.62295336", "0.6202809", "0.6140156", "0.6119044", "0.6117964", "0.61108035", "0.610325", "0.6101344", "0.6089514", "0.6084943", "0.606864", "0.6058757", "...
0.71627873
0
This function checks to see that all permit dates are in "MM/DD/YYYY" format INNER FUNCTION CALLS: none
function isValidInput_PERMIT(dates_PERMIT) { //Check if all of the dates are in the correct format for (var i = 0; i < dates_PERMIT.length; i++) { var date = dates_PERMIT[i]; if (date != '' && !isDate(date)) { console.log('----------'); console.log(date); console.log('----------'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debtCheckFormatDate(dataCheck){\n var re = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if(dataCheck == '' || dataCheck == 'dd/mm/yyyy'){\n return true;\n }else{\n if(!dataCheck.match(re)){\n return false;\n }else{\n return true;\n }\n }\n}", "function jsac_apply_date(elts){\n\t\tfor (v...
[ "0.7298406", "0.7280135", "0.72316384", "0.72245806", "0.71568006", "0.71117115", "0.7082037", "0.70493025", "0.70202625", "0.6913477", "0.68688005", "0.6819732", "0.6806445", "0.6790998", "0.67834616", "0.67679584", "0.67404354", "0.672193", "0.67170817", "0.670695", "0.6705...
0.7492374
0
This function retrieves all of the enumerated data (warehouses, statuses, etc) from the database Input: none Output: none INNER FUNCTION CALLS: fillDropdowns_PROJECT_DATA, getProject_PROJECT_DATA
function getProjectEnums_PROJECT_DATA(edit) { $.ajax({ type: 'POST', url: 'Project', dataType: 'json', data: { domain: 'project', action: 'getSpecificObjects', warehouse: true, class: true, item: true, person: true, stage: true, status: true, type:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillDropdowns_PROJECT_DATA(data) {\n console.log('here comes data', data['status']);\n generateDropdowns(data['warehouse'], 'warehouse');\n generateDropdowns(data['class'], 'class');\n generateDropdowns(data['item'], 'project');\n generateDropdowns(data['person'], 'manager');\n generateDropdowns(dat...
[ "0.6877429", "0.6634618", "0.62623024", "0.62395304", "0.5818603", "0.5810625", "0.57987934", "0.57240206", "0.5719423", "0.56885403", "0.5680417", "0.5669467", "0.56681246", "0.56350434", "0.5587266", "0.5575636", "0.55617255", "0.5556428", "0.55299306", "0.5515074", "0.5511...
0.55314314
18
This function fills multiple dropdowns with data aswell as fills the equipment data Input: JSON array of arrays. Output: none (fills dropdowns with data)
function fillDropdowns_PROJECT_DATA(data) { console.log('here comes data', data['status']); generateDropdowns(data['warehouse'], 'warehouse'); generateDropdowns(data['class'], 'class'); generateDropdowns(data['item'], 'project'); generateDropdowns(data['person'], 'manager'); generateDropdowns(data['person']...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillDropdown(data)\n{\n\n\tfor (var i = 0; i < ITEM_TYPES.length; i++)\n\t{\n\t\tgenerateDropdown(data[ITEM_TYPES[i]], ITEM_TYPES[i]);\n\t}\n\tgenerateCloseoutDropdown();\n\n}", "function populateTireModel() {\n let manufactureDropdown = document.getElementsByName('tireManufacture')[0];\n let modelDro...
[ "0.7209596", "0.7013326", "0.6819526", "0.67800933", "0.67397773", "0.6648101", "0.654476", "0.65340364", "0.6494613", "0.6446808", "0.6440628", "0.6436804", "0.64156276", "0.6380815", "0.637584", "0.63355625", "0.6319948", "0.6255684", "0.62238723", "0.62209034", "0.6203801"...
0.63467944
15
This function puts data into a specific dropdown menu INNER FUNCTION CALLS: hasStage()
function generateDropdowns(str, className) { var json = JSON.parse(str); var d = document.createDocumentFragment(); var sent = true; console.log(className); if ( className == 'warehouse' || className == 'projecteq' || className == 'subcontractors' ) { json = sortByName(json, className); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openStageFilter(){\n var selected = this.template.querySelector(\".selected-stage\");\n var optionsContainer = this.template.querySelector(\".options-container-stage \");\n var optionsList =this.template.querySelectorAll(\".option-stage\");\n selected.addEventListener(\"click\", () => ...
[ "0.64798236", "0.6386193", "0.6386193", "0.6051218", "0.60463536", "0.5877837", "0.58651125", "0.58506405", "0.5837217", "0.5809442", "0.5787113", "0.5775345", "0.5772972", "0.5768692", "0.570468", "0.569397", "0.5692658", "0.5676117", "0.56616974", "0.565392", "0.5652471", ...
0.0
-1
This function automatically generates a change order for HVAC Author: Fardeen Yaqub
function changeOrderHVAC(temp) { //if HVAC is set to "Yes" or is being accessed through a drop down //The check if HVAC is set to "Yes" is still here in case we want to auto generate a change order when //HVAC is changed in general info if ($('#projectData').find('#autofill-HVAC').val() == '1' || temp == 1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_CHANGE_ORDER(param) {\n switch (param) {\n case '1':\n return 'COP';\n case '2':\n return 'REF';\n case '3':\n return 'WHS';\n case '4':\n return 'FAC';\n case '5':\n return 'VEN';\n case '6':\n default:\n return 'UDF';\n }\n}", "getAuthor() {...
[ "0.5820141", "0.577535", "0.5508042", "0.53067243", "0.53019565", "0.5228815", "0.5162543", "0.51510227", "0.51443154", "0.5126329", "0.511247", "0.50846034", "0.5065814", "0.5047962", "0.50316554", "0.50179785", "0.501525", "0.5009734", "0.50056136", "0.50056136", "0.5005613...
0.5299147
5
This function automatically generates a change order for Refrigeration Author: Fardeen Yaqub
function changeOrderRefrigeration(temp) { //if HVAC is set to "Yes" or is being accessed through a drop down //The check if Refrigeration is set to "Yes" is still here in case we want to auto generate a change order when //Refrigeration is changed in general info if ( $('#projectData').find('#autofill-Refri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAuthor() {return \"de/odex\";}", "function reconstructAuthors() {\n\tlet vf = $('input#class-author-input-field');\n\tlet hf = $('.class-author-input-hidden');\n\tlet words = hf.val().split(';;');\n\n\tfor (var i = words.length - 1; i >= 0; i--) {\n\t\tvf.val(words[i].split('$$')[1]);\n\t\taddAuthor();\n\t}\n...
[ "0.64502513", "0.5745584", "0.5726976", "0.5423772", "0.5353759", "0.5341461", "0.5313599", "0.53037584", "0.529687", "0.5263873", "0.5256876", "0.5228873", "0.5211228", "0.51837707", "0.5182813", "0.51803696", "0.5180003", "0.51610744", "0.5131695", "0.5124619", "0.5122427",...
0.49291012
80
This function saves a project to the database INNER FUNCTION CALLS: updateFrontEnd()
function saveProject_PROJECT_DATA() { var mcsNumber = $('#projectData').find('#mcsNumber').val(); // Required Information var warehouse = $('#projectData').find('#warehouse').val(); var projectClass = $('#projectData').find('#class').val(); var item = $('#projectData').find('#project').val(); var manager =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _saveProjectDetail() {\n if ($scope.projectForm.$valid) {\n $scope.project.startdate = $scope.project.startdateCn;\n $scope.project.enddate = $scope.project.enddateCn;\n serverRequestService.serverRequest(ADD_EDIT_PROJECT_CTRL_API_OBJECT.createNewProject, 'POST', $s...
[ "0.6800682", "0.65190595", "0.65131", "0.64961034", "0.6490196", "0.6485515", "0.64326483", "0.6423464", "0.6406468", "0.6382849", "0.6341554", "0.6328361", "0.62958044", "0.6280773", "0.6250111", "0.6171294", "0.61658454", "0.61642784", "0.6105255", "0.60663146", "0.6062918"...
0.6471522
6
This function updates the front end project display
function updateProjectDisplay(data) { console.log('THE UPDATE DATA = ', data); convertStage(data); updatedManager = { name: data.manager, id: matchUsernameToPerson(data.manager), }; updatedMCSnumber = data.mcsNum; convertItem(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _viewProjectList() {\n const userProjects = todo.returnAll().slice(1);\n _renderPanel(projectPanel, renderList, userProjects);\n }", "function updateFrontEnd() {\n let from = getParameterByName('from');\n if (from == 'projectData') getTheProjects();\n else {\n clearAndAddSingleRow...
[ "0.73127997", "0.7272496", "0.72454846", "0.71395546", "0.7113705", "0.71100134", "0.70385855", "0.70173943", "0.69555986", "0.69478", "0.69059944", "0.6867523", "0.6847646", "0.6817939", "0.67844075", "0.674906", "0.6742137", "0.67220885", "0.66842204", "0.66462064", "0.6646...
0.7290817
1
This function matches the user's first name to the appropriate person ID INNER FUNCTION CALLS: removeParam()
function matchUsernameToPerson(userFirstName) { if (!PERSONS) return '3'; console.log('PEOPLE', PERSONS, userFirstName); for (var i = 0; i < PERSONS.length; i++) { if (PERSONS[i].name.toLowerCase() == userFirstName.toLowerCase()) { return PERSONS[i].id; } } return '3'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchUsernameToPersonID(userFirstName, paramNum) {\n if (!PERSONS) return '3';\n\n console.log('PEOPLE', PERSONS, userFirstName);\n for (var i = 0; i < PERSONS.length; i++) {\n if (PERSONS[i].name.toLowerCase() == userFirstName.toLowerCase()) {\n console.log(PERSONS[i].name, PERSONS[i].id);\n ...
[ "0.7283009", "0.5997784", "0.5886274", "0.5849924", "0.57971346", "0.5670103", "0.5661194", "0.5599861", "0.55989426", "0.557667", "0.55640477", "0.55511266", "0.55388606", "0.55259407", "0.5519284", "0.5511037", "0.5510886", "0.5501983", "0.5495308", "0.5480161", "0.54702914...
0.6265801
1
This function retrieves project information from a project, and prepares it to be edited. INNER FUNCTION CALLS: setProjectHeader(), fillForm_PROJECT_DATA(), getTasks() Input: none Output: none
function getProject_PROJECT_DATA() { console.log('IN PROJ DATA'); if (projectID) { $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'get', id: projectID, }, success: function (data) { PROJECT_DATA = data; setProjectH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static loadProject(project) {\n currentProject = project;\n const overlay2 = document.querySelector('#overlay2');\n overlay2.style.display = 'none';\n const editProjectData = document.querySelector('#newProjectData').elements\n const name = editProjectData[0];\n const dueD...
[ "0.70629287", "0.68415725", "0.6804469", "0.68007576", "0.6714364", "0.6649871", "0.65338856", "0.6502954", "0.6471438", "0.6426552", "0.6391756", "0.6370547", "0.6363604", "0.6325162", "0.63170683", "0.6312707", "0.63034725", "0.630144", "0.6292603", "0.62862885", "0.6252026...
0.73333424
0
This function fills out the page with project data. This is so the user can edit the project information Input: JSON object representing a project Output: none (fills out data on the page)
function fillForm_PROJECT_DATA(data) { console.log('PROJECT DATA', data); var json = data; $('#projectData').find('#mcsNumber').val(json.McsNumber); console.log('WARE ID : ', json.warehouse.id); $('#projectData').find('#warehouse').val(json.warehouse.id); $('#projectData').find('#class').val(json.projectC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pagePopulate() {\n document.getElementById(\"title-text\").innerHTML = projectData.title;\n let statusHTML = \"\";\n switch (projectData.status) {\n case \"inprogress\":\n statusHTML =\n '<p>Project Status: <span class=\"inprogress\">In Progress</span></p>';\n break;\n...
[ "0.7696596", "0.7365257", "0.73212266", "0.7085134", "0.7043357", "0.69959074", "0.69636965", "0.68781346", "0.68534976", "0.6832225", "0.6809729", "0.68069357", "0.6741838", "0.6709661", "0.6649209", "0.6639197", "0.66246176", "0.66016835", "0.65720177", "0.65677404", "0.655...
0.6944553
7
This function sorts cities or other objects my name alphabetically INNER FUNCTION CALLS: none
function sortByName(object, className) { object.sort(function (a, b) { if (className == 'warehouse' || className == 'projecteq') return a.city.name > b.city.name; else return a.name > b.name; }); return object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SortByCity()\n{\n let sortedArray = contactsArray;\n sortedArray.sort((a,b) => a.city.toLowerCase().localeCompare(b.city.toLowerCase()));\n console.log(\"\\n\\nPrinting sorted array by city : \");\n sortedArray.forEach(p => console.log(\"\\n\"+p.toString()));\n}", "function sortByCity() {\n ...
[ "0.72195184", "0.69172174", "0.68468195", "0.65967155", "0.648087", "0.64691", "0.6451235", "0.6375174", "0.63740546", "0.63145703", "0.6279132", "0.6269379", "0.62687284", "0.626444", "0.6262513", "0.6251179", "0.62508565", "0.6247334", "0.62447625", "0.6243156", "0.62354", ...
0.69224447
1
This function checks to see if a project has a certain stage INNER FUNCTION CALLS: none
function hasStage(stageList, stage) { for (var i = 0; i < stageList.length; i++) { if (stageList[i] == stage) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_program_trace_for_nested_functions(){\n\tfor(i=0; i<program_stack.length; i++){\n\t\tif(program_stack[i].includes('invoke-fun-pre')){\n\t\t\tvar f = program_stack[i].split('_').splice(-1)[0];\n\t\t\tvar f_nested_functions = get_nested_functions(f, i);\n\t\t\t//console.log(f + ' has these nested func...
[ "0.6897054", "0.5782196", "0.576708", "0.5599818", "0.5499834", "0.5470695", "0.5462847", "0.53990585", "0.5387221", "0.53274393", "0.5323278", "0.53169715", "0.52916133", "0.52756774", "0.51686877", "0.5127894", "0.51171607", "0.5106546", "0.5102018", "0.50939417", "0.509036...
0.54530317
7
This function retrieves a specific project from the database INNER FUNCTION CALLS: setProjectHeader(), fillTabs_PROJECT_MANAGER(), getTasks()
function getProject_PROJECT_MANAGER(project_id, stopServerCalls) { console.log('ID = ', project_id); projectID = project_id; if (projectID !== null) { $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'get', id: projectID, }, succes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function projget(p, cb) {\n var pn = p.projectName;\n debug && console.error(\"fetching individual project: \"+pn);\n axios.get(cfg.url+\"project/\"+pn, axopt).then((resp) => {\n // OK\n return cb(null, resp.data);\n }).catch((ex) => {\n console.log(\"Problems getting project details for: \"+pn+\" (\"...
[ "0.7279145", "0.69836885", "0.6951202", "0.6840345", "0.67897224", "0.6712417", "0.6712335", "0.6691537", "0.6672696", "0.6648313", "0.6647453", "0.6603516", "0.65667146", "0.6564207", "0.6549217", "0.6518616", "0.6419486", "0.641696", "0.63999605", "0.6391251", "0.6381016", ...
0.7129624
1
This function calls all the other functions that help fill out projectInfo INNER FUNCTION CALLS: fillProjectInformation(), fillChangeOrders(), fillPermitsAndInspections(), fillEquipment(), fillCloseout()
function fillTabs_PROJECT_MANAGER(data) { fillProjectInformation(data); fillChangeOrders(data); fillPermitsAndInspections(data); fillEquipment(data); fillEquipmentProposals(data); fillCloseout(data); fillProjectDetails(data); DATA = data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillForm_PROJECT_DATA(data) {\n console.log('PROJECT DATA', data);\n var json = data;\n\n $('#projectData').find('#mcsNumber').val(json.McsNumber);\n\n console.log('WARE ID : ', json.warehouse.id);\n $('#projectData').find('#warehouse').val(json.warehouse.id);\n $('#projectData').find('#class').val(...
[ "0.6579936", "0.63931465", "0.63293475", "0.6233757", "0.59701604", "0.59339565", "0.5905292", "0.59031004", "0.5899987", "0.58470994", "0.5840993", "0.5768046", "0.5765827", "0.57295126", "0.5708971", "0.56747043", "0.56743467", "0.5667762", "0.5645877", "0.56362814", "0.562...
0.61549604
4
This function makes the projectData div visible and the projectManager div invisible INNER FUNCTION CALLS: getProjectEnums_PROJECT_DATA()
function editProjectInfo(source_id) { if (source_id) prepareProjectData(source_id); document.getElementById('projectManager').style.display = 'none'; getProjectEnums_PROJECT_DATA(true); currentDivLocation = 'projectData'; document.getElementById('projectData').style.display = 'inline'; //window.location.hre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideProject() {\n //remove the added dom elements\n img.remove();\n hr.remove();\n p.remove();\n linkContainer.remove();\n\n //change the styles back to the originals\n styles.width = 50 + 'px';\n styles.height = 50 + 'px';\n styles.top = top;\n styles.lef...
[ "0.6643438", "0.62975013", "0.6087286", "0.6075076", "0.6060224", "0.6001425", "0.59574723", "0.5892788", "0.5877382", "0.58658314", "0.5842061", "0.5797365", "0.57831764", "0.57543325", "0.5747487", "0.5747487", "0.57448804", "0.5730637", "0.5724622", "0.57236654", "0.571951...
0.5310759
87
Dynamically updates pricing info section Author: Fardeen yaqub
function updatePricingInfo() { var laborInvoiced = Number(0); var laborToInvoice = Number(0); var laborPercentInvoiced = Number(0); var laborTotal = Number(0); //populates the laborTotal section for (var i = 0; i < DATA.changeOrders.length; i++) { //checks if the CO is a laborTotal CO if ( D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updatePriceFromPricing () {\n this.config.display.amount = this.pricing.totalNow;\n this.config.display.currency = this.pricing.currencyCode;\n }", "function updatePrices() {\n}", "function updatePrice(Id, price) {\n getElement(Id + \"-price\").innerText = price;\n updateTotal();\n}", "function upda...
[ "0.72584903", "0.707951", "0.65903735", "0.6579493", "0.6534459", "0.64650995", "0.64599645", "0.64287764", "0.6382096", "0.6379783", "0.6349119", "0.6284995", "0.62804407", "0.6275205", "0.6209789", "0.61257774", "0.6105874", "0.6096421", "0.6077266", "0.60716194", "0.606395...
0.6939287
2
shows data for financial section Author: Fardeen Yaqub
function financialSection() { //hides unnecessary data $('#projectData').find('#generalInformationTabLink').hide(); $('#projectData').find('#schedulingInformationTabLink').hide(); $('#projectData').find('#tasksInformationTabLink').hide(); $('#projectData').find('#financialInformationTabLink').hide(); $('#pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFactAuthor(currentFact, positionId) {\n var authorName = \"Anonymous\";\n if (currentFact.user.hasOwnProperty('name')) {\n authorName = \"- \" + currentFact.user.name.first + \" \" + currentFact.user.name.last;\n }\n document.getElementById(positionId).innerHTML = authorName;\n}", "functi...
[ "0.6288306", "0.6176123", "0.6152685", "0.60308516", "0.59441274", "0.5903277", "0.5863831", "0.5845629", "0.5818184", "0.5793792", "0.5786063", "0.57601964", "0.575738", "0.57463217", "0.573846", "0.56952226", "0.56646127", "0.56586367", "0.5655485", "0.5642857", "0.5641154"...
0.5516394
34
temp holder goes back to main financial menu Author: Fardeen Yaqub
function goToFinancial() { $('#projectData') .find('.nav-tabs') .find('[data-tab=financialInformation]') .addClass('active'); $('#projectData').find('#generalInformationTabLink').show(); $('#projectData').find('#schedulingInformationTabLink').show(); $('#projectData').find('#tasksInformationTabLink'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mainProcess(){\n\n //2: It will then show the Menu = main_menu()\n //options in the main menu array\n main_menu(['Products ','View Credits ','Refund', 'Top-up']);\n\n //3: The user will select an item = main_menu()\n selection = getuserselection();\n\n //4: It will then go to what ever menu the user...
[ "0.6555519", "0.6201822", "0.6164337", "0.61398184", "0.6112438", "0.61075026", "0.6102629", "0.60822874", "0.6066762", "0.60354465", "0.6025085", "0.5986358", "0.59782976", "0.59671175", "0.59526026", "0.5939378", "0.5868889", "0.5860276", "0.58432263", "0.5819979", "0.58186...
0.56031674
49
hides main financial info Author: Fardeen Yaqub
function hideFinancialInfo() { $('#projectData').find('#returnFinancial').hide(); $('#projectData').find('#pricingInfoTabLink').hide(); $('#projectData').find('#accountsReceivableTabLink').hide(); $('#projectData').find('#accountsPayableTabLink').hide(); $('#projectData').find('#accountsPayableTabLink').hide(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideYearTitles() {\n svg.selectAll('.year').remove();\n svg.selectAll('.safetynum').remove();\n }", "getAuthor() {return \"de/odex\";}", "function hideEmpty() {\n if (contributors.length > 0) {\n return (\n <p className=\"contributors\">Contributors: {contributors.join(\", \")}</...
[ "0.62697077", "0.6213267", "0.6104491", "0.5972287", "0.59690386", "0.58841616", "0.5870859", "0.58620715", "0.58320487", "0.5818581", "0.5816054", "0.57840925", "0.5731518", "0.5694485", "0.5689595", "0.5666733", "0.5658581", "0.5640177", "0.5637071", "0.5622334", "0.5604653...
0.6270905
0
shows main financial info Author: Fardeen Yaqub
function showFinancialInfo() { $('#projectData').find('#returnFinancial').show(); $('#projectData').find('#pricingInfoTabLink').show(); $('#projectData').find('#accountsReceivableTabLink').show(); $('#projectData').find('#accountsPayableTabLink').show(); $('#projectData').find('#aiaCostItemsTabLink').show(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAuthor() {return \"de/odex\";}", "function displayFactAuthor(currentFact, positionId) {\n var authorName = \"Anonymous\";\n if (currentFact.user.hasOwnProperty('name')) {\n authorName = \"- \" + currentFact.user.name.first + \" \" + currentFact.user.name.last;\n }\n document.getElementById(positionId)...
[ "0.6948382", "0.67401195", "0.66972697", "0.6316781", "0.6290702", "0.62889963", "0.6188851", "0.6162135", "0.6148279", "0.60056", "0.59742594", "0.59720206", "0.59710544", "0.59299916", "0.59183294", "0.58867633", "0.5875387", "0.58719546", "0.5855808", "0.585567", "0.583919...
0.54032516
80
This function makes the permitData div visible and projectManager div invisible INNER FUNCTION CALLS: getProjectEnums_PERMIT()
function editPermitsAndInspections() { document.getElementById('projectManager').style.display = 'none'; EDIT_INTENTION = true; getProjectEnums_PERMIT(true); currentDivLocation = 'permitData'; document.getElementById('permitData').style.display = 'inline'; $('#permitData').find('#buildingPermit').addClass(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProjectEnums_PERMIT() {\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'getSpecificObjects',\n permitstage: true,\n //\t\t\t'permitreq' : true,\n inspectionstatus: true,\n },\n success: function (data) {\n console.log(...
[ "0.6947853", "0.6297141", "0.599329", "0.59685946", "0.59494513", "0.5924876", "0.58754456", "0.58754456", "0.5875418", "0.58308", "0.57927185", "0.5789969", "0.57695174", "0.57357657", "0.5719493", "0.57163227", "0.5680688", "0.568062", "0.5650415", "0.5649012", "0.56397724"...
0.71099985
0
This function makes the closeoutData div visible and projectManager div invisible INNER FUNCTION CALLS: getProjectEnums_CLOSEOUT()
function editCloseout(source_id) { if (source_id) prepareCloseout(source_id); document.getElementById('projectManager').style.display = 'none'; EDIT_INTENTION = true; getProjectEnums_CLOSEOUT(true); currentDivLocation = 'closeoutData'; document.getElementById('closeoutData').style.display = 'inline'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProjectEnums_CLOSEOUT(edit) {\n if (PAGETYPE_CLOSEOUT == 'closeout') {\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'get',\n id: projectID,\n },\n success: function (data) {\n PROJECT_DATA = data;\n ...
[ "0.7213001", "0.6686409", "0.66391754", "0.64767927", "0.64159447", "0.6257755", "0.62175304", "0.62086695", "0.6181892", "0.6142362", "0.6129771", "0.6102936", "0.6077012", "0.6063242", "0.605922", "0.60493946", "0.6045196", "0.60434484", "0.6029924", "0.6029924", "0.6010351...
0.6851481
1
This function fills out all of the project information INNER FUNCTION CALLS: none
function fillProjectInformation(data) { console.log('DATZ', data); $('#projectManager').find('#mcsNumber').text(data.McsNumber); $('#projectManager').find('#projectItem').text(data.projectItem.name); $('#projectManager').find('#projectStatus').text(data.status.name); $('#projectManager').find('#projectType')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeProjects() {\n displayProjects();\n}", "function getAllProjects() {\n //get all the projects (up to 500)\n allProjects = new Array();\n var response = UrlFetchApp.fetch('https://api.10000ft.com/api/v1/projects?per_page=500&fields=custom_field_values,tags,phase_count', params);\n\n var j...
[ "0.6632422", "0.659149", "0.65228695", "0.65160954", "0.6458365", "0.63880855", "0.63794386", "0.6330336", "0.6316582", "0.6315457", "0.6287112", "0.62365085", "0.62262106", "0.61752295", "0.61687833", "0.61680704", "0.6152175", "0.61047685", "0.60853046", "0.60795677", "0.60...
0.6824821
0
fillProjectInformation This function fills out the changeOrder table INNER FUNCTION CALLS: none
function fillChangeOrders(data) { clearChangeOrderTable(); console.log('CALLED FILL CO', data); if (data) CHANGE_ORDERS = data.changeOrders; let changeOrders = CHANGE_ORDERS; changeOrders.sort(function (a, b) { if (!a.id) return -1; if (!b.id) return 1; if (a.id < b.id) return -1; else if (a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDropdownInfo_CHANGE_ORDER() {\n if (projectID === null) {\n alert('Invalid URL. Try returning to this page again.');\n return;\n }\n\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'getSpecificObjects',\n changeordertype: true,\n ...
[ "0.606996", "0.6025416", "0.59247667", "0.588189", "0.58331764", "0.57016826", "0.56947887", "0.56511396", "0.55853075", "0.55559075", "0.55318254", "0.5446399", "0.5434149", "0.5431161", "0.5410589", "0.5365428", "0.53435177", "0.53252405", "0.5290337", "0.52717465", "0.5252...
0.59468526
2
This function fills out the information on the page for the permits and inspections INNER FUNCTION CALLS: none
function fillPermitsAndInspections(data) { let tabData = data.permits; console.log('TAB DATA', tabData); // permits $('#projectManager') .find('#buildingPermitRequired') .text(convertRequired(tabData.buildingPermitRequired)); $('#projectManager').find('#buildingPermitDate').text(tabData.building); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillMain() {\n if (formExistsInPage()) {\n console.log(\"Filling in main form\");\n getMainData(function(icrdata) {\n\n ELEMENTS.forEach(function (field) {\n console.log(\"populating \" + field.id);\n\n switch (field.type) {\n ca...
[ "0.6104319", "0.60880744", "0.59578115", "0.586023", "0.5823212", "0.57973665", "0.5767396", "0.576704", "0.5755768", "0.56867564", "0.5632574", "0.56168824", "0.55787414", "0.5528992", "0.548464", "0.54843533", "0.54839575", "0.5469568", "0.54655397", "0.54347277", "0.543008...
0.6145886
0
This function fills out the equipment info WARNING: Unsure if the function really works, never knew how to properly test its functionality
function fillEquipment(data) { $('#equipmentTable').find('tbody').find('tr').remove(); //$('#equipmentTableProposals').find('tbody').find('tr').remove(); let equipmentList = data.projEquipment; console.log('FILLING EQUIPMENT ', equipmentList); if (equipmentList) { equipmentList.sort(function (a, b) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchEquipment() {\n\t\ttry {\n\t\t\tconst res = await getEquipments(farmId);\n\t\t\tfor (var i in res) {\n\t\t\t\ttry {\n\t\t\t\tconst eq_info = await getEquipmentInfo(res[i].id);\n\t\t\t\tif (eq_info) {\n\t\t\t\t\tif (eq_info.fieldId) {\n\t\t\t\t\t\tconst field_id = eq_info.fieldId;\n\t\t\t\t\t\tc...
[ "0.62859917", "0.6250806", "0.6117498", "0.5982445", "0.59334993", "0.5922497", "0.58685315", "0.58064926", "0.57748705", "0.57411337", "0.57241845", "0.5706646", "0.56429034", "0.5619074", "0.56049573", "0.5560773", "0.554962", "0.55353814", "0.5521655", "0.5518028", "0.5516...
0.60305023
3
This function fills out the equipment info in Proposals Tab
function fillEquipmentProposals(data) { $('#equipmentTableProposals').find('tbody').find('tr').remove(); let equipmentList = data.projEquipment; if (equipmentList) { equipmentList.sort(function (a, b) { if (a.equipmentName && b.equipmentName) { if (a.equipmentName < b.equipmentName) return -1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillEquipment(data) {\n $('#equipmentTable').find('tbody').find('tr').remove();\n //$('#equipmentTableProposals').find('tbody').find('tr').remove();\n\n let equipmentList = data.projEquipment;\n console.log('FILLING EQUIPMENT ', equipmentList);\n\n if (equipmentList) {\n equipmentList.sort(functio...
[ "0.6571768", "0.58635134", "0.56288785", "0.55662996", "0.5507756", "0.54864186", "0.54571617", "0.5431017", "0.54018337", "0.53890955", "0.53829294", "0.53634316", "0.5344736", "0.5325641", "0.532287", "0.5316191", "0.5310254", "0.53075105", "0.52983594", "0.5284583", "0.526...
0.7378803
0
This function fills out the closeout info
function fillCloseout(data) { let closeoutData = data.closeoutDetails; $('#closeoutSummary') .find('#mg2Completion') .html(closeoutStatusConverter(closeoutData.substantialCompletionStatus)); $('#closeoutSummary') .find('#punchList') .html(closeoutStatusConverter(closeoutData.punchListStatus)); $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeOtherInfo() {\n if (infoObj.length > 0) {\n infoObj[0].set(\"marker\", null);\n infoObj[0].close();\n infoObj[0].length = 0;\n }\n }", "function closeOtherInfo() {\n if (infoObj.length > 0) {\n infoObj[0].set(\"marker\", null);\n infoObj[0].close();\n infoObj...
[ "0.6829905", "0.6829905", "0.6829905", "0.6829905", "0.60496455", "0.60181725", "0.5992146", "0.5900633", "0.58933586", "0.5891529", "0.58760405", "0.5835413", "0.5800835", "0.579951", "0.5793362", "0.57796514", "0.5772994", "0.5748386", "0.5666528", "0.56411606", "0.56159115...
0.5982112
7
This function converts the closeoutStatus from a number to a string
function closeoutStatusConverter(param) { if (param == 1) return 'Complete'; else if (param == 2) return 'Incomplete'; else if (param == 3) return 'N/A'; else if (param == 4) return 'Required'; else if (param == 6) return 'TBD'; else return '---'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeStatus(output, totalCashInDrawer) {\n output.status = STATUS.close;\n output.change = totalCashInDrawer;\n return output;\n}", "function getRideStatusName\n(\n status\n)\n{\n var statusName='';\n\n switch(status)\n {\n case '0':\n statusName = 'New';\n ...
[ "0.6024604", "0.59590995", "0.5913604", "0.5767204", "0.57051736", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", "0.5669379", ...
0.71146935
0
This function converts the permit from a number to a string
function convertPermit(param) { if (param == '1') return 'Preparing'; else if (param == '2') return 'Submitted'; else if (param == '3') return 'Issued'; else if (param == '4') return 'Closed'; else return '---'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numberToString(num) {\nreturn String(num)\n}", "function changeNumToStr(num){\n return num.toString()\n}", "function numberToString(num) {\n return num.toString();\n }", "function myString (num) {\nreturn num.toString();\n}", "function numberToString(num) {\n return num.toString()\n}", "fun...
[ "0.72086626", "0.7190209", "0.70214874", "0.6984159", "0.6945084", "0.6945084", "0.68760836", "0.68212646", "0.6817864", "0.67870224", "0.67594856", "0.67360264", "0.67246807", "0.67025584", "0.6674727", "0.6668393", "0.6606353", "0.6599816", "0.65931714", "0.6586113", "0.657...
0.6283192
42
This function converts the changeOrder type from a number to a string
function parseChangeOrderType(param) { switch (param) { case '1': return 'COP'; case '2': return 'REF'; case '3': return 'WHS'; case '4': return 'FAC'; case '5': return 'VEN'; case '6': default: return 'UDF'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_CHANGE_ORDER(param) {\n switch (param) {\n case '1':\n return 'COP';\n case '2':\n return 'REF';\n case '3':\n return 'WHS';\n case '4':\n return 'FAC';\n case '5':\n return 'VEN';\n case '6':\n default:\n return 'UDF';\n }\n}", "function chan...
[ "0.68392575", "0.6820404", "0.59847957", "0.5932186", "0.5792267", "0.57812196", "0.5765974", "0.57304335", "0.5693132", "0.56693465", "0.56596273", "0.5659007", "0.5643439", "0.5640347", "0.56361085", "0.56252396", "0.5623777", "0.56010586", "0.55999255", "0.5588305", "0.558...
0.6972341
0
This function converts the changeOrder status from a number to a string
function parseChangeOrderStatus(param) { switch (param) { case '1': return 'Preparing'; case '2': return 'Submitted'; case '3': return 'Approved'; case '4': return 'Rejected'; case '5': return 'Complete'; case '6': return 'Review'; default: return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_CHANGE_ORDER(param) {\n switch (param) {\n case '1':\n return 'COP';\n case '2':\n return 'REF';\n case '3':\n return 'WHS';\n case '4':\n return 'FAC';\n case '5':\n return 'VEN';\n case '6':\n default:\n return 'UDF';\n }\n}", "function chan...
[ "0.6302056", "0.6071707", "0.6041908", "0.5980203", "0.5864507", "0.5744393", "0.5739791", "0.5738019", "0.5674867", "0.5604413", "0.5588281", "0.55460453", "0.5538098", "0.5536005", "0.54836005", "0.5480778", "0.54754406", "0.54748535", "0.54748535", "0.54748535", "0.5474853...
0.69181514
0
This function warns the user that they are about to permanently delete a project and then deletes it after receiving confirmation
function permissionCheck() { console.log('is it working?'); var tasksExist = tasks.length; let user; $.ajax({ type: 'POST', url: 'Project', data: { domain: 'project', action: 'getUserInfo', }, success: function (data) { user = data; console.log(user); console.lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteProjectConfirm(project) {\n actions.showDialog({name: 'deleteProjectConfirm', project: project});\n }", "function deleteProject() {\n if (window.confirm(\"Are you sure you want to delete this project?\")) {\n const { id, email, password } = user\n service.deleteProject(id, email, pas...
[ "0.7842569", "0.783847", "0.7536715", "0.74986637", "0.73810923", "0.68339217", "0.6827462", "0.67833614", "0.67650545", "0.6724443", "0.6691698", "0.6660087", "0.6594167", "0.65388167", "0.6508248", "0.6508248", "0.648574", "0.64681554", "0.64429194", "0.64181596", "0.641619...
0.0
-1
This function takes the user to the task form to create a task
function goToTaskForm() { window.location.href = TASK_CREATOR + '?id=' + projectID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static newTaskSubmit() {\n const newTaskData = document.querySelector('#newTaskData').elements;\n const name = newTaskData[0].value;\n const dueDate = newTaskData[2].value;\n const priority = () => {\n const radioHigh = document.querySelector('#radioTaskHigh')\n co...
[ "0.7781488", "0.77785474", "0.77760935", "0.77691144", "0.7656996", "0.7578895", "0.7556774", "0.75233614", "0.74754703", "0.7468654", "0.7433328", "0.74029535", "0.7397914", "0.7312167", "0.73078567", "0.730339", "0.729582", "0.72897017", "0.7270477", "0.7201955", "0.7189894...
0.69158596
45
This function fills the task table with the given tasks INNER FUNCTION CALLS: none
function fillTasksTable(tasks) { let selector = $('#taskSelector2').val(); console.log(selector); clearTaskTable(); let count = 0; for (var i = 0; i < tasks.length; i++) { if ( (selector === 'open' && tasks[i].status.id != 1) || (selector === 'complete' && tasks[i].status.id != 2) || (se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTableTasks() {\r\n if (!onClosedTab) {\r\n if (columnIndex(CLOSE) == -1) appendColumn(CLOSE, null, CLOSEBUTTON_WIDTH + 2);\r\n //taskQueue.schedule(new FetchReasonListTask());\r\n\r\n // Initialize arrays and create Close buttons\r\n for (var i = 2; i < matchTable.rows.length; i++) {\r\n ...
[ "0.63642573", "0.6216013", "0.60502183", "0.59637195", "0.59150594", "0.5883755", "0.5734164", "0.56548274", "0.56421506", "0.563907", "0.56115955", "0.55885005", "0.5554577", "0.55496174", "0.5512816", "0.54954076", "0.54768074", "0.5470974", "0.5447835", "0.5434443", "0.542...
0.64947337
0
js for cost comparison
function setCostCompTitle() { console.log(PROJECT_DATA); $('#permitNotes2').val(PROJECT_DATA.permits.permitNotes); $('#inspectionNotes2').val(PROJECT_DATA.permits.inspectionNotes); if ( PROJECT_DATA.warehouse.state && (PROJECT_DATA.warehouse.state == 'UNKNOWN' || PROJECT_DATA.warehouse.state == 'U...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function costDiff(costA, costB) {\n return (260/12) * (Math.abs(costA - costB));\n }", "calcDiff(otherGene) {\n var val = 0;\n for (var i = 0; i < this.code.length; i++) {\n val += (this.code.charCodeAt(i) - otherGene.charCodeAt(i)) * (this.code.charCodeAt(i) - otherGene.charCodeAt(i));\n...
[ "0.66640157", "0.66517365", "0.64331025", "0.63925755", "0.6388081", "0.6381131", "0.6376531", "0.6351169", "0.6282824", "0.6233683", "0.62126863", "0.6206621", "0.62004524", "0.6195913", "0.61872107", "0.6150829", "0.61222297", "0.61095846", "0.61050785", "0.6098398", "0.609...
0.0
-1
javascript for Scorecard tab
function editScorecard(source_id) { document.getElementById('projectManager').style.display = 'none'; currentDivLocation = 'scorecardUpperDiv'; setProjectHeader(PROJECT_DATA, 'scorecardUpperDiv'); document.getElementById('scorecardData').style.display = 'inline'; document.getElementById('scorecardUpperDiv').s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scoreCard(){\n showVariables();\n $(\"#score\").html(\"Your total score is : \"+score);\n $(\"#corrAns\").html(\"Number of correct answers : \"+correctAnswers);\n\n }", "function showScoreCard() {\n clearPrompt();\n $(\"#points\").text(\"\");\n $(\"#score\").tex...
[ "0.69089276", "0.6709148", "0.6615951", "0.6582512", "0.6449882", "0.6377662", "0.6322383", "0.63038003", "0.6290553", "0.6288382", "0.62802386", "0.62691987", "0.62440675", "0.62370616", "0.6234154", "0.6207005", "0.6186479", "0.6176435", "0.61582065", "0.61564225", "0.61562...
0.0
-1
This function clears and adds a single row to the task table Displays a message after cleaning the table INNER FUNCTION CALLS: none
function clearAndAddSingleRowTask(msg) { $('#taskTable > tbody').children('tr:not(.head)').remove(); let placeHolder = document.createElement('tr'); let listDetails0 = document.createElement('td'); let listDetails1 = document.createElement('td'); let listDetails2 = document.createElement('td'); let listDet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask(event) {\n event.preventDefault();\n\n let work = document.getElementById(\"work\").value;\n let time = document.getElementById(\"time\").value;\n\n var table = document.getElementById(\"table\");\n\n var row = table.insertRow(1);\n var cell0 = row.insertCell(0);\n var cell1 =...
[ "0.728725", "0.71726584", "0.71279675", "0.7098944", "0.7017252", "0.69966364", "0.6991701", "0.69241124", "0.6794998", "0.67798674", "0.66625804", "0.66396904", "0.6573939", "0.65309376", "0.651405", "0.6509554", "0.64777845", "0.6434694", "0.6419795", "0.6416518", "0.640693...
0.78221273
0
This function clears the task table INNER FUNCTION CALLS: none
function clearTaskTable() { $('#taskDisplay').find('#taskTable').find('tr:not(.head)').remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTaskTable () {\n\t$('#taskTable > tbody').children('tr:not(.head)').remove();\n}", "function clearTasks() {\n\t\t\tlongTasks = [];\n\n\t\t\tlongTasksTime = 0;\n\t\t}", "function clearTasks() {\r\n //CLEAR TASKS FROM THE DOM\r\n while (taskList.firstChild) {\r\n taskList.removeChild(t...
[ "0.6606039", "0.6597054", "0.6583771", "0.65339243", "0.6468314", "0.6451487", "0.64290416", "0.64044774", "0.6403032", "0.6379843", "0.6353734", "0.6325477", "0.6306272", "0.61274046", "0.6087487", "0.6082416", "0.60677993", "0.60567933", "0.6054889", "0.60548586", "0.605415...
0.66220605
0
This function clears the change order table INNER FUNCTION CALLS: none
function clearChangeOrderTable() { $('#changeOrderTable > tbody').find('tr').remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearOrderDataTable()\n{\n RMPApplication.debug(\"begin clearOrderDataTable\");\n $('#id_tab_wm_order').DataTable().clear();\n $('#id_tab_wm_order').DataTable().draw();\n RMPApplication.debug(\"end clearOrderDataTable\");\n}", "function reset () {\n\ttable.empty() ;\n}", "function clear() ...
[ "0.65224206", "0.63089186", "0.6209526", "0.617966", "0.61727726", "0.61129946", "0.6075489", "0.60613084", "0.60319453", "0.6025463", "0.60188246", "0.60076976", "0.60076976", "0.60076976", "0.60076976", "0.60076976", "0.60076976", "0.59910464", "0.5919422", "0.5898324", "0....
0.6580241
0
This function retrieves all of the projects from the database as well as sets initial display INNER FUNCTION CALLS: clearAndAddSingleRow(), getSearchCriteria(), filterProjects()
function getAllProjects() { if (getParameterByName('from')) $('.projectNavigator-projectFinder').hide(); clearAndAddSingleRow('Retrieving Projects...'); if (getParameterByName('type') === 'findTaskProject') { $('#param-field').before('<h3>Select a Project to Create Task for:</h3>'); taskFinder = true; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getExistingProjects(startRow) {\n toggleResultTable(false);\n toggleSearchingIndicator(true);\n clearTable();\n receivedProjects = 0;\n for (var i = startRow; i < currentPage * elementsPerPage; i++) {\n //end is reached\n if (typeof projects[i] == \"undefined\") {\n break;\n } else {\n ...
[ "0.7229985", "0.7108006", "0.70688385", "0.69704336", "0.68891215", "0.68706924", "0.68627834", "0.6813886", "0.6810782", "0.6803948", "0.673525", "0.6710402", "0.6661593", "0.66567177", "0.663291", "0.66216934", "0.6614755", "0.66090536", "0.65361816", "0.65065783", "0.64965...
0.7159226
1
This function updates the front end project display INNER FUNCTION CALLS: clearAndAddSingleRow(), filterProjects()
function updateFrontEnd() { let from = getParameterByName('from'); if (from == 'projectData') getTheProjects(); else { clearAndAddSingleRow('Retrieving Projects...'); if (getParameterByName('type') === 'findTaskProject') { $('#param-field').before('<h3>Select a Project to Create Task for:</h3>'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeProjects() {\n displayProjects();\n}", "function updateDisplayableProjects() {\n if (!RETRIEVED_PROJECTS) {\n console.log('Should have projects by now!');\n return;\n }\n refreshProjects();\n\n DISPLAYABLE_PROJECTS = new Array();\n\n var stagesOfInterest = new Array();\n $('.sta...
[ "0.68767613", "0.68414617", "0.68160665", "0.6801557", "0.67902464", "0.67220455", "0.66743803", "0.65842074", "0.6528912", "0.65131205", "0.6512942", "0.64965355", "0.6486091", "0.6448924", "0.6433825", "0.64178663", "0.64063483", "0.63876855", "0.6358814", "0.63474476", "0....
0.7261313
0
This function updates all of the displayable projects based off the selected stages INNER FUNCTION CALLS: none
function updateDisplayableProjects() { if (!RETRIEVED_PROJECTS) { console.log('Should have projects by now!'); return; } refreshProjects(); DISPLAYABLE_PROJECTS = new Array(); var stagesOfInterest = new Array(); $('.stage').each(function (i, obj) { if (obj.checked == true) stagesOfInterest.pus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeProjects() {\n displayProjects();\n}", "function updateProjectStatus() {\n projects.forEach(el => {\n if (el.status === 'in progress')\n el.status = 'complete';\n });\n}", "function updateProjectDisplay(data) {\n console.log('THE UPDATE DATA = ', data);\n\n conve...
[ "0.6611946", "0.64398533", "0.639471", "0.63695914", "0.636339", "0.63525975", "0.62498903", "0.6246567", "0.62169546", "0.62151134", "0.6180377", "0.6149377", "0.61296284", "0.61267436", "0.6123329", "0.61209786", "0.6028142", "0.60143983", "0.6013888", "0.59917325", "0.5991...
0.7770774
0