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
Adds all the necessary event listeners
function bindEvents() { self._handlers = []; self._animationLoop = []; if (self.config.wrap) { ["open", "close", "toggle", "clear"].forEach(function (evt) { Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) { return bind(el, "mousedown", onClick(self[evt])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _addEventListeners () {\n dom.$gridToggle.on('click', _toggleGrid);\n dom.$scrollToLink.on('click', scrollToElement);\n document.onkeypress = keyPress;\n document.onkeydown = keyDown;\n window.addEventListener('scroll', _pageScroll);\n window.addEventListener('res...
[ "0.7939919", "0.78926915", "0.7806774", "0.7707297", "0.76922137", "0.76726705", "0.76630616", "0.7648235", "0.7637718", "0.7630281", "0.7629503", "0.75913334", "0.7585121", "0.75767165", "0.7559519", "0.7559142", "0.7543983", "0.75332904", "0.75332904", "0.7532735", "0.75254...
0.0
-1
import QueueComponent from '../../test/Queue';
function Dashboard(props) { const data = [ {name: 'Web Search', routeName: 'WebSearchDash', color: '#f5428d'}, {name: 'Zenserp', routeName: 'ZenserpDash', color: '#f54242'}, {name: 'Jail Base', routeName: 'JailBaseDash', color: '#f5a442'}, { name: 'Complete Criminal Check', routeName: 'Cri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.importBDD();\n }", "static define() {\n Akili.component('component', Component);\n }", "constructor() {\n super(moduleDirectory);\n }", "constructor() {\n console.log(\"my-component \");\n }", "static loadComponent() {\n return Component;\n }...
[ "0.5664838", "0.5635009", "0.5594001", "0.5546546", "0.5476366", "0.54554766", "0.54554766", "0.5434427", "0.5425523", "0.5369886", "0.5314204", "0.5283161", "0.52810854", "0.52646714", "0.52456295", "0.51856536", "0.518327", "0.5131844", "0.51317793", "0.51208824", "0.510229...
0.0
-1
function "checkForMatch" validates match of cards
function checkForMatch() { if (cardsInPlay[0] === cardsInPlay[1]) { alert("You found a match!"); } else { alert("Sorry, try again"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkMatch() {\n if (app.firstCard.dataset.avenger === app.secondCard.dataset.avenger) {\n disableCards();\n cardMatchSound();\n app.matchedCards.push(app.firstCard.dataset.avenger);\n gameComplete();\n return;\n }\n unflipCards();\n}", "function checkMatch() ...
[ "0.81672734", "0.81440943", "0.80636173", "0.79045033", "0.78838456", "0.78451926", "0.779886", "0.7794948", "0.7766636", "0.7734694", "0.7692237", "0.7689561", "0.7685403", "0.76842636", "0.7673938", "0.76490474", "0.7627779", "0.7623832", "0.7619818", "0.7602166", "0.759569...
0.7490459
31
iterates through array, pulling image and suit.
function flipCard() { var cardID = this.getAttribute('data-id'); this.setAttribute('src', cards[cardID].cardImage); console.log("User flipped " + cards[cardID].rank); console.log(cards[cardID].cardImage); console.log(cards[cardID].suit); cardsInPlay.push(cards[cardID].rank); checkForMatch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCards(imgPath){\n const suitMap = {\n 0: 'S',\n 1: 'H',\n 2: 'C',\n 3: 'D'\n }\n let allImages = []\n for (let i = 0; i < this.hand.length; i++){\n if (this.hand[i] === 0){\n allImages.push('Purple.png')\n ...
[ "0.68968564", "0.59236425", "0.5910192", "0.59085983", "0.580294", "0.5788989", "0.57645446", "0.5762766", "0.573058", "0.56960356", "0.5694342", "0.56212646", "0.5614236", "0.5605269", "0.5605206", "0.556398", "0.55464166", "0.5539722", "0.55393577", "0.55218834", "0.5503428...
0.0
-1
Sets up the board game with cards. Loops through array of 'cards' creats all logic for game.
function createBoard(){ for (var i = 0; i < cards.length; i++) { //console.log(i); // testing here var cardElement = document.createElement('img'); //console.log(cardElement); // testing here as well. cardElement.setAttribute('src', 'images/back.png'); cardElement.setAttribute('data-id', i); cardElement.addEve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpCards() {\n\t\t// Randomize the order of the cards\n\t\tpositions.sort(function(a, b) {\n\t\t\treturn Math.random() - 0.5;\n\t\t});\n\n\t\t// Construct 16 cards and randomize position\n\t\tfor (let i = 0; i < 16; i++) {\n\t\t\tif (i == 0) {\n\t\t\t\tcardNumber = 1;\n\t\t\t} else {\n\t\t\t\t//! Change...
[ "0.75814056", "0.73558766", "0.7348965", "0.7328366", "0.726724", "0.7247696", "0.72201455", "0.716294", "0.7082248", "0.70360625", "0.7016438", "0.7002612", "0.70009047", "0.69974715", "0.6997401", "0.69788355", "0.69773823", "0.6976511", "0.6974598", "0.69653696", "0.696222...
0.0
-1
this function will be recall every 1 data
function TRACKING_UpdateObjectFree(index , time , tracking_config){ for (var i = 0 ; i < listTracking.length ; i++ ){ //tính theo thời gian cho chính xác if (listTracking[i].isPeople) { if ( (time - listTracking[i].lastUpdateTime) > tracking_config.time_person_active ) { listTracking[i].dispo = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loopData() {\n\n}", "function reloadData() {\n if (typeof (CPData) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataSoon) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataDownloaded) != \"undefined\") { CPData.regenerate(); }\n ...
[ "0.7039542", "0.6794292", "0.67123896", "0.67108077", "0.6668016", "0.66625005", "0.6638089", "0.65278584", "0.652611", "0.6486023", "0.6380696", "0.6344797", "0.6303315", "0.6303315", "0.62842286", "0.6252296", "0.6242687", "0.6204187", "0.61977947", "0.6145917", "0.6142798"...
0.0
-1
function find ID object Free this function will be call every update new object return Id Object Free
function TRACKING_FindIdObjectFree ( label){ var indexObject=-1; for (var i = 0 ; i < listTracking.length ; i++ ){ //tính theo thời gian cho chính xác if (listTracking[i].dispo) { var difX = listTracking[i].X - label.X; var difY = listTracking[i].Y - label.Y; //check if valide => update tableau if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findId(object) {\n return object.id\n }", "function getId(obj) {\n return obj.id;\n }", "function getId(obj) {\n return obj.id;\n}", "function findID(){\r\nCustomer.findById(\"59dde71c63e107135cfffed8\", (err, ret) => {\r\n\r\n\tif(err) {\r\n\t\tconsole.error(e...
[ "0.8014701", "0.71271306", "0.70149803", "0.6721139", "0.6675133", "0.6661767", "0.6652718", "0.6612851", "0.6585177", "0.65378267", "0.65378267", "0.6465248", "0.64604634", "0.64462286", "0.6438779", "0.6435995", "0.6426317", "0.63839954", "0.63809437", "0.63741046", "0.6350...
0.0
-1
ZONE FOR TOOL MATH
function max(a ,b){ if ( a >= b) { return a; } else { return b; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DynamicLightingZone() {\n\n}", "function getIntel() {\n for (let key in Memory.warControl) {\n if (Memory.warControl[key]) {\n if (Memory.warControl[key].type === 'decon') {\n if (!Memory.warControl[key].siegePoint) {\n let exit = Game.map.findExit(...
[ "0.6090755", "0.561377", "0.56017804", "0.5517235", "0.5486741", "0.5483205", "0.5456891", "0.54331756", "0.54112226", "0.5373019", "0.53426313", "0.5341005", "0.53393626", "0.5327878", "0.53074443", "0.5276403", "0.52534884", "0.52190226", "0.51772076", "0.5171852", "0.51664...
0.0
-1
itself. They will be added to the sideeffect list as we pass through the children and the parent.
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { console.log("returnFiber",returnFiber) console.log("currentFirstChild",currentFirstChild) console.log("newChild",newChild) console.log("expirationTime",expirationTime) // This function is not recursive. //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) // Noop.\n return;\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's ...
[ "0.62705183", "0.6207768", "0.61423665", "0.6140938", "0.6140611", "0.6140611", "0.6140611", "0.61328524", "0.61328524", "0.61328524", "0.61328524", "0.6127596", "0.6127596", "0.61142117", "0.60836756", "0.6056281", "0.6056281", "0.6056281", "0.6056281", "0.6051652", "0.60402...
0.0
-1
reset() Reset CPU and memory.
function reset() { for( x=0; x<0x600; x++ ){ memory[x] = 0x00; } regA = regX = regY = 0; defaultCodePC = regPC = 0x600; regSP = 0x100; regP = 0x20; runForever = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.setIrqMask(0);\n this.setNmiMask(0);\n this.resetCassette();\n this.keyboard.clearKeyboard();\n this.setTimerInterrupt(false);\n this.z80.reset();\n }", "reset() {\n this.pc = 0;\n this.nextpc = (this.pc + 1) & this.romMask;\n thi...
[ "0.72295046", "0.7022725", "0.6943856", "0.68397725", "0.68305516", "0.68005586", "0.68001175", "0.6747324", "0.6713963", "0.6699442", "0.66802037", "0.665993", "0.66324836", "0.661201", "0.65941846", "0.6585356", "0.6585272", "0.6585272", "0.6585272", "0.6531785", "0.6526914...
0.78262776
0
stackPush() Push byte to stack
function stackPush( value ) { regSP = (regSP-1) & 0xff; if( regSP != 0 ) { memory[regSP+0x100] = value & 0xff; } else { message( "Stack full: " + regSP ); codeRunning = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "push(x){\r\n this.stack.push(x);\r\n this.size++;\r\n }", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;\n defaultCodePC++;\n codeLen++;\n}", "pushByte(value) {\n this.regs.sp = (this.regs.sp - 1) & 0xFFFF;\n this.writeByte(this.regs.sp, value);\n }",...
[ "0.71919674", "0.7149565", "0.70420164", "0.6902951", "0.6890674", "0.67568624", "0.66724133", "0.664024", "0.657562", "0.6554107", "0.6545136", "0.6510179", "0.6492416", "0.6428865", "0.64228237", "0.63386863", "0.6293771", "0.62854123", "0.623613", "0.6220221", "0.6185795",...
0.7451549
0
stackPop() Pop byte from stack
function stackPop() { if( regSP < 0x100 ) { value = memory[regSP+0x100]; regSP++; return value; } else { message( "Stack empty" ); codeRunning = false; return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popByte() {\n return( memory[regPC++] & 0xff );\n}", "popByte() {\n const value = this.readByte(this.regs.sp);\n this.regs.sp = z80_base_1.inc16(this.regs.sp);\n return value;\n }", "pop(){\r\n var data = this.stack[this.size - 1];\r\n this.stack = this.stack.sli...
[ "0.80348027", "0.76854926", "0.7295035", "0.7293183", "0.705128", "0.6983294", "0.6939706", "0.6935253", "0.6863585", "0.68403697", "0.6827894", "0.6775578", "0.6737731", "0.6716379", "0.66763526", "0.6656876", "0.6598072", "0.653914", "0.6468504", "0.64553523", "0.64435494",...
0.7492884
2
pushByte() Push byte to compiledCode variable
function pushByte( value ) { memory[defaultCodePC] = value & 0xff; defaultCodePC++; codeLen++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pushByte(value) {\n this.regs.sp = (this.regs.sp - 1) & 0xFFFF;\n this.writeByte(this.regs.sp, value);\n }", "_pushByteString(gen, obj) {\n return gen._pushInt(obj.length, MT.BYTE_STRING) && gen.push(obj);\n }", "_pushBuffer(gen, obj) {\n\t return gen._pushInt(obj.length, MT$1.BYTE_STRI...
[ "0.6808793", "0.62124914", "0.58339095", "0.58271235", "0.5808432", "0.58012456", "0.57261705", "0.5678508", "0.56320316", "0.5623546", "0.5619895", "0.56123185", "0.5495701", "0.54015684", "0.5380487", "0.53306746", "0.5329285", "0.53215677", "0.5281312", "0.5272362", "0.525...
0.812741
0
pushWord() Push a word using pushByte twice
function pushWord( value ) { pushByte( value & 0xff ); pushByte( (value>>8) & 0xff ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pushWord(value) {\n this.pushByte(z80_base_1.hi(value));\n this.pushByte(z80_base_1.lo(value));\n }", "function popWord() {\n return popByte() + (popByte() << 8);\n}", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;\n defaultCodePC++;\n codeLen++;\n}", "popWord() {\...
[ "0.7747722", "0.66708565", "0.61282796", "0.60432917", "0.5909562", "0.5594656", "0.5566832", "0.5566832", "0.5527965", "0.5498808", "0.54750234", "0.5471854", "0.5351999", "0.5319983", "0.5297026", "0.5288491", "0.5278159", "0.52648544", "0.52648544", "0.5226187", "0.5203991...
0.80163044
0
popByte() Pops a byte
function popByte() { return( memory[regPC++] & 0xff ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popWord() {\n return popByte() + (popByte() << 8);\n}", "popByte() {\n const value = this.readByte(this.regs.sp);\n this.regs.sp = z80_base_1.inc16(this.regs.sp);\n return value;\n }", "function decrementByte() {\n\t\t\tram[pointerAddress] -= 1;\n\t\t\tif(ram[pointerAddress] <...
[ "0.73289216", "0.7280887", "0.66351247", "0.6394896", "0.6350619", "0.61032164", "0.60528994", "0.6036286", "0.59906685", "0.5903274", "0.5893988", "0.5881001", "0.5881001", "0.5881001", "0.58529514", "0.5839716", "0.5838723", "0.58329433", "0.58192885", "0.5818631", "0.58007...
0.8354038
0
popWord() Pops a word using popByte() twice
function popWord() { return popByte() + (popByte() << 8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "popWord() {\n const lowByte = this.popByte();\n const highByte = this.popByte();\n return z80_base_1.word(highByte, lowByte);\n }", "function popByte() {\n return( memory[regPC++] & 0xff );\n}", "getWordFromPool() {\n // explicit return of undefined if no words remaining in arra...
[ "0.7758038", "0.64119834", "0.5815284", "0.5619971", "0.55124056", "0.54493326", "0.541067", "0.5408924", "0.5392179", "0.5388965", "0.53788185", "0.5378427", "0.5332224", "0.53321755", "0.53318137", "0.53119856", "0.5311465", "0.528913", "0.52760226", "0.527446", "0.52729994...
0.86984736
0
memStoreByte() Poke a byte, don't touch any registers
function memStoreByte( addr, value ) { memory[ addr ] = (value & 0xff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "write_byte(byte) {\n this.ensure(1);\n this.buffer[this.pos++] = byte;\n }", "function incrementByte() {\n\t\t\tram[pointerAddress] += 1;\n\t\t\tif(ram[pointerAddress] > 0xFF)\t{\n\t\t\t\tram[pointerAddress] = 0x00;\n\t\t\t}\n\t\t}", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;...
[ "0.6791027", "0.6561545", "0.65027916", "0.63984585", "0.62178576", "0.6197259", "0.614613", "0.60359526", "0.5916196", "0.5858409", "0.5846775", "0.5821286", "0.5783663", "0.568652", "0.5685372", "0.5521975", "0.5496032", "0.54457915", "0.54346406", "0.54129297", "0.54069084...
0.7453917
0
memStoreByte() Peek a byte, don't touch any registers
function memReadByte( addr ) { if( addr == 0xfe ) return Math.floor( Math.random()*256 ); return memory[addr]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memStoreByte( addr, value ) {\n memory[ addr ] = (value & 0xff);\n}", "function popByte() {\n return( memory[regPC++] & 0xff );\n}", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;\n defaultCodePC++;\n codeLen++;\n}", "popByte() {\n const value = this.readByte(this....
[ "0.7246553", "0.635835", "0.63285583", "0.5878463", "0.57752687", "0.57650644", "0.5725184", "0.57235354", "0.55721587", "0.55049974", "0.5485959", "0.53977156", "0.5390005", "0.53657776", "0.53465515", "0.53168863", "0.5222736", "0.52116823", "0.51918334", "0.5159735", "0.51...
0.5648399
8
hexDump() Dump binary as hex to new window
function addr2hex( addr ) { return num2hex((addr>>8)&0xff)+num2hex(addr&0xff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hexDump(out) {\n var lines = [];\n \n for (var i = 0; i < out.length; i += 16) {\n var hex = [];\n var ascii = []; \n \n for (var x = 0; x < 16; x++) {\n var b = out.charCodeAt(i + x).toString(16).toUpperCase();\n b = b.length == 1 ? '0'...
[ "0.64168787", "0.5887438", "0.51269215", "0.5126326", "0.5069582", "0.50514305", "0.5033738", "0.50114375", "0.49355915", "0.49349162", "0.49349162", "0.49281225", "0.48775673", "0.48382613", "0.48382613", "0.48324955", "0.48276857", "0.48101184", "0.48101184", "0.48101184", ...
0.0
-1
readZeroPage() Get value from ZP
function jumpBranch( offset ) { if( offset > 0x7f ) regPC = (regPC - (0x100 - offset)); else regPC = (regPC + offset ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readValue(belowFP) {\n var v = buf.readInt32LE(offset);\n offset += 4;\n return v ? v / (belowFP || 1) : 0;\n }", "function getZeroIndexPage(pagePara, totalPagesPara)\n {\n if (pagePara <= 1 ) {return 0; }\n else if (pagePara >= totalPagesP...
[ "0.5713683", "0.560783", "0.53259444", "0.52669555", "0.52592254", "0.5215868", "0.5130196", "0.51003265", "0.5082457", "0.5059668", "0.5054622", "0.50530124", "0.5026214", "0.4950333", "0.49177796", "0.48911595", "0.4881686", "0.48797438", "0.4875734", "0.48689815", "0.48465...
0.0
-1
execute() Executes one instruction. This is the main part of the CPU emulator.
function execute() { if( ! codeRunning ) return; opcode = popByte(); // message( "PC=" + addr2hex(regPC-1) + " opcode=" + opcode + " X="+regX + " Y=" + regY + " A=" + regA ); switch( opcode ) { case 0x00: // BRK implied codeRunning = false; break; case 0x01: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "execute() {\r\n this.div = this.io.read(0x04);\r\n this.tima = this.io.read(0x05);\r\n this.tma = this.io.read(0x06);\r\n this.tac = this.io.read(0x07);\r\n\r\n this.executeImpl();\r\n\r\n this.io.write(0x04, this.div);\r\n this.io.write(0x05, this.tima);\r\n this.io.write(0x06, this.tma);\...
[ "0.696466", "0.665297", "0.665297", "0.61747265", "0.6172695", "0.6105217", "0.59696114", "0.59458405", "0.59195703", "0.5882392", "0.58671534", "0.57941353", "0.5748453", "0.57203287", "0.5709986", "0.5701901", "0.5645763", "0.5573828", "0.5562319", "0.545575", "0.5451269", ...
0.62859213
3
Define a default UI for filtering
function GlobalFilter({ preGlobalFilteredRows, globalFilter, setGlobalFilter, }) { const count = preGlobalFilteredRows.length; const [value, setValue] = React.useState(globalFilter); const onChange = useAsyncDebounce((value) => { setGlobalFilter(value || undefined); }, 200); return ( <span> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFiltersWrapper() {\n filters = prompt(\"Resource types to filter out, as a comma separated list\", filters);\n document.getElementById('statusFilters').innerHTML = filters\n if(filters === \"\") document.getElementById('statusFilters').innerHTML = \"none\"\n displayData(data);\n}", "function _con...
[ "0.67842644", "0.64910656", "0.6463289", "0.6401152", "0.63953483", "0.62833846", "0.62797946", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.62773156", "0.6259738", "0.6259738", "0.6259738", "0.6259738", "0...
0.0
-1
props: onClickDone callback function executed once finished onClickClose callback function executed to close the modal modalHeader display string for modal header show flag to toggle the modal dish the dish object to add/edit
function DishModal(props) { const[dish, setDish] = useState(); useEffect(() => { setDish(props.dish); }, [props.dish]) function onChangeDish(e) { var name = [e.target.name][0] var value = e.target.value var changedDish = Object.assign({}, dish); changedDish[name] = value; setDish(chan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleCloseModal() {\n this.setState({\n showModal: false,\n editShow: false,\n dataShow: true,\n buttonShow: true,\n addSkill: false\n });\n }", "handleModalClose() {}", "onAddUpdateDataModalClose() {\n this.setState({ addNewDataModal:...
[ "0.6720647", "0.656813", "0.6542541", "0.6518795", "0.6509296", "0.63788235", "0.6366569", "0.6351432", "0.6344139", "0.6311013", "0.6287413", "0.6230908", "0.6221825", "0.61914563", "0.6189688", "0.6173457", "0.6168052", "0.61604106", "0.61530566", "0.6152666", "0.6145154", ...
0.6175737
15
Selects all burgers from the table
selectAll(cb) { orm.selectAll( 'burgers', (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllBurgers() {\n return orm.selectAll('burgers');\n}", "function selectAll() {\n //query all info from burgers_db\n var queryString = \"SELECT * FROM burgers;\"\n connection.query(queryString, function(err, result) {\n if (err) throw err;\n console.log(resu...
[ "0.6418517", "0.5909872", "0.56389594", "0.5307279", "0.52339256", "0.5102972", "0.5018742", "0.49967813", "0.49884373", "0.4972135", "0.49028465", "0.48724568", "0.47567707", "0.47468388", "0.47308776", "0.46793708", "0.46604618", "0.4644286", "0.46383896", "0.46079165", "0....
0.557485
3
Create + Inserts a new row into the burgers table
create(cols, vals, cb) { orm.insertOne( 'burgers', cols, vals, (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertOne(cols, values, cb) {\n console.log(\"burgervals \" + values);\n orm.insertOne('burgers', cols, values, (res) => cb(res));\n }", "function insertOne(newBurger) {\n //insert new burger into table and input devoured boolean value\n var queryString = \"INSERT INTO burgers (bur...
[ "0.6304181", "0.6216506", "0.5957611", "0.5783667", "0.5731143", "0.57202256", "0.5712485", "0.57043904", "0.57010305", "0.5685578", "0.5679874", "0.56718946", "0.5664361", "0.56563914", "0.5650134", "0.5626185", "0.5614221", "0.5609815", "0.559549", "0.5563917", "0.555913", ...
0.71798116
0
Updates a field from a burger from the table
updateOne(objColVals, condition, cb) { orm.updateOne( 'burgers', objColVals, condition, (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateBurger(burger) {\n $.ajax({\n method: \"PUT\",\n url: \"/api/burger\",\n data: burger\n })\n .done(() => getBurgers());\n }", "function updateDaburger(daburger) {\n $.ajax({\n method: \"PUT\",\n url: \"/api/daburgers\",\n data: daburger\n }).done(getDa...
[ "0.6921703", "0.65459365", "0.65145737", "0.64480025", "0.6310424", "0.6070396", "0.6067518", "0.6050774", "0.59740025", "0.5920476", "0.58611965", "0.5860691", "0.5852386", "0.5852386", "0.5852386", "0.5819893", "0.5752482", "0.56790334", "0.5670961", "0.5670467", "0.5635266...
0.6380995
4
Deletes a burger from the table
deleteOne(condition, cb) { orm.deleteOne( 'burgers', condition, (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteBurger() {\n var id = $(this).data(\"id\");\n $.ajax({\n method: \"DELETE\",\n url: \"/api/todos/\" + id\n }).done(function() {\n getBurgers();\n });\n }", "function devourBurger() {\n var id = $(this).data(\"id\");\n\n $.ajax({\n method: \"DELETE\",\n u...
[ "0.7315091", "0.6767443", "0.671512", "0.66541165", "0.6368961", "0.63410383", "0.6321529", "0.6305535", "0.6279154", "0.6267879", "0.6237702", "0.6158303", "0.61193717", "0.6106735", "0.60909754", "0.60560644", "0.60316247", "0.602015", "0.60017526", "0.6000293", "0.599881",...
0.6793226
1
bei wavelet kommt hinzu > dass wir sagen wir drehen alles und packen das alles wieder durch hochpass und gesamten subband wieder rein FFT
function processingVideoGenKompFFTOneHz() { var TPquant = parseFloat(document.getElementById("In1").value); var HPquant = parseFloat(document.getElementById("In2").value); var splitFreq = parseFloat(document.getElementById("In3").value); var Round =0; setFreqQuantMatrix(QuantMatrix,TPquant,HPquant,splitFreq); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n\t background(0);\n\t var spectrum = fft.analyze();// run the FFT analysis\n\n/*\nLocal Variable, fft.getEnergy maps the different \nfrequencies of the audio and returns values between 0 and 255\n*/\n var bass = fft.getEnergy( \"bass\" );\n var treble = fft.getEnergy( \"treble\" );\n var highM...
[ "0.65997046", "0.6391456", "0.63289714", "0.6325243", "0.6316472", "0.6314495", "0.6230025", "0.6187018", "0.6183364", "0.6178808", "0.6176691", "0.61725205", "0.61522925", "0.61431044", "0.6136027", "0.6134597", "0.61254823", "0.60531217", "0.60447484", "0.60278505", "0.6015...
0.6313555
6
using the luhn algorithm to calculate the check digit
function creditCardValidator(cardNumber){ var length = cardNumber.length; var parity = length % 2; var sum = 0; for(var i =0 ; i < length; i++){ var d = parseInt(cardNumber.charAt(i)) if( i % 2 == parity){ d = d * 2 } if(d > 9){ d -= 9 } sum += d; } return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function luhnCheck(val) {\n var sum = 0;\n for (var i = 0; i < val.length; i++) {\n var intVal = parseInt(val.substr(i, 1));\n if (i % 2 == 0) {\n intVal *= 2;\n if (intVal > 9) {\n intVal = 1 + (intVal % 10);\n }\n }\n sum += intVal;\n }\n return sum % 10 == 0;\n}", "functi...
[ "0.8098235", "0.7803057", "0.7721228", "0.7671737", "0.7596671", "0.7570228", "0.7570228", "0.7550099", "0.7494461", "0.74542964", "0.7440877", "0.74407893", "0.73383886", "0.7335503", "0.7240549", "0.7226233", "0.72241837", "0.7218022", "0.7117959", "0.7066508", "0.6925559",...
0.68066233
26
Test if a string is numeric or not
function isNumeric(s) { return !/[^0-9]/.test(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNumeric(string) {\n\treturn isNumeric1(string, false);\n}", "function isNumeric(str) {\r\n\tvar re = /[\\D]/g;\r\n\tif (re.test(str)) {\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "function isNum(str) {\n return !isNaN(str.toString());\n}", "function isNum(str) {\r\n\t\t\tif(str) {\r\n\t...
[ "0.86616254", "0.8396591", "0.8355118", "0.8331498", "0.8274183", "0.809808", "0.80281454", "0.80055374", "0.79984784", "0.79984784", "0.79984784", "0.79831284", "0.7974233", "0.7972293", "0.7954513", "0.7923637", "0.7911737", "0.7875326", "0.7856903", "0.78507054", "0.785061...
0.81610185
5
Invokes function devServer(). When NODE_ENV is not set to production, devServer() is called. Serves all static files within ./dist/dev directory to port 3000.
function devServer() { const express = require('express'); const app = express(); const http = require('http').Server(app); const dirDev = path.join(__dirname, '../dist'); app.use(express.static(dirDev)); // Route catch-all: redirects all server requests to ./dist/index.html app.get('/*', function(req,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDevServer() {\n const WDS = require('webpack-dev-server');\n\n const wpConf = getWebpackConfig();\n\n // Need to update the app entry for webpack-dev-server. This is necessary for\n // the auto page refresh to happen. See: https://github.com/webpack/webpack-dev-server/blob/master/examples...
[ "0.76269805", "0.721687", "0.72007906", "0.69580644", "0.6836725", "0.6784563", "0.6776514", "0.6696798", "0.6654678", "0.65751517", "0.65675974", "0.6521777", "0.6496064", "0.64597625", "0.64423996", "0.6437057", "0.63746715", "0.63732517", "0.62854075", "0.62703496", "0.619...
0.86204886
0
Invokes function compileSCSS(). When called, uses DartSass to compile scss to css. Input: ./src/scss/app.scss. output: ./dist/dev || ./dist/prod depending on NODE_ENV.
function compileSCSS() { const sass = require('sass'); const postcss = require('postcss'); const postcssPresetEnv = require('postcss-preset-env'); console.info('\x1b[36m','😻 Rendering sass...'); sass.render({ file: './src/scss/app.scss', outputStyle: envType !== 'production' ? "expanded" : 'co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileAppSCSS() {\n return processSCSS(CFG.SRC.APP_SCSS, CFG.OUT.APP_MIN_CSS);\n}", "function compileSass() {\r\n\treturn gulp\r\n\t\t.src( paths.scss.src )\r\n\t\t.pipe(\r\n\t\t\tsass( {\r\n\t\t\t\tindentType: 'tab',\r\n\t\t\t\tindentWidth: 1,\r\n\t\t\t\toutputStyle: 'expanded'\r\n\t\t\t} )\r\n\t\t...
[ "0.7756022", "0.7374563", "0.7295169", "0.7256454", "0.7251906", "0.7226781", "0.72126085", "0.7197337", "0.71321577", "0.71318007", "0.7107635", "0.7105073", "0.7092892", "0.70886457", "0.7088355", "0.7087429", "0.70864576", "0.70779145", "0.707746", "0.7077239", "0.7054333"...
0.8240672
0
Invokes function compileECMA(). When called, uses browserify/babelify to compile ECMA script to js. Input: ./src/js/app.js. output: ./dist/dev || ./dist/prod depending on NODE_ENV.
function compileECMA() { console.info('\x1b[36m','😻 transforming ECMA script...'); const browserify = require("browserify"); const babelify = require("babelify"); const envify = require('envify/custom'); let b = browserify({ debug: false }); // Browserify entrypoint and options. b.requ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileAppJS() {\n return processJS(CFG.SRC.APP_JS, CFG.OUT.APP_MIN_JS)\n}", "function friendlyCompile() {\n var env, s, options, args, debug;\n \n if(arguments.length === 0) throw new Error('Invalid arguments');\n \n args = Array.prototype.slice.apply(arguments);\n...
[ "0.6019949", "0.581921", "0.54954547", "0.5473303", "0.53623", "0.53532535", "0.5333184", "0.52876544", "0.52438194", "0.51820695", "0.5149812", "0.5145595", "0.5136617", "0.51198643", "0.5109451", "0.50713134", "0.50654244", "0.50515944", "0.5024466", "0.50170606", "0.500452...
0.8636182
0
Invokes function taskWatcher(). Watches ./src folder for file changes. Gets file extension name of file. conditionally compileECMA or compileSCSS depending on changed files ext's type.
function taskWatcher() { console.info('\x1b[37m', '👀 Dev-tools: watching for changes.') const chokidar = require('chokidar'); const dirSrc = path.join(__dirname, '../src'); chokidar.watch(dirSrc).on('change', path => { let extType = path.split('.').pop(); if (extType === 'js') { compileECMA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function watchTask(){\r\n watch([files.scssPath, files.jsPath],\r\n series(\r\n parallel(scssTask, jsTask)\r\n )\r\n ); \r\n}", "function watchTask() {\n watch(\"./src/html/**/*.+(html|njk)\", series(htmlComp, browsersyncReload));\n watch([\"./src/css/**/*.css\"], series(c...
[ "0.6525695", "0.6505681", "0.6455849", "0.6434195", "0.6399119", "0.6142699", "0.6079076", "0.60318226", "0.60088867", "0.59996295", "0.59198844", "0.5907075", "0.5866663", "0.5853248", "0.5845299", "0.58435136", "0.5823406", "0.58220494", "0.5793627", "0.5786074", "0.5765783...
0.7340203
0
Predefined function of React.js. It configures and sets the map.
componentDidMount() { // console.log('this.props.avg_lat', this.props.avg_lat); this.generateMap(this.state.traffic_map_view); console.log('in dashmap', this.maps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initMap() {\n}", "async componentDidMount() {\n const mapboxgl = await import(/* webpackChunkName: \"mapbox-gl\" */ 'mapbox-gl');\n const { accessToken } = this.props;\n const { container } = this;\n\n if (!container) return;\n const mapInitProps = Object.keys(MAP_PROP_TYPES).reduce(\n ...
[ "0.71891975", "0.69920844", "0.69584864", "0.69459826", "0.69343585", "0.6924894", "0.68971133", "0.6888062", "0.6878758", "0.6840468", "0.6751524", "0.6743276", "0.6719402", "0.67135537", "0.66987014", "0.6672881", "0.66700983", "0.6647285", "0.6647285", "0.66469437", "0.664...
0.0
-1
THis function sets the value of dash to null.
setDash() { this.setState({ dash: null }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dash2null(value){return (/^\\s*-+\\s*$/g.test(value))?'':value}", "set None(value) {}", "set None(value) {}", "set None(value) {}", "set None(value) {}", "function attrNull() {\n this.removeAttribute(name);\n }", "function attrNull() {\n this.removeAttribute(name);\n }", "function at...
[ "0.74450356", "0.6514677", "0.6514677", "0.6514677", "0.6514677", "0.59883606", "0.59883606", "0.5955964", "0.5786021", "0.5770785", "0.57469517", "0.57469517", "0.5668331", "0.5549077", "0.55341667", "0.5507974", "0.5476177", "0.5359254", "0.5326002", "0.53259826", "0.526881...
0.6454413
5
Categorize the DG according to their status(online/offline) and add marker image accordingly.
categorizeStations(update) { console.log('click categorize', update); var that = this; // console.log('categorizeStations', that); for (i = 0; i < gMarkers.length; i++) { gMarkers[i].setMap(null); }; gMarkers=[]; // console.log('this.markerCluster1', this.markerCluster); if (this.markerCluster !== nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classify_map() {\n console.log(\"Classifying map...\");\n counties.style(\"fill\", null)\n .attr(\"class\", function (d) {\n var cl = get_class(dataByID[d.id], classBreaks) - 1;\n return \"counties \" + colorScheme + \"q\" + cl + \"-\" + (classBreaks.length - 1);\n ...
[ "0.5652543", "0.56050354", "0.5399333", "0.5385227", "0.53717333", "0.53150773", "0.52970004", "0.529054", "0.5260375", "0.5214394", "0.5210403", "0.5205603", "0.5160208", "0.5140393", "0.51394373", "0.5130949", "0.51261824", "0.51205987", "0.51128304", "0.5092916", "0.507568...
0.6121741
0
to variable message defined in the parent() function
function parent() { const message = "Hello World"; function child() { console.log(message); //has access to parent scope } child(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "childFunction() {\n // by using super, we can call the parent method\n const message = super.parentFunction();\n console.log(message);\n }", "function getMessage() {\n\n}", "function getMsg()\n{\n\treturn msg;\n}", "statusMessage() {\n if (!this.parentField) return;\n\n retu...
[ "0.6664471", "0.6539491", "0.64362365", "0.63935643", "0.6300639", "0.6201687", "0.61987424", "0.61912465", "0.6159278", "0.6159278", "0.6144283", "0.6131774", "0.6049088", "0.60034215", "0.60034215", "0.6002241", "0.60013676", "0.59714216", "0.59708434", "0.59452945", "0.591...
0.5637126
48
Calculates shelf size, as the total quantity times the unit size.
shelfSize() { return this.values.size * this.values.quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shoeSize(playerInput) {\n const shoe = players()[playerInput].shoe;\n return `${playerInput} has size ${shoe} shoes.`\n}", "function getSize(magnitude) {\n return magnitude * 5\n}", "function calculatePrice(size, paper, frame, quantity){\n \n // add the items costs' up and mul...
[ "0.6172428", "0.59622025", "0.5844235", "0.58429486", "0.5801901", "0.5801376", "0.57847744", "0.57626444", "0.5739556", "0.56947285", "0.5620868", "0.5576266", "0.55417025", "0.5539004", "0.5535426", "0.5517475", "0.5457198", "0.54372776", "0.54372776", "0.54344755", "0.5434...
0.775456
0
Restores select box state to saved value from localStorage.
function restore_options() { var options = loadLoginOption(); if (!options) { return; } $("#username").val(options["username"]); $("#pwd").val(options["pwd"]); $("#trdpwd").val(options["trdpwd"]); $("#hdd").val(options["hdd"]); $("#ip").val(options["ip"]); $("#mac").val(opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restore_options() {\n\n forEachField(function(id){\n\n val = localStorage[id];\n $('#' + id).val(val);\n\n });\n\n}", "function restore_options() {\n\n left.value \t= localStorage[\"left\"];\n right.value \t= localStorage[\"right\"];\n tops.value \t= localStorage[\"tops\"];\n bottom.value \t...
[ "0.7693546", "0.7559136", "0.75562835", "0.74789256", "0.71995264", "0.71847486", "0.7180412", "0.71231234", "0.71006364", "0.70889556", "0.7067842", "0.704489", "0.7039455", "0.70111716", "0.70043916", "0.6855076", "0.6835309", "0.68254226", "0.6820688", "0.67901343", "0.677...
0.0
-1
CLASS Create an instance of a fluid dynamics system.
function FluidDynamics() { console.log("Starting fluid dynamics system.") // Get some basic info from system. var mobile = navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|Opera Mini|IEMobile/i) this.canvas = document.getElementById('theCanvas'); this.context = this.canvas.getCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function VehicleFactory() { }", "function VehicleFactory() { }", "function VehicleFactory() {}", "function VehicleFactory() {}", "function VehicleFactory() {}", "function _createPhysicsEngine() {\n this.physicsEngine = new PhysicsEngine();\n this.repulsion = new Repulsion({\n str...
[ "0.5937874", "0.5937874", "0.5895459", "0.5895459", "0.5895459", "0.5759717", "0.56917197", "0.56659687", "0.56311715", "0.55045414", "0.55022746", "0.5483593", "0.5445897", "0.5438402", "0.5438402", "0.5427622", "0.5363808", "0.5338633", "0.5312942", "0.5306399", "0.5293181"...
0.66331506
0
Reset the timer that handles performance evaluation:
function resetTimer() { stepCount = 0; startTime = (new Date()).getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetTimer() {\n this.timeSelected = 0;\n this.completeElapsed = 0;\n this.complete = false;\n }", "reset() {\n this.elapsedTime = 0;\n }", "reset() {\n this.stop();\n $(this._timerElemjQuery).text(\"00\");\n this._start = null;\n this._duration = 0...
[ "0.77354264", "0.74883145", "0.73853725", "0.73853725", "0.7361871", "0.727066", "0.7252085", "0.718903", "0.71851736", "0.7161158", "0.7152952", "0.71520543", "0.7092536", "0.7078522", "0.69937354", "0.6992859", "0.69233054", "0.6918629", "0.6913606", "0.6897907", "0.6895916...
0.7667771
1
splits along '=' delimiter .node is the node to look at .value is the supplied value
function nodeParser(node){ if(node.indexOf('=') >= 0) { var splitNode = node.split('='); var returnNode = new Object(); returnNode.node = splitNode[0]; returnNode.value = splitNode[1]; return returnNode; } else{ console.error("Improperly formatted node!") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitKeyValuePair(str){var index=str.indexOf('=');var key;var val;if(index===-1){key=str;}else{key=str.substr(0,index);val=str.substr(index+1);}return[key,val];}", "function splitProperty(line, delimiter) {\n var parts = [], last = 0, inBrackets = false;\n\n for (var i = 0; i < line.length; i++) {\n ...
[ "0.5717753", "0.5556586", "0.5464812", "0.54591554", "0.542506", "0.54120547", "0.5265378", "0.5243485", "0.52272004", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", ...
0.66468745
0
=======div id color picker ==========
function colorPickerButton(grid, setColorsInPicker) { var color_but = document.createElement('button'); color_but.style.background = setColorsInPicker; color_but.style.width = '25px'; color_but.style.height = '25px'; color_but.appendChild(document.createTextNode('')); grid.appendChild(color_but); color_bu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function coloring(id) {\n var block = document.getElementById(id);\n var color = document.getElementById('colorPicker').value;\n block.style.backgroundColor = color;\n}", "function colorSelect() {\n let id = parseInt(this.id);\n\n changeColor(id, this);\n color = true;\n}", "function getColor...
[ "0.7412909", "0.69909406", "0.6980434", "0.6938599", "0.6859045", "0.6842273", "0.6826593", "0.67746264", "0.6667856", "0.6624374", "0.661385", "0.65900123", "0.6587687", "0.6584069", "0.6541141", "0.65163153", "0.6514023", "0.64599866", "0.64546084", "0.6415218", "0.6410921"...
0.0
-1
POPULATE STATE WITH BRANCH ID TO MAKE ALL NEEDED REQUESTS
componentDidMount(){ fetch('http://ec2-34-227-27-186.compute-1.amazonaws.com:3001/getbranchids') .then( res => res.json() ) .then( branches => this.setState({branches})) .catch(err => console.log(err)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "submitRequest(IDs, names) {\n this.setState({schoolList: names, \n agreementKeys: IDs.agreements.map( (arg) => {return arg.major})\n })\n\n RequestAPI().requestAgreements(IDs)\n .then( data => {\n let lookup = new Map()\n for(let i = 0; i < data.lookup.length; i++) {...
[ "0.56477755", "0.52529943", "0.52308214", "0.5223944", "0.5182436", "0.5173485", "0.51416326", "0.5114443", "0.5113116", "0.5078461", "0.5061442", "0.50567365", "0.5052055", "0.5029647", "0.50234956", "0.5010944", "0.49822694", "0.49628928", "0.49471664", "0.4946332", "0.4937...
0.0
-1
helper function to make title case
function toTitleCase(str) { return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function titleCases(arg){\n return arg.charAt(0).toUpperCase() + arg.substring(1);\n }", "function toTitle(c){\r\n return c.toUpperCase();\r\n}", "function toTitlecase(val) {\n if (options.titleCase) {\n val = val.replace(/([a-z])([A-Z])/g, '$1 $2');\n ...
[ "0.8627814", "0.84660447", "0.8433444", "0.8377801", "0.8369306", "0.8292957", "0.8283615", "0.82439405", "0.8224707", "0.82046324", "0.82015705", "0.8194964", "0.8192972", "0.8156697", "0.8147823", "0.8131607", "0.81215817", "0.81179345", "0.8094307", "0.8094307", "0.8091507...
0.7969817
45
method to fetch ticket from the API
fetchTicket(){ //set loading to true. set to false after request success/error this.props.loadRequest() fetch('http://helpdesk.dev/api/tickets/'+this.props.tid+'?pos='+this.props.position+'&em='+this.props.user.email, { method: 'GET', headers: { 'Accept': 'application/json' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchTicket() {\n axios\n .get(props.event._links.eventTickets.href, options)\n\n .then((response) => {\n setTicket(response.data._embedded.eventTickets[0]);\n })\n .catch(function (error) {\n console.log(error);\n })\n .finally(function () {});\n }", "fun...
[ "0.7982605", "0.69436985", "0.69329", "0.6898935", "0.6707853", "0.6697348", "0.665233", "0.6461146", "0.6427395", "0.6361777", "0.6342843", "0.63225806", "0.6210827", "0.61988056", "0.6146994", "0.614159", "0.6137385", "0.6135134", "0.6095798", "0.6072929", "0.6020804", "0...
0.71929944
1
method to submit a newly created comment
submitComment(){ var formData = new FormData(); formData.append("admin_email", this.props.user.email); formData.append("content", this.props.comment_html); //set loading to true, set it to false after response is complete this.props.setCommentSaveLoading(true); fetch('http://helpdesk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitComment(e) {\n e.preventDefault();\n let newCommentData = { text: newComment, userId: user.id, postId: postId }\n console.log(newCommentData);\n\n API.Comment.createComment(newCommentData)\n .then(res => {\n console.log(\"Comment created!\");\n ...
[ "0.8254044", "0.7829785", "0.74746984", "0.7433153", "0.73473376", "0.73148215", "0.728619", "0.7222836", "0.72087896", "0.7200597", "0.71716243", "0.715895", "0.70255053", "0.70044184", "0.70033264", "0.6975231", "0.69491255", "0.69335586", "0.69246125", "0.6907786", "0.6902...
0.6727334
34
method to submit a newly created status
submitStatus(){ var formData = new FormData(); formData.append("admin_email", this.props.user.email); formData.append("title", this.props.status_form.title); formData.append("content", this.props.status_form.content); formData.append("status", this.props.status_form.status); this.pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async create() {\n let api = this.app.service('status');\n let record = {\n uuid: this.uuid,\n flavor: this.options.flavor,\n timezone: this.getTimezone(),\n };\n return api.create(record, {\n })\n .then((res) => {\n logger.info('Created a Status record with server side ID...
[ "0.6948532", "0.6399034", "0.60254407", "0.60040957", "0.58954287", "0.5852541", "0.5839862", "0.58385396", "0.5784814", "0.5770287", "0.57269305", "0.57206655", "0.56917536", "0.56779206", "0.5666486", "0.5645104", "0.5641335", "0.5621466", "0.56104213", "0.56065625", "0.558...
0.6495809
1
Render an error message if ticket cannot be acquired
renderError(){ const classes = this.props.classes; return ( <div> <h1>Whoops! Something went wrong</h1> <Button onClick={this.fetchTicket.bind(this)} raised color="primary" className={classes.button}> Refresh </Button> <Button onClick={this.props.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTicketMessage() {\n res.render('index', {title: 'Ticket Checker', message: message, errorMessage: errorMessage});\n }", "function ticketNotFound(app, errorCode) {\n\n if (errorCode == 2) {\n var errorLabel = app.createLabel('Ticket já utilizado. Por favor, entre com outro.').setStyleAttrib...
[ "0.676607", "0.61858046", "0.60545737", "0.59893566", "0.5953077", "0.58746517", "0.58333725", "0.58160484", "0.5790472", "0.5758221", "0.5756595", "0.56649333", "0.5658361", "0.56349623", "0.56300634", "0.5599594", "0.55811536", "0.55665016", "0.5558912", "0.5536416", "0.551...
0.5192435
89
Render the ticket detail using material ui grid system
renderTicketDetail(){ const ticket = this.props.ticket; return ( <Grid container spacing={24}> <Grid item xs={12}> <Typography type="caption" gutterBottom> Ticket ID </Typography> <Typography type="display1" gutterBottom> {tic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderDetail(){\n if(!this.props.ticket){\n return (<div></div>)\n }\n const classes = this.props.classes;\n return (\n <div>\n <Paper className={classes.paper} elevation={4}>\n {this.renderTicketDetail()}\n </Paper>\n <Paper className={classes....
[ "0.73581594", "0.65292835", "0.6284471", "0.6019616", "0.5998886", "0.59643716", "0.59076625", "0.58147556", "0.57880545", "0.57378995", "0.57277167", "0.57160306", "0.5706726", "0.56933266", "0.56844187", "0.5653234", "0.5647947", "0.5646936", "0.564569", "0.5636944", "0.563...
0.8077815
0
render the admin in history who is in charge of the ticket
renderAdmin(admin){ const {technical_email, helpdesk_email, priority, escalation_level} = admin; return ( <div key={'admin-history-' + admin.ahid}> <Grid container spacing={24}> <Grid item xs={12} md={6}> <Typography type="title" gutterBottom> {this.getTechn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderHistoryList() {}", "renderTechnicianHistory(){\n const {admins} = this.props.ticket;\n return (\n <div>\n <Typography type=\"display1\" gutterBottom>\n Admin History\n </Typography>\n {admins && admins.length > 0 ? \n <div>\n ...
[ "0.6655637", "0.6223943", "0.5802431", "0.5764432", "0.57354003", "0.57129616", "0.5657361", "0.56352186", "0.56310135", "0.56064254", "0.55858135", "0.5540381", "0.55019945", "0.5501206", "0.5491807", "0.548374", "0.54648954", "0.54626673", "0.54579395", "0.5453163", "0.5446...
0.6095486
2
render the history of assigned technicians to the ticket
renderTechnicianHistory(){ const {admins} = this.props.ticket; return ( <div> <Typography type="display1" gutterBottom> Admin History </Typography> {admins && admins.length > 0 ? <div> {admins.map(obj=>( this.renderAd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTickets(data) {\n let output = \"\";\n // if (data.messages.length > 0) {\n data.tickets.forEach(function(ticket) {\n let state;\n if(ticket.state==\"read\"){\n state=\"خوانده شده\"\n }\n else if(ticket.state==\"unread\"){\n state=\"خوانده نشده\"\n }\n else if(ticket.sta...
[ "0.64504987", "0.6434301", "0.6382848", "0.5874246", "0.58008385", "0.5698509", "0.56021", "0.5563081", "0.5512363", "0.5501713", "0.54240614", "0.54203194", "0.5378466", "0.53632677", "0.535221", "0.53510845", "0.5339775", "0.52986807", "0.5268015", "0.5236644", "0.5215993",...
0.6136999
3
render the technician who is in charge of the ticket
renderTechnician(){ const {escalation_level, technical_email, helpdesk_email, priority} = this.props.ticket; if(technical_email == null){ return ( <Typography type="display2" color="accent" gutterBottom> Not Assigned </Typography> ) } return ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewTickets(agent) {\n agent.add(`Give us the name of the person whom the ticket was issued to.`);\n }", "function showTickets(data) {\n let output = \"\";\n // if (data.messages.length > 0) {\n data.tickets.forEach(function(ticket) {\n let state;\n if(ticket.state==\"read\"){\n state=...
[ "0.63928074", "0.6152087", "0.5743208", "0.57063776", "0.5691622", "0.55838716", "0.5536797", "0.5524759", "0.55188805", "0.55076134", "0.54708856", "0.5467058", "0.5383329", "0.53485334", "0.5333142", "0.530108", "0.5290709", "0.5285415", "0.5268951", "0.5213955", "0.5201619...
0.6752365
0
render the status item
renderStatus(stat){ const {title, message, status, admin_email, sid} = stat const pendingColor = '#ff6b57'; const resolvedColor = '#2ef15b'; const unresolvedColor = '#f22e2e'; const inProgressColor = '#2d3ef0'; const color = { 'PENDING': pendingColor, 'RESOLVED': reso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStatus (value, p, r) {\n var statusId = r.get('statusId');\n if(statusId == 1)\n return '<span class=\\'successBox font10\\' >#{msgs.success}</span>';\n else if(statusId == 2)\n return Ext.String.format('<span class=\\'warnBox font10\\' >#{msgs.warning}</span>',value);\n else if(statusId =...
[ "0.6945435", "0.6716089", "0.66309434", "0.64333713", "0.64295244", "0.63495225", "0.6329823", "0.63156325", "0.6163262", "0.6103644", "0.6092603", "0.608821", "0.607012", "0.6061754", "0.60594195", "0.60244936", "0.60058296", "0.5987088", "0.59740204", "0.5969054", "0.595044...
0.67310435
1
render the status history
renderStatuses(){ const statuses = this.props.ticket.statuses; return ( <div> <Typography type="display1" gutterBottom> Statuses </Typography> {statuses && statuses.length > 0 ? <div> <Divider className={this.props.classes.divider}/> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderHistoryList() {}", "showHistory(history) {\n\n return (\n history.map((dataBit, i) => {\n return (\n <ul \n key={i+\"list\"} \n className=\"history\"\n >\n {this.dataRender(dataBit, i)}\n </ul>\n\n );\n })\n ...
[ "0.77872604", "0.68571025", "0.6635979", "0.6601138", "0.65407926", "0.6508024", "0.6452673", "0.6391018", "0.6335151", "0.62130487", "0.6207262", "0.6187733", "0.6138511", "0.61175936", "0.6108179", "0.6072352", "0.60703284", "0.6055452", "0.6013719", "0.6011306", "0.6008692...
0.55163366
67
render the status form
renderStatusForm(){ const classes = this.props.classes; return ( <form className={classes.container} noValidate autoComplete="off"> <TextField id="title" label="Title" value={this.props.status_form.title} onChange={(e)=>{ this.props.setStat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderStatuses(){\n const statuses = this.props.ticket.statuses;\n return (\n <div>\n <Typography type=\"display1\" gutterBottom>\n Statuses\n </Typography>\n {statuses && statuses.length > 0 ? \n <div>\n <Divider className={this.props.clas...
[ "0.6128697", "0.6045556", "0.59944487", "0.5950785", "0.5925361", "0.590517", "0.5857237", "0.5815724", "0.57964116", "0.57883674", "0.577412", "0.5740706", "0.5738936", "0.5732025", "0.56940114", "0.56931204", "0.568571", "0.568328", "0.5679731", "0.5666183", "0.56600034", ...
0.6973522
0
render a single comment
renderComment(comment){ const {admin_email, content, cid} = comment; return ( <div key={'comment-'+cid}> <Typography type="body2" gutterBottom> {this.getTechnicalName(admin_email)} <br/> {admin_email} </Typography> <Typography type="body1"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderSingleComment(comment) {\n return `\n <div class=\"comment\" id=\"comment-${comment.id}\">\n <h1>${comment.name}</h1>\n <p>${comment.content}</p>\n <button class=\"delete-comment\" id=\"delete-comment-${comment.id}\" data-ref=\"delete-comment\" data-id=\"${comment.id}\">🗑</button>\n ...
[ "0.7970341", "0.7052737", "0.6950543", "0.6822034", "0.673592", "0.67276037", "0.6727053", "0.6709541", "0.6675368", "0.6630209", "0.6565608", "0.6535585", "0.6524328", "0.6494146", "0.6422955", "0.6393474", "0.6383387", "0.63629854", "0.6316873", "0.6305404", "0.6301684", ...
0.66449934
9
render the comment form.
renderCommentForm(){ const classes = this.props.classes; return ( <div> <Editor editorState={this.props.editor_state} editorClassName={this.props.classes.editor} onEditorStateChange={this.props.setEditorState} /> {this.props.request_comment_error ? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCommentForm(imageId) {\n let commentForm = document.getElementById('comment-form');\n if (commentForm == null)\n createCommentForm(imageId);\n else\n updateCommentForm(commentForm, imageId);\n }", "render() {\n\t\t// Check comment status from component...
[ "0.6869468", "0.68233347", "0.6731444", "0.66566074", "0.6634815", "0.64779425", "0.6305252", "0.62219393", "0.6213116", "0.61855465", "0.6096092", "0.60501885", "0.6047934", "0.60313547", "0.60190654", "0.6005124", "0.59873396", "0.5977789", "0.5954728", "0.5918594", "0.5892...
0.67954576
2
render the comment history
renderComments(){ const comments = this.props.ticket.comments; const classes = this.props.classes; return ( <div> <Typography type="display1" gutterBottom> Comments </Typography> {comments && comments.length > 0 ? <div> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderHistoryList() {}", "function renderComments() {\n const commentsContainer = document.querySelector(\".comments\");\n commentsContainer.innerHTML = \"\";\n\n // defining the html to place into the comments section\n let html = \"\";\n\n // using comments array data with a template to define ne...
[ "0.7367688", "0.7105551", "0.67863655", "0.66587234", "0.644781", "0.6382301", "0.6376716", "0.633791", "0.6319604", "0.62902164", "0.6266475", "0.62427986", "0.62372273", "0.6219294", "0.6195178", "0.61948645", "0.6160026", "0.6135845", "0.6122486", "0.61171263", "0.6115217"...
0.58534145
35
render the technician form
renderTechnicianForm(){ const {escalation_level, technical_email} = this.props.ticket; return ( <div> <Typography type="title" gutterBottom> {this.props.position === 'hr' ? 'Reassign Technician' : 'Request new technician'} </Typography> <Grid container spacing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderTechnician(){\n const {escalation_level, technical_email, helpdesk_email, priority} = this.props.ticket;\n if(technical_email == null){\n return (\n <Typography type=\"display2\" color=\"accent\" gutterBottom>\n Not Assigned\n </Typography>\n )\n }\n ...
[ "0.6049788", "0.5771805", "0.5661346", "0.5543806", "0.5529373", "0.5479745", "0.5364905", "0.53525406", "0.5318348", "0.5267589", "0.52011335", "0.519906", "0.5192317", "0.51826745", "0.5179671", "0.51765853", "0.515312", "0.5131598", "0.5130568", "0.5111252", "0.5050523", ...
0.63525
0
method chaining to above methods.
renderDetail(){ if(!this.props.ticket){ return (<div></div>) } const classes = this.props.classes; return ( <div> <Paper className={classes.paper} elevation={4}> {this.renderTicketDetail()} </Paper> <Paper className={classes.paper} elevatio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "chain (_) {\n return this \n }", "chain(_) {\n return this\n }", "function whatisthis() {\n return this;\n }", "get and() { return this; }", "get and() { return this; }", "function self($this) {\n\treturn $this;\n}", "ap (_) { \n return this\n }", "__previnit(){}", "apply () {}"...
[ "0.6592682", "0.62299997", "0.6188141", "0.6039525", "0.6039525", "0.5888365", "0.5601941", "0.55342245", "0.54765654", "0.5465221", "0.5422137", "0.53545123", "0.5323739", "0.5278825", "0.52447724", "0.52447724", "0.52425736", "0.52216005", "0.52115625", "0.5205744", "0.5133...
0.0
-1
map technician email to name
getTechnicalName(email){ for(var i = 0; i < this.props.technicians.length; i++){ var item = this.props.technicians[i]; if(item.email == email){ return item.name; } } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNameForAnEmail(clientEmail) {\n for (var i = 0; i < all_occupants_details.length; i++) {\n if (all_occupants_details[i].email == clientEmail) return all_occupants_details[i].name;\n }\n\n //own email id is not available in all_occupants_details...\n //so return own user_name in that case...\n i...
[ "0.65020216", "0.65020216", "0.6449625", "0.6449625", "0.63722163", "0.6349397", "0.62058306", "0.6197255", "0.6196432", "0.6073502", "0.6070284", "0.6050869", "0.60273844", "0.5897839", "0.58370924", "0.5823831", "0.58217317", "0.577771", "0.5766659", "0.57572967", "0.569870...
0.7417761
0
the main render function
render() { const classes = this.props.classes; return ( <div className={classes.root}> <Button raised dense onClick={this.props.goBack} style={{marginBottom:25}}>Back</Button> { this.props.loading ? <CircularProgress size={50} /> :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render() {\n\n\t\t\t}", "function render() {\n\t\t\t}", "function render() {\n\t\t\n\t}", "render() {}", "render() {}", "render() {}", "function render() {\n\t}", "_render() {}", "render(){}", "render(){}", "render() { }", "render() {\n\n\t}", "render() {\n\n\t}", "function rende...
[ "0.88683856", "0.8857289", "0.87062794", "0.85659164", "0.85659164", "0.85659164", "0.85656804", "0.851282", "0.8304396", "0.8304396", "0.82916105", "0.81877667", "0.81877667", "0.81834334", "0.81834334", "0.80434734", "0.80434734", "0.7913508", "0.78994864", "0.7877934", "0....
0.0
-1
Make sure the executed commands work with docker enabled/disabled
function dockerExec(cmd, runsWithDocker, silent) { if (silent === undefined) { silent = false; } var options = { stdio: 'inherit', env: process.env }; if (silent) { options = { env: process.env }; } var cmdMain; var cmdArgs; if (runsWithDocker) { cmdMain = 'fig'; cmdArgs = ['run', 'ser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fixCompatibilityIssueWithDockerMachine({ ssh }) {\r\n console.group('• Fixing remote docker daemon - changing daemon storage driver')\r\n\r\n let dockerMachineConfigurationFile = '/etc/systemd/system/docker.service.d/10-machine.conf' // file that holds the docker storage driver configuration.\...
[ "0.6029741", "0.59604573", "0.54648817", "0.53757024", "0.5363231", "0.5205795", "0.51340187", "0.51261836", "0.51076514", "0.5098445", "0.5084006", "0.5023692", "0.5016287", "0.5001993", "0.49889383", "0.49820328", "0.49814352", "0.4974881", "0.49729422", "0.49534842", "0.48...
0.52561486
5
Only `create` should be using `new`. Constructors can't be `async`, so every other caller of `new` needs to call `_loadDoc` also that would be fragile.
function PdfUtils(inputFilePath) { this.inputFilePath = inputFilePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static create () {}", "create() {}", "create() {}", "async init () {}", "create () {}", "create () {}", "async init(){}", "async init() {}", "async init() {}", "constructor(doc) {\n super(doc);\n }", "create() {\n return this.new();\n }", "create() {\n\t}", "async create({ reques...
[ "0.6659577", "0.64003134", "0.64003134", "0.62995374", "0.6245793", "0.6245793", "0.62226015", "0.61314696", "0.61314696", "0.6087233", "0.60524094", "0.60237426", "0.6017701", "0.600156", "0.5976461", "0.5976461", "0.5976461", "0.5976461", "0.5976461", "0.5976461", "0.597646...
0.0
-1
generates error as name has scope inside function only very good example, please read thoroughly
function varTest(){ var x=1; if (true){ var x=2; console.log(x); //2 } console.log(x); //2 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function invalid identifier () {}", "function name() {}", "function VeryBadError() {}", "function mistake8() {\n\ttoss();//not even a name\n}", "function sayMyName(name) {\n if(name == '') {\n throw new Error('Name is not defined');\n } else {\n console.log(`Hello ${name}`);\n }\n}", "function u...
[ "0.697327", "0.6850239", "0.6739036", "0.6675297", "0.66629255", "0.66264594", "0.6624733", "0.63225955", "0.62856907", "0.6260867", "0.619764", "0.619055", "0.6186061", "0.61815023", "0.61815023", "0.61779195", "0.6176064", "0.6175628", "0.61606514", "0.6129488", "0.6120219"...
0.0
-1
works for other iterable too(including newly introduced Map, Set, WeakMap and WeakSet) /function definition old syntax
function add(x,y){ var sum=x+y; console.log(sum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Iterable() {}", "function fd(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterato...
[ "0.6895688", "0.6677342", "0.66365856", "0.6624055", "0.6604197", "0.6591574", "0.65752524", "0.6505741", "0.6505741", "0.6505741", "0.6505741", "0.65035504", "0.6478789", "0.6461111", "0.64491856", "0.6449062", "0.64380664", "0.63782364", "0.6362", "0.6310378", "0.6310378", ...
0.0
-1
default parameters default values right while decalring
function test(a, b=3, c=42) { return a+b+c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaults(a,b,c){if(a!=null){return a;}if(b!=null){return b;}return c;}", "function defaults(a,b,c){if(a!=null){return a;}if(b!=null){return b;}return c;}", "function defaults(a,b,c){if(a!=null){return a;}if(b!=null){return b;}return c;}", "function defaultParams(a, b, c = 0) {\n console.log(a, b, c...
[ "0.7310126", "0.7310126", "0.7310126", "0.7261624", "0.7112963", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "0.71080047", "...
0.0
-1
20 /Rest & Spread rest parameters previously
function containsAll(arr){ for(let k=1; k<arguments.length;k++){ //arguments object to pass arguments let num=arguments[k]; if(arr.indexOf(num)===-1){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restParam (...rest) {\n console.log(rest)\n}", "function prepRest() {\n targetStr = \"&@target='\" + hostUrl + \"'\";\n baseUrl = appUrl + \"/_api/SP.AppContextSite(@target)/\";\n executor = new SP.RequestExecutor(appUrl);\n }", "function restApi(action, morePa...
[ "0.6629383", "0.6604313", "0.6462587", "0.6368169", "0.6195429", "0.6040478", "0.60237354", "0.598039", "0.5975597", "0.5963111", "0.58915013", "0.57911736", "0.5680182", "0.56434846", "0.56431365", "0.56393045", "0.55697715", "0.5537721", "0.552857", "0.552857", "0.552857", ...
0.0
-1
End Work1 Work2 using promise(for more complex problems)
function asyncFunction(work){ return new Promise(function(resolve,reject){ //resolve for success and reject for failure if (work === "") reject(Error("Nothing")); setTimeout(function(){ resolve(work); },1000); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test2() {\n\t// returns a promise \n return job1().then(function(data) {\n // console.log(data + ' play with me ');\n return data + ' play with me '\n });\n}", "function finish(){\n // console.log (\"finish inner function\")\n resolve();\n ...
[ "0.6427935", "0.57768524", "0.57157767", "0.56200886", "0.55998915", "0.5579671", "0.5576073", "0.5555803", "0.5524324", "0.55228883", "0.5519648", "0.5503714", "0.54476005", "0.54455924", "0.543235", "0.542951", "0.54099476", "0.5372383", "0.53721404", "0.53656834", "0.53656...
0.0
-1
vuerouter v2.8.1 (c) 2017 Evan You
function n(t,e){if(!t)throw new Error("[vue-router] "+e)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "function TM(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return ...
[ "0.6127533", "0.6103999", "0.59483117", "0.5878165", "0.5870508", "0.582414", "0.5814343", "0.5798745", "0.57300794", "0.56922334", "0.56615657", "0.56448144", "0.56337994", "0.5632963", "0.56191975", "0.56190926", "0.55955976", "0.5583376", "0.558045", "0.55567193", "0.55496...
0.0
-1
Desc set contact page height
function setHeightForContact() { var windowHt = $(window).outerHeight(true); var headerHt = $(".bar-header").outerHeight(true); var subNameHt = $(".contact-detail").outerHeight(true); var subHeaderHt = $(".subCtHdr").outerHeight(true); var tabHt = $(".tsb-icons").outerHeight(true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set pageHeight(value) {\n this.pageHeightIn = value;\n this.notifyPropertyChanged('pageHeight');\n }", "function getNewHeight(){\r\n\tvar top=dojo.style(\"details_land\",\"height\");\r\n\tvar title=dojo.style(\"pageHeader\",\"height\");\r\n\tvar newHeight=top-title;\r\n\tdojo.style(\"pageBottom\...
[ "0.6860957", "0.67596656", "0.67265", "0.66965413", "0.66951936", "0.6690614", "0.6593252", "0.6561655", "0.6552439", "0.65394115", "0.6519308", "0.6486603", "0.64689696", "0.6456583", "0.6419527", "0.6413123", "0.6403234", "0.6384435", "0.636033", "0.63567454", "0.63403314",...
0.75221056
0
Desc fetch offline data from soup
function getDataFromOffline(type, contactId) { var configObject = getPreFilledJSONArray(type); DataService.getSoupData(configObject.soupName, 10).then( function(entries) { var contactIdIndex = $.map(entries.currentPageOrderedEntries, function(obj, index) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractData(html){\n let searchtool=cheerio.load(html);\n\n let part = searchtool('a[data-hover=\"View All Results\"]');\n let SourceLink=part.attr(\"href\");\n let FullLink=`https://www.espncricinfo.com${SourceLink}`;\n console.log(FullLink);\n\n //Now requesting on FullLink to obtain s...
[ "0.63478076", "0.6329815", "0.6309862", "0.61777276", "0.6132898", "0.6092627", "0.6087258", "0.6044365", "0.5971876", "0.595719", "0.5947423", "0.5925589", "0.5924017", "0.591408", "0.590903", "0.5876387", "0.58745277", "0.58459914", "0.58395624", "0.5834958", "0.5824153", ...
0.0
-1
Desc store offline data in soup
function storeDataInOffline(type, contactId) { var configObject = getPreFilledJSONArray(type); var contactDetailsArr = []; var contactsDetailsObj = {}; contactsDetailsObj.Id = contactId; contactsDetailsObj.data = singlecontact[type]; contactDetailsArr.push(contactsDetails...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async loadPage(url){\n const response = await fetch(url);\n const data = await response.text();\n // fs.writeFileSync(\"debug.html\", data);\n return {\n $: cheerio.load(data),\n html: data\n };\n }", "function description_microdata(uri){\r\n\t\t\tvar docelt = document.documentEl...
[ "0.59519833", "0.569596", "0.5632479", "0.55578697", "0.54955685", "0.54820853", "0.54466283", "0.5443866", "0.5420524", "0.53740704", "0.5367703", "0.5365715", "0.5354282", "0.53401965", "0.5334554", "0.5318428", "0.53079003", "0.5304746", "0.5302111", "0.5299886", "0.529831...
0.0
-1
Desc Maps the soups names to the tabs of contact pages for showing data in offline
function getPreFilledJSONArray(type) { var configJSON = {}; switch (type) { case 'contact': configJSON.soupName = SOUPINFO.contactDetails; return configJSON; case 'incidents': configJSON.soupName = SOUPINFO.contactIncidentDetails; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openPage(pageName,elmnt) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n document.getElementById(pageName).style.display = \"block\";\n\n\tif(p...
[ "0.5726045", "0.55262715", "0.5488831", "0.54579353", "0.5406106", "0.533833", "0.5327063", "0.53175735", "0.52758485", "0.52676463", "0.5199739", "0.51909876", "0.51698583", "0.51649094", "0.51208436", "0.5080462", "0.50313085", "0.5015228", "0.50126773", "0.5004928", "0.499...
0.0
-1
Write password to the password input
function writePassword() { var password = generatePassword(); var passwordText = document.querySelector("#password"); passwordText.value = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.qu...
[ "0.8859371", "0.85438496", "0.8511671", "0.8501158", "0.8490387", "0.848501", "0.8472282", "0.8468989", "0.845468", "0.8444224", "0.84319127", "0.8420268", "0.8419394", "0.84066415", "0.8404136", "0.8400749", "0.8393203", "0.83766234", "0.83703816", "0.83647054", "0.83603424"...
0.0
-1
var lr : LineRenderer;
function Start(){ transform.LookAt(targetPosition); enemyCollider = GameObject.Find("EnemyDetector"); canvas = GameObject.Find("Canvas"); speed = 0.2; isDraining = false; dot = Instantiate(tankDot,Vector3.zero,Quaternion.identity) as UnityEngine.UI.Image; dot.transform.SetParent(canvas.transform); dot.enabled =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Line(){}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function drawLines() {\n}", "function drawLines() {\n}", "function Line(){\n\tthis.circles = [];\n\tthis.color = (r,g,b);\n}", "function lineObj(x, y, x_diff, y_diff,...
[ "0.7150491", "0.709254", "0.709254", "0.709254", "0.709254", "0.709254", "0.67923087", "0.67923087", "0.67530733", "0.6526859", "0.6471543", "0.64608157", "0.6427426", "0.6399983", "0.63929063", "0.638654", "0.6351429", "0.63001466", "0.6273855", "0.6267508", "0.62507194", ...
0.0
-1
Set the list of wellknown sections
setFixedSections(ids) { let newSections = {}; ids.forEach((id) => { if (this.fixedSections[id]) { newSections[id] = this.fixedSections[id]; } else { newSections[id] = { type: "html", content: "" }; } }); this.fixedSections = newSections; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSections() {\n for (let i = 0; i < 20; i++) {\n sections.push({ title: `Section ${i + 1}`, htmlContent: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum metus faucibus lectus pharetra dapibus. Suspendisse potenti. Aenean aliquam elementum mi, ac euismod augue. Donec e...
[ "0.61808676", "0.5878684", "0.56788844", "0.5487911", "0.5471983", "0.5440074", "0.54045475", "0.5375816", "0.5372661", "0.5309541", "0.5289049", "0.52635473", "0.5261081", "0.5258671", "0.5257879", "0.5234735", "0.52253544", "0.52027524", "0.5143897", "0.5143896", "0.5125565...
0.6262623
0
User initiated screen clear
clear() { this.groups = this.groups.slice(-1); this.groups[0].clear(); this.emit('update'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearScreen() {\n currentOperationScreen.textContent = '';\n clearDisplay = false;\n}", "function clearScreen() {\n getlocation.html(\"\");\n locationStatus.html(\"\");\n showTemp.html(\"\");\n shortNews.html(\"\");\n dataTable.hide();\n $(\"#errorMessage\").hide();\n content....
[ "0.8228462", "0.8039735", "0.80234194", "0.80001366", "0.7927193", "0.7915639", "0.787248", "0.7869722", "0.7813438", "0.7691536", "0.7667027", "0.7620975", "0.75990176", "0.7563224", "0.75263095", "0.7511566", "0.7509124", "0.7480115", "0.7480051", "0.7461489", "0.7439144", ...
0.0
-1
User initiated screen clear
clear() { this.deactivateAlternateScreen(); this.sections = this.sections.slice(-1); if (this.sections[0] instanceof VT100Section) { this.sections[0].userInitiatedClear(); } this.emit('update'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearScreen() {\n currentOperationScreen.textContent = '';\n clearDisplay = false;\n}", "function clearScreen() {\n getlocation.html(\"\");\n locationStatus.html(\"\");\n showTemp.html(\"\");\n shortNews.html(\"\");\n dataTable.hide();\n $(\"#errorMessage\").hide();\n content....
[ "0.8228462", "0.8039735", "0.80234194", "0.80001366", "0.7927193", "0.7915639", "0.787248", "0.7869722", "0.7813438", "0.7691536", "0.7667027", "0.7620975", "0.75990176", "0.7563224", "0.7511566", "0.7509124", "0.7480115", "0.7480051", "0.7461489", "0.7439144", "0.7436255", ...
0.75263095
14
Clean up extra blank lines at the end of the previous text section. If the result is an empty text section, delete it.
cleanupTextSection() { this.deactivateAlternateScreen(); var current_section = this.sections[this.sections.length - 1]; if (current_section instanceof VT100Section) { current_section.trimLines(); if (current_section.isBlank()) { this.sections.pop(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeEmptyLines() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLinesUtility,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n }, function (up) {\n var arr = up.inlines;\n for (var i = arr.length - 1; i >= ...
[ "0.6407119", "0.63155496", "0.62853855", "0.62759215", "0.6229471", "0.60239226", "0.5982078", "0.59753793", "0.58978486", "0.587794", "0.58600444", "0.5752025", "0.5751184", "0.5743288", "0.5707447", "0.56931144", "0.5691391", "0.5686428", "0.5686428", "0.5623016", "0.558919...
0.7562056
0
Remove trailing 'c's. Equivalent to str.replace(/c$/, ''). /c$/ is vulnerable to REDOS. invert: Remove suffix of nonc chars instead. Default falsey.
function rtrim(str, c, invert) { if (str.length === 0) { return ''; } // Length of suffix matching the invert condition. var suffLen = 0; // Step left until we fail to match the invert condition. while (suffLen < str.length) { var currChar = str.charAt(str.length - suffLen - 1); if (currChar =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rtrim(str, c, invert) {\n if (str.length === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n var suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < str.length) {\n var ...
[ "0.7664504", "0.76142514", "0.7568195", "0.7502979", "0.7502979", "0.59692127", "0.5531896", "0.5518416", "0.53098", "0.52474916", "0.52243096", "0.5210265", "0.52031183", "0.519432", "0.51885545", "0.51635617", "0.5152226", "0.5142476", "0.5109252", "0.51054543", "0.50515616...
0.7607753
8
helper function for calculating the refMax, refMin axis is either 'depthX' or 'depthY'
function getMinMax_joint(joint, array, axis) { let out = []; array.forEach(function(el) { return out.push.apply(out, [el.joints[joint][axis]]); }, []); return { min: Math.min.apply(null, out), max: Math.max.apply(null, out) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _calcMaxMin() {\n\t var i,j,k;\n\t\t\n\t\t_vMaxValuesAttr = d3.range (_vIndexMapAttr.length);\n\t\t_vMinValuesAttr = d3.range (_vIndexMapAttr.length);\n\t\t\n\t\tfor (i=0; i< _vMaxValuesAttr.length; i++) {\n\t\t\t_vMaxValuesAttr[i] = Number.MIN_VALUE;\n\t\t\t_vMinValuesAttr[i] = Number.MAX_VALUE;\n\t\t...
[ "0.64572394", "0.61660165", "0.594306", "0.5914295", "0.58640677", "0.58557624", "0.58393115", "0.57899433", "0.5762314", "0.57291305", "0.57257354", "0.56876427", "0.5686312", "0.56813896", "0.56796587", "0.56493783", "0.56324583", "0.5627874", "0.5596489", "0.5559754", "0.5...
0.0
-1
assuming the save button is clicked by someone else
function saveReference() { const parsedURL = parseURL(window.location.pathname); let patientId = parsedURL.patientId; let exerciseId = parsedURL.exerciseId; parseURL(window.location.pathname); const redirectToUrl = 'userexercise/setting/' + exerciseId +'/' + patientId; let values = {}; // save to referen...
{ "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 clickSaveButton() {\n\tif(this.innerHTML === savedButtText) {\n\t\tthis.innerHTML = notSavedButtTe...
[ "0.7668093", "0.7668093", "0.7650307", "0.72451365", "0.7230124", "0.72205937", "0.71988696", "0.71947", "0.7190283", "0.7182493", "0.7182493", "0.7166105", "0.7124504", "0.71242326", "0.709681", "0.70909595", "0.70798236", "0.702655", "0.6971265", "0.6953271", "0.69436353", ...
0.0
-1
the function that controls the canvas hiding/displaying logic we determine the state of the website by parsing URL we also reset the reference counter whenever we transit to a new state
function showCanvas() { let refCanvas = document.getElementById("refCanvas"); let exeCanvas = document.getElementById("exeCanvas"); let outputCanvas = document.getElementById("outputCanvas"); //start of creating reference if(parsedURL.mode === 'start' && refFrames && refFrames.length === 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideButtons(url,domain) {\n\n var count = 0;\n\n //switch statement for sites\n switch(true)\n {\n \n case url.indexOf(\"sites.html\") > -1 :\n document.getElementById('admin').className += ' hidden';\n ...
[ "0.5742293", "0.5722741", "0.5611292", "0.55620563", "0.55576414", "0.55544186", "0.55408484", "0.55283576", "0.5504502", "0.549072", "0.54584354", "0.5341253", "0.5332806", "0.53289545", "0.53213006", "0.5318478", "0.5318478", "0.5317074", "0.5312977", "0.5291857", "0.529003...
0.6061236
0
function that draws the body skeleton
function drawBody(parameters, ctx, color, jointColor, drawCircle = true){ let body = parameters; jointType.forEach(function(jointType){ drawJoints({cx: body.joints[jointType].depthX * width, cy: body.joints[jointType].depthY * height},ctx, jointColor); }); if(drawCircle) { drawCenterCir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSkeleton() {\n\t// Loop through all the skeletons detected\n\tfor (let i = 0; i < poses.length; i++) {\n\t\tlet skeleton = poses[i].skeleton;\n\t\t// For every skeleton, loop through all body connections\n\t\tfor (let j = 0; j < skeleton.length; j++) {\n\t\t\tlet partA = skeleton[j][0];\n\t\t\tlet par...
[ "0.77558935", "0.77534", "0.7659299", "0.76485014", "0.76485014", "0.76485014", "0.76485014", "0.76422024", "0.76422024", "0.76422024", "0.76422024", "0.76422024", "0.76422024", "0.7642123", "0.7637379", "0.75872916", "0.75400877", "0.75370425", "0.7508929", "0.75052434", "0....
0.5875468
65
function that draws each joint as a yellow round dot
function drawJoints(parameters, ctx, color){ let cx = parameters.cx; let cy = parameters.cy; ctx.beginPath(); ctx.arc(cx, cy, radius, 0, Math.PI*2); //radius is a global variable defined at the beginning ctx.closePath(); ctx.fillStyle = color; ctx.fill(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paintJoints() {\r\n joinCellsX.forEach((element) => {\r\n ctx.fillRect(element.x, element.y, unit, space - unit);\r\n });\r\n joinCellsY.forEach((element) => {\r\n ctx.fillRect(element.x, element.y, space - unit, unit);\r\n });\r\n}", "function drawBlueAsteroid(){\n penDown();\n penWidth(5);...
[ "0.7851011", "0.64684606", "0.6403621", "0.63581777", "0.6355687", "0.6345783", "0.63206965", "0.62984973", "0.62570983", "0.6251678", "0.62509507", "0.62492", "0.62462366", "0.62416625", "0.6231124", "0.6204123", "0.6185598", "0.61805415", "0.6168594", "0.6164375", "0.613845...
0.67378706
1
function that draws the red Center Circle in ctx1 (canvasSKLT)
function drawCenterCircle (parameters, ctx){ //coordinate of the red circle let x = parameters.x; let y = parameters.y; //radius let r = parameters.r; // let neck_x = parameters.nx; let neck_y = parameters.ny; ctx.beginPath(); //euclidean distance from head to calibration circle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawcircle()\n{\n\tctx.fillStyle='#0079B8';\n\tctx.beginPath();\n\tctx.arc(x1,y1,20,0,2*Math.PI);\n\tctx.fill();\n\tctx.strokeStyle=\"white\"\n\tctx.stroke();\n}", "function drawCircle(){\n //ctx.beginPath();\n ctx.arc(100, 75, 50, 0, 2 * Math.PI);\n ctx.stroke();\n }", "function drawCircle(...
[ "0.780718", "0.7603765", "0.7540628", "0.75290084", "0.75239724", "0.74707323", "0.74259204", "0.739328", "0.7298534", "0.72822046", "0.7271707", "0.72313046", "0.72116894", "0.71929413", "0.71696824", "0.71681696", "0.7161159", "0.7157754", "0.7149901", "0.71411", "0.7118578...
0.72883284
9
patient reaching out for button makes body NOT in plane
function isBodyInPlane(init, curr) { if (init * 0.6 < curr && init * 1.2 > curr){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fl_outToOf ()\n\t\t{if(freez==\"false\"){\n\t\t\tconsole.log(\"hit\")\n\t\t\tthis.rimon.alpha=1\n\t\t\tthis.sufgania.alpha=1\n\t\t\tthis.selek.alpha=1\n\t\t\tthis.tamar.alpha=1\n\t\t\tthis.karpas.alpha=1\n\t\t\tthis.levivot.alpha=1\n\t\t\tthis.haroset.alpha=1\n\t\t\tthis.maza.alpha=1\n\t\t\tthis.hasa.alph...
[ "0.6014051", "0.5936949", "0.59356916", "0.5920211", "0.5869267", "0.5866969", "0.5848373", "0.58358884", "0.5779986", "0.5779676", "0.57543325", "0.5739326", "0.57016206", "0.56759435", "0.5663628", "0.5650837", "0.5635127", "0.56203717", "0.5617438", "0.56097674", "0.560693...
0.0
-1
text field. The actual searching is delegated to a function search(query), which returns a promise for a list of models matching query.
function SearchFieldController(args) { this.inputField = args.inputField; this.doSearch = args.search; this.resultController = args.resultController; this.lastQuery = null; this.keydownListener = this.keydown.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "function search(text){\n searchString = text.toLowerCase();\n readerControl.fullTextSearch(searchString);\n }", "onSearch(value) {\n this.model.query = value;\n }", "onSearch(value)...
[ "0.7119087", "0.6808731", "0.65231705", "0.65231705", "0.6466946", "0.6431182", "0.64262044", "0.6417006", "0.6350936", "0.6330578", "0.6326029", "0.6325544", "0.6318423", "0.63165134", "0.6303151", "0.63018227", "0.6286919", "0.6286919", "0.62864906", "0.6257696", "0.6257437...
0.0
-1
Check whether a Vector3 is inside a wall
function checkWallCollision(v) { const c = getMapSector(v) return map[c.x][c.z] > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inWall(x, y) {\n var borderLen = 15 + side;\n\n // these denote the position of the wall\n var leftWall = borderLen;\n var rightWall = width - borderLen;\n var topWall = height - borderLen;\n var bottomWall = borderLen;\n\n if (x <= leftWall || x >= rightWall) {\n return true;\n } // coordinate...
[ "0.7455743", "0.7224147", "0.719123", "0.7143123", "0.71082425", "0.7058974", "0.7001094", "0.6979946", "0.6917188", "0.68399227", "0.6838616", "0.68299305", "0.677304", "0.67493725", "0.67217296", "0.6714286", "0.67069405", "0.663792", "0.6633665", "0.6602104", "0.6590263", ...
0.7308867
1
load resources to display from MapController and build and display markers on the maps
function loadMarkers(that) { if(!that) { that = this; } // destroy old Markers //console.log("going to destroy all markers"); if( that.markers ) { that.markers.destroy(); // console.log("markers destoyes"); } else { // console.log("there where no markers to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initMap() {\n\n map = mapController.makeMap()\n\n let mapData = model.fullParkData.getParkData()\n mapData = mapController.filterParks(mapData)\n mapData = mapController.filterAda(mapData)\n mapData = mapController.filterPest(mapData)\n\n for(key in mapData){\n\n const marker = mapController.make...
[ "0.70183986", "0.69459933", "0.69391274", "0.6919825", "0.686852", "0.6852268", "0.6814925", "0.6811508", "0.68003917", "0.67952234", "0.6731042", "0.6721698", "0.6667844", "0.66614705", "0.6652091", "0.66480255", "0.6628063", "0.6627399", "0.66252255", "0.6624851", "0.662398...
0.6585467
25
VALIDATION / Email validation
function filterEmail(email) { var regex = new RegExp(/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/); return regex.test(email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emailValidation()\n {\n let re = /\\S+@\\S+\\.\\S+/;\n if (re.test(emailText)==false)\n {\n setErrorEmail(\"אנא הזן אימייל תקין\");\n setValidEmail(false);\n }\n else\n {\n setErrorEmail(\"\");\n setValidEmail(true);\n } \n }", "function simpleEmailValidation(...
[ "0.8167676", "0.81306875", "0.8090437", "0.80115885", "0.7968635", "0.79644394", "0.7951961", "0.787151", "0.780982", "0.7794383", "0.77912444", "0.7788881", "0.77794975", "0.7754129", "0.77480334", "0.7735206", "0.7727077", "0.77236515", "0.7721154", "0.7717413", "0.7695713"...
0.0
-1
work phone and mobile number validation
function filterMobileNumber(mobileNumber) { var regex = new RegExp(/^[0][1-9]\d{9}$|^[1-9]\d{9}$/g); return regex.test(mobileNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validatePhone(phone){\n return !isNaN(phone)\n\n}", "function simplePhoneValidation(phoneNumber) {\n\n}", "function phoneValidate(number) {\n var phoneno = /^\\d{11}$/;\n if(number.match(phoneno)){\n return true;\n }\n else {\n return false;\n ...
[ "0.812812", "0.8067535", "0.80599713", "0.8047898", "0.8014806", "0.79782015", "0.7965292", "0.7965097", "0.79529494", "0.7940121", "0.7910058", "0.78971", "0.78914094", "0.78796357", "0.78773254", "0.78693175", "0.7867486", "0.7852641", "0.7818685", "0.781202", "0.7799985", ...
0.0
-1
to check if the browser supports the XMLHttpRequest or else create an ActiveXObject
function getHTTPObject() { var xhr = false; if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkBrowser() {\r\n if (window.XMLHttpRequest) {\r\n obj = new XMLHttpRequest();\r\n } else {\r\n obj = new ActiveXobject(\"Microfoft.ActiveXobject\");\r\n }\r\n}", "function useMSXHR() {\r\n return typeof ActiveXObject == \"function\";\r\n }", "function createXHR() {...
[ "0.8618433", "0.8564511", "0.80867904", "0.77109164", "0.7594293", "0.7587121", "0.75138885", "0.7503145", "0.74994725", "0.7498425", "0.7485458", "0.74483776", "0.7443581", "0.7420335", "0.7409112", "0.7399978", "0.7371685", "0.73690945", "0.73686725", "0.7358166", "0.735072...
0.0
-1
let button = document.querySelectorAll(".active"); button[0].addEventListener("click", data.getName.bind(petya), false);
function add (a, b) { console.log("function add was enabled!"); return a + b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEventListeners() {\n var button = document.getElementById('button');\n button.addEventListener('click', selectedData);\n}", "function Listener() {\n const btns = document.getElementsByTagName('button')\n for (let i = 0; i < btns.length; i++) {\n\n btns[i].addEventListener('click', (x) ...
[ "0.68877894", "0.63596696", "0.62638336", "0.6178044", "0.6170749", "0.61320174", "0.6113441", "0.60921735", "0.6082198", "0.60816026", "0.599249", "0.5979439", "0.5917223", "0.5886824", "0.5854816", "0.5848976", "0.5837706", "0.5835591", "0.5827439", "0.58228284", "0.5814507...
0.0
-1
console.log('sHead = ' + sHead + ', sTail = ' + sTail + ', eHead = ' + eHead + ', eTail = ' + eTail + ', sShift = ' + sShift + ', eShift = ' + eShift + ', hCorFactor = ' + hCorFactor + ', vCorFactor = ' + vCorFactor + ', selector = ' + selector);
function letValue(row, pos) {// obtaining a single value return fertman[row][pos]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sn(e){for(var t=e.ops,a=0;a<t.length;a++)cn(t[a]);for(var n=0;n<t.length;n++)un(t[n]);for(var r=0;r<t.length;r++)ln(t[r]);for(var f=0;f<t.length;f++)dn(t[f]);for(var o=0;o<t.length;o++)_n(t[o])}", "function r(e){this.addendum=\"\",this.removendum=\"\",this.inputLength=0,this.outputLength=0,Array.isArray...
[ "0.53036755", "0.5149609", "0.51264125", "0.5100058", "0.49713176", "0.49569306", "0.49473655", "0.49354112", "0.49348387", "0.49091625", "0.48140508", "0.48074326", "0.4800071", "0.47974563", "0.4796963", "0.47919187", "0.47850928", "0.47820395", "0.47803754", "0.47732943", ...
0.0
-1
Drop down menu for Keyboard accessing
function dropdown1(dropdownId, hoverClass, mouseOffDelay) { if(dropdown = document.getElementById(dropdownId)) { var listItems = dropdown.getElementsByTagName('li'); for(var i = 0; i < listItems.length; i++) { listItems[i].onmouseover = function() { this.className = addClass(this); } listItems[i].onmouseout...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keystroke_menu() {\n var htmlstr = '<h4>Keystroke commands for selected readings</h4><p>Click the pen to enable reading ' +\n 'selection. Readings can be selected by clicking, or by dragging across ' +\n 'the screen in edit mode. Press any of the following keys to take the ' +\n 'corresponding a...
[ "0.6693561", "0.6544063", "0.65252984", "0.64957845", "0.64957845", "0.6266264", "0.62555736", "0.6254758", "0.62386954", "0.6224614", "0.62226737", "0.6211354", "0.62012345", "0.61679643", "0.61667395", "0.61613387", "0.6150994", "0.6150994", "0.6133339", "0.6133339", "0.611...
0.0
-1
Function updates the date header for all `plata` sheets: A, B, C, D, E, F. [todo] turn this into a custom function that will be called on line 4 of each `plata` sheets. [todo] remove deleteColumns() and restantUpkeep() function calls.
function billDate() { var a4 = sheet(1).getRange("A4"); // Read the initial month and year (the date for which we display the table) var date = sheet(0).getRange("A1").getValue().split(' '); var initialMonth = date[0], year = parseInt(date[1]); // Build an array of month names // [todo] replace with...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showHeader()\t{\r\n\t//\tClear the first row\r\n\tsheet.deleteRow(1);\r\n\r\n\t//\tAt first add the timestamp\r\n\tsheet.getRange(1,1).setValue('Timestamp');\r\n\r\n\t//\tLoop through all the variables and add the names of them\r\n\tfor (var i = 0; i < variables.length; i++) {\r\n\t\tsheet.getRange(1,2 + ...
[ "0.6271901", "0.6100222", "0.5930301", "0.58783966", "0.58202046", "0.5761467", "0.56474143", "0.5553417", "0.55146176", "0.54697794", "0.5457441", "0.5437376", "0.5433801", "0.53254604", "0.5323944", "0.53232896", "0.53145695", "0.52736473", "0.5241445", "0.52386177", "0.522...
0.5871013
4