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
Called when messages are received
function PollsReceived(data) { $.each(data, resultPoll); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onMessageReceive() {}", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n ...
[ "0.785897", "0.7331998", "0.73259735", "0.7315572", "0.7302354", "0.7279757", "0.7250016", "0.7250016", "0.71281654", "0.707055", "0.7034926", "0.70329684", "0.70329684", "0.70329684", "0.70191264", "0.70125973", "0.6988427", "0.69788826", "0.69683766", "0.6966417", "0.693600...
0.0
-1
Called for each line received
function resultPoll(index, value) { var elem = document.getElementById('pollList'); var li = document.createElement('li'); var a = document.createElement('a'); var linkText = document.createTextNode(value); a.appendChild(linkText); a.title = value; a.href = "../db/poll.php?Question=" + value; li.appendChild(a);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onReceive(receiveInfo) {\n //console.log(receiveInfo);\n if (receiveInfo.connectionId !== this.connectionId) {\n return;\n }\n\n this.lineBuffer += ab2str(receiveInfo.data);\n\n var index;\n while ((index = this.lineBuffer.indexOf('\\n')) >= 0) {\n va...
[ "0.72337556", "0.70309645", "0.68932027", "0.673777", "0.6531644", "0.64744765", "0.6427324", "0.61980516", "0.6194405", "0.6177198", "0.6175278", "0.61613095", "0.6127476", "0.6096398", "0.6061214", "0.6058618", "0.601849", "0.601849", "0.601849", "0.5937998", "0.5922257", ...
0.0
-1
Creates annotation given quads hard coded
function makeAnnotationFromQuad(){ var arry = new Array(); //reference // arry[0] = [407.77801513671875,458.2439880371094,504.6159973144531,458.2439880371094,407.77801513671875,425.3399963378906,504.6159973144531,425.3399963378906]; //javascript // arry[1] = [122.69999694824219,458.2439880371094, // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightUserSpecified(){\n\n\n\n var userSpecifiedArray = new Array();\n var newArray = new Array();\n\n //Quads for word \"For\" --word Quad\n //236.90859985351562,458.2436828613281,265.9341125488281,458.2436828613281,236.90859985351562,425.3403625488281,265.9341125488281,425.3403625488281\n\n //Qu...
[ "0.5788849", "0.5761587", "0.5706253", "0.52444243", "0.5200588", "0.5200588", "0.5200453", "0.5144771", "0.5144771", "0.51234365", "0.5106795", "0.5106795", "0.4945855", "0.49390808", "0.4892157", "0.48677072", "0.4812344", "0.4794173", "0.47912452", "0.47721043", "0.4737716...
0.7139811
0
Highlights quad specified by the user
function highlightUserSpecified(){ var userSpecifiedArray = new Array(); var newArray = new Array(); //Quads for word "For" --word Quad //236.90859985351562,458.2436828613281,265.9341125488281,458.2436828613281,236.90859985351562,425.3403625488281,265.9341125488281,425.3403625488281 //Quads for wod "Refe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawHighlights() {\n for (let i = 0; i < currentScenario.sceneObjects.length; i++) {\n let object = currentScenario.sceneObjects[i];\n if (object.isSelected(mousePosX, mousePosY)) {\n context.beginPath();\n context.strokeStyle = 'red';\n context.strokeRect...
[ "0.6378777", "0.6307033", "0.6247015", "0.62384975", "0.61849064", "0.6140831", "0.610633", "0.60407406", "0.6037052", "0.60230964", "0.60070264", "0.5971196", "0.5942976", "0.5877057", "0.5875052", "0.58593524", "0.58426166", "0.5820348", "0.5783112", "0.57743907", "0.576857...
0.64223045
0
Gets annotations from the PDF, uses getHighlightedWords() to get the highlighted annotations
function getAnnotations(){ //var doc = app.openDoc("C:/Users/ktl29155/Downloads/svn-refcard.pdf"); var pageIndex = this.pageNum; var annots = this.getAnnots({nPage:pageIndex}); console.println(pageIndex); //console.println("\nAnnot Report for document: " + this.documentFileName); //console.println(""); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadExistingAnnotations() {\n // Reset annotation display list\n var save = $('#annotation-suggestion-container').detach();\n $('#annotation-data').empty().append(save);\n\n // Get open document text\n document.getElementById('file-data').innerText = localStorage.getItem('documentText' + cu...
[ "0.6405532", "0.61347747", "0.61147994", "0.59769654", "0.59759456", "0.581451", "0.5728947", "0.56410974", "0.5617267", "0.5602394", "0.55246", "0.5517844", "0.5507262", "0.549773", "0.54663146", "0.5394833", "0.53848785", "0.5365865", "0.5355901", "0.5348106", "0.5320178", ...
0.81131846
0
myObj code example for Implicit Binding Principle 3
function Person(name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Obj() {}", "function hardBound(){\n hard.call(obj)\n}", "function BasicObject(){}", "function BasicObject(){}", "function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&...
[ "0.6138536", "0.60992765", "0.5955608", "0.5955608", "0.5918814", "0.5858223", "0.5693754", "0.5693297", "0.567277", "0.5599666", "0.55618894", "0.55618894", "0.55529475", "0.554233", "0.5542074", "0.5531109", "0.54382527", "0.5428946", "0.54281044", "0.5419093", "0.5418379",...
0.0
-1
Get data that has been captured for calculations.
function getInput(){ century = parseInt(document.getElementById("century").value) year = parseInt(document.getElementById("year").value) month = parseInt(document.getElementById("month").value) dayOfMonth = parseInt(document.getElementById("monthday").value) //check to confirm data is right. if(century == ""...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData() {\n return {\n ergReps: ergReps,\n bikeReps: bikeReps,\n repRate: repRate,\n totTime: totTime,\n Distance: Distance\n }\n }", "function get_data() {}", "get data() {\n return getIn(privateDataMap.get(this).current...
[ "0.72272444", "0.67124516", "0.663632", "0.65914196", "0.64818645", "0.6439322", "0.64152485", "0.6328876", "0.629779", "0.62962645", "0.6276312", "0.62314606", "0.6228225", "0.6221549", "0.6221549", "0.6142413", "0.6141678", "0.6132358", "0.61220896", "0.6092908", "0.6079191...
0.0
-1
get selected radio button
function checkGender(){ var gen = document.getElementsByName("rads") if(gen[0].checked == true){ var gender = "male" }else if(gen[1].checked == true){ var gender = "female" }else { console.log("pass");//Test the radio buttons } switch(gender){ case gender = "male": sw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCurrentSelectedRadioButton() {\n var radioButtonControllers = this.reportContainer.querySelectorAll(\"input[type=radio]\");\n for (var i = 0, len = radioButtonControllers.length; i < len; i += 1) {\n if (radioButtonControllers[i].checked) {\n ...
[ "0.8225349", "0.8124064", "0.80314964", "0.7927445", "0.7881495", "0.7881495", "0.78105694", "0.779338", "0.7733974", "0.7729388", "0.7686636", "0.7659909", "0.7649468", "0.7560239", "0.7550932", "0.7506646", "0.7460415", "0.7449166", "0.7425244", "0.73722965", "0.7369366", ...
0.0
-1
This is a Test comment to check if we can set a comment without an annotation. If it fail. Change the comment regex.
myTestFunction1(str){ return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "allowComments() {this.commentsAllowed = true}", "static get multilinecomment(){return new comment('\\\\*[\\\\s\\\\S]*?\\\\*');}", "function isComment(str) {\n return !!str.match(/^_/);\n }", "isComment() {\n return this.char + this.peek() === \"/*\"\n }", "function escapeCommentText(value) {\...
[ "0.6516186", "0.61020875", "0.59344023", "0.5918437", "0.5907629", "0.5857768", "0.5842378", "0.5828707", "0.5815545", "0.57722676", "0.5747199", "0.5747199", "0.5747199", "0.5747199", "0.5747199", "0.5745869", "0.5744665", "0.57266057", "0.57200027", "0.56927073", "0.5664047...
0.0
-1
How signin with Google works: How authentication with Google works: You can check for this line ("Here is an example of a complete OpenID Connect authentication URI") to see how the url is composed
function signIn(clientId,redirect_uri,scope,url){ // the actual url to which the user is redirected to // the parameters of the request can be read here: https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters url = "https://accounts.google.com/o/oauth2/v2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "signIn(googleUser) {\n // TODO(jrobbins): Consider using profile pic.\n // let profile = googleUser.getBasicProfile();\n let idToken = googleUser.getAuthResponse().id_token;\n // We don't use doPost because we don't already have a XSRF token.\n return this.doFetch('/login', 'POST', {'id_token': idTo...
[ "0.7161537", "0.7029367", "0.7003811", "0.6935298", "0.690645", "0.6859712", "0.6747778", "0.6746263", "0.67385805", "0.6729735", "0.67250735", "0.6685854", "0.6678884", "0.6612814", "0.6576209", "0.6556094", "0.651507", "0.64986753", "0.6431779", "0.6426643", "0.6416384", ...
0.7075093
1
Search all elements of an array for the only value that occurs twice (all other values occur once), and return that value.
function findDup(array) { var testedValue; var i; var j; var matches; for (i = 0; i < array.length; i += 1) { testedValue = array[i]; matches = 0; for (j = 0; j < array.length; j+= 1) { if (array[j] === testedValue) { matches += 1; } } if (matches > 1) { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reoccurring(arr){\n\tfor(let i = 0; i < arr.length; i++){\n\t\tfor(j = i+1; j < arr.length; j++){\n\t\t\tif(arr[i] === arr[j]){\n\t\t\t\treturn arr[i]\n\t\t\t}\n\t\t}\n\t}\n\treturn undefined\n} // O(n^2)", "function whichAppearsTwice(array) {\n var previous;\n for (var i = 0; i < array.length; i++) {...
[ "0.7391529", "0.7188825", "0.7126372", "0.71077716", "0.7020267", "0.6908333", "0.6854481", "0.681992", "0.6750427", "0.66949457", "0.668665", "0.6683724", "0.6679263", "0.66614854", "0.6633811", "0.66257375", "0.66196644", "0.6615515", "0.66116256", "0.660862", "0.6562494", ...
0.7549677
0
! PUKI ACTION LOOP This is the function that runs to loop puki action
function updatePukiAction(){ //follow mouse if(!autoAction){ if(curItem!=null){ if(foodSelected != null){ move_arr.x = foodSelected.x; move_arr.y = foodSelected.y; }else{ if(curAnimate == 'spacesuit'){ move_arr.x = cursorX; move_arr.y = cursorY; }else{ move_arr.x = curItem.x; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callNextPukiAction(act){\n\tpukiInteract=true;\n\tif(nextPukiAction != ''){\n\t\tpukiAction = nextPukiAction;\n\t\tnextPukiAction='';\n\t}else{\n\t\tpukiAction = act;\t\n\t}\n}", "function loop() {\r\n}", "loop() {}", "loop() {}", "function loop() {\r\n // if (is_loop) {\r\n ...
[ "0.6851928", "0.684734", "0.6768289", "0.6768289", "0.64468324", "0.63199574", "0.6301022", "0.62016594", "0.60931814", "0.59902436", "0.592415", "0.5918631", "0.5913468", "0.590704", "0.5787528", "0.5782924", "0.5771123", "0.5738411", "0.5728955", "0.57176745", "0.57151437",...
0.629947
7
! PUKI NEXT ACTION This is the function that runs to run puki next action
function callNextPukiAction(act){ pukiInteract=true; if(nextPukiAction != ''){ pukiAction = nextPukiAction; nextPukiAction=''; }else{ pukiAction = act; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function performNextAction() {\n console.log('performNextAction()');\n var nextAction = get('nextAction');\n if (nextAction) {\n nextAction = JSON.parse(nextAction);\n remove('nextAction');\n switch (nextAction.type) {\n case 'user':\n $('a.github-anywhere[data-user=\"' + ne...
[ "0.7377946", "0.7347462", "0.6912832", "0.68280715", "0.67904985", "0.67518395", "0.6746602", "0.6724944", "0.6684407", "0.6653404", "0.66296434", "0.65781677", "0.6561283", "0.6547912", "0.6507305", "0.6453971", "0.6452353", "0.6442877", "0.6437211", "0.6418406", "0.64175457...
0.75744516
0
! PUKI ACTION EVENT This is the function that runs to check puki animation complete
function checkAnimationComplete(){ var targetName = ''; for(n=0;n<animation_arr.length;n++){ if($.pukiAnimation[animation_arr[n].name].visible){ targetName = animation_arr[n].name; } } var _currentframe = $.pukiAnimation[targetName].currentFrame; var _lastframes = $.pukiData[targetName].getAnimation($.pu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animcompleted() {\n\t\t\t\t\t\t}", "notifyAnimationEnd() {}", "function testAnimation(element) {\n if (!element.hasClass('anim-running') &&\n Utils.isInView(element, {topoffset: offset})) {\n element\n .addClass('anim-...
[ "0.674716", "0.6516085", "0.63487446", "0.6339237", "0.6339237", "0.63325953", "0.63319635", "0.6289699", "0.6272477", "0.62530077", "0.62493813", "0.6228743", "0.6226499", "0.6172699", "0.60939604", "0.60894465", "0.60844594", "0.6082997", "0.60806394", "0.60458803", "0.5994...
0.67487586
0
! PUKI FRAME LOOP This is the function that runs to loop puki frame
function updatePukiFrame(){ if(curPukiAnimation!=null){ curPukiAnimation.x = puki_arr.x; curPukiAnimation.y = puki_arr.y; curPukiAnimation.scaleX = puki_arr.scaleX; curPukiAnimation.rotation = puki_arr.rotation; } pukiShadow.x = puki_arr.x; pukiShadow.y = objGround - 10; pukiShadow.scaleX = pukiShadow.sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "runFrame() {\n const cpu = this.cpu;\n const ppu = this.ppu;\n const apu = this.apu;\n\n while (!ppu.frameEnded) {\n cpu.tick();\n\n ppu.tick();\n ppu.tick();\n ppu.tick();\n\n if (this.tickAPU) {\n apu.tick();\n }\n this.tickAPU = !this.tickAPU;\n }\n\n ...
[ "0.705594", "0.68478864", "0.6438052", "0.6438052", "0.6423032", "0.628965", "0.62370825", "0.6234615", "0.6140262", "0.61152655", "0.6106417", "0.6074548", "0.6070333", "0.60561866", "0.6037256", "0.6036306", "0.6032675", "0.60196584", "0.5969046", "0.59679306", "0.59580874"...
0.5971926
18
! PUKI ANIMATE This is the function that runs to animate puki
function animatePuki(frame){ if(curAnimate!=frame){ if(frame == 'scare'){ playSound('soundScare'); }else if(frame == 'jump'){ playSound('soundJump'); } if(frame == 'spacesuit'){ playSoundLoop('soundSpacesuit'); }else{ stopSoundLoop('soundSpacesuit'); } if(frame == 'run'){ playSound...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function anim() {\r\n Loop();\r\n requestAnimFrame(anim);\r\n }", "function animacaoJogo(){\n __life.step();\n __life.desenhaGrid(window.ctx);\n window.idTimeoutJogo = setTimeout(animacaoJogo, 10);\n }", "function Animation (){\n var animation =...
[ "0.69151783", "0.6716388", "0.6635454", "0.6617686", "0.6589031", "0.6551654", "0.65271586", "0.6526152", "0.65246713", "0.6514456", "0.650799", "0.6464893", "0.64457816", "0.64340043", "0.6429712", "0.6427403", "0.64115256", "0.64052683", "0.64045703", "0.63464767", "0.63032...
0.7433666
0
! PUKI EVENTS This is the function that runs to build puki drag and drop events
function buildPukiDrag(){ for(n=0;n<animation_arr.length;n++){ if(animation_arr[n].interact){ var targetAnimate = $.pukiAnimation[animation_arr[n].name]; targetAnimate.cursor = "pointer"; targetAnimate.addEventListener("mousedown", function(evt) { togglePukiDragEvent(evt, 'drag') }); targetAnimat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static dragEvents(){\n //enter drag\n Quas.on(\"dragenter dragstart\", \".drop\", function(e){\n e.preventDefault();\n new Element(this).addCls(\"dragenter\");\n });\n\n //exit drag\n Quas.on(\"dragend dragleave\", \".drop\", function(e){\n e.preventDefault();\n new Element(this)...
[ "0.7412697", "0.6591241", "0.6450548", "0.6303659", "0.6297534", "0.6297534", "0.6295106", "0.6247915", "0.6220486", "0.6211355", "0.6211355", "0.61951005", "0.6185955", "0.61680305", "0.615551", "0.6154483", "0.6147082", "0.61242133", "0.6118372", "0.6107185", "0.6095583", ...
0.72642267
1
! PUKI EVENTS HANDLE This is the function that runs to handle puki drag and drop events
function togglePukiDragEvent(obj, con){ switch(con){ case 'drag': obj.target.offset = {x:obj.target.x-(obj.stageX / scalePercent), y:obj.target.y- (obj.stageY / scalePercent)}; if(pukiInteract) { pukiDragging = true; pukiGravityActive = true; if(pukiAction == "grab") { toySelected.dra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static dragEvents(){\n //enter drag\n Quas.on(\"dragenter dragstart\", \".drop\", function(e){\n e.preventDefault();\n new Element(this).addCls(\"dragenter\");\n });\n\n //exit drag\n Quas.on(\"dragend dragleave\", \".drop\", function(e){\n e.preventDefault();\n new Element(this)...
[ "0.7337902", "0.6952242", "0.6917483", "0.6775891", "0.6661179", "0.6646905", "0.66296405", "0.66131693", "0.6611008", "0.6577147", "0.6519734", "0.65080243", "0.6507976", "0.64962864", "0.6479057", "0.64606506", "0.64488745", "0.6442406", "0.6430074", "0.64273226", "0.642710...
0.0
-1
! PUKI STAT LOOP This is the function that runs to minus puki stat
function updatePukiStat(con){ if(!gamePause && !onMenu){ user_data.health = pukiHealthMeter; user_data.fun = pukiHappyMeter; pukiHealthMeter -= minusStat; pukiHappyMeter -= minusStat; if(pukiHealthMeter <= warnStatNum || pukiHappyMeter <= warnStatNum){ if(con){ playSound('soundAlert'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkPukiStat(){\n\tvar walkStat = false;\n\tvar runStat = false;\n\tvar sitStat = false;\n\t\n\tif(pukiActive_arr.walkActive || statusActive_arr.walkActive)\n\t\twalkStat=true;\n\t\t\n\tif(pukiActive_arr.runActive || statusActive_arr.runActive)\n\t\trunStat=true;\n\t\t\n\tif(pukiActive_arr.sitActive || s...
[ "0.6614937", "0.5965966", "0.58448964", "0.57214487", "0.56317645", "0.5597503", "0.5547228", "0.55191773", "0.54044783", "0.5359081", "0.5352924", "0.53469145", "0.5315586", "0.52901876", "0.5271673", "0.52699393", "0.52699393", "0.52699393", "0.52618545", "0.5231878", "0.52...
0.6386337
1
! PUKI STAT CHECK This is the function that runs to check puki stat
function checkPukiStat(){ var walkStat = false; var runStat = false; var sitStat = false; if(pukiActive_arr.walkActive || statusActive_arr.walkActive) walkStat=true; if(pukiActive_arr.runActive || statusActive_arr.runActive) runStat=true; if(pukiActive_arr.sitActive || statusActive_arr.sitActive) si...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "check(_p) {\n success.push('yes');\n }", "function pii_check_if_stats_server_up() {\n var stats_server_url = \"http://woodland.gtnoise.net:5005/\"\n\ttry {\n\t var wr = {};\n\t wr.guid = (sign_in_status == 'signed-in') ? pii_vault.guid : '';\n\t wr.version = pii_vault.config.current_versi...
[ "0.6412382", "0.6302314", "0.628776", "0.6282959", "0.61804515", "0.6054724", "0.5974282", "0.58624846", "0.58443797", "0.58000225", "0.5799185", "0.56406176", "0.5630668", "0.55523694", "0.55356765", "0.5527811", "0.55275875", "0.5452337", "0.5451006", "0.543622", "0.5379415...
0.7526322
0
! PUKI STAT INCREASE This is the function that runs to increase puki stats
function increasePukiStatus(health, fun, xp){ pukiHealthMeter += health; pukiHappyMeter += fun; pukiXPEarn += xp; pukiHealthMeter = pukiHealthMeter > 100 ? 100 : pukiHealthMeter; pukiHappyMeter = pukiHappyMeter > 100 ? 100 : pukiHappyMeter; user_data.health = pukiHealthMeter; user_data.fun = pukiHappyMeter; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "increaseStat() {}", "function updatePukiStat(con){\n\tif(!gamePause && !onMenu){\n\t\tuser_data.health = pukiHealthMeter;\n\t\tuser_data.fun = pukiHappyMeter;\n\t\t\n\t\tpukiHealthMeter -= minusStat;\n\t\tpukiHappyMeter -= minusStat;\n\t\t\n\t\tif(pukiHealthMeter <= warnStatNum || pukiHappyMeter <= warnStatNum){...
[ "0.75120276", "0.7133194", "0.6373085", "0.62417066", "0.62034696", "0.6186435", "0.6011627", "0.5971378", "0.59548354", "0.593581", "0.59198785", "0.5898519", "0.589226", "0.58863974", "0.58710533", "0.5814738", "0.58099335", "0.5807495", "0.57795066", "0.57639563", "0.57619...
0.72921467
1
! RESET AI IDLE This is the function that runs to reset AI idle
function resetPukiAutoIdleAction(){ resetPukiActionList(); autoAction = false; performing = false; changePukiAction('static'); autoAIStartTime = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetme(){\n\tinitiateBoard();\n\tmode=0;\n\tdisplay(0);\n}", "function reset() {\n time = 120;\n gameRun = false;\n }", "function resetGame() {\n resetClockAndTime();\n resetMoves(); \n resetRatings();\n startGame();\n}", "function __camAiPowerReset()\n{\n\tfor (var i =...
[ "0.71884525", "0.6966327", "0.69488245", "0.6943674", "0.6907227", "0.69004196", "0.6826262", "0.6818275", "0.68110406", "0.6775453", "0.6752524", "0.67520064", "0.6750955", "0.6747264", "0.6742207", "0.67256767", "0.67190874", "0.6705221", "0.6705155", "0.6697896", "0.669725...
0.7801565
0
! RESET AI ACTION This is the function that runs to reset AI action
function resetPukiAutoAction(){ autoAction = false; performing = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetPukiAutoIdleAction(){\n\tresetPukiActionList();\n\t\n\tautoAction = false;\n\tperforming = false;\n\tchangePukiAction('static');\n\tautoAIStartTime = 0;\n}", "function resetActions(){\n report('resetActions ran');\n SCORE=0;\n QUESTION=0;\n RAND = [];\n updateScore();\n updateQues...
[ "0.785255", "0.7849551", "0.7718821", "0.7593837", "0.74732095", "0.7363545", "0.73230356", "0.7304454", "0.72709066", "0.72337687", "0.71945083", "0.7145937", "0.7107149", "0.7105535", "0.7104483", "0.7065076", "0.7064383", "0.70634055", "0.7045895", "0.70413643", "0.7034654...
0.7511975
4
! RESET AI ACTION LIST This is the function that runs to reset AI action list
function resetPukiActionList(){ actionNum = -1; actionlist_arr = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetActions(){\n report('resetActions ran');\n SCORE=0;\n QUESTION=0;\n RAND = [];\n updateScore();\n updateQuestion();\n clearAnswers();\n randomGenerator();\n}", "function resetPukiAutoIdleAction(){\n\tresetPukiActionList();\n\t\n\tautoAction = false;\n\tperforming = false;\n\...
[ "0.76385707", "0.74967587", "0.73511684", "0.71583104", "0.7087627", "0.70622873", "0.6979351", "0.6894024", "0.67199355", "0.6714227", "0.6614141", "0.6563887", "0.65590984", "0.6546049", "0.6529243", "0.6478655", "0.6457135", "0.6414961", "0.6385373", "0.6357166", "0.635546...
0.83799326
0
! AI ACTION LOOP This is the function that runs to loop AI action
function updatePukiAutoAction(){ if(!performing){ if(autoAIStartTime > autoAIDefaultTime){ autoAIStartTime = 0; startPukiAutoAction(); }else{ autoAIStartTime++; } }else{ if(performStartTime > 0){ performStartTime--; }else{ resetPukiAutoAction(); startPukiAutoAction(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loop() {\r\n}", "loop() {\n let stop = false;\n while (!stop) {\n //Creates a thread for every single agent\n Object.values(this.agents).forEach(agent => {\n if (!this.problem.goalTest(this.data)) {\n // aqui el agente recibe las pers...
[ "0.69891137", "0.69274974", "0.66726506", "0.6608263", "0.6561906", "0.6561906", "0.6550363", "0.6415665", "0.64086276", "0.63564986", "0.631651", "0.63162804", "0.6309134", "0.6298996", "0.62742066", "0.62664956", "0.6242921", "0.6196716", "0.6195734", "0.61738396", "0.61736...
0.5900263
50
These functions set up and handle the display of bibliographical references as popups. This function finds all links to items in the bibliography and turns them into JS calls which retrieve the content which has been imported into an iframe, and display it as a popup.
function setupBiblPopups (){ var links = document.getElementsByTagName('a'); for (var i=0; i<links.length; i++){ var href = links[i].getAttribute('href'); /* if (href && href.substring(0, 9) == 'bibliography.html#'){ */ var biblId = href.substring(9, href.length); links[i].setAttribute('onclick'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBiblFrame(){\n//First make sure we're not running this on the bibliography itself.\n/* var biblDoc = new RegExp('bibliography\\.html(#.+)?$');\n var isBibliography = biblDoc.exec(window.location);\n if (isBibliography){return;}*/\n biblFrame = document.createElement('iframe');\n biblFram...
[ "0.6919863", "0.6633062", "0.62590814", "0.5962713", "0.59200066", "0.58526736", "0.5851654", "0.5784029", "0.5658953", "0.5616106", "0.56155646", "0.56093556", "0.55603474", "0.55577785", "0.5556277", "0.5552833", "0.548474", "0.545328", "0.5402891", "0.5395532", "0.539068",...
0.7457224
0
This function creates an invisible iframe and loads the BIB.html document into it, so we can retrieve references from it and show them in popups.
function addBiblFrame(){ //First make sure we're not running this on the bibliography itself. /* var biblDoc = new RegExp('bibliography\.html(#.+)?$'); var isBibliography = biblDoc.exec(window.location); if (isBibliography){return;}*/ biblFrame = document.createElement('iframe'); biblFrame.style.disp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function launchBookshelfBehindScenes() {\n \n $('.bookshelfIframe').remove();\n \n var $iframeURL = $('.student_ebook:first').find('.resource_modal_info .resource-meta-data.url').attr('id');\n $('body').append('<iframe src=\"' + $iframeURL + '\" class=\"bookshelfIframe\"></iframe>');\n \n retu...
[ "0.66252947", "0.6486786", "0.6249437", "0.62250555", "0.6169494", "0.6100635", "0.6077318", "0.6052079", "0.6036802", "0.598377", "0.5974735", "0.5893292", "0.5891541", "0.5889413", "0.58827215", "0.58359265", "0.5826581", "0.5814254", "0.57991064", "0.578172", "0.5776857", ...
0.70081985
0
This function shows a bibl popup. It differs slightly from the function for note popups, so it is distinct.
function showPopupBibl(biblId){ var bibl = null; //We have to be cautious here; some browsers block access to the iframe //document contents from another document, especially when running locally. try{ bibl = biblFrame.contentDocument.getElementById(biblId); } catch(e){ document.location = 'bibliograph...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowPopInWindow(title, content, link, width, top, left, bgcolor, fn) {\n\tShowPopInWindow_ebook(title, content, link, width, top, left, bgcolor, fn);\n}", "function setupBiblPopups (){\n var links = document.getElementsByTagName('a');\n for (var i=0; i<links.length; i++){\n var href = links[i].getA...
[ "0.69791996", "0.6787147", "0.6730948", "0.6635402", "0.66140443", "0.6596636", "0.6578644", "0.6406264", "0.6379948", "0.63699585", "0.6332324", "0.63290554", "0.63208646", "0.63136554", "0.63082623", "0.628308", "0.6275073", "0.6273213", "0.624204", "0.6220348", "0.61963725...
0.79873943
0
Constructor Function which is part of data
function NewStores(name, minCustsPerHour, maxCustsPerHour, avgCookiesPerCust){ this.name = name; this.minCustsPerHour = minCustsPerHour; this.maxCustsPerHour = maxCustsPerHour; this.avgCookiesPerCust = avgCookiesPerCust; this.DailySales = []; this.custsEachHour = []; this.cookiesEachHour = []; this.tota...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "constructor(data) { }", "constructor(data = {}) {\n super(data);\n \n this.init(data);\n }", "function Ctor() {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function construct() { }", "constructor(data) {\n \n }",...
[ "0.76264954", "0.76166344", "0.72322494", "0.72244096", "0.71959424", "0.71959424", "0.71959424", "0.7133864", "0.7050844", "0.69916207", "0.69087595", "0.69005346", "0.6830737", "0.6828907", "0.68209785", "0.6811983", "0.67851084", "0.676679", "0.6765864", "0.6740257", "0.67...
0.0
-1
Gets the literal value. This is equivalent to .getLiteralText() for string literals and only exists for consistency with other literals.
getLiteralValue() { return this.compilerNode.text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Literal() {\n switch (this._lookahead.type) {\n case 'NUMBER':\n return this.NumericLiteral()\n case 'STRING':\n return this.StringLiteral()\n }\n throw new SyntaxError('Literal: unexpected literal production')\n }", "Literal() {\n sw...
[ "0.71249723", "0.69289446", "0.6546063", "0.6538303", "0.63247335", "0.63247335", "0.6315637", "0.6315637", "0.6213355", "0.61836565", "0.6023207", "0.6023207", "0.6002812", "0.5997323", "0.5957792", "0.5874905", "0.5847338", "0.57972944", "0.5728698", "0.57285327", "0.568221...
0.82220966
0
Sets the literal value.
setLiteralValue(value) { manipulation_1.replaceNodeText({ sourceFile: this._sourceFile, start: this.getStart() + 1, replacingLength: this.getWidth() - 2, newText: utils_1.StringUtils.escapeForWithinString(value, this.getQuoteKind()) }); retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set value(value) {}", "SetValue(str)\n\t{\n\t\tthis.value = str;\n\t}", "setValue(value) {\n this._value = value;\n }", "function setLiteral(thing, property, value) {\n internal_throwIfNotThing(thing);\n return addLiteral(removeAll(thing, property), property, value);\n}", "set stringValue(value) {}",...
[ "0.66864365", "0.6646607", "0.65260893", "0.6461339", "0.63615716", "0.63290006", "0.6323074", "0.613802", "0.61364746", "0.6091884", "0.605326", "0.6037777", "0.60336953", "0.6030759", "0.6018353", "0.5985857", "0.59669113", "0.5957761", "0.59421104", "0.5936564", "0.5936564...
0.75843793
0
Gets the quote kind.
getQuoteKind() { return this.getText()[0] === "'" ? QuoteKind_1.QuoteKind.Single : QuoteKind_1.QuoteKind.Double; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readQuote() {\n\treturn sc_cons(sc_SYMBOL_PREFIX + \"quote\", sc_cons(this.read(), null));\n }", "function contractKind(definition) {\n return typeString(definition).split(\" \")[0];\n}", "get kind () {\n\t\treturn this._kind;\n\t}", "get kind() {\n\t\treturn this.__kind;\n\t}", "function ge...
[ "0.6105763", "0.5763496", "0.5707118", "0.5701211", "0.5596035", "0.55953145", "0.55902064", "0.55387", "0.55387", "0.5516154", "0.5516154", "0.5516154", "0.54767495", "0.54070204", "0.53740513", "0.5334345", "0.5291194", "0.5289546", "0.52715373", "0.524226", "0.52380246", ...
0.76218224
0
Adds a "click" event listener to the "Start" button.
function prepareListeners() { var startButton; startButton = document.getElementById("start"); startButton.addEventListener("click",startGame); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeStartButtonClickable(){ \n startButton.addEventListener('click', startWatch) \n}", "function onstartup() {\n var startButton = document.getElementById(\"startButton\");\n startButton.addEventListener(\"click\", init);\n}", "function clickStart() {\n $('main').on('click', '#start', functio...
[ "0.7931333", "0.7303107", "0.7301835", "0.7277836", "0.7226656", "0.7062626", "0.70350516", "0.6929526", "0.6861232", "0.68297553", "0.67817336", "0.67703664", "0.67658377", "0.67294073", "0.6666143", "0.6637464", "0.66222656", "0.66190654", "0.6552461", "0.6537602", "0.65190...
0.7200741
5
Redirects users to "vcaballeassign3_1.html", the game set up page where Player 1 and Player 2's names are inputted and the type of dice game they want to play is selected
function startGame () { location.replace("vcaballeassign3_1.html"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToGame() {\n window.location = 'game.html';\n}", "function iniciaGame(){\nvar nivel_game = document.getElementById('nivel_game').value;\n \n window.location.href = 'game.html?' + nivel_game;\n}", "function checkSetUp() {\n var keys = [\"player1Name\", \"player1Rank\", \"player2Name\", \"pl...
[ "0.6314164", "0.625504", "0.6183398", "0.6178489", "0.61088896", "0.60539615", "0.59728503", "0.59691954", "0.59653205", "0.5948406", "0.59371835", "0.59019387", "0.58963215", "0.5881527", "0.5805219", "0.578945", "0.5740842", "0.5727175", "0.572268", "0.5721996", "0.5716092"...
0.6754877
0
Respond to keyup events. Call the event handler with the event
keyUp(event) { // send value to caller for state update this.props.keyStrokeEventCallback(event.target.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleKeyUp(){\n\n }", "function keyup_handler(event)\n{\n\tgame.handle_key(event.code, false);\n}", "function keyupHandler() {\n\n var type;\n\n if (this.value !== valueKeyDown) {\n\n // Remove the placeholder\n this.className = this.className.replace(classNameRegExp, \"\");\n this.val...
[ "0.7520712", "0.7402657", "0.7398677", "0.736411", "0.7262336", "0.7259926", "0.72532654", "0.7128707", "0.71036863", "0.7048945", "0.7047955", "0.7009867", "0.7005108", "0.6982874", "0.6982874", "0.6901604", "0.68783534", "0.6829179", "0.68018353", "0.6801407", "0.67588675",...
0.7099882
9
wrap some native API on `window`
function patchClass(className) { var OriginalClass = _global$1[className]; if (!OriginalClass) return; _global$1[className] = function () { var a = bindArguments(arguments, className); switch (a.length) { case 0: this[originalInstanceKey] = new OriginalCla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function polyfillWindow(passedWindow) {\n if (!passedWindow.Intl) {\n // No `Intl`, so use and load the polyfill.\n passedWindow.Intl = Intl;\n }\n\n return passedWindow;\n}", "function Window() {}", "function zo() {\n // `window` is not always available, e.g. in ReactNative and WebWo...
[ "0.6977122", "0.69462883", "0.66001976", "0.6579221", "0.65260035", "0.62007606", "0.6078571", "0.60648024", "0.60517704", "0.59543663", "0.5892215", "0.5892215", "0.5880776", "0.5852775", "0.5852775", "0.5830314", "0.5829325", "0.58223975", "0.58052826", "0.57933134", "0.577...
0.0
-1
we have to patch the instance since the proto is nonconfigurable
function apply(_global) { var WS = _global.WebSocket; // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener // On older Chrome, no need since EventTarget was already patched if (!_global.EventTarget) { patchEventTargetMethods(WS.prototype); } _global.W...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "patch() {\n }", "update() {\r\n throw new Error('must be set in subclass');\r\n }", "init() {\n module_utils.patchModule(\n 'redis',\n 'internal_send_command',\n redisClientWrapper,\n redis => redis.RedisClient.prototype\n );\n }", "patchMet...
[ "0.66059184", "0.6199524", "0.607143", "0.6022449", "0.5959147", "0.5950012", "0.5950012", "0.5938809", "0.5920166", "0.5896279", "0.58892465", "0.58864075", "0.5842034", "0.58405465", "0.5840006", "0.5819158", "0.5810862", "0.58032656", "0.57957053", "0.57926553", "0.5792655...
0.0
-1
Whenever any eventListener fires, we check the eventListener target and all parents for `onwhatever` properties and replace them with zonebound functions Chrome (for now)
function patchViaCapturingAllTheEvents() { var _loop_1 = function(i) { var property = eventNames[i]; var onproperty = 'on' + property; document.addEventListener(property, function (event) { var elt = event.target, bound, source; if (elt) { source = elt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patchViaCapturingAllTheEvents() {\n eventNames.forEach(function (property) {\n var onproperty = 'on' + property;\n document.addEventListener(property, function (event) {\n var elt = event.target, bound;\n while (elt) {\n if (elt[onproperty] && !elt[onproperty]._unbound) {\n ...
[ "0.7308687", "0.6764413", "0.67310035", "0.6728535", "0.6728535", "0.65901005", "0.6558085", "0.65278196", "0.65278196", "0.6202809", "0.6199586", "0.61790043", "0.61790043", "0.61741143", "0.6145877", "0.6105835", "0.6007642", "0.60027605", "0.5972912", "0.59663177", "0.5918...
0.6692238
6
uses a heuristic used by v8 and chakra to force an object into dictionary mode.
function MakeDictionary(obj) { obj.__DICTIONARY_MODE__ = 1; delete obj.____DICTIONARY_MODE__; return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MakeDictionary(obj) {\n obj.__DICTIONARY_MODE__ = 1;\n delete obj.____DICTIONARY_MODE__;\n return obj;\n }", "function MakeDictionary(obj) {\n\t obj.__ = undefined;\n\t delete obj.__;\n\t return obj;\n\t }", "function MakeDictionary(obj) ...
[ "0.66493744", "0.6136624", "0.61037225", "0.60769093", "0.6070396", "0.6070396", "0.6070396", "0.6064559", "0.6064559", "0.6064559", "0.6064559", "0.6064559", "0.6064559", "0.6064559", "0.6019012", "0.6019012", "0.5944028", "0.5640616", "0.5632396", "0.557873", "0.557873", ...
0.6704451
1
Dynamic Module Loader Polyfill Implemented exactly to the former 20140824 ES6 Specification Draft Rev 27, Section 15 Functions are commented with their spec numbers, with spec differences commented. Spec bugs are commented in this code with links. Abstract functions have been combined where possible, and their associat...
function Module() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Loader(options={}) {\n // Implementation note: See the comment about @@create methods on step 1 of\n // the Realm constructor, above.\n //\n //> 1. Let loader be the this value.\n var loader = callFunction(Loader[\"@@create\"], Loader);\n\n //> 2. If Type(loader) is not Object, throw a...
[ "0.6269345", "0.60827255", "0.58612424", "0.56849205", "0.5669102", "0.5565489", "0.55126184", "0.55067027", "0.5405048", "0.5329809", "0.5315823", "0.530489", "0.52532333", "0.5251461", "0.5228057", "0.52262366", "0.5223878", "0.5201094", "0.52001834", "0.51804644", "0.51760...
0.5325977
13
15.2.3.2 Load Records and LoadRequest Objects 15.2.3.2.1
function createLoad(name) { return { status: 'loading', name: name, linkSets: [], dependencies: [], metadata: {} }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateLoad(name) {\n //> 1. Let load be a new Load Record.\n return {\n //> 2. Set the [[Status]] field of load to `\"loading\"`.\n status: \"loading\",\n //> 3. Set the [[Name]] field of load to name.\n name: name,\n //> 4. Set the [[LinkSets]] field of load t...
[ "0.67039627", "0.6682071", "0.653044", "0.6070087", "0.59938335", "0.5970753", "0.5957265", "0.59490544", "0.59481674", "0.59106433", "0.5821842", "0.57568777", "0.57165194", "0.5684499", "0.5677677", "0.5677141", "0.56708527", "0.56578064", "0.56212926", "0.5604905", "0.5563...
0.5457798
38
15.2.3.2.2 createLoadRequestObject, absorbed into calling functions 15.2.4 15.2.4.1
function loadModule(loader, name, options) { return new Promise(asyncStartLoadPartwayThrough({ step: options.address ? 'fetch' : 'locate', loader: loader, moduleName: name, // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091 moduleMetadata: options && options....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateLoad(name) {\n //> 1. Let load be a new Load Record.\n return {\n //> 2. Set the [[Status]] field of load to `\"loading\"`.\n status: \"loading\",\n //> 3. Set the [[Name]] field of load to name.\n name: name,\n //> 4. Set the [[LinkSets]] field of load t...
[ "0.71066135", "0.6627092", "0.65387326", "0.636093", "0.636093", "0.636093", "0.636093", "0.60528666", "0.5972789", "0.5842499", "0.58402675", "0.57841265", "0.57656914", "0.5721165", "0.5667901", "0.56637293", "0.56519747", "0.5647681", "0.5643103", "0.5634344", "0.5629418",...
0.0
-1
15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions 15.2.4.7.1
function asyncStartLoadPartwayThrough(stepState) { return function(resolve, reject) { var loader = stepState.loader; var name = stepState.moduleName; var step = stepState.step; if (loader.modules[name]) throw new TypeError('"' + name + '" already exists in the module table'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module t...
[ "0.70276874", "0.70276874", "0.70243365", "0.65912616", "0.62327015", "0.60605234", "0.5919585", "0.5834602", "0.57496405", "0.57462096", "0.57462096", "0.57003623", "0.5622533", "0.5617242", "0.5612152", "0.55972016", "0.55972016", "0.5515321", "0.5515321", "0.5515321", "0.5...
0.700571
4
Declarative linking functions run through alternative implementation: 15.2.5.1.1 CreateModuleLinkageRecord not implemented 15.2.5.1.2 LookupExport not implemented 15.2.5.1.3 LookupModuleDependency not implemented 15.2.5.2.1
function createLinkSet(loader, startingLoad) { var linkSet = { loader: loader, loads: [], startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995 loadingCount: 0 }; linkSet.done = new Promise(function(resolve, reject) { linkSet.resolve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linkDeclarativeModule(load, loads, loader) {\n if (load.module)\n return;\n\n var module = load.module = getOrCreateModuleRecord(load.name, loader);\n var moduleObj = load.module.module;\n\n var registryEntry = load.declare.call(__global, function(name, value) {\n // NB This should b...
[ "0.68403625", "0.67765236", "0.5868396", "0.5846816", "0.571616", "0.5714096", "0.5693877", "0.56445146", "0.5568531", "0.55401117", "0.5535808", "0.5535808", "0.5535808", "0.5506184", "0.5504352", "0.54398185", "0.543779", "0.53626734", "0.5339298", "0.5323657", "0.5268934",...
0.0
-1
linking errors can be generic or loadspecific this is necessary for debugging info
function doLink(linkSet) { var error = false; try { link(linkSet, function(load, exc) { linkSetFailed(linkSet, load, exc); error = true; }); } catch(e) { linkSetFailed(linkSet, null, e); error = true; } return error; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loading_error(error, filename, lineno) {\n console.log(\"Dosyaları yüklerken hata meydana geldi: \" + error);\n}", "function loading_error() {\n console.log(\"ERRRR...OR\");\n}", "function loaderErrback(error, url) {\n//console.error(\"in loaderErrback\", error);\n\t\t\tLoader._error(\"Error loading...
[ "0.67239606", "0.6579832", "0.65434384", "0.64690095", "0.63124454", "0.62675536", "0.60804695", "0.60370904", "0.5925793", "0.5866692", "0.5854758", "0.58501947", "0.58162403", "0.5807438", "0.5797235", "0.57825744", "0.5776046", "0.57659453", "0.57659453", "0.5763954", "0.5...
0.5522301
36
26.3 Loader 26.3.1.1 defined at top importPromises adds ability to import a module twice without error
function createImportPromise(loader, name, promise) { var importPromises = loader._loader.importPromises; return importPromises[name] = promise.then(function(m) { importPromises[name] = undefined; return m; }, function(e) { importPromises[name] = undefined; throw e; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "importFn(path) {\n return SynchronousPromise.resolve().then(() => {\n const moduleExports = this.csfExports[path];\n if (!moduleExports) throw new Error(`Unknown path: ${path}`);\n return moduleExports;\n });\n }", "fixImports() {\n const undefinedVariables = (0, _findUndefinedIdentifier...
[ "0.6282673", "0.6150173", "0.61026156", "0.6002954", "0.6002954", "0.6002954", "0.6002954", "0.6002954", "0.5986527", "0.59494835", "0.5899131", "0.5899131", "0.5893521", "0.5833483", "0.5833483", "0.5687664", "0.5681777", "0.56563747", "0.56352043", "0.56352043", "0.5609207"...
0.6911019
4
ES6 Module Declarative Linking Code Dev Build Only
function link(linkSet, linkError) { var loader = linkSet.loader; if (!linkSet.loads.length) return; var loads = linkSet.loads.concat([]); for (var i = 0; i < loads.length; i++) { var load = loads[i]; var module = doDynamicExecute(linkSet, load, linkError); if (!module) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async jsBuild() {\n if (!this.fileUtil.isModuleExists()) {\n console.error('Error: module not found');\n return;\n }\n this.jsUpdate();\n let jsFiles = readdir.sync(this.fileUtil.getJsModulePath(), {followSymlinks: true});\n let builderJson = this.parseBuilderJson();\n let version = thi...
[ "0.594605", "0.5920217", "0.57921046", "0.57178706", "0.5677892", "0.5641967", "0.56303334", "0.5629483", "0.561835", "0.5602774", "0.55720687", "0.55560744", "0.55357796", "0.5506702", "0.54905903", "0.5466708", "0.5426576", "0.5378804", "0.5367142", "0.533505", "0.53345925"...
0.0
-1
NB no specification provided for System.paths, used ideas discussed in
function applyPaths(paths, name) { // most specific (most number of slashes in path) match wins var pathMatch = '', wildcard, maxWildcardPrefixLen = 0; // check to see if we have a paths entry for (var p in paths) { var pathParts = p.split('*'); if (pathParts.length > 2) throw new TypeError('Only...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolveAsPath() { }", "function PathMapper() {\n\t}", "function PathMapper() {\n\t}", "get path() {}", "function GetPath(paths) {\n var path = arguments[0];\n for (var index = 1; index < arguments.length; index++) {\n path += \"/\" + arguments[index];\n }\n return path;\n}", "function ...
[ "0.6475486", "0.6277824", "0.6277824", "0.62356496", "0.61351407", "0.61017567", "0.607018", "0.6044293", "0.60359293", "0.6027029", "0.59940255", "0.59752893", "0.5944016", "0.58921236", "0.5842425", "0.58218706", "0.58175284", "0.5807458", "0.5807458", "0.5807458", "0.58074...
0.0
-1
inline Object.createstyle class extension
function LoaderProto() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Obj() {}", "function protoTypeThis(obj) {\n\t\tif (obj && typeof obj !== 'undefined') {\n\n\t\t\t// adding a setStyle\n\t\t\tobj.setStyle = function (key, val) {\n\t\t\t\tif (typeof obj.length !== 'undefined') {\n\t\t\t\t\tfor (var x = 0; obj.length > x; x++) {\n\t\t\t\t\t\tobj[x].style[key] = val;\n\t\...
[ "0.6485071", "0.6391124", "0.6350249", "0.6341028", "0.63328576", "0.63176525", "0.6237772", "0.6197664", "0.61946017", "0.61330205", "0.6130174", "0.6130174", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.6065278", "0.6065278", "0.606...
0.0
-1
SystemJS Loader Class and Extension helpers
function SystemJSLoader() { SystemLoader.call(this); systemJSConstructor.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SystemJSLoader() {\n Loader.call(this);\n\n this.paths = {};\n this._loader.paths = {};\n\n systemJSConstructor.call(this);\n}", "constructor() {\n super();\n\n /**\n * The name of the underlying native loader plugin used to load text.\n */\n this.textPluginName = 'text';\n\n thi...
[ "0.80498016", "0.6730371", "0.6405795", "0.63000965", "0.6206572", "0.6094183", "0.5964421", "0.5831053", "0.5771867", "0.5761576", "0.5753868", "0.573121", "0.57228005", "0.5720173", "0.571383", "0.5703496", "0.5663954", "0.5637955", "0.5637955", "0.56028116", "0.56005704", ...
0.8082156
1
inline Object.createstyle class extension
function SystemProto() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Obj() {}", "function protoTypeThis(obj) {\n\t\tif (obj && typeof obj !== 'undefined') {\n\n\t\t\t// adding a setStyle\n\t\t\tobj.setStyle = function (key, val) {\n\t\t\t\tif (typeof obj.length !== 'undefined') {\n\t\t\t\t\tfor (var x = 0; obj.length > x; x++) {\n\t\t\t\t\t\tobj[x].style[key] = val;\n\t\...
[ "0.6485071", "0.6391124", "0.6350249", "0.6341028", "0.63328576", "0.63176525", "0.6237772", "0.6197664", "0.61946017", "0.61330205", "0.6130174", "0.6130174", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.60708666", "0.6065278", "0.6065278", "0.606...
0.0
-1
converts any module.exports object into an object ready for SystemJS.newModule
function getESModule(exports) { var esModule = {}; // don't trigger getters/setters in environments that support them if (typeof exports == 'object' || typeof exports == 'function') { var hasOwnProperty = exports && exports.hasOwnProperty; if (getOwnPropertyDescriptor) { for (var p in exports) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function demangle(exports, baseModule) {\n var module = baseModule ? Object.create(baseModule) : {};\n var setargc = exports._setargc || function() {};\n function hasOwnProperty(elem, prop) {\n return Object.prototype.hasOwnProperty.call(elem, prop);\n }\n for (let internalName in exports) {\n if (!hasO...
[ "0.65545887", "0.6407095", "0.6407095", "0.6407095", "0.62986225", "0.62026757", "0.6197031", "0.61654013", "0.61654013", "0.61654013", "0.61654013", "0.61654013", "0.61654013", "0.61654013", "0.61654013", "0.61462647", "0.61399066", "0.61057603", "0.61057603", "0.61057603", ...
0.61118084
17
meta firstlevel extends where: array + array appends object + object extends other properties replace
function extendMeta(a, b, prepend) { for (var p in b) { var val = b[p]; if (!(p in a)) a[p] = val; else if (val instanceof Array && a[p] instanceof Array) a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val); else if (typeof val == 'object' && val !== null && typeof a[p] == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extendMeta(a, b, prepend) {\n for (var p in b) {\n var val = b[p];\n if (!(p in a))\n a[p] = val;\n else if (val instanceof Array && a[p] instanceof Array)\n a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);\n else if (typeof val == 'object' && typeof a[p] == 'obj...
[ "0.6212121", "0.6106012", "0.6081162", "0.5814183", "0.5789025", "0.5778064", "0.57407254", "0.57270354", "0.5710462", "0.5628308", "0.56240666", "0.56240666", "0.5621492", "0.5621492", "0.5621492", "0.5589011", "0.55736595", "0.55472773", "0.5532709", "0.5532523", "0.5532523...
0.6234258
0
Core SystemJS Normalization If a name is relative, we apply URL normalization to the page If a name is an absolute URL, we leave it asis Plain names (neither of the above) run through the map and paths normalization phases. The paths normalization phase applies last (paths extension), which defines the `decanonicalize`...
function isPlain(name) { return (name[0] != '.' || (!!name[1] && name[1] != '/' && name[1] != '.')) && name[0] != '/' && !name.match(absURLRegEx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeName(name) {\n if(options.paths) {\n var possibilities = []\n for (var path in paths) {\n if(name.startsWith(path)) {\n possibilities.push(path);\n }\n }\n\n var longestMatchingIndex = Math.max.apply(Math, possibilities.map(function(x) {return x.length}));\n var l...
[ "0.61189276", "0.60487556", "0.6040343", "0.6026984", "0.5985033", "0.5962374", "0.5962374", "0.59416443", "0.59416443", "0.59385693", "0.5937686", "0.5937686", "0.5937686", "0.59065723", "0.5879632", "0.5879632", "0.5879632", "0.5879632", "0.5879632", "0.5879632", "0.5879632...
0.0
-1
only applies to plain names
function baseURLResolve(loader, name) { return new URL(name, getBaseURLObj.call(loader)).href; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateName() {\n // Do not delete this internal method.\n this.name = this.name.replace(/[^a-z0-9]/gi, '_').toLowerCase();\n }", "function handleCommonDefnName(obj, defnValue) {\nvar returnVal = false;\nif(defnValue.search(\"[^A-Za-z0-9_-]\") != -1) {\n alert(\"Name only can contain Alphabets(A/a - Z/...
[ "0.6660858", "0.65819263", "0.65819263", "0.64706594", "0.6448961", "0.6406796", "0.62657094", "0.62611926", "0.6220286", "0.62178445", "0.61889154", "0.6171708", "0.6145019", "0.6129887", "0.6098664", "0.6088871", "0.60765874", "0.6044691", "0.604183", "0.6040165", "0.602164...
0.0
-1
data object for quick checks against package paths
function createPkgConfigPathObj(path) { var lastWildcard = path.lastIndexOf('*'); var length = Math.max(lastWildcard + 1, path.lastIndexOf('/')); return { length: length, regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkDataFiles() {\n // TODO set up later\n}", "async function getPackageData(base) {\n\tconst packagePath = await getPackagePath(base);\n\treturn packagePath ? loadJsonFile(packagePath) : {};\n}", "function validateData(data) {\n\tvar invalid = \"invalid-data\";\n\t\n\t// check null case for fresh...
[ "0.6360007", "0.59289974", "0.5927366", "0.57930315", "0.56285614", "0.5517898", "0.545148", "0.5374718", "0.5339807", "0.53312874", "0.527178", "0.5246458", "0.5244347", "0.5229817", "0.5187942", "0.51781136", "0.51724094", "0.51715654", "0.5165285", "0.5160551", "0.5149502"...
0.0
-1
most specific match wins
function getPackageConfigMatch(loader, normalized) { var pkgName, exactMatch = false, configPath; for (var i = 0; i < loader.packageConfigPaths.length; i++) { var packageConfigPath = loader.packageConfigPaths[i]; var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findBestMatch() {\n bestMatch = songMatches[0];\n for (let i = 1; i < songMatches.length; ++i) {\n if ( songMatches[i].popularity > bestMatch.popularity ) {\n bestMatch = songMatches[i];\n }\n }\n}", "findBestMatchLevelIndex(vms) {\n const match = vms.find((vm) =...
[ "0.6925382", "0.67664325", "0.6292236", "0.5951714", "0.58974504", "0.5818809", "0.57950586", "0.57404923", "0.57366985", "0.57237756", "0.57143337", "0.56875086", "0.56641704", "0.5663279", "0.56604785", "0.5660031", "0.5591454", "0.5582141", "0.55648893", "0.5548487", "0.55...
0.0
-1
An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
function getModule(name, loader) { var exports; var entry = loader.defined[name]; if (!entry) { exports = loader.get(name); if (!exports) throw new Error('Unable to load dependency ' + name + '.'); } else { if (entry.declarative) ensureEvaluated(name, [], loader);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "load() {}", "load() {}", "async load () {}", "function XLoader() {\r\n return __loadScript(\"YLoader\", 2);\r\n}", "async getLoadOperation() {}", "function init() {\n return {\n loaders: [ new LocalLoader() ],\n fetch: function(dep_name, targetConfig) {\n var output;\n ...
[ "0.63546026", "0.63546026", "0.61608714", "0.61246675", "0.6107672", "0.6052444", "0.60193396", "0.6004082", "0.5978508", "0.5951008", "0.5951008", "0.5951008", "0.5951008", "0.5928838", "0.5725651", "0.5710629", "0.56844443", "0.56842333", "0.5684073", "0.5644392", "0.562666...
0.52495754
68
Given a module, and the list of modules for this current branch, ensure that each of the dependencies of this module is evaluated (unless one is a circular dependency already in the list of seen modules, in which case we execute it) Then we evaluate the module itself depthfirst left to right execution to match ES6 modu...
function ensureEvaluated(moduleName, seen, loader) { var entry = loader.defined[moduleName]; // if already seen, that means it's an already-evaluated non circular dependency if (!entry || entry.evaluated || !entry.declarative) return; // this only applies to declarative modules which late-execut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensureEvaluated(moduleName, seen, loader) {\n var entry = loader.defined[moduleName];\n\n // if already seen, that means it's an already-evaluated non circular dependency\n if (!entry || entry.evaluated || !entry.declarative)\n return;\n\n // this only applies to declarative modules which...
[ "0.63737464", "0.6310957", "0.6310957", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.6294827", "0.61050296", "0.5889319", "0.5866346", "0.5760278", "0.57268006", "0.572186", "0.5698482", ...
0.6376883
1
AMDcompatible require To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
function require(names, callback, errback, referer) { // in amd, first arg can be a config object... we just ignore if (typeof names == 'object' && !(names instanceof Array)) return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1)); // amd require if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function amd(loader) {\n // by default we only enforce AMD noConflict mode in Node\n var isNode = typeof module != 'undefined' && module.exports;\n\n loader._extensions.push(amd);\n\n // AMD Module Format Detection RegEx\n // define([.., .., ..], ...)\n // define(varName); || define(function(require, exports...
[ "0.6642445", "0.6399943", "0.61785287", "0.6175901", "0.5972517", "0.5806217", "0.5726119", "0.5696858", "0.56284285", "0.5626753", "0.5623647", "0.56026304", "0.56005216", "0.5544809", "0.5534332", "0.54895824", "0.5466294", "0.5466294", "0.5457498", "0.5441952", "0.5440774"...
0.57050216
8
put name back together after parts have been normalized
function combinePluginParts(loader, argumentName, pluginName, defaultExtension) { if (defaultExtension && argumentName.substr(argumentName.length - 3, 3) == '.js') argumentName = argumentName.substr(0, argumentName.length - 3); if (loader.pluginFirst) { return pluginName + '!' + argumentName; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeName(name) {\n return name\n .toUpperCase()\n .replace(/[^A-Z0-9]/g, \" \")\n .trim()\n .split(/\\s+/)\n .join(\"_\");\n}", "function normalizeName(name) {\n s = name;\n var pos = 0;\n while (true)\n {\n pos = s.search(' ');\n if (pos === -1) return s;\n else s = s....
[ "0.6928374", "0.69088894", "0.67470956", "0.6727196", "0.66575545", "0.66531235", "0.66531235", "0.6583812", "0.6566088", "0.65291435", "0.65038335", "0.6476637", "0.6454306", "0.64424986", "0.64309025", "0.6426407", "0.6426407", "0.6396845", "0.63828295", "0.6365107", "0.635...
0.0
-1
note if normalize will add a default js extension if so, remove for backwards compat this is strange and sucks, but will be deprecated
function checkDefaultExtension(loader, arg) { return loader.defaultJSExtensions && arg.substr(arg.length - 3, 3) != '.js'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "javascriptExtensions () {\n return Object.keys(interpret.jsVariants).map(it => it.slice(1))\n }", "normalizeExtension(path) {\r\n if (path_1.default.extname(path) == \".js\")\r\n path = path.substring(0, path.length - path_1.default.extname(path).length);\r\n if (path_1.def...
[ "0.67008984", "0.64235467", "0.60204613", "0.59808695", "0.5857506", "0.5794667", "0.57492894", "0.570778", "0.56991637", "0.56751144", "0.5665344", "0.5653871", "0.56395227", "0.5609452", "0.5592092", "0.55887496", "0.55680096", "0.55640566", "0.55572855", "0.55480313", "0.5...
0.6374389
3
Filter function renders the filter section of the expense tracker, sets user inputs into state.
function Filter ({categoryFilter, setCategoryFilter, setNameFilter, dateSort, setDateSort, setExpenseList, nameFilter}) { //Functions //Set category filter state to event value const categoryFilterHandler = (e) => { setCategoryFilter(e.target.value) } //Set name filte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterHandler(event) {\n // User changes are recorded and saved as key/value format\n props.setFilterAndSearchState({\n ...props.filterAndSearchState,\n [event.target.name]:\n event.target.value.length > 0\n ? event.target.value\n : !defaultFilters[event.target.nam...
[ "0.67674905", "0.6406178", "0.64006126", "0.6285736", "0.62668127", "0.62635124", "0.6258789", "0.6241929", "0.62146425", "0.6207995", "0.6204922", "0.6187176", "0.6186147", "0.61532676", "0.60970706", "0.6095886", "0.6083428", "0.60643923", "0.60203004", "0.6015761", "0.6005...
0.6686537
1
START LIFECYCLE METHODS when component loads
componentDidMount() { console.log('fetching data'); // JSON.stringify takes object and makes it into string representation // JSON.parse takes string representation, and puts into JSON object try { const json = localStorage.getItem('options'); const options = JSON...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static defaultStart (component) {\n store.commit('START_PROCESS', 'vk')\n component.loading = true\n component.result = []\n }", "componentDidMount() {\n\t\tthis.startup();\n\t}", "start() {\r\n // Add your logic here to be invoked when the application is started\r\n }", "start() {\n ...
[ "0.69404906", "0.6881501", "0.6682161", "0.6629854", "0.6556505", "0.65263164", "0.65263164", "0.65263164", "0.6499634", "0.64971787", "0.64971787", "0.64971787", "0.6429764", "0.6419646", "0.63651824", "0.6359258", "0.6359258", "0.6359258", "0.6359258", "0.6359258", "0.63592...
0.0
-1
when state has changed, and has access to props & state
componentDidUpdate(prevProps, prevState) { if (prevState.options.length !== this.state.options.length) { const json = JSON.stringify(this.state.options); localStorage.setItem('options', json); console.log('saving data'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stateChanged(state) { }", "setState(newProps) {\n let stateChanged = false;\n\n Object.entries(newProps).forEach(([key, val]) => {\n if (val !== this.state[key]) {\n stateChanged = true;\n }\n\n this.state[key] = val;\n });\n\n if (stateChanged) {\n this.render();\n }\n ...
[ "0.74321973", "0.7339513", "0.7324402", "0.72984", "0.72201526", "0.72004896", "0.7137093", "0.70914626", "0.7045084", "0.7035856", "0.7025837", "0.6971608", "0.6969204", "0.6959215", "0.69186336", "0.68893516", "0.6886354", "0.6876313", "0.6854717", "0.6852283", "0.68489116"...
0.0
-1
when components unmount, usually happens when goes to new page
componentWillUnmount() { console.log('componentWillUnmount'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount () {}", "componentDidUnmount(){\n // ...
[ "0.7562185", "0.7562185", "0.7562185", "0.7562185", "0.7562185", "0.7562185", "0.7562185", "0.7562185", "0.7488178", "0.7458386", "0.7236962", "0.72352093", "0.72350854", "0.72223556", "0.7204099", "0.72021085", "0.7199837", "0.7199715", "0.7194656", "0.71859616", "0.7170479"...
0.0
-1
END LIFECYCLE METHODS need to pass callback function in to listen for events in child to be invoked here to update state (parent)
handleDeleteOptions() { // old school syntax // this.setState(() => { // return { // options: [] // } // }); // ES6 syntax this.setState(() => ({ options: [] })); // returns state object back with options const num = () => {} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detachedCallback() {}", "detachedCallback() {}", "detachedCallback() {}", "detachedCallback() {}", "detachedCallback() {}", "detachedCallback() {}", "onExit(e) {\n this.onExit = null;\n if (this.pingIntervalId) {\n clearInterval(this.pingIntervalId);\n this.pingInter...
[ "0.62996536", "0.62996536", "0.62996536", "0.62996536", "0.62996536", "0.62996536", "0.623483", "0.61373204", "0.61143285", "0.5971137", "0.5928151", "0.5888135", "0.5879777", "0.584586", "0.58365846", "0.581197", "0.5811327", "0.58112305", "0.5803061", "0.5795495", "0.577838...
0.0
-1
leaving handleAddOption in here so that we can do formrelated things inside AddOption and not in parent
handleAddOption(event) { event.preventDefault(); const option = event.target.elements.optshon.value.trim(); const error = this.props.handleAddOption(option); if (error) { // ES6 syntax for 'error: error; -> then 'error' this.setState(() => ({ error })); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleAddOption(event) {\n event.preventDefault(); // stop the full page refresh!!\n \n // event.target is the form!\n const option = event.target.elements.option.value.trim();\n // list of elements by name, so pull the named option value\n \n const error = thi...
[ "0.76164293", "0.73482496", "0.72636867", "0.708879", "0.70399255", "0.69063365", "0.666442", "0.6615101", "0.65075874", "0.6489181", "0.64542353", "0.63394445", "0.62525916", "0.6153249", "0.61364913", "0.61197376", "0.6099045", "0.60943943", "0.6076847", "0.6071049", "0.604...
0.67250484
6
saves the error details in the results log property. returns the same error object so that it can be also used as the return value for a property. refactor:
function logError(context, messageOrException, exception = null) { let error = {type: "error", context: context}; try { if (typeof messageOrException === 'string') { error.message = messageOrException; } else if (messageOrException instanceof Object) { error.exception = messageOrException;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if(result instanceof Error) {\n console.error(result);\n this.results.push(TestResult.error);\n this.errors++;\n }", "get error() {\n return this._error;\n }", "get error() {\r\n return this._error;\r\n }", "function getError() {\n retu...
[ "0.6735414", "0.63899696", "0.6382549", "0.6359997", "0.6359997", "0.6359997", "0.6359997", "0.6076856", "0.59058845", "0.5864638", "0.58487874", "0.5835988", "0.580249", "0.5757493", "0.57416373", "0.5719768", "0.5704846", "0.56535715", "0.5646569", "0.56063104", "0.559234",...
0.0
-1
Displays on screen whether the string was in an acceptable format.
function checkLegalBday() { var bday = document.getElementById("bday"); var dates = bday.value.split('/'); if(dates.length == 2 && isLegalMonth(dates[0]) && isLegalYear(dates[1])) { document.getElementById("result").innerHTML = ""; } else { document.getElementById("result").innerHTML = "<p>Please provide you...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkFormat (str, result) {\n\tlet re = new RegExp(result[0].p_value, 'g')\n\treturn re.test(str);\n}", "function latticeCanDisplayStr(str) {\n for (let i = 0; i < str.length; i++)\n if (str.charCodeAt(i) < 0x0020 || str.charCodeAt(i) > 0x007f)\n return false;\n return true;\n}", "function v...
[ "0.6671625", "0.6258137", "0.61612374", "0.60625184", "0.60251725", "0.60251725", "0.6000223", "0.5997417", "0.59948266", "0.5977464", "0.59602684", "0.592797", "0.5883721", "0.58636975", "0.5819786", "0.5802135", "0.57769656", "0.5751335", "0.5729978", "0.572761", "0.5705923...
0.0
-1
Returns true if the year is in 'yy' format Does not check whether the inputted year is more than the current year
function isLegalYear(year) { return year.length == 2 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateYear(yr)\n {\n var valid = true;\n if(isNaN(yr))\n {\n valid=false;\n }\n else\n {\n var num = parseInt(yr);\n var d = new Date();\n if((num > (d.getFullYear()+5)) || (num < d.getFullYear()))\n {\n ...
[ "0.7835326", "0.76302004", "0.76302004", "0.75992525", "0.73972654", "0.7147508", "0.70014614", "0.6973066", "0.6969016", "0.6951855", "0.6940571", "0.68917334", "0.68028057", "0.68028057", "0.67876065", "0.67843854", "0.67761594", "0.6754888", "0.6739418", "0.6718661", "0.67...
0.74585533
4
Returns 0 if there are no empty fields.
function showFailPrompt(name, birthday) { var result = document.getElementById("result"); if(name == "") { result.innerHTML = "<p>Please fill in your child's name</p>"; return -1; } else if(birthday == "") { result.innerHTML = "<p>Please provide your child's birthday</p>"; return -1; } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumberEmptyFields() {\n\tvar empty = 0;\n\tvar i, j;\n\n\tfor (i=0; i<9; i++) {\n\t\tfor (j=0; j<9; j++) {\n\t\t\tif ( getPuzzleValue(i, j) === 0) {\n\t\t\t\tempty++;\n\t\t\t}\n\t\t}\n\t}\n\treturn empty;\n}", "function zero_if_empty($form_field) {\n return $form_field.val() == '' ? 0 : $form_fiel...
[ "0.8035133", "0.6796022", "0.6600246", "0.65542483", "0.6364492", "0.62676144", "0.6143671", "0.61192995", "0.60457355", "0.59746265", "0.59736574", "0.59672195", "0.5920406", "0.5899252", "0.5869539", "0.58593345", "0.58536553", "0.5850108", "0.58410805", "0.58171237", "0.58...
0.0
-1
Uses a query to update the database
function editDB() { var birthday = document.getElementById("bday").value; var name = document.getElementById("name").value; if(showFailPrompt(name, birthday) == -1) return; var color = document.getElementById("color").style.backgroundColor; var boy_gender = document.getElementById("bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateDB(query) {\n let connection = makeConnection();\n connection.query(query, function(err, res) {\n if (err) throw err;\n connection.end();\n });\n}", "update(){}", "update(){}", "update(){}", "function updateDB(conn, q, cb) {\n\tconn.query(q, function(err) {\n\t\tcb(err);\n\t});\n}",...
[ "0.72708297", "0.69625235", "0.69625235", "0.69625235", "0.677034", "0.67150134", "0.6694555", "0.664955", "0.6647525", "0.65701854", "0.655268", "0.65028125", "0.64747906", "0.64118683", "0.6377534", "0.6323178", "0.63210815", "0.6261148", "0.62102777", "0.61894834", "0.6187...
0.0
-1
Creates a data string to be sent back into the DB Any empty string means no changes have to be made. If there are no changes, then this function returns zero.
function getDataString(name, birthday, color, boy_gender) { // First check whether it's actually worth returning a string var id = localStorage.edit_childID; var attributes = jQuery.parseJSON(localStorage.jsonString); var flag = false; var posts = "name="; if(attributes[id]["child_name"] != name) { posts +=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get data(){\r\n\t\treturn this.__data \r\n\t\t\t?? (this.__data = idb.createStore(this.__db__, this.__store__)) }", "saveData(gstr){\n\n \n\n }", "async function newData(data) {\n const result = await db.query(\n \"INSERT INTO data VALUES (null, ?, ?, ?, ?, ?, ?)\",\n [\n ...
[ "0.54304373", "0.5270017", "0.5169645", "0.5139352", "0.5110312", "0.51100683", "0.51026994", "0.5045885", "0.5027308", "0.5017873", "0.49558055", "0.49304146", "0.4903158", "0.4899658", "0.48689237", "0.48686385", "0.48686385", "0.4848223", "0.48450863", "0.48387474", "0.482...
0.0
-1
Called when one of the radio buttons is clicked 1 is boy 2 is girl
function changeGender(gender) { // Changes the images var sprite = document.getElementById("sprite"); switch(gender) { case 1: sprite.src ="images/child/boy-darkblue-mid.png"; break; case 2: sprite.src = "images/child/girl-darkblue-mid.png" break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGender(){\n var gen = document.getElementsByName(\"rads\")\n if(gen[0].checked == true){\n var gender = \"male\"\n }else if(gen[1].checked == true){\n var gender = \"female\"\n }else {\n console.log(\"pass\");//Test the radio buttons\n }\n switch(gender){\n case gender = \...
[ "0.6286243", "0.60776955", "0.59003496", "0.5896572", "0.5892653", "0.5854813", "0.58199894", "0.58127695", "0.57873315", "0.57822114", "0.5776496", "0.5772907", "0.57529896", "0.57516974", "0.5747265", "0.572267", "0.5717276", "0.57120734", "0.5710972", "0.5699459", "0.56708...
0.0
-1
Uses the existing jsonString to change the settings on the page
function initializeEditingPage(id) { var attributes = jQuery.parseJSON(localStorage.jsonString); var name = attributes[id]["child_name"]; var birthday = attributes[id]["child_birthday"]; var gender = attributes[id]["child_gender"]; var color = attributes[id]["child_color"]; document.getElementById("name"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setJSON(json) {\n this.options.json = json;\n }", "function applySettings(str, node) {\n let settings = JSON.parse(str);\n node.style.color = settings.text_color;\n node.style.backgroundColor = settings.bg_color;\n node.style.fontFamily = settings.font_type;\n node.style.fontSize = settings.fo...
[ "0.6425515", "0.64041775", "0.62045765", "0.60189086", "0.5939397", "0.5938245", "0.58580446", "0.569534", "0.5666714", "0.5638442", "0.56224144", "0.559742", "0.5595614", "0.5583413", "0.5580935", "0.5571639", "0.5571452", "0.55318767", "0.5528804", "0.5510856", "0.5506341",...
0.0
-1
const file = fs.createReadStream(url)
function readDB(callback) { return new Promise((resolve, reject) => { fs.readFile(url, 'utf8', function (error, data) { if (error) { callback(false); reject(error); } else { resolve(data); } }); }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function createReadStream(url, options) {\n // eslint-disable-next-line\n console.warn('createReadStream() deprecated, use fetch().then(resp => resp.body)');\n url = Object(_lib_fetch_file_aliases__WEBPACK_IMPORTED_MODULE_4__[\"resolvePath\"])(url);\n const response = await Object(_lib_fetch_fetch_file__...
[ "0.75939333", "0.69193476", "0.68673825", "0.6783174", "0.6774741", "0.6747825", "0.6724362", "0.6597251", "0.658672", "0.6558502", "0.6533964", "0.64608085", "0.6429626", "0.64269435", "0.6426595", "0.641352", "0.63694715", "0.6333932", "0.63234407", "0.62928545", "0.6272309...
0.0
-1
handles the login of an existing user
function login_existing() { let email = $("#email").val(); let password = $("#password").val(); api.create_session(email, password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n User.login(self.user, handleLogin);\n }", "function loginUserCallback() {\n loginUser();\n }", "function checkUserLogin() {\n if (!user) {\n loginWithRedirect()\n } else {\n getUserTeam();\n }\n }", "async handleLogin () {\n\t\tconst { email, password, teamId ...
[ "0.7507353", "0.7188737", "0.71535337", "0.71111965", "0.7053923", "0.7013693", "0.69878817", "0.6987157", "0.69627506", "0.6940625", "0.69400066", "0.6918558", "0.6909683", "0.69096625", "0.6894907", "0.68795913", "0.6867939", "0.68582815", "0.68428296", "0.6822937", "0.6797...
0.0
-1
function to show time in 12 hour format
function clock1() { let date = new Date(); let hrs = date.getHours(); let mins = date.getMinutes(); let secs = date.getSeconds(); let period = "AM"; let time; if (hrs == 0) hrs = 12;//12 if (hrs > 12) { //12 hrs = hrs - 12; period = "PM"; } hrs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayAmorPm(hour){\n var b=\"\"\n if(hour<=12){\n b= \"AM\"\n }else{\n b=\"PM\"\n }\n hour = hour % 12\n hour = hour ? hour : 12\n return hour + \" \" + b\n }", "function _outputTime24h(time) {\n\t\treturn _padZero(time.getHours()) + \":\" ...
[ "0.79248554", "0.7867041", "0.78585887", "0.7845513", "0.77334183", "0.7648621", "0.7618684", "0.7594163", "0.7588979", "0.7581532", "0.7551924", "0.7551074", "0.7533458", "0.75043666", "0.75043666", "0.74803764", "0.74669874", "0.7446464", "0.7386648", "0.7354461", "0.735296...
0.0
-1
function to show time in 24 hour format
function clock2() { let date = new Date(); let hrs = date.getHours(); let mins = date.getMinutes(); let secs = date.getSeconds(); let time; hrs = hrs < 10 ? '0' + hrs : hrs; mins = mins < 10 ? '0'+ mins : mins; secs = secs < 10 ? '0'+ secs : secs; time = hrs + ':' + mins +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _outputTime24h(time) {\n\t\treturn _padZero(time.getHours()) + \":\" + _padZero(time.getMinutes());\n\t}", "function timeFormatString() {\n return is24HourTime() ? 'HH:mm' : 'hh:mm a';\n}", "function showTime() {\n\n let date = new Date();\n let hours = date.getHours();\n let minutes = date.getM...
[ "0.846889", "0.77686185", "0.75699645", "0.7513595", "0.7479991", "0.73467636", "0.73213077", "0.73099196", "0.73075294", "0.73047835", "0.7301201", "0.72558475", "0.7253665", "0.72453207", "0.72140515", "0.7192573", "0.718746", "0.71256006", "0.71191627", "0.7113903", "0.711...
0.0
-1
Function to start and stop the timer
function start(tm) { if(tm == '24'){ clearInterval(t1); t2 = setInterval(clock2,1000); } else if(tm == '12'){ clearInterval(t2); t1 = setInterval(clock1,1000); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopTimer() {clearTimeout(startTimer)}", "function stop() {\n timer.stop();\n}", "function stopTime(){\n clearInterval(start);\n }", "function startTimer(){\n // check timer is on or off\n if(stopTime === true){\n stopTime = false;\n // this function will start the t...
[ "0.79821825", "0.7509271", "0.7482464", "0.7481715", "0.74810326", "0.73997647", "0.73829013", "0.7375337", "0.736626", "0.7335822", "0.731897", "0.72731084", "0.72676146", "0.7266882", "0.7260665", "0.7247216", "0.72432774", "0.7240234", "0.7224295", "0.7204921", "0.7204921"...
0.6764709
99
function to request and return lat and lng obj from an address obj
function getLatLng(key) { return new Promise(function(resolve, reject) { var address = DATA[key].Street.split(' ').join('+')+",+"+DATA[key].City.split(' ').join('+')+",+NY"; var url = "https://maps.googleapis.com/maps/api/geocode/json?address="+address+"&key=AIzaSyCeALJL3LQ58U97ktV4f_cozkUCisYRBHo" https...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async getCoordsFromAddress(address = '') {\n const platform = this.setPlatform();\n let data = {};\n const geocoder = platform.getGeocodingService();\n const geocodingParams = {\n searchText: address\n };\n await geocoder.geocode(geocodingParams, (result) => {\n const locations =...
[ "0.77652735", "0.7693391", "0.75890124", "0.7582816", "0.73571944", "0.7347706", "0.72803825", "0.71819675", "0.71680176", "0.7138733", "0.71182054", "0.71004426", "0.7079361", "0.703671", "0.7022322", "0.7008953", "0.7003635", "0.7000518", "0.69885105", "0.69809216", "0.6950...
0.0
-1
send POST request to google recaptcha servers for verification
function recaptcha_verify(req, res, next){ // create google recaptcha data let recaptcha_data = { secret: config.recaptcha_secret, response: req.body.recaptcha } // request google recaptcha validation request({ method: 'POST', uri: 'https://www.google.com/recaptcha/api/siteverify', qs: recaptcha_data ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main(params) {\n const url = 'https://www.google.com/recaptcha/api/siteverify';\n\n // get the client's ip address\n const ip = params['__ow_headers']['x-real-ip'];\n\n // build a POST request to verify the captcha\n var r = {\n uri: 'https://www.google.com/recaptcha/api/siteverify',...
[ "0.6619351", "0.6550407", "0.633534", "0.63181555", "0.63097376", "0.6268105", "0.61833715", "0.60968906", "0.6056947", "0.6033774", "0.59840655", "0.5839884", "0.58202934", "0.58202934", "0.5805595", "0.5742364", "0.5739906", "0.5713266", "0.5660877", "0.5635386", "0.5617718...
0.68973607
0
generate xoauth2 token and send email
function node_mailer(req, res, next) { // create a mail transporter let transporter = nodemailer.createTransport({ service: 'Gmail', auth: config.mail_auth }); // collect email data let email_data = { from: req.body.email, to: config.mail_auth.user, subject: 'Website Contact Form', text: `From: ${req...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewToken(oAuth2Client , res) {\n // an authentication url is generated which is basically an api call to gmail for user authentication\n const authUrl = oAuth2Client.generateAuthUrl({\n access_type: 'offline',\n scope: SCOPES,\n });\n // after the url is generated , redirect it in...
[ "0.66484994", "0.64326626", "0.6425041", "0.6400186", "0.62323517", "0.60614645", "0.60355544", "0.6008935", "0.5944116", "0.59315157", "0.5903746", "0.58953536", "0.58765477", "0.58467984", "0.5846218", "0.58349204", "0.58151174", "0.5783134", "0.57789826", "0.57110804", "0....
0.0
-1
path: sourceNode > analyser > scriptNode > context.destination
function setupAudioNodes() { // scriptNode -> context.destination scriptNode = audioContext.createScriptProcessor(2048, 1, 1); scriptNode.onaudioprocess = processAudio scriptNode.connect(audioContext.destination); // analyser -> scriptNode analyser = audioContext.createAnalyser(); analyser....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_writingScript() {\n this.fs.copy(\n this.templatePath('src_script_body.js'),\n this.destinationPath('src/script/body.js')\n );\n this.fs.copy(\n this.templatePath('src_script_head.js'),\n this.destinationPath('src/script/head.js')\n );\n }", "function parse(src) {\n return new ...
[ "0.55837446", "0.503192", "0.49911335", "0.4990739", "0.49866775", "0.489965", "0.48918548", "0.48624712", "0.4852848", "0.48260635", "0.4811056", "0.48105952", "0.48105952", "0.48105952", "0.48105952", "0.48105952", "0.47877938", "0.47760162", "0.47686982", "0.47604406", "0....
0.53240335
1
updates frequency data and graphics
function processAudio(audioProcessingEvent) { // get data var array = new Uint8Array(analyser.frequencyBinCount); analyser.getByteFrequencyData(array); // clear old spectrum, draw new one canvasContext.clearRect(0, 0, 1000, 325); canvasContext.fillStyle = gradient; drawSpectrum(array) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw() {\n requestAnimationFrame(draw);\n\n // Copy frequency data to frequencyData array.\n analyser.getByteFrequencyData(dataArray);\n\n // Update d3 chart with new data.\n svg.selectAll('rect').data(dataArray).attr('y', function(d) {\n return svgHeight - d;\n })\n .attr('hei...
[ "0.7244343", "0.72333497", "0.7171568", "0.7155202", "0.7101576", "0.7046449", "0.6968179", "0.68469465", "0.6842774", "0.6834491", "0.67368823", "0.66960937", "0.6577441", "0.654494", "0.6541808", "0.653951", "0.6492591", "0.648861", "0.64788413", "0.6348843", "0.6309947", ...
0.0
-1
routes input buffer of analyser node to output
function outputAudio(audioProcessingEvent) { var inputBuffer = audioProcessingEvent.inputBuffer; var outputBuffer = audioProcessingEvent.outputBuffer; for(var channel = 0; channel < outputBuffer.numberOfChannels; channel++) { var inputData = inputBuffer.getChannelData(channel); var outputDat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function analyseSound(buffer, url) {\n console.log('Analysing sound');\n javascriptNode.connect(context.destination); \n // Analyser\n analyser.smoothingTimeConstant = 0.9;\n analyser.fftSize = 2048;\n\n // Source creation\n var source = context.createBufferSource();\n // Associating the bu...
[ "0.5509125", "0.5497483", "0.5485624", "0.54841113", "0.5470983", "0.5466078", "0.5433039", "0.54066765", "0.5390861", "0.5390861", "0.5371991", "0.53292924", "0.5325329", "0.5309874", "0.53075016", "0.5255778", "0.52482873", "0.52474886", "0.52243406", "0.52207506", "0.52193...
0.0
-1
log if an error occurs
function onError(e) { console.log(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logError(err) { if(console && console.log) console.log('Error!', err); return false; }", "function logError (err) {\n util.log('error:', err)\n}", "_logError (msg, url, lineNo, columnNo, error) {\n let log = ErrLogger.getLogs()\n if (!log) {log = { session: [] } }\n log.session.p...
[ "0.7267637", "0.7182541", "0.71752995", "0.7112969", "0.7066949", "0.702445", "0.6957345", "0.69153", "0.6889393", "0.67166275", "0.66922337", "0.66798943", "0.6679584", "0.6674731", "0.6674255", "0.6667717", "0.66547567", "0.66539496", "0.6629295", "0.6628825", "0.6626829", ...
0.0
-1
this makes sure the buttons were disabled if no stagename was selected
componentWillReceiveProps(nextProps){ if(!this.props.stagename && !!nextProps.stagename){ this.setState({ subDisabled: false }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enable_buttons()\r\n{\r\n try\r\n {\r\n\t document.options_sys_ap_excl.Change.disabled =\r\n\t document.options_sys_ap_excl.Remove.disabled = document.options_sys_ap_excl.Exclusions.options.selectedIndex < 0;\r\n }\r\n catch (err)\r\n {\r\n\t g_ErrorHandler.DisplayException (err);\r\n\t return;\...
[ "0.7077155", "0.7054496", "0.6960236", "0.6946969", "0.6886404", "0.68808496", "0.6829956", "0.68182147", "0.68095815", "0.6776798", "0.6770099", "0.67630875", "0.675732", "0.6700156", "0.6688868", "0.6617408", "0.66148025", "0.6611894", "0.6599549", "0.6580533", "0.65758294"...
0.0
-1
var greeting = document.getElementById('greeting'); var greetingEl = document.createElement('p'); greetingEl.textContent = message; greeting.appendChild(greetingEl); // Scott Pilgrim Question
function question1() { response = prompt('Have you heard of Scott Pilgrim?'); response = response.toLowerCase(); console.log(response + ' is user response'); if (response === 'yes') { alert('That\'s awesome ' + username + '! I hope you enjoyed it! It\'s my absolute favorite series'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayMessage(string){\n const greetingNode = document.querySelector('#greeting')\n greetingNode.innerText = string\n}", "function boom() {\n var paragraph = document.createElement('p');\n paragraph.textContent = 'boom!';\n document.getElementById('content').appendChild(paragraph);\n}", "functio...
[ "0.7614835", "0.7577935", "0.74864495", "0.7455033", "0.7391399", "0.7388748", "0.7374597", "0.7357886", "0.72882026", "0.72591573", "0.7243144", "0.72374797", "0.723278", "0.71723133", "0.71479213", "0.7141931", "0.7140355", "0.71345794", "0.71022785", "0.71013117", "0.70866...
0.0
-1
Years in town Question
function question6() { response = ''; var answer = 7; var tries = 0; response = prompt('How long do you think I have been in Cedar Rapids. You only get 4 guesses! Hint: I\'m 25 and came here to attend college'); console.log(response); console.log(tries + ' tries'); tries++; conso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDogYears(humanYears) {\n //FILL IN!\n}", "function getNumberOfYears() {\n let repaymentTerm = Number(document.querySelector('input[name=\"number-of-years\"]:checked').value);\n return isNaN(repaymentTerm) ? 0 : (repaymentTerm / 12);\n }", "function dogToHumanYears(years)\n{\n let h...
[ "0.7228924", "0.7186019", "0.70708543", "0.7034882", "0.69443583", "0.6907845", "0.6863842", "0.6856759", "0.6852513", "0.6809274", "0.67625034", "0.6747244", "0.67385775", "0.67267853", "0.6700697", "0.6697348", "0.66955477", "0.6669279", "0.6665989", "0.66412663", "0.662460...
0.0
-1
Tally of cool points
function tally() { alert('You are have reached the end of the game! Your answers gave you a cool rating of: ' + correct); alert('Explore the rest of the page to check out more about me that wasn\'t included in the game!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTally(outcome) {\n totalPoints += parseInt(outcome);\n \n // Draw tally using HTML\n tally = display_element.querySelector(\".tally\");\n tally.innerHTML = `Total Points: ${totalPoints}`\n \n }", "function footballPoints(wins, ties) {\n let points = 0;\n points...
[ "0.6494366", "0.6462644", "0.6410101", "0.637729", "0.6361726", "0.62486625", "0.6239772", "0.62195224", "0.6128618", "0.612563", "0.61006266", "0.609139", "0.6085173", "0.6039038", "0.59817374", "0.59514046", "0.5930543", "0.59280694", "0.58901834", "0.5886644", "0.5882381",...
0.0
-1
Get weather data from openweathermap public api
async function getData() { try { const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${inputValue.value}&units=metric&APPID=e3c39c194b296595a62d9ac63424beae`; const response = await fetch(apiUrl); apiQuotes = await response.json(); //console.log(apiQuotes); weatherTitle.textContent =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeather(data){\n var api_key = '6996386e46f031703c26cea51cac9e6e';\n var url = `https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather?units=imperial&APPID=${api_key}&${data}`;\n\n fetch(url).then(response => response.json()).then(json_response => displayWeather(json_res...
[ "0.800355", "0.79128563", "0.7837276", "0.7776198", "0.77662647", "0.7750105", "0.7734093", "0.7686052", "0.76716286", "0.76481944", "0.7628086", "0.76219404", "0.76184577", "0.7569828", "0.7562693", "0.75521374", "0.7522759", "0.75057924", "0.74995977", "0.7495288", "0.74948...
0.0
-1
Each Panel is a TwitterControl. We pass in a html element representing the control and a username , which is the twitter timeline we be viewing
function TwitterControl(element, username, tweet_count) { this.$element = $(element); this.username = username; this.tweets_container = this.$element.find('.tweets_container')[0]; this.tweet_count = tweet_count || 30; this.collection = []; this.loading = false; th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TwitterCoordinator() {\n this.controls = [];\n }", "setTwitterWidget(id) {\n // offsetHeight is outer, scrollHeight is inner\n this.div.innerHTML = ''\n const renderTweet = () => { \n window.twttr.widgets.createTweetEmbed(\n id,\n this.div,\n { align: 'c...
[ "0.6016551", "0.57127506", "0.5630941", "0.56128776", "0.5598111", "0.5480706", "0.52863455", "0.5258798", "0.52562076", "0.52517515", "0.5245319", "0.5238887", "0.5226258", "0.5215295", "0.521426", "0.52097994", "0.518955", "0.5180741", "0.517967", "0.5174126", "0.5168904", ...
0.7102895
0
TwitterCoordinator setups and starts the 3 twitterControls (3 panels on screen).
function TwitterCoordinator() { this.controls = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\n\tvar TWITTER_CONSUMER_KEY = \"\"; // Apply for these values at dev.twitter.com\n\tvar TWITTER_CONSUMER_SECRET = \"\";\n\tvar TWITTER_HANDLE = \"\";\n\t\n\tScriptProperties.setProperty(\"TWITTER_CONSUMER_KEY\", TWITTER_CONSUMER_KEY);\n\tScriptProperties.setProperty(\"TWITTER_CONS...
[ "0.5782139", "0.5611536", "0.5481185", "0.5467476", "0.5436361", "0.5391795", "0.53550833", "0.53492457", "0.53380334", "0.5324731", "0.5297588", "0.52918", "0.5278353", "0.52476853", "0.52272105", "0.52207136", "0.5215267", "0.5198758", "0.5195624", "0.51684004", "0.516462",...
0.7590291
0
Constructs a new OrganizationCountInfo.
constructor() { OrganizationCountInfo.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "organismCount( org ){\n return this.organismCounts().get( org );\n }", "constructor(organization) {\n this.organization = organization;\n }", "static initialize(\n obj,\n projectCount,\n userCount,\n jobCount,\n serviceCount,\n fileCount\n ) {\n obj['project_count'] = projec...
[ "0.57780844", "0.54863566", "0.5453764", "0.5059909", "0.49092", "0.49032032", "0.48495534", "0.48260036", "0.48074242", "0.48074242", "0.47492132", "0.4710909", "0.4703869", "0.46995372", "0.46892732", "0.4677526", "0.46381003", "0.45795095", "0.45508182", "0.45388046", "0.4...
0.7714108
0
Initializes the fields of this object. This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mixins). Only for internal use.
static initialize(obj) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "init() {\n this._super(...arguments);\n this._applyDefaults();\n }", "_init() {\n\t\tthis.life.init();\n\t\tthis.render.init();\n\n\t\tthis.emission.init();\n\t\tthis.trail.init(this.node);\n\n\t\tthis.color.init();\n\t}", "function Co...
[ "0.7132527", "0.69649905", "0.68144095", "0.67468536", "0.67168033", "0.6644054", "0.6634022", "0.66023695", "0.6581312", "0.6565271", "0.6411091", "0.64048046", "0.6335285", "0.63051367", "0.6296763", "0.62831414", "0.62693095", "0.62406176", "0.6240038", "0.62344605", "0.62...
0.0
-1
Affichage de la conversation simple
function getMessages(conversation){ $.getJSON("api/messages/get/"+conversation, function( data){ var messages = []; $.each( data, function(key, val){ // formatage de la date dateMessage = $.date(val['created_at']); if(val['sender_id'] == 0){ messages.push( "<li class='received' data-id='"+v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Conversation() {}", "async insult(message, connection, args) {\n if (args.length === 2) {\n const person = `${args[1].charAt(0).toUpperCase() + args[1].substring(1)} `;\n const insult = await this.solver.getSentence('<pi>').toLowerCase();\n message.channel.send(person + insult);\n ...
[ "0.6875928", "0.619766", "0.6039465", "0.5971249", "0.5964049", "0.59381133", "0.59309494", "0.58889717", "0.5828719", "0.5825149", "0.5822693", "0.58196515", "0.5817079", "0.58019805", "0.5794294", "0.57940346", "0.5772475", "0.5766692", "0.5715043", "0.57112247", "0.5696846...
0.0
-1
draw sliders from range values
settings() { return { labelOn: 'Yes', labelOff: 'No' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSliders() {\n\n noUiSlider.create(nodeSlider, {\n start: [ 8 ],\n connect: 'lower',\n tooltips: [ true ],\n range: {\n 'min': [ 0 ],\n 'max': [ 16 ]\n }\n });\n\n noUiSlider.create(edgeSlider, {\n start: [ 1 ],\n connect: 'lower',\n tooltips: [ true ],\n range:...
[ "0.7334756", "0.7298768", "0.7011105", "0.68913466", "0.68782455", "0.68715596", "0.6674854", "0.66183525", "0.6610472", "0.6574581", "0.6561094", "0.65519375", "0.6542788", "0.6521272", "0.6511684", "0.64816904", "0.64777243", "0.6429137", "0.6418397", "0.64061844", "0.63564...
0.0
-1
Update the UI texts and other attributes based on the game state object. info: Game state object
update(info) { _.each(this.nodes, (node) => { node.shape.setText(node.getText(info)); if (node.isCritical) { if (node.isCritical(info)) { node.shape.fillStyle = UI.WARN_COLOR; } else { node.shape.fillStyle = UI.TEXT_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\r\n\r\n // update game\r\n game.update();\r\n\r\n // toggle tower clickable depending on the user's money\r\n updateTowerStore();\r\n\r\n let { type, lives, money, level, difficulty } = game.getLevelStats();\r\n\r\n // update lives and money based on game stats \r\n livesLabel.innerHTML ...
[ "0.6713799", "0.6706623", "0.65535957", "0.65347254", "0.6529499", "0.6523819", "0.6463179", "0.64366287", "0.6375826", "0.63713634", "0.6343474", "0.6337445", "0.6326209", "0.6275988", "0.62751865", "0.62346137", "0.62247354", "0.6197187", "0.6189789", "0.61882764", "0.61755...
0.6103173
31