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
Write examples of all the fonts to console
function showAll (text) { asciify.getFonts(function (err, fonts) { if (err) { return console.error(err); } var padSize = ('' + fonts.length).length; fonts.forEach(function(font, index) { var opts = { font: font, color: argv.color }; asciify(exampleText, opts, function (err, result) { con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listFonts () {\n\n\tasciify.getFonts(function (err, fonts) {\n\t\tif (err) { return console.error(err); }\n\n\t\tvar padSize = ('' + fonts.length).length;\n\n\t\tfonts.forEach(function (font, index) {\n\t\t\tconsole.log(pad(padSize, index+1, '0') + ': ' + font);\n\t\t});\n\t});\n}", "function fonts(cb) ...
[ "0.68187654", "0.638602", "0.5888868", "0.5866639", "0.58145434", "0.5797385", "0.5756701", "0.57539225", "0.5693272", "0.56023425", "0.55444175", "0.54966766", "0.5493995", "0.5487679", "0.54576886", "0.54560536", "0.54505223", "0.5408863", "0.5402523", "0.5392015", "0.53669...
0.6774358
1
Function to submit the new comment form
function addComment(event){ event.preventDefault(); let commentData ={ c_content: this.elements['c_content'].value, c_author: Auth.getUser(), c_post: Model.getPost(this.dataset.id) } Model.addComment(commentData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitComment() {\n var id = \"comment\";\n var commentText = getValueById(id);\n disableFieldById(id);\n var callback = function(response) {\n resetFieldById(id);\n updateComments(response);\n };\n var params = buildCommentParamsForPost(commentText);\n ajaxHandleRespons...
[ "0.7888377", "0.7785239", "0.77180445", "0.76531845", "0.7597335", "0.7382302", "0.7349144", "0.73389566", "0.724076", "0.7239504", "0.7228025", "0.7226964", "0.7107598", "0.7088479", "0.7044001", "0.70259774", "0.70160455", "0.69854", "0.6953784", "0.69208604", "0.6918673", ...
0.6497431
49
Main function to draw and set up the visualization, once we have the data.
function createVisualization(json) { // Basic setup of page elements. initializeBreadcrumbTrail(); drawLegend(); d3.select("#togglelegend").on("click", toggleLegend); // Bounding circle underneath the sunburst, to make it easier to detect // when the mouse leaves the parent g. vis.append("svg:circle") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function makeVisualization(){\n {\n console.log(\"loading local data\");\n data = await getData('dataSelection.json');\n }\n console.log({ data });\n \n setupScales();\n setupAxes(group);\n drawBars(group);\n setupInput();\n }", "function drawVisu...
[ "0.75986487", "0.7109804", "0.70620495", "0.70358115", "0.7035261", "0.70205706", "0.70154977", "0.6985418", "0.69848764", "0.6943313", "0.6880603", "0.68083197", "0.68079954", "0.6793471", "0.6770307", "0.6743557", "0.6737102", "0.670131", "0.66928375", "0.66716325", "0.6650...
0.0
-1
Fade all but the current sequence, and show it in the breadcrumb trail.
function mouseover(d) { var percentage = (100 * d.value / totalSize).toPrecision(3); var percentageString = percentage + "%"; if (percentage < 0.1) { percentageString = "< 0.1%"; } d3.select("#percentage") .text(percentageString); d3.select("#explanation") .style("visibility", ""); var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fadeIn(config, $previous, $targets) {\n // Clear previous active class + styles touched by tram\n // We cannot remove the whole inline style because it could be dynamically bound\n $previous.removeClass(tabActive).css({\n opacity: '',\n transition: '',\n ...
[ "0.5835933", "0.5644747", "0.56027085", "0.5581989", "0.552389", "0.5522895", "0.5458817", "0.542649", "0.5417551", "0.53699005", "0.5362727", "0.5361431", "0.5331247", "0.5320483", "0.53136295", "0.53136086", "0.5297041", "0.527579", "0.5220569", "0.5220565", "0.5202862", ...
0.0
-1
Restore everything to full opacity when moving off the visualization.
function mouseleave(d) { // Hide the breadcrumb trail d3.select("#trail") .style("visibility", "hidden"); // Deactivate all segments during transition. d3.selectAll("path").on("mouseover", null); // Transition each segment to full opacity and then reactivate it. d3.selectAll("path") .transiti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.alpha = 0;\n this.y = 0;\n }", "function changeOpacity() {\n heatmap.set(\"opacity\", heatmap.get(\"opacity\") ? null : 0.2);\n }", "function opacityUp() {\n for (let ii = 0; ii < props.activeLayers.length; ii++) {\n let ind = props.activeLayers[ii];\n ...
[ "0.6916777", "0.6858069", "0.6770393", "0.6730349", "0.66382015", "0.6624713", "0.6615948", "0.6584663", "0.65811986", "0.6551229", "0.6513192", "0.64832026", "0.6400679", "0.637652", "0.637652", "0.6355269", "0.6339875", "0.631377", "0.629427", "0.62934625", "0.6276164", "...
0.0
-1
Generate a string that describes the points of a breadcrumb polygon.
function breadcrumbPoints(d, i) { var points = []; points.push("0,0"); points.push(b.w + ",0"); points.push(b.w + b.t + "," + (b.h / 2)); points.push(b.w + "," + b.h); points.push("0," + b.h); if (i > 0) { // Leftmost breadcrumb; don't include 6th vertex. points.push(b.t + "," + (b.h / 2)); } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function breadcrumbPoints(d, i) {\r\n var points = [];\r\n points.push(\"0,0\");\r\n if (b.w <= 0) {\r\n // calculate breadcrumb width based on string length\r\n points.push(d.string_length + \",0\");\r\n points.push(d.string_length + b.t + \",\" + (b.h / 2));\r\n ...
[ "0.7508625", "0.7496226", "0.7268039", "0.7244852", "0.72284234", "0.7202926", "0.71885484", "0.7159244", "0.7126875", "0.709076", "0.7055904", "0.70478076", "0.70160043", "0.68495303", "0.6755773", "0.6524368", "0.63802934", "0.5969802", "0.5944424", "0.5928913", "0.5868209"...
0.710516
10
Update the breadcrumb trail to show the current sequence and percentage.
function updateBreadcrumbs(nodeArray, percentageString) { // Data join; key function combines name and depth (= position in sequence). var trail = d3.select("#trail") .selectAll("g") .data(nodeArray, function(d) { return d.data.name + d.depth; }); // Remove exiting nodes. trail.exit().remove(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBreadcrumbs(sequence, value, percentage) {\n var that = this;\n var b = this.opt.breadcrumbs;\n //console.log(that);\n // Data join; key function combines name and depth (= position in sequence).\n var trail = d3.select(\"#trail\")\n .selectAll(\"g\")\n ...
[ "0.69616073", "0.67518896", "0.6415356", "0.6398336", "0.6335161", "0.63248163", "0.6314927", "0.62914693", "0.626593", "0.621405", "0.61563665", "0.61421585", "0.61376923", "0.6094739", "0.60195625", "0.5940964", "0.59382075", "0.5873695", "0.586862", "0.5821706", "0.5799344...
0.6269476
8
Take a 2column CSV and transform it into a hierarchical structure suitable for a partition layout. The first column is a sequence of step names, from root to leaf, separated by hyphens. The second column is a count of how often that sequence occurred.
function buildHierarchy(csv) { var root = {"name": "root", "children": []}; for (var i = 0; i < csv.length; i++) { var sequence = csv[i][0]; var size = +csv[i][1]; if (isNaN(size)) { // e.g. if this is a header row continue; } var parts = sequence.split("-"); var currentNode = root; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildHierarchy(csv) {\n var root = {\"name\": \"root\", \"children\": []};\n var count = 0;\n for (var i = 0; i < csv.length; i++) {\n try {\n var sequence = csv[i][0];\n var size = +csv[i][1];\n if (isNaN(size)) { // e.g. if this is a heade...
[ "0.69260067", "0.6481844", "0.64235336", "0.636193", "0.6356439", "0.63528097", "0.63489795", "0.6156806", "0.5966926", "0.54853845", "0.5008062", "0.49356794", "0.48742747", "0.48625112", "0.48314276", "0.48176584", "0.47566494", "0.4748009", "0.46512502", "0.456501", "0.456...
0.64690375
2
Replace underscores with answer and reset choices
answered(root, isUser = false) { if (isUser || !this.state.autohintingPaused && (root !== undefined)) { const updatedAnswerParts = this.fillIn(root); const solvedRoots = this.state.solvedRoots.concat([root.toLowerCase()]); this.setState({ answerParts: updatedAnswerParts, autohintin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseSolution(){\n\t\tvar choice = Math.floor(Math.random() * wordList.length);\n\t\tsolution = wordList[choice].toLowerCase();\n\t\tsolution = solution.split(\"\");\n\t\tsolutionDisplay=[];\n\t\tfor (var i = 0; i < solution.length; i++) {\n\t\t\tsolutionDisplay.push(\"_\");\n\t\t}\n\t}", "function res...
[ "0.6386277", "0.627673", "0.61543065", "0.6084246", "0.6079077", "0.6040663", "0.603598", "0.6027314", "0.5999531", "0.597429", "0.5945652", "0.5882538", "0.5868245", "0.5856779", "0.57972497", "0.5784572", "0.5782554", "0.57776624", "0.5749242", "0.57344586", "0.5732477", ...
0.0
-1
Check if all roots have been solved, fill in remaining components, and advance to next question
checkSolution() { if (this.state.solvedRoots.length === this.state.wordRoots.length) { const solution = this.fillIn(null, true) this.setState({ answerParts: solution }); setTimeout(() => this.props.nextQuestion(this.state.autohintOn), 1500); } else { this.setState({choices: this.randomCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fillIn(root, solveAll) {\n return _.map(this.state.answerParts, (part) => {\n if (solveAll || part.valueSolved === root.toLowerCase()) { part.valueUnsolved = part.valueSolved };\n return part;\n });\n }", "solve(){\r\n\t\tif (this.solutionCount >= this.maxSolutions){\r\n\t\t\treturn;\r\n\t\t}\r\...
[ "0.68799996", "0.6489166", "0.6262617", "0.62526965", "0.6206691", "0.6077491", "0.5988894", "0.58992743", "0.58566487", "0.5849521", "0.5839041", "0.5812676", "0.57455593", "0.5742218", "0.5725517", "0.5685545", "0.56766915", "0.5673336", "0.56109524", "0.5583403", "0.558237...
0.6358553
2
Fill in nonroot components
fillIn(root, solveAll) { return _.map(this.state.answerParts, (part) => { if (solveAll || part.valueSolved === root.toLowerCase()) { part.valueUnsolved = part.valueSolved }; return part; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_fillCmpNoedit() {\n const comp = new Component(this);\n comp._index = 0;\n\n const residues = this._residues;\n const resCount = residues.length;\n if (resCount === 0) {\n return;\n }\n\n const currSubDivs = [];\n let currStart = 0;\n for (let i = 0; i < resCount; ++i) {\n con...
[ "0.62108815", "0.58060336", "0.57099515", "0.56549805", "0.56515664", "0.5571322", "0.55660146", "0.5564142", "0.5564142", "0.5564142", "0.55287457", "0.55287457", "0.55287457", "0.55287457", "0.552058", "0.5475587", "0.54582614", "0.54200685", "0.541754", "0.5384058", "0.535...
0.510265
56
Get random red herrings roots and mix them with the roots of the word to display n possible options
randomChoices(wordParts, roots) { let wordRoots = _.filter(wordParts, (c) => c.type === 'root' && c.valueUnsolved.includes('_')) wordRoots = _.map(wordRoots, (root) => ({ 'value': root.valueSolved, 'definition': root.definition, 'isAnswer': 'true' })); let choices = _.nRandom(_.toArray(roots), this.state.ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeText(numWords = 100) {\n let chains = this.makeChains(); // MM object\n \n // first word to start chaining\n let key_words = Object.keys(chains); // array of key-words in MM object to choose from\n let key_num = key_words.length; // number of words to choose from\n let key_ind = Math.floor(Ma...
[ "0.6214368", "0.6063824", "0.6059455", "0.6050696", "0.6041775", "0.6006292", "0.6001649", "0.5961085", "0.5952532", "0.5944608", "0.5924603", "0.5910431", "0.5867985", "0.58559555", "0.58529425", "0.5834867", "0.5786931", "0.5786193", "0.5774761", "0.5763499", "0.5757616", ...
0.67645144
0
gets trail to follow where mouse is
function follow(event) { trail[count%10].style.left = (event.pageX - 4) + "px"; trail[count%10].style.top = (event.pageY - 4) + "px"; count++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n // Make sure the mouse position is set everytime\n // draw() is called.\n var x = mouse.x,\n y = mouse.y,\n a = nn.a,\n b = nn.b;\n \n // \n trailDots.forEach(function(dot, index, dots) {\n var nextDot = dots[index + 1] || dots[0];\n \n dot.x = x;\n dot.y = y;...
[ "0.6623059", "0.6256627", "0.61688584", "0.6162687", "0.6136588", "0.6136588", "0.6106844", "0.60663706", "0.603016", "0.59770775", "0.59696585", "0.5961057", "0.5933689", "0.5903817", "0.58774084", "0.5858013", "0.58573806", "0.58380884", "0.5827353", "0.58161414", "0.581068...
0.73703915
0
gets trail to catch up when mouse stops
function catchUp(event) { var i = 0; clearInterval(timer); timer = setInterval(function() { if (i >= 10) { clearInterval(timer); } trail[count%10].style.left = (event.pageX - 4) + "px"; trail[count%10].style.top = (event.pageY - 4) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_stop_mouse_track() {\n\t\t\tif (this.track_id) {\n\t\t\t\tthis.track_id = clearInterval(this.track_id);\n\t\t\t}\n\t\t\tthis.add_info('movement', this.current_mouse_movement, 'shape');\n\t\t}", "function mouseReleased() {\n stamped =false;\n}", "function mouseReleased () {\n noLoop();\n}", "function mouse...
[ "0.69502985", "0.6558655", "0.65094835", "0.6478189", "0.6477866", "0.6458269", "0.64239883", "0.6349911", "0.6340094", "0.63370156", "0.63217205", "0.63098055", "0.62825036", "0.62748396", "0.62323934", "0.62156135", "0.620627", "0.6204919", "0.62033325", "0.62033325", "0.62...
0.69081503
1
ratios are in regard to the us dollar
function updateCur1Update(){ cur1Amnt= document.getElementById("cur1_amount").value; cur1Type = document.getElementById("cur1_type").value; cur2Type = document.getElementById("cur2_type").value; var index1 = currList.indexOf(cur1Type); var index2 = currList.indexOf(cur2Type); var amnt = ((rati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gratuity(bill) {\n return bill * .20;\n}", "get currentPercentageRate() {\n let percentageRate = 0;\n [...Array(TicketKiosk.seatsTaken).keys()].forEach(seat => {\n percentageRate += ((seat <= 4 ? 3 : 5) / 100) * TicketKiosk.baseTicketPrice;\n });\n return percen...
[ "0.6784583", "0.66066", "0.652864", "0.6492409", "0.64895326", "0.64779294", "0.6469098", "0.6462761", "0.642982", "0.64125806", "0.64063346", "0.6379253", "0.6366426", "0.6366416", "0.6350915", "0.63367885", "0.6314814", "0.63092667", "0.6281975", "0.62781274", "0.6263307", ...
0.0
-1
//////////// WFM Options /////////////////////
function initWfmOptions(){ $("#wfmOptions").show(); /** * Agent Check */ function startAgentMonitoring(){ wfm_req("startAgentMonitoring", null, function(response){ showResponse( "wfm_input_ifAgentCheck", response ); }); } function stopAgentMonitoring(){ wfm_req(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Options() {\n\t\tchrome.runtime.sendMessage({\n\t\t\ttype: 'OPEN_OPTIONS'\n\t\t});\n\t}", "get options() {}", "function w_options (wOo) {\n\treturn (typeof wOo === 'string') ? {\n\t\tw: wOo || this.word || this.input || '',\n\t\toptions: {}\n\t} : {\n\t\tw: this.word || this.input || '',\n\t\toptions:...
[ "0.6493614", "0.6375284", "0.6356264", "0.6294037", "0.62434876", "0.62434876", "0.6226594", "0.6223635", "0.6223635", "0.61327267", "0.6130398", "0.6036077", "0.6006456", "0.6006456", "0.5960391", "0.5933529", "0.58952624", "0.58769083", "0.58615315", "0.5857162", "0.5857162...
0.61241627
11
Copied pattern from MDN, This function sanatizes and clones the state object that comes from the metal component. Sanitization is necessary before we can do message passing.
function cloneObj(objectToBeCloned, visited = new Set()) { if (!(objectToBeCloned instanceof Object)) { return objectToBeCloned; } let objectClone; try { if (objectToBeCloned && objectToBeCloned[ITERABLE_KEY]) { objectToBeCloned = objectToBeCloned.toJS(); } const Constructor = objectToB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeState() {\n const attrs = this.state.attributes;\n attrs.x = 0;\n attrs.y = 0;\n }", "applyState(state) {\n const me = this;\n me.beginBatch();\n\n if ('locked' in state) {\n me.locked = state.locked;\n }\n\n if ('minWidth' in state) {\n me.minWidth = st...
[ "0.6124759", "0.57275933", "0.56990856", "0.56926686", "0.5662724", "0.5585343", "0.55745834", "0.55051565", "0.5490954", "0.54680383", "0.54675734", "0.54675734", "0.54620355", "0.5431983", "0.54094213", "0.53941655", "0.5349134", "0.5344846", "0.53265876", "0.53182393", "0....
0.0
-1
to be created. only run once at the very start of the cog task
function Init() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Init()\n{\n\t// initiate counters\n\ttrialNum = 0;\n\n\t// timing params\n\ttrial_timeout = 6000;\n\t\n\t// init params\n\tresponse_time = -2;\n\tcurrent_time = -2;\n \n drag_stream = [];\n\n\t// global cogtask variables\n\tSetName(GetName());\n\n\t// turn bloat on/off for dev\n\tbloat = 999;\n\tbloat_cal...
[ "0.65444463", "0.6144348", "0.6133242", "0.61234504", "0.61189455", "0.6074083", "0.6074083", "0.6074083", "0.6074083", "0.6074083", "0.6074083", "0.6074083", "0.6071895", "0.6071895", "0.6071895", "0.6071895", "0.6071895", "0.60217094", "0.6016317", "0.60117453", "0.60117453...
0.0
-1
run at the start of each trial
function Start() { color = new GColor(0,0,1); trigger = CreateTrigger(1000); //entity = new Entity(image, 100, 100); phase = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup_nextTrial(){\n // increment tp.itrial and setup the next trial\n tp.itrial += 1;\n console.log('itrial ' + tp.itrial.toString());\n setup_trial(tp.itrial, EP, QUEUES, STYLE.choiceSet);\n }", "firstRun() { }", "function runStart()/* : void*/\n {\n th...
[ "0.7154802", "0.71215504", "0.70717025", "0.695528", "0.68229765", "0.6813133", "0.6813133", "0.6811848", "0.6806317", "0.6806317", "0.6796719", "0.67870927", "0.67870927", "0.67870927", "0.67870927", "0.67632943", "0.6738489", "0.672375", "0.672375", "0.672375", "0.672375", ...
0.0
-1
Returns whether or not the passed in relationship is the "owner" of the relationship. This defaults to true for belongsTo and false for hasMany
isRelationshipOwner(relationship) { var owner = relationship.owner; // TODO: use lack of an inverse to determine this value as well return relationship.kind === 'belongsTo' && owner !== false || relationship.kind === 'hasMany' && owner === true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_isOwner() {\n return this.record && (this.record.userId == this.user.id);\n }", "_isOwner() {\n return this.record && (this.record.userId == this.user.id);\n }", "isOwner() {\n\t\treturn this.owner === Meteor.userId();\n \t}", "inversesAlreadyAssociated(inverse, owner) {\n let inverseKey = thi...
[ "0.67703396", "0.67549163", "0.6647881", "0.6158982", "0.615429", "0.58760184", "0.5599584", "0.54984426", "0.543576", "0.54100883", "0.5388887", "0.5386056", "0.5383923", "0.5323997", "0.5282229", "0.5269805", "0.52515984", "0.52163994", "0.5214126", "0.51703036", "0.5168879...
0.84309566
0
api home route convert form data into url from
function getformBody(params){ let formBody = [] for(let property in params){ let encodedKey = encodeURIComponent(property); let encodedValue = encodeURIComponent(params[property]); formBody.push(encodedKey + '=' + encodedValue); } return formBody.join('&') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function routeForm()\n{\n\tvar port = process.argv[2];\n\tvar express = require('express');\n\tvar app = express();\n\tvar body= require(\"body-parser\");\n\tapp.use(body.urlencoded({extended:false}));\n\t\n\tapp.post('/form',function(req,res){\n\t\tres.send(req.body.str.split('').reverse().join(''));\n\t});\n\ta...
[ "0.601696", "0.57906115", "0.558489", "0.5579624", "0.55573606", "0.54969835", "0.53886145", "0.53825736", "0.5352541", "0.53482777", "0.53405046", "0.5331538", "0.53136086", "0.5292851", "0.5269337", "0.526235", "0.5248768", "0.5246845", "0.5225381", "0.52150154", "0.5198547...
0.0
-1
attack is outside because everytime we use the New keyword the constructor function gets run
attack() { return 'attacks with ' + this.weapon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _beeswarm () {} // constructor ???", "constructur() {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function Class_alloc(){}", "constructor(name){\n console.log(\"Creating a new alien\")\n this.health = 100;\n this.dama...
[ "0.6528696", "0.64366895", "0.6365257", "0.6365257", "0.6365257", "0.6356375", "0.63243127", "0.6319899", "0.62930137", "0.62731266", "0.62650007", "0.6207438", "0.61328703", "0.6105263", "0.6068827", "0.606317", "0.6051807", "0.6051807", "0.6051807", "0.6051807", "0.6051807"...
0.0
-1
Global so that only once it is created
function greet(message){ let name="Harendra" alert(message + " " + name) alert(`${message} ${name}`) console.log(`2+2= ${2+2} "Hello" , 'Hello'`) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "_makeGlobal() {\n try{\n if(window && !window.Filteredlist) {window['Filteredlist'] = {};}\n if(window && window.Filteredlist && !window.Filteredlist.instance) {window.Filteredlist.instance = {};}\n\n window.Filteredlist.instance[this.options.id || Mat...
[ "0.6963825", "0.69429153", "0.6842622", "0.6715281", "0.6628775", "0.6594185", "0.6582743", "0.6558054", "0.646793", "0.6452689", "0.64361656", "0.64344394", "0.6418091", "0.6418091", "0.6418091", "0.6418091", "0.6418091", "0.6418091", "0.6418091", "0.6418091", "0.6418091", ...
0.0
-1
Handle user state changes
function onAuthStateChanged(user) { setUser(user); if (initializing) setInitializing(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statehandler(key, value) {\n // console.log(\"key:\",key,\"value:\",value)\n // console.log(\"old state:\", user)\n setUser({...user, [key]: value});\n // console.log(\"latest state:\", user)\n }", "function stateMachine() {\n switch($user_state) {\n\tcase $LOGGED_OUT:\n\t if (cookieExist...
[ "0.7448602", "0.73665667", "0.7005272", "0.6983008", "0.69212097", "0.6780984", "0.6730604", "0.6626575", "0.6606931", "0.65943164", "0.6591656", "0.6558265", "0.655247", "0.6544371", "0.6539095", "0.65347517", "0.6518152", "0.6498631", "0.64925826", "0.6410299", "0.6388828",...
0.5993509
95
HomeContent Retrieve resources via api
function home_searchResources(criteria, containerId) { mibo.util.loading.show(); var data = {}; data.token = mibo.config.TOKEN; data.offset = criteria.offset || 0; data.limit = criteria.limit || 10; data.keyword = criteria.keyword || null; data.order = criteria.order || null; var ajp = m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetch () {\n this._makeRequest('GET', resources);\n }", "function index() {\n\n return resource.fetch()\n .then(function(data){ return data; });\n }", "getList() { return this.api(); }", "async home() {\n const resp = await api.get(`/home`)\n\n ...
[ "0.6665459", "0.6313372", "0.6236909", "0.6181834", "0.6070732", "0.6067995", "0.6022738", "0.6018937", "0.5982749", "0.5974884", "0.59446454", "0.5912115", "0.58939934", "0.58808005", "0.5873229", "0.5856654", "0.5822969", "0.57344997", "0.570319", "0.5702424", "0.56873435",...
0.0
-1
Navigates the user to their respective profile when clicking on the 'Your Prfoile' link
function navProfile() { var cUser = null; socket.emit('isMe', token,cUser , function(res){ window.location = "/user/"+res[1]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goProfile() {\n $state.go('profile');\n }", "function openProfile () {\n $state.go('.person.defaultTab', { personId: vm.person.id, orgId: vm.organizationId });\n }", "function openProfile(){\n window.location.replace(\"https://stavflix.herokuapp.com/client/users/prof...
[ "0.7676281", "0.7385198", "0.72834337", "0.7168574", "0.6979013", "0.69632095", "0.6941266", "0.6940088", "0.68998355", "0.6841725", "0.68286914", "0.6814972", "0.676227", "0.67542285", "0.66521806", "0.6640242", "0.66108346", "0.6545405", "0.6542526", "0.6444103", "0.6370622...
0.6312829
21
Adapts the UI for a mobile
function mobile(){ $(".window-controls").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _enterMobile() {\r\n\t\t\thome.viewformat = 'small';\r\n\t\t}", "function mobileLayout() {\n let w = p.width;\n let h = p.height;\n \n b1 = p.createButton(\"Button 1\", w*0.05, h*0.05, w*0.4375, h*0.125);\n b2 = p.createButton(\"Button 2\", w*0.5125, h*0.05, w*0.4375, h*0.125);\n t1 = ...
[ "0.69876343", "0.67479444", "0.6620363", "0.6502737", "0.64445776", "0.6419168", "0.6336192", "0.625265", "0.62136257", "0.6074094", "0.5999596", "0.58373415", "0.58049375", "0.57810247", "0.5744492", "0.5732877", "0.57321954", "0.5730202", "0.5726875", "0.5711438", "0.570051...
0.53274256
81
Search: Searches for a term and renders it:
function Search(term, type, callback){ console.log(term + " : " + type); switch(type){ case "artist": console.log("artist search") Jam.artistSearch(term, function(aSearch){ /* aArtists[ toArtist{ ID, Type, Name, Country, Score, Disambiguation } ] */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not ...
[ "0.7584577", "0.72619724", "0.72377723", "0.71100754", "0.70543134", "0.6868763", "0.6788832", "0.67786753", "0.67501044", "0.6640264", "0.6620598", "0.6587213", "0.6578422", "0.65749294", "0.65676844", "0.65667856", "0.65666187", "0.65335655", "0.64937586", "0.6486394", "0.6...
0.0
-1
Trigger when scene is initialized
async onInitialize() { G.audio.playBGM('bgm/voltexes-ii.mp3'); // backgrounds this.stage.addChild(G.graphics.createImage('graphics/music-select-bg.jpg', { position: 'center', size: 'cover' })); // darken shadow this.stage.addChild(G.graphics.create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeScene(){}", "function startup() {\n\tsceneTransition(\"start\");\n}", "function InitScene() {\n\tthis.mPersist = false;\n}", "onCreate(scene, custom) {}", "function initScene() {\n animate();\n}", "function on_load(){\n\n\tmouse.init(three.getCamera());\n\n\tcontrol.init(three.getScene(),thr...
[ "0.7826884", "0.7546757", "0.72157234", "0.7152198", "0.7124511", "0.69581294", "0.6890136", "0.68653435", "0.68393004", "0.6836585", "0.68063146", "0.67759544", "0.6734464", "0.66945475", "0.6692034", "0.66759014", "0.6670906", "0.66423315", "0.66281724", "0.6621288", "0.659...
0.0
-1
Do calculations only, DO NOT do any paint in this function
update() { // deal with input if (G.input.isPressed(G.input.ESC)) { G.audio.playSE('se/menu-back.mp3'); // press ESC to back to title G.scene = new SceneTitle(); G.lastSelectMusic = this.selected; } else if (G.input.isPressed(G.input.UP) || G.input...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate(){}", "function calculate() {\n\n calculator.calculate();\n\n }", "compute() {\n if (this.active) {\n this.x2 = event.clientX;\n this.y2 = event.clientY;\n this.reCalc(this.x1, this.x2, this.y1, this.y2);\n }\n }", "function calculate() {\r\n\teval();\r\n\ts...
[ "0.68938124", "0.6751918", "0.66382706", "0.6490173", "0.6473903", "0.64625823", "0.6430302", "0.64251375", "0.6395709", "0.6392019", "0.63206875", "0.6318853", "0.63068765", "0.6304539", "0.62603736", "0.6235168", "0.6207329", "0.6157036", "0.6105715", "0.6085593", "0.605311...
0.0
-1
Build music sprites if we have music list
buildMusicSprites() { let index = 0; for (const music of G.musics) { const offset = index++ - this.selected; const sprite = G.graphics.createSprite((w, h, self) => ({ x: w, y: 0.3 * h + MUSIC_LIST_ITEM_HEIGHT * (1 - MUSIC_LIST_ITEM_Y_DELTA) * (offs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async onInitialize() {\n G.audio.playBGM('bgm/voltexes-ii.mp3');\n // backgrounds\n this.stage.addChild(G.graphics.createImage('graphics/music-select-bg.jpg', {\n position: 'center',\n size: 'cover'\n }));\n // darken shadow\n this.stage.addChild(G.gr...
[ "0.6595777", "0.6150873", "0.59576416", "0.59306365", "0.5915868", "0.5881308", "0.58765936", "0.58548594", "0.5812746", "0.5780421", "0.5751419", "0.57379997", "0.5732832", "0.570023", "0.5683659", "0.56786245", "0.5662781", "0.5658697", "0.56582654", "0.5647283", "0.5644443...
0.79835737
0
The sequentialSearch function has a complexity of O(n), n being the size of the array (input). o(n)
function createNonSortedArray(size){ var array = []; for (var i = size; i> 0; i--){ array[i] = i; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linear_search(arr, n){\n for(var elem of arr){\n if(elem === n){\n return arr.indexOf(elem);\n }\n }\n}", "function seqSearchM(arr,data){\n var max =0;\n for (var i=0;i<arr.length;i++){\n\n if (arr[i]==data&&i>(arr.length*0.2)){\n return i;\n ...
[ "0.7338627", "0.73016167", "0.7124223", "0.69611794", "0.6899141", "0.6868064", "0.67806125", "0.6764974", "0.6746385", "0.67355347", "0.6684723", "0.6684136", "0.66793704", "0.6633923", "0.65911466", "0.65609413", "0.65583783", "0.6556334", "0.6551626", "0.6550946", "0.65422...
0.0
-1
Set initial state of isHidden to false
constructor(props) { super(props); this.state = { isHidden: false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleHidden() {\n setIsHidden(!isHidden);\n }", "toggleHidden() {\n if (this.isHidden) this.show();\n else this.hide();\n }", "function toggleVisible() {\n setVisible(false)\n\n }", "hide() {\n this.isVisible = false;\n }", "toggleVisibility() {\n this.se...
[ "0.78252584", "0.76245505", "0.7359153", "0.7221915", "0.71982735", "0.7112962", "0.70960844", "0.70773596", "0.70773596", "0.7072323", "0.706422", "0.704181", "0.69935143", "0.69556475", "0.6948909", "0.6900581", "0.68829936", "0.68114346", "0.67830795", "0.6781498", "0.6772...
0.681252
17
2) Mounting and Updating
render(){ console.log('render', this.state.timer) // most used // after constructor giving access to props and state return ( <div> <p>{this.state.timer}</p> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "commitMount(instance, type, newProps) {\n instance.commitMount(newProps);\n }", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (...
[ "0.6421369", "0.5920005", "0.5920005", "0.5920005", "0.5920005", "0.5920005", "0.5920005", "0.58055687", "0.57791233", "0.5757512", "0.56378126", "0.55582285", "0.55403215", "0.544868", "0.5441643", "0.5405954", "0.53650606", "0.5355699", "0.5298498", "0.52887154", "0.5266441...
0.0
-1
1. Write a custom function power ( a, b ), to calculate the value of a raised to b.
function Add() { a = 3; b = 4; c = a + b; return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function power (a,b){\n var result = Math.pow(a,b)\n return result\n}", "function power(a, b) {\n return Math.pow(a, b)\n}", "function Power(a,b)\n{\nresult=Math.pow(a,b);\nreturn result;\n}", "function power(a, b) {\n var power = Math.pow(a, b);\n return power;\n}", "function myFuntion(a,b)...
[ "0.85945684", "0.8519383", "0.83324194", "0.83238196", "0.81727517", "0.7941091", "0.78576833", "0.7836", "0.7799955", "0.77780193", "0.7774508", "0.77721804", "0.77693564", "0.77675", "0.7679464", "0.7658791", "0.7650794", "0.74438566", "0.7435262", "0.7408944", "0.7388557",...
0.0
-1
2. Any year is entered through the keyboard. Write a function to determine whether the year is a leap year or not.
function isLeapYear() { var year = Number(prompt("Year ? ")); var leapYear = year % 100 === 0 ? year % 400 === 0 : year % 4 === 0; return leapYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "leapYear(year) {\n if (year > 999 && year < 10000) {\n if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)\n console.log(year + \" is a leap year\");\n else\n console.log(year + \" is not a leap year\");\n\n }\n else\n console...
[ "0.84381413", "0.8392031", "0.82617843", "0.82614595", "0.82559925", "0.8253501", "0.8251277", "0.8201279", "0.817877", "0.8175716", "0.81660974", "0.8121428", "0.80832213", "0.8080325", "0.80487055", "0.8036659", "0.8035254", "0.8034036", "0.8031653", "0.8031488", "0.8012644...
0.87025005
0
4. Write a function that receives marks received by a student in 3 subjects and returns the average and percentage of these marks. there should be 3 functions one is the mainFunction and other are for average and percentage. Call those functions from mainFunction and display result in mainFunction
function main(maths, physics, computer) { function average() { var average = (maths + physics + computer) / 3; return average; } function percentage() { var percentage = ((maths + physics + computer) / 300) * 100; return percentage; } average(); percentage(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function marks(chemistry, physics, maths) {\n function average() {\n var avg = (chemistry + physics + maths) / 3\n return avg\n\n\n }\n function percentage() {\n var per = (chemistry + physics + maths) / 300 * 100\n return per\n }\n console.log(`Marks avg ${average()} Mar...
[ "0.8269121", "0.794054", "0.73219156", "0.71002465", "0.6966591", "0.69099975", "0.6857449", "0.68106353", "0.6764788", "0.6741185", "0.6706031", "0.66975886", "0.66516775", "0.6602231", "0.65752596", "0.6573311", "0.65039", "0.64431435", "0.6438452", "0.6428826", "0.6417118"...
0.7793433
2
7. Write a function with switch statement to count the number of occurrences of any two vowels in succession in a line of text. For example, in the sentence
function vowel_count(str1) { var vowel_list = "aeAE"; var vcount = 0; for (var x = 0; x < str1.length; x++) { if (vowel_list.indexOf(str1[x]) !== -1) { vcount += 1; } } return vcount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findOccurrences() {\n var str = \"Pleases read this application and give me gratuity\";\n var count = 0;\n let haveSeenVowel = false;\n \n for (const letter of str.toLowerCase()) {\n switch (letter) {\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n ca...
[ "0.803927", "0.7614731", "0.74716115", "0.7456753", "0.72949433", "0.72615814", "0.7246736", "0.7238331", "0.7233417", "0.72304344", "0.72225976", "0.7222213", "0.72154737", "0.720571", "0.7200808", "0.7176305", "0.7173675", "0.717024", "0.7161984", "0.71591604", "0.7152809",...
0.666661
84
8. The distance between two cities (in km.) is input through the keyboard. Write four functions to convert and print this distance in meters, feet, inches and centimeters.
function distance() { var distance = Number(prompt(" Distance between Two Cities in Km : ")); alert(" Distance in Meters : " + distance / 1000 + " \n Distance in foot" + distance / 3280.84 + "\n in inches : " + distance / 39370.1 + " \n in centimeters : " + distance / 100000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distance() {\n var input = +prompt(\"Enter distance in KM\");\n function meter() {\n var meter = input * 1000;\n return meter;\n }\n\n function feet() {\n var feet = input * 3280.84;\n return feet;\n }\n\n\n function inches() {\n var inches = input * 39...
[ "0.75296277", "0.67702544", "0.67179674", "0.66866857", "0.6679903", "0.6635542", "0.6618774", "0.6594511", "0.6550087", "0.6543235", "0.65300316", "0.6523691", "0.6522587", "0.6515938", "0.64867705", "0.64718497", "0.6462999", "0.64613754", "0.6457829", "0.6457469", "0.64551...
0.7575154
0
Toggles the visibility of the add raid dialog box.
function toggleAddDialog() { raidApp.addDialogContainer.classList.toggle('visible'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAtomicRaidus() {\n atomicText.show();\n ionicText.hide();\n}", "function onAddTeamClick() {\n $(\"#registerButtons\").hide();\n $(\"#registerTeam\").show();\n}", "function openNewAccount() {\n document.getElementById(\"addNewButton\").style.display = \"block\";\n }", "fun...
[ "0.60003257", "0.595811", "0.59015256", "0.58869594", "0.58550435", "0.5837372", "0.5796722", "0.57622516", "0.5677214", "0.56697094", "0.5594195", "0.55909073", "0.557295", "0.5564463", "0.55619544", "0.55504286", "0.5549698", "0.55416584", "0.5524545", "0.5515268", "0.54996...
0.6643492
0
Event handler for butDialogAdd, adds the selected raid to the list.
function addLocation() { // Hide the dialog toggleAddDialog(); //Arène const select = document.getElementById('selectRaidToAdd'); const selected = select.options[select.selectedIndex]; //Position GPS const geo = selected.value; //Nom de l'arène const arene = selected.textContent; //Heure du Raid const clo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregarItem(){\n \t$('#divListado1').show();\n \tif($('#material').val() == ''){\n \t\talert('ingrese un producto por favor');\n \t}else if($('#cant').val() == ''){\n \t\talert('por favor ingrese una cantidad');\t\n \t}else{\n \t\tif(existeMaterialEnTabla()){\n \t\t\tsumarCantidadA...
[ "0.54219407", "0.52663046", "0.5256905", "0.5244794", "0.5239603", "0.51920944", "0.51873124", "0.5184945", "0.51793987", "0.5177392", "0.5149768", "0.51267743", "0.50973165", "0.5087142", "0.5082419", "0.5046657", "0.5046477", "0.5037896", "0.502538", "0.5021467", "0.4993439...
0.59239537
0
Gets the latest weather forecast data and updates each card with the new data.
function updateData() { Object.keys(raidApp.selectedLocations).forEach((key) => { const raid = raidApp.selectedLocations[key]; const card = getRaidCard(raid); // CODELAB: Add code to call getForecastFromCache // Get the forecast data from the network. //getRaidFromNetwork(location.geo).then((forecast) =>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadForecastWeather(searchCity) {\n if (searchCity == null) searchCity = localStorageData.activeCity;\n var queryURL = `${OPEN_WEATHER_FIVE_DAY_FORECAST_URL}${searchCity}&appid=${OPEN_WEATHER_APPID}`;\n $.ajax({\n url: queryURL,\n method: \"GET\",\n }).then(function (response) {\n if (logIt) ...
[ "0.7105423", "0.70717853", "0.7012324", "0.70044386", "0.69556195", "0.6927856", "0.69261694", "0.69210935", "0.67911786", "0.67827857", "0.6779344", "0.6768909", "0.67539567", "0.67520225", "0.67379004", "0.6729272", "0.6718819", "0.6717924", "0.67053753", "0.6681134", "0.66...
0.66227883
26
Initialize the app, gets the list of raid from local storage, then renders the initial data.
function init() { // Get the raid list, and update the UI. raidApp.selectedLocations = loadRaidList(); updateData(); // Set up the event handlers for all of the buttons. document.getElementById('butRefresh').addEventListener('click', updateData); document.getElementById('butAdd').addEventListener('click', toggl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n /** Gets and stores Entries from LocalStorage. */\n let LocalStorageEntries = localStorage.getItem('entries');\n LocalStorageEntries = JSON.parse(LocalStorageEntries);\n /** If there are entries in LocalStorage */\n if(LocalStorageEntries && LocalStorageEntries.entries.length...
[ "0.59323996", "0.56871825", "0.5675425", "0.5674934", "0.56538576", "0.56501347", "0.5582662", "0.55604446", "0.5547809", "0.5547011", "0.5534667", "0.5527577", "0.550921", "0.54886526", "0.5472485", "0.54695433", "0.5443766", "0.5434545", "0.539543", "0.5377688", "0.5361831"...
0.56945276
1
Slightly modified to call the services and pass the values
function hexFromRGB(r, g, b) { var hex = [ r.toString( 16 ), g.toString( 16 ), b.toString( 16 ) ]; $.each( hex, function( nr, val ) { if ( val.length === 1 ) { hex[ nr ] = "0" + val; } }); return hex.join( "" ).toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_callMethod(service, call) {\n const services = ContainerBuilder.getServiceConditionals(call[1]);\n\n for (const service of services) {\n if (! this.has(service)) {\n return;\n }\n }\n\n call = getCallableFromArray([ service, call[0] ]);\n cal...
[ "0.6589049", "0.6324382", "0.5962228", "0.5930025", "0.59096426", "0.58813", "0.5798089", "0.57682574", "0.57279974", "0.5635706", "0.55986124", "0.55499524", "0.5539971", "0.5536636", "0.55274636", "0.552325", "0.5518291", "0.5492634", "0.5465702", "0.5459565", "0.54495627",...
0.0
-1
bedrag in list zetten en toevoegen aan undordered list
function bedragToevoegen(bedrag) { let liItem = document.createElement('li'); liItem.textContent = bedrag; //eerst had ik hier append() maar dit werd niet ondersteund door internet explorer result.appendChild(liItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ordenaLista(list) {\n //cria uma lista de itens e ordena\n const items = list.children('button').get();\n items.sort(function (a, b) {\n const keyA = $(a).text();\n const keyB = $(b).text();\n if (keyA < keyB) return -1;\n if (keyA > keyB) return 1;\n return 0;\n });\n...
[ "0.64325327", "0.63209695", "0.6085003", "0.6051493", "0.6003027", "0.59878796", "0.59405607", "0.5909919", "0.5872056", "0.5870102", "0.58655983", "0.58530545", "0.58280504", "0.5821214", "0.581481", "0.58096063", "0.57730335", "0.57559747", "0.57337296", "0.5717342", "0.571...
0.6235171
2
totaalbedrag bijwerken en toevoegen aan inputveld
function totaalBedragToevoegen(bedrag){ totaalBedrag = totaalBedrag + Number(bedrag); totaal.value = totaalBedrag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sjekk() {\n console.log(input)\n\n //disable knappen som blir trykket\n var gjettResultat = false;\n $(\"#\"+input).attr('disabled', 'disabled');\n // var input = inpBokstav.value\n\n for(var x = 0;x<ordArray.length;x++){\n if(input == ordArray[x]){\n $('#t'+x).app...
[ "0.6504732", "0.6504732", "0.6240115", "0.6117684", "0.6091735", "0.5973644", "0.59542596", "0.58856577", "0.58824104", "0.58731955", "0.5838432", "0.5796614", "0.5793928", "0.57863325", "0.5781241", "0.57729447", "0.57714075", "0.5766547", "0.57634294", "0.57603735", "0.5747...
0.58234394
11
controleren of er een nummer zit in de string
function checkForNumber(t) { let regex = /\d/g; return regex.test(t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comprobacion(e) {\n\t var numeros=\"0123456789\";\n\nfunction tiene_numeros(texto){\n for(i=0; i<texto.length; i++){\n if (numeros.indexOf(texto.charAt(i),0)!=-1){\n \t//si retorna 1 es que encontro numeros en el texto\n return 1;\n }\n }\n //si retorna 0 solo contiene letras\...
[ "0.7044187", "0.6749752", "0.651953", "0.6484785", "0.6354778", "0.63517714", "0.6341287", "0.63113904", "0.63073605", "0.6276571", "0.6243924", "0.6242605", "0.62238437", "0.61907816", "0.61798483", "0.6168776", "0.6162061", "0.6147644", "0.61187994", "0.6111018", "0.6098284...
0.0
-1
daadwerkelijk de btw btw berekenen
function btwBerekenen() { //Uit feedback kwam dat de volgende berekening niet juist is uitgevoerd, aanpassen btwBedrag = totaalBedrag / 121 * 21; // Om het btw bedrag te krijgen deel ik het bedrag inclusief btw door 121 en dan keer 21. totaalBedragZonderBtw = totaalBedrag - btwBedrag; // Bij de volgende stap ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twinkle() {\n result = httpGet('/mailbox/twinkle');\n}", "function tweetIt(txt) {\n\n\tvar tweet = {\n\t\tstatus: txt\n\t}\n\n\t//Makes the bot account post a status update.\n\tT.post('statuses/update', tweet, tweeted);\n\n\t//Nested function that logs strings to the console. Makes it easier to see\n...
[ "0.6218108", "0.56186426", "0.5607528", "0.55779076", "0.55600214", "0.552879", "0.5497817", "0.54709226", "0.5465514", "0.54314667", "0.5391672", "0.5379998", "0.53415924", "0.531658", "0.53089863", "0.52769256", "0.52655977", "0.52647316", "0.5253586", "0.5221723", "0.52140...
0.56884825
1
formulieren, divjes & variabelen resetten
function resetForm() { btwResult.innerHTML = ""; totaalZonderBtwResult.innerHTML = ""; result.innerHTML = ""; bedragInput.value = ""; totaal.value = ""; totaalBedrag = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetear(){\n resultado.innerHTML = \"0\";\n operandoa = 0;\n operandob = 0;\n operacion = \"\";\n control_punto = 0;\n }", "function resetFormularioNuevaParada(){\n frmPanelNuevaParada.getForm().reset();\n Ext.get('latParada').dom.innerHTML = '0.0';\n Ext....
[ "0.67659736", "0.6640162", "0.66134346", "0.65528035", "0.65280336", "0.6521241", "0.6515523", "0.6472782", "0.64632297", "0.6454967", "0.64483726", "0.64163154", "0.64109564", "0.63575697", "0.6344303", "0.6288361", "0.6284798", "0.6259696", "0.62535155", "0.62505877", "0.62...
0.6872335
0
render() returns the HTML for LoginButton
render () { return ( <a href="#" className="btn btn-default btn-lg" onClick={this.handler} id="btnLogin">Login</a> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLoginButton() {\n var loginButtonContainer = document.getElementById(\"firebaseui-auth-container\");\n var loginButtonHTML = getLoginButtonHTML();\n loginButtonContainer.innerHTML = loginButtonHTML;\n}", "render() {\n <div class=\"login-box\" id=\"login-box\">\n <input autocomplet...
[ "0.74470836", "0.73690957", "0.7272287", "0.7208264", "0.7111917", "0.7108958", "0.702944", "0.6915029", "0.68317485", "0.68195903", "0.6755955", "0.67426497", "0.6715965", "0.6646396", "0.66433394", "0.6615156", "0.66107005", "0.6599584", "0.6572065", "0.6556544", "0.6553825...
0.65700465
19
render() returns the HTML template for SignUpButton
render () { return ( <a href="#" className="btn btn-default btn-lg" onClick={this.handler} id="btnSignup">Sign Up</a> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signUpTemplate() {\n return `<form class=\"signUpForm\" autocomplete=\"on\">\n <div class=\"loginError\"></div>\n <legend class=\"loginRegisterTitle\">Welcome, aboard!</legend>\n <label for=\"username\">USERNAME:</label>\n <input class=\"usernameSignUp\" type=\"text\" na...
[ "0.7531717", "0.7206534", "0.71053165", "0.6804594", "0.6709056", "0.6646756", "0.65900296", "0.6588954", "0.6491808", "0.64289737", "0.6399449", "0.63651997", "0.6258602", "0.619901", "0.6196097", "0.6189152", "0.6187252", "0.6184635", "0.61755913", "0.6164995", "0.61599904"...
0.6055421
24
render() returns the HTML template for FBButton
render () { return ( <div> <img src={FacebookLogin} alt="Facebook Login" onClick={this.handler} id="btnFacebookImage"/> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n const size = this.size || 'medium';\n // const iconOnly = this.iconOnly !== false|| false;\n\n return html`\n ${this.href\n ? html`\n <a\n class=\"pl-c-button pl-c-button--${size} ${this.iconOnly\n ? 'pl-c-button--icon-only'\n ...
[ "0.67876446", "0.66183895", "0.65115523", "0.6486644", "0.62694186", "0.62172216", "0.62040496", "0.6116095", "0.61156315", "0.60938066", "0.6074563", "0.60638964", "0.60292774", "0.6018221", "0.60163146", "0.6011306", "0.6005098", "0.6005098", "0.6005098", "0.5994655", "0.59...
0.0
-1
render() returns the HTML template for LandingPage
render() { return ( <div id="landing-body"> <div className="container-fluid"> <div className="row"> <div className="col-xs-10 col-xs-offset-1" id="landing-logo"> <img src={MealIoLogo} className="img-responsive ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderPage() {}", "function render() {\r\n let content = '';\r\n if (STORE.view === 'home') {\r\n $('main').html(welcomePage());\r\n }\r\n else if (STORE.view === 'question') {\r\n content = questionAsked();\r\n content += generateAnswers();\r\n content += questionAndScoreStanding();\r\n $('ma...
[ "0.68707055", "0.6841045", "0.6720703", "0.6708733", "0.66717976", "0.6656631", "0.65922856", "0.6560367", "0.6513854", "0.64429307", "0.63957644", "0.6251982", "0.6249908", "0.6225146", "0.62140197", "0.62140197", "0.61616665", "0.6135162", "0.6134993", "0.6129344", "0.61230...
0.0
-1
EBD, GLOBAL VARIABLES ....
function init() { try{ db = openDatabase('callogs', '1.0', 'Call Log Database', 2 * 1024 * 1024); db.transaction(function (transaction) { transaction.executeSql('CREATE TABLE IF NOT EXISTS logs (id INTEGER PRIMARY KEY, number TEXT, duration NUMERIC)'); //transaction.executeS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setGlobalVariables() {\n officeName = officeLoc[beach].name;\n beachID = officeLoc[beach].beachID;\n weatherID = officeLoc[beach].weatherID;\n officeLatCoord = officeLoc[beach].lat;\n officeLonCoord = officeLoc[beach].lon;\n transit = officeLoc[beach].transit;\n videoLetterboxed = off...
[ "0.7081363", "0.64416593", "0.6383468", "0.6321364", "0.62969214", "0.6295085", "0.6292034", "0.62172693", "0.6208936", "0.6181201", "0.6158005", "0.61537445", "0.6132168", "0.6117411", "0.6052485", "0.60456604", "0.6043282", "0.604317", "0.60325086", "0.60206777", "0.6020544...
0.0
-1
Submit the request to the server
function submitCP() { // Two different submit methods depending on whether their browser is IE9- or not if (!badBrowser) { // If newer browser, use the FormData object to include files and submit to server var data = new FormData(); data.append("desc", $("#desc").val(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendSubmitRequest() {\n\trequest = createRequest();\n\tif (request==null) {\n\t\talert(\"Unable to create request\");\n\t\treturn;\n\t}\n\tif(!confirm(\"Submit Job?\")){\n\t\treturn;\n\t}\n\tvar url= \"/api/addJob\";\n\trequest.open(\"POST\",url,true);\n\trequest.setRequestHeader('Content-Type', 'applicat...
[ "0.72014797", "0.71862864", "0.69028234", "0.67675024", "0.6499329", "0.6478708", "0.64329374", "0.64026445", "0.6373778", "0.6352997", "0.63100094", "0.62747645", "0.62654495", "0.6207608", "0.6181739", "0.6170301", "0.6162716", "0.61251944", "0.6104236", "0.6056248", "0.604...
0.0
-1
Checks all relevant input fields for validity
function validateInput() { if (!keyCodeValid || !accountCodeValid || ($("#keyCodeCP").val() == "" && isAcctAllEmpty()) || $("#desc").val() == "" || $("#instruct").val() == "" || $("#instruct").val().length > 65535) { $("#submitCP").button("option", "disabled", true); } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateFields(){\n\tif(!getValue('nombreID')\n\t\t|| !getValue('contactoID') \n\t\t|| !getValue('estadoID')\n\t\t|| !getValue('ciudadID') \n\t\t|| !getValue('shortDesc') \n\t\t|| !getValue('longDesc')\n\t\t|| !isChecked('lblCheck'))\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}", "checkValidity () {\n\n ...
[ "0.73262227", "0.7302522", "0.72563267", "0.72172374", "0.72005695", "0.71999824", "0.71878856", "0.7152691", "0.7147368", "0.7126967", "0.7101604", "0.7047726", "0.6999337", "0.69938016", "0.6991415", "0.69649285", "0.6949245", "0.69211954", "0.69211954", "0.68971384", "0.68...
0.0
-1
Check whether the given account code field is valid
function isAcctValid(field, num) { return !isNaN($(field).val()) && ($(field).val().length == num || $(field).val() == ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static accountIsValid(account) {\n return true;\n }", "function validateCodeField(code) {\n if (code.length > 10) {\n return false;\n }\n return true;\n}", "function cekAccountNumber(field){\r\n\tvar accountNumber = /^[0-9][0-9]*$/;\r\n\tif(field.match(accountNumber)) {\r\n\t\treturn true;\...
[ "0.7226829", "0.70322907", "0.6692173", "0.66273445", "0.6592543", "0.6539768", "0.64986086", "0.64312786", "0.6426978", "0.64251643", "0.61999506", "0.6185829", "0.6064935", "0.6051408", "0.5996565", "0.5996565", "0.5965037", "0.596227", "0.5940497", "0.59356654", "0.5926284...
0.70928335
1
Check that all account fields have all correct numbers
function isAcctAllGood() { return isAcctGood("#acctCode1CP", 4) && isAcctGood("#acctCode2CP", 2) && isAcctGood("#acctCode4CP", 3) && isAcctGood("#acctCode5CP", 4) && isAcctGood("#acctCode6CP", 4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAcctGood(field, num) {\n return !isNaN($(field).val()) && $(field).val().length == num;\n }", "function isAcctValid(field, num) {\n return !isNaN($(field).val()) && ($(field).val().length == num || $(field).val() == \"\");\n }", "function CheckNumberIsProvidedForServiceBookingEnt...
[ "0.7455864", "0.7223274", "0.632848", "0.62463385", "0.61340296", "0.61305356", "0.6115341", "0.60602266", "0.6003273", "0.5983368", "0.5983143", "0.5939904", "0.5927122", "0.5901921", "0.588277", "0.58680546", "0.5853527", "0.5824135", "0.58124334", "0.57946897", "0.57713974...
0.59533817
11
Check that the given account field has the given number of numbers in it
function isAcctGood(field, num) { return !isNaN($(field).val()) && $(field).val().length == num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAcctValid(field, num) {\n return !isNaN($(field).val()) && ($(field).val().length == num || $(field).val() == \"\");\n }", "function cekAccountNumber(field){\r\n\tvar accountNumber = /^[0-9][0-9]*$/;\r\n\tif(field.match(accountNumber)) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", ...
[ "0.74425566", "0.71586734", "0.66198236", "0.64107907", "0.6394325", "0.6137887", "0.6123114", "0.58878505", "0.5843415", "0.57970756", "0.5787231", "0.57865644", "0.57701", "0.57300895", "0.57172066", "0.565221", "0.56517977", "0.56340253", "0.5628937", "0.56218076", "0.5609...
0.78187835
0
Check if all account fields are empty
function isAcctAllEmpty() { return $("#acctCode1CP").val() == "" && $("#acctCode2CP").val() == "" && $("#acctCode4CP").val() == "" && $("#acctCode5CP").val() == "" && $("#acctCode6CP").val() == ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFieldsAreEmpty() {\n\t\n\tif (\n\tdocument.getElementById(\"net-sales\").value == \"\" && \n\tdocument.getElementById(\"20-auto-grat\").value == \"\" &&\n\tdocument.getElementById(\"event-auto-grat\").value == \"\" &&\n\tdocument.getElementById(\"charge-tip\").value == \"\" &&\n\tdocument.getElementByI...
[ "0.7424617", "0.7100695", "0.6996133", "0.6884646", "0.6821586", "0.6818323", "0.6804034", "0.679246", "0.6787676", "0.6777605", "0.67608184", "0.67560697", "0.6727968", "0.6720983", "0.6710236", "0.6706763", "0.66526717", "0.6649611", "0.6576145", "0.656723", "0.65627354", ...
0.8189654
0
Check the return of the ajax calls to make sure everything got entered correctly
function validateResult(result, numFiles) { console.log(result); // Should have 3 rows: request id, lines written in database, and files saved var results = result.split("\n"); if (results.length != 3) { $("#cpBody").hide(); $("#cpError").show().append(document.cr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOnValidationDone(ajax) {\r\n if (ajax.readyState == 4) {\r\n if (ajax.status == 200) {\r\n var data = ajax.responseXML;\r\n // do nothing if we don't have initial values or we got error\r\n if (!handleAjaxMessages(data, null)) {\r\n return;\r...
[ "0.6774079", "0.66162777", "0.6510559", "0.62415147", "0.622469", "0.6218894", "0.6197411", "0.6181763", "0.61525995", "0.61516535", "0.61318296", "0.61312693", "0.61196315", "0.6118138", "0.6117282", "0.6114084", "0.6113576", "0.6085875", "0.60853696", "0.6078049", "0.607757...
0.0
-1
flag usada para ver se o usuario quer os manipuladores com profundidade ou nao generate a quadrilateral with triangles
function quad(a, b, c, d) { var t1 = subtract(vertices[b], vertices[a]); var t2 = subtract(vertices[c], vertices[b]); var normal = vec4(cross(t1, t2), 0); pointsArray.push(vertices[a]); normalsArray.push(normal); pointsArray.push(vertices[b]); normalsArray.push(normal); pointsArray.push(vertices[c]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTriangle() {\n const canvas=document.getElementById(\"canvas4\");\n const ctx=canvas4.getContext(\"2d\");\n ctx.clearRect(0, 0, 1024, 512);\n\n let side1=prompt(\"Pick the length of the first side\")\n side1=Number(side1)\n\n let side2=prompt(\"Pick the length of the second side\")\n side2=Numb...
[ "0.66177833", "0.6473432", "0.64470845", "0.6386189", "0.61779207", "0.6164037", "0.6105742", "0.60984284", "0.6092106", "0.60847867", "0.60559255", "0.6035137", "0.6031295", "0.60100186", "0.5987254", "0.5931261", "0.5921831", "0.5913882", "0.5903669", "0.59003615", "0.58865...
0.0
-1
define faces of a cube
function colorCube() { quad( 1, 0, 3, 2 ); quad( 2, 3, 7, 6 ); quad( 3, 0, 4, 7 ); quad( 6, 5, 1, 2 ); quad( 4, 5, 6, 7 ); quad( 5, 4, 0, 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cube(side) {\r\n var s = (side || 1) / 2;\r\n var coords = [];\r\n var normals = [];\r\n var texCoords = [];\r\n var indices = [];\r\n\r\n function face(xyz, nrm) {\r\n var start = coords.length / 3;\r\n var i;\r\n for (i = 0; i < ...
[ "0.7441803", "0.7368991", "0.73639846", "0.7356301", "0.72440046", "0.7172248", "0.7147309", "0.7147309", "0.7077254", "0.7039772", "0.7028733", "0.6981609", "0.6906486", "0.6893108", "0.6889303", "0.6867397", "0.6863341", "0.6794245", "0.67602104", "0.675611", "0.6752009", ...
0.6440226
39
Funcao que retorne TRUE caso o ponto P esteja dentro do triangulo com vertices nas coordenadas A B C
function barycentric (A, B, C, P){ // Compute vectors var a = vec3(A); var b = vec3(B); var c = vec3(C); var p = vec3(P); var v0 = subtract(c, a); var v1 = subtract(b, a); var v2 = subtract(p, a); // Compute dot products var dot00 = dot(v0, v0); var dot01 = dot(v0, v1); var dot02 = dot(v0, v2)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pointInTriangle(p, a, b, c){\n\tif(sameSide(p, a, b, c) && sameSide(p, b, a, c) && sameSide(p, c, a, b)){\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "areCoordsWithinTriangle(coord, pointA, pointB, pointC) {\n let calcPointAB = ((coord.y - pointA.y) * (pointB.x - pointA.x) - (coord.x -...
[ "0.70823693", "0.68719566", "0.6832996", "0.6297054", "0.6264374", "0.6241474", "0.6221555", "0.61915916", "0.6191021", "0.61803305", "0.6170195", "0.6164239", "0.61192226", "0.61192226", "0.61192226", "0.61192226", "0.60823536", "0.6059427", "0.60522795", "0.60518914", "0.60...
0.0
-1
Multiplica a matriz m pelo vetor vec
function multMat4Vec4 (m, vec) { var tv = []; tv[0] = m[0][0] * vec[0] + m[0][1] * vec[1] + m[0][2] * vec[2] + m[0][3] * vec[3]; tv[1] = m[1][0] * vec[0] + m[1][1] * vec[1] + m[1][2] * vec[2] + m[1][3] * vec[3]; tv[2] = m[2][0] * vec[0] + m[2][1] * vec[1] + m[2][2] * vec[2] + m[2][3] * vec[3]; tv[3] = m[3][0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mMulti(m,v){\n\tmMultiTest(m,v)\n\tconst newM = new Array(m.length)\n\tlet sum\n\tfor(let i=0;i<m.length;i++){\n\t\tnewM[i] = new Array()\n\t\tsum=0\n\t\tfor(let j=0;j<v.length;j++){\n\t\t\tsum += m[i][j] * v[j][0]\n\t\t}\n\t\tnewM[i][0] = sum\n\t}\n\n\treturn newM\n}", "function multiply(m, v)\r\n{\r\n...
[ "0.7930833", "0.77567196", "0.7678945", "0.7560042", "0.7467438", "0.7455137", "0.7390336", "0.71322954", "0.7122181", "0.7071654", "0.6920668", "0.68371475", "0.6811439", "0.6785799", "0.6785799", "0.6747603", "0.67365104", "0.66754806", "0.66000164", "0.65744895", "0.657392...
0.679414
13
Dada a coordenada e a matriz de projecao multiplicada pela matriz de modelagem devolve a coordenada desse vetor na tela 2D e a sua profundidade com relacao a camera
function unproject (vec, im) { var dest = []; //output var tv = []; //transformed vector tv = multMat4Vec4(im, vec); if(tv[3] == 0.0) { return null; } dest[0] = tv[0] / tv[3]; dest[1] = tv[1] / tv[3]; dest[2] = tv[2] / tv[3]; dest[3] = 0.0; return dest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMatrices() {\n this.projection = perspective(this.fieldOfViewY, this.aspect, this.near, this.far);\n const up = vec3(0, 1, 0);\n this.view = lookAt(this.eye, this.at, up);\n this.viewProjection = mult(this.projection, this.view);\n }", "update(viewMatrix, projectionMatrix) {\...
[ "0.6858472", "0.6798434", "0.6676082", "0.65245855", "0.6514868", "0.646527", "0.6411898", "0.64096445", "0.63940495", "0.6374187", "0.6373161", "0.636634", "0.6313147", "0.6306902", "0.62800854", "0.62518144", "0.6242374", "0.6195277", "0.61807036", "0.61754405", "0.6171818"...
0.0
-1
atribuir zero ao vetores do escalonamento e translacao aos tres eixos
function zerarEixos (){ eixoTransladar[0] = 0; eixoTransladar[1] = 0; eixoTransladar[2] = 0; eixoEscalar[0] = 0; eixoEscalar[1] = 0; eixoEscalar[2] = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zerarTransformacao () {\n botaoT = 0; \n botaoS = 0;\n botaoR = 0;\n}", "function reestablece(){\n colector = \"0\";\n operacion = \"\";\n operador0 = 0;\n operador1 = 0;\n resultado = 0;\n iteracion = 0;\n }", "function unDoIVAGastosVenta(IVAxGtos,costoDesProd,IVA) {\n\nvar nvoI...
[ "0.7072811", "0.6000572", "0.5937992", "0.58426064", "0.58335453", "0.5795253", "0.57789534", "0.577218", "0.5715374", "0.5709285", "0.5706147", "0.5677101", "0.56067055", "0.5595527", "0.5586363", "0.5584008", "0.5581596", "0.5580311", "0.557516", "0.55574065", "0.5549408", ...
0.71572745
0
atribuir 0 as variaveis que indicam qual a tranfomacao selecionada no momento
function zerarTransformacao () { botaoT = 0; botaoS = 0; botaoR = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activacion(valor) {\n return valor >= 0 ? 1 : 0;//Devuelvo 1 o 0 dependiendo si la condicion se cumple\n }", "function activar(quien, //requerido\nmomento, //opcional\nobjeto = 'omarxxx' //dato por defecto\n) {\n momento ? console.log(\"quien\" + quien, \"objeto\" + objeto, \"moment...
[ "0.6264219", "0.58171034", "0.5653906", "0.5601469", "0.5569281", "0.55285543", "0.5510643", "0.5474704", "0.54111606", "0.5409865", "0.5397516", "0.538805", "0.5379643", "0.53746134", "0.53612113", "0.5358661", "0.53470415", "0.5317938", "0.5308845", "0.5276595", "0.52680933...
0.5627493
3
CALCULA o vetor normal dos objetos carregados caso o arquivo obj nao dispolibilizou
function calc_normal(a, b, c) { var t1 = subtract(b, a); var t2 = subtract(c, b); var normal = vec4(cross(t1, t2), 0); normalsArray.push(normal); normalsArray.push(normal); normalsArray.push(normal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restaVotos (obj){\n let resta = obj.votos_positivos - obj.votos_negativos;\n console.log(resta);\n}", "function loadObj(name, file)\n{\n let obj_info = ObjectPool[name].ObjectInfo;\n if (obj_info == null) return null;\n\n if (file == null)\n {\n obj_info.positions = [];\n ...
[ "0.6029366", "0.58650607", "0.5625268", "0.5530662", "0.5504705", "0.54976696", "0.544303", "0.539328", "0.52866083", "0.5272395", "0.5261161", "0.5258063", "0.5251595", "0.52121985", "0.5151678", "0.5151678", "0.5132939", "0.51169664", "0.5101407", "0.5093301", "0.50835276",...
0.0
-1
list service of shop
function showlistService() { $.ajax({ async : true, url : "http://localhost:8080/repairvehicle/admin/getservice", method : "GET", headers : { "accept" : "application/json;odata=verbose", "content-type" : "application/json;odata=verbose" }, success : function(data) { $('.listService input').prop('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getServicesList() {\n\t\tcustApi.getServices().\n\t\tsuccess(function (data, status, header, config) {\n\t\t\tconsole.log(\"Services retrieved successfully\");\n\t\t\tvar serviceMap = buildServicesMap(data.payload);\n\t\t\tvm.model.physiotherapyId = serviceMap[\"physiotherapy\"];\n\t\t}).\n\t\terror(funct...
[ "0.7313496", "0.7298795", "0.7247098", "0.6932875", "0.66493374", "0.6622507", "0.6619854", "0.6491897", "0.6474934", "0.6401329", "0.63241136", "0.6318888", "0.6311028", "0.6266202", "0.625117", "0.62411", "0.6174", "0.6154078", "0.61437386", "0.61323404", "0.61323404", "0...
0.5902206
39
............................ ............................................... ................................................. ......................................... ................................................. ............................................... .....................................
function requestBookmarksBar(on, layout) { if(on != null) { if(on) { on = 1; } else { on = 0; } } let Data = { on: on, layout: layout }; ipcRenderer.send('request-set-bookmarks-bar', Data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182(...
[ "0.6656219", "0.6558244", "0.62058413", "0.606806", "0.6020118", "0.5967327", "0.5945764", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "0.5900506", "...
0.0
-1
........ ................. ................ ................ ................ ................. ..............
function init() { loadTheme(); loadBorderRadius(); loadBookmarksBar(); loadStartPage(); loadHomePage(); loadSearchEngine(); loadCache(); loadWelcome(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "transient private internal function m185() {}", "constructor() {\n \n\n \n ...
[ "0.6418301", "0.6112988", "0.5816339", "0.57538784", "0.5726322", "0.5716015", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "0.57092524", "...
0.0
-1
All functions to be called on $(window).load() should be in this function
function qodeOnWindowLoad() { qodeInitElementorCustomFont(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function eltdfOnWindowLoad() {\n\t eltdfWooCommerceStickySidebar().init();\n\t eltdfInitButtonLoading();\n eltdfInitProductListMasonryShortcode();\n }", "function onLoaded()\n\t{\n\t\twindow.initE...
[ "0.7603902", "0.7389519", "0.708341", "0.6952638", "0.6912849", "0.68762875", "0.68374676", "0.6803991", "0.67885834", "0.67871064", "0.67627656", "0.67270035", "0.67181396", "0.6708863", "0.6699525", "0.6696686", "0.66750526", "0.6656467", "0.6648514", "0.6634142", "0.663160...
0.0
-1
This will update the house state acccording to passed update parameters.
updateHouseFromState(component){ var state_manager = this, house = state_manager.state.house, promise; if (!house) { promise = Promise.resolve(); } else if (state_manager.state.dataset === 'energy' && !state_manager.matchesEnergyState()){ promise = state_manager.setHouseEnergyFromSta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setParams(params){\n var state_manager = this,\n url, house, params;\n if (state_manager.update_in_progress) return false;\n state_manager.update_in_progress = true;\n\n params = Object.assign({}, state_manager.state, params);\n if (params.house_id){\n house = state_manager.houses.find((h)...
[ "0.657095", "0.627396", "0.62181234", "0.6190987", "0.6131534", "0.60751915", "0.605665", "0.5965384", "0.5955696", "0.59434247", "0.58862865", "0.5886038", "0.5868046", "0.58601344", "0.58038276", "0.5797452", "0.57857", "0.5774026", "0.57545376", "0.5752158", "0.5750917", ...
0.6581733
0
Change Params > Change Url
setParams(params){ var state_manager = this, url, house, params; if (state_manager.update_in_progress) return false; state_manager.update_in_progress = true; params = Object.assign({}, state_manager.state, params); if (params.house_id){ house = state_manager.houses.find((h)=>{ return h....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateURL () {\n var newSearch = \"?\" + Object.keys(parameters).filter(function (key) {\n return Boolean(parameters[key])\n }).map(function (key) {\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(parameters[key])\n }).join(\"&\");\n history....
[ "0.76082027", "0.75800586", "0.75368696", "0.73101854", "0.725429", "0.72129005", "0.71997577", "0.7056407", "0.7021475", "0.6951297", "0.69001603", "0.68651956", "0.68369687", "0.68095654", "0.68024427", "0.6786734", "0.67732877", "0.6755107", "0.6715941", "0.67115504", "0.6...
0.0
-1
Url Changed > Change State
updateStateFromUrl(location, component){ var state_manager = this, params = state_manager.parseUrl(location.pathname), house = null; if (params.house_id){ house = state_manager.houses.find((h)=>{ return h.data.id == params.house_id; }); } else if (params.dataset === 'irradiance'){ //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function respondToState(){\n\t\t_oldUrl = _currentUrl;\n\t\tif(_useAPI) _currentUrl = cleanUrl(window.location.pathname || \"\");\n\t\telse _currentUrl = cleanUrl(window.location.hash || \"\");\n\t\t//Remove slash in beginning\n\t\tif(_currentUrl == \"/\") _currentUrl = \"\";\n\t\telse if(_currentUrl.indexOf(\"/\"...
[ "0.72138965", "0.7142185", "0.711696", "0.7074623", "0.6819557", "0.6775527", "0.6682083", "0.6672039", "0.6529458", "0.65114504", "0.650442", "0.6476672", "0.64537483", "0.6432621", "0.6425732", "0.6415419", "0.6409642", "0.63951916", "0.6388429", "0.6388429", "0.6388429", ...
0.56659
96
TODO Implement this with a HashMap to get a better efficiency. Otherwise, complexity while loading the list would be O(n^2) in the worst cases, with HashMap it would improve to O(n).
function getAllStudentData() { var studentData = {moduleStudentList, studentChanges}; return studentData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadList() {\n return loadListFunctionality();\n }", "function loadList(){\n let list = [];\n // Load the item from localStorage.\n let newList = localStorage.getItem(\"list\");\n\n // Check to see if the item returned null\n if (newList == null || newList == undefined){\n // I...
[ "0.6594202", "0.5836811", "0.57855827", "0.57712096", "0.5690001", "0.5687925", "0.567906", "0.5672089", "0.5660611", "0.5626623", "0.5584438", "0.5461377", "0.5451134", "0.5447851", "0.5418069", "0.53894234", "0.5317656", "0.5317656", "0.5317158", "0.53107667", "0.53044695",...
0.0
-1
or not in lowercase grandma still thinks that should be replaced with a 2. bless her. 'I love to text' becomes 'I love 2 text' 'see you tomorrow' becomes 'see you 2morrow' 'look at that octopus' becomes 'look at that oc2pus' Note that 'too' should become '2', not '2o'
function textin(str){ str = str.replace(/two/gi, 2).replace(/too/gi,2).replace(/to/gi,2) return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textin(s){\n return s.replace(/two|too|to/gi,2)\n }", "function leetify(word) {\n //get the word in all lowercase letters\n var modifiedWord = word.toLowerCase();\n\n //replace all As with the number 4\n modifiedWord = modifiedWord.replace(/a/g, '4');\n\n //replace all Es with the number 3\n ...
[ "0.6928495", "0.68726045", "0.68726045", "0.6618447", "0.65311235", "0.65127814", "0.64730704", "0.6435399", "0.6434114", "0.63740873", "0.6358453", "0.63354117", "0.62533647", "0.6246775", "0.6218038", "0.62090117", "0.61730987", "0.61656284", "0.6152095", "0.6150311", "0.61...
0.6789782
3
make the window canvas and set grid
function setup() { createCanvas(602, 602); // showing grid cellSize = (width - 2) / cols; grid = make2DArray(cols, rows); // color button. p5.js button = createButton("green"); button = createButton("blue"); button = createButton("red"); button = createButton("black"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGrid() {\n\t\tcontext.fillStyle = GRID_COLOR;\n\t\tfor (var i = GRID_CELL_WIDTH; i < canvas.width; i = i + GRID_CELL_WIDTH) {\n\t\t\tfor (var j = GRID_CELL_WIDTH; j < canvas.height; j = j + GRID_CELL_WIDTH) {\n\t\t\t\tcontext.fillRect(i, j, 1, 1);\n\t\t\t}\n\t\t}\n\t}", "function makeGrid() {\nfor (...
[ "0.73653895", "0.7218821", "0.7203408", "0.717473", "0.7147267", "0.71271014", "0.7113312", "0.71114695", "0.7080385", "0.70702493", "0.69907415", "0.69788057", "0.69760615", "0.69738656", "0.694622", "0.6940206", "0.69292825", "0.6928185", "0.6927859", "0.6904218", "0.690393...
0.0
-1
switches between balck and white
function mousePressed() { let xcoord = floor(mouseX / cellSize); let ycoord = floor(mouseY / cellSize); if (grid[xcoord][ycoord]===1) { grid[xcoord][ycoord]=0; } else { grid[xcoord][ycoord] = 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnBlackBgAndWhiteFo() {\n setInterval(changeBgAndFont, 0000);\n}", "function blinkingText() {\r\n if ($(\"#start-game-btn\").hasClass(\"dark-green\")) {\r\n $(\"#start-game-btn\").removeClass(\"dark-green\").addClass(\"off-white\");\r\n }\r\n else {\r...
[ "0.67784274", "0.6456392", "0.63991755", "0.6378684", "0.6342049", "0.63056463", "0.6260995", "0.62543297", "0.62380594", "0.61388177", "0.6083121", "0.6074812", "0.60726655", "0.6071022", "0.6057327", "0.60376686", "0.60343444", "0.60210884", "0.6001545", "0.5993665", "0.599...
0.0
-1
switches color between white and colour.
function mousePressed() { let xcoord = floor(mouseX / cellSize); let ycoord = floor(mouseY / cellSize); if (grid[xcoord][ycoord]) { grid[xcoord][ycoord]=0; } else { grid[xcoord][ycoord] = 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchColor(){\n\tif (currentColor === \"red\"){\n\t\tcurrentColor = \"black\";\n\t}\telse {\n\t\t\tcurrentColor = \"red\";\n\t\t}\n}", "function changeColor()\n\t\t{\n\n\t\t(this.style.backgroundColor == \"black\") ? this.style.backgroundColor = \"white\" : this.style.backgroundColor = \"black\";\n\t\t...
[ "0.79110974", "0.74066544", "0.7144236", "0.70611745", "0.7046343", "0.70356035", "0.70246357", "0.6965847", "0.6799679", "0.6748969", "0.6686483", "0.6646951", "0.6639724", "0.6619145", "0.65978265", "0.6545358", "0.65380853", "0.65254825", "0.6519358", "0.6491892", "0.64717...
0.0
-1
ITERATION BUTTON ON CLICK HANDLER
function iteration_button_onclick(clicked_id) { location.href = "/view/iteration"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleButton() {}", "_buttonClickHandler() { }", "handleClick() {}", "buttonClick(ev) {\n\n\t\t// Get the button using the index\n\t\tvar btn = this.props.buttons[ev.currentTarget.dataset.index];\n\n\t\t// If there's a callback\n\t\tif(typeof btn.callback == 'function') {\n\t\t\tbtn.callback(btn);\n\t\t} els...
[ "0.6839906", "0.6758388", "0.6748291", "0.671693", "0.67093885", "0.65899754", "0.6576874", "0.6537178", "0.6492638", "0.64111495", "0.6411078", "0.6410307", "0.640575", "0.640229", "0.6377328", "0.6345447", "0.63105553", "0.6290757", "0.62893724", "0.6267743", "0.6257519", ...
0.6807116
1
Sends the email to Michael's Place staff and displays the 'program' route.
sendEmail() { this.validationController.validate().then(errors => { if (errors.length === 0) { var email = this; this.api.email.sendToStaff(this.subject, this.message) .then(function() { log.debug('Email sent succesfully. R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function main () {\n // send mail with defined transport object\n transporter.sendMail({\n from: email, // sender address\n to: 'melphelps@live.co.uk', // list of receivers\n subject: 'Client Enquiry', // Subject line\n html: message\n }, function (err) {\n i...
[ "0.6621051", "0.61131954", "0.6046412", "0.6018046", "0.60006016", "0.5984907", "0.5932313", "0.58432806", "0.5807088", "0.5785041", "0.5773173", "0.57508785", "0.57466805", "0.5690841", "0.5673886", "0.56491405", "0.56066424", "0.56039256", "0.5562241", "0.5558806", "0.55561...
0.6178181
1
generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) { var loaders = [cssLoader,postCssLoader] if (loader) { loaders.push({ loader: loader + '-loader', options: Object.assign({}, loaderOptions, { sourceMap: isDev }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateExtractLoaders (baseLoader) {\n // Ignore the style loader (the first item), extractText doesn't need it\n var loaders = baseLoader.split('!').slice(1)\n\n // Get their plugin names and source maps\n return loaders.map(function (loader) {\n return loader + '-loader' + (SOURCE_MAP ? '?source...
[ "0.7097612", "0.66899395", "0.65110594", "0.6465504", "0.6258431", "0.6010432", "0.5984854", "0.59450746", "0.5914225", "0.5876885", "0.5864139", "0.58447176", "0.58063155", "0.57963324", "0.5714089", "0.5599972", "0.5590975", "0.5579531", "0.555193", "0.55507267", "0.5535340...
0.55011874
22
Emits a log message to the console.
log(level, message, extraInfo) { if ((0, logging_1.logLevelSeverity)(level) >= (0, logging_1.logLevelSeverity)(__classPrivateFieldGet(this, _Client_logLevel, "f"))) { __classPrivateFieldGet(this, _Client_logger, "f").call(this, level, message, extraInfo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "log(message) {\n this.stream.write((new Date()).toUTCString() + \" ------ \" + message + \"\\n\");\n this.emit('log', message);\n }", "log (message) {\n this.getConsole().showMessage(message);\n }", "function log() {\n var objs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n ...
[ "0.7299146", "0.7243611", "0.6986023", "0.6982114", "0.6894218", "0.6894218", "0.6887443", "0.6858936", "0.6855277", "0.6852113", "0.6852113", "0.68519455", "0.68457943", "0.68237346", "0.68237346", "0.67943", "0.67900395", "0.6780896", "0.6741777", "0.67223793", "0.6720877",...
0.0
-1
Transforms an API key or access token into a headers object suitable for an HTTP request. This method uses the instance's value as the default when the input is undefined. If neither are defined, it returns an empty object
authAsHeaders(auth) { const headers = {}; const authHeaderValue = auth !== null && auth !== void 0 ? auth : __classPrivateFieldGet(this, _Client_auth, "f"); if (authHeaderValue !== undefined) { headers["authorization"] = `Bearer ${authHeaderValue}`; } return headers; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async _defaultHeaders(headers = {}) {\n let newHeaders = Object.assign(headers, {\n Authorization: `Bearer ${(await Login.tokens()).access_token}`,\n });\n return newHeaders;\n }", "prepareHeaders(value = null) {\n const headers = {\n API_KEY: API.HOST_API_KEY // always send api k...
[ "0.654885", "0.65065837", "0.61355853", "0.5976861", "0.5959714", "0.5936714", "0.5783224", "0.5607589", "0.556974", "0.54544586", "0.54400766", "0.54378533", "0.54142433", "0.5412223", "0.539509", "0.5370538", "0.5350623", "0.5338816", "0.53290856", "0.5317778", "0.5273668",...
0.5312011
20
Get scalar between 0 and 1 based on mouse position in element
function getVelocityScalar (element, clientX) { var width = element.offsetWidth, leftSide = element.getBoundingClientRect().left; return (clientX - leftSide) / width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalize(mousePos) {\n const posOnOrigin = mousePos - this.slider.getBoundingClientRect().left; //Translated position on origin\n\n if (this.isBehindLowerLimit(posOnOrigin)) { //mouse is behind lower limit\n return 0; ...
[ "0.6802194", "0.6790664", "0.67010146", "0.6638168", "0.63888645", "0.62168574", "0.6214115", "0.620874", "0.6197", "0.61935127", "0.61898494", "0.61816037", "0.61734617", "0.6155172", "0.615382", "0.6132754", "0.6108427", "0.6070771", "0.6060658", "0.6040117", "0.6036851", ...
0.6437527
4
Hide control when scrolled all the way to the end
function updateControlVisability () { if (!didScroll) { return; } if (content.scrollLeft === 0) { leftEl.style.display = 'none'; } else { leftEl.style.display = 'block'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideScrollElem(){\n\t$('.dragger_container').hide(0)\n\t$(\".scrollUpBtn\").hide(0)\n\t$(\".scrollDownBtn\").hide(0)\n}", "function handleScrollStop() {\n scrollEngaged = false;\n}", "stop() {\n\t\tthis.scroll.stop();\n\t}", "function end(event) {\r\n\t\tvar el = event.target\r\n\t\tel.blur();\r\...
[ "0.6726268", "0.66817725", "0.6649691", "0.6581461", "0.6451372", "0.63648736", "0.63556045", "0.6304638", "0.62715155", "0.6259932", "0.62428844", "0.61829907", "0.61717117", "0.6144814", "0.6123726", "0.6107958", "0.6090189", "0.60758126", "0.606108", "0.60537875", "0.60209...
0.0
-1
A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this proc...
function happyNumber(n) { while(n !== 1) { n = n.toString().split('').map(a => a*a).reduce((x, y) => (x + y))} return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isHappy(n){\n let a = n.toString();\n let sum = 0;\n for (let digit of a) {\n let product = digit * digit;\n sum += product;\n }\n if (sum === 1) {\n return true;\n } else {\n return isHappy(sum);\n }\n}", "function isHappy(n) {\n let set = new Set()\n while(n != 1) {\n let...
[ "0.75011486", "0.7327769", "0.6792056", "0.660205", "0.641511", "0.6352151", "0.627131", "0.62252057", "0.61079353", "0.604535", "0.6023613", "0.59819746", "0.5981953", "0.5979863", "0.597401", "0.59496266", "0.59410703", "0.588869", "0.58883226", "0.588421", "0.5867044", "...
0.8048565
0
salva um registro no IndexedDb
function addDataIndexedDb(dataJson){ var date = dataJson.date; var description = dataJson.description; var value = dataJson.value; var transaction = db.transaction([constDbObject],"readwrite"); transaction.oncomplete = function(event) { console.log("Sucesso :)"); }; transaction....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSauvegarde(id,nbCoupe,aireAtteinte,temps,score) {\n // création d'un objet contenant les données\n // il sert d'\"enregistrement\" dans la base\n var sauvegarde = {\n\t\tid:id,\n nbCoupe: nbCoupe,\n aireMinimaleAtteinte: aireAtteinte,\n\t\ttemps:temps,\n\t\tscore:score\n }...
[ "0.7209134", "0.6605569", "0.65379083", "0.65260077", "0.64393204", "0.63649654", "0.634962", "0.627919", "0.61195225", "0.61022764", "0.6100517", "0.60938764", "0.6090512", "0.6067234", "0.60637563", "0.6039262", "0.6038369", "0.60263157", "0.6017888", "0.60032165", "0.60007...
0.6615429
1
limpa todos os registros do IndexedDb
function removeAllRegistrosIndexedDb() { registros = []; var request = db.transaction([constDbObject], "readwrite") .objectStore(constDbObject) .clear(); request.onsuccess = function(event) { fillTable(registros); drawGraficos(registros); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async index ( where = {} ) {\n const registers = await db[this.model].findAll({ where: { ...where } });\n if(!registers)\n throw Errors.NotFoundException('register not found')\n return registers\n }", "function cargaDatos(){\n\tdb.transaction(cargaRegistros, errorDB);\n}", "f...
[ "0.5880776", "0.5798108", "0.57289743", "0.56941795", "0.56633705", "0.5647115", "0.56012094", "0.55770797", "0.54943573", "0.5468644", "0.54613817", "0.5458838", "0.54465926", "0.5445279", "0.5422482", "0.54109645", "0.54062253", "0.5398846", "0.5372704", "0.53624684", "0.53...
0.66978467
0
Table name is the only required property.
static get tableName() { return 'brand'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get tableName() {\n if (this.table !== undefined) {\n return this.table.name\n }\n }", "static get tableName() {\n return '' + PREFIX + 'employees';\n }", "getTableName() {}", "static get tableName() {\n return '' + PREFIX + 'loss_of_consciousness';\n }", "static get tableName() {\n ...
[ "0.802687", "0.7789699", "0.7737943", "0.7640535", "0.75245225", "0.73386806", "0.7333709", "0.7221346", "0.7212838", "0.71973014", "0.71959245", "0.7143025", "0.71331924", "0.7093755", "0.7063128", "0.70494354", "0.7035943", "0.6948648", "0.69469297", "0.6933278", "0.6897715...
0.715832
11
This object defines the relations to other models.
static get relationMappings() { return { stores: { relation: Model.HasManyRelation, // The related model. This can be either a Model subclass constructor or an // absolute file path to a module that exports one. We use the file path version // here to prevent require loops. modelClass: getModel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n this.lectures = this.hasMany(models.Lecture, { foreignKey: 'lectureId' });\n this.module = this.belongsTo(models.Module, { foreignKey: 'id' });\n this.quiz = this.hasOne(models.Quiz, { foreignKey: 'lectureGroupId' });\n }", "get relations () {\...
[ "0.6739632", "0.67277414", "0.6565137", "0.65439147", "0.6532572", "0.64931107", "0.6490322", "0.64894485", "0.648", "0.6471423", "0.646265", "0.6460769", "0.645274", "0.6448185", "0.6434868", "0.64329445", "0.6419785", "0.641965", "0.6417124", "0.6396574", "0.63895756", "0...
0.0
-1
Signature a la souris
initMouse() { this.canvas.addEventListener("mousedown", (e) => this.start(this.getPositionSouris(e))); this.canvas.addEventListener("mouseup", (e) => this.stop()); this.canvas.addEventListener("mousemove", (e) => this.move(this.getPositionSouris(e))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeSignature(params) {\n\tif (!params) return \"()\";\n\tvar signature = \"(\"\n\t+\n\tparams.filter(\n\t\tfunction($) {\n\t\t\treturn $.name.indexOf(\".\") == -1; // don't show config params in signature\n\t\t}\n\t).map(\n\t\tfunction($) {\n\t\t\treturn $.name;\n\t\t}\n\t).join(\", \")\n\t+\n\t\")\";\n\...
[ "0.60013825", "0.5757865", "0.5516237", "0.5448629", "0.5257952", "0.5255334", "0.52219224", "0.52197003", "0.5188639", "0.5185372", "0.5144719", "0.51335114", "0.51055086", "0.50911427", "0.5061742", "0.5001347", "0.4997836", "0.49959144", "0.4950724", "0.49175897", "0.49162...
0.0
-1
Recuperation de la position du curseur par rapport au Canvas
getPosition(pos) { //getBoundingClientRect() renvoie la taille du canvas et sa position par rapport au viewport. const canvas = this.canvas.getBoundingClientRect(); const x = (pos.x - canvas.left) / (canvas.right - canvas.left) * this.canvas.width; //récupère la position exacte de la souris (pos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurPos() {\n let xPos = event.offsetX;\n let yPos = event.offsetY;\n //for each selected==true ? card chang its position : nothing\n player.cards.onHand.forEach(element => {\n if (element.selected) {\n element.speaking = false;\n let distanceX = element.width / 2;\n let distanceY ...
[ "0.6795464", "0.64519906", "0.63844967", "0.62826693", "0.62710536", "0.6181002", "0.6123499", "0.6112078", "0.61080563", "0.60826063", "0.60665166", "0.60447335", "0.6027969", "0.60250103", "0.6000614", "0.59977883", "0.5997622", "0.59800065", "0.5978483", "0.5959708", "0.59...
0.62642866
5
Effacement de la Signature
clearCanvas() { this.effacerButton.addEventListener('click', (e) => { e.preventDefault(); this.validerButton.style.display = 'none'; //0 = décalage gauche Canvas, 0 = décalage Top idem, width && height du rectangle a effacer this.context.clearRect(0, 0, this.canva...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signTheFile() {\n var plaintext = document.querySelector('.output').value\n // initialize\n var sig = new KJUR.crypto.Signature({\"alg\": \"SHA1withRSA\"});\n // initialize for signature generation\n sig.init(object_2.private_key); // rsaPrivateKey of RSAKey object\n ...
[ "0.7144011", "0.6511781", "0.64675677", "0.64249206", "0.6360391", "0.6360391", "0.6338543", "0.6315056", "0.6257392", "0.62405246", "0.62196976", "0.6171038", "0.6154192", "0.6133014", "0.6122558", "0.61215657", "0.60978734", "0.6096518", "0.60953677", "0.6091026", "0.608242...
0.0
-1
This function analyzes the type of a boolean expression node and checks if it is allowed. It can recurse when checking nested logical operators, so that only the outermost expressions are reported.
function checkNode(node, isRoot = false) { // prevent checking the same node multiple times if (checkedNodes.has(node)) { return false; } checkedNodes.add(node); // for logical operator, we also check its operands if (node.ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseBooleanExpr() {\n CST.addBranchNode(\"BooleanExpression\");\n if (match([\"T_openList\"], false, false)) {\n parseExpr();\n if (match([\"T_boolop\"], false, false)) {\n parseExpr();\n if (match([\"T_closeList\"], false, false)) {\n log(\"Boolea...
[ "0.7288744", "0.6997681", "0.6723497", "0.662752", "0.6444368", "0.62344176", "0.6067088", "0.60571134", "0.6034402", "0.5916351", "0.58508396", "0.57930696", "0.57920396", "0.57920396", "0.5711017", "0.55161", "0.5497234", "0.54703325", "0.5462327", "0.53916526", "0.5377291"...
0.7363708
0
Check union variants for the types we care about
function inspectVariantTypes(types) { const variantTypes = new Set(); if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.VoidLike))) { variantTypes.add('nullish'); } if (types.some(type => tsut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function containsUnion( pwf ) {\n if( typeof pwf == 'number' ) {\n return false;\n } else {\n return (('op' in pwf) && (pwf.op == 'U')) || containsUnion( pwf.op1 ) || containsUnion( pwf.op2 );\n }\n }", "function extractUnionInfo(ctx, idlType, errPrefix) {\n const seen = {\n s...
[ "0.64827573", "0.62005866", "0.6098891", "0.5889174", "0.58012545", "0.57996345", "0.57996345", "0.5683944", "0.56431204", "0.56211275", "0.5612902", "0.55170196", "0.5504773", "0.5504773", "0.5487926", "0.5476923", "0.5476866", "0.5476866", "0.5476866", "0.5476866", "0.54735...
0.70339906
0
Write a function isPalindrome(x) that returns true if x is a palindrome, otherwise false. Palindromes are words that are the same going forwards and backwards. Examples: i dod meeteem TrickirT
function isPalindrome(string){ return string === string.split('').reverse().join(''); //I DID IT BY MYSELF!! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPalindrome(x) {\n return x.toLowerCase() === x.toLowerCase().split('').slice().reverse().join('') ? true : false;\n}", "function isPalindrome(x) {\n let rev=x.toLowerCase().split('').reverse().join('');\n return x.toLowerCase()===rev? true:false;\n}", "function isPalindrome(x) {\r\n // your co...
[ "0.8707449", "0.8652421", "0.851809", "0.8503428", "0.8499106", "0.83536744", "0.8281187", "0.82747406", "0.82653", "0.8261718", "0.8256508", "0.82184976", "0.82108533", "0.8184576", "0.8183864", "0.8180094", "0.8171553", "0.8139814", "0.8135522", "0.8132781", "0.81213015", ...
0.7831775
85
We're using the apply function on test2 and giving it the argument of confusing, confusing is given the array of ['foo', 'bar']. 1. Create a simple constructor function called `Foo` and create a new instance from it called `foo`. DONE
function Foo(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyNew(args){\n\t\t// create an object with ctor's prototype but without\n\t\t// calling ctor on it.\n\t\tvar ctor = args.callee, t = forceNew(ctor);\n\t\t// execute the real constructor on the new object\n\t\tctor.apply(t, args);\n\t\treturn t;\n\t}", "function applyNew(args){\n\t\t// create an objec...
[ "0.52865493", "0.52865493", "0.52865493", "0.5154802", "0.5129642", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", "0.5093455", ...
0.0
-1