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
set the value of global variable theta
function setTheta(deltaTheta){ theta = theta + deltaTheta; if (theta > 360) theta -= 360; else if (theta < 0) theta += 360; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_theta_factor() {\n THETA_VAR = parseFloat(theta_factor.value);\n main();\n}", "set fTheta(fTheta) {\n q.push({sTextToSpeak: \"Setting theta to \" + fTheta.toString() + \" degrees.\"});\n if (this.bWithBoard) {\n this.oThetaServo.to(fTheta);\n }\n }", "function getTheta(){\n ret...
[ "0.7735826", "0.6861087", "0.6843823", "0.6413914", "0.6343398", "0.6000821", "0.5973762", "0.5942611", "0.5821589", "0.57625484", "0.57174885", "0.5627691", "0.5537612", "0.55223936", "0.5519479", "0.5516991", "0.542308", "0.5416975", "0.5415485", "0.5355601", "0.5334803", ...
0.6997979
1
translate object in vertical direction a TRUE direction will translate the object in a positive direction along the window Y axis a FALSE direction will translate the object in a negative direction along the window Y axis
function vertical(direction){ // w and s key // console.log(String.fromCharCode(key)); if(index != vCount) return; var thetaRadian = toRadians( theta ); // making adjustment for the rotation. var tX = 1 * Math.sin(thetaRadian) * displacementY[1]; // x component of transfromation var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translateDown() {\n console.log('translate down triggered');\n var m = new THREE.Matrix4();\n m.set( 1, 0, 0, 0,\n 0, 1, 0, -3.5,\n 0, 0, 1, 0,\n 0, 0, 0, 1 );\n geometry.applyMatrix(m);\n // render\n render();\n}", "move2_to_3() {\n ...
[ "0.6541411", "0.64723545", "0.6455451", "0.64016205", "0.63810015", "0.63573885", "0.63398695", "0.63333577", "0.6331971", "0.63278097", "0.6258686", "0.61238694", "0.61162406", "0.6110989", "0.6105777", "0.6099997", "0.60339636", "0.60062563", "0.60014814", "0.5987643", "0.5...
0.681687
0
translate object in horizontal direction a TRUE direction will translate the object in a positive direction along the window X axis a FALSE direction will translate the object in a negative direction along the window X axis
function horizontal(direction){ // a and d key // console.log(String.fromCharCode(key)); if(index != vCount) return; var thetaRadian = toRadians( theta ); // making adjustment for the rotation. var tX = Math.cos(thetaRadian) * displacementX[0]; // x component of transfromation var t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeDirectionX () {\n this.direction.dirX = -this.direction.dirX\n }", "function translateLeft() {\n console.log('translate left triggered');\n var m = new THREE.Matrix4();\n m.set( 1, 0, 0, -7.5,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1 );\n geo...
[ "0.6820463", "0.6653368", "0.6569077", "0.6400846", "0.6332554", "0.63147676", "0.63003165", "0.62541395", "0.624811", "0.6229392", "0.62207216", "0.6210896", "0.6177144", "0.61668056", "0.6127856", "0.6120829", "0.61141104", "0.6095776", "0.60896814", "0.60751504", "0.606624...
0.6714826
1
UTILITY FUNCTIONS BELOW // / reports the current state information to the console
function state(){ // logs current state to console console.log("vertices length is " + vertices.length); console.log("index is " + index); console.log("vCount is set to " + vCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "printState() {\n console.log(this.state.pos)\n console.log(this.state.dir)\n }", "function status() {\n console.log(`Active : ${game.active}`)\n console.log(`Points : ${game.points}`)\n console.log(`Strikes : ${game.strikes} out of ${game.maxStrikes}`)\n console.log(`Passes ...
[ "0.6957669", "0.689171", "0.6876164", "0.6863667", "0.6778996", "0.67192644", "0.6690103", "0.66865027", "0.663516", "0.65368104", "0.65340245", "0.6499333", "0.6499333", "0.64972734", "0.6424862", "0.64091533", "0.6400546", "0.63507146", "0.63351965", "0.6241464", "0.6241464...
0.70574635
0
reports the contents of an array to the console
function showArray(arr){ for ( i = 0; i < arr.length; i++ ) { console.log("vertices["+ i +"] = "+ arr[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printArray(arr) {}", "function arrayOutput(a) {\n\t\tfor (var i=0; i<a.length; i++) {\n\t\t\tdocument.writeln(a[i]+'<br>');\n\t\t}\n\t}", "function dumpArray(array) {\n console.log('[');\n array.forEach(function(value){\n console.log(' ' + value);\n });\n console.log(']');\n}", ...
[ "0.7888121", "0.77403843", "0.76980966", "0.76108414", "0.76106566", "0.7553163", "0.7496922", "0.7452959", "0.739839", "0.73815364", "0.73799646", "0.7283894", "0.72079", "0.71994257", "0.7186775", "0.7114178", "0.71046317", "0.70788777", "0.7048414", "0.7030565", "0.7019009...
0.67297184
39
reports current location to console u is generally the vec3() trans variable
function showLocation(u) { // logs selected vertex information to console console.log("[" + u[0] + ":" + u[1] + ":" + u[2] + "]" ); console.log(u.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumpVector3( v )\n{\n\tlog('d vector3 x:' + v.x +' y:' + v.y + ' z:'+v.z );\n}", "function location(x,y) {\n\tvar z = x + \" \" + y;\n\tconsole.log(z);\n}", "function showPosition3D(currentLat, currentLong, currentCity) {\n // console.log(\"currentLat, currentLong, currentCity:\", currentLat, current...
[ "0.6430602", "0.6374805", "0.6181804", "0.6175", "0.61095357", "0.61060566", "0.6005544", "0.6002945", "0.59136724", "0.58730197", "0.58475053", "0.57953936", "0.5791583", "0.57870644", "0.5785791", "0.5764057", "0.57527834", "0.57447976", "0.57400304", "0.5728101", "0.572016...
0.73294646
0
reports contents of edges array to console
function build_list_of_lines(){ var count = 0; if (edges.length > 0){ do { showArray(edges[count]); count++; }while (count != edges.length); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printEdges(edges) {\r\n let str = '';\r\n edges.forEach((e, i) => {\r\n if (i === 0)\r\n str += `${e.startNode}`;\r\n str +=` -> ${e.endNode}`;\r\n });\r\n console.log(str);\r\n}", "printGraph() {\n for (const [node, edges] of this.adjacencyList.entries()) {\n console.lo...
[ "0.7825359", "0.71725386", "0.6772794", "0.6665541", "0.66137916", "0.6455229", "0.6455229", "0.64460015", "0.6412454", "0.6151966", "0.6148879", "0.61197907", "0.608978", "0.6061931", "0.60433114", "0.5998678", "0.58474225", "0.5821047", "0.5821047", "0.5821047", "0.57966584...
0.65076905
5
outputs current transformation details to the html 'where' element
function whereami(){ console.log("Where am I?"); var where = trans + " @ " + theta; console.log(where); console.log("**************"); transList.push(where); var locDis = ""; for (var i = 0; i < transList.length; i++ ) { if (i % 6 == 0 ) locDis = ""; locDis ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outputFilter(text) {\n return text.formatHTMLOutput();\n }", "function findPoisOnScreen(writer, refPoint, maxDist, distanceUnit) {\n\t\t\tif (refPoint && refPoint.length > 0) {\n\t\t\t\trefPoint = refPoint[0];\n\t\t\t}\n\n\t\t\t//<xls:WithinDistance>\n\t\t\twriter.writeStartElement('xls:WithinDistan...
[ "0.5173118", "0.5061795", "0.50143665", "0.4984969", "0.48721516", "0.48080343", "0.47904748", "0.47654417", "0.4712196", "0.47096476", "0.46986243", "0.4640459", "0.46036413", "0.4594417", "0.45771542", "0.45655638", "0.4476204", "0.44533035", "0.44383338", "0.4427236", "0.4...
0.44708878
17
update the HTML element with the text argument
function setHtmlDetails(text){ document.getElementById("where").innerHTML = text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateText(elementID, text){\n \n}", "updateText(text) {\n\t\tthis.text = text;\n\t}", "update (text) {\n if (text !== this.text) {\n this.text = text\n this.element.innerText = this.text // Directly update the element\n }\n return false // Don't call ...
[ "0.8410958", "0.79385686", "0.75464034", "0.7374517", "0.7233883", "0.7152984", "0.71517104", "0.7126928", "0.70406526", "0.69999146", "0.6933557", "0.6932956", "0.69219786", "0.6889872", "0.6885302", "0.6878389", "0.68774736", "0.6873795", "0.68572086", "0.6849084", "0.68352...
0.681851
21
Make sure to remove any empty entries, or else we'll accidentally match the current directory.
function getPatternsArrayFromInput(pattern) { return pattern.split(";").map(x => x.trim()).filter(x => !!x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialClean() {\n\t\treturn del(['dist/*']);\n}", "async clearWorkingDir() {\n for (const file of await this.list()) {\n if (file.isDirectory) {\n await this.cd(file.name);\n await this.clearWorkingDir();\n await this.cdup();\n ...
[ "0.64680487", "0.6400397", "0.63545686", "0.6299002", "0.62834686", "0.6275919", "0.62399405", "0.62327373", "0.61992794", "0.61795723", "0.6174399", "0.61358726", "0.61358726", "0.6113122", "0.6106489", "0.60824406", "0.6079887", "0.6077245", "0.6071656", "0.6057568", "0.604...
0.0
-1
Attempts to resolve paths the same way the legacy PowerShell's FindFiles worked
function resolveFilterSpec(filterSpec, basePath) { let patterns = getPatternsArrayFromInput(filterSpec); let result = new Set(); patterns.forEach(pattern => { let isNegative = false; if (pattern.startsWith("+:")) { pattern = pattern.substr(2); } else if (pattern....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolve(...paths) {\n // first figure out the minimum number of paths we have to test\n // we always start at cwd, but any absolutes will bump the start\n let r = '';\n for (let i = paths.length - 1; i >= 0; i--) {\n const p = paths[i];\n if (!p || p === '.')\n ...
[ "0.72714174", "0.6874561", "0.6818129", "0.67982405", "0.6761172", "0.6761172", "0.6761172", "0.6736043", "0.67200685", "0.66734356", "0.6668371", "0.6632882", "0.6632882", "0.6632882", "0.6620997", "0.6619295", "0.6619295", "0.6619295", "0.6619295", "0.6619295", "0.6368909",...
0.0
-1
Image Loading Initializes all listeners and classes to enable the image loading.
function initImageLoading() { var imageBox = document.querySelector('.image_box'); var fileChooser = imageBox.querySelector('.box_file'); if(advancedLoad) { imageBox.className += " advanced"; initDragDropListeners(imageBox); } imageBox.addEventListener('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImage() {\n\t\t\tthis.loading = 'eager';\n\t\t\tif( this.src )\n\t\t\t\tthis.src = this.src;\n\t\t\tif( this.srcset )\n\t\t\t\tthis.srcset = this.srcset;\n\t\t}", "function _onImageLoaded() {\n _imagesToLoad = _imagesToLoad - 1;\n if (!_imagesToLoad) {\n $$log(\"All images loaded, renderi...
[ "0.72494805", "0.7246297", "0.72442156", "0.7149063", "0.7140148", "0.71361506", "0.7089172", "0.70200974", "0.7010466", "0.6965771", "0.69392353", "0.6933771", "0.69152564", "0.6900076", "0.6898581", "0.6873324", "0.68649364", "0.68525237", "0.68518215", "0.68518215", "0.683...
0.8119434
0
General Buttons Inits the general button listeners. These are visible on nearly every tab.
function initGeneralButtonListeners() { var generalButtons = document.querySelector('.general_buttons'); generalButtons.querySelector('.back').addEventListener('click', onBack); generalButtons.querySelector('.pin_add').addEventListener('click', onAddPin); generalButtons.querySelector('.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initButtons() {\n var $exportButton = $(\"#export-link\");\n $exportButton.on('click', function(evt) {\n exportCookieCSV(SELECTED_SITES_CSV_URL+\"/\"+site+ \"/cookie_consent_log.csv\");\n });\n\n var $backButton = $('#perc-cookie-back-button');\n $backButton.o...
[ "0.6852776", "0.6794273", "0.6693646", "0.66817284", "0.6604177", "0.6601506", "0.64941573", "0.648507", "0.6335016", "0.6311399", "0.629571", "0.62897086", "0.6253231", "0.6224409", "0.62077415", "0.6180384", "0.6165571", "0.6148294", "0.6143253", "0.61354584", "0.60738194",...
0.7976039
0
Called when the `Back` button is clicked.
function onBack() { resetPageState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function OnBtnBack_Click( e )\r\n{\r\n Back() ;\r\n}", "function O...
[ "0.80949384", "0.80949384", "0.80949384", "0.80949384", "0.80949384", "0.80949384", "0.8017107", "0.7996234", "0.79841316", "0.7983686", "0.79398155", "0.7915122", "0.7906518", "0.7906518", "0.7906518", "0.7892233", "0.78896254", "0.78841347", "0.7873977", "0.78611827", "0.78...
0.81815124
0
Called when the `Show Source` button is clicked.
function onShowSource() { resetPageState(); document.querySelector('.source_con > .source').value = generateClickimageSource(true); document.querySelector('.page').classList.add('source'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup_showSource() {\n\tdocument.getElementById(\"basic\").style.display = \"none\";\n\tdocument.getElementById(\"create\").style.display = \"none\";\n\tdocument.getElementById(\"source\").style.display = \"block\";\n\tdocument.getElementById(\"info\").style.display = \"none\";\n}", "function SP_Display...
[ "0.7576856", "0.72679305", "0.70488024", "0.6522176", "0.6516131", "0.645158", "0.64471704", "0.623081", "0.6196938", "0.6085117", "0.604453", "0.60032403", "0.59488815", "0.59419733", "0.59402263", "0.5933399", "0.59092396", "0.58342737", "0.57869834", "0.5774945", "0.577494...
0.77441955
0
Called when the `Demo` button is clicked.
function onShowDemo() { resetPageState(); var demoCon = document.querySelector('.demo_con'); demoCon.innerHTML = generateClickimageSource(); var img = demoCon.querySelector('img'); img.src = document.querySelector('.image_wrap .image_con img').src; // from clickimage.js...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDemo() {\n View.set('Demo');\n }", "function listenDemo() {\n $('.open-demo').on('click', event => {\n $('.demo-container').removeClass('hidden');\n $('.open-demo').addClass('hidden');\n closeDemo();\n });\n}", "function demoAction(button) {\n console.log(\"@demoAction...
[ "0.7165909", "0.6974119", "0.6329404", "0.6148802", "0.6106459", "0.6083937", "0.6039503", "0.5978561", "0.59748167", "0.5969245", "0.58485436", "0.58450246", "0.58180875", "0.580783", "0.57927746", "0.57883126", "0.5787259", "0.5772543", "0.57427204", "0.5733232", "0.5707676...
0.644844
2
Resets the tab state. Will display the main page and hide the `Source` and `Demo` tab.
function resetPageState() { var page = document.querySelector('.page'); page.classList.remove('source'); page.classList.remove('demo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset(tabs) {\n browser.tabs.removeCSS({code: hidePage}).then(() => {\n browser.tabs.sendMessage(tabs[0].id, {\n command: \"reset\",\n });\n });\n }", "function pageReset() {\n $('.tab-content').removeClass('expanded');\n $('.student-details').addClass('expanded');\...
[ "0.7049873", "0.6611842", "0.6507684", "0.64976716", "0.63871455", "0.62749153", "0.62470436", "0.62010044", "0.61864305", "0.61189467", "0.6118402", "0.6112722", "0.6020158", "0.6011387", "0.6010518", "0.6005631", "0.60051763", "0.59963596", "0.5971812", "0.5965046", "0.5949...
0.65992486
2
Add and Edit Pins Inits the main generator functions and listeners. So all the listeners necessary for the main page (after image loading) to work. Does not include specific `Source` or `Demo` functions besides the state change.
function initMainTab() { initPinButtonListeners(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initPinButtonListeners() {\n\n var imageWrap = document.querySelector('.image_wrap');\n\n imageWrap.addEventListener('click', onImageClick);\n imageWrap.addEventListener('mousedown', onImageMouseDown);\n imageWrap.addEventListener('mousemove', onImageMouseMove);\n imageW...
[ "0.635825", "0.62755144", "0.62406266", "0.6196022", "0.60566145", "0.60339963", "0.59355223", "0.58730704", "0.58637047", "0.58276457", "0.58231044", "0.580952", "0.5804638", "0.57992846", "0.5746461", "0.5744851", "0.5730507", "0.57246774", "0.57021916", "0.5666765", "0.566...
0.56040955
29
Inits tall the listeners necessary for the main page (after image loading) to work. Does not include specific `Source` or `Demo` functions besides the state change.
function initPinButtonListeners() { var imageWrap = document.querySelector('.image_wrap'); imageWrap.addEventListener('click', onImageClick); imageWrap.addEventListener('mousedown', onImageMouseDown); imageWrap.addEventListener('mousemove', onImageMouseMove); imageWrap.addEvent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n setupThumbnailGallery(0);\n bindEvents();\n }", "function init(){\n\tl1.addEventListener(\"click\", slidePages, false);\n\tl2.addEventListener(\"click\", slidePages, false);\n\tl3.addEventListener(\"click\", slidePages, false);\n\tl4.addEventListener(\"click\", sl...
[ "0.7250126", "0.7235683", "0.7206731", "0.71901524", "0.70669276", "0.7061665", "0.699887", "0.69151783", "0.6911573", "0.68802947", "0.68800884", "0.6853174", "0.6837219", "0.6829019", "0.6737704", "0.67309844", "0.67235285", "0.66717577", "0.6671434", "0.667054", "0.6667503...
0.691708
7
Called whenever the `.image_wrap` is clicked. Might be called before an image is loaded.
function onImageClick(event) { var imageWrap = document.querySelector('.image_wrap'); if(!imageWrap.classList.contains('image_displayed')) return; if(imageWrap.classList.contains('positioning')) { var posRel = getPositionRel(event, document.querySelector('.image_wrap .image_con')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "imageClickHandler() {\n\t\tconst {data} = this.props,\n\t\t\tlistOfPhotos = document.querySelector('.gallery__photo-list');\n\n\t\tlistOfPhotos.addEventListener('click', e => {\n\t\t\tconst {target} = e,\n\t\t\t\t{imageMinId: id} = target.dataset;\n\n\t\t\tif (target.tagName !== 'IMG') return;\n\t\t\tthis.props.cu...
[ "0.704371", "0.698506", "0.68895817", "0.6835499", "0.68320984", "0.6784088", "0.6738271", "0.6716512", "0.6608396", "0.6595607", "0.6556761", "0.64340144", "0.63658607", "0.6350669", "0.6272776", "0.6250341", "0.6236231", "0.62359524", "0.6234969", "0.6185427", "0.61814183",...
0.73173606
0
Removes all created pins.
function removeAllPins() { var pins = document.querySelectorAll('.image_wrap .image_con > .image_pin'); for(var i = 0; i < pins.length; i++) { removePin(pins[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanUp(pins){\n\tfor(var pin of pins){\n\t\twpi.pinMode(pin, wpi.INPUT);\n\t}\n}", "closePins() {\n gpio.destroy(function() {\n console.log('All pins unexported');\n });\n }", "function deleteMarkers() {\r\n setMapOnAll(null);\r\n markers = [];\r\n }", "function clearMarkers() ...
[ "0.7058996", "0.62381446", "0.61519635", "0.60721135", "0.60417765", "0.60401994", "0.6036969", "0.6026102", "0.6017994", "0.59927934", "0.5991069", "0.59549075", "0.5953697", "0.5953697", "0.5953697", "0.5940379", "0.5938304", "0.5937059", "0.59288335", "0.59288335", "0.5928...
0.74605095
0
Rearranges all pins to fill gaps. e.g. [1, 2, 4, 7] will be rearranged to [1, 2, 3, 4].
function rearrangePinIndices() { var pins = document.querySelectorAll('.image_wrap .image_con > .image_pin'); var pinsArray = Array.prototype.slice.call(pins, 0); pinsArray.sort(function(a, b) { return (a.dataset.pinIndex ? parseInt(a.dataset.pinIndex, 10) : Number.MAX_VALUE) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rearrangeArrayAlternately(arr) {\n for (let i = 0; i < arr.length; i = i + 2) {\n let max = arr.pop();\n let min = arr.splice(i, 1);\n if (min.length > 0) {\n arr.splice(i, 0, max, min[0]);\n } else {\n arr.push(max);\n }\n }\n return arr;\...
[ "0.6148624", "0.5889792", "0.58157295", "0.5700697", "0.5680794", "0.5614802", "0.56098616", "0.5584785", "0.5570951", "0.5531556", "0.5507182", "0.54842687", "0.547698", "0.54694635", "0.5448189", "0.54294455", "0.5374234", "0.53722197", "0.5371925", "0.5366553", "0.53618646...
0.6948261
0
Calculate the first unique pin index counting from 1. e.g. given the currently set pins [1, 2, 4, 5] it would be 3.
function getFirstUniqueIndex() { for(var i = 1; i < Number.MAX_VALUE; i++) { if(!document.querySelector('.image_wrap .image_con > .image_pin[data-pin-index="' + i + '"]')) { return i; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstDuplicateValue(array) {\n // Since all of the values are between 1 and N. \n for(let i = 0; i < array.length; i++) {\n\t\tlet map_index = Math.abs(array[i]) - 1; \n\t\tif(array[map_index] < 0) return map_index + 1;\n\t\telse array[map_index] *= -1; \n\t}\n\treturn -1; \n}", "function missingI...
[ "0.6423466", "0.622381", "0.61884546", "0.60799956", "0.604453", "0.5995963", "0.5991418", "0.59761137", "0.5946083", "0.5911252", "0.58807415", "0.58805424", "0.5870883", "0.5843902", "0.58390874", "0.58251804", "0.5801235", "0.5799744", "0.578629", "0.5784443", "0.57620555"...
0.7829519
0
Will reset the image edit state. Removing all editing states like `positioning`, `selecting`, `moving` and removing all `.pin_selection` elements.
function resetImageState() { var imageWrap = document.querySelector('.image_wrap'); imageWrap.classList.remove("positioning"); imageWrap.classList.remove("selecting"); imageWrap.classList.remove("moving"); var pinSelections = document.querySelectorAll('.pin_selection'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetToNoneState() {\n // clear text editing mode\n if (state == STATE_TEXT_EDITING) {\n currentTextEditor.destroy();\n currentTextEditor = null;\n }\n\n // deselect everything\n selectedFigureId = -1;\n selectedConnectionPointId = -1;\n selectedConnectorId = -1;\n se...
[ "0.7124184", "0.6881267", "0.66099364", "0.64619666", "0.64596224", "0.6437498", "0.6437498", "0.6437498", "0.63940436", "0.6379941", "0.6357179", "0.6324804", "0.62973166", "0.62868804", "0.62753433", "0.6268892", "0.62577623", "0.62563485", "0.62534285", "0.62210655", "0.62...
0.821311
0
source tab Initializes functions on the `Source` tab.
function initSourceTab() { initSourceListeners(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSourceListeners() {\n document.querySelector('.source_con .load').addEventListener('click', onSourceLoad);\n }", "function source_fn() {\n setVisibility(\"src\");\n inputType = \"Source\";\n}", "LoadSourceState() {\n\n }", "function recalculateSourceTab() {\r\n if (!currentFile...
[ "0.66609615", "0.6586775", "0.62506074", "0.61985826", "0.60971475", "0.60785276", "0.6034026", "0.5926736", "0.5841411", "0.57121575", "0.570856", "0.57079715", "0.57079715", "0.57079715", "0.56736606", "0.56590736", "0.56590736", "0.56520003", "0.5643641", "0.56411105", "0....
0.8388091
0
Initializes listeners on the `Source` tab.
function initSourceListeners() { document.querySelector('.source_con .load').addEventListener('click', onSourceLoad); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSourceTab() {\n initSourceListeners();\n }", "function init() {\n setupListeners();\n }", "initialize(){\n this.loadListeners()\n }", "_initListeners() {\n this._initResizeListener();\n this._initSwipe();\n }", "function init() {\r\n bindEventListeners...
[ "0.8927982", "0.7269509", "0.68809164", "0.67865145", "0.67652905", "0.6682423", "0.66190106", "0.6538194", "0.65178776", "0.65075433", "0.6497283", "0.6489554", "0.64816344", "0.64638734", "0.6410917", "0.6386988", "0.63743323", "0.6368242", "0.6363061", "0.6333453", "0.6323...
0.81963384
1
Called whenever the `Import Changes` button on the source tab is clicked.
function onSourceLoad() { var con = document.createElement('div'); con.innerHTML = document.querySelector('.source_con .source').value; // reset pins resetImageState(); removeAllPins(); try { var img = con.querySelector('img'); var coords = []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSourceTab() {\n initSourceListeners();\n }", "function filesSelected(event) {\n processImport(event.target.files, 0);\n}", "function handleFileImport(evt) {\n var file = evt.target.files[0];\n var reader = new FileReader();\n reader.onload = function(e) {\n editor.setValue...
[ "0.6416103", "0.64096135", "0.63768846", "0.6299419", "0.6145672", "0.6033199", "0.58086395", "0.5669444", "0.56025064", "0.55983526", "0.5587728", "0.5555834", "0.55394804", "0.55098367", "0.5470348", "0.54329807", "0.5419801", "0.541574", "0.5374503", "0.5361869", "0.534894...
0.0
-1
Generate the `datapins` string for the clickimage.js source code.
function generateDataPinString() { var string = ""; var pins = document.querySelectorAll('.image_wrap .image_con > .image_pin'); for(var i = 0; i < pins.length; i++) { if(i > 0) string += "; "; string += pins[i].style.left.replace(/%/, ''); string += ", "; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ScreenshotRawdata(){\nimagename = \"RawData.png\"\n\n\twebshot1(\"https://thegreatleadr.github.io/Github_Module/GitHub_FOLDER_RAWDATA/\", imagename, optionsRaw, (err) => {\n\tif(err){\n\t return console.log(err);\n\t}\n\t console.log(\"RawData succesfully created\");\n\t});\n}", "function n(e){return...
[ "0.5528021", "0.52740246", "0.5170505", "0.5138083", "0.51070154", "0.5017391", "0.50053436", "0.50026536", "0.5000125", "0.49964955", "0.49940854", "0.49795732", "0.4962767", "0.49415076", "0.49151793", "0.48986986", "0.48778865", "0.48608065", "0.48600766", "0.48476604", "0...
0.6210893
0
Generate the `.pininfo` children source code from the HTML contents.
function getPinInfoString() { var string = ""; var editPanels = document.querySelectorAll('.edit_con > .edit_panels > .edit_panel'); for(var i = 0; i < editPanels.length; i++) { var code = editPanels[i].querySelector('.pin_text').value.replace(/(\r?\n)/g, '$1 '); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divpopulation(finding, prop, i) {\n \"use strict\";\n var line, url, propnospace;\n\n propnospace = prop.replace(/\\ /g, ''); //Space in prop breaks classes\n propnospace = propnospace.replace(/\\./g, ''); //Dot breaks class attribute\n\n //Get the pricese url for the .java file\n line =...
[ "0.54603", "0.5162472", "0.50967115", "0.49728593", "0.49400422", "0.49213004", "0.49163607", "0.48193258", "0.48179764", "0.48071003", "0.47890252", "0.4787649", "0.47779927", "0.47544318", "0.4721252", "0.47204128", "0.47152528", "0.46869838", "0.4676435", "0.46530807", "0....
0.57702863
0
Helpers Returns if the device supports drag and drop.
function dragDropSupported() { var div = document.createElement('div'); return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_dnd_supported(){\r\nvar div = document.createElement('div');\r\n return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);\r\n}", "isDragAvailable() {\n return true;\n }", "isDragging() {\n const elem = DragAndDrop_1.DD._dragElements.get(this._id);\n r...
[ "0.78978306", "0.78703123", "0.72471035", "0.70142615", "0.7008551", "0.67688024", "0.67575055", "0.6716468", "0.6716468", "0.664366", "0.6616317", "0.6580207", "0.6580207", "0.65455544", "0.6476673", "0.64058656", "0.6384307", "0.63842005", "0.6374654", "0.63707274", "0.6370...
0.81175184
0
Returns if the device supports the `FileReader` class.
function fileReaderSupported() { return 'FileReader' in window; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFileReaderSupported(){\r\n if(typeof FileReader !== \"undefined\"){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "function fileSupport() {\n\t\tvar r = false, n = null;\n\t\ttry {\n\t\t\tif(FileReader) {\n\t\t\t\tvar n = document.createEleme...
[ "0.82397014", "0.7158248", "0.66728854", "0.65397394", "0.6535784", "0.6531999", "0.644891", "0.6396683", "0.6308418", "0.6274513", "0.6274513", "0.6255402", "0.61552554", "0.61356026", "0.61008656", "0.6073477", "0.60554975", "0.5955944", "0.5870766", "0.5862083", "0.5856882...
0.8248888
0
Remember user login (Auth)
function rememberLogIn() { // when dicumetn is ready run this function $(document).ready(function() { // get authToken from session Storage if (sessionStorage.getItem("authToken")) { // create ajax POST call $.ajax({ type: "POST", url: "/api/auth/refresh", dataType: "json...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rememberUser() {\r\n\tif(localStorage.remember) {\r\n\t\tgetId('name').value = localStorage.name;\r\n\t\tgetId('email').value = localStorage.email;\r\n\t\tgetId('phone').value = localStorage.phone;\r\n\t\tgetId('address').value = localStorage.address;\r\n\t\tgetId('remember').checked = localStorage.rememb...
[ "0.7580419", "0.72180456", "0.69671744", "0.6942343", "0.6889126", "0.68798137", "0.6867372", "0.68628854", "0.6764889", "0.67641515", "0.6669749", "0.66083854", "0.6540248", "0.65352035", "0.65193105", "0.6507945", "0.6502417", "0.6484847", "0.6396492", "0.6383975", "0.63093...
0.6128822
38
render html for Login page
function renderLoginPage() { return ` <section class="login-screen" aria-live="assertive"> <form role="form" class="login"> <fieldset name="login-info"> <div class="login-header"> <legend>Log In</legend> <hr class="style-two"> </div> <p id='notification'></p> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_login(username, password, error){\n return res.render('sign-in', {error1: '', error2: error, username: username, password: password})\n }", "function renderLogin(data, into) {\n\t\t\n\t\t//Add the template\n\t\tinto.innerHTML=`\n\t\t<h2>Lets login, shall we?</h2>\n\t\t<form action=${dat...
[ "0.7809806", "0.7510498", "0.72971463", "0.72009665", "0.71136826", "0.70579666", "0.7031154", "0.7026448", "0.69876075", "0.68947184", "0.6754391", "0.6726382", "0.66713375", "0.66142136", "0.6600911", "0.65821874", "0.6552901", "0.6548497", "0.65385956", "0.6508726", "0.650...
0.74078506
2
display Login page on document
function displayLoginPage() { // create variable that holds the render login page function const loginPage = renderLoginPage(); // select main page id and display html from render login page function $("#main-page").html(loginPage); $("#email").blur(); // select landing page class and prop method with hidde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n if(validateCredentials()){\n window.location.href = \"Om Gyldne.html\";\n } else {\n helptext.style.display = \"inline-block\";\n }\n}", "function _page(elem){\n return viewLib.page(\"loginPage\");\n }", "function login() {\n var loginWin = createLog...
[ "0.7276286", "0.7123506", "0.71122235", "0.7082735", "0.70713633", "0.70094615", "0.68683094", "0.6860847", "0.68527067", "0.68483543", "0.6800641", "0.6793783", "0.6793345", "0.67874974", "0.67720574", "0.67133516", "0.6663176", "0.6655453", "0.66520965", "0.6620342", "0.661...
0.66734475
16
create login btn function
function handleLoginButton() { // select main area class div with inputs and on click and look for nav-login link run e $(".main-area").on("click", ".nav-login", function(e) { console.log("Login button clicked"); // stop page from submitting e.preventDefault(); // excute display login function d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {}", "get btnLogin () { return $('#back-to-login') }", "function showLoginButton() {\n if (typeof showCustomLoginButton === \"function\") {\n showCustomLoginButton(true);\n return;\n }\n\n var loginText = document.createElement('a');\n loginText.href = \"#\";\n loginText.id = \"logi...
[ "0.75516915", "0.74419886", "0.7293163", "0.72829425", "0.72767895", "0.7217614", "0.72129756", "0.7176886", "0.7166448", "0.7162078", "0.7147816", "0.712903", "0.71269727", "0.7066069", "0.7020156", "0.70143974", "0.69960207", "0.6992007", "0.69900614", "0.6979676", "0.69764...
0.6379695
87
render sign up page
function renderSignupPage() { return ` <section class="signup-page-screen" aria-live="assertive"> <form role="form" class="signup"> <fieldset name="signup-info"> <div class="login-header"> <legend>Sign Up</legend> <hr class="style-two"> </div> <p id='notification'>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signupForm(req, res) {\n res.render('sign-up.ejs');\n}", "signup(request, response) {\n const viewData = {\n title: \"Login to the Service\",\n };\n response.render(\"signup\", viewData);\n }", "function studentSignup(req, res){\n res.render(\"signup\", {});\n}", "function goSignUp(...
[ "0.7671736", "0.73970014", "0.7381874", "0.7346967", "0.7165071", "0.7163047", "0.7142981", "0.70189625", "0.69342136", "0.6846703", "0.67404026", "0.67017764", "0.6650661", "0.65898967", "0.6507777", "0.6491317", "0.6448837", "0.6406624", "0.6400947", "0.6390356", "0.6385778...
0.68323946
10
create display sign up page like login
function displaySignupPage() { // create variable that holds the render sign up html const signupPage = renderSignupPage(); $(".landing-page").prop("hidden", true); // select main-page and display html from signup variable that holds the function $("#main-page").html(signupPage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goSignUp() {\n \n body.innerHTML = renderSignupDiv(first, \n last, email1, pass1, '', message1);\n assignListener('signup2');\n }", "function handleSignUp(e) {\n setVisible(false);\n setSignUp('true');\n }", "function loginAndSignUpDisplay (style1, style2) {\n ...
[ "0.7215295", "0.71765846", "0.6899365", "0.6844276", "0.68103963", "0.67941046", "0.67866224", "0.67324066", "0.6676403", "0.6632867", "0.6628834", "0.66247475", "0.658297", "0.6529164", "0.6514092", "0.6477209", "0.64034337", "0.63815534", "0.63790435", "0.6374582", "0.63552...
0.63074034
25
create sign up btn
function handleSignUpButton() { $(".main-area").on("click", ".nav-signup", function(e) { console.log("SignUp button clicked"); // stop from form submitting e.preventDefault(); // excute display signup page function that holds the html displaySignupPage(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _init_sign_up_button(){\n try{\n var sign_up_button = Titanium.UI.createButton({\n top:(self.screen_height/2)+100,\n title:'Sign-up',\n ...
[ "0.76984096", "0.73386604", "0.7180167", "0.6865664", "0.6845506", "0.6823226", "0.67522824", "0.67184466", "0.6646222", "0.660189", "0.65347445", "0.6510621", "0.6507006", "0.65015763", "0.64177144", "0.6389888", "0.63816446", "0.637795", "0.6363466", "0.63239074", "0.628998...
0.6000586
46
create sign up success function
function handleSignUpSuccess() { // select main-area div, when submit on wiht signup class run e function $(".main-area").on("submit", ".signup", function(e) { console.log("SignUp Success"); // stop from form submitting e.preventDefault(); //get values from sign up form const username = $("#emai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signUp(firstname, lastname, email, pass) {\n $.post('core/action-design.php', {\n 'act': 'signup',\n 'a': firstname,\n 'b': lastname,\n 'c': email,\n 'd': pass\n })\n .success(function(data) {\n if (data == 1) {...
[ "0.76115406", "0.7371523", "0.7368852", "0.7368852", "0.7296141", "0.72329634", "0.71940184", "0.7120944", "0.7097807", "0.70884836", "0.70805323", "0.7053904", "0.7041529", "0.70387095", "0.700761", "0.7007002", "0.69975376", "0.6984239", "0.6977464", "0.6976373", "0.695254"...
0.0
-1
Create render html user prolfile function with journal entries parameter
function renderUserDashboard(journalEntries) { return ` <div class="nav-bar"> <div class="nav-1"> <div class="nav-link"><a href="" class='my-journal-button'>My Profile</a></div> <div class="nav-link"><a href="" class="js-logout-button">Log out</a></div> </div> </div> <main role="main" class="user-dashb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userInformationHTML(user) { //the 'user' parameter here references the user object being returned from the github API. this contains information methods like user's name login name etc.\n//could console.log(user) to see all the different things in user object from github data API that you could display.\n...
[ "0.645605", "0.62892836", "0.60242796", "0.59300774", "0.58908933", "0.57639533", "0.5730362", "0.57221526", "0.571676", "0.57155627", "0.5682705", "0.5672477", "0.5644276", "0.56249684", "0.5613362", "0.56107527", "0.5567228", "0.55605006", "0.5556435", "0.5541256", "0.55353...
0.69664645
0
create display user profile function with journal entries parameter
function displayUserDashboard(journalEntries) { // create variable that holds render user profile function with journal entries parameter const userDashboard = renderUserDashboard(journalEntries); // select landing page and prop method $(".landing-page").prop("hidden", true); $(".main-nav-bar").prop("hidden",...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output_user_profile(res, login, userInfo, userInterests, userFriends, peopleWithSameInterests) {\n\tres.render('profile.jade',\n\t\t { title: \"Profile for User with login \" + login,\n\t\t\t userInfo: userInfo,\n\t\t\t userInterests: userInterests,\n\t\t\t userFriends: userFriends,\n\t\t\t peopleWithSa...
[ "0.6676784", "0.6257583", "0.620809", "0.60832363", "0.6083009", "0.6040686", "0.6024996", "0.5976668", "0.5957183", "0.5947702", "0.5936581", "0.59259284", "0.58816427", "0.5867985", "0.5850565", "0.5847782", "0.5835192", "0.58203083", "0.58000034", "0.57833016", "0.5775553"...
0.67064804
0
create get user profile function with user as parameter
function getUserDashboard(user) { // create ajax GET call $.ajax({ type: "GET", url: "/api/entries", dataType: "json", contentType: "application/json", headers: { Authorization: `Bearer ${jwt}` } }) .done(function(result) { console.log(result); // call display user da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserProfile(success, failure) {\n ApolloService.query({\n query: Queries.GET_USER_PROFILE\n }).then(data => { success(this.handleResponse(data.data.getUserProfile, \"user\")) }).catch(error => failure(error));\n }", "function user(){\r\n uProfile(req, res);\r\n }", "asy...
[ "0.75105613", "0.7388471", "0.72492117", "0.71724576", "0.7123708", "0.7101307", "0.70686305", "0.70660126", "0.7054089", "0.7021716", "0.7011864", "0.6999386", "0.69461155", "0.6932783", "0.6926796", "0.6906551", "0.68928814", "0.68865997", "0.68796355", "0.6877244", "0.6862...
0.0
-1
create login success function
function handleLoginSuccess() { // select main-area class div and when clicked on look for a submit and listen class and run e function $(".main-area").on("submit", ".login", function(e) { console.log("Login Success"); // stop from form submitting e.preventDefault(); // Get the inputs from the user ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {}", "function registerSuccessFn() {\n\t\t\t\t\tAuthentication.login($scope.username, $scope.password)\n\t\t\t\t\t\t.then(function (response) {\n\t\t\t\t\t\t\tAuthentication.setAuthenticatedAccount(response.data);\n\t\t\t\t\t\t\twindow.location = '/#/users/' + response.data.username;\n\t\t\t\t\t...
[ "0.7924098", "0.75803673", "0.7546586", "0.7462134", "0.7412197", "0.74013764", "0.72946507", "0.7273941", "0.72721386", "0.7252703", "0.72446084", "0.7242821", "0.71962523", "0.71813107", "0.71764916", "0.71677876", "0.715186", "0.7078554", "0.7069789", "0.70333076", "0.7027...
0.0
-1
create journal btn function
function handleMyJournalButton() { // select main-area class div when clicked on, look for my journal button class and run e function $(".main-area").on("click", ".my-journal-button", function(e) { console.log("My Journal button clicked"); // stop from form submitting e.preventDefault(); // select l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildNewJournalButton(){\n\tvar button = document.createElement(\"button\");\n\tvar buttonLabel = document.createTextNode(\"Add Journal\");\n\tbutton.appendChild(buttonLabel);\n\n\tbutton.addEventListener('click', function(event){\t\n\t\tvar journalData = new JournalData ();\n\t\tvar journalsRelation = us...
[ "0.7185586", "0.6664858", "0.65900075", "0.65675724", "0.65165687", "0.6485279", "0.62493247", "0.62357306", "0.6066126", "0.6060218", "0.60542446", "0.60208", "0.6016228", "0.59862566", "0.59846383", "0.5966831", "0.59620845", "0.5950906", "0.5946792", "0.593892", "0.5918827...
0.5688113
64
create add/edit render html entry function with parameter as entry = null
function renderAddEditEntry(entry = null) { return ` <div class="nav-bar"> <div class="nav-1"> <div class="nav-link"><a href="" class="my-journal-button">My Profile</a></div> <div class="nav-link"><a href="" class="js-logout-button">Log out</a></div> </div> </div> <main role="main" class="edit-journal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayAddEditEntry(entry = null) {\n console.log(entry);\n // create variable that holds the render entry function parameter\n const entryEditor = renderAddEditEntry(entry);\n $(\".landing-page\").prop(\"hidden\", true);\n $(\".main-nav-bar\").prop(\"hidden\", true);\n // select main-area class and...
[ "0.7822761", "0.6734704", "0.6698757", "0.6585174", "0.6531843", "0.6420203", "0.6406693", "0.636002", "0.6306418", "0.6217589", "0.61879927", "0.6183153", "0.6178105", "0.6161351", "0.6101248", "0.6061031", "0.6033521", "0.60012543", "0.5930527", "0.5927165", "0.59191054", ...
0.82739043
0
create display add/edit entry html function with entry = null
function displayAddEditEntry(entry = null) { console.log(entry); // create variable that holds the render entry function parameter const entryEditor = renderAddEditEntry(entry); $(".landing-page").prop("hidden", true); $(".main-nav-bar").prop("hidden", true); // select main-area class and display variable i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderAddEditEntry(entry = null) {\n return `\n\t\t<div class=\"nav-bar\">\n\t\t<div class=\"nav-1\">\n\t\t\t<div class=\"nav-link\"><a href=\"\" class=\"my-journal-button\">My Profile</a></div>\n\t\t\t<div class=\"nav-link\"><a href=\"\" class=\"js-logout-button\">Log out</a></div>\n\t\t</div>\n\t</div>...
[ "0.7879389", "0.7035076", "0.67902505", "0.65840113", "0.65790033", "0.6515411", "0.64341295", "0.64142126", "0.6395625", "0.62806994", "0.62660134", "0.6261164", "0.62387365", "0.6236005", "0.61783063", "0.6177148", "0.61205417", "0.6047489", "0.60267353", "0.6025446", "0.59...
0.78977126
0
create add/edit btns function
function handleAddEditButtons() { // select main-area class div, when clicked on look for edit-entry class and run e function $(".main-area").on("click", ".js-edit-entry", function(e) { console.log("Add entry clicked"); // stop from form submitting e.preventDefault(); // call display entry function ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InsertButtonsToToolBar()\n{\n//Strike-Out Button\nmwCustomEditButtons[mwCustomEditButtons.length] = {\n \"imageFile\": \"http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png\",\n \"speedTip\": \"Strike\",\n \"tagOpen\": \"<s>\",\n \"tagClose\": \"</s>\",\n \"sampleText\": \"Strik...
[ "0.70643514", "0.7004149", "0.6915906", "0.6716014", "0.66803986", "0.66543865", "0.6638761", "0.6604445", "0.65479004", "0.650594", "0.6462321", "0.64618975", "0.64497846", "0.6435729", "0.6422734", "0.6395741", "0.6372531", "0.6327919", "0.6324332", "0.6323127", "0.6317458"...
0.0
-1
create edit entry btn function
function handleEditButton() { // select main-area class div, when clicked on listen for a click and edit button class and run e function $(".main-area").on("click", "#js-edit-button", function() { console.log("Edit entry clicked"); // create variable id that holds this (main-area class) method and data meth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editAction(edit_row) {\r\n let editBtn = document.createElement('button')\r\n editBtn.innerHTML = 'Edit';\r\n editBtn.className = 'edit-btn';\r\n edit_row.appendChild(editBtn)\r\n editBtn.addEventListener('click', function() {\r\n btn.i...
[ "0.75859827", "0.7462466", "0.7452856", "0.7434309", "0.7358137", "0.7295482", "0.72600126", "0.7173624", "0.7088094", "0.7082965", "0.7022534", "0.7018067", "0.69294876", "0.6879528", "0.685656", "0.6847142", "0.6836048", "0.68274957", "0.6818675", "0.6817269", "0.67791593",...
0.70826626
10
create render each entry function with built html and entyr as a parameter
function renderEachEntry(entry) { console.dir(entry); return ` <div class="nav-bar"> <div class="nav-1"> <div class="nav-link"><a href="" class="my-journal-button">My Profile</a></div> <div class="nav-link"><a href="" class="js-logout-button">Log out</a></div> </div> </div> <main role="main" class="...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){return html``}", "renderHTML() {\n \n }", "render() {\n return html ``;\n }", "renderJournalEntries (interiorEntryObject) {\n let entryHTMLTrigg= document.querySelector(\".entryLog\")\n entryHTMLTrigg.innerHTML= \"\"\n \n for(interiorEntryObject of API.journalEntries){\n ...
[ "0.65066093", "0.6319774", "0.61216575", "0.6083828", "0.6082855", "0.6070344", "0.602939", "0.5955181", "0.5952441", "0.59360564", "0.5929138", "0.5906742", "0.587949", "0.5830489", "0.57805604", "0.57621706", "0.57621706", "0.57621706", "0.5752456", "0.57484126", "0.5704164...
0.6206856
2
create display each entry htmlto document function with entry parameter
function displayEachEntry(entry) { // create variable with render html function and entry as parameter const eachEntry = renderEachEntry(entry); $(".landing-page").prop("hidden", true); $(".main-nav-bar").prop("hidden", true); // select main-area class div and html method that holds variable from above $("....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderJournalEntries (interiorEntryObject) {\n let entryHTMLTrigg= document.querySelector(\".entryLog\")\n entryHTMLTrigg.innerHTML= \"\"\n \n for(interiorEntryObject of API.journalEntries){\n // Convert the entry object HTML representation\n const entryHTML = entryHTMLRepresentation....
[ "0.67964095", "0.66600686", "0.6408888", "0.6312722", "0.6233401", "0.6173267", "0.61731774", "0.6122513", "0.61054075", "0.6089542", "0.6048435", "0.6034054", "0.59600097", "0.5957112", "0.5865781", "0.5863417", "0.58629096", "0.5828725", "0.5821661", "0.58213145", "0.581981...
0.67149407
1
create get each entry function with id and callback as parameter
function getEachEntry(id, callback) { console.log(id); // create ajax GET call that gets each entries with id $.ajax({ type: "GET", url: `/api/entries/${id}`, dataType: "json", contentType: "application/json", headers: { Authorization: `Bearer ${jwt}` } }) .done(function(entry)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllCards(id,callback){\n callback(id,findCards);\n}", "moreLikeThis (id, callback)\n {\n callback(null, []);\n }", "function getEntriesWithCollectionID(collection_id, callback) {\n conn.query('SELECT * FROM Entries WHERE collection_id=$1', [collection_id],\n function(error, ...
[ "0.6337451", "0.630051", "0.60726213", "0.60137606", "0.600759", "0.5970271", "0.59307647", "0.5930278", "0.5722374", "0.55651826", "0.5561391", "0.5561391", "0.5561391", "0.5561391", "0.5561391", "0.5551803", "0.5547512", "0.554495", "0.55330867", "0.55207", "0.5517121", "...
0.70967263
0
create entry click function
function handleEntryClick() { // select main-area class div, when clicked on method and listent for entry-title a (links) and run e function $(".main-area").on("click", ".entry-title a", function() { console.log("Individual entry clicked"); // create variable that holds this (main-area class) and data metho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processClick(evt){\n interpretEntry(evt.target.id);\n evt.target.blur();\n} // processClick(evt)", "function _click(d){\n \n }", "_handleAtomClick(alist, event) {\n\n if (alist.length == 0) {\n return;\n }\n\n let clicked = alist[0].image;\n\n let modifie...
[ "0.68611145", "0.67467105", "0.6709848", "0.6512679", "0.64925724", "0.6481642", "0.6375926", "0.6349238", "0.6326821", "0.63051975", "0.63049686", "0.62684155", "0.62674195", "0.6264586", "0.62141746", "0.6195058", "0.6165714", "0.6116255", "0.6110267", "0.6099347", "0.60654...
0.71961975
0
create cancel btn function
function handleCancelButton() { $(".main-area").on("click", "#js-cancel-button", function() { console.log("Cancel button clicked"); $(".landing-page").prop("hidden", true); // call get user dashboard function when canclled btn is clicked from function above getUserDashboard(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelButton(options = {}) {\n options.accept = false;\n return createButton(options);\n }", "function buttonCancelClickFunc(){\r\n\t\tself.close(); //关闭对话框\r\n\t\tif(self.buttonCancelCallback!=null){\r\n\t\t\tself.buttonCancelCallback();\r\n\t\t}\r\n\t}", "cancel(e) { }", "onCance...
[ "0.75539565", "0.7502344", "0.7416448", "0.73416364", "0.728494", "0.72483826", "0.7194127", "0.71412855", "0.71059245", "0.7074199", "0.70539355", "0.70290494", "0.70266914", "0.70181227", "0.70174176", "0.7010951", "0.6969235", "0.6969235", "0.6917569", "0.6893782", "0.6886...
0.0
-1
create delete btn function with id as parameter
function deleteEntry(id) { // create ajax DELETE call hold id from entries $.ajax({ type: "DELETE", url: `/api/entries/${id}`, dataType: "json", contentType: "application/json", headers: { Authorization: `Bearer ${jwt}` } }) //if call is succefull .done(function() { con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function btndeletesales(id) {\n deletedata('/sales/delete/' + id)\n}", "function makeDeleteButton(id){\r\n /*Button for User*/\r\n var deleteInput = document.createElement('input');\r\n var deleteCol = document.createElement('td');\r\n deleteInput.setAttribute('name','delete');\r\n deleteInput.setAttribu...
[ "0.7732257", "0.76733434", "0.70756376", "0.7039339", "0.7018924", "0.70182073", "0.7005398", "0.7005398", "0.69535863", "0.69534177", "0.6947728", "0.6940047", "0.69113576", "0.6906143", "0.6905096", "0.68663895", "0.6834413", "0.6825665", "0.6794347", "0.67885244", "0.67780...
0.0
-1
create delete btn function
function handleDeleteButton() { $(".main-area").on("click", "#js-delete-button", function() { console.log("Delete button clicked"); // create variable that holds this (main-area class) and data method holds entry id const id = $(this).data("entryid"); // create variable that holds confirm alert co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAction(dl_row) {\r\n let dltBtn = document.createElement('button')\r\n dltBtn.innerHTML = 'Delete';\r\n dltBtn.className = 'dl-btn';\r\n dl_row.appendChild(dltBtn)\r\n dltBtn.addEventListener('click', function() {\r\n addBook.remo...
[ "0.76902634", "0.7573812", "0.7494352", "0.7489583", "0.74254864", "0.73843765", "0.735846", "0.7341194", "0.7332983", "0.73264265", "0.73114365", "0.73086894", "0.73011285", "0.7281478", "0.727339", "0.72701746", "0.72682357", "0.726376", "0.7262468", "0.7236166", "0.7217718...
0.66864043
77
create saving entry function with new entry parameter
function saveEntry(newEntry) { console.log(JSON.stringify(newEntry)); // create ajax PUT call with new entry id $.ajax({ type: "PUT", url: `/api/entries/${newEntry.id}`, dataType: "json", contentType: "application/json", data: JSON.stringify(newEntry), headers: { Authorization: `Bea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveEntry(entry) {\n return rest.post(entry);\n }", "function saveEntry(entry) {\n const transaction = db.transaction(['new_budget_entry'], 'readwrite');\n\n const budgetObjectStore = transaction.objectStore('new_budget_entry');\n\n budgetObjectStore.add(entry)...
[ "0.74203604", "0.695418", "0.6791266", "0.66740614", "0.65133834", "0.6385011", "0.63238764", "0.62837964", "0.62310356", "0.6146448", "0.61120504", "0.60905266", "0.60709924", "0.606596", "0.6052735", "0.60466284", "0.60388607", "0.5995042", "0.5974271", "0.5934888", "0.5928...
0.63236576
7
create new created entry function with title date and phot as parameter
function createEntry(title, travelDate, coverPhoto) { // create variable that holds what a new entry object should include const newEntry = { title, travelDate, coverPhoto }; // create ajax POST call that uses entries in url value $.ajax({ type: "POST", url: "/api/entries", dataType: "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createNewEntry(title, publicationDate, expiryDate, message, priority, pictureArray, otherDocArray) {\n\n\tconst _pubDate = publicationDate || -1;\n\tconst _expDate = expiryDate || -1;\n\t\n\tassert.equal(typeof(title), 'string', 'Title should be a string');\n\tassert.equal(typeof(message), 'string', 'Message...
[ "0.63615805", "0.61003906", "0.60907876", "0.6075576", "0.60644156", "0.6051351", "0.59959304", "0.5886349", "0.5828625", "0.58247364", "0.5812332", "0.5804992", "0.57969177", "0.57941276", "0.5792514", "0.57815707", "0.5756056", "0.57105356", "0.5694251", "0.5680593", "0.567...
0.67259836
0
create save btn function
function handleSaveButton() { $(".main-area").on("submit", "#js-edit-form", function(e) { console.log("Save button clicked"); // stop from form submitting e.preventDefault(); // create variable that holds title value let title = $("#journal-title").val(); // create variable that holds date val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnBtnSave_Click( e )\r\n{\r\n Save( 'generic_save_title' , 'save_confirm_msg' ) ;\r\n}", "function OnBtnSave_Click( e )\r\n{\r\n Save( 'generic_save_title' , 'save_confirm_msg' ) ;\r\n}", "function Save() {\n if ($('#ab121sgAddEdit').valid()) {\n if (vm.isNew) {\n ...
[ "0.77004784", "0.77004784", "0.7097997", "0.7066011", "0.70570254", "0.7037115", "0.6975107", "0.6969961", "0.6938104", "0.6871366", "0.686836", "0.68669474", "0.6864652", "0.6857669", "0.685225", "0.68494296", "0.6806441", "0.67814225", "0.6774337", "0.6769053", "0.6705758",...
0.63164884
62
create when user logout btn function
function handleLogOutButton() { $(".main-area").on("click", ".js-logout-button", function(e) { // stop from form submitting e.preventDefault(); console.log("Logged out!"); // re declare jwt variable to null jwt = null; // clear session storage sessionStorage.clear(); // reload location...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onLogoutClicked() {\n AuthActions.logoutUser();\n }", "function logoutUser(){\n updateViewToLoggedOut();\n}", "function logout() {\n\n }", "function logout()\n {\n\n }", "function logOut(){\n clearCurrentUser();\n showLoggedOutView();\n}", "function attachHandlerLo...
[ "0.80575913", "0.8044526", "0.8022688", "0.80010223", "0.7840867", "0.78261524", "0.77192765", "0.76937616", "0.7603818", "0.7592917", "0.7578149", "0.7575742", "0.75486594", "0.75181586", "0.75181586", "0.75181586", "0.75014055", "0.74700093", "0.7460076", "0.7443918", "0.74...
0.7118128
62
create home btn function
function handleHomeButton() { // select home btn class and when clicked on run function $(".home-button").on("click", function() { // reload location when home btn is clicked location.reload(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function homeHandler(event)\n\t\t{\n\t\t\tg.reinit();\n\t\t\thideButtons(this);\n\t\t}", "function go_home() {\n\tconfirm( t('confirm_go_home'), function(ch) {\n\tif (ch == 1) {\n\t\t$(\"button.icon-home\").attr(\"disabled\", true);\n\n\t\tvar shipment = {\n\t\t\tshipment_id: '',\n\t\t\tpieces: '',\n\t\t\tweight...
[ "0.7099038", "0.68870693", "0.6870567", "0.67482823", "0.6722682", "0.67042005", "0.66543615", "0.66116357", "0.65261126", "0.6525348", "0.6525039", "0.6511091", "0.65058035", "0.64692354", "0.6434212", "0.64191455", "0.6414011", "0.6401022", "0.6385206", "0.6372304", "0.6365...
0.6704113
6
create function that calls all the e handlers
function setUpeHandlers() { handleLoginButton(); handleSignUpButton(); handleLoginSuccess(); handleMyJournalButton(); handleAddEditButtons(); handleSignUpSuccess(); handleEntryClick(); handleEditButton(); handleCancelButton(); handleDeleteButton(); handleSaveButton(); handleLogOutButton(); han...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHand...
[ "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.68335235", "0.6599485",...
0.0
-1
Evaluate each single input Element
function evaluateElements(inputList) { // Evaluate input List from DOM let inputRequired = 0 for(let input in inputList) { // the element have 'input-required' class? let currentElement = inputList[input] if (currentElement.hasClass('input-required')) { inputRequired += 1; // the input ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Evaluate() {}", "function applyToElements(elements, action)\r\n{\r\n for (var i=0; i < elements.length; i++)\r\n action(elements[i]);\r\n}", "function eachElement (elements, callback) {\n if (elements.nodeType) {\n elements = [elements];\n } else if (typeof elements === 'string') {\n elemen...
[ "0.63607913", "0.5949006", "0.57923704", "0.56089336", "0.5604519", "0.5447846", "0.5387553", "0.5350606", "0.52161276", "0.5212865", "0.52053916", "0.5158438", "0.5158233", "0.51427186", "0.5135608", "0.5135608", "0.5108579", "0.50952643", "0.50886035", "0.5085469", "0.50797...
0.6260421
1
input box classes status
function inputBoxClassStatus(elementInput, statusClass) { if(statusClass) { // If is true add success // remove box-message-fail elementInput.removeClass('input-fail') // add box-message-success elementInput.addClass('input-success') } else { // if is false add fail // remove input-success ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inputClass () {\n let klass = ''\n\n if (this.state.focus) {\n klass += ' usa-input-focus'\n }\n\n if (this.state.valid) {\n klass += ' usa-input-success'\n }\n\n if (this.state.checked) {\n klass += ' selected'\n }\n\n return klass.trim()\n }", "function customizeInput(in...
[ "0.6612439", "0.6509602", "0.6389206", "0.6327522", "0.6281497", "0.62483376", "0.6162019", "0.6127099", "0.60819626", "0.60240054", "0.60100913", "0.5998778", "0.5941359", "0.591976", "0.587786", "0.5873065", "0.5864084", "0.5843009", "0.58429253", "0.582531", "0.5815856", ...
0.70964515
0
Parameters: name string cell name
onExpanded(name) { this._codeView.codeEditor.editorObject.resize() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_name_cell(name) {\n return $(\"<td>\", {\n class: \"objects-name\",\n }).append(\n $(\"<span>\", {\n text: name,\n })\n );\n}", "function PodListCells_NameCell(_ref) {\n var rowIndex = _ref.rowIndex,\n data = _ref.data;\n var name = data[rowIndex].n...
[ "0.69202155", "0.6746228", "0.65966344", "0.6540054", "0.6420847", "0.64099514", "0.6167679", "0.6031603", "0.59173733", "0.5895641", "0.584202", "0.583196", "0.5814334", "0.5772216", "0.5741322", "0.5708775", "0.5642002", "0.562138", "0.5609594", "0.5578214", "0.55508685", ...
0.0
-1
Gets the hundred most starred repos in the last 30 days in json format
async function getMostStarredRepos() { //Set date let date = new Date(); date.setDate(date.getDate() - 30); date = date.toISOString().split("T")[0]; //retrieve the repos const response = await fetch( `https://api.github.com/search/repositories?q=created:>${date}&sort=stars&order=desc&per_page=100` );...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMostStargazers() {\n getAjaxData(\"https://api.github.com/orgs/HackYourFuture/repos\", allRepos => {\n clearAllTags(); \n const maxStar = findMaxStar(allRepos); \n renderRepositories_Stars(allRepos, maxStar); \n \n \n }); \n \n}", "function getMostForked() ...
[ "0.69903356", "0.68169487", "0.65856826", "0.65420794", "0.647155", "0.63830143", "0.615112", "0.6095802", "0.60560083", "0.5997487", "0.5922411", "0.5857712", "0.584988", "0.58497703", "0.58090603", "0.5803489", "0.5792988", "0.5706209", "0.56883", "0.568744", "0.5676087", ...
0.8065355
0
creates a weather icon
function getWeatherIcon(wData){ var weatherIcon = ''; switch(wData.icon){ case 'clear-day' : weatherIcon = '<img height="75" class="weatherIcon" onload="javascript:$(this).show()" style="display:none;" src="../../../img/weather_icons/clear.png" />'; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function weatherIcon(weather) {\n if (weather > 800) {\n icon = String.fromCodePoint(0x1F325);\n }\n else if (weather == 800) {\n icon = String.fromCodePoint(0x2600);\n }\n else if (weather > 299 && weather < 600) {\n icon = String.fromCodePoint(0x1F327);\n }\n else if (we...
[ "0.79813206", "0.7652374", "0.7645128", "0.7560669", "0.7393184", "0.7386477", "0.7361207", "0.7210027", "0.71963096", "0.71920025", "0.71240735", "0.7102975", "0.7079747", "0.70549726", "0.70534503", "0.7039888", "0.7022353", "0.7016287", "0.69999075", "0.698004", "0.6868539...
0.7122464
11
this funciton is called once the page is loaded it displays all the available communities in the database
componentDidMount() { db.collection("Communities").onSnapshot(snapshot => { snapshot.forEach(community => { var communityJSON = { name: community.id, lat: community.data().Location.latitude, lng: community.data().Location.longitude } var tempArray...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchData() {\n const channels = await getChannels();\n\n const data = {\n title: 'ChatX',\n content: component,\n state: {\n rooms: channels, // preload existing rooms\n messages: [],\n signedIn: req.session.user ? true : fal...
[ "0.6349386", "0.6333802", "0.62120235", "0.61430085", "0.5966898", "0.592465", "0.5916421", "0.5915858", "0.59089416", "0.5888348", "0.58825076", "0.58605283", "0.5857937", "0.58578265", "0.5847668", "0.5829453", "0.5816854", "0.580164", "0.57844335", "0.57760656", "0.5763103...
0.0
-1
function to render the map
render() { return ( <div className="map-container"> <Map google={this.props.google} className={"map"} zoom={13} initialCenter={ { lat: 36.984117, lng: -122.030792 } } > ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render() {\n debugMap(map, 10, 20);\n }", "function renderMap(map){\n\tfor (var r = 0; r <= map.tiles.length; r++) {\n if (map.tiles[r] !== undefined) {\n for (var b = 0; b <= map.tiles[r].length; b++) {\n if (map.tiles[r][b] !== undefined) {\n ...
[ "0.8600022", "0.7415964", "0.73883927", "0.73560095", "0.7217416", "0.7202786", "0.71943384", "0.7173025", "0.71428245", "0.7111069", "0.70526564", "0.7048544", "0.7022092", "0.70011395", "0.6994392", "0.6979251", "0.69296366", "0.6905711", "0.6858654", "0.68542963", "0.68475...
0.0
-1
TIMESTAMPS Current UTC time in the format yyyymmdd'T'HH:MM:ss'Z' Example: 20191218T21:14:07Z
function time() { return dateFormat("isoUtcDateTime"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "toUTCString() {\n return this.timestamp().toUTCString();\n }", "function $timestamp(params) {\n params = params || {};\n var utc = params.utc;\n\n var d = new Date();\n ...
[ "0.70030326", "0.647418", "0.6369788", "0.6201879", "0.6199821", "0.6057905", "0.60564935", "0.60265785", "0.5969643", "0.5956704", "0.59564626", "0.5936406", "0.5862172", "0.58451205", "0.58351094", "0.5833039", "0.5832721", "0.5823795", "0.57458866", "0.57400644", "0.573504...
0.5866369
12
LOGGED IN USER AUTHENTICATION
function verifyAuthenticated(req, res, next) { // If user has been properly logged in, then req.user.id will exist // and req.isAuthenticated() will return true. const userID = req.user && req.user.id; console.log("-------------------------------") console.log(`${time()} Is user authenticated? id=${userID} .....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n User.login(self.user, handleLogin);\n }", "function login() {}", "function userLogin() {\n /**-----------------------------------------------------------------------*/\n /** Get the user's name and password as entered into the login form: */\n /**-------------------------...
[ "0.73411196", "0.69725925", "0.68889385", "0.67448545", "0.6720008", "0.6691966", "0.6681529", "0.6668205", "0.66630733", "0.6655725", "0.6632471", "0.6629811", "0.66275406", "0.65930337", "0.6586113", "0.657513", "0.6558597", "0.6544125", "0.65320265", "0.65195775", "0.65031...
0.0
-1
Function to slide out element
function slideOutElem(elemToHide, directionToSlide,callBackFunc) { $("#" + elemToHide).hide("slide", {direction : directionToSlide}); if(callBackFunc != undefined) { callBackFunc(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideOut(el){\n var elem = document.getElementById(el);\n elem.style.transition = \"left 2.0s ease-out 0s\";\n elem.style.left = \"-2500px\";\n}", "slideOut() {\n return this._animate(this.props.viewWidth);\n }", "function easeOut() {\n gsap.fromTo(\n \".ease-out\",\n { x: 0 },\n ...
[ "0.7788527", "0.7610644", "0.7365058", "0.733626", "0.7311399", "0.723953", "0.7163197", "0.70032436", "0.6856887", "0.6838874", "0.68206036", "0.6790252", "0.6786608", "0.67290455", "0.66040546", "0.6507396", "0.6488372", "0.6471099", "0.6447033", "0.63884735", "0.63739836",...
0.6680059
14
Function to slide in element.
function slideInElem(elemToShow, directionToSlide){ $("#" + elemToShow).show("slide", {direction : directionToSlide}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideIn(callback) {\n setX(upperPage(), 0, slideOpts(), callback);\n }", "function slideIn(callback) {\n var slideOpts = {\n duration: k.durations.SLIDE,\n timing: 'ease-in'\n };\n Monocle.defer(function () {\n setX(upperPage(), 0, slideOpts, callback);\n });\n }", "fun...
[ "0.7575821", "0.7564605", "0.73262554", "0.7324089", "0.69572026", "0.678048", "0.6721924", "0.66209346", "0.66199106", "0.64154077", "0.62725085", "0.6264286", "0.62108827", "0.61939925", "0.61775386", "0.61380064", "0.6125912", "0.6110032", "0.6061416", "0.60511327", "0.605...
0.7237226
4
Function slide out top div
function slideOutTopDiv() { blurOut = setTimeout(function(){ // hide the top div debugger; slideOutElem("logoSearchBox","up",showMenuBtn); },timeoutPeriod); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop < 350 || $offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $animationTiming = ($('#slide-out-widget-area.fullscreen.open').length > 0) ? 1150 : 350;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({...
[ "0.69241387", "0.6821072", "0.67565656", "0.66691834", "0.6634289", "0.6613256", "0.65658385", "0.65646726", "0.65186584", "0.6482082", "0.6431816", "0.635504", "0.63414735", "0.63230026", "0.6312351", "0.6303338", "0.62808377", "0.62589806", "0.62586987", "0.62424326", "0.62...
0.75207984
0
Function toi show top menu
function showMenuBtn() { $("#openTopMenu").fadeIn(300); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openTopMenu() {\n $(\"#\"+current_menu+\">ul\").show();\n //alert (menuId);\n}", "function isShowMenu() {\n return _isShowTopMenu;\n }", "function mainmenu(){\n\t\t\t\tJ(\"#main_menu ul li ul\").css({display: \"none\"}); // Opera Fix\n\t\t\t\t\tJ(\"#main_menu ul li\").hover(fun...
[ "0.716775", "0.69420916", "0.6912222", "0.6847049", "0.68032235", "0.6776668", "0.6762069", "0.67064744", "0.669314", "0.6677383", "0.66569155", "0.66322666", "0.6622943", "0.66157967", "0.6607252", "0.6596241", "0.6576795", "0.65764314", "0.6570865", "0.65507144", "0.6526024...
0.66911596
9
comprobarIdioma. Comprueba cual es el idioma que hay almacenado, para seleccionarlo en la lista de idiomas disponibles.
function comprobarIdioma(){ if (idiomaPrincipal) { // Se selecciona el elemento por defecto if (idiomaPrincipal.toString().length > 0) { //$('#lstIdiomaPrincipal option[value='+idiomaPrincipal+']').attr('selected', 'selected'); //$('#lstIdiomaPrincipal').selectmenu('refresh'); // Actualización d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargaCombosMarcaCanal() {\n\tvar idioma = get(FORMULARIO+'.idioma').toString();\n\tvar pais = get(FORMULARIO+'.pais').toString();\n\n\tvar marca = get(FORMULARIO+'.hMarca').toString();\n\tvar canal = get(FORMULARIO+'.hCanal').toString();\n\tvar tipoCurso = get(FORMULARIO+'.hTipoCurso').toString();\n\tvar ...
[ "0.5853518", "0.56921005", "0.56461966", "0.56367666", "0.56147677", "0.55875456", "0.5564758", "0.5559751", "0.5555892", "0.5456886", "0.54186004", "0.5408978", "0.54049027", "0.5384195", "0.5383345", "0.53691214", "0.53658086", "0.5352819", "0.5342662", "0.5326794", "0.5312...
0.78922457
0
QueryableWorker instances methods: sendQuery(queryable function name, argument to pass 1, argument to pass 2, etc. etc): calls a Worker's queryable function postMessage(string or JSON Data): see Worker.prototype.postMessage() terminate(): terminates the Worker addListener(name, function): adds a listener removeListener...
function QueryableWorker(workerWrapperFunction, defaultListener, onError) { var instance = this, worker = new Worker(URL.createObjectURL(new Blob(["("+workerWrapperFunction.toString()+")()"], {type: 'text/javascript'}))), listeners = {}; this.defaultListener = defaultListener || function() {}; if (onError) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function query(worker) {\n 'use strict';\n return new Promise(function (resolve, reject) {\n worker.controller.addEventListener('message', function (msg) {\n resolve(msg.data);\n });\n worker.controller.postMessage('ping');\n });\n}", "function TQueries() {}", "function TQueries() {}", "func...
[ "0.5848804", "0.55629957", "0.55629957", "0.55629957", "0.5514585", "0.54903424", "0.5462918", "0.545682", "0.54518396", "0.54518396", "0.5412166", "0.5412166", "0.54084486", "0.54084486", "0.54084486", "0.53960806", "0.53721464", "0.5366644", "0.53449917", "0.532739", "0.532...
0.8497868
0
props: takePicture() A function to take a photo and go to the next view
render() { return ( <View style={styles.container}> <View style={styles.cameraContainer}> <CameraComponent type="Front" ref="cameraComponent" /> </View> <View style={styles.cameraBottom}> <View style={styles.came...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takePicture() {\n\t\n navigator.camera.getPicture(\n function(uri) {\n var img = document.getElementById('camera_image');\n img.style.visibility = \"visible\";\n \n img.src = uri;\n },\n function(e) {\n ...
[ "0.7197175", "0.71496093", "0.7147087", "0.70736814", "0.7044569", "0.69580495", "0.6837513", "0.682386", "0.6803171", "0.6782356", "0.67669404", "0.6756541", "0.66139966", "0.65688026", "0.6551266", "0.65471745", "0.6523135", "0.6499911", "0.6455493", "0.64450824", "0.644147...
0.6175602
44
TODO: remove state modifications
function move({x=0, y=0}) { state.offset = {x:state.offset.x + x, y:state.offset.y + y} const grid = document.querySelector('.grid-scrollable-content') grid.style.transform = `translate(${-state.offset.x}px, ${-state.offset.y}px)` const p = getCurrentParcel(state.offset) const equal = p.lat == state.currentParcel....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transient private protected internal function m182() {}", "private public function m246() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient final protected internal function m174() {}", "protected i...
[ "0.62233776", "0.6176788", "0.61715525", "0.6106457", "0.6082077", "0.5944521", "0.58828664", "0.5872438", "0.57909375", "0.57841337", "0.5722937", "0.5717492", "0.56937504", "0.56725174", "0.56459796", "0.5576407", "0.55763376", "0.5537538", "0.5525751", "0.5522937", "0.5522...
0.0
-1
Remove parcels from page and state
function removeHiddenParcelsFromPage(focusedParcels) { const focusedParcelIds = focusedParcels.map(p => p.id) const hiddenParcels = state.parcels.filter((p)=>{ return focusedParcelIds.indexOf(p.id) < 0; }) //remove from dom hiddenParcels.forEach((hp)=>{ //TODO: remove listeners let elem = document.querySelec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removePages() {\n // Iterate backwards through the list of pages.\n for (var i = pages.length - 1; i >= 0; i--)\n // Remove each page.\n removePage(pages[i]);\n}", "function removePageNumbers() {\n \n var slides = presentation.getSlides();\n for (var i = 0; i < slides.length; ++i)...
[ "0.6412273", "0.6307551", "0.6180549", "0.61352664", "0.6128494", "0.6122363", "0.6027027", "0.5985022", "0.59788764", "0.5969039", "0.59444517", "0.589833", "0.58683443", "0.58683443", "0.5835415", "0.58350295", "0.5810962", "0.5809804", "0.5795518", "0.5767371", "0.5730111"...
0.6966839
0
TODO: replace this when parcels is a map TODO: use a map for parcels
function parcelPresent(parcel) { return state.parcels.find((p)=>{ return p.lat === parcel.lat && p.lon === parcel.lon }) != null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(location, parcels) {\n this.location = location;\n this.parcels = parcels;\n }", "park_vehicle(vehicle) {\n //Initial Loop through the list of parking slots\n for(var i=0 ; i<this.sizes.length; i++) {\n //check if the slot is occupied and if the vehicle size is SMALL\n...
[ "0.6167953", "0.5821234", "0.5710921", "0.55549616", "0.55410045", "0.5526096", "0.539529", "0.53762203", "0.53476894", "0.5342064", "0.5327329", "0.53249615", "0.5298771", "0.5232344", "0.52302486", "0.5211528", "0.51907694", "0.5168997", "0.51642555", "0.5068838", "0.505602...
0.571355
2
================================================ PRIVATE METHODS ================================================
function keydown(e) { if(e.which == _forwardKey) _forwardDown = true; if(e.which == _rightKey) _rightDown = true; if(e.which == _leftKey) _leftDown = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient final protected i...
[ "0.7040832", "0.69052124", "0.6793298", "0.6733685", "0.67080367", "0.6641019", "0.64344615", "0.6156801", "0.61304384", "0.6128103", "0.61267555", "0.59677774", "0.5947723", "0.5922005", "0.5912785", "0.5911573", "0.58181846", "0.57971454", "0.57807004", "0.5780474", "0.5774...
0.0
-1
Add header in statistics table to group metrics by category format
function summaryTableHeader(header) { var newRow = header.insertRow(-1); newRow.className = "tablesorter-no-sort"; var cell = document.createElement('th'); cell.setAttribute("data-sorter", false); cell.colSpan = 1; cell.innerHTML = "Requests"; newRow.appendChild(cell); cell = document.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n ...
[ "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66380835", "0.66334736", "0.6629097", "0.6629097", "0.6629097", "0.66077095", "0.66077095", "0.66077095", ...
0.66110414
31
Populates the table identified by id parameter with the specified data and format
function createTable(table, info, formatter, defaultSorts, seriesIndex, headerCreator) { var tableRef = table[0]; // Create header and populate it with data.titles array var header = tableRef.createTHead(); // Call callback is available if(headerCreator) { headerCreator(header); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillTable(id) {\n\n // Pull the metadata\n d3.json(path).then((sampleData) => {\n var data = sampleData.metadata;\n\n // Grab the table element\n var demoInfo = d3.select(\"#sample-metadata\")\n\n // Clear any previous table\n demoInfo.html(\"\"); \n\n // Generate a blank list and ...
[ "0.66883385", "0.6419614", "0.6196204", "0.6185649", "0.6144199", "0.606396", "0.6032548", "0.59595674", "0.5888667", "0.5883851", "0.58801836", "0.5861506", "0.586145", "0.58438814", "0.58408695", "0.5835084", "0.5827789", "0.582182", "0.5820777", "0.5819619", "0.58184654", ...
0.0
-1
Given an array of unsorted numbers, find all unique triplets in it that add up to zero.
function search_triplets(arr) { // TODO: Write your code here // given unsorted array, find all triplets that add up to zero, return array with all triplets that sum up to zero // sort the array first // start from both ends of the array // triplets = []; let sumTarget = 0; if (arr.length < 3) { return trip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findZeroSumHash(arr) {\n const triplets = [],\n len = arr.length,\n found = new Set(),\n duplicateVals = new Set()\n\n for (let i = 0; i < len; i++) {\n const seen = new Set(),\n first = arr[i]\n if (duplicateVals.has(first)) continue\n\n duplicateVals.add(first)\n for (let j =...
[ "0.7592198", "0.7230648", "0.67874235", "0.67589295", "0.6745093", "0.66447335", "0.65823764", "0.6540374", "0.6492489", "0.64763355", "0.64763355", "0.6467176", "0.64363", "0.64356667", "0.643189", "0.64169043", "0.6406482", "0.63990813", "0.6394493", "0.63603777", "0.635964...
0.71650237
2
This function computes and returns the following: `propertiesToProcess`: An (ordered) list of properties that exist and need to be processed, based on the provided `propertiesToConsider`, the properties in `package.json` and their corresponding formatpaths. NOTE: Only one property per formatpath needs to be processed. ...
function getPropertiesToProcess(packageJson, propertiesToConsider, compileAllFormats, typingsOnly) { const formatPathsToConsider = new Set(); const propertiesToProcess = []; for (const prop of propertiesToConsider) { const formatPath = packageJson[prop]; // Ignore properties that are not def...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processSchemaProperties(\n schemaName,\n schemaJSON,\n schemaFilePath,\n schemaJSONByPath,\n schemaFilePathsByRelativePath,\n propertyPaths,\n propertyFriendlies,\n propPrimaryFilePath,\n propPrimary = true,\n propPrimaryRequired = false\n) {\n /* Created required field - remove deny listed pro...
[ "0.5274323", "0.510249", "0.50038236", "0.4855921", "0.48124778", "0.48124778", "0.48092604", "0.48092604", "0.48092604", "0.48092604", "0.47803906", "0.4758548", "0.4756547", "0.47564745", "0.47528464", "0.47332802", "0.47332802", "0.46998075", "0.46998075", "0.46998075", "0...
0.7953335
0
Get a prediction for the current video frame
function guess() { classifier.predict(video.elt, 5, gotResult); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "function classifyVideo() {\n classifier.predict(gotResult);\n}", "async function predict() {\n const predictedClass = tf.tidy(() => {\n const img = webcam.capture()...
[ "0.73738325", "0.73738325", "0.73738325", "0.7188389", "0.69443935", "0.6891366", "0.68819284", "0.68796897", "0.68221366", "0.6807198", "0.6774071", "0.6740738", "0.66967064", "0.6636915", "0.66209227", "0.6606841", "0.65409356", "0.6536989", "0.64997345", "0.64500123", "0.6...
0.7556052
0
define the webpage routes
function app(req, res){ var path = url.parse(req.url).pathname; switch(path){ case '/about': break; default: app.get('/', function(req, res){ res.send(__dirname + '\public\index.html'); }); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get routes(){\n\t\treturn {\n\t\t\t'get /': [actionFilter, 'index'],\n\t\t\t'get /home/about': 'about'\n\t\t}\n\t}", "function set_routes() {\n\n // Check your current user and roles\n app.get( '/status/:id', function( request, response ) {\n acl.userRoles( request.params.id || false, function( err...
[ "0.7237717", "0.70607346", "0.7046181", "0.69550174", "0.6857559", "0.6841675", "0.68347466", "0.6814045", "0.6811174", "0.67113996", "0.66370875", "0.66255486", "0.6620021", "0.66115755", "0.6608665", "0.66016614", "0.6564289", "0.6486625", "0.6477173", "0.6449584", "0.64121...
0.0
-1
$(document).ready(ocultar_section_slidefm); ////////////////OCULTAR FORMAS ==============
function ocultar_section_formas(){ document.getElementById("section-formas").style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ready() {\n\n\tif(!Modernizr.csstransforms3d) $('body').prepend('<div class=\"alert\"><div class=\"box\"><h2>Fatti un regalo.</h2><p>Questo sito usa tecnologie moderne non compatibili con il tuo vecchissimo browser.</p><p>Fatti un regalo, impiega due minuti a installare gratuitamente un browser recente, t...
[ "0.6698168", "0.65456694", "0.6439492", "0.6386522", "0.6370333", "0.6341606", "0.6317822", "0.6263758", "0.62075543", "0.6207037", "0.6186788", "0.61796296", "0.6171681", "0.6125043", "0.6089253", "0.6080125", "0.60800725", "0.60710865", "0.60431087", "0.6039514", "0.6031657...
0.57230514
76
TASK 1: Create a constructor function for generating student objects. Each student object should have name, last name, age and average grade. SOLUTION
function Students(name, lastName, age, grade) { this.name = name; this.lastName = lastName; this.age = age; this.averGrade = grade; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StudentsObjectCreator(studentName, studentLastName, studentAge) {\n this.studentName = studentName;\n this.studentLastName = studentLastName;\n this.studentAge = studentAge;\n}", "function Student() {\n this.first = \"firstName\";\n this.last = \"lastName\";\n this.grade = 0;\n}", "f...
[ "0.78446746", "0.7681998", "0.7681998", "0.74705034", "0.7464804", "0.7418291", "0.7403196", "0.74005914", "0.7347949", "0.7347949", "0.7340355", "0.73401886", "0.73401886", "0.73346317", "0.7329876", "0.7169971", "0.7112139", "0.7064966", "0.70451295", "0.70340526", "0.70327...
0.80585885
0
TASK 2: Create a constructor function for generating objects with data about players of your favorite football team (name, age, goals scored, yellow cards). You can find statistics online. SOLUTION
function Players(name, age, goals, cards) { this.team = 'Barcelona'; this.name = name; this.age = age; this.goals = goals; this.yellowCards = cards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function footballTeam (player){\n\tvar teamobj = {}\n\tteamobj.player = player;\n\tteamobj.addInfo =addInfo;\n\tteamobj.arrayOfPlayers= [];\n\tteamobj.increaseLevel=increaseLevel;\n\tteamobj.isAvailable=isAvailable;\n\tteamobj.decrease=decrease;\n\tteamobj.sortPalyerBy=sortPalyerBy;\n\treturn teamobj\n}", "funct...
[ "0.6689375", "0.6455521", "0.6270195", "0.6224105", "0.618917", "0.6130075", "0.6110982", "0.6068526", "0.6051133", "0.6032139", "0.6015769", "0.6015662", "0.60076636", "0.59937435", "0.5983787", "0.5979362", "0.59777075", "0.59524226", "0.5930542", "0.5928636", "0.59119946",...
0.76338226
1
TASK 3: Try to do the same thing as in the previous task, but when creating player objects try to do it dinammicaly (using loop). For that you'll need data in following format: var players = [["Player name", 27, 12, 4], ["Player name", 27, 12, 4], ["Player name", 27, 12, 4]]; This array is just example, change data in ...
function Players(name, age, goals, cards) { this.team = 'Barcelona'; this.name = name; this.age = age; this.goals = goals; this.yellowCards = cards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static randomizePlayers() {\n let arr = shuffle([1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2])\n for (const index in arr) {\n let ter = Territory.find(parseInt(index) + 1)\n ter.player_id = arr[index]\n }\n }", "initializeForPuzzle () {\n this.players = []\n for (let p = 0; ...
[ "0.6975179", "0.6813334", "0.6781565", "0.66848916", "0.6675093", "0.66550714", "0.6624329", "0.6582936", "0.6570035", "0.6525281", "0.65135825", "0.65039086", "0.6503392", "0.645409", "0.64029527", "0.63719195", "0.637035", "0.6349606", "0.6348192", "0.6328196", "0.6322061",...
0.5725258
75
TASK 4: Create a construction function that should contain properties for first number, second number, and method. Then create a four instances of object from that constructor, each with different numbers, and different method. First should have method for multiplying of its own numbers, second for dividing, third for ...
function NumOperation(a, b, c) { this.firstNum = a; this.secondNum = b; this.operation = c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Calculator(firstNumber = 0, secondNumber = 0) {\n this.firstNumber = firstNumber;\n // let firstNumber = firstNumber;\n this.secondNumber = secondNumber;\n // let secondNumber = secondNumber;\n this.add = function () {\n let result = this.firstNumber + this.secondNumber;\n switch (typeof result...
[ "0.66933876", "0.6533656", "0.65196854", "0.6461272", "0.6331158", "0.6328335", "0.6300772", "0.62959605", "0.62661237", "0.621504", "0.62117755", "0.62062955", "0.5991823", "0.5880111", "0.5845299", "0.5737623", "0.57005835", "0.5692771", "0.5688756", "0.56732285", "0.565882...
0.6553955
1
Validate the string input OPTIONS:
validate(d, opt) { if (typeof d !== 'string' || !d) return false; d = d.trim(); d = d.replace(/ /g, '').toLowerCase(); if (d === '') return false; let tmp = d.split('.'); if (tmp.length !== 3) return false; let major = parseInt(tmp[0], 10), minor = parseInt(tmp[1], 10),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateOptionString(options, key) {\n if (!R.is(String, options[key])) {\n throw ('Must be a string.');\n }\n if (R.isEmpty(options[key].trim())) {\n throw ('Value must not be empty.');\n }\n}", "validateParamOptions() {\n Object.keys(CmdLineParamsOptions).forEach(key => {\...
[ "0.6747695", "0.65562195", "0.6312552", "0.6295664", "0.62406594", "0.6141686", "0.6126759", "0.6085448", "0.60829824", "0.6057024", "0.60403097", "0.60276234", "0.5992888", "0.5987739", "0.59812003", "0.59812003", "0.59594303", "0.59573734", "0.5951325", "0.5950185", "0.5950...
0.5126687
95
Edit user is Email first name and last name
function setUser(req, res) { const userId = req.params.id; // Find user before update User.findByPk(userId) .then((response) => { if (response === null) { // user not in database res.status(404).json({ valid: false, message: "User not found", }); } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "editAccountName(request, response) {\n const loggedInUser = accounts.getCurrentUser(request);\n loggedInUser.name = request.body.name;\n memberStore.editUser(loggedInUser);\n response.redirect(\"/viewAccountDetails\");\n }", "async function editUsername() {\n try {\n // get Userinf...
[ "0.70123106", "0.6960102", "0.69408375", "0.69342524", "0.69094604", "0.68960214", "0.6701245", "0.66466856", "0.66359985", "0.6619453", "0.65432966", "0.6526669", "0.64810187", "0.64574134", "0.64127386", "0.6377674", "0.635487", "0.633113", "0.63271946", "0.63163054", "0.63...
0.0
-1
Change user is password
function setPassword(req, res) { const curentPassword = req.body.password; const newPassword = req.body.new_password; const rePassword = req.body.re_password; // retyped new password if ( curentPassword === undefined || newPassword === undefined || rePassword === undefined ) { // attrs missing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_user_password(env, password) {\n env.auth.user.password = { plaintext: password };\n}", "function ChangePassword() {\n\t}", "function set_new_user_password(env, password) {\n init_new_user_storage(env);\n env.auth.new_user.password = { plaintext: password };\n}", "function changePassword(user...
[ "0.7768041", "0.77468866", "0.7355477", "0.7331173", "0.7328759", "0.7302626", "0.7236837", "0.7158898", "0.7157058", "0.7150362", "0.71204686", "0.71027255", "0.7086508", "0.7080187", "0.7063107", "0.70538044", "0.7053722", "0.70331985", "0.70329374", "0.70263493", "0.701675...
0.0
-1
Reset user is password (Forget password case)
function resetPassword(req, res) { const userId = req.params.id; User.findByPk(userId) .then((response) => { if (response === null) { // user not found res.status(404).json({ valid: false, message: "User not found", }); } else { const newPassword =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() { \n passwordLength = 0;\n specialCharacters = false;\n numbers = false;\n uppercase = false;\n lowercase = false;\n validInput = false;\n }", "function resetPassword() {\n\t\t\tif (vm.newPassword != \"\" && vm.newPasswor...
[ "0.7450228", "0.73105043", "0.7179665", "0.7177937", "0.7172678", "0.7063624", "0.70325667", "0.6992543", "0.6972021", "0.6946066", "0.68886787", "0.6882612", "0.6838132", "0.68111914", "0.6807093", "0.6785848", "0.6777572", "0.67452437", "0.6725497", "0.668337", "0.66534305"...
0.6210009
62
Get password verification key
function getPasswordVkey(req, res) { const userId = req.params.id; User.findByPk(userId) .then((response) => { if (response === null) { res.status(404).json({ valid: false, message: "User not found", }); } else { transporter .sendMail({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getKeyMaterial() {\n let password = window.prompt(\"Enter your password\");\n let enc = new TextEncoder();\n return window.crypto.subtle.importKey(\n \"raw\",\n enc.encode(password),\n {name: \"PBKDF2\"},\n false,\n [\"deriveBits\", \"deriveKey\"]\n );\n }", "functi...
[ "0.69766986", "0.6859718", "0.67753446", "0.6725186", "0.6584462", "0.65516335", "0.6433774", "0.640193", "0.62658066", "0.6234746", "0.62089336", "0.61834985", "0.61629355", "0.6134695", "0.61302346", "0.6097983", "0.60771906", "0.60555047", "0.6039183", "0.6038016", "0.6026...
0.6234363
10
Add address and country
function addAddress(req, res) { const userId = req.params.id; User.findByPk(userId) .then((response) => { if (response === null) { res.status(404).json({ valid: false, message: "User not found", }); } else { const address = req.body.address; const ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onchangeAddress() {\n\tgetGeoByAddress();\t\n}", "function fillInAddress() {\n // Get the place details from the autocomplete object.\n place = autocomplete.getPlace();\n console.log(place);\n // updating address data \n number = place.address_components[0].long_name;\n street = ...
[ "0.6435281", "0.6405569", "0.63139635", "0.6310707", "0.63000095", "0.6247001", "0.6247001", "0.6183644", "0.61639595", "0.6133045", "0.6115172", "0.6057018", "0.6045744", "0.6033969", "0.6010503", "0.6004433", "0.5977844", "0.59754777", "0.5959594", "0.595432", "0.5910995", ...
0.0
-1
Life Cycle Hooks It is called when the props changes.
static getDerivedStateFromProps(props, state) { if (props.errors !== state.errors) { return { errors: props.errors, }; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidUpdate(props_) {}", "componentDidUpdate(prevProps, prevState) {\n console.log('algo cambio')\n }", "componentDidUpdate(preProps, preState) {\n console.log(`previous props: ${preProps.val}`)\n }", "componentDidUpdate(prevProps) {\n\n //get StagePattern Details only if props has ch...
[ "0.6800651", "0.67845565", "0.67048645", "0.65725565", "0.6494334", "0.64543426", "0.6448446", "0.6436884", "0.6403397", "0.63957816", "0.6366284", "0.6332935", "0.63070303", "0.6293935", "0.62883455", "0.62831676", "0.62562144", "0.62431324", "0.6241909", "0.62356436", "0.62...
0.0
-1
It is not possible to change the state directly, so I need to set a new state.
onChange(e) { this.setState({ [e.target.name]: e.target.value }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeState(state) {\r\n if (state !== \"hungry\" && state !== \"busy\" &&\r\n state !== \"sleeping\" && state !== \"normal\") {\r\n throw new Error()\r\n }\r\n\r\n this.state = state;\r\n this.states.push(this.state);\r\n return this.state\r\n }", "cha...
[ "0.7608466", "0.7509106", "0.7411847", "0.7402833", "0.73930323", "0.73220384", "0.73151726", "0.72996587", "0.72837764", "0.72562516", "0.72442716", "0.72199523", "0.720936", "0.71819663", "0.7176116", "0.7171838", "0.716436", "0.71536016", "0.7136546", "0.7128629", "0.71142...
0.0
-1