Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
generate description for air quality
function airQualityMessage(aqi) { let message = ''; if (!aqi) { message += '<h5>Oh no!</h5><p>Data is currently unavailable.</p>' } else if (aqi <= 50) { message += ` <h5>Good</h5> <p>Air quality is satisfactory.</p> <p>Air pollution poses little or no risk.</p>`; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deductibleDescription() { \n return gapPlanData.description();\n}", "static createCustomDescription(replayEpisode) {\n let descriptionArr = ['Custom'];\n // Main Segment\n // If only one game in main segment\n if (replayEpisode.mainSegmentGamesAdv.length == 1) {\n ...
[ "0.6949028", "0.65914327", "0.6553306", "0.64157826", "0.63266826", "0.6326356", "0.6300373", "0.62916076", "0.62752306", "0.62704843", "0.6253982", "0.6234307", "0.622309", "0.6222655", "0.6110931", "0.6006315", "0.600108", "0.5964712", "0.595712", "0.5956477", "0.5942344", ...
0.5842842
25
convert F to C
function convertToCelcius(fahrenheit) { return Math.round((fahrenheit - 32) * 5 / 9); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FtoC(F) {\n return (F - 32) / 1.8;\n}", "function CtoF(C) {\n return (C * 1.8 + 32);\n}", "function F2C(f) {\r\n if (f == null) { return null; }\r\n else { return ((f-32)*5/9).toFixed(2); }\r\n}", "function convertCtoF(cTemp)\n{\n var fTemp = cTemp * 1.8 + 32;\n return fTemp;\n}", "f...
[ "0.8335149", "0.80014163", "0.7398516", "0.73744524", "0.7227568", "0.7117984", "0.70013386", "0.6907756", "0.6896235", "0.66957206", "0.66906685", "0.6683034", "0.6682692", "0.66154337", "0.66011286", "0.64720255", "0.6392627", "0.6347815", "0.63272953", "0.63071007", "0.627...
0.0
-1
make date from "20171031" to "10/31"
function dateFormat(string) { let array = string.split("-"); return `${array[1]}/${array[2]}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateToDDMMYYYY(date) {\n let d = date.getDate();\n let m = date.getMonth() + 1;\n let y = date.getFullYear();\n return (m <= 9 ? \"0\" + m : m) + \"/\" + (d <= 9 ? \"0\" + d : d) + \"/\" + y + \": \";\n}", "function convertDate(date) {\n let day = date.substring(8);\n let month = date.substrin...
[ "0.7144119", "0.7101989", "0.68647915", "0.68521863", "0.66813606", "0.6652353", "0.6518174", "0.6452686", "0.6450603", "0.6440174", "0.6412663", "0.63952", "0.6369322", "0.63630205", "0.63608086", "0.6330939", "0.633063", "0.6330431", "0.6329114", "0.63207805", "0.63007104",...
0.0
-1
make array of dates for tabs
function makeDateArray(weatherData, array){ weatherData.data.forEach((item, index) => { Object.keys(item).forEach(key => { if(key === "datetime") { array.push(dateFormat(weatherData.data[index][key])); return array; } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createDateArray() {\n\t\tvar datesArray = [];\n\t\t\n\t\tfor(var i = 0; i < 6; i++){\n\t\t\tvar currentDate = new Date();\n\t\t\tcurrentDate.setDate(currentDate.getDate() + i);\n\t\t\t\n\t\t\tvar dd = currentDate.getDate();\n\t\t\tvar mm = currentDate.getMonth() + 1; //January is 0!\n\t\t\tvar yyyy = currentDate.g...
[ "0.72086316", "0.69461244", "0.67632914", "0.67534363", "0.6673396", "0.6660452", "0.65639776", "0.65200293", "0.64358467", "0.6434629", "0.64329445", "0.64294887", "0.64144784", "0.6363567", "0.63134867", "0.6304651", "0.62414455", "0.619205", "0.6184953", "0.6171804", "0.60...
0.5788359
45
display weather on document
function displayWeather(weatherData) { const { data } = weatherData; data.forEach((item, index) => { const { max_temp, min_temp, weather, clouds, wind_sp, wind_cdir, pop, vis, snow, sn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayWeather(data) {\n nyWeather = f2k(data.main.temp);\n // debugger\n $('p.NY-Weather').text(`The weather in New York is ${nyWeather} F`);\n}", "function showGeoInfo(){\n $('#location').html(geo.city);\n $('#day').html(geo.day);\n $('#weather').html(geo.weather);\n $('#weather-icon...
[ "0.73087096", "0.7282228", "0.7146808", "0.7140537", "0.7135312", "0.71109164", "0.7106151", "0.70879316", "0.7052741", "0.70513093", "0.70404875", "0.7012264", "0.70065844", "0.6998629", "0.6971335", "0.69470024", "0.6941547", "0.69414634", "0.6916914", "0.6914785", "0.69074...
0.0
-1
if user query not capitalized, capitalize it
function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function camelCase (userInput) {\n // let shouldCapitalize = true;\n // let result = \"\";\n // for (let i = 0; i < userInput.length; i++) {\n // // Check for the first letter in a word, if it is, then Capitalize\n // if (userInput.charAt(i) === \" \") {\n // result += userInput....
[ "0.71374947", "0.7132003", "0.7026016", "0.7005901", "0.69770116", "0.6935517", "0.69306767", "0.68893814", "0.68496174", "0.6764128", "0.67570436", "0.6743477", "0.67387015", "0.6728348", "0.67254496", "0.6724684", "0.6724305", "0.6724305", "0.6723992", "0.6697318", "0.66955...
0.0
-1
display user queried city and state on document
function displayCityState(city, state) { city = capitalize(city); state = capitalize(state); $('#js-city-state').append(`<h5>${city}, ${state}</h5>`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function query(currCountry, currCity) {\n let db = await mongoService.connect();\n let res = await db\n .collection(USERS_COLLECTION)\n .find({ \"address.city\": currCity, \"address.country\": currCountry })\n .toArray();\n return res;\n}", "function searchByCity(contact) {\n return contact....
[ "0.62371683", "0.6043402", "0.5997998", "0.5969606", "0.5892159", "0.58463806", "0.5842433", "0.58229446", "0.57918054", "0.57159156", "0.57066596", "0.56988215", "0.56762695", "0.56716424", "0.5658875", "0.5600864", "0.5560188", "0.55457276", "0.5530152", "0.55298555", "0.55...
0.62633985
0
render tabs and weather data
function renderWeather(weatherData) { addTabs(weatherData, 'Air'); displayWeather(weatherData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n let self = this;\n let count = 0;\n return (\n <div className=\"start\">\n <div className=\"start-header\">\n <div>\n <h1>Weather Report</h1>\n\n </div>\n </div>\n\n ...
[ "0.7031471", "0.68458974", "0.6772765", "0.6713178", "0.6486547", "0.6401912", "0.63601935", "0.63271767", "0.6326464", "0.6319109", "0.63183427", "0.6310141", "0.6291043", "0.6262451", "0.62614965", "0.62473595", "0.62447476", "0.6235463", "0.6227796", "0.62265676", "0.62232...
0.73892665
0
checks user entry against this data for autocomplete state
function autocompleteState() { $('#js-state-entry').autocomplete({ data: { 'Alabama': null, 'Alaska': null, 'American Samoa': null, 'Arizona': null, 'Arkansas': null, 'California': null, 'Colorado': null, 'Connecticut': null, 'Delaware': nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkAutocomplete() {\n if (this.airports) {\n this.filteredAirports = this.filter(this.airports, this.search, this.fields);\n\n let keys = Object.keys(this.filteredAirports);\n\n if (keys.length == 1 && this.search) {\n this.autocomplete = this.filteredAirports[keys[0]];\n this.ait...
[ "0.6885349", "0.6356826", "0.62441045", "0.62351584", "0.62351584", "0.62351584", "0.62351584", "0.6224242", "0.615508", "0.609241", "0.60453415", "0.59588575", "0.5878743", "0.5799328", "0.57919383", "0.5768031", "0.57565695", "0.5696578", "0.5694713", "0.5689251", "0.568352...
0.61293423
9
check user entry against this data for autocomplete city
function autocompleteCity() { $('#js-city-entry').autocomplete({ data: { 'New York': null, 'Los Angeles': null, 'Chicago': null, 'Houston': null, 'Philadelphia': null, 'Phoenix': null, 'San Antonio': null, 'San Diego': null, 'Dallas': null, 'San Jose': null, 'Austin':...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchActivity() {\n const place = autocomplete.getPlace();\n if (countryField.value == \"all\") {\n alert(\"Please choose a country and city before searching for an activity\");\n resetForm();\n } else if ($(\"#autocomplete\").val() == \"\") {\n alert(\"Please enter a city\");\n } else if (p...
[ "0.6942031", "0.6870796", "0.67822206", "0.6779109", "0.6740914", "0.6683739", "0.6540752", "0.6519802", "0.649166", "0.643499", "0.64343", "0.6381023", "0.63156354", "0.63055444", "0.6296689", "0.6276971", "0.6269815", "0.62682134", "0.62494034", "0.62042993", "0.62037677", ...
0.7057727
0
handleSubmit; get city and state; get data; render data on DOM; refresh
function handleSubmit() { $('#js-search-section').submit((e) => { e.preventDefault(); clear(); city = $('#js-city-entry').val(); state = $('#js-state-entry').val(); $('#js-city-entry').val(''); $('#js-state-entry').val(''); displayCityState(city, state); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSubmit(e){\n e.preventDefault()\n getLocation() //Call the function which will do the local weather data\n setInputAddress(\"\") //Clean input field after an search\n }", "async function handleSubmit(e) {\n e.preventDefault();\n if (city) {\n const coord = await FetchCitylonLa...
[ "0.72666013", "0.7132016", "0.71184695", "0.6863484", "0.6794108", "0.67512566", "0.66902757", "0.65941495", "0.65727794", "0.6569161", "0.6543847", "0.6534926", "0.65213233", "0.649213", "0.6482554", "0.6425703", "0.641907", "0.6418671", "0.6407357", "0.6398535", "0.63887626...
0.7102672
3
Clear the canvas and then iterate over child elements.
function redraw() { // clear(context); canvas.width = canvas.getAttribute("width"); canvas.height = canvas.getAttribute("height"); // for (var child = root.firstChild; child; child = child.nextSibling) draw(child); var circle = {x: 10, y: 10, r: 10, strokeStyle: "red"};...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render () {\n\t\t\t\t//Clear the entire canvas every render\n\t\tthis\n\t\t\t\t\t\t.context\n\t\t\t\t\t\t.clearRect( 0, 0, this.width, this.height );\n\n\t\t\t\t//Trigger the render function on every child element\n\t\tfor ( let i = 0; i < this.circleContainers.length; i++ ) {\n\t\t\tthis\n\t\t\t\t\t\t\t\t.circleC...
[ "0.6718816", "0.6662316", "0.62728876", "0.6159603", "0.611491", "0.6085995", "0.608479", "0.604976", "0.604976", "0.60431904", "0.60341024", "0.5990853", "0.5928905", "0.58915985", "0.5848846", "0.58269167", "0.5793213", "0.5775469", "0.57722807", "0.5766738", "0.5757093", ...
0.0
-1
For now we only support circles with strokeStyle. But you should imagine extending this to arbitrary shapes and groups!
function drawCircle(context, element) { context.strokeStyle = element.strokeStyle; context.fillStyle = element.fillStyle; context.globalAlpha = 0.5; context.beginPath(); context.arc(element.x, element.y, element.r, 0, 2 * Math.PI); context.stroke(); context.fill()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Circle(x, y, radius, strokeStyle, fillStyle)\r\n{\r\n this.x = x;\r\n this.y = y;\r\n this.radius = radius;\r\n this.strokeStyle = strokeStyle;\r\n this.fillStyle = fillStyle;\r\n \r\n this.draw = function()\r\n {\r\n ctx.beginPath();\r\n ct...
[ "0.682902", "0.66901207", "0.66892886", "0.66044384", "0.65883625", "0.64888495", "0.6480743", "0.6462226", "0.6429611", "0.64012367", "0.63528496", "0.63097507", "0.6242954", "0.6242931", "0.62071586", "0.6171206", "0.6164045", "0.61496514", "0.61437947", "0.61239654", "0.61...
0.5745678
76
Returns a unique id. The id starts with an "e" character and a randomly generated string of 32 alphanumeric characters. Note: The characters the unique id is built from correspond to the hex number notation (from "0" to "9", from "a" to "f"). In other words, each id corresponds to an "e" followed by 16 8bit numbers nex...
function uid() { // Let's create some positive random 32bit integers first. // // 1. Math.random() is a float between 0 and 1. // 2. 0x100000000 is 2^32 = 4294967296. // 3. >>> 0 enforces integer (in JS all numbers are floating point). // // For instance: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeId() {\n var result = \"\";\n var hexChars = \"0123456789abcdef\";\n for (var i = 0; i < 16; i += 1) {\n result += hexChars[Math.floor(Math.random() * 16)];\n }\n return result;\n}", "function makeId() {\n var result = \"\";\n var hexChars = \"0123456789abcdef\";\n for (var i = 0; i < 16;...
[ "0.8589942", "0.8589942", "0.83949107", "0.8327209", "0.8312041", "0.8312041", "0.8312041", "0.8309484", "0.8308552", "0.828899", "0.8281145", "0.82784265", "0.8254649", "0.8245336", "0.8240192", "0.8229887", "0.8216184", "0.82077366", "0.8207022", "0.82001185", "0.8182639", ...
0.79841805
45
istanbul ignore next eslintdisablenextline
function checkConnectionBetweenProps(target1, target2, excludedNodes) { var _ref84 = (0, _getsubnodes__WEBPACK_IMPORTED_MODULE_0__["default"])(target1, excludedNodes.subNodes), subNodes1 = _ref84.subNodes, prevNodeMap1 = _ref84.prevNodeMap; var _ref85 = (0, _getsubnodes__WEBPACK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hello2() {\n const bye = \"bye\";\n\n /**\n * For disable the es-lint on the line\n * Please put the below comment\n * now instead of the error we will have the warning for below 2\n */\n // eslint-disable-next-line\n console.log(\"this is sample \", bye);\n\n /**\n * disabling a particular...
[ "0.6788099", "0.5579938", "0.54321706", "0.5428416", "0.5418407", "0.5386692", "0.5378387", "0.53578436", "0.5340557", "0.5327353", "0.53213036", "0.53074306", "0.5298635", "0.52854574", "0.52515894", "0.52457035", "0.5235739", "0.5234501", "0.52341527", "0.5200404", "0.51876...
0.0
-1
Add a new member to the group, each object must be associated with a coordinate frame to arrange that object within the group
add({ object, frame }) { this.children.push({ object, frame }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addMember(groupName, memberName) {\n // This will add the memeber to all the groups with the same name.\n this.groups.filter(g => g.name && g.name.toLowerCase() == groupName.toLowerCase())\n .forEach(g => {\n if (g.members == undefined) {\n g.members = [];...
[ "0.7175645", "0.65916795", "0.65743595", "0.65634346", "0.64296913", "0.6421915", "0.63506573", "0.63442934", "0.62510234", "0.61817527", "0.61274195", "0.6125478", "0.6094738", "0.60639846", "0.6056903", "0.60197186", "0.59319943", "0.5919289", "0.591656", "0.59097433", "0.5...
0.61956406
9
We are using the Visitor pattern here. The actual behavior of the rendering logic is supplied as a function (first arg)
render(renderer, frame) { if (typeof frame === 'undefined') { throw 'Must supply coordinate frame to render the group'; } for (let k = 0; k < this.children.length; k++) { const ch = this.children[k]; // pre-multiply the requested coordindate with this child's CF mat4.multiply(this.te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_render() {}", "render() {}", "render() {}", "render() {}", "static rendered () {}", "static rendered () {}", "function general_render(obj) {\n obj.render();\n }", "function render() {\n\t\t\n\t}", "function render() {\n\n\t\t\t}", "function render() {\r\n\r\n}", "function render() {\r\n\r\...
[ "0.69806665", "0.691369", "0.691369", "0.691369", "0.676707", "0.676707", "0.67454404", "0.6672734", "0.66673744", "0.66424394", "0.66424394", "0.66240114", "0.66129243", "0.6608203", "0.64638174", "0.64638174", "0.64420855", "0.64374065", "0.6433374", "0.6433374", "0.6297457...
0.0
-1
get aliases for a reference "key"
function getAliases(refs) { return refs.reduce((aliases, ref) => { const key = ref.refcontent.id; const keys = !aliases.has(key) ? aliases.set(key, []).get(key) : aliases.get(key); keys.push(ref.ref); return aliases; }, new Map()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReverseAliases() {\n var rev = {};\n _.each(me.map_meta.keys, function(key) {\n if (me.map_meta['alias-keys']) {\n _.each(me.map_meta['alias-keys'], function(alias) {\n if (alias[key]) rev[alias[key]] = k...
[ "0.6431092", "0.6294661", "0.6274367", "0.6195824", "0.5924792", "0.5783538", "0.57603467", "0.5750305", "0.5701268", "0.569628", "0.5672046", "0.56714135", "0.5656631", "0.5656631", "0.56307715", "0.5628763", "0.56108737", "0.5602447", "0.5574503", "0.5574503", "0.5574503", ...
0.72152245
0
fix biblio reference URLs Add title attribute to references
function decorateInlineReference(refs, aliases) { refs .map(({ ref, refcontent }) => { const refUrl = `#bib-${ref.toLowerCase()}`; const selectors = aliases .get(refcontent.id) .map(alias => `a.bibref[href="#bib-${alias.toLowerCase()}"]`) .join(","); const elems = documen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweaklinks(doc)\n{\n // Do not touch these link titles\n let ignoreTitles=[\"Lägg till\",\"Ta Bort\"];\n let mapfixedlinks = [\n { href: 'https://www.avanza.se/hall-koll/min-borsskarm.html', name: 'borsskarm' },\n { href: 'https://www.avanza.se/min-ekonomi/oversikt.html', name: 'oversikt' }...
[ "0.6280266", "0.60947156", "0.58315337", "0.5822017", "0.5773634", "0.5724801", "0.5710845", "0.5692837", "0.5664592", "0.5630825", "0.5625995", "0.5586575", "0.55469203", "0.554136", "0.5540706", "0.5488881", "0.5488881", "0.5488881", "0.5488881", "0.5488881", "0.5455465", ...
0.6164308
1
warn about bad references
function warnBadRefs(refs) { for (const { ref } of refs) { /** @type {NodeListOf<HTMLElement>} */ const links = document.querySelectorAll( `a.bibref[href="#bib-${ref.toLowerCase()}"]` ); const elements = [...links].filter( ({ textContent: t }) => t.toLowerCase() === ref.toLowerCase() )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "warn() {}", "function isReferenceError(bResult)\r\n{\r\nreturn bResult? msgERR_REF_YES : msgERR_REF_NO;\r\n}", "invalidateReferences() {\n this._references = undefined;\n }", "invalidateReferences() {\n this._references = undefined;\n }", "function cleanRefsHandler(obj) {\n if (!o...
[ "0.6143386", "0.5962163", "0.59294695", "0.59294695", "0.58598393", "0.57981485", "0.57514924", "0.5684518", "0.567341", "0.5642181", "0.5585651", "0.55624974", "0.54761636", "0.54646087", "0.542291", "0.5414928", "0.53978854", "0.5380141", "0.5371254", "0.5359298", "0.534462...
0.7033384
0
Set up the ground, wall and car that was chosen.
function startGame(car_type_select) { console.log("startGame"); collided = false; ground = drawGround(canvas_width, canvas_height); stage.addChild(ground); wall = drawWall(canvas_width, canvas_height, ground.height); stage.addChild(wall); text_kinetic_energy = createText({ queue, text_type: "tex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n createCanvas(1600, 400);\n\n wall = new Wall();\n\n start = new GameButton(\"Start\", true);\n reset = new GameButton(\"Reset\", false);\n\n turbo = new Car();\n turbo.brand = \"Porsche\";\n turbo.carName = \"911 996 Turbo\";\n turbo.y = 70;\n turbo.weight = Math.round(random(400, 130...
[ "0.7053809", "0.666624", "0.64108795", "0.6384132", "0.6377441", "0.63683087", "0.6332021", "0.632381", "0.6263543", "0.62393236", "0.6230683", "0.62068284", "0.6158643", "0.61510426", "0.61298496", "0.6122469", "0.610069", "0.6095988", "0.6088723", "0.6084117", "0.60798836",...
0.5846584
63
Does the pulsating effect
function pulseItem(item) { createjs.Tween.get(item, { loop: true }) .to({ scaleX: 1.2, scaleY: 1.2 }, 900) .to({ scaleX: 1, scaleY: 1 }, 900); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showPulse() {\n this._triggerAnimation(this._icon, 'shadow-pulse');\n }", "function pulse() {\n $('.heart').animate({\n opacity: 0.2\n }, 300, function() {\n $('.heart').animate({\n opacity: 1\n }, 1200, function() {\n pulse();\n ...
[ "0.71182334", "0.69269335", "0.6862127", "0.68297094", "0.66222376", "0.6610994", "0.6527081", "0.6493298", "0.64869523", "0.64622164", "0.6417605", "0.6387595", "0.63427955", "0.6275535", "0.6258743", "0.6231418", "0.6208638", "0.6181785", "0.6110663", "0.6096186", "0.605209...
0.6150078
18
resize youtube player depending on window size
function ResizePlayer() { var newWidth = window.innerWidth * 0.45; var newHeight = newWidth * 0.625; if((newWidth >= playerMinSize) && (newWidth <= playerMaxSize)) { $(".youtube-embed").width(newWidth); $(".youtube-embed").height(newHeight); $(".learning-content").width(newWidth + 3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeVideoJS(){\n // Get the parent element's actual width\n var width = document.getElementById(myPlayer.id).parentElement.offsetWidth;\n // Set width to fill parent element, Set height\n\tif($(document).width() < 780)\n\t\tmyPlayer.width(width).height( width * aspectRatio );\n\telse\n ...
[ "0.75199914", "0.7463959", "0.73983437", "0.7378276", "0.7314337", "0.71976125", "0.71446776", "0.70519", "0.6943115", "0.6918487", "0.688757", "0.6849614", "0.6839373", "0.6813446", "0.67353123", "0.67238235", "0.67098606", "0.6620501", "0.6588333", "0.6562225", "0.65545136"...
0.8158125
0
Used to add a topic to the edit learning piece page without a reload
function AddTopic() { if($("#new-topic").val() != "") { $.ajax({ type: "POST", url: "/topics", data: $.param({ topic: {title: $("#new-topic").val()}}), dataType: "json", }) .success(function (data) { var checkbox = document....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onTopicClick(topic) {\n if (topic.rowid === this.currentTopic) {\n return;\n }\n\n this.currentTopic = topic.rowid;\n localStorage.setItem('currentTopic', this.currentTopic);\n this.loadSelections();\n }", "function addTopicToSelected(topic) {\n // if the there a...
[ "0.6588536", "0.6559797", "0.65336126", "0.6420627", "0.6376755", "0.63692516", "0.6280677", "0.6173798", "0.6156635", "0.61540717", "0.61065745", "0.6105549", "0.6102712", "0.60789376", "0.6067429", "0.602494", "0.59683925", "0.59602386", "0.5956128", "0.5921598", "0.5911776...
0.0
-1
Sets an existing option
function _setValue( pValue ) { gSelectList$.val( pValue ); // If we haven't selected any entry then we will pick the first list entry as most browsers // will automatically do for drop down select lists - except of IE9 (bug# 14837012) // Note: We don't do this if it's a select list where...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SetOption() {\n\n }", "SetOption(string, Variant) {\n\n }", "function setOption( name, value ){\n\t\toptions[name] = value;\n\t}", "setOption(name, value) {\n if(this.options[name] === value) {\n return;\n }\n\n this.options[name] = value;\n\n this.flagDirty();\n\n this.applyOptions...
[ "0.79940814", "0.78899986", "0.77735436", "0.7737269", "0.7663536", "0.7606086", "0.7555057", "0.75263643", "0.7248523", "0.7215872", "0.68553656", "0.6851238", "0.6720357", "0.6640661", "0.66117656", "0.65389806", "0.65389806", "0.65206957", "0.65172064", "0.6444598", "0.642...
0.0
-1
Clears the existing options
function _clearList() { // remove everything except of the null value. If no null value is defined, // all options will be removed (bug #14738837) if ( "nullValue" in pOptions ) { $( 'option[value!="' + apex.util.escapeCSS( gOptions.nullValue ) + '"]', gSelectList$ ).remove(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.options = Object.create(null);\n }", "clearOptions(){\n let element = p5Instance.select(`#div_${this.id}`);\n if(element){\n element.remove();\n this.command.context.chain.strokeWeight(1);\n }\n }", "function clearOptions(element) {\n element....
[ "0.7717937", "0.75347626", "0.74283355", "0.7256063", "0.7177693", "0.7162012", "0.7145384", "0.70946604", "0.7060881", "0.70123774", "0.70123774", "0.6994057", "0.69826186", "0.69748086", "0.69343966", "0.69004804", "0.6816164", "0.6805559", "0.67273235", "0.66980326", "0.66...
0.6643492
24
Clears the existing options and executes an AJAX call to get new values based on the depending on fields
function refresh() { widget.util.cascadingLov( gSelectList$, gOptions.ajaxIdentifier, { pageItems: $( gOptions.pageItemsToSubmit, apex.gPageContext$ ) }, { optimizeRefresh: gOptions.optimizeRefresh, depe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetDropDown(){\n $('#selections > option').each(function () {this.remove();}); //remove all the existing selection options\n $.get({ //update the selections with the information in database after the update was submitted, same as above, just might have a new name for recently updated item\n url...
[ "0.6848815", "0.6721233", "0.66863984", "0.6611471", "0.65857255", "0.649707", "0.642234", "0.6345974", "0.62861407", "0.62752163", "0.6236506", "0.6233582", "0.6215393", "0.61862934", "0.61784756", "0.60954636", "0.6091862", "0.60756046", "0.60749984", "0.6071693", "0.606879...
0.6171373
15
Capitalizes the first letter of any string variable source:
function capitaliseFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function titleCases(arg){\n return arg.charAt(0).toUpperCase() + arg.substring(1);\n }", "function capitalize(str) {}", "function caps(a) {return a.substring(0,1).toUpperCase() + a.substring(1,a.length);}", "function ucFirst(str) {\n\n }", "function cap_first(s) {\n return s[0].toUpperCase() + s.su...
[ "0.787036", "0.7784485", "0.76786155", "0.7668078", "0.759243", "0.75778633", "0.75390327", "0.7514291", "0.7493835", "0.7493769", "0.74836445", "0.748134", "0.7478651", "0.7457397", "0.74542946", "0.7437241", "0.743386", "0.7431726", "0.7424525", "0.74196357", "0.7417886", ...
0.0
-1
Fetches quotes from API on page load
function fetchQuotes() { fetch(QUOTES_URL) .then(resp => resp.json()) .then(data => quoteIterator(data)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchQuotes () {\n fetch(QUOTES_URL)\n .then(response => response.json())\n .then(json => {\n json.forEach(quote => {\n buildQuoteCard(quote)\n })\n })\n }", "async function getQuotes() {\n showLoadingSpinner();\n const apiUrl = 'http...
[ "0.79633194", "0.77543837", "0.7633949", "0.7633949", "0.749913", "0.7474091", "0.7465089", "0.74476594", "0.7406648", "0.73782134", "0.73586965", "0.73305213", "0.7301473", "0.72947633", "0.72620416", "0.7246806", "0.72085565", "0.72047323", "0.7199851", "0.7128262", "0.7104...
0.7517439
4
Iterate through array of quotes
function quoteIterator(quotes) { for (const quote of quotes) { displayOnPage(quote); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQuotes() {\n return [\n\n 'When I die, I want to go peacefully like my grandfather did - in his sleep. Not yelling and screaming like the passengers in his car.',\n 'I have six locks on my door all in a row. When I go out, I lock every other one. I figure no matter how long somebody stands...
[ "0.6587565", "0.6122522", "0.6078798", "0.60542303", "0.60492563", "0.6038247", "0.59117", "0.58972996", "0.5884076", "0.58679414", "0.5858403", "0.58584005", "0.58576167", "0.5839946", "0.5838101", "0.5799161", "0.5783045", "0.57668775", "0.57359684", "0.5721452", "0.5716508...
0.6696699
0
Display single quote passed in
function displayOnPage(quote) { // Create and build out LI let li = document.createElement('li'); li.classList.add("quote-card"); // Create Blockquote let bq = document.createElement('blockquote'); bq.classList.add("blackquote"); // Create p tag let pTag = document.createElement('p'); pTag.classLis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get BackQuote() {}", "get DoubleQuote() {}", "set BackQuote(value) {}", "function displayQuote(quoteText, quoteAuthor) {\n quoteDisplayEl.textContent = '\"' + quoteText + '\"' + \" -\" + quoteAuthor;\n}", "function QuasiQuotation() {\r\n}", "function displayQuote(quote) {\n const quoteText = document...
[ "0.68891495", "0.68846107", "0.6867636", "0.68334323", "0.6712002", "0.66860217", "0.6629379", "0.66018295", "0.64609987", "0.6364329", "0.6364329", "0.6361817", "0.63313216", "0.63313216", "0.63313216", "0.63313216", "0.6288475", "0.6283864", "0.6264022", "0.6209226", "0.619...
0.0
-1
Increase number of likes
function liked(quote, ev) { quote.likes += 1; ev.target.parentElement.querySelector('span').textContent = quote.likes; sendUpdate(quote); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function incrementLikesCount() {\n likesCount+=1;\n getMainBody(false);\n }", "function increaseLikesOnPage(e) {\n const oldLikes = parseInt(e.target.previousSibling.innerText)\n const newLikes = oldLikes + 1\n e.target.previousSibling.innerText = `${newLikes} likes`\n updateToyLikes(e);\n}", "function...
[ "0.79850525", "0.79657936", "0.7747713", "0.77193266", "0.77012867", "0.7694875", "0.7509549", "0.7341839", "0.72753495", "0.7249916", "0.7239527", "0.72087294", "0.71938384", "0.7183627", "0.71340847", "0.7130282", "0.70519996", "0.70332456", "0.7029172", "0.70241505", "0.69...
0.751591
6
5 9 12 16 2 11 5 19 3 2 1 8 Traverse this array going right, down, left, up in, etc (spiral), print all outputs in spiral order 2, 4, 6, 8, 16, 19, 8, 1, 2, 3, 2, 5, 9, 12, 5, 11 Mark boundaries of untraversed array indices using variables T = Top left B = bottom left L = furthest bottom left R = furthest bottom right
function printSpiral(array, rows, columns) { var t = 0; var b = rows - 1; var l = 0; var r = columns - 1; //0 is traversing right, 1 is traversing down, 2 is traversing left, 3 is traversing up var direction = 0; var result = ''; while(t <= b && l <= r) { // Traverse to the right if(direction ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spiralTraverse(array) {\n const res = [];\n let start_row = 0;\n let end_row = array.length;\n let start_col = 0;\n let end_col = array[0].length;\n\n while (start_col < end_col && start_row < end_row) {\n // right\n for (let i = start_col; i < end_col; ++i) {\n res.push(array[start_row][...
[ "0.73769164", "0.72099954", "0.687149", "0.66473216", "0.66389185", "0.64879483", "0.6451496", "0.6334726", "0.63119924", "0.6251713", "0.6240741", "0.6147345", "0.6009061", "0.59385365", "0.5772591", "0.5750619", "0.57456774", "0.5743694", "0.5739458", "0.57274324", "0.57239...
0.71563065
2
Fase 2 recupero HTML per ogni arma
function getWeapons(lst) { var i = 0; getCurrentWeapon(i); function getCurrentWeapon(num) { var page = lst[num]; nightmare .goto(page) .wait('center') .inject('js', 'node_modules/jquery/dist/jquery.js') .evaluate(function () { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getRulaiHtml(content){\n\n}", "toHTML ( theMode, sigDigs , params) {}", "function formattazione(payload1,showCommenti){\n scroll(0,0);//torno in cima alla pagina per visualizzare il problema\n //selezione il div che conterrà il problema\n var divProblema =...
[ "0.65530515", "0.615792", "0.6042753", "0.603022", "0.60220724", "0.60217804", "0.5984783", "0.5953796", "0.59206486", "0.59149307", "0.5886678", "0.5868446", "0.5855234", "0.5847445", "0.58306086", "0.5830287", "0.58184963", "0.58155984", "0.580267", "0.57910556", "0.5773665...
0.0
-1
Fase 3 estrazione dei dati
function scrapeWeapons(htmls) { htmls.forEach(function(html,index){ var weapon = {}; var re = new RegExp('<i class="globe icon"><\/i>(.*)$'); //cheerio è una libreria per lo scraping di pagine HTML //si usa esattamente come jQuery //"website","product","caliber","vendor","...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataDesAct() {\n\t\tvar myJSONObject = {\"operacion\":\"DAT_DESACT\",\"codact\":Ext.getCmp('tipact').getValue()};\n\t\tvar ObjSon=Ext.util.JSON.encode(myJSONObject);\n\t\tvar parametros ='ObjSon='+ObjSon;\n\t\tExt.Ajax.request({\n\t\t\turl: '../../controlador/mrh/sigesp_ctr_mrh_programacion.php',\n\t\t\tp...
[ "0.60216326", "0.5749905", "0.56823426", "0.5677547", "0.56536", "0.56533706", "0.5647868", "0.5613945", "0.5613361", "0.5598695", "0.55545104", "0.5551094", "0.55470836", "0.5533904", "0.5482493", "0.54663664", "0.54568255", "0.5450242", "0.5447974", "0.5447806", "0.5446941"...
0.0
-1
Fase 4 Salvataggio su CSV
function writeCsv(arr) { console.log("writing csv"); json2csv({ data: arr, fields: csvHeaders }, function(err, csv) { if (err) console.log(err); fs.writeFile(site+"_"+date+'.csv', csv, function(err) { if (err) throw err; console.log('file saved'); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "csvExport() {\n let csvContent = \"data:text/csv;charset=utf-8,\";\n csvContent += [\n Object.keys(this.$parent.listado[0]).join(\";\"),\n ...this.$parent.listado.map(item => Object.values(item).join(\";\"))\n ]\n .join(\"\\n...
[ "0.6932872", "0.66333324", "0.65419424", "0.653915", "0.65054727", "0.6479779", "0.6282619", "0.6279824", "0.62423295", "0.620253", "0.6189501", "0.6170985", "0.6107789", "0.6096107", "0.60940546", "0.60830146", "0.60488284", "0.60424316", "0.60301995", "0.59976536", "0.59972...
0.0
-1
function to updated customers collection with cluster csv Data
function updateDbWithClusterCsv(db) { var clusterInsertCounter = 0; let clusterReader = require('readline').createInterface({ input: require('fs').createReadStream('tools/data/sample/keurig/C-Metrics-Cluster.csv') }); //INDIVIDUAL_ID,HOUSEHOLD_ID,FIRST_NAME,LAST_NAME,RFV Score_2016,Age,Gender,MaritalStatus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ImportCustomerData() {\n BindOrReloadCustomerTable('Export');\n}", "function assignCustomerToZone() {\n return new Promise((resolve, reject) => {\n dataProvider.getAllCustomers(['latitude', 'longitude', 'route'])\n .then(allCustomers => {\n for (let customer of all...
[ "0.59960425", "0.54029524", "0.5402808", "0.5295875", "0.5291739", "0.52684915", "0.52494556", "0.52039605", "0.5185253", "0.5157719", "0.5143674", "0.5138244", "0.51322335", "0.5123341", "0.51088303", "0.50964755", "0.5088597", "0.5067166", "0.50665957", "0.505703", "0.50487...
0.66498274
0
Logique de la fonction principale
function EditDeleteComment({ comment, post }) { // Constantes useState const [isAuthor, setIsAuthor] = useState(false); const [isLoading, setIsLoading] = useState(false); const [edit, setEdit] = useState(false); const [content, setContent] = useState(''); // Constante permettant de récupérer l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "log() {}", "function Log() {}", "function log() {\n //log here\n }", "function LogOperator(){}", "log(_args) {\n\n }", "function _____INTERNAL_log_functions_____(){}\t\t//{", "function logger() {}", "function logSomething(log) { log.info('something'); }", "function checkLogs(){\n\n}", ...
[ "0.74192256", "0.7398412", "0.73493963", "0.68617165", "0.67928344", "0.6792305", "0.6698402", "0.66102993", "0.65989465", "0.6578219", "0.65738916", "0.648726", "0.6484515", "0.64643085", "0.64276725", "0.6414721", "0.6406113", "0.6388524", "0.6358892", "0.63587105", "0.6358...
0.0
-1
console.log("aes worker well", decrypted2, iv2);
function test_ecies() { // default option const options = { hashName: 'sha512', hashLength: 64, macName: 'sha256', macLength: 32, curveName: 'prime256v1', symmetricCypherName: 'aes-256-gcm', keyFormat: 'uncompressed', s1: null, // optional shared i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process() { \n output(encrypt());\n}", "encryptBuffers() {\n //\n }", "encryptWithkey(buffer, key){\n var cipher = crypto.createCipheriv('aes-256-ecb',key,new Buffer(0));\n var crypted = cipher.update(buffer,'utf8','base64');\n crypted = crypted+ ...
[ "0.6871581", "0.67105466", "0.641533", "0.63165456", "0.6288958", "0.620916", "0.6176169", "0.61450464", "0.61400956", "0.6136112", "0.6127805", "0.6102548", "0.60817474", "0.60620236", "0.6053983", "0.604863", "0.60452193", "0.60426897", "0.60398", "0.601719", "0.598523", ...
0.55026346
62
the school is used for certai education bonuses use roll to initialize the school randomly
function School(){ this.distanceChance = 49; this.feedChance = 12; this.materialChance = 10; this.buildingChance = 15; this.goodTeachChance = 13; this.available = true; this.hasGoodTeacher = ( (Math.floor(Math.random() * (100 - 1 + 1) + 1))<= this.goodTeachChance ) ? true : false; this.hasBuilding = ( (Mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function School(){\n const school = {\n\n vak: [\"FRO\", \"BAP\", \"NED\"],\n opdracht: [\"Fotogallery\", \"Grid\", \"Object\", \"Login\", \"Registratie\", \"Uploaden\", \"Correspondentie 1\", \"Correspondentie 2\", \"Correspondentie 3\" ],\n cijfer: [\"6.2\", \"8.3\", \"4.6\", \"7.0\", \"9.1\", \"3.5\",...
[ "0.71376294", "0.6464619", "0.6221897", "0.6143066", "0.6116425", "0.6112519", "0.607614", "0.6056801", "0.5960892", "0.5943217", "0.5821023", "0.5775306", "0.5757942", "0.57563365", "0.57557577", "0.56800675", "0.56265426", "0.56061953", "0.5596401", "0.5556487", "0.55558825...
0.72605544
0
L'hospital is done. make a hospital object and it will have a 5% chance of existing. if for any reason you need a new school, just call reRoll on your instance of Hospital and it is gonnareroll. 5% chance of having a hospital. so lucky you if you get one.
function Hospital(){ this.chance = 5; this.available = ( (Math.floor(Math.random() * (100 - 1 + 1) + 1))<= this.chance ) ? true : false; this.reRoll = function(){ rolls = Math.floor(Math.random() * (100 - 1 + 1) + 1); this.available = ( (rolls<=this.chance)? true : false ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function School(){\n\tthis.distanceChance = 49;\n\tthis.feedChance = 12;\n\tthis.materialChance = 10;\n\tthis.buildingChance = 15;\n\tthis.goodTeachChance = 13;\n\t\n\tthis.available = true;\n\t\n\tthis.hasGoodTeacher = ( (Math.floor(Math.random() * (100 - 1 + 1) + 1))<= this.goodTeachChance ) ? true : false;\t\n\...
[ "0.6878955", "0.57590306", "0.5652542", "0.5597365", "0.557997", "0.55467784", "0.5475728", "0.54650784", "0.5425652", "0.54001576", "0.5398695", "0.5355086", "0.53214276", "0.53002477", "0.52907366", "0.5254145", "0.52252173", "0.52106994", "0.5206873", "0.52005756", "0.5198...
0.7712729
0
show the alert window
showModal() { this.setState({ show: true, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMsg() {\n\tokButton.textContent = 'OK';\n\talertPre.textContent = demo_msgs;\n\talertArea.style.display = 'block';\n}", "function showAlertFunc() {\n setShowAlert(true);\n }", "function MsgDisplay(message)\n\t {\n\t\t if(showAlert) {\n\t\t\t alert(message);\n\t\t }\n\t }", "functi...
[ "0.7458464", "0.7431123", "0.73891854", "0.73167896", "0.7244067", "0.72179884", "0.72171754", "0.72027093", "0.719331", "0.7152062", "0.7148815", "0.7137104", "0.7137104", "0.7076117", "0.70713174", "0.70681876", "0.70622796", "0.7059693", "0.700303", "0.6982312", "0.6969065...
0.0
-1
update the game state based on newest game data
async updateGame() { const prevState = JSON.parse(JSON.stringify(this.state)); // deep-copy previous state await this.updateGameData(); this.setState({messageBox: null}); // TODO: Player has left (new number of players is lower than in prevState.gameModel) -> reset state. if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(game) {\n let storedGame = this._all.get(game.id);\n storedGame.state = game.state;\n }", "function updateGame(data) {\n if (data['active']) {\n updateGameBoard(data);\n updateMoveSelectors(data);\n updateStatusBar(data);\n }\n}", "updateGame(){\n //Update state of obj...
[ "0.76569605", "0.7332399", "0.7220458", "0.70686674", "0.6691277", "0.6655162", "0.66439015", "0.66387564", "0.66175747", "0.6614717", "0.6545182", "0.65051484", "0.6503028", "0.6452595", "0.644598", "0.64446574", "0.6428442", "0.6425764", "0.6412423", "0.6407993", "0.6399376...
0.0
-1
it returns the third item in the array if there is no third item, return null Example: getThird(['Doc', 'Biff', 'Marty']) returns 'Marty'
function getThird(array) { if(array[2] != null){ return array[2]; }else{ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getThird(x){\n y.third = x[2]\nreturn y\n}", "function getFirstThreeElements (array) {\n /* CODE HERE */\n}", "function third(value){\n return value[2];// returns second value sequence\n}", "function thirdInArray(numArray) {\n return numArray.index(2);\n}", "function highest3(passedArray...
[ "0.6475638", "0.6419143", "0.6319916", "0.6089053", "0.60425234", "0.6017985", "0.5889613", "0.58233637", "0.5812997", "0.5789104", "0.5670732", "0.56615883", "0.564164", "0.5613612", "0.56055796", "0.55412984", "0.5537976", "0.55248094", "0.5506555", "0.5496818", "0.54825217...
0.8551291
0
stringLengths takes in four strings it returns an array containing the length of each string Example: stringLengths('mushroom', 'onion', '', 'garlic') returns [8, 5, 0, 6]
function stringLengths(str1, str2, str3, str4) { let strLenghtArray = []; strLenghtArray.push(str1.length,str2.length, str3.length, str4.length); return strLenghtArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMultipleLengths(arrayOfStrings){\n\tlet strLengths = [];\n\tfor(let i = 0; i < arrayOfStrings.length; i++){\n\tstrLengths.push(arrayOfStrings[i].length);\n\t}\n\treturn strLengths;\n}", "function stringsLength(array) {\n\n for (i = 0; i < array.length; i++) {\n \n numArray.push(strLe...
[ "0.79993707", "0.7408599", "0.7206303", "0.7206303", "0.7206303", "0.7200505", "0.71090126", "0.7102854", "0.69982016", "0.67554677", "0.6515797", "0.6386243", "0.6368842", "0.6317726", "0.6280302", "0.6189357", "0.6129258", "0.6125748", "0.61037576", "0.60951453", "0.6080482...
0.80866534
0
removeFirst takes in an array it returns the same array, but with the first item removed Example: removeFirst(['frog', 'toad', 'cricket', 'skunk']) would return ['toad', 'cricket', 'skunk']
function removeFirst(array) { array.shift(); return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeFirst(array) {\n if (!array.length) return array;\n return array.slice(1);\n}", "function removeFirst(array) {\n // code \n array.shift();\n return array;\n}", "function removeFirst(array) {\n if (!array.length) return array;\n return array.slice(1);\n} // -- #### insert()", "removeFirs...
[ "0.8518644", "0.8302329", "0.79819494", "0.77849936", "0.77632433", "0.76990986", "0.76855576", "0.7668924", "0.7657637", "0.76394033", "0.7578236", "0.75740355", "0.73319876", "0.7183409", "0.7183409", "0.7169285", "0.71568686", "0.71122473", "0.71032435", "0.71032435", "0.7...
0.8244424
2
swap takes in an array and two indices it returns the array with the items at i and j swapped Example: swap(['unicycle', 'scooter', 'skateboard', 'canoe'], 0, 2) would return ['skateboard', 'scooter', 'unicycle', 'canoe'];
function swap(array, i, j) { let swapVar; swapVar = array[i]; array[i] = array[j]; array[j] = swapVar; return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swap (arr, i, j){\n var temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n}", "function swap(array, i, j) {\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n}", "function swap(array, i, j) {\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n}", "function s...
[ "0.8032262", "0.80319995", "0.80319995", "0.8023171", "0.8016843", "0.80047345", "0.8001292", "0.79720193", "0.79519916", "0.7951889", "0.79450566", "0.7939243", "0.793101", "0.79115355", "0.7910688", "0.7910688", "0.78825593", "0.78549594", "0.7833429", "0.7794689", "0.77925...
0.7904731
16
STRETCH PROBLEMS (NOT REQUIRED) wrapAround takes in an array and returns an array with the last item in the first spot and everything else shifted one index over Example: wrapAround(['teaspoon', 'meat grinder', 'spatula', 'salad fork']) would return ['salad fork', 'teaspoon', 'meat grinder', 'spatula']
function wrapAround(array) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapAround(data, wrap) {\n if (wrap) {\n return [data[data.length - 1]].concat(data).concat([data[0], data[1]]);\n }\n return data;\n}", "function Wrap(index, length) {\n\t if (index < 0)\n\t index += Math.ceil(-index/length)*length;\n\t return index % length;\n\t}", "func...
[ "0.7215365", "0.570345", "0.568393", "0.5266836", "0.5199214", "0.5172947", "0.5168286", "0.51669705", "0.51669705", "0.51669705", "0.5149606", "0.5149606", "0.51219434", "0.5114266", "0.5107825", "0.50449574", "0.50238186", "0.49706846", "0.49680674", "0.49629295", "0.493466...
0.7791323
0
Function for loading all page content containers
function loadContent(){ // Load Overview var contentOverview = $( '<div id="content-Overview" class="col-md-12 sub-contents">'+ ' <div class="row">'+ ' <div class="col-md-12">'+ ' <h2 class="sub-header">Overview</h2>'+ ' </div>'+ ' <div class="col-md-8 content-left">'+ ' This webpage...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function initializePage() {\n loadProjectsContainer();\n loadCalisthenicsContainer();\n loadCommentsContainer();\n}", "function loadMyContent () {\n // do your page operations here\n}", "function loadPageContent(pageCounter) {\r\n\t// If the end of the pages array hasn't been reached\r\n\tif (pageCoun...
[ "0.7382111", "0.6622446", "0.6533541", "0.65269774", "0.64432764", "0.6436477", "0.63815695", "0.63815695", "0.6336959", "0.63139606", "0.6313942", "0.6263284", "0.62380826", "0.6224577", "0.6165027", "0.61577266", "0.61569566", "0.61350584", "0.6101795", "0.6084158", "0.6075...
0.6400632
6
Function for loading data from the NanoServer API
function loadData(){ // Request Endpoint var endpoint = '/network/'+network_id; // Use .ajax() to make an HTTP request from JS $.ajax({ type: 'GET', url: endpoint, dataType: "json", success: function(response_data) { // Called when successful //console.log("Network Info"); //console.log(data); parseNetworkD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadData() {\n system.isLoading = true;\n\n $.ajax({\n url: system.apiURL,\n dataType: 'jsonp',\n success: onLoadData\n });\n\n }", "function loadData() {\n var jsonRovereto = httpGet(\"https://os.smartcommunitylab.i...
[ "0.685668", "0.6782247", "0.6468178", "0.64162815", "0.62022334", "0.61822313", "0.61699283", "0.6145482", "0.6145482", "0.6126402", "0.6096501", "0.60821646", "0.6023576", "0.6017316", "0.6011939", "0.59865534", "0.5983404", "0.5967136", "0.59546983", "0.59546983", "0.595207...
0.6451074
3
Function for parsing the network data and loading into content containers
function parseNetworkData( data ){ $('div#dashboard-select').html(''); // Setup the dashboard var active = true; // For each "object" in the "network" if ( data.hasOwnProperty("objects") ) { for ( var object_id in data.objects ){ //console.log( object_id ); if ( data.objects.hasOwnProperty(object_id) ) { //con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadContent(urlFeed) {\n\n fetch(urlFeed)\n .then(function (rsp) {\n if (rsp.ok) {\n return rsp.text();\n }\n\n throw new Error(rsp.statusText);\n })\n .then(function (xmlString) {\n let contentType = 'text/xml';\n ...
[ "0.6120405", "0.5861296", "0.58053803", "0.5798738", "0.56309414", "0.55806476", "0.55751324", "0.55477816", "0.55197024", "0.5514577", "0.5510874", "0.5464749", "0.5396317", "0.53913206", "0.5375598", "0.53729844", "0.5351047", "0.5347742", "0.532342", "0.53050935", "0.52988...
0.5938268
1
Function for loading a stream icon in dataselect div
function loadStreamIcon( object_id, stream_id ){ // Add Icon var streamIcon = $( '<div class="col-sm-2 data-select" '+ 'id="select-'+object_id+'-'+stream_id+'">'+ ' <span class="glyphicon glyphicon-signal"></span>'+ ' <h4>'+object_id+'</h4>'+ ' <span class="text-muted">'+stream_id+'</span>'+ '</div>' ); $('di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadingIcon() {\n var loadIcon = '<img id=\\\"iconLoad\\\" src=\\\"/ms/img/loading.gif\\\" />';\n return loadIcon;\n }", "_refresh_source_icon() {\n const ds_name = this.data_source != null ? this.data_source.name : 'none'\n this.jdatasource_icon.prop('title', `data: ${ds_name}\\npr...
[ "0.60643476", "0.5921136", "0.575166", "0.57082444", "0.5691791", "0.5664637", "0.56217515", "0.56018066", "0.55517447", "0.5507011", "0.5491719", "0.54553455", "0.54375494", "0.54084474", "0.5405205", "0.53856164", "0.5381628", "0.53783154", "0.5375438", "0.5371414", "0.5364...
0.706267
0
Function for loading a stream plot in content div
function loadStreamPlot( object_id, stream_id ){ // Create plot container var streamPlot = $( '<div class="plot-container" id="plot-'+object_id+'-'+stream_id+'">'+ '</div>' ); // Load Highcharts streamPlot.highcharts({ chart: { type: 'spline' }, title: { text: 'Plot Title' }, subtitle: { text: 'Plot Subt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadStreamIcon( object_id, stream_id ){\n // Add Icon\n var streamIcon = $(\n '<div class=\"col-sm-2 data-select\" '+\n 'id=\"select-'+object_id+'-'+stream_id+'\">'+\n ' <span class=\"glyphicon glyphicon-signal\"></span>'+\n ' <h4>'+object_id+'</h4>'+\n ' <span class=\"text-muted\">'+stream_id+'</span>'+\...
[ "0.66483563", "0.63801026", "0.6062206", "0.60195076", "0.60148036", "0.59793615", "0.5955133", "0.5914671", "0.5865118", "0.5833139", "0.5818915", "0.5806761", "0.57519263", "0.5682121", "0.5655871", "0.56132865", "0.56115544", "0.5602184", "0.56021106", "0.55621445", "0.553...
0.7424303
0
Function reloading the Plot and Export displays by retrieving most recent data from db server.
function reloadPlotAndExport( object_id, stream_id ){ // Select plot container for the stream var streamPlot = $('#plot-'+object_id+'-'+stream_id+'.plot-container'); // The API endpoint for the stream var endpoint = '/network/'+network_id+'/object/'+object_id; endpoint += '/stream/'+stream_id; // Load plot data ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reloadData() {\n if (typeof (CPData) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataSoon) != \"undefined\") { CPData.regenerate(); }\n if (typeof (CPDataDownloaded) != \"undefined\") { CPData.regenerate(); }\n loadInfo();\n ...
[ "0.68831587", "0.6725211", "0.65505445", "0.651362", "0.6438944", "0.63861805", "0.632927", "0.63271475", "0.6285868", "0.6272068", "0.62585634", "0.623911", "0.6199663", "0.61709076", "0.61709076", "0.616357", "0.6158761", "0.6155249", "0.6146709", "0.61439306", "0.6116049",...
0.62379825
12
Exercise Instructions: You have been provided a basic set of global styles in App.css. Your task is to convert these initial styles into each of the other styling types. 1. Inline Styles 2. Modular CSS 3. Styled Components
function App() { return ( <div className="board"> <div className="square">O</div> <div className="square">X</div> <div className="square">O</div> <div className="square hint"></div> <div className="square">X</div> <div className="square">X</div> <div className="square"></...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get styles() {\n return [\n css`\n :host {\n display: block;\n }\n\n h2 {\n margin-bottom: 10px;\n }\n\n @media screen and (min-width: 320px) {\n h2 {\n font-size: 24px;\n }\n \n @media screen and (min-width: 920...
[ "0.65131617", "0.6472207", "0.6459172", "0.6386323", "0.63804376", "0.6370435", "0.636529", "0.6356262", "0.63119984", "0.6162828", "0.61430985", "0.61201763", "0.6114197", "0.61066985", "0.60985625", "0.60985625", "0.6088451", "0.608521", "0.60777104", "0.60611355", "0.60289...
0.0
-1
Make sure you import your newly made Thunk Creator and plug it into mapDispatchToProps properly.
convertCurrencyThunk() { // Will this thunk receive arguments? // If so, make sure you declare parameters to bring in said arguments. // Don't forget to pass them into dispatch properly. dispatch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapDispatchToProps(dispatch) {\n\nreturn bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch) { \n \nreturn bindActionCreators(actionCreators, dispatch);\n}", "function mapDispatchToProps(dispatch){\n return bindActionCreators(actionCreators, dispatch)\n}", "fun...
[ "0.68558306", "0.68473154", "0.670091", "0.66697335", "0.6667501", "0.66592693", "0.66475284", "0.6641512", "0.66137373", "0.6611914", "0.6591362", "0.65514463", "0.6540986", "0.6540782", "0.65392697", "0.6529376", "0.6528464", "0.6521438", "0.65206367", "0.65195674", "0.6519...
0.0
-1
itt van a regex amit meg mondja hogy mi fer
function escapeRegex(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Regexp() {}", "function RegExpPattern(){\n\t//\n}", "transform ($input) {\n return String ($input).length > 0 ? new RegExp ($input, 'i') : undefined;\n }", "transform ($input) {\n return String ($input).length > 0 ? new Reg...
[ "0.7061022", "0.6731809", "0.6681875", "0.6681875", "0.6584079", "0.6583397", "0.65698963", "0.63926435", "0.6381456", "0.6355851", "0.6330599", "0.6132629", "0.6124842", "0.61172926", "0.60940534", "0.6075233", "0.60746276", "0.6022709", "0.6013572", "0.59890157", "0.5980112...
0.0
-1
strip HTML tags and clean the text
function strip_tags(str) { //remove HTML tags str = str.replace(/<\/?[^>]+(>|$)/g, ""); //remove tab, new line, return str = str.replace(/(\t|\n|\r)/gm, ""); //remove empty spaces from start and end of text str = str.trim(); return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeHtmlTag(text) {\n\tlet TagRegExp = /<[^<>]+\\/?>/g;\n\treturn text.replace(TagRegExp, '');\n}", "function stripTags(text) {\n return text ? text.replace(/<[^>]*>/g, \"\") : text;\n}", "function removeTags(text) {\n\t//return text ? text.replace(tagsRegex, \"\") : text;\n\treturn text ? text.r...
[ "0.7685609", "0.7572867", "0.7549915", "0.7505455", "0.74408454", "0.74206334", "0.7392864", "0.73911655", "0.7334583", "0.7257623", "0.71917784", "0.71823406", "0.71266955", "0.70956177", "0.70626", "0.70262957", "0.7024994", "0.700337", "0.69857556", "0.6961732", "0.6959157...
0.70304507
15
Function to clear out the initial button and create new buttons to play the game.
function createButtons() { btnWrapper.innerHTML = ''; // Create Shuffle button const onShuffleClick = () => { // Create shuffled cards out of old cards const shuffledCards = [...cardsWrapper.children].sort(() => Math.random() - 0.5); cardsWrapper.innerHTML = ''; shuffledCards.forEach((card, index...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createButtons() {\n document.getElementById('start-game').remove();\n createShuffleButton();\n createShowHideButton();\n createMagicButton();\n}", "function resetButton() {\n\t\tvar newBoard = document.querySelector('div');\n\t\tnewBoard.innerHTML = \" \";\n\t\tcardsInPlay.length = 0;\n\t\tcreateBoa...
[ "0.8491656", "0.7342608", "0.7314034", "0.7215157", "0.71551794", "0.7114628", "0.7100871", "0.71002704", "0.7099267", "0.70630616", "0.6961566", "0.69564354", "0.6945963", "0.6942175", "0.69255", "0.6920603", "0.6906116", "0.6891098", "0.6854343", "0.6813277", "0.68075395", ...
0.7235032
3
Function to start the game by clearing the wrapper, creating and appending the buttons and all the cards to the DOM
function startGame() { createButtons(); createCards(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() {\n createButtons();\n const cards = createCardsArray();\n appendCardsToDom(cards);\n}", "function startGame() {\n createButtons(gameButtons);\n createCards();\n}", "function startGame() {\n noGameCards();\n createCardLayout(app.gameCards);\n let cards = shuffleArray(app.card...
[ "0.8660775", "0.8287083", "0.8120394", "0.74499804", "0.74036705", "0.7354605", "0.73527634", "0.73386824", "0.7271987", "0.72553426", "0.72096974", "0.72092175", "0.7200793", "0.71733254", "0.71682155", "0.7165602", "0.71376127", "0.712527", "0.7121126", "0.7107853", "0.7088...
0.82432985
3
Check if value is a function.
function func(value) { return typeof value === RAW_FUNCTION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "is_function(value) {\n return typeof(value) === 'function';\n }", "function isFunction(value) { return typeof value === \"function\" || value instanceof Function; }", "function isFunction (value) {\n return typeof value == 'function';\n }", "function isFunction(value) {\n return typeof value...
[ "0.8336912", "0.8240418", "0.81334126", "0.8115165", "0.8115165", "0.8115165", "0.81138945", "0.8107465", "0.80751204", "0.8064519", "0.80308294", "0.8029786", "0.8002077", "0.8002077", "0.7938121", "0.7928305", "0.7928305", "0.7928305", "0.7928305", "0.7736958", "0.7578897",...
0.7935808
15
Check if value is an array.
function array$1(value) { return Array.isArray(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isArray(value) {\n return \"[object Array]\" === Object.prototype.toString.call(value);\n }", "function isArray(value) {\n return Object.prototype.toString.call(value) === '[object Array]';\n }", "is_array(val) {\n return Array.isArray(val);\n }", "function isArray(valu...
[ "0.8065852", "0.80151945", "0.7980057", "0.7972555", "0.79693824", "0.79645646", "0.7930882", "0.7841137", "0.77788985", "0.77644455", "0.77576494", "0.77576494", "0.763635", "0.759663", "0.75896895", "0.7514963", "0.7509321", "0.74648803", "0.7461895", "0.7461895", "0.744330...
0.79770875
3
Check if value is an object.
function object$1(value) { // 低版本 IE 会把 null 当作 object return value !== NULL && typeof value === 'object'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n...
[ "0.8366939", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.81178945", "0.8103338", "0.80177814", "0.7959781", "0.79590565", "0.79578316", "0.79279214", "0.78609556", ...
0.77543676
23
Check if value is a string.
function string$1(value) { return typeof value === 'string'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__is_string(value) {\n return typeof value === 'string' || value instanceof String;\n }", "function isString(value) { return typeof value === \"string\" || value instanceof String; }", "function isString(value) {\n return Object.prototype.toString.call(value) == \"[object String]\" \n }", "func...
[ "0.8576062", "0.81780523", "0.79843843", "0.7943194", "0.7943194", "0.7943194", "0.7935969", "0.7935969", "0.7935969", "0.79189575", "0.79189575", "0.79105854", "0.78968155", "0.78968155", "0.78946227", "0.78915197", "0.7886345", "0.7883016", "0.7870837", "0.78637123", "0.777...
0.83164066
1
Check if value is a number.
function number(value) { return typeof value === 'number' && !isNaN(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNumber(value) { return typeof value === \"number\" || value instanceof Number; }", "__is_number(value) {\n return typeof value === 'number' && isFinite(value);\n }", "function IsANumber(value) {//returns true if the given variable is a number.\n return (typeof value === \"number\");\n}"...
[ "0.8367785", "0.8198523", "0.8070122", "0.8057031", "0.8057031", "0.8057031", "0.8042294", "0.80205536", "0.8007536", "0.79611146", "0.7825362", "0.7805672", "0.77783287", "0.7749073", "0.77427715", "0.7735647", "0.7704413", "0.76782", "0.76593393", "0.76593393", "0.765755", ...
0.84686655
0
Check if value is boolean.
function boolean(value) { return value === TRUE || value === FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool (value) {\n\t return typeof value === 'boolean'\n\t}", "function isBoolean(value) {\n return typeof value === \"boolean\";\n}", "function isBoolean(value) {\n return typeof value === 'boolean';\n}", "function isBoolean(value) {\n return value instanceof Boolean || typeof value === 'bool...
[ "0.85517985", "0.83113074", "0.83051294", "0.8114625", "0.8096221", "0.79110056", "0.790584", "0.7741577", "0.7741577", "0.7687097", "0.76738787", "0.7566191", "0.7532694", "0.7532694", "0.7532694", "0.7532694", "0.7532694", "0.751944", "0.74551356", "0.7423383", "0.74206465"...
0.8076389
5
Check if value is numeric.
function numeric(value) { return !isNaN(value - parseFloat(value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_numeric(value){\n\treturn !isNaN(value);\n}", "function isNumeric(value) {\n return (value == Number(value));\n}", "function isNumeric(value) {\r\n return typeOf(value, 'String') && !value != isFinite(Number(value));\r\n }", "function isNumeric(val) {\n\t return !isNaN(numericToNumber(...
[ "0.8530743", "0.8317174", "0.82820064", "0.8234036", "0.82205427", "0.81634593", "0.8137554", "0.81343085", "0.80557215", "0.80261594", "0.80175495", "0.8011837", "0.8011837", "0.8011837", "0.8011837", "0.8011837", "0.79977846", "0.798504", "0.7953464", "0.79490346", "0.79421...
0.7661373
37
Then, we'll have a helper function to fetch the information for each default framework
function loadDefaults() { for (fm in frameworks) { fetchGithubData(frameworks[fm].full_name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFrameworkNames() {\n let frameworksNames = [];\n if (this.config.stepByStep &&\n this.config.stepByStep.frameworks &&\n this.config.stepByStep.frameworks.length) {\n this.config.stepByStep.frameworks.forEach(x => {\n const framework = this.templateMa...
[ "0.61543363", "0.57788825", "0.56865054", "0.5556722", "0.55542785", "0.5543034", "0.552277", "0.54902685", "0.5445978", "0.54437625", "0.54312754", "0.54150444", "0.54087055", "0.54008627", "0.53878033", "0.5382504", "0.53423095", "0.53423095", "0.5340595", "0.5336132", "0.5...
0.6308748
0
This one gets the jucy data from GitHub
function fetchGithubData(full_name) { let gitHub = 'https://api.github.com/repos/' + full_name; // actions.push(); fetch(gitHub) .then(res => res.json()) .then(res => updateTable(res)) // Update the chart too! .then(res => updateChart()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smallDataFetch(search){\n return fetch('https://api.github.com/repos/'+search+'/stats/contributors')\n .then(data=>data.json())\n .then(data=>{\n let betterData = []\n for(i=0; i<data.length; i++){\n betterData.push({'total':data[i].total,'user':data[i].author.login})\n }\n ...
[ "0.66365266", "0.6284641", "0.61978567", "0.61862767", "0.61756796", "0.61704123", "0.6169179", "0.61273366", "0.6065325", "0.6041115", "0.60190976", "0.6006945", "0.5957354", "0.59411806", "0.59156346", "0.5895942", "0.5884383", "0.5835715", "0.58118886", "0.57786214", "0.57...
0.6650655
0
Helper function to select useful data and then insert the new row on the table
function updateTable(data) { frameworks[data.full_name]['data'] = data let name = data.full_name.split('/')[1]; // From all the data feteched from GitHub, we'll pass the following to be added as a new row let dataArray = [name, data.watchers.toLocaleString(), data.forks.toLocaleString(), data.open_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendTableData(id, data){\r\n\r\nlet newRow = id.insertRow();\r\n//Check column doesn't contain the data\r\nfor(let i=0; i<id.rows.item(0).cells.length; i++){\r\n let cell = newRow.insertCell();\r\n if(i < data.length){\r\n cell.innerHTML = data[i];\r\n }\r\n}\r\n\r\n}", "function addRow(data) {\...
[ "0.62294006", "0.61299396", "0.61215556", "0.6032594", "0.6023459", "0.6021341", "0.6009759", "0.5815779", "0.5788284", "0.5782116", "0.5762288", "0.5724119", "0.5708134", "0.5705898", "0.56882405", "0.56633335", "0.5645665", "0.56425756", "0.56407374", "0.5598421", "0.557113...
0.0
-1
Option to update the stats every minute, not optimal since GitHub Api rate limit is 60 per hour w/o auth let refresh = window.setInterval(doRefresh, 60000);
function doRefresh(){ let nextUpdate = new Date(); nextUpdate.setMinutes(nextUpdate.getMinutes() + 1); $('#nextUpdate').html(nextUpdate.toLocaleString()); clearTable(); loadDefaults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startChannelStats() {\n stats = setInterval(() => {\n ApiHandle.getStats().then(data => {\n if (data == null) { // They are not live or the channel doesn't exist.\n console.log(\"The user is not live or there was an error getting stats.\")\n } else { // Sets ...
[ "0.6777555", "0.67747164", "0.6719297", "0.6718338", "0.67124623", "0.668382", "0.66731274", "0.66638577", "0.6651051", "0.66416335", "0.6479376", "0.6478982", "0.64338624", "0.64082503", "0.64066374", "0.63986444", "0.63535166", "0.6317427", "0.6317427", "0.6297953", "0.6262...
0.6556535
10
sending a GET request to spotify api
function getTrack(){ $.ajax({ method: "GET", url: spotify_api, data: $("form").serialize(), success: onSucess, error: onError }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spotifyAPI(userFavorites){\r\n const spotifyID = {\r\n id: \"520a7273452546879b3b85f62e8b9939\",\r\n secret: \"2d59e1d6dd5a40b3a291fe29a18aaa3c\"\r\n };\r\n\r\n let spotify = new spotify(spotifyID);\r\n\r\n spotify.search( {type: \"artist\", query: userFavorites,} ).then(function...
[ "0.726111", "0.71210474", "0.70856833", "0.69505054", "0.67899245", "0.67895603", "0.67736346", "0.67130053", "0.6694417", "0.66801935", "0.6674749", "0.66463864", "0.6540749", "0.65279734", "0.65144706", "0.6444895", "0.6409884", "0.64080065", "0.64042974", "0.64021516", "0....
0.6894894
4
I had to temp add the SVG as a data encoded string because an svg import broke the mocha tests. The fix would be to configure the Mocha environemnt.
render() { return ( <section className="search-container"> <TextInput name="Search for stores" label={this.state.message} subLabel={this.state.subMessage} onChange={this.onChange} placeholder="Search" className="search-box col-xs-10" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTestSVG(callback) {\n\n function onFileRead(err, data) {\n if (err) {\n callback(err);\n return;\n }\n\n data = data.replace(new RegExp('><', 'g'), \">\\n<\");\n Y.log('Loaded test SVG file, ' ...
[ "0.678826", "0.60694337", "0.60153025", "0.601403", "0.5977829", "0.5905371", "0.5881959", "0.5795053", "0.57881695", "0.5764366", "0.5763727", "0.5756946", "0.57513666", "0.5730686", "0.5714781", "0.56898403", "0.5686061", "0.5668227", "0.56228346", "0.5589036", "0.5577711",...
0.0
-1
TODO: Move configuration for different versions into a strategy pattern.
function _mapSpidrConfigToAPI(spidrConfig) { // In newer version (2.2.1+) we don't do any parsing of the parameters and pass them through directly if the server // configuration also supports it. if (spidrConfig.fcsApi) { return spidrConfig.fcsApi; } return { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OktaConfigurationStrategy() {\n\n}", "function version(){ return \"0.13.0\" }", "function applyVersion(version) {\n\t\tswitch (version) {\n\t\t\tcase this.standard:\n\t\t\t\tapplyStandardVersion();\n\t\t\t\tbreak;\n\t\t\tcase this.extended:\n\t\t\t\tapplyExtendedVersion();\n\t\t\t\tbreak;\t\n\t\t}\n\t...
[ "0.5979314", "0.5753918", "0.5687117", "0.5622103", "0.5608092", "0.5592615", "0.5584832", "0.5523883", "0.5500706", "0.54440117", "0.543767", "0.53853303", "0.5340652", "0.53103703", "0.53031427", "0.52878255", "0.52867985", "0.5286518", "0.5286518", "0.5259641", "0.5227971"...
0.0
-1
This maps through the random users and creates a new table row for each user
function Tbody(props) { //initialize the tableData variable that will be returned to Table const tableData = props.results.map((employee) => <tr key={employee.email}> <th scope="row"> {<InfoModal params={employee} />} </th> <td><img className="img-fluid img-thumbna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRandomUsers () {\n\n const SEX = ['Male','Female'];\n const RELIGION = ['Christian','Jewish','Other'];\n const FEMALE_NAMES = ['Susan','Cindy','Ally','Brianne','Kristen','Hillary'];\n const MALE_NAMES = ['Brad','John','Jeff','Chris','Ted','Doug','Jordan'];\n const LAST_NAMES = ['Aam...
[ "0.7043436", "0.67095184", "0.66624165", "0.664449", "0.6603007", "0.65151453", "0.6511199", "0.6499539", "0.64608365", "0.6457005", "0.64301765", "0.6413554", "0.6403612", "0.6388296", "0.63876164", "0.638597", "0.6322322", "0.63093054", "0.630065", "0.62679595", "0.62642944...
0.0
-1
Calculates the total wood required for making the chair, table and bed
function woodCalculator(chair, table, bed) { // If any of the inputs is negative or not numbers, then return the error message if (chair < 0 || table < 0 || bed < 0) { return "Inputs cannot be negative. Please recheck the inputs."; } else if ( typeof chair != "number" || typeof table != "number" || typeof be...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woodCalculator(chair,table,bed){\n var chairCount=chair*28.3168;\n var tableCount=table*84.9505;\n var bedCount=bed*141.584;\n var totalWood=chairCount+tableCount+bedCount;\n return totalWood;\n}", "function woodCalculator(chair, table, bed) {\n var chairCount ...
[ "0.84338015", "0.8347967", "0.82838756", "0.819843", "0.81732523", "0.8138059", "0.8035503", "0.8014653", "0.80099565", "0.7938757", "0.79005456", "0.78683233", "0.7856599", "0.78505015", "0.7802443", "0.7723647", "0.7646964", "0.7635534", "0.7586282", "0.74859095", "0.748339...
0.77519923
15
Calculates the total brick required for the floors
function brickCalculator(floor) { // If the floor input is negative and not number, then return error message if (floor < 0 || typeof floor != "number") { return "Floor cannot be negative and must be a number"; } var totalBricks = 0; for (var i = 1; i <= floor; i++) { if (i <= 10) { totalBricks = totalBri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brickCalculator(floor) {\n var bricks;\n if(floor<=10)\n bricks = 1000*15*floor; // 1-10 floors are 15feet and each feet needed 1000 bricks,\n else if(floor>=11&&floor<=20)\n bricks = 1000*12*floor; // 11-20 floors are 12feet and each feet needed 1000 bricks,\n else\n bricks = 1000*10*floor; /...
[ "0.78690106", "0.78366256", "0.78256446", "0.77762944", "0.7700756", "0.7596373", "0.75143623", "0.746172", "0.74413586", "0.7383615", "0.72692084", "0.7253693", "0.71832263", "0.71688366", "0.7125006", "0.7081427", "0.7079605", "0.7065586", "0.69900584", "0.6979673", "0.6979...
0.7279223
10
Returns the smalllest friend's name
function tinyFriend(friends) { if (friends.length == 0) { return "Please give friends lists"; } var smallestFriend = friends[0]; for (var i = 0; i < friends.length; i++) { if (typeof friends[i] != "string") { return "Friend name must be a string"; } var element = friends[i]; if (element.length < sma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tinyFriend(friendsName){\n \n var shortestName = friendsName[0];\n \n for(var i=0 ; i<friendsName.length ; i++){\n \n if (shortestName.length > friendsName[i].length){\n shortestName = friendsName[i];\n }\n }\n return shortestName;\n}", "function...
[ "0.8021066", "0.7858887", "0.7754093", "0.7642383", "0.7639444", "0.76331115", "0.7574643", "0.7469955", "0.7440962", "0.74272656", "0.7373546", "0.732094", "0.73138607", "0.7265733", "0.7208847", "0.7154315", "0.6940936", "0.6919385", "0.6891069", "0.6819551", "0.6818279", ...
0.7387917
10
Constructor Put your required dependencies in the constructor parameters list
constructor(adminCocktailService, tagsService, adminCocktailsCategoriesService) { super(adminCocktailService); this.tagsService = tagsService; this.adminCocktailsCategoriesService = adminCocktailsCategoriesService; this.title = 'Cocktails'; this.name = 'admin-cocktail'; t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(params) {\n this.params = params;\n }", "constructor(args, required) {\n super(args, required);\n // <<-- Creer-Merge: constructor -->>\n // setup any thing you need here\n // <<-- /Creer-Merge: constructor -->>\n }", "constructor(args, required) {\n super(...
[ "0.69842225", "0.6833624", "0.6833624", "0.67252344", "0.66913277", "0.66913277", "0.66803926", "0.66610587", "0.6652505", "0.6652505", "0.6652505", "0.6652505", "0.6652505", "0.6652505", "0.6652505", "0.6627949", "0.6586442", "0.6568772", "0.65339845", "0.6528502", "0.650395...
0.0
-1
END Code for Minimized button (persistent over multitab) START Helper Functions for Minimized Button //// Experience 0 (incumbent for segment 0 & "99999")
function minimizeIncumbent() { document.getElementById("chat_container").style.display="none"; document.getElementById("chat_container").children[0].src="https://liveperson-liveengage.s3.amazonaws.com/le-images/lowes/2021-07/NewMinimizedInvite+(07-22-2021).png"; document.getElementById("chat_container").children[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minimizeMiniBox() {\n if (isMaximizedBool) {\n allBoxes[miniBoxOnNumber].style.animation = `${minimizeVars[miniBoxOnNumber]} 0.3s ease-out forwards`;\n unHideRest(allBoxes[miniBoxOnNumber]);\n isMaximizedBool = false;\n // turn on onclick for menu button\n\n document....
[ "0.65439576", "0.65439576", "0.6509582", "0.6252147", "0.6167137", "0.6167137", "0.61142987", "0.6063475", "0.6063475", "0.596677", "0.5894674", "0.58867246", "0.58507526", "0.5827591", "0.5810723", "0.577469", "0.57420564", "0.5685242", "0.5674202", "0.56559074", "0.5637443"...
0.0
-1
Implement a javascript function that calculates trapezoid's area by given sides a and b and height h. The three values should be read from the console in the order shown below. All three value will be floatingpoint numbers.
function solve (args){ let a = +args[0]; let b = +args[1]; let h = +args[2]; let area = ((a+b)*h)/2; console.log(area.toFixed(7)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function area(a, b, h) {\n var result = (0.5 * h * (a + b));\n return ('a=' + a + ' b=' + b + ' h=' + h + '\\n' + 'The area of trapezoid is: ' + result);\n}", "function triangleArea(b,h)\n {\n //Calculate area\n var area =.5* b*h;\n return area;\n\n }", "function triangleArea(b,h){\n retur...
[ "0.8118164", "0.7488936", "0.7333316", "0.7183695", "0.7175909", "0.71375746", "0.7089956", "0.7085412", "0.70598114", "0.70359117", "0.7013718", "0.69924074", "0.69752973", "0.6950971", "0.691145", "0.68755925", "0.6820074", "0.68192947", "0.6693577", "0.66874516", "0.668518...
0.68075144
18
Object storing data indexed by tab id
function onRequest(request, sender, sendResponse) { // Show the page action for the tab that the sender (content script) was on console.log("* " + request['artist_id']) console.log("* " + request['artist_name']) data[sender.tab.id] = [request['artist_id'], request['artist_name']] // Show the SK icon in the add...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTabObjects() {\n tabObjects.push({\n name: name,\n state: state,\n panelID: panelID,\n panelEl: panelEl,\n panelHeight: panelHeight,\n tabNumber: tabNumber,\n current: element,\n previous: previous,\n next: next,\n ico...
[ "0.6447628", "0.6214774", "0.6080983", "0.5940712", "0.5813892", "0.5795144", "0.57887167", "0.57822186", "0.5698277", "0.5693802", "0.5628867", "0.562358", "0.5585201", "0.5570824", "0.55684125", "0.5561443", "0.5523267", "0.5515484", "0.55008715", "0.5499608", "0.5494961", ...
0.0
-1
get user input value
init(){ this.form.addEventListener('submit', this.addElm) window.addEventListener('DOMContentLoaded', this.setupItems) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserInput(){\n alert(input.value);\n}", "function getValueofInput () {\n\tif (username) {\n\tconsole.log(username.value);\n\t}\n}", "function getInput() {\n return document.querySelector('input#amount').value;\n }", "function getInput(){\n let userInput = inputField.value\n return ...
[ "0.77263963", "0.76136297", "0.7468818", "0.7398702", "0.7330256", "0.7251981", "0.72011983", "0.7158039", "0.7153904", "0.7030914", "0.7027858", "0.7027858", "0.7027858", "0.7027858", "0.7027858", "0.7018082", "0.7014258", "0.69976175", "0.69715285", "0.69647753", "0.6955507...
0.0
-1
remove from local storage
removeFromLocalStorage(id){ let items = this.getLocalStorage() items = items.filter(function(item){ if(item.id !== id){ return item } }) localStorage.setItem('list', JSON.stringify(items)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remover(id) {\n localStorage.removeItem(id)\n }", "function eliminarLocalStorage(){\n\tlocalStorage.clear();\n}", "function remove(id) {\n if(localStorage[id]) {\n delete localStorage[id];\n }\n }", "function vaciar_local_storage(){\n localStorage.clear();\n}", "removeAll()...
[ "0.81205314", "0.8073429", "0.7988084", "0.78245986", "0.7807789", "0.7755139", "0.77499485", "0.7735405", "0.77327496", "0.77178", "0.7707715", "0.77031165", "0.7703069", "0.7703069", "0.7701195", "0.7697762", "0.76721096", "0.76699406", "0.76699406", "0.76543254", "0.763848...
0.7262191
51
Check if document is Recommendation, and uses inline changes(REC with Candidate/Proposed changes)
function isRECWithChanges(sr) { if (sr.config.status !== 'REC') { return false; } const recMeta = sr.getRecMetadata({}); return Object.values(recMeta).length !== 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shouldUpdate(newDoc, oldDoc) {\n const [newLines, oldLines] = [newDoc, oldDoc].map(doc => JSON.stringify(doc, null, 2)\n .split('\\n')\n .filter(l => !ignoreLines.test(l))\n .join('\\n'));\n return newLines !== oldLines;\n}", "function compareDoc(doc, db){\n\tvar differences,\...
[ "0.56293035", "0.54354066", "0.53638947", "0.52766955", "0.5261943", "0.52451617", "0.5244633", "0.5244633", "0.5243025", "0.5243025", "0.5243025", "0.5243025", "0.5243025", "0.5243025", "0.5180206", "0.51674527", "0.5134833", "0.51090235", "0.5108055", "0.5107935", "0.510534...
0.0
-1
Restores checkbox states using the preferences stored in chrome.storage
function restore_options() { var opt = this chrome.storage.sync.get({ syncVolume: true, saveVolume: true }, function(items) { document.getElementById('saveVol').checked = items.saveVolume; document.getElementById('syncVol').checked = items.syncVolume; if(items.saveVolume == false) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n panel: true,\n remove: true,\n notify: true,\n restyle: true,\n console: false,\n console_deep: false,\n }, (items) => {\n for (let item in items) {\n document.getElem...
[ "0.7796671", "0.7725315", "0.77058697", "0.7694404", "0.75613207", "0.75400156", "0.7516885", "0.7465091", "0.746206", "0.7423101", "0.740265", "0.7381467", "0.7371729", "0.7362359", "0.7360964", "0.73206055", "0.7300527", "0.72933865", "0.72807306", "0.7259515", "0.72271633"...
0.62944067
86
////////////////////////////////////////////////// ! internal functions !
generalCheck(key) { if (typeof this.size !== "number") return { returned: null, errMsg: "table size is not a number, please create a new table" }; if (this.size < 1) return { returned: null, errMsg: "table size can't be 0 or less" }; if (key) if (typeof key !== "string") return { returned: null,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient private internal fun...
[ "0.7455171", "0.7144486", "0.7031046", "0.70289963", "0.69750446", "0.6860986", "0.6818407", "0.66371274", "0.6525464", "0.65141314", "0.6461656", "0.64036155", "0.6352679", "0.6290981", "0.6269245", "0.6257018", "0.62114465", "0.6208045", "0.61723185", "0.6165048", "0.613780...
0.0
-1
////////////////////////////////////////////////// ! stand alone functions !
add(key, value) { let check = this.generalCheck(key); if (check.errMsg) return check; let hash = this.hashKeyFun(key); // console.log(hash); if (!this.map[hash]) { this.map[hash] = new LinkedList(); } // console.log(this.map[hash]); let bucket...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function wa(){}", "private public function m246() {}", "function main(){\n\n\n}", "static private internal function m121() {}", "function main(){\n\t\n}", "private internal function m248() {}", "function Main()\n {\n \n }", "function fm(){}", ...
[ "0.7371728", "0.6871451", "0.68374306", "0.68151945", "0.68010527", "0.6764608", "0.6721643", "0.6599904", "0.65976894", "0.65864825", "0.65561986", "0.6447409", "0.6447409", "0.6447409", "0.64464104", "0.64464104", "0.64464104", "0.64375794", "0.6433339", "0.6426251", "0.640...
0.0
-1
render() update the display based on the latest state
render() { return ( <Container > <Row> <Col size="md-12"> <Jumbotron> <h3>To score a point, click on any image that you haven't clicked before</h3> </Jumbotron> </Col> </Row> <Row> {this.state.cards.map(card => ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n this.update();\n }", "function render() {\n var state = store.getState()\n document.getElementById('value').innerHTML = state.count.result;\n document.getElementById('value2').innerHTML = state.sum;\n\n if(state.count.loading){\n document.getElementById('status').innerHTML...
[ "0.70172477", "0.69773877", "0.6907435", "0.6845376", "0.676831", "0.67076886", "0.66970485", "0.6644917", "0.6637164", "0.6631861", "0.6617153", "0.65937793", "0.6582028", "0.6582028", "0.6578286", "0.657306", "0.6562579", "0.6552487", "0.6550445", "0.653271", "0.65315765", ...
0.0
-1
Find a way out of the maze
function escapeMaze(maze, pos = 0, row = 0, col = 0, path = [], direction='S') { if (row >= maze.length || col >= maze[0].length) { return; } if (row < 0 || col < 0) { return; } path[pos] = direction; pos++; if (maze[row][col] === 'e') { console.log(path); r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pathFinder(maze) {\n var map = maze.map(arr => arr.slice());\n var len = map.length;\n var neighArr = [[0, 0]];\n map[0][0] = 'T'; // travelled square\n\n do { // as long as there are new un-travelled squares\n neighArr = availNeigh(map);\n neighArr.forEach(pair => map[pair[0]][pair[1]] = 'T');...
[ "0.7448607", "0.7176411", "0.70911276", "0.70756066", "0.7009659", "0.6811535", "0.67836636", "0.67835265", "0.6774849", "0.6701065", "0.66380394", "0.66356236", "0.6631811", "0.6592058", "0.6578595", "0.6492886", "0.6487993", "0.64860874", "0.64443046", "0.6415876", "0.63987...
0.58924097
87
Find all ways out of the maze
function escapeMazeAllWays(maze, pos = 0, row = 0, col = 0, path = [], direction='S') { if (row >= maze.length || col >= maze[0].length) { return; } if (row < 0 || col < 0) { return; } path[pos] = direction; pos++; if (maze[row][col] === 'e') { console.log(path); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pathFinder(maze) {\n var map = maze.map(arr => arr.slice());\n var len = map.length;\n var neighArr = [[0, 0]];\n map[0][0] = 'T'; // travelled square\n\n do { // as long as there are new un-travelled squares\n neighArr = availNeigh(map);\n neighArr.forEach(pair => map[pair[0]][pair[1]] = 'T');...
[ "0.68327", "0.674294", "0.6475161", "0.6450492", "0.64403903", "0.6422729", "0.63994443", "0.6381714", "0.63791424", "0.63409173", "0.6315525", "0.6302437", "0.62771845", "0.6246198", "0.6194221", "0.61823696", "0.6179464", "0.6172513", "0.6166303", "0.6149304", "0.6144916", ...
0.6391332
7
open any open workspace folders on refresh
function checkPath () { $scope.alreadyOpen_ws = null; var loc = $location.path(); var index = loc.indexOf('workspace/'); if (index > -1) { var workspaceSubstr = loc.substring(index+10); var lastindex = workspaceSubstr.indexOf('/'); if (lastindex > -1) { $scope.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToWorkspace() {\n\n\tshowConfirm('You will lose existing changes. Would you like to continue?',\n\t\tfunction() {\n\n\t\t\twindow.open(\"../workspace\",\"_self\");\n\n\t\t});\n\n}", "refresh() {\n this.changefolder(); //changefolder with empty folder - just refresh\n }", "refresh () {\n const...
[ "0.6783971", "0.64603144", "0.63059384", "0.6247184", "0.62093014", "0.61571395", "0.61241096", "0.60914683", "0.5952307", "0.59375334", "0.59271336", "0.59169555", "0.5906664", "0.5852058", "0.58355707", "0.5791763", "0.57780886", "0.5777795", "0.577396", "0.5770099", "0.576...
0.7069567
0
following what you observer below, write out (not copy/paste) a switchBlue function and a switchGreen function.
function switchGray() { // document.body.innerHTML = "changes text"; // alert("Barry"); document.body.style.backgroundColor = 'gray'; document.body.style.color = 'white'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchBlue(){\n\t\t$(\"p\").css(\"switch\", \"blue\");\n\t}", "function switchGreen(){\n\t\t$(\"h2\").css(\"switch\", \"green\");\n\t\n\t}", "onSwitch() {}", "onSwitch() {}", "onSwitch() {}", "blueClick() {\n\t\tthis._actions.onNext('blue');\n\t}", "function switchColor(){\n\tif (currentColor ...
[ "0.66551113", "0.65899354", "0.65736383", "0.65736383", "0.65736383", "0.64160407", "0.63847655", "0.63726854", "0.62858844", "0.6257024", "0.6249726", "0.6233546", "0.6233433", "0.622127", "0.619987", "0.61668986", "0.6144714", "0.61391205", "0.6136178", "0.6121946", "0.6114...
0.0
-1
! Vue.js v2.4.1 (c) 20142017 Evan You Released under the MIT License.
function n(e){return void 0===e||null===e}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mounted() {\n }", "mounted() {\n\n }", "mounted() {\n\n }", "constructor() {\n this.vue = new Vue();\n }", "mounted() {\n /* eslint-disable no-console */\n console.log('Mounted!');\n /* eslint-enable no-console */\n }", "created () {\n\n }", "created () {...
[ "0.6947322", "0.69070876", "0.6882782", "0.65703183", "0.64788544", "0.637135", "0.637135", "0.6344253", "0.6337804", "0.63196146", "0.6311979", "0.62866557", "0.623865", "0.6238348", "0.6235357", "0.62333", "0.61987233", "0.6176679", "0.6176679", "0.61671746", "0.61544", "...
0.0
-1
This can be a special character like a separator that shows up in a type name This is an odd set of characters. Some come from characters that are allowed by C++, like . Others are characters that are specified in the type and assembly name grammer.
function IsSpecialTypeChar(ch, ref) { switch (ch) { case ":": case ".": case "$": case "+": case "<": case ">": case "-": case "[": case "]": case ",": case "&": case "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function symbol(name){\r\n return lexeme(string(name));\r\n}", "function getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return 'eof';\n }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n\n case 0x5D: // ]\n\n case 0x2E: // .\n\n case 0x22: // \"\n\n...
[ "0.6533253", "0.6285848", "0.62777174", "0.6221674", "0.6221674", "0.6221674", "0.6213405", "0.6213405", "0.6213405", "0.6208202", "0.6181418", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", "0.6165804", ...
0.6598242
0
Just a shallow flatten
function flatten (array) { return Array.prototype.concat.apply([], array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flatten() {\n return [].concat(...this.map(v => (Array.isArray(v) ? flatten(v) : v)));\n}", "static flatten() {\n let array = [1, [2, [3, [4]], 5]];\n console.log(_.flatten(array));\n }", "function flatten(arr){\n\n}", "function myFlatten(arr) {}", "function flatten(self) {\n return P.c...
[ "0.76943487", "0.7390187", "0.7372753", "0.7347747", "0.7204317", "0.71997416", "0.71681476", "0.6930681", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.69260746", "0.6875439", "0.68727386", "0.68671197", "0...
0.0
-1
const Post = require('../models/Post'); add new user
async function registerNewUser(req, res, next) { const password = req.body.password; const salt = await bcrypt.genSalt(10); const hashedPassword = await bcrypt.hash(password,salt); //save data to user table let newUser; if (req.files && req.files.length > 0){ newUser = new User({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async onPost(req, res) {\n const { username, password } = req.body\n\n let userModel = new User({\n username: username,\n password: password,\n role: \"Staff\",\n })\n\n try {\n const savedUser = await userModel.save()\n return res.json(\"added: \" + savedUser)\n ...
[ "0.7186599", "0.7030215", "0.6953037", "0.6918705", "0.6875865", "0.68171585", "0.6815709", "0.6814464", "0.6774333", "0.6669929", "0.66568476", "0.6625705", "0.6569238", "0.65500724", "0.65437573", "0.64774203", "0.64769185", "0.6471168", "0.6448211", "0.64420784", "0.643851...
0.0
-1
=========================== Theme Functions =============================
function theme_script(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customtheme () {\ninjecttheme(\"CTH\", \".scrollableContainer-15eg7h { overflow-x: hidden; overflow-y: scroll; background-color: #2a3038; max-height: 50vh; border-radius: 8px } .wordmark-2u86JB > svg { display:none } .bg-1QIAus { background-color: transparent; background-position: var(--backgroundPosition...
[ "0.7550132", "0.73631996", "0.7009187", "0.68746287", "0.6847635", "0.68216467", "0.68216467", "0.68216467", "0.68216467", "0.68216467", "0.6818123", "0.67989", "0.6788415", "0.6786696", "0.67853796", "0.6778781", "0.67397445", "0.6696682", "0.6694065", "0.66921526", "0.66876...
0.7419591
1
Make content for markers
contentGenerator(){ let content; // Calc percent total let percentStart = Math.round(((this.start / this.startTotal) * 100) * 100) / 100; let percentEnd = Math.round(((this.end / this.endTotal) * 100) * 100) / 100; // If years are the same ignore if (startYearSelect.value == endYearSelect.v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMarkerContent (place, position) {\n var images = \"\";\n var ratings = \"\";\n var prices = \"\";\n var pricesArr = ['Free', 'Inexpensive', 'Moderate', 'Expensive', 'Very Expensive'];\n if(place.photos !== undefined) {\n var url = place.photos[0].getUrl({'maxWidth': 1000, 'maxHeig...
[ "0.71018535", "0.69810104", "0.68932503", "0.67846817", "0.67225295", "0.66764593", "0.6668156", "0.6637529", "0.6609907", "0.6602734", "0.66019195", "0.65480626", "0.653472", "0.6489514", "0.6459295", "0.6449609", "0.6443117", "0.6438553", "0.64341646", "0.64294726", "0.6394...
0.0
-1
update recipe servings by clicking decrease or increase button in rendered recipe area
updateServerings(updateType) { //Servings const newServings = (updateType === 'dec' ? this.servings - 1 : this.servings + 1); //Ingredients this.ingredients.forEach(ing => { ing.qty *= (newServings / this.servings); //this.servings is the old value }); //Update servings property this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateServings(type) {\n // Increase OR Decrease servings\n const newServings = type === 'dec' ? this.servings - 1 : this.servings + 1;\n\n // Change the ingredients count\n this.ingredients.forEach(ingredient => {\n ingredient.count *= newServings / this.servings;\n });\n\n // Append new se...
[ "0.6732192", "0.66309685", "0.65212935", "0.63997465", "0.61280304", "0.6104593", "0.6077601", "0.6043357", "0.6014766", "0.60120976", "0.596854", "0.59513086", "0.5944331", "0.5917836", "0.5905584", "0.58990204", "0.58668625", "0.58201236", "0.57730204", "0.576722", "0.57663...
0.652117
3