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
creates a year slider for filtering by year min and max are determined by years recorded in the dataset
function createYearSlider(){ const range = getYearRange() // create a range slider for the filter // modified from: https://materializecss.com/range.html const slider = document.getElementById('yearSlider'); noUiSlider.create(slider, { start: [range.low, range.high], connect: true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterByYearAndSlider() {\n if (running) {\n\n displayYear = displayYear + 1;\n if (displayYear > 2017) {\n displayYear = 2007;\n }\n slider.value = displayYear;\n yearDisplay.innerText = displayYear;\n }\n}", "function setMinMax(dataSet) {\r\n $(\"...
[ "0.78327596", "0.7661593", "0.75982213", "0.75089943", "0.73508006", "0.7331824", "0.7227333", "0.72213185", "0.72212124", "0.7198151", "0.7130783", "0.71213746", "0.6883271", "0.68629664", "0.6852284", "0.68505836", "0.68279475", "0.68279475", "0.68099576", "0.6779946", "0.6...
0.81313837
0
creates a run time slider for filtering by run time min and max are determined by run time in the data set
function createRuntimeSlider(){ const range = getRuntimeRange() // console.log(range) // create a range slider for the filter // modified from: https://materializecss.com/range.html const slider = document.getElementById('runtimeSlider'); noUiSlider.create(slider, { start: [range.low, ra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_timeslider(data){\r\n\t\tconsole.log(\"init_timeslider\");\r\n\t\tvar minDatum = data[0][selectedOptions.dateField];\r\n\t\tvar maxDatum = data[data.length-1][selectedOptions.dateField];\r\n\t\tdocument.getElementById(\"time_slider\").setAttribute(\"max\", data.length-1);\r\n\t}", "function sliderC...
[ "0.6787208", "0.66049093", "0.6445087", "0.6441154", "0.6308611", "0.6257159", "0.6114176", "0.6038033", "0.60307574", "0.5923833", "0.58787566", "0.5838748", "0.5826821", "0.5799174", "0.57941914", "0.57923585", "0.57852435", "0.5747574", "0.5743459", "0.57385933", "0.573246...
0.6966335
0
creates a language selector for filtering by language options are dynamically lfilled by whats in teh data set Null or "" were replaced with "Unknown"
function createLanguageSelector(){ let languages = getLanguages() languages = languages.sort() const languageSelector = document.getElementById("languageSelector"); languageSelector.innerHTML = "" for (const language of languages) { // modified from: https://stackoverflow.com/questions/17730...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeLanguage(languages) {\n for(var k in languages) {\n let opt = Utility.createNode('option', { \n value: k, innerHTML: languages[k]\n });\n $('#select-language').append(opt);\n }\n /*Translate.google_translate_support_lang().then(data => {\n const langs = data.data.langu...
[ "0.669868", "0.6638855", "0.64337397", "0.6433025", "0.6397268", "0.63898146", "0.6365635", "0.63349956", "0.6327713", "0.62200564", "0.6198317", "0.6137648", "0.6072487", "0.6016662", "0.60089165", "0.600868", "0.5962646", "0.5952182", "0.59068584", "0.58900476", "0.5866905"...
0.70431864
0
updates the objects key value for rating to be the function min to max
function filteredByRating(min, max){ filters.rating = { apply: (d) => d.imdb >= min && d.imdb <= max, min, max } applyFilters(false) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRubricMinScoreAgainstMax(max) {\r\n var min = viewModel.assessment.rubricMinScore;\r\n if (min > max) {\r\n viewModel.set('assessment.rubricMinScore', max);\r\n }\r\n }", "function updateMinMax() {\n min = parseInt(minValueField.value);\n max = parseInt(maxValueFi...
[ "0.6029552", "0.60176474", "0.5999247", "0.58696145", "0.5864666", "0.5786374", "0.5746484", "0.5706185", "0.56901705", "0.56792575", "0.5671983", "0.56429213", "0.56240904", "0.5622834", "0.55651146", "0.556272", "0.5562541", "0.55621177", "0.5552557", "0.5546956", "0.553394...
0.61805093
0
apply the filter and run the vis again
function applyFilters(fromReset){ // filter the data let data = getMediaData() if (filters.rating) data = data.filter(filters.rating.apply) if (filters.genres) data = data.filter(filters.genres) if (filters.language) data = data.filter(filters.language) if (filters.runtime) data = data.filter(fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectFilter() {\n createVisualization();\n}", "filter() {\n\n\n /** This is the representation of the fill column after the alt column filters have been applied to it. This data will be combined with the fillColFilterData when it is time to draw to the canvas.\n * @alias filteredAltColD...
[ "0.69405663", "0.68162906", "0.6720493", "0.6690221", "0.66266745", "0.66087914", "0.6489487", "0.6464215", "0.64562184", "0.64244646", "0.6370613", "0.6350637", "0.6343453", "0.6331633", "0.6292336", "0.62887037", "0.6277975", "0.62753856", "0.62589854", "0.6234616", "0.6230...
0.6830363
1
POPULATE THE DOM CONTENT ====================================== reset message thank you div
function resetMessageDom () { $("#successMsg").hide(); // $("#newWish").hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetMessageDivs() {\n gees.dom.clearHtml('ResponseMessage');\n gees.dom.clearHtml('status');\n gees.dom.clearHtml('globe');\n}", "function clearmessage(){\n\t$(\"#message\").html(\"<p></p>\");\n}", "function thanks() {\r\n\"use strict\";\r\ndocument.getElementById('thank').innerHTML = \"<div class...
[ "0.6897082", "0.68477374", "0.67612475", "0.6717177", "0.6625107", "0.65597284", "0.65192974", "0.64809775", "0.64478344", "0.64218855", "0.64024377", "0.6396378", "0.6377968", "0.634549", "0.63298804", "0.6312612", "0.6304376", "0.62997234", "0.6262953", "0.62587845", "0.625...
0.7437521
0
Populate all date fields from Firebase
async function populateDateFields (fb) { const query = document.querySelectorAll('.date_field'); eventFieldsDomList = Array.from(query); eventFieldsDomList.map(e => e.innerHTML = fb.events.date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpFields(fields){\n\n\t_.forEach(fields, function(value, key){\n\t\tif(value.type == 'date'){\n\t\t\t$scope.data.thisContent[value.field || value.key] = {\n\t\t\t\tstartDate: $scope.data.thisContent[value.field || value.key] || null,\n\t\t\t\tendDate: null //have to stub but don't use all the time\n\t\...
[ "0.66016495", "0.5745578", "0.5741045", "0.57117295", "0.5700807", "0.5675197", "0.56351113", "0.5519185", "0.5518367", "0.5508499", "0.55056995", "0.5504829", "0.5502234", "0.5396549", "0.5372155", "0.5356283", "0.5353221", "0.5352196", "0.53521264", "0.53279346", "0.5323908...
0.6453016
1
Function to format phone number inputs
function formatPhoneInput() { let inputNode = document.querySelector("#phone-input"); let originalCursorPosition = inputNode.selectionStart; let originalValue = inputNode.value; let validChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; let unformattedNumber = ""; for (let char of or...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function phoneFormatter() {\n\t\t$('#number').on('input', function () {\n\t\t\tlet number = $(this).val().replace(/[^\\d]/g, '');\n\t\t\tif (number.length == 7) {\n\t\t\t\tnumber = number.replace(/(\\d{3})(\\d{4})/, '$1-$2');\n\t\t\t} else if (number.length == 10) {\n\t\t\t\tnumber = number.replace(/(\\d{3})(\\d{3...
[ "0.82152337", "0.8108129", "0.79832727", "0.78421044", "0.78032947", "0.77826315", "0.7742471", "0.7725056", "0.76708734", "0.76391536", "0.76391536", "0.7634792", "0.76322025", "0.7443094", "0.7391562", "0.73735094", "0.7371285", "0.73013276", "0.72646374", "0.7248596", "0.7...
0.8119584
1
Function to manipulate table header html to display the correct sort icon with correct direction
function updateSortIcon() { // Remove previous downward sort icon, if it exists if (document.querySelector("th i.fa-sort-down")) { document.querySelector("th i.fa-sort-down").classList.remove("fa-sort-down"); } // Remove previous upward sort icon, if it exists if (document.querySelector("th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTableHeader() {\n return headers.map(({ name, field, sortable }, index) => {\n // specify icon classes\n const cls = [classes.sort_icon];\n if (sortingField === field && sortingOrder === 'desc') cls.push(classes.rotated);\n\n return (\n <th\n key={index}\n ...
[ "0.776546", "0.7214889", "0.7207482", "0.71102417", "0.6984208", "0.69262755", "0.68924516", "0.6833165", "0.66354793", "0.6624988", "0.660084", "0.65939814", "0.6593098", "0.65914327", "0.65906024", "0.65906024", "0.65906024", "0.65906024", "0.65906024", "0.65906024", "0.659...
0.76496357
1
read from database text to send it via mail to user test2 callback working
function getText(callback) { connection.query("SELECT text FROM mail_notif WHERE employees_id=?", [i], function (err, result) { if (err) throw err; callback((result.length > 0) ? result[0].text : ""); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendTextEmail() {\n email([EMAIL], null, null, null, this.state.text);\n }", "function uploadNote()\n {\n // Get the content of email and then calls the 'callback' function.\n var item = Office.context.mailbox.item.body.getAsync(\"text\", callback);\n }", "function getMail(callback) {\r...
[ "0.6044768", "0.59665495", "0.5779634", "0.56597066", "0.5557487", "0.5556599", "0.5541372", "0.55372906", "0.5462343", "0.54621476", "0.54420763", "0.54009145", "0.53953636", "0.5392798", "0.5387185", "0.5387011", "0.5383705", "0.53588414", "0.53555655", "0.53443736", "0.532...
0.64475656
0
updates the position of the CPU striker according to the vertical coordinate of the puck
function moveCPUStriker() { var yDelta = puckPosY - cpuStrikerPosY; if (yDelta !== 0) { cpuStrikerPosY += cpuStrikerSpeed * (yDelta / Math.abs(yDelta)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUpdatePosition() {\n gridDotUpper.position = position;\n gridDot.position = position;\n gridDotMiddle.position = position;\n\n if (guitarString) {\n guitarString.updateDotPosition(self);\n }\n }", "updatePosition() {\n this.handleWrapping();\n this.x += this.vx...
[ "0.63642997", "0.61462814", "0.612312", "0.61111706", "0.6072513", "0.6044441", "0.6021535", "0.5961713", "0.595827", "0.59111786", "0.58824813", "0.5834022", "0.5817463", "0.58091843", "0.57775986", "0.57753575", "0.5738198", "0.5732108", "0.57314754", "0.57256734", "0.57173...
0.74567854
0
reset the puck position in the event of a goal
function resetPuck() { puckPosX = c.width / 2; puckPosY = c.height / 2; puckDirX = 0; puckDirY = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetPlayerPos () {\n player.x = 200;\n player.y = 400;\n this.gotGift = true;\n }", "resetState() {\n this._movements = 0;\n }", "resetPos() {\n this.x = 2 * this.rightLeft;\n this.y = 4 * this.upDown + 54;\n }", "resetPosition() {\n\t\tAnimated.spring(this.state.pos...
[ "0.7242871", "0.72248", "0.7168808", "0.7077942", "0.7048528", "0.7036975", "0.6983315", "0.6964474", "0.6959107", "0.6951054", "0.694996", "0.6926476", "0.6861003", "0.6857024", "0.6855127", "0.6826859", "0.6808265", "0.67805415", "0.67742753", "0.6731174", "0.67174107", "...
0.7802704
0
reset the striker positions in the event of a goal
function resetStrikers() { if (home) { playerStrikerPosX = 0.2 * c.width; cpuStrikerPosX = 0.8 * c.width; } else { playerStrikerPosX = 0.8 * c.width; cpuStrikerPosX = 0.2 * c.width; } cpuStrikerPosY = 0.5 * c.height; pla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetState() {\n this._movements = 0;\n }", "resetPlayerPos () {\n player.x = 200;\n player.y = 400;\n this.gotGift = true;\n }", "resetSkier () {\n \n this.isJumping =false;\n this.setDirection(this.direction);\n }", "reset() {\n this._objInfo....
[ "0.70556855", "0.66617316", "0.66484636", "0.6572333", "0.6543569", "0.65099394", "0.6495316", "0.647855", "0.6466087", "0.6458823", "0.64549273", "0.64524335", "0.6434146", "0.6404296", "0.640321", "0.6377526", "0.63723165", "0.6344312", "0.6316699", "0.63085127", "0.6307166...
0.70868045
0
increments the period and resets the rink
function nextPeriod() { resetPuck(); resetStrikers(); periodNum += 1; period.innerHTML = "PERIOD " + periodNum; seconds = 30; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NextPeriod()\n{\n\tif(boolSaveChanges || bSelectChanged)\n\t\tSaveChanges(\"MoveToNextPeriod()\", \"Period\")\n\telse\n\t\tMoveToNextPeriod()\n}", "reset() {\n this.interval = 1000;\n }", "function rePPOne() {\n deletePayPeriod(1);\n}", "reset() {\n this.timer = 500;\n this.inte...
[ "0.631118", "0.62407815", "0.60375357", "0.59917986", "0.587074", "0.5840256", "0.5608807", "0.5580081", "0.55705845", "0.5565783", "0.5560999", "0.5552284", "0.5533077", "0.5527856", "0.55147696", "0.5513764", "0.5510394", "0.55013454", "0.54865855", "0.5479944", "0.54739845...
0.6856182
0
Every entity has a maximum speed limit. Intentional movement speed and external force movement speed are treated separately.
doMaxSpeedLimit (timeStep) { // Limit max move speed if (this.moveMaxSpeed >= 0) { const correctedSpeed = Math.min(this.moveMaxSpeed, this.moveSpeed) const moveAngle = this.moveAngle this.moveX = correctedSpeed * Math.cos(moveAngle) this.moveY = correctedSpeed * Math.sin(moveAngle) }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constrainSpeed(maxSpeed) {\n if (this.velocity.magSq() > maxSpeed * maxSpeed)\n this.velocity.setMag(maxSpeed);\n }", "update () {\n let max = this.maxSpeed * this.dt;\n // if (!isNaN(max) && this.steeringForce.length() > 0) {\n this.steeringForce = this....
[ "0.7295972", "0.6564142", "0.65252084", "0.6466163", "0.64013666", "0.6308161", "0.6298227", "0.6285381", "0.6281134", "0.62644553", "0.61998713", "0.61614203", "0.6145519", "0.603506", "0.6021482", "0.5995015", "0.5972975", "0.595949", "0.5933871", "0.57841855", "0.57590854"...
0.74858725
0
Get the account and project name using a user and Expo config. This will validate if the owner field is set when using a robot account.
getProjectOwner(user, exp) { if (user.kind === 'robot' && !exp.owner) { throw new (_internal().XDLError)('ROBOT_OWNER_ERROR', 'The "owner" manifest property is required when using robot users. See: https://docs.expo.dev/versions/latest/config/app/#owner'); } return exp.owner || user.username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getGitUserAndEmail() {\r\n const userName = await spawnGit([\"config\", \"--global\", \"user.name\"]);\r\n const email = await spawnGit([\"config\", \"--global\", \"user.email\"]);\r\n\r\n if (!userName.length || !email.length) this.sendMessage({ type: \"userNotConfigured\" });\r\n\r\n ...
[ "0.6326673", "0.60357517", "0.587709", "0.58454514", "0.5833825", "0.57194585", "0.56616485", "0.55245537", "0.5480681", "0.5469157", "0.54369116", "0.53143525", "0.53024757", "0.5269872", "0.52298594", "0.5197643", "0.51545334", "0.5149355", "0.5133753", "0.50823414", "0.507...
0.76959383
0
Logs in a user for a given login type. Valid login types are: "userpass": Username and password authentication If the login type is "userpass", we directly make the request to www to login a user.
async loginAsync(loginType, loginArgs) { if (loginType === 'user-pass') { if (!loginArgs) { throw new Error(`The 'user-pass' login type requires a username and password.`); } const apiAnonymous = _internal().ApiV2.clientForUser(); const loginResp = await apiAnonymous.postAsync('aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function api_login(user, pass){\n\t\tif(!isBlank(main_data.login.un) && !isBlank(main_data.login.pass)){\n\t\t\tvar myJSON = {\"_object\":\"auth\",\"_action\":\"login\",\"_source\":main_data.login.method,\"email\":main_data.login.un,\"password\":main_data.login.pass};\n\t\t\tapi_get(myJSON,api_login_callback);\n\t...
[ "0.6891293", "0.6714658", "0.6677029", "0.6289115", "0.62435734", "0.62321824", "0.6223657", "0.6223657", "0.62207824", "0.61790687", "0.61690986", "0.6151321", "0.61480606", "0.6131736", "0.6127041", "0.61108345", "0.60993654", "0.6096437", "0.6095599", "0.60903656", "0.6082...
0.6818609
1
Returns cached user data without hitting our backend. Only works for 'UsernamePasswordAuthentication' flow. Does not work with 'AccessTokenAuthentication' flow. Get the current user based on the available token. If there is no current token, returns null.
async getCurrentUserAsync(options) { await this._getSessionLock.acquire(); try { const currentUser = this._currentUser; // If user is cached and there is an accessToken or sessionSecret, return the user if (currentUser && (currentUser.accessToken || currentUser.sessionSecret)) { return cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cachedUser() {\n return cachedUserInfo;\n}", "async getCurrentUser() {\n const options = this.buildOptions({\n path: `${this.path}/user`,\n method: \"get\",\n body: {},\n });\n\n return this.apiCall(options);\n }", "function getUserFromToken() {\n const token = getToken();...
[ "0.68420565", "0.68093425", "0.6800618", "0.66771835", "0.6632023", "0.6546754", "0.64609283", "0.643925", "0.64231926", "0.63948387", "0.6390512", "0.63502115", "0.630849", "0.6267935", "0.62527215", "0.624274", "0.6233765", "0.6225478", "0.6182929", "0.6180221", "0.6174847"...
0.70672333
0
Get the current user and check if it's a robot. If the user is not a robot, it will throw an error.
async getCurrentRobotUserOnlyAsync() { const user = await this.getCurrentUserAsync(); if (user && user.kind !== 'robot') { throw new (_internal().XDLError)('USER_ACCOUNT_ERROR', 'This action is not supported for normal users.'); } return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRobot(data) {\n return (data.user &&\n data.user.logged_in &&\n data.user.approved &&\n (data.user.role === 'robot'));\n}", "async getCurrentUserOnlyAsync() {\n const user = await this.getCurrentUserAsync();\n\n if (user && user.kind !== 'user') {\n throw...
[ "0.71772885", "0.67034227", "0.5642816", "0.5489442", "0.5480982", "0.5470623", "0.5460249", "0.545681", "0.54461145", "0.5371464", "0.53229225", "0.530282", "0.5301987", "0.5274027", "0.5231725", "0.5153536", "0.51493984", "0.514749", "0.51442194", "0.5127128", "0.5087219", ...
0.72757435
0
Make the character fade between an idle and a run animation when the player starts to move.
function Update () { if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1) anim.CrossFade("run"); else anim.CrossFade("idle"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Start () { \r\n animation.wrapMode = WrapMode.Loop; \r\n animation.Stop(); \r\n Idle();\r\n}", "function Start() {\n\t// set animation wrap modes for player avatar\n\tcharDummy.animation[\"death\"].wrapMode = WrapMode.ClampForever;\n\tcharDummy.animation[\"hit\"].wrapMode = WrapMode.Once;\n\tch...
[ "0.6783634", "0.656824", "0.63810754", "0.62557274", "0.62329143", "0.6224555", "0.6224555", "0.6215695", "0.6215679", "0.62020326", "0.6199786", "0.61560863", "0.61508125", "0.61023545", "0.60938644", "0.6078535", "0.60413915", "0.60375977", "0.598637", "0.5977657", "0.59701...
0.6757374
1
Returns an array of distinct matches;
static getDistinctMatches () { return new Promise(function (resolve, reject) { Database.connection.query( 'SELECT DISTINCT match_id FROM predictions', function (err, rows) { if (err) { reject(err) } resolve(rows) } ) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "distinct() {\n return this.reduce(\n (seen, element) => {\n if (!seen.includes(element)) {\n seen.push(element);\n }\n return seen;\n },\n []\n );\n }", "function findUniques(a){\n let result = []\n for (num of a){\n let match = false;\n for...
[ "0.66942453", "0.65121764", "0.6492176", "0.6329344", "0.6228", "0.62198824", "0.6189068", "0.60928273", "0.6073508", "0.6054212", "0.60387486", "0.6005266", "0.6004127", "0.5947444", "0.5940345", "0.5933943", "0.5902595", "0.5867868", "0.5859012", "0.5856505", "0.5850129", ...
0.68920404
0
Deletes predictions with concluded matches from the database
static deletePredictions (id) { return new Promise(function (resolve, reject) { Database.connection.query( `DELETE FROM predictions WHERE match_id=${id}`, function (err, rows) { if (err) { return Logger.error(`[SQL] Could not DELETE from PR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearPreds() {\n let predImage = document.querySelector('.pred-image');\n let labelInfo = document.querySelector('.label-description');\n let slider = document.querySelector('.slider');\n slider.removeChild(predImage);\n slider.removeChild(labelInfo);\n document.querySelector('#get-predictions').sty...
[ "0.5874553", "0.58560866", "0.56881756", "0.54165596", "0.5224582", "0.51970613", "0.5129079", "0.5099544", "0.5091507", "0.5063023", "0.5018624", "0.50065565", "0.50039613", "0.49601734", "0.49586987", "0.49478218", "0.49411744", "0.49386415", "0.49385178", "0.49367106", "0....
0.68657106
0
use Google Sheet web API to get layout for course
function _getCourseInfoLayout (callback) { _setNotice('loading layout for course...'); fetch(_buildApiUrl('layout', settings.coursekey)) .then((response) => response.json()) .then((json) => { //console.log('json.status=' + json.status); if (json.status !== 'success') { _setNotice(json.message)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDepartment(dept, sheet, minSems){\n if(dept == undefined){ \n throw \"ERROR: NO DEPARTMENT SPECIFIED\";\n return;\n }\n if(sheet == undefined){\n sheet = SpreadsheetApp.openByUrl(\"https://docs.google.com/spreadsheets/d/11tRpkgU0JoV_qTa_KsI8yEO6aLz8KY9wtGmIQXkdaXs/edit#gid...
[ "0.5931675", "0.5914672", "0.57574105", "0.5685091", "0.557905", "0.5429997", "0.5428464", "0.54255086", "0.5418067", "0.5371904", "0.5359438", "0.53428847", "0.530627", "0.5241175", "0.52238476", "0.52156055", "0.5209841", "0.51852304", "0.5179121", "0.5174873", "0.51612926"...
0.657107
0
Retrieve all films in plain text
function allFilmsText(){ console.log("allFilmsText Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=string", "#results", "text"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function showallfilms(films) {\n items.innerHTML = \"\";\n for (var i=0;i<films.length;i++){\n items.innerHTML +=...
[ "0.62993246", "0.602434", "0.5967408", "0.58365", "0.57909733", "0.56356215", "0.56196475", "0.5550588", "0.5529781", "0.55269057", "0.54140234", "0.53957725", "0.538021", "0.52360886", "0.5234109", "0.5229354", "0.51702505", "0.51625395", "0.51563543", "0.5142658", "0.512589...
0.6365667
0
Retrieve all films as json
function allFilmsJSON(){ console.log("allFilmsJSON Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=json", "#results", "json"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function GetFilms() {\n $.ajax({\n url: \"/api/films\",\n type: \"GET\",\n contentType...
[ "0.7484855", "0.67432845", "0.6555464", "0.64135325", "0.6287405", "0.6222295", "0.6209996", "0.6093518", "0.6049365", "0.6018124", "0.6012009", "0.59683436", "0.5945824", "0.5904802", "0.5870994", "0.5838105", "0.58233804", "0.5813349", "0.58112305", "0.57924783", "0.5777623...
0.718542
1
Retrieve all films as xml
function allFilmsXML(){ console.log("allFilmsXML Clicked"); insertAjaxResult("https://eloquent-yew-227217.appspot.com/GetAllFilms?format=xml", "#results", "xml"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllFilms() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/films\");\n\n const response = await responseData.json();\n\n return response;\n }", "function showallfilms(films) {\n items.innerHTML = \"\";\n for (var i=0;i<films.length;i++){\n items.innerHTML +=...
[ "0.603631", "0.592544", "0.5823774", "0.5707611", "0.5580072", "0.5558011", "0.55178654", "0.5384213", "0.537906", "0.5371391", "0.5346617", "0.53352535", "0.532201", "0.5294087", "0.5286781", "0.52657443", "0.5247863", "0.522775", "0.5142333", "0.51271546", "0.5124222", "0...
0.7301042
0
Searching for data for one film with radio buttons for each type (json,xml,text)
function searchFilm(){ var checkJSON = $('#radio-4').prop('checked'); var checkXML = $('#radio-5').prop('checked'); var checkSTRING = $('#radio-6').prop('checked'); var formatValue; var movieName = $("#movieName").val(); if(checkJSON == true){ formatValue = "json"; } else if(checkXML == true){ fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchFilmName(){\n\t var checkJSON = $('#radio-7').prop('checked');\n\t var checkXML = $('#radio-8').prop('checked');\n\t var checkSTRING = $('#radio-9').prop('checked');\n\t var formatValue;\n\t var movieName = $(\"#movieNameName\").val();\n\t movieName = encodeURIComponent(movieName.trim());\n\n\...
[ "0.65453905", "0.6461823", "0.6271259", "0.6164069", "0.6109039", "0.606818", "0.60309917", "0.6004584", "0.5941981", "0.59335196", "0.5922275", "0.58942086", "0.5880765", "0.5863567", "0.585908", "0.58584505", "0.58108884", "0.5792101", "0.57852256", "0.57834375", "0.5759288...
0.68464357
0
Updating results for insert all films as xml
function insertXML(text, resultRegion, address) { $(resultRegion).html(""); console.log(text); var xmlObject = $(text).find("film").each(function(){ var id = $(this).find("id").text(); var title = $(this).find("title").text(); var year = $(this).find("year").text(); var director = $(this).find("director").te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFilmsXML(){\n console.log(\"allFilmsXML Clicked\");\n insertAjaxResult(\"https://eloquent-yew-227217.appspot.com/GetAllFilms?format=xml\", \"#results\", \"xml\");\n}", "function showSearchXmlFilmInfo(responseText) {\n var xmlDocument = responseText;\n var films = xmlDocument.getElementsByTagN...
[ "0.7022471", "0.58032227", "0.5350247", "0.5237386", "0.5150121", "0.5050606", "0.49571896", "0.49242768", "0.49139178", "0.4900817", "0.48700637", "0.48270053", "0.4814382", "0.48003456", "0.47931507", "0.47888234", "0.47732472", "0.47727558", "0.47694895", "0.47652796", "0....
0.5999771
1
3. val_ie funcion validar si es esta usando ie y no usar preventDefault
function val_ie(event){ if (event.preventDefault) { event.preventDefault(); }else{ event.returnValue = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validerAmEdi(){\n var result=true;msg=\"\";\n if(document.getElementById(\"txtedNomEditeur\").value==\"\")\n msg=\"ajouter un Nom d'Editeur s'il te plait\";\n // if(msg==\"\" && document.getElementById(\"cboxedPays\").value==0)\n // msg=\"ajouter un pays s'il te plait\";\n if(msg==\"\" && docume...
[ "0.6428197", "0.64013064", "0.6310463", "0.6303928", "0.6247519", "0.61460096", "0.6142362", "0.6132334", "0.6123498", "0.61158645", "0.6107241", "0.6106448", "0.60723394", "0.6055793", "0.6033365", "0.602909", "0.6027064", "0.6022683", "0.60208446", "0.60206366", "0.6020563"...
0.7323643
0
14. removeStyle funcion para quitar los estilos inline de las tablas
function removeStyle(tabla){ tabla.removeAttr('style'); var th = tabla.children('thead').children('tr').children('th');//para quitar los estilos de los th $.each(th,function(index, child){ $(child).removeAttr('style'); $(child).removeAttr('aria-label'); $(child).removeAttr('ari...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeInlineStyle() {\n const that = this,\n tabStrip = that.$.tabStrip;\n\n if (that._inlineStyleTabStripChildren) {\n const tabStripChildren = tabStrip.children;\n\n for (let i = 0; i < tabStripChildren.length; i++) {\n tabStripChildren[i].removeAttr...
[ "0.6993515", "0.6960619", "0.64179397", "0.6383201", "0.63197136", "0.6319074", "0.6317999", "0.6305767", "0.62147135", "0.6149531", "0.6123079", "0.6101956", "0.6101321", "0.6091296", "0.6085713", "0.60790914", "0.6069092", "0.60622406", "0.60459894", "0.5995485", "0.5981898...
0.7730845
0
17. chg_array_value se verifica en el array de las paginas para colocar que se seleccionaron todos los elementos de esa pagina
function chg_array_value(paginas,value){ $.each(paginas, function(index, pagina){ if(pagina['className'] === 'paginate_active'){ $.each(array_pag,function(index,obj_pag){ if(array_pag[index][0] === parseInt(pagina['innerHTML'])){ array_pag[index][1] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeValueInArray(id, nameOfVariable, valuetoChange, nameofArray) {\r\n\r\n// code that makes changes in the programmingButtonArray or the programmingLinksArray.\r\n// this function is needed for bens open frameworks code to change the values within your code\r\n// you can use the atomicUpdateArray() fun...
[ "0.59711766", "0.58771384", "0.5800333", "0.5690381", "0.56678885", "0.56551623", "0.55623215", "0.5537246", "0.54908544", "0.5441999", "0.5365634", "0.53284967", "0.5315559", "0.53123015", "0.5308221", "0.5303016", "0.5299545", "0.5295176", "0.5288846", "0.5258363", "0.52500...
0.80014485
0
19. existe_pag funcion de validacion si la pagina existe en el array de paginas, sino existe se agrega al array de paginas
function existe_pag(pag_active,tabla,sel_all){ var exist; for (i = 0; i < array_pag.length; i++) { if(array_pag[i][0] === parseInt(pag_active)){ exist = true; break; }else{ exist = false; } } if(!exist){ //en caso que la pagina no este ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consultarTuplasExistentesPaginacion_pagina(pagina) {\n\t$(\"#template_celdaPaginacion\").hide();\n\t$(\"#contenedorConsulta\").html(\"Cargando...\");\n\t\n\tarrayCamposConsulta[\"pagina\"] = pagina;\n\t\n\tvar ajax = $.ajax({\n\t\turl: \"lib_php/\"+nombrePHPConsultar,\n\t\ttype: \"POST\",\n\t\tdataType: \...
[ "0.61180824", "0.61180824", "0.59333277", "0.59333277", "0.58743125", "0.58223325", "0.5724792", "0.5720725", "0.5679904", "0.5678522", "0.5628316", "0.5554109", "0.5508507", "0.55025446", "0.547595", "0.53917503", "0.53406453", "0.5311172", "0.5283919", "0.52263904", "0.5223...
0.78351605
0
20. chk_a funcion de validacion del checkbox de seleccionar todo cada ves que cambia de pagina
function chk_a(tabla){ var new_array_pag=new Array(); var temp_array_pag=new Array(); var index,i=0; var sel_all = $($(tabla).children('thead')[0]).children('tr').children('th').children('input'); var paginas = $(tabla+'_wrapper').children('div'+tabla+'_paginate').children('span').children...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valida(){\n \n ida = document.getElementsByName(\"ida_vuelo\");\n\n var seleccionado = false;\n\n for(var i=0; i<ida.length; i++) { \n if(ida[i].checked) {\n seleccionado = true;\n break;\n }\n }\n \n if(!seleccionado) {\n\n alert(\"Debe seleccionar ...
[ "0.7679352", "0.7109331", "0.7095369", "0.70637274", "0.69876724", "0.6911114", "0.6848413", "0.66662025", "0.66224915", "0.6612846", "0.660058", "0.6578818", "0.65677077", "0.6562059", "0.6527889", "0.65229964", "0.6453365", "0.64451504", "0.6441843", "0.64225465", "0.636856...
0.7265221
1
22. con_ped_cab funcion que consulta los pedidos y los muestra en la tabla
function con_ped_cab(event){ var tabla,json,linea,arrayValores,paginas,paginadores; val_ie(event); val_flag(); val_sesion(event); $.ajax({ url: "con_ped.php", type: "POST", cache: false, beforeSend: function () { console.log('empezando proceso'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarDatosPedidoChef1(idPedido){\n\tvar txt = '<h5>Encabezado pedido '+ pedidos[i][\"idPedido\"] +' </h5>';\n\tvar txt = '<table class=\"table table-hover table-striped\">';\n\ttxt +='<thead><tr><th>Descripcion</th><th>Cantidad</th><th>Valor Uunit.</th><th>Total</th></thead>';\n\ttxt +='<tr><td>Churrasco...
[ "0.6029574", "0.59801364", "0.58545274", "0.5817684", "0.57945335", "0.576263", "0.5755034", "0.5749676", "0.5729043", "0.567736", "0.56454283", "0.5610425", "0.5577135", "0.55640167", "0.554718", "0.5518897", "0.55168", "0.54987836", "0.54911333", "0.5489413", "0.5484561", ...
0.6631844
0
enable or disable 'play in loop' mode, default change state in toggle mode
loop(on = !this.loop) { // @todo this.loop not exists! this.mode = on ? MODE_LOOP : MODE_PLAY }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleRepeat() {\n if(audioPlayer.loop === true) {\n audioPlayer.loop = false;\n repeatToggle.toggleClass(\"btn__loop--enabled\");\n } else {\n audioPlayer.loop = true;\n repeatToggle.toggleClass(\"btn__loop--enabled\");\n }\n}", "toggle() {\n if (this._playingState === 'idle') {\n...
[ "0.7381236", "0.72821546", "0.7176242", "0.71607137", "0.71417767", "0.7131452", "0.7114427", "0.7114427", "0.7114427", "0.7114427", "0.7114427", "0.7092974", "0.7029037", "0.7002171", "0.6972738", "0.69687563", "0.69687563", "0.69265723", "0.68293124", "0.6821655", "0.681399...
0.804061
0
enable or disable muted, default change state in toggle mode
mute(on = !this.muted) { this.muted = on }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleMute() {\n if (this.get('isMuted')) {\n this.set('volume', this.get('unmuteVolume'));\n }\n else {\n this.set('volume', 0);\n }\n }", "function muteOrUnmute() {\n video.muted = !video.muted;\n mutebutton.value = video.muted ? 'Unmute' : 'Mute';\n}", "function toggleMute() {\n ...
[ "0.74449813", "0.71514255", "0.7083768", "0.7067099", "0.7018488", "0.6982144", "0.6841047", "0.68211925", "0.675787", "0.67570484", "0.6735495", "0.67299545", "0.6722857", "0.6676351", "0.6675486", "0.666941", "0.6644992", "0.6629853", "0.6599219", "0.6589889", "0.6583378", ...
0.730948
1
They are good at taking orders, but they don't know how to capitalize words, or use a space bar! All the orders they create look something like this: "milkshakepizzachickenfriescokeburgerpizzasandwichmilkshakepizza" The kitchen staff are threatening to quit, because of how difficult it is to read the orders. Their pref...
function getOrder(input) { // split into individual characters const splitOrder = input.split(""); // unsorted order array const orderArr = []; // temp variable for each order item let orderItem = ""; // loop through characters to create order items for (let i = 0; i < splitOrder.length;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acronym(word){\r\n //take in string and return new string with first letter of each word\r\n //\"self contained underwater breathing apparatus\"\r\n //-> \"SCUBA\"\r\n newWord = \"\";\r\n prevSpace = true;\r\n for(let i = 0; i < word.length; ++i){\r\n if(word[i] != \" \" && prevSp...
[ "0.61631304", "0.61458474", "0.61324936", "0.6114756", "0.6017866", "0.6010531", "0.5995309", "0.59507316", "0.59086007", "0.58983815", "0.58657086", "0.58590245", "0.5857666", "0.5846499", "0.58433723", "0.5833487", "0.5825791", "0.5817294", "0.5815572", "0.5782803", "0.5768...
0.6371584
0
TODO this should be a prototype function like the rest / This function resets (or initializes) the jumping animations
function resetJumpingAnimation(player) { player.animations.right[JUMPING] = new Animation(dwarfRight, player.spriteSize.x, player.spriteSize.y, player.spriteSize.y * 3, player.spriteSize.x, 3, 0.1, true, null, true); player.animations.left[JUMPING] = new Animation(dwarfLeft, player.spriteSize.x, player....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetJump() {\n this.z = 0;\n this.verticalVelocity = null;\n }", "reset() {\n this.yPos = this.groundYPos;\n this.jumpVelocity = 0;\n this.jumping = false;\n this.ducking = false;\n this.update(0, Trex.status.RUNNING);\n this.midair = false;\n this.speedDrop = false;\n t...
[ "0.7434881", "0.72375727", "0.71492183", "0.7115256", "0.71064276", "0.69790524", "0.69130456", "0.6900733", "0.6886642", "0.6815983", "0.67119604", "0.6620972", "0.6615754", "0.66030014", "0.658014", "0.6570695", "0.6539962", "0.6523652", "0.648233", "0.6481484", "0.6457119"...
0.78592455
0
Update widget UI based on status
function updateUI(status) { ui_status = status; if (ui_status === UI_NO_RESPONSE) { } else if (status === UI_DONE) { // Leds leds.show(); // Spinner spinner.hide(); } else if (status === UI_WAITING) { // Button leds.hide(); // Spinner spinner.show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static tickUiUpdate() {\n // Fill badge data\n let updateParcel = {\n text: \"\",\n color: \"#d352ad\",\n tooltip: \"\"\n };\n\n this.setUpdateObjTexts(updateParcel);\n\n // Apply to UI\n if (this.networkOk) {\n this.applyBadgeCo...
[ "0.7082267", "0.70480657", "0.68539083", "0.6816267", "0.6688856", "0.66492116", "0.659456", "0.65839803", "0.6547893", "0.6455714", "0.6426828", "0.6393643", "0.6383343", "0.63781166", "0.63738406", "0.6357595", "0.6330902", "0.63284373", "0.6310802", "0.6291562", "0.6266916...
0.7698556
0
Adds content to Footer
createFooter(footer) { footer.appendChild(footerTemplate.content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendFooter(){\n var footer = \"<div class='footer'>\";\n footer += \"<center><div class='copyrightText'>&copy; 2017 ITEE Group Canada</div></center>\";\n footer += \"</div>\";\n $('body').append(footer);\n }", "function insertFooter () {\n \"use strict\";\n try {\n...
[ "0.7676134", "0.7307338", "0.7305253", "0.72496825", "0.7103195", "0.70680934", "0.70506424", "0.6942721", "0.6910287", "0.68720347", "0.6856142", "0.68537635", "0.6839219", "0.6769875", "0.67662483", "0.6756002", "0.67289454", "0.6706619", "0.6698485", "0.6611359", "0.656569...
0.7942572
0
Take the content in the 'AddComment' field, send it to the db to be save, and if this is successful, show the comment in html Create our callbacks (both good and evil)
function successfulCallback(data) { if( data["flag"]!=0 ) { console.log("Error: Failed to add comment :("); return false; } // Get the comment div var comment_div = data["comment_div"]; console.log("Comment Div:"); console.log(comment_div); // Clear the editable comment and add // the new comment t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCommentClick(event){\n\n event.stopPropagation();\n \n //get user inputs\n var comTitle = $('input[name=\"commTitle\"]').val().trim();\n var comContent = $('textarea[name=\"commContent\"]').val().trim();\n\tvar articleId = $('article[data-value]').attr('data-value');\n\tvar errorComment ...
[ "0.7144222", "0.7025924", "0.692378", "0.6916028", "0.68264157", "0.6817973", "0.67024344", "0.6679954", "0.66771466", "0.6621163", "0.65821487", "0.65738726", "0.65490574", "0.6528184", "0.64968", "0.6490924", "0.6488116", "0.6486194", "0.64847744", "0.64759207", "0.6475655"...
0.7136796
1
Retrieving an icon for the card's header:
function retrieveHeaderIcon(iconNum) { iconNum = iconNum ? iconNum : 0 switch(iconNum) { // Devices Cards case '1': return <FontAwesomeIcon icon={faMapMarkedAlt}/>; // Warehouses Cards case '2': return <FontAwesomeIcon icon={faBox}/>; case '3': return <FontA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getCardIcon(name) {\n\t\t//Get all of the card icons\n\t\tvar all = document.getElementById(\"bottombar\").getElementsByTagName(\"div\");\n\t\t//Find the one\n\t\tfor(var i = 0; i < all.length; i++) {\n\t\t\t//Check\n\t\t\tif(all[i].getAttribute(\"cardname\") == name) {\n\t\t\t\treturn all[i];\n\t\t\t}\n\t\...
[ "0.66242826", "0.6618082", "0.65170133", "0.6503699", "0.64136094", "0.63688755", "0.63534284", "0.63065153", "0.6278361", "0.625415", "0.6183666", "0.61366606", "0.60930717", "0.60848516", "0.60804886", "0.607332", "0.60324234", "0.59609276", "0.594217", "0.5928092", "0.5901...
0.7692812
0
Retrieving an icon for the card's footer:
function retrieveFooterIcon(iconNum) { iconNum = iconNum ? iconNum : 0 switch(iconNum) { // Devices Cards case '1': return <FontAwesomeIcon icon={faMapMarkerAlt} style={{width: '20px', height: '20px'}} />; // Warehouses Cards case '2': return <FontAwesomeIcon icon={faWare...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get_icon(dt) { return dt ? \"icons:close\" : \"icons:arrow-back\"; }", "static getCardIcon(name) {\n\t\t//Get all of the card icons\n\t\tvar all = document.getElementById(\"bottombar\").getElementsByTagName(\"div\");\n\t\t//Find the one\n\t\tfor(var i = 0; i < all.length; i++) {\n\t\t\t//Check\n\t\t\tif(all[i].g...
[ "0.6722481", "0.6497497", "0.6428209", "0.6385484", "0.6252603", "0.6178428", "0.61434716", "0.6108224", "0.606428", "0.60444295", "0.602139", "0.5969082", "0.5967012", "0.59556", "0.5895435", "0.5883067", "0.5835511", "0.5831806", "0.58250225", "0.58250225", "0.5805743", "...
0.75824285
0
connect to a bluetooth device
connect(device){ this.setState({connecting: true}) BluetoothSerial.connect(device.id) .then((res) => { console.log(`Connected to device ${device.name}`); this.bluetoothListener() ToastAndroid.show(`Connected to device ${device.name}`, ToastAndroid.SHORT); }) .catch((err) => console...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect() {\n exponentialBackoff(3 /* max retries */, 2 /* seconds delay */,\n function toTry() {\n if (bluetoothDevice) {\n console.log('Connecting to Bluetooth Device... ');\n return bluetoothDevice.gatt.connect()\n .then(server => {\n ...
[ "0.77677613", "0.73400295", "0.7297643", "0.72353", "0.7153811", "0.70938075", "0.68957114", "0.6836653", "0.67991894", "0.67526525", "0.6734778", "0.66968364", "0.6695869", "0.6674027", "0.6653975", "0.65769523", "0.65361047", "0.64949644", "0.6472039", "0.6448015", "0.64174...
0.8277398
0
Get the key used to retrieve this CachedResponse
get key() { return this._key }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCacheKey(ctx) { return ctx.url }", "get key()\n\t{\n\t\tvar priv = PRIVATE.get(this);\n\t\treturn priv.key;\n\t}", "getStorageKey(_request) {\n\t\tconst storageName = this.strings.storageName;\n\t\tconst key = storageName + '-' + _request;\n\t\treturn key;\n\t}", "getKey() {\n return this....
[ "0.6443469", "0.62926", "0.62580293", "0.62529594", "0.6131183", "0.6131183", "0.6131183", "0.6131183", "0.6117239", "0.6117239", "0.61099404", "0.6074385", "0.6042556", "0.604051", "0.6031959", "0.60317427", "0.6020625", "0.5868917", "0.585456", "0.585456", "0.5837097", "0...
0.63694036
1
Get the namespace used to retrieve this CachedResponse
get namespace() { return this._namespace }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get namespaceLookup() {\n return this.cache.getOrAdd('namespaceLookup', () => this.buildNamespaceLookup());\n }", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "get namespace() {\n return this.collection;...
[ "0.6658846", "0.663786", "0.63724977", "0.63222724", "0.59905165", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57939655", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.57452947", "0.56406456", "0.5639807", ...
0.74516267
0
Send any queued metrics. Returns a Promise that resolves when all sending is done. The Promise will never reject.
flush() { // Pending Promises for _putMetricData calls const promises = [] // Get a CloudWatch client (this will be falsy if we're not // really sending) const cw = this._setup() while (this._queue.length) { // Grab a batch of metrics from the queue - the max...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushQueue() {\n return localforage.getItem('queue').then(queue => {\n if (!queue || (queue && !queue.length)) {\n return Promise.resolve();\n }\n\n console.log('Sending ', queue.length, ' requests...');\n return sendInOrder(queue).then(() => localforage.setItem('...
[ "0.62498975", "0.62358636", "0.6121252", "0.5997689", "0.5945961", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.5943548", "0.58649164", "0.5860253", "0.58090585", "0.5553014", "0.55392665", "0.5425512", "0.5415078", "0.5395192"...
0.7818859
0
Construct a new PerformanceTimer, with the given name as a 'namespace' within which all durations can be measured. When the object is deleted, it clears all entries under this namespace, so multiple PerformanceTimer instances can be used at once.
constructor(name) { this._namespace = `${name}-` // Length of the namespace prefix (with the '-' postfix) const nslen = this._namespace.length this._names = {} const results = (this._results = []) this._observer = new PerformanceObserver((list) => { list.getE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Timer(name) {\n Variable.call(this, name);\n this.total = 0;\n this.samples = 0;\n }", "function timerNew(element, tp, start, stop, step, pause, startDelay, stopDelay, callback) {\n\t\tvar i = owl.Property.Get(element, tp);\n\t\tif (i == null) i = timer.length;\n\t\towl.Property.Set(element, t...
[ "0.6115564", "0.57659966", "0.5516357", "0.5513277", "0.5345585", "0.5297901", "0.52543736", "0.51908976", "0.5187935", "0.5177433", "0.51416665", "0.50983286", "0.5045841", "0.5035116", "0.50347084", "0.5014029", "0.49909884", "0.49585107", "0.49452668", "0.4932937", "0.4931...
0.78748
0
Finish with this PerformanceObserver
finish() { Object.keys(this._names).forEach((mark) => performance.clearMarks(mark)) this._names = {} this._observer.disconnect() this._observer = null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "complete() {\n\n if (!this._running) return;\n this._running = false;\n\n // get sure all measures are completed\n this.completeMeasure();\n\n let values = [];\n\n for (let profile of this._profiles) {\n values.push(profile.elapsed);\n }\n\n // Bui...
[ "0.5971818", "0.59296", "0.57774234", "0.5775667", "0.5738979", "0.5732177", "0.5649373", "0.56393206", "0.55967665", "0.5563513", "0.5549622", "0.55298656", "0.55214524", "0.5519871", "0.55003905", "0.5498098", "0.54642344", "0.5463822", "0.5459349", "0.54370046", "0.5433126...
0.6537428
0
Parse a backgroundposition definition: horizontal [vertical]
function parseBackgroundPosition(value) { var bgPos = (value || '').split(/ /); var presets = {center: '50%', left: '0%', right: '100%', top: '0%', bottom: '100%'}; var decodePos = function(index) { var pos = (presets[bgPos[index]] || bgPos[index] || '50%'). match(/^([+-]=)?([+-]?\d+(\.\d*)?)(.*)$/); bgPos[in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseBgPos(bgPos) {\n var parts = bgPos.split(/\\s/),\n values = {\n \"X\": parts[0],\n \"Y\": parts[1]\n };\n return values;\n }", "function parseBgPos(bgPos) {\r\n var parts = bgPos.split(/\\s/),\r\n values = {\r\...
[ "0.6542607", "0.65390426", "0.65246457", "0.5446808", "0.53543156", "0.534906", "0.5244756", "0.5199077", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", ...
0.71761405
0
Function Insert addWebsites v 1.0
function addWebsites(key) { "use strict"; var catId = $("#cat_id"); var name = $("#nameWeb"); var domain = $("#domain"); var desc = $("#description"); if (isNotEmpty(name) && isNotEmpty(domain) && isNotEmpty(desc)) { $.ajax({ url: 'insertjs.php', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addWebsite(url, title, description, ownerId,\n date, upVotes, downVotes, keywords) {\n var primary_keywords =\n Meteor.common.getKeywords(title + (keywords? ' ' + keywords: ''));\n\n var id = Websites.insert({\n title: title ? title: url,\n url: url,\n description: descrip...
[ "0.74303114", "0.67651767", "0.60614514", "0.603072", "0.59488475", "0.59225285", "0.5865002", "0.5676835", "0.56679374", "0.56281805", "0.5595422", "0.55792654", "0.55657035", "0.5563136", "0.55550677", "0.55424637", "0.55215305", "0.5480712", "0.5466487", "0.53969765", "0.5...
0.6889543
1
Handles either adding or removing a category from the list if its been marked as checked or not checked
onCategorySelectChange(checked, newCategory) { const { selectedCategories } = this.state; if(checked) { this.setState({ selectedCategories: [...selectedCategories, newCategory]}); } else { this.setState({ selectedCategories: selectedCategories.filter(({ sid }) => sid !== ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleChecked(e) {\n if (e.target.checked) {\n setCategoryValue([...categoryValue, e.target.value])\n } else {\n setCategoryValue(categoryValue.filter(item => item !== e.target.value))\n }\n setWarningCategory(false)\n }", "function addChkCat(xmlAddDoc) {\n\tvar newChkContent = ''...
[ "0.6613195", "0.62817615", "0.6256962", "0.6117406", "0.6054059", "0.6024955", "0.60170436", "0.6015658", "0.5979657", "0.5932457", "0.5928825", "0.5917185", "0.59047836", "0.5891791", "0.5879974", "0.5857784", "0.58349174", "0.58103245", "0.57991934", "0.5777065", "0.5758131...
0.62894535
1
Add Search Bar level 200 create a search bar functionality level 200(Add an Episode Selector) AccessInput is the input where the user would have to type the value the would like to search
function createSearchBar() { let accessInput = document.querySelector(".input"); accessInput.addEventListener("keyup", function (event) { accessTheCardDiv = document.querySelectorAll("#root .card "); let searchItems = event.target.value.toLowerCase(); accessTheCardDiv.forEach(function (cardDiv) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "search(value) {\n this.ux.input.value = value;\n this.ux.input.focus();\n this.onInputChanged();\n }", "onTextInput(event) {\r\n this.searchValue = event.target.value;\r\n if (this.searchValue.trim().length >= 1) {\r\n this.showSearchBoxList = true...
[ "0.6592687", "0.65466315", "0.64513415", "0.6372819", "0.63387173", "0.63268095", "0.6258687", "0.62352335", "0.62037104", "0.6195875", "0.6134103", "0.6122042", "0.61009103", "0.6093719", "0.60768366", "0.60717696", "0.6063786", "0.60446364", "0.6011974", "0.6007016", "0.600...
0.6978347
0
here I am adding an event listener(change) that occur when the users select different value from the dropdown list accessAPI(getShows); // I am calling the getShows variable that have the value of the getAllShow assign to it function that would read the show's value that the users would select from the drowndown list
function selectingEachShow(eachShow) { accessTheCardDiv = document.querySelectorAll("#root .card "); let targetTheOptionId = eachShow.target.options[eachShow.target.selectedIndex].value; for (let i = 0; i < getShows.length; i++) { if (targetTheOptionId == getShows[i].name) { let showId = getShows[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedShow(){\n let selectorVal = document.getElementById(\"showsSelect\").value;\n const allShows = getAllShows();\n \n let newShow = allShows.find(show => show.name === selectorVal);\n goEpisodes(newShow.id);\n\n}", "function getResult() {\n\n //search again by Show ID\n var ...
[ "0.72399384", "0.68173313", "0.67335415", "0.6635168", "0.6493064", "0.63911283", "0.61852276", "0.61569804", "0.6148274", "0.6116981", "0.61038977", "0.60749346", "0.6051305", "0.6033917", "0.60205585", "0.5983102", "0.5982133", "0.59737945", "0.5955865", "0.5946512", "0.594...
0.7215496
1
this function sends an alert and redirects the user to the signin page
pleaseSigin(){ alert("You must be signed to access and view courses.") window.location.href=("/signin") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signInSuccess(response) {\r\n\t// Temporarily just redirect to a welcome page when the credentials are correct\r\n\twindow.location.href = indexUrl;\r\n}", "SendToLogin() {\n window.location = \"/auth/?client_id=\" + this.enviornment.AUTH.AUTH_CLIENT_ID;\n }", "function confirmSystemHaker(){...
[ "0.7611631", "0.6918928", "0.68109906", "0.6761497", "0.6704275", "0.6692326", "0.66652745", "0.665201", "0.660324", "0.6533578", "0.65222347", "0.6458399", "0.6451806", "0.6451578", "0.6442566", "0.6403336", "0.6390799", "0.6375172", "0.6350368", "0.6334543", "0.6333971", ...
0.7686952
0
Define this function to look for a win condition: 1. Are all of the cells that are NOT mines visible? 2. Are all of the mines marked?
function checkForWin() { var hiddenBlanks = 0; var unMarkedMines = 0; for(var b = 0; b < board.cells.length; b++){ if(board.cells[b].hidden == true && board.cells[b].isMine == false){ hiddenBlanks++;} if(board.cells[b].isMine == true && board.cells[b].isMarked == false){ unMarkedMines++;} }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForWin () {\n\nvar areAllMinesMarked = true;\n\n for(i = 0; i< board.cells.length; i++) {\n\n if(board.cells[i].hidden === true) {\n return;\n }\n\n var isMine = board.cells[i].isMine;\n var isMarked = board.cells[i].isMarked;\n\n if (isMine === true && isMarked === false ) {\n ...
[ "0.826045", "0.7752079", "0.77275556", "0.762815", "0.754956", "0.75295836", "0.74881136", "0.7450211", "0.74349165", "0.73819244", "0.7366258", "0.7363696", "0.7347939", "0.7279201", "0.722844", "0.7222143", "0.7193495", "0.7190904", "0.7135851", "0.71298224", "0.7122378", ...
0.80427295
1
ChatController.$inject = [ 'chatService'];
function ChatsController($scope, $ionicModal) { //var sync = chatService.getFirebaseConfig(); var vm = this; vm.chats = $scope.$meteorCollection(Chats, false); vm.remover = remover; vm.openNewChatModal = openNewChatModal; $ionicModal.fromTemplateUrl('templates/new-chat.html', { scope: $scope }).then...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n 'ngInject';\n }", "constructor() {\n 'ngInject';\n }", "function ChatCtrl($scope, $stateParams, SocketService, $timeout) {\n var ctrl = this;\n\n\n function addMsg() {\n\n }\n\n /**\n * Check if the user is already connected to the socket\n ...
[ "0.6563085", "0.6563085", "0.6432338", "0.63205546", "0.6264135", "0.6263481", "0.6252246", "0.6186702", "0.5949097", "0.58978057", "0.5892801", "0.580365", "0.577513", "0.5773398", "0.5694222", "0.56740123", "0.5664772", "0.56521934", "0.5641913", "0.55987036", "0.55468947",...
0.6641833
0
now need a render method to create 'li elements that will accept the arguments: invoice or payment, a heading, and a position that will create the necessary templates (li, h4, p) that will add the 'li' template to the start or to the end of the list now the type need to include both payment and invoice so it can't only...
render(item, heading, pos) { //now to create the elements const li = document.createElement('li'); const h4 = document.createElement('h4'); h4.innerText = heading; li.append(h4); const p = document.createElement('p'); // as I chose the type as the interface that h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "produce() {\n var listElem = [],\n uniqueKey = [];\n this.list.forEach(item => {\n var elem = <RenderElement elemkey={item.key} text={item.text} type={item.type} inlineStyleRanges={item.inlineStyleRanges}/>\n uniqueKey.push(item.key)\n listElem.push(elem)\n...
[ "0.6198613", "0.5954835", "0.5602488", "0.5533215", "0.54822725", "0.5462481", "0.54314256", "0.53968114", "0.53749275", "0.537391", "0.53193086", "0.5315953", "0.53152466", "0.53034174", "0.52867323", "0.52620876", "0.525682", "0.5220583", "0.52205604", "0.5208785", "0.51963...
0.74824286
0
linkBytecode: performs linking by replacing placeholders with deployed addresses Recommended workaround from Buidler team until linking feature is implemented
function linkBytecode(artifact, libraries) { let bytecode = artifact.bytecode; for (const [, fileReferences] of Object.entries(artifact.linkReferences)) { for (const [libName, fixups] of Object.entries(fileReferences)) { const addr = libraries[libName]; if (addr === undefined) { continue; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "linkBytecode (bytecode, libs) {\n const links = Object.assign({}, libs)\n const keys = Object.keys(links)\n for (let i = 0; i < keys.length; i++) {\n let name = keys[i]\n let addr = links[name]\n\n // Truncate to 37 characters\n name = name.slice(0, 36)\n\n // Prefix and suffix wi...
[ "0.7857475", "0.6401687", "0.6236918", "0.57701147", "0.5514795", "0.53990227", "0.53990227", "0.53990227", "0.52696824", "0.52696824", "0.52696824", "0.5225501", "0.522243", "0.52020615", "0.5170833", "0.5133144", "0.51311797", "0.50779146", "0.49849394", "0.49816942", "0.49...
0.6419096
1
enumerate all ObjC classes
function enumAllClasses() { var allClasses = []; for (var aClass in ObjC.classes) { if (ObjC.classes.hasOwnProperty(aClass)) { allClasses.push(aClass); } } return allClasses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllClasses() {\n return readObject('classes');\n\n }", "enumerateObject(codeArray, obj) {\n const klass = obj.constructor;\n\n if (legacyCC.Class._isCCClass(klass)) {\n this.enumerateCCClass(codeArray, obj, klass);\n } else {\n // primitive javascr...
[ "0.6471034", "0.6433828", "0.64244926", "0.6115638", "0.57877135", "0.5778312", "0.5565319", "0.5465574", "0.5423296", "0.53975165", "0.53367394", "0.5294345", "0.5277243", "0.5222351", "0.51988196", "0.5185198", "0.51236737", "0.51054865", "0.5077129", "0.5073851", "0.506536...
0.7191182
0
find all ObjC classes that match a pattern
function findClasses(pattern) { var allClasses = enumAllClasses(); var foundClasses = []; allClasses.forEach(function(aClass) { if (aClass.match(pattern)) { foundClasses.push(aClass); } }); return foundClasses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findClassNames() {\n\n if (SC._object_foundObjectClassNames) return ;\n SC._object_foundObjectClassNames = true ;\n\n var seen = [] ;\n var searchObject = function(root, object, levels) {\n levels-- ;\n\n // not the fastest, but safe\n if (seen.indexOf(object) >= 0) return ;\n seen.push(ob...
[ "0.6430985", "0.6298581", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.61925125", "0.61570805", "0.59516346", "0.5938673", "0.5833715", "0.5833715", "0.57839036", "0.57765406", "0.57765406", "0.57765406", "0.57765406", "0.57765406", "...
0.75317454
0
enumerate all methods declared in an ObjC class
function enumMethods(targetClass) { var ownMethods = ObjC.classes[targetClass].$ownMethods; return ownMethods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lmfc(klass){\n list_Methods(klass,1)\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n }", "get allMethods() {}", "function collectOwnMet...
[ "0.6984414", "0.64798146", "0.6373628", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.60837996", "0.6030024", "0.59665203", "0.5940038", "0.5849846", "0.5829714", "0.57767165", "0.5755888", "0.57392496", "0.5698978", "0.56547767...
0.6546731
1
find all ObjC methods that match a pattern
function findMethods(pattern) { var allMethods = enumAllMethods(); var foundMethods = {}; for (var aClass in allMethods) { allMethods[aClass].forEach(function(method) { if (method.match(pattern)) { if (!foundMethods[aClass]) foundMethods[aClass] = []; foundMethods[aClass].push(method); } }); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function methodsStartingWith(obj, startsWith) {\n return methods(obj, function (fn, name, obj) {\n return name.indexOf(startsWith) === 0;\n });\n }", "function getMethods(obj) {\r\n var tests = [];\r\n for (var m in obj) {\r\n if ( typeof obj[m] === \"function\") {\r\n ...
[ "0.6254056", "0.61214244", "0.5881826", "0.58359766", "0.5791008", "0.57610124", "0.5749371", "0.57455677", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5536634", "0.5461803", "0.5455802", "0.5442338", "0.54406863", "0.5401859"...
0.72655404
0
download csv file of selected character
function downloadFunc(){ const replacer = (key, value) => value === null ? '' : value const header = Object.keys(selected[0]) let csv = selected.map(row => header.map(fieldName => JSON.stringify(row[fieldName], replacer).replace(/(\r\n|\n|\r)/gm, "")).join(',')) csv.unshift(header.join(',')) c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadCSV(data) {\n location.href = 'data:application/csv;charset=utf-8,' + encodeURIComponent(data);\n }", "function downloadCSVFile(){\r\n\tlet data = getTableData();\r\n\r\n\t// Build the actual content of the csv file\r\n\tlet csv = buildCSVString(data);\r\n\r\n\t// Create the file and initiat...
[ "0.76340663", "0.72399175", "0.72345084", "0.72149473", "0.7203672", "0.69761944", "0.6943722", "0.69426864", "0.68987846", "0.6837325", "0.68221265", "0.6783557", "0.67409474", "0.67322445", "0.67236024", "0.6619173", "0.6603165", "0.6590948", "0.65749717", "0.65662277", "0....
0.79832375
0
populates the package amount selector
function addNewPackage(){ var newPackageTxt; var newPackage; var package=["Boxes","Pounds","Cases","Cans"]; var getPackage = document.getElementById("amount"); // sets the attribute to selected on the Cases package amount // for (var i = 0, l=package.length; i < l; i++) { if (package[i]=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setProductAmountDependsOnSelectedRadioButton()\n {\n $('.cr_sallingPrice').val(getProductAmountFromSelectedRadioButton());\n }", "function setAmountValue() {\n amount\n .val($('.price-plan-header.active').next().children(':first').text())\n .trigger(...
[ "0.5882806", "0.58283746", "0.5803427", "0.5776516", "0.57566905", "0.57073164", "0.5576434", "0.5560472", "0.5552963", "0.5551607", "0.5514996", "0.5510863", "0.5444957", "0.5432081", "0.5423064", "0.53976005", "0.53645706", "0.53540295", "0.5344973", "0.5326386", "0.5322997...
0.62203735
0
function to show the number for the select slider
function showValue(number){ document.getElementById("selected_amount").innerHTML = number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numSelected(num) {\n if (newNum) {\n keySelect.display.value = num;\n newNum = false;\n } else {\n if (keySelect.display.value === \"\")\n keySelect.display.value = num;\n else\n keySelect.display.value += num;\n }\n }", "function setDmgMod...
[ "0.6862436", "0.6759478", "0.6635521", "0.64934003", "0.6474042", "0.6472182", "0.6446706", "0.64088756", "0.62849593", "0.6265519", "0.6242179", "0.6207979", "0.6194085", "0.6165391", "0.6163548", "0.6118309", "0.6105026", "0.6073978", "0.6073978", "0.60412776", "0.60197026"...
0.7149912
0
reset() Reset CPU and memory.
function reset() { for( x=0; x<0x600; x++ ){ memory[x] = 0x00; } regA = regX = regY = 0; defaultCodePC = regPC = 0x600; regSP = 0x100; regP = 0x20; runForever = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.setIrqMask(0);\n this.setNmiMask(0);\n this.resetCassette();\n this.keyboard.clearKeyboard();\n this.setTimerInterrupt(false);\n this.z80.reset();\n }", "reset() {\n this.pc = 0;\n this.nextpc = (this.pc + 1) & this.romMask;\n thi...
[ "0.72295046", "0.7022725", "0.6943856", "0.68397725", "0.68305516", "0.68005586", "0.68001175", "0.6747324", "0.6713963", "0.6699442", "0.66802037", "0.665993", "0.66324836", "0.661201", "0.65941846", "0.6585356", "0.6585272", "0.6585272", "0.6585272", "0.6531785", "0.6526914...
0.78262776
0
stackPush() Push byte to stack
function stackPush( value ) { regSP = (regSP-1) & 0xff; if( regSP != 0 ) { memory[regSP+0x100] = value & 0xff; } else { message( "Stack full: " + regSP ); codeRunning = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "push(x){\r\n this.stack.push(x);\r\n this.size++;\r\n }", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;\n defaultCodePC++;\n codeLen++;\n}", "pushByte(value) {\n this.regs.sp = (this.regs.sp - 1) & 0xFFFF;\n this.writeByte(this.regs.sp, value);\n }",...
[ "0.71919674", "0.7149565", "0.70420164", "0.6902951", "0.6890674", "0.67568624", "0.66724133", "0.664024", "0.657562", "0.6554107", "0.6545136", "0.6510179", "0.6492416", "0.6428865", "0.64228237", "0.63386863", "0.6293771", "0.62854123", "0.623613", "0.6220221", "0.6185795",...
0.7451549
0
pushByte() Push byte to compiledCode variable
function pushByte( value ) { memory[defaultCodePC] = value & 0xff; defaultCodePC++; codeLen++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pushByte(value) {\n this.regs.sp = (this.regs.sp - 1) & 0xFFFF;\n this.writeByte(this.regs.sp, value);\n }", "_pushByteString(gen, obj) {\n return gen._pushInt(obj.length, MT.BYTE_STRING) && gen.push(obj);\n }", "_pushBuffer(gen, obj) {\n\t return gen._pushInt(obj.length, MT$1.BYTE_STRI...
[ "0.6808793", "0.62124914", "0.58339095", "0.58271235", "0.5808432", "0.58012456", "0.57261705", "0.5678508", "0.56320316", "0.5623546", "0.5619895", "0.56123185", "0.5495701", "0.54015684", "0.5380487", "0.53306746", "0.5329285", "0.53215677", "0.5281312", "0.5272362", "0.525...
0.812741
0
pushWord() Push a word using pushByte twice
function pushWord( value ) { pushByte( value & 0xff ); pushByte( (value>>8) & 0xff ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pushWord(value) {\n this.pushByte(z80_base_1.hi(value));\n this.pushByte(z80_base_1.lo(value));\n }", "function popWord() {\n return popByte() + (popByte() << 8);\n}", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;\n defaultCodePC++;\n codeLen++;\n}", "popWord() {\...
[ "0.7747722", "0.66708565", "0.61282796", "0.60432917", "0.5909562", "0.5594656", "0.5566832", "0.5566832", "0.5527965", "0.5498808", "0.54750234", "0.5471854", "0.5351999", "0.5319983", "0.5297026", "0.5288491", "0.5278159", "0.52648544", "0.52648544", "0.5226187", "0.5203991...
0.80163044
0
popByte() Pops a byte
function popByte() { return( memory[regPC++] & 0xff ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popWord() {\n return popByte() + (popByte() << 8);\n}", "popByte() {\n const value = this.readByte(this.regs.sp);\n this.regs.sp = z80_base_1.inc16(this.regs.sp);\n return value;\n }", "function decrementByte() {\n\t\t\tram[pointerAddress] -= 1;\n\t\t\tif(ram[pointerAddress] <...
[ "0.73289216", "0.7280887", "0.66351247", "0.6394896", "0.6350619", "0.61032164", "0.60528994", "0.6036286", "0.59906685", "0.5903274", "0.5893988", "0.5881001", "0.5881001", "0.5881001", "0.58529514", "0.5839716", "0.5838723", "0.58329433", "0.58192885", "0.5818631", "0.58007...
0.8354038
0
popWord() Pops a word using popByte() twice
function popWord() { return popByte() + (popByte() << 8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "popWord() {\n const lowByte = this.popByte();\n const highByte = this.popByte();\n return z80_base_1.word(highByte, lowByte);\n }", "function popByte() {\n return( memory[regPC++] & 0xff );\n}", "getWordFromPool() {\n // explicit return of undefined if no words remaining in arra...
[ "0.7758038", "0.64119834", "0.5815284", "0.5619971", "0.55124056", "0.54493326", "0.541067", "0.5408924", "0.5392179", "0.5388965", "0.53788185", "0.5378427", "0.5332224", "0.53321755", "0.53318137", "0.53119856", "0.5311465", "0.528913", "0.52760226", "0.527446", "0.52729994...
0.86984736
0
memStoreByte() Poke a byte, don't touch any registers
function memStoreByte( addr, value ) { memory[ addr ] = (value & 0xff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "write_byte(byte) {\n this.ensure(1);\n this.buffer[this.pos++] = byte;\n }", "function incrementByte() {\n\t\t\tram[pointerAddress] += 1;\n\t\t\tif(ram[pointerAddress] > 0xFF)\t{\n\t\t\t\tram[pointerAddress] = 0x00;\n\t\t\t}\n\t\t}", "function pushByte( value ) {\n memory[defaultCodePC] = value & 0xff;...
[ "0.6791027", "0.6561545", "0.65027916", "0.63984585", "0.62178576", "0.6197259", "0.614613", "0.60359526", "0.5916196", "0.5858409", "0.5846775", "0.5821286", "0.5783663", "0.568652", "0.5685372", "0.5521975", "0.5496032", "0.54457915", "0.54346406", "0.54129297", "0.54069084...
0.7453917
0
Create + Inserts a new row into the burgers table
create(cols, vals, cb) { orm.insertOne( 'burgers', cols, vals, (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertOne(cols, values, cb) {\n console.log(\"burgervals \" + values);\n orm.insertOne('burgers', cols, values, (res) => cb(res));\n }", "function insertOne(newBurger) {\n //insert new burger into table and input devoured boolean value\n var queryString = \"INSERT INTO burgers (bur...
[ "0.6304181", "0.6216506", "0.5957611", "0.5783667", "0.5731143", "0.57202256", "0.5712485", "0.57043904", "0.57010305", "0.5685578", "0.5679874", "0.56718946", "0.5664361", "0.56563914", "0.5650134", "0.5626185", "0.5614221", "0.5609815", "0.559549", "0.5563917", "0.555913", ...
0.71798116
0
Deletes a burger from the table
deleteOne(condition, cb) { orm.deleteOne( 'burgers', condition, (res) => cb(res) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteBurger() {\n var id = $(this).data(\"id\");\n $.ajax({\n method: \"DELETE\",\n url: \"/api/todos/\" + id\n }).done(function() {\n getBurgers();\n });\n }", "function devourBurger() {\n var id = $(this).data(\"id\");\n\n $.ajax({\n method: \"DELETE\",\n u...
[ "0.7315091", "0.6767443", "0.671512", "0.66541165", "0.6368961", "0.63410383", "0.6321529", "0.6305535", "0.6279154", "0.6267879", "0.6237702", "0.6158303", "0.61193717", "0.6106735", "0.60909754", "0.60560644", "0.60316247", "0.602015", "0.60017526", "0.6000293", "0.599881",...
0.6793226
1
Invokes function devServer(). When NODE_ENV is not set to production, devServer() is called. Serves all static files within ./dist/dev directory to port 3000.
function devServer() { const express = require('express'); const app = express(); const http = require('http').Server(app); const dirDev = path.join(__dirname, '../dist'); app.use(express.static(dirDev)); // Route catch-all: redirects all server requests to ./dist/index.html app.get('/*', function(req,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDevServer() {\n const WDS = require('webpack-dev-server');\n\n const wpConf = getWebpackConfig();\n\n // Need to update the app entry for webpack-dev-server. This is necessary for\n // the auto page refresh to happen. See: https://github.com/webpack/webpack-dev-server/blob/master/examples...
[ "0.76269805", "0.721687", "0.72007906", "0.69580644", "0.6836725", "0.6784563", "0.6776514", "0.6696798", "0.6654678", "0.65751517", "0.65675974", "0.6521777", "0.6496064", "0.64597625", "0.64423996", "0.6437057", "0.63746715", "0.63732517", "0.62854075", "0.62703496", "0.619...
0.86204886
0
Invokes function compileSCSS(). When called, uses DartSass to compile scss to css. Input: ./src/scss/app.scss. output: ./dist/dev || ./dist/prod depending on NODE_ENV.
function compileSCSS() { const sass = require('sass'); const postcss = require('postcss'); const postcssPresetEnv = require('postcss-preset-env'); console.info('\x1b[36m','😻 Rendering sass...'); sass.render({ file: './src/scss/app.scss', outputStyle: envType !== 'production' ? "expanded" : 'co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileAppSCSS() {\n return processSCSS(CFG.SRC.APP_SCSS, CFG.OUT.APP_MIN_CSS);\n}", "function compileSass() {\r\n\treturn gulp\r\n\t\t.src( paths.scss.src )\r\n\t\t.pipe(\r\n\t\t\tsass( {\r\n\t\t\t\tindentType: 'tab',\r\n\t\t\t\tindentWidth: 1,\r\n\t\t\t\toutputStyle: 'expanded'\r\n\t\t\t} )\r\n\t\t...
[ "0.7756022", "0.7374563", "0.7295169", "0.7256454", "0.7251906", "0.7226781", "0.72126085", "0.7197337", "0.71321577", "0.71318007", "0.7107635", "0.7105073", "0.7092892", "0.70886457", "0.7088355", "0.7087429", "0.70864576", "0.70779145", "0.707746", "0.7077239", "0.7054333"...
0.8240672
0
Invokes function compileECMA(). When called, uses browserify/babelify to compile ECMA script to js. Input: ./src/js/app.js. output: ./dist/dev || ./dist/prod depending on NODE_ENV.
function compileECMA() { console.info('\x1b[36m','😻 transforming ECMA script...'); const browserify = require("browserify"); const babelify = require("babelify"); const envify = require('envify/custom'); let b = browserify({ debug: false }); // Browserify entrypoint and options. b.requ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileAppJS() {\n return processJS(CFG.SRC.APP_JS, CFG.OUT.APP_MIN_JS)\n}", "function friendlyCompile() {\n var env, s, options, args, debug;\n \n if(arguments.length === 0) throw new Error('Invalid arguments');\n \n args = Array.prototype.slice.apply(arguments);\n...
[ "0.6019949", "0.581921", "0.54954547", "0.5473303", "0.53623", "0.53532535", "0.5333184", "0.52876544", "0.52438194", "0.51820695", "0.5149812", "0.5145595", "0.5136617", "0.51198643", "0.5109451", "0.50713134", "0.50654244", "0.50515944", "0.5024466", "0.50170606", "0.500452...
0.8636182
0
Invokes function taskWatcher(). Watches ./src folder for file changes. Gets file extension name of file. conditionally compileECMA or compileSCSS depending on changed files ext's type.
function taskWatcher() { console.info('\x1b[37m', '👀 Dev-tools: watching for changes.') const chokidar = require('chokidar'); const dirSrc = path.join(__dirname, '../src'); chokidar.watch(dirSrc).on('change', path => { let extType = path.split('.').pop(); if (extType === 'js') { compileECMA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function watchTask(){\r\n watch([files.scssPath, files.jsPath],\r\n series(\r\n parallel(scssTask, jsTask)\r\n )\r\n ); \r\n}", "function watchTask() {\n watch(\"./src/html/**/*.+(html|njk)\", series(htmlComp, browsersyncReload));\n watch([\"./src/css/**/*.css\"], series(c...
[ "0.6525695", "0.6505681", "0.6455849", "0.6434195", "0.6399119", "0.6142699", "0.6079076", "0.60318226", "0.60088867", "0.59996295", "0.59198844", "0.5907075", "0.5866663", "0.5853248", "0.5845299", "0.58435136", "0.5823406", "0.58220494", "0.5793627", "0.5786074", "0.5765783...
0.7340203
0
Categorize the DG according to their status(online/offline) and add marker image accordingly.
categorizeStations(update) { console.log('click categorize', update); var that = this; // console.log('categorizeStations', that); for (i = 0; i < gMarkers.length; i++) { gMarkers[i].setMap(null); }; gMarkers=[]; // console.log('this.markerCluster1', this.markerCluster); if (this.markerCluster !== nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classify_map() {\n console.log(\"Classifying map...\");\n counties.style(\"fill\", null)\n .attr(\"class\", function (d) {\n var cl = get_class(dataByID[d.id], classBreaks) - 1;\n return \"counties \" + colorScheme + \"q\" + cl + \"-\" + (classBreaks.length - 1);\n ...
[ "0.5652543", "0.56050354", "0.5399333", "0.5385227", "0.53717333", "0.53150773", "0.52970004", "0.529054", "0.5260375", "0.5214394", "0.5210403", "0.5205603", "0.5160208", "0.5140393", "0.51394373", "0.5130949", "0.51261824", "0.51205987", "0.51128304", "0.5092916", "0.507568...
0.6121741
0
Calculates shelf size, as the total quantity times the unit size.
shelfSize() { return this.values.size * this.values.quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shoeSize(playerInput) {\n const shoe = players()[playerInput].shoe;\n return `${playerInput} has size ${shoe} shoes.`\n}", "function getSize(magnitude) {\n return magnitude * 5\n}", "function calculatePrice(size, paper, frame, quantity){\n \n // add the items costs' up and mul...
[ "0.6172428", "0.59622025", "0.5844235", "0.58429486", "0.5801901", "0.5801376", "0.57847744", "0.57626444", "0.5739556", "0.56947285", "0.5620868", "0.5576266", "0.55417025", "0.5539004", "0.5535426", "0.5517475", "0.5457198", "0.54372776", "0.54372776", "0.54344755", "0.5434...
0.775456
0
CLASS Create an instance of a fluid dynamics system.
function FluidDynamics() { console.log("Starting fluid dynamics system.") // Get some basic info from system. var mobile = navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|Opera Mini|IEMobile/i) this.canvas = document.getElementById('theCanvas'); this.context = this.canvas.getCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function VehicleFactory() { }", "function VehicleFactory() { }", "function VehicleFactory() {}", "function VehicleFactory() {}", "function VehicleFactory() {}", "function _createPhysicsEngine() {\n this.physicsEngine = new PhysicsEngine();\n this.repulsion = new Repulsion({\n str...
[ "0.5937874", "0.5937874", "0.5895459", "0.5895459", "0.5895459", "0.5759717", "0.56917197", "0.56659687", "0.56311715", "0.55045414", "0.55022746", "0.5483593", "0.5445897", "0.5438402", "0.5438402", "0.5427622", "0.5363808", "0.5338633", "0.5312942", "0.5306399", "0.5293181"...
0.66331506
0
Reset the timer that handles performance evaluation:
function resetTimer() { stepCount = 0; startTime = (new Date()).getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetTimer() {\n this.timeSelected = 0;\n this.completeElapsed = 0;\n this.complete = false;\n }", "reset() {\n this.elapsedTime = 0;\n }", "reset() {\n this.stop();\n $(this._timerElemjQuery).text(\"00\");\n this._start = null;\n this._duration = 0...
[ "0.77354264", "0.74883145", "0.73853725", "0.73853725", "0.7361871", "0.727066", "0.7252085", "0.718903", "0.71851736", "0.7161158", "0.7152952", "0.71520543", "0.7092536", "0.7078522", "0.69937354", "0.6992859", "0.69233054", "0.6918629", "0.6913606", "0.6897907", "0.6895916...
0.7667771
1
splits along '=' delimiter .node is the node to look at .value is the supplied value
function nodeParser(node){ if(node.indexOf('=') >= 0) { var splitNode = node.split('='); var returnNode = new Object(); returnNode.node = splitNode[0]; returnNode.value = splitNode[1]; return returnNode; } else{ console.error("Improperly formatted node!") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitKeyValuePair(str){var index=str.indexOf('=');var key;var val;if(index===-1){key=str;}else{key=str.substr(0,index);val=str.substr(index+1);}return[key,val];}", "function splitProperty(line, delimiter) {\n var parts = [], last = 0, inBrackets = false;\n\n for (var i = 0; i < line.length; i++) {\n ...
[ "0.5717753", "0.5556586", "0.5464812", "0.54591554", "0.542506", "0.54120547", "0.5265378", "0.5243485", "0.52272004", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", "0.5201566", ...
0.66468745
0
method to fetch ticket from the API
fetchTicket(){ //set loading to true. set to false after request success/error this.props.loadRequest() fetch('http://helpdesk.dev/api/tickets/'+this.props.tid+'?pos='+this.props.position+'&em='+this.props.user.email, { method: 'GET', headers: { 'Accept': 'application/json' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchTicket() {\n axios\n .get(props.event._links.eventTickets.href, options)\n\n .then((response) => {\n setTicket(response.data._embedded.eventTickets[0]);\n })\n .catch(function (error) {\n console.log(error);\n })\n .finally(function () {});\n }", "fun...
[ "0.7982605", "0.69436985", "0.69329", "0.6898935", "0.6707853", "0.6697348", "0.665233", "0.6461146", "0.6427395", "0.6361777", "0.6342843", "0.63225806", "0.6210827", "0.61988056", "0.6146994", "0.614159", "0.6137385", "0.6135134", "0.6095798", "0.6072929", "0.6020804", "0...
0.71929944
1
method to submit a newly created status
submitStatus(){ var formData = new FormData(); formData.append("admin_email", this.props.user.email); formData.append("title", this.props.status_form.title); formData.append("content", this.props.status_form.content); formData.append("status", this.props.status_form.status); this.pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async create() {\n let api = this.app.service('status');\n let record = {\n uuid: this.uuid,\n flavor: this.options.flavor,\n timezone: this.getTimezone(),\n };\n return api.create(record, {\n })\n .then((res) => {\n logger.info('Created a Status record with server side ID...
[ "0.6948532", "0.6399034", "0.60254407", "0.60040957", "0.58954287", "0.5852541", "0.5839862", "0.58385396", "0.5784814", "0.5770287", "0.57269305", "0.57206655", "0.56917536", "0.56779206", "0.5666486", "0.5645104", "0.5641335", "0.5621466", "0.56104213", "0.56065625", "0.558...
0.6495809
1
Render the ticket detail using material ui grid system
renderTicketDetail(){ const ticket = this.props.ticket; return ( <Grid container spacing={24}> <Grid item xs={12}> <Typography type="caption" gutterBottom> Ticket ID </Typography> <Typography type="display1" gutterBottom> {tic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderDetail(){\n if(!this.props.ticket){\n return (<div></div>)\n }\n const classes = this.props.classes;\n return (\n <div>\n <Paper className={classes.paper} elevation={4}>\n {this.renderTicketDetail()}\n </Paper>\n <Paper className={classes....
[ "0.73581594", "0.65292835", "0.6284471", "0.6019616", "0.5998886", "0.59643716", "0.59076625", "0.58147556", "0.57880545", "0.57378995", "0.57277167", "0.57160306", "0.5706726", "0.56933266", "0.56844187", "0.5653234", "0.5647947", "0.5646936", "0.564569", "0.5636944", "0.563...
0.8077815
0
render the technician who is in charge of the ticket
renderTechnician(){ const {escalation_level, technical_email, helpdesk_email, priority} = this.props.ticket; if(technical_email == null){ return ( <Typography type="display2" color="accent" gutterBottom> Not Assigned </Typography> ) } return ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewTickets(agent) {\n agent.add(`Give us the name of the person whom the ticket was issued to.`);\n }", "function showTickets(data) {\n let output = \"\";\n // if (data.messages.length > 0) {\n data.tickets.forEach(function(ticket) {\n let state;\n if(ticket.state==\"read\"){\n state=...
[ "0.63928074", "0.6152087", "0.5743208", "0.57063776", "0.5691622", "0.55838716", "0.5536797", "0.5524759", "0.55188805", "0.55076134", "0.54708856", "0.5467058", "0.5383329", "0.53485334", "0.5333142", "0.530108", "0.5290709", "0.5285415", "0.5268951", "0.5213955", "0.5201619...
0.6752365
0
render the status item
renderStatus(stat){ const {title, message, status, admin_email, sid} = stat const pendingColor = '#ff6b57'; const resolvedColor = '#2ef15b'; const unresolvedColor = '#f22e2e'; const inProgressColor = '#2d3ef0'; const color = { 'PENDING': pendingColor, 'RESOLVED': reso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStatus (value, p, r) {\n var statusId = r.get('statusId');\n if(statusId == 1)\n return '<span class=\\'successBox font10\\' >#{msgs.success}</span>';\n else if(statusId == 2)\n return Ext.String.format('<span class=\\'warnBox font10\\' >#{msgs.warning}</span>',value);\n else if(statusId =...
[ "0.6945435", "0.6716089", "0.66309434", "0.64333713", "0.64295244", "0.63495225", "0.6329823", "0.63156325", "0.6163262", "0.6103644", "0.6092603", "0.608821", "0.607012", "0.6061754", "0.60594195", "0.60244936", "0.60058296", "0.5987088", "0.59740204", "0.5969054", "0.595044...
0.67310435
1
render the status form
renderStatusForm(){ const classes = this.props.classes; return ( <form className={classes.container} noValidate autoComplete="off"> <TextField id="title" label="Title" value={this.props.status_form.title} onChange={(e)=>{ this.props.setStat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderStatuses(){\n const statuses = this.props.ticket.statuses;\n return (\n <div>\n <Typography type=\"display1\" gutterBottom>\n Statuses\n </Typography>\n {statuses && statuses.length > 0 ? \n <div>\n <Divider className={this.props.clas...
[ "0.6128697", "0.6045556", "0.59944487", "0.5950785", "0.5925361", "0.590517", "0.5857237", "0.5815724", "0.57964116", "0.57883674", "0.577412", "0.5740706", "0.5738936", "0.5732025", "0.56940114", "0.56931204", "0.568571", "0.568328", "0.5679731", "0.5666183", "0.56600034", ...
0.6973522
0
render the technician form
renderTechnicianForm(){ const {escalation_level, technical_email} = this.props.ticket; return ( <div> <Typography type="title" gutterBottom> {this.props.position === 'hr' ? 'Reassign Technician' : 'Request new technician'} </Typography> <Grid container spacing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderTechnician(){\n const {escalation_level, technical_email, helpdesk_email, priority} = this.props.ticket;\n if(technical_email == null){\n return (\n <Typography type=\"display2\" color=\"accent\" gutterBottom>\n Not Assigned\n </Typography>\n )\n }\n ...
[ "0.6049788", "0.5771805", "0.5661346", "0.5543806", "0.5529373", "0.5479745", "0.5364905", "0.53525406", "0.5318348", "0.5267589", "0.52011335", "0.519906", "0.5192317", "0.51826745", "0.5179671", "0.51765853", "0.515312", "0.5131598", "0.5130568", "0.5111252", "0.5050523", ...
0.63525
0
map technician email to name
getTechnicalName(email){ for(var i = 0; i < this.props.technicians.length; i++){ var item = this.props.technicians[i]; if(item.email == email){ return item.name; } } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNameForAnEmail(clientEmail) {\n for (var i = 0; i < all_occupants_details.length; i++) {\n if (all_occupants_details[i].email == clientEmail) return all_occupants_details[i].name;\n }\n\n //own email id is not available in all_occupants_details...\n //so return own user_name in that case...\n i...
[ "0.65020216", "0.65020216", "0.6449625", "0.6449625", "0.63722163", "0.6349397", "0.62058306", "0.6197255", "0.6196432", "0.6073502", "0.6070284", "0.6050869", "0.60273844", "0.5897839", "0.58370924", "0.5823831", "0.58217317", "0.577771", "0.5766659", "0.57572967", "0.569870...
0.7417761
0
Desc set contact page height
function setHeightForContact() { var windowHt = $(window).outerHeight(true); var headerHt = $(".bar-header").outerHeight(true); var subNameHt = $(".contact-detail").outerHeight(true); var subHeaderHt = $(".subCtHdr").outerHeight(true); var tabHt = $(".tsb-icons").outerHeight(true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set pageHeight(value) {\n this.pageHeightIn = value;\n this.notifyPropertyChanged('pageHeight');\n }", "function getNewHeight(){\r\n\tvar top=dojo.style(\"details_land\",\"height\");\r\n\tvar title=dojo.style(\"pageHeader\",\"height\");\r\n\tvar newHeight=top-title;\r\n\tdojo.style(\"pageBottom\...
[ "0.6860957", "0.67596656", "0.67265", "0.66965413", "0.66951936", "0.6690614", "0.6593252", "0.6561655", "0.6552439", "0.65394115", "0.6519308", "0.6486603", "0.64689696", "0.6456583", "0.6419527", "0.6413123", "0.6403234", "0.6384435", "0.636033", "0.63567454", "0.63403314",...
0.75221056
0
Set the list of wellknown sections
setFixedSections(ids) { let newSections = {}; ids.forEach((id) => { if (this.fixedSections[id]) { newSections[id] = this.fixedSections[id]; } else { newSections[id] = { type: "html", content: "" }; } }); this.fixedSections = newSections; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSections() {\n for (let i = 0; i < 20; i++) {\n sections.push({ title: `Section ${i + 1}`, htmlContent: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi fermentum metus faucibus lectus pharetra dapibus. Suspendisse potenti. Aenean aliquam elementum mi, ac euismod augue. Donec e...
[ "0.61808676", "0.5878684", "0.56788844", "0.5487911", "0.5471983", "0.5440074", "0.54045475", "0.5375816", "0.5372661", "0.5309541", "0.5289049", "0.52635473", "0.5261081", "0.5258671", "0.5257879", "0.5234735", "0.52253544", "0.52027524", "0.5143897", "0.5143896", "0.5125565...
0.6262623
0
Clean up extra blank lines at the end of the previous text section. If the result is an empty text section, delete it.
cleanupTextSection() { this.deactivateAlternateScreen(); var current_section = this.sections[this.sections.length - 1]; if (current_section instanceof VT100Section) { current_section.trimLines(); if (current_section.isBlank()) { this.sections.pop(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeEmptyLines() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLinesUtility,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n }, function (up) {\n var arr = up.inlines;\n for (var i = arr.length - 1; i >= ...
[ "0.6407119", "0.63155496", "0.62853855", "0.62759215", "0.6229471", "0.60239226", "0.5982078", "0.59753793", "0.58978486", "0.587794", "0.58600444", "0.5752025", "0.5751184", "0.5743288", "0.5707447", "0.56931144", "0.5691391", "0.5686428", "0.5686428", "0.5623016", "0.558919...
0.7562056
0
the function that controls the canvas hiding/displaying logic we determine the state of the website by parsing URL we also reset the reference counter whenever we transit to a new state
function showCanvas() { let refCanvas = document.getElementById("refCanvas"); let exeCanvas = document.getElementById("exeCanvas"); let outputCanvas = document.getElementById("outputCanvas"); //start of creating reference if(parsedURL.mode === 'start' && refFrames && refFrames.length === 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideButtons(url,domain) {\n\n var count = 0;\n\n //switch statement for sites\n switch(true)\n {\n \n case url.indexOf(\"sites.html\") > -1 :\n document.getElementById('admin').className += ' hidden';\n ...
[ "0.5742293", "0.5722741", "0.5611292", "0.55620563", "0.55576414", "0.55544186", "0.55408484", "0.55283576", "0.5504502", "0.549072", "0.54584354", "0.5341253", "0.5332806", "0.53289545", "0.53213006", "0.5318478", "0.5318478", "0.5317074", "0.5312977", "0.5291857", "0.529003...
0.6061236
0
function that draws each joint as a yellow round dot
function drawJoints(parameters, ctx, color){ let cx = parameters.cx; let cy = parameters.cy; ctx.beginPath(); ctx.arc(cx, cy, radius, 0, Math.PI*2); //radius is a global variable defined at the beginning ctx.closePath(); ctx.fillStyle = color; ctx.fill(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paintJoints() {\r\n joinCellsX.forEach((element) => {\r\n ctx.fillRect(element.x, element.y, unit, space - unit);\r\n });\r\n joinCellsY.forEach((element) => {\r\n ctx.fillRect(element.x, element.y, space - unit, unit);\r\n });\r\n}", "function drawBlueAsteroid(){\n penDown();\n penWidth(5);...
[ "0.7851011", "0.64684606", "0.6403621", "0.63581777", "0.6355687", "0.6345783", "0.63206965", "0.62984973", "0.62570983", "0.6251678", "0.62509507", "0.62492", "0.62462366", "0.62416625", "0.6231124", "0.6204123", "0.6185598", "0.61805415", "0.6168594", "0.6164375", "0.613845...
0.67378706
1
Check whether a Vector3 is inside a wall
function checkWallCollision(v) { const c = getMapSector(v) return map[c.x][c.z] > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inWall(x, y) {\n var borderLen = 15 + side;\n\n // these denote the position of the wall\n var leftWall = borderLen;\n var rightWall = width - borderLen;\n var topWall = height - borderLen;\n var bottomWall = borderLen;\n\n if (x <= leftWall || x >= rightWall) {\n return true;\n } // coordinate...
[ "0.7455743", "0.7224147", "0.719123", "0.7143123", "0.71082425", "0.7058974", "0.7001094", "0.6979946", "0.6917188", "0.68399227", "0.6838616", "0.68299305", "0.677304", "0.67493725", "0.67217296", "0.6714286", "0.67069405", "0.663792", "0.6633665", "0.6602104", "0.6590263", ...
0.7308867
1
Fetches a page of photos for a particular user's query. Relies on the custom API middleware defined in ../middleware/api.js. not clear why Schemas are defined in 'middleware/api'
function fetchPhotos(query, nextPageUrl) { // console.log("fetchPhotos building a CALL_API action for url: ", nextPageUrl) return { query, [CALL_API]: { types: [ PHOTOS_REQUEST, PHOTOS_SUCCESS, PHOTOS_FAILURE ], endpoint: nextPageUrl, schema: Schemas.PHOTO_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPhotos(req, res, next) {\n connection.query('SELECT * from photos where idusers=?',[session.id], function(err, rows) {\n if (!err){\n console.log('The solution is: ', rows);\n req.photos = rows;\n return next();\n }else\n console.log('Error ...
[ "0.6432104", "0.6290977", "0.6273533", "0.61979437", "0.61917657", "0.6159542", "0.61585784", "0.6004086", "0.5960827", "0.5936415", "0.5929759", "0.5905788", "0.58932054", "0.58534384", "0.58527875", "0.5843889", "0.58227444", "0.5822569", "0.5798154", "0.5779211", "0.576872...
0.6621908
0
Fetches a page of stargazers for a particular repo. Relies on the custom API middleware defined in ../middleware/api.js.
function fetchStargazers(fullName, nextPageUrl) { return { fullName, [CALL_API]: { types: [ STARGAZERS_REQUEST, STARGAZERS_SUCCESS, STARGAZERS_FAILURE ], endpoint: nextPageUrl, schema: Schemas.USER_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMostStargazers() {\n getAjaxData(\"https://api.github.com/orgs/HackYourFuture/repos\", allRepos => {\n clearAllTags(); \n const maxStar = findMaxStar(allRepos); \n renderRepositories_Stars(allRepos, maxStar); \n \n \n }); \n \n}", "function getPage(nav) {\n...
[ "0.6694817", "0.5543736", "0.5439158", "0.5415624", "0.5384675", "0.5340934", "0.5331442", "0.52793014", "0.526933", "0.52684265", "0.52332354", "0.5212743", "0.52126795", "0.5165361", "0.51233315", "0.50997305", "0.5095537", "0.50710607", "0.50528586", "0.50408965", "0.50220...
0.63646656
1