query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
this function return an integer that is the zerobased index of the correct answer for the currrent question
function correctAnswer () { return quiz.questions[quiz.currentQuestion].correctAnswerIndex }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function correctAnswer () {\n return quiz.questions[quiz.currentQuestion].answerIndex\n}", "function getAnswerIndex (answer) {\n\tfor (let i = 0; i < choices.length; i++) {\n\t\tif (choices[i] === answer) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}", "function answerDistance(index) {\n\tconst distance = M...
[ "0.7468374", "0.7223635", "0.6657032", "0.66420794", "0.6598682", "0.6495996", "0.6409989", "0.63503814", "0.63442737", "0.631814", "0.6283528", "0.6234353", "0.6230063", "0.6154355", "0.6115409", "0.60866505", "0.6080095", "0.6045198", "0.6011361", "0.6007175", "0.5992899", ...
0.72876596
1
this function return an integer that is the number of choices for the current question
function numberOfAnswers () { return quiz.questions[quiz.currentQuestion].choices.length }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numberOfAnswers () {\n return quiz.questions[quiz.currentQuestion].options.length\n}", "get numUniqueChoices() {\n return new Set(this.possibleChoices).size\n }", "function numberOfQuestions () {\n return quiz.questions.length\n}", "function numberOfQuestions () {\n return quiz.question...
[ "0.81012535", "0.7488375", "0.72702074", "0.72702074", "0.72702074", "0.70772535", "0.6882153", "0.68018126", "0.67443913", "0.6666608", "0.66442037", "0.65865004", "0.65628964", "0.6486218", "0.63774335", "0.6373974", "0.63499945", "0.63198185", "0.63143504", "0.6303964", "0...
0.8359309
0
used to update canvas of the linesArray to be used
updateCanvas() { //this is is to reset the canvas to a blank canvas before drawing every instance of lines const canvas = this.refs.canvas; const clear = canvas.getContext("2d"); clear.clearRect(0, 0, canvas.width, canvas.height); const linesArray = this.props.lines.linesArray; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCanvasSize() {\n this.drawLines();\n }", "function redraw() {\n for (var i = 1; i < linesArray.length; i++) {\n ctx.beginPath();\n ctx.moveTo(linesArray[i - 1].x, linesArray[i - 1].y);\n ctx.lineWidth = linesArray[i].size;\n ctx.lineCap = \"round\";\n ctx.strokeStyle = linesArray[i].col...
[ "0.767899", "0.76364243", "0.72382325", "0.70604837", "0.69165885", "0.6910142", "0.6908732", "0.6908732", "0.6877917", "0.6849159", "0.6789274", "0.67729604", "0.67572325", "0.6646419", "0.66347", "0.66223377", "0.6580738", "0.6576046", "0.6557417", "0.65517306", "0.65276796...
0.8080029
0
Read the specified number of register from the address
read(address, nbRegisters) { throw new Error('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fBCxxRead(nAddr){\n switch (a = nAddr){\n\n case 0xbde8:\n return nBDE8;\n\n case 0xbde9:\n return nBDE9;\n\n case 0xbdea:\n return nBDEA;\n\n case 0xbffe:\n return bRAMROM_enable ? aBFFE : a>>8;\n\n case 0xbfff:\n return bRAMROM_enable ? aBFFF : a>>8;\n\n }\n}", ...
[ "0.64892304", "0.63221574", "0.5914057", "0.5841812", "0.574908", "0.5690174", "0.56749856", "0.5642595", "0.5619572", "0.5574055", "0.5470865", "0.54350436", "0.543455", "0.5426861", "0.5375083", "0.53747624", "0.5347217", "0.52495396", "0.52464557", "0.52305365", "0.5223142...
0.6971368
0
anotherObject is actually a reference to anObject, so both numbers will be 30
function change(a, b){ a = 123123123; b.number = 10000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function different_obj(obj) {\n var ret = 0;\n var obj1 = obj;\n for (var x in obj) {\n ret += obj1[x];\n }\n return ret;\n}", "function referenceTest(myObject) {\n let newObject = {\n id: myObject.id,\n title: myObject.title,\n stats: myObject.stats,\n };\n\n newObject.title = 'new title';\n...
[ "0.6309745", "0.58636224", "0.5732978", "0.5621889", "0.5588166", "0.5578664", "0.5467284", "0.54238296", "0.5409443", "0.5401179", "0.5396457", "0.53846693", "0.53782773", "0.53156275", "0.5309109", "0.5264826", "0.5246713", "0.52436906", "0.5239071", "0.5238888", "0.5237648...
0.59224063
1
helper method to calculate the time to midnight
function timeToMidnight() { var midnight = new Date(); midnight.setHours( 24 ); midnight.setMinutes( 0 ); midnight.setSeconds( 0 ); midnight.setMilliseconds( 0 ); return ( midnight.getTime() - new Date().getTime() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMidnight(t) {\n\tt.setHours(0);\n\tt.setMinutes(0);\n\tt.setSeconds(0);\n\tt.setMilliseconds(0);\n\treturn t;\n}", "function setToMidnight(d){\n\td.setSeconds(0);\n\td.setMinutes(0);\n\td.setHours(0);\n\treturn d;\n}", "function findMsFromMidnight(time) {\n\t// Variable for the total amount of time...
[ "0.75706774", "0.72579193", "0.69012463", "0.6765816", "0.66931635", "0.648758", "0.6372731", "0.62703997", "0.6164684", "0.59404767", "0.5930012", "0.5869615", "0.5866718", "0.5852501", "0.5844371", "0.58185554", "0.58169717", "0.57565165", "0.56946534", "0.56935406", "0.568...
0.80647874
0
Clears all the geometry within the scene.
clearGeometry() { this.geometries = []; this.texGeometries = []; this.render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearScene (){\r\n for( var i = scene.children.length - 1; i >= 0; i--) {\r\n scene.remove(scene.children[i]);\r\n }\r\n }", "function clearScene() {\n for (var i = scene.children.length - 1; i >= 0; --i) {\n var obj = scene.children[i];\n scene.remove(obj);\n }\n}", "f...
[ "0.7635839", "0.761751", "0.74895155", "0.7400611", "0.7394154", "0.7367635", "0.73120224", "0.729139", "0.7276263", "0.7056504", "0.70442295", "0.6996976", "0.6974719", "0.6857866", "0.6806404", "0.6792279", "0.67501473", "0.6673468", "0.66504204", "0.6615059", "0.6573537", ...
0.7887209
0
Updates the animation for each geometry in geometries.
updateAnimation() { for (let geom of this.geometries) { geom.updateAnimation(); } for (let geom of this.texGeometries) { geom.updateAnimation(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animateObjects() {\n // Ask each AnimatedObject to update its loop and cell number if required.\n for (let aniObj of this.state.animatedObjects) {\n aniObj.updateLoopAndCel();\n }\n\n this.state.Vars[Defines.EGOEDGE] = 0;\n this.state.Vars[Defines.OBJHIT] = 0;\n ...
[ "0.61642385", "0.6160958", "0.61305547", "0.60579085", "0.6012885", "0.59502095", "0.5893176", "0.58425087", "0.58326215", "0.5801511", "0.57470906", "0.57427263", "0.57330984", "0.57284606", "0.57185733", "0.57113165", "0.57071555", "0.5686482", "0.5676684", "0.56682944", "0...
0.8475688
0
Renders all the Geometry within the scene.
render() { gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); useShader(gl, normShaders); for (let geom of this.geometries) { geom.render(); } for (let geom of this.texGeometries) { geom.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n // Clear the geometry onscreen\n this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);\n\n for (var i = 0; i < this.scene.geometries.length; i++) {\n var geometry = this.scene.geometries[i];\n\n // Switch to shader attached to geometry\n ...
[ "0.70938486", "0.7043945", "0.7000685", "0.6803898", "0.67484945", "0.6720351", "0.6677782", "0.66773957", "0.65908635", "0.6566651", "0.6564705", "0.65479696", "0.6545721", "0.65254223", "0.6522384", "0.65161383", "0.6509452", "0.64995354", "0.64942807", "0.64865786", "0.647...
0.7343891
0
NOTES// Create player constructor Create object for player one and player two Container with incrementing or zero score for each roll/ branching Player Object Constructor
function Player(playerNumber) { this.name = name; this.originalScore = 0; this.updatedScore = 0; this.hasRolled = true; this.firstTime =true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Player(name, age, position, skillLevel) {\n this.name = name;\n this.age = age;\n this.position = position;\n this.skillLevel = skillLevel;\n}", "function Player(playerName) {\n this.playerName = playerName;\n this.roundScore = 0;\n this.totalScore = 100;\n}", "function Player() {\n this.name ...
[ "0.66283214", "0.6612063", "0.65595514", "0.65451664", "0.64877963", "0.64480203", "0.6432118", "0.64315116", "0.63730365", "0.6348373", "0.6334964", "0.6291786", "0.6260108", "0.6247076", "0.6231403", "0.62246025", "0.6223488", "0.62059414", "0.6201367", "0.61855346", "0.617...
0.67500967
0
Creates stage with enough space for walking motion. (tied implicitly with motionPlayer)
_createStage() { const stageMat = new THREE.MeshLambertMaterial({color: "#f0f0f0f0" }); const accentMat = new THREE.MeshBasicMaterial({ color: "grey" }); const stageBaseGeom = Stage._createRoundedQuad(2, 3, 0.3); const stageBaseObj = new THREE.Mesh(stageBaseGeom, stageMat); con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Stage(width, relativeMovementRatio,initialObjects,update){\n\tvar self = this;\n\n\tself.objects = initialObjects || [];\n\n\tself.update = update.bind(self);\n\n\tself.position = {\n\t\tx: 0,\n\t\ty: 0\n\t}\n\n\tself.relativeMovementRatio = relativeMovementRatio;\n}", "function setupStage() {\n stag...
[ "0.6528525", "0.6092859", "0.6074393", "0.5863193", "0.5837862", "0.57932055", "0.57365453", "0.571506", "0.57040113", "0.56467533", "0.56376624", "0.5618102", "0.5587036", "0.5557677", "0.5545526", "0.55434346", "0.55411273", "0.55159515", "0.54941905", "0.5467658", "0.54599...
0.620342
1
Handler for general pasting of entity objects into the designer
function productServerEntityPasteHandler(data) { window.Optum.StepWise.Messaging.ShowAlert("This function is not currently implemented.", "Not Implemented Yet"); return; //var pasteDialog = $("#DesignerUrls"); //if (pasteDialog.length == 0) { // pasteDialog = $("<div id='Prod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function overrides() {\n var onEditButtonClickBase = ve.ui.LinearContextItem.prototype.onEditButtonClick;\n ve.ui.LinearContextItem.prototype.onEditButtonClick = function () {\n if (isCorrectTemplateType(this.model.type) && protectedTemplates[getTemplate(this.model)] != null) {\n ...
[ "0.564938", "0.5417157", "0.5342896", "0.5329033", "0.5326115", "0.53143936", "0.5307726", "0.52764523", "0.5250255", "0.5244017", "0.520165", "0.51788706", "0.5092547", "0.508976", "0.50464565", "0.50399435", "0.5034644", "0.501049", "0.49780357", "0.49748522", "0.49640825",...
0.5780278
0
Update IP Whitelist Recheck all connected shelters and disconnect those that aren't assigned to schools
function _updateIpWhitelist(message) { ipWhitelist.update(message.data); access.check(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notifyWhitelistChanged () {\n chrome.runtime.sendMessage({'whitelistChanged': true})\n }", "setWhitelistStatusFromGlobal () {\n let globalwhitelists = ['whitelisted']\n globalwhitelists.map((name) => {\n let list = settings.getSetting(name) || {}\n this.setWhiteliste...
[ "0.55513436", "0.5518852", "0.54348916", "0.5426641", "0.5403422", "0.5369209", "0.53649527", "0.53348726", "0.53162366", "0.529929", "0.5284932", "0.52539283", "0.5210893", "0.52090794", "0.5190948", "0.51835746", "0.5165973", "0.51514167", "0.5138952", "0.50919545", "0.5047...
0.5833104
0
Update instorage client profile
function _updateClientProfile(message) { profile.set(message.data.profile.device_id, message.data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateProfile() {}", "onUpdateProfile() {\n logger.info('Updating profile');\n this.polyInterface.updateProfile();\n }", "function updateProfile(info) {\n setProfile(info);\n }", "static updateProfile(updateJSON) {\n // console.log(\"updateProfile(updateJSON) -> updateJSON\", updateJS...
[ "0.73060006", "0.6902644", "0.6631408", "0.6377968", "0.63162166", "0.6262365", "0.62585825", "0.62577546", "0.62330073", "0.6207604", "0.62033063", "0.62016034", "0.6181902", "0.60188824", "0.60188204", "0.6001909", "0.59682834", "0.59644234", "0.5936864", "0.5931964", "0.58...
0.69534075
1
return => [ 1, 2 ] / 1.6 Remove the first element from the array that is being passed in.
function removeFirst(array) { // code array.shift(); return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeFirst(array) {\n if (!array.length) return array;\n return array.slice(1);\n}", "function number4(array){\n var newElements= array.pop()\n var newArr= array.splice(0,0,newElements)\n return array\n}", "function removeFirst(array) {\r\n array.shift();\r\n return array;\r\n }", "func...
[ "0.6772583", "0.66743195", "0.66492426", "0.6579642", "0.6553255", "0.6536237", "0.6531502", "0.6501363", "0.6489767", "0.6478634", "0.6463461", "0.6457421", "0.6441131", "0.6441131", "0.6418597", "0.6416776", "0.641626", "0.6374292", "0.6374292", "0.6368986", "0.6342076", ...
0.6736575
1
return => false / 2.5 Modify the given for loop to add ten to each element in the passed in array and then push t he sum into the newArr array. You can assume that all items in the array will be numbers.
function addTen(arr) { var newArr = []; for (var i = 0; i < arr.length; i++) { // code newArr.push(arr[i] + 10); } return newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTen(arr) {\n var newArr = [];\n\n for (var i = 0; i < arr.length; i++) {\n // code\n newArr.push(Number(arr[i]) + 10);\n }\n return newArr;\n}", "function timesTen(arr) {\n for (i = 0; i < arr.length; i++) {\n var newArr = arr[i] * 10;\n return newArr;\n }\n}", "function sumArray(...
[ "0.79442245", "0.7202389", "0.6888902", "0.67061317", "0.67046374", "0.66924965", "0.6656383", "0.6650469", "0.66314954", "0.66266453", "0.6605411", "0.6591457", "0.65609646", "0.6542364", "0.6530734", "0.6518298", "0.650533", "0.6498028", "0.6494988", "0.6488659", "0.6486094...
0.7996101
0
return => [ 11, 12, 13 ] / 2.6 Modify the given for loop to add ten to each element in the passed in array and then push the sum into the newArr array. This array will contain a combination of strings and numbers. You will have to figure out a way to end up with an array of numbers only.
function addTen(arr) { var newArr = []; for (var i = 0; i < arr.length; i++) { // code newArr.push(Number(arr[i]) + 10); } return newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTen(arr) {\n var newArr = [];\n\n for (var i = 0; i < arr.length; i++) {\n // code\n newArr.push(arr[i] + 10);\n }\n return newArr;\n}", "function timesTen(arr) {\n for (i = 0; i < arr.length; i++) {\n var newArr = arr[i] * 10;\n return newArr;\n }\n}", "function dividingAdding (a...
[ "0.76687396", "0.7133479", "0.7008145", "0.69614094", "0.68760467", "0.68596274", "0.6818254", "0.68011886", "0.67918146", "0.6755813", "0.6710789", "0.66942483", "0.667445", "0.66680044", "0.66263634", "0.6608202", "0.66046244", "0.660079", "0.6592478", "0.6592039", "0.65818...
0.7774505
0
3.2 Given an array of user objects, update the user's email property if the condition is met.
function updateUserEmail(array, property, value, newEmail) { for (var i = 0; i < array.length; i++) { if (array[i][property] === value) { // code array[i].email = newEmail; } } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeEmail(array, property, value, newEmail) {\n for (var i = 0; i < usersArr.length; i++) {\n if (array[i][property] === value) {\n array[i].email = newEmail;\n }\n }\n}", "function updateUserInfo(arr, prop, val, newEmail, newName) {\n for (var i = 0; i < arr.length; i+...
[ "0.750138", "0.6624378", "0.648111", "0.6368291", "0.6228891", "0.619858", "0.6009664", "0.59686494", "0.595356", "0.5943484", "0.5928066", "0.59099096", "0.59040487", "0.5893457", "0.589045", "0.58479816", "0.5843701", "0.58220494", "0.5778656", "0.5767641", "0.5766378", "...
0.7804228
0
3.3 Given an array of user objects, loop through the users and check to see they have a given property that equals a given value. If that user object does, then update its password to the value of newPassword.
function changePassword(array, property, value, newPassword) { for (var i = 0; i < array.length; i++) { // code if (array[i][property] == value) { array[i].password = newPassword; } } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updatePassword(user, oldPassword, newPassword) {\n const index = this.users.indexOf(user);\n\n if (index!==-1) {\n if (this.checkPassword(user, oldPassword)) {\n this.passwords[index] = newPassword;\n return true;\n }\n }\n return false;\n }", "updateWithNewPassword() {\n ...
[ "0.7818377", "0.7072848", "0.6954576", "0.6943885", "0.66983294", "0.66663283", "0.6636728", "0.64902997", "0.64887595", "0.6462444", "0.6421833", "0.6329033", "0.62651736", "0.62614137", "0.62556905", "0.62462515", "0.6241007", "0.62004626", "0.6146155", "0.6139835", "0.6134...
0.7910683
0
3.4 Create a function called updateUserInfo that has five parameters (array, propertyKey, propertyValue, newEmail, newName ). You can assume that array will always be an array of objects. Loop through array and if any objects have a property name of propertyKey that has the value of propertyValue, update that object's ...
function updateUserInfo(arr, prop, val, newEmail, newName) { for (var i = 0; i < arr.length; i++) { if (arr[i][prop] === val) { arr[i].email = newEmail; arr[i].name = newName; } } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUserEmail(array, property, value, newEmail) {\n for (var i = 0; i < array.length; i++) {\n if (array[i][property] === value) {\n // code \n array[i].email = newEmail;\n }\n }\n return array;\n}", "function changeEmail(array, property, value, newEmail) {\n for (var i = 0; i < ...
[ "0.8015588", "0.7532171", "0.6703748", "0.6664385", "0.64371526", "0.6321985", "0.5949333", "0.5934561", "0.58704", "0.5844363", "0.58392835", "0.5817474", "0.57981044", "0.5790809", "0.5788295", "0.5785258", "0.57245374", "0.5716891", "0.57041276", "0.566249", "0.5644953", ...
0.84508383
0
Opens window to allow facebook user sign in
function handleFacebookSignIn(e) { window.open(`${process.env.REACT_APP_SERVER_URL}/auth/facebook`, "_self"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login_social ( $jr_url ) {\n if (test_input() == 'ok') {\n window.open( $jr_url, 'connect', 'toolbar=0,status=0,width=400,height=600' );\n }\n }", "function myFacebook(){\n window.open(\"https://www.facebook.com\");\n}", "function openSignin(URL){\r\nSigninWin=window.ope...
[ "0.7258255", "0.7246339", "0.7118325", "0.6999029", "0.68717736", "0.6807762", "0.67041415", "0.67024374", "0.66824144", "0.665831", "0.6656553", "0.66438967", "0.664223", "0.66397387", "0.6629367", "0.66242915", "0.66187805", "0.6571577", "0.65316176", "0.65134686", "0.64663...
0.73993224
0
Transitions the caption depending on alignment
function captionTransition(caption, duration) { if (caption.hasClass("center-align")) { caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false }); } else if (caption.hasClass("right-align")) { caption.velocity({ opacity: 0, translateX: 100 }, { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function captionTransition(caption, duration) {\r\n if (caption.hasClass(\"center-align\")) {\r\n caption.velocity({ opacity: 0, translateY: -100 }, { duration: duration, queue: false });\r\n } else if (caption.hasClass(\"right-align\")) {\r\n caption.velocity({ opacity: 0, ...
[ "0.7760687", "0.7676117", "0.763433", "0.763433", "0.763433", "0.763433", "0.76080215", "0.6556889", "0.6433107", "0.6433107", "0.63329726", "0.62980324", "0.6111904", "0.6109093", "0.603062", "0.603062", "0.5966819", "0.5966819", "0.5940332", "0.5934094", "0.59292376", "0....
0.77536523
1
Focus an element elements array of dropdown elements
function focus(elements, focussedIndex) { // Use of % for infinite iterations var index = Math.abs(focussedIndex) % elements.length; if (index >= 0) { elements[index].focus(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focus() {\n document.getElementById('neighborhoods-select').focus();\n}", "focusFirstElement() {\n this.trapFocus();\n }", "function refocus(element) {\n var dropdownTrigger = element.querySelector('[x-spread=\"trigger\"]');\n if (dropdownTrigger) {\n dropdownTrigger.focus();\n }\n}",...
[ "0.6763453", "0.6642997", "0.6555804", "0.64029384", "0.63980705", "0.6290243", "0.628305", "0.627753", "0.62646574", "0.6240256", "0.6235358", "0.62216985", "0.6198139", "0.6198139", "0.6181393", "0.6162896", "0.6105982", "0.609061", "0.6087827", "0.6081699", "0.6081699", ...
0.6913593
0
Normalize itertion counter Arrow Up Check if the focussedIndex reached a negative number If so, assign it to (elements.length 1) Else, decrement the counter
function normalizeNegativeCounter(elements, focussedIndex) { if (focussedIndex <= 0) { return elements.length - 1; } else { return focussedIndex - 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "up() {\r\n this.upAndDown = false;\r\n this.firstRowHighlight = false;\r\n if (this.selectedIndex === null) {\r\n this.selectedIndex = this.results.length - 1;\r\n return;\r\n }\r\n if (this.includeInputInList === false) {\r\n this.selectedIndex =\r\n this.sel...
[ "0.6384", "0.6167883", "0.6131742", "0.60692644", "0.60692644", "0.606326", "0.59534115", "0.5949474", "0.5927406", "0.58831507", "0.5861759", "0.5853119", "0.5843717", "0.5820977", "0.5820977", "0.5820977", "0.57978356", "0.57839614", "0.57501453", "0.5741893", "0.5690683", ...
0.7362125
0
Refocus dropdown trigger element This usually happens when the user closes the dropdown
function refocus(element) { var dropdownTrigger = element.querySelector('[x-spread="trigger"]'); if (dropdownTrigger) { dropdownTrigger.focus(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "focus() {\n this.toggleMenuList();\n this.input.focus();\n }", "focus() {\n this.select.focus();\n }", "_focusHandler(event) {\n const that = this;\n\n if (event.type === 'blur') {\n if (that._isDropDownClicked) {\n return;\n }\n\n that.r...
[ "0.6528815", "0.6522641", "0.6508184", "0.64978445", "0.64978445", "0.6397016", "0.638154", "0.6351682", "0.63505065", "0.63392025", "0.6326187", "0.6321225", "0.63031715", "0.63031715", "0.62794495", "0.62794495", "0.62794495", "0.62794495", "0.62794495", "0.6269819", "0.626...
0.85273445
0
Toggle aria atrributes based on the dropdown state
function toggleAriaAtrributes(dropdown, open) { var trigger = dropdown.querySelectorAll('[x-spread="trigger"]'); if (trigger.length) { trigger = trigger[0]; if (open) { trigger.setAttribute("aria-expanded", true); var dropdownList = dropdown.querySelectorAll('[x-spread="dropdown"]'); if (d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropdown() {\n glumacNameContainer.classList.toggle(\"show\");\n\n if (arrow.classList.contains('fa-arrow-down')) {\n arrow.classList.remove('fa-arrow-down');\n arrow.classList.add('fa-arrow-up');\n } else {\n arrow.classList.add('fa-arrow-down');\n }\n}", "function handleAriaExpanded(evt) ...
[ "0.6441378", "0.6344109", "0.63240695", "0.6232912", "0.6232912", "0.6157176", "0.6135148", "0.61046386", "0.6099504", "0.60408044", "0.6016018", "0.6016011", "0.6016011", "0.5948682", "0.5896538", "0.5896538", "0.5872202", "0.5841703", "0.5835541", "0.58325267", "0.5830824",...
0.75209516
0
Only get no nested elements
function getNoNestedElements(context, selector, elements) { const nestedComponents = context.querySelectorAll(selector); const noNestedElements = []; let isNested = false; if (nestedComponents.length === 0) return elements; elements.forEach((element) => { nestedComponents.forEach((nestedComp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterNoDom(n, e) {\n return isNotHidden(e) && nonWeakFilter(n, e) && shouldTraverse(e, false);\n }", "function collectUnrelated(nodes) {\r\n var unrelated = [];\r\n $.each(nodes, function (i, n) {\r\n if (!n.searchResult && !n.state.expanded) { // no hit, no p...
[ "0.60364276", "0.6034736", "0.60068625", "0.5967363", "0.594282", "0.5836582", "0.57820666", "0.570895", "0.56645536", "0.55814093", "0.5551359", "0.5551359", "0.5551359", "0.55268174", "0.5508561", "0.5508561", "0.54928315", "0.54847205", "0.5433161", "0.54229444", "0.542016...
0.73681474
1
send email notification when order is shipped
static async _sendOrderShippedNotification(order) { try { const customer = await Customer .findOne({ _id: order.customer_id, deleted: false, }) .populate('user'); if (customer) { await EmailController.processEmail( `Your Souk Order [#${order...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async shipnotify(req, res) {\n try {\n // fetch order\n const order = await Order.findOne({\n order_number: req.body.shipnotice.ordernumber,\n });\n if (!order) {\n throw new Error('Order not found');\n }\n\n // update order\n order.status = 'shipped';\n ...
[ "0.7342201", "0.6480745", "0.63610166", "0.6187505", "0.615661", "0.6116156", "0.60524434", "0.6048421", "0.604507", "0.601873", "0.59985936", "0.59694624", "0.5957534", "0.5956654", "0.59468657", "0.5939684", "0.59196687", "0.58873063", "0.5875377", "0.5875058", "0.5863866",...
0.8349565
0
Allow ShipStation to Post Shipment Information When Orders Ship req.body format req.body.shipnotice.ordernumber eg. ABC123 req.body.shipnotice.labelcreatedate eg. 10/08/2018 12:56 req.body.shipnotice.shipdate eg. 10/8/2018 req.body.shipnotice.carrier eg. USPS req.body.shipnotice.service eg. Priority Mail req.body.shipn...
static async shipnotify(req, res) { try { // fetch order const order = await Order.findOne({ order_number: req.body.shipnotice.ordernumber, }); if (!order) { throw new Error('Order not found'); } // update order order.status = 'shipped'; order.trackin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shipmentCreateString(data) {\n var sendingData =\n {\n \"ShipFromAddress\": {\n \"CompanyName\": \"FEEP\",\n \"FirstName\": null,\n \"LastName\": null,\n \"Title\": null,\n \"Address1\": \"10 UIT Way\",\n \"Address2\": null,\n ...
[ "0.6478598", "0.6057515", "0.59421265", "0.5903279", "0.5702884", "0.5593625", "0.55716074", "0.5524495", "0.5507522", "0.5501064", "0.54943836", "0.5474383", "0.54517674", "0.5442387", "0.5407432", "0.53979117", "0.53676176", "0.53589815", "0.53462094", "0.5344436", "0.53334...
0.66100603
0
Allow ShipStation to Pull Order Information query param: ?action=export&start_date=[Start Date]&end_date=[End Date]&page=1
static async export(req, res) { try { if (!ShipstationHookController._isParamValid(req.query)) { throw new Error('Missing required params'); } // get query params const startDate = moment.utc(req.query.start_date, 'MM/DD/YYYY HH:mm').toDate(); const endDate = moment.utc(req.qu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exportOrderSummaryAction(params) {\n const action = {\n type: ApiConstants.API_GET_EXPORT_ORDER_SUMMARY_LOAD,\n params,\n };\n return action;\n}", "function exportBrands () {\n var Search = $(\"#Search\").val();\n var order = $(\"#order\").val();\n var limit = $(\"#limit\").val();\n ...
[ "0.6178265", "0.5949363", "0.593292", "0.57897097", "0.55607015", "0.5472598", "0.5428685", "0.5415649", "0.5378288", "0.535507", "0.5313205", "0.53057265", "0.5300633", "0.52798915", "0.5279883", "0.5258918", "0.521512", "0.520676", "0.520589", "0.51890653", "0.5185935", "...
0.7224078
0
Multipanel graphics: set panel count
setPanelCount(c) { this.panelWidth = this.width / c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddPanel(factorSelections){\r\n this.stage = [];\r\n this.current = -1;\r\n this.factorSelections = factorSelections || [];\r\n this.isGroup = true;\r\n}", "function initiatePanels() {\r\n 'use strict';\r\n \r\n\t//show default panel state on page load\r\n\tfor(var i = 1; i <= group_cnt; i++) ...
[ "0.6447744", "0.64021385", "0.6346696", "0.63427687", "0.62861615", "0.6150889", "0.6125748", "0.6097088", "0.6055933", "0.59794617", "0.5949324", "0.5865459", "0.58492136", "0.5828756", "0.582265", "0.5805864", "0.5792132", "0.57866323", "0.57662493", "0.5752583", "0.5722180...
0.7440863
0
transforms: universal free transform based on applying | a b c | m = | d e f | | 0 0 1 |
transform(a, b, c, d, e, f) { this.ctx.transform(a, b, c, d, e, f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toTransformation(a, b, c, d) {\r\n \treturn new Transformation(a, b, c, d);\r\n }", "function toTransformation(a, b, c, d) {\r\n\t \treturn new Transformation(a, b, c, d);\r\n\t }", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform()...
[ "0.68027693", "0.6795461", "0.67765296", "0.67765296", "0.67765296", "0.67765296", "0.67765296", "0.67461884", "0.67461884", "0.67174727", "0.67174727", "0.6652168", "0.66299796", "0.65889394", "0.65889394", "0.65889394", "0.65889394", "0.65889394", "0.65771973", "0.65771973", ...
0.6890925
0
transforms: screen to world
screenToWorld(x, y) { if (y === undefined) { y = x.y; x = x.x; } let M = this.ctx.getTransform().invertSelf(); let ret = { x: x * M.a + y * M.c + M.e, y: x * M.b + y * M.d + M.f, }; return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "worldToScreen(x, y) {\n if (y === undefined) {\n y = x.y;\n x = x.x;\n }\n\n let M = this.ctx.getTransform();\n\n let ret = {\n x: x * M.a + y * M.c + M.e,\n y: x * M.b + y * M.d + M.f,\n };\n\n return ret;\n }", "function world2Screen(wrapper, aX = 0, aY = 0, aZ = 0) {\n ...
[ "0.7690906", "0.7402292", "0.74011225", "0.71731126", "0.70451486", "0.69766945", "0.6949147", "0.68647707", "0.6835832", "0.67343044", "0.66887534", "0.6646582", "0.6630865", "0.65644115", "0.65561354", "0.6541012", "0.6537742", "0.6533204", "0.6507648", "0.6483391", "0.6467...
0.7691829
0
transforms: world to screen
worldToScreen(x, y) { if (y === undefined) { y = x.y; x = x.x; } let M = this.ctx.getTransform(); let ret = { x: x * M.a + y * M.c + M.e, y: x * M.b + y * M.d + M.f, }; return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "screenToWorld(x, y) {\n if (y === undefined) {\n y = x.y;\n x = x.x;\n }\n\n let M = this.ctx.getTransform().invertSelf();\n\n let ret = {\n x: x * M.a + y * M.c + M.e,\n y: x * M.b + y * M.d + M.f,\n };\n\n return ret;\n }", "worldToScreen(out, worldPos) {\n const...
[ "0.75244164", "0.74704164", "0.73477185", "0.7112482", "0.6990188", "0.691334", "0.6798651", "0.67852104", "0.6746553", "0.67103434", "0.6691865", "0.6689157", "0.6656803", "0.6650809", "0.65813434", "0.6547772", "0.65393716", "0.6518189", "0.65161884", "0.65005577", "0.65000...
0.7647047
0
Set a (CSS) margin around the canvas
setMargin(width = 0) { this.canvas.style.marginTop = `${width}px`; this.canvas.style.marginBottom = `${width}px`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMargins(){\n var viewPortWidth = window.innerWidth;\n\n if (viewPortWidth > cutoffWidth){\n margin = {\n left: 60,\n right: 60,\n top: 60,\n bottom: 60\n };\n }else{\n margin = {\n left: 35,\n right: 20,\n ...
[ "0.6683823", "0.65863854", "0.64525783", "0.64344853", "0.6137699", "0.612995", "0.6025129", "0.6015579", "0.5969955", "0.59096235", "0.5898423", "0.5830761", "0.5826257", "0.58226943", "0.5749118", "0.5736642", "0.5723769", "0.57148594", "0.5675834", "0.5614142", "0.56045145...
0.8013383
0
Hide the cursor in a way that we can restore later.
hideCursor() { this.canvas.style.cursor = `none`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide_cursor() {\n // canvas objects that show stim/probes\n var canvas = document.getElementById('task_box');\n canvas.style.cursor = 'none';\n }", "function noCursor() {\n _displaycontrol &= ~LCD_CURSORON;\n command(LCD_DISPLAYCONTROL | _displaycontrol);\n}", "function cursorInvisible() {...
[ "0.7504653", "0.7265599", "0.70785695", "0.7014507", "0.6799541", "0.6756336", "0.6712406", "0.6544919", "0.65216374", "0.6499748", "0.64694315", "0.6440938", "0.63952", "0.63674885", "0.63537925", "0.6345726", "0.6307008", "0.62625635", "0.62624884", "0.622433", "0.6203022",...
0.7390133
1
Set a text stroke/color
setTextStroke(color, weight) { this.textStroke = color; this.strokeWeight = weight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTxtStroke(txtId, stroke) {\n var text = getTextById(txtId);\n text.stroke = stroke;\n}", "function setTextStroke(elem, text) {\n\treturn elem.text(text).addClass(\"stroke\").attr(\"data-stroke\", text);\n}", "function onChangeStrokeColor(txt, color) {\n changeStrokeColor(txt, color)\n d...
[ "0.787201", "0.7861262", "0.7541106", "0.7086729", "0.70063233", "0.6977978", "0.6942752", "0.6924684", "0.69194514", "0.6902723", "0.6871976", "0.6832905", "0.68114936", "0.68096584", "0.6789788", "0.67592674", "0.6746985", "0.6735271", "0.6672946", "0.6669783", "0.6612675",...
0.82699734
0
Do not use text stroking.
noTextStroke() { this.textStroke = false; this.strokeWeight = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "doNotDisplayLineText() {\r\n this._ignoredLine = true;\r\n }", "function spanAffectsWrapping() { return false; }", "function spanAffectsWrapping() { return false; }", "function spanAffectsWrapping() { return false; }", "function spanAffectsWrapping() { return false; }", "function dontWalk() {\n...
[ "0.6843047", "0.6240777", "0.6240777", "0.6240777", "0.6240777", "0.5771067", "0.57065415", "0.5702804", "0.56982267", "0.5653387", "0.5632933", "0.56279796", "0.56174034", "0.55935806", "0.5589044", "0.5567709", "0.5537762", "0.5513134", "0.5491454", "0.5473053", "0.54635364...
0.75169206
0
Set the context lineWidth
setWidth(width = 1) { this.ctx.lineWidth = width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLineWidth(width) {\n\tcontext.lineWidth = width;\n\tlineWidthLabel.innerHTML = \"Drawing Line \" + width + \" pixles wide\";\n}", "setLineSize(size) {\n this.context.lineWidth = size;\n }", "function strokeContext() {\r\n\t\tcontext.lineWidth = lineWidth;\r\n\t\tcontext.strokeStyle = color;\r\n...
[ "0.8074495", "0.7551924", "0.73713", "0.72988313", "0.7252864", "0.7216742", "0.7187061", "0.6963102", "0.68119836", "0.6785775", "0.6696121", "0.66299903", "0.65666753", "0.64217734", "0.6394747", "0.6345087", "0.632365", "0.6225388", "0.6198122", "0.61664677", "0.6160038", ...
0.77073073
1
Set the font size
setFontSize(px) { this.font.size = px; this.setFont(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFontSize(size) {\n this.getFontStyle().setFontSize(size);\n }", "set font_size( sizeval ) {\n this.window.style.fontSize = sizeval;\n }", "setFontSize(size) {\n this.getFontStyle().setFontSize(size);\n }", "set fontSize(value) {}", "function change_font_size() {\n $(\".fon...
[ "0.8299538", "0.8291705", "0.822724", "0.81471056", "0.7926233", "0.7837747", "0.7819957", "0.775509", "0.77450335", "0.774257", "0.7609522", "0.75452095", "0.7483465", "0.74525905", "0.74498916", "0.7433639", "0.733841", "0.730523", "0.72710246", "0.7265763", "0.7231094", ...
0.83492696
0
Set the font weight (CSS name/number)
setFontWeight(val) { this.font.weight = val; this.setFont(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTitleFont(font, weight, size) {\n\t\tif (weight.length > 3)\n\t\t\t$('#main-article h1').css(\"font-style\", \"italic\");\n\t\telse\n\t\t\t$('#main-article h1').css(\"font-style\", \"normal\");\n\t\tweight = parseInt(weight);\n\t\t$('#title').html(\"<h2>\" + font + \"</h2>\");\n\t\t$('#title').css(\"fo...
[ "0.7086712", "0.7044871", "0.69418603", "0.683658", "0.6730793", "0.67242444", "0.6619594", "0.6512639", "0.6491757", "0.646401", "0.64571625", "0.6254218", "0.61348104", "0.60999864", "0.6080282", "0.6067778", "0.6024574", "0.6024053", "0.59750557", "0.59739465", "0.5970608"...
0.858305
0
Set the font family by name
setFontFamily(name) { this.font.family = name; this.setFont(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFontName(editor, fontName) {\n fontName = fontName.trim();\n // The browser provided execCommand creates a HTML <font> tag with face attribute. <font> is not HTML5 standard\n // (http://www.w3schools.com/tags/tag_font.asp). Use applyInlineStyle which gives flexibility on applying inline style\...
[ "0.7983003", "0.798035", "0.74537826", "0.7445338", "0.7283892", "0.7241815", "0.7139674", "0.6999027", "0.6972723", "0.6855459", "0.6798855", "0.6764887", "0.67290974", "0.6673605", "0.6665961", "0.6642019", "0.6642019", "0.6642019", "0.66412604", "0.6530367", "0.6525813", ...
0.8654764
0
Draw a line between two Points
line(x1, y1, x2, y2) { this.ctx.beginPath(); this.ctx.moveTo(x1, y1); this.ctx.lineTo(x2, y2); this.ctx.stroke(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawLine(P1, P2) {\n var line = doc.pathItems.add()\n line.stroked = true;\n line.strokeColor = hexToRGB(\"#00FFFF\");\n line.strokeWidth = 0.5;\n line.setEntirePath([P1, P2]);\n}", "function drawLine() {\n ctx.beginPath();\n // handle simple clicks\n if (points.length == 1) {\n y2 ...
[ "0.7922039", "0.7899352", "0.7866172", "0.7854348", "0.783298", "0.7801842", "0.77690524", "0.7695286", "0.7695286", "0.7695286", "0.7654436", "0.7650683", "0.76410776", "0.7626996", "0.76228285", "0.7545846", "0.7530741", "0.7525165", "0.75199676", "0.7508838", "0.74537927",...
0.7908441
1
Draw a circular wedge
wedge(x, y, r, s, e) { this.arc(x, y, r, s, e, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawInnerCircle () {\n const context = this.canvas.getContext('2d')\n const [x, y] = this.center\n const radius = this.size / 2\n\n const innerRadius = 10\n const outerRadius = this.size / 2\n\n const gradient = context.createRadialGradient(x, y, innerRadius, x, y, outerRadius)\n gradient.addC...
[ "0.655897", "0.650553", "0.6220122", "0.61469436", "0.6138702", "0.61118233", "0.6110581", "0.6087195", "0.60802364", "0.60635555", "0.6057173", "0.6040556", "0.60209584", "0.6012712", "0.60012406", "0.5996897", "0.5987583", "0.5982669", "0.59792715", "0.5972436", "0.59687096...
0.67482996
0
Draw a function plot from [start] to [end] in [steps] steps. Returns the plot shape so that it can be cached for redrawing.
plot(generator, start = 0, end = 1, steps = 24, xscale = 1, yscale = 1) { const interval = end - start; this.start(); for (let i = 0, e = steps - 1, v; i < steps; i++) { v = generator(start + (interval * i) / e); this.vertex(v.x * xscale, v.y * yscale); } this.end(); return this.curr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCurve(fn, steps) {\n noFill();\n stroke(0, 150);\n beginShape();\n for(var i = 0; i <= steps; i++) {\n // normalize i to the range (0, 1)\n var t = norm(i, 0, steps);\n // compute function\n var pt = fn(t);\n vertex(pt.x, pt.y);\n }\n endShape();\n}", "function plotFunction(func...
[ "0.68406254", "0.554732", "0.5474276", "0.5441425", "0.5334515", "0.5317652", "0.52443933", "0.52101487", "0.52094996", "0.51793265", "0.5141695", "0.5125379", "0.5092231", "0.5068516", "0.5047612", "0.50292504", "0.5016371", "0.5006761", "0.49971732", "0.49441305", "0.493121...
0.68847454
0
A signal for starting a new segment of a complex shape
segment(type, factor) { this.currentShape.addSegment(type, factor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function polygonStart(){activeStream=bufferStream,segments=[],polygon=[],clean=true}", "function curveSymmetricSegment(center,curveVertices,wc){\n this.center=center;\n this.radius=0;\n this.geodesiclength=0;\n this.level=0;\n this.js=center;\n this.jp=center;\n this.initialPosition=curveVer...
[ "0.556371", "0.5342567", "0.5267859", "0.52144617", "0.5165979", "0.51507217", "0.5121072", "0.5105813", "0.5105813", "0.5105813", "0.509649", "0.5095031", "0.50897115", "0.50777566", "0.50777566", "0.50777566", "0.50777566", "0.50777566", "0.5047514", "0.5017959", "0.5008673...
0.547152
1
Yield a snapshot of the current shape.
saveShape() { return this.currentShape; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shapeIterator(){\n return this.vertices.iterator();\n }", "drawGraph(){\n let shapes = this.vertices.iterator();\n\n while(!shapes.isEmpty()){\n shapes.currItem().drawEdges();\n shapes.next();\n }\n\n shapes = this.vertices.iterator();\n\n \n ...
[ "0.5981024", "0.5564211", "0.55639964", "0.5554682", "0.54881555", "0.5452914", "0.5431128", "0.54295915", "0.53399885", "0.52164894", "0.5208745", "0.5189241", "0.51710767", "0.51312363", "0.51305425", "0.50996107", "0.50731647", "0.50265896", "0.49669763", "0.4965906", "0.4...
0.6194775
0
check the table to see if the username exists
doesUserExist(uname){ return db.one(`SELECT * FROM user_id WHERE uname=$1`, uname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async usernameCheck(username) {\n const duplicateCheck = await db.query(\n `SELECT username \n FROM users \n WHERE UPPER(username) = UPPER($1)`,\n [username]\n );\n // returns true if username is already in use\n return duplicateCheck.rows.length > 0;\n }", "static...
[ "0.7764621", "0.75263065", "0.7393602", "0.73078215", "0.7199834", "0.71209806", "0.7112156", "0.70691216", "0.7066231", "0.70641994", "0.69987303", "0.69859165", "0.6981494", "0.69800115", "0.6977526", "0.6976216", "0.6938721", "0.69042724", "0.6863058", "0.684938", "0.67845...
0.7537044
1
create a new instance of a fish that is associated with that particular user
createUserFish(newEntry){ return db.one(`INSERT INTO user_information(user_id, user_fish_id, user_fish_weight, user_fish_loc_id, user_fish_info) VALUES ($[user_id], $[user_fish_id], $[user_fish_weight], $[user_fish_loc_id], $[user_fish_info]) RETURNING id`, newEntry) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async create(req, res, next) {\n try {\n // NOTE NEVER TRUST THE CLIENT TO ADD THE CREATOR ID\n req.body.userId = req.userInfo.sub;\n let newFavorite = await favoriteService.create(req.body);\n res.send(newFavorite);\n } catch (error) {\n next(error);\n }\n }", "function post(r...
[ "0.64348906", "0.60883427", "0.60571694", "0.59817964", "0.5909526", "0.59050596", "0.58969843", "0.5876944", "0.58599186", "0.5810401", "0.5775908", "0.5775438", "0.57338524", "0.57336056", "0.5719665", "0.57155126", "0.57115674", "0.5692173", "0.5678927", "0.5648542", "0.56...
0.6742067
0
check the tabel for fish and locations and see if the instance exists already
checkIfLoc(data) { return db.one(`SELECT * FROM fish_location WHERE fish_id=$[fish_id] AND location_id=$[location_id]`, data) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CheckIfPatientExists(){\n\t\t\t\n\t\t\t\n\t\t\treturn true;\n\t\t}", "static isInstance(obj) {\n return utils.isInstance(obj, \"__pulumiUnknown\");\n }", "modelCanExist () {\n\t\t// we match on a New Relic object ID and object type, in which case we add a new stack trace as needed\n\t\tretur...
[ "0.55971694", "0.5372901", "0.53657186", "0.53392345", "0.5335765", "0.52923733", "0.5185845", "0.5182565", "0.5159797", "0.5157303", "0.5156401", "0.5129347", "0.5095924", "0.50475407", "0.5046169", "0.5042918", "0.5040292", "0.5039543", "0.5036712", "0.50116074", "0.5008536...
0.5928532
0
Update node (inside/outside)circles and labels in each tick of simulation.
_tickedNode() { this.nodeInnerCirclesSelection.attr('cx', (d) => d.x).attr('cy', (d) => d.y) this.nodeOuterCirclesSelection.attr('cx', (d) => d.x).attr('cy', (d) => d.y) this.nodeLabelsSelection.attr('x', (d) => d.x).attr('y', (d) => d.y) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tick(e) {\n for ( i = 0; i < nodes.length; i++ ) {\n var node = nodes[i];\n /*\n * Animate the radius via the tick.\n *\n * Typically this would be performed as a transition on the SVG element itself,\n * but since this is a static force layout, we must perform it on the node.\n ...
[ "0.69973594", "0.6864282", "0.6786939", "0.67117244", "0.66589624", "0.6638898", "0.66330975", "0.65783614", "0.65435356", "0.6539279", "0.65361005", "0.65240186", "0.6520216", "0.65099317", "0.6482775", "0.6462328", "0.64550465", "0.6439425", "0.643259", "0.64257437", "0.640...
0.68790215
1
Gets the top posts related to the hashtag and set it in the DOM.
function setPostsInfo(hashtag,option) { let arrItems = Array.from(document.getElementsByClassName("postItem")); getData(INSTAGRAM_API + hashtag + INSTAGRAM_API_QUERY, function(data) { let arrPosts; if(option=="recent"){ arrPosts = data.graphql.hashtag.edge_hashtag_to_media.edges; }else { arrPos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findTopPost() {\n reddit.get(\n '/r/all/.json', //Edit this to the subreddit of your choosing\n {},\n function (error, response, body) {\n let info = JSON.parse(body);\n const subreddit = info.data.children[0].data.subreddit;\n const id = info.data.children[0].da...
[ "0.589572", "0.5707425", "0.5672982", "0.5612885", "0.55979437", "0.54990995", "0.5480462", "0.5479365", "0.5455394", "0.54228854", "0.53636473", "0.5360943", "0.53481025", "0.5328186", "0.5320787", "0.5303433", "0.52916855", "0.5274724", "0.5274643", "0.52591443", "0.5259144...
0.6070351
0
A function to reduce the string length.
function reduceString(s) { if (s.length > 60) return s.substring(0, 60).toString(); return s.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncate_string(string){\n \n}", "function reduceCharacters(str)\n{\n var a = str.slice(0, 50) + \"...\";\n console.log(\"final string\" +a); \n}", "function forceLength(str, len) {\n str = str.toString();\n var diff = len - str.length;\n\n for (var i = 0; i < ...
[ "0.6933757", "0.6884743", "0.6875149", "0.6791731", "0.6791731", "0.6750236", "0.67401403", "0.6694713", "0.667146", "0.6619226", "0.66147906", "0.65782315", "0.65478873", "0.652937", "0.652458", "0.64856166", "0.6469147", "0.64550763", "0.643585", "0.6426918", "0.6410736", ...
0.74532425
0
createRatingButtons.js InterActiveMap Wroclaw Created by ISMAIL BULUC on 20150527. Copyright 2015 ISMAIL BULUC. All rights reserved.
function createRatingButtons(){ var detailsWindowRaitingButtonSet = Titanium.UI.createButtonBar({ labels:[{title:'Very Bad',image:"img/unlike.png"}, {title:'So-So',image:"img/so_so.png"}, {title:'Loved it!',image:"img/like.png"}], backgroundColor:'blue', top:141, height:40, width:"100%" });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadRatingButtons() {\n if (this.props.returnedRestaurant) {\n return <div className=\"rating-buttons\">\n <img onClick={() => this.saveRating(\"like\")} className=\"like-button\" alt=\"like-button\" src=\"https://image.flaticon.com/icons/svg/126/126473.svg\"></img>\n ...
[ "0.61750376", "0.6159982", "0.6149001", "0.6121164", "0.61017454", "0.609776", "0.60529417", "0.60204303", "0.6012372", "0.5963009", "0.59128916", "0.5910469", "0.5906244", "0.5894913", "0.5892215", "0.58899355", "0.58808404", "0.58667284", "0.5854974", "0.5847125", "0.584510...
0.75630015
0
function to concat middle character to the beginning of last output string
function concatFront(){ var half = userInput.length / 2; halfPosition = parseFloat(half.toFixed()); var firstLetter = userInput.charAt(halfPosition); var finalOutPut = firstLetter + concatWithInput; alert(finalOutPut); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatLastFirst(capitalFirstLast){\n capitalLastFirst = capitalFirstLast.charAt(1) + capitalFirstLast.charAt(0);\n alert(capitalLastFirst);\n}", "function front_back(str)\n{\n frist = str.substring(0,1);\n return frist+str+frist;\n}", "function changeFirstToLastLetter(str) \n {\n if (str.len...
[ "0.71135455", "0.65574867", "0.65130043", "0.6485285", "0.6296038", "0.6290985", "0.62749106", "0.62697965", "0.6252657", "0.6188477", "0.616316", "0.6160402", "0.6153321", "0.61465305", "0.6137143", "0.61257976", "0.611436", "0.61077225", "0.6104959", "0.6067678", "0.6044041...
0.65695727
1
whenever a GoJS transaction has finished modifying the model, update all Angular bindings
function updateAngular(e) { if (e.isTransactionFinished) scope.$apply(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAngular(e) {\n\t\t\t\tif (e.isTransactionFinished) {\n\t\t\t\t scope.$apply();\n\t\t\t\t}\n\t\t\t}", "function updateAngular(e) {\n if (e.isTransactionFinished) {\n $scope.$apply();\n }\n }", "onSave() {\n log('saved');\n // Resolve the promise\n ...
[ "0.7055204", "0.704997", "0.6006187", "0.59446067", "0.59380704", "0.58907396", "0.5875164", "0.5851798", "0.5807192", "0.575061", "0.5742474", "0.57173723", "0.57053393", "0.5700412", "0.56557286", "0.5592196", "0.5588122", "0.5575016", "0.5559937", "0.55279285", "0.5525132"...
0.70542145
1
tests if the EcoElement has a title to render the header differently but the idea to implement titles is probably obsolete right now, should probably be deleted soon
function hasTitle(){ return ecoElement.title !== ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeader(title){\n\ttitle = (title)?title:this.lCurrent.innerHTML;\n $s(this.lTitle,title);\n }", "updateTitle(){ \n let title = '';\n const { head, instance } = this.entry;\n\n if (head.hasOwnProperty('title')){\n let prop = head.title;\n\n title = head.title\n if (typeof ...
[ "0.66996217", "0.6675315", "0.66108036", "0.6591497", "0.6552512", "0.6483422", "0.6476066", "0.64710176", "0.646847", "0.6466227", "0.6441781", "0.6439199", "0.64330435", "0.6431236", "0.6410921", "0.6354777", "0.63227385", "0.63171905", "0.63143516", "0.63035834", "0.629434...
0.79952985
0
Open the container file to find the resources
function container(f) { opf_file = $(f).find('rootfile').attr('full-path'); // Get the OEPBS dir, if there is one if (opf_file.indexOf('/') != -1) { oebps_dir = opf_file.substr(0, opf_file.lastIndexOf('/')); } opf_file = epub_dir + '/' + opf_file; jQuery.get(opf_file, {}, opf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async read_resources(file_path) {\n try {\n const file_json = await this.kubectl(`apply -f ${file_path} --dry-run='client' -o json`);\n const resources = JSON.parse(file_json);\n return resources.items;\n } catch (err) {\n console.error(`failed to load noob...
[ "0.65451586", "0.527053", "0.51754236", "0.5161455", "0.51432973", "0.49668282", "0.49639714", "0.49374014", "0.49330553", "0.48770496", "0.4871568", "0.4868826", "0.4859496", "0.48368913", "0.4785011", "0.4766816", "0.47637826", "0.47526857", "0.47403425", "0.4738727", "0.47...
0.56810784
1
Create method for finding by unique field eg. `userByUsername` for finding user by username
function findByUniqueFields(name, fields = []) { const methods = {} fields.forEach(field => { methods[`${name}By${cap(field)}`] = (_, { [field]: value }) => Models[name].find({ where: { [field]: value } }) }) return methods }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findUserByUniqueField(uniqueField, valueOfField, projectObject, callback){\n if(projectObject === undefined){\n projectObject = {};\n }\n var query = {};\n query[`${uniqueField}`] = valueOfField;\n User.findOne(query, projectObject)\n .populate({path:'shopping_bag',select:'-_id -u...
[ "0.69974935", "0.6525122", "0.6413991", "0.6391603", "0.6383287", "0.6309314", "0.6265904", "0.62651443", "0.6253418", "0.62492645", "0.6244161", "0.62400335", "0.62377805", "0.6217113", "0.6210258", "0.6200522", "0.6186708", "0.61592907", "0.61486816", "0.6146", "0.61442876"...
0.65462303
1
Adds callback for before loading
addOnBeforeItemLoadCallback(fn) { this.onBeforeItemLoadCallbacks.push(fn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onLoaded(callback) {\n if (this.isLoaded) {\n return callback();\n } else {\n this.onLoadedCallbacks.push(callback);\n }\n }", "addOnAfterItemLoadCallback(fn) {\r\n this.onAfterItemLoadCallbacks.push(fn);\r\n }", "before (callback) {\n\t\tthis.init(callback);\n\t}", "before (cal...
[ "0.71478814", "0.70468414", "0.68894494", "0.68894494", "0.68894494", "0.68894494", "0.6883891", "0.68195117", "0.68195117", "0.6790297", "0.6765029", "0.66441166", "0.66385216", "0.66068125", "0.6592706", "0.65401316", "0.65378493", "0.65378493", "0.6473899", "0.64638096", "...
0.8047658
0
Adds callback for after successful load
addOnAfterItemLoadCallback(fn) { this.onAfterItemLoadCallbacks.push(fn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setLoadCompleteCallback(funct) {\n this.loadCompleteCallback = funct;\n // in case all loading are done\n this._checkForAllLoadCompleted();\n }", "function load() {\n if (!loaded) {\n loaded = true;\n\n callback();\n }\n }", "complete() {\n this.trigger('lo...
[ "0.736027", "0.7225835", "0.7131542", "0.708361", "0.69622743", "0.6949027", "0.6948389", "0.6913186", "0.6887508", "0.67587405", "0.6701114", "0.66943085", "0.66784346", "0.6673617", "0.6673617", "0.6630389", "0.65748554", "0.6571208", "0.6471508", "0.64573675", "0.6411911",...
0.7492875
0
Runs array of callbacks with given arguments
runCallbacks(callbacks, args) { for (let i = 0; i < callbacks.length; i++) { if (typeof callbacks[i] !== 'function') continue; callbacks[i].apply(null, args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static performCallbacks(callbacks) {\n // This is my method of getting all the arguments except for the list of callbacks\n const args = Array.prototype.slice.call(arguments, 1);\n callbacks.forEach((callback) => {\n // To use the arguments I have to use the apply method of the function\n callba...
[ "0.78988415", "0.73949677", "0.6752032", "0.6627653", "0.6627653", "0.6627653", "0.6627653", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", "0.6504249", ...
0.8452248
0
Main Functions /////////////////////////////////////////// / Function:SetScrollTitleHandler Created on Dec 20, 2013 Updated on Jan 03, 2013 Description: Set scroll title text handler. In:event Out:Scroll text. Note: Based on
function SetScrollTitleHandler(event) { var $title = $(this).children().last(); if ($title[0] !== undefined) { var max = $title[0].scrollWidth; if (event.type == "mouseenter" && max > $title.width()) { $title.css("text-overflow", "clip"); ScrollTit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrollTitle(el) {\n\tif (el.clientWidth < el.firstChild.offsetWidth)\n\t\tel.firstChild.style.left = (el.clientWidth - el.firstChild.offsetWidth - 6) + 'px';\n}", "function ScrollTitle(title, i, max)\n{\n title.scrollLeft(i);\n //console.log(i);\n if (i < max) {\n gSTATE.TIMER = setTimeo...
[ "0.6366953", "0.60290843", "0.5982801", "0.5964143", "0.5881313", "0.5877112", "0.5875039", "0.58749753", "0.58523095", "0.5846592", "0.5781608", "0.57709897", "0.57709897", "0.57709897", "0.57709897", "0.57709897", "0.5751552", "0.57480717", "0.5738495", "0.5738469", "0.5737...
0.7564605
0
Function:ScrollTitle Created on Dec 20, 2013 Updated on Dec 23, 2013 Description: Scroll title. In:title Out:Scroll text. Note: Code from
function ScrollTitle(title, i, max) { title.scrollLeft(i); //console.log(i); if (i < max) { gSTATE.TIMER = setTimeout(function(){ ScrollTitle(title, ++i, max); }, 40); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrollTitle(el) {\n\tif (el.clientWidth < el.firstChild.offsetWidth)\n\t\tel.firstChild.style.left = (el.clientWidth - el.firstChild.offsetWidth - 6) + 'px';\n}", "scrollToTitle() {\n let $self = $(`#${this.idDOM}`);\n\n $('html, body').animate({\n scrollTop: $self.find('.articl...
[ "0.7595962", "0.7145313", "0.679978", "0.64976597", "0.64451766", "0.63931036", "0.63253564", "0.62543166", "0.62543166", "0.61655015", "0.6156926", "0.61185074", "0.6112152", "0.6098997", "0.60918015", "0.608963", "0.5985514", "0.597846", "0.5970874", "0.59691167", "0.595155...
0.7520848
1
Function:SetInfoZoomHandler Created on Jul 05, 2013 Updated on Nov 16, 2013 Description: Set and show the media info or zoom in on movie sets, episodes. In: Out:Media Info
function SetInfoZoomHandler() { var media = GetState("media"); var type = GetState("type"); var id = $(this).attr("class").match(/\d+(_\d+)?/g); ShowInfoZoomMedia(media, type, id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowInfoZoomMedia(media, type, id)\n{\n if (type != \"sets\" && type != \"series\" && type != \"seasons\" && type != \"songs\") {\n ShowMediaInfo(media, type, id);\n }\n else {\n ShowMediaZoomIn(type, id);\n } \n}", "function amSetZoomInfo(map_id, x, y, level) {\n\tAmmap.pub...
[ "0.7082778", "0.69798005", "0.6153409", "0.604082", "0.604082", "0.57443756", "0.5706404", "0.5700603", "0.5583724", "0.5572301", "0.5560666", "0.55087644", "0.5488048", "0.5471027", "0.5459694", "0.54566246", "0.5451168", "0.54503286", "0.5441031", "0.53835", "0.5374603", ...
0.7655462
0
Function:SetInfoZoomHandler Created on Nov 09, 2013 Updated on Jun 29, 2014 Description: Show the media info or zoom in on movie sets, episodes media. In: Out:Media Info
function ShowInfoZoomMedia(media, type, id) { if (type != "sets" && type != "series" && type != "seasons" && type != "songs") { ShowMediaInfo(media, type, id); } else { ShowMediaZoomIn(type, id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetInfoZoomHandler()\n{ \n var media = GetState(\"media\");\n var type = GetState(\"type\");\n var id = $(this).attr(\"class\").match(/\\d+(_\\d+)?/g);\n \n ShowInfoZoomMedia(media, type, id);\n}", "function amSetZoomInfo(map_id, x, y, level) {\n\tAmmap.publish('amsetzoominfo', map_...
[ "0.76821446", "0.67774796", "0.6244691", "0.59233755", "0.59233755", "0.5794897", "0.56538117", "0.5625333", "0.5586642", "0.55737805", "0.54987854", "0.5473283", "0.5459325", "0.54551727", "0.5418117", "0.5384992", "0.5372128", "0.53535014", "0.53494865", "0.53424275", "0.53...
0.73865134
1
Function:ShowMediaInfo Created on Aug 31, 2013 Updated on Jun 29, 2014 Description: Show the media info. In:media, type, id Out:Media Info
function ShowMediaInfo(media, type, id) { switch(media) { case "movies" : ShowMovieInfo(id); break; case "tvshows" : if (type != "episodes") { ShowTVShowInfo(id); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowInfoZoomMedia(media, type, id)\n{\n if (type != \"sets\" && type != \"series\" && type != \"seasons\" && type != \"songs\") {\n ShowMediaInfo(media, type, id);\n }\n else {\n ShowMediaZoomIn(type, id);\n } \n}", "function MediaInfo() {\n _classCallCheck(this, Medi...
[ "0.73435766", "0.6304674", "0.6202588", "0.5958484", "0.5921439", "0.59042454", "0.5760514", "0.56320333", "0.5631996", "0.5518853", "0.5518374", "0.55024827", "0.5474231", "0.54434514", "0.54267", "0.5418935", "0.54053617", "0.540132", "0.53575164", "0.5352718", "0.535119", ...
0.79875517
0
Function:ShowMediaZoomIn Created on Nov 09, 2013 Updated on Jun 29, 2014 Description: Show the media zoom in for movie sets, seasons, episodes. In:media, id Out:Media Info
function ShowMediaZoomIn(type, id) { var $control = $("#control_sub"); if (gSTATE.SORT) { $("#sort").css("visibility", "hidden"); } if (type == "series" && id.toString().split("_")[1] == "1") { type = "noseasons"; // Series has no seasons. id = id.toString().split("_")[0] + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowInfoZoomMedia(media, type, id)\n{\n if (type != \"sets\" && type != \"series\" && type != \"seasons\" && type != \"songs\") {\n ShowMediaInfo(media, type, id);\n }\n else {\n ShowMediaZoomIn(type, id);\n } \n}", "function SetInfoZoomHandler()\n{ \n var media = GetSt...
[ "0.77456635", "0.6466021", "0.6141161", "0.60420465", "0.60112154", "0.59663516", "0.57594377", "0.5718467", "0.5703574", "0.5601945", "0.5557366", "0.55540735", "0.55524623", "0.55518746", "0.554893", "0.54126066", "0.5412428", "0.53799033", "0.53724575", "0.53443754", "0.52...
0.729736
1
Function:ShowTVShowInfo Created on Jul 09, 2013 Updated on Jul 02, 2014 Description: Show the TV show info. In:id Out:TV Show Info
function ShowTVShowInfo(id) { $.ajax ({ url: 'jsonfargo.php?action=info&media=tvshows' + '&id=' + id, async: false, dataType: 'json', success: function(json) { var btnname, pattern; var buttons = ""; var aInfo = [{left:"E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowTVShowEpisodeInfo(id)\n{\n $.ajax\n ({\n url: 'jsonfargo.php?action=info&media=episodes' + '&id=' + id,\n async: false,\n dataType: 'json',\n success: function(json)\n { \n var aInfo = [{left:\"TV&nbsp;show:\", right:json.media.showtitle},\n ...
[ "0.649358", "0.63767165", "0.61922514", "0.5954205", "0.5921169", "0.5913062", "0.58894736", "0.58034647", "0.5800787", "0.57661873", "0.573143", "0.5720354", "0.5714214", "0.5704642", "0.5698285", "0.56720823", "0.5670195", "0.5617218", "0.56069094", "0.56031585", "0.5592594...
0.6425709
1
Function:ShowTVShowEpisodeInfo Created on Nov 17, 2013 Updated on Jul 03, 2014 Description: Show the TV show episode info. In:id Out:TV Show Episode Info
function ShowTVShowEpisodeInfo(id) { $.ajax ({ url: 'jsonfargo.php?action=info&media=episodes' + '&id=' + id, async: false, dataType: 'json', success: function(json) { var aInfo = [{left:"TV&nbsp;show:", right:json.media.showtitle}, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EpisodeMetadata() {}", "function updateEpisode(elem)\n{\n if (isPlaying) {\n playpause();\n }\n \n var episodeDate = document.getElementById(\"episodeDate\");\n var date = createDateStr(elem.date);\n if (!date) {\n if (elem.dateString) {\n if (episodeDate) {\n ...
[ "0.64371926", "0.632191", "0.6290025", "0.6248219", "0.6036973", "0.5990106", "0.5979473", "0.58924806", "0.5877828", "0.5862633", "0.5832816", "0.5819718", "0.5790204", "0.5758771", "0.5679999", "0.5668224", "0.56515634", "0.5582258", "0.5577392", "0.5561136", "0.5554756", ...
0.66822314
0
Function:ShowAlbumInfo Created on Jul 10, 2013 Updated on Jul 03, 2014 Description: Show the album info. In:id Out:Album Info
function ShowAlbumInfo(id) { $.ajax ({ url: 'jsonfargo.php?action=info&media=albums' + '&id=' + id, async: false, dataType: 'json', success: function(json) { var aInfo = [{left:"Artist:", right:json.media.artist}, {left:"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function albumInfo(artist, image, idvalue, imagePath, coversionPath) {\n this.artist = artist\n this.image = image\n this.idvalue = idvalue\n this.imagePath = imagePath\n this.coversionPath = coversionPath\n }", "function albumInfo(artist, image, idva...
[ "0.70931125", "0.699052", "0.6752998", "0.66796744", "0.6633676", "0.65090704", "0.63047004", "0.62322664", "0.6207446", "0.6207446", "0.6206847", "0.619114", "0.6176895", "0.61509305", "0.6125657", "0.60792106", "0.5994772", "0.59562236", "0.59434295", "0.59372807", "0.59366...
0.71658176
0
Function:ShowInfoTable Created on Jul 06, 2013 Updated on Dec 31, 2013 Description: Show the info. In:aInfo Out:Info table
function ShowInfoTable(aInfo) { var table; var $info = $("#info_left"); // Reset info $info.html(""); table = '<table>'; $.each(aInfo, function(){ if (this.right) { table += '<tr>'; table += '<td class="left">' + this.left + '</td>'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _fnUpdateInfo ( oSettings )\n\t\t{\n\t\t\t/* Show information about the table */\n\t\t\tif ( !oSettings.oFeatures.bInfo || oSettings.aanFeatures.i.length === 0 )\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tvar\n\t\t\t\tiStart = oSettings._iDisplayStart+1, iEnd = oSettings.fnDisplayEnd(),\n\t\t\t\tiM...
[ "0.6818227", "0.66969526", "0.63844913", "0.6181005", "0.61732566", "0.6072034", "0.6072034", "0.6028143", "0.6028143", "0.6024294", "0.5979812", "0.593837", "0.59287757", "0.5927732", "0.5909903", "0.5883826", "0.58722377", "0.57891285", "0.57858735", "0.57808036", "0.577942...
0.75205237
0
Function:SetShowUrlHandler Created on Jul 09, 2013 Updated on Jul 09, 2013 Description: Show URL in a new web page. In: Out:New web page
function SetShowUrlHandler() { var url = $(this).attr("value"); window.open(url, "_blank"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showURL() {\n SETTINGS.SHOWURL = true;\n setFloatURL(loadedURL);\n}", "function showWebsite(p_name, p_url) {\n\n\tif (v_connTabControl)\n\t\thideAbout();\n\t\tv_connTabControl.tag.createWebsiteOuterTab(p_name,p_url);\n\n}", "function SetUrl(url) {\r\n\tGetE('txtUrl').value = url;\r\n}", "functio...
[ "0.6471825", "0.6317683", "0.6208813", "0.613043", "0.6114244", "0.6112927", "0.6112927", "0.60187334", "0.5932109", "0.58514535", "0.58302265", "0.5823474", "0.58071345", "0.57781994", "0.575187", "0.57373077", "0.57193565", "0.57189953", "0.5712411", "0.5653457", "0.562799"...
0.68267417
0
Function:SetMediaHandler Created on Apr 13, 2013 Updated on Feb 28, 2014 Description: Set the media and show the media table. In:event Out:Media
function SetMediaHandler(event) { var media = event.data.media; SetState("page", media); SetState("level", ""); // Initialize parameters. gSTATE.PAGE = 1; gSTATE.SORT = ""; SetState("title", "name_asc"); SetState("genre", ""); SetState("year", ""); $('#display_system').hid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setMedia(media) {\n this.data = {\n caption: '',\n mediaPath: media.mediaPath,\n url: media.url,\n };\n\n this.ui.render(this.data);\n }", "function setMedia(m) {\n\t m.name = '';\n\t m.loc = '';\n\t m.relLoc = '';\n\t m.type = '';\n\t m.du...
[ "0.7493806", "0.66105574", "0.6440209", "0.6274735", "0.6210483", "0.61621886", "0.6112861", "0.602595", "0.60104316", "0.59747344", "0.5902823", "0.58823675", "0.5868619", "0.58331007", "0.5713732", "0.57029724", "0.56807184", "0.5644559", "0.5602145", "0.559978", "0.5585416...
0.7973442
0
Function:SetShowButtonHandler Created on Jun 27, 2013 Updated on Feb 25, 2014 Description: Show the sort, genre, years or manage action. In: Out:
function SetShowButtonHandler() { var state, media; var $this = $(this); var choice = GetState("choice"); switch (choice) { case "Sort" : state = "title"; break; case "Genres" : state = "genre"; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetTitleHandler()\n{\n var buttons;\n var aList = [\"Latest\", \"Oldest\", \"Ascending\", \"Descending\"];\n var $btns = $(\"#buttons_box .button\");\n \n // Reset old buttons.\n $($btns).text(\"\");\n\n // Show buttons\n buttons = \"\";\n $.each(aList, function(i, value) {\n ...
[ "0.614248", "0.6068297", "0.60525763", "0.60084975", "0.58607185", "0.5831615", "0.5720458", "0.5683165", "0.56794155", "0.5679125", "0.56682175", "0.5627392", "0.5614914", "0.56115997", "0.5603379", "0.55930483", "0.5590128", "0.55883104", "0.5567332", "0.55620056", "0.55509...
0.7637019
0
Function:SetButtonsTypeHandler Created on Nov 03, 2013 Updated on Jul 01, 2014 Description: Set the buttons type handler and perform the right action. In: Out:
function SetButtonsTypeHandler() { switch ($(this).text()) { case cBUT.TITLES : if (GetState("media") == "movies") { SetState("type", "titles"); ShowMediaTypePage(cBUT.SETS, true); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupTypeButtons() {\n\t$(\".type\").on(\"click\", function() {\n\t\t$(\".type\").each(function() { \n\t\t\t$(this).removeClass(\"selected\");\n\t\t});\t\n\t\t$(this).addClass(\"selected\");\n\t\tif($(this).text() === \"Addition\") {\t\t\t\n\t\t\tsetUpGame(whatModeIsSelected(), \"+\");\n\t\t}else if($(thi...
[ "0.61237186", "0.6017541", "0.58840555", "0.57619417", "0.5752863", "0.5599471", "0.5581618", "0.5428627", "0.54280996", "0.5423099", "0.5417504", "0.5371336", "0.5314416", "0.52044183", "0.5198314", "0.5184264", "0.51842296", "0.51788485", "0.5174941", "0.51716024", "0.51258...
0.7480702
0
Function:BackToMedia Created on Nov 09, 2013 Updated on Jun 29, 2014 Description: Go back to media, one level up. E.g. from set movies to sets. In:type Out:
function BackToMedia(type) { var $control = $("#control_sub"); SetState("type", type); SetState("level", ""); switch (type) { case "sets" : gSTATE.PAGE = gTEMP.PAGE; gSTATE.SORT = gTEMP.SORT; SetState("title", gTEMP.TITLE); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MediaGoBack()\r\n{\r\n MediaStop();\r\n\r\n if (WrapAtEnd)\r\n (iCurrentImage == 0) ? iCurrentImage = (xMediaContent.length - 2) : iCurrentImage-=2;\r\n else\r\n (iCurrentImage == 0) ? iCurrentImage = 0 : iCurrentImage-=2;\r\n\r\n document.MEDIAIMAGE.src = xMediaContent[iCurrentImage...
[ "0.714714", "0.64330244", "0.6410435", "0.6250035", "0.6200628", "0.61759645", "0.6133639", "0.60969585", "0.6094895", "0.6087514", "0.60373414", "0.5988911", "0.5962282", "0.58938533", "0.5829901", "0.5817853", "0.58167183", "0.5815805", "0.57952374", "0.5793376", "0.5765404...
0.670716
1
Function:ShowTypeMediaPage Created on Nov 12, 2013 Updated on Dec 23, 2013 Description: Show the media type. In:type, reset Out:
function ShowMediaTypePage(type, reset) { var $control = $("#control_sub"); // Reset page and sort globals; if (reset) { gSTATE.PAGE = 1; gSTATE.SORT = ""; $("#sort").css("visibility", "hidden"); } // Show media table. ShowMediaTable(gSTATE.PAGE, g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowMediaInfo(media, type, id)\n{ \n switch(media)\n {\n case \"movies\" : ShowMovieInfo(id);\n break;\n\n case \"tvshows\" : if (type != \"episodes\") {\n ShowTVShowInfo(id);\n }\n ...
[ "0.68102074", "0.63641334", "0.5999454", "0.5939726", "0.5871068", "0.5758959", "0.57559085", "0.5729158", "0.57055223", "0.5646456", "0.5636009", "0.56194437", "0.5589753", "0.55400443", "0.5539389", "0.55142355", "0.5496451", "0.54840696", "0.5477769", "0.5441514", "0.54388...
0.82300866
0
Function:SetButtonsScreenHandler Created on May 24, 2014 Updated on May 24, 2014 Description: Set the buttons screen handler and perform the right action. In: Out:Screen show media in a list or as thumnails.
function SetButtonsScreenHandler() { var screen, $control = $("#control_sub"); if ($(this).text() == cBUT.LIST) { screen = cBUT.THUMB; } else { screen = cBUT.LIST; } // Set state screen (list or thumbnail). gSTATE.SCREEN = screen; // Show media table. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetButtonsHandler()\n{ \n var $this = $(this);\n var buttons = \"\";\n var aList;\n var height_box;\n var $btns = $(\"#buttons_box .button\");\n var $scroll = $(\"#buttons_box .slimScrollDiv\");\n var media = GetState(\"media\");\n \n SetState(\"choice\", $this.text());\n\n i...
[ "0.5801243", "0.57143", "0.56993353", "0.555954", "0.5537539", "0.5357914", "0.5343705", "0.52992684", "0.5280329", "0.52687544", "0.522164", "0.5103526", "0.51001215", "0.50989497", "0.5090302", "0.50806195", "0.5056391", "0.5049539", "0.50487024", "0.5012248", "0.50122267",...
0.78006786
0
Function:ChangeControlBar Created on Apr 08, 2013 Updated on Nov 08, 2013 Description: Change the media on the control bar from Movies, TV Shows, Music or to System. In:media Out:
function ChangeControlBar(media) { var id, aMedia = ['movies','tvshows','music','system']; $("#sort").css("visibility", "hidden"); // Set state media; SetState("media", media); id = '#' + media; $(id).addClass("on"); $.each(aMedia, function(key, value) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function volumeChangeBar() {\n let voloffsets = volumefg.getBoundingClientRect();\n let volwidth = voloffsets.right-voloffsets.left;\n volumefg.style.clip = 'rect(0, '+((video.volume*volwidth)/16)+'rem, '+(volwidth/16)+'rem, 0)';\n }", "function SetMediaHandler(event)\n{ \n var media = eve...
[ "0.62241054", "0.5946822", "0.5808207", "0.5803801", "0.5771768", "0.57603323", "0.5748403", "0.5679112", "0.5663035", "0.56529695", "0.564721", "0.5623518", "0.560079", "0.5596541", "0.5592483", "0.55746305", "0.5567096", "0.55552226", "0.55256283", "0.5443323", "0.54355264"...
0.7765865
0
Function:SetPageHandler Created on Apr 13, 2013 Updated on Nov 07, 2013 Description: Set the page and show the media table. In:event Out:Media
function SetPageHandler(event) { var action = event.data.action; var offset = gSTATE.LAST; gSTATE.PAGE = (action == "n") ? gSTATE.PAGE + 1 : gSTATE.PAGE - 1; // Check for min. if (gSTATE.PAGE == 0) { gSTATE.PAGE = offset; } // Check for max. else if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetMediaHandler(event)\n{ \n var media = event.data.media;\n SetState(\"page\", media);\n SetState(\"level\", \"\");\n\n // Initialize parameters.\n gSTATE.PAGE = 1;\n gSTATE.SORT = \"\";\n SetState(\"title\", \"name_asc\");\n SetState(\"genre\", \"\");\n SetState(\"year\", \"...
[ "0.75040734", "0.5844665", "0.58394825", "0.5738811", "0.56672055", "0.5665935", "0.5659345", "0.56488323", "0.5610784", "0.5590623", "0.5589031", "0.5564414", "0.55316967", "0.54833543", "0.5477997", "0.53672296", "0.5360812", "0.534971", "0.53132737", "0.52945524", "0.52935...
0.7219286
1
Function:SetBulletHandler Created on Mar 01, 2013 Updated on Mar 03, 2013 Description: Get the page and show the media table. In: Out:Media
function SetBulletHandler() { gSTATE.PAGE = Number($(this).text()); ShowMediaTable(gSTATE.PAGE, gSTATE.SORT); //alert($(this).text()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetMediaHandler(event)\n{ \n var media = event.data.media;\n SetState(\"page\", media);\n SetState(\"level\", \"\");\n\n // Initialize parameters.\n gSTATE.PAGE = 1;\n gSTATE.SORT = \"\";\n SetState(\"title\", \"name_asc\");\n SetState(\"genre\", \"\");\n SetState(\"year\", \"...
[ "0.65300703", "0.54610884", "0.54206705", "0.53189796", "0.5294691", "0.52912307", "0.5274709", "0.5261894", "0.52487373", "0.5246804", "0.52293485", "0.5227769", "0.5208656", "0.5207908", "0.5191002", "0.51740646", "0.5053227", "0.5053227", "0.5053227", "0.5053227", "0.50493...
0.7728899
0
Function:SetArrowHandler Created on Apr 13, 2013 Updated on Oct 31, 2013 Description: Set the page and show the media table. In:event Out:Media
function SetArrowHandler(action) { var offset = gSTATE.LAST; gSTATE.PAGE = (action == "n") ? gSTATE.PAGE + 1 : gSTATE.PAGE - 1; // Check for min. if (gSTATE.PAGE == 0) { gSTATE.PAGE = offset; } // Check for max. else if (gSTATE.PAGE == offset+1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetMediaHandler(event)\n{ \n var media = event.data.media;\n SetState(\"page\", media);\n SetState(\"level\", \"\");\n\n // Initialize parameters.\n gSTATE.PAGE = 1;\n gSTATE.SORT = \"\";\n SetState(\"title\", \"name_asc\");\n SetState(\"genre\", \"\");\n SetState(\"year\", \"...
[ "0.6489026", "0.64476615", "0.58081925", "0.57973826", "0.5796341", "0.5796341", "0.5745952", "0.57447076", "0.5737105", "0.5737105", "0.56903076", "0.56903076", "0.56903076", "0.5629869", "0.55646175", "0.55646175", "0.55646175", "0.5532802", "0.55144805", "0.55144805", "0.5...
0.6563418
0
Function:SetKeyHandler Created on Apr 13, 2013 Updated on May 20, 2013 Description: Determine on which page the key is pressed and then continue. In:event Out:Media
function SetKeyHandler(event) { var key = event.charCode || event.keyCode || 0; var page = GetState("page"); switch(page) { case "movies" : SetMainKeyHandler(key, event); break; case "tvshows": SetMainKeyHandler(key, event); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetMainKeyHandler(key, event)\n{ \n $(\"#sort\").css(\"visibility\", \"visible\");\n \n // key between aA and zZ.\n if (key >= 65 && key <= 90) \n {\n gSTATE.PAGE = 1; \n gSTATE.SORT = String.fromCharCode(event.which).toUpperCase();\n }\n // key between 0 and 9.\n el...
[ "0.6501051", "0.64382374", "0.62879777", "0.62314874", "0.6215517", "0.61533505", "0.61520416", "0.61128443", "0.6105818", "0.60803974", "0.60790545", "0.60785115", "0.6067605", "0.6045565", "0.6038204", "0.60267025", "0.5982917", "0.59587604", "0.5948923", "0.593607", "0.593...
0.77838624
0
Function:SetMainKeyHandler Created on Apr 28, 2013 Updated on Nov 08, 2013 Description: Set the key from the keyboard and show the media table. In:key, event Out:Media
function SetMainKeyHandler(key, event) { $("#sort").css("visibility", "visible"); // key between aA and zZ. if (key >= 65 && key <= 90) { gSTATE.PAGE = 1; gSTATE.SORT = String.fromCharCode(event.which).toUpperCase(); } // key between 0 and 9. else if (key >= 48 && ke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetKeyHandler(event)\n{\n var key = event.charCode || event.keyCode || 0;\n var page = GetState(\"page\");\n \n switch(page)\n {\n case \"movies\" : SetMainKeyHandler(key, event);\n break;\n \n case \"tvshows\": SetMainKeyHandler(k...
[ "0.709941", "0.64823", "0.6121049", "0.6095538", "0.6095538", "0.60669565", "0.60655737", "0.5952966", "0.59107935", "0.5892366", "0.58656436", "0.5828236", "0.58104527", "0.57997763", "0.5793098", "0.5779869", "0.57734686", "0.5770428", "0.576541", "0.57563484", "0.57563096"...
0.7458677
0
Function:ConvertMedia Created on May 10, 2013 Updated on Jun 27, 2014 Description: Convert the media string to a more readable string. In:media Out:media
function ConvertMedia(media) { switch (media) { case 'movies' : media = "Movies"; break; case 'sets' : media = "Movie Sets"; break; case 'tvshows' : media = "TV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConvertMediaToSingular(media)\n{\n switch (media)\n {\n case 'movies' : media = \"Movie\";\n break;\n\n case 'titles' : media = \"Movie\";\n break; \n \n case 'sets' : media = \"Movie Set\";\n ...
[ "0.654841", "0.6012151", "0.56307274", "0.55075777", "0.5360234", "0.53309333", "0.53307563", "0.5319251", "0.5205595", "0.5093508", "0.50695693", "0.5031693", "0.4998841", "0.4998004", "0.49888068", "0.4976762", "0.4970143", "0.49246126", "0.49201864", "0.49031964", "0.48869...
0.7548607
0
Function:ConvertMediaToSingular Created on Sep 07, 2013 Updated on Jul 30, 2014 Description: Convert the media string to a singular string. In:media Out:media
function ConvertMediaToSingular(media) { switch (media) { case 'movies' : media = "Movie"; break; case 'titles' : media = "Movie"; break; case 'sets' : media = "Movie Set"; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConvertMedia(media)\n{\n switch (media)\n {\n case 'movies' : media = \"Movies\";\n break;\n \n case 'sets' : media = \"Movie Sets\";\n break; \n \n case 'tvs...
[ "0.68878937", "0.5416028", "0.529796", "0.5202127", "0.51707697", "0.505258", "0.50066215", "0.5002045", "0.48593128", "0.47760317", "0.47334862", "0.47207645", "0.47176445", "0.47045967", "0.4697858", "0.4680558", "0.46804333", "0.46690422", "0.46628058", "0.46628058", "0.46...
0.8119271
0
Function:ShowMediaTable Created on Apr 05, 2013 Updated on Jun 01, 2014 Description: Shows the media table. In:page, sort Out:Media Table
function ShowMediaTable(page, sort) { var media = GetState("media"); var type = GetState("type"); var title = GetState("title"); var level = GetState("level"); var genre = GetState("genre"); var year = GetState("year"); var mode = GetState("mode"); $("#header_mode").show(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowMediaTableList(json, media, type, mode)\n{\n var i = 0;\n var img, html = [];\n var hide, sub, noposter, label;\n \n // Clear thumbnail page.\n $('#display_thumb').hide().html(\"\");\n \n if (json.media[0].id != 0)\n {\n if (media != \"music\") {\n noposter ...
[ "0.7294289", "0.69195265", "0.6866697", "0.6587195", "0.6474299", "0.6259191", "0.6182537", "0.61756504", "0.6059694", "0.58814704", "0.5823046", "0.5786442", "0.57517594", "0.5734922", "0.569577", "0.5688837", "0.5684133", "0.56670094", "0.5635371", "0.5617435", "0.5594333",...
0.7324559
0
Function:ShowNextPrevButtons Created on Jun 30, 2013 Updated on Jun 30, 2013 Description: Shows next/prev arrows buttons on page. In:lastpage Out:Next/Prev
function ShowNextPrevButtons(lastpage) { // Show Prev and Next buttons if there is more than 1 page. if (lastpage > 1) { $("#prev").css("visibility", "visible"); $("#next").css("visibility", "visible"); } else { $("#prev").css("visibility", "hidden"); $("#nex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paginationPrevNext() {\n paginationPreviousButton.style.opacity = \"1\";\n paginationPreviousButton.style.pointerEvents = \"auto\";\n paginationNextButton.style.opacity = \"1\";\n paginationNextButton.style.pointerEvents = \"auto\";\n if (page == 1) {\n paginationPreviousButton.style.opacity = \"0...
[ "0.7579847", "0.7286892", "0.7188083", "0.70564276", "0.6984724", "0.6956446", "0.6938632", "0.69199455", "0.68495536", "0.6830508", "0.6803636", "0.67804193", "0.6775529", "0.6771722", "0.67437404", "0.6723631", "0.6695292", "0.66847473", "0.6675251", "0.66615903", "0.663306...
0.8445741
0
Function:ShowInfoHeader Created on Jul 01, 2013 Updated on Jun 29, 2014 Description: Shows the info header. In:type, title, sort, genre, year Out:Info header.
function ShowInfoHeader(type, title, sort, genre, year) { var info1 = "&nbsp;"; var info2 = "&nbsp;"; if (title) { info1 = title; } if (type != "movieset" && type != "seasons" && type != "episodes") { if (genre) { info1 = genre; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showHeader() \r\n{\r\n\tdocument.write('<P align=\\\"center\\\">');\r\n\tif (browserOK)\r\n\t{\r\n\t\tdocument.write('<FONT size=\\\"-1\\\"><I>Click on the plus symbol <IMG border=\\\"0\\\" src=\\\"plus.gif\\\" width=\\\"12\\\" height=\\\"12\\\" alt=\\\"+\\\"> to display additional comments, and the minus...
[ "0.6096219", "0.59192723", "0.5908046", "0.5899158", "0.5842237", "0.5838163", "0.57217795", "0.5672582", "0.56692445", "0.56505847", "0.56016856", "0.5580451", "0.5518872", "0.5518872", "0.5518872", "0.5518872", "0.5518872", "0.5518872", "0.55041516", "0.5489181", "0.5463221...
0.8180133
0
Function:ShowMediaTableThumbs Created on May 24, 2014 Updated on Jul 04, 2014 Description: Shows the media table with media as thumbnails. In:json, media, type, mode Out:Thumbs table
function ShowMediaTableThumbs(json, media, type, mode) { var i = 0, j = 0; var img, html = []; var hide, noposter; // Clear list page. $('#display_list').hide().html(""); if (json.media[0].id != 0) { if (media != "music") { noposter = 'images/no_poster.jpg'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowMediaTableList(json, media, type, mode)\n{\n var i = 0;\n var img, html = [];\n var hide, sub, noposter, label;\n \n // Clear thumbnail page.\n $('#display_thumb').hide().html(\"\");\n \n if (json.media[0].id != 0)\n {\n if (media != \"music\") {\n noposter ...
[ "0.7708538", "0.66977906", "0.6079471", "0.55906034", "0.5526018", "0.551151", "0.5461563", "0.5416672", "0.5401255", "0.53987646", "0.53640735", "0.5357967", "0.53555775", "0.5349562", "0.532246", "0.5297328", "0.52855486", "0.5248552", "0.5246654", "0.52383953", "0.5158519"...
0.8324117
0
Function:ShowMediaTableList Created on May 25, 2014 Updated on Jul 04, 2014 Description: Shows the media table with media in a list. In:json, media, type, mode Out:List table
function ShowMediaTableList(json, media, type, mode) { var i = 0; var img, html = []; var hide, sub, noposter, label; // Clear thumbnail page. $('#display_thumb').hide().html(""); if (json.media[0].id != 0) { if (media != "music") { noposter = 'images/no_poster.j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowMediaTableThumbs(json, media, type, mode)\n{\n var i = 0, j = 0;\n var img, html = [];\n var hide, noposter;\n \n // Clear list page.\n $('#display_list').hide().html(\"\");\n \n if (json.media[0].id != 0)\n {\n if (media != \"music\") {\n noposter = 'images...
[ "0.75257695", "0.696996", "0.6074338", "0.5942272", "0.5866088", "0.583419", "0.57918936", "0.573971", "0.56193155", "0.55575585", "0.5501848", "0.54896635", "0.54465955", "0.54458666", "0.5383453", "0.53781587", "0.53767186", "0.527154", "0.5249209", "0.5244647", "0.52417773...
0.7926746
0
Function:ShowBullets Created on Feb 28, 2014 Updated on Apr 14, 2014 Description: Shows the page bullets. In:lastpage, page, show, offset Out:Bullets
function ShowBullets(lastpage, page, show, offset) { var start, end, space; var left, right; var html = []; // Show the small bullets on the left side. left = Math.floor((page - 1)/show); if (left) { start = 1; end = left; space = -1; if (end > offset) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowLargeBullets(html, page, start, end)\n{ \n for (var i = html.length, j = start; j <= end; i++, j++)\n {\n if (j == page){ \n html[i] = '<div class=\\\"bullet active\\\">' + j + '</div>';\n } \n else {\n html[i] = '<div class=\\\"bullet\\\">' + j + '</d...
[ "0.7168372", "0.7031515", "0.6182284", "0.6145064", "0.61288035", "0.60807246", "0.5986346", "0.5986346", "0.5986346", "0.5986346", "0.59853756", "0.58525676", "0.5838713", "0.5823321", "0.57988846", "0.57936686", "0.5786602", "0.5739792", "0.56561786", "0.5622362", "0.556453...
0.87476283
0
Function:ShowLargeBullets Created on Mar 04, 2014 Updated on Mar 07, 2014 Description: Shows the large bullets. In:html, html, page, start, end Out:html
function ShowLargeBullets(html, page, start, end) { for (var i = html.length, j = start; j <= end; i++, j++) { if (j == page){ html[i] = '<div class=\"bullet active\">' + j + '</div>'; } else { html[i] = '<div class=\"bullet\">' + j + '</div>'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowSmallBullets(html, start, end, space, show, last)\n{\n var page;\n for (var i = html.length, j = start; j <= end; i++, j++) \n {\n if (j == space) {\n html[i] = '<div class=\\\"space\\\">&nbsp;</div>'; \n } \n else \n {\n if (last) \n ...
[ "0.7957852", "0.7396068", "0.5912494", "0.57795787", "0.5435397", "0.53814393", "0.52573824", "0.5229753", "0.5190457", "0.5184661", "0.5176293", "0.5176293", "0.5176293", "0.5176293", "0.5112396", "0.50937784", "0.5058992", "0.49778333", "0.49728316", "0.49728316", "0.497283...
0.8266321
0
Function:ShowSmallBullets Created on Mar 02, 2014 Updated on Apr 14, 2014 Description: Shows the small bullets. In:html, start, end, space, show, last Out:html
function ShowSmallBullets(html, start, end, space, show, last) { var page; for (var i = html.length, j = start; j <= end; i++, j++) { if (j == space) { html[i] = '<div class=\"space\">&nbsp;</div>'; } else { if (last) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowLargeBullets(html, page, start, end)\n{ \n for (var i = html.length, j = start; j <= end; i++, j++)\n {\n if (j == page){ \n html[i] = '<div class=\\\"bullet active\\\">' + j + '</div>';\n } \n else {\n html[i] = '<div class=\\\"bullet\\\">' + j + '</d...
[ "0.7191277", "0.6860434", "0.5900524", "0.575335", "0.5509285", "0.5139862", "0.5098051", "0.50917774", "0.50917774", "0.50917774", "0.50917774", "0.5073626", "0.5070214", "0.50634754", "0.5055982", "0.5029875", "0.4980297", "0.49796772", "0.49681142", "0.49153236", "0.491119...
0.8224155
0
sets location to about.html
function navToAbout() { location = "about.html" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toAbout() {\r\n window.location.replace('/about');\r\n }", "function aboutPage() {\n location.href = \"about.html\"\n}", "function goToAboutPage () {\n window.location.href = \"about.html\"\n}", "function gotoAbout() {\n location.href = \"about.html\";\n}", "function GoToAboutUs() {\n\twindow....
[ "0.7357527", "0.72455806", "0.69149274", "0.6885105", "0.6782344", "0.6752886", "0.66141164", "0.6240419", "0.6229191", "0.62042856", "0.6172715", "0.6129812", "0.6122607", "0.60517585", "0.6042383", "0.5996348", "0.5984745", "0.5971696", "0.5971696", "0.59552956", "0.5942815...
0.7384028
0
sets location to history.html
function navToHistory() { location = "history.html" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trx_addons_document_set_location(curLoc){\n \"use strict\";\n if (history.pushState===undefined || navigator.userAgent.match(/MSIE\\s[6-9]/i) != null) return;\n try {\n history.pushState(null, null, curLoc);\n return;\n } catch(e) {}\n location.href = curLoc;\n}", "shift(url...
[ "0.7030385", "0.67656374", "0.6724473", "0.67021906", "0.66994673", "0.66078216", "0.6600529", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689", "0.6592689",...
0.8137206
0
half finished code I got from cody after class for looping a function and retrieving it from local storage.
function retrieveEvent (){ for (var i=9; i <= 17; i++){ localStorage.getItem(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storage(getItemSetItem,variableNames,typ)\n{\n\t//console.log(\"zobbrazuji:\" + (window.localStorage.getItem(\"dataProfil\")));\n var arr = variableNames.split(\",\");\n for(var i=0;i<arr.length;i++)\n {\n console.log(\"storage: \"+ arr[i]);\n\n // pro getItem kontrola na null\n ...
[ "0.6350063", "0.6063159", "0.59680974", "0.59578186", "0.5932857", "0.5915671", "0.58714396", "0.583242", "0.58097553", "0.58015245", "0.58013874", "0.5799948", "0.579042", "0.57866865", "0.5779776", "0.5738219", "0.570298", "0.57006353", "0.5694993", "0.5685619", "0.5678015"...
0.6831649
0
Loads the previous pokemons and using the and HTML element
function load_prev() { var element = document.getElementById("number_input"); var number = parseInt(element.value); if (number < 100 && number <= pokemon_offset && number > 0) { pokemon_offset = pokemon_offset - (2 * number); clear_container(); load_pokemons(n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadPokemonData() {\n\tbuttonsOn(false);\n\tpokemon1 = idList[currentL];\n\tresp = await axios.get(`/api/pokemon/${idList[currentL]}`);\n\tpoke1 = resp.data;\n\tpokemon2 = idList[currentR];\n\tresp = await axios.get(`/api/pokemon/${idList[currentR]}`);\n\tpoke2 = resp.data;\n\tloadHTML(poke1, 1);\n\...
[ "0.6023777", "0.587102", "0.58309895", "0.5794281", "0.5765248", "0.5750874", "0.57106394", "0.5658667", "0.5649307", "0.56228024", "0.55854136", "0.55815715", "0.5579541", "0.5578993", "0.5566194", "0.555337", "0.55408937", "0.55335146", "0.5530502", "0.5529569", "0.55289674...
0.6037646
0
Cleans up the "pokemoncontainer" Element
function clear_container() { document.getElementById("pokemon-container").innerHTML = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetPuzzlePieces(){\n //empty the thumbnail container\n // debugger;\n \tpiecesBoards.innerHTML = \"\";\n \tcreatePuzzlePieces(this.dataset.puzzleref);\n // foreach has specify a callback function in the array\n // empty the drop zones\n dropZones.forEach(zone => {\n // removeChild\...
[ "0.711117", "0.6860502", "0.6724385", "0.65836984", "0.65796864", "0.6548703", "0.6507151", "0.6489321", "0.64798295", "0.6431993", "0.6413445", "0.6407172", "0.6400125", "0.63920367", "0.6336534", "0.63238335", "0.6307651", "0.6297023", "0.6295187", "0.6280656", "0.626494", ...
0.84727377
0