From 13c3d213ce8af1655c54ca772ee6a7bc31093f3b Mon Sep 17 00:00:00 2001
From: Matias Cao
Date: Tue, 16 Jun 2015 18:27:58 -0300
Subject: [PATCH 001/548] WP11 ES Translation
---
seed/challenges/basic-html5-and-css.json | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/basic-html5-and-css.json b/seed/challenges/basic-html5-and-css.json
index 4640facb09..f1b8f5608c 100644
--- a/seed/challenges/basic-html5-and-css.json
+++ b/seed/challenges/basic-html5-and-css.json
@@ -439,8 +439,17 @@
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
+ "nameEs": "Waypoint: Utiliza una clase CSS para darle estilo a un elemento",
+ "descriptionEs": [
+ "Crea una clase CSS llamada \"red-text\" y aplicala a tu elemento h2
.",
+ "Las clases son estilos reutilizables que pueden ser añadidos a elementos HTML",
+ "Esta es la anatomía de una clase CSS:",
+ " ",
+ "Puedes ver que hemos creado una clase CSS llamada \"blue-text\" dentro de la etiqueta <style>
.",
+ "Puedes aplicar una clase a un elemento HTML de esta manera: <h2 class=\"blue-text\">CatPhotoApp</h2>
.",
+ "Nota que en el elemento CSS style
, las clases deberían comenzar con un punto. En los elementos HTML, las declaraciones de clase, NO deberían comenzar con punto. ",
+ "En vez de de crear un nuevo elemento style
, prueba remover la declaración de estilo de h2
y reemplazarla por la declaración \"red-text\"."
+ ],
"namePt": "",
"descriptionPt": []
},
From d0477bfb2b055ad3b0955333c6b54fd2f4baf34d Mon Sep 17 00:00:00 2001
From: Matias Cao
Date: Mon, 22 Jun 2015 20:22:09 -0300
Subject: [PATCH 002/548] WP 12-13 ES Translation
---
seed/challenges/basic-html5-and-css.json | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/seed/challenges/basic-html5-and-css.json b/seed/challenges/basic-html5-and-css.json
index f1b8f5608c..fcb1eb9f77 100644
--- a/seed/challenges/basic-html5-and-css.json
+++ b/seed/challenges/basic-html5-and-css.json
@@ -487,8 +487,12 @@
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
+ "nameEs": "Waypoint: Estila multiples elementos con una clase CSS",
+ "descriptionEs": [
+ "Aplica la clase \"red-text\" a tus elementos h2
y p
.",
+ "Recuerda que puedes agregar clases a elementos HTML utilizando class=\"your-class-here\"
dentro de la tag de entrada del mismo.",
+ "Recuerda que los selectores CSS requieren un punto al principio: .blue-text { color: blue; }
, pero que las declaraciones de clase NO llevan punto: <h2 class=\"blue-text\">CatPhotoApp<h2>
."
+ ],
"namePt": "",
"descriptionPt": []
},
@@ -527,8 +531,13 @@
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
+ "nameEs": "Waypoint: Cambia el tamaño de fuente de un elemento.",
+ "descriptionEs": [
+ "Crea un segundo elemento p
. Luego, dentro de tu elemento <style>
, pon el \"font-size\" de todos los elementos p
a 16 pixeles.",
+ "El tamaño de fuente es controlado por el atributo CSS \"font-size\", como aquí: h1 { font-size: 30px; }
.",
+ "Primero, crea un segundo elemento p
con el siguiente texto Kitty Ipsum: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
",
+ "Ve si puedes encontrar una manera de darle a ambos elementos p
un font-size de 16 pixeles (16px
). Puedes hacer esto dentro de la misma etiqueta <style>
que creamos para la clase \"red-text\"."
+ ],
"namePt": "",
"descriptionPt": []
},
From e2deaa3f9d29209f2b3ac31ab197e6bce8077fe6 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 24 Jun 2015 09:34:32 -0700
Subject: [PATCH 003/548] add calculator view
---
views/resources/calculator.jade | 114 ++++++++++++++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 views/resources/calculator.jade
diff --git a/views/resources/calculator.jade b/views/resources/calculator.jade
new file mode 100644
index 0000000000..285272b93d
--- /dev/null
+++ b/views/resources/calculator.jade
@@ -0,0 +1,114 @@
+extends ../layout-wide
+block content
+ script(src="../../../js/calculator.js")
+ .row
+ .col-xs-12.col-sm-10.col-md-8.col-lg-6.col-sm-offset-1.col-md-offset-2.col-lg-offset-3
+ h1.text-center Coding Bootcamp Cost Calculator
+ h3.text-center.text-primary#chosen Coming from _______, and making $_______, your true costs will be:
+ #city-buttons
+ .spacer
+ h2.text-center Where do you live?
+ .spacer
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#atlanta.btn.btn-primary.btn-block.btn-lg Atlanta
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#austin.btn.btn-primary.btn-block.btn-lg Austin
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#brisbane.btn.btn-primary.btn-block.btn-lg Brisbane
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#boulder.btn.btn-primary.btn-block.btn-lg Boulder
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#chicago.btn.btn-primary.btn-block.btn-lg Chicago
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#denver.btn.btn-primary.btn-block.btn-lg Denver
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#hong-kong.btn.btn-primary.btn-block.btn-lg Hong Kong
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#london.btn.btn-primary.btn-block.btn-lg London
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#los-angeles.btn.btn-primary.btn-block.btn-lg Los Angeles
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#manchester.btn.btn-primary.btn-block.btn-lg Manchester
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#melbourne.btn.btn-primary.btn-block.btn-lg Melbourne
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#new-york-city.btn.btn-primary.btn-block.btn-lg New York City
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#portland.btn.btn-primary.btn-block.btn-lg Portland
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#raleigh-durham.btn.btn-primary.btn-block.btn-lg Raleigh-Durham
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#san-francisco.btn.btn-primary.btn-block.btn-lg San Fransisco
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#seattle.btn.btn-primary.btn-block.btn-lg Seattle
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#singapore.btn.btn-primary.btn-block.btn-lg Singapore
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#toronto.btn.btn-primary.btn-block.btn-lg Toronto
+ .col-xs-12.btn-nav
+ button#other.btn.btn-primary.btn-block.btn-lg Other
+ .spacer
+ #income.initially-hidden
+ .spacer
+ h2.text-center How much money did you make last year (in USD)?
+ .spacer
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#0.btn.btn-primary.btn-block.btn-lg(href='#') $0
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#20000.btn.btn-primary.btn-block.btn-lg(href='#') $20,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#30000.btn.btn-primary.btn-block.btn-lg(href='#') $30,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#40000.btn.btn-primary.btn-block.btn-lg(href='#') $40,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#50000.btn.btn-primary.btn-block.btn-lg(href='#') $50,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#60000.btn.btn-primary.btn-block.btn-lg(href='#') $60,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#70000.btn.btn-primary.btn-block.btn-lg(href='#') $70,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#80000.btn.btn-primary.btn-block.btn-lg(href='#') $80,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#90000.btn.btn-primary.btn-block.btn-lg(href='#') $90,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#100000.btn.btn-primary.btn-block.btn-lg(href='#') $100,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#120000.btn.btn-primary.btn-block.btn-lg(href='#') $120,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#140000.btn.btn-primary.btn-block.btn-lg(href='#') $140,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#160000.btn.btn-primary.btn-block.btn-lg(href='#') $160,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#180000.btn.btn-primary.btn-block.btn-lg(href='#') $180,000
+ .col-xs-12.col-sm-12.col-md-4.btn-nav
+ button#200000.btn.btn-primary.btn-block.btn-lg(href='#') $200,000
+ .spacer
+ #chart.initially-hidden
+ .d3-centered
+ svg.chart
+ #explanation.initially-hidden
+ .col-xs-12.col-sm-10.col-sm-offset-1
+ .text-center
+ button#transform.btn.btn-primary.btn-lg Transform
+ .button-spacer
+ a(href='/coding-bootcamp-cost-calculator.json') View Data Source JSON
+ span •
+ a(href='/coding-bootcamp-cost-calculator') Recalculate
+ h3 Notes:
+ ol
+ li.large-li We assumed an APR of 6% and a term of 3 years. If you happen to have around $15,000 in cash set aside for a coding bootcamp, please ignore this cost.
+ li.large-li We assume a cost of living of $500 for cities like San Francisco and New York City, and $400 per week for everywhere else.
+ li.large-li The most substantial cost for most people is lost wages. A 40-hour-per-week job at the US Federal minimum wage would pay at least $15,000 per year. You can read more about economic cost
+ a(href='https://en.wikipedia.org/wiki/Economic_cost' target='_blank') here
+ | .
+ li.large-li Free Code Camp. We don't charge tuition or garnish wages. We're fully online so you don't have to move. We're self-paced so you don't have to quit your job. Thus, your true cost of attending Free Code Camp will be $0.
+ .spacer
+ .row
+ .col-xs-12.col-sm-4.col-md-3
+ img.img-responsive.testimonial-image(src='https://www.evernote.com/l/AHRIBndcq-5GwZVnSy1_D7lskpH4OcJcUKUB/image.png')
+ .col-xs-12.col-sm-8.col-md-9
+ h3 Built by Suzanne Atkinson
+ p.large-p Suzanne is an emergency medicine physician, triathlon coach and web developer from Pittsburgh. You should
+ a(href='https://twitter.com/intent/user?screen_name=SteelCityCoach' target='_blank') follow her on Twitter
+ | .
+ .spacer
From 09656a0f34bf771af493a8dd01a0aa1edd75fdab Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 24 Jun 2015 09:44:30 -0700
Subject: [PATCH 004/548] add more calculator logic
---
app.js | 3 +
controllers/bootcamps.json | 231 +++++++++++++++++++++++++++++++++++++
controllers/resources.js | 16 ++-
3 files changed, 248 insertions(+), 2 deletions(-)
create mode 100644 controllers/bootcamps.json
diff --git a/app.js b/app.js
index a265e530de..9cde852619 100755
--- a/app.js
+++ b/app.js
@@ -239,6 +239,9 @@ app.get('/chat', resourcesController.chat);
app.get('/twitch', resourcesController.twitch);
+app.get('/coding-bootcamp-cost-calculator', resourcesController.bootcampCalculator);
+app.get('/coding-bootcamp-cost-calculator.json', resourcesController.bootcampCalculatorJson);
+
app.get('/cats.json', function(req, res) {
res.send(
[
diff --git a/controllers/bootcamps.json b/controllers/bootcamps.json
new file mode 100644
index 0000000000..f993befcd7
--- /dev/null
+++ b/controllers/bootcamps.json
@@ -0,0 +1,231 @@
+[
+ {
+ "name": "Hack Reactor",
+ "cost": "17780",
+ "housing": "500",
+ "weeks": "12",
+ "finance": true,
+ "cities": [
+ "new-york-city",
+ "san-francisco"
+ ]
+ }, {
+ "name": "Hack Reactor Online",
+ "cost": "17780",
+ "housing": "0",
+ "weeks": "12",
+ "finance": true,
+ "cities": [
+ "online"
+ ]
+}, {
+ "name": "Hackbright Academy",
+ "cost": "15000",
+ "housing": "500",
+ "weeks": "10",
+ "finance": true,
+ "cities": [
+ "san-francisco"
+ ]
+}, {
+ "name": "Dev Bootcamp",
+ "cost": "13950",
+ "finance": true,
+ "housing": "500",
+ "weeks": "19",
+ "cities": [
+ "new-york-city",
+ "san-francisco",
+ "chicago"
+ ]
+}, {
+ "name": "General Asssembly",
+ "cost": "11500",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "washington-dc",
+ "austin",
+ "boston",
+ "chicago",
+ "hong-kong",
+ "london",
+ "los-angeles",
+ "melbourne",
+ "new-york-city",
+ "san-francisco",
+ "seattle",
+ "singapore"
+ ]
+}, {
+ "name": "Angel Hack",
+ "cost": "14250",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "san-francisco"
+ ]
+}, {
+ "name": "Bitmaker Labs",
+ "cost": "12000",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "toronto"
+ ]
+}, {
+ "name": "CoderVox",
+ "cost": "9980",
+ "housing": "400",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "austin"
+ ]
+}, {
+ "name": "Coding Dojo",
+ "cost": "12500",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "new-york-city",
+ "san-francisco",
+ "chicago"
+ ]
+}, {
+ "name": "Epicodus",
+ "cost": "4500",
+ "housing": "400",
+ "finance": false,
+ "weeks": "15",
+ "cities": [
+ "portland"
+ ]
+}, {
+ "name": "Flat Iron School",
+ "cost": "15000",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "new-york-city"
+ ]
+}, {
+ "name": "Galvanize",
+ "cost": "21000",
+ "housing": "500",
+ "finance": true,
+ "weeks": "24",
+ "cities": [
+ "boulder",
+ "denver",
+ "seattle",
+ "san-francisco"
+ ]
+}, {
+ "name": "The Iron Yard",
+ "cost": "12000",
+ "housing": "500",
+ "finance": true,
+ "weeks": "19",
+ "cities": [
+ "austin",
+ "washington-dc",
+ "raleigh-durham",
+ "atlanta"
+ ]
+}, {
+ "name": "Launch Academy",
+ "cost": "12500",
+ "housing": "500",
+ "finance": true,
+ "weeks": "10",
+ "cities": [
+ "boston"
+ ]
+}, {
+ "name": "Maker Square",
+ "cost": "16920",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "los-angeles",
+ "san-francisco",
+ "austin"
+ ]
+}, {
+ "name": "Refactor U",
+ "cost": "13500",
+ "housing": "400",
+ "finance": true,
+ "weeks": "10",
+ "cities": [
+ "boulder"
+ ]
+}, {
+ "name": "Rocket U",
+ "cost": "12500",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "new-york-city",
+ "san-francisco",
+ "chicago"
+ ]
+}, {
+ "name": "Sabio",
+ "cost": "13450",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "los-angeles"
+ ]
+}, {
+ "name": "Shillington School",
+ "cost": "12950",
+ "housing": "500",
+ "finance": true,
+ "weeks": "12",
+ "cities": [
+ "new-york-city",
+ "sydney",
+ "brisbane",
+ "london",
+ "manchester",
+ "melbourne"
+ ]
+}, {
+ "name": "The Tech Academy",
+ "cost": "9000",
+ "housing": "400",
+ "finance": true,
+ "weeks": "20",
+ "cities": [
+ "portland"
+ ]
+}, {
+ "name": "Turing School",
+ "cost": "17500",
+ "housing": "400",
+ "finance": true,
+ "weeks": "27",
+ "cities": [
+ "denver"
+ ]
+}, {
+ "name": "Free Code Camp",
+ "cost": "0",
+ "housing": "0",
+ "finance": false,
+ "weeks": "0",
+ "cities": [
+ "online"
+ ]
+}]
diff --git a/controllers/resources.js b/controllers/resources.js
index 9101f82edf..1bd1bb7dd3 100644
--- a/controllers/resources.js
+++ b/controllers/resources.js
@@ -8,8 +8,7 @@ var async = require('async'),
R = require('ramda'),
_ = require('lodash'),
fs = require('fs'),
-
-
+ bootcampJson = require('./bootcamps.json'),
constantStrings = require('./constantStrings.json'),
User = require('../models/User'),
Challenge = require('./../models/Challenge'),
@@ -247,6 +246,8 @@ module.exports = {
);
},
+
+
nonprofits: function nonprofits(req, res) {
res.render('resources/nonprofits', {
title: 'A guide to our Nonprofit Projects'
@@ -277,6 +278,17 @@ module.exports = {
});
},
+ bootcampCalculator: function bootcampCalculator(req, res) {
+ res.render('resources/calculator', {
+ title: 'Coding Bootcamp Cost Calculator',
+ bootcampJson: bootcampJson
+ });
+ },
+
+ bootcampCalculatorJson: function bootcampCalculatorJson(req, res) {
+ res.send(bootcampJson);
+ },
+
unsubscribe: function unsubscribe(req, res, next) {
User.findOne({ email: req.params.email }, function(err, user) {
if (user) {
From ca5cef08bfdd9d2fa7ec8c338b14c87ed5f5e47e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 24 Jun 2015 09:51:44 -0700
Subject: [PATCH 005/548] finished fixing coding bootcamp cost calculator
---
public/css/main.less | 23 +++
public/js/calculator.js | 272 ++++++++++++++++++++++++++++++++
views/resources/calculator.jade | 8 +-
3 files changed, 299 insertions(+), 4 deletions(-)
create mode 100644 public/js/calculator.js
diff --git a/public/css/main.less b/public/css/main.less
index 245fc0a974..42222bf5a0 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -1108,6 +1108,29 @@ hr {
}
}
+// Calculator styles
+
+.initially-hidden {
+ display: none;
+}
+
+.chart rect {
+ fill: steelblue;
+}
+
+.chart text {
+ font-size: 14px;
+ text-anchor: end;
+}
+
+.axis path,
+.axis line {
+ fill: none;
+ stroke: #121401;
+ stroke-width: 2px;
+ shape-rendering: crispEdges;
+}
+
//uncomment this to see the dimensions of all elements outlined in red
//* {
// border-color: red;
diff --git a/public/js/calculator.js b/public/js/calculator.js
new file mode 100644
index 0000000000..7434f0ebc7
--- /dev/null
+++ b/public/js/calculator.js
@@ -0,0 +1,272 @@
+$(document).ready(function () {
+ var bootcamps = ''
+ $.getJSON('/coding-bootcamp-cost-calculator.json', function(data) {
+ bootcamps = data;
+ });
+ var city = "";
+ $("body").data("state", "stacked");
+ $('#city-buttons').on("click", "button", function () {
+ $(this).addClass('animated pulse');
+ city = $(this).attr("id");
+ $('#chosen').text('Coming from ' + city.replace(/-/g, ' ').replace(/\w\S*/g, function (txt) {
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+ }) + ', and making $_______, your true costs will be:');
+ setTimeout(function () {
+ $('#city-buttons').hide();
+ $('#income').addClass('animated fadeIn').show();
+ }, 1000);
+ });
+ $('#income').on("click", "button", function () {
+ $(this).addClass('animated pulse');
+ setTimeout(function () {
+ $('#income').hide();
+ $('#chart').addClass('animated fadeIn').show();
+ $('#chart-controls').addClass('animated fadeIn').show();
+ $('#explanation').addClass('animated fadeIn').show();
+ }, 1000);
+ var lastYearsIncome = parseInt($(this).attr("id"));
+ $('#chosen').text('Coming from ' + city.replace(/-/g, ' ').replace(/\w\S*/g, function (txt) {
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
+ }) + ', and making $' + lastYearsIncome.toString().replace(/0000$/, '0,000') + ', your true costs will be:');
+ var categoryNames = ['Lost Wages', 'Financing Cost', 'Housing Cost', 'Tuition'];
+ bootcamps.forEach(function (camp) {
+ var x0 = 0;
+ if (camp.cities.indexOf(city) > -1) {
+ weeklyHousing = 0;
+ } else {
+ weeklyHousing = +camp.housing;
+ }
+ camp.mapping = [{
+ name: camp.name,
+ label: 'Tuition',
+ value: +camp.cost,
+ x0: x0,
+ x1: x0 += +camp.cost
+ }, {
+ name: camp.name,
+ label: 'Financing Cost',
+ value: +Math.floor(camp.cost * .09519),
+ x0: +camp.cost,
+ x1: camp.finance ? x0 += +Math.floor(camp.cost * .09519) : 0
+ }, {
+ name: camp.name,
+ label: 'Housing Cost',
+ value: +weeklyHousing * camp.weeks,
+ x0: camp.finance ? +Math.floor(camp.cost * 1.09519) : camp.cost,
+ x1: x0 += weeklyHousing * camp.weeks
+ }, {
+ name: camp.name,
+ label: 'Lost Wages',
+ value: +(Math.floor(camp.weeks * lastYearsIncome / 50)),
+ x0: camp.finance ? +(Math.floor(camp.cost * 1.09519) + weeklyHousing * camp.weeks) : +camp.cost + weeklyHousing * camp.weeks,
+ x1: x0 += +(Math.floor(camp.weeks * lastYearsIncome / 50))
+ }];
+ camp.total = camp.mapping[camp.mapping.length - 1].x1;
+ });
+ bootcamps.sort(function (a, b) {
+ return a.total - b.total;
+ });
+ maxValue = 0;
+ bootcamps.forEach(function (camp) {
+ camp.mapping.forEach(function (elem) {
+ if (elem.value > maxValue) {
+ maxValue = elem.value;
+ }
+ });
+ });
+ var xStackMax = d3.max(bootcamps, function (d) {
+ return d.total;
+ }), //Scale for Stacked
+ xGroupMax = bootcamps.map(function (camp) {
+ return camp.mapping.reduce(function (a, b) {
+ return a.value > b.value ? a.value : b.value;
+ });
+ }).reduce(function (a, b) {
+ return a > b ? a : b;
+ });
+ var margin = {
+ top: 30,
+ right: 60,
+ bottom: 50,
+ left: 140
+ },
+ width = 800 - margin.left - margin.right,
+ height = 1200 - margin.top - margin.bottom;
+ var barHeight = 20;
+ var xScale = d3.scale.linear()
+ .domain([0, xStackMax])
+ .rangeRound([0, width]);
+ var y0Scale = d3.scale.ordinal()
+ .domain(bootcamps.map(function (d) {
+ return d.name;
+ }))
+ .rangeRoundBands([0, height], .1);
+ var y1Scale = d3.scale.ordinal()
+ .domain(categoryNames).rangeRoundBands([0, y0Scale.rangeBand()]);
+ var color = d3.scale.ordinal()
+ .range(["#215f1e", "#5f5c1e", "#1e215f", "#5c1e5f"])
+ .domain(categoryNames);
+ var svg = d3.select("svg")
+ .attr("width", width + margin.left + margin.right)
+ .attr("height", height + margin.top + margin.bottom)
+ .append("g")
+ .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+ var selection = svg.selectAll(".series")
+ .data(bootcamps)
+ .enter().append("g")
+ .attr("class", "series")
+ .attr("transform", function (d) {
+ return "translate(0," + y0Scale(d.name) + ")";
+ });
+ var rect = selection.selectAll("rect")
+ .data(function (d) {
+ return d.mapping;
+ })
+ .enter().append("rect")
+ .attr("x", 0)
+ .attr("width", 0)
+ .attr("height", y0Scale.rangeBand())
+ .style("fill", function (d) {
+ return color(d.label);
+ })
+ .style("stroke", "white")
+ .on("mouseover", function (d) {
+ showPopover.call(this, d);
+ })
+ .on("mouseout", function (d) {
+ removePopovers();
+ });
+ rect.transition()
+ .delay(function (d, i) {
+ return i * 10;
+ })
+ .attr("x", function (d) {
+ return xScale(d.x0);
+ })
+ .attr("width", function (d) {
+ return xScale((d.x1) - (d.x0));
+ });
+ d3.selectAll("#transform").on("click", function () {
+ $('#transform').addClass('animated pulse');
+ change();
+ setTimeout(function () {
+ $('#transform').removeClass('animated pulse');
+ }, 1000);
+ });
+
+ d3.selectAll("#chart").on("click", function () {
+ change();
+ });
+
+ function change() {
+ if ($("body").data("state") === "stacked") {
+ transitionGrouped();
+ $("body").data("state", "grouped");
+ } else {
+ transitionStacked();
+ $("body").data("state", "stacked");
+ }
+ }
+
+ function transitionGrouped() {
+ xScale.domain = ([0, xGroupMax]);
+ rect.transition()
+ .duration(500)
+ .delay(function (d, i) {
+ return i * 10;
+ })
+ .attr("width", function (d) {
+ return xScale((d.x1) - (d.x0));
+ })
+ .transition()
+ .attr("y", function (d) {
+ return y1Scale(d.label);
+ })
+ .attr("x", 0)
+ .attr("height", y1Scale.rangeBand())
+ }
+
+ function transitionStacked() {
+ xScale.domain = ([0, xStackMax]);
+ rect.transition()
+ .duration(500)
+ .delay(function (d, i) {
+ return i * 10;
+ })
+ .attr("x", function (d) {
+ return xScale(d.x0);
+ })
+ .transition()
+ .attr("y", function (d) {
+ return y0Scale(d.label);
+ })
+ .attr("height", y0Scale.rangeBand())
+ }
+
+ //axes
+ var xAxis = d3.svg.axis()
+ .scale(xScale)
+ .orient("bottom");
+ var yAxis = d3.svg.axis()
+ .scale(y0Scale)
+ .orient("left");
+ svg.append("g")
+ .attr("class", "y axis")
+ .call(yAxis);
+ svg.append("g")
+ .attr("class", "x axis")
+ .attr("transform", "translate(0," + height + ")")
+ .call(xAxis)
+ .append("text")
+ .attr("x", 300)
+ .attr("y", 35)
+ .attr("dy", ".35em")
+ .style("text-anchor", "middle")
+ .text("Cost in $USD");
+ //tooltips
+ function removePopovers() {
+ $('.popover').each(function () {
+ $(this).remove();
+ });
+ }
+
+ function showPopover(d) {
+ $(this).popover({
+ title: d.name,
+ placement: 'auto top',
+ container: 'body',
+ trigger: 'manual',
+ html: true,
+ content: function () {
+ return d.label +
+ " $" +
+ d3.format(",")(d.value ? d.value : d.x1 - d.x0);
+ }
+ });
+ $(this).popover('show')
+ }
+
+ //legends
+ var legend = svg.selectAll(".legend")
+ .data(categoryNames.slice().reverse())
+ .enter().append("g")
+ .attr("class", "legend")
+ .attr("transform", function (d, i) {
+ return "translate(30," + i * y0Scale.rangeBand() * 1.1 + ")";
+ });
+ legend.append("rect")
+ .attr("x", width - y0Scale.rangeBand())
+ .attr("width", y0Scale.rangeBand())
+ .attr("height", y0Scale.rangeBand())
+ .style("fill", color)
+ .style("stroke", "white");
+ legend.append("text")
+ .attr("x", width - y0Scale.rangeBand() * 1.2)
+ .attr("y", 12)
+ .attr("dy", ".35em")
+ .style("text-anchor", "end")
+ .text(function (d) {
+ return d;
+ });
+ });
+});
diff --git a/views/resources/calculator.jade b/views/resources/calculator.jade
index 285272b93d..7d51bc7666 100644
--- a/views/resources/calculator.jade
+++ b/views/resources/calculator.jade
@@ -1,6 +1,6 @@
extends ../layout-wide
block content
- script(src="../../../js/calculator.js")
+ script(src="/js/calculator.js")
.row
.col-xs-12.col-sm-10.col-md-8.col-lg-6.col-sm-offset-1.col-md-offset-2.col-lg-offset-3
h1.text-center Coding Bootcamp Cost Calculator
@@ -104,9 +104,9 @@ block content
li.large-li Free Code Camp. We don't charge tuition or garnish wages. We're fully online so you don't have to move. We're self-paced so you don't have to quit your job. Thus, your true cost of attending Free Code Camp will be $0.
.spacer
.row
- .col-xs-12.col-sm-4.col-md-3
- img.img-responsive.testimonial-image(src='https://www.evernote.com/l/AHRIBndcq-5GwZVnSy1_D7lskpH4OcJcUKUB/image.png')
- .col-xs-12.col-sm-8.col-md-9
+ .col-xs-12.col-sm-5.col-md-5
+ img.testimonial-image(src='https://www.evernote.com/l/AHRIBndcq-5GwZVnSy1_D7lskpH4OcJcUKUB/image.png')
+ .col-xs-12.col-sm-7.col-md-7
h3 Built by Suzanne Atkinson
p.large-p Suzanne is an emergency medicine physician, triathlon coach and web developer from Pittsburgh. You should
a(href='https://twitter.com/intent/user?screen_name=SteelCityCoach' target='_blank') follow her on Twitter
From 80e995e98f327426438bc9a22e673c6055e3e5b7 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 27 Jun 2015 15:29:39 -0700
Subject: [PATCH 006/548] update field guide cities
---
seed_data/field-guides.json | 47 ++++++++++++++++++++++++++++++++++---
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 136433aab4..e05849510f 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -320,13 +320,17 @@
" Albany ",
" Alameda ",
" Amsterdam ",
+ " Ann Arbor ",
" Apucarana ",
" Aracaju ",
" Asheville ",
+ " Asuncion ",
" Atlanta ",
+ " Auckland ",
" Austin ",
" Baltimore ",
" Bandung ",
+ " Bangkok ",
" Belem ",
" Belgrade ",
" Bellingham ",
@@ -336,6 +340,8 @@
" Berlin ",
" Bhaktapur ",
" Bijeljina ",
+ " Bydgoszcz ",
+ " Birmingham ",
" Birmingham, Alabama ",
" Bismarck, ND ",
" Bogota ",
@@ -343,18 +349,22 @@
" Boulder ",
" Brasilia ",
" Bratislava ",
+ " Brno ",
" Brussels ",
+ " Bucaramanga ",
" Buenos Aires ",
" Bucharest ",
" Budapest ",
" Cairo ",
" Calgary ",
" Campinas ",
+ " Cape Cod ",
" Cape Town ",
" Caracas ",
" Charlotte ",
" Chattanooga ",
" Chennai ",
+ " Chiang Mai ",
" Chicago ",
" Cincinnati ",
" Clarksville ",
@@ -368,8 +378,11 @@
" Des Moines ",
" Detroit ",
" Dhaka ",
+ " Dnipropetrovsk ",
" Doha ",
" Dubai ",
+ " Dublin ",
+ " Durango ",
" Edmonton ",
" Firenze ",
" Flagstaff ",
@@ -377,11 +390,14 @@
" Fort Worth ",
" Frankfurt ",
" Freehold ",
+ " Galveston ",
+ " Gdynia ",
" Geneva ",
" Guntur ",
- " Glendora ",
+ " Granada ",
" Guarapuava ",
" Hampton Roads ",
+ " Hanoi ",
" Hartford ",
" Hermosillo ",
" Ho Chi Minh City ",
@@ -404,44 +420,60 @@
" Karachi ",
" Kathmandu ",
" Kemerovo ",
+ " Kerch ",
" Kiev ",
" Kolkata ",
" Krasnodar ",
" Kryvyi Rih ",
+ " La Crosse ",
+ " La Paz ",
" Lagos ",
" Lahore ",
" Leesburg ",
" Lehi ",
" Lima ",
" Limassol ",
+ " Lisbon ",
" London ",
" Los Angeles ",
" Lubbock ",
+ " Madrid ",
" Manila ",
" Melbourne ",
+ " Mexico City ",
" Miami ",
" Minneapolis ",
+ " Mississippi Gulf Coast ",
" Missoula ",
+ " Montgomery ",
" Montreal ",
" Moscow ",
" Munich ",
" Mysore ",
" Nairobi ",
+ " Nashik ",
" Nashville ",
" New Haven ",
" New Orleans ",
" New Paltz ",
" New York City ",
+ " Nicosia ",
+ " North Platte ",
" Oakland ",
" Oklahoma City ",
" Omaha ",
" Orange County ",
- " Orlando ",
+ " Orlando ",
" Parana ",
" Paris ",
+ " Pasadena ",
+ " Pasto ",
+ " Penang ",
" Philadelphia ",
" Pittsburgh ",
" Poitiers ",
+ " Porto ",
+ " Pune ",
" Phoenix ",
" Portland ",
" Prescott ",
@@ -453,6 +485,7 @@
" Recife ",
" Richmond ",
" Rio de Janeiro ",
+ " Roma ",
" Rotterdam ",
" Sacramento ",
" Saint George ",
@@ -463,17 +496,24 @@
" San Diego ",
" San Francisco ",
" San Jose ",
+ " Santa Barbara ",
+ " Santa Cruz ",
" Sao Paulo ",
" Scottsdale ",
" Sedona ",
" Seattle ",
+ " Sidoarjo ",
" Singapore ",
+ " Skopje ",
" Solo ",
+ " Stuttgart ",
" Taipei ",
" Tampa ",
+ " Temecula ",
" Tempe ",
" Tirana ",
" Toronto ",
+ " Tucson ",
" Tulsa ",
" Verde Valley ",
" Valencia ",
@@ -481,6 +521,7 @@
" Washington, DC ",
" Winnipeg ",
" Yaounde ",
+ " Znojmo ",
" Zurich ",
" ",
" ",
@@ -509,7 +550,7 @@
" ",
" Click the \"Upload a photo button. To start out, you'll probably just want to use Free Code Camp's banner (download it here ), or a scenic shot of your city. Later you can update this with a picture from one of your city's Free Code Camp events. ",
" ",
- " Message @quincylarson in Slack with a link to your city's group page and he'll include it here. ",
+ " Message @quincylarson on Gitter with a link to your city's group page and he'll include it here. ",
" Join our Local Leaders Facebook group , where we share ideas about involving campers in your city. ",
" ",
"
",
From 968676da728259d0830e070452e13b1cf4a02810 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 28 Jun 2015 15:38:42 -0700
Subject: [PATCH 007/548] fix entities bonfire tests
---
seed_data/challenges/basic-bonfires.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json
index a40b1f917b..ac5b09dcec 100644
--- a/seed_data/challenges/basic-bonfires.json
+++ b/seed_data/challenges/basic-bonfires.json
@@ -1078,7 +1078,11 @@
],
"tests": [
"assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');",
- "assert.strictEqual('<>', '<>', 'should escape characters');",
+ "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');",
+ "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');",
+ "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');",
+ "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');",
+ "assert.strictEqual(convert('<>'), '<>', 'should escape characters');",
"assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');"
],
"MDNlinks": [
From af8295ec75db4d93790cf68a8ae811d894f6d797 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 28 Jun 2015 18:19:54 -0700
Subject: [PATCH 008/548] fix modal copy
---
views/partials/challenge-modals.jade | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/views/partials/challenge-modals.jade b/views/partials/challenge-modals.jade
index 5270e77cd4..1a0872a2ee 100644
--- a/views/partials/challenge-modals.jade
+++ b/views/partials/challenge-modals.jade
@@ -4,12 +4,11 @@
.modal-header.challenge-list-header Ready to pair program?
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body.text-center
- h3 This will create a pair programming request.
h3 You'll need
a(href='/field-guide/how-do-i-install-screenhero' target='_blank') Screen Hero
| .
- h3 Other campers may then message you about pair programming.
- a.btn.btn-lg.btn-primary.btn-block#i-want-to-pair(name='_csrf', value=_csrf) Create my pair request
+ h3 Tell your fellow campers which challenge you are interested in pair programming on.
+ a.btn.btn-lg.btn-primary.btn-block#i-want-to-pair(name='_csrf', value=_csrf) Take me to the Pair Programming room
a.btn.btn-lg.btn-info.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel
#issue-modal.modal(tabindex='-1')
@@ -33,7 +32,6 @@
a(href='/field-guide/how-do-i-get-help-when-i-get-stuck' target='_blank') RSAP
| .
h3 If you've already read the errors and searched Google, you should ask for help.
- h3 This will open a help request in our Help chat room.
a.btn.btn-lg.btn-primary.btn-block#i-want-help(name='_csrf', value=_csrf) Ask for help
a.btn.btn-lg.btn-info.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel
@@ -47,6 +45,5 @@
a(href='/field-guide/how-do-i-get-help-when-i-get-stuck' target='_blank') RSAP
| .
h3 If you've already read the errors and searched Google, you should ask for help.
- h3 This will open a help request in our Help chat room.
a.btn.btn-lg.btn-primary.btn-block#i-want-help-editorless(name='_csrf', value=_csrf) Ask for help
a.btn.btn-lg.btn-info.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel
From e5df5120ff517dd2ed14974e3ad04c558c3bde8d Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 28 Jun 2015 18:30:34 -0700
Subject: [PATCH 009/548] fix #1147
---
seed_data/challenges/bootstrap.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed_data/challenges/bootstrap.json b/seed_data/challenges/bootstrap.json
index abf29c33b5..ae20843697 100644
--- a/seed_data/challenges/bootstrap.json
+++ b/seed_data/challenges/bootstrap.json
@@ -618,8 +618,8 @@
"The \"row\" class is applied to a div
, and the buttons themselves can be wrapped within it."
],
"tests": [
- "assert($('div.row:has(button)'), 'Your buttons should all be wrapped within the same div
element with the class \"row\".')",
- "assert($('div.col-xs-4:has(button)').length > 2, 'Each of your Bootstrap buttons should be wrapped within its own a div
element with the class \"col-xs-4\".')",
+ "assert($('div.row:has(button)').length > 0, 'Your buttons should all be wrapped within the same div
element with the class \"row\".')",
+ "assert($('div.col-xs-4:has(button)').length > 2, 'Each of your Bootstrap buttons should be wrapped within its own div
element with the class \"col-xs-4\".')",
"assert(editor.match(/<\\/button>/g) && editor.match(//g).length === editor.match(/button elements has a closing tag.')",
"assert(editor.match(/<\\/div>/g) && editor.match(//g).length === editor.match(/
div elements has a closing tag.')"
],
From a97ce4492524d32e9222628ece896edc08f37ae2 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 29 Jun 2015 14:27:02 -0700
Subject: [PATCH 010/548] update cities
---
seed_data/field-guides.json | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index e05849510f..fbd4dcab63 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -393,9 +393,10 @@
" Galveston ",
" Gdynia ",
" Geneva ",
- " Guntur ",
+ " Glendora ",
" Granada ",
" Guarapuava ",
+ " Guntur ",
" Hampton Roads ",
" Hanoi ",
" Hartford ",
@@ -438,6 +439,7 @@
" Los Angeles ",
" Lubbock ",
" Madrid ",
+ " Manchester ",
" Manila ",
" Melbourne ",
" Mexico City ",
@@ -490,6 +492,7 @@
" Sacramento ",
" Saint George ",
" Saint Louis ",
+ " Saint Paul ",
" Salt Lake City ",
" Salvador ",
" San Bernardino ",
@@ -506,6 +509,7 @@
" Singapore ",
" Skopje ",
" Solo ",
+ " South Bend ",
" Stuttgart ",
" Taipei ",
" Tampa ",
@@ -515,9 +519,11 @@
" Toronto ",
" Tucson ",
" Tulsa ",
- " Verde Valley ",
" Valencia ",
" Vancouver ",
+ " Verde Valley ",
+ " Virginia Beach ",
+ " Vitória ",
" Washington, DC ",
" Winnipeg ",
" Yaounde ",
From 5156714cf1c8496ea7efe93c02736869111ca671 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 29 Jun 2015 15:56:02 -0700
Subject: [PATCH 011/548] remove duplicate city
---
seed_data/field-guides.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index fbd4dcab63..b733f44a03 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -402,7 +402,6 @@
" Hartford ",
" Hermosillo ",
" Ho Chi Minh City ",
- " Ho Chi Minh City ",
" Hong Kong ",
" Houston ",
" Hyderabad ",
From 6d7f9731e6fe5d7d771cc40147368cebfa1a4ec3 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 1 Jul 2015 01:22:06 -0700
Subject: [PATCH 012/548] update field guide with list of all rooms
---
seed_data/field-guides.json | 495 +++++++++++++++++++-----------------
views/field-guide/show.jade | 5 +-
2 files changed, 266 insertions(+), 234 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index b733f44a03..8d1c3f33ef 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -225,7 +225,7 @@
" ",
" This is the most time-efficient way to handle being stuck, and it's the most respectful of other people's time, too.
",
" Most of the time, you'll solve your problem after just one or two steps of this algorithm.
",
- " We have a special chat room just for getting help: https://freecodecamp.slack.com/messages/help/
",
+ " We have a special chat room just for getting help: https://gitter.im/freecodecamp/help/
",
" Also, if you need to post on Stack Overflow, be sure to read their guide to asking good questions: http://stackoverflow.com/help/how-to-ask .
",
" Learning to code is hard. But it's a lot easier if you ask for help when you need it!
",
" "
@@ -273,6 +273,34 @@
"
"
]
},
+ {
+ "_id": "bd7158d9c435eddfaeb5bdcf",
+ "name": "What are the Official Free Code Camp Chat Rooms?",
+ "dashedName": "what-are-the-official-free-code-camp-chat-rooms",
+ "description": [
+ "",
+ "
We have 3 official chat rooms: ",
+ "
",
+ " Free Code Camp - a friendly place where you can hang out and chat ",
+ " Help - the best place to get help from your fellow campers ",
+ " LetsPair - the best room to find a fellow campers to pair program with ",
+ " ",
+ "
We also have language-specific chat rooms: ",
+ "
",
+ "
",
+ "
If you think we should add a chat room, please message @quincylarson in Gitter.
",
+ "
"
+ ]
+ },
{
"_id": "bd7158d9c435eddfaeb5bdef",
"name": "Does Free Code Camp have an application process?",
@@ -296,7 +324,7 @@
" ",
"
",
" Follow this tutorial to set up your computer for streaming. ",
- " Contact Jason Ruekert - he's @jsonify in Slack. He's in charge of our Twitch.tv channel. Tell him what you'd like to stream, and when you're available to stream. ",
+ " Contact Jason Ruekert - he's @jsonify in Gitter. He's in charge of our Twitch.tv channel. Tell him what you'd like to stream, and when you're available to stream. ",
" Jason will pair with you using Screen Hero to verify your computer is configured properly to stream. ",
" ",
" ",
@@ -312,223 +340,226 @@
"dashedName": "how-can-i-find-other-free-code-camp-campers-in-my-city",
"description": [
"",
- "
Find your city below and join their group. This is a great way to hang out with other coders, share insights, and pair program. ",
+ "
Find your city below and join their Facebook group and Gitter Chat. This is a great way to hang out with other coders, share insights, and pair program. ",
"
",
+ " Accra Facebook Gitter ",
+ " Ahmedabad Facebook Gitter ",
+ " Albany Facebook Gitter ",
+ " Alameda Facebook Gitter ",
+ " Amsterdam Facebook Gitter ",
+ " Ann Arbor Facebook Gitter ",
+ " Apucarana Facebook Gitter ",
+ " Aracaju Facebook Gitter ",
+ " Asheville Facebook Gitter ",
+ " Asuncion Facebook Gitter ",
+ " Atlanta Facebook Gitter ",
+ " Auckland Facebook Gitter ",
+ " Austin Facebook Gitter ",
+ " Baltimore Facebook Gitter ",
+ " Bandung Facebook Gitter ",
+ " Bangkok Facebook Gitter ",
+ " Belem Facebook Gitter ",
+ " Belgrade Facebook Gitter ",
+ " Bellingham Facebook Gitter ",
+ " Belo Horizonte Facebook Gitter ",
+ " Bengaluru Facebook Gitter ",
+ " Berkeley Facebook Gitter ",
+ " Berlin Facebook Gitter ",
+ " Bhaktapur Facebook Gitter ",
+ " Bijeljina Facebook Gitter ",
+ " Bydgoszcz Facebook Gitter ",
+ " Birmingham Facebook Gitter ",
+ " Birmingham, Alabama Facebook Gitter ",
+ " Bismarck, ND Facebook Gitter ",
+ " Bogota Facebook Gitter ",
+ " Boston Facebook Gitter ",
+ " Boulder Facebook Gitter ",
+ " Brasilia Facebook Gitter ",
+ " Bratislava Facebook Gitter ",
+ " Brno Facebook Gitter ",
+ " Brussels Facebook Gitter ",
+ " Bucaramanga Facebook Gitter ",
+ " Buenos Aires Facebook Gitter ",
+ " Bucharest Facebook Gitter ",
+ " Budapest Facebook Gitter ",
+ " Cairo Facebook Gitter ",
+ " Calgary Facebook Gitter ",
+ " Campinas Facebook Gitter ",
+ " Cape Cod Facebook Gitter ",
+ " Cape Town Facebook Gitter ",
+ " Caracas Facebook Gitter ",
+ " Charlotte Facebook Gitter ",
+ " Chattanooga Facebook Gitter ",
+ " Chennai Facebook Gitter ",
+ " Chiang Mai Facebook Gitter ",
+ " Chicago Facebook Gitter ",
+ " Cincinnati Facebook Gitter ",
+ " Clarksville Facebook Gitter ",
+ " Cluj Facebook Gitter ",
+ " Coimbatore Facebook Gitter ",
+ " Coventry Facebook Gitter ",
+ " Curitiba Facebook Gitter ",
+ " Dallas Facebook Gitter ",
+ " Delhi Facebook Gitter ",
+ " Denver Facebook Gitter ",
+ " Des Moines Facebook Gitter ",
+ " Detroit Facebook Gitter ",
+ " Dhaka Facebook Gitter ",
+ " Dnipropetrovsk Facebook Gitter ",
+ " Doha Facebook Gitter ",
+ " Dubai Facebook Gitter ",
+ " Dublin Facebook Gitter ",
+ " Durango Facebook Gitter ",
+ " Edmonton Facebook Gitter ",
+ " Firenze Facebook Gitter ",
+ " Flagstaff Facebook Gitter ",
+ " Florianopolis Facebook Gitter ",
+ " Fort Worth Facebook Gitter ",
+ " Frankfurt Facebook Gitter ",
+ " Freehold Facebook Gitter ",
+ " Galveston Facebook Gitter ",
+ " Gdynia Facebook Gitter ",
+ " Geneva Facebook Gitter ",
+ " Glendora Facebook Gitter ",
+ " Guntur Facebook Gitter ",
+ " Granada Facebook Gitter ",
+ " Guarapuava Facebook Gitter ",
+ " Hampton Roads Facebook Gitter ",
+ " Hanoi Facebook Gitter ",
+ " Harcourt Facebook Gitter ",
+ " Hartford Facebook Gitter ",
+ " Hermosillo Facebook Gitter ",
+ " Ho Chi Minh City Facebook Gitter ",
+ " Hong Kong Facebook Gitter ",
+ " Houston Facebook Gitter ",
+ " Hyderabad Facebook Gitter ",
+ " Istanbul Facebook Gitter ",
+ " Indianapolis Facebook Gitter ",
+ " Iasi Facebook Gitter ",
+ " Irkutsk Facebook Gitter ",
+ " Islamabad Facebook Gitter ",
+ " Ivano Frankivsk Facebook Gitter ",
+ " Jakarta Facebook Gitter ",
+ " Joao Pessoa Facebook Gitter ",
+ " Johannesburg Facebook Gitter ",
+ " Kaduna Facebook Gitter ",
+ " Kalamazoo Facebook Gitter ",
+ " Kansas City Facebook Gitter ",
+ " Karachi Facebook Gitter ",
+ " Kathmandu Facebook Gitter ",
+ " Kemerovo Facebook Gitter ",
+ " Kerch Facebook Gitter ",
+ " Kiev Facebook Gitter ",
+ " Kolkata Facebook Gitter ",
+ " Krasnodar Facebook Gitter ",
+ " Kryvyi Rih Facebook Gitter ",
+ " La Crosse Facebook Gitter ",
+ " La Paz Facebook Gitter ",
+ " Lagos Facebook Gitter ",
+ " Lahore Facebook Gitter ",
+ " Leesburg Facebook Gitter ",
+ " Lehi Facebook Gitter ",
+ " Lima Facebook Gitter ",
+ " Limassol Facebook Gitter ",
+ " Lisbon Facebook Gitter ",
+ " London Facebook Gitter ",
+ " Los Angeles Facebook Gitter ",
+ " Lubbock Facebook Gitter ",
+ " Madrid Facebook Gitter ",
+ " Manchester Facebook Gitter ",
+ " Manila Facebook Gitter ",
+ " Melbourne Facebook Gitter ",
+ " Mexico City Facebook Gitter ",
+ " Miami Facebook Gitter ",
+ " Milwaukee Facebook Gitter ",
+ " Minneapolis Facebook Gitter ",
+ " Mississippi Gulf Coast Facebook Gitter ",
+ " Missoula Facebook Gitter ",
+ " Montgomery Facebook Gitter ",
+ " Montreal Facebook Gitter ",
+ " Moscow Facebook Gitter ",
+ " Munich Facebook Gitter ",
+ " Mysore Facebook Gitter ",
+ " Nairobi Facebook Gitter ",
+ " Nashik Facebook Gitter ",
+ " Nashville Facebook Gitter ",
+ " New Haven Facebook Gitter ",
+ " New Orleans Facebook Gitter ",
+ " New Paltz Facebook Gitter ",
+ " New York City Facebook Gitter ",
+ " Nicosia Facebook Gitter ",
+ " North Platte Facebook Gitter ",
+ " Oakland Facebook Gitter ",
+ " Oklahoma City Facebook Gitter ",
+ " Omaha Facebook Gitter ",
+ " Orange County Facebook Gitter ",
+ " Orlando Facebook Gitter ",
+ " Parana Facebook Gitter ",
+ " Paris Facebook Gitter ",
+ " Pasadena Facebook Gitter ",
+ " Pasto Facebook Gitter ",
+ " Penang Facebook Gitter ",
+ " Philadelphia Facebook Gitter ",
+ " Pittsburgh Facebook Gitter ",
+ " Poitiers Facebook Gitter ",
+ " Porto Facebook Gitter ",
+ " Pune Facebook Gitter ",
+ " Phoenix Facebook Gitter ",
+ " Portland Facebook Gitter ",
+ " Prescott Facebook Gitter ",
+ " Pristina Facebook Gitter ",
+ " Providence Facebook Gitter ",
+ " Provo Facebook Gitter ",
+ " Quibdo Facebook Gitter ",
+ " Raleigh Facebook Gitter ",
+ " Recife Facebook Gitter ",
+ " Richmond Facebook Gitter ",
+ " Rio de Janeiro Facebook Gitter ",
+ " Roma Facebook Gitter ",
+ " Rotterdam Facebook Gitter ",
+ " Sacramento Facebook Gitter ",
+ " Saint George Facebook Gitter ",
+ " Saint Louis Facebook Gitter ",
+ " Saint Paul Facebook Gitter ",
+ " Salt Lake City Facebook Gitter ",
+ " Salvador Facebook Gitter ",
+ " San Bernardino Facebook Gitter ",
+ " San Diego Facebook Gitter ",
+ " San Francisco Facebook Gitter ",
+ " San Jose Facebook Gitter ",
+ " San Luis Obispo Facebook Gitter ",
+ " Santa Barbara Facebook Gitter ",
+ " Santa Cruz Facebook Gitter ",
+ " Sao Paulo Facebook Gitter ",
+ " Scottsdale Facebook Gitter ",
+ " Sedona Facebook Gitter ",
+ " Seattle Facebook Gitter ",
+ " Sidoarjo Facebook Gitter ",
+ " Singapore Facebook Gitter ",
+ " Skopje Facebook Gitter ",
+ " Solo Facebook Gitter ",
+ " South Bend Facebook Gitter ",
+ " Stuttgart Facebook Gitter ",
+ " Taipei Facebook Gitter ",
+ " Tampa Facebook Gitter ",
+ " Temecula Facebook Gitter ",
+ " Tempe Facebook Gitter ",
+ " Tirana Facebook Gitter ",
+ " Toronto Facebook Gitter ",
+ " Tucson Facebook Gitter ",
+ " Tulsa Facebook Gitter ",
+ " Verde Valley Facebook Gitter ",
+ " Valencia Facebook Gitter ",
+ " Vancouver Facebook Gitter ",
+ " Virginia Beach Facebook Gitter ",
+ " Vitória Facebook Gitter ",
+ " Washington, DC Facebook Gitter ",
+ " Winnipeg Facebook Gitter ",
+ " Yaounde Facebook Gitter ",
+ " Znojmo Facebook Gitter ",
+ " Zurich Facebook Gitter ",
+ "
",
" ",
"
If you didn't see your city on this list, you should create your own Facebook group for your city. Please follow these steps: ",
"
",
@@ -555,11 +586,11 @@
" ",
"
Click the \"Upload a photo button. To start out, you'll probably just want to use Free Code Camp's banner (download it here ), or a scenic shot of your city. Later you can update this with a picture from one of your city's Free Code Camp events. ",
"
",
- "
Message @quincylarson on Gitter with a link to your city's group page and he'll include it here. ",
+ "
Message @quincylarson on Gitter with a link to your city's group page. He'll include it on this list and also create a Gitter room for you. ",
"
Join our Local Leaders Facebook group , where we share ideas about involving campers in your city. ",
" ",
" ",
- "
If you don't have a Facebook page, we strongly recommend you create one, even if it's just for the purpose of coordinating with campers in your city through this group.
",
+ "
If you don't have a Facebook account, we strongly recommend you create one, even if it's just for the purpose of coordinating with campers in your city through this group.
",
"
If Facebook is blocked in your country, feel free to use social network with a similar group functionality that's popular in your region.
",
"
"
]
@@ -688,8 +719,8 @@
" ",
" ",
" It's notoriously difficult to estimate how long building software projects will take, so feel free to ask our volunteer team for help.
",
- " You'll continue to meet with your stakeholder at least twice a month in your project's Slack channel.
",
- " You should also ask questions in your project's Slack channel as they come up throughout the week, and your stakeholder can answer them asynchronously.
",
+ " You'll continue to meet with your stakeholder at least twice a month in your project's Gitter channel.
",
+ " You should also ask questions in your project's Gitter channel as they come up throughout the week, and your stakeholder can answer them asynchronously.
",
" Getting \"blocked\" on a task can take away your sense of forward momentum, so be sure to proactively seek answers to any ambiguities you encounter.
",
" Ultimately, the project will be considered complete once both the stakeholder's needs have been met, and you and your pair are happy with the project. Then you can add it to your portfolio!
",
" Working with your Pair ",
@@ -697,7 +728,7 @@
" Here are our recommended ways of collaborating:
",
" ",
"
",
- " • Slack has robust private messaging functionality. It's the main way our team communicates, and we recommend it over email. ",
+ " • Gitter has robust private messaging functionality. It's the main way our team communicates, and we recommend it over email. ",
" • Trello is great for managing projects. Work with your stakeholder to create Trello cards, and update these cards regularly as you make progress on them. ",
" • Screen Hero or Team Viewer - These are the ideal way to pair program. Tools like TMUX are good, but difficult to use. We discourage you from using screen sharing tools where only one person has control of the keyboard and mouse - that isn't real pair programming. ",
" • Write clear and readable code, commit messages, branch names, and pull request messages. ",
@@ -782,9 +813,9 @@
" ",
" ",
" Free Code Camp should be a harassment-free experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, national origin, or religion (or lack thereof).
",
- " We do not tolerate harassment of campers in any form, anywhere on Free Code Camp's online media (Slack, Twitch, etc.) or during pair programming. Harassment includes sexual language and imagery, deliberate intimidation, stalking, unwelcome sexual attention, libel, and any malicious hacking or social engineering.
",
+ " We do not tolerate harassment of campers in any form, anywhere on Free Code Camp's online media (Gitter, Twitch, etc.) or during pair programming. Harassment includes sexual language and imagery, deliberate intimidation, stalking, unwelcome sexual attention, libel, and any malicious hacking or social engineering.
",
" If a camper engages in harassing behavior, our team will take any action we deem appropriate, up to and including banning them from Free Code Camp.
",
- " We want everyone to feel safe and respected. If you are being harassed or notice that someone else is being harassed, say something! Message @quincylarson, @terakilobyte and @codenonprofit in Slack (preferably with a screen shot of the offending language) so we can take fast action.
",
+ " We want everyone to feel safe and respected. If you are being harassed or notice that someone else is being harassed, say something! Message @quincylarson, @terakilobyte and @codenonprofit in Gitter (preferably with a screen shot of the offending language) so we can take fast action.
",
" If you have questions about this code of conduct, email us at team@freecodecamp.com .
",
""
]
@@ -840,10 +871,10 @@
" We're happy to do a quick interview for your publication or show. Here's whom you should contact about what, and how to best reach them: ",
" ",
"
",
- " Want to talk to about Free Code Camp's curriculum or long-term vision? Reach out to Quincy Larson. He's @ossia on Twitter and @quincylarson on Slack. ",
- " Want to talk about Free Code Camp's open source codebase, infrastructure, or JavaScript in general? Talk to Nathan Leniz. He's @terakilobyte on Twitter and @terakilobyte on Slack. ",
- " Want to explore our efforts to empower nonprofits with code? Michael D. Johnson eats, sleeps and breathes that. He's @figitalboy on Twitter and @codenonprofit on Slack. ",
- " Want to get a camper's perspective on our community? Talk with Bianca Mihai (@biancamihai on Slack and @bubuslubu on Twitter) or Suzanne Atkinson (@adventurebear on Slack and @steelcitycoach on Twitter).",
+ " Want to talk to about Free Code Camp's curriculum or long-term vision? Reach out to Quincy Larson. He's @ossia on Twitter and @quincylarson on Gitter. ",
+ " Want to talk about Free Code Camp's open source codebase, infrastructure, or JavaScript in general? Talk to Nathan Leniz. He's @terakilobyte on Twitter and @terakilobyte on Gitter. ",
+ " Want to explore our efforts to empower nonprofits with code? Michael D. Johnson eats, sleeps and breathes that. He's @figitalboy on Twitter and @codenonprofit on Gitter. ",
+ " Want to get a camper's perspective on our community? Talk with Bianca Mihai (@biancamihai on Gitter and @bubuslubu on Twitter) or Suzanne Atkinson (@adventurebear on Gitter and @steelcitycoach on Twitter).",
" ",
" ",
" We strive to be helpful and transparent in everything we do. We'll do what we can to help you share our community with your audience.
",
@@ -901,7 +932,7 @@
" Contributing to our field guide is a great way to establish your history on GitHub, add to your portfolio, and help other campers. If you have a question about JavaScript or programming in general that you'd like us to add to the field guide, here are two ways to get it into the guide:
",
" ",
"
",
- " You can message @danraley in Slack with your question. ",
+ " You can message @danraley in Gitter with your question. ",
" You can also contribute to this field guide directly via GitHub pull request, by cloning Free Code Camp's main repository and modifying field-guides.json . ",
" ",
" ",
@@ -915,7 +946,7 @@
"description": [
"",
"
Our translation effort is driven by bilingual campers like you.",
- "
If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Slack.
",
+ "
If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Gitter.
",
"
"
]
},
@@ -928,7 +959,7 @@
" Translation is an all-or-nothing proposal.",
"
We won't be able to add new languages to Free Code Camp until all of our challenges are translated into that langauge.
",
" In addition to translating these initially, we'll also need to maintain the translation as the challenges are gradually updated.
",
- " If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Slack.
",
+ " If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Gitter.
",
""
]
},
diff --git a/views/field-guide/show.jade b/views/field-guide/show.jade
index a81eb6682f..35b16099f2 100644
--- a/views/field-guide/show.jade
+++ b/views/field-guide/show.jade
@@ -12,10 +12,11 @@ block content
.text-center
if user && user.uncompletedFieldGuides.length > 0
.next-field-guide-button.btn.btn-primary.btn-big.btn-block Next article (ctrl + enter)
- .ten-pixel-break
+ .button-spacer
+ .button-spacer
a.btn.btn-info.btn-big.btn-block(href='/field-guide/all-articles') Show me all articles
if !user
- .ten-pixel-break
+ .button-spacer
a.btn.btn-big.signup-btn.btn-block(href='/login') Start learning to code (it's free)
.spacer
#fieldGuideId.hidden= fieldGuideId
From 0afd8507ec6758226d9da7ad62446784d1e9136d Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 1 Jul 2015 01:24:00 -0700
Subject: [PATCH 013/548] remove news nav ad
---
views/stories/news-nav.jade | 7 -------
1 file changed, 7 deletions(-)
diff --git a/views/stories/news-nav.jade b/views/stories/news-nav.jade
index 48f64ae561..253a6513c9 100644
--- a/views/stories/news-nav.jade
+++ b/views/stories/news-nav.jade
@@ -13,13 +13,6 @@
button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search
.spacer
-.row
- .col-xs-12.col-sm-8.col-sm-offset-2.well
- h4.text-center Which other free resources do you use?
- img.img-responsive(src='https://www.evernote.com/l/AHRNhlwViM1Kh5qCm6iy7MSWrbdyxYbRkWkB/image.png')
- p Link us to your favorite free coding resources.
- p Use the headline: "Awesome Free Resource: (the name of the book, podcast, or video series)". We'll publish a list of the 25 most-upvoted resources (and the campers who submitted them) in Wednesday's blog post, and in an upcoming Field Guide article. Also - as always - you'll get 1 point every time someone upvotes your post.
-.spacer
#search-results
From 74e5840b806d658871a17a9a2904f0c4b716b137 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 1 Jul 2015 01:33:01 -0700
Subject: [PATCH 014/548] update official LA room link
---
seed_data/field-guides.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 8d1c3f33ef..5844f2249e 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -464,7 +464,7 @@
" Limassol Facebook Gitter ",
" Lisbon Facebook Gitter ",
" London Facebook Gitter ",
- " Los Angeles Facebook Gitter ",
+ " Los Angeles Facebook Gitter ",
" Lubbock Facebook Gitter ",
" Madrid Facebook Gitter ",
" Manchester Facebook Gitter ",
From 14e010b3c78b96e57890f2c4af3a2990d6c40a88 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 3 Jul 2015 01:09:58 -0700
Subject: [PATCH 015/548] update the cities
---
seed_data/field-guides.json | 38 +++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 5844f2249e..98a445e32d 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -279,23 +279,24 @@
"dashedName": "what-are-the-official-free-code-camp-chat-rooms",
"description": [
"",
- "
We have 3 official chat rooms: ",
+ "
We have 4 official chat rooms: ",
"
",
- " Free Code Camp - a friendly place where you can hang out and chat ",
- " Help - the best place to get help from your fellow campers ",
- " LetsPair - the best room to find a fellow campers to pair program with ",
+ " Free Code Camp - a friendly place where you can hang out and chat ",
+ " Help - the best place to get help from your fellow campers ",
+ " LetsPair - the best room to find fellow campers to pair program with using Screen Hero ",
+ " TeamViewer - the best room to find fellow campers who use Linux and pair with using Team Viewer ",
" ",
"
We also have language-specific chat rooms: ",
"
",
+ "
Arabic ",
+ "
Chinese ",
+ "
Dutch ",
+ "
French ",
+ "
German ",
+ "
Portugues ",
+ "
Russian ",
+ "
Spanish ",
+ " ",
"
",
"
If you think we should add a chat room, please message @quincylarson in Gitter.
",
"
"
@@ -356,7 +357,7 @@
" Atlanta Facebook Gitter ",
" Auckland Facebook Gitter ",
" Austin Facebook Gitter ",
- " Baltimore Facebook Gitter ",
+ " Baltimore Facebook Gitter ",
" Bandung Facebook Gitter ",
" Bangkok Facebook Gitter ",
" Belem Facebook Gitter ",
@@ -396,6 +397,7 @@
" Chicago Facebook Gitter ",
" Cincinnati Facebook Gitter ",
" Clarksville Facebook Gitter ",
+ " Cleveland Facebook Gitter ",
" Cluj Facebook Gitter ",
" Coimbatore Facebook Gitter ",
" Coventry Facebook Gitter ",
@@ -427,7 +429,6 @@
" Guarapuava Facebook Gitter ",
" Hampton Roads Facebook Gitter ",
" Hanoi Facebook Gitter ",
- " Harcourt Facebook Gitter ",
" Hartford Facebook Gitter ",
" Hermosillo Facebook Gitter ",
" Ho Chi Minh City Facebook Gitter ",
@@ -440,11 +441,13 @@
" Irkutsk Facebook Gitter ",
" Islamabad Facebook Gitter ",
" Ivano Frankivsk Facebook Gitter ",
+ " Jaipur Facebook Gitter ",
" Jakarta Facebook Gitter ",
" Joao Pessoa Facebook Gitter ",
" Johannesburg Facebook Gitter ",
" Kaduna Facebook Gitter ",
" Kalamazoo Facebook Gitter ",
+ " Kampala Facebook Gitter ",
" Kansas City Facebook Gitter ",
" Karachi Facebook Gitter ",
" Kathmandu Facebook Gitter ",
@@ -467,7 +470,7 @@
" Los Angeles Facebook Gitter ",
" Lubbock Facebook Gitter ",
" Madrid Facebook Gitter ",
- " Manchester Facebook Gitter ",
+ " Manchester, UK Facebook Gitter ",
" Manila Facebook Gitter ",
" Melbourne Facebook Gitter ",
" Mexico City Facebook Gitter ",
@@ -476,6 +479,7 @@
" Minneapolis Facebook Gitter ",
" Mississippi Gulf Coast Facebook Gitter ",
" Missoula Facebook Gitter ",
+ " Monterrey Facebook Gitter ",
" Montgomery Facebook Gitter ",
" Montreal Facebook Gitter ",
" Moscow Facebook Gitter ",
@@ -506,6 +510,7 @@
" Porto Facebook Gitter ",
" Pune Facebook Gitter ",
" Phoenix Facebook Gitter ",
+ " Port Harcourt Facebook Gitter ",
" Portland Facebook Gitter ",
" Prescott Facebook Gitter ",
" Pristina Facebook Gitter ",
@@ -535,6 +540,7 @@
" Scottsdale Facebook Gitter ",
" Sedona Facebook Gitter ",
" Seattle Facebook Gitter ",
+ " Seoul Facebook Gitter ",
" Sidoarjo Facebook Gitter ",
" Singapore Facebook Gitter ",
" Skopje Facebook Gitter ",
From 1ddd91c7de7de52bb716f36bfb5f1dc77733593b Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 3 Jul 2015 01:12:38 -0700
Subject: [PATCH 016/548] fix minor typo
---
seed_data/field-guides.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 98a445e32d..533e942994 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -284,7 +284,7 @@
" Free Code Camp - a friendly place where you can hang out and chat ",
" Help - the best place to get help from your fellow campers ",
" LetsPair - the best room to find fellow campers to pair program with using Screen Hero ",
- " TeamViewer - the best room to find fellow campers who use Linux and pair with using Team Viewer ",
+ " TeamViewer - the best room to find fellow campers who use Linux and pair program using Team Viewer ",
" ",
" We also have language-specific chat rooms: ",
" ",
From 2d2c7f080861987aacc8c681a5dec0acc2cc7f02 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 5 Jul 2015 22:51:59 -0700
Subject: [PATCH 017/548] add selfie notification modal and camper news ad
---
views/challengeMap/show.jade | 36 ++++++++++++++++++------------------
views/stories/news-nav.jade | 8 +++++++-
2 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 173f58d7c4..8a683863b4 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,21 +83,21 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- //#announcementModal.modal(tabindex='-1')
- // .modal-dialog.animated.fadeInUp.fast-animation
- // .modal-content
- // .modal-header.challenge-list-header Add us to your LinkedIn profile
- // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- // .modal-body
- // h3.text-left LinkedIn now recognizes Free Code Camp as a university.
- // img.img-responsive.img-center(src='https://www.evernote.com/l/AHTzkHwtg-BHj57bqqDL7WFF8WgrI5V8cxwB/image.png')
- // h3.text-left It takes less than a minute to add Free Code Camp to your LinkedIn profile.
- // a.btn.btn-lg.btn-info.btn-block(name='_csrf', value=_csrf, aria-hidden='true', href='/linkedin', target='_blank') Show me how to do this
- // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- //script.
- // $(document).ready(function () {
- // if (!localStorage || !localStorage.linkedIn) {
- // $('#announcementModal').modal('show');
- // localStorage.linkedIn = "true";
- // }
- // });
+ #announcementModal.modal(tabindex='-1')
+ .modal-dialog.animated.fadeInUp.fast-animation
+ .modal-content
+ .modal-header.challenge-list-header Share your workspace selfie
+ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ .modal-body
+ h3.text-left Your workspace selfie should be part of our upcoming mosaic.
+ img.img-responsive.img-center(src='https://www.evernote.com/l/Ajm69Uj6uvJLzo7PAj8wGjjbSvGyN0ME-5YB/image.png')
+ h3.text-left Take a selfie of you at your workspace with Free Code Camp open.
+ h3.text-left Share it on Instagram, Twitter or Facebook with the hashtag #freecodecamp.
+ a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ script.
+ $(document).ready(function () {
+ if (!localStorage || !localStorage.selfie) {
+ $('#announcementModal').modal('show');
+ localStorage.selfie = "true";
+ }
+ });
diff --git a/views/stories/news-nav.jade b/views/stories/news-nav.jade
index 253a6513c9..043c6a00a6 100644
--- a/views/stories/news-nav.jade
+++ b/views/stories/news-nav.jade
@@ -11,7 +11,13 @@
input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links')
span.input-group-btn
button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search
-
+.spacer
+.row
+ .col-xs-12.col-sm-8.col-sm-offset-2.well
+ h3.text-center Your workspace selfie should be part of our upcoming mosaic.
+ img.img-responsive(src='https://www.evernote.com/l/Ajm69Uj6uvJLzo7PAj8wGjjbSvGyN0ME-5YB/image.png')
+ p.large-p Take a selfie of you at your workspace with Free Code Camp open.
+ p.large-p Share it on Instagram, Twitter or Facebook with the hashtag #freecodecamp.
.spacer
#search-results
From cf82494f283c8fc30fd397f777174bd7e72997aa Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 5 Jul 2015 23:05:45 -0700
Subject: [PATCH 018/548] add more cities
---
seed_data/field-guides.json | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 533e942994..f30b187a81 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -348,6 +348,7 @@
" Ahmedabad Facebook Gitter ",
" Albany Facebook Gitter ",
" Alameda Facebook Gitter ",
+ " Amman Facebook Gitter ",
" Amsterdam Facebook Gitter ",
" Ann Arbor Facebook Gitter ",
" Apucarana Facebook Gitter ",
@@ -401,6 +402,7 @@
" Cluj Facebook Gitter ",
" Coimbatore Facebook Gitter ",
" Coventry Facebook Gitter ",
+ " Cuenca Facebook Gitter ",
" Curitiba Facebook Gitter ",
" Dallas Facebook Gitter ",
" Delhi Facebook Gitter ",
@@ -420,6 +422,7 @@
" Fort Worth Facebook Gitter ",
" Frankfurt Facebook Gitter ",
" Freehold Facebook Gitter ",
+ " Fresno Facebook Gitter ",
" Galveston Facebook Gitter ",
" Gdynia Facebook Gitter ",
" Geneva Facebook Gitter ",
@@ -441,6 +444,7 @@
" Irkutsk Facebook Gitter ",
" Islamabad Facebook Gitter ",
" Ivano Frankivsk Facebook Gitter ",
+ " Jacksonville Facebook Gitter ",
" Jaipur Facebook Gitter ",
" Jakarta Facebook Gitter ",
" Joao Pessoa Facebook Gitter ",
@@ -493,6 +497,7 @@
" New Paltz Facebook Gitter ",
" New York City Facebook Gitter ",
" Nicosia Facebook Gitter ",
+ " Noida Facebook Gitter ",
" North Platte Facebook Gitter ",
" Oakland Facebook Gitter ",
" Oklahoma City Facebook Gitter ",
@@ -508,7 +513,7 @@
" Pittsburgh Facebook Gitter ",
" Poitiers Facebook Gitter ",
" Porto Facebook Gitter ",
- " Pune Facebook Gitter ",
+ " Perth Facebook Gitter ",
" Phoenix Facebook Gitter ",
" Port Harcourt Facebook Gitter ",
" Portland Facebook Gitter ",
@@ -516,6 +521,7 @@
" Pristina Facebook Gitter ",
" Providence Facebook Gitter ",
" Provo Facebook Gitter ",
+ " Pune Facebook Gitter ",
" Quibdo Facebook Gitter ",
" Raleigh Facebook Gitter ",
" Recife Facebook Gitter ",
@@ -527,6 +533,7 @@
" Saint George Facebook Gitter ",
" Saint Louis Facebook Gitter ",
" Saint Paul Facebook Gitter ",
+ " Salamanca Facebook Gitter ",
" Salt Lake City Facebook Gitter ",
" Salvador Facebook Gitter ",
" San Bernardino Facebook Gitter ",
@@ -558,6 +565,7 @@
" Verde Valley Facebook Gitter ",
" Valencia Facebook Gitter ",
" Vancouver Facebook Gitter ",
+ " Victoria Facebook Gitter ",
" Virginia Beach Facebook Gitter ",
" Vitória Facebook Gitter ",
" Washington, DC Facebook Gitter ",
From 9444683c508cee8255c1e7c3c2f6bf2f5df80aa0 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 7 Jul 2015 10:48:07 -0700
Subject: [PATCH 019/548] update the landing page
---
views/home.jade | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/views/home.jade b/views/home.jade
index f1058309b5..7b25a30777 100644
--- a/views/home.jade
+++ b/views/home.jade
@@ -1,19 +1,6 @@
extends layout
block content
.jumbotron
- if (user && user.progressTimestamps.length > 0)
- .col-xs-12
- .embed-responsive.embed-responsive-16by9
- iframe.embed-responsive-item(src='//player.vimeo.com/video/129168884')
- br
- h3 Note: If you're using Firefox and the buttons aren't working, do a full refresh (control + f5 on Windows and command + shift + r on Mac). We're working on this.
- h3 Note: If you've already completed the HTML, CSS, Bootstrap Waypoints, you do not need to do these new Waypoints.
- h3 Note: If you were already doing full stack JavaScript Waypoints (Node.js, Angular.js), go ahead and start the Bonfires (Basic Algorithm Scripting).
- h3 Thanks for your patience everyone! We're confident these curriculum improvements will better prepare you for your nonprofit projects and for the workplace.
- br
- br
- br
- br
.text-center
h1.hug-top Code with Us
h2 Let's learn to code by building projects for nonprofits
@@ -43,7 +30,12 @@ block content
a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free)
.button-spacer
a.btn.btn-cta.btn-success.btn-block(href="/nonprofits") My nonprofit needs coding help
- .big-break
+ h2 As seen in:
+ img.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/as-seen-on.png')
+ .spacer
+ h2 We're a proven way to start your software engineering career:
+ img.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/linkedin-alumni.png')
+ .spacer
h2 Campers you'll hang out with:
.row
.col-xs-12.col-sm-12.col-md-4
@@ -74,8 +66,8 @@ block content
.landing-skill-icon.fa.fa-database.font-awesome-padding
h2.black-text Databases
.col-xs-12.col-sm-12.col-md-3
- .landing-skill-icon.ion-social-chrome
- h2.black-text DevTools
+ .landing-skill-icon.ion-social-github
+ h2.black-text Git
.col-xs-12.col-sm-12.col-md-3
.landing-skill-icon.ion-social-nodejs
h2.black-text Node.js
From 8afb1e7e197251bed01cff31d55ed45003959bd7 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 7 Jul 2015 11:02:00 -0700
Subject: [PATCH 020/548] remove buggy devtools challenge
---
seed_data/challenges/basic-javascript.json | 31 ----------------------
1 file changed, 31 deletions(-)
diff --git a/seed_data/challenges/basic-javascript.json b/seed_data/challenges/basic-javascript.json
index 4ab91aa847..8e40b4bc0a 100644
--- a/seed_data/challenges/basic-javascript.json
+++ b/seed_data/challenges/basic-javascript.json
@@ -188,37 +188,6 @@
"namePt": "",
"descriptionPt": []
},
- {
- "_id": "bd7118d8c441eddfaeb5bdef",
- "name": "Waypoint: Discover Chrome DevTools",
- "difficulty": 0.32,
- "challengeSeed": "110752743",
- "description": [
- "It's time to learn the most powerful tool your browser has - the Development Tools!",
- "If you aren't already using Chrome, you'll want to download it here: http://www.google.com/chrome/ . While it's true that Firefox has a tool called Firebug that is very similar to Chrome's DevTools, we will use Chrome for this challenge.",
- "Note that this course, jointly produced by Google and Code School, is technologically impressive, but occasionally buggy. If you encounter a bug, just ignore it and keep going.",
- "Go to http://discover-devtools.codeschool.com .",
- "Complete \"Chapter 1: Getting Started & Basic DOM and Styles\".",
- "Complete \"Chapter 2: Advanced DOM and Styles\".",
- "Complete \"Chapter 3: Working with the Console\".",
- "Complete \"Chapter 4: Debugging JavaScript\".",
- "Complete \"Chapter 5: Improving Network Performance\".",
- "Complete \"Chapter 6: Improving Performance\".",
- "Complete \"Chapter 7: Memory Profiling\"."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
{
"_id": "bd7138d8c441eddfaeb5bdef",
"name": "Waypoint: Learn Regular Expressions",
From 6f89a0dbcee7c763cfd414a3dd984a52caad2c1d Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 7 Jul 2015 11:07:03 -0700
Subject: [PATCH 021/548] remove computer science challenges
---
seed_data/challenges/computer-science.json | 172 ---------------------
1 file changed, 172 deletions(-)
delete mode 100644 seed_data/challenges/computer-science.json
diff --git a/seed_data/challenges/computer-science.json b/seed_data/challenges/computer-science.json
deleted file mode 100644
index 15f5c3ebb6..0000000000
--- a/seed_data/challenges/computer-science.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "name": "Computer Science",
- "order": 0.005,
- "challenges": [
- {
- "_id": "bd7123d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Basic Computer Science",
- "difficulty": 0.90,
- "challengeSeed": "114628241",
- "description": [
- "Stanford has an excellent free online Computer Science curriculum. This interactive course uses a modified version of JavaScript. It will cover a lot of concepts quickly.",
- "Note that Harvard also has an excellent introduction to computer science course called CS50, but it takes more than 100 hours to complete, and doesn't use JavaScript.",
- "Despite being completely self-paced, Stanford's CS101 course is broken up into weeks. Each of the following challenges will address one of those weeks.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z54/z1/ and complete the first week's course work."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende Informática Básica",
- "descriptionEs": [
- "Stanford tiene en internet un excelente currículo gratuito sobre Informática. Este curso interactivo utiliza una versión modificada de JavaScript. En él se cubrirán varios conceptos rápidamente.",
- "Vale recalcar que Harvard también tiene un excelente curso de introducción a la informática llamado CS50, pero éste toma más de 100 horas para completar y no utiliza JavaScript.",
- "A pesar de que puedes llevarlo a tu propio ritmo, el curso de Stanford CS101 está separado en semanas. Cada uno de los desafíos apuntará a cada una de esas semanas.",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z54/z1/ y completa la primera semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "_id": "bd8124d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Loops",
- "difficulty": 0.19,
- "challengeSeed": "114597348",
- "description": [
- "Now let's tackle week 2 of Stanford's Intro to Computer Science course.",
- "This will introduce us to loops, a fundamental feature of every programming language.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z100/a7a70ce6e4724c58862ee6007284face/ and complete Week 2."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende Loops",
- "descriptionEs": [
- "Ahora apuntaremos a completar la semana 2 del curso de Introducción a Informática de Stanford.",
- "Esto nos introducirá a los loops (bucles), una característica fundamental de todos los lenguajes de programación",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z100/a7a70ce6e4724c58862ee6007284face/ y completa la segunda semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "_id": "bd8125d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Computer Hardware",
- "difficulty": 0.20,
- "challengeSeed": "114597347",
- "description": [
- "Week 3 of Stanford's Intro to Computer Science covers computer hardware and explains Moore's law of exponential growth in the price-performance of processors.",
- "This challenge will also give you an understanding of how bits and bytes work.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z143/z101/ and complete Week 3."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende sobre el Hardware de las Computadoras",
- "descriptionEs": [
- "La semana 3 del curso de Introducción a Informática de Stanford cubrirá el hardware de las computadoras y explicará la ley de Moore sobre el crecimiento exponencial del precio-desempeño de los procesadores.",
- "Este desafío también te dará un entendimiento más amplio sobre como funcionan los bits y bytes.",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z143/z101/ y completa la tercera semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "_id": "bd8126d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Computer Networking",
- "difficulty": 0.21,
- "challengeSeed": "114604811",
- "description": [
- "Now that you've learned about computer hardware, it's time to learn about the software that runs on top of it.",
- "Particularly important, you will learn about networks and TCP/IP - the protocol that powers the internet.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z187/z144/ and complete Week 4."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende sobre Redes de Computadoras",
- "descriptionEs": [
- "Ahora que ya hemos aprendido sobre hardware, es hora de aprender sobre el software que corre encima de él.",
- "Es importante recalcar que aprenderás sobre como funcionan las redes y TCP/IP - el protocolo que potencia el internet.",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z187/z144/ y completa la cuarta semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "_id": "bd8127d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Boolean Logic",
- "difficulty": 0.22,
- "challengeSeed": "114604812",
- "description": [
- "Now we'll do some more table exercises and learn boolean logic.",
- "We'll also learn the difference between digital data and analog data.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z208/z188/ and complete Week 5."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende Lógica Booleana",
- "descriptionEs": [
- "Ahora trabajaremos más ejercicios de tablas y aprenderemos lógica booleana.",
- "También aprenderemos la diferencia entre datos digitales y datos análogos.",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z208/z188/ y completa la quinta semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "_id": "bd8128d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn Computer Security",
- "difficulty": 0.23,
- "challengeSeed": "114604813",
- "description": [
- "We're almost done with Stanford's Introduction to Computer Science course!",
- "We'll learn about one of the most important inventions of the 20th century - spreadsheets.",
- "We'll also learn about Computer Security and some of the more common vulnerabilities software systems have.",
- "Go to https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z229/z213/ and complete Week 6, the final week of the course."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende sobre Seguridad Informática",
- "descriptionEs": [
- "¡Ya casi completamos el curso de Introducción a la Informática!",
- "Aprenderemos sobre una de la más importante invención del siglo 20 - la hoja de cálculo.",
- "También aprenderemos sobre la Seguridad Informática y sobre algunas de las vulnerabilidades más comúnes en los sistemas de software.",
- "Ingresa a https://class.stanford.edu/courses/Engineering/CS101/Summer2014/courseware/z229/z213/ y completa la sexta y última semana del curso."
- ],
- "namePt": "",
- "descriptionPt": []
- }
- ]
-}
From 9b33a3bf1515b9d3c52b8061e9942475b3501af0 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 7 Jul 2015 11:09:48 -0700
Subject: [PATCH 022/548] resequence ziplines
---
seed_data/challenges/ziplines.json | 70 +++++++++++++++---------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/seed_data/challenges/ziplines.json b/seed_data/challenges/ziplines.json
index 8f46222201..d028a92ce6 100644
--- a/seed_data/challenges/ziplines.json
+++ b/seed_data/challenges/ziplines.json
@@ -36,41 +36,6 @@
"namePt": "",
"descriptionPt": []
},
- {
- "_id": "bd7158d8c442eddfaeb5bd1f",
- "name": "Zipline: Use the Twitch.tv JSON API",
- "difficulty": 1.01,
- "challengeSeed": "126411564",
- "description": [
- "Objective: Build a CodePen.io that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/GJKRxZ .",
- "Rule #1: Don't look at the example project's code. Figure it out for yourself.",
- "Rule #2: You may use whichever libraries or APIs you need.",
- "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.",
- "Here are the user stories you must enable, and optional bonus user stories:",
- "User Story: As a user, I can see whether Free Code Camp is currently streaming on Twitch.tv.",
- "User Story: As a user, I can click the status output and be sent directly to the Free Code Camp's Twitch.tv channel.",
- "User Story: As a user, if Free Code Camp is streaming, I can see additional details about what they are streaming.",
- "Bonus User Story: As a user, I can search through the streams listed.",
- "Hint: Here's an example call to Twitch.tv's JSON API: https://api.twitch.tv/kraken/streams/freecodecamp
.",
- "Hint: The relevant documentation about this API call is here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel .",
- "Hint: Here's an array of the Twitch.tv usernames of people who regularly stream coding: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]
",
- "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.",
- "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
- "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
- ],
- "challengeType": 3,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
{
"_id": "bd7158d8c442eddfaeb5bd13",
"name": "Zipline: Build a Random Quote Machine",
@@ -133,6 +98,41 @@
"namePt": "",
"descriptionPt": []
},
+ {
+ "_id": "bd7158d8c442eddfaeb5bd1f",
+ "name": "Zipline: Use the Twitch.tv JSON API",
+ "difficulty": 1.01,
+ "challengeSeed": "126411564",
+ "description": [
+ "Objective: Build a CodePen.io that successfully reverse-engineers this: http://codepen.io/GeoffStorbeck/full/GJKRxZ .",
+ "Rule #1: Don't look at the example project's code. Figure it out for yourself.",
+ "Rule #2: You may use whichever libraries or APIs you need.",
+ "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.",
+ "Here are the user stories you must enable, and optional bonus user stories:",
+ "User Story: As a user, I can see whether Free Code Camp is currently streaming on Twitch.tv.",
+ "User Story: As a user, I can click the status output and be sent directly to the Free Code Camp's Twitch.tv channel.",
+ "User Story: As a user, if Free Code Camp is streaming, I can see additional details about what they are streaming.",
+ "Bonus User Story: As a user, I can search through the streams listed.",
+ "Hint: Here's an example call to Twitch.tv's JSON API: https://api.twitch.tv/kraken/streams/freecodecamp
.",
+ "Hint: The relevant documentation about this API call is here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel .",
+ "Hint: Here's an array of the Twitch.tv usernames of people who regularly stream coding: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]
",
+ "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.",
+ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
+ "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
+ ],
+ "challengeType": 3,
+ "tests": [],
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
{
"_id": "bd7158d8c442eddfaeb5bd18",
"name": "Zipline: Stylize Stories on Camper News",
From 146af85bb1ad263a5c884bc88018fa73e0582492 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 8 Jul 2015 09:12:09 -0700
Subject: [PATCH 023/548] remove reference to slack
---
seed_data/challenges/basic-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json
index ac5b09dcec..b714a136cb 100644
--- a/seed_data/challenges/basic-bonfires.json
+++ b/seed_data/challenges/basic-bonfires.json
@@ -13,7 +13,7 @@
"Pair Programming is where two people code together on the same computer. It is an efficient way to collaborate, and widely practiced at software companies. Pair Programming is one of the core concepts of \"Agile\" Software Development, which you will hear more about later.",
"Many people use Skype or Google Hangouts to pair program, but if you talk with professional software engineers, they will tell you that it's not really pair programming unless both people have the ability to use the keyboard and mouse.",
"The most popular tool for pair programming is Screen Hero. You can download Screen Hero for Mac or Windows . Create your new user account from within the app.",
- "We have a special chat room for people ready to pair program. Go to our http://freecodecamp.slack.com/messages/letspair and type \"Hello Pair Programmers!\"",
+ "We have a special chat room for people ready to pair program. Go to https://gitter.im/freecodecamp/letspair and type \"Hello Pair Programmers!\"",
"If someone is available, they will be your \"pair\" - the person you pair programming with.",
"If no one gets back to you in the first few minutes, don't worry. There will be lots of opportunities to pair program in the future.",
"If someone does get back to you, private message them and ask for the email address they used to register Screen Hero.",
From d1ad14e5f0ebb5b441a5d4bfb6b9469dbd56d8f9 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 9 Jul 2015 12:48:54 -0700
Subject: [PATCH 024/548] add new notification
---
views/challengeMap/show.jade | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 8a683863b4..1f03deb6a7 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -86,18 +86,17 @@ block content
#announcementModal.modal(tabindex='-1')
.modal-dialog.animated.fadeInUp.fast-animation
.modal-content
- .modal-header.challenge-list-header Share your workspace selfie
+ .modal-header.challenge-list-header Our chat is slow right now
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
- h3.text-left Your workspace selfie should be part of our upcoming mosaic.
- img.img-responsive.img-center(src='https://www.evernote.com/l/Ajm69Uj6uvJLzo7PAj8wGjjbSvGyN0ME-5YB/image.png')
- h3.text-left Take a selfie of you at your workspace with Free Code Camp open.
- h3.text-left Share it on Instagram, Twitter or Facebook with the hashtag #freecodecamp.
+ h3.text-left Please note that Gitter.im, our chat client, is really slow right now.
+ h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
+ h3.text-left Thank you for your patience. In the meantime, happy coding!
a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
script.
$(document).ready(function () {
- if (!localStorage || !localStorage.selfie) {
+ if (!localStorage || !localStorage.gitter) {
$('#announcementModal').modal('show');
- localStorage.selfie = "true";
+ localStorage.gitter = "true";
}
});
From c1e317c09a4b55fe15737d0576d42af68099f244 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 9 Jul 2015 13:12:56 -0700
Subject: [PATCH 025/548] update twitch page with new Saturday Summit link
---
views/resources/twitch.jade | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/views/resources/twitch.jade b/views/resources/twitch.jade
index 1b89b17432..84965fbd17 100644
--- a/views/resources/twitch.jade
+++ b/views/resources/twitch.jade
@@ -31,6 +31,11 @@ block content
.col-xs-12
h2 Here are some of our previous shows (you can full-screen them):
.row.negative-20
+ .col-xs-12.col-sm-12.col-md-6
+ .embed-responsive.embed-responsive-16by9.big-break
+ iframe.embed-responsive-item(src='//www.youtube.com/embed/MxVPmOxRSGA')
+ p.wrappable.negative-30 link:
+ a(href="//www.youtube.com/watch?v=MxVPmOxRSGA") http://www.youtube.com/watch?v=MxVPmOxRSGA
.col-xs-12.col-sm-12.col-md-6
.embed-responsive.embed-responsive-16by9.big-break
iframe.embed-responsive-item(src='//www.youtube.com/embed/Z_43xApGB9Y')
From 9864b762e733ca3a593d484b83474c29cb27f7bf Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 10 Jul 2015 21:09:48 -0700
Subject: [PATCH 026/548] add cities
---
seed_data/field-guides.json | 67 ++++++++++++++++++++++++++++++-------
1 file changed, 54 insertions(+), 13 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index f30b187a81..a89b075e56 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -346,8 +346,9 @@
" ",
" Accra Facebook Gitter ",
" Ahmedabad Facebook Gitter ",
- " Albany Facebook Gitter ",
+ " Aichi Facebook Gitter ",
" Alameda Facebook Gitter ",
+ " Albany Facebook Gitter ",
" Amman Facebook Gitter ",
" Amsterdam Facebook Gitter ",
" Ann Arbor Facebook Gitter ",
@@ -363,28 +364,36 @@
" Bangkok Facebook Gitter ",
" Belem Facebook Gitter ",
" Belgrade Facebook Gitter ",
+ " Belize Facebook Gitter ",
" Bellingham Facebook Gitter ",
" Belo Horizonte Facebook Gitter ",
" Bengaluru Facebook Gitter ",
" Berkeley Facebook Gitter ",
" Berlin Facebook Gitter ",
" Bhaktapur Facebook Gitter ",
+ " Bhubaneswar Facebook Gitter ",
" Bijeljina Facebook Gitter ",
- " Bydgoszcz Facebook Gitter ",
- " Birmingham Facebook Gitter ",
" Birmingham, Alabama Facebook Gitter ",
+ " Birmingham Facebook Gitter ",
+ " Bishkek Facebook Gitter ",
" Bismarck, ND Facebook Gitter ",
+ " Bloomington, IL Facebook Gitter ",
+ " Bloomington, IN Facebook Gitter ",
" Bogota Facebook Gitter ",
+ " Boise Facebook Gitter ",
" Boston Facebook Gitter ",
" Boulder Facebook Gitter ",
" Brasilia Facebook Gitter ",
" Bratislava Facebook Gitter ",
+ " Brighton Facebook Gitter ",
" Brno Facebook Gitter ",
" Brussels Facebook Gitter ",
" Bucaramanga Facebook Gitter ",
- " Buenos Aires Facebook Gitter ",
" Bucharest Facebook Gitter ",
" Budapest Facebook Gitter ",
+ " Buenos Aires Facebook Gitter ",
+ " Bury St Edmunds Facebook Gitter ",
+ " Bydgoszcz Facebook Gitter ",
" Cairo Facebook Gitter ",
" Calgary Facebook Gitter ",
" Campinas Facebook Gitter ",
@@ -401,6 +410,7 @@
" Cleveland Facebook Gitter ",
" Cluj Facebook Gitter ",
" Coimbatore Facebook Gitter ",
+ " Colorado Springs Facebook Gitter ",
" Coventry Facebook Gitter ",
" Cuenca Facebook Gitter ",
" Curitiba Facebook Gitter ",
@@ -420,16 +430,21 @@
" Flagstaff Facebook Gitter ",
" Florianopolis Facebook Gitter ",
" Fort Worth Facebook Gitter ",
+ " Frankfort Facebook Gitter ",
" Frankfurt Facebook Gitter ",
" Freehold Facebook Gitter ",
" Fresno Facebook Gitter ",
" Galveston Facebook Gitter ",
- " Gdynia Facebook Gitter ",
+ " Gdańsk Facebook Gitter ",
+ " Gdynia Facebook Gitter ",
" Geneva Facebook Gitter ",
" Glendora Facebook Gitter ",
- " Guntur Facebook Gitter ",
" Granada Facebook Gitter ",
+ " Guadalajara Facebook Gitter ",
" Guarapuava Facebook Gitter ",
+ " Guntur Facebook Gitter ",
+ " Hagerstown Facebook Gitter ",
+ " Hamburg Facebook Gitter ",
" Hampton Roads Facebook Gitter ",
" Hanoi Facebook Gitter ",
" Hartford Facebook Gitter ",
@@ -437,12 +452,13 @@
" Ho Chi Minh City Facebook Gitter ",
" Hong Kong Facebook Gitter ",
" Houston Facebook Gitter ",
+ " Hove Facebook Gitter ",
" Hyderabad Facebook Gitter ",
- " Istanbul Facebook Gitter ",
- " Indianapolis Facebook Gitter ",
" Iasi Facebook Gitter ",
+ " Indianapolis Facebook Gitter ",
" Irkutsk Facebook Gitter ",
" Islamabad Facebook Gitter ",
+ " Istanbul Facebook Gitter ",
" Ivano Frankivsk Facebook Gitter ",
" Jacksonville Facebook Gitter ",
" Jaipur Facebook Gitter ",
@@ -458,6 +474,8 @@
" Kemerovo Facebook Gitter ",
" Kerch Facebook Gitter ",
" Kiev Facebook Gitter ",
+ " Kingston, ON Facebook Gitter ",
+ " Knoxville Facebook Gitter ",
" Kolkata Facebook Gitter ",
" Krasnodar Facebook Gitter ",
" Kryvyi Rih Facebook Gitter ",
@@ -465,14 +483,18 @@
" La Paz Facebook Gitter ",
" Lagos Facebook Gitter ",
" Lahore Facebook Gitter ",
+ " Las Cruces Facebook Gitter ",
" Leesburg Facebook Gitter ",
" Lehi Facebook Gitter ",
+ " Lexington Facebook Gitter ",
" Lima Facebook Gitter ",
" Limassol Facebook Gitter ",
" Lisbon Facebook Gitter ",
" London Facebook Gitter ",
+ " Los Alamos Facebook Gitter ",
" Los Angeles Facebook Gitter ",
" Lubbock Facebook Gitter ",
+ " Lviv Facebook Gitter ",
" Madrid Facebook Gitter ",
" Manchester, UK Facebook Gitter ",
" Manila Facebook Gitter ",
@@ -486,7 +508,9 @@
" Monterrey Facebook Gitter ",
" Montgomery Facebook Gitter ",
" Montreal Facebook Gitter ",
+ " MorganCity Facebook Gitter ",
" Moscow Facebook Gitter ",
+ " Multan Facebook Gitter ",
" Munich Facebook Gitter ",
" Mysore Facebook Gitter ",
" Nairobi Facebook Gitter ",
@@ -498,6 +522,7 @@
" New York City Facebook Gitter ",
" Nicosia Facebook Gitter ",
" Noida Facebook Gitter ",
+ " Normal Facebook Gitter ",
" North Platte Facebook Gitter ",
" Oakland Facebook Gitter ",
" Oklahoma City Facebook Gitter ",
@@ -509,14 +534,14 @@
" Pasadena Facebook Gitter ",
" Pasto Facebook Gitter ",
" Penang Facebook Gitter ",
+ " Perth Facebook Gitter ",
" Philadelphia Facebook Gitter ",
+ " Phoenix Facebook Gitter ",
" Pittsburgh Facebook Gitter ",
" Poitiers Facebook Gitter ",
- " Porto Facebook Gitter ",
- " Perth Facebook Gitter ",
- " Phoenix Facebook Gitter ",
" Port Harcourt Facebook Gitter ",
" Portland Facebook Gitter ",
+ " Porto Facebook Gitter ",
" Prescott Facebook Gitter ",
" Pristina Facebook Gitter ",
" Providence Facebook Gitter ",
@@ -525,8 +550,11 @@
" Quibdo Facebook Gitter ",
" Raleigh Facebook Gitter ",
" Recife Facebook Gitter ",
+ " Redmond, OR Facebook Gitter ",
+ " Rice Lake Facebook Gitter ",
" Richmond Facebook Gitter ",
" Rio de Janeiro Facebook Gitter ",
+ " Rochester, NY Facebook Gitter ",
" Roma Facebook Gitter ",
" Rotterdam Facebook Gitter ",
" Sacramento Facebook Gitter ",
@@ -543,34 +571,47 @@
" San Luis Obispo Facebook Gitter ",
" Santa Barbara Facebook Gitter ",
" Santa Cruz Facebook Gitter ",
+ " Santo Domingo Facebook Gitter ",
" Sao Paulo Facebook Gitter ",
+ " Savannah Facebook Gitter ",
" Scottsdale Facebook Gitter ",
- " Sedona Facebook Gitter ",
" Seattle Facebook Gitter ",
+ " Sedona Facebook Gitter ",
" Seoul Facebook Gitter ",
" Sidoarjo Facebook Gitter ",
" Singapore Facebook Gitter ",
" Skopje Facebook Gitter ",
" Solo Facebook Gitter ",
+ " Sopot Facebook Gitter ",
" South Bend Facebook Gitter ",
+ " St Cloud Facebook Gitter ",
+ " Struga Facebook Gitter ",
" Stuttgart Facebook Gitter ",
+ " Sydney Facebook Gitter ",
+ " Sydney Facebook Gitter ",
" Taipei Facebook Gitter ",
" Tampa Facebook Gitter ",
+ " Tel Aviv Facebook Gitter ",
" Temecula Facebook Gitter ",
" Tempe Facebook Gitter ",
+ " Tijuana Facebook Gitter ",
" Tirana Facebook Gitter ",
" Toronto Facebook Gitter ",
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
- " Verde Valley Facebook Gitter ",
" Valencia Facebook Gitter ",
" Vancouver Facebook Gitter ",
+ " Verde Valley Facebook Gitter ",
" Victoria Facebook Gitter ",
" Virginia Beach Facebook Gitter ",
" Vitória Facebook Gitter ",
" Washington, DC Facebook Gitter ",
+ " Waterford Facebook Gitter ",
+ " Wichita Facebook Gitter ",
" Winnipeg Facebook Gitter ",
" Yaounde Facebook Gitter ",
+ " Yekaterinburg Facebook Gitter ",
+ " Zagreb Facebook Gitter ",
" Znojmo Facebook Gitter ",
" Zurich Facebook Gitter ",
"
",
From 65e5a715a652ab06d9001d0a85dd45d1e77ecb49 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 10 Jul 2015 21:11:24 -0700
Subject: [PATCH 027/548] comment out modal explaining that gitter is slow
---
views/challengeMap/show.jade | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 1f03deb6a7..70512ed0dd 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,20 +83,20 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- #announcementModal.modal(tabindex='-1')
- .modal-dialog.animated.fadeInUp.fast-animation
- .modal-content
- .modal-header.challenge-list-header Our chat is slow right now
- a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- .modal-body
- h3.text-left Please note that Gitter.im, our chat client, is really slow right now.
- h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
- h3.text-left Thank you for your patience. In the meantime, happy coding!
- a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- script.
- $(document).ready(function () {
- if (!localStorage || !localStorage.gitter) {
- $('#announcementModal').modal('show');
- localStorage.gitter = "true";
- }
- });
+ //#announcementModal.modal(tabindex='-1')
+ // .modal-dialog.animated.fadeInUp.fast-animation
+ // .modal-content
+ // .modal-header.challenge-list-header Our chat is slow right now
+ // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ // .modal-body
+ // h3.text-left Please note that Gitter.im, our chat client, is really slow right now.
+ // h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
+ // h3.text-left Thank you for your patience. In the meantime, happy coding!
+ // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ //script.
+ // $(document).ready(function () {
+ // if (!localStorage || !localStorage.gitter) {
+ // $('#announcementModal').modal('show');
+ // localStorage.gitter = "true";
+ // }
+ // });
From 64dcac01844802f4899d6ae89409efd8a6d003b7 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 11 Jul 2015 16:37:27 -0700
Subject: [PATCH 028/548] update cities
---
seed_data/field-guides.json | 559 +++++++++++++++++++-----------------
1 file changed, 288 insertions(+), 271 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index a89b075e56..51ff146d01 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -344,276 +344,293 @@
" Find your city below and join their Facebook group and Gitter Chat. This is a great way to hang out with other coders, share insights, and pair program. ",
" ",
" ",
- " Accra Facebook Gitter ",
- " Ahmedabad Facebook Gitter ",
- " Aichi Facebook Gitter ",
- " Alameda Facebook Gitter ",
- " Albany Facebook Gitter ",
- " Amman Facebook Gitter ",
- " Amsterdam Facebook Gitter ",
- " Ann Arbor Facebook Gitter ",
- " Apucarana Facebook Gitter ",
- " Aracaju Facebook Gitter ",
- " Asheville Facebook Gitter ",
- " Asuncion Facebook Gitter ",
- " Atlanta Facebook Gitter ",
- " Auckland Facebook Gitter ",
- " Austin Facebook Gitter ",
- " Baltimore Facebook Gitter ",
- " Bandung Facebook Gitter ",
- " Bangkok Facebook Gitter ",
- " Belem Facebook Gitter ",
- " Belgrade Facebook Gitter ",
- " Belize Facebook Gitter ",
- " Bellingham Facebook Gitter ",
- " Belo Horizonte Facebook Gitter ",
- " Bengaluru Facebook Gitter ",
- " Berkeley Facebook Gitter ",
- " Berlin Facebook Gitter ",
- " Bhaktapur Facebook Gitter ",
- " Bhubaneswar Facebook Gitter ",
- " Bijeljina Facebook Gitter ",
- " Birmingham, Alabama Facebook Gitter ",
- " Birmingham Facebook Gitter ",
- " Bishkek Facebook Gitter ",
- " Bismarck, ND Facebook Gitter ",
- " Bloomington, IL Facebook Gitter ",
- " Bloomington, IN Facebook Gitter ",
- " Bogota Facebook Gitter ",
- " Boise Facebook Gitter ",
- " Boston Facebook Gitter ",
- " Boulder Facebook Gitter ",
- " Brasilia Facebook Gitter ",
- " Bratislava Facebook Gitter ",
- " Brighton Facebook Gitter ",
- " Brno Facebook Gitter ",
- " Brussels Facebook Gitter ",
- " Bucaramanga Facebook Gitter ",
- " Bucharest Facebook Gitter ",
- " Budapest Facebook Gitter ",
- " Buenos Aires Facebook Gitter ",
- " Bury St Edmunds Facebook Gitter ",
- " Bydgoszcz Facebook Gitter ",
- " Cairo Facebook Gitter ",
- " Calgary Facebook Gitter ",
- " Campinas Facebook Gitter ",
- " Cape Cod Facebook Gitter ",
- " Cape Town Facebook Gitter ",
- " Caracas Facebook Gitter ",
- " Charlotte Facebook Gitter ",
- " Chattanooga Facebook Gitter ",
- " Chennai Facebook Gitter ",
- " Chiang Mai Facebook Gitter ",
- " Chicago Facebook Gitter ",
- " Cincinnati Facebook Gitter ",
- " Clarksville Facebook Gitter ",
- " Cleveland Facebook Gitter ",
- " Cluj Facebook Gitter ",
- " Coimbatore Facebook Gitter ",
- " Colorado Springs Facebook Gitter ",
- " Coventry Facebook Gitter ",
- " Cuenca Facebook Gitter ",
- " Curitiba Facebook Gitter ",
- " Dallas Facebook Gitter ",
- " Delhi Facebook Gitter ",
- " Denver Facebook Gitter ",
- " Des Moines Facebook Gitter ",
- " Detroit Facebook Gitter ",
- " Dhaka Facebook Gitter ",
- " Dnipropetrovsk Facebook Gitter ",
- " Doha Facebook Gitter ",
- " Dubai Facebook Gitter ",
- " Dublin Facebook Gitter ",
- " Durango Facebook Gitter ",
- " Edmonton Facebook Gitter ",
- " Firenze Facebook Gitter ",
- " Flagstaff Facebook Gitter ",
- " Florianopolis Facebook Gitter ",
- " Fort Worth Facebook Gitter ",
- " Frankfort Facebook Gitter ",
- " Frankfurt Facebook Gitter ",
- " Freehold Facebook Gitter ",
- " Fresno Facebook Gitter ",
- " Galveston Facebook Gitter ",
- " Gdańsk Facebook Gitter ",
- " Gdynia Facebook Gitter ",
- " Geneva Facebook Gitter ",
- " Glendora Facebook Gitter ",
- " Granada Facebook Gitter ",
- " Guadalajara Facebook Gitter ",
- " Guarapuava Facebook Gitter ",
- " Guntur Facebook Gitter ",
- " Hagerstown Facebook Gitter ",
- " Hamburg Facebook Gitter ",
- " Hampton Roads Facebook Gitter ",
- " Hanoi Facebook Gitter ",
- " Hartford Facebook Gitter ",
- " Hermosillo Facebook Gitter ",
- " Ho Chi Minh City Facebook Gitter ",
- " Hong Kong Facebook Gitter ",
- " Houston Facebook Gitter ",
- " Hove Facebook Gitter ",
- " Hyderabad Facebook Gitter ",
- " Iasi Facebook Gitter ",
- " Indianapolis Facebook Gitter ",
- " Irkutsk Facebook Gitter ",
- " Islamabad Facebook Gitter ",
- " Istanbul Facebook Gitter ",
- " Ivano Frankivsk Facebook Gitter ",
- " Jacksonville Facebook Gitter ",
- " Jaipur Facebook Gitter ",
- " Jakarta Facebook Gitter ",
- " Joao Pessoa Facebook Gitter ",
- " Johannesburg Facebook Gitter ",
- " Kaduna Facebook Gitter ",
- " Kalamazoo Facebook Gitter ",
- " Kampala Facebook Gitter ",
- " Kansas City Facebook Gitter ",
- " Karachi Facebook Gitter ",
- " Kathmandu Facebook Gitter ",
- " Kemerovo Facebook Gitter ",
- " Kerch Facebook Gitter ",
- " Kiev Facebook Gitter ",
- " Kingston, ON Facebook Gitter ",
- " Knoxville Facebook Gitter ",
- " Kolkata Facebook Gitter ",
- " Krasnodar Facebook Gitter ",
- " Kryvyi Rih Facebook Gitter ",
- " La Crosse Facebook Gitter ",
- " La Paz Facebook Gitter ",
- " Lagos Facebook Gitter ",
- " Lahore Facebook Gitter ",
- " Las Cruces Facebook Gitter ",
- " Leesburg Facebook Gitter ",
- " Lehi Facebook Gitter ",
- " Lexington Facebook Gitter ",
- " Lima Facebook Gitter ",
- " Limassol Facebook Gitter ",
- " Lisbon Facebook Gitter ",
- " London Facebook Gitter ",
- " Los Alamos Facebook Gitter ",
- " Los Angeles Facebook Gitter ",
- " Lubbock Facebook Gitter ",
- " Lviv Facebook Gitter ",
- " Madrid Facebook Gitter ",
- " Manchester, UK Facebook Gitter ",
- " Manila Facebook Gitter ",
- " Melbourne Facebook Gitter ",
- " Mexico City Facebook Gitter ",
- " Miami Facebook Gitter ",
- " Milwaukee Facebook Gitter ",
- " Minneapolis Facebook Gitter ",
- " Mississippi Gulf Coast Facebook Gitter ",
- " Missoula Facebook Gitter ",
- " Monterrey Facebook Gitter ",
- " Montgomery Facebook Gitter ",
- " Montreal Facebook Gitter ",
- " MorganCity Facebook Gitter ",
- " Moscow Facebook Gitter ",
- " Multan Facebook Gitter ",
- " Munich Facebook Gitter ",
- " Mysore Facebook Gitter ",
- " Nairobi Facebook Gitter ",
- " Nashik Facebook Gitter ",
- " Nashville Facebook Gitter ",
- " New Haven Facebook Gitter ",
- " New Orleans Facebook Gitter ",
- " New Paltz Facebook Gitter ",
- " New York City Facebook Gitter ",
- " Nicosia Facebook Gitter ",
- " Noida Facebook Gitter ",
- " Normal Facebook Gitter ",
- " North Platte Facebook Gitter ",
- " Oakland Facebook Gitter ",
- " Oklahoma City Facebook Gitter ",
- " Omaha Facebook Gitter ",
- " Orange County Facebook Gitter ",
- " Orlando Facebook Gitter ",
- " Parana Facebook Gitter ",
- " Paris Facebook Gitter ",
- " Pasadena Facebook Gitter ",
- " Pasto Facebook Gitter ",
- " Penang Facebook Gitter ",
- " Perth Facebook Gitter ",
- " Philadelphia Facebook Gitter ",
- " Phoenix Facebook Gitter ",
- " Pittsburgh Facebook Gitter ",
- " Poitiers Facebook Gitter ",
- " Port Harcourt Facebook Gitter ",
- " Portland Facebook Gitter ",
- " Porto Facebook Gitter ",
- " Prescott Facebook Gitter ",
- " Pristina Facebook Gitter ",
- " Providence Facebook Gitter ",
- " Provo Facebook Gitter ",
- " Pune Facebook Gitter ",
- " Quibdo Facebook Gitter ",
- " Raleigh Facebook Gitter ",
- " Recife Facebook Gitter ",
- " Redmond, OR Facebook Gitter ",
- " Rice Lake Facebook Gitter ",
- " Richmond Facebook Gitter ",
- " Rio de Janeiro Facebook Gitter ",
- " Rochester, NY Facebook Gitter ",
- " Roma Facebook Gitter ",
- " Rotterdam Facebook Gitter ",
- " Sacramento Facebook Gitter ",
- " Saint George Facebook Gitter ",
- " Saint Louis Facebook Gitter ",
- " Saint Paul Facebook Gitter ",
- " Salamanca Facebook Gitter ",
- " Salt Lake City Facebook Gitter ",
- " Salvador Facebook Gitter ",
- " San Bernardino Facebook Gitter ",
- " San Diego Facebook Gitter ",
- " San Francisco Facebook Gitter ",
- " San Jose Facebook Gitter ",
- " San Luis Obispo Facebook Gitter ",
- " Santa Barbara Facebook Gitter ",
- " Santa Cruz Facebook Gitter ",
- " Santo Domingo Facebook Gitter ",
- " Sao Paulo Facebook Gitter ",
- " Savannah Facebook Gitter ",
- " Scottsdale Facebook Gitter ",
- " Seattle Facebook Gitter ",
- " Sedona Facebook Gitter ",
- " Seoul Facebook Gitter ",
- " Sidoarjo Facebook Gitter ",
- " Singapore Facebook Gitter ",
- " Skopje Facebook Gitter ",
- " Solo Facebook Gitter ",
- " Sopot Facebook Gitter ",
- " South Bend Facebook Gitter ",
- " St Cloud Facebook Gitter ",
- " Struga Facebook Gitter ",
- " Stuttgart Facebook Gitter ",
- " Sydney Facebook Gitter ",
- " Sydney Facebook Gitter ",
- " Taipei Facebook Gitter ",
- " Tampa Facebook Gitter ",
- " Tel Aviv Facebook Gitter ",
- " Temecula Facebook Gitter ",
- " Tempe Facebook Gitter ",
- " Tijuana Facebook Gitter ",
- " Tirana Facebook Gitter ",
- " Toronto Facebook Gitter ",
- " Tucson Facebook Gitter ",
- " Tulsa Facebook Gitter ",
- " Valencia Facebook Gitter ",
- " Vancouver Facebook Gitter ",
- " Verde Valley Facebook Gitter ",
- " Victoria Facebook Gitter ",
- " Virginia Beach Facebook Gitter ",
- " Vitória Facebook Gitter ",
- " Washington, DC Facebook Gitter ",
- " Waterford Facebook Gitter ",
- " Wichita Facebook Gitter ",
- " Winnipeg Facebook Gitter ",
- " Yaounde Facebook Gitter ",
- " Yekaterinburg Facebook Gitter ",
- " Zagreb Facebook Gitter ",
- " Znojmo Facebook Gitter ",
- " Zurich Facebook Gitter ",
+ " Accra Facebook Gitter ",
+ " Adelaide Facebook Gitter ",
+ " Ahmedabad Facebook Gitter ",
+ " Aichi Facebook Gitter ",
+ " Alameda Facebook Gitter ",
+ " Albany Facebook Gitter ",
+ " Amman Facebook Gitter ",
+ " Amsterdam Facebook Gitter ",
+ " Ankara Facebook Gitter ",
+ " Ann Arbor Facebook Gitter ",
+ " Apucarana Facebook Gitter ",
+ " Aracaju Facebook Gitter ",
+ " Asheville Facebook Gitter ",
+ " Asuncion Facebook Gitter ",
+ " Atlanta Facebook Gitter ",
+ " Auckland Facebook Gitter ",
+ " Austin Facebook Gitter ",
+ " Baltimore Facebook Gitter ",
+ " Bandung Facebook Gitter ",
+ " Bangkok Facebook Gitter ",
+ " Belem Facebook Gitter ",
+ " Belgrade Facebook Gitter ",
+ " Belize Facebook Gitter ",
+ " Bellingham Facebook Gitter ",
+ " Belo Horizonte Facebook Gitter ",
+ " Bengaluru Facebook Gitter ",
+ " Berkeley Facebook Gitter ",
+ " Berlin Facebook Gitter ",
+ " Bhaktapur Facebook Gitter ",
+ " Bhubaneswar Facebook Gitter ",
+ " Bijeljina Facebook Gitter ",
+ " Birmingham, Alabama Facebook Gitter ",
+ " Birmingham Facebook Gitter ",
+ " Bishkek Facebook Gitter ",
+ " Bismarck, ND Facebook Gitter ",
+ " Bloomington, IL Facebook Gitter ",
+ " Bloomington, IN Facebook Gitter ",
+ " Bogota Facebook Gitter ",
+ " Boise Facebook Gitter ",
+ " Boston Facebook Gitter ",
+ " Boulder Facebook Gitter ",
+ " Brasilia Facebook Gitter ",
+ " Bratislava Facebook Gitter ",
+ " Brighton Facebook Gitter ",
+ " Brno Facebook Gitter ",
+ " Brussels Facebook Gitter ",
+ " Bucaramanga Facebook Gitter ",
+ " Bucharest Facebook Gitter ",
+ " Budapest Facebook Gitter ",
+ " Buenos Aires Facebook Gitter ",
+ " Bury St Edmunds Facebook Gitter ",
+ " Bydgoszcz Facebook Gitter ",
+ " Cairo Facebook Gitter ",
+ " Calgary Facebook Gitter ",
+ " Campinas Facebook Gitter ",
+ " Cape Cod Facebook Gitter ",
+ " Cape Town Facebook Gitter ",
+ " Caracas Facebook Gitter ",
+ " Charlotte Facebook Gitter ",
+ " Chattanooga Facebook Gitter ",
+ " Chennai Facebook Gitter ",
+ " Chiang Mai Facebook Gitter ",
+ " Chicago Facebook Gitter ",
+ " Christchurch Facebook Gitter ",
+ " Cincinnati Facebook Gitter ",
+ " Clarksville Facebook Gitter ",
+ " Cleveland Facebook Gitter ",
+ " Cluj Facebook Gitter ",
+ " Coimbatore Facebook Gitter ",
+ " Colorado Springs Facebook Gitter ",
+ " Coventry Facebook Gitter ",
+ " Cuenca Facebook Gitter ",
+ " Curitiba Facebook Gitter ",
+ " Dallas Facebook Gitter ",
+ " Delhi Facebook Gitter ",
+ " Denver Facebook Gitter ",
+ " Derby Facebook Gitter ",
+ " Des Moines Facebook Gitter ",
+ " Detroit Facebook Gitter ",
+ " Dhaka Facebook Gitter ",
+ " Dnipropetrovsk Facebook Gitter ",
+ " Doha Facebook Gitter ",
+ " Dubai Facebook Gitter ",
+ " Dublin Facebook Gitter ",
+ " Durango Facebook Gitter ",
+ " Edmonton Facebook Gitter ",
+ " Firenze Facebook Gitter ",
+ " Flagstaff Facebook Gitter ",
+ " Florianopolis Facebook Gitter ",
+ " Fort Worth Facebook Gitter ",
+ " Frankfort Facebook Gitter ",
+ " Frankfurt Facebook Gitter ",
+ " Freehold Facebook Gitter ",
+ " Fresno Facebook Gitter ",
+ " Gainesville, FL Facebook Gitter ",
+ " Galveston Facebook Gitter ",
+ " Gdańsk Facebook Gitter ",
+ " Gdynia Facebook Gitter ",
+ " Geneva Facebook Gitter ",
+ " Glendora Facebook Gitter ",
+ " Granada Facebook Gitter ",
+ " Guadalajara Facebook Gitter ",
+ " Guarapuava Facebook Gitter ",
+ " Guntur Facebook Gitter ",
+ " Hagerstown Facebook Gitter ",
+ " Haifa Facebook Gitter ",
+ " Hamburg Facebook Gitter ",
+ " Hampton Roads Facebook Gitter ",
+ " Hanoi Facebook Gitter ",
+ " Hartford Facebook Gitter ",
+ " Hermosillo Facebook Gitter ",
+ " Hickory Facebook Gitter ",
+ " Ho Chi Minh City Facebook Gitter ",
+ " Hong Kong Facebook Gitter ",
+ " Houston Facebook Gitter ",
+ " Hove Facebook Gitter ",
+ " Hyderabad Facebook Gitter ",
+ " Iasi Facebook Gitter ",
+ " Indianapolis Facebook Gitter ",
+ " Irkutsk Facebook Gitter ",
+ " Islamabad Facebook Gitter ",
+ " Istanbul Facebook Gitter ",
+ " Ivano Frankivsk Facebook Gitter ",
+ " Jacksonville Facebook Gitter ",
+ " Jaipur Facebook Gitter ",
+ " Jakarta Facebook Gitter ",
+ " Joao Pessoa Facebook Gitter ",
+ " Johannesburg Facebook Gitter ",
+ " Kaduna Facebook Gitter ",
+ " Kalamazoo Facebook Gitter ",
+ " Kampala Facebook Gitter ",
+ " Kansas City Facebook Gitter ",
+ " Karachi Facebook Gitter ",
+ " Kathmandu Facebook Gitter ",
+ " Kemerovo Facebook Gitter ",
+ " Kerch Facebook Gitter ",
+ " Kiev Facebook Gitter ",
+ " Kingston, ON Facebook Gitter ",
+ " Knoxville Facebook Gitter ",
+ " Kolkata Facebook Gitter ",
+ " Krasnodar Facebook Gitter ",
+ " Kryvyi Rih Facebook Gitter ",
+ " La Crosse Facebook Gitter ",
+ " La Paz Facebook Gitter ",
+ " Lagos Facebook Gitter ",
+ " Lahore Facebook Gitter ",
+ " Las Cruces Facebook Gitter ",
+ " Leesburg Facebook Gitter ",
+ " Leesville Facebook Gitter ",
+ " Lehi Facebook Gitter ",
+ " Lexington Facebook Gitter ",
+ " Lima Facebook Gitter ",
+ " Limassol Facebook Gitter ",
+ " Lindsay Facebook Gitter ",
+ " Lisbon Facebook Gitter ",
+ " London Facebook Gitter ",
+ " Los Alamos Facebook Gitter ",
+ " Los Angeles Facebook Gitter ",
+ " Lubbock Facebook Gitter ",
+ " Lviv Facebook Gitter ",
+ " Madison Facebook Gitter ",
+ " Madrid Facebook Gitter ",
+ " Manchester, UK Facebook Gitter ",
+ " Manila Facebook Gitter ",
+ " Melbourne Facebook Gitter ",
+ " Mexico City Facebook Gitter ",
+ " Miami Facebook Gitter ",
+ " Milwaukee Facebook Gitter ",
+ " Minneapolis Facebook Gitter ",
+ " Minsk Facebook Gitter ",
+ " Mississippi Gulf Coast Facebook Gitter ",
+ " Missoula Facebook Gitter ",
+ " Monterrey Facebook Gitter ",
+ " Montgomery Facebook Gitter ",
+ " Montreal Facebook Gitter ",
+ " Moosejaw Facebook Gitter ",
+ " MorganCity Facebook Gitter ",
+ " Moscow Facebook Gitter ",
+ " Multan Facebook Gitter ",
+ " Munich Facebook Gitter ",
+ " Mysore Facebook Gitter ",
+ " Nairobi Facebook Gitter ",
+ " Nashik Facebook Gitter ",
+ " Nashville Facebook Gitter ",
+ " New Haven Facebook Gitter ",
+ " New Orleans Facebook Gitter ",
+ " New Paltz Facebook Gitter ",
+ " New York City Facebook Gitter ",
+ " Nicosia Facebook Gitter ",
+ " Noida Facebook Gitter ",
+ " Normal Facebook Gitter ",
+ " North Platte Facebook Gitter ",
+ " Oakland Facebook Gitter ",
+ " Oklahoma City Facebook Gitter ",
+ " Omaha Facebook Gitter ",
+ " Orange County Facebook Gitter ",
+ " Orlando Facebook Gitter ",
+ " Parana Facebook Gitter ",
+ " Paris Facebook Gitter ",
+ " Pasadena Facebook Gitter ",
+ " Pasto Facebook Gitter ",
+ " Penang Facebook Gitter ",
+ " Perth Facebook Gitter ",
+ " Perugia Facebook Gitter ",
+ " Philadelphia Facebook Gitter ",
+ " Phoenix Facebook Gitter ",
+ " Pittsburgh Facebook Gitter ",
+ " Poitiers Facebook Gitter ",
+ " Port Harcourt Facebook Gitter ",
+ " Portland Facebook Gitter ",
+ " Porto Facebook Gitter ",
+ " Prescott Facebook Gitter ",
+ " Pristina Facebook Gitter ",
+ " Providence Facebook Gitter ",
+ " Provo Facebook Gitter ",
+ " Pune Facebook Gitter ",
+ " Quibdo Facebook Gitter ",
+ " Raleigh Facebook Gitter ",
+ " Ranchi Facebook Gitter ",
+ " Recife Facebook Gitter ",
+ " Redmond, OR Facebook Gitter ",
+ " Rice Lake Facebook Gitter ",
+ " Richmond Facebook Gitter ",
+ " Rio de Janeiro Facebook Gitter ",
+ " Rochester, NY Facebook Gitter ",
+ " Roma Facebook Gitter ",
+ " Rotterdam Facebook Gitter ",
+ " Sacramento Facebook Gitter ",
+ " Saint George Facebook Gitter ",
+ " Saint Louis Facebook Gitter ",
+ " Saint Paul Facebook Gitter ",
+ " Salamanca Facebook Gitter ",
+ " Salt Lake City Facebook Gitter ",
+ " Salvador Facebook Gitter ",
+ " San Bernardino Facebook Gitter ",
+ " San Diego Facebook Gitter ",
+ " San Francisco Facebook Gitter ",
+ " San Jose Facebook Gitter ",
+ " San Luis Obispo Facebook Gitter ",
+ " Santa Barbara Facebook Gitter ",
+ " Santa Cruz Facebook Gitter ",
+ " Santo Domingo Facebook Gitter ",
+ " Sao Paulo Facebook Gitter ",
+ " Savannah Facebook Gitter ",
+ " Scottsdale Facebook Gitter ",
+ " Seattle Facebook Gitter ",
+ " Sedona Facebook Gitter ",
+ " Seoul Facebook Gitter ",
+ " Sheffield Facebook Gitter ",
+ " Sidoarjo Facebook Gitter ",
+ " Singapore Facebook Gitter ",
+ " Skopje Facebook Gitter ",
+ " Solo Facebook Gitter ",
+ " Sopot Facebook Gitter ",
+ " South Bend Facebook Gitter ",
+ " St Cloud Facebook Gitter ",
+ " Struga Facebook Gitter ",
+ " Stuttgart Facebook Gitter ",
+ " Sydney Facebook Gitter ",
+ " Taipei Facebook Gitter ",
+ " Tampa Facebook Gitter ",
+ " Tel Aviv Facebook Gitter ",
+ " Temecula Facebook Gitter ",
+ " Tempe Facebook Gitter ",
+ " Tijuana Facebook Gitter ",
+ " Tirana Facebook Gitter ",
+ " Torino Facebook Gitter ",
+ " Toronto Facebook Gitter ",
+ " Tucson Facebook Gitter ",
+ " Tulsa Facebook Gitter ",
+ " Valencia Facebook Gitter ",
+ " Vancouver Facebook Gitter ",
+ " Verde Valley Facebook Gitter ",
+ " Victoria Facebook Gitter ",
+ " Vilnius Facebook Gitter ",
+ " Virginia Beach Facebook Gitter ",
+ " Vitória Facebook Gitter ",
+ " Washington, DC Facebook Gitter ",
+ " Waterford Facebook Gitter ",
+ " Wichita Facebook Gitter ",
+ " Winnipeg Facebook Gitter ",
+ " Yaounde Facebook Gitter ",
+ " Yekaterinburg Facebook Gitter ",
+ " Yerevan Facebook Gitter ",
+ " Zagreb Facebook Gitter ",
+ " Znojmo Facebook Gitter ",
+ " Zurich Facebook Gitter ",
"
",
" ",
" If you didn't see your city on this list, you should create your own Facebook group for your city. Please follow these steps: ",
@@ -756,7 +773,7 @@
" ",
"
",
" We'll wait until there are two campers who have chosen the same project and look like they're a good match for one another based on the factors mentioned above. ",
- " We'll call the stakeholder to confirm once again that he or she agrees with our terms and has signed our Nonprofit Project Stakeholder Pledge . ",
+ " We'll call the stakeholder to confirm once again that he or she agrees with our terms and has signed our Nonprofit Project Stakeholder Pledge . ",
" We'll set an initial meeting with representatives from Free Code Camp, the two campers, and the stakeholder. ",
" If the stakeholder and both campers shows up promptly, and seem enthusiastic and professional, we'll start the project. ",
" ",
From 875dc2d3d544baf1c62489285535841a984ee5f9 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 11 Jul 2015 22:30:37 -0700
Subject: [PATCH 029/548] update Tampa to Tampa Bay
---
seed_data/field-guides.json | 62 ++++++++++++++++++-------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 51ff146d01..9120ab73c6 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -455,7 +455,7 @@
" Hanoi Facebook Gitter ",
" Hartford Facebook Gitter ",
" Hermosillo Facebook Gitter ",
- " Hickory Facebook Gitter ",
+ " Hickory Facebook Gitter ",
" Ho Chi Minh City Facebook Gitter ",
" Hong Kong Facebook Gitter ",
" Houston Facebook Gitter ",
@@ -599,38 +599,38 @@
" Solo Facebook Gitter ",
" Sopot Facebook Gitter ",
" South Bend Facebook Gitter ",
- " St Cloud Facebook Gitter ",
- " Struga Facebook Gitter ",
- " Stuttgart Facebook Gitter ",
- " Sydney Facebook Gitter ",
- " Taipei Facebook Gitter ",
- " Tampa Facebook Gitter ",
- " Tel Aviv Facebook Gitter ",
- " Temecula Facebook Gitter ",
+ " St Cloud Facebook Gitter ",
+ " Struga Facebook Gitter ",
+ " Stuttgart Facebook Gitter ",
+ " Sydney Facebook Gitter ",
+ " Taipei Facebook Gitter ",
+ " Tampa Bay Facebook Gitter ",
+ " Tel Aviv Facebook Gitter ",
+ " Temecula Facebook Gitter ",
" Tempe Facebook Gitter ",
- " Tijuana Facebook Gitter ",
- " Tirana Facebook Gitter ",
- " Torino Facebook Gitter ",
- " Toronto Facebook Gitter ",
- " Tucson Facebook Gitter ",
- " Tulsa Facebook Gitter ",
- " Valencia Facebook Gitter ",
- " Vancouver Facebook Gitter ",
- " Verde Valley Facebook Gitter ",
- " Victoria Facebook Gitter ",
- " Vilnius Facebook Gitter ",
- " Virginia Beach Facebook Gitter ",
- " Vitória Facebook Gitter ",
- " Washington, DC Facebook Gitter ",
- " Waterford Facebook Gitter ",
- " Wichita Facebook Gitter ",
- " Winnipeg Facebook Gitter ",
- " Yaounde Facebook Gitter ",
- " Yekaterinburg Facebook Gitter ",
- " Yerevan Facebook Gitter ",
+ " Tijuana Facebook Gitter ",
+ " Tirana Facebook Gitter ",
+ " Torino Facebook Gitter ",
+ " Toronto Facebook Gitter ",
+ " Tucson Facebook Gitter ",
+ " Tulsa Facebook Gitter ",
+ " Valencia Facebook Gitter ",
+ " Vancouver Facebook Gitter ",
+ " Verde Valley Facebook Gitter ",
+ " Victoria Facebook Gitter ",
+ " Vilnius Facebook Gitter ",
+ " Virginia Beach Facebook Gitter ",
+ " Vitória Facebook Gitter ",
+ " Washington, DC Facebook Gitter ",
+ " Waterford Facebook Gitter ",
+ " Wichita Facebook Gitter ",
+ " Winnipeg Facebook Gitter ",
+ " Yaounde Facebook Gitter ",
+ " Yekaterinburg Facebook Gitter ",
+ " Yerevan Facebook Gitter ",
" Zagreb Facebook Gitter ",
- " Znojmo Facebook Gitter ",
- " Zurich Facebook Gitter ",
+ " Znojmo Facebook Gitter ",
+ " Zurich Facebook Gitter ",
" ",
" ",
" If you didn't see your city on this list, you should create your own Facebook group for your city. Please follow these steps: ",
From d759fe4046ef961f69bbd57c25c3587317b830aa Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 12 Jul 2015 14:32:32 -0700
Subject: [PATCH 030/548] update cities
---
seed_data/field-guides.json | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 9120ab73c6..fbaaac9225 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -438,6 +438,7 @@
" Frankfurt Facebook Gitter ",
" Freehold Facebook Gitter ",
" Fresno Facebook Gitter ",
+ " Fuengirola Facebook Gitter ",
" Gainesville, FL Facebook Gitter ",
" Galveston Facebook Gitter ",
" Gdańsk Facebook Gitter ",
@@ -483,9 +484,11 @@
" Kiev Facebook Gitter ",
" Kingston, ON Facebook Gitter ",
" Knoxville Facebook Gitter ",
+ " Koeln Facebook Gitter ",
" Kolkata Facebook Gitter ",
" Krasnodar Facebook Gitter ",
" Kryvyi Rih Facebook Gitter ",
+ " Kuala Lumpur Facebook Gitter ",
" La Crosse Facebook Gitter ",
" La Paz Facebook Gitter ",
" Lagos Facebook Gitter ",
@@ -531,6 +534,7 @@
" New Haven Facebook Gitter ",
" New Orleans Facebook Gitter ",
" New Paltz Facebook Gitter ",
+ " New Westminster Facebook Gitter ",
" New York City Facebook Gitter ",
" Nicosia Facebook Gitter ",
" Noida Facebook Gitter ",
@@ -582,6 +586,7 @@
" San Diego Facebook Gitter ",
" San Francisco Facebook Gitter ",
" San Jose Facebook Gitter ",
+ " San Juan Facebook Gitter ",
" San Luis Obispo Facebook Gitter ",
" Santa Barbara Facebook Gitter ",
" Santa Cruz Facebook Gitter ",
@@ -594,6 +599,7 @@
" Seoul Facebook Gitter ",
" Sheffield Facebook Gitter ",
" Sidoarjo Facebook Gitter ",
+ " Sierra Vista Facebook Gitter ",
" Singapore Facebook Gitter ",
" Skopje Facebook Gitter ",
" Solo Facebook Gitter ",
@@ -602,7 +608,7 @@
" St Cloud Facebook Gitter ",
" Struga Facebook Gitter ",
" Stuttgart Facebook Gitter ",
- " Sydney Facebook Gitter ",
+ " Sydney Facebook Gitter ",
" Taipei Facebook Gitter ",
" Tampa Bay Facebook Gitter ",
" Tel Aviv Facebook Gitter ",
@@ -1088,4 +1094,4 @@
""
]
}
-]
+]
\ No newline at end of file
From d61ddd7096329868de978dfb8deee5b3663072dc Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 14 Jul 2015 00:38:24 -0700
Subject: [PATCH 031/548] update cities
---
seed_data/field-guides.json | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index fbaaac9225..836fbdb2cc 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -344,6 +344,7 @@
" Find your city below and join their Facebook group and Gitter Chat. This is a great way to hang out with other coders, share insights, and pair program. ",
" ",
" ",
+ " Abu Dhabi Facebook Gitter ",
" Accra Facebook Gitter ",
" Adelaide Facebook Gitter ",
" Ahmedabad Facebook Gitter ",
@@ -364,8 +365,10 @@
" Baltimore Facebook Gitter ",
" Bandung Facebook Gitter ",
" Bangkok Facebook Gitter ",
+ " Beirut Facebook Gitter ",
" Belem Facebook Gitter ",
" Belgrade Facebook Gitter ",
+ " Belize City Facebook Gitter ",
" Belize Facebook Gitter ",
" Bellingham Facebook Gitter ",
" Belo Horizonte Facebook Gitter ",
@@ -413,6 +416,7 @@
" Cleveland Facebook Gitter ",
" Cluj Facebook Gitter ",
" Coimbatore Facebook Gitter ",
+ " Colombo Facebook Gitter ",
" Colorado Springs Facebook Gitter ",
" Coventry Facebook Gitter ",
" Cuenca Facebook Gitter ",
@@ -448,6 +452,7 @@
" Granada Facebook Gitter ",
" Guadalajara Facebook Gitter ",
" Guarapuava Facebook Gitter ",
+ " Guatemala City Facebook Gitter ",
" Guntur Facebook Gitter ",
" Hagerstown Facebook Gitter ",
" Haifa Facebook Gitter ",
@@ -471,6 +476,7 @@
" Jacksonville Facebook Gitter ",
" Jaipur Facebook Gitter ",
" Jakarta Facebook Gitter ",
+ " Jamnagar Facebook Gitter ",
" Joao Pessoa Facebook Gitter ",
" Johannesburg Facebook Gitter ",
" Kaduna Facebook Gitter ",
@@ -519,6 +525,7 @@
" Minsk Facebook Gitter ",
" Mississippi Gulf Coast Facebook Gitter ",
" Missoula Facebook Gitter ",
+ " Modesto Facebook Gitter ",
" Monterrey Facebook Gitter ",
" Montgomery Facebook Gitter ",
" Montreal Facebook Gitter ",
@@ -529,6 +536,7 @@
" Munich Facebook Gitter ",
" Mysore Facebook Gitter ",
" Nairobi Facebook Gitter ",
+ " Napoli Facebook Gitter ",
" Nashik Facebook Gitter ",
" Nashville Facebook Gitter ",
" New Haven Facebook Gitter ",
@@ -582,6 +590,7 @@
" Salamanca Facebook Gitter ",
" Salt Lake City Facebook Gitter ",
" Salvador Facebook Gitter ",
+ " San Antonio Facebook Gitter ",
" San Bernardino Facebook Gitter ",
" San Diego Facebook Gitter ",
" San Francisco Facebook Gitter ",
@@ -616,10 +625,12 @@
" Tempe Facebook Gitter ",
" Tijuana Facebook Gitter ",
" Tirana Facebook Gitter ",
+ " Tom's River Facebook Gitter ",
" Torino Facebook Gitter ",
" Toronto Facebook Gitter ",
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
+ " Valdosta Facebook Gitter ",
" Valencia Facebook Gitter ",
" Vancouver Facebook Gitter ",
" Verde Valley Facebook Gitter ",
@@ -631,6 +642,7 @@
" Waterford Facebook Gitter ",
" Wichita Facebook Gitter ",
" Winnipeg Facebook Gitter ",
+ " Wuerzburg Facebook Gitter ",
" Yaounde Facebook Gitter ",
" Yekaterinburg Facebook Gitter ",
" Yerevan Facebook Gitter ",
From e2c28ca5074447c166263ad5b10ddebc3b29190a Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 14 Jul 2015 22:48:13 -0700
Subject: [PATCH 032/548] update cities and language rooms
---
seed_data/field-guides.json | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 836fbdb2cc..605d199cdb 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -290,12 +290,17 @@
" ",
" Arabic ",
" Chinese ",
- " Dutch ",
- " French ",
" German ",
+ " Dutch ",
+ " Spanish ",
+ " French ",
+ " Japanese ",
+ " Korean ",
+ " Persian ",
" Portugues ",
" Russian ",
- " Spanish ",
+ " Thai ",
+ " Vietnamese ",
" ",
" ",
" If you think we should add a chat room, please message @quincylarson in Gitter.
",
@@ -359,6 +364,7 @@
" Aracaju Facebook Gitter ",
" Asheville Facebook Gitter ",
" Asuncion Facebook Gitter ",
+ " Athens Facebook Gitter ",
" Atlanta Facebook Gitter ",
" Auckland Facebook Gitter ",
" Austin Facebook Gitter ",
@@ -401,6 +407,7 @@
" Bydgoszcz Facebook Gitter ",
" Cairo Facebook Gitter ",
" Calgary Facebook Gitter ",
+ " Cali Facebook Gitter ",
" Campinas Facebook Gitter ",
" Cape Cod Facebook Gitter ",
" Cape Town Facebook Gitter ",
@@ -473,6 +480,7 @@
" Islamabad Facebook Gitter ",
" Istanbul Facebook Gitter ",
" Ivano Frankivsk Facebook Gitter ",
+ " Izmir Facebook Gitter ",
" Jacksonville Facebook Gitter ",
" Jaipur Facebook Gitter ",
" Jakarta Facebook Gitter ",
@@ -553,6 +561,7 @@
" Omaha Facebook Gitter ",
" Orange County Facebook Gitter ",
" Orlando Facebook Gitter ",
+ " Panama City Facebook Gitter ",
" Parana Facebook Gitter ",
" Paris Facebook Gitter ",
" Pasadena Facebook Gitter ",
@@ -619,12 +628,14 @@
" Stuttgart Facebook Gitter ",
" Sydney Facebook Gitter ",
" Taipei Facebook Gitter ",
+ " Tallahassee Facebook Gitter ",
" Tampa Bay Facebook Gitter ",
" Tel Aviv Facebook Gitter ",
" Temecula Facebook Gitter ",
" Tempe Facebook Gitter ",
" Tijuana Facebook Gitter ",
" Tirana Facebook Gitter ",
+ " Tokyo Facebook Gitter ",
" Tom's River Facebook Gitter ",
" Torino Facebook Gitter ",
" Toronto Facebook Gitter ",
@@ -638,6 +649,7 @@
" Vilnius Facebook Gitter ",
" Virginia Beach Facebook Gitter ",
" Vitória Facebook Gitter ",
+ " Warsaw Facebook Gitter ",
" Washington, DC Facebook Gitter ",
" Waterford Facebook Gitter ",
" Wichita Facebook Gitter ",
From 3dbcb561e43de9ed08806edc47208b669b7870b1 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 14 Jul 2015 23:50:14 -0700
Subject: [PATCH 033/548] add cities, remove jobs from navbar for now
---
seed_data/field-guides.json | 12 +++++++++++-
views/partials/navbar.jade | 2 --
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 605d199cdb..8576d6ee6a 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -371,6 +371,7 @@
" Baltimore Facebook Gitter ",
" Bandung Facebook Gitter ",
" Bangkok Facebook Gitter ",
+ " Barcelona Facebook Gitter ",
" Beirut Facebook Gitter ",
" Belem Facebook Gitter ",
" Belgrade Facebook Gitter ",
@@ -441,9 +442,11 @@
" Dublin Facebook Gitter ",
" Durango Facebook Gitter ",
" Edmonton Facebook Gitter ",
+ " Evansville Facebook Gitter ",
" Firenze Facebook Gitter ",
" Flagstaff Facebook Gitter ",
" Florianopolis Facebook Gitter ",
+ " Fort Collins Facebook Gitter ",
" Fort Worth Facebook Gitter ",
" Frankfort Facebook Gitter ",
" Frankfurt Facebook Gitter ",
@@ -457,6 +460,7 @@
" Geneva Facebook Gitter ",
" Glendora Facebook Gitter ",
" Granada Facebook Gitter ",
+ " Grand Rapids Facebook Gitter ",
" Guadalajara Facebook Gitter ",
" Guarapuava Facebook Gitter ",
" Guatemala City Facebook Gitter ",
@@ -555,13 +559,14 @@
" Nicosia Facebook Gitter ",
" Noida Facebook Gitter ",
" Normal Facebook Gitter ",
+ " North Mississippi Facebook Gitter ",
" North Platte Facebook Gitter ",
" Oakland Facebook Gitter ",
" Oklahoma City Facebook Gitter ",
" Omaha Facebook Gitter ",
" Orange County Facebook Gitter ",
" Orlando Facebook Gitter ",
- " Panama City Facebook Gitter ",
+ " Panama City Facebook Gitter ",
" Parana Facebook Gitter ",
" Paris Facebook Gitter ",
" Pasadena Facebook Gitter ",
@@ -589,6 +594,7 @@
" Rice Lake Facebook Gitter ",
" Richmond Facebook Gitter ",
" Rio de Janeiro Facebook Gitter ",
+ " Riverside, CA Facebook Gitter ",
" Rochester, NY Facebook Gitter ",
" Roma Facebook Gitter ",
" Rotterdam Facebook Gitter ",
@@ -597,6 +603,7 @@
" Saint Louis Facebook Gitter ",
" Saint Paul Facebook Gitter ",
" Salamanca Facebook Gitter ",
+ " Salisbury, MD Facebook Gitter ",
" Salt Lake City Facebook Gitter ",
" Salvador Facebook Gitter ",
" San Antonio Facebook Gitter ",
@@ -624,6 +631,7 @@
" Sopot Facebook Gitter ",
" South Bend Facebook Gitter ",
" St Cloud Facebook Gitter ",
+ " Stroke-on-Trent Facebook Gitter ",
" Struga Facebook Gitter ",
" Stuttgart Facebook Gitter ",
" Sydney Facebook Gitter ",
@@ -633,6 +641,7 @@
" Tel Aviv Facebook Gitter ",
" Temecula Facebook Gitter ",
" Tempe Facebook Gitter ",
+ " Ticino Facebook Gitter ",
" Tijuana Facebook Gitter ",
" Tirana Facebook Gitter ",
" Tokyo Facebook Gitter ",
@@ -641,6 +650,7 @@
" Toronto Facebook Gitter ",
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
+ " Tunis Facebook Gitter ",
" Valdosta Facebook Gitter ",
" Valencia Facebook Gitter ",
" Vancouver Facebook Gitter ",
diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade
index 93b49da0ae..0275ef5db3 100644
--- a/views/partials/navbar.jade
+++ b/views/partials/navbar.jade
@@ -19,8 +19,6 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
a(href='/news') News
li
a(href='/field-guide') Guide
- li
- a(href='/jobs') Jobs
if !user
li
li
From e9da8afd5aa7737895bf0e877c000083a05d353f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 15 Jul 2015 22:43:28 -0700
Subject: [PATCH 034/548] add gitter issue modal, add twitch announcement to
news
---
views/challengeMap/show.jade | 34 +++++++++++++++++-----------------
views/partials/footer.jade | 4 ++--
views/stories/news-nav.jade | 7 +++----
3 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 70512ed0dd..9445341ee4 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,20 +83,20 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- //#announcementModal.modal(tabindex='-1')
- // .modal-dialog.animated.fadeInUp.fast-animation
- // .modal-content
- // .modal-header.challenge-list-header Our chat is slow right now
- // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- // .modal-body
- // h3.text-left Please note that Gitter.im, our chat client, is really slow right now.
- // h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
- // h3.text-left Thank you for your patience. In the meantime, happy coding!
- // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- //script.
- // $(document).ready(function () {
- // if (!localStorage || !localStorage.gitter) {
- // $('#announcementModal').modal('show');
- // localStorage.gitter = "true";
- // }
- // });
+ #announcementModal.modal(tabindex='-1')
+ .modal-dialog.animated.fadeInUp.fast-animation
+ .modal-content
+ .modal-header.challenge-list-header Our chat is slow right now
+ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ .modal-body
+ h3.text-left Please note that Gitter.im, our chat client, isn't working properly right now.
+ h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
+ h3.text-left Thank you for your patience. In the meantime, happy coding!
+ a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ script.
+ $(document).ready(function () {
+ if (!localStorage || !localStorage.gitter1) {
+ $('#announcementModal').modal('show');
+ localStorage.gitter1 = "true";
+ }
+ });
diff --git a/views/partials/footer.jade b/views/partials/footer.jade
index fe25c7723a..76d9721053 100644
--- a/views/partials/footer.jade
+++ b/views/partials/footer.jade
@@ -2,7 +2,7 @@
.col-xs-12.hidden-xs.hidden-sm
a.ion-speakerphone(href='http://blog.freecodecamp.com', target='_blank') Blog
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank') GitHub
- a.ion-social-twitch-outline(href="/twitch") Twitch
+ a.ion-social-twitch-outline(href="//twitch.tv/freecodecamp", target='_blank') Twitch
a.ion-social-linkedin(href="/linkedin") LinkedIn
a.ion-social-facebook(href="/field-guide/how-can-i-find-other-free-code-camp-campers-in-my-city") Facebook
a.ion-social-twitter(href="http://twitter.com/freecodecamp", target='_blank') Twitter
@@ -12,7 +12,7 @@
span.sr-only Free Code Camp's Blog
a.ion-social-github(href="http://github.com/freecodecamp", target='_blank')
span.sr-only Free Code Camp on GitHub
- a.ion-social-twitch-outline(href="/twitch")
+ a.ion-social-twitch-outline(href="//twitch.tv/freecodecamp", target='_blank')
span.sr-only Free Code Camp Live Pair Programming on Twitch.tv
a.ion-social-linkedin(href="/linkedin")
span.sr-only Free Code Camp LinkedIn Alumni Network
diff --git a/views/stories/news-nav.jade b/views/stories/news-nav.jade
index 043c6a00a6..8ecbfe9c1f 100644
--- a/views/stories/news-nav.jade
+++ b/views/stories/news-nav.jade
@@ -14,10 +14,9 @@
.spacer
.row
.col-xs-12.col-sm-8.col-sm-offset-2.well
- h3.text-center Your workspace selfie should be part of our upcoming mosaic.
- img.img-responsive(src='https://www.evernote.com/l/Ajm69Uj6uvJLzo7PAj8wGjjbSvGyN0ME-5YB/image.png')
- p.large-p Take a selfie of you at your workspace with Free Code Camp open.
- p.large-p Share it on Instagram, Twitter or Facebook with the hashtag #freecodecamp.
+ h3.text-center Watch us Code Games Live All Weekend
+ img.img-responsive.img-center(src='https://www.evernote.com/l/AjnoItzbAtJEfKPD85t0waxHGgpMyr_G_qkB/image.png')
+ p.large-p We'll build JavaScript games all weekend and stream it all live. You should follow our Twitch.tv channel . See you there!
.spacer
#search-results
From 7aeb9fd3b88c271c7561cd73f4df1bafe57b4993 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 16 Jul 2015 01:52:02 -0700
Subject: [PATCH 035/548] update cities, remove gitter outage warning
---
seed_data/field-guides.json | 5 +++++
views/challengeMap/show.jade | 34 +++++++++++++++++-----------------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 8576d6ee6a..96ae6c5e95 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -410,9 +410,11 @@
" Calgary Facebook Gitter ",
" Cali Facebook Gitter ",
" Campinas Facebook Gitter ",
+ " Canberra Facebook Gitter ",
" Cape Cod Facebook Gitter ",
" Cape Town Facebook Gitter ",
" Caracas Facebook Gitter ",
+ " Central Mississippi Facebook Gitter ",
" Charlotte Facebook Gitter ",
" Chattanooga Facebook Gitter ",
" Chennai Facebook Gitter ",
@@ -485,6 +487,7 @@
" Istanbul Facebook Gitter ",
" Ivano Frankivsk Facebook Gitter ",
" Izmir Facebook Gitter ",
+ " Jackson, MS Facebook Gitter ",
" Jacksonville Facebook Gitter ",
" Jaipur Facebook Gitter ",
" Jakarta Facebook Gitter ",
@@ -585,6 +588,7 @@
" Pristina Facebook Gitter ",
" Providence Facebook Gitter ",
" Provo Facebook Gitter ",
+ " Puebla Facebook Gitter ",
" Pune Facebook Gitter ",
" Quibdo Facebook Gitter ",
" Raleigh Facebook Gitter ",
@@ -648,6 +652,7 @@
" Tom's River Facebook Gitter ",
" Torino Facebook Gitter ",
" Toronto Facebook Gitter ",
+ " Trivandrum Facebook Gitter ",
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
" Tunis Facebook Gitter ",
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 9445341ee4..2ea972eba2 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,20 +83,20 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- #announcementModal.modal(tabindex='-1')
- .modal-dialog.animated.fadeInUp.fast-animation
- .modal-content
- .modal-header.challenge-list-header Our chat is slow right now
- a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- .modal-body
- h3.text-left Please note that Gitter.im, our chat client, isn't working properly right now.
- h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
- h3.text-left Thank you for your patience. In the meantime, happy coding!
- a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- script.
- $(document).ready(function () {
- if (!localStorage || !localStorage.gitter1) {
- $('#announcementModal').modal('show');
- localStorage.gitter1 = "true";
- }
- });
+ //#announcementModal.modal(tabindex='-1')
+ // .modal-dialog.animated.fadeInUp.fast-animation
+ // .modal-content
+ // .modal-header.challenge-list-header Our chat is slow right now
+ // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ // .modal-body
+ // h3.text-left Please note that Gitter.im, our chat client, isn't working properly right now.
+ // h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
+ // h3.text-left Thank you for your patience. In the meantime, happy coding!
+ // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ //script.
+ // $(document).ready(function () {
+ // if (!localStorage || !localStorage.gitter1) {
+ // $('#announcementModal').modal('show');
+ // localStorage.gitter1 = "true";
+ // }
+ // });
From bf236006d5bb47a7d2143c9b8e0d2e6843c7df2e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 18 Jul 2015 23:31:57 -0700
Subject: [PATCH 036/548] add gitter maintenance modal
---
seed_data/field-guides.json | 14 +++++++-------
views/challengeMap/show.jade | 33 ++++++++++++++++-----------------
2 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 96ae6c5e95..808f3cf810 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -292,10 +292,10 @@
" Chinese ",
" German ",
" Dutch ",
- " Spanish ",
+ " Spanish ",
" French ",
- " Japanese ",
- " Korean ",
+ " Japanese ",
+ " Korean ",
" Persian ",
" Portugues ",
" Russian ",
@@ -408,7 +408,7 @@
" Bydgoszcz Facebook Gitter ",
" Cairo Facebook Gitter ",
" Calgary Facebook Gitter ",
- " Cali Facebook Gitter ",
+ " Cali Facebook Gitter ",
" Campinas Facebook Gitter ",
" Canberra Facebook Gitter ",
" Cape Cod Facebook Gitter ",
@@ -649,7 +649,7 @@
" Tijuana Facebook Gitter ",
" Tirana Facebook Gitter ",
" Tokyo Facebook Gitter ",
- " Tom's River Facebook Gitter ",
+ " Tom's River Facebook Gitter ",
" Torino Facebook Gitter ",
" Toronto Facebook Gitter ",
" Trivandrum Facebook Gitter ",
@@ -798,7 +798,7 @@
" Building nonprofit projects is the main way that our campers learn full stack JavaScript and agile software development. Once you complete the Free Code Camp Waypoints, Bonfires, Ziplines and Basejumps, you'll begin this process.
",
" Starting with the end in mind ",
" Our goal at Free Code Camp is to help you land a job as a junior software developer (or, if you prefer, a 'pivot job' that leads your current career in a more technical direction).
",
- " You'll continue to work on nonprofit projects until you've built a sufficiently impressive portfolio and references to start your job search. Your portfolio will ultimately have three to five nonprofit projects. We estimate that the 900 hours of nonprofit projects you're going to complete, in addition to the 100 hours of challenges you've already completed, will be enough to qualify you for your first coding job. This will produce a much broader portfolio than a traditional coding bootcamp, which generally only has one or two capstone projects.
",
+ " You'll continue to work on nonprofit projects until you've built a sufficiently impressive portfolio and references to start your job search. Your portfolio will ultimately have four nonprofit projects. We estimate that the 800 hours of nonprofit projects you're going to complete, in addition to the 800 hours of challenges you've already completed, will be enough to qualify you for your first coding job. This will produce a much broader portfolio than a traditional coding bootcamp, which generally only has one or two capstone projects.
",
" Choosing your first Nonprofit Project ",
" We've categorized all the nonprofit projects by estimated time investment per camper: 100 hours, 200 hours, and 300 hours. These are only rough estimates.
",
" Example: if you and the camper you're paired up with (your pair) each stated you could work 20 hours per week. If the project is a 100 hour per camper project, you should be able to complete it in about 5 weeks.
",
@@ -1133,4 +1133,4 @@
""
]
}
-]
\ No newline at end of file
+]
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 2ea972eba2..6c3804c27b 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,20 +83,19 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- //#announcementModal.modal(tabindex='-1')
- // .modal-dialog.animated.fadeInUp.fast-animation
- // .modal-content
- // .modal-header.challenge-list-header Our chat is slow right now
- // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- // .modal-body
- // h3.text-left Please note that Gitter.im, our chat client, isn't working properly right now.
- // h3.text-left Gitter is working to fix this ASAP. If you can't join our chat room, please try again later.
- // h3.text-left Thank you for your patience. In the meantime, happy coding!
- // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- //script.
- // $(document).ready(function () {
- // if (!localStorage || !localStorage.gitter1) {
- // $('#announcementModal').modal('show');
- // localStorage.gitter1 = "true";
- // }
- // });
+ #announcementModal.modal(tabindex='-1')
+ .modal-dialog.animated.fadeInUp.fast-animation
+ .modal-content
+ .modal-header.challenge-list-header The chat service we use is doing maintenance.
+ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ .modal-body
+ h3.text-left Please note that Gitter.im, our chat client, won't be available between 3 AM and 5 AM EST.
+ h3.text-left Thank you for your patience. In the meantime, happy coding!
+ a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ script.
+ $(document).ready(function () {
+ if (!localStorage || !localStorage.gitter2) {
+ $('#announcementModal').modal('show');
+ localStorage.gitter2 = "true";
+ }
+ });
From 2d5cf29c6afb8b71780e3cc8f43e4756c65d2c29 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 19 Jul 2015 02:57:01 -0700
Subject: [PATCH 037/548] add cities and remove gitter modal
---
seed_data/field-guides.json | 32 +++++++++++++++++++++++++++-----
views/challengeMap/show.jade | 32 ++++++++++++++++----------------
2 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 808f3cf810..7fcf773a21 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -279,12 +279,25 @@
"dashedName": "what-are-the-official-free-code-camp-chat-rooms",
"description": [
"",
- "
We have 4 official chat rooms: ",
+ "
We have 6 official chat rooms: ",
"
",
- " Free Code Camp - a friendly place where you can hang out and chat ",
- " Help - the best place to get help from your fellow campers ",
- " LetsPair - the best room to find fellow campers to pair program with using Screen Hero ",
- " TeamViewer - the best room to find fellow campers who use Linux and pair program using Team Viewer ",
+ " Free Code Camp - our main chat room - hang out and chat about life and learning to code ",
+ " Help - get help with our coding challenges from your fellow campers ",
+ " CodingJobs - chat about the process of getting a coding job, such as portfolios, networking, and interviewing ",
+ " YouCanDoThis - it's natural to doubt yourself when learning to code - share your feelings and get moral support here ",
+ " LetsPair - find fellow campers to pair program with using Screen Hero ",
+ " TeamViewer - find fellow campers who use Linux and pair program using Team Viewer ",
+ " PairProgrammingWomen - this women-only chat room helps women pair program together ",
+ " Hardware - chat about computer hardware and Internet of Things ",
+ " GameDev - chat about designing and developing video games ",
+ " Gaming - chat about gaming of all kinds, such as video games and table top games ",
+ " TVandMovies - chat about TV shows and movies ",
+ " Sports - chat about sports ",
+ " Music - chat about music ",
+ " Photography - chat about photography and videography ",
+ " Business - chat about business and entrepreneurship ",
+ " Saving - chat about saving, investing, and home economics ",
+ " Productivity - chat about productivity, self improvement and quantified self ",
" ",
"
We also have language-specific chat rooms: ",
"
",
@@ -349,6 +362,7 @@
" Find your city below and join their Facebook group and Gitter Chat. This is a great way to hang out with other coders, share insights, and pair program. ",
" ",
" ",
+ " Aarhus Facebook Gitter ",
" Abu Dhabi Facebook Gitter ",
" Accra Facebook Gitter ",
" Adelaide Facebook Gitter ",
@@ -358,6 +372,7 @@
" Albany Facebook Gitter ",
" Amman Facebook Gitter ",
" Amsterdam Facebook Gitter ",
+ " Anacortes Facebook Gitter ",
" Ankara Facebook Gitter ",
" Ann Arbor Facebook Gitter ",
" Apucarana Facebook Gitter ",
@@ -398,12 +413,14 @@
" Brasilia Facebook Gitter ",
" Bratislava Facebook Gitter ",
" Brighton Facebook Gitter ",
+ " Brisbane Facebook Gitter ",
" Brno Facebook Gitter ",
" Brussels Facebook Gitter ",
" Bucaramanga Facebook Gitter ",
" Bucharest Facebook Gitter ",
" Budapest Facebook Gitter ",
" Buenos Aires Facebook Gitter ",
+ " Buffalo Facebook Gitter ",
" Bury St Edmunds Facebook Gitter ",
" Bydgoszcz Facebook Gitter ",
" Cairo Facebook Gitter ",
@@ -482,6 +499,7 @@
" Hyderabad Facebook Gitter ",
" Iasi Facebook Gitter ",
" Indianapolis Facebook Gitter ",
+ " Ipswich Facebook Gitter ",
" Irkutsk Facebook Gitter ",
" Islamabad Facebook Gitter ",
" Istanbul Facebook Gitter ",
@@ -547,6 +565,7 @@
" Moosejaw Facebook Gitter ",
" MorganCity Facebook Gitter ",
" Moscow Facebook Gitter ",
+ " Moss Point Facebook Gitter ",
" Multan Facebook Gitter ",
" Munich Facebook Gitter ",
" Mysore Facebook Gitter ",
@@ -554,6 +573,7 @@
" Napoli Facebook Gitter ",
" Nashik Facebook Gitter ",
" Nashville Facebook Gitter ",
+ " New Brunswick Facebook Gitter ",
" New Haven Facebook Gitter ",
" New Orleans Facebook Gitter ",
" New Paltz Facebook Gitter ",
@@ -619,6 +639,7 @@
" San Luis Obispo Facebook Gitter ",
" Santa Barbara Facebook Gitter ",
" Santa Cruz Facebook Gitter ",
+ " Santiago Facebook Gitter ",
" Santo Domingo Facebook Gitter ",
" Sao Paulo Facebook Gitter ",
" Savannah Facebook Gitter ",
@@ -652,6 +673,7 @@
" Tom's River Facebook Gitter ",
" Torino Facebook Gitter ",
" Toronto Facebook Gitter ",
+ " Tri-Cities Washington Facebook Gitter ",
" Trivandrum Facebook Gitter ",
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
diff --git a/views/challengeMap/show.jade b/views/challengeMap/show.jade
index 6c3804c27b..0b23cfc5ba 100644
--- a/views/challengeMap/show.jade
+++ b/views/challengeMap/show.jade
@@ -83,19 +83,19 @@ block content
li.large-p.negative-10
a(href="/challenges/#{challenge.name}")= challenge.name
- #announcementModal.modal(tabindex='-1')
- .modal-dialog.animated.fadeInUp.fast-animation
- .modal-content
- .modal-header.challenge-list-header The chat service we use is doing maintenance.
- a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
- .modal-body
- h3.text-left Please note that Gitter.im, our chat client, won't be available between 3 AM and 5 AM EST.
- h3.text-left Thank you for your patience. In the meantime, happy coding!
- a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
- script.
- $(document).ready(function () {
- if (!localStorage || !localStorage.gitter2) {
- $('#announcementModal').modal('show');
- localStorage.gitter2 = "true";
- }
- });
+ //#announcementModal.modal(tabindex='-1')
+ // .modal-dialog.animated.fadeInUp.fast-animation
+ // .modal-content
+ // .modal-header.challenge-list-header The chat service we use is doing maintenance.
+ // a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
+ // .modal-body
+ // h3.text-left Please note that Gitter.im, our chat client, won't be available between 3 AM and 5 AM EST.
+ // h3.text-left Thank you for your patience. In the meantime, happy coding!
+ // a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Thanks for the heads-up
+ //script.
+ // $(document).ready(function () {
+ // if (!localStorage || !localStorage.gitter2) {
+ // $('#announcementModal').modal('show');
+ // localStorage.gitter2 = "true";
+ // }
+ // });
From 7ceaadbda0d92d83ba2db0714ed7bfec572617cd Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 19 Jul 2015 03:03:12 -0700
Subject: [PATCH 038/548] update official rooms
---
seed_data/field-guides.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 7fcf773a21..587e48f807 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -279,8 +279,8 @@
"dashedName": "what-are-the-official-free-code-camp-chat-rooms",
"description": [
"",
- "
We have 6 official chat rooms: ",
- "
",
+ " The following are our official chat rooms: ",
+ " ",
" Free Code Camp - our main chat room - hang out and chat about life and learning to code ",
" Help - get help with our coding challenges from your fellow campers ",
" CodingJobs - chat about the process of getting a coding job, such as portfolios, networking, and interviewing ",
@@ -297,8 +297,8 @@
" Photography - chat about photography and videography ",
" Business - chat about business and entrepreneurship ",
" Saving - chat about saving, investing, and home economics ",
- " Productivity - chat about productivity, self improvement and quantified self ",
- " ",
+ "
SelfImprovement - chat about productivity, self improvement and quantified self",
+ " ",
"
We also have language-specific chat rooms: ",
"
",
" Arabic ",
From a0c553f67d0ecd8e181d5be0fd2ac2fdc882a812 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 21 Jul 2015 19:13:46 -0700
Subject: [PATCH 039/548] update cities
---
seed_data/field-guides.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 587e48f807..59415846b9 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -370,6 +370,7 @@
" Aichi Facebook Gitter ",
" Alameda Facebook Gitter ",
" Albany Facebook Gitter ",
+ " Almeria Facebook Gitter ",
" Amman Facebook Gitter ",
" Amsterdam Facebook Gitter ",
" Anacortes Facebook Gitter ",
@@ -460,6 +461,7 @@
" Dubai Facebook Gitter ",
" Dublin Facebook Gitter ",
" Durango Facebook Gitter ",
+ " Edinburgh Facebook Gitter ",
" Edmonton Facebook Gitter ",
" Evansville Facebook Gitter ",
" Firenze Facebook Gitter ",
@@ -484,6 +486,7 @@
" Guarapuava Facebook Gitter ",
" Guatemala City Facebook Gitter ",
" Guntur Facebook Gitter ",
+ " Göttingen Facebook Gitter ",
" Hagerstown Facebook Gitter ",
" Haifa Facebook Gitter ",
" Hamburg Facebook Gitter ",
@@ -498,6 +501,7 @@
" Hove Facebook Gitter ",
" Hyderabad Facebook Gitter ",
" Iasi Facebook Gitter ",
+ " Idaho Falls Facebook Gitter ",
" Indianapolis Facebook Gitter ",
" Ipswich Facebook Gitter ",
" Irkutsk Facebook Gitter ",
@@ -532,6 +536,7 @@
" La Paz Facebook Gitter ",
" Lagos Facebook Gitter ",
" Lahore Facebook Gitter ",
+ " Lakeland Facebook Gitter ",
" Las Cruces Facebook Gitter ",
" Leesburg Facebook Gitter ",
" Leesville Facebook Gitter ",
@@ -544,6 +549,7 @@
" London Facebook Gitter ",
" Los Alamos Facebook Gitter ",
" Los Angeles Facebook Gitter ",
+ " Louisville Facebook Gitter ",
" Lubbock Facebook Gitter ",
" Lviv Facebook Gitter ",
" Madison Facebook Gitter ",
@@ -553,6 +559,7 @@
" Melbourne Facebook Gitter ",
" Mexico City Facebook Gitter ",
" Miami Facebook Gitter ",
+ " Milan Facebook Gitter ",
" Milwaukee Facebook Gitter ",
" Minneapolis Facebook Gitter ",
" Minsk Facebook Gitter ",
@@ -560,6 +567,7 @@
" Missoula Facebook Gitter ",
" Modesto Facebook Gitter ",
" Monterrey Facebook Gitter ",
+ " Montevideo Facebook Gitter ",
" Montgomery Facebook Gitter ",
" Montreal Facebook Gitter ",
" Moosejaw Facebook Gitter ",
@@ -589,6 +597,7 @@
" Omaha Facebook Gitter ",
" Orange County Facebook Gitter ",
" Orlando Facebook Gitter ",
+ " Ottawa Facebook Gitter ",
" Panama City Facebook Gitter ",
" Parana Facebook Gitter ",
" Paris Facebook Gitter ",
@@ -601,9 +610,11 @@
" Phoenix Facebook Gitter ",
" Pittsburgh Facebook Gitter ",
" Poitiers Facebook Gitter ",
+ " Pondicherry Facebook Gitter ",
" Port Harcourt Facebook Gitter ",
" Portland Facebook Gitter ",
" Porto Facebook Gitter ",
+ " Prague Facebook Gitter ",
" Prescott Facebook Gitter ",
" Pristina Facebook Gitter ",
" Providence Facebook Gitter ",
@@ -647,6 +658,7 @@
" Seattle Facebook Gitter ",
" Sedona Facebook Gitter ",
" Seoul Facebook Gitter ",
+ " Shanghai Facebook Gitter ",
" Sheffield Facebook Gitter ",
" Sidoarjo Facebook Gitter ",
" Sierra Vista Facebook Gitter ",
@@ -678,6 +690,7 @@
" Tucson Facebook Gitter ",
" Tulsa Facebook Gitter ",
" Tunis Facebook Gitter ",
+ " University Center Facebook Gitter ",
" Valdosta Facebook Gitter ",
" Valencia Facebook Gitter ",
" Vancouver Facebook Gitter ",
From 14de6fd3eff00e4724f4d3e0d0c127d22e35337f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 21 Jul 2015 20:02:41 -0700
Subject: [PATCH 040/548] update chat rooms and news-nav banner
---
seed_data/field-guides.json | 75 ++++++++++++++++++++-----------------
views/stories/news-nav.jade | 6 +--
2 files changed, 43 insertions(+), 38 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 59415846b9..8cbda63b2b 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -280,42 +280,47 @@
"description": [
"",
"
The following are our official chat rooms: ",
- "
",
- " Free Code Camp - our main chat room - hang out and chat about life and learning to code ",
- " Help - get help with our coding challenges from your fellow campers ",
- " CodingJobs - chat about the process of getting a coding job, such as portfolios, networking, and interviewing ",
- " YouCanDoThis - it's natural to doubt yourself when learning to code - share your feelings and get moral support here ",
- " LetsPair - find fellow campers to pair program with using Screen Hero ",
- " TeamViewer - find fellow campers who use Linux and pair program using Team Viewer ",
- " PairProgrammingWomen - this women-only chat room helps women pair program together ",
- " Hardware - chat about computer hardware and Internet of Things ",
- " GameDev - chat about designing and developing video games ",
- " Gaming - chat about gaming of all kinds, such as video games and table top games ",
- " TVandMovies - chat about TV shows and movies ",
- " Sports - chat about sports ",
- " Music - chat about music ",
- " Photography - chat about photography and videography ",
- " Business - chat about business and entrepreneurship ",
- " Saving - chat about saving, investing, and home economics ",
- " SelfImprovement - chat about productivity, self improvement and quantified self ",
- " ",
+ "
",
+ " FreeCodeCamp our main chat room - hang out and chat about life and learning to code ",
+ " Help get help with our coding challenges from your fellow campers ",
+ " CodingJobs chat about the process of getting a coding job, such as portfolios, networking, and interviewing ",
+ " YouCanDoThis it's natural to doubt yourself when learning to code - share your feelings and get moral support here ",
+ " LetsPair find fellow campers to pair program with using Screen Hero ",
+ " TeamViewer find fellow campers who use Linux and pair program using Team Viewer ",
+ " PairProgrammingWomen this women-only chat room helps women pair program with other women if they so desire ",
+ "
",
+ "
We also have the following casual chat rooms: ",
+ "
",
+ " Hardware chat about computer hardware and Internet of Things ",
+ " GameDev chat about designing and developing video games ",
+ " Gaming chat about gaming of all kinds, such as video games and table top games ",
+ " TVandMovies chat about TV shows and movies ",
+ " Sports chat about sports ",
+ " Music chat about music ",
+ " Art and Photography chat about art, photography and videography ",
+ " Business chat about business and entrepreneurship ",
+ " Saving chat about saving, investing, and home economics ",
+ " SelfImprovement chat about productivity, self improvement and quantified self ",
+ "
",
+ "
You'll note that we do not have religion or politics chat rooms. Please don't discuss those things here :)
",
"
We also have language-specific chat rooms: ",
- "
",
- " Arabic ",
- " Chinese ",
- " German ",
- " Dutch ",
- " Spanish ",
- " French ",
- " Japanese ",
- " Korean ",
- " Persian ",
- " Portugues ",
- " Russian ",
- " Thai ",
- " Vietnamese ",
- " ",
+ "
",
+ " Arabic ",
+ " Chinese ",
+ " German ",
+ " Dutch ",
+ " Spanish ",
+ " French ",
+ " Japanese ",
+ " Korean ",
+ " Persian ",
+ " Portugues ",
+ " Russian ",
+ " Thai ",
+ " Vietnamese ",
+ "
",
"
",
+ "
By joining these chat rooms, you accept our Code of Conduct . ",
"
If you think we should add a chat room, please message @quincylarson in Gitter.
",
"
"
]
@@ -967,7 +972,7 @@
" Free Code Camp should be a harassment-free experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, national origin, or religion (or lack thereof).
",
" We do not tolerate harassment of campers in any form, anywhere on Free Code Camp's online media (Gitter, Twitch, etc.) or during pair programming. Harassment includes sexual language and imagery, deliberate intimidation, stalking, unwelcome sexual attention, libel, and any malicious hacking or social engineering.
",
" If a camper engages in harassing behavior, our team will take any action we deem appropriate, up to and including banning them from Free Code Camp.
",
- " We want everyone to feel safe and respected. If you are being harassed or notice that someone else is being harassed, say something! Message @quincylarson, @terakilobyte and @codenonprofit in Gitter (preferably with a screen shot of the offending language) so we can take fast action.
",
+ " We want everyone to feel safe and respected. If you are being harassed or notice that someone else is being harassed, say something! Message @quincylarson, @brianamarie and @codenonprofit in Gitter (preferably with a screen shot of the offending language) so we can take fast action.
",
" If you have questions about this code of conduct, email us at team@freecodecamp.com .
",
" "
]
diff --git a/views/stories/news-nav.jade b/views/stories/news-nav.jade
index 8ecbfe9c1f..5d11172e39 100644
--- a/views/stories/news-nav.jade
+++ b/views/stories/news-nav.jade
@@ -14,9 +14,9 @@
.spacer
.row
.col-xs-12.col-sm-8.col-sm-offset-2.well
- h3.text-center Watch us Code Games Live All Weekend
- img.img-responsive.img-center(src='https://www.evernote.com/l/AjnoItzbAtJEfKPD85t0waxHGgpMyr_G_qkB/image.png')
- p.large-p We'll build JavaScript games all weekend and stream it all live. You should follow our Twitch.tv channel . See you there!
+ h3.text-center We just added a ton of new chat rooms
+ img.img-responsive.img-center(src='https://www.evernote.com/l/AHTBwaDT-EdNLrMjK_9EBMO8Eqrt7Z87GhQB/image.png')
+ p.large-p Check out our full list of official chat rooms and star the ones you want to keep at the top of your room list. Happy chatting!
.spacer
#search-results
From c258e6d61c45de0723c265fe321c9803a2f57c0f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 23 Jul 2015 17:30:10 -0700
Subject: [PATCH 041/548] add issues room
---
seed_data/field-guides.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 8cbda63b2b..d247a58e7b 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -288,6 +288,7 @@
" LetsPair find fellow campers to pair program with using Screen Hero ",
" TeamViewer find fellow campers who use Linux and pair program using Team Viewer ",
" PairProgrammingWomen this women-only chat room helps women pair program with other women if they so desire ",
+ " Issues this is the place to discuss issues with our open source codebase and coordinate pull requests ",
"
",
" We also have the following casual chat rooms: ",
" ",
From 87b43cce15d785732a4c5e4067904c5f3ab462aa Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 23 Jul 2015 17:45:20 -0700
Subject: [PATCH 042/548] add causesignal to recommended nonprofit resources
---
seed_data/field-guides.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index d247a58e7b..35a5750186 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -1055,6 +1055,7 @@
" https://wordpress.com/
",
" Build it yourself for free with no code
",
" Donor and Volunteer Management Systems ",
+ " http://causesignal.com
",
" https://www.thedatabank.com/
",
" http://www.donorsnap.com/
",
" http://www.donorperfect.com/
",
From 955017e24107ef2bd4c21f544fb29e706db7fd99 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 23 Jul 2015 22:25:38 -0700
Subject: [PATCH 043/548] add Tagalog chat room
---
seed_data/field-guides.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 35a5750186..3e8568f20b 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -318,6 +318,7 @@
" Portugues ",
" Russian ",
" Thai ",
+ " Tagalog ",
" Vietnamese ",
"
",
" ",
From f69a11d78e839a0029dfa6d8d0b040d33d52efdb Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 24 Jul 2015 00:40:15 -0700
Subject: [PATCH 044/548] add warning to field guide
---
seed_data/field-guides.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 3e8568f20b..d8622aca30 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -279,7 +279,8 @@
"dashedName": "what-are-the-official-free-code-camp-chat-rooms",
"description": [
"",
- "
The following are our official chat rooms: ",
+ "
The following are our official chat rooms. ",
+ "
Please note that all chat rooms listed here are publicly accessible and indexed by search engines, so only share email addresses or other sensitive information in private messages.
",
"
",
" FreeCodeCamp our main chat room - hang out and chat about life and learning to code ",
" Help get help with our coding challenges from your fellow campers ",
@@ -303,7 +304,7 @@
" Saving chat about saving, investing, and home economics ",
" SelfImprovement chat about productivity, self improvement and quantified self ",
"
",
- "
You'll note that we do not have religion or politics chat rooms. Please don't discuss those things here :)
",
+ "
You'll note that we do not have religion or politics chat rooms. Please don't discuss those things at Free Code Camp :)
",
"
We also have language-specific chat rooms: ",
"
",
" Arabic ",
From cecf60aa1757168cdc864f420fc504e9550d756e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 26 Jul 2015 15:53:31 -0700
Subject: [PATCH 045/548] update cities and add different help rooms
---
seed_data/field-guides.json | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index d8622aca30..3e269ec356 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -283,13 +283,17 @@
" Please note that all chat rooms listed here are publicly accessible and indexed by search engines, so only share email addresses or other sensitive information in private messages.
",
" ",
" FreeCodeCamp our main chat room - hang out and chat about life and learning to code ",
- " Help get help with our coding challenges from your fellow campers ",
+ " Help get help with our Waypoint challenges from your fellow campers ",
+ " HelpZiplines get help with our Zipline challenges from your fellow campers ",
+ " HelpBonfires get help with our Bonfire challenges from your fellow campers ",
+ " HelpBasejumps get help with our Basejump challenges from your fellow campers ",
+ " NonprofitProjects get help with your Nonprofit Projects from your fellow campers ",
" CodingJobs chat about the process of getting a coding job, such as portfolios, networking, and interviewing ",
" YouCanDoThis it's natural to doubt yourself when learning to code - share your feelings and get moral support here ",
" LetsPair find fellow campers to pair program with using Screen Hero ",
" TeamViewer find fellow campers who use Linux and pair program using Team Viewer ",
- " PairProgrammingWomen this women-only chat room helps women pair program with other women if they so desire ",
" Issues this is the place to discuss issues with our open source codebase and coordinate pull requests ",
+ " PairProgrammingWomen this women-only chat room helps women pair program with other women if they so desire ",
"
",
" We also have the following casual chat rooms: ",
" ",
@@ -307,6 +311,7 @@
" You'll note that we do not have religion or politics chat rooms. Please don't discuss those things at Free Code Camp :)
",
" We also have language-specific chat rooms: ",
" ",
+ " Albanian ",
" Arabic ",
" Chinese ",
" German ",
@@ -378,6 +383,7 @@
" Aichi Facebook Gitter ",
" Alameda Facebook Gitter ",
" Albany Facebook Gitter ",
+ " Algiers Facebook Gitter ",
" Almeria Facebook Gitter ",
" Amman Facebook Gitter ",
" Amsterdam Facebook Gitter ",
@@ -440,6 +446,8 @@
" Cape Cod Facebook Gitter ",
" Cape Town Facebook Gitter ",
" Caracas Facebook Gitter ",
+ " Cardiff Facebook Gitter ",
+ " Casablanca Facebook Gitter ",
" Central Mississippi Facebook Gitter ",
" Charlotte Facebook Gitter ",
" Chattanooga Facebook Gitter ",
@@ -472,6 +480,7 @@
" Edinburgh Facebook Gitter ",
" Edmonton Facebook Gitter ",
" Evansville Facebook Gitter ",
+ " Ferizaj Facebook Gitter ",
" Firenze Facebook Gitter ",
" Flagstaff Facebook Gitter ",
" Florianopolis Facebook Gitter ",
@@ -504,6 +513,7 @@
" Hermosillo Facebook Gitter ",
" Hickory Facebook Gitter ",
" Ho Chi Minh City Facebook Gitter ",
+ " Hobart Facebook Gitter ",
" Hong Kong Facebook Gitter ",
" Houston Facebook Gitter ",
" Hove Facebook Gitter ",
@@ -537,6 +547,7 @@
" Knoxville Facebook Gitter ",
" Koeln Facebook Gitter ",
" Kolkata Facebook Gitter ",
+ " Kosovo Facebook Gitter ",
" Krasnodar Facebook Gitter ",
" Kryvyi Rih Facebook Gitter ",
" Kuala Lumpur Facebook Gitter ",
@@ -554,10 +565,12 @@
" Limassol Facebook Gitter ",
" Lindsay Facebook Gitter ",
" Lisbon Facebook Gitter ",
+ " Little Rock Facebook Gitter ",
" London Facebook Gitter ",
" Los Alamos Facebook Gitter ",
" Los Angeles Facebook Gitter ",
" Louisville Facebook Gitter ",
+ " Luanda Facebook Gitter ",
" Lubbock Facebook Gitter ",
" Lviv Facebook Gitter ",
" Madison Facebook Gitter ",
@@ -634,6 +647,7 @@
" Ranchi Facebook Gitter ",
" Recife Facebook Gitter ",
" Redmond, OR Facebook Gitter ",
+ " Reno Facebook Gitter ",
" Rice Lake Facebook Gitter ",
" Richmond Facebook Gitter ",
" Rio de Janeiro Facebook Gitter ",
@@ -679,10 +693,13 @@
" Stroke-on-Trent Facebook Gitter ",
" Struga Facebook Gitter ",
" Stuttgart Facebook Gitter ",
+ " Surrey Facebook Gitter ",
" Sydney Facebook Gitter ",
" Taipei Facebook Gitter ",
" Tallahassee Facebook Gitter ",
+ " Tallinn Facebook Gitter ",
" Tampa Bay Facebook Gitter ",
+ " Tehran Facebook Gitter ",
" Tel Aviv Facebook Gitter ",
" Temecula Facebook Gitter ",
" Tempe Facebook Gitter ",
@@ -707,6 +724,7 @@
" Vilnius Facebook Gitter ",
" Virginia Beach Facebook Gitter ",
" Vitória Facebook Gitter ",
+ " Warrington Facebook Gitter ",
" Warsaw Facebook Gitter ",
" Washington, DC Facebook Gitter ",
" Waterford Facebook Gitter ",
From b81567f02f1256036f04e227c89b2032e68520d1 Mon Sep 17 00:00:00 2001
From: ckylee
Date: Tue, 28 Jul 2015 00:49:09 +0800
Subject: [PATCH 046/548] Update basic-bonfires.json
Temporary fix to bug found in "Everything Be True" bonfire mission (additional test case to prevent "return collection[0].hasProperty(pre)" from passing)
---
seed_data/challenges/basic-bonfires.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json
index b714a136cb..5d81301776 100644
--- a/seed_data/challenges/basic-bonfires.json
+++ b/seed_data/challenges/basic-bonfires.json
@@ -1421,6 +1421,7 @@
"tests": [
"assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'should return true if predicate returns truthy for all elements in the collection');",
"assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
+ "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
],
"MDNlinks": [
"Object.hasOwnProperty()",
From 03229bd021db67683238187623db2d0bdf229915 Mon Sep 17 00:00:00 2001
From: Juan David Pastas
Date: Mon, 3 Aug 2015 17:33:14 -0500
Subject: [PATCH 047/548] Language typo.
---
seed_data/field-guides.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 3e269ec356..f87bdc740b 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -1136,7 +1136,7 @@
"description": [
"",
"
Translation is an all-or-nothing proposal.",
- "
We won't be able to add new languages to Free Code Camp until all of our challenges are translated into that langauge.
",
+ "
We won't be able to add new languages to Free Code Camp until all of our challenges are translated into that language.
",
"
In addition to translating these initially, we'll also need to maintain the translation as the challenges are gradually updated.
",
"
If you're able to help us, you can join our Trello board by sending @quincylarson your email address in Gitter.
",
"
"
From 2b45fc7787e98d089e97687cf7e557fb633267fd Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 3 Aug 2015 22:09:56 -0700
Subject: [PATCH 048/548] remove stories from sitemap
---
views/resources/sitemap.jade | 7 -------
1 file changed, 7 deletions(-)
diff --git a/views/resources/sitemap.jade b/views/resources/sitemap.jade
index 5541565540..664b1ffd10 100644
--- a/views/resources/sitemap.jade
+++ b/views/resources/sitemap.jade
@@ -46,13 +46,6 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
changefreq weekly
priority= 0.5
- each story in stories
- url
- loc #{appUrl}/news/#{story.replace(/\s/g, '-')}
- lastmod= now
- changefreq daily
- priority= 0.9
-
each nonprofit in nonprofits
url
loc #{appUrl}/nonprofits/#{nonprofit.replace(/\s/g, '-')}
From d8110dad8809772b2d0cf211192746a3a570573c Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 3 Aug 2015 22:11:28 -0700
Subject: [PATCH 049/548] fix json typo
---
seed_data/challenges/basic-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json
index 5d81301776..413224a973 100644
--- a/seed_data/challenges/basic-bonfires.json
+++ b/seed_data/challenges/basic-bonfires.json
@@ -1420,7 +1420,7 @@
],
"tests": [
"assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'should return true if predicate returns truthy for all elements in the collection');",
- "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
+ "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');",
"assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
],
"MDNlinks": [
From dbf8443430127fa30904bc670edec19b78189ec9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Tue, 4 Aug 2015 15:00:22 +0200
Subject: [PATCH 050/548] Small Fix of Bootstrap waypoint challenge - Issue
1502
Changed second check for second class - 'btn-default'
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index c0b4014f93..8a796f709a 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1743,7 +1743,7 @@
],
"tests": [
"assert($('.btn').length > 5, 'Apply the \"btn\" class to each of your button
elements.')",
- "assert($('.btn').length > 5, 'Apply the \"btn-default\" class to each of your button
elements.')"
+ "assert($('.btn-default').length > 5, 'Apply the \"btn-default\" class to each of your button
elements.')"
],
"challengeSeed": [
"",
From a3e50050587c6585a397483ec9373d27a9ede0f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Djordje=20Lacmanovi=C4=87?=
Date: Tue, 4 Aug 2015 16:51:10 +0200
Subject: [PATCH 051/548] fixed issue #1511 - now checking for words longer
than 9 chars
closes #1511
---
seed/challenges/basic-bonfires.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json
index 8d97403e21..8fb64bc1c8 100644
--- a/seed/challenges/basic-bonfires.json
+++ b/seed/challenges/basic-bonfires.json
@@ -231,7 +231,8 @@
"expect(findLongestWord('The quick brown fox jumped over the lazy dog')).to.equal(6);",
"expect(findLongestWord('May the force be with you')).to.equal(5);",
"expect(findLongestWord('Google do a barrel roll')).to.equal(6);",
- "expect(findLongestWord('What is the average airspeed velocity of an unladen swallow')).to.equal(8);"
+ "expect(findLongestWord('What is the average airspeed velocity of an unladen swallow')).to.equal(8);",
+ "expect(findLongestWord('What if we try a super-long word such as otorhinolaryngology')).to.equal(19);"
],
"MDNlinks": [
"String.split()",
From c05a936c8710e91f726f9504899d254046a3cba4 Mon Sep 17 00:00:00 2001
From: Shouvik Roy
Date: Tue, 4 Aug 2015 20:47:25 +0530
Subject: [PATCH 052/548] Update main.less to fix #1510
Update main.less to fix #1510. There was an alignment issue on Safari because of missing vendor prefix ```-webkit``` on ```transform``` on the ```.points-on-top``` class.
---
public/css/main.less | 1 +
1 file changed, 1 insertion(+)
diff --git a/public/css/main.less b/public/css/main.less
index 68ffd44dc0..21e225994f 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -577,6 +577,7 @@ thead {
margin: 0 auto;
position: relative;
top: 50%;
+ -webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
From ad46b72bd0d6ea2fdf22cdb5ff0c48eeabe15fb1 Mon Sep 17 00:00:00 2001
From: Nic Galluzzo
Date: Tue, 4 Aug 2015 08:54:21 -0700
Subject: [PATCH 053/548] Update bootstrap.json
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index c0b4014f93..32b069f30d 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -12,7 +12,7 @@
"Bootstrap will figure out how wide your screen is and respond by resizing your HTML elements - hence the name Responsive Design
.",
"With responsive design, there is no need to design a mobile version of your website. It will look good on devices with screens of any width.",
"You can add Bootstrap to any app just by including it with <link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'/>
at the top of your HTML. But we've gone ahead and automatically added it to your Cat Photo App for you.",
- "To get started, we should nest all of our HTML in a div
element with the class \"fluid-container\"."
+ "To get started, we should nest all of our HTML in a div
element with the class \"container-fluid\"."
],
"tests": [
"assert($('div').hasClass('container-fluid'), 'Your div
element should have the class \"row\"')",
From 064fc68b304cb3ae44005da008313e91a760743e Mon Sep 17 00:00:00 2001
From: Ben
Date: Tue, 4 Aug 2015 11:04:40 -0500
Subject: [PATCH 054/548] Update bootstrap.json
fixed line 1886, changed col-xs-12 to col-xs-6
"assert($('.col-xs-6').children('h4') && $('.col-xs-6').children('h4').length > 1, 'Add an h4
element to each of your <div class=\\'col-xs-6\\'>
elements.');",
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index c0b4014f93..68d6c70fc9 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1883,7 +1883,7 @@
"Above your right-well, inside its \"col-xs-6\" div
element, add a h4
element with the text \"#right-well\"."
],
"tests": [
- "assert($('.col-xs-12').children('h4') && $('.col-xs-12').children('h4').length > 1, 'Add an h4
element to each of your <div class=\\'col-xs-6\\'>
elements.');",
+ "assert($('.col-xs-6').children('h4') && $('.col-xs-6').children('h4').length > 1, 'Add an h4
element to each of your <div class=\\'col-xs-6\\'>
elements.');",
"assert(new RegExp('#left-well','gi').test($('h4').text()), 'One h4
element should have the text \"#left-well\".');",
"assert(new RegExp('#right-well','gi').test($('h4').text()), 'One h4
element should have the text \"#right-well\".');"
],
From ecacbc623391a9b7227d78eeb9b28701bfb30d42 Mon Sep 17 00:00:00 2001
From: Ben
Date: Tue, 4 Aug 2015 14:03:19 -0500
Subject: [PATCH 055/548] Update bootstrap.json
fixed typo (misspelled 'container')
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index c0b4014f93..a54c808017 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1566,7 +1566,7 @@
"difficulty": 2.18,
"description": [
"Now let's make sure all the content on your page is mobile-responsive.",
- "Let's nest your h3
element within a div element with the class \"containter-fluid\"."
+ "Let's nest your h3
element within a div element with the class \"container-fluid\"."
],
"tests": [
"assert($('div').hasClass('container-fluid'), 'Your div
element should have the class \"container-fluid\"')",
From 2dc9934da2b5f5d66bf63d5e012cd9a58bc25e92 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 4 Aug 2015 13:39:59 -0700
Subject: [PATCH 056/548] add user.isGithubCool check if user signs up with
github, they become GithubCool.
---
common/models/user.json | 43 ++++-------------------------------------
server/server.js | 3 +++
2 files changed, 7 insertions(+), 39 deletions(-)
diff --git a/common/models/user.json b/common/models/user.json
index aeb02b6397..940777a5a4 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -19,28 +19,14 @@
"password": {
"type": "string"
},
- "facebook": {
- "type": "string"
- },
- "twitter": {
- "type": "string"
- },
- "google": {
- "type": "string"
- },
- "github": {
- "type": "string"
- },
- "linkedin": {
- "type": "string"
- },
- "tokens": {
- "type": "array"
- },
"progressTimestamps": {
"type": "array",
"default": []
},
+ "isGithubCool": {
+ "type": "boolean",
+ "default": false
+ },
"username": {
"type": "string",
"lowercase": true,
@@ -123,12 +109,6 @@
"type": "string",
"default": ""
},
- "resetPasswordToken": {
- "type": "string"
- },
- "resetPasswordExpires": {
- "type": "string"
- },
"completedBonfires": {
"type": [
{
@@ -170,21 +150,10 @@
"type": "number",
"default": 0
},
- "needsSomeDataModeled": {
- "type": "boolean",
- "default": false
- },
- "needsMigration": {
- "type": "boolean",
- "default": true
- },
"sendMonthlyEmail": {
"type": "boolean",
"default": true
},
- "challengesHash": {
- "type": {}
- },
"currentChallenge": {
"type": {}
},
@@ -205,10 +174,6 @@
}
],
"default": []
- },
- "uncompletedChallenges": {
- "type": "array",
- "default": []
}
},
"validations": [],
diff --git a/server/server.js b/server/server.js
index 3c047934e5..93b0a1a322 100755
--- a/server/server.js
+++ b/server/server.js
@@ -65,6 +65,9 @@ var passportOptions = {
if (email) {
userObj.email = email;
}
+ if (provider === 'github-login') {
+ userObj.isGithubCool = true;
+ }
return userObj;
}
};
From 0682857236b921251e5c8097b1016ab746eda1c9 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 14:40:47 -0700
Subject: [PATCH 057/548] remove learn link from navbar
---
server/views/partials/navbar.jade | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade
index b0667a59f3..3c5b4c4d05 100644
--- a/server/views/partials/navbar.jade
+++ b/server/views/partials/navbar.jade
@@ -7,10 +7,6 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo')
.collapse.navbar-collapse
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
-
- if user
- li
- a(href='/challenges') Learn
li
a(href='/map') Map
li
@@ -18,7 +14,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
li
a(href='/news') News
li
- a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/Home') Wiki
+ a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/Home', taregt='_blank') Wiki
if !user
li
li
From 9196d1c48ececf281e767cfbcb566571e9b4653a Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 4 Aug 2015 14:52:06 -0700
Subject: [PATCH 058/548] add github check on login with github.
---
common/models/User-Identity.js | 38 ++++++++++++++++++++++++++--------
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 720e98b44a..781ea7d0ac 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -1,14 +1,16 @@
-var debug = require('debug')('freecc:models:userIdent');
+import debugFactory from 'debug';
-var defaultProfileImage =
- require('../utils/constantStrings.json').defaultProfileImage;
+const debug = debugFactory('freecc:models:userIdent');
+
+const { defaultProfileImage } = require('../utils/constantStrings.json');
function getFirstImageFromProfile(profile) {
return profile && profile.photos && profile.photos[0] ?
profile.photos[0].value :
null;
}
-module.exports = function(UserIdent) {
+
+export default function(UserIdent) {
UserIdent.observe('before save', function(ctx, next) {
var userIdent = ctx.currentInstance || ctx.instance;
if (!userIdent) {
@@ -16,13 +18,14 @@ module.exports = function(UserIdent) {
return next();
}
userIdent.user(function(err, user) {
+ let userChanged = false;
if (err) { return next(err); }
if (!user) {
debug('no user attached to identity!');
return next();
}
- var picture = getFirstImageFromProfile(userIdent.profile);
+ const picture = getFirstImageFromProfile(userIdent.profile);
debug('picture', picture, user.picture);
// check if picture was found
@@ -34,15 +37,32 @@ module.exports = function(UserIdent) {
(!user.picture || user.picture === defaultProfileImage)
) {
debug('setting user picture');
- user.picture = userIdent.profile.photos[0].value;
+ user.picture = picture;
+ userChanged = true;
+ }
+
+ // if user is not github cool
+ // and user signed in with github
+ // then make them github cool
+ // and set their username from their github profile.
+ if (!user.isGithubCool && userIdent.provider === 'github-login') {
+ debug(`
+ user isn't github cool yet but signed in with github
+ lets make them cool!
+ `);
+ user.isGithubCool = true;
+ user.username = userIdent.profile.username.toLowerCase();
+ userChanged = true;
+ }
+
+ if (userChanged) {
return user.save(function(err) {
if (err) { return next(err); }
next();
});
}
-
- debug('exiting after user ident');
+ debug('exiting after user identity before save');
next();
});
});
-};
+}
From c573caf2e22acc2fa50fa4c353c852ea91bda19f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 14:57:34 -0700
Subject: [PATCH 059/548] remove website links from user model and account view
---
common/models/user.json | 36 -----------
server/views/account/account.jade | 99 -------------------------------
2 files changed, 135 deletions(-)
diff --git a/common/models/user.json b/common/models/user.json
index 940777a5a4..d055e431ff 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -73,42 +73,6 @@
"type": "string",
"default": ""
},
- "website1Link": {
- "type": "string",
- "default": ""
- },
- "website1Title": {
- "type": "string",
- "default": ""
- },
- "website1Image": {
- "type": "string",
- "default": ""
- },
- "website2Link": {
- "type": "string",
- "default": ""
- },
- "website2Title": {
- "type": "string",
- "default": ""
- },
- "website2Image": {
- "type": "string",
- "default": ""
- },
- "website3Link": {
- "type": "string",
- "default": ""
- },
- "website3Title": {
- "type": "string",
- "default": ""
- },
- "website3Image": {
- "type": "string",
- "default": ""
- },
"completedBonfires": {
"type": [
{
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 436651c1e0..266ff57fbf 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -158,105 +158,6 @@ block content
span.ion-edit
| Update my Social Links
- .col-sm-4.col-sm-offset-5.negative-bottom
- h2 Portfolio
-
- .col-sm-4.col-sm-offset-5.flat-top
- h3 First Portfolio Project
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website1Title') Title
- .col-sm-4
- input.form-control(type='text', name='website1Title', id='website1Title', autocomplete="off", ng-model='user.website1Title', ng-maxlength='140')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website1Title.$error.maxlength && !profileForm.website1Title.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Portfolio project title must be fewer than 140 characters.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website1Link') Link
- .col-sm-4
- input.form-control(type='url', name='website1Link', id='website1Link', autocomplete="off", ng-model='user.website1Link', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website1Link.$error.url && !profileForm.website1Link.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website1Image') Image Link (4:3 ratio)
- .col-sm-4
- input.form-control(type='url', name='website1Image', id='website1Image', autocomplete="off", ng-model='user.website1Image', placeholder='http://www.example.com/image.jpg')
- .col-sm-4.col-sm-offset-5(ng-show="profileForm.website1Image.$error.url && !profileForm.website1Image.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com/image.jpg).
-
- .col-sm-4.col-sm-offset-5.flat-top
- h3 Second Portfolio Project
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website2Title') Title
- .col-sm-4
- input.form-control(type='text', name='website2Title', id='website2Title', autocomplete="off", ng-model='user.website2Title', ng-maxlength='140')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website2Title.$error.maxlength && !profileForm.website2Title.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Portfolio project title must be fewer than 140 characters.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website2Link') Link
- .col-sm-4
- input.form-control(type='url', name='website2Link', id='website2Link', autocomplete="off", ng-model='user.website2Link', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website2Link.$error.url && !profileForm.website2Link.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website2Image') Image Link (4:3 ratio)
- .col-sm-4
- input.form-control(type='url', name='website2Image', id='website2Image', autocomplete="off", ng-model='user.website2Image', placeholder='http://www.example.com/image.jpg')
- .col-sm-4.col-sm-offset-5(ng-show="profileForm.website2Image.$error.url && !profileForm.website2Image.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com/image.jpg).
-
- .col-sm-4.col-sm-offset-5.flat-top
- h3 Third Portfolio Project
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website3Title') Title
- .col-sm-4
- input.form-control(type='text', name='website3Title', id='website3Title', autocomplete="off", ng-model='user.website3Title', ng-maxlength='140')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website3Title.$error.maxlength && !profileForm.website3Title.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Portfolio project title must be fewer than 140 characters.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website3Link') Link
- .col-sm-4
- input.form-control(type='url', name='website3Link', id='website3Link', autocomplete="off", ng-model='user.website3Link', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.website3Link.$error.url && !profileForm.website3Link.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='website3Image') Image Link (4:3 ratio)
- .col-sm-4
- input.form-control(type='url', name='website3Image', id='website3Image', autocomplete="off", ng-model='user.website3Image', placeholder='http://www.example.com/image.jpg', ng-pattern='/[\.](jpg|png|jpeg|gif)(\s+)?$/')
- .col-sm-4.col-sm-offset-5(ng-show="profileForm.website3Image.$error.url && !profileForm.website3Image.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com/image.jpg).
-
- .form-group
- .col-sm-offset-5.col-sm-4
- button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
- span.ion-edit
- | Update my Portfolio
- br
-
.panel.panel-info
.panel-heading.text-center Manage your account here:
.panel-body
From 041abd10654a1ae5102ecb42ec24c529f14ce68f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 14:58:04 -0700
Subject: [PATCH 060/548] fix beta warning
---
public/css/main.less | 5 +++++
server/views/challengeMap/show.jade | 3 +++
server/views/home.jade | 6 +++---
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/public/css/main.less b/public/css/main.less
index 21e225994f..7773265028 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -613,6 +613,11 @@ thead {
color: #009900
}
+.default-border-radius {
+ border-radius: 5px;
+}
+
+
.testimonial-copy {
font-size: 20px;
text-align: center;
diff --git a/server/views/challengeMap/show.jade b/server/views/challengeMap/show.jade
index 1d3f91dfe7..77b42ca672 100644
--- a/server/views/challengeMap/show.jade
+++ b/server/views/challengeMap/show.jade
@@ -3,6 +3,9 @@ block content
script.
var completedChallenges = !{JSON.stringify(completedChallengeList)};
var challengeList = !{JSON.stringify(challengeList)};
+ .bg-danger.default-border-radius
+ p
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta' target='_blank') You're using our experimental beta site. None of your progress here will be saved. Please click this to learn more.
.panel.panel-info
.panel-heading.text-center
h1 Challenge Map
diff --git a/server/views/home.jade b/server/views/home.jade
index 4e7a8f9c73..e5e09f19bb 100644
--- a/server/views/home.jade
+++ b/server/views/home.jade
@@ -1,8 +1,8 @@
extends layout
block content
- .bg-danger
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta before continuing')
- h3 Warning! You are on beta! Please read this link before continuing! https://github.com/freecodecamp/freecodecamp/wiki/beta
+ .bg-danger.default-border-radius
+ p
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta' target='_blank') You're using our experimental beta site. None of your progress here will be saved. Please click this to learn more.
.jumbotron
.text-center
h1.hug-top Code with Us
From 73f0dcf7324185a1eb1caa54e375e721deceaa7f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 14:58:24 -0700
Subject: [PATCH 061/548] make wiki open in new tab
---
server/views/partials/navbar.jade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade
index 3c5b4c4d05..8d310d8846 100644
--- a/server/views/partials/navbar.jade
+++ b/server/views/partials/navbar.jade
@@ -14,7 +14,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
li
a(href='/news') News
li
- a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/Home', taregt='_blank') Wiki
+ a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/Home', target='_blank') Wiki
if !user
li
li
From e01876f3ab435d99b48f6ad78e6574a2c8fbb23b Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 4 Aug 2015 15:03:33 -0700
Subject: [PATCH 062/548] disable username updating when camper is githubCool
---
server/views/account/account.jade | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 436651c1e0..81798a9511 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -32,7 +32,7 @@ block content
.form-group
label.col-sm-3.col-sm-offset-2.control-label(for='username') Username (path to public profile) *
.col-sm-4
- input.form-control(type='text', placeholder='username' name='username', autocomplete="off", id='username', ng-model='user.username', required='required', ng-minlength='5', ng-maxlength='20', ng-keypress='', unique-username='', ng-pattern="/^[A-z0-9_]+$/")
+ input.form-control(type='text', placeholder='username' name='username', autocomplete="off", id='username', ng-model='user.username', required='required', ng-minlength='5', ng-maxlength='20', ng-keypress='', unique-username='', ng-pattern="/^[A-z0-9_]+$/", ng-disabled='user.isGithubCool')
.col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.pattern")
alert(type='danger')
span.ion-close-circled
@@ -53,6 +53,10 @@ block content
alert(type='danger')
span.ion-close-circled
| That username is already in use.
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="user.isGithubCool")
+ alert(type='info')
+ span.ion-close-circled
+ | You are GithubCool! Your username cannot be changed.
.form-group
label.col-sm-3.col-sm-offset-2.control-label(for='email') Email *
From 7246945b4235ca5f7bb9e2c08ce7f36f9ab546e2 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 15:09:20 -0700
Subject: [PATCH 063/548] remove bonfires from campers' public portfolios
---
server/boot/user.js | 12 ------------
server/views/account/show.jade | 18 ------------------
2 files changed, 30 deletions(-)
diff --git a/server/boot/user.js b/server/boot/user.js
index f2a91552d9..0d96a71295 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -214,19 +214,7 @@ module.exports = function(app) {
bio: user.bio,
picture: user.picture,
progressTimestamps: user.progressTimestamps,
- website1Link: user.website1Link,
- website1Title: user.website1Title,
- website1Image: user.website1Image,
- website2Link: user.website2Link,
- website2Title: user.website2Title,
- website2Image: user.website2Image,
- website3Link: user.website3Link,
- website3Title: user.website3Title,
- website3Image: user.website3Image,
challenges: challenges,
- bonfires: user.completedChallenges.filter(function(challenge) {
- return challenge.challengeType === 5;
- }),
calender: data,
moment: moment,
longestStreak: user.longestStreak +
diff --git a/server/views/account/show.jade b/server/views/account/show.jade
index f1edc4d3c7..9463f78fc9 100644
--- a/server/views/account/show.jade
+++ b/server/views/account/show.jade
@@ -96,21 +96,3 @@ block content
td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY")
td.col-xs-6
a(href=challenge.solution, target='_blank') View my solution
-
- br
- if (bonfires.length > 0)
- .col-sm-12
- table.table.table-striped
- thead
- tr
- th.col-xs-4 Bonfire
- th.col-xs-2 Completed
- th.col-xs-6 Solution
- for bonfire in bonfires
- tr
- td.col-xs-4
- a(href='/challenges/' + bonfire.name, target='_blank')= bonfire.name
- td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY")
- td.col-xs-6
- pre.wrappable= bonfire.solution
- br
From d752e5b4874cbf6af4e63fb562782336a13ef1bb Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 4 Aug 2015 15:09:42 -0700
Subject: [PATCH 064/548] on login double check that github username if
different, assign user to new name
---
common/models/User-Identity.js | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 781ea7d0ac..3df7f01400 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -41,20 +41,23 @@ export default function(UserIdent) {
userChanged = true;
}
- // if user is not github cool
- // and user signed in with github
+ // if user signed in with github
+ // and user is not github cool
+ // or username is different from github username
// then make them github cool
// and set their username from their github profile.
- if (!user.isGithubCool && userIdent.provider === 'github-login') {
- debug(`
- user isn't github cool yet but signed in with github
- lets make them cool!
- `);
+ if (
+ userIdent.provider === 'github-login' &&
+ (!user.isGithubCool ||
+ user.username !== userIdent.provider.username.toLowerCase())
+ ) {
+ debug("user isn't github cool or username from github is different");
user.isGithubCool = true;
user.username = userIdent.profile.username.toLowerCase();
userChanged = true;
}
+
if (userChanged) {
return user.save(function(err) {
if (err) { return next(err); }
From 989cb87c00738a245ac10a5165d8a58e06278cb5 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 18:00:01 -0700
Subject: [PATCH 065/548] add redirect for now vanished field guide articles
---
server/boot/redirects.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/server/boot/redirects.js b/server/boot/redirects.js
index 12d3c171ae..d0816d6a69 100644
--- a/server/boot/redirects.js
+++ b/server/boot/redirects.js
@@ -4,7 +4,7 @@ module.exports = function(app) {
router.get('/nonprofit-project-instructions', function(req, res) {
res.redirect(
301,
- "https://github.com/FreeCodeCamp/freecodecamp/wiki/How-Free-Code-Camp's-Nonprofit-Projects-work"
+ "//github.com/FreeCodeCamp/freecodecamp/wiki/How-Free-Code-Camp's-Nonprofit-Projects-work"
);
});
@@ -14,7 +14,7 @@ module.exports = function(app) {
router.get('/privacy', function(req, res) {
res.redirect(
- 301, "https://github.com/FreeCodeCamp/freecodecamp/wiki/Free-Code-Camp's-Privacy-Policy"
+ 301, "//github.com/FreeCodeCamp/freecodecamp/wiki/Free-Code-Camp's-Privacy-Policy"
);
});
@@ -22,6 +22,10 @@ module.exports = function(app) {
res.redirect(301, '/map');
});
+ router.get('/field-guide/*', function(req, res) {
+ res.redirect(302, '//github.com/freecodecamp/freecodecamp/wiki')
+ });
+
router.get('/about', function(req, res) {
res.redirect(301, '/map');
});
From 3551cefb3dce007d14e83224877026251936c147 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 18:29:05 -0700
Subject: [PATCH 066/548] simplify account.jade view for github integration
---
server/views/account/account.jade | 130 ++++--------------------------
1 file changed, 15 insertions(+), 115 deletions(-)
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 81fc693860..25051caf25 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -2,112 +2,27 @@ extends ../layout
block content
script.
var challengeName = 'Account View'
- .panel.panel-info.min-height-1000(ng-controller="profileValidationController")
+ .panel.panel-info(ng-controller="profileValidationController")
.panel-heading.text-center Update your portfolio here:
.panel-body
- .container.text-center
+ if (!user.github)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ i.fa.fa-github
+ | Link GitHub with my account
+ .col-xs-12
form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm' ng-show="asyncComplete")
input(type='hidden', name='_csrf', value=_csrf)
-
- .col-sm-4.col-sm-offset-5
- h2 Bio
-
.form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='name') Name *
- .col-sm-4
- input.form-control(type='text', placeholder='Name', name='name', autocomplete="off", ng-model='user.name', ng-minlength='3', ng-maxlength='50', required='required', id='name')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.name.$invalid && profileForm.name.$error.required")
- alert(type='danger')
- span.ion-close-circled(id='#name-error')
- | Your name is required.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.name.$error.minlength && !profileForm.name.$pristine')
- alert(type='danger')
- span.ion-close-circled
- | Your name must be at least 3 characters.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.name.$error.maxlength && !profileForm.name.$pristine')
- alert(type='danger')
- span.ion-close-circled
- | Your name must be fewer than 50 characters.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='username') Username (path to public profile) *
- .col-sm-4
- input.form-control(type='text', placeholder='username' name='username', autocomplete="off", id='username', ng-model='user.username', required='required', ng-minlength='5', ng-maxlength='20', ng-keypress='', unique-username='', ng-pattern="/^[A-z0-9_]+$/", ng-disabled='user.isGithubCool')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.pattern")
- alert(type='danger')
- span.ion-close-circled
- | Your username should only contain letters, numbers and underscores (az10_).
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.required")
- alert(type='danger')
- span.ion-close-circled
- | Your username is required.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.minlength && !profileForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Your username must be at least 5 characters.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.maxlength && !profileForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Your username must be fewer than 15 characters.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.username.$error.unique && !profileForm.username.$pristine && $scope.storedUsername !== user.username")
- alert(type='danger')
- span.ion-close-circled
- | That username is already in use.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="user.isGithubCool")
- alert(type='info')
- span.ion-close-circled
- | You are GithubCool! Your username cannot be changed.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') Email *
- .col-sm-4
- input.form-control(type='email', name='email', id='email', autocomplete="off", ng-model='user.email', required='required', ng-keypress='', unique-email='')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.email.$error.required")
- alert(type='danger')
- span.ion-close-circled
- | Your email address is required.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.$error.email && !profileForm.email.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid email format.
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.email.$error.unique && !profileForm.email.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | That email is already in use.
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='location') Location
- .col-sm-4
- input.form-control(type='text', name='location', autocomplete="off", id='location', ng-model='user.location')
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') Link to Profile Photo (1:1 ratio)
- .col-sm-4
- input.form-control(type='url', name='picture', id='picture', ng-model='user.picture', placeholder='http://www.example.com/image.jpg')
- .col-sm-4.col-sm-offset-5(ng-show="profileForm.picture.$error.url && !profileForm.picture.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com/image.jpg).
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='bio') Bio (140 characters)
+ label.col-sm-3.col-sm-offset-1.control-label(for='bio') Bio (140 characters)
.col-sm-4
input.form-control(type='text', name='bio', autocomplete="off", ng-model='user.bio', ng-maxlength='140', id='bio')
.col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.bio.$error.maxlength && !profileForm.bio.$pristine')
alert(type='danger')
span.ion-close-circled
| Your bio must be fewer than 140 characters.
-
.form-group
- .col-sm-offset-5.col-sm-4
- button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
- span.ion-edit
- | Update my Bio
-
- .col-sm-4.col-sm-offset-5
- h2 Social Profiles
-
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') Twitter
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') Twitter
.col-sm-4
.input-group.twitter-input
span.input-group-addon @
@@ -120,17 +35,9 @@ block content
alert(type='danger')
span.ion-close-circled
| Your name must be fewer than 15 characters.
- .form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') GitHub
- .col-sm-4
- input.form-control(type='url', name='githubProfile', id='githubProfile', autocomplete="off", ng-model='user.githubProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.githubProfile.$error.url && !profileForm.githubProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
.form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') CodePen
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') CodePen
.col-sm-4
input.form-control(type='url', name='codepenProfile', id='codepenProfile', autocomplete="off", ng-model='user.codepenProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine")
@@ -139,7 +46,7 @@ block content
| Please enter a valid URL format (http://www.example.com).
.form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') LinkedIn
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') LinkedIn
.col-sm-4
input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', autocomplete="off", ng-model='user.linkedinProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine")
@@ -148,7 +55,7 @@ block content
| Please enter a valid URL format (http://www.example.com).
.form-group
- label.col-sm-3.col-sm-offset-2.control-label(for='email') Facebook
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') Facebook
.col-sm-4
input.form-control(type='url', name='facebookProfile', id='facebookProfile', autocomplete="off", ng-model='user.facebookProfile', placeholder='http://')
.col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.facebookProfile.$error.url && !profileForm.facebookProfile.$pristine")
@@ -156,21 +63,14 @@ block content
span.ion-close-circled
| Please enter a valid URL format (http://www.example.com).
- .form-group
- .col-sm-offset-5.col-sm-4
- button.btn.btn-primary.btn-block(type='submit', ng-disabled='profileForm.$invalid')
- span.ion-edit
- | Update my Social Links
+ a.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='profileForm.$invalid')
+ i.fa.fa-submit
+ | Update my info
.panel.panel-info
.panel-heading.text-center Manage your account here:
.panel-body
if (!user.google || !user.facebook || !user.linkedin || !user.twitter)
- if (!user.github)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
- i.fa.fa-github
- | Link GitHub with my account
if (!user.twitter)
.col-xs-12
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social.disabled(href='#')
From 3c4142c92c5400bb6401af6b2ceb3b04c17bd2f5 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 18:43:40 -0700
Subject: [PATCH 067/548] fix profile update button
---
server/boot/user.js | 23 -----------------------
server/views/account/account.jade | 4 ++--
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/server/boot/user.js b/server/boot/user.js
index 0d96a71295..7278e0a07d 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -278,35 +278,12 @@ module.exports = function(app) {
return res.redirect('/account');
}
var body = req.body || {};
- user.email = body.email.trim() || '';
- user.name = body.name.trim() || '';
- user.username = body.username.trim() || '';
- user.location = body.location.trim() || '';
-
- user.githubProfile = body.githubProfile.trim() || '';
user.facebookProfile = body.facebookProfile.trim() || '';
user.linkedinProfile = body.linkedinProfile.trim() || '';
-
user.codepenProfile = body.codepenProfile.trim() || '';
user.twitterHandle = body.twitterHandle.trim() || '';
user.bio = body.bio.trim() || '';
- user.picture = body.picture.trim() ||
- 'https://s3.amazonaws.com/freecodecamp/' +
- 'camper-image-placeholder.png';
- user.website1Title = body.website1Title.trim() || '';
- user.website1Link = body.website1Link.trim() || '';
- user.website1Image = body.website1Image.trim() || '';
-
- user.website2Title = body.website2Title.trim() || '';
- user.website2Link = body.website2Link.trim() || '';
- user.website2Image = body.website2Image.trim() || '';
-
- user.website3Title = body.website3Title.trim() || '';
- user.website3Link = body.website3Link.trim() || '';
- user.website3Image = body.website3Image.trim() || '';
-
-
user.save(function(err) {
if (err) {
return next(err);
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 25051caf25..b1204b264e 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -63,8 +63,8 @@ block content
span.ion-close-circled
| Please enter a valid URL format (http://www.example.com).
- a.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='profileForm.$invalid')
- i.fa.fa-submit
+ button.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='profileForm.$invalid')
+ span.ion-edit
| Update my info
.panel.panel-info
From 932bc0ab657739fe83d0f81663285b1b6829c041 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 23:24:26 -0700
Subject: [PATCH 068/548] continue working on jquery challenges
---
seed/challenges/jquery-ajax-and-json.json | 546 +++++++++++++++++++++-
1 file changed, 544 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index ed9c2c64c9..d4158154cd 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -793,9 +793,9 @@
"difficulty": 3.16,
"description": [
"You can also target all the even-numbered elements.",
- "Note that computers start counting at zero, so technically, the first element is actually element number zero, which is an odd number.",
+ "Note that computers start counting at zero, so technically, the first element is actually element number zero, which is an even number.",
"So what a human would consider odd numbers: 1, 3, 5, 7 - a computer would actually consider odd numbers.",
- "Here's how you would target all the odd-numbered elements with class \"target\" and give them classes: $('.target:odd').addClass('animated shake');
",
+ "Here's how you would target all the odd-numbered elements with class \"target\" and give them classes: $('.target:odd').addClass('animated bounce');
",
"Try selecting all the even-numbered elements - that is, what your browser will consider even-numbered elements - and giving them the classes of \"animated\" and \"shake\"."
],
"tests": [
@@ -846,6 +846,67 @@
"challengeType": 0
},
+ {
+ "id": "bad87fee1348bd9bed008826",
+ "name": "Waypoint: Target Odd Numbered Elements Using jQuery",
+ "dashedName": "waypoint-target-odd-numbered-elements-using-jquery",
+ "difficulty": 3.165,
+ "description": [
+ "You can also target all the odd-numbered elements.",
+ "Note that computers start counting at zero, so technically, the first element is actually element number zero, which is an even number.",
+ "So what a human would consider odd numbers: 1, 3, 5, 7 - a computer would actually consider odd numbers.",
+ "Here's how you would target all the even-numbered elements with class \"target\" and give them classes: $('.target:even').addClass('animated bounce');
",
+ "Try selecting all the odd-numbered elements - that is, what your browser will consider even-numbered elements - and giving them the classes of \"animated\" and \"fadeOut\"."
+ ],
+ "tests": [
+ "assert($('.target:odd').hasClass('animated') && ($('.target:odd').hasClass('fadeOut') || $('.target:odd').hasClass('fadeout')), 'All the \"target\" elements that computer considers odd should fade out.')",
+ "assert(editor.match(/\\:even/g), 'You should use the :even
function to modify these elements.')",
+ "assert(editor.match(//g), 'Only use jQuery to add these classes to the element.')"
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('#target1').css('color', 'red');",
+ " $('#target1').prop('disabled', true);",
+ " $('#target4').remove();",
+ " $('#target2').appendTo('#right-well');",
+ " $('#target5').clone().appendTo('#left-well');",
+ " $('#target1').parent().css('background-color', 'red');",
+ " $('#right-well').children().css('color', 'green');",
+ " $('#left-well').children().css('color', 'green');",
+ " $('.target:nth-child(2)').addClass('animated bounce');",
+ " $('.target:even').addClass('animated shake');",
+ "",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "",
+ "
jQuery Playground ",
+ "
",
+ "
",
+ "
#left-well ",
+ "
",
+ " #target1 ",
+ " #target2 ",
+ " #target3 ",
+ "
",
+ "
",
+ "
",
+ "
#right-well ",
+ "
",
+ " #target4 ",
+ " #target5 ",
+ " #target6 ",
+ "
",
+ "
",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
{
"id": "bad87fee1348bd9aecb08826",
"name": "Waypoint: Use jQuery to Modify the Entire Page",
@@ -873,6 +934,7 @@
" $('#left-well').children().css('color', 'green');",
" $('.target:nth-child(2)').addClass('animated bounce');",
" $('.target:even').addClass('animated shake');",
+ " $('.target:even').addClass('animated fadeOut');",
"",
" });",
"fcces",
@@ -902,6 +964,486 @@
"
"
],
"challengeType": 0
+ },
+
+ {
+ "id": "bad87fee1348bd9aeca08826",
+ "name": "Waypoint: Trigger on click Events with jQuery",
+ "dashedName": "waypoint-trigger-onclick-events-with-jquery",
+ "difficulty": 3.19,
+ "description": [
+ ".on('click', function() {
",
+ "",
+ "});"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ "",
+ " });
",
+ "fcces",
+ "",
+ "",
+ "",
+ "",
+ " ",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc58826",
+ "name": "Waypoint: Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ "",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc48826",
+ "name": "Waypoint: Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc38826",
+ "name": "Waypoint: Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text('happy text');",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc28826",
+ "name": "Waypoint: Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text($('#check-me').prop('checked'));",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc18826",
+ "name": "Waypoint: Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text($('#check-me').prop('checked'));",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad87fee1348bd9aecc08826",
+ "name": "Waypoint: Trigger onHover Events with jQuery",
+ "dashedName": "waypoint-trigger-onhover-events-with-jquery",
+ "difficulty": 3.18,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+
+ ],
+ "challengeType": 0
+ },
+
+
+ {
+ "id": "bad87fee1348bd9aebc08726",
+ "name": "Waypoint: Learn how JSON Works",
+ "dashedName": "waypoint-learn-how-json-works",
+ "difficulty": 3.21,
+ "description": [
+ "JSON stands for \"JavaScript Object Notation\". It's how you create objects in JavaScript.",
+ "JSON is a series of \"key-value pairs\". Everything on the left of the colon (
:
) is the \"key\" you use to unlock the \"value\" on the right of the colon."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "[",
+ " {",
+ " \"id\": 0,",
+ " \"imageLink\": \"http://rs611.pbsrc.com/albums/tt194/allypopper423/Funny-Cat-Green-Avacado.jpg~c200\",",
+ " \"codeNames\": [",
+ " \"Juggernaut\",",
+ " \"Mrs. Wallace\",",
+ " \"Buttercup\"",
+ " ]",
+ " },",
+ " {",
+ " \"id\": 1,",
+ " \"imageLink\": \"http://cdn.grumpycats.com/wp-content/uploads/2012/09/GC-Gravatar-copy.png\",",
+ " \"codeNames\": [",
+ " \"Oscar\",",
+ " \"Scrooge\",",
+ " \"Tyrion\"",
+ " ]",
+ " },",
+ " {",
+ " \"id\": 2,",
+ " \"imageLink\": \"http://www.kittenspet.com/wp-content/uploads/2012/08/cat_with_funny_face_3-200x200.jpg\",",
+ " \"codeNames\": [",
+ " \"The Doctor\",",
+ " \"Loki\",",
+ " \"Joker\"",
+ " ]",
+ " }",
+ "]"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad87fee1348bd9aebc08826",
+ "name": "Waypoint: Get Data from an URL Using jQuery",
+ "dashedName": "waypoint-get-data-from-a-url-using-jquery",
+ "difficulty": 3.21,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ "",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad87fee1348bd9ae9c08826",
+ "name": "Waypoint: Loop through JSON Data Using jQuery",
+ "dashedName": "waypoint-loop-through-json-data-using-jquery",
+ "difficulty": 3.22,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ "",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08726",
+ "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08626",
+ "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08526",
+ "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " $(\"
\").appendTo('#output');",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08426",
+ "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " $(\"
\").appendTo('#output');",
+ " $(\"
Code name: \" + kitten.codeNames[random()] + \" \").appendTo('#output');",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0
}
]
}
From fa86f650e25f479e9f674bd2cd65770d5ad6078f Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 4 Aug 2015 23:31:00 -0700
Subject: [PATCH 069/548] update cats to fetch from s3
---
public/json/cats.json | 6 +--
seed/challenges/bootstrap.json | 68 +++++++++++++++---------------
seed/challenges/html5-and-css.json | 50 +++++++++++-----------
3 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/public/json/cats.json b/public/json/cats.json
index 209e8ae685..84d9d1b243 100644
--- a/public/json/cats.json
+++ b/public/json/cats.json
@@ -1,7 +1,7 @@
[
{
"id": 0,
- "imageLink": "http://rs611.pbsrc.com/albums/tt194/allypopper423/Funny-Cat-Green-Avacado.jpg~c200",
+ "imageLink": "https://s3.amazonaws.com/freecodecamp/funny-cat.jpg",
"codeNames": [
"Juggernaut",
"Mrs. Wallace",
@@ -10,7 +10,7 @@
},
{
"id": 1,
- "imageLink": "http://cdn.grumpycats.com/wp-content/uploads/2012/09/GC-Gravatar-copy.png",
+ "imageLink": "https://s3.amazonaws.com/freecodecamp/grumpy-cat.jpg",
"codeNames": [
"Oscar",
"Scrooge",
@@ -19,7 +19,7 @@
},
{
"id": 2,
- "imageLink": "http://www.kittenspet.com/wp-content/uploads/2012/08/cat_with_funny_face_3-200x200.jpg",
+ "imageLink": "https://s3.amazonaws.com/freecodecamp/mischievous-cat.jpg",
"codeNames": [
"The Doctor",
"Loki",
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 5a89962f12..eaec28238b 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -50,7 +50,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -92,14 +92,14 @@
"dashedName": "waypoint-make-images-mobile-responsive",
"difficulty": 2.02,
"description": [
- "First, Add a new image with the src
attribute of \"http://bit.ly/fcc-kittens2\".",
+ "First, Add a new image with the src
attribute of \"http://bit.ly/fcc-running-cats\".",
"It would be great if this image could be exactly the width of our phone's screen.",
"Fortunately, with Bootstrap, all we need to do is add the \"img-responsive\" class to your image. Do this, and the image should perfectly fit the width of your page."
],
"tests": [
"assert($('img').length > 1, 'You should have a total of two images.')",
"assert($('img').hasClass('img-responsive'), 'Your new image should have the class \"img-responsive\".')",
- "assert(new RegExp('http://bit.ly/fcc-kittens2', 'gi').test($('img.img-responsive').attr('src')), 'Add a second image with the src
of http://bit.ly/fcc-kittens2
.')"
+ "assert(new RegExp('http://bit.ly/fcc-running-cats', 'gi').test($('img.img-responsive').attr('src')), 'Add a second image with the src
of http://bit.ly/fcc-kittens2
.')"
],
"challengeSeed": [
" ",
@@ -134,7 +134,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" Things cats love:
",
" ",
@@ -216,9 +216,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Things cats love:
",
" ",
" cat nip ",
@@ -301,9 +301,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Things cats love:
",
" ",
" cat nip ",
@@ -389,9 +389,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Like ",
" Things cats love:
",
" ",
@@ -476,9 +476,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Like ",
" Things cats love:
",
" ",
@@ -564,9 +564,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Like ",
" Things cats love:
",
" ",
@@ -652,9 +652,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Like ",
" Info ",
" Things cats love:
",
@@ -745,9 +745,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" Like ",
" Info ",
" Delete ",
@@ -836,9 +836,9 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
- " ",
+ " ",
" ",
"
",
"
Like ",
@@ -925,9 +925,9 @@
"
",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1009,10 +1009,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1094,10 +1094,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1179,10 +1179,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1265,10 +1265,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1358,10 +1358,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
" Like ",
@@ -1460,10 +1460,10 @@
"
CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
- "
",
+ "
",
"
",
"
",
"
Like",
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index 7cbb0d11c7..3297602d56 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -814,7 +814,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -877,7 +877,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -943,7 +943,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1009,7 +1009,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1078,7 +1078,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1155,7 +1155,7 @@
"",
"
cat photos ",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1223,7 +1223,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1254,7 +1254,7 @@
"difficulty": 1.25,
"description": [
"You can make elements into links by nesting them within an
a
element.",
- "Nest your image within an
a
element. Here's an example:
<a href='#'><img src='http://bit.ly/fcc-kittens2'/></a>
.",
+ "Nest your image within an
a
element. Here's an example:
<a href='#'><img src='http://bit.ly/fcc-running-cats'/></a>
.",
"Remember to use the hash symbol (#) as your
a
element's
href
property in order to turn it into a dead link.",
"Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link."
],
@@ -1295,7 +1295,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1315,7 +1315,7 @@
"descriptionDe": [
"Umschließe dein
img
Element mit einem
a
Element als toten Link.",
"Du kannst jedes Element in einen Link verwandeln, indem du es mit einem
a
Element umschließt.",
- "Umschließe nun dein Bild mit einem
a
Element. Hier ist ein Beispiel:
<a href='#'><img src='http://bit.ly/fcc-kittens2'/></a>
.",
+ "Umschließe nun dein Bild mit einem
a
Element. Hier ist ein Beispiel:
<a href='#'><img src='http://bit.ly/fcc-running-cats'/></a>
.",
"Vergewissere dich, dass du ein Hash Symbol (#) innerhalb des
href
Attributs des
a
Elements nutzt, um daraus einen toten Link zu machen.",
"Sobald du das gemacht hast, kannst du mit der Maus über dein Bild fahren. Der normale Mauszeiger sollte nun zu einer Hand für Links werden. Das Bild ist jetzt ein Link."
]
@@ -1366,7 +1366,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1445,7 +1445,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1521,7 +1521,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
Things cats love:
",
"
",
@@ -1596,7 +1596,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1675,7 +1675,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1757,7 +1757,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1839,7 +1839,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1920,7 +1920,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2010,7 +2010,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2101,7 +2101,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2186,7 +2186,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2278,7 +2278,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2369,7 +2369,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"",
"
Things cats love:
",
@@ -2457,7 +2457,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
",
"
Things cats love:
",
@@ -2547,7 +2547,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
",
"
Things cats love:
",
From 959fde64fcf39b3b0a576448b34d88cf803ca9e2 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 5 Aug 2015 00:06:20 -0700
Subject: [PATCH 070/548] add a span challenge and replace more old outside
images with s3 images
---
seed/challenges/basic-javascript.json | 6 +-
seed/challenges/bootstrap.json | 153 +++++++++++++++++++++-----
seed/challenges/html5-and-css.json | 54 ++++-----
3 files changed, 157 insertions(+), 56 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index ab30786d54..f1eb0f575c 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1130,7 +1130,7 @@
" var slotTwo;",
" var slotThree;",
" ",
- " var images = ['http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens'];",
+ " var images = ['https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat'];",
" ",
" /*Don't modify above here*/",
" ",
@@ -1284,7 +1284,7 @@
" var slotTwo;",
" var slotThree;",
" ",
- " var images = ['http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens'];",
+ " var images = ['https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat'];",
" ",
" slotOne = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
" slotTwo = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
@@ -1445,7 +1445,7 @@
" var slotThree;",
" ",
" //Placeholder",
- " var images = ['http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens','http://bit.ly/fcc-kittens'];",
+ " var images = ['https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat','https://bit.ly/fcc-relaxing-cat'];",
" ",
" slotOne = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
" slotTwo = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index eaec28238b..e1af8339c0 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -50,7 +50,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -99,7 +99,7 @@
"tests": [
"assert($('img').length > 1, 'You should have a total of two images.')",
"assert($('img').hasClass('img-responsive'), 'Your new image should have the class \"img-responsive\".')",
- "assert(new RegExp('http://bit.ly/fcc-running-cats', 'gi').test($('img.img-responsive').attr('src')), 'Add a second image with the src
of http://bit.ly/fcc-kittens2
.')"
+ "assert(new RegExp('http://bit.ly/fcc-running-cats', 'gi').test($('img.img-responsive').attr('src')), 'Add a second image with the src
of http://bit.ly/fcc-running-cats
.')"
],
"challengeSeed": [
" ",
@@ -134,7 +134,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" Things cats love:
",
" ",
@@ -216,7 +216,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Things cats love:
",
@@ -301,7 +301,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Things cats love:
",
@@ -389,7 +389,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Like ",
@@ -476,7 +476,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Like ",
@@ -564,7 +564,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Like ",
@@ -652,7 +652,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Like ",
@@ -745,7 +745,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" Like ",
@@ -787,7 +787,7 @@
"descriptionPt": []
},
{
- "id": "bad87fee1348bd9aedf08845",
+ "id": "bad87fee1348bd9aedf08745",
"name": "Waypoint: Ditch Custom CSS for Bootstrap",
"dashedName": "waypoint-ditch-custom-css-for-bootstrap",
"difficulty": 2.10,
@@ -836,7 +836,7 @@
"",
" Click here for cat photos .
",
"",
- " ",
+ " ",
"",
" ",
" ",
@@ -885,6 +885,107 @@
"namePt": "",
"descriptionPt": []
},
+ {
+ "id": "bad87fee1348bd9aedf08845",
+ "name": "Waypoint: Use Spans for Inline Elements",
+ "dashedName": "waypoint-use-spans-for-inline-elements",
+ "difficulty": 2.105,
+ "description": [
+ "You can use use spans to create inline elements. Remember when we used the \"btn-block\" class to make the button grow fill the entire row?",
+ "This image illustrates the difference between \"inline\" elements and \"block-level\" elements:",
+ "
",
+ "By using the
span
element, you can put several elements together, and even style different parts of the same element differently.",
+ "Nest the word \"love\" in your \"Things cats love\" element below withing a
span
element. Then give that
span
the class \"text-danger\" to make the text red.",
+ "Here's how you would do this with the \"Top 3 things cats hate\" element:
<p>Top 3 things cats <span class\"text-danger\">hate</span></p>
"
+ ],
+ "tests": [
+ "assert($('p span') && $('p span').length > 0, 'Your
span
element should be inside your
p
element.')",
+ "assert($('p span') && $('p span').text().match(/love/i), 'Your
span
element should have the text \"love\".')",
+ "assert($('span').hasClass('text-danger'), 'Your
span
element should have class \"text-danger\".')",
+ "assert(editor.match(/<\\/span>/g) && editor.match(/
/g).length === editor.match(/span element has a closing tag.')"
+ ],
+ "challengeSeed": [
+ " ",
+ "",
+ "",
+ "",
+ "
CatPhotoApp ",
+ "",
+ "
Click here for cat photos .
",
+ "",
+ "
",
+ "",
+ "
",
+ "
",
+ "
",
+ " Like ",
+ "
",
+ "
",
+ " Info ",
+ "
",
+ "
",
+ " Delete ",
+ "
",
+ "
",
+ "
Things cats love:
",
+ "
",
+ " cat nip ",
+ " laser pointers ",
+ " lasagna ",
+ " ",
+ "
Top 3 things cats hate:
",
+ "
",
+ " flea treatment ",
+ " thunder ",
+ " other cats ",
+ " ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
{
"id": "bad87fee1348bd9aede08845",
"name": "Waypoint: Create a Custom Heading",
@@ -925,7 +1026,7 @@
"",
"
CatPhotoApp ",
"",
- "
",
+ "
",
"",
"
",
"
",
@@ -939,7 +1040,7 @@
" Delete ",
"
",
"
",
- " Things cats love:
",
+ " Things cats love:
",
" ",
" cat nip ",
" laser pointers ",
@@ -1009,7 +1110,7 @@
" CatPhotoApp ",
" ",
" ",
- "
",
+ "
",
"
",
" ",
"
",
@@ -1024,7 +1125,7 @@
"
Delete ",
"
",
"
",
- " Things cats love:
",
+ " Things cats love:
",
" ",
" cat nip ",
" laser pointers ",
@@ -1094,7 +1195,7 @@
" CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
"
",
@@ -1109,7 +1210,7 @@
"
Delete ",
"
",
"
",
- "
Things cats love:
",
+ "
Things cats love:
",
"
",
" cat nip ",
" laser pointers ",
@@ -1179,7 +1280,7 @@
" CatPhotoApp ",
" ",
" ",
- "
",
+ "
",
"
",
" ",
"
",
@@ -1194,7 +1295,7 @@
"
Delete",
"
",
"
",
- "
Things cats love:
",
+ "
Things cats love:
",
"
",
" cat nip ",
" laser pointers ",
@@ -1265,7 +1366,7 @@
" CatPhotoApp ",
" ",
"
",
- "
",
+ "
",
"
",
"
",
" ",
@@ -1280,7 +1381,7 @@
" Delete ",
" ",
" ",
- " Things cats love:
",
+ " Things cats love:
",
" ",
" cat nip ",
" laser pointers ",
@@ -1358,7 +1459,7 @@
" CatPhotoApp ",
" ",
" ",
- "
",
+ "
",
"
",
" ",
" ",
@@ -1373,7 +1474,7 @@
" Delete ",
" ",
" ",
- " Things cats love:
",
+ " Things cats love:
",
" ",
" cat nip ",
" laser pointers ",
@@ -1460,7 +1561,7 @@
" CatPhotoApp ",
" ",
" ",
- "
",
+ "
",
"
",
" ",
" ",
@@ -1475,7 +1576,7 @@
" Delete ",
" ",
" ",
- " Things cats love:
",
+ " Things cats love:
",
" ",
" cat nip ",
" laser pointers ",
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index 3297602d56..3dc4714ad3 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -734,11 +734,11 @@
"description": [
"You can add images to your website by using the img
element, and point to an specific image's URL using the src
attribute.",
"An example of this would be <img src=\"www.your-image-source.com/your-image.jpg\"/>
. Note that in most cases, img
elements are self-closing.",
- "Try it with this image: http://bit.ly/fcc-kittens
."
+ "Try it with this image: https://bit.ly/fcc-relaxing-cat
."
],
"tests": [
"assert($('img').length > 0, 'Your page should have an image element.')",
- "assert($('img').filter(function(index) { return /http:\\/\\/bit\\.ly\\/fcc-kittens/gi.test($('img').attr('src')); }).length > 0, 'Your image should have have a src
attribute that points to the kitten image.')"
+ "assert($('img').filter(function(index) { return /http:\\/\\/bit\\.ly\\/fcc-relaxing-cat/gi.test($('img').attr('src')); }).length > 0, 'Your image should have have a src
attribute that points to the kitten image.')"
],
"challengeSeed": [
" ",
@@ -775,10 +775,10 @@
"descriptionPt": [],
"nameDe": "Waypoint: Füge Bilder zu deiner Website hinzu",
"descriptionDe": [
- "Nutze ein img
Element um das Bild http://bit.ly/fcc-kittens
einzufügen.",
+ "Nutze ein img
Element um das Bild https://bit.ly/fcc-relaxing-cat
einzufügen.",
"Du kannst img
Elemente verwenden, um Bilder in deine Website einzubauen. Um zur URL des Bildes zu verweisen, benutzt du das src
Attribut.",
"Ein Beispiel dafür wäre <img src=\"www.bild-quelle.com/bild.jpg\"/>
. Beachte, dass img
Elemente in den meisten Fällen selbstschließend sind.",
- "Versuche es mit diesem Bild: http://bit.ly/fcc-kittens
."
+ "Versuche es mit diesem Bild: https://bit.ly/fcc-relaxing-cat
."
]
},
{
@@ -814,7 +814,7 @@
"",
"CatPhotoApp ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -877,7 +877,7 @@
"",
"CatPhotoApp ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -943,7 +943,7 @@
"",
"CatPhotoApp ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1009,7 +1009,7 @@
"",
"CatPhotoApp ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1078,7 +1078,7 @@
"",
"CatPhotoApp ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1155,7 +1155,7 @@
"",
"cat photos ",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1223,7 +1223,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1295,7 +1295,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1366,7 +1366,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1445,7 +1445,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
@@ -1521,7 +1521,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1596,7 +1596,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1675,7 +1675,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1757,7 +1757,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1839,7 +1839,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -1920,7 +1920,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2010,7 +2010,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2101,7 +2101,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2186,7 +2186,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2278,7 +2278,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"Things cats love:
",
"",
@@ -2369,7 +2369,7 @@
"",
"Click here for cat photos .
",
"",
- " ",
+ " ",
"",
"",
"
Things cats love:
",
@@ -2457,7 +2457,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
",
"
Things cats love:
",
@@ -2547,7 +2547,7 @@
"",
"
Click here for cat photos .
",
"",
- "
",
+ "
",
"",
"
",
"
Things cats love:
",
From ceed3c4877fb1b85051d50990d188d840232675f Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Wed, 5 Aug 2015 15:38:54 +0100
Subject: [PATCH 071/548] Fix some typos
---
seed/challenges/basic-javascript.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index ab30786d54..0325880343 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -601,7 +601,7 @@
],
"challengeSeed": [
"var myArray = ['John', 23, ['dog', 3]];",
- "var removed = myArray;//This should be ['John'] and myArray should now be ['John', 23]",
+ "var removed = myArray;//This should be ['John'] and myArray should now be [23, ['dog', 3]]",
"",
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);"
@@ -752,7 +752,7 @@
" \"friends\": []",
"};",
"",
- "//Let's add the property age to myDog",
+ "//Let's add the property bark to myDog",
"",
"",
"//Now delete the property tails",
From e7cac3ccf9d9d34479ee03e5175e6847beb1191c Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Wed, 5 Aug 2015 16:54:57 +0100
Subject: [PATCH 072/548] fix
https://github.com/FreeCodeCamp/freecodecamp/issues/1559
---
seed/challenges/basic-javascript.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 0325880343..15397ea2f1 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1027,7 +1027,7 @@
],
"tests":[
"assert(test === 2, 'Your RegEx should have found two numbers in the testString');",
- "assert(editorValue.match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');"
+ "assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');"
],
"challengeSeed":[
"var test = (function(){",
@@ -1058,7 +1058,7 @@
],
"tests":[
"assert(test === 7, 'Your RegEx should have found seven spaces in the testString');",
- "assert(editorValue.match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');"
+ "assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');"
],
"challengeSeed":[
"var test = (function(){",
@@ -1087,7 +1087,7 @@
],
"tests":[
"assert(test === 36, 'Your RegEx should have found seven spaces in the testString');",
- "assert(editorValue.match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');"
+ "assert(editor.getValue().match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');"
],
"challengeSeed":[
"var test = (function(){",
From 91c7bce758987e02cf4e345fa9bb44bc318efaa9 Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Wed, 5 Aug 2015 17:04:02 +0100
Subject: [PATCH 073/548] Font on submit buttons should be correct now
---
public/css/main.less | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/public/css/main.less b/public/css/main.less
index 7773265028..c828412661 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -1152,6 +1152,10 @@ hr {
shape-rendering: crispEdges;
}
+#submitButton {
+ font: normal normal normal 14px/1 FontAwesome !important;
+}
+
//uncomment this to see the dimensions of all elements outlined in red
//* {
// border-color: red;
From 61c8eb15956607838972d2a41dc2d3c0769fad50 Mon Sep 17 00:00:00 2001
From: "Cristian V. Nica"
Date: Wed, 5 Aug 2015 19:08:49 +0300
Subject: [PATCH 074/548] Trying to fix issue #1562
In Use Bracket Notation to Find the Nth to Last Character in a String:
There is a mistake in the code sample:
It should be: var thirdToLastLetterOfFirstName =
firstName[firstName.length - 3];
but is: var thirdToLastLetterOfFirstName = firstName[firstName.length -
2];
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 0325880343..f03ada50f4 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -259,7 +259,7 @@
"challengeSeed": [
"var firstName = \"Madeline\";",
"",
- "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];",
+ "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];",
"",
"var lastName = \"Chen\";",
"",
From f68c6d0fa3f5ecc8bfe4f1a0b256b9374264dadd Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Wed, 5 Aug 2015 17:31:42 +0100
Subject: [PATCH 075/548] Changed the object lessons to use dot notation
instead of bracket
Fix https://github.com/FreeCodeCamp/freecodecamp/issues/1564
---
seed/challenges/basic-javascript.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 15397ea2f1..84a02c37f1 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -259,7 +259,7 @@
"challengeSeed": [
"var firstName = \"Madeline\";",
"",
- "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];",
+ "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];",
"",
"var lastName = \"Chen\";",
"",
@@ -725,9 +725,9 @@
"",
"Now that we have an objects we need to know how to add and remove properties from it",
"We add properties to objects like this",
- "myObject['myProperty'] = \"myValue\";
",
+ "myObject.myProperty = \"myValue\";
",
"They can also be deleted like this",
- "delete(myObject[\"myProperty\"]);
",
+ "delete(myObject.myProperty);
",
"Let's add the property bark",
""
],
From f656311b3e2c320af7174ceb6c3fc36e2b4d976c Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 10:47:08 -0700
Subject: [PATCH 076/548] remove comments from migration
---
seed/loopbackMigration.js | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js
index f6b98b8b7b..9754b4f8d9 100644
--- a/seed/loopbackMigration.js
+++ b/seed/loopbackMigration.js
@@ -38,13 +38,13 @@ function createConnection(URI) {
}
function createQuery(db, collection, options, batchSize) {
- return Rx.Observable.create(function (observer) {
+ return Rx.Observable.create(function(observer) {
var cursor = db.collection(collection).find({}, options);
cursor.batchSize(batchSize || 20);
// Cursor.each will yield all doc from a batch in the same tick,
// or schedule getting next batch on nextTick
debug('opening cursor for %s', collection);
- cursor.each(function (err, doc) {
+ cursor.each(function(err, doc) {
if (err) {
return observer.onError(err);
}
@@ -55,7 +55,7 @@ function createQuery(db, collection, options, batchSize) {
observer.onNext(doc);
});
- return Rx.Disposable.create(function () {
+ return Rx.Disposable.create(function() {
debug('closing cursor for %s', collection);
cursor.close();
});
@@ -161,33 +161,15 @@ var storyCount = dbObservable
})
.count();
-var commentCount = dbObservable
- .flatMap(function(db) {
- return createQuery(db, 'comments', {});
- })
- .bufferWithCount(20)
- .withLatestFrom(dbObservable, function(comments, db) {
- return {
- comments: comments,
- db: db
- };
- })
- .flatMap(function(dats) {
- return insertMany(dats.db, 'comment', dats.comments, { w: 1 });
- })
- .count();
-
Rx.Observable.combineLatest(
userIdentityCount,
userSavesCount,
storyCount,
- commentCount,
- function(userIdentCount, userCount, storyCount, commentCount) {
+ function(userIdentCount, userCount, storyCount) {
return {
userIdentCount: userIdentCount * 20,
userCount: userCount * 20,
- storyCount: storyCount * 20,
- commentCount: commentCount * 20
+ storyCount: storyCount * 20
};
})
.subscribe(
From 71ca6b1b5b5edb8a749075928f4e27d24e194f07 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 11:22:14 -0700
Subject: [PATCH 077/548] mark if user is github cool during migration
---
seed/loopbackMigration.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js
index 9754b4f8d9..333629438a 100644
--- a/seed/loopbackMigration.js
+++ b/seed/loopbackMigration.js
@@ -86,13 +86,13 @@ var users = dbObservable
.map(function(user) {
// flatten user
assign(user, user.portfolio, user.profile);
- return user;
- })
- .map(function(user) {
if (user.username) {
return user;
}
user.username = 'fcc' + uuid.v4().slice(0, 8);
+ if (user.github) {
+ user.isGithubCool = true;
+ }
return user;
})
.shareReplay();
@@ -122,7 +122,7 @@ var userIdentityCount = users
return {
provider: provider,
externalId: user[provider],
- userId: user.id
+ userId: user._id || user.id
};
})
.filter(function(ident) {
From 7f9c3b46cdc16ad5a66384fa4917840ea243e53b Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 11:48:12 -0700
Subject: [PATCH 078/548] fix typo directory should be plural
---
LICENSE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LICENSE.md b/LICENSE.md
index 99cafafc5b..8b5a0650f6 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -16,7 +16,7 @@ With respect to the computer software contained in this repository:
# Curricular Content
-With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectory and our wiki:
+With respect to the curricular content contained in this repository, as in the `./seed/challenges` and subdirectories and our wiki:
> By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
>
From 5ff371fc6f9bcf7be2a05c33d7b98d4e7e7fb2cc Mon Sep 17 00:00:00 2001
From: "Cristian V. Nica"
Date: Wed, 5 Aug 2015 21:55:25 +0300
Subject: [PATCH 079/548] Trying to fix: #1571
I have found a small typo on challenge: An Array Of new Information
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 0325880343..146693deef 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -423,7 +423,7 @@
"description": [
"",
"In JavaScript we can store lists or collections of data in what are called arrays",
- "Arrays are distinguished by the [
and ]
around the data. Each piece of data is separated be a ,
",
+ "Arrays are distinguished by the [
and ]
around the data. Each piece of data is separated by a ,
",
"Now let's create a new array called myArray
with a string
and a number
with a ,
separating each one",
"Refer to the example if you get stuck",
""
From 01e408d48c8806fc0a92e9245dbc0abfc8f80436 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 5 Aug 2015 11:57:58 -0700
Subject: [PATCH 080/548] new final-ish curriculum structure
---
seed/challenges/advanced-bonfires.json | 295 ++-----
seed/challenges/angularjs.json | 2 +-
.../automated-testing-and-debugging.json | 6 +
seed/challenges/basejumps.json | 2 +-
seed/challenges/basic-bonfires.json | 815 +-----------------
seed/challenges/basic-javascript.json | 2 +-
seed/challenges/basic-ziplines.json | 2 +-
seed/challenges/expert-bonfires.json | 304 +++++++
seed/challenges/functional-programming.json | 34 -
seed/challenges/git.json | 2 +-
seed/challenges/intermediate-bonfires.json | 800 +++++++++++++++--
seed/challenges/intermediate-ziplines.json | 2 +-
seed/challenges/mongodb.json | 2 +-
seed/challenges/nodejs-and-expressjs.json | 2 +-
...-oriented-and-functional-programming.json} | 32 +-
15 files changed, 1155 insertions(+), 1147 deletions(-)
create mode 100644 seed/challenges/automated-testing-and-debugging.json
create mode 100644 seed/challenges/expert-bonfires.json
delete mode 100644 seed/challenges/functional-programming.json
rename seed/challenges/{object-oriented-programming.json => object-oriented-and-functional-programming.json} (74%)
diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json
index 7aa5d85777..093580e24f 100644
--- a/seed/challenges/advanced-bonfires.json
+++ b/seed/challenges/advanced-bonfires.json
@@ -1,55 +1,46 @@
{
"name": "Advanced Algorithm Scripting",
- "order": 0.011,
+ "order": 0.010,
"challenges": [
{
- "id": "aff0395860f5d3034dc0bfc9",
- "name": "Bonfire: Validate US Telephone Numbers",
- "dashedName": "bonfire-validate-us-telephone-numbers",
- "difficulty": "4.01",
+ "id": "a2f1d72d9b908d0bd72bb9f6",
+ "name": "Bonfire: Make a Person",
+ "dashedName": "bonfire-make-a-person",
+ "difficulty": "3.01",
"description": [
- "Return true if the passed string is a valid US phone number",
- "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:",
- "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555",
- "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.",
+ "Fill in the object constructor with the methods specified in the tests.",
+ "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).",
+ "All functions that take an argument have an arity of 1, and the argument will be a string.",
+ "These methods must be the only available means for interacting with the object.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "tests": [
- "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");",
- "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"5555555555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);",
- "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);",
- "assert.deepEqual(telephoneCheck(\"55555555\"), false);",
- "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"27576227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);"
- ],
"challengeSeed": [
- "function telephoneCheck(str) {",
- " // Good luck!",
- " return true;",
- "}",
+ "var Person = function(firstAndLast) {",
+ " return firstAndLast;",
+ "};",
"",
- "",
- "",
- "telephoneCheck(\"555-555-5555\");"
+ "var bob = new Person('Bob Ross');",
+ "bob.getFullName();"
+ ],
+ "tests": [
+ "expect(Object.keys(bob).length).to.eql(6);",
+ "expect(bob instanceof Person).to.be.true;",
+ "expect(bob.firstName).to.be.undefined();",
+ "expect(bob.lastName).to.be.undefined();",
+ "expect(bob.getFirstName()).to.eql('Bob');",
+ "expect(bob.getLastName()).to.eql('Ross');",
+ "expect(bob.getFullName()).to.eql('Bob Ross');",
+ "bob.setFirstName('Happy');",
+ "expect(bob.getFirstName()).to.eql('Happy');",
+ "bob.setLastName('Trees');",
+ "expect(bob.getLastName()).to.eql('Trees');",
+ "bob.setFullName('George Carlin');",
+ "expect(bob.getFullName()).to.eql('George Carlin');",
+ "bob.setFullName('Bob Ross');"
],
"MDNlinks": [
- "RegExp"
+ "Closures",
+ "Details of the Object Model"
],
"challengeType": 5,
"nameCn": "",
@@ -64,31 +55,33 @@
"descriptionPt": []
},
{
- "id": "a3f503de51cf954ede28891d",
- "name": "Bonfire: Symmetric Difference",
- "dashedName": "bonfire-symmetric-difference",
- "difficulty": "4.02",
+ "id": "af4afb223120f7348cdfc9fd",
+ "name": "Bonfire: Map the Debris",
+ "dashedName": "bonfire-map-the-debris",
+ "difficulty": "3.02",
"description": [
- "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
- "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
+ "Return a new array that transforms the element's average altitude into their orbital periods.",
+ "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}
.",
+ "You can read about orbital periods on wikipedia .",
+ "The values should be rounded to the nearest whole number. The body being orbited is Earth.",
+ "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function sym(args) {",
- " return arguments;",
+ "function orbitalPeriod(arr) {",
+ " var GM = 398600.4418;",
+ " var earthRadius = 6367.4447;",
+ " return arr;",
"}",
"",
- "sym([1, 2, 3], [5, 2, 1, 4]);"
+ "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);"
],
"tests": [
- "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);",
- "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
- "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');",
- "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
+ "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);",
+ "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
],
"MDNlinks": [
- "Array.reduce()",
- "Symmetric Difference"
+ "Math.pow()"
],
"challengeType": 5,
"nameCn": "",
@@ -103,190 +96,32 @@
"descriptionPt": []
},
{
- "id": "aa2e6f85cab2ab736c9a9b24",
- "name": "Bonfire: Exact Change",
- "dashedName": "bonfire-exact-change",
- "difficulty": "4.03",
+ "id": "a3f503de51cfab748ff001aa",
+ "name": "Bonfire: Pairwise",
+ "dashedName": "bonfire-pairwise",
+ "difficulty": "3.03",
"description": [
- "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
- "cid is a 2d array listing available currency.",
- "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.",
- "Otherwise, return change in coin and bills, sorted in highest to lowest order.",
+ "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.",
+ "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.",
+ "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function drawer(price, cash, cid) {",
- " var change;",
- " // Here is your change, ma'am.",
- " return change;",
+ "function pairwise(arr, arg) {",
+ " return arg;",
"}",
"",
- "// Example cash-in-drawer array:",
- "// [['PENNY', 1.01],",
- "// ['NICKEL', 2.05],",
- "// ['DIME', 3.10],",
- "// ['QUARTER', 4.25],",
- "// ['ONE', 90.00],",
- "// ['FIVE', 55.00],",
- "// ['TEN', 20.00],",
- "// ['TWENTY', 60.00],",
- "// ['ONE HUNDRED', 100.00]]",
- "",
- "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);"
+ "pairwise([1,4,2,3,0,5], 7);"
],
"tests": [
- "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');",
- "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');"
+ "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);",
+ "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);",
+ "expect(pairwise([1,1,1], 2)).to.equal(1);",
+ "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);",
+ "expect(pairwise([], 100)).to.equal(0);"
],
"MDNlinks": [
- "Global Object"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a56138aff60341a09ed6c480",
- "name": "Bonfire: Inventory Update",
- "dashedName": "bonfire-inventory-update",
- "difficulty": "4.04",
- "description": [
- "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function inventory(arr1, arr2) {",
- " // All inventory must be accounted for or you're fired!",
- " return arr1;",
- "}",
- "",
- "// Example inventory lists",
- "var curInv = [",
- " [21, 'Bowling Ball'],",
- " [2, 'Dirty Sock'],",
- " [1, 'Hair Pin'],",
- " [5, 'Microphone']",
- "];",
- "",
- "var newInv = [",
- " [2, 'Hair Pin'],",
- " [3, 'Half-Eaten Apple'],",
- " [67, 'Bowling Ball'],",
- " [7, 'Toothpaste']",
- "];",
- "",
- "inventory(curInv, newInv);"
- ],
- "tests": [
- "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');",
- "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);",
- "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);"
- ],
- "MDNlinks": [
- "Global Array Object"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a7bf700cd123b9a54eef01d5",
- "name": "Bonfire: No repeats please",
- "dashedName": "bonfire-no-repeats-please",
- "difficulty": "4.05",
- "description": [
- "Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
- "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function permAlone(str) {",
- " return str;",
- "}",
- "",
- "permAlone('aab');"
- ],
- "tests": [
- "expect(permAlone('aab')).to.be.a('number');",
- "expect(permAlone('aab')).to.equal(2);",
- "expect(permAlone('aaa')).to.equal(0);",
- "expect(permAlone('aabb')).to.equal(8);",
- "expect(permAlone('abcdefa')).to.equal(3600);",
- "expect(permAlone('abfdefa')).to.equal(2640);",
- "expect(permAlone('zzzzzzzz')).to.equal(0);"
- ],
- "MDNlinks": [
- "Permutations",
- "RegExp"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a19f0fbe1872186acd434d5a",
- "name": "Bonfire: Friendly Date Ranges",
- "dashedName": "bonfire-friendly-date-ranges",
- "difficulty": "4.06",
- "description": [
- "Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
- "It must not show any redundant information in the date range.",
- "For example, if the year and month are the same then only the day range should be displayed.",
- "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.",
- "Input date is formatted as YYYY-MM-DD",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function friendly(str) {",
- " return str;",
- "}",
- "",
- "friendly(['2015-07-01', '2015-07-04']);"
- ],
- "tests": [
- "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
- "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
- "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
- "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
- "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
- "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
- ],
- "MDNlinks": [
- "String.split()",
- "String.substr()",
- "parseInt()"
+ "Array.reduce()"
],
"challengeType": 5,
"nameCn": "",
diff --git a/seed/challenges/angularjs.json b/seed/challenges/angularjs.json
index 48207fb41f..0e1b5acc32 100644
--- a/seed/challenges/angularjs.json
+++ b/seed/challenges/angularjs.json
@@ -1,6 +1,6 @@
{
"name": "AngularJS",
- "order": 0.015,
+ "order": 0.016,
"challenges": [
{
"id": "bd7154d8c441eddfaeb5bdef",
diff --git a/seed/challenges/automated-testing-and-debugging.json b/seed/challenges/automated-testing-and-debugging.json
new file mode 100644
index 0000000000..b19438acec
--- /dev/null
+++ b/seed/challenges/automated-testing-and-debugging.json
@@ -0,0 +1,6 @@
+{
+ "name": "Automated Testing and Debugging - Coming Soon",
+ "order": 0.011,
+ "challenges": [
+ ]
+}
diff --git a/seed/challenges/basejumps.json b/seed/challenges/basejumps.json
index 717a99a47d..44d406797c 100644
--- a/seed/challenges/basejumps.json
+++ b/seed/challenges/basejumps.json
@@ -1,6 +1,6 @@
{
"name": "Full Stack JavaScript Projects",
- "order": 0.017,
+ "order": 0.018,
"challenges": [
{
"id": "bd7158d8c443eddfaeb5bcef",
diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json
index 8d97403e21..c2f19318e1 100644
--- a/seed/challenges/basic-bonfires.json
+++ b/seed/challenges/basic-bonfires.json
@@ -1,13 +1,15 @@
{
"name": "Basic Algorithm Scripting",
- "order": 0.007,
+ "order": 0.006,
"challenges": [
{
"id": "bd7139d8c441eddfaeb5bdef",
"name": "Waypoint: Pair Program on Bonfires",
"dashedName": "waypoint-pair-program-on-bonfires",
"difficulty": 0.44,
- "challengeSeed": ["119657641"],
+ "challengeSeed": [
+ "119657641"
+ ],
"description": [
"Please note that the video for this challenge is a little outdated, and doesn't perfectly match these steps. We plan to record a new video soon.",
"OK, we're finally ready to start pair programming!",
@@ -715,815 +717,6 @@
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
- },
- {
- "id": "a3566b1109230028080c9345",
- "name": "Bonfire: Sum All Numbers in a Range",
- "dashedName": "bonfire-sum-all-numbers-in-a-range",
- "difficulty": "2.00",
- "description": [
- "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.",
- "The lowest number will not always come first.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function sumAll(arr) {",
- " return(1);",
- "}",
- "",
- "sumAll([1, 4]);"
- ],
- "tests": [
- "expect(sumAll([1, 4])).to.be.a('Number');",
- "expect(sumAll([1, 4])).to.equal(10);",
- "expect(sumAll([4, 1])).to.equal(10);",
- "expect(sumAll([5, 10])).to.equal(45);",
- "expect(sumAll([10, 5])).to.equal(45);"
- ],
- "MDNlinks": [
- "Math.max()",
- "Math.min()",
- "Array.reduce()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a5de63ebea8dbee56860f4f2",
- "name": "Bonfire: Diff Two Arrays",
- "dashedName": "bonfire-diff-two-arrays",
- "difficulty": "2.01",
- "description": [
- "Compare two arrays and return a new array with any items not found in both of the original arrays.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function diff(arr1, arr2) {",
- " var newArr = [];",
- " // Same, same; but different.",
- " return newArr;",
- "}",
- "",
- "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);"
- ],
- "tests": [
- "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');",
- "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');",
- "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');",
- "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');",
- "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');",
- "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');",
- "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');"
- ],
- "MDNlinks": [
- "Comparison Operators",
- "String.slice()",
- "Array.filter()",
- "Array.indexOf()",
- "String.concat()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a7f4d8f2483413a6ce226cac",
- "name": "Bonfire: Roman Numeral Converter",
- "dashedName": "bonfire-roman-numeral-converter",
- "tests": [
- "expect(convert(12)).to.equal(\"XII\");",
- "expect(convert(5)).to.equal(\"V\");",
- "expect(convert(9)).to.equal(\"IX\");",
- "expect(convert(29)).to.equal(\"XXIX\");",
- "expect(convert(16)).to.equal(\"XVI\");"
- ],
- "difficulty": "2.02",
- "description": [
- "Convert the given number into a roman numeral.",
- "All roman numerals answers should be provided in upper-case.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function convert(num) {",
- " return num;",
- "}",
- "",
- "convert(36);"
- ],
- "MDNlinks": [
- "Array.splice()",
- "Array.indexOf()",
- "Array.join()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a0b5010f579e69b815e7c5d6",
- "name": "Bonfire: Search and Replace",
- "dashedName": "bonfire-search-and-replace",
- "tests": [
- "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");",
- "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");",
- "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");",
- "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");",
- "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");"
- ],
- "difficulty": "2.03",
- "description": [
- "Perform a search and replace on the sentence using the arguments provided and return the new sentence.",
- "First argument is the sentence to perform the search and replace on.",
- "Second argument is the word that you will be replacing (before).",
- "Third argument is what you will be replacing the second argument with (after).",
- "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function replace(str, before, after) {",
- " return str;",
- "}",
- "",
- "replace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");"
- ],
- "MDNlinks": [
- "Array.splice()",
- "String.replace()",
- "Array.join()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "aa7697ea2477d1316795783b",
- "name": "Bonfire: Pig Latin",
- "dashedName": "bonfire-pig-latin",
- "tests": [
- "expect(translate(\"california\")).to.equal(\"aliforniacay\");",
- "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
- "expect(translate(\"glove\")).to.equal(\"oveglay\");",
- "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");",
- "expect(translate(\"eight\")).to.equal(\"eightway\");"
- ],
- "difficulty": "2.04",
- "description": [
- "Translate the provided string to pig latin.",
- "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
- "If a word begins with a vowel you just add \"way\" to the end.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function translate(str) {",
- " return str;",
- "}",
- "",
- "translate(\"consonant\");"
- ],
- "MDNlinks": [
- "Array.indexOf()",
- "Array.push()",
- "Array.join()",
- "String.substr()",
- "String.split()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "afd15382cdfb22c9efe8b7de",
- "name": "Bonfire: DNA Pairing",
- "dashedName": "bonfire-dna-pairing",
- "tests": [
- "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');",
- "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');",
- "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'should return the dna pair');"
- ],
- "difficulty": "2.05",
- "description": [
- "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.",
- "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
- "Return the provided character as the first element in each array.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function pair(str) {",
- " return str;",
- "}",
- "",
- "pair(\"GCG\");"
- ],
- "MDNlinks": [
- "Array.push()",
- "String.split()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "af7588ade1100bde429baf20",
- "name": "Bonfire: Missing letters",
- "dashedName": "bonfire-missing-letters",
- "difficulty": "2.05",
- "description": [
- "Find the missing letter in the passed letter range and return it.",
- "If all letters are present in the range, return undefined.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function fearNotLetter(str) {",
- " return str;",
- "}",
- "",
- "fearNotLetter('abce');"
- ],
- "tests": [
- "expect(fearNotLetter('abce')).to.equal('d');",
- "expect(fearNotLetter('bcd')).to.be.undefined;",
- "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');",
- "expect(fearNotLetter('yz')).to.be.undefined;"
- ],
- "MDNlinks": [
- "String.charCodeAt()",
- "String.fromCharCode()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a77dbc43c33f39daa4429b4f",
- "name": "Bonfire: Boo who",
- "dashedName": "bonfire-boo-who",
- "difficulty": "2.06",
- "description": [
- "Check if a value is classified as a boolean primitive. Return true or false.",
- "Boolean primitives are true and false.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function boo(bool) {",
- " // What is the new fad diet for ghost developers? The Boolean.",
- " return bool;",
- "}",
- "",
- "boo(null);"
- ],
- "tests": [
- "assert.strictEqual(boo(true), true);",
- "assert.strictEqual(boo(false), true);",
- "assert.strictEqual(boo([1, 2, 3]), false);",
- "assert.strictEqual(boo([].slice), false);",
- "assert.strictEqual(boo({ 'a': 1 }), false);",
- "assert.strictEqual(boo(1), false);",
- "assert.strictEqual(boo(NaN), false);",
- "assert.strictEqual(boo('a'), false);"
- ],
- "MDNlinks": [
- "Boolean Objects"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a105e963526e7de52b219be9",
- "name": "Bonfire: Sorted Union",
- "dashedName": "bonfire-sorted-union",
- "difficulty": "2.07",
- "description": [
- "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.",
- "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.",
- "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.",
- "Check the assertion tests for examples.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function unite(arr1, arr2, arr3) {",
- " return arr1;",
- "}",
- "",
- "unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);"
- ],
- "tests": [
- "assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
- "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'should not flatten nested arrays');",
- "assert.deepEqual(unite([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'should correctly handle exactly two arguments');",
- "assert.deepEqual(unite([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [ 1, 2, 3, 5, 4, 6, 7, 8 ], 'should correctly handle higher numbers of arguments');"
- ],
- "MDNlinks": [
- "Arguments object",
- "Array.reduce()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a6b0bb188d873cb2c8729495",
- "name": "Bonfire: Convert HTML Entities",
- "dashedName": "bonfire-convert-html-entities",
- "difficulty": "2.07",
- "description": [
- "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function convert(str) {",
- " // :)",
- " return str;",
- "}",
- "",
- "convert('Dolce & Gabbana');"
- ],
- "tests": [
- "assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');",
- "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');",
- "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');",
- "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');",
- "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');",
- "assert.strictEqual(convert('<>'), '<>', 'should escape characters');",
- "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');"
- ],
- "MDNlinks": [
- "RegExp",
- "HTML Entities"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a103376db3ba46b2d50db289",
- "name": "Bonfire: Spinal Tap Case",
- "dashedName": "bonfire-spinal-tap-case",
- "difficulty": "2.08",
- "description": [
- "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function spinalCase(str) {",
- " // \"It's such a fine line between stupid, and clever.\"",
- " // --David St. Hubbins",
- " return str;",
- "}",
- "",
- "spinalCase('This Is Spinal Tap');"
- ],
- "tests": [
- "assert.strictEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap', 'should return spinal case from string with spaces');",
- "assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap', 'should return spinal case from string with camel case');",
- "assert.strictEqual(spinalCase('The_Andy_Griffith_Show'), 'the-andy-griffith-show', 'should return spinal case from string with snake case');",
- "assert.strictEqual(spinalCase('Teletubbies say Eh-oh'), 'teletubbies-say-eh-oh', 'should return spinal case from string with spaces and hyphens');"
- ],
- "MDNlinks": [
- "RegExp",
- "String.replace()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a5229172f011153519423690",
- "name": "Bonfire: Sum All Odd Fibonacci Numbers",
- "dashedName": "bonfire-sum-all-odd-fibonacci-numbers",
- "difficulty": "2.09",
- "description": [
- "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.",
- "The first few numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8, and each subsequent number is the sum of the previous two numbers.",
- "As an example, passing 4 to the function should return 5 because all the odd Fibonacci numbers under 4 are 1, 1, and 3.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function sumFibs(num) {",
- " return num;",
- "}",
- "",
- "sumFibs(4);"
- ],
- "tests": [
- "expect(sumFibs(1)).to.be.a('number');",
- "expect(sumFibs(1000)).to.equal(1785);",
- "expect(sumFibs(4000000)).to.equal(4613732);",
- "expect(sumFibs(4)).to.equal(5);",
- "expect(sumFibs(75024)).to.equal(60696);",
- "expect(sumFibs(75025)).to.equal(135721);"
- ],
- "MDNlinks": [
- "Remainder"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a3bfc1673c0526e06d3ac698",
- "name": "Bonfire: Sum All Primes",
- "dashedName": "bonfire-sum-all-primes",
- "difficulty": "2.10",
- "description": [
- "Sum all the prime numbers up to and including the provided number.",
- "A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.",
- "The provided number may not be a prime.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function sumPrimes(num) {",
- " return num;",
- "}",
- "",
- "sumPrimes(10);"
- ],
- "tests": [
- "expect(sumPrimes(10)).to.be.a('number');",
- "expect(sumPrimes(10)).to.equal(17);",
- "expect(sumPrimes(977)).to.equal(73156);"
- ],
- "MDNlinks": [
- "For Loops",
- "Array.push()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "ae9defd7acaf69703ab432ea",
- "name": "Bonfire: Smallest Common Multiple",
- "dashedName": "bonfire-smallest-common-multiple",
- "difficulty": "2.11",
- "description": [
- "Find the smallest number that is evenly divisible by all numbers in the provided range.",
- "The range will be an array of two numbers that will not necessarily be in numerical order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function smallestCommons(arr) {",
- " return arr;",
- "}",
- "",
- "",
- "smallestCommons([1,5]);"
- ],
- "tests": [
- "expect(smallestCommons([1,5])).to.be.a('number');",
- "expect(smallestCommons([1,5])).to.equal(60);",
- "expect(smallestCommons([5,1])).to.equal(60);",
- "expect(smallestCommons([1,13])).to.equal(360360);"
- ],
- "MDNlinks": [
- "Smallest Common Multiple"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a6e40f1041b06c996f7b2406",
- "name": "Bonfire: Finders Keepers",
- "dashedName": "bonfire-finders-keepers",
- "difficulty": "2.12",
- "description": [
- "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function find(arr, func) {",
- " var num = 0;",
- " return num;",
- "}",
- "",
- "find([1, 2, 3, 4], function(num){ return num % 2 === 0; });"
- ],
- "tests": [
- "assert.strictEqual(find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, 'should return first found value');",
- "assert.strictEqual(find([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, 'should return undefined if not found');"
- ],
- "MDNlinks": [
- "Array.some()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a5deed1811a43193f9f1c841",
- "name": "Bonfire: Drop it",
- "dashedName": "bonfire-drop-it",
- "difficulty": "2.13",
- "description": [
- "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function drop(arr, func) {",
- " // Drop them elements.",
- " return arr;",
- "}",
- "",
- "drop([1, 2, 3], function(n) {return n < 3; });"
- ],
- "tests": [
- "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);",
- "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);",
- "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);"
- ],
- "MDNlinks": [
- "Arguments object",
- "Array.shift()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "ab306dbdcc907c7ddfc30830",
- "name": "Bonfire: Steamroller",
- "dashedName": "bonfire-steamroller",
- "difficulty": "2.14",
- "description": [
- "Flatten a nested array. You must account for varying levels of nesting.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function steamroller(arr) {",
- " // I'm a steamroller, baby",
- " return arr;",
- "}",
- "",
- "steamroller([1, [2], [3, [[4]]]]);"
- ],
- "tests": [
- "assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');",
- "assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'should flatten nested arrays');",
- "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');"
- ],
- "MDNlinks": [
- "Array.isArray()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a8d97bd4c764e91f9d2bda01",
- "name": "Bonfire: Binary Agents",
- "dashedName": "bonfire-binary-agents",
- "difficulty": "2.15",
- "description": [
- "Return an English translated sentence of the passed binary string.",
- "The binary string will be space separated.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function binaryAgent(str) {",
- " return str;",
- "}",
- "",
- "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');"
- ],
- "tests": [
- "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");",
- "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");"
- ],
- "MDNlinks": [
- "String.charCodeAt()",
- "String.fromCharCode()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a10d2431ad0c6a099a4b8b52",
- "name": "Bonfire: Everything Be True",
- "dashedName": "bonfire-everything-be-true",
- "difficulty": "2.21",
- "description": [
- "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).",
- "For this, check to see if the property defined in the second argument is present on every element of the collection.",
- "Remember, you can access object properties through either dot notation or [] notation.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function every(collection, pre) {",
- " // Does everyone have one of these?",
- " return pre;",
- "}",
- "",
- "every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');"
- ],
- "tests": [
- "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'should return true if predicate returns truthy for all elements in the collection');",
- "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');",
- "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
-
- ],
- "MDNlinks": [
- "Object.hasOwnProperty()",
- "Object.getOwnPropertyNames()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a97fd23d9b809dac9921074f",
- "name": "Bonfire: Arguments Optional",
- "dashedName": "bonfire-arguments-optional",
- "difficulty": "2.22",
- "description": [
- "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.",
- "For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5
",
- "If either argument isn't a valid number, return undefined.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function add() {",
- " return false;",
- "}",
- "",
- "add(2,3);"
- ],
- "tests": [
- "expect(add(2, 3)).to.equal(5);",
- "expect(add(2)(3)).to.equal(5);",
- "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;",
- "expect(add(2, '3')).to.be.undefined;",
- "expect(add(2)([3])).to.be.undefined;"
- ],
- "MDNlinks": [
- "Global Function Object",
- "Arguments object"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
}
]
}
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index ab30786d54..42233ed0e6 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1,6 +1,6 @@
{
"name": "Basic JavaScript",
- "order": 0.006,
+ "order": 0.005,
"challenges": [
{
"id":"bd7123c9c441eddfaeb4bdef",
diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json
index 23306c1ba1..cb4f9bd8a5 100644
--- a/seed/challenges/basic-ziplines.json
+++ b/seed/challenges/basic-ziplines.json
@@ -1,6 +1,6 @@
{
"name": "Basic Front End Development Projects",
- "order": 0.006,
+ "order": 0.007,
"challenges": [
{
"id": "bd7158d8c442eddfbeb5bd1f",
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
new file mode 100644
index 0000000000..2cf00386a5
--- /dev/null
+++ b/seed/challenges/expert-bonfires.json
@@ -0,0 +1,304 @@
+{
+ "name": "Expert Algorithm Scripting",
+ "order": 0.012,
+ "challenges": [
+ {
+ "id": "aff0395860f5d3034dc0bfc9",
+ "name": "Bonfire: Validate US Telephone Numbers",
+ "dashedName": "bonfire-validate-us-telephone-numbers",
+ "difficulty": "4.01",
+ "description": [
+ "Return true if the passed string is a valid US phone number",
+ "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:",
+ "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555",
+ "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "tests": [
+ "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");",
+ "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"5555555555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);",
+ "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);",
+ "assert.deepEqual(telephoneCheck(\"55555555\"), false);",
+ "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"27576227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);"
+ ],
+ "challengeSeed": [
+ "function telephoneCheck(str) {",
+ " // Good luck!",
+ " return true;",
+ "}",
+ "",
+ "",
+ "",
+ "telephoneCheck(\"555-555-5555\");"
+ ],
+ "MDNlinks": [
+ "RegExp"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a3f503de51cf954ede28891d",
+ "name": "Bonfire: Symmetric Difference",
+ "dashedName": "bonfire-symmetric-difference",
+ "difficulty": "4.02",
+ "description": [
+ "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
+ "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function sym(args) {",
+ " return arguments;",
+ "}",
+ "",
+ "sym([1, 2, 3], [5, 2, 1, 4]);"
+ ],
+ "tests": [
+ "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);",
+ "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
+ "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');",
+ "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
+ ],
+ "MDNlinks": [
+ "Array.reduce()",
+ "Symmetric Difference"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "aa2e6f85cab2ab736c9a9b24",
+ "name": "Bonfire: Exact Change",
+ "dashedName": "bonfire-exact-change",
+ "difficulty": "4.03",
+ "description": [
+ "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
+ "cid is a 2d array listing available currency.",
+ "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.",
+ "Otherwise, return change in coin and bills, sorted in highest to lowest order.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function drawer(price, cash, cid) {",
+ " var change;",
+ " // Here is your change, ma'am.",
+ " return change;",
+ "}",
+ "",
+ "// Example cash-in-drawer array:",
+ "// [['PENNY', 1.01],",
+ "// ['NICKEL', 2.05],",
+ "// ['DIME', 3.10],",
+ "// ['QUARTER', 4.25],",
+ "// ['ONE', 90.00],",
+ "// ['FIVE', 55.00],",
+ "// ['TEN', 20.00],",
+ "// ['TWENTY', 60.00],",
+ "// ['ONE HUNDRED', 100.00]]",
+ "",
+ "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);"
+ ],
+ "tests": [
+ "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');",
+ "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
+ "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');",
+ "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');"
+ ],
+ "MDNlinks": [
+ "Global Object"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a56138aff60341a09ed6c480",
+ "name": "Bonfire: Inventory Update",
+ "dashedName": "bonfire-inventory-update",
+ "difficulty": "4.04",
+ "description": [
+ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function inventory(arr1, arr2) {",
+ " // All inventory must be accounted for or you're fired!",
+ " return arr1;",
+ "}",
+ "",
+ "// Example inventory lists",
+ "var curInv = [",
+ " [21, 'Bowling Ball'],",
+ " [2, 'Dirty Sock'],",
+ " [1, 'Hair Pin'],",
+ " [5, 'Microphone']",
+ "];",
+ "",
+ "var newInv = [",
+ " [2, 'Hair Pin'],",
+ " [3, 'Half-Eaten Apple'],",
+ " [67, 'Bowling Ball'],",
+ " [7, 'Toothpaste']",
+ "];",
+ "",
+ "inventory(curInv, newInv);"
+ ],
+ "tests": [
+ "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');",
+ "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);",
+ "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);",
+ "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);",
+ "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);",
+ "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);"
+ ],
+ "MDNlinks": [
+ "Global Array Object"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a7bf700cd123b9a54eef01d5",
+ "name": "Bonfire: No repeats please",
+ "dashedName": "bonfire-no-repeats-please",
+ "difficulty": "4.05",
+ "description": [
+ "Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
+ "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function permAlone(str) {",
+ " return str;",
+ "}",
+ "",
+ "permAlone('aab');"
+ ],
+ "tests": [
+ "expect(permAlone('aab')).to.be.a('number');",
+ "expect(permAlone('aab')).to.equal(2);",
+ "expect(permAlone('aaa')).to.equal(0);",
+ "expect(permAlone('aabb')).to.equal(8);",
+ "expect(permAlone('abcdefa')).to.equal(3600);",
+ "expect(permAlone('abfdefa')).to.equal(2640);",
+ "expect(permAlone('zzzzzzzz')).to.equal(0);"
+ ],
+ "MDNlinks": [
+ "Permutations",
+ "RegExp"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a19f0fbe1872186acd434d5a",
+ "name": "Bonfire: Friendly Date Ranges",
+ "dashedName": "bonfire-friendly-date-ranges",
+ "difficulty": "4.06",
+ "description": [
+ "Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
+ "It must not show any redundant information in the date range.",
+ "For example, if the year and month are the same then only the day range should be displayed.",
+ "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.",
+ "Input date is formatted as YYYY-MM-DD",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function friendly(str) {",
+ " return str;",
+ "}",
+ "",
+ "friendly(['2015-07-01', '2015-07-04']);"
+ ],
+ "tests": [
+ "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
+ "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
+ "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
+ "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
+ "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
+ "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
+ ],
+ "MDNlinks": [
+ "String.split()",
+ "String.substr()",
+ "parseInt()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ }
+ ]
+}
diff --git a/seed/challenges/functional-programming.json b/seed/challenges/functional-programming.json
deleted file mode 100644
index 467be534e9..0000000000
--- a/seed/challenges/functional-programming.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "Functional Programming",
- "order": 0.010,
- "challenges": [
- {
- "id": "bd7129d8c441eddfbeb5bddf",
- "name": "Waypoint: Practice Functional Programming",
- "dashedName": "waypoint-practice-functional-programming",
- "difficulty": 0.01,
- "challengeSeed": ["129169463"],
- "description": [
- "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.",
- "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.",
- "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".",
- "Click here to go to the challenge: http://jhusain.github.io/learnrx/ .",
- "You only need to complete the first 27 steps of this tutorial.",
- "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.",
- "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- }
- ]
-}
diff --git a/seed/challenges/git.json b/seed/challenges/git.json
index 025ab49029..1d1ac9e1c5 100644
--- a/seed/challenges/git.json
+++ b/seed/challenges/git.json
@@ -1,6 +1,6 @@
{
"name": "Git",
- "order" : 0.012,
+ "order" : 0.013,
"challenges": [
{
"id": "bd7353d8c341eddeaeb5bd0f",
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index f130dc92c6..5ae11fc7a4 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -1,46 +1,35 @@
{
"name": "Intermediate Algorithm Scripting",
- "order": 0.009,
+ "order": 0.008,
"challenges": [
{
- "id": "a2f1d72d9b908d0bd72bb9f6",
- "name": "Bonfire: Make a Person",
- "dashedName": "bonfire-make-a-person",
- "difficulty": "3.01",
+ "id": "a3566b1109230028080c9345",
+ "name": "Bonfire: Sum All Numbers in a Range",
+ "dashedName": "bonfire-sum-all-numbers-in-a-range",
+ "difficulty": "2.00",
"description": [
- "Fill in the object constructor with the methods specified in the tests.",
- "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).",
- "All functions that take an argument have an arity of 1, and the argument will be a string.",
- "These methods must be the only available means for interacting with the object.",
+ "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.",
+ "The lowest number will not always come first.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "var Person = function(firstAndLast) {",
- " return firstAndLast;",
- "};",
+ "function sumAll(arr) {",
+ " return(1);",
+ "}",
"",
- "var bob = new Person('Bob Ross');",
- "bob.getFullName();"
+ "sumAll([1, 4]);"
],
"tests": [
- "expect(Object.keys(bob).length).to.eql(6);",
- "expect(bob instanceof Person).to.be.true;",
- "expect(bob.firstName).to.be.undefined();",
- "expect(bob.lastName).to.be.undefined();",
- "expect(bob.getFirstName()).to.eql('Bob');",
- "expect(bob.getLastName()).to.eql('Ross');",
- "expect(bob.getFullName()).to.eql('Bob Ross');",
- "bob.setFirstName('Happy');",
- "expect(bob.getFirstName()).to.eql('Happy');",
- "bob.setLastName('Trees');",
- "expect(bob.getLastName()).to.eql('Trees');",
- "bob.setFullName('George Carlin');",
- "expect(bob.getFullName()).to.eql('George Carlin');",
- "bob.setFullName('Bob Ross');"
+ "expect(sumAll([1, 4])).to.be.a('Number');",
+ "expect(sumAll([1, 4])).to.equal(10);",
+ "expect(sumAll([4, 1])).to.equal(10);",
+ "expect(sumAll([5, 10])).to.equal(45);",
+ "expect(sumAll([10, 5])).to.equal(45);"
],
"MDNlinks": [
- "Closures",
- "Details of the Object Model"
+ "Math.max()",
+ "Math.min()",
+ "Array.reduce()"
],
"challengeType": 5,
"nameCn": "",
@@ -55,33 +44,530 @@
"descriptionPt": []
},
{
- "id": "af4afb223120f7348cdfc9fd",
- "name": "Bonfire: Map the Debris",
- "dashedName": "bonfire-map-the-debris",
- "difficulty": "3.02",
+ "id": "a5de63ebea8dbee56860f4f2",
+ "name": "Bonfire: Diff Two Arrays",
+ "dashedName": "bonfire-diff-two-arrays",
+ "difficulty": "2.01",
"description": [
- "Return a new array that transforms the element's average altitude into their orbital periods.",
- "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}
.",
- "You can read about orbital periods on wikipedia .",
- "The values should be rounded to the nearest whole number. The body being orbited is Earth.",
- "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418",
+ "Compare two arrays and return a new array with any items not found in both of the original arrays.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function orbitalPeriod(arr) {",
- " var GM = 398600.4418;",
- " var earthRadius = 6367.4447;",
+ "function diff(arr1, arr2) {",
+ " var newArr = [];",
+ " // Same, same; but different.",
+ " return newArr;",
+ "}",
+ "",
+ "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);"
+ ],
+ "tests": [
+ "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');",
+ "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');",
+ "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');",
+ "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');",
+ "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');",
+ "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');",
+ "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');"
+ ],
+ "MDNlinks": [
+ "Comparison Operators",
+ "String.slice()",
+ "Array.filter()",
+ "Array.indexOf()",
+ "String.concat()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a7f4d8f2483413a6ce226cac",
+ "name": "Bonfire: Roman Numeral Converter",
+ "dashedName": "bonfire-roman-numeral-converter",
+ "tests": [
+ "expect(convert(12)).to.equal(\"XII\");",
+ "expect(convert(5)).to.equal(\"V\");",
+ "expect(convert(9)).to.equal(\"IX\");",
+ "expect(convert(29)).to.equal(\"XXIX\");",
+ "expect(convert(16)).to.equal(\"XVI\");"
+ ],
+ "difficulty": "2.02",
+ "description": [
+ "Convert the given number into a roman numeral.",
+ "All roman numerals answers should be provided in upper-case.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function convert(num) {",
+ " return num;",
+ "}",
+ "",
+ "convert(36);"
+ ],
+ "MDNlinks": [
+ "Array.splice()",
+ "Array.indexOf()",
+ "Array.join()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a0b5010f579e69b815e7c5d6",
+ "name": "Bonfire: Search and Replace",
+ "dashedName": "bonfire-search-and-replace",
+ "tests": [
+ "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");",
+ "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");",
+ "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");",
+ "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");",
+ "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");"
+ ],
+ "difficulty": "2.03",
+ "description": [
+ "Perform a search and replace on the sentence using the arguments provided and return the new sentence.",
+ "First argument is the sentence to perform the search and replace on.",
+ "Second argument is the word that you will be replacing (before).",
+ "Third argument is what you will be replacing the second argument with (after).",
+ "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function replace(str, before, after) {",
+ " return str;",
+ "}",
+ "",
+ "replace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");"
+ ],
+ "MDNlinks": [
+ "Array.splice()",
+ "String.replace()",
+ "Array.join()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "aa7697ea2477d1316795783b",
+ "name": "Bonfire: Pig Latin",
+ "dashedName": "bonfire-pig-latin",
+ "tests": [
+ "expect(translate(\"california\")).to.equal(\"aliforniacay\");",
+ "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
+ "expect(translate(\"glove\")).to.equal(\"oveglay\");",
+ "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");",
+ "expect(translate(\"eight\")).to.equal(\"eightway\");"
+ ],
+ "difficulty": "2.04",
+ "description": [
+ "Translate the provided string to pig latin.",
+ "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
+ "If a word begins with a vowel you just add \"way\" to the end.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function translate(str) {",
+ " return str;",
+ "}",
+ "",
+ "translate(\"consonant\");"
+ ],
+ "MDNlinks": [
+ "Array.indexOf()",
+ "Array.push()",
+ "Array.join()",
+ "String.substr()",
+ "String.split()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "afd15382cdfb22c9efe8b7de",
+ "name": "Bonfire: DNA Pairing",
+ "dashedName": "bonfire-dna-pairing",
+ "tests": [
+ "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');",
+ "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');",
+ "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'should return the dna pair');"
+ ],
+ "difficulty": "2.05",
+ "description": [
+ "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.",
+ "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
+ "Return the provided character as the first element in each array.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function pair(str) {",
+ " return str;",
+ "}",
+ "",
+ "pair(\"GCG\");"
+ ],
+ "MDNlinks": [
+ "Array.push()",
+ "String.split()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "af7588ade1100bde429baf20",
+ "name": "Bonfire: Missing letters",
+ "dashedName": "bonfire-missing-letters",
+ "difficulty": "2.05",
+ "description": [
+ "Find the missing letter in the passed letter range and return it.",
+ "If all letters are present in the range, return undefined.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function fearNotLetter(str) {",
+ " return str;",
+ "}",
+ "",
+ "fearNotLetter('abce');"
+ ],
+ "tests": [
+ "expect(fearNotLetter('abce')).to.equal('d');",
+ "expect(fearNotLetter('bcd')).to.be.undefined;",
+ "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');",
+ "expect(fearNotLetter('yz')).to.be.undefined;"
+ ],
+ "MDNlinks": [
+ "String.charCodeAt()",
+ "String.fromCharCode()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a77dbc43c33f39daa4429b4f",
+ "name": "Bonfire: Boo who",
+ "dashedName": "bonfire-boo-who",
+ "difficulty": "2.06",
+ "description": [
+ "Check if a value is classified as a boolean primitive. Return true or false.",
+ "Boolean primitives are true and false.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function boo(bool) {",
+ " // What is the new fad diet for ghost developers? The Boolean.",
+ " return bool;",
+ "}",
+ "",
+ "boo(null);"
+ ],
+ "tests": [
+ "assert.strictEqual(boo(true), true);",
+ "assert.strictEqual(boo(false), true);",
+ "assert.strictEqual(boo([1, 2, 3]), false);",
+ "assert.strictEqual(boo([].slice), false);",
+ "assert.strictEqual(boo({ 'a': 1 }), false);",
+ "assert.strictEqual(boo(1), false);",
+ "assert.strictEqual(boo(NaN), false);",
+ "assert.strictEqual(boo('a'), false);"
+ ],
+ "MDNlinks": [
+ "Boolean Objects"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a105e963526e7de52b219be9",
+ "name": "Bonfire: Sorted Union",
+ "dashedName": "bonfire-sorted-union",
+ "difficulty": "2.07",
+ "description": [
+ "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.",
+ "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.",
+ "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.",
+ "Check the assertion tests for examples.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function unite(arr1, arr2, arr3) {",
+ " return arr1;",
+ "}",
+ "",
+ "unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);"
+ ],
+ "tests": [
+ "assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
+ "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'should not flatten nested arrays');",
+ "assert.deepEqual(unite([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'should correctly handle exactly two arguments');",
+ "assert.deepEqual(unite([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [ 1, 2, 3, 5, 4, 6, 7, 8 ], 'should correctly handle higher numbers of arguments');"
+ ],
+ "MDNlinks": [
+ "Arguments object",
+ "Array.reduce()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a6b0bb188d873cb2c8729495",
+ "name": "Bonfire: Convert HTML Entities",
+ "dashedName": "bonfire-convert-html-entities",
+ "difficulty": "2.07",
+ "description": [
+ "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function convert(str) {",
+ " // :)",
+ " return str;",
+ "}",
+ "",
+ "convert('Dolce & Gabbana');"
+ ],
+ "tests": [
+ "assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');",
+ "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');",
+ "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');",
+ "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');",
+ "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');",
+ "assert.strictEqual(convert('<>'), '<>', 'should escape characters');",
+ "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');"
+ ],
+ "MDNlinks": [
+ "RegExp",
+ "HTML Entities"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a103376db3ba46b2d50db289",
+ "name": "Bonfire: Spinal Tap Case",
+ "dashedName": "bonfire-spinal-tap-case",
+ "difficulty": "2.08",
+ "description": [
+ "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function spinalCase(str) {",
+ " // \"It's such a fine line between stupid, and clever.\"",
+ " // --David St. Hubbins",
+ " return str;",
+ "}",
+ "",
+ "spinalCase('This Is Spinal Tap');"
+ ],
+ "tests": [
+ "assert.strictEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap', 'should return spinal case from string with spaces');",
+ "assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap', 'should return spinal case from string with camel case');",
+ "assert.strictEqual(spinalCase('The_Andy_Griffith_Show'), 'the-andy-griffith-show', 'should return spinal case from string with snake case');",
+ "assert.strictEqual(spinalCase('Teletubbies say Eh-oh'), 'teletubbies-say-eh-oh', 'should return spinal case from string with spaces and hyphens');"
+ ],
+ "MDNlinks": [
+ "RegExp",
+ "String.replace()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a5229172f011153519423690",
+ "name": "Bonfire: Sum All Odd Fibonacci Numbers",
+ "dashedName": "bonfire-sum-all-odd-fibonacci-numbers",
+ "difficulty": "2.09",
+ "description": [
+ "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.",
+ "The first few numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8, and each subsequent number is the sum of the previous two numbers.",
+ "As an example, passing 4 to the function should return 5 because all the odd Fibonacci numbers under 4 are 1, 1, and 3.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function sumFibs(num) {",
+ " return num;",
+ "}",
+ "",
+ "sumFibs(4);"
+ ],
+ "tests": [
+ "expect(sumFibs(1)).to.be.a('number');",
+ "expect(sumFibs(1000)).to.equal(1785);",
+ "expect(sumFibs(4000000)).to.equal(4613732);",
+ "expect(sumFibs(4)).to.equal(5);",
+ "expect(sumFibs(75024)).to.equal(60696);",
+ "expect(sumFibs(75025)).to.equal(135721);"
+ ],
+ "MDNlinks": [
+ "Remainder"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a3bfc1673c0526e06d3ac698",
+ "name": "Bonfire: Sum All Primes",
+ "dashedName": "bonfire-sum-all-primes",
+ "difficulty": "2.10",
+ "description": [
+ "Sum all the prime numbers up to and including the provided number.",
+ "A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.",
+ "The provided number may not be a prime.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function sumPrimes(num) {",
+ " return num;",
+ "}",
+ "",
+ "sumPrimes(10);"
+ ],
+ "tests": [
+ "expect(sumPrimes(10)).to.be.a('number');",
+ "expect(sumPrimes(10)).to.equal(17);",
+ "expect(sumPrimes(977)).to.equal(73156);"
+ ],
+ "MDNlinks": [
+ "For Loops",
+ "Array.push()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "ae9defd7acaf69703ab432ea",
+ "name": "Bonfire: Smallest Common Multiple",
+ "dashedName": "bonfire-smallest-common-multiple",
+ "difficulty": "2.11",
+ "description": [
+ "Find the smallest number that is evenly divisible by all numbers in the provided range.",
+ "The range will be an array of two numbers that will not necessarily be in numerical order.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function smallestCommons(arr) {",
" return arr;",
"}",
"",
- "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);"
+ "",
+ "smallestCommons([1,5]);"
],
"tests": [
- "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);",
- "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
+ "expect(smallestCommons([1,5])).to.be.a('number');",
+ "expect(smallestCommons([1,5])).to.equal(60);",
+ "expect(smallestCommons([5,1])).to.equal(60);",
+ "expect(smallestCommons([1,13])).to.equal(360360);"
],
"MDNlinks": [
- "Math.pow()"
+ "Smallest Common Multiple"
],
"challengeType": 5,
"nameCn": "",
@@ -96,32 +582,222 @@
"descriptionPt": []
},
{
- "id": "a3f503de51cfab748ff001aa",
- "name": "Bonfire: Pairwise",
- "dashedName": "bonfire-pairwise",
- "difficulty": "3.03",
+ "id": "a6e40f1041b06c996f7b2406",
+ "name": "Bonfire: Finders Keepers",
+ "dashedName": "bonfire-finders-keepers",
+ "difficulty": "2.12",
"description": [
- "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.",
- "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.",
- "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
+ "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function pairwise(arr, arg) {",
- " return arg;",
+ "function find(arr, func) {",
+ " var num = 0;",
+ " return num;",
"}",
"",
- "pairwise([1,4,2,3,0,5], 7);"
+ "find([1, 2, 3, 4], function(num){ return num % 2 === 0; });"
],
"tests": [
- "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);",
- "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);",
- "expect(pairwise([1,1,1], 2)).to.equal(1);",
- "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);",
- "expect(pairwise([], 100)).to.equal(0);"
+ "assert.strictEqual(find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, 'should return first found value');",
+ "assert.strictEqual(find([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, 'should return undefined if not found');"
],
"MDNlinks": [
- "Array.reduce()"
+ "Array.some()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a5deed1811a43193f9f1c841",
+ "name": "Bonfire: Drop it",
+ "dashedName": "bonfire-drop-it",
+ "difficulty": "2.13",
+ "description": [
+ "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function drop(arr, func) {",
+ " // Drop them elements.",
+ " return arr;",
+ "}",
+ "",
+ "drop([1, 2, 3], function(n) {return n < 3; });"
+ ],
+ "tests": [
+ "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);",
+ "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);",
+ "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);"
+ ],
+ "MDNlinks": [
+ "Arguments object",
+ "Array.shift()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "ab306dbdcc907c7ddfc30830",
+ "name": "Bonfire: Steamroller",
+ "dashedName": "bonfire-steamroller",
+ "difficulty": "2.14",
+ "description": [
+ "Flatten a nested array. You must account for varying levels of nesting.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function steamroller(arr) {",
+ " // I'm a steamroller, baby",
+ " return arr;",
+ "}",
+ "",
+ "steamroller([1, [2], [3, [[4]]]]);"
+ ],
+ "tests": [
+ "assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');",
+ "assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'should flatten nested arrays');",
+ "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');"
+ ],
+ "MDNlinks": [
+ "Array.isArray()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a8d97bd4c764e91f9d2bda01",
+ "name": "Bonfire: Binary Agents",
+ "dashedName": "bonfire-binary-agents",
+ "difficulty": "2.15",
+ "description": [
+ "Return an English translated sentence of the passed binary string.",
+ "The binary string will be space separated.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function binaryAgent(str) {",
+ " return str;",
+ "}",
+ "",
+ "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');"
+ ],
+ "tests": [
+ "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");",
+ "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");"
+ ],
+ "MDNlinks": [
+ "String.charCodeAt()",
+ "String.fromCharCode()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a10d2431ad0c6a099a4b8b52",
+ "name": "Bonfire: Everything Be True",
+ "dashedName": "bonfire-everything-be-true",
+ "difficulty": "2.21",
+ "description": [
+ "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).",
+ "For this, check to see if the property defined in the second argument is present on every element of the collection.",
+ "Remember, you can access object properties through either dot notation or [] notation.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function every(collection, pre) {",
+ " // Does everyone have one of these?",
+ " return pre;",
+ "}",
+ "",
+ "every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');"
+ ],
+ "tests": [
+ "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'should return true if predicate returns truthy for all elements in the collection');",
+ "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');",
+ "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');"
+
+ ],
+ "MDNlinks": [
+ "Object.hasOwnProperty()",
+ "Object.getOwnPropertyNames()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a97fd23d9b809dac9921074f",
+ "name": "Bonfire: Arguments Optional",
+ "dashedName": "bonfire-arguments-optional",
+ "difficulty": "2.22",
+ "description": [
+ "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.",
+ "For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5
",
+ "If either argument isn't a valid number, return undefined.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function add() {",
+ " return false;",
+ "}",
+ "",
+ "add(2,3);"
+ ],
+ "tests": [
+ "expect(add(2, 3)).to.equal(5);",
+ "expect(add(2)(3)).to.equal(5);",
+ "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;",
+ "expect(add(2, '3')).to.be.undefined;",
+ "expect(add(2)([3])).to.be.undefined;"
+ ],
+ "MDNlinks": [
+ "Global Function Object",
+ "Arguments object"
],
"challengeType": 5,
"nameCn": "",
diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json
index f06bc15efc..bba888f2cf 100644
--- a/seed/challenges/intermediate-ziplines.json
+++ b/seed/challenges/intermediate-ziplines.json
@@ -1,6 +1,6 @@
{
"name": "Intermediate Front End Development Projects",
- "order": 0.016,
+ "order": 0.017,
"challenges": [
{
"id": "bd7158d8c442eddfaeb5bd18",
diff --git a/seed/challenges/mongodb.json b/seed/challenges/mongodb.json
index 590fe3d6f2..4a9c9ce973 100644
--- a/seed/challenges/mongodb.json
+++ b/seed/challenges/mongodb.json
@@ -1,6 +1,6 @@
{
"name": "MongoDB",
- "order" : 0.014,
+ "order" : 0.015,
"challenges": [
{
"id": "bd7243d8c341eddeaeb5bd0f",
diff --git a/seed/challenges/nodejs-and-expressjs.json b/seed/challenges/nodejs-and-expressjs.json
index 10da3ae8c2..9d4282e8f7 100644
--- a/seed/challenges/nodejs-and-expressjs.json
+++ b/seed/challenges/nodejs-and-expressjs.json
@@ -1,6 +1,6 @@
{
"name": "Node.js and Express.js",
- "order" : 0.013,
+ "order" : 0.014,
"challenges": [
{
"id": "bd7153d8c441eddfaeb5bd0f",
diff --git a/seed/challenges/object-oriented-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
similarity index 74%
rename from seed/challenges/object-oriented-programming.json
rename to seed/challenges/object-oriented-and-functional-programming.json
index 11e3ad65e0..6ef66c0c9b 100644
--- a/seed/challenges/object-oriented-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,6 +1,6 @@
{
- "name": "Object Oriented Programming",
- "order" : 0.008,
+ "name": "Object Oriented and Functional Programming",
+ "order" : 0.009,
"challenges": [
{
"id": "bd7153d8c44eeddfaeb5bd0f",
@@ -86,6 +86,34 @@
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
+ },
+ {
+ "id": "bd7129d8c441eddfbeb5bddf",
+ "name": "Waypoint: Practice Functional Programming",
+ "dashedName": "waypoint-practice-functional-programming",
+ "difficulty": 0.01,
+ "challengeSeed": ["129169463"],
+ "description": [
+ "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.",
+ "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.",
+ "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".",
+ "Click here to go to the challenge: http://jhusain.github.io/learnrx/ .",
+ "You only need to complete the first 27 steps of this tutorial.",
+ "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.",
+ "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on."
+ ],
+ "challengeType": 2,
+ "tests": [],
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
}
]
}
From 1ca6bd9c609f46f048ba6384f27f0873ffc28269 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 12:25:52 -0700
Subject: [PATCH 081/548] Create .gitattributes
This should fix out Github language statistics
---
.gitattributes | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..2586cf2089
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+public/js/lib/codemirror linguist-vendored
+*.jsx linguist-language=JavaScript
From b7e39cd9502b95709880ff4d1da1b8a30f8f4af1 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 12:27:07 -0700
Subject: [PATCH 082/548] Update .gitattributes
---
.gitattributes | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitattributes b/.gitattributes
index 2586cf2089..38f518f571 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,2 @@
-public/js/lib/codemirror linguist-vendored
+public/js/lib/codemirror/* linguist-vendored
*.jsx linguist-language=JavaScript
From 27cff0becfdec5e0af7fa3655076f77d114d40f5 Mon Sep 17 00:00:00 2001
From: Samuel Plumppu
Date: Wed, 5 Aug 2015 21:37:04 +0200
Subject: [PATCH 083/548] added test for object for steamroller bonfire
---
seed/challenges/intermediate-bonfires.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index 5ae11fc7a4..c3f86b44c6 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -675,7 +675,8 @@
"tests": [
"assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');",
"assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'should flatten nested arrays');",
- "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');"
+ "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');",
+ "assert.deepEqual(steamroller([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'should work with actual objects');"
],
"MDNlinks": [
"Array.isArray()"
From 3cfd69c70446ba23b0133af572236377f981bb63 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 11:29:19 -0700
Subject: [PATCH 084/548] add loopbackMigrationGrandfathered flag
---
common/models/user.json | 4 ++++
seed/loopbackMigration.js | 2 ++
2 files changed, 6 insertions(+)
diff --git a/common/models/user.json b/common/models/user.json
index d055e431ff..32ef5e3c19 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -27,6 +27,10 @@
"type": "boolean",
"default": false
},
+ "isMigrationGrandfathered": {
+ "type": "boolean",
+ "default": false
+ },
"username": {
"type": "string",
"lowercase": true,
diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js
index 333629438a..d167ccec8b 100644
--- a/seed/loopbackMigration.js
+++ b/seed/loopbackMigration.js
@@ -92,6 +92,8 @@ var users = dbObservable
user.username = 'fcc' + uuid.v4().slice(0, 8);
if (user.github) {
user.isGithubCool = true;
+ } else {
+ user.isMigrationGrandfathered = true;
}
return user;
})
From 504239050c74a50afa4710c58aa8cc072cb6327b Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 11:45:58 -0700
Subject: [PATCH 085/548] remove old license information repo is now under
copyright to FCC find license in root directory
---
server/boot/challenge.js | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index 5e0cc37f0d..4228a3ff15 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -1,35 +1,3 @@
-/**
- * Created by nathanleniz on 5/15/15.
- * Copyright (c) 2015, Free Code Camp
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. Neither the name of the copyright holder nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
var R = require('ramda'),
Rx = require('rx'),
assign = require('object.assign'),
From f167238c74d772ea33b54940a852a5bdc8d88f46 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 13:01:19 -0700
Subject: [PATCH 086/548] remove public accounts if user is not github cool or
grandfathered
---
server/boot/user.js | 202 +++++++++++++++++++++++---------------------
1 file changed, 104 insertions(+), 98 deletions(-)
diff --git a/server/boot/user.js b/server/boot/user.js
index 7278e0a07d..1adfcfa99a 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -122,113 +122,119 @@ module.exports = function(app) {
*/
function returnUser(req, res, next) {
+ const username = req.params.username.toLowerCase();
+ const { path } = req;
User.findOne(
- { where: { 'username': req.params.username.toLowerCase() } },
+ { where: { username } },
function(err, user) {
if (err) {
return next(err);
}
- if (user) {
- user.progressTimestamps =
- user.progressTimestamps.sort(function(a, b) {
- return a - b;
- });
-
- var timeObject = Object.create(null);
- R.forEach(function(time) {
- timeObject[moment(time).format('YYYY-MM-DD')] = time;
- }, user.progressTimestamps);
-
- var tmpLongest = 1;
- var timeKeys = R.keys(timeObject);
-
- user.longestStreak = 0;
- for (var i = 1; i <= timeKeys.length; i++) {
- if (moment(timeKeys[i - 1]).add(1, 'd').toString()
- === moment(timeKeys[i]).toString()) {
- tmpLongest++;
- if (tmpLongest > user.longestStreak) {
- user.longestStreak = tmpLongest;
- }
- } else {
- tmpLongest = 1;
- }
- }
-
- timeKeys = timeKeys.reverse();
- tmpLongest = 1;
-
- user.currentStreak = 1;
- var today = moment(Date.now()).format('YYYY-MM-DD');
-
- const yesterday = moment(today).subtract(1, 'd').toString();
- const yesteryesterday = moment(today).subtract(2, 'd').toString();
-
- if (
- moment(today).toString() === moment(timeKeys[0]).toString() ||
- yesterday === moment(timeKeys[0]).toString() ||
- yesteryesterday === moment(timeKeys[0]).toString()
- ) {
- for (var _i = 1; _i <= timeKeys.length; _i++) {
-
- if (
- moment(timeKeys[_i - 1]).subtract(1, 'd').toString() ===
- moment(timeKeys[_i]).toString()
- ) {
-
- tmpLongest++;
-
- if (tmpLongest > user.currentStreak) {
- user.currentStreak = tmpLongest;
- }
- } else {
- break;
- }
- }
- } else {
- user.currentStreak = 1;
- }
-
- var data = {};
- var progressTimestamps = user.progressTimestamps;
- progressTimestamps.forEach(function(timeStamp) {
- data[(timeStamp / 1000)] = 1;
- });
-
- user.currentStreak = user.currentStreak || 1;
- user.longestStreak = user.longestStreak || 1;
- var challenges = user.completedChallenges.filter(function( obj ) {
- return obj.challengeType === 3 || obj.challengeType === 4;
- });
-
- res.render('account/show', {
- title: 'Camper ' + user.username + '\'s portfolio',
- username: user.username,
- name: user.name,
- location: user.location,
- githubProfile: user.githubProfile,
- linkedinProfile: user.linkedinProfile,
- codepenProfile: user.codepenProfile,
- facebookProfile: user.facebookProfile,
- twitterHandle: user.twitterHandle,
- bio: user.bio,
- picture: user.picture,
- progressTimestamps: user.progressTimestamps,
- challenges: challenges,
- calender: data,
- moment: moment,
- longestStreak: user.longestStreak +
- (user.longestStreak === 1 ? ' day' : ' days'),
- currentStreak: user.currentStreak +
- (user.currentStreak === 1 ? ' day' : ' days')
- });
- } else {
+ if (!user) {
req.flash('errors', {
- msg: "404: We couldn't find a page with that url. " +
- 'Please double check the link.'
+ msg: `404: We couldn't find path ${ path }`
});
return res.redirect('/');
}
+ if (!user.isGithubCool && !user.isMigrationGrandfathered) {
+ req.flash('errors', {
+ msg: `
+ user ${ username } has not completed account signup
+ `
+ });
+ return res.redirect('/');
+ }
+ user.progressTimestamps =
+ user.progressTimestamps.sort(function(a, b) {
+ return a - b;
+ });
+
+ var timeObject = Object.create(null);
+ R.forEach(function(time) {
+ timeObject[moment(time).format('YYYY-MM-DD')] = time;
+ }, user.progressTimestamps);
+
+ var tmpLongest = 1;
+ var timeKeys = R.keys(timeObject);
+
+ user.longestStreak = 0;
+ for (var i = 1; i <= timeKeys.length; i++) {
+ if (moment(timeKeys[i - 1]).add(1, 'd').toString()
+ === moment(timeKeys[i]).toString()) {
+ tmpLongest++;
+ if (tmpLongest > user.longestStreak) {
+ user.longestStreak = tmpLongest;
+ }
+ } else {
+ tmpLongest = 1;
+ }
+ }
+
+ timeKeys = timeKeys.reverse();
+ tmpLongest = 1;
+
+ user.currentStreak = 1;
+ var today = moment(Date.now()).format('YYYY-MM-DD');
+
+ const yesterday = moment(today).subtract(1, 'd').toString();
+ const yesteryesterday = moment(today).subtract(2, 'd').toString();
+
+ if (
+ moment(today).toString() === moment(timeKeys[0]).toString() ||
+ yesterday === moment(timeKeys[0]).toString() ||
+ yesteryesterday === moment(timeKeys[0]).toString()
+ ) {
+ for (var _i = 1; _i <= timeKeys.length; _i++) {
+
+ if (
+ moment(timeKeys[_i - 1]).subtract(1, 'd').toString() ===
+ moment(timeKeys[_i]).toString()
+ ) {
+
+ tmpLongest++;
+
+ if (tmpLongest > user.currentStreak) {
+ user.currentStreak = tmpLongest;
+ }
+ } else {
+ break;
+ }
+ }
+ } else {
+ user.currentStreak = 1;
+ }
+
+ var data = {};
+ var progressTimestamps = user.progressTimestamps;
+ progressTimestamps.forEach(function(timeStamp) {
+ data[(timeStamp / 1000)] = 1;
+ });
+
+ user.currentStreak = user.currentStreak || 1;
+ user.longestStreak = user.longestStreak || 1;
+
+ res.render('account/show', {
+ title: 'Camper ' + user.username + '\'s portfolio',
+ username: user.username,
+ name: user.name,
+ isMigrationGrandfathered: user.isMigrationGrandfathered,
+ isGithubCool: user.isGithubCool,
+ location: user.location,
+ githubProfile: user.githubProfile,
+ linkedinProfile: user.linkedinProfile,
+ codepenProfile: user.codepenProfile,
+ facebookProfile: user.facebookProfile,
+ twitterHandle: user.twitterHandle,
+ bio: user.bio,
+ picture: user.picture,
+ progressTimestamps: user.progressTimestamps,
+ calender: data,
+ moment: moment,
+ longestStreak: user.longestStreak +
+ (user.longestStreak === 1 ? ' day' : ' days'),
+ currentStreak: user.currentStreak +
+ (user.currentStreak === 1 ? ' day' : ' days')
+ });
}
);
}
From 0def1b3ba8e47e8f4c1b75fdafd5a703af7f32b3 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 13:21:53 -0700
Subject: [PATCH 087/548] readd challenges
---
server/boot/user.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/server/boot/user.js b/server/boot/user.js
index 1adfcfa99a..b1d3c6d8d3 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -209,6 +209,9 @@ module.exports = function(app) {
progressTimestamps.forEach(function(timeStamp) {
data[(timeStamp / 1000)] = 1;
});
+ var challenges = user.completedChallenges.filter(function( obj ) {
+ return obj.challengeType === 3 || obj.challengeType === 4;
+ });
user.currentStreak = user.currentStreak || 1;
user.longestStreak = user.longestStreak || 1;
@@ -229,6 +232,7 @@ module.exports = function(app) {
picture: user.picture,
progressTimestamps: user.progressTimestamps,
calender: data,
+ challenges: challenges,
moment: moment,
longestStreak: user.longestStreak +
(user.longestStreak === 1 ? ' day' : ' days'),
From caef8c9da8c78ee74117658f2e568c5cb0e225cd Mon Sep 17 00:00:00 2001
From: "Cristian V. Nica"
Date: Wed, 5 Aug 2015 23:22:37 +0300
Subject: [PATCH 088/548] Fixing #1575
Fixing small typo
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 0325880343..fd393264d3 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -677,7 +677,7 @@
"description":[
"",
"A very important data type in javascript is the Object
",
- " Objects
a similar to arrays
except that instead of using indexes to access and modify their data, Objects have what are called properties
",
+ " Objects
are similar to arrays
except that instead of using indexes to access and modify their data, Objects have what are called properties
",
"Here's a sample Object",
"",
"var cat = {",
From 07e9bbf00a887029e9678c8b8934041ee1d345f0 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 13:54:21 -0700
Subject: [PATCH 089/548] add link to github waypoint to non github cool
campers
---
server/views/account/account.jade | 117 ++++++++++++++++--------------
1 file changed, 62 insertions(+), 55 deletions(-)
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index b1204b264e..3e95b67dc6 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -5,67 +5,74 @@ block content
.panel.panel-info(ng-controller="profileValidationController")
.panel-heading.text-center Update your portfolio here:
.panel-body
- if (!user.github)
+ if (!user.isGithubCool)
+ .row
.col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
- i.fa.fa-github
- | Link GitHub with my account
- .col-xs-12
- form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm' ng-show="asyncComplete")
- input(type='hidden', name='_csrf', value=_csrf)
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='bio') Bio (140 characters)
- .col-sm-4
- input.form-control(type='text', name='bio', autocomplete="off", ng-model='user.bio', ng-maxlength='140', id='bio')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.bio.$error.maxlength && !profileForm.bio.$pristine')
- alert(type='danger')
- span.ion-close-circled
- | Your bio must be fewer than 140 characters.
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') Twitter
- .col-sm-4
- .input-group.twitter-input
- span.input-group-addon @
- input.form-control(type='text', name='twitterHandle', autocomplete="off", id='twitterHandle', ng-model='user.twitterHandle', ng-maxlength='15', ng-pattern="/^[A-z0-9_]+$/")
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.twitterHandle.$error.pattern")
- alert(type='danger')
+ .text-left.btn-info.btn.btn-block.btn-link-social(href='http://www.freecodecamp.com/challenges/waypoint-join-our-chat-room')
+ span Link your account to GitHub to update your portfolio page. Click here if you don’t have a GitHub account yet.
+ .row
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ i.fa.fa-github
+ | Link GitHub with my account
+
+ .row
+ .col-xs-12
+ form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm' ng-show="asyncComplete")
+ input(type='hidden', name='_csrf', value=_csrf)
+ .form-group
+ label.col-sm-3.col-sm-offset-1.control-label(for='bio') Bio (140 characters)
+ .col-sm-4
+ input.form-control(type='text', name='bio', autocomplete="off", ng-model='user.bio', ng-maxlength='140', id='bio')
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.bio.$error.maxlength && !profileForm.bio.$pristine')
+ alert(type='danger')
span.ion-close-circled
- | Your Twitter handle should only contain letters, numbers and underscores (az10_).
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.twitterHandle.$error.maxlength && !profileForm.twitterHandle.$pristine')
- alert(type='danger')
+ | Your bio must be fewer than 140 characters.
+ .form-group
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') Twitter
+ .col-sm-4
+ .input-group.twitter-input
+ span.input-group-addon @
+ input.form-control(type='text', name='twitterHandle', autocomplete="off", id='twitterHandle', ng-model='user.twitterHandle', ng-maxlength='15', ng-pattern="/^[A-z0-9_]+$/")
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.twitterHandle.$error.pattern")
+ alert(type='danger')
+ span.ion-close-circled
+ | Your Twitter handle should only contain letters, numbers and underscores (az10_).
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.twitterHandle.$error.maxlength && !profileForm.twitterHandle.$pristine')
+ alert(type='danger')
+ span.ion-close-circled
+ | Your name must be fewer than 15 characters.
+
+ .form-group
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') CodePen
+ .col-sm-4
+ input.form-control(type='url', name='codepenProfile', id='codepenProfile', autocomplete="off", ng-model='user.codepenProfile', placeholder='http://')
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine")
+ alert(type='danger')
span.ion-close-circled
- | Your name must be fewer than 15 characters.
+ | Please enter a valid URL format (http://www.example.com).
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') CodePen
- .col-sm-4
- input.form-control(type='url', name='codepenProfile', id='codepenProfile', autocomplete="off", ng-model='user.codepenProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
+ .form-group
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') LinkedIn
+ .col-sm-4
+ input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', autocomplete="off", ng-model='user.linkedinProfile', placeholder='http://')
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine")
+ alert(type='danger')
+ span.ion-close-circled
+ | Please enter a valid URL format (http://www.example.com).
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') LinkedIn
- .col-sm-4
- input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', autocomplete="off", ng-model='user.linkedinProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
+ .form-group
+ label.col-sm-3.col-sm-offset-1.control-label(for='email') Facebook
+ .col-sm-4
+ input.form-control(type='url', name='facebookProfile', id='facebookProfile', autocomplete="off", ng-model='user.facebookProfile', placeholder='http://')
+ .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.facebookProfile.$error.url && !profileForm.facebookProfile.$pristine")
+ alert(type='danger')
+ span.ion-close-circled
+ | Please enter a valid URL format (http://www.example.com).
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') Facebook
- .col-sm-4
- input.form-control(type='url', name='facebookProfile', id='facebookProfile', autocomplete="off", ng-model='user.facebookProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.facebookProfile.$error.url && !profileForm.facebookProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- button.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='profileForm.$invalid')
- span.ion-edit
- | Update my info
+ button.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='!user.isGithubCool || profileForm.$invalid')
+ span.ion-edit
+ | Update my info
.panel.panel-info
.panel-heading.text-center Manage your account here:
From 43a1a6253616f82c5fbe7b00d872fe7337b824e9 Mon Sep 17 00:00:00 2001
From: "Rafael J. Rodriguez"
Date: Wed, 5 Aug 2015 17:34:06 -0400
Subject: [PATCH 090/548] Fix for Issue #1540
---
seed/challenges/intermediate-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index c3f86b44c6..4019e54af5 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -356,7 +356,7 @@
" return arr1;",
"}",
"",
- "unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);"
+ "unite([1, 3, 2], [5, 2, 1, 4], [2, 1]);"
],
"tests": [
"assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
From 36f66c1262100542c44f62f9f040133a9a224cda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Wed, 5 Aug 2015 23:53:45 +0200
Subject: [PATCH 091/548] Fixed tests in waypoint
changes col-xs-12 to col-xs-6 so the tests works
Issue #1578
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 5a89962f12..5c0ddb95a8 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1883,7 +1883,7 @@
"Above your right-well, inside its \"col-xs-6\" div
element, add a h4
element with the text \"#right-well\"."
],
"tests": [
- "assert($('.col-xs-12').children('h4') && $('.col-xs-12').children('h4').length > 1, 'Add an h4
element to each of your <div class=\\'col-xs-6\\'>
elements.');",
+ "assert($('.col-xs-6').children('h4') && $('.col-xs-6').children('h4').length > 1, 'Add an h4
element to each of your <div class=\\'col-xs-6\\'>
elements.');",
"assert(new RegExp('#left-well','gi').test($('h4').text()), 'One h4
element should have the text \"#left-well\".');",
"assert(new RegExp('#right-well','gi').test($('h4').text()), 'One h4
element should have the text \"#right-well\".');"
],
From c6b2140c023516e98ab2af6978cbd5c20d620d64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Thu, 6 Aug 2015 00:20:52 +0200
Subject: [PATCH 092/548] first fixes - length larger _or equal_ to 1
I'm not sure if the tests are too vague - they allow to comment out way
more than just the text specified - like the whole page..
---
seed/challenges/bootstrap.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 5a89962f12..5cfb6f699d 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -2036,9 +2036,9 @@
"Add a comment at the top of your HTML that says You shouldn't need to modify code below this line
."
],
"tests": [
- "assert(editor.match(//g).length > 1, 'Be sure to close your comment with -->
.')"
+ "assert(editor.match(//g).length >= 1, 'Be sure to close your comment with -->
.')"
],
"challengeSeed": [
"",
From 073456e0de4f99351ef2fde6b75d623d94b71e6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Thu, 6 Aug 2015 00:25:11 +0200
Subject: [PATCH 093/548] changed to agree with the style -
greater than 0 instead of greater than or eqal to 1
---
seed/challenges/bootstrap.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 5cfb6f699d..ba2869359a 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -2036,9 +2036,9 @@
"Add a comment at the top of your HTML that says You shouldn't need to modify code below this line
."
],
"tests": [
- "assert(editor.match(//g).length >= 1, 'Be sure to close your comment with -->
.')"
+ "assert(editor.match(//g).length > 0, 'Be sure to close your comment with -->
.')"
],
"challengeSeed": [
"",
From c577190e675f0ce77d512e59567423d2b4ced701 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Thu, 6 Aug 2015 00:57:55 +0200
Subject: [PATCH 094/548] Fixed tests
Added check if the object isn't null and escaped quotes because text
enclosed apostrophe
---
seed/challenges/bootstrap.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index ba2869359a..03c9ed18bd 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -2036,9 +2036,9 @@
"Add a comment at the top of your HTML that says You shouldn't need to modify code below this line
."
],
"tests": [
- "assert(editor.match(//g).length > 0, 'Be sure to close your comment with -->
.')"
+ "assert(editor.match(//g) && editor.match(/-->/g).length > 0, 'Be sure to close your comment with -->
.')"
],
"challengeSeed": [
"",
From e9958281c9d87cc82f9537c8541cd0183259927d Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 17:49:19 -0700
Subject: [PATCH 095/548] pull user bio from github
---
common/models/User-Identity.js | 52 +++++++++++++++++++++++++---------
common/models/user.json | 12 ++++++++
2 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 3df7f01400..a69685cc29 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -1,3 +1,4 @@
+import assign from 'object.assign';
import debugFactory from 'debug';
const debug = debugFactory('freecc:models:userIdent');
@@ -10,6 +11,39 @@ function getFirstImageFromProfile(profile) {
null;
}
+// using es6 argument destructing
+function setProfileFromGithub(
+ user,
+ {
+ profileUrl: githubURL,
+ username
+ },
+ {
+ location,
+ email: githubEmail,
+ id: githubId,
+ 'created_at': joinedGithubOn,
+ blog: website,
+ name
+ }
+) {
+ return assign(
+ user,
+ { isGithubCool: true, isMigrationGrandfathered: false },
+ {
+ name,
+ username: username.toLowerCase(),
+ location,
+ joinedGithubOn,
+ website,
+ githubId,
+ githubURL,
+ githubEmail,
+ githubProfile: githubURL
+ }
+ );
+}
+
export default function(UserIdent) {
UserIdent.observe('before save', function(ctx, next) {
var userIdent = ctx.currentInstance || ctx.instance;
@@ -25,7 +59,8 @@ export default function(UserIdent) {
return next();
}
- const picture = getFirstImageFromProfile(userIdent.profile);
+ const { profile } = userIdent;
+ const picture = getFirstImageFromProfile(profile);
debug('picture', picture, user.picture);
// check if picture was found
@@ -41,19 +76,10 @@ export default function(UserIdent) {
userChanged = true;
}
- // if user signed in with github
- // and user is not github cool
- // or username is different from github username
- // then make them github cool
- // and set their username from their github profile.
- if (
- userIdent.provider === 'github-login' &&
- (!user.isGithubCool ||
- user.username !== userIdent.provider.username.toLowerCase())
- ) {
+ // if user signed in with github refresh their info
+ if (userIdent.provider === 'github-login') {
debug("user isn't github cool or username from github is different");
- user.isGithubCool = true;
- user.username = userIdent.profile.username.toLowerCase();
+ setProfileFromGithub(user, profile, profile._json);
userChanged = true;
}
diff --git a/common/models/user.json b/common/models/user.json
index 32ef5e3c19..b961807093 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -27,6 +27,18 @@
"type": "boolean",
"default": false
},
+ "githubId": {
+ "type": "string"
+ },
+ "githubURL": {
+ "type": "string"
+ },
+ "githubEmail": {
+ "type": "string"
+ },
+ "joinedGithubOn": {
+ "type": "date"
+ },
"isMigrationGrandfathered": {
"type": "boolean",
"default": false
From 8c7a9dd818d4059d8d1acfb1ff293f88e8f4c44f Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 18:51:15 -0700
Subject: [PATCH 096/548] fix trim and lowercase user username and email
---
common/models/user.js | 8 ++++++++
common/models/user.json | 13 +++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/common/models/user.js b/common/models/user.js
index 3c7e54cbb3..9b7de00def 100644
--- a/common/models/user.js
+++ b/common/models/user.js
@@ -44,6 +44,14 @@ module.exports = function(User) {
// username should be unique
User.validatesUniquenessOf('username');
+ User.observe('before save', function({ instance: user }, next) {
+ if (user) {
+ user.username = user.username.trim().toLowerCase();
+ user.email = user.email.trim().toLowerCase();
+ }
+ next();
+ });
+
debug('setting up user hooks');
User.afterRemote('confirm', function(ctx) {
ctx.req.flash('success', {
diff --git a/common/models/user.json b/common/models/user.json
index b961807093..97027fd50e 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -12,9 +12,7 @@
"unique": true,
"sparse": true
}
- },
- "lowercase": true,
- "trim": true
+ }
},
"password": {
"type": "string"
@@ -45,9 +43,12 @@
},
"username": {
"type": "string",
- "lowercase": true,
- "trim": true,
- "require": true
+ "require": true,
+ "index": {
+ "mongodb": {
+ "unique": true
+ }
+ }
},
"bio": {
"type": "string",
From e6d05e34217f4b360b5a1fb29189284bb686d794 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 19:08:25 -0700
Subject: [PATCH 097/548] fix specify index using mongodb property
---
common/models/challenge.json | 7 ++++++-
common/models/nonprofit.json | 7 ++++++-
common/models/story.json | 19 ++++++++++---------
common/models/user.json | 4 +++-
4 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/common/models/challenge.json b/common/models/challenge.json
index 3258d641ee..baa78a4e4c 100644
--- a/common/models/challenge.json
+++ b/common/models/challenge.json
@@ -6,7 +6,12 @@
"properties": {
"name": {
"type": "string",
- "unique": true
+ "index": {
+ "mongodb": {
+ "unique": true,
+ "background": true
+ }
+ }
},
"title": {
"type": "string"
diff --git a/common/models/nonprofit.json b/common/models/nonprofit.json
index 738c43e9ad..5d8dddbc3d 100644
--- a/common/models/nonprofit.json
+++ b/common/models/nonprofit.json
@@ -6,7 +6,12 @@
"properties": {
"name": {
"type": "string",
- "unique": true
+ "index": {
+ "mongodb": {
+ "unique": true,
+ "background": true
+ }
+ }
},
"whatDoesNonprofitDo": {
"type": "string"
diff --git a/common/models/story.json b/common/models/story.json
index 8aab09964b..6f252cefb3 100644
--- a/common/models/story.json
+++ b/common/models/story.json
@@ -6,28 +6,29 @@
"properties": {
"name": {
"type": "string",
- "unique": true
+ "index": {
+ "mongodb": {
+ "unique": true,
+ "background": true
+ }
+ }
},
"headline": {
- "type": "string",
- "unique": false
+ "type": "string"
},
"timePosted": {
"type": "number",
"default": 0
},
"link": {
- "type": "string",
- "unique": false
+ "type": "string"
},
"metaDescription": {
"type": "string",
- "default": "",
- "unique": false
+ "default": ""
},
"description": {
- "type": "string",
- "unique": false
+ "type": "string"
},
"originalStoryAuthorEmail": {
"type": "string",
diff --git a/common/models/user.json b/common/models/user.json
index 97027fd50e..871cd2db46 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -10,6 +10,7 @@
"index": {
"mongodb": {
"unique": true,
+ "background": true,
"sparse": true
}
}
@@ -46,7 +47,8 @@
"require": true,
"index": {
"mongodb": {
- "unique": true
+ "unique": true,
+ "background": true
}
}
},
From a838a4097d6788373802dbb4e83efb20561bf5e2 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 19:12:54 -0700
Subject: [PATCH 098/548] fix clicking on image or points always takes you to
/account
---
server/views/partials/navbar.jade | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade
index 8d310d8846..a306151639 100644
--- a/server/views/partials/navbar.jade
+++ b/server/views/partials/navbar.jade
@@ -21,15 +21,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
a.btn.signup-btn.signup-btn-nav(href='/login') Sign in
else
li
- if (user.username)
- a(href='/' + user.username) [ #{user.progressTimestamps.length} ]
-
- else
- a(href='/account') [ #{user.progressTimestamps.length} ]
+ a(href='/account') [ #{user.progressTimestamps.length} ]
.hidden-xs.hidden-sm
- if (user.username)
- a(href='/' + user.username)
- img.profile-picture.float-right(src='#{user.picture}')
- else
- a(href='/account')
- img.profile-picture.float-right(src='#{user.picture}')
+ a(href='/account')
+ img.profile-picture.float-right(src='#{user.picture}')
From 0ce81bbabbd78aecc21c68ba8c0d47b09727cd41 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 19:29:17 -0700
Subject: [PATCH 099/548] fix email sign should not require username
---
common/models/user.js | 6 ++++++
server/views/account/email-signup.jade | 19 -------------------
2 files changed, 6 insertions(+), 19 deletions(-)
diff --git a/common/models/user.js b/common/models/user.js
index 9b7de00def..212d972cc5 100644
--- a/common/models/user.js
+++ b/common/models/user.js
@@ -1,4 +1,5 @@
import { Observable } from 'rx';
+import uuid from 'node-uuid';
import moment from 'moment';
import debugFactory from 'debug';
@@ -62,6 +63,11 @@ module.exports = function(User) {
ctx.res.redirect('/email-signin');
});
+ User.beforeRemote('create', function({ req }, notUsed, next) {
+ req.body.username = 'fcc' + uuid.v4().slice(0, 8);
+ next();
+ });
+
User.afterRemote('login', function(ctx, user, next) {
var res = ctx.res;
var req = ctx.req;
diff --git a/server/views/account/email-signup.jade b/server/views/account/email-signup.jade
index c270b2470c..965eca605e 100644
--- a/server/views/account/email-signup.jade
+++ b/server/views/account/email-signup.jade
@@ -19,25 +19,6 @@ block content
alert(type='danger')
span.ion-close-circled
| That email address is already in use.
- .form-group
- .col-sm-6.col-sm-offset-3
- input.form-control(type='text', name='username', ng-keypress='', autocomplete="off", id='username', placeholder='username', ng-model='username', unique-username='', required, ng-minlength=5, ng-maxlength=20, ng-pattern="/^[A-z0-9_]+$/")
- .col-sm-6.col-sm-offset-3(ng-cloak, ng-show="profileForm.username.$error.pattern && !signupForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Your username should only contain letters, numbers and underscores (az10_).
- .col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.username.$error.unique && !signupForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | This username is taken.
- .col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.username.$error.minlength && !signupForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Your username must be at least 5 characters long.
- .col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.username.$error.maxlength && !signupForm.username.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Your usernames must be 20 characters or fewer.
.form-group
.col-sm-6.col-sm-offset-3
input.form-control(type='password', ng-model='password', name='password', id='password', placeholder='password', required, ng-minlength=8)
From ce9e2ebcae1e640e3d5a82def8427de6f2c1b3f8 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 5 Aug 2015 22:56:23 -0700
Subject: [PATCH 100/548] fix test email for string
---
common/models/user.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/models/user.js b/common/models/user.js
index 212d972cc5..81078d6df0 100644
--- a/common/models/user.js
+++ b/common/models/user.js
@@ -48,7 +48,9 @@ module.exports = function(User) {
User.observe('before save', function({ instance: user }, next) {
if (user) {
user.username = user.username.trim().toLowerCase();
- user.email = user.email.trim().toLowerCase();
+ user.email = typeof user.email === 'string' ?
+ user.email.trim().toLowerCase() :
+ user.email;
}
next();
});
From f33ac579841707cff2ad7ddb5ec280edfa417d01 Mon Sep 17 00:00:00 2001
From: "Cristian V. Nica"
Date: Thu, 6 Aug 2015 09:30:13 +0300
Subject: [PATCH 101/548] Fixing issue #1488
Correcting small mistakes in the waypoint instruction.
---
seed/challenges/jquery-ajax-and-json.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index ed9c2c64c9..dad707f590 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -257,9 +257,9 @@
"dashedName": "waypoint-target-the-same-element-with-multiple-jQuery-Selectors",
"difficulty": 3.06,
"description": [
- "Now you know three ways of targeting elements: by type ($('button')
), by class (($('.btn')
), and by id (($'#target1')
).",
+ "Now you know three ways of targeting elements: by type $('button')
, by class $('.btn')
), and by id $('#target1')
).",
"Use each of these jQuery selectors to target your button
element with the class \"btn\" and the id \"target1\".",
- "Use the addClass()
jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"button-primary\"."
+ "Use the addClass()
jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"btn-primary\"."
],
"tests": [
"assert(editor.match(/\\$\\(\\'button\\'\\)/g), 'Use the $\\(\\'button\\'\\)
selector.')",
From 3b94475f9d854fc43ad91991d37ee6e37941c976 Mon Sep 17 00:00:00 2001
From: Martin Kwan
Date: Thu, 6 Aug 2015 00:02:15 -0700
Subject: [PATCH 102/548] Updated Roman Numeral Challenge link
Updated link so it would open in a new tab instead of the current tab.
---
seed/challenges/intermediate-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index 4019e54af5..f9c9be22d8 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -103,7 +103,7 @@
"difficulty": "2.02",
"description": [
"Convert the given number into a roman numeral.",
- "All roman numerals answers should be provided in upper-case.",
+ "All roman numerals answers should be provided in upper-case.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
From 5882b9b84f903bdc9f0d2687ff3508b0dceffd34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Floty=C5=84ski?=
Date: Thu, 6 Aug 2015 09:03:03 +0200
Subject: [PATCH 103/548] Fixed a few typos in javascript-basic
---
seed/challenges/basic-javascript.json | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 15afb5ab25..52aab20a55 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -503,7 +503,7 @@
"difficulty":"9.98171",
"description":[
"",
- "We are able to modify the data store in an array be using indexes",
+ "We are able to modify the data stored in an array by using indexes",
"Example:",
"",
"var ourArray = [1,2,3];",
@@ -536,10 +536,10 @@
"difficulty": "9.9818",
"description": [
"",
- "When and array has been defined we still have the ability to make changes to it afterwards",
+ "When an array has been defined we still have the ability to make changes to it afterwards",
"One common way in which we can manipulate the data in an array is through .pop()
",
- " .pop()
is used to \"pop\" a value from the end of an array. We can retrieve this value by preforming the pop in a variable declaration.",
- "any type of variable can be \"popped\" from and array",
+ " .pop()
is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.",
+ "Any type of variable can be \"popped\" from an array",
"Let's try .pop()
now"
],
"tests": [
@@ -639,13 +639,13 @@
"description":[
"",
"In JavaScript we can divide up our code into separate and reusable parts called functions",
- "here's and example of a function",
+ "Here's an example of a function",
"",
"function functionName (a, b){",
" return(a + b);",
"}",
"
",
- "our function can be called like this",
+ "Our function can be called like this",
"functionName();
",
"Let's try creating and calling a function now called myFunction
"
],
@@ -688,7 +688,7 @@
"};",
"
",
"Objects are useful for storing data in a structured way or in a way that represents a real world object like a cat.",
- "Let's try to make a Object that represents a dog called myDog!"
+ "Let's try to make an Object that represents a dog called myDog!"
],
"tests":[
From 222d841e4ff756cbd23574ace0f22140a093703c Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Thu, 6 Aug 2015 00:19:03 -0700
Subject: [PATCH 104/548] on oauth signin only set profile/username if using
github
---
server/server.js | 55 +++++++++++++++++++++++++++++++++++++++---------
1 file changed, 45 insertions(+), 10 deletions(-)
diff --git a/server/server.js b/server/server.js
index 93b0a1a322..8a75517964 100755
--- a/server/server.js
+++ b/server/server.js
@@ -2,12 +2,13 @@ require('dotenv').load();
var pmx = require('pmx');
pmx.init();
-var assign = require('lodash').assign,
- loopback = require('loopback'),
- boot = require('loopback-boot'),
- expressState = require('express-state'),
- path = require('path'),
- passportProviders = require('./passport-providers');
+var uuid = require('node-uuid'),
+ assign = require('lodash').assign,
+ loopback = require('loopback'),
+ boot = require('loopback-boot'),
+ expressState = require('express-state'),
+ path = require('path'),
+ passportProviders = require('./passport-providers');
var generateKey =
require('loopback-component-passport/lib/models/utils').generateKey;
@@ -43,6 +44,39 @@ passportConfigurator.setupModels({
userCredentialModel: app.models.userCredential
});
+// using es6 argument destructing
+function setProfileFromGithub(
+ user,
+ {
+ profileUrl: githubURL,
+ username
+ },
+ {
+ location,
+ email: githubEmail,
+ id: githubId,
+ 'created_at': joinedGithubOn,
+ blog: website,
+ name
+ }
+) {
+ return assign(
+ user,
+ { isGithubCool: true, isMigrationGrandfathered: false },
+ {
+ name,
+ username: username.toLowerCase(),
+ location,
+ joinedGithubOn,
+ website,
+ githubId,
+ githubURL,
+ githubEmail,
+ githubProfile: githubURL
+ }
+ );
+}
+
var passportOptions = {
emailOptional: true,
profileToUser: function(provider, profile) {
@@ -53,9 +87,9 @@ var passportOptions = {
emails[0].value :
null;
- var username = (profile.username || profile.id);
- username = typeof username === 'string' ? username.toLowerCase() :
- username;
+ // create random username
+ // username will be assigned when camper signups for Github
+ var username = 'fcc' + uuid.v4().slice(0, 8);
var password = generateKey('password');
var userObj = {
username: username,
@@ -65,8 +99,9 @@ var passportOptions = {
if (email) {
userObj.email = email;
}
+
if (provider === 'github-login') {
- userObj.isGithubCool = true;
+ setProfileFromGithub(userObj, profile, profile._json);
}
return userObj;
}
From 89fffce02d3a53208168c475718b38b97e6f7549 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 6 Aug 2015 01:44:31 -0700
Subject: [PATCH 105/548] add simon zipline
---
seed/challenges/intermediate-ziplines.json | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json
index bba888f2cf..0e6246077b 100644
--- a/seed/challenges/intermediate-ziplines.json
+++ b/seed/challenges/intermediate-ziplines.json
@@ -133,6 +133,45 @@
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
+ },
+ {
+ "id": "bd7158d8c442eddfaeb5bd1c",
+ "name": "Zipline: Build a Simon Game",
+ "dashedName": "zipline-build-a-simon-game",
+ "difficulty": 1.07,
+ "challengeSeed": ["126415123"],
+ "description": [
+ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/KpJXZV/ .",
+ "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.",
+ "Rule #2: You may use whichever libraries or APIs you need.",
+ "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.",
+ "Here are the user stories you must enable, and optional bonus user stories:",
+ "User Story: As a user, I am presented with a random series of button presses.",
+ "User Story: As a user, each time I input a series of button presses correctly, I see the same series of button presses but with an additional step.",
+ "User Story: As a user, I hear a sound that corresponds to each button both when the series of button presses plays, and when I personally press a button.",
+ "User Story: As a user, if I press the wrong button, I am notified that I have done so, and that series of button presses starts again to remind me of the pattern so I can try again.",
+ "User Story: As a user, I can see how many steps are in the current series of button presses.",
+ "Bonus User Story: As a user, if I want to restart, I can hit a button to do so, and the game will return to a single step.",
+ "Bonus User Story: As a user, I can play in strict mode where if I get a button press wrong, it notifies me that I have done so, and the game restarts at a new random series of button presses.",
+ "Bonus User Story: As a user, the tempo of the game speeds up incrementally on the 5th, 9th and 13th step.",
+ "Bonus User Story: As a user, I can win the game by getting a series of 20 steps correct. I am notified of my victory, then the game starts over.",
+ "Hint: Here are mp3s you can use for each button: https://s3.amazonaws.com/freecodecamp/simonSound1.mp3
, https://s3.amazonaws.com/freecodecamp/simonSound2.mp3
, https://s3.amazonaws.com/freecodecamp/simonSound3.mp3
, https://s3.amazonaws.com/freecodecamp/simonSound4.mp3
.",
+ "Remember to use RSAP if you get stuck.",
+ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
+ "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
+ ],
+ "challengeType": 3,
+ "tests": [],
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
}
]
}
From 2e0e7d5a749e9036eacef0a5bbefccd6c424de36 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 6 Aug 2015 02:06:53 -0700
Subject: [PATCH 106/548] rename all of Ben's JavaScript challenges to be more
in line with other waypoints
---
seed/challenges/basic-javascript.json | 195 +++++++++++---------------
1 file changed, 78 insertions(+), 117 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 52aab20a55..ec12d76d01 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -4,18 +4,17 @@
"challenges": [
{
"id":"bd7123c9c441eddfaeb4bdef",
- "name":"Welcome To Comments",
- "dashedName":"waypoint-welcome-to-comments",
+ "name":"Waypoint: Comment your JavaScript Code",
+ "dashedName":"waypoint-comment-your-javascript-code",
"difficulty":"9.98",
"description":[
- "",
"A comment is a very useful line of code that is not actually ran by the machine executing it. With this property comments are the perfect way of creating notes to yourself or anyone else who reads your code describing what the code does",
"It's an extremely important part in writing good, efficient and maintainable code and a requirement by most employers",
"Let's take a look at the two ways in which we can write a comment in JavaScript",
- " //This is a comment
",
+ "//This is a comment
",
"These comment out the entire line that they are on",
- " /*This is also a comment*/
",
- "These comment out everything in between /*
and */
",
+ "/*This is also a comment*/
",
+ "These comment out everything in between /*
and */
",
"Try creating one of each now."
],
"tests":[
@@ -30,15 +29,15 @@
},
{
"id": "bd7123c9c441eddfaeb5bdef",
- "name": "Unconditionally Loving Booleans",
- "dashedName": "waypoint-unconditionally-loving-booleans",
+ "name": "Waypoint: Understand Boolean Values",
+ "dashedName": "waypoint-understand-boolean-values",
"difficulty": "9.98001",
"description": [
"Return true",
"A boolean is a type of variable that represents either true or false (Named after the British mathematician George Boole).",
- "Booleans are often the result of a function or a comparative operation, for example 1==1
is true whereas 1==2
is false.",
- "They are most commonly found inside if
statements which we shall cover later",
- "For now Let's modify our welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked"
+ "Booleans are often the result of a function or a comparative operation, for example 1==1
is true whereas 1==2
is false.",
+ "They are most commonly found inside if
statements which we shall cover later",
+ "For now Let's modify our welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked"
],
"tests": [
"assert(typeof(welcomeToBooleans())=='boolean', 'The value returned by welcomeToBooleans() should be a boolean value. (true of false)');",
@@ -56,11 +55,10 @@
},
{
"id": "bd7123c9c443eddfaeb5bdef",
- "name": "Start Using Variables",
- "dashedName": "waypoint-start-using-variables",
+ "name": "Declare JavaScript Variables",
+ "dashedName": "waypoint-assign-values-to-javascript-variables",
"difficulty": "9.9801",
"description": [
- "",
"Now, use the var
keyword to create a variable
called myName
. Set its value to your name.",
"Variables
are used to store values.",
"The name variable comes from the fact that it's value, varies!",
@@ -84,13 +82,12 @@
},
{
"id": "bd7123c9c444eddfaeb5bdef",
- "name": "Define Your First and Last Name",
+ "name": "Declare String Variables",
"dashedName": "waypoint-define-your-first-and-last-name",
"difficulty": "9.9802",
"description": [
- "",
"Programs will almost always have several different variables that are used to keep track of several different pieces of data",
- "We are now going to go and create two new variables myFirstName
and myLastName
that are strings",
+ "We are now going to go and create two new variables myFirstName
and myLastName
that are strings",
"You can assign these variables to be equal to your first and last names respectively."
],
"tests": [
@@ -116,7 +113,6 @@
"dashedName": "waypoint-check-the-length-property-of-a-string-variable",
"difficulty": "9.9809",
"description": [
- "",
"Use the .length
property to count the number of characters in the lastNameLength
variable.",
"For example, if we created a variable var firstName = \"Julie\"
, we could find out how long the string \"Julie\" is by using the firstName.length
property."
],
@@ -185,9 +181,9 @@
"dashedName": "waypoint-use-bracket-notation-to-find-the-nth-character-in-a-string",
"difficulty": "9.9811",
"description": [
- "Just like the last lesson where we used Bracket Notation
to access the first letter we can use the same method to get the letters ar other positions",
+ "Just like the last lesson where we used Bracket Notation
to access the first letter we can use the same method to get the letters ar other positions",
"Don't forget that computers start counting at 0 so the first letter is actually the zeroth one",
- "Let's now try to set thirdLetterOfLastName
to equal the third letter
of the lastName
variable",
+ "Let's now try to set thirdLetterOfLastName
to equal the third letter
of the lastName
variable",
"Try looking at the secondLetterOfFirstName
variable declaration if you get stuck."
],
"tests": [
@@ -242,7 +238,7 @@
},
{
"id": "bd7123c9c452eddfaeb5bdef",
- "name": "Use Bracket Notation to Find the Nth to Last Character in a String",
+ "name": "Use Bracket Notation to Find the Nth-to-Last Character in a String",
"dashedName": "waypoint-use-bracket-notation-to-find-the-nth-to-last-character-in-a-string",
"difficulty": "9.9813",
"description": [
@@ -272,15 +268,14 @@
},
{
"id": "cf1111c1c11feddfaeb3bdef",
- "name": "Magical Maths Addition",
+ "name": "Add Two Numbers with JavaScript",
"dashedName": "waypoint-magical-maths-addition",
"difficulty": "9.98141",
"description": [
- "",
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
"Let's try a few of the most commonly used ones now",
- "We use +
for addition",
- "Replace the 0
with correct number to achieve the result in the comment."
+ "We use +
for addition",
+ "Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
"assert((function(){if(add == 20 && editor.getValue().match(/\\+/g)){return(true);}else{return(false);}})(), 'Add should be the result of a sum and be equal to 20');"
@@ -296,15 +291,14 @@
},
{
"id": "cf1111c1c11feddfaeb4bdef",
- "name": "Magical Maths Subtraction",
+ "name": "Subtract One Number from Another with JavaScript",
"dashedName": "waypoint-magical-maths-subtraction",
"difficulty": "9.98142",
"description": [
- "",
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
"Let's try a few of the most commonly used ones now",
- "We use -
for subtraction",
- "Replace the 0
with correct number to achieve the result in the comment."
+ "We use -
for subtraction",
+ "Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
"assert((function(){if(subtract == 12 && editor.getValue().match(/\\-/g)){return(true);}else{return(false);}})(), 'Subtract should be the result of a sum and be equal to 12');"
@@ -320,15 +314,14 @@
},
{
"id": "cf1231c1c11feddfaeb5bdef",
- "name": "Magical Maths Multiplication",
+ "name": "Multiply Two Numbers with JavaScript",
"dashedName": "waypoint-magical-maths-multiplication",
"difficulty": "9.98143",
"description": [
- "",
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
"Let's try a few of the most commonly used ones now",
- "We use *
for multiplication",
- "Replace the 0
with correct number to achieve the result in the comment."
+ "We use *
for multiplication",
+ "Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
"assert((function(){if(multiply == 80 && editor.getValue().match(/\\*/g)){return(true);}else{return(false);}})(), 'Multiply should be the result of a sum and be equal to 80');"
@@ -344,15 +337,14 @@
},
{
"id": "cf1111c1c11feddfaeb6bdef",
- "name": "Magical Maths Division",
+ "name": "Divide One Number by Another with JavaScript",
"dashedName": "waypoint-magical-maths-division",
"difficulty": "9.9814",
"description": [
- "",
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
"Let's try a few of the most commonly used ones now",
- "We use /
for division",
- "Replace the 0
with correct number to achieve the result in the comment."
+ "We use /
for division",
+ "Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
"assert((function(){if(divide == 2 && editor.getValue().match(/\\//g)){return(true);}else{return(false);}})(), 'Divide should be the result of a sum and be equal to 2');"
@@ -368,11 +360,10 @@
},
{
"id": "cf1391c1c11feddfaeb4bdef",
- "name": "Creating Decimals",
+ "name": "Create Decimal Numbers with JavaScript",
"dashedName": "waypoint-creating-decimals",
"difficulty": "9.9815",
"description": [
- "",
"in JavaScript we can can work with decimal numbers",
"Let's create a variable myDecimal
and give it a decimal value."
],
@@ -392,14 +383,11 @@
},
{
"id": "bd7993c9c69feddfaeb7bdef",
- "name": "Working With Decimals",
+ "name": "Perform Arithmetic Operations on Decimals with JavaScript",
"dashedName": "waypoint-working-with-decimals",
"difficulty": "9.98151",
"description": [
- "",
- "in JavaScript we can can work with decimal numbers",
- "These decal numbers are known as floats.",
- "Let's take a look at working with floats now"
+ "In JavaScript we can can work with decimal numbers."
],
"tests": [
"assert(multiply == 15, 'The result of multiply should be 3.75');",
@@ -417,14 +405,13 @@
},
{
"id": "bd7993c9c69feddfaeb8bdef",
- "name": "An Array Of new Information",
+ "name": "Store Multiple Values in one Variable using JavaScript Arrays",
"dashedName": "waypoint-an-array-of-new-information",
"difficulty": "9.9816",
"description": [
- "",
"In JavaScript we can store lists or collections of data in what are called arrays",
- "Arrays are distinguished by the [
and ]
around the data. Each piece of data is separated by a ,
",
- "Now let's create a new array called myArray
with a string
and a number
with a ,
separating each one",
+ "Arrays are distinguished by the [
and ]
around the data. Each piece of data is separated by a ,
",
+ "Now let's create a new array called myArray
with a string
and a number
with a ,
separating each one",
"Refer to the example if you get stuck",
""
],
@@ -445,11 +432,10 @@
},
{
"id":"cf1111c1c11feddfaeb7bdef",
- "name":"Nesting Arrays",
+ "name":"Nest one Array within Another Array",
"dashedName":"waypoint-nesting-arrays",
"difficulty":"9.98161",
"description":[
- "",
"We are also able to create arrays within arrays. This technique is called nesting
.",
"Let's now go create a nested array called myArray
"
],
@@ -466,11 +452,10 @@
},
{
"id":"bg9997c9c79feddfaeb9bdef",
- "name":"Accessing data with Indexes",
+ "name":"Access Array Data with Indexes",
"dashedName":"waypoint-accessing-data-with-indexes",
"difficulty":"9.9817",
"description":[
- "",
"Once an array has been created we can access the data we have stored in them using indexes",
"Indexes are written in the same way as bracket notation that we covered earlier",
"Example:",
@@ -498,11 +483,10 @@
},
{
"id":"cf1111c1c11feddfaeb8bdef",
- "name":"Modifying Data With Indexes",
+ "name":"Modify Array Data With Indexes",
"dashedName":"waypoint-modifying-data-with-indexes",
"difficulty":"9.98171",
"description":[
- "",
"We are able to modify the data stored in an array by using indexes",
"Example:",
"",
@@ -531,16 +515,15 @@
},
{
"id": "bg9994c9c69feddfaeb9bdef",
- "name": "Manipulating Arrays With pop()",
+ "name": "Manipulate Arrays With pop()",
"dashedName": "waypoint-manipulating-arrays-with-pop",
"difficulty": "9.9818",
"description": [
- "",
"When an array has been defined we still have the ability to make changes to it afterwards",
- "One common way in which we can manipulate the data in an array is through .pop()
",
- " .pop()
is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.",
+ "One common way in which we can manipulate the data in an array is through .pop()
",
+ ".pop()
is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.",
"Any type of variable can be \"popped\" from an array",
- "Let's try .pop()
now"
+ "Let's try .pop()
now"
],
"tests": [
"assert((function(d){if(d[0] == 'John' && d[1] == 23 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');",
@@ -563,13 +546,12 @@
},
{
"id": "bg9995c9c69feddfaeb9bdef",
- "name": "Manipulating Arrays With push()",
+ "name": "Manipulate Arrays With push()",
"dashedName": "waypoint-manipulating-arrays-with-push",
"difficulty": "9.9818",
"description": [
- "",
- "Now that we've learned how to pop
things from the end of the array, we need to learn how to push
stuff back to the end",
- "Let's take the code we had last time and push
this value to the end: ['dog', 3]
"
+ "Now that we've learned how to pop
things from the end of the array, we need to learn how to push
stuff back to the end",
+ "Let's take the code we had last time and push
this value to the end: ['dog', 3]
"
],
"tests": [
"assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23, [\"dog\", 3]])');"
@@ -586,14 +568,13 @@
},
{
"id": "bg9996c9c69feddfaeb9bdef",
- "name": "Manipulating Arrays With shift()",
+ "name": "Manipulate Arrays With shift()",
"dashedName": "waypoint-manipulating-arrays-with-shift",
"difficulty": "9.9817",
"description": [
- "",
- "Another common way in which we can manipulate the data in an array is through .shift()
",
- " .shift()
is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.",
- "Let's try .shift()
now"
+ "Another common way in which we can manipulate the data in an array is through .shift()
",
+ ".shift()
is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.",
+ "Let's try .shift()
now"
],
"tests": [
"assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');",
@@ -610,13 +591,12 @@
},
{
"id": "bg9997c9c69feddfaeb9bdef",
- "name": "Manipulating Arrays With unshift()",
+ "name": "Manipulate Arrays With unshift()",
"dashedName": "waypoint-manipulating-arrays-with-unshift",
"difficulty": "9.9818",
"description": [
- "",
- "Now that we've learned how to shift
things from the start of the array, we need to learn how to unshift
stuff back to the start",
- "Let's take the code we had last time and unshift
this value to the end: 'Paul'
"
+ "Now that we've learned how to shift
things from the start of the array, we need to learn how to unshift
stuff back to the start",
+ "Let's take the code we had last time and unshift
this value to the end: 'Paul'
"
],
"tests": [
"assert((function(d){if(d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return(true);}else{return(false);}})(myArray), 'myArray should now have [\"Paul\", 23, [\"dog\", 3]])');"
@@ -633,11 +613,10 @@
},
{
"id":"bg9997c9c89feddfaeb9bdef",
- "name":"Make it functional",
+ "name":"Write Reusable JavaScript with Functions",
"dashedName":"waypoint-make-it-functional",
"difficulty":"9.9819",
"description":[
- "",
"In JavaScript we can divide up our code into separate and reusable parts called functions",
"Here's an example of a function",
"",
@@ -671,13 +650,12 @@
},
{
"id":"bg9998c9c99feddfaeb9bdef",
- "name":"I Object!",
+ "name":"Build JavaScript Objects",
"dashedName":"waypoint-i-object",
"difficulty":"9.9822",
"description":[
- "",
- "A very important data type in javascript is the Object
",
- " Objects
are similar to arrays
except that instead of using indexes to access and modify their data, Objects have what are called properties
",
+ "A very important data type in javascript is the Object
",
+ "Objects
are similar to arrays
except that instead of using indexes to access and modify their data, Objects have what are called properties
",
"Here's a sample Object",
"",
"var cat = {",
@@ -718,11 +696,10 @@
},
{
"id":"bg9999c9c99feddfaeb9bdef",
- "name":"Manipulating Objects",
+ "name":"Manipulate JavaScript Objects",
"dashedName":"waypoint-manipulating-objects",
"difficulty":"9.9823",
"description":[
- "",
"Now that we have an objects we need to know how to add and remove properties from it",
"We add properties to objects like this",
"myObject.myProperty = \"myValue\";
",
@@ -764,11 +741,10 @@
},
{
"id":"cf1111c1c11feddfaeb5bdef",
- "name":"Looping with for",
+ "name":"Iterate with JavaScript For Loops",
"dashedName":"waypoint-looping-with-for",
"difficulty":"9.9824",
"description":[
- "",
"Loops are a critical part of any program! The next few challenges",
"first we will be taking a look at the for loop",
"",
@@ -794,11 +770,10 @@
},
{
"id":"cf1111c1c11feddfaeb1bdef",
- "name":"Looping with while",
+ "name":"Iterate with JavaScript While Loops",
"dashedName":"waypoint-looping-with-while",
"difficulty":"9.9825",
"description":[
- "",
"Loops are a critical part of any program! The next few challenges",
"first we will be taking a look at the while loop",
"",
@@ -825,11 +800,10 @@
},
{
"id":"cf1111c1c11feddfaeb2bdef",
- "name":"Looping with do while",
+ "name":"Iterate with JavaScript Do-While Loops",
"dashedName":"waypoint-looping-with-do-while",
"difficulty":"9.9826",
"description":[
- "",
"Let's now take a look at the do - while loop",
"",
"var ourArray = [];",
@@ -856,11 +830,10 @@
},
{
"id":"cf1111c1c11feddfaeb9bdef",
- "name":"Random Numbers",
+ "name":"Generate Random Fractions with JavaScript",
"dashedName":"waypoint-random-numbers",
"difficulty":"9.9827",
"description":[
- "",
"Random numbers are a very useful for creating random behaviours and games",
"Javascript has a Math.random()
method that can generate a random decimal number",
"Let's have a go of Math.random()
now be getting myFunction
to return a random number"
@@ -883,11 +856,10 @@
},
{
"id":"cf1111c1c12feddfaeb1bdef",
- "name":"Random Whole Numbers",
+ "name":"Generate Random Whole Numbers with JavaScript",
"dashedName":"waypoint-random-whole-numbers",
"difficulty":"9.9828",
"description":[
- "",
"While it's great that we can create random decimal numbers it's a lot more useful to generate a random whole number",
"To achieve this we can multiply the random number by ten and use the Math.floor()
to convert the decimal number to a whole number",
"This technique gives us a whole number between zero and nine",
@@ -913,11 +885,10 @@
},
{
"id":"cf1111c1c12feddfaeb2bdef",
- "name":"Random Whole Numbers In a Range",
+ "name":"Generate Random Whole Numbers within a Range",
"dashedName":"waypoint-random-whole-numbers-in-a-range",
"difficulty":"9.9829",
"description":[
- "",
"We can use a certain mathematical expression to get a random number between between twp numbers.",
"Math.floor(Math.random() * (max - min + 1)) + min
",
"By using this we can control the output of the random number.",
@@ -942,11 +913,10 @@
},
{
"id":"cf1111c1c12feddfaeb3bdef",
- "name":"If Else Statements",
+ "name":"Use Conditional Logic with If Else Statements",
"dashedName":"waypoint-if-else-statements",
"difficulty":"9.983",
"description":[
- "",
"We can use if statements in JavaScript to only execute code if a certain condition is met",
"if statements require some sort of boolean condition evaluate",
"Example:",
@@ -977,11 +947,10 @@
},
{
"id":"cf1111c1c12feddfaeb6bdef",
- "name":"An Intro To RegEx",
+ "name":"Sift through Text with Regular Expressions",
"dashedName":"waypoint-an-intro-to-regex",
"difficulty":"9.984",
"description":[
- "",
"RegEx is a powerful tool we can use to find certain words or patterns in strings",
"RegEx can look difficult at first but there's not much to getting it working",
"If we wanted to find the number of times the word \"the\" occured in the string \"The dog chased the cat\" We could use the following RegEx:",
@@ -1014,16 +983,14 @@
},
{
"id":"cf1111c1c12feddfaeb7bdef",
- "name":"Finding Numbers",
+ "name":"Find Numbers with Regular Expressions",
"dashedName":"waypoint-finding-numbers",
"difficulty":"9.985",
"description":[
- "",
"We can use special selectors in RegEx to select a particular type of value",
"One such selector is the digit selector \\d
which is used to grab the numbers in a string",
"It is used like this:",
- "/\\d+/g
",
- ""
+ "/\\d+/g
"
],
"tests":[
"assert(test === 2, 'Your RegEx should have found two numbers in the testString');",
@@ -1046,15 +1013,13 @@
},
{
"id":"cf1111c1c12feddfaeb8bdef",
- "name":"Finding WhiteSpace",
+ "name":"Find White Space with Regular Expressions",
"dashedName":"waypoint-finding-whitespace",
"difficulty":"9.986",
"description":[
- "",
"We can also use selectors like \\s
to find spaces in a string",
"It is used like this:",
- "/\\s+/g
",
- ""
+ "/\\s+/g
"
],
"tests":[
"assert(test === 7, 'Your RegEx should have found seven spaces in the testString');",
@@ -1077,12 +1042,11 @@
},
{
"id":"cf1111c1c13feddfaeb3bdef",
- "name":"Inverting a Match",
+ "name":"Invert Regular Expression Matches with JavaScript",
"dashedName":"waypoint-inverting-a-match",
"difficulty":"9.987",
"description":[
- "",
- "Use /\\S+/gi;
to match everything that ins't a space in the string",
+ "Use /\\S+/gi;
to match everything that isn't a space in the string",
"You can invert any match by using the uppercase version of the selector \\s
versus \\S
for example"
],
"tests":[
@@ -1106,16 +1070,15 @@
},
{
"id":"cf1111c1c12feddfaeb9bdef",
- "name":"Creating a slots machine",
+ "name":"Create a JavaScript Slot Machine",
"dashedName":"creating-a-slots-machine",
"difficulty":"9.988",
"description":[
- "",
"We are now going to try and combine some of the stuff we've just learnt abd create the logic for a slot machine game",
"For this we will need to generate three random numbers between 1
and 5
to represent the possible values of each individual slot",
"Store the three random numbers in slotOne
, slotTwo
and slotThree
",
"Generate the random numbers by using the system we used earlier in /challenges/random-whole-numbers-in-a-range",
- " Math.floor(Math.random() * (5 - 1 + 1)) + 1;
"
+ "Math.floor(Math.random() * (5 - 1 + 1)) + 1;
"
],
"tests":[
"assert(typeof(runSlots($('.slot'))[0]) == 'number', 'SlotOne should be a random number');",
@@ -1261,18 +1224,17 @@
},
{
"id":"cf1111c1c13feddfaeb1bdef",
- "name":"Setting Up The Slot Machine Slots",
+ "name":"Add your JavaScript Slot Machine Slots",
"dashedName":"setting-up-the-slot-machine-slots",
"difficulty":"9.989",
"description":[
- "",
"Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win",
"Different numbers will have different values so we need to return the matched number or null",
"If we get a match we should change the value of win to the number that we have three of or leave it as null",
"Let's create an if statement with multiple conditions to check that all the numbers are equal",
- "if(slotOne !== slotTwo || slotTwo !== slotThree){",
- " return(null);",
- "}
"
+ "if(slotOne !== slotTwo || slotTwo !== slotThree){
",
+ " return(null);
",
+ "}
"
],
"tests":[
"assert((function(){var data = runSlots();if(data == null){return(true)}else{if(data[0] == data[1] && data[1] == data[2]){return(true);}else{return(false);}}})(), 'If all three of our random numbers are the same we should return that number. Otherwise we should return null');"
@@ -1421,11 +1383,10 @@
},
{
"id":"cf1111c1c13feddfaeb2bdef",
- "name":"Giving The Slot Machine Life",
+ "name":"Bring your JavaScript Slot Machine to Life",
"dashedName":"giving-the-slot-machine-life",
"difficulty":"9.990",
"description":[
- "",
"Now we can detect a win let's get the slot machine to look like it works",
"We're going to use the jQuery selector $('.slot')
to select all of the slots",
"Once they are all selected we can use bracket notation to access each individual one like this",
From dfb48fbdadc4df30f6247875eb40ece81e0eecd9 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 6 Aug 2015 02:26:09 -0700
Subject: [PATCH 107/548] update dashed name
---
seed/challenges/basic-javascript.json | 148 +++++++++++++-------------
1 file changed, 74 insertions(+), 74 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index ec12d76d01..7b74868388 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1,11 +1,11 @@
{
- "name": "Basic JavaScript",
+ "name": "Waypoint: Basic JavaScript",
"order": 0.005,
"challenges": [
{
"id":"bd7123c9c441eddfaeb4bdef",
- "name":"Waypoint: Comment your JavaScript Code",
- "dashedName":"waypoint-comment-your-javascript-code",
+ "name": "Waypoint: Comment your JavaScript Code",
+ "dashedName": "waypoint-comment-your-javascript-code",
"difficulty":"9.98",
"description":[
"A comment is a very useful line of code that is not actually ran by the machine executing it. With this property comments are the perfect way of creating notes to yourself or anyone else who reads your code describing what the code does",
@@ -55,8 +55,8 @@
},
{
"id": "bd7123c9c443eddfaeb5bdef",
- "name": "Declare JavaScript Variables",
- "dashedName": "waypoint-assign-values-to-javascript-variables",
+ "name": "Waypoint: Declare JavaScript Variables",
+ "dashedName": "waypoint-declare-javascript-variables",
"difficulty": "9.9801",
"description": [
"Now, use the var
keyword to create a variable
called myName
. Set its value to your name.",
@@ -82,8 +82,8 @@
},
{
"id": "bd7123c9c444eddfaeb5bdef",
- "name": "Declare String Variables",
- "dashedName": "waypoint-define-your-first-and-last-name",
+ "name": "Waypoint: Declare String Variables",
+ "dashedName": "waypoint-declare-string-variables",
"difficulty": "9.9802",
"description": [
"Programs will almost always have several different variables that are used to keep track of several different pieces of data",
@@ -109,7 +109,7 @@
},
{
"id": "bd7123c9c448eddfaeb5bdef",
- "name": "Check the Length Property of a String Variable",
+ "name": "Waypoint: Check the Length Property of a String Variable",
"dashedName": "waypoint-check-the-length-property-of-a-string-variable",
"difficulty": "9.9809",
"description": [
@@ -142,7 +142,7 @@
},
{
"id": "bd7123c9c549eddfaeb5bdef",
- "name": "Use Bracket Notation to Find the First Character in a String",
+ "name": "Waypoint: Use Bracket Notation to Find the First Character in a String",
"dashedName": "waypoint-use-bracket-notation-to-find-the-first-character-in-a-string",
"difficulty": "9.9810",
"description": [
@@ -177,7 +177,7 @@
},
{
"id": "bd7123c9c450eddfaeb5bdef",
- "name": "Use Bracket Notation to Find the Nth Character in a String",
+ "name": "Waypoint: Use Bracket Notation to Find the Nth Character in a String",
"dashedName": "waypoint-use-bracket-notation-to-find-the-nth-character-in-a-string",
"difficulty": "9.9811",
"description": [
@@ -208,7 +208,7 @@
},
{
"id": "bd7123c9c451eddfaeb5bdef",
- "name": "Use Bracket Notation to Find the Last Character in a String",
+ "name": "Waypoint: Use Bracket Notation to Find the Last Character in a String",
"dashedName": "waypoint-use-bracket-notation-to-find-the-last-character-in-a-string",
"difficulty": "9.9812",
"description": [
@@ -238,7 +238,7 @@
},
{
"id": "bd7123c9c452eddfaeb5bdef",
- "name": "Use Bracket Notation to Find the Nth-to-Last Character in a String",
+ "name": "Waypoint: Use Bracket Notation to Find the Nth-to-Last Character in a String",
"dashedName": "waypoint-use-bracket-notation-to-find-the-nth-to-last-character-in-a-string",
"difficulty": "9.9813",
"description": [
@@ -268,8 +268,8 @@
},
{
"id": "cf1111c1c11feddfaeb3bdef",
- "name": "Add Two Numbers with JavaScript",
- "dashedName": "waypoint-magical-maths-addition",
+ "name": "Waypoint: Add Two Numbers with JavaScript",
+ "dashedName": "waypoint-add-two-numbers-with-javascript",
"difficulty": "9.98141",
"description": [
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
@@ -291,8 +291,8 @@
},
{
"id": "cf1111c1c11feddfaeb4bdef",
- "name": "Subtract One Number from Another with JavaScript",
- "dashedName": "waypoint-magical-maths-subtraction",
+ "name": "Waypoint: Subtract One Number from Another with JavaScript",
+ "dashedName": "waypoint-subtract-one-number-from-another-with-javascript",
"difficulty": "9.98142",
"description": [
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
@@ -314,8 +314,8 @@
},
{
"id": "cf1231c1c11feddfaeb5bdef",
- "name": "Multiply Two Numbers with JavaScript",
- "dashedName": "waypoint-magical-maths-multiplication",
+ "name": "Waypoint: Multiply Two Numbers with JavaScript",
+ "dashedName": "waypoint-multiply-two-numbers-with-javascript",
"difficulty": "9.98143",
"description": [
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
@@ -337,8 +337,8 @@
},
{
"id": "cf1111c1c11feddfaeb6bdef",
- "name": "Divide One Number by Another with JavaScript",
- "dashedName": "waypoint-magical-maths-division",
+ "name": "Waypoint: Divide One Number by Another with JavaScript",
+ "dashedName": "waypoint-divide-one-number-by-another-with-javascript",
"difficulty": "9.9814",
"description": [
"In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
@@ -360,8 +360,8 @@
},
{
"id": "cf1391c1c11feddfaeb4bdef",
- "name": "Create Decimal Numbers with JavaScript",
- "dashedName": "waypoint-creating-decimals",
+ "name": "Waypoint: Create Decimal Numbers with JavaScript",
+ "dashedName": "waypoint-create-decimal-numbers-with-javascript",
"difficulty": "9.9815",
"description": [
"in JavaScript we can can work with decimal numbers",
@@ -383,8 +383,8 @@
},
{
"id": "bd7993c9c69feddfaeb7bdef",
- "name": "Perform Arithmetic Operations on Decimals with JavaScript",
- "dashedName": "waypoint-working-with-decimals",
+ "name": "Waypoint: Perform Arithmetic Operations on Decimals with JavaScript",
+ "dashedName": "waypoint-perform-arithmetic-operations-on-decimals-with-javascript",
"difficulty": "9.98151",
"description": [
"In JavaScript we can can work with decimal numbers."
@@ -405,8 +405,8 @@
},
{
"id": "bd7993c9c69feddfaeb8bdef",
- "name": "Store Multiple Values in one Variable using JavaScript Arrays",
- "dashedName": "waypoint-an-array-of-new-information",
+ "name": "Waypoint: Store Multiple Values in one Variable using JavaScript Arrays",
+ "dashedName": "waypoint-store-multiple-values-in-one-variable-using-javascript-arrays",
"difficulty": "9.9816",
"description": [
"In JavaScript we can store lists or collections of data in what are called arrays",
@@ -432,8 +432,8 @@
},
{
"id":"cf1111c1c11feddfaeb7bdef",
- "name":"Nest one Array within Another Array",
- "dashedName":"waypoint-nesting-arrays",
+ "name": "Waypoint: Nest one Array within Another Array",
+ "dashedName": "waypoint-nest-one-array-within-another-array",
"difficulty":"9.98161",
"description":[
"We are also able to create arrays within arrays. This technique is called nesting
.",
@@ -452,8 +452,8 @@
},
{
"id":"bg9997c9c79feddfaeb9bdef",
- "name":"Access Array Data with Indexes",
- "dashedName":"waypoint-accessing-data-with-indexes",
+ "name": "Waypoint: Access Array Data with Indexes",
+ "dashedName": "waypoint-access-array-data-with-indexes",
"difficulty":"9.9817",
"description":[
"Once an array has been created we can access the data we have stored in them using indexes",
@@ -483,8 +483,8 @@
},
{
"id":"cf1111c1c11feddfaeb8bdef",
- "name":"Modify Array Data With Indexes",
- "dashedName":"waypoint-modifying-data-with-indexes",
+ "name": "Waypoint: Modify Array Data With Indexes",
+ "dashedName": "waypoint-modify-array-data-with-indexes",
"difficulty":"9.98171",
"description":[
"We are able to modify the data stored in an array by using indexes",
@@ -515,8 +515,8 @@
},
{
"id": "bg9994c9c69feddfaeb9bdef",
- "name": "Manipulate Arrays With pop()",
- "dashedName": "waypoint-manipulating-arrays-with-pop",
+ "name": "Waypoint: Manipulate Arrays With pop()",
+ "dashedName": "waypoint-manipulate-arrays-with-pop",
"difficulty": "9.9818",
"description": [
"When an array has been defined we still have the ability to make changes to it afterwards",
@@ -546,8 +546,8 @@
},
{
"id": "bg9995c9c69feddfaeb9bdef",
- "name": "Manipulate Arrays With push()",
- "dashedName": "waypoint-manipulating-arrays-with-push",
+ "name": "Waypoint: Manipulate Arrays With push()",
+ "dashedName": "waypoint-manipulate-arrays-with-push",
"difficulty": "9.9818",
"description": [
"Now that we've learned how to pop
things from the end of the array, we need to learn how to push
stuff back to the end",
@@ -568,8 +568,8 @@
},
{
"id": "bg9996c9c69feddfaeb9bdef",
- "name": "Manipulate Arrays With shift()",
- "dashedName": "waypoint-manipulating-arrays-with-shift",
+ "name": "Waypoint: Manipulate Arrays With shift()",
+ "dashedName": "waypoint-manipulate-arrays-with-shift",
"difficulty": "9.9817",
"description": [
"Another common way in which we can manipulate the data in an array is through .shift()
",
@@ -591,8 +591,8 @@
},
{
"id": "bg9997c9c69feddfaeb9bdef",
- "name": "Manipulate Arrays With unshift()",
- "dashedName": "waypoint-manipulating-arrays-with-unshift",
+ "name": "Waypoint: Manipulate Arrays With unshift()",
+ "dashedName": "waypoint-manipulate-arrays-with-unshift",
"difficulty": "9.9818",
"description": [
"Now that we've learned how to shift
things from the start of the array, we need to learn how to unshift
stuff back to the start",
@@ -613,8 +613,8 @@
},
{
"id":"bg9997c9c89feddfaeb9bdef",
- "name":"Write Reusable JavaScript with Functions",
- "dashedName":"waypoint-make-it-functional",
+ "name": "Waypoint: Write Reusable JavaScript with Functions",
+ "dashedName": "waypoint-write-reusable-javascript-with-functions",
"difficulty":"9.9819",
"description":[
"In JavaScript we can divide up our code into separate and reusable parts called functions",
@@ -650,8 +650,8 @@
},
{
"id":"bg9998c9c99feddfaeb9bdef",
- "name":"Build JavaScript Objects",
- "dashedName":"waypoint-i-object",
+ "name": "Waypoint: Build JavaScript Objects",
+ "dashedName": "waypoint-build-javascript-objects",
"difficulty":"9.9822",
"description":[
"A very important data type in javascript is the Object
",
@@ -696,8 +696,8 @@
},
{
"id":"bg9999c9c99feddfaeb9bdef",
- "name":"Manipulate JavaScript Objects",
- "dashedName":"waypoint-manipulating-objects",
+ "name": "Waypoint: Manipulate JavaScript Objects",
+ "dashedName": "waypoint-manipulate-javascript-objects",
"difficulty":"9.9823",
"description":[
"Now that we have an objects we need to know how to add and remove properties from it",
@@ -741,8 +741,8 @@
},
{
"id":"cf1111c1c11feddfaeb5bdef",
- "name":"Iterate with JavaScript For Loops",
- "dashedName":"waypoint-looping-with-for",
+ "name": "Waypoint: Iterate with JavaScript For Loops",
+ "dashedName": "waypoint-iterate-with-javascript-for-loops",
"difficulty":"9.9824",
"description":[
"Loops are a critical part of any program! The next few challenges",
@@ -770,8 +770,8 @@
},
{
"id":"cf1111c1c11feddfaeb1bdef",
- "name":"Iterate with JavaScript While Loops",
- "dashedName":"waypoint-looping-with-while",
+ "name": "Waypoint: Iterate with JavaScript While Loops",
+ "dashedName": "waypoint-iterate-with-javascript-while-loops",
"difficulty":"9.9825",
"description":[
"Loops are a critical part of any program! The next few challenges",
@@ -800,8 +800,8 @@
},
{
"id":"cf1111c1c11feddfaeb2bdef",
- "name":"Iterate with JavaScript Do-While Loops",
- "dashedName":"waypoint-looping-with-do-while",
+ "name": "Waypoint: Iterate with JavaScript Do-While Loops",
+ "dashedName": "waypoint-iterate-with-javascript-do-while-loops",
"difficulty":"9.9826",
"description":[
"Let's now take a look at the do - while loop",
@@ -830,8 +830,8 @@
},
{
"id":"cf1111c1c11feddfaeb9bdef",
- "name":"Generate Random Fractions with JavaScript",
- "dashedName":"waypoint-random-numbers",
+ "name": "Waypoint: Generate Random Fractions with JavaScript",
+ "dashedName": "waypoint-generate-random-fractions-with-javascript",
"difficulty":"9.9827",
"description":[
"Random numbers are a very useful for creating random behaviours and games",
@@ -856,8 +856,8 @@
},
{
"id":"cf1111c1c12feddfaeb1bdef",
- "name":"Generate Random Whole Numbers with JavaScript",
- "dashedName":"waypoint-random-whole-numbers",
+ "name": "Waypoint: Generate Random Whole Numbers with JavaScript",
+ "dashedName": "waypoint-generate-random-whole-numbers-with-javascript",
"difficulty":"9.9828",
"description":[
"While it's great that we can create random decimal numbers it's a lot more useful to generate a random whole number",
@@ -885,8 +885,8 @@
},
{
"id":"cf1111c1c12feddfaeb2bdef",
- "name":"Generate Random Whole Numbers within a Range",
- "dashedName":"waypoint-random-whole-numbers-in-a-range",
+ "name": "Waypoint: Generate Random Whole Numbers within a Range",
+ "dashedName": "waypoint-generate-random-whole-numbers-within-a-range",
"difficulty":"9.9829",
"description":[
"We can use a certain mathematical expression to get a random number between between twp numbers.",
@@ -913,8 +913,8 @@
},
{
"id":"cf1111c1c12feddfaeb3bdef",
- "name":"Use Conditional Logic with If Else Statements",
- "dashedName":"waypoint-if-else-statements",
+ "name": "Waypoint: Use Conditional Logic with If-Else Statements",
+ "dashedName": "waypoint-use-conditional-logic-with-if-else-statements",
"difficulty":"9.983",
"description":[
"We can use if statements in JavaScript to only execute code if a certain condition is met",
@@ -947,8 +947,8 @@
},
{
"id":"cf1111c1c12feddfaeb6bdef",
- "name":"Sift through Text with Regular Expressions",
- "dashedName":"waypoint-an-intro-to-regex",
+ "name": "Waypoint: Sift through Text with Regular Expressions",
+ "dashedName": "waypoint-sift-through-text-with-regular-expressions",
"difficulty":"9.984",
"description":[
"RegEx is a powerful tool we can use to find certain words or patterns in strings",
@@ -983,8 +983,8 @@
},
{
"id":"cf1111c1c12feddfaeb7bdef",
- "name":"Find Numbers with Regular Expressions",
- "dashedName":"waypoint-finding-numbers",
+ "name": "Waypoint: Find Numbers with Regular Expressions",
+ "dashedName": "waypoint-find-numbers-with-regular-expressions",
"difficulty":"9.985",
"description":[
"We can use special selectors in RegEx to select a particular type of value",
@@ -1013,8 +1013,8 @@
},
{
"id":"cf1111c1c12feddfaeb8bdef",
- "name":"Find White Space with Regular Expressions",
- "dashedName":"waypoint-finding-whitespace",
+ "name": "Waypoint: Find White Space with Regular Expressions",
+ "dashedName": "waypoint-find-white-space-with-regular-expressions",
"difficulty":"9.986",
"description":[
"We can also use selectors like \\s
to find spaces in a string",
@@ -1042,8 +1042,8 @@
},
{
"id":"cf1111c1c13feddfaeb3bdef",
- "name":"Invert Regular Expression Matches with JavaScript",
- "dashedName":"waypoint-inverting-a-match",
+ "name": "Waypoint: Invert Regular Expression Matches with JavaScript",
+ "dashedName": "waypoint-invert-regular-expression-matches-with-javaScript",
"difficulty":"9.987",
"description":[
"Use /\\S+/gi;
to match everything that isn't a space in the string",
@@ -1070,8 +1070,8 @@
},
{
"id":"cf1111c1c12feddfaeb9bdef",
- "name":"Create a JavaScript Slot Machine",
- "dashedName":"creating-a-slots-machine",
+ "name": "Waypoint: Create a JavaScript Slot Machine",
+ "dashedName": "waypoint-create-a-javascript-slot-machine",
"difficulty":"9.988",
"description":[
"We are now going to try and combine some of the stuff we've just learnt abd create the logic for a slot machine game",
@@ -1224,8 +1224,8 @@
},
{
"id":"cf1111c1c13feddfaeb1bdef",
- "name":"Add your JavaScript Slot Machine Slots",
- "dashedName":"setting-up-the-slot-machine-slots",
+ "name": "Waypoint: Add your JavaScript Slot Machine Slots",
+ "dashedName": "waypoint-add-your-javascript-slot-machine-slots",
"difficulty":"9.989",
"description":[
"Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win",
@@ -1383,8 +1383,8 @@
},
{
"id":"cf1111c1c13feddfaeb2bdef",
- "name":"Bring your JavaScript Slot Machine to Life",
- "dashedName":"giving-the-slot-machine-life",
+ "name": "Waypoint: Bring your JavaScript Slot Machine to Life",
+ "dashedName": "waypoint-bring-your-javascript-slot-machine-to-life",
"difficulty":"9.990",
"description":[
"Now we can detect a win let's get the slot machine to look like it works",
From 61507f575db8bf8a9a2bc1908ab3437c2505c1b2 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Thu, 6 Aug 2015 02:27:56 -0700
Subject: [PATCH 108/548] fix some issues that were breaking seed task
---
seed/challenges/intermediate-bonfires.json | 2 +-
seed/challenges/intermediate-ziplines.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index f9c9be22d8..7b678840bd 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -103,7 +103,7 @@
"difficulty": "2.02",
"description": [
"Convert the given number into a roman numeral.",
- "All roman numerals answers should be provided in upper-case.",
+ "All roman numerals answers should be provided in upper-case.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json
index 0e6246077b..7857686196 100644
--- a/seed/challenges/intermediate-ziplines.json
+++ b/seed/challenges/intermediate-ziplines.json
@@ -102,7 +102,7 @@
"descriptionPt": []
},
{
- "id": "bd7158d8c442eddfaeb5bd1c",
+ "id": "bd7158d8c442eedfaeb5bd1c",
"name": "Zipline: Build a Tic Tac Toe Game",
"dashedName": "zipline-build-a-tic-tac-toe-game",
"difficulty": 1.06,
From 5eb9c060e12fbbe9e6c7c72739a669116ae38cbe Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Thu, 6 Aug 2015 14:51:26 +0100
Subject: [PATCH 109/548] Fix
https://github.com/FreeCodeCamp/freecodecamp/issues/1599
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 7b74868388..3f92055c6e 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1046,7 +1046,7 @@
"dashedName": "waypoint-invert-regular-expression-matches-with-javaScript",
"difficulty":"9.987",
"description":[
- "Use /\\S+/gi;
to match everything that isn't a space in the string",
+ "Use /\\S/gi;
to match everything that isn't a space in the string",
"You can invert any match by using the uppercase version of the selector \\s
versus \\S
for example"
],
"tests":[
From e68bc0272d4012b7b5f8bdc4b79d55cea0048c5b Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Thu, 6 Aug 2015 14:54:44 +0100
Subject: [PATCH 110/548] Fix
https://github.com/FreeCodeCamp/freecodecamp/issues/1593
---
seed/challenges/basic-javascript.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 3f92055c6e..4932ddd044 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -573,12 +573,12 @@
"difficulty": "9.9817",
"description": [
"Another common way in which we can manipulate the data in an array is through .shift()
",
- ".shift()
is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.",
+ ".shift()
is used to \"shift\" a value from the start of an array. We can retrieve this value by performing the shift in a variable declaration.",
"Let's try .shift()
now"
],
"tests": [
"assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');",
- "assert((function(d){if(d === 'John' && typeof(removed) === 'function'){return(true);}else{return(false);}})(removed), 'Removed should contain \"John\"');"
+ "assert((function(d){if(d === 'John' && typeof(removed) === 'string'){return(true);}else{return(false);}})(removed), 'Removed should contain \"John\"');"
],
"challengeSeed": [
"var myArray = ['John', 23, ['dog', 3]];",
From 0993261ebcbef8eddd289a1f959385d5e74d05aa Mon Sep 17 00:00:00 2001
From: Dealga McArdle
Date: Thu, 6 Aug 2015 16:02:20 +0200
Subject: [PATCH 111/548] sputkin -> sputnik
---
seed/challenges/advanced-bonfires.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json
index 093580e24f..360d05a52b 100644
--- a/seed/challenges/advanced-bonfires.json
+++ b/seed/challenges/advanced-bonfires.json
@@ -74,10 +74,10 @@
" return arr;",
"}",
"",
- "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);"
+ "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);"
],
"tests": [
- "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);",
+ "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);",
"expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
],
"MDNlinks": [
From 4349d06d1624320ee51b109533c3cf10c00e7bba Mon Sep 17 00:00:00 2001
From: Samuel Plumppu
Date: Thu, 6 Aug 2015 20:45:59 +0200
Subject: [PATCH 112/548] fixed typos
---
seed/challenges/basic-javascript.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 4932ddd044..75b91415ac 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -834,8 +834,8 @@
"dashedName": "waypoint-generate-random-fractions-with-javascript",
"difficulty":"9.9827",
"description":[
- "Random numbers are a very useful for creating random behaviours and games",
- "Javascript has a Math.random()
method that can generate a random decimal number",
+ "Random numbers are very useful for creating random behaviours and games",
+ "JavaScript has a Math.random()
method that can generate a random decimal number",
"Let's have a go of Math.random()
now be getting myFunction
to return a random number"
],
"tests":[
From cf9b981564f2522e151156b80165f9883104b4aa Mon Sep 17 00:00:00 2001
From: Samuel Plumppu
Date: Thu, 6 Aug 2015 21:31:24 +0200
Subject: [PATCH 113/548] fixed typos
---
seed/challenges/html5-and-css.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index 7cbb0d11c7..f4a11581d3 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -3348,11 +3348,11 @@
"dashedName": "waypoint-override-all-other-styles-by-using-important",
"difficulty": 1.53,
"description": [
- "Yay! we just proved that in-line styles will override all the CSS declarations in your style
element.",
+ "Yay! We just proved that in-line styles will override all the CSS declarations in your style
element.",
"But wait. There's one last way to override CSS. This is the most powerful method of all. But before we do it, let's talk about why you would ever want to override CSS.",
"In many situations, you will use CSS libraries. These may accidentally override your own CSS. So when you absolutely need to be sure that an element has specific CSS, you can use !important
.",
"Let's go all the way back to our \"pink-text\" class declaration. Remember that our \"pink-text\" class was overridden by subsequent class declarations, id declarations, and in-line styles.",
- "Let's add the keyword !important
to your body' element's color declaration to make 100% sure that your h1
element will be pink.",
+ "Let's add the keyword !important
to your pink-text element's color declaration to make 100% sure that your h1
element will be pink.",
"An example of how to do this is: color: red !important;
"
],
"tests": [
From 52300b9648ce9267f94b6f8f0975ccdfc6e2ce81 Mon Sep 17 00:00:00 2001
From: ahstro
Date: Thu, 6 Aug 2015 22:07:52 +0200
Subject: [PATCH 114/548] Changed test order & added in 'img to link'
---
seed/challenges/html5-and-css.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index f4a11581d3..cad97a45bb 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -1259,8 +1259,8 @@
"Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link."
],
"tests": [
+ "assert($('a').children('img').length > 0, 'Nest your img
element within an a
element.')",
"assert(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Your a
element should be a dead link with a href
attribute set to \"#\".')",
- "assert($('a').children('img').length > 0, 'Nest your image element within an a
element.')",
"assert(editor.match(/<\\/a>/g) && editor.match(//g).length === editor.match(/ a
elements has a closing tag.')"
],
"challengeSeed": [
From b2d714112fc9f77c90622757569a36cd8815779e Mon Sep 17 00:00:00 2001
From: ahstro
Date: Thu, 6 Aug 2015 22:22:58 +0200
Subject: [PATCH 115/548] Updated test case comment in 'fluid containers'
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index def874e207..c921a15573 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -15,7 +15,7 @@
"To get started, we should nest all of our HTML in a div
element with the class \"container-fluid\"."
],
"tests": [
- "assert($('div').hasClass('container-fluid'), 'Your div
element should have the class \"row\"')",
+ "assert($('div').hasClass('container-fluid'), 'Your div
element should have the class \"container-fluid\"')",
"assert(editor.match(/<\\/div>/g) && editor.match(//g).length === editor.match(/
div elements has a closing tag.')"
],
"challengeSeed": [
From fb2599b8fe63e8215adb5764864bfbed39863c4e Mon Sep 17 00:00:00 2001
From: ahstro
Date: Thu, 6 Aug 2015 22:27:01 +0200
Subject: [PATCH 116/548] Grammatical error in 'Use Hex Code for Specific
Colors'
---
seed/challenges/html5-and-css.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index f4a11581d3..a08b9001f9 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -3402,7 +3402,7 @@
"dashedName": "waypoint-use-hex-code-for-specific-colors",
"difficulty": 1.54,
"description": [
- "Did you know there other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.",
+ "Did you know there are other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.",
"\"Decimal\" means the numbers zero through nine - the numbers that people use in everyday life. \"Hexadecimal\" includes these 10 numbers, plus the letters A, B, C, D, E and F. This means that Hexidecimal has a total of 16 possible values, instead of the 10 possible values that our normal base-10 number system gives us.",
"With CSS, we use 6 hexidecimal number to represent colors. For example, #000000
is the lowest possible value, and it represents the color black.",
"Replace the word \"black\" in our body
element's background-color with its \"hex code\" representation, #000000
. "
From 3b14872cbec5c4fe40686c1712e26e0dd4b10c21 Mon Sep 17 00:00:00 2001
From: Samuel Plumppu
Date: Thu, 6 Aug 2015 22:30:46 +0200
Subject: [PATCH 117/548] updated instructions for waypoint: get set for
ziplines to fit with new Codepen UI
---
seed/challenges/basic-ziplines.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json
index cb4f9bd8a5..e3cdfb7300 100644
--- a/seed/challenges/basic-ziplines.json
+++ b/seed/challenges/basic-ziplines.json
@@ -17,9 +17,9 @@
"Go to http://codepen.io and create an account.",
"Click your user image in the top right corner, then click the \"New pen\" button that drops down.",
"Drag the windows around and press the buttons in the lower-right hand corner to change the orientation to suit your preference.",
- "Click the gear next to CSS. Then in the \"External CSS File or Another Pen\" text field, type \"bootstrap\" and scroll down until you see the latest version of Bootstrap. Click it.",
+ "Click the gear next to CSS. Click the \"Quick-add...\" select box and choose Bootstrap.",
"Verify that bootstrap is active by adding the following code to your HTML: <h1 class='text-primary'>Hello CodePen!</h1>
. The text's color should be Bootstrap blue.",
- "Click the gear next to JavaScript. Click the \"Latest version of...\" select box and choose jQuery.",
+ "Click the gear next to JavaScript. Click the \"Quick-add...\" select box and choose jQuery.",
"Now add the following code to your JavaScript: $(document).ready(function() { $('.text-primary').text('Hi CodePen!') });
. Click the \"Save\" button at the top. Your \"Hello CodePen!\" should change to \"Hi CodePen!\". This means that jQuery is working.",
"You can use this CodePen that you've just created as a starting point for your Ziplines. Just click the \"fork\" button at the top of your CodePen and it will create a duplicate CodePen.",
"Now you're ready for your first Zipline. Click the \"I've completed this challenge\" button."
From 42321f5cef01e4795effda07e7bb8200401b35de Mon Sep 17 00:00:00 2001
From: ahstro
Date: Thu, 6 Aug 2015 22:41:45 +0200
Subject: [PATCH 118/548] Wrong element in jQuery targeting waypoint
---
seed/challenges/jquery-ajax-and-json.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index dad707f590..6c1fe0039f 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -60,7 +60,7 @@
"For example, let's make all of your button
elements bounce. Just add this code inside your \"document ready function\": $('button').addClass('animated bounce')
."
],
"tests": [
- "assert($('button').hasClass('animated') && $('button').hasClass('bounce'), 'Use the jQuery addClass()
function to give the classes \"animated\" and \"bounce\" to your img
element.')",
+ "assert($('button').hasClass('animated') && $('button').hasClass('bounce'), 'Use the jQuery addClass()
function to give the classes \"animated\" and \"bounce\" to your button
element.')",
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
],
"challengeSeed": [
From 3636b76f7b549f3e3dc1a9752ec454dc502971ae Mon Sep 17 00:00:00 2001
From: ahstro
Date: Thu, 6 Aug 2015 23:28:27 +0200
Subject: [PATCH 119/548] Improves 'Target Elements by ID Using jQuery'
---
seed/challenges/jquery-ajax-and-json.json | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index dad707f590..ce8cf694d9 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -153,15 +153,17 @@
"dashedName": "waypoint-target-elements-by-id-using-jquery",
"difficulty": 3.04,
"description": [
- "You can also target elements by their id attributes.",
- "First target your div
element with the class \"target3\" by using the $('#target3')
selector.",
- "Note that, just like with CSS declarations, you type a #
before the class's name.",
- "Then use jQuery's .addClass()
function to add the classes \"animated\" and \"fadeOut\".",
- "Make all the button
element with the id \"target3\" fadeOut. $('#target3').addClass('animated fadeOut')
."
+ "Just like you can target elements by their classes, you can also target them by their id attributes.",
+ "First target the element with the id target3
by using the $('#target3')
selector.",
+ "Note that, just like with CSS selectors, you type a #
before the id's name.",
+ "Then use jQuery's .addClass()
function to add the class fadeOut
.",
+ "Since #target3
is a button
, and we already added the animated
-class to all button
-elements, we do not need to add it again.",
+ "Make all the elements with the id target3
fade out. $('#target3').addClass('fadeOut')
."
],
"tests": [
- "assert($('#target3').hasClass('animated') && $('#target3').hasClass('fadeOut'), 'Select the button
element with the id
of \"target3\" and use the jQuery addClass()
function to give it the classes of \"animated\" and \"fadeOut\".');",
- "assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.');"
+ "assert($('#target3').hasClass('animated'), 'Make sure the old animated
-class is still added to all buttons.')",
+ "assert($('#target3').hasClass('fadeOut'), 'Target the element with the id target3
and use the jQuery addClass()
function to give it the class fadeOut
.')",
+ "assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
],
"challengeSeed": [
"fccss",
From 783d7cf1ec123144fdd26130cdfa846ef485d9a9 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Thu, 6 Aug 2015 15:37:07 -0700
Subject: [PATCH 120/548] fix string non-alphanumeric non-whitespace chars
before regex
---
server/utils/index.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/server/utils/index.js b/server/utils/index.js
index 72d515dd5f..784aa71366 100644
--- a/server/utils/index.js
+++ b/server/utils/index.js
@@ -62,7 +62,12 @@ module.exports = {
},
unDasherize: function unDasherize(name) {
- return ('' + name).replace(/\-/g, ' ').trim();
+ return ('' + name)
+ // replace dash with space
+ .replace(/\-/g, ' ')
+ // strip nonalphanumarics chars except whitespace
+ .replace(/[^a-zA-Z\d\s]/g, '')
+ .trim();
},
getChallengeMapForDisplay: function() {
From 8d293c9fc6c01b4c930cbb76babd4e67f00eb51c Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Thu, 6 Aug 2015 15:51:36 -0700
Subject: [PATCH 121/548] fix order of user/pairedWith in withLatestFrom
operator in challenges
---
server/boot/challenge.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index 4228a3ff15..4eb361b9b2 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -385,7 +385,7 @@ module.exports = function(app) {
);
}
})
- .withLatestFrom(Rx.Observable.just(req.user), function(user, pairedWith) {
+ .withLatestFrom(Rx.Observable.just(req.user), function(pairedWith, user) {
return {
user: user,
pairedWith: pairedWith
From 344b729bce31528ac6a0ff00f29e3c4e501df91a Mon Sep 17 00:00:00 2001
From: Samuel Plumppu
Date: Fri, 7 Aug 2015 02:13:11 +0200
Subject: [PATCH 122/548] fixed tests to check for lowercase hexadecimal colors
---
seed/challenges/html5-and-css.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index f4a11581d3..3896334683 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -3516,7 +3516,7 @@
],
"tests": [
"assert($('body').css('background-color') === 'rgb(0, 255, 0)', 'Give your body
element the background-color of green.')",
- "assert(editor.match(/#00FF00/g) && editor.match(/#00FF00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example body: { color: #00FF00; }
.')"
+ "assert(editor.match(/#00[Ff]{2}00/g) && editor.match(/#00[Ff]{2}00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example body: { color: #00FF00; }
.')"
],
"challengeSeed": [
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id":"cf1111c1c13feddfaeb1bdef",
- "title": "Waypoint: Add your JavaScript Slot Machine Slots",
+ "title": "Add your JavaScript Slot Machine Slots",
"difficulty":"9.989",
"description":[
"Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win",
@@ -1338,11 +1376,12 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id":"cf1111c1c13feddfaeb2bdef",
- "title": "Waypoint: Bring your JavaScript Slot Machine to Life",
+ "title": "Bring your JavaScript Slot Machine to Life",
"difficulty":"9.990",
"description":[
"Now we can detect a win let's get the slot machine to look like it works",
@@ -1504,6 +1543,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0
}
]
diff --git a/seed/challenges/basic-ziplines.json b/seed/challenges/basic-ziplines.json
index ea667f7073..b96619bb78 100644
--- a/seed/challenges/basic-ziplines.json
+++ b/seed/challenges/basic-ziplines.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7158d8c442eddfbeb5bd1f",
- "title": "Waypoint: Get Set for Ziplines",
+ "title": "Get Set for Ziplines",
"difficulty": 1.00,
"challengeSeed": ["125658022"],
"description": [
@@ -23,6 +23,7 @@
"You can use this CodePen that you've just created as a starting point for your Ziplines. Just click the \"fork\" button at the top of your CodePen and it will create a duplicate CodePen.",
"Now you're ready for your first Zipline. Click the \"I've completed this challenge\" button."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -38,7 +39,7 @@
},
{
"id": "bd7158d8c242eddfaeb5bd13",
- "title": "Zipline: Build a Personal Portfolio Webpage",
+ "title": "Build a Personal Portfolio Webpage",
"difficulty": 1.01,
"challengeSeed": ["133315782"],
"description": [
@@ -58,6 +59,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -73,7 +75,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd13",
- "title": "Zipline: Build a Random Quote Machine",
+ "title": "Build a Random Quote Machine",
"difficulty": 1.02,
"challengeSeed": ["126415122"],
"description": [
@@ -89,6 +91,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -104,7 +107,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd10",
- "title": "Zipline: Show the Local Weather",
+ "title": "Show the Local Weather",
"difficulty": 1.03,
"challengeSeed": ["126415127"],
"description": [
@@ -121,6 +124,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -136,7 +140,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd0f",
- "title": "Zipline: Build a Pomodoro Clock",
+ "title": "Build a Pomodoro Clock",
"difficulty": 1.04,
"challengeSeed": ["126411567"],
"description": [
@@ -152,6 +156,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -167,7 +172,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd1f",
- "title": "Zipline: Use the Twitch.tv JSON API",
+ "title": "Use the Twitch.tv JSON API",
"difficulty": 1.05,
"challengeSeed": ["126411564"],
"description": [
@@ -187,6 +192,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index d9ac143796..4efee80099 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bad87fee1348bd9acde08712",
- "title": "Waypoint: Use Responsive Design with Bootstrap Fluid Containers",
+ "title": "Use Responsive Design with Bootstrap Fluid Containers",
"difficulty": 2.01,
"description": [
"Now let's go back to our Cat Photo App. This time, we'll style it using the popular Bootstrap responsive CSS framework.",
@@ -73,6 +73,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -87,7 +88,7 @@
},
{
"id": "bad87fee1348bd9acde08812",
- "title": "Waypoint: Make Images Mobile Responsive",
+ "title": "Make Images Mobile Responsive",
"difficulty": 2.02,
"description": [
"First, Add a new image with the src
attribute of \"http://bit.ly/fcc-kittens2\".",
@@ -157,6 +158,7 @@
" ",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -171,7 +173,7 @@
},
{
"id": "bad87fee1348bd8acde08812",
- "title": "Waypoint: Center Text with Bootstrap",
+ "title": "Center Text with Bootstrap",
"difficulty": 2.03,
"description": [
"Now that we're using Bootstrap, we can center our heading elements to make them look better. All we need to do is add the class
text-center
to our
h1
and
h2
elements.",
@@ -239,6 +241,7 @@
" ",
"
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -253,7 +256,7 @@
},
{
"id": "bad87fee1348cd8acdf08812",
- "title": "Waypoint: Create a Bootstrap Button",
+ "title": "Create a Bootstrap Button",
"difficulty": 2.04,
"description": [
"Bootstrap has its own styles for button
elements, which look much better than the plain HTML ones.",
@@ -323,6 +326,7 @@
" ",
"
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -337,7 +341,7 @@
},
{
"id": "bad87fee1348cd8acef08812",
- "title": "Waypoint: Create a Block Element Bootstrap Button",
+ "title": "Create a Block Element Bootstrap Button",
"difficulty": 2.05,
"description": [
"Normally, your button
elements are only as wide as the text that they contain. By making them block elements, your button will stretch to fill your page's entire horizontal space.",
@@ -411,6 +415,7 @@
" ",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -425,7 +430,7 @@
},
{
"id": "bad87fee1348cd8acef08811",
- "title": "Waypoint: Taste the Bootstrap Button Color Rainbow",
+ "title": "Taste the Bootstrap Button Color Rainbow",
"difficulty": 2.06,
"description": [
"The \"btn-primary\" class is the main color you'll use in your app. It is useful for highlighting actions you want your user to take.",
@@ -497,6 +502,7 @@
" ",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -511,7 +517,7 @@
},
{
"id": "bad87fee1348cd8acef08813",
- "title": "Waypoint: Call out Optional Actions with Button Info",
+ "title": "Call out Optional Actions with Button Info",
"difficulty": 2.07,
"description": [
"Bootstrap comes with several pre-defined colors for buttons. The \"btn-info\" class is used to call attention to optional actions that the user can take.",
@@ -584,6 +590,7 @@
" ",
"
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -598,7 +605,7 @@
},
{
"id": "bad87fee1348ce8acef08814",
- "title": "Waypoint: Warn your Users of a Dangerous Action",
+ "title": "Warn your Users of a Dangerous Action",
"difficulty": 2.08,
"description": [
"Bootstrap comes with several pre-defined colors for buttons. The \"btn-danger\" class is the button color you'll use to notify users that the button performs a destructive action, such as deleting a cat photo.",
@@ -672,6 +679,7 @@
" ",
"
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -686,7 +694,7 @@
},
{
"id": "bad88fee1348ce8acef08815",
- "title": "Waypoint: Use the Bootstrap Grid to Put Elements Side By Side",
+ "title": "Use the Bootstrap Grid to Put Elements Side By Side",
"difficulty": 2.09,
"description": [
"Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a
div
element.",
@@ -765,6 +773,7 @@
" ",
"
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -779,7 +788,7 @@
},
{
"id": "bad87fee1348bd9aedf08845",
- "title": "Waypoint: Ditch Custom CSS for Bootstrap",
+ "title": "Ditch Custom CSS for Bootstrap",
"difficulty": 2.10,
"description": [
"We can clean up our code and make our Cat Photo App look more conventional by using Bootstrap's built-in styles instead of the custom styles we created earlier.",
@@ -863,6 +872,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -877,7 +887,7 @@
},
{
"id": "bad87fee1348bd9aede08845",
- "title": "Waypoint: Create a Custom Heading",
+ "title": "Create a Custom Heading",
"difficulty": 2.11,
"description": [
"We will make a simple heading for our Cat Photo App by putting them in the same row.",
@@ -951,6 +961,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -965,7 +976,7 @@
},
{
"id": "bad87fee1348bd9aedd08845",
- "title": "Waypoint: Add Font Awesome Icons to our Buttons",
+ "title": "Add Font Awesome Icons to our Buttons",
"difficulty": 2.12,
"description": [
"Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the \".svg\" file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.",
@@ -1035,6 +1046,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1049,7 +1061,7 @@
},
{
"id": "bad87fee1348bd9aedc08845",
- "title": "Waypoint: Add Font Awesome Icons to all of our Buttons",
+ "title": "Add Font Awesome Icons to all of our Buttons",
"difficulty": 2.13,
"description": [
"Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the \".svg\" file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.",
@@ -1119,6 +1131,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1133,7 +1146,7 @@
},
{
"id": "bad87fee1348bd9aedb08845",
- "title": "Waypoint: Responsively Style Radio Buttons",
+ "title": "Responsively Style Radio Buttons",
"difficulty": 2.14,
"description": [
"You can use Bootstrap's \"col-xs-*\" classes on form
elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.",
@@ -1203,6 +1216,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1217,7 +1231,7 @@
},
{
"id": "bad87fee1348bd9aeda08845",
- "title": "Waypoint: Responsively Style Checkboxes",
+ "title": "Responsively Style Checkboxes",
"difficulty": 2.15,
"description": [
"You can use Bootstrap's \"col-xs-*\" classes on form
elements, too! This way, our checkboxes will be evenly spread out across the page, regardless of how wide the screen resolution is.",
@@ -1294,6 +1308,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1308,7 +1323,7 @@
},
{
"id": "bad87fee1348bd9aed908845",
- "title": "Waypoint: Style Text Inputs as Form Controls",
+ "title": "Style Text Inputs as Form Controls",
"difficulty": 2.16,
"description": [
"You can add the \"fa-paper-plane\" Font Awesome icon by adding <i class=\"fa fa-paper-plane\"></i>
within your submit button
element.",
@@ -1394,6 +1409,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1408,7 +1424,7 @@
},
{
"id": "bad87fee1348bd9aec908845",
- "title": "Waypoint: Line up Form Elements Responsively with Bootstrap",
+ "title": "Line up Form Elements Responsively with Bootstrap",
"difficulty": 2.17,
"description": [
"Now let's get your form input
and your submission button
on the same line. We'll do this the same way we have previously: by using a div
element with the class \"row\", and other div
elements within it using the \"col-xs-*\" class.",
@@ -1495,6 +1511,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1509,7 +1526,7 @@
},
{
"id": "bad87fee1348bd9aec908846",
- "title": "Waypoint: Create a Bootstrap Headline",
+ "title": "Create a Bootstrap Headline",
"difficulty": 2.18,
"description": [
"Now let's build something from scratch to practice our HTML, CSS and Bootstrap skills.",
@@ -1529,6 +1546,7 @@
"",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1543,7 +1561,7 @@
},
{
"id": "bad87fee1348bd9aec908746",
- "title": "Waypoint: House our page within a Bootstrap Container Fluid Div",
+ "title": "House our page within a Bootstrap Container Fluid Div",
"difficulty": 2.18,
"description": [
"Now let's make sure all the content on your page is mobile-responsive.",
@@ -1558,6 +1576,7 @@
"",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1572,7 +1591,7 @@
},
{
"id": "bad87fee1348bd9bec908846",
- "title": "Waypoint: Create a Bootstrap Row",
+ "title": "Create a Bootstrap Row",
"difficulty": 2.19,
"description": [
"Now we'll create a Bootstrap row for our inline elements.",
@@ -1590,6 +1609,7 @@
"",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1604,7 +1624,7 @@
},
{
"id": "bad87fee1348bd9aec908847",
- "title": "Waypoint: Split your Bootstrap Row",
+ "title": "Split your Bootstrap Row",
"difficulty": 2.20,
"description": [
"Now that we have a Bootstrap Row, let's split it into two columns to house our elements.",
@@ -1621,6 +1641,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1635,7 +1656,7 @@
},
{
"id": "bad87fee1348bd9aec908848",
- "title": "Waypoint: Create Bootstrap Wells",
+ "title": "Create Bootstrap Wells",
"difficulty": 2.21,
"description": [
"Bootstrap has a class called \"well\" that can create a visual sense of depth for your columns.",
@@ -1658,6 +1679,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1672,7 +1694,7 @@
},
{
"id": "bad87fee1348bd9aec908849",
- "title": "Waypoint: Add Elements within your Bootstrap Wells",
+ "title": "Add Elements within your Bootstrap Wells",
"difficulty": 2.22,
"description": [
"Now we're several div
elements deep on each column of our row. This is as deep as we'll need to go. Now we can add our button
elements.",
@@ -1697,6 +1719,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1711,7 +1734,7 @@
},
{
"id": "bad87fee1348bd9aec908850",
- "title": "Waypoint: Apply the Default Bootstrap Button Style",
+ "title": "Apply the Default Bootstrap Button Style",
"difficulty": 2.23,
"description": [
"Bootstrap has another button class called \"btn-default\"",
@@ -1742,6 +1765,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1756,7 +1780,7 @@
},
{
"id": "bad87fee1348bd9aec908852",
- "title": "Waypoint: Create a Class to Target with jQuery Selectors",
+ "title": "Create a Class to Target with jQuery Selectors",
"difficulty": 2.24,
"description": [
"Not every class needs to have corresponding CSS. Sometimes we create classes just for the purpose of selecting these elements more easily using jQuery.",
@@ -1786,6 +1810,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1800,7 +1825,7 @@
},
{
"id": "bad87fee1348bd9aec908853",
- "title": "Waypoint: Add ID Attributes to Bootstrap Elements",
+ "title": "Add ID Attributes to Bootstrap Elements",
"difficulty": 2.25,
"description": [
"Recall that in addition to class attributes, you can give each of your elements an id attribute.",
@@ -1834,6 +1859,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1848,7 +1874,7 @@
},
{
"id": "bad87fee1348bd9aec908854",
- "title": "Waypoint: Label Bootstrap Wells",
+ "title": "Label Bootstrap Wells",
"difficulty": 2.26,
"description": [
"For the sake of clarity, let's label both of our wells with their ids.",
@@ -1881,6 +1907,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1895,7 +1922,7 @@
},
{
"id": "bad87fee1348bd9aec908855",
- "title": "Waypoint: Give Each Element a Unique ID",
+ "title": "Give Each Element a Unique ID",
"difficulty": 2.27,
"description": [
"We will also want to be able to use jQuery to target each button by its unique id.",
@@ -1932,6 +1959,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1946,7 +1974,7 @@
},
{
"id": "bad87fee1348bd9aec908856",
- "title": "Waypoint: Label Bootstrap Buttons",
+ "title": "Label Bootstrap Buttons",
"difficulty": 2.28,
"description": [
"Just like we labled our wells, we want to label our buttons.",
@@ -1983,6 +2011,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1997,7 +2026,7 @@
},
{
"id": "bad87fee1348bd9aec908857",
- "title": "Waypoint: Use Comments to Clarify Code",
+ "title": "Use Comments to Clarify Code",
"difficulty": 2.29,
"description": [
"When we start using jQuery, we will modify HTML elements without needing to actually change them in HTML.",
@@ -2033,6 +2062,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
index 8c5af398f0..06ab698fb1 100644
--- a/seed/challenges/expert-bonfires.json
+++ b/seed/challenges/expert-bonfires.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "aff0395860f5d3034dc0bfc9",
- "title": "Bonfire: Validate US Telephone Numbers",
+ "title": "Validate US Telephone Numbers",
"difficulty": "4.01",
"description": [
"Return true if the passed string is a valid US phone number",
@@ -50,6 +50,7 @@
"MDNlinks": [
"RegExp"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -64,7 +65,7 @@
},
{
"id": "a3f503de51cf954ede28891d",
- "title": "Bonfire: Symmetric Difference",
+ "title": "Symmetric Difference",
"difficulty": "4.02",
"description": [
"Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
@@ -88,6 +89,7 @@
"Array.reduce()",
"Symmetric Difference"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -102,7 +104,7 @@
},
{
"id": "aa2e6f85cab2ab736c9a9b24",
- "title": "Bonfire: Exact Change",
+ "title": "Exact Change",
"difficulty": "4.03",
"description": [
"Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
@@ -143,6 +145,7 @@
"MDNlinks": [
"Global Object"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -157,7 +160,7 @@
},
{
"id": "a56138aff60341a09ed6c480",
- "title": "Bonfire: Inventory Update",
+ "title": "Inventory Update",
"difficulty": "4.04",
"description": [
"Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
@@ -197,6 +200,7 @@
"MDNlinks": [
"Global Array Object"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -211,7 +215,7 @@
},
{
"id": "a7bf700cd123b9a54eef01d5",
- "title": "Bonfire: No repeats please",
+ "title": "No repeats please",
"difficulty": "4.05",
"description": [
"Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
@@ -238,6 +242,7 @@
"Permutations",
"RegExp"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -252,7 +257,7 @@
},
{
"id": "a19f0fbe1872186acd434d5a",
- "title": "Bonfire: Friendly Date Ranges",
+ "title": "Friendly Date Ranges",
"difficulty": "4.06",
"description": [
"Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
@@ -282,6 +287,7 @@
"String.substr()",
"parseInt()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
diff --git a/seed/challenges/get-set-for-free-code-camp.json b/seed/challenges/get-set-for-free-code-camp.json
index 12763352f8..74a1776d4d 100644
--- a/seed/challenges/get-set-for-free-code-camp.json
+++ b/seed/challenges/get-set-for-free-code-camp.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7124d8c441eddfaeb5bdef",
- "title": "Waypoint: Learn how Free Code Camp Works",
+ "title": "Learn how Free Code Camp Works",
"difficulty": 0.01,
"challengeSeed": ["125407438"],
"description": [
@@ -20,6 +20,7 @@
"We'll provide you with the most rigorous curriculum and the most supportive community on earth. All you need to do sit down, day after day, and put in the hard work.",
"Now it's time to join our chat room. Click the \"I've completed this challenge\" button to move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -55,7 +56,7 @@
},
{
"id": "bd7125d8c441eddfaeb5bd0f",
- "title": "Waypoint: Join Our Chat Room",
+ "title": "Join Our Chat Room",
"difficulty": 0.02,
"challengeSeed": ["131574135"],
"description": [
@@ -77,6 +78,7 @@
"In order to keep our community a friendly and positive place to learn to code, please read and follow our Code of Conduct: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct ",
"Now you're ready to move on. Click the \"I've completed this challenge\" button to move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -116,7 +118,7 @@
},
{
"id": "bd7125d8c441eddfaeb5bdff",
- "title": "Waypoint: Preview our Challenge Map",
+ "title": "Preview our Challenge Map",
"difficulty": 0.03,
"challengeSeed": ["125407437"],
"description": [
@@ -126,6 +128,7 @@
"In addition to our Waypoint challenges, like the one you're doing now, we have algorithm practice challenges (Bonfires), front end development challenges (Ziplines) and full stack development challenges (Basejumps). After you finish all of these, you'll start building projects for nonprofits.",
"Please note that our open-source curriculum is a work in progress. Our volunteer community is constantly improving it. If you think you've encountered a bug, typo, or something that seems confusing, be sure to click the \"bug\" button to create a GitHub issue."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -157,7 +160,7 @@
},
{
"id": "bd7125d8c441eddfaeb5bd1f",
- "title": "Waypoint: Browse our Wiki",
+ "title": "Browse our Wiki",
"difficulty": 0.04,
"challengeSeed": ["125407435"],
"description": [
@@ -167,6 +170,7 @@
"All of our Wiki articles are contributed by our community. You can update our wiki articles, and even create wiki articles of your own.",
"Now you can move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -196,7 +200,7 @@
},
{
"id": "bd7125d8c441eddfaeb5bd2f",
- "title": "Waypoint: Customize your Portfolio Page",
+ "title": "Customize your Portfolio Page",
"difficulty": 0.05,
"challengeSeed": ["125407433"],
"description": [
@@ -208,6 +212,7 @@
"Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get streak.",
"Once you're happy with your portfolio page, you can move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -241,7 +246,7 @@
},
{
"id": "bd7126d8c441eddfaeb5bd3f",
- "title": "Waypoint: Try Camper News",
+ "title": "Try Camper News",
"difficulty": 0.06,
"challengeSeed": ["124553410"],
"description": [
@@ -254,6 +259,7 @@
"When you submit a link, you'll get a Brownie Point. You'll also get a Brownie Point each time someone upvotes your link.",
"Now that you've learned how to use Camper News, let's move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -291,7 +297,7 @@
},
{
"id": "bd7126d8c441eddfaeb5bd3e",
- "title": "Waypoint: Meet Other Campers in your City",
+ "title": "Meet Other Campers in your City",
"difficulty": 0.07,
"challengeSeed": ["127358841"],
"description": [
@@ -303,6 +309,7 @@
"Our Campsites allow you to create events, coordinate those events, and share photos from the events afterward.",
"Whether you're hosting a study group, pair programming at your local library, or going to a weekend hackathon, your city's Campsite will help you make it happen."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -338,7 +345,7 @@
},
{
"id": "bd7126d8c431eddfaeb5bd3e",
- "title": "Waypoint: Add Free Code Camp to your LinkedIn Profile",
+ "title": "Add Free Code Camp to your LinkedIn Profile",
"difficulty": 0.08,
"challengeSeed": ["131574134"],
"description": [
@@ -353,6 +360,7 @@
"Make your LinkedIn profile as complete as possible. Unlike other social networks, with LinkedIn, it's perfectly fine if you don't want to add a photo.",
"Let's keep moving. We're almost ready to start coding!"
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -368,7 +376,7 @@
},
{
"id": "bd7137d8c441eddfaeb5bdef",
- "title": "Waypoint: Get Help the Hacker Way with RSAP",
+ "title": "Get Help the Hacker Way with RSAP",
"difficulty": 0.09,
"challengeSeed": ["125407432"],
"description": [
@@ -381,6 +389,7 @@
"Here's our detailed wiki article on getting help: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck .",
"Now you have a clear algorithm to follow when you need help! Let's start coding! Move on to your next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/git.json b/seed/challenges/git.json
index e87eb4bbdf..3141e65112 100644
--- a/seed/challenges/git.json
+++ b/seed/challenges/git.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7353d8c341eddeaeb5bd0f",
- "title": "Waypoint: Save your Code Revisions Forever with Git",
+ "title": "Save your Code Revisions Forever with Git",
"difficulty": 0.01,
"challengeSeed": ["133316034"],
"description": [
@@ -34,6 +34,7 @@
"Complete \"Merge Tada!\"",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/hikes.json b/seed/challenges/hikes.json
index 8855b0e6c3..e24da79d85 100644
--- a/seed/challenges/hikes.json
+++ b/seed/challenges/hikes.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7128d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 1: The 4 Basic Parts of a Computer",
+ "title": "Computer Basics 1: The 4 Basic Parts of a Computer",
"difficulty": 9.01,
"challengeSeed": [
"132542064"
@@ -24,6 +24,7 @@
"You can't get to the memory from the input or the output without the use of the CPU.",
"So, just to review, we've got 4 basic parts of the computer: the input, the output, CPU, and memory."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["The computer has 3 basic parts.", false, "The computer has 4 basic parts: input, output, CPU, and memory"],
@@ -43,7 +44,7 @@
},
{
"id": "bd7127d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 2: More Computer Hardware",
+ "title": "Computer Basics 2: More Computer Hardware",
"difficulty": 9.02,
"challengeSeed": [
"132542458"
@@ -62,6 +63,7 @@
"So let's do a quick review.",
"In addition to the four basic parts of input, output, CPU, and memory, we also usually have a motherboard, expansion cards, and a power supply."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["The power supply isn't a necessary part of a computer since it's not one of the 4 main parts.", false, "The computer needs power!"],
@@ -81,7 +83,7 @@
},
{
"id": "bd7126d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 3: Intro to Binary Code",
+ "title": "Computer Basics 3: Intro to Binary Code",
"difficulty": 9.03,
"challengeSeed": [
"132542757"
@@ -95,6 +97,7 @@
"We're going to go into how you decode a number in binary, but as you can probably guess, translating binary can be done with a quick google search.",
"The most important part of this is you undrestand the concept that even simple things like 1's and 0's can translate into something really complex that is the basis for all of the computer languages that exist today."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["1's and 0's are how we talk about little switches being on and off.", true],
@@ -114,7 +117,7 @@
},
{
"id": "bd7125d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 4: Decoding a Binary Number",
+ "title": "Computer Basics 4: Decoding a Binary Number",
"difficulty": 9.04,
"challengeSeed": [
"132543332"
@@ -130,6 +133,7 @@
"If it's a 0, we disregard it.",
"In this video, our number adds up to 75."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["1 === on and 0 ===off", true],
@@ -149,7 +153,7 @@
},
{
"id": "bd7124d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 5: How To Measure Data Size",
+ "title": "Computer Basics 5: How To Measure Data Size",
"difficulty": 9.05,
"challengeSeed": [
"132543959"
@@ -168,6 +172,7 @@
"Then it's Gigabyte, 1024 Bytes to the power of three; Terabyte, 1024 Bytes to the power of 4, and Petabyte, 1024 to the power of 5.",
"These get much bigger really quickly!"
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["A Byte is the smallest possible amount of data.", false, "A Byte is 8 bits."],
@@ -187,7 +192,7 @@
},
{
"id": "bd7123d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 6: Measuring Data Speed",
+ "title": "Computer Basics 6: Measuring Data Speed",
"difficulty": 9.06,
"challengeSeed": [
"132545171"
@@ -205,6 +210,7 @@
"The main takeaway here is that speed is usually measured in bits and size is measured in Bytes.",
"Additionally, if you have an internet speed that says however many bits per second, keep in mind they are talking about something 8 times less than Bytes, how you are thinking about data."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Data speed is measured in bits.", true],
@@ -223,7 +229,7 @@
},
{
"id": "bd7122d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 7: Binary Bytes",
+ "title": "Computer Basics 7: Binary Bytes",
"difficulty": 9.07,
"challengeSeed": [
"132545417"
@@ -237,6 +243,7 @@
"So, all of the numbers, letters, and symbols in your javascript can be translated.",
"There are a lot of languages that computers can work with, and what I want you to get away from this video is that all data in your computer boils down to binary Bytes."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["All digits, letters, and symbols have a binary Byte translation.", true],
@@ -256,7 +263,7 @@
},
{
"id": "bd7121d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 8: Types of Computers",
+ "title": "Computer Basics 8: Types of Computers",
"difficulty": 9.08,
"challengeSeed": [
"132546182"
@@ -275,6 +282,7 @@
"It's both a Mac and a PC.",
"The last type of computer we'll talk about is a microcontroller, the type of computer you might have in your car that is really good at a small specialized task, but wouldn't be used the same way a PC would be."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["The most common type of computer is a Personal Computer, a PC.", true],
@@ -294,7 +302,7 @@
},
{
"id": "bd7120d8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 9: More on the Motherboard",
+ "title": "Computer Basics 9: More on the Motherboard",
"difficulty": 9.09,
"challengeSeed": [
"132547285"
@@ -315,6 +323,7 @@
"On your computer, you probably know there's a place to connect USB, firewire, SD card, ethernet, even an audio plug-in to listen through headphones.",
"These are all considered ports, a place on the motherboard where you can connect the CPU to some outside source to either get or give information."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["A motherboard must connect the CPU, the memory, and the network.", false, "A motherboard is a motherboard as long as it connects the CPU and the memory."],
@@ -334,7 +343,7 @@
},
{
"id": "bd712fd8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 10: Data Networks",
+ "title": "Computer Basics 10: Data Networks",
"difficulty": 9.10,
"challengeSeed": [
"132547590"
@@ -354,6 +363,7 @@
"You might think that these are connected over the internet, and in the case of a VPN (Virtual Private Network, which is basically the same conceptionally as a WAN), you're right.",
"However, a WAN usually rents a cable from an internet company to creat the connection."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["You can connect to a LAN from far away.", false, "To connect to a LAN you must be physically near to it."],
@@ -373,7 +383,7 @@
},
{
"id": "bd712ed8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 11: IP Addresses",
+ "title": "Computer Basics 11: IP Addresses",
"difficulty": 9.11,
"challengeSeed": [
"132548071"
@@ -393,6 +403,7 @@
"However, it is specific enough that you could google \"Where's the best ice cream near me\" and google could give you information close to your location.",
"This is done using your IP address."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["IP addresses are necessary to use and participate in the internet.", true],
@@ -411,7 +422,7 @@
},
{
"id": "bd712dd8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 12: How the Internet Works",
+ "title": "Computer Basics 12: How the Internet Works",
"difficulty": 9.12,
"challengeSeed": [
"132548579"
@@ -431,6 +442,7 @@
"Now, this explaination is really quite basic.",
"For more information, check out web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Your computer sends a request for information.", true],
@@ -449,7 +461,7 @@
},
{
"id": "bd712cd8c441eddfbeb5bddf",
- "title": "Hike: Computer Basics 13: Software",
+ "title": "Computer Basics 13: Software",
"difficulty": 9.13,
"challengeSeed": [
"132548908"
@@ -464,6 +476,7 @@
"There are three main operating systems: Windows, Mac, and Linux.",
"Applications comprise all other software, like your web browser, games, things like Photoshop, how you view your mail, editing documents, etc."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Safari, Chrome, and Firefox are all examples of application software.", true]
@@ -481,7 +494,7 @@
},
{
"id": "bd712bd8c441eddfbeb5bddf",
- "title": "Hike: What Do Programmers Do?",
+ "title": "What Do Programmers Do?",
"difficulty": 9.14,
"challengeSeed": [
"133166912"
@@ -498,6 +511,7 @@
"Computers just read straight down like you would read a book.",
"Programmers are the ones responsible for breaking their ideas down into the little tiny steps and writing them in a way that computers can understand them."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Computers look at code one line at a time", true],
@@ -517,7 +531,7 @@
},
{
"id": "bd712ad8c441eddfbeb5bddf",
- "title": "Hike: Console and Logging",
+ "title": "Console and Logging",
"difficulty": 9.15,
"challengeSeed": [
"133170880"
@@ -535,6 +549,7 @@
"This will also work with numbers and booleans, which are true/false statements.",
"When consoling words, it's important to put it inside of quotations so it recognizes it's a string."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["The console serves only small, unnecessary purposes.", false, "The console's main purpose is to debug, which is a vital step in creating code."],
@@ -553,7 +568,7 @@
},
{
"id": "bd7119d8c441eddfbeb5bddf",
- "title": "Hike: Variables In Code",
+ "title": "Variables In Code",
"difficulty": 9.16,
"challengeSeed": [
"133172920"
@@ -567,6 +582,7 @@
"But be careful - if we put console.log(\"x\"), with the x in quotation marks, it will output the letter \"x\".",
"What I want you to take away from this video is that variables exist in code, and you can store everything from a simple string all the way up to a function, all within a simple name."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Variables are useful in coding languages like JavaScript.", true],
@@ -585,7 +601,7 @@
},
{
"id": "bd7029d8c441eddfbeb5bddf",
- "title": "Hike: Source Code",
+ "title": "Source Code",
"difficulty": 9.17,
"challengeSeed": [
"133177129"
@@ -610,6 +626,7 @@
"It's a great way for websites and software to grow in a strong and fast way because of the community working together to improve it.",
"One unwritten rule of contributing to open source projects is that you should generally submit your improvements to also be open source, and by giving that improvement back to the public, you let others use your improvement as well."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Source code is a text document.", true],
@@ -629,7 +646,7 @@
},
{
"id": "bd7129d8b441eddfbeb5bddf",
- "title": "Hike: Routers and Packets",
+ "title": "Routers and Packets",
"difficulty": 9.18,
"challengeSeed": [
"133181251"
@@ -660,6 +677,7 @@
"They can take whichever route is open, whichever is fastest, and since they have the end IP address, all of the routers know where to send them.",
"Once they get to the end destination, that computer knows how to put all of the information back together."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Routers have to know the whole internet.", false, "Routers just have to know the stops around them to send information in the right direction."],
@@ -679,7 +697,7 @@
},
{
"id": "bd7129d8a441eddfbeb5bddf",
- "title": "Hike: Hardware: Chips and Moore's Law",
+ "title": "Hardware: Chips and Moore's Law",
"difficulty": 9.19,
"challengeSeed": [
"133182057"
@@ -696,6 +714,7 @@
"Moore's Law is the observation that the amount of transistors fit on each chip has doubled every two years since 1965.",
"This is important because it's making technology more affordable and accessible."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Chips have transistors, little switches that can store a 1 or a 0.", true],
@@ -715,7 +734,7 @@
},
{
"id": "bd7129d80441eddfbeb5bddf",
- "title": "Hike: Analog vs Digital and File Compression",
+ "title": "Analog vs Digital and File Compression",
"difficulty": 9.20,
"challengeSeed": [
"133182587"
@@ -735,6 +754,7 @@
"In images, it's done by measuring groups of pixels by 16 instead of individually.",
"The takeaway from this video is that you'll want to use digital files as they're a higher quality, and when you're looking at compression, you want to decide how far you are willing to go to ensure the user still has the best possible experience."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Digital files can be made from analog sounds and analog sounds can be made from digital files.", true],
@@ -753,7 +773,7 @@
},
{
"id": "bd7129d89441eddfbeb5bddf",
- "title": "Hike: Computer Security",
+ "title": "Computer Security",
"difficulty": 9.21,
"challengeSeed": [
"133186284"
@@ -787,6 +807,7 @@
"Those bugs have been patched in newer versions, so if you keep everything updated, you'll avoid lots of problems.",
"These are all very basic things you should know about how to keep your information safe on your computer."
],
+ "type": "hike",
"challengeType": 6,
"tests": [
["Passwords should be shared with all of your accounts.", false, "Don't reuse important passwords"],
diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json
index 77df5f408a..2ceadb9322 100644
--- a/seed/challenges/html5-and-css.json
+++ b/seed/challenges/html5-and-css.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7123c8c441eddfaeb5bdef",
- "title": "Waypoint: Say Hello to HTML Elements",
+ "title": "Say Hello to HTML Elements",
"difficulty": 1.01,
"description": [
"Welcome to Free Code Camp's first coding challenge!",
@@ -20,6 +20,7 @@
"challengeSeed": [
"Hello "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -52,7 +53,7 @@
},
{
"id": "bad87fee1348bd9aedf0887a",
- "title": "Waypoint: Headline with the h2 Element",
+ "title": "Headline with the h2 Element",
"difficulty": 1.02,
"description": [
"Add an h2
tag that says \"CatPhotoApp\" to create a second HTML element
below your \"Hello World\" h1
element.",
@@ -69,6 +70,7 @@
"challengeSeed": [
"Hello World "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -95,7 +97,7 @@
},
{
"id": "bad87fee1348bd9aedf08801",
- "title": "Waypoint: Inform with the Paragraph Element",
+ "title": "Inform with the Paragraph Element",
"difficulty": 1.03,
"description": [
"Create a p
element below your h2
element, and give it the text \"Hello Paragraph\".",
@@ -111,6 +113,7 @@
"Hello World ",
"CatPhotoApp "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -135,7 +138,7 @@
},
{
"id": "bad87fee1348bd9aedf08802",
- "title": "Waypoint: Uncomment HTML",
+ "title": "Uncomment HTML",
"difficulty": 1.04,
"description": [
"Uncomment your h1
, h2
and p
elements.",
@@ -158,6 +161,7 @@
"Hello Paragraph
",
"-->"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -184,7 +188,7 @@
},
{
"id": "bad87fee1348bd9aedf08804",
- "title": "Waypoint: Comment out HTML",
+ "title": "Comment out HTML",
"difficulty": 1.05,
"description": [
"Comment out your h1
element and your p
element, but leave your h2
element uncommented.",
@@ -206,6 +210,7 @@
"Hello Paragraph
",
"-->"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -230,7 +235,7 @@
},
{
"id": "bad87fee1348bd9aedf08833",
- "title": "Waypoint: Fill in the Blank with Placeholder Text",
+ "title": "Fill in the Blank with Placeholder Text",
"difficulty": 1.06,
"description": [
"Web developers traditionally use \"Lorem Ipsum\" text as placeholder text. It's called \"Lorem Ipsum\" text because those are the first two words of a famous passage by Cicero of Ancient Rome.",
@@ -248,6 +253,7 @@
"",
"Hello Paragraph
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -276,7 +282,7 @@
},
{
"id": "bad87fed1348bd9aedf08833",
- "title": "Waypoint: Delete HTML Elements",
+ "title": "Delete HTML Elements",
"difficulty": 1.07,
"description": [
"Delete your h1
element so we can simplify our view.",
@@ -295,6 +301,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -319,7 +326,7 @@
},
{
"id": "bad87fee1348bd9aedf08803",
- "title": "Waypoint: Change the Color of Text",
+ "title": "Change the Color of Text",
"difficulty": 1.08,
"description": [
"Change your h2
element's style so that its text color is red.",
@@ -335,6 +342,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -360,7 +368,7 @@
},
{
"id": "bad87fee1348bd9aedf08805",
- "title": "Waypoint: Use CSS Selectors to Style Elements",
+ "title": "Use CSS Selectors to Style Elements",
"difficulty": 1.09,
"description": [
"Delete your h2
element's style attribute and instead create a CSS style
element. Add the necessary CSS to turn all h2
elements blue.",
@@ -382,6 +390,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -414,7 +423,7 @@
},
{
"id": "bad87fee1348bd9aecf08806",
- "title": "Waypoint: Use a CSS Class to Style an Element",
+ "title": "Use a CSS Class to Style an Element",
"difficulty": 1.11,
"description": [
"Create a CSS class called \"red-text\" and apply it to your h2
element.",
@@ -442,6 +451,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -467,7 +477,7 @@
},
{
"id": "bad87fee1348bd9aefe08806",
- "title": "Waypoint: Style Multiple Elements with a CSS Class",
+ "title": "Style Multiple Elements with a CSS Class",
"difficulty": 1.12,
"description": [
"Apply the \"red-text\" class to your h2
and p
elements.",
@@ -491,6 +501,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -511,7 +522,7 @@
},
{
"id": "bad87fee1348bd9aedf08806",
- "title": "Waypoint: Change the Font Size of an Element",
+ "title": "Change the Font Size of an Element",
"difficulty": 1.13,
"description": [
"Create a second p
element with the following Kitty Ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
",
@@ -536,6 +547,7 @@
"",
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -557,7 +569,7 @@
},
{
"id": "bad87fee1348bd9aede08807",
- "title": "Waypoint: Set the Font Family of an Element",
+ "title": "Set the Font Family of an Element",
"difficulty": 1.14,
"description": [
"Make all of your p
elements use the \"Monospace\" font.",
@@ -583,6 +595,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -603,7 +616,7 @@
},
{
"id": "bad87fee1348bd9aedf08807",
- "title": "Waypoint: Import a Google Font",
+ "title": "Import a Google Font",
"difficulty": 1.15,
"description": [
"Apply the font-family
of \"Lobster\" to your h2
element.",
@@ -634,6 +647,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -656,7 +670,7 @@
},
{
"id": "bad87fee1348bd9aedf08808",
- "title": "Waypoint: Specify How Fonts Should Degrade",
+ "title": "Specify How Fonts Should Degrade",
"difficulty": 1.16,
"description": [
"There are several default fonts that are available in all browsers. These include \"Monospace\", \"Serif\" and \"Sans-Serif\". Leave \"Lobster\" as the font-family for your h2
elements. Make them \"degrade\" to \"Monospace\" when \"Lobster\" isn't available.",
@@ -691,6 +705,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -713,7 +728,7 @@
},
{
"id": "bad87fee1348bd9aedf08812",
- "title": "Waypoint: Add Images to your Website",
+ "title": "Add Images to your Website",
"difficulty": 1.17,
"description": [
"You can add images to your website by using the img
element, and point to an specific image's URL using the src
attribute.",
@@ -746,6 +761,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -767,7 +783,7 @@
},
{
"id": "bad87fee1348bd9acdf08812",
- "title": "Waypoint: Size your Images",
+ "title": "Size your Images",
"difficulty": 1.18,
"description": [
"CSS has an attribute called width
that controls an element's width. Just like with fonts, we'll use pixels(px) to specify the image's width.",
@@ -802,6 +818,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -822,7 +839,7 @@
},
{
"id": "bad87fee1348bd9bedf08813",
- "title": "Waypoint: Add Borders Around your Elements",
+ "title": "Add Borders Around your Elements",
"difficulty": 1.19,
"description": [
"CSS borders have attributes like style, color and width.",
@@ -864,6 +881,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -884,7 +902,7 @@
},
{
"id": "bad87fee1348bd9aedf08814",
- "title": "Waypoint: Add Rounded Corners with a Border Radius",
+ "title": "Add Rounded Corners with a Border Radius",
"difficulty": 1.20,
"description": [
"Your cat photo currently has sharp corners. We can round out those corners with a CSS attribute called border-radius
.",
@@ -929,6 +947,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -949,7 +968,7 @@
},
{
"id": "bad87fee1348bd9aedf08815",
- "title": "Waypoint: Make Circular Images with a Border Radius",
+ "title": "Make Circular Images with a Border Radius",
"difficulty": 1.21,
"description": [
"In addition to pixels, you can also specify a border-radius
using a percentage.",
@@ -994,6 +1013,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1013,7 +1033,7 @@
},
{
"id": "bad87fee1348bd9aedf08816",
- "title": "Waypoint: Link to External Pages with Anchor Elements",
+ "title": "Link to External Pages with Anchor Elements",
"difficulty": 1.22,
"description": [
"a
elements or \"anchor\" elements, are used to link to content outside of the current page.",
@@ -1062,6 +1082,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1083,7 +1104,7 @@
},
{
"id": "bad87fee1348bd9aede08817",
- "title": "Waypoint: Nest an Anchor Element within a Paragraph",
+ "title": "Nest an Anchor Element within a Paragraph",
"difficulty": 1.23,
"description": [
"Again, here's a diagram of an a
element for your reference:",
@@ -1138,6 +1159,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1158,7 +1180,7 @@
},
{
"id": "bad87fee1348bd9aedf08817",
- "title": "Waypoint: Make Dead Links using the Hash Symbol",
+ "title": "Make Dead Links using the Hash Symbol",
"difficulty": 1.24,
"description": [
"Sometimes you want to add a
elements to your website before you know where they will link.",
@@ -1205,6 +1227,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1226,7 +1249,7 @@
},
{
"id": "bad87fee1348bd9aedf08820",
- "title": "Waypoint: Turn an Image into a Link",
+ "title": "Turn an Image into a Link",
"difficulty": 1.25,
"description": [
"You can make elements into links by nesting them within an a
element.",
@@ -1276,6 +1299,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1298,7 +1322,7 @@
},
{
"id": "bad87fee1348bd9aedf08818",
- "title": "Waypoint: Add Alt Text to an Image for Accessibility",
+ "title": "Add Alt Text to an Image for Accessibility",
"difficulty": 1.26,
"description": [
"alt
attributes, also known as \"alt text\", are what browsers will display if they fail to load the image. alt
attributes are also important for blind or visually impaired users to understand what an image portrays. And search engines also look at alt
attributes.",
@@ -1346,6 +1370,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1368,7 +1393,7 @@
},
{
"id": "bad87fee1348bd9aedf08827",
- "title": "Waypoint: Create a Bulleted Unordered List",
+ "title": "Create a Bulleted Unordered List",
"difficulty": 1.27,
"description": [
"HTML has a special element for creating unordered lists, or bullet point-style lists.",
@@ -1424,6 +1449,7 @@
"Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
",
"Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1445,7 +1471,7 @@
},
{
"id": "bad87fee1348bd9aedf08828",
- "title": "Waypoint: Create an Ordered List",
+ "title": "Create an Ordered List",
"difficulty": 1.28,
"description": [
"HTML has a special element for creating ordered lists, or numbered-style lists.",
@@ -1504,6 +1530,7 @@
" ",
"Top 3 things cats hate:
"
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1525,7 +1552,7 @@
},
{
"id": "bad87fee1348bd9aedf08829",
- "title": "Waypoint: Create a Text Field",
+ "title": "Create a Text Field",
"difficulty": 1.29,
"description": [
"Now let's create a web form.",
@@ -1583,6 +1610,7 @@
" other cats ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1603,7 +1631,7 @@
},
{
"id": "bad87fee1348bd9aedf08830",
- "title": "Waypoint: Add Placeholder Text to a Text Field",
+ "title": "Add Placeholder Text to a Text Field",
"difficulty": 1.30,
"description": [
"Your placeholder text is what appears in your text input
before your user has inputed anything.",
@@ -1662,6 +1690,7 @@
"",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1682,7 +1711,7 @@
},
{
"id": "bad87fee1348bd9aede08830",
- "title": "Waypoint: Create a Form Element",
+ "title": "Create a Form Element",
"difficulty": 1.31,
"description": [
"You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form
element.",
@@ -1743,6 +1772,7 @@
"",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1763,7 +1793,7 @@
},
{
"id": "bad87fee1348bd9aedd08830",
- "title": "Waypoint: Add a Submit Button to a Form",
+ "title": "Add a Submit Button to a Form",
"difficulty": 1.32,
"description": [
"Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's action
attribute.",
@@ -1826,6 +1856,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1846,7 +1877,7 @@
},
{
"id": "bad87fee1348bd9aedc08830",
- "title": "Waypoint: Use HTML5 to Require a Field",
+ "title": "Use HTML5 to Require a Field",
"difficulty": 1.33,
"description": [
"You can require specific form fields so that your user will not be able to submit your form until he or she has filled them out.",
@@ -1907,6 +1938,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -1927,7 +1959,7 @@
},
{
"id": "bad87fee1348bd9aedf08834",
- "title": "Waypoint: Create a Set of Radio Buttons",
+ "title": "Create a Set of Radio Buttons",
"difficulty": 1.34,
"description": [
"You can use \"radio buttons\" for questions where you want the user to only give you one answer.",
@@ -1996,6 +2028,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2019,7 +2052,7 @@
},
{
"id": "bad87fee1348bd9aedf08835",
- "title": "Waypoint: Create a Set of Checkboxes",
+ "title": "Create a Set of Checkboxes",
"difficulty": 1.35,
"description": [
"Forms commonly use \"checkboxes\" for questions that may have more than one answer.",
@@ -2088,6 +2121,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2108,7 +2142,7 @@
},
{
"id": "bad87fee1348bd9aedd08835",
- "title": "Waypoint: Check Radio Buttons and Checkboxes by Default",
+ "title": "Check Radio Buttons and Checkboxes by Default",
"difficulty": 1.37,
"description": [
"You can set a checkbox or radio button to be checked by default using the checked
attribute.",
@@ -2175,6 +2209,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2195,7 +2230,7 @@
},
{
"id": "bad87fee1348bd9aede08835",
- "title": "Waypoint: Nest Many Elements within a Single Div Element",
+ "title": "Nest Many Elements within a Single Div Element",
"difficulty": 1.38,
"description": [
"The div
element, or \"Division\" element, is a general purpose container for other elements.",
@@ -2267,6 +2302,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2289,7 +2325,7 @@
},
{
"id": "bad87fed1348bd9aede07836",
- "title": "Waypoint: Give a Background Color to a Div Element",
+ "title": "Give a Background Color to a Div Element",
"difficulty": 1.39,
"description": [
"You can set an element's background color with the \"background-color\" attribute.",
@@ -2359,6 +2395,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2375,7 +2412,7 @@
},
{
"id": "bad87eee1348bd9aede07836",
- "title": "Waypoint: Set the ID of an Element",
+ "title": "Set the ID of an Element",
"difficulty": 1.391,
"description": [
"In addition to classes, each HTML element can also have an id
attribute.",
@@ -2446,6 +2483,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2462,7 +2500,7 @@
},
{
"id": "bad87dee1348bd9aede07836",
- "title": "Waypoint: Use an ID Attribute to Style an Element",
+ "title": "Use an ID Attribute to Style an Element",
"difficulty": 1.392,
"description": [
"One cool thing about id
attributes is that, like classes, you can style them using CSS.",
@@ -2535,6 +2573,7 @@
" Submit ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2551,7 +2590,7 @@
},
{
"id": "bad88fee1348bd9aedf08825",
- "title": "Waypoint: Adjusting the Padding of an Element",
+ "title": "Adjusting the Padding of an Element",
"difficulty": 1.40,
"description": [
"You may have already noticed this, but all HTML elements are essentially little rectangles.",
@@ -2600,6 +2639,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2621,7 +2661,7 @@
},
{
"id": "bad87fee1348bd9aedf08822",
- "title": "Waypoint: Adjust the Margin of an Element",
+ "title": "Adjust the Margin of an Element",
"difficulty": 1.41,
"description": [
"An element's margin
controls the amount of space between an element's border
and surrounding elements.",
@@ -2670,6 +2710,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2691,7 +2732,7 @@
},
{
"id": "bad87fee1348bd9aedf08823",
- "title": "Waypoint: Add a Negative Margin to an Element",
+ "title": "Add a Negative Margin to an Element",
"difficulty": 1.42,
"description": [
"An element's margin
controls the amount of space between an element's border
and surrounding elements.",
@@ -2739,6 +2780,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2760,7 +2802,7 @@
},
{
"id": "bad87fee1348bd9aedf08824",
- "title": "Waypoint: Add Different Padding to Each Side of an Element",
+ "title": "Add Different Padding to Each Side of an Element",
"difficulty": 1.43,
"description": [
"Sometimes you will want to customize an element so that it has different padding
on each of its sides.",
@@ -2811,6 +2853,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2831,7 +2874,7 @@
},
{
"id": "bad87fee1248bd9aedf08824",
- "title": "Waypoint: Add Different Margins to Each Side of an Element",
+ "title": "Add Different Margins to Each Side of an Element",
"difficulty": 1.44,
"description": [
"Give the green box a margin
of 40 pixels on its top and left side, but only 20 pixels on its bottom and right side.",
@@ -2882,6 +2925,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2901,7 +2945,7 @@
},
{
"id": "bad87fee1348bd9aedf08826",
- "title": "Waypoint: Use Clockwise Notation to Specify the Padding of an Element",
+ "title": "Use Clockwise Notation to Specify the Padding of an Element",
"difficulty": 1.44,
"description": [
"Instead of specifying an element's padding-top
, padding-right
, padding-bottom
, and padding-left
attributes, you can specify them all in one line, like this: padding: 10px 20px 10px 20px;
.",
@@ -2949,6 +2993,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -2969,7 +3014,7 @@
},
{
"id": "bad87fee1348bd9afdf08726",
- "title": "Waypoint: Use Clockwise Notation to Specify the Margin of an Element",
+ "title": "Use Clockwise Notation to Specify the Margin of an Element",
"difficulty": 1.45,
"description": [
"Let's try this again, but with margin
this time.",
@@ -3018,6 +3063,7 @@
" padding ",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3038,7 +3084,7 @@
},
{
"id": "bad87fee1348bd9aedf08736",
- "title": "Waypoint: Style the HTML Body Element",
+ "title": "Style the HTML Body Element",
"difficulty": 1.46,
"description": [
"Now let's start fresh and talk about CSS inheritance.",
@@ -3054,6 +3100,7 @@
"",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3070,7 +3117,7 @@
},
{
"id": "bad87fee1348bd9aedf08746",
- "title": "Waypoint: Inherit Styles from the Body Element",
+ "title": "Inherit Styles from the Body Element",
"difficulty": 1.47,
"description": [
"Now we've proven that every HTML page has a body
element, and that its body
element can also be styled with CSS.",
@@ -3096,6 +3143,7 @@
"",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3112,7 +3160,7 @@
},
{
"id": "bad87fee1348bd9aedf08756",
- "title": "Waypoint: Prioritize One Style Over Another",
+ "title": "Prioritize One Style Over Another",
"difficulty": 1.48,
"description": [
"Sometimes your HTML elements will receive multiple styles that conflict with one another.",
@@ -3135,6 +3183,7 @@
"",
"Hello World! "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3151,7 +3200,7 @@
},
{
"id": "bad87fee1348bd9aedf04756",
- "title": "Waypoint: Override Styles in Subsequent CSS",
+ "title": "Override Styles in Subsequent CSS",
"difficulty": 1.49,
"description": [
"Our \"pink-text\" class overrode our body
element's CSS declaration!",
@@ -3177,6 +3226,7 @@
"",
"Hello World! "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3193,7 +3243,7 @@
},
{
"id": "bad87fee1348bd8aedf06756",
- "title": "Waypoint: Override Class Declarations by Styling ID Attributes",
+ "title": "Override Class Declarations by Styling ID Attributes",
"difficulty": 1.52,
"description": [
"We just proved that browsers read CSS from top to bottom. That means that, in the event of a conflict, the browser will use whichever CSS declaration came last.",
@@ -3225,6 +3275,7 @@
"",
"Hello World! "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3241,7 +3292,7 @@
},
{
"id": "bad87fee1348bd9aedf06756",
- "title": "Waypoint: Override Class Declarations with Inline Styles",
+ "title": "Override Class Declarations with Inline Styles",
"difficulty": 1.52,
"description": [
"So we've proven that id declarations override class declarations, regardless of where they are declared in your style
element CSS.",
@@ -3275,6 +3326,7 @@
"",
"Hello World! "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3291,7 +3343,7 @@
},
{
"id": "bad87fee1348bd9aedf07756",
- "title": "Waypoint: Override All Other Styles by using Important",
+ "title": "Override All Other Styles by using Important",
"difficulty": 1.53,
"description": [
"Yay! We just proved that in-line styles will override all the CSS declarations in your style
element.",
@@ -3328,6 +3380,7 @@
"",
"Hello World! "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3344,7 +3397,7 @@
},
{
"id": "bad87fee1348bd9aedf08726",
- "title": "Waypoint: Use Hex Code for Specific Colors",
+ "title": "Use Hex Code for Specific Colors",
"difficulty": 1.54,
"description": [
"Did you know there other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.",
@@ -3363,6 +3416,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3379,7 +3433,7 @@
},
{
"id": "bad87fee1348bd9aedf08725",
- "title": "Waypoint: Use Hex Code to Color Elements White",
+ "title": "Use Hex Code to Color Elements White",
"difficulty": 1.55,
"description": [
"0 is the lowest number in hex code, and represents a complete absence of color.",
@@ -3397,6 +3451,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3413,7 +3468,7 @@
},
{
"id": "bad87fee1348bd9aedf08724",
- "title": "Waypoint: Use Hex Code to Color Elements Red",
+ "title": "Use Hex Code to Color Elements Red",
"difficulty": 1.56,
"description": [
"You may be wondering why we use 6 digits to represent a color instead of just one or two. The answer is that using 6 digits gives us a huge variety.",
@@ -3433,6 +3488,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3449,7 +3505,7 @@
},
{
"id": "bad87fee1348bd9aedf08723",
- "title": "Waypoint: Use Hex Code to Color Elements Green",
+ "title": "Use Hex Code to Color Elements Green",
"difficulty": 1.57,
"description": [
"Remember that hex code follows the red-green-blue, or \"RGB\" format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.",
@@ -3467,6 +3523,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3483,7 +3540,7 @@
},
{
"id": "bad87fee1348bd9aedf08722",
- "title": "Waypoint: Use Hex Code to Color Elements Blue",
+ "title": "Use Hex Code to Color Elements Blue",
"difficulty": 1.58,
"description": [
"Hex code follows the red-green-blue, or \"RGB\" format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.",
@@ -3501,6 +3558,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3517,7 +3575,7 @@
},
{
"id": "bad87fee1348bd9aedf08721",
- "title": "Waypoint: Use Hex Code to Mix Colors",
+ "title": "Use Hex Code to Mix Colors",
"difficulty": 1.59,
"description": [
"From these three pure colors (red, green and blue), we can create 16 million other colors.",
@@ -3535,6 +3593,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3551,7 +3610,7 @@
},
{
"id": "bad87fee1348bd9aede08720",
- "title": "Waypoint: Use Hex Code to Color Elements Gray",
+ "title": "Use Hex Code to Color Elements Gray",
"difficulty": 1.60,
"description": [
"From these three pure colors (red, green and blue), we can create 16 million other colors.",
@@ -3569,6 +3628,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3585,7 +3645,7 @@
},
{
"id": "bad87fee1348bd9aedf08720",
- "title": "Waypoint: Use Hex Code for Specific Shades of Gray",
+ "title": "Use Hex Code for Specific Shades of Gray",
"difficulty": 1.61,
"description": [
"We can also create other shades of gray by evenly mixing all three colors. We can go very close to true black.",
@@ -3602,6 +3662,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3618,7 +3679,7 @@
},
{
"id": "bad87fee1348bd9aedf08719",
- "title": "Waypoint: Use Abbreviated Hex Code",
+ "title": "Use Abbreviated Hex Code",
"difficulty": 1.62,
"description": [
"Many people feel overwhelmed by the possibilities of more than 16 million colors. And it's difficult to remember hex code. Fortunately, you can shorten it.",
@@ -3637,6 +3698,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3653,7 +3715,7 @@
},
{
"id": "bad87fee1348bd9aede08718",
- "title": "Waypoint: Use RGB values to Color Elements",
+ "title": "Use RGB values to Color Elements",
"difficulty": 1.63,
"description": [
"Another way you can represent colors in CSS is by using RGB values.",
@@ -3673,6 +3735,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3689,7 +3752,7 @@
},
{
"id": "bad88fee1348bd9aedf08726",
- "title": "Waypoint: Use RGB to Color Elements White",
+ "title": "Use RGB to Color Elements White",
"difficulty": 1.64,
"description": [
"RGB values look like this: rgb(0, 0, 0)
for black and rgb(255, 255, 255) for white.",
@@ -3707,6 +3770,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3723,7 +3787,7 @@
},
{
"id": "bad89fee1348bd9aedf08724",
- "title": "Waypoint: Use RGB to Color Elements Red",
+ "title": "Use RGB to Color Elements Red",
"difficulty": 1.65,
"description": [
"Just like with hex code, you can represent different colors in RGB by using combinations of different values.",
@@ -3741,6 +3805,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3757,7 +3822,7 @@
},
{
"id": "bad80fee1348bd9aedf08723",
- "title": "Waypoint: Use RGB to Color Elements Green",
+ "title": "Use RGB to Color Elements Green",
"difficulty": 1.66,
"description": [
"Now change the body
element's background color to the RGB value green: rgb(0, 255, 0)
"
@@ -3773,6 +3838,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3789,7 +3855,7 @@
},
{
"id": "bad81fee1348bd9aedf08722",
- "title": "Waypoint: Use RGB to Color Elements Blue",
+ "title": "Use RGB to Color Elements Blue",
"difficulty": 1.67,
"description": [
"Change the body
element's background color to the RGB value blue: rgb(0, 0, 255)
"
@@ -3805,6 +3871,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3821,7 +3888,7 @@
},
{
"id": "bad82fee1348bd9aedf08721",
- "title": "Waypoint: Use RGB to Mix Colors",
+ "title": "Use RGB to Mix Colors",
"difficulty": 1.68,
"description": [
"Just like with hex code, you can mix colors in RGB by using combinations of different values.",
@@ -3838,6 +3905,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@@ -3854,7 +3922,7 @@
},
{
"id": "bad83fee1348bd9aede08720",
- "title": "Waypoint: Use RGB to Color Elements Gray",
+ "title": "Use RGB to Color Elements Gray",
"difficulty": 1.69,
"description": [
"With RGB values, we can make an element gray by using combinations of the same value for all three colors.",
@@ -3871,6 +3939,7 @@
" }",
""
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index b9e9882189..a85f6367e6 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "a3566b1109230028080c9345",
- "title": "Bonfire: Sum All Numbers in a Range",
+ "title": "Sum All Numbers in a Range",
"difficulty": "2.00",
"description": [
"We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.",
@@ -30,6 +30,7 @@
"Math.min()",
"Array.reduce()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -44,7 +45,7 @@
},
{
"id": "a5de63ebea8dbee56860f4f2",
- "title": "Bonfire: Diff Two Arrays",
+ "title": "Diff Two Arrays",
"difficulty": "2.01",
"description": [
"Compare two arrays and return a new array with any items not found in both of the original arrays.",
@@ -75,6 +76,7 @@
"Array.indexOf()",
"String.concat()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -89,7 +91,7 @@
},
{
"id": "a7f4d8f2483413a6ce226cac",
- "title": "Bonfire: Roman Numeral Converter",
+ "title": "Roman Numeral Converter",
"tests": [
"expect(convert(12)).to.equal(\"XII\");",
"expect(convert(5)).to.equal(\"V\");",
@@ -115,6 +117,7 @@
"Array.indexOf()",
"Array.join()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -129,7 +132,7 @@
},
{
"id": "a0b5010f579e69b815e7c5d6",
- "title": "Bonfire: Search and Replace",
+ "title": "Search and Replace",
"tests": [
"expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");",
"expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");",
@@ -158,6 +161,7 @@
"String.replace()",
"Array.join()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -172,7 +176,7 @@
},
{
"id": "aa7697ea2477d1316795783b",
- "title": "Bonfire: Pig Latin",
+ "title": "Pig Latin",
"tests": [
"expect(translate(\"california\")).to.equal(\"aliforniacay\");",
"expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
@@ -201,6 +205,7 @@
"String.substr()",
"String.split()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -215,7 +220,7 @@
},
{
"id": "afd15382cdfb22c9efe8b7de",
- "title": "Bonfire: DNA Pairing",
+ "title": "DNA Pairing",
"tests": [
"assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');",
"assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');",
@@ -239,6 +244,7 @@
"Array.push()",
"String.split()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -253,7 +259,7 @@
},
{
"id": "af7588ade1100bde429baf20",
- "title": "Bonfire: Missing letters",
+ "title": "Missing letters",
"difficulty": "2.05",
"description": [
"Find the missing letter in the passed letter range and return it.",
@@ -277,6 +283,7 @@
"String.charCodeAt()",
"String.fromCharCode()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -291,7 +298,7 @@
},
{
"id": "a77dbc43c33f39daa4429b4f",
- "title": "Bonfire: Boo who",
+ "title": "Boo who",
"difficulty": "2.06",
"description": [
"Check if a value is classified as a boolean primitive. Return true or false.",
@@ -319,6 +326,7 @@
"MDNlinks": [
"Boolean Objects"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -333,7 +341,7 @@
},
{
"id": "a105e963526e7de52b219be9",
- "title": "Bonfire: Sorted Union",
+ "title": "Sorted Union",
"difficulty": "2.07",
"description": [
"Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.",
@@ -359,6 +367,7 @@
"Arguments object",
"Array.reduce()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -373,7 +382,7 @@
},
{
"id": "a6b0bb188d873cb2c8729495",
- "title": "Bonfire: Convert HTML Entities",
+ "title": "Convert HTML Entities",
"difficulty": "2.07",
"description": [
"Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.",
@@ -400,6 +409,7 @@
"RegExp",
"HTML Entities"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -414,7 +424,7 @@
},
{
"id": "a103376db3ba46b2d50db289",
- "title": "Bonfire: Spinal Tap Case",
+ "title": "Spinal Tap Case",
"difficulty": "2.08",
"description": [
"Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.",
@@ -439,6 +449,7 @@
"RegExp",
"String.replace()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -453,7 +464,7 @@
},
{
"id": "a5229172f011153519423690",
- "title": "Bonfire: Sum All Odd Fibonacci Numbers",
+ "title": "Sum All Odd Fibonacci Numbers",
"difficulty": "2.09",
"description": [
"Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.",
@@ -479,6 +490,7 @@
"MDNlinks": [
"Remainder"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -493,7 +505,7 @@
},
{
"id": "a3bfc1673c0526e06d3ac698",
- "title": "Bonfire: Sum All Primes",
+ "title": "Sum All Primes",
"difficulty": "2.10",
"description": [
"Sum all the prime numbers up to and including the provided number.",
@@ -517,6 +529,7 @@
"For Loops",
"Array.push()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -531,7 +544,7 @@
},
{
"id": "ae9defd7acaf69703ab432ea",
- "title": "Bonfire: Smallest Common Multiple",
+ "title": "Smallest Common Multiple",
"difficulty": "2.11",
"description": [
"Find the smallest number that is evenly divisible by all numbers in the provided range.",
@@ -555,6 +568,7 @@
"MDNlinks": [
"Smallest Common Multiple"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -569,7 +583,7 @@
},
{
"id": "a6e40f1041b06c996f7b2406",
- "title": "Bonfire: Finders Keepers",
+ "title": "Finders Keepers",
"difficulty": "2.12",
"description": [
"Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).",
@@ -590,6 +604,7 @@
"MDNlinks": [
"Array.some()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -604,7 +619,7 @@
},
{
"id": "a5deed1811a43193f9f1c841",
- "title": "Bonfire: Drop it",
+ "title": "Drop it",
"difficulty": "2.13",
"description": [
"Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.",
@@ -627,6 +642,7 @@
"Arguments object",
"Array.shift()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -641,7 +657,7 @@
},
{
"id": "ab306dbdcc907c7ddfc30830",
- "title": "Bonfire: Steamroller",
+ "title": "Steamroller",
"difficulty": "2.14",
"description": [
"Flatten a nested array. You must account for varying levels of nesting.",
@@ -664,6 +680,7 @@
"MDNlinks": [
"Array.isArray()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -678,7 +695,7 @@
},
{
"id": "a8d97bd4c764e91f9d2bda01",
- "title": "Bonfire: Binary Agents",
+ "title": "Binary Agents",
"difficulty": "2.15",
"description": [
"Return an English translated sentence of the passed binary string.",
@@ -700,6 +717,7 @@
"String.charCodeAt()",
"String.fromCharCode()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -714,7 +732,7 @@
},
{
"id": "a10d2431ad0c6a099a4b8b52",
- "title": "Bonfire: Everything Be True",
+ "title": "Everything Be True",
"difficulty": "2.21",
"description": [
"Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).",
@@ -739,6 +757,7 @@
"Object.hasOwnProperty()",
"Object.getOwnPropertyNames()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -753,7 +772,7 @@
},
{
"id": "a97fd23d9b809dac9921074f",
- "title": "Bonfire: Arguments Optional",
+ "title": "Arguments Optional",
"difficulty": "2.22",
"description": [
"Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.",
@@ -779,6 +798,7 @@
"Global Function Object",
"Arguments object"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json
index ff900aa54d..2a2d5af952 100644
--- a/seed/challenges/intermediate-ziplines.json
+++ b/seed/challenges/intermediate-ziplines.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7158d8c442eddfaeb5bd18",
- "title": "Zipline: Stylize Stories on Camper News",
+ "title": "Stylize Stories on Camper News",
"difficulty": 1.02,
"challengeSeed": ["126415129"],
"description": [
@@ -22,6 +22,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -37,7 +38,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd19",
- "title": "Zipline: Wikipedia Viewer",
+ "title": "Wikipedia Viewer",
"difficulty": 1.03,
"challengeSeed": ["126415131"],
"description": [
@@ -54,6 +55,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -69,7 +71,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd17",
- "title": "Zipline: Build a JavaScript Calculator",
+ "title": "Build a JavaScript Calculator",
"difficulty": 1.05,
"challengeSeed": ["126411565"],
"description": [
@@ -85,6 +87,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -100,7 +103,7 @@
},
{
"id": "bd7158d8c442eedfaeb5bd1c",
- "title": "Zipline: Build a Tic Tac Toe Game",
+ "title": "Build a Tic Tac Toe Game",
"difficulty": 1.06,
"challengeSeed": ["126415123"],
"description": [
@@ -117,6 +120,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@@ -132,7 +136,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd1c",
- "title": "Zipline: Build a Simon Game",
+ "title": "Build a Simon Game",
"difficulty": 1.07,
"challengeSeed": ["126415123"],
"description": [
@@ -155,6 +159,7 @@
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.Click here then add your link to your tweet's text "
],
+ "type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index a5db78c6cb..fa3f8641a9 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -1,10 +1,10 @@
{
- "name": "jQuery",
+ "name": "jQuery",
"order": 0.004,
"challenges": [
{
"id": "bad87fee1348bd9acdd08826",
- "title": "Waypoint: Learn how Script Tags and Document Ready Work",
+ "title": "Learn how Script Tags and Document Ready Work",
"difficulty": 3.01,
"description": [
"Now we're ready to learn jQuery, the most popular JavaScript tool of all time. Don't worry about JavaScript itself - we will cover it soon.",
@@ -42,11 +42,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9bedc08826",
- "title": "Waypoint: Target HTML Elements with Selectors Using jQuery",
+ "title": "Target HTML Elements with Selectors Using jQuery",
"difficulty": 3.02,
"description": [
"Now we have a \"document ready function\". We'll learn more about functions later. The important thing to know is that code you put inside this function will run as soon as your browser has loaded your page.",
@@ -90,11 +91,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aedc08826",
- "title": "Waypoint: Target Elements by Class Using jQuery",
+ "title": "Target Elements by Class Using jQuery",
"difficulty": 3.03,
"description": [
"You see how we made all of your button
elements bounce? We selected them with $('button')
, then we added some CSS classes to them with .addClass('animated bounce');
.",
@@ -139,11 +141,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aeda08826",
- "title": "Waypoint: Target Elements by ID Using jQuery",
+ "title": "Target Elements by ID Using jQuery",
"difficulty": 3.04,
"description": [
"You can also target elements by their id attributes.",
@@ -189,11 +192,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aeda08726",
- "title": "Waypoint: Delete your jQuery Functions",
+ "title": "Delete your jQuery Functions",
"difficulty": 3.05,
"description": [
"These animations were cool at first, but now they're getting kind of distracting.",
@@ -240,11 +244,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed908626",
- "title": "Waypoint: Target the same element with multiple jQuery Selectors",
+ "title": "Target the same element with multiple jQuery Selectors",
"difficulty": 3.06,
"description": [
"Now you know three ways of targeting elements: by type $('button')
, by class $('.btn')
), and by id $('#target1')
).",
@@ -290,11 +295,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed918626",
- "title": "Waypoint: Remove Classes from an element with jQuery",
+ "title": "Remove Classes from an element with jQuery",
"difficulty": 3.07,
"description": [
"In the same way you can add classes to an element with jQuery's addClass()
function, you can remove them with jQuery's removeClass()
function.",
@@ -339,11 +345,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed908826",
- "title": "Waypoint: Change the CSS of an Element Using jQuery",
+ "title": "Change the CSS of an Element Using jQuery",
"difficulty": 3.08,
"description": [
"We can also change the CSS of an HTML element directly with jQuery.",
@@ -392,11 +399,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed808826",
- "title": "Waypoint: Disable an Element Using jQuery",
+ "title": "Disable an Element Using jQuery",
"difficulty": 3.09,
"description": [
"You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons.",
@@ -442,11 +450,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed708826",
- "title": "Waypoint: Remove an Element Using jQuery",
+ "title": "Remove an Element Using jQuery",
"difficulty": 3.10,
"description": [
"Now let's remove an HTML element from your page using jQuery.",
@@ -489,11 +498,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed608826",
- "title": "Waypoint: Use appendTo to Move Elements with jQuery",
+ "title": "Use appendTo to Move Elements with jQuery",
"difficulty": 3.11,
"description": [
"Now let's try moving elements from one div
to another.",
@@ -540,11 +550,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed508826",
- "title": "Waypoint: Clone an Element Using jQuery",
+ "title": "Clone an Element Using jQuery",
"difficulty": 3.12,
"description": [
"In addition to moving elements, you can also copy them from one place to another.",
@@ -593,11 +604,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed308826",
- "title": "Waypoint: Target the Parent of an Element Using jQuery",
+ "title": "Target the Parent of an Element Using jQuery",
"difficulty": 3.13,
"description": [
"Every HTML elements has a \"parent\" element from which it \"inherits\" properties.",
@@ -647,11 +659,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed208826",
- "title": "Waypoint: Target the Children of an Element Using jQuery",
+ "title": "Target the Children of an Element Using jQuery",
"difficulty": 3.14,
"description": [
"Many HTML elements has a \"children\" element from which they \"inherits\" properties.",
@@ -702,11 +715,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed108826",
- "title": "Waypoint: Target a Specific Child of an Element Using jQuery",
+ "title": "Target a Specific Child of an Element Using jQuery",
"difficulty": 3.15,
"description": [
"You've seen why id attributes are so convenient for targeting with jQuery selectors. But you won't always have such neat ids to work with.",
@@ -758,11 +772,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed008826",
- "title": "Waypoint: Target Even Numbered Elements Using jQuery",
+ "title": "Target Even Numbered Elements Using jQuery",
"difficulty": 3.16,
"description": [
"You can also target all the even-numbered elements.",
@@ -816,11 +831,12 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aecb08826",
- "title": "Waypoint: Use jQuery to Modify the Entire Page",
+ "title": "Use jQuery to Modify the Entire Page",
"difficulty": 3.20,
"description": [
"We're done playing with our jQuery playground. Let's tear it down!",
@@ -872,6 +888,7 @@
" ",
""
],
+ "type": "waypoint",
"challengeType": 0
}
]
diff --git a/seed/challenges/json-apis-and-ajax.json b/seed/challenges/json-apis-and-ajax.json
index cefd0f0e8c..8745e513de 100644
--- a/seed/challenges/json-apis-and-ajax.json
+++ b/seed/challenges/json-apis-and-ajax.json
@@ -1,5 +1,5 @@
{
- "name": "JSON APIs and Ajax - Coming Soon",
+ "name": "JSON APIs and Ajax - Coming Soon",
"order": 0.007,
"challenges": [
]
diff --git a/seed/challenges/mongodb.json b/seed/challenges/mongodb.json
index 75b24f29c7..1751c617d8 100644
--- a/seed/challenges/mongodb.json
+++ b/seed/challenges/mongodb.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7243d8c341eddeaeb5bd0f",
- "title": "Waypoint: Store Data in MongoDB",
+ "title": "Store Data in MongoDB",
"difficulty": 0.01,
"challengeSeed": ["133316035"],
"description": [
@@ -33,6 +33,7 @@
"Complete \"Aggregate\"",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/nodejs-and-expressjs.json b/seed/challenges/nodejs-and-expressjs.json
index 34d5401c86..ed6298910d 100644
--- a/seed/challenges/nodejs-and-expressjs.json
+++ b/seed/challenges/nodejs-and-expressjs.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7153d8c441eddfaeb5bd0f",
- "title": "Waypoint: Manage Packages with NPM",
+ "title": "Manage Packages with NPM",
"difficulty": 0.39,
"challengeSeed": ["126433450"],
"description": [
@@ -42,6 +42,7 @@
"Complete \"Finale\"",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -57,7 +58,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdff",
- "title": "Waypoint: Start a Node.js Server",
+ "title": "Start a Node.js Server",
"difficulty": 0.40,
"challengeSeed": ["126411561"],
"description": [
@@ -83,6 +84,7 @@
"Complete \"HTTP Client\"",
"Once you've completed these first 7 steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -98,7 +100,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdfe",
- "title": "Waypoint: Continue working with Node.js Servers",
+ "title": "Continue working with Node.js Servers",
"difficulty": 0.41,
"challengeSeed": ["128836506"],
"description": [
@@ -111,6 +113,7 @@
"Complete \"Time Server\"",
"Once you've completed these 3 steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -126,7 +129,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdfd",
- "title": "Waypoint: Finish working with Node.js Servers",
+ "title": "Finish working with Node.js Servers",
"difficulty": 0.42,
"challengeSeed": ["128836507"],
"description": [
@@ -139,6 +142,7 @@
"Complete \"HTTP JSON API Server\"",
"Once you've completed these final 3 steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -154,7 +158,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bd1f",
- "title": "Waypoint: Build Web Apps with Express.js",
+ "title": "Build Web Apps with Express.js",
"difficulty": 0.43,
"challengeSeed": [
"126411559"
@@ -181,6 +185,7 @@
"Complete \"JSON Me\"",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index 90042d6c03..3faeed26e1 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -4,7 +4,7 @@
"challenges": [
{
"id": "bd7153d8c44eeddfaeb5bd0f",
- "title": "Waypoint: Learn Scope Chains and Closures",
+ "title": "Learn Scope Chains and Closures",
"difficulty": 0.01,
"challengeSeed": ["133316031"],
"description": [
@@ -28,6 +28,7 @@
"Complete \"Garbage Collection\"",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -43,7 +44,7 @@
},
{
"id": "bd7153d8b44eeddfaeb5bd0f",
- "title": "Waypoint: Use Prototypes for Inheriting Properties",
+ "title": "Use Prototypes for Inheriting Properties",
"difficulty": 0.02,
"challengeSeed": ["133316036"],
"description": [
@@ -72,6 +73,7 @@
"Note that you can skip the last challenge.",
"Once you've completed these steps, move on to our next challenge."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@@ -87,7 +89,7 @@
},
{
"id": "bd7129d8c441eddfbeb5bddf",
- "title": "Waypoint: Practice Functional Programming",
+ "title": "Practice Functional Programming",
"difficulty": 0.01,
"challengeSeed": ["129169463"],
"description": [
@@ -99,6 +101,7 @@
"This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.",
"If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on."
],
+ "type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
From b1e34f8cc8554458200009fb2b2f2c82b05823f1 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Sat, 8 Aug 2015 07:50:35 -0700
Subject: [PATCH 139/548] create name/dashName at seed
---
seed/index.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/seed/index.js b/seed/index.js
index fdbdf1f959..5c5c2bd38a 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -2,13 +2,12 @@
require('babel/register');
require('dotenv').load();
var fs = require('fs'),
+ _ = require('lodash'),
path = require('path'),
app = require('../server/server'),
nonprofits = require('./nonprofits.json'),
jobs = require('./jobs.json');
-var challangesRegex = /^(bonfire:|waypoint:|zipline:|basejump:|hike:)/i;
-
function getFilesFor(dir) {
return fs.readdirSync(path.join(__dirname, '/' + dir));
}
@@ -38,12 +37,15 @@ Challenge.destroyAll(function(err, info) {
console.log('Deleted ', info);
}
challenges.forEach(function(file) {
- var challenges = require('./challenges/' + file).challenges
+ var challengeSpec = require('./challenges/' + file);
+ var challenges = challengeSpec.challenges
.map(function(challenge) {
// NOTE(berks): add title for displaying in views
- //challenge.title = challenge.name.replace(challangesRegex, '').trim();
- challenge.name = challenge.title.replace(/[^a-zA-Z0-9 ]/g, ''); // Remove non-alphanumwhitespace chars
- challenge.dashedName = challenge.name.replace(/\s/g, '-'); // Replace with dasherize();
+ challenge.name =
+ _.capitalize(challenge.type) +
+ ': ' +
+ challenge.title.replace(/[^a-zA-Z0-9\s]/g, '');
+ challenge.dashedName = challenge.name.toLowerCase().replace(/\s/g, '-');
return challenge;
});
From 0f81e8465a786bfb7f839d3a2fab210a46667b1e Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Sat, 8 Aug 2015 17:11:11 +0100
Subject: [PATCH 140/548] Update to include OOP & functional programming course
layout
---
...t-oriented-and-functional-programming.json | 200 +++++++++++++++++-
1 file changed, 198 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index d3a16ccfdf..dd00934296 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,6 +1,6 @@
{
- "name": "Object Oriented and Functional Programming",
- "order" : 0.010,
+ "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards",
+ "order" : 0.009,
"challenges": [
{
"id": "bd7153d8c44eeddfaeb5bd0f",
@@ -114,6 +114,202 @@
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
+ },
+ {
+ "id":"cf1111c1c14feddfaeb4bdef",
+ "name":"Creating Classes",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb4bdef",
+ "name":"Static Properties",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb5bdef",
+ "name":"Dynamic Properties",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb6bdef",
+ "name":"Instantiation",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb7bdef",
+ "name":"Closures",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb8bdef",
+ "name":"Public Properties",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c13feddfaeb9bdef",
+ "name":"Inheritance",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb1bdef",
+ "name":"Prototypical Inheritance",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb2bdef",
+ "name":"Constructors",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb3bdef",
+ "name":"Factories",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb5bdef",
+ "name":"Pure Functions",
+ "Note":"May need a waypoint before each topic to announce what it is :p",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb6bdef",
+ "name":"Currying Functions",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb7bdef",
+ "name":"Composition",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb8bdef",
+ "name":"Functors",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
+ },
+ {
+ "id":"cf1111c1c14feddfaeb9bdef",
+ "name":"Currying Functions",
+ "dashedName":"#",
+ "difficulty":0,
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":0
}
]
}
From f22672e6c18fb267cf0ab4314d614a46c87d09c1 Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Sat, 8 Aug 2015 17:21:13 +0100
Subject: [PATCH 141/548] Removed new incomplete JS Challenges and moved to
OOPF branch.
---
...t-oriented-and-functional-programming.json | 196 ------------------
1 file changed, 196 deletions(-)
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index dd00934296..93c85cb4ee 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -114,202 +114,6 @@
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
- },
- {
- "id":"cf1111c1c14feddfaeb4bdef",
- "name":"Creating Classes",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb4bdef",
- "name":"Static Properties",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb5bdef",
- "name":"Dynamic Properties",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb6bdef",
- "name":"Instantiation",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb7bdef",
- "name":"Closures",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb8bdef",
- "name":"Public Properties",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c13feddfaeb9bdef",
- "name":"Inheritance",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb1bdef",
- "name":"Prototypical Inheritance",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb2bdef",
- "name":"Constructors",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb3bdef",
- "name":"Factories",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb5bdef",
- "name":"Pure Functions",
- "Note":"May need a waypoint before each topic to announce what it is :p",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb6bdef",
- "name":"Currying Functions",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb7bdef",
- "name":"Composition",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb8bdef",
- "name":"Functors",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
- },
- {
- "id":"cf1111c1c14feddfaeb9bdef",
- "name":"Currying Functions",
- "dashedName":"#",
- "difficulty":0,
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":0
}
]
}
From 5fb1df0d55449ffe5e982376d881ee8e118a3b1a Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 8 Aug 2015 16:13:23 -0700
Subject: [PATCH 142/548] start onboarding page
---
public/css/main.less | 8 +
.../get-set-for-free-code-camp.json | 427 ------------------
...t-oriented-and-functional-programming.json | 2 +-
server/boot/randomAPIs.js | 7 +
server/views/challengeMap/show.jade | 3 -
server/views/home.jade | 5 +-
server/views/resources/get-started.jade | 154 +++++++
7 files changed, 171 insertions(+), 435 deletions(-)
delete mode 100644 seed/challenges/get-set-for-free-code-camp.json
create mode 100644 server/views/resources/get-started.jade
diff --git a/public/css/main.less b/public/css/main.less
index c828412661..d03c73fc78 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -617,6 +617,14 @@ thead {
border-radius: 5px;
}
+.gif-block {
+ margin-top: 30px;
+ margin-bottom: 10px;
+}
+
+.gif-caption {
+ font-size: 18px;
+}
.testimonial-copy {
font-size: 20px;
diff --git a/seed/challenges/get-set-for-free-code-camp.json b/seed/challenges/get-set-for-free-code-camp.json
deleted file mode 100644
index ae22da999b..0000000000
--- a/seed/challenges/get-set-for-free-code-camp.json
+++ /dev/null
@@ -1,427 +0,0 @@
-{
- "name": "Get Set for Free Code Camp",
- "order": 0.001,
- "challenges": [
- {
- "id": "bd7124d8c441eddfaeb5bdef",
- "name": "Waypoint: Learn how Free Code Camp Works",
- "dashedName": "waypoint-learn-how-free-code-camp-works",
- "difficulty": 0.01,
- "challengeSeed": ["125407438"],
- "description": [
- "Watch this 1-minute video, or simply read this summary:",
- "Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.",
- "Learning to code is hard. It takes a lot of practice.",
- "So we've focused on making Free Code Camp as convenient and accessible as possible.",
- "Free Code Camp is self-paced, browser-based, and free.",
- "During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.",
- "During the last 800 hours, you'll build several real-life projects for nonprofits.",
- "By the time you finish, you'll be a job-ready coder who has a portfolio of apps with happy users to prove it.",
- "We'll even help you meet other coders in your city and find a coding job.",
- "We'll provide you with the most rigorous curriculum and the most supportive community on earth. All you need to do sit down, day after day, and put in the hard work.",
- "Now it's time to join our chat room. Click the \"I've completed this challenge\" button to move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Aprende sobre como funciona Free Code Camp",
- "descriptionEs": [
- "Mira el video de 1 minuto o simplemente lee este resumen:",
- "Bienvenido a Free Code Camp. Somos una comunidad de personas ocupadas tratando de aprender a programar construyendo proyectos para empresas sin fines de lucro.",
- "Hemos construido esta comunidad porque aprender a programar es dificil; pero cualquiera que se pueda mantener motivado puede aprender a programar. Para mantenerte motivado, solo necesitas: hacerte amigo o amiga de personas que sepan programar programar un poco cada día ",
- "Todos nuestros desafíos son gratuitos manejados a tu propio ritmo basados en tu navegador ",
- "Estaremos trabajando 200 horas aprendiendo a utilizar herramientas como HTML, CSS, JavaScript, Node.js y bases de datos 600 horas construyendo proyectos prácticos 800 horas construyendo soluciones full stack para empresas sin fines de lucro ",
- "Al finalizar seremos buenos en programación tendremos un portafolio con apps con usuarios contentos que puedan abogar por nuestro trabajo ",
- "Una vez que completes el Free Code Camp, serás capaz de obtener un trabajo como desarrollador. Hay muchas posiciones de trabajo que están en búsqueda de programadores calificados.",
- "Ahora es el momento de ingresar a nuestra sala de chat. Dale click al botón de \"I've completed this challenge\" para continuar con el siguiente desafío."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Lerne wie Free Code Camp funktioniert",
- "descriptionDe": [
- "Sieh dir das kurze Video an oder lies einfach diese Übersicht:",
- "Willkommen im Free Code Camp. Wir sind eine Community aus eifrigen Personen, die Programmieren lernen, indem sie Projekte für gemeinnützige Organisationen umsetzen.",
- "Programmieren zu lernen ist hart, weshalb wir diese Community ins Leben gerufen haben. Jeder, der motiviert bleiben kann, ist auch in der Lage Programmieren zu lernen. Und um motiviert zu bleiben, musst du nur: Freunde finden, die programmieren jeden Tag ein wenig programmieren ",
- "All unsere Challenges sind kostenlos selbstbestimmt Browser-basiert ",
- "Wir werden 200 Stunden mit Werkzeugen wie HTML, CSS, JavaScript, Node.js und Datenbanken arbeiten 600 Stunden Projekte umsetzen 800 Stunden komplette Lösungen für gemeinnützige Organisationen erstellen ",
- "Am Ende werden wir gut im Programmieren sein ein Portfolio aus Anwendungen mit zufriedenen Nutzern vorweisen können ",
- "Wenn du das Free Code Camp abgeschlossen hast, wirst du in der Lage sein einen Job in der Branche zu bekommen. Es gibt sehr viel mehr offene Stellen als fähige Programmierer, um sie zu besetzen.",
- "Jetzt wird es Zeit unserem Chat beizutreten. Klicke auf \"I've completed this challenge\" um zur nächsten Challenge fortzufahren."
- ]
- },
- {
- "id": "bd7125d8c441eddfaeb5bd0f",
- "name": "Waypoint: Join Our Chat Room",
- "dashedName": "waypoint-join-our-chat-room",
- "difficulty": 0.02,
- "challengeSeed": ["131574135"],
- "description": [
- "Now we're going to join the Free Code Camp chat room. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.",
- "Create an account with GitHub here: https://github.com/join .",
- "Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your personal website if you have one.",
- "Go to Free Code Camp's open-source repository: https://github.com/freecodecamp/freecodecamp .",
- "You can \"star\" this repository by clicking the star button in the upper right hand corner.",
- "Later, you'll be able to fork this repository if you'd like to contribute to our open source codebase.",
- "Join our main chat room: https://gitter.im/FreeCodeCamp/FreeCodeCamp .",
- "Once you're in our chat room, introduce yourself by saying : \"Hello world!\".",
- "Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.",
- "We have a busy chat room, so be sure to configure your notification settings in the top right corner.",
- "Please note that all of our chat rooms are visible to the public, so if you need to share sensative information like an email address or phone number, do it in a private message.",
- "Also Join our help chat room: https://gitter.im/FreeCodeCamp/help , where you can get help with our challenges in real time.",
- "Keep our chat room open while you work through our other challenges. That way, you ask for help if you get stuck on a challenge. You can also socialize when you feel like taking a break.",
- "You can also download a desktop or mobile chat application here: https://gitter.im/apps ",
- "You can also access this chat room by clicking the \"Chat\" button in the upper right hand corner.",
- "In order to keep our community a friendly and positive place to learn to code, please read and follow our Code of Conduct: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct ",
- "Now you're ready to move on. Click the \"I've completed this challenge\" button to move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Únete a Nuestra Sala de Chat",
- "descriptionEs": [
- "Ahora vamos a unirnos a la sala de chat de Free Code Camp. Puedes ingresar en cualquier momento para pasar el rato, hacer preguntas o para encontrar algún otro camper para programar en pares.",
- "Asegurate de que tu cuenta de Free Code Camp incluya tu dirección de correo electrónico. Vale recalcar que si bien tu dirección de correo electrónico será invisible para el público, Slack lo hará visible para otros campers en las salas de chat. Puedes ingresar por aquí: http://freecodecamp.com/account .",
- "Dale click a este link, el cual te enviará una invitación a las salas de chat de Free Code Camp: http://freecodecamp.com/api/slack .",
- "Ahora revisa tu buzón de correo y dale click al link del correo electrónico que has recibido de Slack.",
- "Completa el proceso de registro, actualiza tu información biográfica y sube una imagen. Una foto de tu cara funciona mejor. Esta es la manera como las personas te verán en las salas de chat, asegurate de mostrar tu mejor sonrisa.",
- "Ahora ingresa al chat #General (Inglés) o #Espanol (Español) e introdúcete escribiendo: \"Hola mundo!\".",
- "Comentale a otros campers como es que encontraste Free Code Camp. También hablanos sobre las razones por las cuales decidiste aprender a programar.",
- "Mantén la sala de chat abierta mientras estás trabajando otros desafíos. De esa manera podrás pedir ayuda en caso te quedes atascado en algún de ellos. También puedes socializar cuando sientas que necesitas un descanso.",
- "Puedes acceder a la sala de chat dándole click al botón de \"Chat\" en la parte superior derecha de la página.",
- "Para mantener a nuestra comunidad como un lugar de aprendizaje positivo y amigable, por favor lee y sigue nuestro Código de Conducta: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct "
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Trete unserem Chat-Raum bei",
- "descriptionDe": [
- "Nun werden wir dem Chat-Raum von Free Code Camp beitreten. Du kannst jederzeit vorbei kommen um abzuhängen, Fragen zu stellen oder andere Camper für Paarprogrammierung zu finden.",
- "Stelle sicher, dass deine Email Adresse in deinem Free Code Camp Account hinterlegt ist. Bitte beachte, dass deine Email Adresse für die Öffentlichkeit nicht einsehbar ist, aber für andere Camper in Slack wird sie sichtbar sein. Du kannst sie hier eintragen: http://freecodecamp.com/account .",
- "Klicke auf diesen Link, um von Slack eine Einladung zu den Chat-Räumen von Free Code Camp zu erhalten: http://freecodecamp.com/api/slack .",
- "Kontrolliere jetzt dein Email Postfach und klicke in der Email von Slack auf den Link.",
- "Beende die Registrierung und vervollständige dein Profil. Vergiss nicht, dein Profil-Bild hochzuladen. Ein Bild von deinem Gesicht ist am besten. So werden dich andere Personen im Chat sehen, also zeige dich von deiner Schokoladenseite.",
- "Jetzt betrete den General Chat-Raum und stelle dich den anderen vor, indem du folgendes schreibst: \"Hello world!\".",
- "Teile den anderen Campern mit, wie du auf Free Code Camp gestoßen bist. Wir interessieren uns auch dafür, warum du Programmieren lernen willst – aber auf englisch bitte, sonst versteht dich kaum einer.",
- "Behalte den Chat geöffnet, während du an den Challenges arbeitest. Auf diesem Weg kannst du schnell nach Hilfe fragen, wenn du nicht weiter kommst. Du kannst auch jederzeit mit uns chatten, wenn du eine Pause einlegen möchtest.",
- "Du kannst den Chat auch über die Schaltfläche \"Chat\" oben rechts auf dieser Seite erreichen.",
- "Damit diese Community ein freundlicher und positiver Ort zum Lernen bleibt, lies und folge bitte unseren Verhaltensregeln: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct "
- ]
- },
- {
- "id": "bd7125d8c441eddfaeb5bdff",
- "name": "Waypoint: Preview our Challenge Map",
- "dashedName": "waypoint-preview-our-challenge-map",
- "difficulty": 0.03,
- "challengeSeed": ["125407437"],
- "description": [
- "Before you start learning how to code, we'd like to introduce you to a few things.",
- "Let's look at our Challenge Map. Click on the \"Map\" button in the upper right hand corner. This map shows all the challenges that will teach you how to code.",
- "You should complete all of these challenges in order.",
- "In addition to our Waypoint challenges, like the one you're doing now, we have algorithm practice challenges (Bonfires), front end development challenges (Ziplines) and full stack development challenges (Basejumps). After you finish all of these, you'll start building projects for nonprofits.",
- "Please note that our open-source curriculum is a work in progress. Our volunteer community is constantly improving it. If you think you've encountered a bug, typo, or something that seems confusing, be sure to click the \"bug\" button to create a GitHub issue."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Revisa nuestro Mapa de Desafíos",
- "descriptionEs": [
- "Antes de comenzar a aprender a programar, nos gustaría mostrarte algunas cosas.",
- "Revisemos el Mapa de Desafíos. Dale click al botón de \"Map\" en la parte superior derecha. Este mapa muestra todos los desafíos que te enseñarán a programar.",
- "Deberías completar todos estos desafíos en orden.",
- "Una vez que termines con los Waypoints, seguiremos con los Bonfires (práctica de algoritmos), luego Ziplines (práctica de desarrollo front end) y para terminar los Basejumps (práctica de desarrollo full stack). Después de eso, empezarás a desarrollar proyectos para empresas sin fines de lúcro.",
- "El mapa de desafíos es solamente de referencia. Puedes también presionar el botón de \"Learn\", el cual te llevará directamente al siguiente desafío.",
- "Para terminar, ten en cuenta que nuestra currícula open-source es un trabajo en progreso. Nuestra comunidad de voluntarios está mejorandola constantemente. Si crees que te has topado con algún bug, error ortográfico o algo que parezca confuso, haznos el favor de abrir un ticket a través de Github: https://github.com/FreeCodeCamp/freecodecamp/issues ."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Besuche die Challenge Map",
- "descriptionDe": [
- "Bevor du startest, wollen wir dir ein paar Dinge zeigen.",
- "Betrachte die Challenge Map. Klicke auf \"Map\" oben rechts auf dieser Seite. Diese Übersicht zeigt dir alle Challenges.",
- "Du solltest alle Challenges in der gezeigten Reihenfolge abschließen.",
- "Hast du alle Waypoint-Challenges beendet, folgen die Bonfires (Algorithmen), darauf Ziplines (Frontend Development) und zum Schluss Basejumps (Full Stack Development). Danach wirst du anfangen, Projekte für gemeinnützige Organisationen umzusetzen.",
- "Diese Challenge Map dient dir als Orientierung. Du kannst einfach auf \"Learn\" klicken und direkt zur nächsten Challenge fortfahren.",
- "Bitte beachte, dass unser Open Source Lehrplan nicht fertig ist. Unsere freiwillige Community verbessert diesen stetig. Wenn du einen Bug, Rechtschreib-Fehler oder etwas gefunden hast, das dir komisch vorkommt, öffne bitte ein GitHub Issue: https://github.com/FreeCodeCamp/freecodecamp/issues . Wie gehabt bitte in englischer Sprache."
- ]
- },
- {
- "id": "bd7125d8c441eddfaeb5bd1f",
- "name": "Waypoint: Browse our Wiki",
- "dashedName": "waypoint-browse-our-wiki",
- "difficulty": 0.04,
- "challengeSeed": ["125407435"],
- "description": [
- "Free Code Camp has an up-to-date wiki that will answer your many questions.",
- "Click the \"Wiki\" button in the upper right hand corner.",
- "You can browse our wiki at your convenience. Most of its articles take less than 1 minute to read.",
- "All of our Wiki articles are contributed by our community. You can update our wiki articles, and even create wiki articles of your own.",
- "Now you can move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Revisa nuestro Field Guide",
- "descriptionEs": [
- "Free Code Camp tiene un field guide actualizado que respondera tus preguntas.",
- "Dale click al botón \"Field Guide\" en la parte superior derecha.",
- "Puedes navegar el Field Guide cuando veas conveniente. La mayoría de los artículos los puedes leer en menos de 1 minuto .",
- "Cuando le des click al botón de Field Guide, siempre te regresará al último artículo que estuviste leyendo.",
- "Lee algunos de nuestros artículos, luego continúa con tu siguiente desafío."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Stöbere in unserem Field Guide",
- "descriptionDe": [
- "Free Code Camp hat einen aktuellen Field Guide, welcher viele deiner Fragen beantworten wird.",
- "Klicke oben rechts auf \"Field Guide\".",
- "Du kannst im Field Guide nach Lust und Laune stöbern. Die meisten der Artikel sind in weniger als einer Minute gelesen.",
- "Wenn du auf den besagten Field Guide in der Navigation klickst, wirst du direkt zu dem Artikel geleitet, den du als letztes gelesen hast.",
- "Lies ein paar der Artikel, dann schreite zu deiner nächsten Challenge voran."
- ]
- },
- {
- "id": "bd7125d8c441eddfaeb5bd2f",
- "name": "Waypoint: Customize your Portfolio Page",
- "dashedName": "waypoint-customize-your-portfolio-page",
- "difficulty": 0.05,
- "challengeSeed": ["125407433"],
- "description": [
- "You and all your fellow campers have portfolio pages.",
- "Click your picture in the upper right hand corner to go to your account page.",
- "Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.",
- "You can also fill out a short biography, and add links to your social media profiles.",
- "Your portfolio page shows how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms.",
- "Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get streak.",
- "Once you're happy with your portfolio page, you can move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Personaliza tu página de Portafolio",
- "descriptionEs": [
- "Tú y tus otros amigos campers tienen sus propias páginas de portafolio.",
- "Para visualizar tu página de portafolio, dale click a tu foto en la parte superior derecha.",
- "Tu página de portafolio mostrará automaticamente tu progreso en Free Code Camp",
- "Dale click al botón de \"Update my portfolio page or manage my account\"",
- "Puedes enlazarte con tus cuentas de Github, Twitter y LinkedIn. Si ya has creado alguna página web, puedes enlazarla aquí también.",
- "Asegurate de darle click al botón de \"Update my Bio\" o \"Update my Social Links\" para agregar esta nueva información a tu portafolio.",
- "Una vez que estés satisfecho con tu página de portafolio, puedes seguir con el siguiente desafío."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Personalisiere deine Portfolio-Seite",
- "descriptionDe": [
- "Du und die anderen Camper habt Portfolio-Seiten.",
- "Um zu deinem Portfolio zu gelangen, klicke oben rechts auf dein Bild.",
- "Dein Portfolio wird deinen Fortschritt im Free Code Camp automatisch anzeigen.",
- "Klicke auf \"Update my portfolio page or manage my account\"",
- "Du kannst deine GitHub, Twitter und LinkedIn Accounts verlinken. Wenn du bereits ein paar Websites gebaut hast, kannst du sie ebenfalls präsentieren.",
- "Stelle sicher, dass du auf \"Update my Bio\" oder \"Update my Social Links\" klickst, um diese neuen Informationen zu speichern.",
- "Sobald du zufrieden mit deinem Portfolio bist, kannst du zur nächsten Challenge fortfahren."
- ]
- },
- {
- "id": "bd7126d8c441eddfaeb5bd3f",
- "name": "Waypoint: Try Camper News",
- "dashedName": "waypoint-try-camper-news",
- "difficulty": 0.06,
- "challengeSeed": ["124553410"],
- "description": [
- "Camper News is the best place for our campers to share and discuss helpful links.",
- "Click \"News\" in the upper right hand corner.",
- "You'll see a variety of links that have been submitted. Their rank is determined by how recently they were submitted and how many upvotes they have.",
- "If you enjoy a link, you should upvote it.",
- "You can also submit links that you think will be interesting to other campers.",
- "You can view the portfolio pages of any camper who has posted links on Camper News. Just click on their photo.",
- "When you submit a link, you'll get a Brownie Point. You'll also get a Brownie Point each time someone upvotes your link.",
- "Now that you've learned how to use Camper News, let's move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Prueba las Noticias de Campers",
- "descriptionEs": [
- "Noticias de Campers es el mejor lugar para que nuestros campers puedan discutir y compartir links útiles.",
- "Dale click a \"News\" en la parte superior derecha.",
- "Verás una gran variedad de links que han sido enviados. Dale click al botón de \"Discuss\" debajo de uno de ellos.",
- "Puedes votar por links que te gusten. Esto hará que el ranking de tu link suba.",
- "Puedes también dejar un comentario a un link. Si alguien responde a tu comentario recibirás un correo electrónico de notificación para que puedas regresar y responderlo.",
- "También puedes enviar tus propios links. Puedes escoger el título del link, asi como también dejar un comentario inicial sobre él.",
- "Puedes ver las páginas de portafolio de cualquier camper que ha enviado links o comentarios en las Noticias de Campers. Solo tienes que darle click a su fotografía.",
- "Cuando envies un link, recibirás un punto. También obtendrás un punto cada vez que otra persona vote por tu link.",
- "Ahora que has aprendido a utilizar las Noticias de Campers, continuaremos con el siguiente desafío."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Verpasse nicht die Camper News",
- "descriptionDe": [
- "Camper News ist der beste Ort für unsere Camper, nützliche Links zu teilen und zu diskutieren.",
- "Klicke oben rechts auf \"News\".",
- "Du wirst eine Vielzahl an Links sehen, die bereits geteilt wurden. Klicke auf \"Discuss\" unter einem von ihnen.",
- "Du kannst Links bewerten. Das wird den Link in der Platzierung weiter nach oben befördern.",
- "Du kannst einen Link auch kommentieren. Wenn jemand auf deinen Kommentar antwortet, wirst du per Email benachrichtigt, sodass du zurück kommen und reagieren kannst.",
- "Du kannst ebenfalls Links teilen. Bearbeite den Titel des Links und hinterlasse einen ersten Kommentar, um die Diskussion zu starten.",
- "Du kannst dir das Portfolio jedes Campers anschauen, der einen Link geteilt hat. Klicke dazu einfach auf ihr Bild.",
- "Sobald du einen Link teilst, erhältst du einen Punkt. Jedes Mal, wenn jemand deinen Link bewertet, erhältst du zusätzlich einen Punkt.",
- "Jetzt da du gelernt hast, was Camper News ist, kanns du zur nächsten Challenge gehen."
- ]
- },
- {
- "id": "bd7126d8c441eddfaeb5bd3e",
- "name": "Waypoint: Meet Other Campers in your City",
- "dashedName": "waypoint-meet-other-campers-in-your-city",
- "difficulty": 0.07,
- "challengeSeed": ["127358841"],
- "description": [
- "One of the best ways to stay motivated when learning to code is to hang out with other campers in-person.",
- "The easiest way to meet other campers in your city is to join your city's Campsite. Each of these has its own Facebook group and Gitter chat room. Click here to view our growing list of Campsites. ",
- "Click the link to your city's Facebook group. Then, once Facebook loads, click \"Join group\".",
- "If you don't see your city on this list, you should follow these directions to create a Facebook group for your city.",
- "If you don't have a Facebook account, we strongly recommend you create one, even if it's just for the purpose of coordinating with campers in your city through your Campsite.",
- "Our Campsites allow you to create events, coordinate those events, and share photos from the events afterward.",
- "Whether you're hosting a study group, pair programming at your local library, or going to a weekend hackathon, your city's Campsite will help you make it happen."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Encuentrate con otros Campers en tu Ciudad",
- "descriptionEs": [
- "Una de las mejores maneras de mantenerte motivado cuando estás aprendiendo a programar es pasar el rato con otros campers.",
- "Gitter y Noticias de Campers son una muy buena forma de comunicarte con otros campers, pero no hay ningún substituto para conocerlos en persona.",
- "La forma más fácil de encontrarte con otros campers en tu ciudad es unirte al grupo de Facebook de tu ciudad o país. Dale click a here para ver la lista de grupos locales.",
- "Dale click al link de tu ciudad o país y una vez que Facebook cargue, dale click a \"Join group\".",
- "Nuestros grupos locales son pocos, asi que en caso no veas tu ciudad o país en la lista, solamente sigue las instrucciones para crear un grupo de Facebook para ello.",
- "Si no tienes una cuenta de Facebook, te recomendamos que crees una, asi sea solamente con el proposito de coordinar con otros campers en tu ciudad a través del grupo",
- "Nuestros grupos te dan la potestad de crear eventos y coordinarlos, solamente asegurate de compartir las fotos del evento una vez terminado.",
- "En caso seas el anfitrión de un grupo de estudio, estes programando en pares en una biblioteca local o piensen en ir a un hackathon de fin de semana, tu grupo local te ayudará a hacerlo."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Treffe andere Camper in deiner Stadt",
- "descriptionDe": [
- "Der beste Weg, motiviert am Ball zu bleiben, ist mit anderen Campern abzuhängen.",
- "Slack und Camper News sind super Wege zur Kommunikation mit anderen Campern. Es gibt aber nichts vergleichbares, Personen im echten Leben zu treffen.",
- "Um leicht andere Camper in deiner Stadt zu treffen, solltest du der Facebook Gruppe deiner Stadt beitreten. Klicke hier um unsere wachsende Liste der lokalen Gruppen zu sehen.",
- "Klicke auf den Link zu deiner Stadt. Sobald Facebook geladen ist, klicke auf \"Gruppe beitreten\".",
- "Unsere lokalen Gruppen sind neu. Solltest du deine Stadt also nicht in der Liste sehen, erstelle doch bitte eine Facebook Gruppe deiner Stadt indem du den Anweisungen dazu folgst.",
- "Wenn du keinen Facebook Account hast, empfehlen wir dir einen zu erstellen. Auch wenn dieser nur dazu dient, sich mit anderen Campern in deiner Stadt zu koordinieren.",
- "Unsere Gruppen erlauben dir, Events zu planen und Fotos davon zu teilen.",
- "Egal ob du eine Studenten-Gruppe, Paarprogrammierung an deiner lokalen Bibliothek oder einen Hackathon am Wochenende anbieten willst. Die Gruppe deiner Stadt macht das alles möglich."
- ]
- },
- {
- "id": "bd7126d8c431eddfaeb5bd3e",
- "name": "Waypoint: Add Free Code Camp to your LinkedIn Profile",
- "dashedName": "waypoint-add-free-code-camp-to-your-linkedin-profile",
- "difficulty": 0.08,
- "challengeSeed": ["131574134"],
- "description": [
- "LinkedIn is a critical tool for your job search later on.",
- "Add Free Code Camp to your LinkedIn profile by going to https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp .",
- "Estimate your dates. Keep in mind that Free Code Camp is a rigorous 1,600 hour program, and will probably take at least a year to complete.",
- "In the \"Degree\" section, type \"Full Stack Web Development\".",
- "In the \"Field of study\" section, type \"Computer Software Engineering\".",
- "Click the \"Save Changes\" button.",
- "Be sure to add your key word skills to LinkedIn's skills section as you learn them, such as HTML, jQuery, Linux and Node.js.",
- "You can expand your LinkedIn network by inviting friends you meet through Free Code Camp to connect with you on LinkedIn.",
- "Make your LinkedIn profile as complete as possible. Unlike other social networks, with LinkedIn, it's perfectly fine if you don't want to add a photo.",
- "Let's keep moving. We're almost ready to start coding!"
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "bd7137d8c441eddfaeb5bdef",
- "name": "Waypoint: Get Help the Hacker Way with RSAP",
- "dashedName": "waypoint-get-help-the-hacker-way-with-rsap",
- "difficulty": 0.09,
- "challengeSeed": ["125407432"],
- "description": [
- "Let's cover one last thing before you start working through our lessons: how to get help.",
- "Any time you get stuck or don't know what to do next, follow this simple algorithm (procedure): RSAP (Read, Search, Ask, Post).",
- "First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.",
- "Next, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.",
- "Then, if you still haven't found an answer to your question, A - Ask your friends. If you have trouble, you can ask your fellow campers. We have a special chat room specifically for getting help with tools you learn through these Free Code Camp Challenges. Go to https://gitter.im/FreeCodeCamp/Help . Keep this chat open while you work on the remaining challenges.",
- "Finally, P - Post on Stack Overflow. Before you attempt to do this, read Stack Overflow's guide to asking good questions: http://stackoverflow.com/help/how-to-ask .",
- "Here's our detailed wiki article on getting help: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck .",
- "Now you have a clear algorithm to follow when you need help! Let's start coding! Move on to your next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "Waypoint: Obtén ayuda del modo Hacker con RSAP",
- "descriptionEs": [
- "Cubramos un último punto antes que empieces a trabajar en los cursos: como obtener ayuda.",
- "Cualquier momento en el que te atasques o no sepas que hacer, sigue este simple algoritmo (procedimiento): RSAP (Read, Search, Ask, Post). Que en español vendría a ser Lee, Busca, Pregunta, Publica.",
- "Primero, Lee - Lee la documentación o el mensaje de error. El punto fuerte de un buen programador es la habilidad de interpretar y seguir instrucciones.",
- "Luego, Busca - Busca en Google. Buenas búsquedas o queries requieren bastante práctica. Cuando búsques en Google, idealmente tienes que incluir el lenguaje o framework que estés usando. También tendrás que limitar los resultados de búsqueda a un periodo reciente.",
- "Ahora, en caso no hayas encontrado la respuesta a tu pregunta, Pregunta - Pregunta a tus amigos. En caso estes en problemas, puedes preguntar a otros campers. Tenemos una sala de chat especificamente para obtener ayuda sobre las herramientas que utilizamos en los desafíos de Free Code Camp. Ingresa a https://gitter.im/FreeCodeCamp/Help . Mantén este chat abierto mientras trabajas en los desafíos subsiguientes.",
- "Finalmente, Publica - Publica tu pregunta en Stack Overflow. Antes de hacer esto lee la guía de Stack Overflow para publicar buenas preguntas: http://stackoverflow.com/help/how-to-ask . Tendrás que hacerlo en inglés, en caso no sepas como, pide que te ayuden a traducir tu pregunta en el canal #espanol de Slack.",
- "Aquí está nuestra guia detallada en como obtener ayuda: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck .",
- "Ahora que tienes en claro el procedimiento a seguir cuando necesites ayuda. ¡Empecémos a programar! Continua con el siguiente desafío."
- ],
- "namePt": "",
- "descriptionPt": [],
- "nameDe": "Waypoint: Der Weg des Hackers – Hilfe erhalten mit RSAP",
- "descriptionDe": [
- "Lass uns eine letzte Sache behandeln, bevor du mit den Lektionen beginnst: Wie du Hilfe bekommst.",
- "Immer wenn du nicht weiter kommst oder du nicht weißt, was als nächstes zu Tun ist, kannst du diesem einfachen Algorithmus (Prozedur) folgen: RSAP (Read, Search, Ask, Post – Lesen, Suchen, Fragen, Posten).",
- "Erstens, R – Lies die Dokumentation oder die Fehler-Meldung. Eine wichtige Eigenschaft aller Coder ist es, Anweisungen zu interpretieren und zu folgen.",
- "Danach, S – Suche bei Google. Es bedarf viel Übung, gute Such-Anfragen zu stellen. Wenn du bei Google suchst, solltest du die Sprache oder das Framework angeben, welches du benutzt. Außerdem wirst du die aktuellsten Ergebnisse haben wollen.",
- "Wenn du keine Antwort auf deine Frage erhalten hast, folge A – Frage deine Freunde. Wenn du Probleme hast, kannst du andere Camper fragen. Wir haben einen speziellen Chat-Raum zur Unterstützung beim Lernen eingerichtet. Gehe zu https://freecode.slack.com/messages/help/ . Behalte diesen Chat offen, solange du an den Challenges arbeitest.",
- "Und zum Schluss, P – Poste auf Stack Overflow. Bevor du das tust, lies bitte den Leitfaden für gute Fragen auf Stack Overflow: http://stackoverflow.com/help/how-to-ask .",
- "Hier ist unser detaillierter Field Guide um Hilfe zu erhalten: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck .",
- "Jetzt hast du einen klaren Algorithmus, dem du folgen kannst wenn du Hilfe benötigst. Fangen wir an zu programmieren! Gehe zur nächsten Challenge."
- ]
- }
- ]
-}
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index 93c85cb4ee..6ef66c0c9b 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,5 +1,5 @@
{
- "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards",
+ "name": "Object Oriented and Functional Programming",
"order" : 0.009,
"challenges": [
{
diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js
index 2b879c2341..13fd84e3c7 100644
--- a/server/boot/randomAPIs.js
+++ b/server/boot/randomAPIs.js
@@ -30,6 +30,7 @@ module.exports = function(app) {
router.get('/jobs-form', jobsForm);
router.get('/unsubscribe/:email', unsubscribe);
router.get('/unsubscribed', unsubscribed);
+ router.get('/get-started', getStarted);
app.use(router);
@@ -259,6 +260,12 @@ module.exports = function(app) {
});
}
+ function getStarted(req, res) {
+ res.render('resources/get-started', {
+ title: 'How to get started with Free Code Camp'
+ });
+ }
+
function githubCalls(req, res, next) {
var githubHeaders = {
headers: {
diff --git a/server/views/challengeMap/show.jade b/server/views/challengeMap/show.jade
index 77b42ca672..1d3f91dfe7 100644
--- a/server/views/challengeMap/show.jade
+++ b/server/views/challengeMap/show.jade
@@ -3,9 +3,6 @@ block content
script.
var completedChallenges = !{JSON.stringify(completedChallengeList)};
var challengeList = !{JSON.stringify(challengeList)};
- .bg-danger.default-border-radius
- p
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta' target='_blank') You're using our experimental beta site. None of your progress here will be saved. Please click this to learn more.
.panel.panel-info
.panel-heading.text-center
h1 Challenge Map
diff --git a/server/views/home.jade b/server/views/home.jade
index e5e09f19bb..ce7d54d50c 100644
--- a/server/views/home.jade
+++ b/server/views/home.jade
@@ -1,8 +1,5 @@
extends layout
block content
- .bg-danger.default-border-radius
- p
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta' target='_blank') You're using our experimental beta site. None of your progress here will be saved. Please click this to learn more.
.jumbotron
.text-center
h1.hug-top Code with Us
@@ -10,7 +7,7 @@ block content
.row
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Get Connected
- img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', alt='Get great references and connections for your reto help you get a job')
+ img.img-responsive.landing-icon.img-center(src= 'https://s3.amazonaws.com/freecodecamp/landingIcons_connect.svg.gz', alt='Get great references and connections to start your software engineer career')
p.landing-p Join a community of busy, motivated professionals.
.col-xs-12.col-sm-12.col-md-3
h3.nowrap Learn JavaScript
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
new file mode 100644
index 0000000000..92858c5feb
--- /dev/null
+++ b/server/views/resources/get-started.jade
@@ -0,0 +1,154 @@
+extends ../layout
+block content
+ .jumbotron
+ h1.text-center This short guide will get you started
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Learning to code is hard. To succeed, you'll need practice and lots of support. That's why we've created this rigorous curriculum and this supportive community.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Free Code Code camp is self-paced, browser-based and free.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption By the time you finish, you'll be a job-ready coder who has a portfolio of apps with happy users to prove it.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='https://github.com/join' target='_blank') Create an account with GitHub
+ | . This will be private, so you should use your real email address.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
+ | and "star" it. This is the GitHub equivalent of a "like" button.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Now that you have a GitHub account, you can
+ a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room
+ | .
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck on a challenge. You can also socialize when you feel like taking a break.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='https://gitter.im/apps' target='_blank') You can also download the chat app for your computer and phone
+ | .
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all the challenges that will teach you how to code. We recommend that you complete these from top to bottom, at a sustainable pace.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Let's check out your portfolio page. Click your picture in the upper right hand corner to go to your account page. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption You can also fill out a short biography, and add links to your social media profiles.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Your portfolio page shows how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get a streak.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Click "News" button in your upper right hand corner to take you to Camper News. These camper-submitted links are ranked by how new they are and how many upvotes they have. If you enjoy a link, you should click the "upvote" button to upvote it.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Our Campsites allow you meet other campers in your city and code with them. Your city's Campsite will help you coordinate events like study groups at your local library and weekend hackathons.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
+ | . Click the "Join group" button to join your city's Facebook group. (If your city isn't on this list,
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
+ | .)
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
+ | and click your city's Gitter link to join your city's Gitter chat room.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption
+ a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') Add Free Code Camp to your LinkedIn education background
+ | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
+ a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
+ | .
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
+
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ p.gif-caption Congratulations! Now you're ready to start working through our Challenge Map. Good luck, and happy coding!
+ hr
+ a.btn.btn-cta.signup-btn.btn-block(href="/map") Go to my Challenge Map and start coding
From 9bed47a763bf230e0b7d3d0390a92f7208305c34 Mon Sep 17 00:00:00 2001
From: ahstro
Date: Sun, 9 Aug 2015 02:08:42 +0200
Subject: [PATCH 143/548] Disregard order in 'Symmetric Difference' #1402
---
seed/challenges/expert-bonfires.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
index 50bbe89de2..bb0294b27f 100644
--- a/seed/challenges/expert-bonfires.json
+++ b/seed/challenges/expert-bonfires.json
@@ -81,9 +81,9 @@
"sym([1, 2, 3], [5, 2, 1, 4]);"
],
"tests": [
- "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);",
- "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
- "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');",
+ "assert.deepEqual(sym([1, 2, 3], [5, 2, 1, 4]).sort(), [3, 4, 5], 'should return the symmetric difference of the given arrays');",
+ "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
+ "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'should return an array of unique values');",
"assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
],
"MDNlinks": [
From 6d1ddc759dcc0f9c8d958477eef77673f2c73e20 Mon Sep 17 00:00:00 2001
From: alanmbarr
Date: Sat, 8 Aug 2015 21:59:03 -0700
Subject: [PATCH 144/548] Update bootstrap.json
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 800f64d113..d839ef1c06 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1435,7 +1435,7 @@
"tests": [
"assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text area in a div with class \"row\".')",
"assert($('div.col-xs-5:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button in a div with the class \"col-xs-5\".')",
- "assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text area in a div with the class \"col-xs-7\".')",
+ "assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text input in a div with the class \"col-xs-7\".')",
"assert(editor.match(/<\\/div>/g) && editor.match(//g).length === editor.match(/
div elements has a closing tag.')"
],
"challengeSeed": [
From 50db4b9aaa0aadf367323623f8d818f526746080 Mon Sep 17 00:00:00 2001
From: alanmbarr
Date: Sat, 8 Aug 2015 22:10:07 -0700
Subject: [PATCH 145/548] other typo
text input instead of area for clarity
---
seed/challenges/bootstrap.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index d839ef1c06..985a1fa77b 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -1433,7 +1433,7 @@
"This is the last challenge we'll do for our Cat Photo App for now. We hope you've enjoyed learning Font Awesome, Bootstrap, and responsive design!"
],
"tests": [
- "assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text area in a div with class \"row\".')",
+ "assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text input in a div with class \"row\".')",
"assert($('div.col-xs-5:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button in a div with the class \"col-xs-5\".')",
"assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text input in a div with the class \"col-xs-7\".')",
"assert(editor.match(/<\\/div>/g) && editor.match(//g).length === editor.match(/
div elements has a closing tag.')"
From 0994dbaabe244ae03284ae6eb454e3e71418ddfb Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sat, 8 Aug 2015 22:46:21 -0700
Subject: [PATCH 146/548] finalize copy on get-started
---
server/views/resources/get-started.jade | 104 ++++++++++++------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 92858c5feb..c64acefa32 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -2,153 +2,153 @@ extends ../layout
block content
.jumbotron
h1.text-center This short guide will get you started
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Learning to code is hard. To succeed, you'll need practice and lots of support. That's why we've created this rigorous curriculum and this supportive community.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Free Code Code camp is self-paced, browser-based and free.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Free Code Code camp is self-paced, browser-based, and free.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
p.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rU7B4sn.jpg' alt='a gif showing how to install this')
p.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption By the time you finish, you'll be a job-ready coder who has a portfolio of apps with happy users to prove it.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.i.imgur.com/WAxbGZE.gif' alt='a gif showing how to install this')
p.gif-caption
a(href='https://github.com/join' target='_blank') Create an account with GitHub
| . This will be private, so you should use your real email address.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption
a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
- | and "star" it. This is the GitHub equivalent of a "like" button.
+ | and "star" it. "Starring" is the GitHub equivalent of "liking" something.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Now that you have a GitHub account, you can
- a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room
+ a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by authenticating with GitHub
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck on a challenge. You can also socialize when you feel like taking a break.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption
- a(href='https://gitter.im/apps' target='_blank') You can also download the chat app for your computer and phone
+ a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all the challenges that will teach you how to code. We recommend that you complete these from top to bottom, at a sustainable pace.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Let's check out your portfolio page. Click your picture in the upper right hand corner to go to your account page. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Let's check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption You can also fill out a short biography, and add links to your social media profiles.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption You can also add a short bio, and links to your social media profiles.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Your portfolio page shows how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get a streak.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Click "News" button in your upper right hand corner to take you to Camper News. These camper-submitted links are ranked by how new they are and how many upvotes they have. If you enjoy a link, you should click the "upvote" button to upvote it.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Our Campsites allow you meet other campers in your city and code with them. Your city's Campsite will help you coordinate events like study groups at your local library and weekend hackathons.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
- | . Click the "Join group" button to join your city's Facebook group. (If your city isn't on this list,
+ | . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
- | .)
+ | .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
- | and click your city's Gitter link to join your city's Gitter chat room.
+ | and click "Gitter" to join your city's chat room.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption
- a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') Add Free Code Camp to your LinkedIn education background
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption You can
+ a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
| . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/u18I9S1.gif' alt='a gif showing how to install this')
- p.gif-caption Congratulations! Now you're ready to start working through our Challenge Map. Good luck, and happy coding!
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.gif-caption Congratulations! Now you're ready to start working through our Challenge Map. Good luck and happy coding!
hr
a.btn.btn-cta.signup-btn.btn-block(href="/map") Go to my Challenge Map and start coding
From 2476f3530989bdb50421810f46d7a42bcdd010b7 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Sun, 9 Aug 2015 07:40:16 -0700
Subject: [PATCH 147/548] add challenge order to individual challenge
---
common/models/challenge.json | 3 +++
seed/index.js | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/common/models/challenge.json b/common/models/challenge.json
index 910b61df20..a6b71d5a36 100644
--- a/common/models/challenge.json
+++ b/common/models/challenge.json
@@ -19,6 +19,9 @@
"type": {
"type": "string"
},
+ "order": {
+ "type": "number"
+ },
"dashedName": {
"type": "string"
},
diff --git a/seed/index.js b/seed/index.js
index 5c5c2bd38a..b2a4e3e84c 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -38,14 +38,19 @@ Challenge.destroyAll(function(err, info) {
}
challenges.forEach(function(file) {
var challengeSpec = require('./challenges/' + file);
+ var order = challengeSpec.order;
var challenges = challengeSpec.challenges
- .map(function(challenge) {
+ .map(function(challenge, index) {
// NOTE(berks): add title for displaying in views
challenge.name =
_.capitalize(challenge.type) +
': ' +
challenge.title.replace(/[^a-zA-Z0-9\s]/g, '');
- challenge.dashedName = challenge.name.toLowerCase().replace(/\s/g, '-');
+ challenge.dashedName = challenge.name
+ .toLowerCase()
+ .replace(/\:/g, '')
+ .replace(/\s/g, '-');
+ challenge.order = +('' + order + (index + 1));
return challenge;
});
From 76e4fc2d333ade24c4a7af8adf409138ee0181dd Mon Sep 17 00:00:00 2001
From: Isabell Long
Date: Sun, 9 Aug 2015 19:32:10 +0000
Subject: [PATCH 148/548] Fix typos in the Basic Javascript challenge
- Partially fixes #1519 - looks like some of those typos had already
been fixed.
---
seed/challenges/basic-javascript.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 888782e4b6..c8cd7046a9 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -35,7 +35,7 @@
"A boolean is a type of variable that represents either true or false (Named after the British mathematician George Boole).",
"Booleans are often the result of a function or a comparative operation, for example 1==1
is true whereas 1==2
is false.",
"They are most commonly found inside if
statements which we shall cover later",
- "For now Let's modify our welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked"
+ "For now let's modify our welcomeToBooleans
function so that it will return true
instead of false
when the run button is clicked"
],
"tests": [
"assert(typeof(welcomeToBooleans())=='boolean', 'The value returned by welcomeToBooleans() should be a boolean value. (true of false)');",
@@ -59,8 +59,8 @@
"description": [
"Now, use the var
keyword to create a variable
called myName
. Set its value to your name.",
"Variables
are used to store values.",
- "The name variable comes from the fact that it's value, varies!",
- "Now Let's create our first variable called myName and because it's a name let's make it a string!",
+ "The name variable comes from the fact that its value varies!",
+ "Now let's create our first variable called myName and because it's a name let's make it a string!",
"Be sure to use lowercase and uppercase letters properly. JavaScript variables are written in camel case
. An example of camel case is: camelCase.",
"Look at the ourName
example if you get stuck."
],
@@ -362,7 +362,7 @@
"title": "Create Decimal Numbers with JavaScript",
"difficulty": "9.9815",
"description": [
- "In JavaScript we can can work with decimal numbers.",
+ "In JavaScript we can work with decimal numbers.",
"Let's create a variable myDecimal
and give it a decimal value."
],
"tests": [
@@ -385,7 +385,7 @@
"title": "Perform Arithmetic Operations on Decimals with JavaScript",
"difficulty": "9.98151",
"description": [
- "In JavaScript we can can work with decimal numbers."
+ "In JavaScript we can work with decimal numbers."
],
"tests": [
"assert(multiply == 15, 'The result of multiply should be 3.75');",
From e0bd8c6dd2891212f276ed1c0897f638c74c0a26 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 9 Aug 2015 17:03:49 -0700
Subject: [PATCH 149/548] remove pair programming Bonfire warm up challenge
---
seed/challenges/basic-bonfires.json | 72 +++++++----------------------
server/views/home.jade | 2 +-
2 files changed, 17 insertions(+), 57 deletions(-)
diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json
index af9c9a3bd3..2737a8fe54 100644
--- a/seed/challenges/basic-bonfires.json
+++ b/seed/challenges/basic-bonfires.json
@@ -2,46 +2,6 @@
"name": "Basic Algorithm Scripting",
"order": 0.006,
"challenges": [
- {
- "id": "bd7139d8c441eddfaeb5bdef",
- "name": "Waypoint: Pair Program on Bonfires",
- "dashedName": "waypoint-pair-program-on-bonfires",
- "difficulty": 0.44,
- "challengeSeed": [
- "119657641"
- ],
- "description": [
- "Please note that the video for this challenge is a little outdated, and doesn't perfectly match these steps. We plan to record a new video soon.",
- "OK, we're finally ready to start pair programming!",
- "Pair Programming is where two people code together on the same computer. It is an efficient way to collaborate, and widely practiced at software companies. Pair Programming is one of the core concepts of \"Agile\" Software Development, which you will hear more about later.",
- "Many people use Skype or Google Hangouts to pair program, but if you talk with professional software engineers, they will tell you that it's not really pair programming unless both people have the ability to use the keyboard and mouse.",
- "The most popular tool for pair programming is Screenhero. You can download Screenhero for Mac or Windows . Create your new user account from within the app.",
- "We have a special chat room for people ready to pair program. Go to our LetsPair chatroom on Gitter and type \"Hello Pair Programmers!\"",
- "If someone is available, they will be your \"pair\" - the person you pair programming with.",
- "If no one gets back to you in the first few minutes, don't worry. There will be lots of opportunities to pair program in the future.",
- "If someone does get back to you, private message them and ask for the email address they used to register Screenhero.",
- "Add them as a new contact in Screenhero, then click the monitor-looking button to attempt to share your screen with them.",
- "Once the Screenhero session starts, your screen's margins will glow orange. You are now sharing your screen.",
- "Your pair will have their own cursor, and will be able to type text on his or her keyboard.",
- "Now it's time to tackle our Bonfires. You can begin them by advancing to the next challenge.",
- "Once you you finish pair programming, end the session in Screenhero session.",
- "Congratulations! You have completed your first pair programming session.",
- "Pair program as much as possible with different campers until you've completed all the Bonfire challenges. This is a big time investment, but the JavaScript practice you get will be well worth it!",
- "Mark this Waypoint complete and move on."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
{
"id": "ad7123c8c441eddfaeb5bdef",
"name": "Bonfire: Meet Bonfire",
@@ -96,7 +56,7 @@
"Reverse the provided string.",
"You may need to turn the string into an array before you can reverse it.",
"Your result must be a string.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function reverseString(str) {",
@@ -139,7 +99,7 @@
"If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.",
"Factorials are often represented with the shorthand notation n!",
"For example: 5! = 1 * 2 * 3 * 4 * 5 = 120f",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function factorialize(num) {",
@@ -173,7 +133,7 @@
"A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.",
"You'll need to remove punctuation and turn everything lower case in order to check for palindromes.",
"We'll pass strings with varying formats, such as \"racecar\", \"RaceCar\", and \"race CAR\" among others.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"tests": [
"expect(palindrome(\"eye\")).to.be.a(\"boolean\");",
@@ -219,7 +179,7 @@
"description": [
"Return the length of the longest word in the provided sentence.",
"Your response should be a number.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function findLongestWord(str) {",
@@ -259,7 +219,7 @@
"description": [
"Return the provided string with the first letter of each word capitalized.",
"For the purpose of this exercise, you should also capitalize connecting words like 'the' and 'of'.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function titleCase(str) {",
@@ -298,7 +258,7 @@
"Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.",
"Remember, you can iterate through an array with a simple for loop, and access each member with array syntax arr[i] .",
"If you are writing your own Chai.js tests, be sure to use a deep equal statement instead of an equal statement when comparing arrays.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function largestOfFour(arr) {",
@@ -335,7 +295,7 @@
"difficulty": "1.07",
"description": [
"Check if a string (first argument) ends with the given target string (second argument).",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function end(str, target) {",
@@ -375,7 +335,7 @@
"difficulty": "1.08",
"description": [
"Repeat a given string (first argument) n times (second argument). Return an empty string if n is a negative number.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function repeat(str, num) {",
@@ -413,7 +373,7 @@
"description": [
"Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.",
"Note that the three dots at the end add to the string length.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function truncate(str, num) {",
@@ -451,7 +411,7 @@
"difficulty": "1.10",
"description": [
"Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a multidimensional array.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function chunk(arr, size) {",
@@ -489,7 +449,7 @@
"difficulty": "1.11",
"description": [
"Return the remaining elements of an array after chopping off n elements from the head.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function slasher(arr, howMany) {",
@@ -530,7 +490,7 @@
"For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.",
"The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.",
"Lastly, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function mutation(arr) {",
@@ -571,7 +531,7 @@
"description": [
"Remove all falsey values from an array.",
"Falsey values in javascript are false, null, 0, \"\", undefined, and NaN.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function bouncer(arr) {",
@@ -609,7 +569,7 @@
"difficulty": "1.55",
"description": [
"Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property values (second argument).",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function where(collection, source) {",
@@ -648,7 +608,7 @@
"difficulty": "1.60",
"description": [
"You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function destroyer(arr) {",
@@ -689,7 +649,7 @@
"description": [
"Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).",
"For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (0th index), but less than 2 (1st index).",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ "Remember to use RSAP if you get stuck. Write your own code."
],
"challengeSeed": [
"function where(arr, num) {",
diff --git a/server/views/home.jade b/server/views/home.jade
index ce7d54d50c..8b49275e53 100644
--- a/server/views/home.jade
+++ b/server/views/home.jade
@@ -30,7 +30,7 @@ block content
a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free)
.button-spacer
a.btn.btn-cta.btn-success.btn-block(href="/nonprofits") My nonprofit needs coding help
- h2 As seen in:
+ h2 As featured in
img.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/as-seen-on.png')
.spacer
h2 We're a proven way to start your software engineering career:
From 02717582d8ef7303a1e299cb8cbb653ac0fa53ff Mon Sep 17 00:00:00 2001
From: Shouvik Roy
Date: Mon, 10 Aug 2015 07:32:57 +0530
Subject: [PATCH 150/548] Update basic-javascript.json to fix #1642
Fixed following issues
#1639 : Fixed ```description``` to have "In JavaScript" instead of "in JavaScript" and added punctuation.
#1640 #1641 Added punctuation and fixed typo to have "perform mathematical functions" instead of "preform mathematical functions".
---
seed/challenges/basic-javascript.json | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index b8e088adc0..418a027fbb 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -272,9 +272,9 @@
"dashedName": "waypoint-add-two-numbers-with-javascript",
"difficulty": "9.98141",
"description": [
- "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
- "Let's try a few of the most commonly used ones now",
- "We use +
for addition",
+ "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.",
+ "Let's try a few of the most commonly used ones now.",
+ "We use +
for addition.",
"Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
@@ -295,9 +295,9 @@
"dashedName": "waypoint-subtract-one-number-from-another-with-javascript",
"difficulty": "9.98142",
"description": [
- "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
- "Let's try a few of the most commonly used ones now",
- "We use -
for subtraction",
+ "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.",
+ "Let's try a few of the most commonly used ones now.",
+ "We use -
for subtraction.",
"Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
@@ -318,9 +318,9 @@
"dashedName": "waypoint-multiply-two-numbers-with-javascript",
"difficulty": "9.98143",
"description": [
- "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
- "Let's try a few of the most commonly used ones now",
- "We use *
for multiplication",
+ "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.",
+ "Let's try a few of the most commonly used ones now.",
+ "We use *
for multiplication.",
"Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
@@ -341,9 +341,9 @@
"dashedName": "waypoint-divide-one-number-by-another-with-javascript",
"difficulty": "9.9814",
"description": [
- "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions",
- "Let's try a few of the most commonly used ones now",
- "We use /
for division",
+ "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.",
+ "Let's try a few of the most commonly used ones now.",
+ "We use /
for division.",
"Replace the 0
with correct number to achieve the result in the comment."
],
"tests": [
@@ -364,7 +364,7 @@
"dashedName": "waypoint-create-decimal-numbers-with-javascript",
"difficulty": "9.9815",
"description": [
- "in JavaScript we can can work with decimal numbers",
+ "In JavaScript we can can work with decimal numbers.",
"Let's create a variable myDecimal
and give it a decimal value."
],
"tests": [
From 4ed041c0db5f89dc4f44611ccea8daac8c2931c2 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 9 Aug 2015 21:26:26 -0700
Subject: [PATCH 151/548] update curriculum structure again
---
seed/challenges/advanced-bonfires.json | 297 +++++++++++++----
seed/challenges/expert-bonfires.json | 304 ------------------
...t-oriented-and-functional-programming.json | 117 +------
.../upper-intermediate-bonfires.json | 139 ++++++++
server/views/home.jade | 5 +-
5 files changed, 373 insertions(+), 489 deletions(-)
delete mode 100644 seed/challenges/expert-bonfires.json
create mode 100644 seed/challenges/upper-intermediate-bonfires.json
diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json
index c071bfb8b7..b197aad00f 100644
--- a/seed/challenges/advanced-bonfires.json
+++ b/seed/challenges/advanced-bonfires.json
@@ -1,46 +1,55 @@
{
"name": "Advanced Algorithm Scripting",
- "order": 0.011,
+ "order": 0.013,
"challenges": [
{
- "id": "a2f1d72d9b908d0bd72bb9f6",
- "name": "Bonfire: Make a Person",
- "dashedName": "bonfire-make-a-person",
- "difficulty": "3.01",
+ "id": "aff0395860f5d3034dc0bfc9",
+ "name": "Bonfire: Validate US Telephone Numbers",
+ "dashedName": "bonfire-validate-us-telephone-numbers",
+ "difficulty": "4.01",
"description": [
- "Fill in the object constructor with the methods specified in the tests.",
- "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).",
- "All functions that take an argument have an arity of 1, and the argument will be a string.",
- "These methods must be the only available means for interacting with the object.",
+ "Return true if the passed string is a valid US phone number",
+ "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:",
+ "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555",
+ "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "challengeSeed": [
- "var Person = function(firstAndLast) {",
- " return firstAndLast;",
- "};",
- "",
- "var bob = new Person('Bob Ross');",
- "bob.getFullName();"
- ],
"tests": [
- "expect(Object.keys(bob).length).to.eql(6);",
- "expect(bob instanceof Person).to.be.true;",
- "expect(bob.firstName).to.be.undefined();",
- "expect(bob.lastName).to.be.undefined();",
- "expect(bob.getFirstName()).to.eql('Bob');",
- "expect(bob.getLastName()).to.eql('Ross');",
- "expect(bob.getFullName()).to.eql('Bob Ross');",
- "bob.setFirstName('Happy');",
- "expect(bob.getFirstName()).to.eql('Happy');",
- "bob.setLastName('Trees');",
- "expect(bob.getLastName()).to.eql('Trees');",
- "bob.setFullName('George Carlin');",
- "expect(bob.getFullName()).to.eql('George Carlin');",
- "bob.setFullName('Bob Ross');"
+ "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");",
+ "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"5555555555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
+ "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);",
+ "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);",
+ "assert.deepEqual(telephoneCheck(\"55555555\"), false);",
+ "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"27576227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);",
+ "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);"
+ ],
+ "challengeSeed": [
+ "function telephoneCheck(str) {",
+ " // Good luck!",
+ " return true;",
+ "}",
+ "",
+ "",
+ "",
+ "telephoneCheck(\"555-555-5555\");"
],
"MDNlinks": [
- "Closures",
- "Details of the Object Model"
+ "RegExp"
],
"challengeType": 5,
"nameCn": "",
@@ -55,33 +64,31 @@
"descriptionPt": []
},
{
- "id": "af4afb223120f7348cdfc9fd",
- "name": "Bonfire: Map the Debris",
- "dashedName": "bonfire-map-the-debris",
- "difficulty": "3.02",
+ "id": "a3f503de51cf954ede28891d",
+ "name": "Bonfire: Symmetric Difference",
+ "dashedName": "bonfire-symmetric-difference",
+ "difficulty": "4.02",
"description": [
- "Return a new array that transforms the element's average altitude into their orbital periods.",
- "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}
.",
- "You can read about orbital periods on wikipedia .",
- "The values should be rounded to the nearest whole number. The body being orbited is Earth.",
- "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418",
+ "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
+ "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function orbitalPeriod(arr) {",
- " var GM = 398600.4418;",
- " var earthRadius = 6367.4447;",
- " return arr;",
+ "function sym(args) {",
+ " return arguments;",
"}",
"",
- "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);"
+ "sym([1, 2, 3], [5, 2, 1, 4]);"
],
"tests": [
- "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);",
- "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
+ "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);",
+ "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
+ "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');",
+ "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
],
"MDNlinks": [
- "Math.pow()"
+ "Array.reduce()",
+ "Symmetric Difference"
],
"challengeType": 5,
"nameCn": "",
@@ -96,32 +103,190 @@
"descriptionPt": []
},
{
- "id": "a3f503de51cfab748ff001aa",
- "name": "Bonfire: Pairwise",
- "dashedName": "bonfire-pairwise",
- "difficulty": "3.03",
+ "id": "aa2e6f85cab2ab736c9a9b24",
+ "name": "Bonfire: Exact Change",
+ "dashedName": "bonfire-exact-change",
+ "difficulty": "4.03",
"description": [
- "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.",
- "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.",
- "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
+ "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
+ "cid is a 2d array listing available currency.",
+ "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.",
+ "Otherwise, return change in coin and bills, sorted in highest to lowest order.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
"challengeSeed": [
- "function pairwise(arr, arg) {",
- " return arg;",
+ "function drawer(price, cash, cid) {",
+ " var change;",
+ " // Here is your change, ma'am.",
+ " return change;",
"}",
"",
- "pairwise([1,4,2,3,0,5], 7);"
+ "// Example cash-in-drawer array:",
+ "// [['PENNY', 1.01],",
+ "// ['NICKEL', 2.05],",
+ "// ['DIME', 3.10],",
+ "// ['QUARTER', 4.25],",
+ "// ['ONE', 90.00],",
+ "// ['FIVE', 55.00],",
+ "// ['TEN', 20.00],",
+ "// ['TWENTY', 60.00],",
+ "// ['ONE HUNDRED', 100.00]]",
+ "",
+ "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);"
],
"tests": [
- "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);",
- "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);",
- "expect(pairwise([1,1,1], 2)).to.equal(1);",
- "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);",
- "expect(pairwise([], 100)).to.equal(0);"
+ "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');",
+ "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
+ "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');",
+ "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');",
+ "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');"
],
"MDNlinks": [
- "Array.reduce()"
+ "Global Object"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a56138aff60341a09ed6c480",
+ "name": "Bonfire: Inventory Update",
+ "dashedName": "bonfire-inventory-update",
+ "difficulty": "4.04",
+ "description": [
+ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function inventory(arr1, arr2) {",
+ " // All inventory must be accounted for or you're fired!",
+ " return arr1;",
+ "}",
+ "",
+ "// Example inventory lists",
+ "var curInv = [",
+ " [21, 'Bowling Ball'],",
+ " [2, 'Dirty Sock'],",
+ " [1, 'Hair Pin'],",
+ " [5, 'Microphone']",
+ "];",
+ "",
+ "var newInv = [",
+ " [2, 'Hair Pin'],",
+ " [3, 'Half-Eaten Apple'],",
+ " [67, 'Bowling Ball'],",
+ " [7, 'Toothpaste']",
+ "];",
+ "",
+ "inventory(curInv, newInv);"
+ ],
+ "tests": [
+ "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');",
+ "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);",
+ "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);",
+ "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);",
+ "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);",
+ "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);"
+ ],
+ "MDNlinks": [
+ "Global Array Object"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a7bf700cd123b9a54eef01d5",
+ "name": "Bonfire: No repeats please",
+ "dashedName": "bonfire-no-repeats-please",
+ "difficulty": "4.05",
+ "description": [
+ "Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
+ "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function permAlone(str) {",
+ " return str;",
+ "}",
+ "",
+ "permAlone('aab');"
+ ],
+ "tests": [
+ "expect(permAlone('aab')).to.be.a('number');",
+ "expect(permAlone('aab')).to.equal(2);",
+ "expect(permAlone('aaa')).to.equal(0);",
+ "expect(permAlone('aabb')).to.equal(8);",
+ "expect(permAlone('abcdefa')).to.equal(3600);",
+ "expect(permAlone('abfdefa')).to.equal(2640);",
+ "expect(permAlone('zzzzzzzz')).to.equal(0);"
+ ],
+ "MDNlinks": [
+ "Permutations",
+ "RegExp"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a19f0fbe1872186acd434d5a",
+ "name": "Bonfire: Friendly Date Ranges",
+ "dashedName": "bonfire-friendly-date-ranges",
+ "difficulty": "4.06",
+ "description": [
+ "Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
+ "It must not show any redundant information in the date range.",
+ "For example, if the year and month are the same then only the day range should be displayed.",
+ "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.",
+ "Input date is formatted as YYYY-MM-DD",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function friendly(str) {",
+ " return str;",
+ "}",
+ "",
+ "friendly(['2015-07-01', '2015-07-04']);"
+ ],
+ "tests": [
+ "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
+ "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
+ "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
+ "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
+ "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
+ "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
+ ],
+ "MDNlinks": [
+ "String.split()",
+ "String.substr()",
+ "parseInt()"
],
"challengeType": 5,
"nameCn": "",
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
deleted file mode 100644
index 50bbe89de2..0000000000
--- a/seed/challenges/expert-bonfires.json
+++ /dev/null
@@ -1,304 +0,0 @@
-{
- "name": "Expert Algorithm Scripting",
- "order": 0.013,
- "challenges": [
- {
- "id": "aff0395860f5d3034dc0bfc9",
- "name": "Bonfire: Validate US Telephone Numbers",
- "dashedName": "bonfire-validate-us-telephone-numbers",
- "difficulty": "4.01",
- "description": [
- "Return true if the passed string is a valid US phone number",
- "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:",
- "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555",
- "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "tests": [
- "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");",
- "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"5555555555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);",
- "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);",
- "assert.deepEqual(telephoneCheck(\"55555555\"), false);",
- "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"27576227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);"
- ],
- "challengeSeed": [
- "function telephoneCheck(str) {",
- " // Good luck!",
- " return true;",
- "}",
- "",
- "",
- "",
- "telephoneCheck(\"555-555-5555\");"
- ],
- "MDNlinks": [
- "RegExp"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a3f503de51cf954ede28891d",
- "name": "Bonfire: Symmetric Difference",
- "dashedName": "bonfire-symmetric-difference",
- "difficulty": "4.02",
- "description": [
- "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
- "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function sym(args) {",
- " return arguments;",
- "}",
- "",
- "sym([1, 2, 3], [5, 2, 1, 4]);"
- ],
- "tests": [
- "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);",
- "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
- "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');",
- "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
- ],
- "MDNlinks": [
- "Array.reduce()",
- "Symmetric Difference"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "aa2e6f85cab2ab736c9a9b24",
- "name": "Bonfire: Exact Change",
- "dashedName": "bonfire-exact-change",
- "difficulty": "4.03",
- "description": [
- "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
- "cid is a 2d array listing available currency.",
- "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.",
- "Otherwise, return change in coin and bills, sorted in highest to lowest order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function drawer(price, cash, cid) {",
- " var change;",
- " // Here is your change, ma'am.",
- " return change;",
- "}",
- "",
- "// Example cash-in-drawer array:",
- "// [['PENNY', 1.01],",
- "// ['NICKEL', 2.05],",
- "// ['DIME', 3.10],",
- "// ['QUARTER', 4.25],",
- "// ['ONE', 90.00],",
- "// ['FIVE', 55.00],",
- "// ['TEN', 20.00],",
- "// ['TWENTY', 60.00],",
- "// ['ONE HUNDRED', 100.00]]",
- "",
- "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);"
- ],
- "tests": [
- "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');",
- "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');"
- ],
- "MDNlinks": [
- "Global Object"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a56138aff60341a09ed6c480",
- "name": "Bonfire: Inventory Update",
- "dashedName": "bonfire-inventory-update",
- "difficulty": "4.04",
- "description": [
- "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function inventory(arr1, arr2) {",
- " // All inventory must be accounted for or you're fired!",
- " return arr1;",
- "}",
- "",
- "// Example inventory lists",
- "var curInv = [",
- " [21, 'Bowling Ball'],",
- " [2, 'Dirty Sock'],",
- " [1, 'Hair Pin'],",
- " [5, 'Microphone']",
- "];",
- "",
- "var newInv = [",
- " [2, 'Hair Pin'],",
- " [3, 'Half-Eaten Apple'],",
- " [67, 'Bowling Ball'],",
- " [7, 'Toothpaste']",
- "];",
- "",
- "inventory(curInv, newInv);"
- ],
- "tests": [
- "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');",
- "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);",
- "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);"
- ],
- "MDNlinks": [
- "Global Array Object"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a7bf700cd123b9a54eef01d5",
- "name": "Bonfire: No repeats please",
- "dashedName": "bonfire-no-repeats-please",
- "difficulty": "4.05",
- "description": [
- "Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
- "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function permAlone(str) {",
- " return str;",
- "}",
- "",
- "permAlone('aab');"
- ],
- "tests": [
- "expect(permAlone('aab')).to.be.a('number');",
- "expect(permAlone('aab')).to.equal(2);",
- "expect(permAlone('aaa')).to.equal(0);",
- "expect(permAlone('aabb')).to.equal(8);",
- "expect(permAlone('abcdefa')).to.equal(3600);",
- "expect(permAlone('abfdefa')).to.equal(2640);",
- "expect(permAlone('zzzzzzzz')).to.equal(0);"
- ],
- "MDNlinks": [
- "Permutations",
- "RegExp"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a19f0fbe1872186acd434d5a",
- "name": "Bonfire: Friendly Date Ranges",
- "dashedName": "bonfire-friendly-date-ranges",
- "difficulty": "4.06",
- "description": [
- "Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
- "It must not show any redundant information in the date range.",
- "For example, if the year and month are the same then only the day range should be displayed.",
- "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.",
- "Input date is formatted as YYYY-MM-DD",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function friendly(str) {",
- " return str;",
- "}",
- "",
- "friendly(['2015-07-01', '2015-07-04']);"
- ],
- "tests": [
- "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
- "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
- "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
- "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
- "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
- "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
- ],
- "MDNlinks": [
- "String.split()",
- "String.substr()",
- "parseInt()"
- ],
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- }
- ]
-}
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index 93c85cb4ee..54b46060a3 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,119 +1,6 @@
{
- "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards",
- "order" : 0.009,
+ "name": "Object Oriented and Functional Programming - Coming Soon",
+ "order" : 0.010,
"challenges": [
- {
- "id": "bd7153d8c44eeddfaeb5bd0f",
- "name": "Waypoint: Learn Scope Chains and Closures",
- "dashedName": "waypoint-learn-scope-chains-and-closures",
- "difficulty": 0.01,
- "challengeSeed": ["133316031"],
- "description": [
- "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.",
- "If you don't already have Cloud 9 account, create one now at http://c9.io .",
- "Open up http://c9.io and sign in to your account.",
- "Click on Create New Workspace at the top right of the c9.io page, then click on the \"Create a new workspace\" popup that appears below it the button after you click on it.",
- "Give your workspace a name.",
- "Choose Node.js in the selection area below the name field.",
- "Click the Create button. Then click into your new workspace.",
- "In the lower right hand corner you should see a terminal window. In this window use the following commands. You don't need to know what these mean at this point.",
- "Install scope-chains-closures
with this command: npm install -g scope-chains-closures
",
- "Now start the tutorial by running scope-chains-closures
.",
- "Note that you can resize the c9.io's windows by dragging their borders.",
- "Make sure that you are always in your project's \"workspace\" directory. You can always navigate back to this directory by running this command: cd ~/workspace
.",
- "You can view this Node School module's source code on GitHub at https://github.com/jesstelford/scope-chains-closures .",
- "Complete \"Scopes\"",
- "Complete \"Scope Chains\"",
- "Complete \"Global Scope and Shadowing\"",
- "Complete \"Closures\"",
- "Complete \"Garbage Collection\"",
- "Once you've completed these steps, move on to our next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "bd7153d8b44eeddfaeb5bd0f",
- "name": "Waypoint: Use Prototypes for Inheriting Properties",
- "dashedName": "waypoint-use-prototypes-for-inheriting-properties",
- "difficulty": 0.02,
- "challengeSeed": ["133316036"],
- "description": [
- "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.",
- "If you don't already have Cloud 9 account, create one now at http://c9.io .",
- "Open up http://c9.io and sign in to your account.",
- "Click on Create New Workspace at the top right of the c9.io page, then click on the \"Create a new workspace\" popup that appears below it the button after you click on it.",
- "Give your workspace a name.",
- "Choose Node.js in the selection area below the name field.",
- "Click the Create button. Then click into your new workspace.",
- "In the lower right hand corner you should see a terminal window. In this window use the following commands. You don't need to know what these mean at this point.",
- "Install planetproto
with this command: npm install -g planetproto
",
- "Now start the tutorial by running planetproto
.",
- "Note that you can resize the c9.io's windows by dragging their borders.",
- "Make sure that you are always in your project's \"workspace\" directory. You can always navigate back to this directory by running this command: cd ~/workspace
.",
- "You can view this Node School module's source code on GitHub at https://github.com/sporto/planetproto .",
- "Complete \"Simple Objects\"",
- "Complete \"Proto\"",
- "Complete \"Dynamic Lookups\"",
- "Complete \"Property Assignments\"",
- "Complete \"Arrays and Objects\"",
- "Complete \"Object Create\"",
- "Complete \"Dot New\"",
- "Complete \"Constructor Functions\"",
- "Complete \"Implicit This\"",
- "Note that you can skip the last challenge.",
- "Once you've completed these steps, move on to our next challenge."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "bd7129d8c441eddfbeb5bddf",
- "name": "Waypoint: Practice Functional Programming",
- "dashedName": "waypoint-practice-functional-programming",
- "difficulty": 0.01,
- "challengeSeed": ["129169463"],
- "description": [
- "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.",
- "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.",
- "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".",
- "Click here to go to the challenge: http://jhusain.github.io/learnrx/ .",
- "You only need to complete the first 27 steps of this tutorial.",
- "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.",
- "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on."
- ],
- "challengeType": 2,
- "tests": [],
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- }
]
}
diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json
new file mode 100644
index 0000000000..bfd765facb
--- /dev/null
+++ b/seed/challenges/upper-intermediate-bonfires.json
@@ -0,0 +1,139 @@
+{
+ "name": "Upper Intermediate Algorithm Scripting",
+ "order": 0.011,
+ "challenges": [
+ {
+ "id": "a2f1d72d9b908d0bd72bb9f6",
+ "name": "Bonfire: Make a Person",
+ "dashedName": "bonfire-make-a-person",
+ "difficulty": "3.01",
+ "description": [
+ "Fill in the object constructor with the methods specified in the tests.",
+ "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).",
+ "All functions that take an argument have an arity of 1, and the argument will be a string.",
+ "These methods must be the only available means for interacting with the object.",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "var Person = function(firstAndLast) {",
+ " return firstAndLast;",
+ "};",
+ "",
+ "var bob = new Person('Bob Ross');",
+ "bob.getFullName();"
+ ],
+ "tests": [
+ "expect(Object.keys(bob).length).to.eql(6);",
+ "expect(bob instanceof Person).to.be.true;",
+ "expect(bob.firstName).to.be.undefined();",
+ "expect(bob.lastName).to.be.undefined();",
+ "expect(bob.getFirstName()).to.eql('Bob');",
+ "expect(bob.getLastName()).to.eql('Ross');",
+ "expect(bob.getFullName()).to.eql('Bob Ross');",
+ "bob.setFirstName('Happy');",
+ "expect(bob.getFirstName()).to.eql('Happy');",
+ "bob.setLastName('Trees');",
+ "expect(bob.getLastName()).to.eql('Trees');",
+ "bob.setFullName('George Carlin');",
+ "expect(bob.getFullName()).to.eql('George Carlin');",
+ "bob.setFullName('Bob Ross');"
+ ],
+ "MDNlinks": [
+ "Closures",
+ "Details of the Object Model"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "af4afb223120f7348cdfc9fd",
+ "name": "Bonfire: Map the Debris",
+ "dashedName": "bonfire-map-the-debris",
+ "difficulty": "3.02",
+ "description": [
+ "Return a new array that transforms the element's average altitude into their orbital periods.",
+ "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}
.",
+ "You can read about orbital periods on wikipedia .",
+ "The values should be rounded to the nearest whole number. The body being orbited is Earth.",
+ "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function orbitalPeriod(arr) {",
+ " var GM = 398600.4418;",
+ " var earthRadius = 6367.4447;",
+ " return arr;",
+ "}",
+ "",
+ "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);"
+ ],
+ "tests": [
+ "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);",
+ "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
+ ],
+ "MDNlinks": [
+ "Math.pow()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ },
+ {
+ "id": "a3f503de51cfab748ff001aa",
+ "name": "Bonfire: Pairwise",
+ "dashedName": "bonfire-pairwise",
+ "difficulty": "3.03",
+ "description": [
+ "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.",
+ "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.",
+ "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
+ "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
+ ],
+ "challengeSeed": [
+ "function pairwise(arr, arg) {",
+ " return arg;",
+ "}",
+ "",
+ "pairwise([1,4,2,3,0,5], 7);"
+ ],
+ "tests": [
+ "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);",
+ "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);",
+ "expect(pairwise([1,1,1], 2)).to.equal(1);",
+ "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);",
+ "expect(pairwise([], 100)).to.equal(0);"
+ ],
+ "MDNlinks": [
+ "Array.reduce()"
+ ],
+ "challengeType": 5,
+ "nameCn": "",
+ "descriptionCn": [],
+ "nameFr": "",
+ "descriptionFr": [],
+ "nameRu": "",
+ "descriptionRu": [],
+ "nameEs": "",
+ "descriptionEs": [],
+ "namePt": "",
+ "descriptionPt": []
+ }
+ ]
+}
diff --git a/server/views/home.jade b/server/views/home.jade
index e5e09f19bb..157753ad79 100644
--- a/server/views/home.jade
+++ b/server/views/home.jade
@@ -27,10 +27,7 @@ block content
.big-break
.row
.col-xs-12.col-sm-8.col-sm-offset-2
- if (user)
- a.btn.btn-cta.signup-btn.btn-block(href="/challenges") Go to my next challenge
- else
- a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free)
+ a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free)
.button-spacer
a.btn.btn-cta.btn-success.btn-block(href="/nonprofits") My nonprofit needs coding help
h2 As seen in:
From f3028b0e6a911b5d605461dd0d70180f7f41b38e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Sun, 9 Aug 2015 21:59:49 -0700
Subject: [PATCH 152/548] continue work on get-started
---
server/views/resources/get-started.jade | 236 ++++++++++++------------
1 file changed, 117 insertions(+), 119 deletions(-)
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index c64acefa32..d88692aec0 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -1,154 +1,152 @@
extends ../layout
block content
.jumbotron
- h1.text-center This short guide will get you started
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
+ h2.text-center Do these steps to get ready for Free Code Camp (this only takes 10 minutes):
+ ol
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Free Code Code camp is self-paced, browser-based, and free.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Free Code Code camp is self-paced, browser-based, and free.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
- p.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rU7B4sn.jpg' alt='a gif showing how to install this')
- p.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rU7B4sn.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.i.imgur.com/WAxbGZE.gif' alt='a gif showing how to install this')
- p.gif-caption
- a(href='https://github.com/join' target='_blank') Create an account with GitHub
- | . This will be private, so you should use your real email address.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.i.imgur.com/WAxbGZE.gif' alt='a gif showing how to install this')
+ li.large-li.gif-caption
+ a(href='https://github.com/join' target='_blank') Create an account with GitHub
+ | . This will be private, so you should use your real email address.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption
- a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
- | and "star" it. "Starring" is the GitHub equivalent of "liking" something.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption
+ a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
+ | and "star" it. "Starring" is the GitHub equivalent of "liking" something.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Now that you have a GitHub account, you can
- a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by authenticating with GitHub
- | .
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Now that you have a GitHub account, you can
+ a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by authenticating with GitHub
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption
- a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
- | .
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption
+ a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Let's check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Let's check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption You can also add a short bio, and links to your social media profiles.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption You can also add a short bio, and links to your social media profiles.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
- | . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
- | .
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
+ | . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
- | and click "Gitter" to join your city's chat room.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
+ | and click "Gitter" to join your city's chat room.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption You can
- a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
- | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption You can
+ a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
+ | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
- a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
- | .
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
+ a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
+ hr
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ li.large-li.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- p.gif-caption Congratulations! Now you're ready to start working through our Challenge Map. Good luck and happy coding!
- hr
- a.btn.btn-cta.signup-btn.btn-block(href="/map") Go to my Challenge Map and start coding
+ h2.text-center Nicely done. Now you have all the tools you need to succeed. Happy coding!
+ a.btn.btn-cta.signup-btn.btn-block(href="/map") Take me to my Challenge Map
From 967f92e6f42aee5fa0bf752e9ad41c0a77fba8f7 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Sun, 9 Aug 2015 22:14:31 -0700
Subject: [PATCH 153/548] fix challenge naming scheme
---
common/models/challenge.json | 3 +
seed/index.js | 5 +
server/boot/challenge.js | 160 +++++++++++++++++-----------
server/utils/index.js | 11 --
server/views/challengeMap/show.jade | 17 ++-
5 files changed, 116 insertions(+), 80 deletions(-)
diff --git a/common/models/challenge.json b/common/models/challenge.json
index a6b71d5a36..743332107d 100644
--- a/common/models/challenge.json
+++ b/common/models/challenge.json
@@ -25,6 +25,9 @@
"dashedName": {
"type": "string"
},
+ "block": {
+ "type": "string"
+ },
"difficulty": {
"type": "string"
},
diff --git a/seed/index.js b/seed/index.js
index b2a4e3e84c..3dbbf9d869 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -39,6 +39,8 @@ Challenge.destroyAll(function(err, info) {
challenges.forEach(function(file) {
var challengeSpec = require('./challenges/' + file);
var order = challengeSpec.order;
+ var block = challengeSpec.name;
+
var challenges = challengeSpec.challenges
.map(function(challenge, index) {
// NOTE(berks): add title for displaying in views
@@ -46,11 +48,14 @@ Challenge.destroyAll(function(err, info) {
_.capitalize(challenge.type) +
': ' +
challenge.title.replace(/[^a-zA-Z0-9\s]/g, '');
+
challenge.dashedName = challenge.name
.toLowerCase()
.replace(/\:/g, '')
.replace(/\s/g, '-');
challenge.order = +('' + order + (index + 1));
+ challenge.block = block;
+
return challenge;
});
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index d88f2acec0..1fc4342def 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -1,17 +1,24 @@
-var R = require('ramda'),
- Rx = require('rx'),
- assign = require('object.assign'),
- debug = require('debug')('freecc:challenges'),
- utils = require('../utils'),
+import _ from 'lodash';
+import moment from 'moment';
+import R from 'ramda';
+import { Observable } from 'rx';
+import assign from 'object.assign';
+import debugFactory from 'debug';
+import utils from '../utils';
- // this would be so much cleaner with destructering...
- saveUser = require('../utils/rx').saveUser,
- observableQueryFromModel = require('../utils/rx').observableQueryFromModel,
+import {
+ saveUser,
+ observeMethod,
+ observableQueryFromModel
+} from '../utils/rx';
- userMigration = require('../utils/middleware').userMigration,
- ifNoUserRedirectTo = require('../utils/middleware').ifNoUserRedirectTo,
- ifNoUserSend = require('../utils/middleware').ifNoUserSend;
+import {
+ userMigration,
+ ifNoUserRedirectTo,
+ ifNoUserSend
+} from '../utils/middleware';
+const debug = debugFactory('freecc:challenges');
var challengeMapWithNames = utils.getChallengeMapWithNames();
var challengeMapWithIds = utils.getChallengeMapWithIds();
var challengeMapWithDashedNames = utils.getChallengeMapWithDashedNames();
@@ -22,6 +29,10 @@ var unDasherize = utils.unDasherize;
var getMDNLinks = utils.getMDNLinks;
+function numberWithCommas(x) {
+ return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+}
+
function updateUserProgress(user, challengeId, completedChallenge) {
var alreadyCompleted = user.completedChallenges.some(({ id }) => {
return id === challengeId;
@@ -37,12 +48,18 @@ function updateUserProgress(user, challengeId, completedChallenge) {
}
module.exports = function(app) {
- var router = app.loopback.Router();
- var Challenge = app.models.Challenge;
- var User = app.models.User;
- var redirectNonUser =
- ifNoUserRedirectTo('/challenges/learn-how-free-code-camp-works');
- var send200toNonUser = ifNoUserSend(true);
+ const router = app.loopback.Router();
+
+ const Challenge = app.models.Challenge;
+ const findChallenge$ = observeMethod(Challenge, 'find');
+
+ const User = app.models.User;
+ const userCount$ = observeMethod(User, 'count');
+
+ const send200toNonUser = ifNoUserSend(true);
+ const redirectNonUser = ifNoUserRedirectTo(
+ '/challenges/learn-how-free-code-camp-works'
+ );
router.post(
'/completed-challenge/',
@@ -182,7 +199,7 @@ module.exports = function(app) {
.map(function(key) {
return challengeMapWithIds[key]
.filter(function(elem) {
- return elem === ('' + challenge.id);
+ return elem === '' + challenge.id;
})
.map(function() {
return key;
@@ -266,7 +283,7 @@ module.exports = function(app) {
}
})
.withLatestFrom(
- Rx.Observable.just(req.user),
+ Observable.just(req.user),
function(pairedWith, user) {
return {
user: user,
@@ -289,7 +306,7 @@ module.exports = function(app) {
// not iterate users
.flatMap(function(dats) {
debug('flatmap');
- return Rx.Observable.from([dats.user, dats.pairedWith]);
+ return Observable.from([dats.user, dats.pairedWith]);
})
// save user
.flatMap(function(user) {
@@ -392,7 +409,7 @@ module.exports = function(app) {
);
}
})
- .withLatestFrom(Rx.Observable.just(req.user), function(pairedWith, user) {
+ .withLatestFrom(Observable.just(req.user), function(pairedWith, user) {
return {
user: user,
pairedWith: pairedWith
@@ -408,7 +425,7 @@ module.exports = function(app) {
);
})
.flatMap(function({ user, pairedWith }) {
- return Rx.Observable.from([user, pairedWith]);
+ return Observable.from([user, pairedWith]);
})
// save users
.flatMap(function(user) {
@@ -428,50 +445,73 @@ module.exports = function(app) {
);
}
- function challengeMap(req, res, next) {
- var completedList = [];
+ function challengeMap({ user = {} }, res, next) {
+ const daysRunning = moment().diff(new Date('10/15/2014'), 'days');
- if (req.user) {
- completedList = req.user.completedChallenges;
- }
+ // if user
+ // get the id's of all the users completed challenges
+ const completedChallenges = !user.completedChallenges ?
+ [] :
+ _.uniq(user.completedChallenges).map(({ id }) => id);
- var noDuplicatedChallenges = R.uniq(completedList);
+ const camperCount$ = userCount$()
+ .map(camperCount => numberWithCommas(camperCount));
- var completedChallengeList = noDuplicatedChallenges
- .map(function(challenge) {
- // backwards compatibility
- return (challenge.id || challenge._id);
- });
- var challengeList = utils.
- getChallengeMapForDisplay(completedChallengeList);
+ const query = {
+ order: 'order ASC'
+ };
- Object.keys(challengeList).forEach(function(key) {
- challengeList[key].completed = challengeList[key]
- .challenges.filter(function(elem) {
- // backwards compatibility hack
- return completedChallengeList.indexOf(elem.id || elem._id) > -1;
- });
- });
+ // create a stream of all the challenges
+ const challenge$ = findChallenge$(query)
+ .flatMap(challenges => Observable.from(challenges))
+ .shareReplay();
- function numberWithCommas(x) {
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
- }
+ // create a stream of an array of all the challenge blocks
+ const blocks$ = challenge$
+ // mark challenge completed
+ .map(challenge => {
+ if (completedChallenges.indexOf(challenge.id) !== -1) {
+ challenge.completed = true;
+ }
+ return challenge;
+ })
+ // group challenges by block | returns a stream of observables
+ .groupBy(challenge => challenge.block)
+ // turn block group stream into an array
+ .flatMap(block$ => block$.toArray())
+ .map(blockArray => {
+ const completedCount = blockArray.reduce((sum, { completed }) => {
+ if (completed) {
+ return sum + 1;
+ }
+ return sum;
+ });
- var date1 = new Date('10/15/2014');
- var date2 = new Date();
- var timeDiff = Math.abs(date2.getTime() - date1.getTime());
- var daysRunning = Math.ceil(timeDiff / (1000 * 3600 * 24));
+ return {
+ name: blockArray[0].block,
+ dashedName: dasherize(blockArray[0].block),
+ challenges: blockArray,
+ completed: completedCount / blockArray.length * 100
+ };
+ })
+ // turn stream of blocks into a stream of an array
+ .toArray();
- User.count(function(err, camperCount) {
- if (err) { return next(err); }
-
- res.render('challengeMap/show', {
- daysRunning: daysRunning,
- camperCount: numberWithCommas(camperCount),
- title: "A map of all Free Code Camp's Challenges",
- challengeList: challengeList,
- completedChallengeList: completedChallengeList
- });
- });
+ Observable.combineLatest(
+ camperCount$,
+ blocks$,
+ (camperCount, blocks) => ({ camperCount, blocks })
+ )
+ .subscribe(
+ ({ camperCount, blocks }) => {
+ res.render('challengeMap/show', {
+ blocks,
+ daysRunning,
+ camperCount,
+ title: "A map of all Free Code Camp's Challenges"
+ });
+ },
+ next
+ );
}
};
diff --git a/server/utils/index.js b/server/utils/index.js
index 2fd19d05c1..72b37da98b 100644
--- a/server/utils/index.js
+++ b/server/utils/index.js
@@ -19,17 +19,6 @@ var allNonprofitNames,
challengeMapWithNames, allChallengeIds,
challengeMapWithDashedNames;
-Array.zip = function(left, right, combinerFunction) {
- var counter,
- results = [];
-
- for (counter = 0; counter < Math.min(left.length, right.length); counter++) {
- results.push(combinerFunction(left[counter], right[counter]));
- }
-
- return results;
-};
-
(function() {
if (!challengeMap) {
var localChallengeMap = {};
diff --git a/server/views/challengeMap/show.jade b/server/views/challengeMap/show.jade
index 77b42ca672..22927bdedb 100644
--- a/server/views/challengeMap/show.jade
+++ b/server/views/challengeMap/show.jade
@@ -1,8 +1,7 @@
extends ../layout
block content
script.
- var completedChallenges = !{JSON.stringify(completedChallengeList)};
- var challengeList = !{JSON.stringify(challengeList)};
+ var challenges = !{JSON.stringify(challenges)};
.bg-danger.default-border-radius
p
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/beta' target='_blank') You're using our experimental beta site. None of your progress here will be saved. Please click this to learn more.
@@ -28,10 +27,10 @@ block content
.col-xs-12.col-sm-8.col-sm-offset-2
h3 800 Hours of Practice:
ol
- for challengeBlock in challengeList
+ for challengeBlock in blocks
.row
if (user)
- if (challengeBlock.completed.length === challengeBlock.challenges.length)
+ if (challengeBlock.completed === 100)
.hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.large-p.negative-10
.col-xs-12.col-sm-9.col-md-10
li.large-p.faded.negative-10
@@ -39,7 +38,7 @@ block content
else
.hidden-xs.col-sm-3.col-md-2
.progress.progress-bar-padding.text-center.thin-progress-bar
- .progress-bar(role='progressbar', aria-valuenow=((challengeBlock.completed.length / challengeBlock.challenges.length) * 100), aria-valuemin='0', aria-valuemax='100', style='width: ' + ((challengeBlock.completed.length / challengeBlock.challenges.length) * 100) + '%;')
+ .progress-bar(role='progressbar', aria-valuenow=(challengeBlock.completed), aria-valuemin='0', aria-valuemax='100', style='width: ' + challengeBlock.completed + '%;')
.col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10
a(href='#' + challengeBlock.dashedName)= challengeBlock.name
@@ -74,7 +73,7 @@ block content
li.large-p.negative-10 300-hour Nonprofit Project
hr
- for challengeBlock in challengeList
+ for challengeBlock in blocks
.row
a(href='#' name=challengeBlock.dashedName)
.spacer.negative-55
@@ -86,12 +85,12 @@ block content
.col-xs-12
ol
for challenge in challengeBlock.challenges
- if completedChallengeList.indexOf(challenge.id || challenge._id) > -1
+ if challenge.completed
.row
.hidden-xs.col-sm-3.col-md-2.text-primary.ion-checkmark-circled.padded-ionic-icon.text-center.large-p.negative-10
.col-xs-12.col-sm-9.col-md-10
li.faded.large-p.negative-10
- a(href="/challenges/#{challenge.dashedName}")= challenge.name
+ a(href="/challenges/#{challenge.dashedName}")= challenge.title
else
.row
@@ -99,7 +98,7 @@ block content
span.negative-10
.col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10
- a(href="/challenges/#{challenge.dashedName}")= challenge.name
+ a(href="/challenges/#{challenge.dashedName}")= challenge.title
//#announcementModal.modal(tabindex='-1')
// .modal-dialog.animated.fadeInUp.fast-animation
From 5c987cbe9a8bd3e88369b3713e24207596da1075 Mon Sep 17 00:00:00 2001
From: Martin Kwan
Date: Mon, 10 Aug 2015 00:40:12 -0700
Subject: [PATCH 154/548] Updated Pig Latin Link
Updated link so it would open in a new tab instead of the current tab
---
seed/challenges/intermediate-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index a85f6367e6..965767fb2e 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -187,7 +187,7 @@
"difficulty": "2.04",
"description": [
"Translate the provided string to pig latin.",
- "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
+ "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
"If a word begins with a vowel you just add \"way\" to the end.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
From d56ecd197943dcac8ff7b2c673e91a90bbd72fe6 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 00:42:33 -0700
Subject: [PATCH 155/548] add a bunch of new images to onboarding
---
server/views/resources/get-started.jade | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index d88692aec0..a2dde178c9 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -7,11 +7,11 @@ block content
li.large-li.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/pYsTbjI.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Gtf8aIq.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Free Code Code camp is self-paced, browser-based, and free.
hr
@@ -19,19 +19,19 @@ block content
li.large-li.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rU7B4sn.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/dLx8nrg.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/yXyxbDd.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/PprMPUx.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
hr
@@ -79,7 +79,7 @@ block content
li.large-li.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/9NJfPQv.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
hr
@@ -103,7 +103,7 @@ block content
li.large-li.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Elb3dfj.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
hr
@@ -127,7 +127,7 @@ block content
| . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/6VtsD1K.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
hr
From d7e824ebbefcbbafe294c24b4ee65e351e5c1356 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 00:44:37 -0700
Subject: [PATCH 156/548] done adding static images
---
server/views/resources/get-started.jade | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index a2dde178c9..4623f5676e 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -131,7 +131,7 @@ block content
li.large-li.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/99BfAcK.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
hr
@@ -145,7 +145,7 @@ block content
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rWeBOhF.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
h2.text-center Nicely done. Now you have all the tools you need to succeed. Happy coding!
From aec86805679152971edf1a67a9fbae46a50aef51 Mon Sep 17 00:00:00 2001
From: ahstro
Date: Mon, 10 Aug 2015 14:42:02 +0200
Subject: [PATCH 157/548] Refactored CompletionMonitor() slightly
---
seed/challenge-migration.js | 14 --------------
seed/index.js | 21 +++++++++++----------
2 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/seed/challenge-migration.js b/seed/challenge-migration.js
index 5c8fd01590..7ef359781f 100644
--- a/seed/challenge-migration.js
+++ b/seed/challenge-migration.js
@@ -8,20 +8,6 @@ var bonfires = require('./bonfires.json'),
oldUri='mongodb://localhost:27017/app30893198',
coursewares = require('./coursewares.json');
-var counter = 0;
-var offerings = 2;
-
-var CompletionMonitor = function() {
- counter++;
- console.log('call ' + counter);
-
- if (counter < offerings) {
- return;
- } else {
- process.exit(0);
- }
-};
-
MongoClient.connect(oldUri, function(err, database) {
database.collection('users').find({}).batchSize(20).toArray(function(err, users) {
diff --git a/seed/index.js b/seed/index.js
index 3dbbf9d869..8c46b77f68 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -17,18 +17,19 @@ var Nonprofit = app.models.Nonprofit;
var Job = app.models.Job;
var counter = 0;
var challenges = getFilesFor('challenges');
-var offerings = 2 + challenges.length;
-var CompletionMonitor = function() {
+function completionMonitor() {
+ // Increment counter
counter++;
- console.log('call ' + counter);
- if (counter < offerings) {
- return;
- } else {
+ // Exit if all challenges have been checked
+ if (counter > challenges.length) {
process.exit(0);
}
-};
+
+ // Log where in the seed order we're currently at
+ console.log('Call: ' + counter + "/" + challenges.length);
+}
Challenge.destroyAll(function(err, info) {
if (err) {
@@ -66,7 +67,7 @@ Challenge.destroyAll(function(err, info) {
console.log(err);
} else {
console.log('Successfully parsed %s', file);
- CompletionMonitor();
+ completionMonitor();
}
}
);
@@ -85,7 +86,7 @@ Nonprofit.destroyAll(function(err, info) {
} else {
console.log('Saved ', data);
}
- CompletionMonitor();
+ completionMonitor();
console.log('nonprofits');
});
});
@@ -103,6 +104,6 @@ Job.destroyAll(function(err, info) {
console.log('Saved ', data);
}
console.log('jobs');
- CompletionMonitor();
+ completionMonitor();
});
});
From 9513a8b0e5539d2fe851c1aa5121756b00a9715a Mon Sep 17 00:00:00 2001
From: ahstro
Date: Mon, 10 Aug 2015 20:08:14 +0200
Subject: [PATCH 158/548] Incorrect JSON caused error during seed
---
seed/challenges/advanced-bonfires.json | 12 ++++++------
seed/challenges/upper-intermediate-bonfires.json | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json
index 32e684830c..6d67184b71 100644
--- a/seed/challenges/advanced-bonfires.json
+++ b/seed/challenges/advanced-bonfires.json
@@ -65,14 +65,14 @@
},
{
"id": "a3f503de51cf954ede28891d",
- "name": "Bonfire: Symmetric Difference",
- "dashedName": "bonfire-symmetric-difference",
+ "title": "Symmetric Difference",
"difficulty": "4.02",
"description": [
"Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
"The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
+ "type": "bonfire",
"challengeSeed": [
"function sym(args) {",
" return arguments;",
@@ -104,8 +104,7 @@
},
{
"id": "aa2e6f85cab2ab736c9a9b24",
- "name": "Bonfire: Exact Change",
- "dashedName": "bonfire-exact-change",
+ "title": "Exact Change",
"difficulty": "4.03",
"description": [
"Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
@@ -114,6 +113,7 @@
"Otherwise, return change in coin and bills, sorted in highest to lowest order.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
+ "type": "bonfire",
"challengeSeed": [
"function drawer(price, cash, cid) {",
" var change;",
@@ -160,13 +160,13 @@
},
{
"id": "a56138aff60341a09ed6c480",
- "name": "Bonfire: Inventory Update",
- "dashedName": "bonfire-inventory-update",
+ "title": "Inventory Update",
"difficulty": "4.04",
"description": [
"Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
+ "type": "bonfire",
"challengeSeed": [
"function inventory(arr1, arr2) {",
" // All inventory must be accounted for or you're fired!",
diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json
index bfd765facb..f99c278516 100644
--- a/seed/challenges/upper-intermediate-bonfires.json
+++ b/seed/challenges/upper-intermediate-bonfires.json
@@ -4,8 +4,7 @@
"challenges": [
{
"id": "a2f1d72d9b908d0bd72bb9f6",
- "name": "Bonfire: Make a Person",
- "dashedName": "bonfire-make-a-person",
+ "title": "Make a Person",
"difficulty": "3.01",
"description": [
"Fill in the object constructor with the methods specified in the tests.",
@@ -14,6 +13,7 @@
"These methods must be the only available means for interacting with the object.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
+ "type": "bonfire",
"challengeSeed": [
"var Person = function(firstAndLast) {",
" return firstAndLast;",
@@ -56,7 +56,7 @@
},
{
"id": "af4afb223120f7348cdfc9fd",
- "name": "Bonfire: Map the Debris",
+ "title": "Bonfire: Map the Debris",
"dashedName": "bonfire-map-the-debris",
"difficulty": "3.02",
"description": [
@@ -97,8 +97,7 @@
},
{
"id": "a3f503de51cfab748ff001aa",
- "name": "Bonfire: Pairwise",
- "dashedName": "bonfire-pairwise",
+ "title": "Pairwise",
"difficulty": "3.03",
"description": [
"Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.",
@@ -106,6 +105,7 @@
"pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
+ "type": "bonfire",
"challengeSeed": [
"function pairwise(arr, arg) {",
" return arg;",
From 133c91fd16d2d2b42dfc3699904fa5c730d97b53 Mon Sep 17 00:00:00 2001
From: Brett Guillory
Date: Mon, 10 Aug 2015 13:20:18 -0500
Subject: [PATCH 159/548] Fix for incorrect RGB test value
RGB test value was testing for (0,0,255) which is B, should be testing for (0, 255,0), which is green.
---
seed/challenges/jquery-ajax-and-json.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
index fa3f8641a9..b024e4ef77 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery-ajax-and-json.json
@@ -674,7 +674,7 @@
"Here's an example of how you would use the children()
function: $('#left-well').children().css('color', 'blue')
"
],
"tests": [
- "assert($('#target6').css('color') === 'rgb(0, 0, 255)', 'Your \"target6\" element should have green text.')",
+ "assert($('#target6').css('color') === 'rgb(0, 255, 0), 'Your \"target6\" element should have green text.')",
"assert(!editor.match(/\\.children\\(\\)\\.css/g), 'You should use the children()
function to modify these elements.')",
"assert(!editor.match(//g), 'Only use jQuery to add these classes to the element.')"
],
From 97b0ccac8fb2cc633e2b1a50050de6823a075f32 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 11:27:12 -0700
Subject: [PATCH 160/548] fix mising type remove extra bonfire in title
---
seed/challenges/advanced-bonfires.json | 7 +++----
seed/challenges/upper-intermediate-bonfires.json | 7 ++++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/seed/challenges/advanced-bonfires.json b/seed/challenges/advanced-bonfires.json
index 6d67184b71..97482403fa 100644
--- a/seed/challenges/advanced-bonfires.json
+++ b/seed/challenges/advanced-bonfires.json
@@ -5,7 +5,6 @@
{
"id": "aff0395860f5d3034dc0bfc9",
"title": "Validate US Telephone Numbers",
- "type": "bonfire",
"difficulty": "4.01",
"description": [
"Return true if the passed string is a valid US phone number",
@@ -51,6 +50,7 @@
"MDNlinks": [
"RegExp"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -72,7 +72,6 @@
"The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "type": "bonfire",
"challengeSeed": [
"function sym(args) {",
" return arguments;",
@@ -90,6 +89,7 @@
"Array.reduce()",
"Symmetric Difference"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -113,7 +113,6 @@
"Otherwise, return change in coin and bills, sorted in highest to lowest order.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "type": "bonfire",
"challengeSeed": [
"function drawer(price, cash, cid) {",
" var change;",
@@ -146,6 +145,7 @@
"MDNlinks": [
"Global Object"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -166,7 +166,6 @@
"Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "type": "bonfire",
"challengeSeed": [
"function inventory(arr1, arr2) {",
" // All inventory must be accounted for or you're fired!",
diff --git a/seed/challenges/upper-intermediate-bonfires.json b/seed/challenges/upper-intermediate-bonfires.json
index f99c278516..104b0312e2 100644
--- a/seed/challenges/upper-intermediate-bonfires.json
+++ b/seed/challenges/upper-intermediate-bonfires.json
@@ -13,7 +13,6 @@
"These methods must be the only available means for interacting with the object.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "type": "bonfire",
"challengeSeed": [
"var Person = function(firstAndLast) {",
" return firstAndLast;",
@@ -42,6 +41,7 @@
"Closures",
"Details of the Object Model"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -56,7 +56,7 @@
},
{
"id": "af4afb223120f7348cdfc9fd",
- "title": "Bonfire: Map the Debris",
+ "title": "Map the Debris",
"dashedName": "bonfire-map-the-debris",
"difficulty": "3.02",
"description": [
@@ -83,6 +83,7 @@
"MDNlinks": [
"Math.pow()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@@ -105,7 +106,6 @@
"pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
- "type": "bonfire",
"challengeSeed": [
"function pairwise(arr, arg) {",
" return arg;",
@@ -123,6 +123,7 @@
"MDNlinks": [
"Array.reduce()"
],
+ "type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
From 8dabd39950ee87dd7fcb3a4edb672a086a4883e8 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 12:14:38 -0700
Subject: [PATCH 161/548] add to seed script: exit on error filter challenge
blocks that do not have challenges
---
seed/index.js | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/seed/index.js b/seed/index.js
index 8c46b77f68..38305428a2 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -17,23 +17,25 @@ var Nonprofit = app.models.Nonprofit;
var Job = app.models.Job;
var counter = 0;
var challenges = getFilesFor('challenges');
+// plus two accounts for nonprofits and jobs seed.
+var numberToSave = challenges.length + 1;
function completionMonitor() {
// Increment counter
counter++;
// Exit if all challenges have been checked
- if (counter > challenges.length) {
+ if (counter >= numberToSave) {
process.exit(0);
}
// Log where in the seed order we're currently at
- console.log('Call: ' + counter + "/" + challenges.length);
+ console.log('Call: ' + counter + '/' + numberToSave);
}
Challenge.destroyAll(function(err, info) {
if (err) {
- console.error(err);
+ throw err;
} else {
console.log('Deleted ', info);
}
@@ -42,6 +44,13 @@ Challenge.destroyAll(function(err, info) {
var order = challengeSpec.order;
var block = challengeSpec.name;
+ // challenge file has no challenges...
+ if (challengeSpec.challenges.length === 0) {
+ console.log('file %s has no challenges', file);
+ completionMonitor();
+ return;
+ }
+
var challenges = challengeSpec.challenges
.map(function(challenge, index) {
// NOTE(berks): add title for displaying in views
@@ -64,10 +73,10 @@ Challenge.destroyAll(function(err, info) {
challenges,
function(err) {
if (err) {
- console.log(err);
+ throw err;
} else {
console.log('Successfully parsed %s', file);
- completionMonitor();
+ completionMonitor(err);
}
}
);
@@ -82,28 +91,28 @@ Nonprofit.destroyAll(function(err, info) {
}
Nonprofit.create(nonprofits, function(err, data) {
if (err) {
- console.log(err);
+ throw err;
} else {
console.log('Saved ', data);
}
- completionMonitor();
+ completionMonitor(err);
console.log('nonprofits');
});
});
Job.destroyAll(function(err, info) {
if (err) {
- console.error(err);
+ throw err;
} else {
console.log('Deleted ', info);
}
Job.create(jobs, function(err, data) {
if (err) {
- console.log(err);
+ console.log('error: ', err);
} else {
console.log('Saved ', data);
}
console.log('jobs');
- completionMonitor();
+ completionMonitor(err);
});
});
From 737adf1facb91ad01591eed8893418d1127eb639 Mon Sep 17 00:00:00 2001
From: Martin Kwan
Date: Mon, 10 Aug 2015 13:42:33 -0700
Subject: [PATCH 162/548] Update intermediate-bonfires.json
---
seed/challenges/intermediate-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index 965767fb2e..6a87b21446 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -187,7 +187,7 @@
"difficulty": "2.04",
"description": [
"Translate the provided string to pig latin.",
- "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
+ "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
"If a word begins with a vowel you just add \"way\" to the end.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
From 81af7a69e64c56475742b543babeca96bcaf75c2 Mon Sep 17 00:00:00 2001
From: Martin Kwan
Date: Mon, 10 Aug 2015 14:42:37 -0700
Subject: [PATCH 163/548] Updated DNA Pairing link
Updated link so it would open in a new tab instead of the current tab
---
seed/challenges/intermediate-bonfires.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index a85f6367e6..2187161c2a 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -229,7 +229,7 @@
"difficulty": "2.05",
"description": [
"The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.",
- "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
+ "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
"Return the provided character as the first element in each array.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
From add87ae801e36c6bf38bd46945bf68a55c9fc067 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 15:10:38 -0700
Subject: [PATCH 164/548] start simplifying account page
---
server/boot/user.js | 76 -----------
server/views/account/account.jade | 174 ++++++++----------------
server/views/partials/navbar.jade | 2 +-
server/views/resources/get-started.jade | 28 ++--
4 files changed, 71 insertions(+), 209 deletions(-)
diff --git a/server/boot/user.js b/server/boot/user.js
index aa925e6ac9..6afddc9feb 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -44,9 +44,7 @@ module.exports = function(app) {
router.post('/reset/:token', postReset);
router.get('/email-signup', getEmailSignup);
router.get('/email-signin', getEmailSignin);
-
router.get('/account/api', getAccountAngular);
- router.post('/account/profile', postUpdateProfile);
router.post('/account/password', postUpdatePassword);
router.post('/account/delete', postDeleteAccount);
router.get('/account/unlink/:provider', getOauthUnlink);
@@ -185,80 +183,6 @@ module.exports = function(app) {
);
}
- /**
- * POST /account/profile
- * Update profile information.
- */
-
- function postUpdateProfile(req, res, next) {
-
- User.findById(req.user.id, function(err) {
- if (err) { return next(err); }
- var errors = req.validationErrors();
- if (errors) {
- req.flash('errors', errors);
- return res.redirect('/account');
- }
-
- User.findOne({
- where: { email: req.body.email }
- }, function(err, existingEmail) {
- if (err) {
- return next(err);
- }
- var user = req.user;
- if (existingEmail && existingEmail.email !== user.email) {
- req.flash('errors', {
- msg: 'An account with that email address already exists.'
- });
- return res.redirect('/account');
- }
- User.findOne(
- { where: { username: req.body.username } },
- function(err, existingUsername) {
- if (err) {
- return next(err);
- }
- var user = req.user;
- if (
- existingUsername &&
- existingUsername.username !== user.username
- ) {
- req.flash('errors', {
- msg: 'An account with that username already exists.'
- });
- return res.redirect('/account');
- }
- var body = req.body || {};
- user.facebookProfile = body.facebookProfile.trim() || '';
- user.linkedinProfile = body.linkedinProfile.trim() || '';
- user.codepenProfile = body.codepenProfile.trim() || '';
- user.twitterHandle = body.twitterHandle.trim() || '';
- user.bio = body.bio.trim() || '';
-
- user.save(function(err) {
- if (err) {
- return next(err);
- }
- updateUserStoryPictures(
- user.id.toString(),
- user.picture,
- user.username,
- function(err) {
- if (err) { return next(err); }
- req.flash('success', {
- msg: 'Profile information updated.'
- });
- res.redirect('/account');
- }
- );
- });
- }
- );
- });
- });
- }
-
/**
* POST /account/password
* Update current password.
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 54c423dc10..526b604bf4 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -6,15 +6,11 @@ block content
.panel-heading.text-center Update your portfolio here:
.panel-body
if (!user.isGithubCool)
- .row
- .col-xs-12
- .text-left.btn-info.btn.btn-block.btn-link-social(href='http://www.freecodecamp.com/challenges/waypoint-join-our-chat-room')
- span Link your account to GitHub to update your portfolio page. Click here if you don’t have a GitHub account yet.
.row
.col-xs-12
a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
i.fa.fa-github
- | Link GitHub with my account
+ | Link GitHub to unlock profile
else
.row
.col-xs-12
@@ -22,117 +18,59 @@ block content
i.fa.fa-github
| Update Github Info
+ if (!user.twitter)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-twitter.btn-link-social.disabled(href='#')
+ i.fa.fa-twitter
+ | Add my Twitter to my profile
+ if (!user.google)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social.disabled(href='#')
+ i.fa.fa-google-plus
+ | Add my Google+ to my profile
+ if (!user.facebook)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-facebook.btn-link-social.disabled(href='#')
+ i.fa.fa-facebook
+ | Add my Facebook to my profile
+ if (!user.linkedin)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social.disabled(href='#')
+ i.fa.fa-linkedin
+ | Add my LinkedIn to my profile
+
+ .spacer
+ .spacer
.row
- .col-xs-12
- form.form-horizontal(action='/account/profile', method='POST', novalidate='novalidate', name='profileForm' ng-show="asyncComplete")
- input(type='hidden', name='_csrf', value=_csrf)
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='bio') Bio (140 characters)
- .col-sm-4
- input.form-control(type='text', name='bio', autocomplete="off", ng-model='user.bio', ng-maxlength='140', id='bio')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.bio.$error.maxlength && !profileForm.bio.$pristine')
- alert(type='danger')
- span.ion-close-circled
- | Your bio must be fewer than 140 characters.
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') Twitter
- .col-sm-4
- .input-group.twitter-input
- span.input-group-addon @
- input.form-control(type='text', name='twitterHandle', autocomplete="off", id='twitterHandle', ng-model='user.twitterHandle', ng-maxlength='15', ng-pattern="/^[A-z0-9_]+$/")
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.twitterHandle.$error.pattern")
- alert(type='danger')
- span.ion-close-circled
- | Your Twitter handle should only contain letters, numbers and underscores (az10_).
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show='profileForm.twitterHandle.$error.maxlength && !profileForm.twitterHandle.$pristine')
- alert(type='danger')
- span.ion-close-circled
- | Your name must be fewer than 15 characters.
-
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') CodePen
- .col-sm-4
- input.form-control(type='url', name='codepenProfile', id='codepenProfile', autocomplete="off", ng-model='user.codepenProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.codepenProfile.$error.url && !profileForm.codepenProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') LinkedIn
- .col-sm-4
- input.form-control(type='url', name='linkedinProfile', id='linkedinProfile', autocomplete="off", ng-model='user.linkedinProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.linkedinProfile.$error.url && !profileForm.linkedinProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- .form-group
- label.col-sm-3.col-sm-offset-1.control-label(for='email') Facebook
- .col-sm-4
- input.form-control(type='url', name='facebookProfile', id='facebookProfile', autocomplete="off", ng-model='user.facebookProfile', placeholder='http://')
- .col-sm-4.col-sm-offset-5(ng-cloak, ng-show="profileForm.facebookProfile.$error.url && !profileForm.facebookProfile.$pristine")
- alert(type='danger')
- span.ion-close-circled
- | Please enter a valid URL format (http://www.example.com).
-
- button.btn.btn-lg.btn-block.btn-primary.btn-link-social(type='submit', ng-disabled='!user.isGithubCool || profileForm.$invalid')
- span.ion-edit
- | Update my info
-
- .panel.panel-info
- .panel-heading.text-center Manage your account here:
- .panel-body
- if (!user.google || !user.facebook || !user.linkedin || !user.twitter)
- if (!user.twitter)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-twitter.btn-link-social.disabled(href='#')
- i.fa.fa-twitter
- | Link Twitter with my account
- if (!user.google)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social.disabled(href='#')
- i.fa.fa-google-plus
- | Link Google with my account
- if (!user.facebook)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-facebook.btn-link-social.disabled(href='#')
- i.fa.fa-facebook
- | Link Facebook with my account
- if (!user.linkedin)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social.disabled(href='#')
- i.fa.fa-linkedin
- | Link LinkedIn with my account
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
- span.ion-android-exit
- | Sign me out of Free Code Camp
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-danger.confirm-deletion.btn-link-social
- span.ion-trash-b
- | Delete my Free Code Camp account
- script.
- $('.confirm-deletion').on("click", function() {
- $('#modal-dialog').modal('show');
- });
- #modal-dialog.modal.animated.wobble
- .modal-dialog
- .modal-content
- .modal-header
- a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
- h3 Are you really leaving us?
- .modal-body
- p Pro Tip: If you tweet feedback to
- a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
- | , we'll act quickly on it!
- .modal-footer
- a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
- span.ion-happy
- | Nevermind, I'll stick around
- br
- form(action='/account/delete', method='POST')
- input(type='hidden', name='_csrf', value=_csrf)
- button.btn.btn-danger.btn-block(type='submit')
- span.ion-trash-b
- | Yes, Delete my account
+ .col-xs-6.col-sm-4.col-sm-offset-2
+ a.btn.btn-warning.btn-block.btn-link-social(href='/logout')
+ span.ion-android-exit
+ | Sign me out of Free Code Camp
+ .col-xs-6.col-sm-4
+ a.btn.btn-danger.btn-block.confirm-deletion.btn-link-social
+ span.ion-trash-b
+ | Delete my Free Code Camp account
+ script.
+ $('.confirm-deletion').on("click", function() {
+ $('#modal-dialog').modal('show');
+ });
+ #modal-dialog.modal.animated.wobble
+ .modal-dialog
+ .modal-content
+ .modal-header
+ a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
+ h3 Are you really leaving us?
+ .modal-body
+ p Pro Tip: If you tweet feedback to
+ a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
+ | , we'll act quickly on it!
+ .modal-footer
+ a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
+ span.ion-happy
+ | Nevermind, I'll stick around
+ br
+ form(action='/account/delete', method='POST')
+ input(type='hidden', name='_csrf', value=_csrf)
+ button.btn.btn-danger.btn-block(type='submit')
+ span.ion-trash-b
+ | Yes, Delete my account
diff --git a/server/views/partials/navbar.jade b/server/views/partials/navbar.jade
index 85996b95aa..d7861a224d 100644
--- a/server/views/partials/navbar.jade
+++ b/server/views/partials/navbar.jade
@@ -4,7 +4,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
.col-xs-12
span.hamburger-text Menu
a.navbar-brand(href='/')
- img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo')
+ img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg', alt='learn to code javascript at Free Code Camp logo')
.collapse.navbar-collapse
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
li
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 4623f5676e..5dd112a311 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -45,20 +45,20 @@ block content
li.large-li.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/nHtblsq.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption
a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
| and "star" it. "Starring" is the GitHub equivalent of "liking" something.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/.jpg' alt='a gif showing how to install this')
li.large-li.gif-caption Now that you have a GitHub account, you can
a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by authenticating with GitHub
- | .
+ | . Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuCW6SliIRINoxEuAxLiTplYPralqtcHLQB/image.png' alt='a gif showing how to install this')
+ li.large-li.gif-caption Our chat rooms are extremely active so you probably want to turn off notifications.
hr
img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
@@ -69,13 +69,13 @@ block content
li.large-li.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Ant4DdieE8tAK4kYWBxoNOL33ADbJeMBsjEB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption
a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnvXOQTSV1lKoJVwGK04sExskCXqLyLmM54B/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
hr
@@ -83,7 +83,7 @@ block content
li.large-li.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anv5CKnYXa5HGpBllbf1HRp0QgUc0rv5yTwB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
hr
@@ -99,7 +99,7 @@ block content
li.large-li.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnspWLymUEpJBZR6LvSCoBJFkn06NLa-GygB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
hr
@@ -107,7 +107,7 @@ block content
li.large-li.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
| . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
@@ -115,13 +115,13 @@ block content
| .
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
| and click "Gitter" to join your city's chat room.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anv-oGsT2wpH962kQu65XdL00BOP591gia8B/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption You can
a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
| . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
@@ -135,11 +135,11 @@ block content
li.large-li.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anse5JAKH0VFKLL6EiCzJHFXvJpTidGLszQB/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AHQRHsEhUsRNwpNHtw-nwYEj5Oj5AKTC678B/image.png' alt='a gif showing how to install this')
li.large-li.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
| .
From f8665324ad4afc5db7f47d50f5091f418347a13e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 15:37:49 -0700
Subject: [PATCH 165/548] simplify user account and profile system for github
locking
---
server/boot/user.js | 10 +--
server/views/account/account.jade | 101 +++++++++++++++---------------
server/views/account/show.jade | 20 +++---
3 files changed, 67 insertions(+), 64 deletions(-)
diff --git a/server/boot/user.js b/server/boot/user.js
index 6afddc9feb..77cd45ddfc 100644
--- a/server/boot/user.js
+++ b/server/boot/user.js
@@ -165,11 +165,11 @@ module.exports = function(app) {
isMigrationGrandfathered: user.isMigrationGrandfathered,
isGithubCool: user.isGithubCool,
location: user.location,
- githubProfile: user.githubProfile,
- linkedinProfile: user.linkedinProfile,
- codepenProfile: user.codepenProfile,
- facebookProfile: user.facebookProfile,
- twitterHandle: user.twitterHandle,
+ githubProfile: user.github,
+ linkedinProfile: user.linkedin,
+ googleProfile: user.google,
+ facebookProfile: user.facebook,
+ twitterHandle: user.twitter,
bio: user.bio,
picture: user.picture,
progressTimestamps: user.progressTimestamps,
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 526b604bf4..db839fe21d 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -3,74 +3,77 @@ block content
script.
var challengeName = 'Account View'
.panel.panel-info(ng-controller="profileValidationController")
- .panel-heading.text-center Update your portfolio here:
+ .panel-heading.text-center Manage your account here
.panel-body
if (!user.isGithubCool)
.row
.col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
- | Link GitHub to unlock profile
+ | Link my GitHub to unlock this profile
else
.row
.col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
- | Update Github Info
+ | Update my profile from Github
if (!user.twitter)
.col-xs-12
- a.btn.btn-lg.btn-block.btn-twitter.btn-link-social.disabled(href='#')
+ a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
i.fa.fa-twitter
| Add my Twitter to my profile
- if (!user.google)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social.disabled(href='#')
- i.fa.fa-google-plus
- | Add my Google+ to my profile
if (!user.facebook)
.col-xs-12
- a.btn.btn-lg.btn-block.btn-facebook.btn-link-social.disabled(href='#')
+ a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
i.fa.fa-facebook
| Add my Facebook to my profile
if (!user.linkedin)
.col-xs-12
- a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social.disabled(href='#')
+ a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
i.fa.fa-linkedin
| Add my LinkedIn to my profile
-
- .spacer
- .spacer
- .row
- .col-xs-6.col-sm-4.col-sm-offset-2
- a.btn.btn-warning.btn-block.btn-link-social(href='/logout')
- span.ion-android-exit
- | Sign me out of Free Code Camp
- .col-xs-6.col-sm-4
- a.btn.btn-danger.btn-block.confirm-deletion.btn-link-social
- span.ion-trash-b
- | Delete my Free Code Camp account
- script.
- $('.confirm-deletion').on("click", function() {
- $('#modal-dialog').modal('show');
- });
- #modal-dialog.modal.animated.wobble
- .modal-dialog
- .modal-content
- .modal-header
- a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
- h3 Are you really leaving us?
- .modal-body
- p Pro Tip: If you tweet feedback to
- a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
- | , we'll act quickly on it!
- .modal-footer
- a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
- span.ion-happy
- | Nevermind, I'll stick around
- br
- form(action='/account/delete', method='POST')
- input(type='hidden', name='_csrf', value=_csrf)
- button.btn.btn-danger.btn-block(type='submit')
- span.ion-trash-b
- | Yes, Delete my account
+ if (!user.google)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
+ i.fa.fa-google-plus
+ | Add my Google+ to my profile
+ .spacer
+ hr
+ .spacer
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
+ span.ion-android-exit
+ | Sign me out of Free Code Camp
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com')
+ span.ion-email
+ | Email us at team@freecodecamp.com
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-danger.btn-link-social.confirm-deletion
+ span.ion-trash-b
+ | Delete my Free Code Camp account
+ script.
+ $('.confirm-deletion').on("click", function() {
+ $('#modal-dialog').modal('show');
+ });
+ #modal-dialog.modal.animated.wobble
+ .modal-dialog
+ .modal-content
+ .modal-header
+ a.close(href='#', data-dismiss='modal', aria-hidden='true') ×
+ h3 Are you really leaving us?
+ .modal-body
+ p Pro Tip: If you tweet feedback to
+ a(href="https://twitter.com/intent/tweet?text=Hey%20@freecodecamp") @FreeCodeCamp
+ | , we'll act quickly on it!
+ .modal-footer
+ a.btn.btn-success.btn-block(href='#', data-dismiss='modal', aria-hidden='true')
+ span.ion-happy
+ | Nevermind, I'll stick around
+ br
+ form(action='/account/delete', method='POST')
+ input(type='hidden', name='_csrf', value=_csrf)
+ button.btn.btn-danger.btn-block(type='submit')
+ span.ion-trash-b
+ | Yes, Delete my account
diff --git a/server/views/account/show.jade b/server/views/account/show.jade
index bc65c80b17..87e5d828a5 100644
--- a/server/views/account/show.jade
+++ b/server/views/account/show.jade
@@ -23,16 +23,16 @@ block content
else
img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png')
h1.text-center.negative-5.profile-social-icons
- if (twitterHandle)
- a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href="http://twitter.com/#{twitterHandle}", target='_blank')
- if (githubProfile)
- a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=githubProfile, target='_blank')
- if (codepenProfile)
- a.ion-social-codepen.text-primary(title="@#{username}'s CodePen Profile", href=codepenProfile, target='_blank')
- if (linkedinProfile)
- a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedinProfile, target='_blank')
- if (facebookProfile)
- a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebookProfile, target='_blank')
+ if (twitter)
+ a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href=twitter, target='_blank')
+ if (github)
+ a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=github, target='_blank')
+ if (linkedin)
+ a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedin, target='_blank')
+ if (facebook)
+ a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebook, target='_blank')
+ if (google)
+ a.fa.fa-google-square.text-primary(title="@#{username}'s Google Profile", href=google, target='_blank')
.visible-md.visible-lg
.col-xs-12.col-sm-12.col-md-4.text-justify
h1.flat-top.wrappable= name
From 234aa0a5eaa7fcc90b6e3d5274b3febafd1a53e0 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 17:35:16 -0700
Subject: [PATCH 166/548] fix missing quote escape
---
seed/challenges/intermediate-bonfires.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/seed/challenges/intermediate-bonfires.json b/seed/challenges/intermediate-bonfires.json
index 1f2c681c89..743f4d2e1a 100644
--- a/seed/challenges/intermediate-bonfires.json
+++ b/seed/challenges/intermediate-bonfires.json
@@ -187,7 +187,7 @@
"difficulty": "2.04",
"description": [
"Translate the provided string to pig latin.",
- "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
+ "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
"If a word begins with a vowel you just add \"way\" to the end.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
@@ -229,7 +229,7 @@
"difficulty": "2.05",
"description": [
"The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.",
- "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
+ "Base pairs are a pair of AT and CG. Match the missing element to the provided character.",
"Return the provided character as the first element in each array.",
"Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
],
From d67c049d5baeccaffeefe1a953da789f7003987e Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 17:40:13 -0700
Subject: [PATCH 167/548] make onboarding page the default homepage for
authenticated users
---
public/css/main.less | 4 +
server/boot/home.js | 17 +-
server/views/resources/get-started.jade | 243 +++++++++++++-----------
3 files changed, 143 insertions(+), 121 deletions(-)
diff --git a/public/css/main.less b/public/css/main.less
index d03c73fc78..f23a5b1c9d 100644
--- a/public/css/main.less
+++ b/public/css/main.less
@@ -1034,6 +1034,10 @@ hr {
margin: 18px 0;
}
+.big-spacer {
+ padding: 30px 0 30px 0;
+}
+
#reply-to-main-post, #upvote {
cursor: pointer;
}
diff --git a/server/boot/home.js b/server/boot/home.js
index 2a75265e1a..1e40fb01a3 100644
--- a/server/boot/home.js
+++ b/server/boot/home.js
@@ -10,13 +10,18 @@ module.exports = function(app) {
app.use(router);
function index(req, res, next) {
- if (req.user && !req.user.picture) {
- req.user.picture = defaultProfileImage;
+ if (req.user)
+ if (!req.user.picture) {
+ req.user.picture = defaultProfileImage;
- req.user.save(function(err) {
- if (err) { return next(err); }
- res.render('home', { title: message });
- });
+ req.user.save(function (err) {
+ if (err) {
+ return next(err);
+ }
+ res.render('get-started', {title: message});
+ });
+ } else {
+ res.render('resources/get-started', {title: message});
} else {
res.render('home', { title: message });
}
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 5dd112a311..5dd1ac3452 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -2,151 +2,164 @@ extends ../layout
block content
.jumbotron
h2.text-center Do these steps to get ready for Free Code Camp (this only takes 10 minutes):
- ol
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/pYsTbjI.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/pYsTbjI.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Gtf8aIq.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Free Code Code camp is self-paced, browser-based, and free.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Gtf8aIq.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Free Code Code camp is self-paced, browser-based, and free.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/dLx8nrg.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/dLx8nrg.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/yXyxbDd.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/yXyxbDd.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/PprMPUx.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/PprMPUx.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.i.imgur.com/WAxbGZE.gif' alt='a gif showing how to install this')
- li.large-li.gif-caption
- a(href='https://github.com/join' target='_blank') Create an account with GitHub
- | . This will be private, so you should use your real email address.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/sign-up-for-github.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ a(href='https://github.com/join' target='_blank') Create an account with GitHub
+ | . Be sure to use your real email address - GitHub will keep this private.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/github-profile.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/nHtblsq.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption
- a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
- | and "star" it. "Starring" is the GitHub equivalent of "liking" something.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/star-repository.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
+ | and "star" it. "Starring" is the GitHub equivalent of "liking" something.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Now that you have a GitHub account, you can
- a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by authenticating with GitHub
- | . Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/join-gitter.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Now that you have a GitHub account, you can
+ a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank') join our main chat room by logging in with GitHub
+ | . Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuCW6SliIRINoxEuAxLiTplYPralqtcHLQB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption Our chat rooms are extremely active so you probably want to turn off notifications.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/gitter-notifications.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Our chat rooms are extremely active. You should change your settings so you're only notified if someone mentions you.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/private-messages.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/keep-chat-open.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Ant4DdieE8tAK4kYWBxoNOL33ADbJeMBsjEB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption
- a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
- | .
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/download-gitter-app.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnvXOQTSV1lKoJVwGK04sExskCXqLyLmM54B/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/challenge-map.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/9NJfPQv.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/9NJfPQv.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anv5CKnYXa5HGpBllbf1HRp0QgUc0rv5yTwB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/wiki.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Let's check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption You can also add a short bio, and links to your social media profiles.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/camper-news.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ | Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnspWLymUEpJBZR6LvSCoBJFkn06NLa-GygB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Elb3dfj.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Elb3dfj.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/join-facebook-group.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ span.text-info Try this:
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
+ | . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
- | . Click the "Join group" button to join your city's Facebook group. If your city isn't on this list,
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/How-to-create-a-Campsite-for-your-city' target='_blank') follow these directions to create a Facebook group for your city
- | .
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
+ p.large-p.gif-caption
+ a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
+ | and click "Gitter" to join your city's chat room.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption
- a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
- | and click "Gitter" to join your city's chat room.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/add-linkedin.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption You can
+ a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
+ | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anv-oGsT2wpH962kQu65XdL00BOP591gia8B/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption You can
- a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
- | . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/6VtsD1K.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/6VtsD1K.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/99BfAcK.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/99BfAcK.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/google-search.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/Anse5JAKH0VFKLL6EiCzJHFXvJpTidGLszQB/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/ask-for-help.gif' alt='a gif showing how to install this')
+ p.large-p.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
+ a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
+ | .
- hr
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AHQRHsEhUsRNwpNHtw-nwYEj5Oj5AKTC678B/image.png' alt='a gif showing how to install this')
- li.large-li.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
- a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
- | .
-
- hr
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rWeBOhF.jpg' alt='a gif showing how to install this')
- li.large-li.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
+ .big-spacer
+ img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rWeBOhF.jpg' alt='a gif showing how to install this')
+ p.large-p.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
h2.text-center Nicely done. Now you have all the tools you need to succeed. Happy coding!
a.btn.btn-cta.signup-btn.btn-block(href="/map") Take me to my Challenge Map
From 4b0e95280d8826745ca00735aeca435c570bdfbe Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 17:40:45 -0700
Subject: [PATCH 168/548] fix duplicate id's
---
seed/challenges/expert-bonfires.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
index 06ab698fb1..13bbd967de 100644
--- a/seed/challenges/expert-bonfires.json
+++ b/seed/challenges/expert-bonfires.json
@@ -3,7 +3,7 @@
"order": 0.013,
"challenges": [
{
- "id": "aff0395860f5d3034dc0bfc9",
+ "id": "aff0495970f5d3034dc0bfc9",
"title": "Validate US Telephone Numbers",
"difficulty": "4.01",
"description": [
@@ -64,7 +64,7 @@
"descriptionPt": []
},
{
- "id": "a3f503de51cf954ede28891d",
+ "id": "a3f512de51cf954ede28891d",
"title": "Symmetric Difference",
"difficulty": "4.02",
"description": [
@@ -103,7 +103,7 @@
"descriptionPt": []
},
{
- "id": "aa2e6f85cab2ab736c9a9b24",
+ "id": "aa2e6f96cab3ab736c9a9b24",
"title": "Exact Change",
"difficulty": "4.03",
"description": [
@@ -159,7 +159,7 @@
"descriptionPt": []
},
{
- "id": "a56138aff60341a09ed6c480",
+ "id": "a56244aff60341a09ed6c480",
"title": "Inventory Update",
"difficulty": "4.04",
"description": [
@@ -214,7 +214,7 @@
"descriptionPt": []
},
{
- "id": "a7bf700cd123b9a54eef01d5",
+ "id": "a8bf800cd123b9a54eef01d5",
"title": "No repeats please",
"difficulty": "4.05",
"description": [
@@ -256,7 +256,7 @@
"descriptionPt": []
},
{
- "id": "a19f0fbe1872186acd434d5a",
+ "id": "a19f0fbe1872186acd434d54",
"title": "Friendly Date Ranges",
"difficulty": "4.06",
"description": [
From 8a1694203675e872c4eb50cbbda5ac21ab1e8ae5 Mon Sep 17 00:00:00 2001
From: sonorangirl
Date: Mon, 10 Aug 2015 18:05:07 -0700
Subject: [PATCH 169/548] Fixed typos in 1st slot machine challenge
---
seed/challenges/basic-javascript.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index c8cd7046a9..04fd44d166 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1071,16 +1071,16 @@
"title": "Create a JavaScript Slot Machine",
"difficulty":"9.988",
"description":[
- "We are now going to try and combine some of the stuff we've just learnt abd create the logic for a slot machine game",
+ "We are now going to try and combine some of the stuff we've just learned and create the logic for a slot machine game",
"For this we will need to generate three random numbers between 1
and 5
to represent the possible values of each individual slot",
"Store the three random numbers in slotOne
, slotTwo
and slotThree
",
"Generate the random numbers by using the system we used earlier in /challenges/random-whole-numbers-in-a-range",
"Math.floor(Math.random() * (5 - 1 + 1)) + 1;
"
],
"tests":[
- "assert(typeof(runSlots($('.slot'))[0]) == 'number', 'SlotOne should be a random number');",
- "assert(typeof(runSlots($('.slot'))[1]) == 'number', 'SlotTwo should be a random number');",
- "assert(typeof(runSlots($('.slot'))[2]) == 'number', 'SlotThree should be a random number');",
+ "assert(typeof(runSlots($('.slot'))[0]) == 'number', 'slotOne should be a random number');",
+ "assert(typeof(runSlots($('.slot'))[1]) == 'number', 'slotTwo should be a random number');",
+ "assert(typeof(runSlots($('.slot'))[2]) == 'number', 'slotThree should be a random number');",
"assert((function(){if(editor.match(/Math.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi) !== null){return(editor.match(/Math.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi).length >= 3);}else{return(false);}})(), 'You should have used Math.floor(Math.random() * (5 - 1 + 1)) + 1; three times to generate your random numbers');"
],
"challengeSeed":[
From 8efe8ee825b2f22e3aa6a41d595b9ebb63e7b8ca Mon Sep 17 00:00:00 2001
From: sonorangirl
Date: Mon, 10 Aug 2015 19:22:18 -0700
Subject: [PATCH 170/548] Fixed RegEx so that 4th test would pass
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 04fd44d166..7834110ea0 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1081,7 +1081,7 @@
"assert(typeof(runSlots($('.slot'))[0]) == 'number', 'slotOne should be a random number');",
"assert(typeof(runSlots($('.slot'))[1]) == 'number', 'slotTwo should be a random number');",
"assert(typeof(runSlots($('.slot'))[2]) == 'number', 'slotThree should be a random number');",
- "assert((function(){if(editor.match(/Math.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi) !== null){return(editor.match(/Math.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi).length >= 3);}else{return(false);}})(), 'You should have used Math.floor(Math.random() * (5 - 1 + 1)) + 1; three times to generate your random numbers');"
+ "assert((function(){if(editor.match(/Math\\.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi) !== null){return(editor.match(/Math\\.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi).length >= 3);}else{return(false);}})(), 'You should have used Math.floor(Math.random() * (5 - 1 + 1)) + 1; three times to generate your random numbers');"
],
"challengeSeed":[
"fccss",
From fb44b50941a575781e815223ace36da9a6dd3f04 Mon Sep 17 00:00:00 2001
From: sonorangirl
Date: Mon, 10 Aug 2015 19:32:52 -0700
Subject: [PATCH 171/548] Made some spaces optional for 4th test
---
seed/challenges/basic-javascript.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 7834110ea0..0aa6f4f02f 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1081,7 +1081,7 @@
"assert(typeof(runSlots($('.slot'))[0]) == 'number', 'slotOne should be a random number');",
"assert(typeof(runSlots($('.slot'))[1]) == 'number', 'slotTwo should be a random number');",
"assert(typeof(runSlots($('.slot'))[2]) == 'number', 'slotThree should be a random number');",
- "assert((function(){if(editor.match(/Math\\.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi) !== null){return(editor.match(/Math\\.floor\\(Math\\.random\\(\\)\\s\\*\\s\\(5\\s\\-\\s1\\s\\+\\s1\\)\\)\\s\\+\\s1;/gi).length >= 3);}else{return(false);}})(), 'You should have used Math.floor(Math.random() * (5 - 1 + 1)) + 1; three times to generate your random numbers');"
+ "assert((function(){if(editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?5\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi) !== null){return(editor.match(/Math\\.floor\\(\\s?Math\\.random\\(\\)\\s?\\*\\s?\\(\\s?5\\s?\\-\\s?1\\s?\\+\\s?1\\s?\\)\\s?\\)\\s?\\+\\s?1;/gi).length >= 3);}else{return(false);}})(), 'You should have used Math.floor(Math.random() * (5 - 1 + 1)) + 1; three times to generate your random numbers');"
],
"challengeSeed":[
"fccss",
From 853c728d9ce0482478740d34dd80d10461354a9c Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 20:13:13 -0700
Subject: [PATCH 172/548] improve get-started view and fix duplicate bonfire
issue
---
seed/challenges/expert-bonfires.json | 304 ------------------------
server/views/resources/get-started.jade | 66 ++---
2 files changed, 34 insertions(+), 336 deletions(-)
delete mode 100644 seed/challenges/expert-bonfires.json
diff --git a/seed/challenges/expert-bonfires.json b/seed/challenges/expert-bonfires.json
deleted file mode 100644
index d5322b08f3..0000000000
--- a/seed/challenges/expert-bonfires.json
+++ /dev/null
@@ -1,304 +0,0 @@
-{
- "name": "Expert Algorithm Scripting",
- "order": 0.013,
- "challenges": [
- {
- "id": "aff0495970f5d3034dc0bfc9",
- "title": "Validate US Telephone Numbers",
- "difficulty": "4.01",
- "description": [
- "Return true if the passed string is a valid US phone number",
- "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:",
- "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555",
- "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "tests": [
- "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");",
- "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"5555555555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);",
- "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);",
- "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);",
- "assert.deepEqual(telephoneCheck(\"55555555\"), false);",
- "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);",
- "assert.deepEqual(telephoneCheck(\"27576227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);",
- "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);"
- ],
- "challengeSeed": [
- "function telephoneCheck(str) {",
- " // Good luck!",
- " return true;",
- "}",
- "",
- "",
- "",
- "telephoneCheck(\"555-555-5555\");"
- ],
- "MDNlinks": [
- "RegExp"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a3f512de51cf954ede28891d",
- "title": "Symmetric Difference",
- "difficulty": "4.02",
- "description": [
- "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.",
- "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function sym(args) {",
- " return arguments;",
- "}",
- "",
- "sym([1, 2, 3], [5, 2, 1, 4]);"
- ],
- "tests": [
- "assert.deepEqual(sym([1, 2, 3], [5, 2, 1, 4]).sort(), [3, 4, 5], 'should return the symmetric difference of the given arrays');",
- "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'should return the symmetric difference of the given arrays');",
- "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'should return an array of unique values');",
- "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');"
- ],
- "MDNlinks": [
- "Array.reduce()",
- "Symmetric Difference"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "aa2e6f96cab3ab736c9a9b24",
- "title": "Exact Change",
- "difficulty": "4.03",
- "description": [
- "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.",
- "cid is a 2d array listing available currency.",
- "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.",
- "Otherwise, return change in coin and bills, sorted in highest to lowest order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function drawer(price, cash, cid) {",
- " var change;",
- " // Here is your change, ma'am.",
- " return change;",
- "}",
- "",
- "// Example cash-in-drawer array:",
- "// [['PENNY', 1.01],",
- "// ['NICKEL', 2.05],",
- "// ['DIME', 3.10],",
- "// ['QUARTER', 4.25],",
- "// ['ONE', 90.00],",
- "// ['FIVE', 55.00],",
- "// ['TEN', 20.00],",
- "// ['TWENTY', 60.00],",
- "// ['ONE HUNDRED', 100.00]]",
- "",
- "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);"
- ],
- "tests": [
- "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');",
- "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');",
- "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');"
- ],
- "MDNlinks": [
- "Global Object"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a56244aff60341a09ed6c480",
- "title": "Inventory Update",
- "difficulty": "4.04",
- "description": [
- "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function inventory(arr1, arr2) {",
- " // All inventory must be accounted for or you're fired!",
- " return arr1;",
- "}",
- "",
- "// Example inventory lists",
- "var curInv = [",
- " [21, 'Bowling Ball'],",
- " [2, 'Dirty Sock'],",
- " [1, 'Hair Pin'],",
- " [5, 'Microphone']",
- "];",
- "",
- "var newInv = [",
- " [2, 'Hair Pin'],",
- " [3, 'Half-Eaten Apple'],",
- " [67, 'Bowling Ball'],",
- " [7, 'Toothpaste']",
- "];",
- "",
- "inventory(curInv, newInv);"
- ],
- "tests": [
- "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');",
- "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);",
- "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);",
- "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);"
- ],
- "MDNlinks": [
- "Global Array Object"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a8bf800cd123b9a54eef01d5",
- "title": "No repeats please",
- "difficulty": "4.05",
- "description": [
- "Return the number of total permutations of the provided string that don't have repeated consecutive letters.",
- "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function permAlone(str) {",
- " return str;",
- "}",
- "",
- "permAlone('aab');"
- ],
- "tests": [
- "expect(permAlone('aab')).to.be.a('number');",
- "expect(permAlone('aab')).to.equal(2);",
- "expect(permAlone('aaa')).to.equal(0);",
- "expect(permAlone('aabb')).to.equal(8);",
- "expect(permAlone('abcdefa')).to.equal(3600);",
- "expect(permAlone('abfdefa')).to.equal(2640);",
- "expect(permAlone('zzzzzzzz')).to.equal(0);"
- ],
- "MDNlinks": [
- "Permutations",
- "RegExp"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- },
- {
- "id": "a19f0fbe1872186acd434d54",
- "title": "Friendly Date Ranges",
- "difficulty": "4.06",
- "description": [
- "Implement a way of converting two dates into a more friendly date range that could be presented to a user.",
- "It must not show any redundant information in the date range.",
- "For example, if the year and month are the same then only the day range should be displayed.",
- "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.",
- "Input date is formatted as YYYY-MM-DD",
- "Remember to use RSAP if you get stuck. Try to pair program. Write your own code."
- ],
- "challengeSeed": [
- "function friendly(str) {",
- " return str;",
- "}",
- "",
- "friendly(['2015-07-01', '2015-07-04']);"
- ],
- "tests": [
- "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');",
- "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');",
- "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);",
- "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');",
- "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');",
- "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);"
- ],
- "MDNlinks": [
- "String.split()",
- "String.substr()",
- "parseInt()"
- ],
- "type": "bonfire",
- "challengeType": 5,
- "nameCn": "",
- "descriptionCn": [],
- "nameFr": "",
- "descriptionFr": [],
- "nameRu": "",
- "descriptionRu": [],
- "nameEs": "",
- "descriptionEs": [],
- "namePt": "",
- "descriptionPt": []
- }
- ]
-}
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 5dd1ac3452..6f5d353b74 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -1,60 +1,60 @@
extends ../layout
block content
.jumbotron
- h2.text-center Do these steps to get ready for Free Code Camp (this only takes 10 minutes):
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ h2.text-center This 10-minute guide will help you get the most out of Free Code Camp.
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/pYsTbjI.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/pYsTbjI.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Learning to code is hard. To succeed, you'll need lots practice and support. That's why we've created a rigorous curriculum and supportive community.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Gtf8aIq.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/Gtf8aIq.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Free Code Code camp is self-paced, browser-based, and free.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/D7Y5luw.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption If you can finish Free Code Camp, you will be able to get a coding job. There are thousands of coding jobs currently going unfilled, and the demand for coders grows every year.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/dLx8nrg.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/dLx8nrg.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/yXyxbDd.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/yXyxbDd.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption During the last 800 hours, you'll build several real-life projects for nonprofits.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/PprMPUx.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/PprMPUx.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption By the time you finish, you'll have a job-winning portfolio of real apps that people use every day.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/EAR7Lvh.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Now let's join Free Code Camp's chat rooms. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/sign-up-for-github.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/sign-up-for-github.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
a(href='https://github.com/join' target='_blank') Create an account with GitHub
| . Be sure to use your real email address - GitHub will keep this private.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/github-profile.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/github-profile.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your name if you want.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/star-repository.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/star-repository.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
a(href='//github.com/freecodecamp/freecodecamp' target='_blank') Go to Free Code Camp's open-source repository
| and "star" it. "Starring" is the GitHub equivalent of "liking" something.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/join-gitter.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/join-gitter.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Now that you have a GitHub account, you can
@@ -62,64 +62,64 @@ block content
| . Introduce yourself by saying "Hello world!". Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/gitter-notifications.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/gitter-notifications.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Our chat rooms are extremely active. You should change your settings so you're only notified if someone mentions you.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/private-messages.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/private-messages.gif' alt='a gif showing how to install this')
p.large-p.gif-caption Please note that all of our chat rooms are visible to the public. If you need to share sensitive information, such as an email address or phone number, do it in a private message.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/keep-chat-open.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/keep-chat-open.gif' alt='a gif showing how to install this')
p.large-p.gif-caption Keep our chat room open while you work through our challenges. That way, you can ask for help if you get stuck. You can also socialize with other campers when you feel like taking a break.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/download-gitter-app.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/download-gitter-app.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
a(href='https://gitter.im/apps' target='_blank') You can also download the chat room app to your computer or phone
| .
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/challenge-map.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/challenge-map.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Click the "Map" button in your upper right hand corner. Our map shows all our coding challenges. We recommend that you complete these from top to bottom, at a sustainable pace.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/9NJfPQv.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/9NJfPQv.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption After you finish all of our challenges, you'll start building projects for nonprofits.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/wiki.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/wiki.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/camper-news.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/camper-news.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Click the "News" button in your upper right hand corner. You can browse links on Camper News and upvote ones that you enjoy.
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/Elb3dfj.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/Elb3dfj.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Our Campsites help you code with campers in your city. You can coordinate study groups or attend local coding events together.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/join-facebook-group.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/join-facebook-group.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Find your city on this list
@@ -128,38 +128,40 @@ block content
| .
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
p.large-p.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
| and click "Gitter" to join your city's chat room.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/add-linkedin.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/add-linkedin.gif' alt='a gif showing how to install this')
p.large-p.gif-caption You can
a(href='https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp' target='_blank') add Free Code Camp to your LinkedIn education background
| . Set your graduation date as next year. For "Degree", type "Full Stack Web Development". For "Field of study", type "Computer Software Engineering". Then click "Save Changes".
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/6VtsD1K.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/6VtsD1K.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Let's cover one last thing before you start working through our challenges: how to get help. Any time you get stuck or don't know what to do next: RSAP (Read, Search, Ask, Post).
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/99BfAcK.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/99BfAcK.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/google-search.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/google-search.gif' alt='a gif showing how to install this')
p.large-p.gif-caption If that didn't help, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.
.big-spacer
- img.gif-block.img-center.img-responsive(src='https://s3.amazonaws.com/freecodecamp/ask-for-help.gif' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/ask-for-help.gif' alt='a gif showing how to install this')
p.large-p.gif-caption If that didn't help, A - Ask your friends. If you have trouble, you can ask your fellow campers in our
a(href='https://gitter.im/FreeCodeCamp/Help' target='_blank') help chat room
| .
.big-spacer
- img.gif-block.img-center.img-responsive(src='http://i.imgur.com/rWeBOhF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/rWeBOhF.jpg' alt='a gif showing how to install this')
p.large-p.gif-caption Finally if you still haven't found an answer to your question, P - Post on Stack Overflow. This is a popular question and answer site where you can get help with coding questions.
+ .big-spacer
h2.text-center Nicely done. Now you have all the tools you need to succeed. Happy coding!
+ .spacer
a.btn.btn-cta.signup-btn.btn-block(href="/map") Take me to my Challenge Map
From 7bfe61731b5055eba4aecd5c97ccddf9f0d76027 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 20:55:01 -0700
Subject: [PATCH 173/548] give a user a brownie point when they start
---
common/models/user.js | 8 ++++
server/views/account/account.jade | 64 ++++++++++++-------------
server/views/resources/get-started.jade | 2 +-
3 files changed, 39 insertions(+), 35 deletions(-)
diff --git a/common/models/user.js b/common/models/user.js
index 81078d6df0..8f79fe6b75 100644
--- a/common/models/user.js
+++ b/common/models/user.js
@@ -51,6 +51,14 @@ module.exports = function(User) {
user.email = typeof user.email === 'string' ?
user.email.trim().toLowerCase() :
user.email;
+
+ if (!user.progressTimestamps) {
+ user.progressTimestamps = [];
+ }
+
+ if (user.progressTimestamps.length === 0) {
+ user.progressTimestamps.push({ timestamp: Date.now() });
+ }
}
next();
});
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index db839fe21d..22ad1b9975 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -5,42 +5,38 @@ block content
.panel.panel-info(ng-controller="profileValidationController")
.panel-heading.text-center Manage your account here
.panel-body
- if (!user.isGithubCool)
- .row
+ .row
.col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
- i.fa.fa-github
- | Link my GitHub to unlock this profile
- else
- .row
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
- i.fa.fa-github
- | Update my profile from Github
+ if (!user.isGithubCool)
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ i.fa.fa-github
+ | Link my GitHub to unlock this profile
+ else
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
+ i.fa.fa-github
+ | Update my profile from Github
- if (!user.twitter)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
- i.fa.fa-twitter
- | Add my Twitter to my profile
- if (!user.facebook)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
- i.fa.fa-facebook
- | Add my Facebook to my profile
- if (!user.linkedin)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
- i.fa.fa-linkedin
- | Add my LinkedIn to my profile
- if (!user.google)
- .col-xs-12
- a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
- i.fa.fa-google-plus
- | Add my Google+ to my profile
- .spacer
- hr
- .spacer
+ if (!user.twitter)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/link/twitter')
+ i.fa.fa-twitter
+ | Add my Twitter to my profile
+ if (!user.facebook)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/link/facebook')
+ i.fa.fa-facebook
+ | Add my Facebook to my profile
+ if (!user.linkedin)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/link/linkedin')
+ i.fa.fa-linkedin
+ | Add my LinkedIn to my profile
+ if (!user.google)
+ .col-xs-12
+ a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/link/google')
+ i.fa.fa-google-plus
+ | Add my Google+ to my profile
+ .big-spacer
.col-xs-12
a.btn.btn-lg.btn-block.btn-warning.btn-link-social(href='/logout')
span.ion-android-exit
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 6f5d353b74..2ac55a009c 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -99,7 +99,7 @@ block content
| Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
.big-spacer
- img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AlwO6CNq-OJJXJ3qu2nu1E7ePe72hCSW5IcB/image.png' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
From 341d9318338446b5ecdecf9c07d04275d84a8033 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 21:01:37 -0700
Subject: [PATCH 174/548] fix streak show days
---
server/views/account/show.jade | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/views/account/show.jade b/server/views/account/show.jade
index 87e5d828a5..78cf71c7cf 100644
--- a/server/views/account/show.jade
+++ b/server/views/account/show.jade
@@ -77,8 +77,8 @@ block content
.row
.hidden-xs.col-sm-12.text-center
.row.text-primary
- h4.col-sm-6.text-right Longest Streak: #{longestStreak + longestStreak === 1 ? ' day' : ' days'}
- h4.col-sm-6.text-left Current Streak: #{currentStreak + currentStreak === 1 ? ' day' : ' days'}
+ h4.col-sm-6.text-right Longest Streak: #{longestStreak} #{longestStreak + longestStreak === 1 ? ' day' : ' days'}
+ h4.col-sm-6.text-left Current Streak: #{currentStreak} #{currentStreak + currentStreak === 1 ? ' day' : ' days'}
if (challenges.length > 0)
From 43e3dc8914086923760c295fdee3a4ae339d7d17 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 21:55:13 -0700
Subject: [PATCH 175/548] Finish onboarding page
---
server/views/account/show.jade | 2 +-
server/views/resources/get-started.jade | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/views/account/show.jade b/server/views/account/show.jade
index 78cf71c7cf..ce58b8ba4a 100644
--- a/server/views/account/show.jade
+++ b/server/views/account/show.jade
@@ -10,7 +10,7 @@ block content
if (user && user.username === username)
.row.text-center
.col-xs-12.col-sm-10.col-sm-offset-1
- a.btn.btn-big.btn-primary.btn-block(href="/account") Update my portfolio page or manage my account
+ a.btn.btn-big.btn-primary.btn-block(href="/account") Manage my account
.button-spacer
.col-xs-12.col-sm-10.col-sm-offset-1
a.btn.btn-big.btn-success.btn-block(href="/signout") Sign out of Free Code Camp
diff --git a/server/views/resources/get-started.jade b/server/views/resources/get-started.jade
index 2ac55a009c..2b4692042f 100644
--- a/server/views/resources/get-started.jade
+++ b/server/views/resources/get-started.jade
@@ -99,13 +99,13 @@ block content
| Click the "Wiki" button in your upper right hand corner. Our community has contributed lots of useful information to this searchable wiki.
.big-spacer
- img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AlwO6CNq-OJJXJ3qu2nu1E7ePe72hCSW5IcB/image.png' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/add-github-to-profile.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
span.text-info Try this:
| Check out your portfolio page. Click your picture your upper right hand corner. Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.
.big-spacer
- img.gif-block.img-center.img-responsive.thumbnail(src='http://i.imgur.com/RlEk2IF.jpg' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/check-public-profile.gif' alt='a gif showing how to install this')
p.large-p.gif-caption Your portfolio page shows your progress and how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms. If you get Brownie Points on several days in a row, you'll get a streak.
.big-spacer
@@ -128,7 +128,7 @@ block content
| .
.big-spacer
- img.gif-block.img-center.img-responsive.thumbnail(src='https://www.evernote.com/l/AnuMiYJUMhFOzqKu2bAjL88LIrCiuHr998sB/image.png' alt='a gif showing how to install this')
+ img.gif-block.img-center.img-responsive.thumbnail(src='https://s3.amazonaws.com/freecodecamp/join-campsite-gitter-room.gif' alt='a gif showing how to install this')
p.large-p.gif-caption
a(href='https://github.com/FreeCodeCamp/freecodecamp/wiki/List-of-Free-Code-Camp-city-based-Campsites' target='_blank') Go back to our list of Campsites
| and click "Gitter" to join your city's chat room.
From b4f5f1a81efbfd78e5f0fe58edcde99e0084145a Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Mon, 10 Aug 2015 22:17:49 -0700
Subject: [PATCH 176/548] get everything seeding again
---
seed/challenges/bootstrap.json | 6 +-
...{jquery-ajax-and-json.json => jquery.json} | 536 ++----------------
seed/challenges/json-apis-and-ajax.json | 494 +++++++++++++++-
...t-oriented-and-functional-programming.json | 2 +-
4 files changed, 534 insertions(+), 504 deletions(-)
rename seed/challenges/{jquery-ajax-and-json.json => jquery.json} (76%)
diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json
index 447dd8be24..21f80faff4 100644
--- a/seed/challenges/bootstrap.json
+++ b/seed/challenges/bootstrap.json
@@ -787,7 +787,7 @@
"descriptionPt": []
},
{
- "id": "bad87fee1348bd9aedf08845",
+ "id": "bad87fee1347bd9aedf08845",
"title": "Ditch Custom CSS for Bootstrap",
"difficulty": 2.10,
"description": [
@@ -887,8 +887,7 @@
},
{
"id": "bad87fee1348bd9aedf08845",
- "name": "Waypoint: Use Spans for Inline Elements",
- "dashedName": "waypoint-use-spans-for-inline-elements",
+ "title": "Use Spans for Inline Elements",
"difficulty": 2.105,
"description": [
"You can use use spans to create inline elements. Remember when we used the \"btn-block\" class to make the button grow fill the entire row?",
@@ -974,6 +973,7 @@
" ",
" "
],
+ "type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery.json
similarity index 76%
rename from seed/challenges/jquery-ajax-and-json.json
rename to seed/challenges/jquery.json
index 99e4420cd0..b6480e7048 100644
--- a/seed/challenges/jquery-ajax-and-json.json
+++ b/seed/challenges/jquery.json
@@ -43,7 +43,8 @@
" "
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9bedc08826",
@@ -92,7 +93,8 @@
"
"
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aedc08826",
@@ -142,7 +144,8 @@
" "
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aeda08826",
@@ -193,7 +196,8 @@
"
"
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aeda08726",
@@ -245,7 +249,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed908626",
@@ -296,7 +301,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed918626",
@@ -346,7 +352,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed908826",
@@ -400,7 +407,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed808826",
@@ -451,7 +459,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed708826",
@@ -499,7 +508,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed608826",
@@ -551,7 +561,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed508826",
@@ -605,7 +616,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed308826",
@@ -660,7 +672,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed208826",
@@ -716,7 +729,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed108826",
@@ -773,7 +787,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9aed008826",
@@ -832,11 +847,12 @@
""
],
"type": "waypoint",
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
"id": "bad87fee1348bd9bed008826",
- "name": "Waypoint: Target Odd Numbered Elements Using jQuery",
+ "title": "Target Odd Numbered Elements Using jQuery",
"dashedName": "waypoint-target-odd-numbered-elements-using-jquery",
"difficulty": 3.165,
"description": [
@@ -892,7 +908,8 @@
" ",
""
],
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
},
{
@@ -951,487 +968,8 @@
""
],
"type": "waypoint",
- "challengeType": 0
- },
-
- {
- "id": "bad87fee1348bd9aeca08826",
- "name": "Waypoint: Trigger on click Events with jQuery",
- "dashedName": "waypoint-trigger-onclick-events-with-jquery",
- "difficulty": 3.19,
- "description": [
- ".on('click', function() {
",
- "",
- "});
"
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {
",
- "",
- " });
",
- "fcces",
- "",
- "",
- "",
- "",
- " ",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad84fee1348bd9aecc58826",
- "name": "Waypoint: Read Data from an Element Using jQuery",
- "dashedName": "waypoint-read-data-from-an-element-using-jquery",
- "difficulty": 3.17,
- "description": [
- "Let's make everything roll with rollOut
."
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {",
- " $('button').on('click', function() {",
- "",
- " });",
- " });",
- "fcces",
- "",
- "",
- "",
- "",
- "
",
- "
",
- " ",
- "
",
- "
",
- "
#click-me ",
- "
Is the checkbox checked? ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad84fee1348bd9aecc48826",
- "name": "Waypoint: Read Data from an Element Using jQuery",
- "dashedName": "waypoint-read-data-from-an-element-using-jquery",
- "difficulty": 3.17,
- "description": [
- "Let's make everything roll with
rollOut
."
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {",
- " $('button').on('click', function() {",
- " $('#click-me').addClass('animated shake');",
- " });",
- " });",
- "fcces",
- "",
- "",
- "",
- "
",
- "
",
- "
",
- " ",
- "
",
- "
",
- "
#click-me ",
- "
Is the checkbox checked? ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad84fee1348bd9aecc38826",
- "name": "Waypoint: Read Data from an Element Using jQuery",
- "dashedName": "waypoint-read-data-from-an-element-using-jquery",
- "difficulty": 3.17,
- "description": [
- "Let's make everything roll with
rollOut
."
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {",
- " $('button').on('click', function() {",
- " $('#click-me').addClass('animated shake');",
- " $('#checked-state').text('happy text');",
- " });",
- " });",
- "fcces",
- "",
- "",
- "",
- "
",
- "
",
- "
",
- " ",
- "
",
- "
",
- "
#click-me ",
- "
Is the checkbox checked? ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad84fee1348bd9aecc28826",
- "name": "Waypoint: Read Data from an Element Using jQuery",
- "dashedName": "waypoint-read-data-from-an-element-using-jquery",
- "difficulty": 3.17,
- "description": [
- "Let's make everything roll with
rollOut
."
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {",
- " $('button').on('click', function() {",
- " $('#click-me').addClass('animated shake');",
- " $('#checked-state').text($('#check-me').prop('checked'));",
- " });",
- " });",
- "fcces",
- "",
- "",
- "",
- "
",
- "
",
- "
",
- " ",
- "
",
- "
",
- "
#click-me ",
- "
Is the checkbox checked? ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad84fee1348bd9aecc18826",
- "name": "Waypoint: Read Data from an Element Using jQuery",
- "dashedName": "waypoint-read-data-from-an-element-using-jquery",
- "difficulty": 3.17,
- "description": [
-
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " $(document).ready(function() {",
- " $('button').on('click', function() {",
- " $('#click-me').addClass('animated shake');",
- " $('#checked-state').text($('#check-me').prop('checked'));",
- " });",
- " });",
- "fcces",
- "",
- "",
- "",
- "
",
- "
",
- "
",
- " ",
- "
",
- "
",
- "
#click-me ",
- "
Is the checkbox checked? ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad87fee1348bd9aecc08826",
- "name": "Waypoint: Trigger onHover Events with jQuery",
- "dashedName": "waypoint-trigger-onhover-events-with-jquery",
- "difficulty": 3.18,
- "description": [
-
- ],
- "tests": [
-
- ],
- "challengeSeed": [
-
- ],
- "challengeType": 0
- },
-
-
- {
- "id": "bad87fee1348bd9aebc08726",
- "name": "Waypoint: Learn how JSON Works",
- "dashedName": "waypoint-learn-how-json-works",
- "difficulty": 3.21,
- "description": [
- "JSON stands for \"JavaScript Object Notation\". It's how you create objects in JavaScript.",
- "JSON is a series of \"key-value pairs\". Everything on the left of the colon (
:
) is the \"key\" you use to unlock the \"value\" on the right of the colon."
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "[",
- " {",
- " \"id\": 0,",
- " \"imageLink\": \"http://rs611.pbsrc.com/albums/tt194/allypopper423/Funny-Cat-Green-Avacado.jpg~c200\",",
- " \"codeNames\": [",
- " \"Juggernaut\",",
- " \"Mrs. Wallace\",",
- " \"Buttercup\"",
- " ]",
- " },",
- " {",
- " \"id\": 1,",
- " \"imageLink\": \"http://cdn.grumpycats.com/wp-content/uploads/2012/09/GC-Gravatar-copy.png\",",
- " \"codeNames\": [",
- " \"Oscar\",",
- " \"Scrooge\",",
- " \"Tyrion\"",
- " ]",
- " },",
- " {",
- " \"id\": 2,",
- " \"imageLink\": \"http://www.kittenspet.com/wp-content/uploads/2012/08/cat_with_funny_face_3-200x200.jpg\",",
- " \"codeNames\": [",
- " \"The Doctor\",",
- " \"Loki\",",
- " \"Joker\"",
- " ]",
- " }",
- "]"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad87fee1348bd9aebc08826",
- "name": "Waypoint: Get Data from an URL Using jQuery",
- "dashedName": "waypoint-get-data-from-a-url-using-jquery",
- "difficulty": 3.21,
- "description": [
-
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- "",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- "",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad87fee1348bd9ae9c08826",
- "name": "Waypoint: Loop through JSON Data Using jQuery",
- "dashedName": "waypoint-loop-through-json-data-using-jquery",
- "difficulty": 3.22,
- "description": [
-
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- "",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- "",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad88fee1348bd9ae8c08726",
- "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
- "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
- "difficulty": 3.24,
- "description": [
- "
"
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " var random = function() { return Math.floor(Math.random() * 3) }",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- "",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad88fee1348bd9ae8c08626",
- "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
- "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
- "difficulty": 3.24,
- "description": [
- "
"
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " var random = function() { return Math.floor(Math.random() * 3) }",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- " var kitten = json[random()];",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad88fee1348bd9ae8c08526",
- "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
- "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
- "difficulty": 3.24,
- "description": [
- "
"
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " var random = function() { return Math.floor(Math.random() * 3) }",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- " var kitten = json[random()];",
- " $(\"
\").appendTo('#output');",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
- },
-
- {
- "id": "bad88fee1348bd9ae8c08426",
- "name": "Waypoint: Wire AJAX Call into a jQuery Click Event",
- "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
- "difficulty": 3.24,
- "description": [
- "
"
- ],
- "tests": [
-
- ],
- "challengeSeed": [
- "fccss",
- " var random = function() { return Math.floor(Math.random() * 3) }",
- " $(document).ready(function() {",
- "",
- " $('#cat-button').on('click', function() {",
- " $.getJSON('/json/cats.json', function( json ) {",
- " var kitten = json[random()];",
- " $(\"
\").appendTo('#output');",
- " $(\"
Code name: \" + kitten.codeNames[random()] + \" \").appendTo('#output');",
- " });",
- " });",
- "",
- " });",
- "fcces",
- "
#cat-button ",
- "
",
- "
"
- ],
- "challengeType": 0
+ "challengeType": 0,
+ "type": "waypoint"
}
]
}
diff --git a/seed/challenges/json-apis-and-ajax.json b/seed/challenges/json-apis-and-ajax.json
index 8745e513de..b62543fb90 100644
--- a/seed/challenges/json-apis-and-ajax.json
+++ b/seed/challenges/json-apis-and-ajax.json
@@ -1,6 +1,498 @@
{
- "name": "JSON APIs and Ajax - Coming Soon",
+ "name": "JSON APIs and Ajax",
"order": 0.007,
"challenges": [
+ {
+ "id": "bad87fee1348bd9aeca08826",
+ "title": "Trigger on click Events with jQuery",
+ "difficulty": 3.19,
+ "description": [
+ "
.on('click', function() {
",
+ "",
+ "});"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ "",
+ "
});
",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ " ",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc58826",
+ "title": "Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ "",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc48826",
+ "title": "Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc38826",
+ "title": "Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text('happy text');",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc28826",
+ "title": "Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+ "Let's make everything roll with
rollOut
."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text($('#check-me').prop('checked'));",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad84fee1348bd9aecc18826",
+ "title": "Read Data from an Element Using jQuery",
+ "dashedName": "waypoint-read-data-from-an-element-using-jquery",
+ "difficulty": 3.17,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " $(document).ready(function() {",
+ " $('button').on('click', function() {",
+ " $('#click-me').addClass('animated shake');",
+ " $('#checked-state').text($('#check-me').prop('checked'));",
+ " });",
+ " });",
+ "fcces",
+ "",
+ "",
+ "",
+ "
",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
#click-me ",
+ "
Is the checkbox checked? ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad87fee1348bd9aecc08826",
+ "title": "Trigger onHover Events with jQuery",
+ "dashedName": "waypoint-trigger-onhover-events-with-jquery",
+ "difficulty": 3.18,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+
+ {
+ "id": "bad87fee1348bd9aebc08726",
+ "title": "Learn how JSON Works",
+ "dashedName": "waypoint-learn-how-json-works",
+ "difficulty": 3.21,
+ "description": [
+ "JSON stands for \"JavaScript Object Notation\". It's how you create objects in JavaScript.",
+ "JSON is a series of \"key-value pairs\". Everything on the left of the colon (
:
) is the \"key\" you use to unlock the \"value\" on the right of the colon."
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "[",
+ " {",
+ " \"id\": 0,",
+ " \"imageLink\": \"http://rs611.pbsrc.com/albums/tt194/allypopper423/Funny-Cat-Green-Avacado.jpg~c200\",",
+ " \"codeNames\": [",
+ " \"Juggernaut\",",
+ " \"Mrs. Wallace\",",
+ " \"Buttercup\"",
+ " ]",
+ " },",
+ " {",
+ " \"id\": 1,",
+ " \"imageLink\": \"http://cdn.grumpycats.com/wp-content/uploads/2012/09/GC-Gravatar-copy.png\",",
+ " \"codeNames\": [",
+ " \"Oscar\",",
+ " \"Scrooge\",",
+ " \"Tyrion\"",
+ " ]",
+ " },",
+ " {",
+ " \"id\": 2,",
+ " \"imageLink\": \"http://www.kittenspet.com/wp-content/uploads/2012/08/cat_with_funny_face_3-200x200.jpg\",",
+ " \"codeNames\": [",
+ " \"The Doctor\",",
+ " \"Loki\",",
+ " \"Joker\"",
+ " ]",
+ " }",
+ "]"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad87fee1348bd9aebc08826",
+ "title": "Get Data from an URL Using jQuery",
+ "dashedName": "waypoint-get-data-from-a-url-using-jquery",
+ "difficulty": 3.21,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ "",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad87fee1348bd9ae9c08826",
+ "title": "Loop through JSON Data Using jQuery",
+ "dashedName": "waypoint-loop-through-json-data-using-jquery",
+ "difficulty": 3.22,
+ "description": [
+
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ "",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08726",
+ "title": "Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ "",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08626",
+ "title": "Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08526",
+ "title": "Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " $(\"
\").appendTo('#output');",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ },
+
+ {
+ "id": "bad88fee1348bd9ae8c08426",
+ "title": "Wire AJAX Call into a jQuery Click Event",
+ "dashedName": "waypoint-wire-ajax-call-into-a-jquery-click-event",
+ "difficulty": 3.24,
+ "description": [
+ "
"
+ ],
+ "tests": [
+
+ ],
+ "challengeSeed": [
+ "fccss",
+ " var random = function() { return Math.floor(Math.random() * 3) }",
+ " $(document).ready(function() {",
+ "",
+ " $('#cat-button').on('click', function() {",
+ " $.getJSON('/json/cats.json', function( json ) {",
+ " var kitten = json[random()];",
+ " $(\"
\").appendTo('#output');",
+ " $(\"
Code name: \" + kitten.codeNames[random()] + \" \").appendTo('#output');",
+ " });",
+ " });",
+ "",
+ " });",
+ "fcces",
+ "
#cat-button ",
+ "
",
+ "
"
+ ],
+ "challengeType": 0,
+ "type": "waypoint"
+ }
]
}
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index 54b46060a3..b8dcd2041b 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,5 +1,5 @@
{
- "name": "Object Oriented and Functional Programming - Coming Soon",
+ "name": "Object Oriented and Functional Programming",
"order" : 0.010,
"challenges": [
]
From 5f21db457d74ef364e2c0f43fb88be1ef73110af Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 23:29:32 -0700
Subject: [PATCH 177/548] fix challenge ordering Now challenges are ordered on
map first by top order value of json file second by index of array
---
common/models/challenge.json | 3 +++
seed/index.js | 3 ++-
server/boot/challenge.js | 5 ++++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/common/models/challenge.json b/common/models/challenge.json
index 743332107d..08fa48779b 100644
--- a/common/models/challenge.json
+++ b/common/models/challenge.json
@@ -22,6 +22,9 @@
"order": {
"type": "number"
},
+ "suborder": {
+ "type": "number"
+ },
"dashedName": {
"type": "string"
},
diff --git a/seed/index.js b/seed/index.js
index 38305428a2..334a11d3dc 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -63,7 +63,8 @@ Challenge.destroyAll(function(err, info) {
.toLowerCase()
.replace(/\:/g, '')
.replace(/\s/g, '-');
- challenge.order = +('' + order + (index + 1));
+ challenge.order = order;
+ challenge.suborder = index + 1;
challenge.block = block;
return challenge;
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index 1fc4342def..feea89818a 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -458,7 +458,10 @@ module.exports = function(app) {
.map(camperCount => numberWithCommas(camperCount));
const query = {
- order: 'order ASC'
+ order: [
+ 'order ASC',
+ 'suborder ASC'
+ ]
};
// create a stream of all the challenges
From 2256f3ef6e2cfec7dd82b975ca5795ba792d2401 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Mon, 10 Aug 2015 23:38:10 -0700
Subject: [PATCH 178/548] fix add github link to passport
---
common/models/User-Identity.js | 2 +-
server/passport-providers.js | 14 ++++++++++++++
server/server.js | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 87a7ffef57..779ad2f48f 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -79,7 +79,7 @@ export default function(UserIdent) {
}
// if user signed in with github refresh their info
- if (userIdent.provider === 'github-login') {
+ if (/github/.test(userIdent.provider)) {
debug("user isn't github cool or username from github is different");
setProfileFromGithub(user, profile, profile._json);
userChanged = true;
diff --git a/server/passport-providers.js b/server/passport-providers.js
index ddd29f64db..5ffcbf1a09 100644
--- a/server/passport-providers.js
+++ b/server/passport-providers.js
@@ -141,5 +141,19 @@ module.exports = {
clientSecret: process.env.GITHUB_SECRET,
scope: ['email'],
failureFlash: true
+ },
+ 'github-link': {
+ provider: 'github',
+ authScheme: 'oauth2',
+ module: 'passport-github',
+ authPath: '/link/github',
+ callbackURL: '/link/github/callback',
+ callbackPath: '/link/github/callback',
+ successRedirect: successRedirect,
+ failureRedirect: failureRedirect,
+ clientID: process.env.GITHUB_ID,
+ clientSecret: process.env.GITHUB_SECRET,
+ scope: ['email'],
+ failureFlash: true
}
};
diff --git a/server/server.js b/server/server.js
index 93a0f06d8d..bf0cb8c396 100755
--- a/server/server.js
+++ b/server/server.js
@@ -102,7 +102,7 @@ var passportOptions = {
userObj.email = email;
}
- if (provider === 'github-login') {
+ if (/github/.test(provider)) {
setProfileFromGithub(userObj, profile, profile._json);
}
return userObj;
From 9df99eb63572f5eb22de6b3eb39f27237c62c538 Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Tue, 11 Aug 2015 15:39:07 +0100
Subject: [PATCH 179/548] Removed new incomplete JS Challenges and moved to
OOPF branch.
---
.jshintrc | 3 +-
public/js/main_0.0.3.js | 4 +-
seed/challenges/basic-javascript.json | 3 +-
...t-oriented-and-functional-programming.json | 285 +++++++++++++++++-
4 files changed, 289 insertions(+), 6 deletions(-)
diff --git a/.jshintrc b/.jshintrc
index 38058dd40b..7d01fdaf66 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -16,6 +16,7 @@
"strict": false, // Require `use strict` pragma in every file.
"trailing": true, // Prohibit trailing whitespaces.
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces
+ "esnext": true, // Allow ES6 maybe :p
"globals": { // Globals variables.
"jasmine": true,
"angular": true,
@@ -37,4 +38,4 @@
],
"devel": true, // Allow development statements e.g. `console.log();`.
"noempty": true // Prohibit use of empty blocks.
-}
\ No newline at end of file
+}
diff --git a/public/js/main_0.0.3.js b/public/js/main_0.0.3.js
index e502bd50d3..29d8709065 100644
--- a/public/js/main_0.0.3.js
+++ b/public/js/main_0.0.3.js
@@ -312,7 +312,9 @@ $(document).ready(function() {
$('#story-submit').on('click', storySubmitButtonHandler);
if($('.editorScrollDiv').html() !== 'undefined'){
- $('.editorScrollDiv').css("height",$(window).height()-($('.navbar').height()+$('.footer').height()+100) + "px");
+ function truncateEditor(){$('.editorScrollDiv').css("height",$(window).height()-($('.navbar').height()+$('.footer').height()+100) + "px");}
+ truncateEditor();
+ $(window).resize(function(){truncateEditor();});
}
//fakeiphone positioning hotfix
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 0aa6f4f02f..8696a13b94 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -457,8 +457,7 @@
"Once an array has been created we can access the data we have stored in them using indexes",
"Indexes are written in the same way as bracket notation that we covered earlier",
"Example:",
- "",
- "var array = [1,2,3];",
+ "var array = [1,2,3];",
"array[0];//equals 1",
"var data = array[1];",
"
",
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index 54b46060a3..eba3c45b57 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -1,6 +1,287 @@
{
- "name": "Object Oriented and Functional Programming - Coming Soon",
- "order" : 0.010,
+ "name": "Object Oriented and Functional Programming \n - \n Under Construction From Challenge 4 Onwards",
+ "order" : 0.009,
+ "note": [
+ "inheritance"
+ ],
"challenges": [
+ {
+ "id":"cf1111c1c15feddfaeb1bdef",
+ "title":"Waypoint: A Review On Objects",
+ "difficulty":0,
+ "description":[
+ "",
+ "Before we dive into Object Oriented Programming Let's take a quick look over objects in javascript"
+ ],
+ "tests":[
+ "assert(motorBike.wheels===2, 'You should have given motorBike two wheels');",
+ "assert(motorBike.engine===1, 'You should have given motorBike one engine');",
+ "assert(motorBike.seats===1, 'You should have given motorBike one seat');"
+ ],
+ "challengeSeed":[
+ "//Here is a sample Object",
+ "var car = {",
+ " \"wheels\":4,",
+ " \"engine\":1,",
+ " \"seats\":5",
+ "};",
+ "",
+ "//Now Let's make a similar Object called motorBike",
+ "//Give it two wheels, one engine and one seat",
+ "var motorBike = {",
+ " \"wheels\":0,",
+ " \"engine\":0,",
+ " \"seats\":0",
+ "};",
+ "",
+ "(function(){return(JSON.stringify(motorBike));})();"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c15feddfaeb2bdef",
+ "title":"Waypoint: Constructing Objects",
+ "difficulty":0,
+ "description":[
+ "",
+ "We are also able to create Objects using functions"
+ ],
+ "tests":[
+ "assert((new Car()).wheels === 4, \"myCar.wheels should be four. Make sure that you haven't changed this value\");",
+ "assert(typeof((new Car()).engine) === 'number', 'myCar.engine should be a number');",
+ "assert(typeof((new Car()).seats) === 'number', 'myCar.seats should be a number');"
+ ],
+ "challengeSeed":[
+ "//Let's add the properties engine and seats to the car in the same way that the property wheels has been added below. They should both be numbers",
+ "var Car = function(){",
+ " this.wheels = 4;",
+ "};",
+ "",
+ "//Instantiated Here",
+ "var myCar = new Car();",
+ "",
+ "(function(){return(JSON.stringify(myCar));})();"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c15feddfaeb3bdef",
+ "title":"Waypoint: Understanding Public and Private Properties",
+ "difficulty":0,
+ "description":[
+ "",
+ "In the last challenge we use the this
to reference public properties the current object or function.",
+ "We can also create variables and functions that aren't accessible from outside the Object"
+ ],
+ "tests":[
+ "assert(answers.Q1===true, 'The number Gear is Publicly Accessible');",
+ "assert(answers.Q2===true, 'The function getGear is Publicly Accessible');",
+ "assert(answers.Q3===false, 'The function addStyle is not Publicly Accessible');"
+ ],
+ "challengeSeed":[
+ "//Let's create an object with a two functions. One attached as a property and one not.",
+ "var Car = function(){",
+ " this.gear = 1;",
+ " function addStyle(styleMe){",
+ " return('The Current Gear Is: ' + styleMe);",
+ " }",
+ " this.getGear = function(){",
+ " return(addStyle(this.gear));",
+ " };",
+ "};",
+ "",
+ "//Quick Quiz!",
+ "//Say whether the follow statements are true or false in the answers object below",
+ "",
+ "//Statement One",
+ "//The number gear publicly accessible",
+ "",
+ "//Statement Two",
+ "//The function getGear publicly accessible",
+ "",
+ "//Statement Three",
+ "//The function addStyle publicly accessible",
+ "",
+ "var answers = {",
+ " 'Q1':false,",
+ " 'Q2':false,",
+ " 'Q3':false",
+ "};",
+ "",
+ "//Instantiated Here",
+ "var myCar = new Car();",
+ "",
+ "(function(){return(JSON.stringify(answers));})();"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c13feddfaeb6bdef",
+ "title":"Waypoint: Instantiation",
+ "difficulty":0,
+ "description":[
+ "",
+ "Instantiation at it's most basic level is where you are creating a copy of an object from a template for use at a later time"
+ ],
+ "tests":[
+ "assert((new Car()).wheels === 4, 'The property wheels should be four in the object constructor');",
+ "assert(typeof((new Car()).engine) === 'undefined', 'There should not be a property engine in the object constructor');",
+ "assert(myCar.wheels === 4, 'The property wheels of myCar should be four');",
+ "assert(typeof(myCar.engine) === 'number', 'The property engine of myCar should be a number');"
+ ],
+ "challengeSeed":[
+ "var Car = function(){",
+ " this.wheels = 4;",
+ "};",
+ "",
+ "var myCar = new Car();",
+ "",
+ "//Add the property engine to myCar using dot notation and make it a number",
+ "",
+ "",
+ "(function(){return(JSON.stringify(myCar));})();"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c13feddfaeb9bdef",
+ "title":"Waypoint: Inheritance",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb1bdef",
+ "title":"Waypoint: Prototypical Inheritance",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c13feddfaeb7bdef",
+ "title":"Waypoint: Closures",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb3bdef",
+ "title":"Waypoint: Factories",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb5bdef",
+ "title":"Waypoint: Pure Functions",
+ "Note":"May need a waypoint before each topic to announce what it is :p",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb6bdef",
+ "title":"Waypoint: Currying Functions",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb7bdef",
+ "title":"Waypoint: Composition",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb8bdef",
+ "title":"Waypoint: Functors",
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ },
+ {
+ "id":"cf1111c1c14feddfaeb9bdef",
+ "title":"Waypoint: Currying Functions",
+ "Notes":[
+ "",
+ ""
+ ],
+ "difficulty":0,
+ "description":[
+ ""
+ ],
+ "tests":[
+ "assert(1==2, '');"
+ ],
+ "challengeSeed":[
+ "Under Construction"
+ ],
+ "challengeType":1
+ }
]
}
From 7348cff96ecf5659d77887a6576cf3e0e8ce64ac Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 11 Aug 2015 12:49:37 -0700
Subject: [PATCH 180/548] Update README.md
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 13007cd912..d62477d7bd 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,6 @@ TWITTER_TOKEN=stuff
TWITTER_TOKEN_SECRET=stuff
BLOGGER_KEY=stuff
-SLACK_WEBHOOK=stuff
SESSION_SECRET=secretstuff
COOKIE_SECRET='this is a secret'
From 6fd19738ce5c9b812f6cf3465153a757764a837b Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 11 Aug 2015 13:22:16 -0700
Subject: [PATCH 181/548] refactor and lint home router
---
server/boot/home.js | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/server/boot/home.js b/server/boot/home.js
index 1e40fb01a3..177a2eff2b 100644
--- a/server/boot/home.js
+++ b/server/boot/home.js
@@ -1,29 +1,29 @@
-var defaultProfileImage =
- require('../../common/utils/constantStrings.json').defaultProfileImage;
-var message =
+import { defaultProfileImage } from '../../common/utils/constantStrings.json';
+
+const message =
'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits';
module.exports = function(app) {
var router = app.loopback.Router();
- router.get('/', index);
+ router.get('/', addDefaultImage, index);
app.use(router);
- function index(req, res, next) {
- if (req.user)
- if (!req.user.picture) {
- req.user.picture = defaultProfileImage;
-
- req.user.save(function (err) {
- if (err) {
- return next(err);
- }
- res.render('get-started', {title: message});
- });
- } else {
- res.render('resources/get-started', {title: message});
- } else {
- res.render('home', { title: message });
+ function addDefaultImage(req, res, next) {
+ if (!req.user || req.user.picture) {
+ return next();
}
+ req.user.picture = defaultProfileImage;
+ req.user.save(function(err) {
+ if (err) { return next(err); }
+ next();
+ });
+ }
+
+ function index(req, res) {
+ if (req.user) {
+ return res.render('resources/get-started', { title: message });
+ }
+ res.render('home', { title: message });
}
};
From 0fcf3bcf42214abae84db4919871496e2392c8ba Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 11 Aug 2015 14:17:08 -0700
Subject: [PATCH 182/548] fix challenge completion should give brownie points
closes #1665
---
server/boot/challenge.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index feea89818a..cbcc47e614 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -38,9 +38,10 @@ function updateUserProgress(user, challengeId, completedChallenge) {
return id === challengeId;
});
- if (alreadyCompleted) {
+ if (!alreadyCompleted) {
user.progressTimestamps.push({
- timestamp: Date.now()
+ timestamp: Date.now(),
+ completedChallenge
});
}
user.completedChallenges.push(completedChallenge);
From 08384864832c16b29cfba98cf82b29804d870922 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Tue, 11 Aug 2015 14:49:57 -0700
Subject: [PATCH 183/548] properly define id fields for basic models
closes #1724
---
common/models/challenge.json | 4 ++++
common/models/job.json | 4 ++++
common/models/nonprofit.json | 4 ++++
common/models/story.json | 4 ++++
4 files changed, 16 insertions(+)
diff --git a/common/models/challenge.json b/common/models/challenge.json
index 08fa48779b..84cf3a4c6b 100644
--- a/common/models/challenge.json
+++ b/common/models/challenge.json
@@ -4,6 +4,10 @@
"idInjection": true,
"trackChanges": false,
"properties": {
+ "id": {
+ "type": "string",
+ "id": true
+ },
"name": {
"type": "string",
"index": {
diff --git a/common/models/job.json b/common/models/job.json
index 12473628cc..a3392fee82 100644
--- a/common/models/job.json
+++ b/common/models/job.json
@@ -4,6 +4,10 @@
"idInjection": true,
"trackChanges": false,
"properties": {
+ "id": {
+ "type": "string",
+ "id": true
+ },
"position": {
"type": "string"
},
diff --git a/common/models/nonprofit.json b/common/models/nonprofit.json
index 5d8dddbc3d..d83bd55739 100644
--- a/common/models/nonprofit.json
+++ b/common/models/nonprofit.json
@@ -4,6 +4,10 @@
"idInjection": true,
"trackChanges": false,
"properties": {
+ "id": {
+ "type": "string",
+ "id": true
+ },
"name": {
"type": "string",
"index": {
diff --git a/common/models/story.json b/common/models/story.json
index 6f252cefb3..5d8e56dfb2 100644
--- a/common/models/story.json
+++ b/common/models/story.json
@@ -4,6 +4,10 @@
"idInjection": true,
"trackChanges": false,
"properties": {
+ "id": {
+ "type": "string",
+ "id": true
+ },
"name": {
"type": "string",
"index": {
From 1dc66b76711ac4252c06dca6e152689912759c44 Mon Sep 17 00:00:00 2001
From: benmcmahon100
Date: Wed, 12 Aug 2015 00:11:56 +0100
Subject: [PATCH 184/548] First four OOP challenges and the final slot machine
challenge.
---
seed/challenges/basic-javascript.json | 170 ++++++++++++++++++
...t-oriented-and-functional-programming.json | 112 +++++-------
2 files changed, 217 insertions(+), 65 deletions(-)
diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json
index 8696a13b94..15b2df6a43 100644
--- a/seed/challenges/basic-javascript.json
+++ b/seed/challenges/basic-javascript.json
@@ -1544,6 +1544,176 @@
],
"type": "waypoint",
"challengeType": 0
+ },
+ {
+ "id":"cf1111c1c11feddfaeb1bdff",
+ "title": "Give your JavaScript Slot Machine some stylish images",
+ "difficulty":"9.9901",
+ "description":[
+ "Now that we can detect when the player wins we are going to add an image to each slot depending on the random values we generate",
+ "$($('.slot')[0]).html('<img src = \"' + images[slotOne-1] + '\">');"
+ ],
+ "tests":[
+ "assert(editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\ \\'\\);/gi) && editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\ \\'\\);/gi).length >= 3, 'Use the provided code three times. One for each slot');",
+ "assert(editor.match(/slotOne/gi) && editor.match(/slotOne/gi).length >= 7, 'You should have used the slotOne value at least once');",
+ "assert(editor.match(/slotTwo/gi) && editor.match(/slotTwo/gi).length >=8, 'You should have used the slotTwo value at least once');",
+ "assert(editor.match(/slotThree/gi) && editor.match(/slotThree/gi).length >= 7, 'You should have used the slotThree value at least once');"
+ ],
+ "challengeSeed":[
+ "fccss",
+ " function runSlots(){",
+ " var slotOne;",
+ " var slotTwo;",
+ " var slotThree;",
+ " ",
+ " //Placeholder",
+ " var images = ['https://www.evernote.com/l/AlxaOC8QrXlBjpTdGMe3mBwLN3Yjm-KB5yQB/image.png','https://www.evernote.com/l/AlyXbeIS8axEspbwXD8RzmsaCUIf10snmzgB/image.png','https://www.evernote.com/l/AlxMveeWtopKaajUmTVrnv92mqA_s2uzW-8B/image.png','https://www.evernote.com/l/AlyyRP_Kh_dCG7t8b4JRnwMNCa1JThI_5gQB/image.png', 'https://www.evernote.com/l/Alx64952qUxEhJnBteZvJgxib1qlwQcw9G0B/image.png'];",
+ " ",
+ " slotOne = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
+ " slotTwo = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
+ " slotThree = Math.floor(Math.random() * (5 - 1 + 1)) + 1;",
+ " ",
+ " $('.logger').html('');",
+ " $('.logger').html('Not A Win')",
+ " ",
+ " /*Don't modify above here*/",
+ " ",
+ " ",
+ " ",
+ " /*Don't modify below here*/",
+ " ",
+ " if(slotOne != slotTwo || slotTwo != slotThree){",
+ " return(null);",
+ " }",
+ " ",
+ " if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){",
+ " $('.logger').html(slotOne);",
+ " $('.logger').append(' ' + slotTwo);",
+ " $('.logger').append(' ' + slotThree);",
+ " }",
+ " ",
+ " return([slotOne, slotTwo, slotThree]);",
+ " }",
+ "",
+ " $(document).ready(function(){",
+ " $('.go').click(function(){",
+ " runSlots();",
+ " });",
+ " });",
+ "fcces",
+ " ",
+ "",
+ "
",
+ " ",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "
",
+ "
",
+ " ",
+ " Go",
+ " ",
+ "
",
+ "
",
+ " ",
+ "
",
+ "
",
+ "",
+ ""
+ ],
+ "type": "waypoint",
+ "challengeType": 0
}
]
}
diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json
index eba3c45b57..ac85a3d5ac 100644
--- a/seed/challenges/object-oriented-and-functional-programming.json
+++ b/seed/challenges/object-oriented-and-functional-programming.json
@@ -2,7 +2,12 @@
"name": "Object Oriented and Functional Programming \n - \n Under Construction From Challenge 4 Onwards",
"order" : 0.009,
"note": [
- "inheritance"
+ "Waypoint: Closures",
+ "Waypoint: Factories",
+ "Waypoint: Pure Functions",
+ "Waypoint: Currying Functions",
+ "Waypoint: Functors",
+ "Waypoint: Currying Functions"
],
"challenges": [
{
@@ -74,9 +79,9 @@
"We can also create variables and functions that aren't accessible from outside the Object"
],
"tests":[
- "assert(answers.Q1===true, 'The number Gear is Publicly Accessible');",
- "assert(answers.Q2===true, 'The function getGear is Publicly Accessible');",
- "assert(answers.Q3===false, 'The function addStyle is not Publicly Accessible');"
+ "assert(typeof(myBike.getSpeed)!=='undefined' && typeof(myBike.getSpeed) === 'function', 'The method getSpeed of myBike should be accessible outside the Object');",
+ "assert(typeof(myBike.speed) === 'undefined', 'We should not been able');",
+ "assert(typeof(myBike.addUnit === 'undefined'), '');"
],
"challengeSeed":[
"//Let's create an object with a two functions. One attached as a property and one not.",
@@ -90,33 +95,30 @@
" };",
"};",
"",
- "//Quick Quiz!",
- "//Say whether the follow statements are true or false in the answers object below",
+ "//Make the function getSpeed of Bike publicly accessible",
"",
- "//Statement One",
- "//The number gear publicly accessible",
- "",
- "//Statement Two",
- "//The function getGear publicly accessible",
- "",
- "//Statement Three",
- "//The function addStyle publicly accessible",
- "",
- "var answers = {",
- " 'Q1':false,",
- " 'Q2':false,",
- " 'Q3':false",
+ "var Bike = function(){",
+ " speed = 100;",
+ " function addUnit(value){",
+ " return(value + \"KM/H\");",
+ " }",
+ " ",
+ " getSpeed = function (){",
+ " return(addUnit(speed));",
+ " };",
+ " ",
"};",
"",
"//Instantiated Here",
"var myCar = new Car();",
+ "var myBike = new Bike();",
"",
- "(function(){return(JSON.stringify(answers));})();"
+ "if(myBike.hasOwnProperty('getSpeed')){(function(){return(JSON.stringify(myBike.getSpeed()));})();};"
],
"challengeType":1
},
{
- "id":"cf1111c1c13feddfaeb6bdef",
+ "id":"cf1111c1c15feddfaeb4bdef",
"title":"Waypoint: Instantiation",
"difficulty":0,
"description":[
@@ -144,7 +146,7 @@
"challengeType":1
},
{
- "id":"cf1111c1c13feddfaeb9bdef",
+ "id":"cf1111c1c15feddfaeb5bdef",
"title":"Waypoint: Inheritance",
"difficulty":0,
"description":[
@@ -159,7 +161,7 @@
"challengeType":1
},
{
- "id":"cf1111c1c14feddfaeb1bdef",
+ "id":"cf1111c1c15feddfaeb6bdef",
"title":"Waypoint: Prototypical Inheritance",
"difficulty":0,
"description":[
@@ -174,8 +176,8 @@
"challengeType":1
},
{
- "id":"cf1111c1c13feddfaeb7bdef",
- "title":"Waypoint: Closures",
+ "id":"cf1111c1c15feddfaeb7bdef",
+ "title":"Waypoint: Using .map",
"difficulty":0,
"description":[
""
@@ -189,8 +191,8 @@
"challengeType":1
},
{
- "id":"cf1111c1c14feddfaeb3bdef",
- "title":"Waypoint: Factories",
+ "id":"cf1111c1c15feddfaeb8bdef",
+ "title":"Waypoint: Using .reduce",
"difficulty":0,
"description":[
""
@@ -204,9 +206,8 @@
"challengeType":1
},
{
- "id":"cf1111c1c14feddfaeb5bdef",
- "title":"Waypoint: Pure Functions",
- "Note":"May need a waypoint before each topic to announce what it is :p",
+ "id":"cf1111c1c15feddfaeb9bdef",
+ "title":"Waypoint: Using .filter",
"difficulty":0,
"description":[
""
@@ -220,8 +221,8 @@
"challengeType":1
},
{
- "id":"cf1111c1c14feddfaeb6bdef",
- "title":"Waypoint: Currying Functions",
+ "id":"cf1111c1c16feddfaeb1bdef",
+ "title":"Waypoint: Using .sort",
"difficulty":0,
"description":[
""
@@ -235,53 +236,34 @@
"challengeType":1
},
{
- "id":"cf1111c1c14feddfaeb7bdef",
- "title":"Waypoint: Composition",
- "difficulty":0,
- "description":[
+ "id": "cf1111c1c16feddfaeb2bdef",
+ "title": "Waypoint: Using .reverse",
+ "difficulty": 0,
+ "description": [
""
],
- "tests":[
+ "tests": [
"assert(1==2, '');"
],
- "challengeSeed":[
+ "challengeSeed": [
"Under Construction"
],
- "challengeType":1
+ "challengeType": 1
},
{
- "id":"cf1111c1c14feddfaeb8bdef",
- "title":"Waypoint: Functors",
- "difficulty":0,
- "description":[
+ "id": "cf1111c1c16feddfaeb3bdef",
+ "title": "Waypoint: Using .concat",
+ "difficulty": 0,
+ "description": [
""
],
- "tests":[
+ "tests": [
"assert(1==2, '');"
],
- "challengeSeed":[
+ "challengeSeed": [
"Under Construction"
],
- "challengeType":1
- },
- {
- "id":"cf1111c1c14feddfaeb9bdef",
- "title":"Waypoint: Currying Functions",
- "Notes":[
- "",
- ""
- ],
- "difficulty":0,
- "description":[
- ""
- ],
- "tests":[
- "assert(1==2, '');"
- ],
- "challengeSeed":[
- "Under Construction"
- ],
- "challengeType":1
+ "challengeType": 1
}
]
}
From e42e954517f3c35f04f9028070abaca994c8900b Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Tue, 11 Aug 2015 23:53:30 -0700
Subject: [PATCH 185/548] fix omission in simon zipline
---
seed/challenges/intermediate-ziplines.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/intermediate-ziplines.json b/seed/challenges/intermediate-ziplines.json
index 2a2d5af952..4839ec8760 100644
--- a/seed/challenges/intermediate-ziplines.json
+++ b/seed/challenges/intermediate-ziplines.json
@@ -140,7 +140,7 @@
"difficulty": 1.07,
"challengeSeed": ["126415123"],
"description": [
- "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/KpJXZV/ .",
+ "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/KpJXZV/ .",
"Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.",
"Rule #2: You may use whichever libraries or APIs you need.",
"Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.",
From 5830ac2f8a9ccd6c9d849dc5e76e535d5405deaf Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Wed, 12 Aug 2015 00:52:40 -0700
Subject: [PATCH 186/548] make all single quotes in jquery challenges double
quotes
---
seed/challenges/jquery-ajax-and-json.json | 895 ---------------------
seed/challenges/jquery.json | 899 ++++++++++++++++++++++
2 files changed, 899 insertions(+), 895 deletions(-)
delete mode 100644 seed/challenges/jquery-ajax-and-json.json
create mode 100644 seed/challenges/jquery.json
diff --git a/seed/challenges/jquery-ajax-and-json.json b/seed/challenges/jquery-ajax-and-json.json
deleted file mode 100644
index 26cdb46b8a..0000000000
--- a/seed/challenges/jquery-ajax-and-json.json
+++ /dev/null
@@ -1,895 +0,0 @@
-{
- "name": "jQuery",
- "order": 0.004,
- "challenges": [
- {
- "id": "bad87fee1348bd9acdd08826",
- "title": "Learn how Script Tags and Document Ready Work",
- "difficulty": 3.01,
- "description": [
- "Now we're ready to learn jQuery, the most popular JavaScript tool of all time. Don't worry about JavaScript itself - we will cover it soon.",
- "Before we can start using jQuery, we need to add some things to our HTML.",
- "First, add a script
element at the top of your page. Be sure to close it on the following line.",
- "Your browser will run any JavaScript inside a script
element, including jQuery.",
- "Inside your script
element, add this code: $(document).ready(function() {
to your script
. Then close it on the following line (still inside your script
element) with: });
"
- ],
- "tests": [
- "assert(editor.match(/
-
-
-
-
-
-
-Active Line Demo
-
-
-
-
- Styling the current cursor line.
-
-
diff --git a/public/js/lib/codemirror/demo/anywordhint.html b/public/js/lib/codemirror/demo/anywordhint.html
deleted file mode 100644
index 0a7caece24..0000000000
--- a/public/js/lib/codemirror/demo/anywordhint.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-CodeMirror: Any Word Completion Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Any Word Completion Demo
-
-(function() {
- "use strict";
-
- var WORD = /[\w$]+/g, RANGE = 500;
-
- CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
- var word = options && options.word || WORD;
- var range = options && options.range || RANGE;
- var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
- var start = cur.ch, end = start;
- while (end < curLine.length && word.test(curLine.charAt(end))) ++end;
- while (start && word.test(curLine.charAt(start - 1))) --start;
- var curWord = start != end && curLine.slice(start, end);
-
- var list = [], seen = {};
- function scan(dir) {
- var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
- for (; line != end; line += dir) {
- var text = editor.getLine(line), m;
- word.lastIndex = 0;
- while (m = word.exec(text)) {
- if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) {
- seen[m[0]] = true;
- list.push(m[0]);
- }
- }
- }
- }
- scan(-1);
- scan(1);
- return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
- });
-})();
-
-
-Press ctrl-space to activate autocompletion. The
-completion uses
-the anyword-hint.js
-module, which simply looks at nearby words in the buffer and completes
-to those.
-
-
-
diff --git a/public/js/lib/codemirror/demo/bidi.html b/public/js/lib/codemirror/demo/bidi.html
deleted file mode 100644
index 6dd73bec3a..0000000000
--- a/public/js/lib/codemirror/demo/bidi.html
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-CodeMirror: Bi-directional Text Demo
-
-
-
-
-
-
-
-
-
-
-Bi-directional Text Demo
-
-
-
- value (string or Doc)
- قيمة البداية المحرر. يمكن أن تكون سلسلة، أو. كائن مستند.
- mode (string or object)
- وضع الاستخدام. عندما لا تعطى، وهذا الافتراضي إلى الطريقة الاولى
- التي تم تحميلها. قد يكون من سلسلة، والتي إما أسماء أو ببساطة هو وضع
- MIME نوع المرتبطة اسطة. بدلا من ذلك، قد يكون من كائن يحتوي على
- خيارات التكوين لواسطة، مع name
الخاصية التي وضع أسماء
- (على سبيل المثال {name: "javascript", json: true}
).
- صفحات التجريبي لكل وضع تحتوي على معلومات حول ما معلمات تكوين وضع
- يدعمها. يمكنك أن تطلب CodeMirror التي تم تعريفها طرق وأنواع MIME
- الكشف على CodeMirror.modes
- و CodeMirror.mimeModes
الكائنات. وضع خرائط الأسماء
- الأولى لمنشئات الخاصة بهم، وخرائط لأنواع MIME 2 المواصفات
- واسطة.
- theme (string)
- موضوع لنمط المحرر مع. يجب عليك التأكد من الملف CSS تحديد
- المقابلة .cm-s-[name]
يتم تحميل أنماط (انظر
- theme
الدليل في التوزيع).
- الافتراضي هو "default"
، والتي تم تضمينها في
- الألوان codemirror.css
. فمن الممكن استخدام فئات متعددة
- في تطبيق السمات مرة واحدة على سبيل المثال "foo bar"
- سيتم تعيين كل من cm-s-foo
و cm-s-bar
- الطبقات إلى المحرر.
-
-
-
-
-
- Demonstration of bi-directional text support. See
- the related
- blog post for more background.
-
- Note: There is
- a known
- bug with cursor motion and mouse clicks in bi-directional lines
- that are line wrapped.
-
-
diff --git a/public/js/lib/codemirror/demo/btree.html b/public/js/lib/codemirror/demo/btree.html
deleted file mode 100644
index fc4997f4f5..0000000000
--- a/public/js/lib/codemirror/demo/btree.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: B-Tree visualization
-
-
-
-
-
-
-
-
-
-B-Tree visualization
-type here, see a summary of the document b-tree below
-
-
-
-
-
-
-
Add a lot of content
-
-
diff --git a/public/js/lib/codemirror/demo/buffers.html b/public/js/lib/codemirror/demo/buffers.html
deleted file mode 100644
index 16ffc7dfe9..0000000000
--- a/public/js/lib/codemirror/demo/buffers.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
CodeMirror: Multiple Buffer & Split View Demo
-
-
-
-
-
-
-
-
-
-
-
-Multiple Buffer & Split View Demo
-
-
-
-
- Select buffer:
- New buffer
-
-
-
- Select buffer:
- New buffer
-
-
-
-
- Demonstration of
- using linked documents
- to provide a split view on a document, and
- using swapDoc
- to use a single editor to display multiple documents.
-
-
diff --git a/public/js/lib/codemirror/demo/changemode.html b/public/js/lib/codemirror/demo/changemode.html
deleted file mode 100644
index 9405932abe..0000000000
--- a/public/js/lib/codemirror/demo/changemode.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
CodeMirror: Mode-Changing Demo
-
-
-
-
-
-
-
-
-
-
-
-Mode-Changing Demo
-
-;; If there is Scheme code in here, the editor will be in Scheme mode.
-;; If you put in JS instead, it'll switch to JS mode.
-
-(define (double x)
- (* x x))
-
-
-On changes to the content of the above editor, a (crude) script
-tries to auto-detect the language used, and switches the editor to
-either JavaScript or Scheme mode based on that.
-
-
-
diff --git a/public/js/lib/codemirror/demo/closebrackets.html b/public/js/lib/codemirror/demo/closebrackets.html
deleted file mode 100644
index d702f52696..0000000000
--- a/public/js/lib/codemirror/demo/closebrackets.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
CodeMirror: Closebrackets Demo
-
-
-
-
-
-
-
-
-
-
-
-Closebrackets Demo
-function Grid(width, height) {
- this.width = width;
- this.height = height;
- this.cells = new Array(width * height);
-}
-Grid.prototype.valueAt = function(point) {
- return this.cells[point.y * this.width + point.x];
-};
-Grid.prototype.setValueAt = function(point, value) {
- this.cells[point.y * this.width + point.x] = value;
-};
-Grid.prototype.isInside = function(point) {
- return point.x >= 0 && point.y >= 0 &&
- point.x < this.width && point.y < this.height;
-};
-Grid.prototype.moveValue = function(from, to) {
- this.setValueAt(to, this.valueAt(from));
- this.setValueAt(from, undefined);
-};
-
-
-
diff --git a/public/js/lib/codemirror/demo/closetag.html b/public/js/lib/codemirror/demo/closetag.html
deleted file mode 100644
index 79959d2c4d..0000000000
--- a/public/js/lib/codemirror/demo/closetag.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
CodeMirror: Close-Tag Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Close-Tag Demo
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/complete.html b/public/js/lib/codemirror/demo/complete.html
deleted file mode 100644
index cdf49dbeb9..0000000000
--- a/public/js/lib/codemirror/demo/complete.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
CodeMirror: Autocomplete Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-Autocomplete Demo
-
-function getCompletions(token, context) {
- var found = [], start = token.string;
- function maybeAdd(str) {
- if (str.indexOf(start) == 0) found.push(str);
- }
- function gatherCompletions(obj) {
- if (typeof obj == "string") forEach(stringProps, maybeAdd);
- else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
- else if (obj instanceof Function) forEach(funcProps, maybeAdd);
- for (var name in obj) maybeAdd(name);
- }
-
- if (context) {
- // If this is a property, see if it belongs to some object we can
- // find in the current environment.
- var obj = context.pop(), base;
- if (obj.className == "js-variable")
- base = window[obj.string];
- else if (obj.className == "js-string")
- base = "";
- else if (obj.className == "js-atom")
- base = 1;
- while (base != null && context.length)
- base = base[context.pop().string];
- if (base != null) gatherCompletions(base);
- }
- else {
- // If not, just look in the window object and any local scope
- // (reading into JS mode internals to get at the local variables)
- for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
- gatherCompletions(window);
- forEach(keywords, maybeAdd);
- }
- return found;
-}
-
-
-Press ctrl-space to activate autocompletion. Built
-on top of the show-hint
-and javascript-hint
-addons.
-
-
-
diff --git a/public/js/lib/codemirror/demo/emacs.html b/public/js/lib/codemirror/demo/emacs.html
deleted file mode 100644
index c626b8d408..0000000000
--- a/public/js/lib/codemirror/demo/emacs.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
CodeMirror: Emacs bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Emacs bindings demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-
-The emacs keybindings are enabled by
-including keymap/emacs.js and setting
-the keyMap
option to "emacs"
. Because
-CodeMirror's internal API is quite different from Emacs, they are only
-a loose approximation of actual emacs bindings, though.
-
-Also note that a lot of browsers disallow certain keys from being
-captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the
-result that idiomatic use of Emacs keys will constantly close your tab
-or open a new window.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/folding.html b/public/js/lib/codemirror/demo/folding.html
deleted file mode 100644
index 81cbf9894b..0000000000
--- a/public/js/lib/codemirror/demo/folding.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
CodeMirror: Code Folding Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code Folding Demo
-
- JavaScript:
-
- HTML:
-
- Markdown:
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/fullscreen.html b/public/js/lib/codemirror/demo/fullscreen.html
deleted file mode 100644
index 1fbdc488e1..0000000000
--- a/public/js/lib/codemirror/demo/fullscreen.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
CodeMirror: Full Screen Editing
-
-
-
-
-
-
-
-
-
-
-
-
-
-Full Screen Editing
-
-
- indentWithTabs : boolean
- Whether, when indenting, the first N*tabSize
- spaces should be replaced by N tabs. Default is false.
-
- electricChars : boolean
- Configures whether the editor should re-indent the current
- line when a character is typed that might change its proper
- indentation (only works if the mode supports indentation).
- Default is true.
-
- specialChars : RegExp
- A regular expression used to determine which characters
- should be replaced by a
- special placeholder .
- Mostly useful for non-printing special characters. The default
- is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/
.
- specialCharPlaceholder : function(char) → Element
- A function that, given a special character identified by
- the specialChars
- option, produces a DOM node that is used to represent the
- character. By default, a red dot (• )
- is shown, with a title tooltip to indicate the character code.
-
- rtlMoveVisually : boolean
- Determines whether horizontal cursor movement through
- right-to-left (Arabic, Hebrew) text is visual (pressing the left
- arrow moves the cursor left) or logical (pressing the left arrow
- moves to the next lower index in the string, which is visually
- right in right-to-left text). The default is false
- on Windows, and true
on other platforms.
-
-
-
-
- Demonstration of
- the fullscreen
- addon. Press F11 when cursor is in the editor to
- toggle full screen editing. Esc can also be used
- to exit full screen editing.
-
diff --git a/public/js/lib/codemirror/demo/hardwrap.html b/public/js/lib/codemirror/demo/hardwrap.html
deleted file mode 100644
index f1a870b41c..0000000000
--- a/public/js/lib/codemirror/demo/hardwrap.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
CodeMirror: Hard-wrapping Demo
-
-
-
-
-
-
-
-
-
-
-
-Hard-wrapping Demo
-Lorem ipsum dolor sit amet, vim augue dictas constituto ex,
-sit falli simul viderer te. Graeco scaevola maluisset sit
-ut, in idque viris praesent sea. Ea sea eirmod indoctum
-repudiare. Vel noluisse suscipit pericula ut. In ius nulla
-alienum molestie. Mei essent discere democritum id.
-
-Equidem ponderum expetendis ius in, mea an erroribus
-constituto, congue timeam perfecto ad est. Ius ut primis
-timeam, per in ullum mediocrem. An case vero labitur pri,
-vel dicit laoreet et. An qui prompta conclusionemque, eam
-timeam sapientem in, cum dictas epicurei eu.
-
-Usu cu vide dictas deseruisse, eum choro graece adipiscing
-ut. Cibo qualisque ius ad, et dicat scripta mea, eam nihil
-mentitum aliquando cu. Debet aperiam splendide at quo, ad
-paulo nostro commodo duo. Sea adhuc utinam conclusionemque
-id, quas doming malorum nec ad. Tollit eruditi vivendum ad
-ius, eos soleat ignota ad.
-
-
-Demonstration of
-the hardwrap addon.
-The above editor has its change event hooked up to
-the wrapParagraphsInRange
method, so that the paragraphs
-are reflown as you are typing.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/html5complete.html b/public/js/lib/codemirror/demo/html5complete.html
deleted file mode 100644
index 411baae3ed..0000000000
--- a/public/js/lib/codemirror/demo/html5complete.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
CodeMirror: HTML completion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HTML completion demo
-
- Shows the XML completer
- parameterized with information about the tags in HTML.
- Press ctrl-space to activate completion.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/indentwrap.html b/public/js/lib/codemirror/demo/indentwrap.html
deleted file mode 100644
index 3d3d0af6ab..0000000000
--- a/public/js/lib/codemirror/demo/indentwrap.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
CodeMirror: Indented wrapped line demo
-
-
-
-
-
-
-
-
-
-
-Indented wrapped line demo
-
-
-
- Overview
-
- CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides only the editor component, no accompanying buttons, auto-completion, or other IDE functionality. It does provide a rich API on top of which such functionality can be straightforwardly implemented. See the add-ons included in the distribution, and the CodeMirror UI project, for reusable implementations of extra features.
-
- CodeMirror works with language-specific modes. Modes are JavaScript programs that help color (and optionally indent) text written in a given language. The distribution comes with a number of modes (see the mode/
directory), and it isn't hard to write new ones for other languages.
-
-
-
- This page uses a hack on top of the "renderLine"
- event to make wrapped text line up with the base indentation of
- the line.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/lint.html b/public/js/lib/codemirror/demo/lint.html
deleted file mode 100644
index 29936a8d96..0000000000
--- a/public/js/lib/codemirror/demo/lint.html
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
CodeMirror: Linter Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Linter Demo
-
-
- var widgets = []
-function updateHints() {
- editor.operation(function(){
- for (var i = 0; i < widgets.length; ++i)
- editor.removeLineWidget(widgets[i]);
- widgets.length = 0;
-
- JSHINT(editor.getValue());
- for (var i = 0; i < JSHINT.errors.length; ++i) {
- var err = JSHINT.errors[i];
- if (!err) continue;
- var msg = document.createElement("div");
- var icon = msg.appendChild(document.createElement("span"));
- icon.innerHTML = "!!";
- icon.className = "lint-error-icon";
- msg.appendChild(document.createTextNode(err.reason));
- msg.className = "lint-error";
- widgets.push(editor.addLineWidget(err.line - 1, msg, {coverGutter: false, noHScroll: true}));
- }
- });
- var info = editor.getScrollInfo();
- var after = editor.charCoords({line: editor.getCursor().line + 1, ch: 0}, "local").top;
- if (info.top + info.clientHeight < after)
- editor.scrollTo(null, after - info.clientHeight + 3);
-}
-
-
- [
- {
- _id: "post 1",
- "author": "Bob",
- "content": "...",
- "page_views": 5
- },
- {
- "_id": "post 2",
- "author": "Bob",
- "content": "...",
- "page_views": 9
- },
- {
- "_id": "post 3",
- "author": "Bob",
- "content": "...",
- "page_views": 8
- }
-]
-
-
- @charset "UTF-8";
-
-@import url("booya.css") print, screen;
-@import "whatup.css" screen;
-@import "wicked.css";
-
-/*Error*/
-@charset "UTF-8";
-
-
-@namespace "http://www.w3.org/1999/xhtml";
-@namespace svg "http://www.w3.org/2000/svg";
-
-/*Warning: empty ruleset */
-.foo {
-}
-
-h1 {
- font-weight: bold;
-}
-
-/*Warning: qualified heading */
-.foo h1 {
- font-weight: bold;
-}
-
-/*Warning: adjoining classes */
-.foo.bar {
- zoom: 1;
-}
-
-li.inline {
- width: 100%; /*Warning: 100% can be problematic*/
-}
-
-li.last {
- display: inline;
- padding-left: 3px !important;
- padding-right: 3px;
- border-right: 0px;
-}
-
-@media print {
- li.inline {
- color: black;
- }
-}
-
-@page {
- margin: 10%;
- counter-increment: page;
-
- @top-center {
- font-family: sans-serif;
- font-weight: bold;
- font-size: 2em;
- content: counter(page);
- }
-}
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/loadmode.html b/public/js/lib/codemirror/demo/loadmode.html
deleted file mode 100644
index 809cd90225..0000000000
--- a/public/js/lib/codemirror/demo/loadmode.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
CodeMirror: Lazy Mode Loading Demo
-
-
-
-
-
-
-
-
-
-
-
-Lazy Mode Loading Demo
-Current mode: text/plain
-This is the editor.
-// It starts out in plain text mode,
-# use the control below to load and apply a mode
- "you'll see the highlighting of" this text /*change*/.
-
-Filename, mime, or mode name: change mode
-
-
-
diff --git a/public/js/lib/codemirror/demo/marker.html b/public/js/lib/codemirror/demo/marker.html
deleted file mode 100644
index 3a8b850009..0000000000
--- a/public/js/lib/codemirror/demo/marker.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
CodeMirror: Breakpoint Demo
-
-
-
-
-
-
-
-
-
-
-Breakpoint Demo
-
-var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
- lineNumbers: true,
- gutters: ["CodeMirror-linenumbers", "breakpoints"]
-});
-editor.on("gutterClick", function(cm, n) {
- var info = cm.lineInfo(n);
- cm.setGutterMarker(n, "breakpoints", info.gutterMarkers ? null : makeMarker());
-});
-
-function makeMarker() {
- var marker = document.createElement("div");
- marker.style.color = "#822";
- marker.innerHTML = "●";
- return marker;
-}
-
-
-Click the line-number gutter to add or remove 'breakpoints'.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/markselection.html b/public/js/lib/codemirror/demo/markselection.html
deleted file mode 100644
index d4c8a7a0d1..0000000000
--- a/public/js/lib/codemirror/demo/markselection.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
CodeMirror: Selection Marking Demo
-
-
-
-
-
-
-
-
-
-
-
-Selection Marking Demo
-
-Select something from here. You'll see that the selection's foreground
-color changes to white! Since, by default, CodeMirror only puts an
-independent "marker" layer behind the text, you'll need something like
-this to change its colour.
-
-Also notice that turning this addon on (with the default style) allows
-you to safely give text a background color without screwing up the
-visibility of the selection.
-
-
-
- Simple addon to easily mark (and style) selected text. Docs .
-
-
diff --git a/public/js/lib/codemirror/demo/matchhighlighter.html b/public/js/lib/codemirror/demo/matchhighlighter.html
deleted file mode 100644
index c60109009e..0000000000
--- a/public/js/lib/codemirror/demo/matchhighlighter.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
CodeMirror: Match Highlighter Demo
-
-
-
-
-
-
-
-
-
-
-
-Match Highlighter Demo
-Select this text: hardToSpotVar
- And everywhere else in your code where hardToSpotVar appears will automatically illuminate.
-Give it a try! No more hardToSpotVars.
-
-
-
- Search and highlight occurences of the selected text.
-
-
diff --git a/public/js/lib/codemirror/demo/matchtags.html b/public/js/lib/codemirror/demo/matchtags.html
deleted file mode 100644
index 175639a396..0000000000
--- a/public/js/lib/codemirror/demo/matchtags.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
CodeMirror: Tag Matcher Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Tag Matcher Demo
-
-
-
-
-
-
- Put the cursor on or inside a pair of tags to highlight them.
- Press Ctrl-J to jump to the tag that matches the one under the
- cursor.
-
diff --git a/public/js/lib/codemirror/demo/merge.html b/public/js/lib/codemirror/demo/merge.html
deleted file mode 100644
index dad1952757..0000000000
--- a/public/js/lib/codemirror/demo/merge.html
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
CodeMirror: merge view demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-merge view demo
-
-
-
-
-The merge
-addon provides an interface for displaying and merging diffs,
-either two-way
-or three-way .
-The left (or center) pane is editable, and the differences with the
-other pane(s) are optionally shown live as you edit
-it. In the two-way configuration, there are also options to pad changed
-sections to align them, and to collapse unchanged
-stretches of text.
-
-This addon depends on
-the google-diff-match-patch
-library to compute the diffs.
-
-
-
diff --git a/public/js/lib/codemirror/demo/multiplex.html b/public/js/lib/codemirror/demo/multiplex.html
deleted file mode 100644
index ca8c80aedc..0000000000
--- a/public/js/lib/codemirror/demo/multiplex.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
CodeMirror: Multiplexing Parser Demo
-
-
-
-
-
-
-
-
-
-
-
-Multiplexing Parser Demo
-
-
-
- << this is not >
- <<
- multiline
- not html
- at all : &
- >>
- this is html again
-
-
-
-
-
-
- Demonstration of a multiplexing mode, which, at certain
- boundary strings, switches to one or more inner modes. The out
- (HTML) mode does not get fed the content of the <<
- >>
blocks. See
- the manual and
- the source for more
- information.
-
-
- Parsing/Highlighting Tests:
- normal ,
- verbose .
-
-
-
diff --git a/public/js/lib/codemirror/demo/mustache.html b/public/js/lib/codemirror/demo/mustache.html
deleted file mode 100644
index ae4e6a891b..0000000000
--- a/public/js/lib/codemirror/demo/mustache.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
CodeMirror: Overlay Parser Demo
-
-
-
-
-
-
-
-
-
-
-
-Overlay Parser Demo
-
-
-
- {{title}}
- These are links to {{things}}:
-
-
-
-
-
-
-
- Demonstration of a mode that parses HTML, highlighting
- the Mustache templating
- directives inside of it by using the code
- in overlay.js
. View
- source to see the 15 lines of code needed to accomplish this.
-
-
diff --git a/public/js/lib/codemirror/demo/panel.html b/public/js/lib/codemirror/demo/panel.html
deleted file mode 100644
index 7f4bbefca6..0000000000
--- a/public/js/lib/codemirror/demo/panel.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
CodeMirror: Panel Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Panel Demo
-
-
-
-
-The panel
-addon allows you to display panels above or below an editor. Click the
-links in the previous paragraph to add panels to the editor.
-
-
diff --git a/public/js/lib/codemirror/demo/placeholder.html b/public/js/lib/codemirror/demo/placeholder.html
deleted file mode 100644
index 432331a486..0000000000
--- a/public/js/lib/codemirror/demo/placeholder.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
CodeMirror: Placeholder demo
-
-
-
-
-
-
-
-
-
-
-Placeholder demo
-
-
- The placeholder
- plug-in adds an option placeholder
that can be set to
- make text appear in the editor when it is empty and not focused.
- If the source textarea has a placeholder
attribute,
- it will automatically be inherited.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/preview.html b/public/js/lib/codemirror/demo/preview.html
deleted file mode 100644
index 19e1530b80..0000000000
--- a/public/js/lib/codemirror/demo/preview.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
CodeMirror: HTML5 preview
-
-
-
-
-
-
-
-
-
-
-
-
-
-HTML5 preview
-
-
-
-
-
-
- HTML5 canvas demo
-
-
-
- Canvas pane goes here:
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/requirejs.html b/public/js/lib/codemirror/demo/requirejs.html
deleted file mode 100644
index f99b77945a..0000000000
--- a/public/js/lib/codemirror/demo/requirejs.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
CodeMirror: HTML completion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
- RequireJS module loading demo
-
- This demo does the same thing as
- the HTML5 completion demo , but
- loads its dependencies
- with Require.js , rather than
- explicitly. Press ctrl-space to activate
- completion.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/resize.html b/public/js/lib/codemirror/demo/resize.html
deleted file mode 100644
index 1c1ef390ab..0000000000
--- a/public/js/lib/codemirror/demo/resize.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
CodeMirror: Autoresize Demo
-
-
-
-
-
-
-
-
-
-
-Autoresize Demo
-
-.CodeMirror {
- border: 1px solid #eee;
- height: auto;
-}
-
-
-By setting an editor's height
style
-to auto
and giving
-the viewportMargin
-a value of Infinity
, CodeMirror can be made to
-automatically resize to fit its content.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/rulers.html b/public/js/lib/codemirror/demo/rulers.html
deleted file mode 100644
index 2ac4111582..0000000000
--- a/public/js/lib/codemirror/demo/rulers.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
CodeMirror: Ruler Demo
-
-
-
-
-
-
-
-
-
-
-Ruler Demo
-
-
-
-Demonstration of
-the rulers addon, which
-displays vertical lines at given column offsets.
-
-
diff --git a/public/js/lib/codemirror/demo/runmode.html b/public/js/lib/codemirror/demo/runmode.html
deleted file mode 100644
index 257f03d6b6..0000000000
--- a/public/js/lib/codemirror/demo/runmode.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
CodeMirror: Mode Runner Demo
-
-
-
-
-
-
-
-
-
-
-Mode Runner Demo
-
-
-
-
- Enter your xml here and press the button below to display
- it as highlighted by the CodeMirror XML mode
-
-
- Highlight!
-
-
-
-
- Running a CodeMirror mode outside of the editor.
- The CodeMirror.runMode
function, defined
- in lib/runmode.js
takes the following arguments:
-
-
- text (string)
- The document to run through the highlighter.
- mode (mode spec )
- The mode to use (must be loaded as normal).
- output (function or DOM node)
- If this is a function, it will be called for each token with
- two arguments, the token's text and the token's style class (may
- be null
for unstyled tokens). If it is a DOM node,
- the tokens will be converted to span
elements as in
- an editor, and inserted into the node
- (through innerHTML
).
-
-
-
diff --git a/public/js/lib/codemirror/demo/search.html b/public/js/lib/codemirror/demo/search.html
deleted file mode 100644
index 04ba7ac09a..0000000000
--- a/public/js/lib/codemirror/demo/search.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
CodeMirror: Search/Replace Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Search/Replace Demo
-
-
- indentWithTabs : boolean
- Whether, when indenting, the first N*tabSize
- spaces should be replaced by N tabs. Default is false.
-
- electricChars : boolean
- Configures whether the editor should re-indent the current
- line when a character is typed that might change its proper
- indentation (only works if the mode supports indentation).
- Default is true.
-
- specialChars : RegExp
- A regular expression used to determine which characters
- should be replaced by a
- special placeholder .
- Mostly useful for non-printing special characters. The default
- is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/
.
- specialCharPlaceholder : function(char) → Element
- A function that, given a special character identified by
- the specialChars
- option, produces a DOM node that is used to represent the
- character. By default, a red dot (• )
- is shown, with a title tooltip to indicate the character code.
-
- rtlMoveVisually : boolean
- Determines whether horizontal cursor movement through
- right-to-left (Arabic, Hebrew) text is visual (pressing the left
- arrow moves the cursor left) or logical (pressing the left arrow
- moves to the next lower index in the string, which is visually
- right in right-to-left text). The default is false
- on Windows, and true
on other platforms.
-
-
-
-
-
- Demonstration of primitive search/replace functionality. The
- keybindings (which can be overridden by custom keymaps) are:
-
- Ctrl-F / Cmd-F Start searching
- Ctrl-G / Cmd-G Find next
- Shift-Ctrl-G / Shift-Cmd-G Find previous
- Shift-Ctrl-F / Cmd-Option-F Replace
- Shift-Ctrl-R / Shift-Cmd-Option-F Replace all
-
- Searching is enabled by
- including addon/search/search.js
- and addon/search/searchcursor.js .
- For good-looking input dialogs, you also want to include
- addon/dialog/dialog.js
- and addon/dialog/dialog.css .
-
diff --git a/public/js/lib/codemirror/demo/simplemode.html b/public/js/lib/codemirror/demo/simplemode.html
deleted file mode 100644
index ad8baf0b50..0000000000
--- a/public/js/lib/codemirror/demo/simplemode.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
CodeMirror: Simple Mode Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Simple Mode Demo
-
-The mode/simple
-addon allows CodeMirror modes to be specified using a relatively simple
-declarative format. This format is not as powerful as writing code
-directly against the mode
-interface , but is a lot easier to get started with, and
-sufficiently expressive for many simple language modes.
-
-This interface is still in flux. It is unlikely to be scrapped or
-overhauled completely, so do start writing code against it, but
-details might change as it stabilizes, and you might have to tweak
-your code when upgrading.
-
-Simple modes (loosely based on
-the Common
-JavaScript Syntax Highlighting Specification , which never took
-off), are state machines, where each state has a number of rules that
-match tokens. A rule describes a type of token that may occur in the
-current state, and possibly a transition to another state caused by
-that token.
-
-The CodeMirror.defineSimpleMode(name, states)
method
-takes a mode name and an object that describes the mode's states. The
-editor below shows an example of such a mode (and is itself
-highlighted by the mode shown in it).
-
-
-
-Each state is an array of rules. A rule may have the following properties:
-
-
- regex : string | RegExp
- The regular expression that matches the token. May be a string
- or a regex object. When a regex, the ignoreCase
flag
- will be taken into account when matching the token. This regex
- should only capture groups when the token
property is
- an array.
- token
: string | null
- An optional token style. Multiple styles can be specified by
- separating them with dots or spaces. When the regex
for
- this rule captures groups, it must capture all of the
- string (since JS provides no way to find out where a group matched),
- and this property must hold an array of token styles that has one
- style for each matched group.
- next : string
- When a next
property is present, the mode will
- transfer to the state named by the property when the token is
- encountered.
- push : string
- Like next
, but instead replacing the current state
- by the new state, the current state is kept on a stack, and can be
- returned to with the pop
directive.
- pop : bool
- When true, and there is another state on the state stack, will
- cause the mode to pop that state off the stack and transition to
- it.
- mode : {spec, end, persistent}
- Can be used to embed another mode inside a mode. When present,
- must hold an object with a spec
property that describes
- the embedded mode, and an optional end
end property
- that specifies the regexp that will end the extent of the mode. When
- a persistent
property is set (and true), the nested
- mode's state will be preserved between occurrences of the mode.
- indent : bool
- When true, this token changes the indentation to be one unit
- more than the current line's indentation.
- dedent : bool
- When true, this token will pop one scope off the indentation
- stack.
- dedentIfLineStart : bool
- If a token has its dedent
property set, it will, by
- default, cause lines where it appears at the start to be dedented.
- Set this property to false to prevent that behavior.
-
-
-The meta
property of the states object is special, and
-will not be interpreted as a state. Instead, properties set on it will
-be set on the mode, which is useful for properties
-like lineComment
,
-which sets the comment style for a mode. The simple mode addon also
-recognizes a few such properties:
-
-
- dontIndentStates : array<string>
- An array of states in which the mode's auto-indentation should
- not take effect. Usually used for multi-line comment and string
- states.
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/simplescrollbars.html b/public/js/lib/codemirror/demo/simplescrollbars.html
deleted file mode 100644
index 9d40932649..0000000000
--- a/public/js/lib/codemirror/demo/simplescrollbars.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
CodeMirror: Simple Scrollbar Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-Simple Scrollbar Demo
-# Custom Scrollbars
-
-This is a piece of text that creates scrollbars
-
-Lorem ipsum dolor sit amet, turpis nec facilisis neque vestibulum adipiscing, magna nunc est luctus orci a,
-aliquam duis ad volutpat nostra. Vestibulum ultricies suspendisse commodo volutpat pede sed. Bibendum odio
-dignissim, ad vitae mollis ac sed nibh quis, suspendisse diam, risus quas blandit phasellus luctus nec,
-integer nunc vitae posuere scelerisque. Lobortis quam porta conubia nulla. Et nisl ac, imperdiet vitae ac.
-Parturient sit. Et vestibulum euismod, rutrum nunc libero mauris purus convallis. Cum id adipiscing et eget
-pretium rutrum, ultrices sapien magnis fringilla sit lorem, eu vitae scelerisque ipsum aliquet, magna sed
-fusce vel.
-
-Lectus ultricies libero dolor convallis, sed etiam vel hendrerit egestas viverra, at urna mauris, eget
-vulputate dolor voluptatem, nulla eget sollicitudin. Sed tincidunt, elit sociis. Mattis mi tortor dui id
-sodales mi, maecenas nam fringilla risus turpis mauris praesent, imperdiet maecenas ultrices nonummy tellus
-quis est. Scelerisque nec pharetra quis varius fringilla. Varius vestibulum non dictum pharetra, tincidunt in
-vestibulum iaculis molestie, id condimentum blandit elit urna magna pulvinar, quam suspendisse pellentesque
-donec. Vel amet ad ac. Nec aut viverra, morbi mi neque massa, turpis enim proin. Tellus eu, fermentum velit
-est convallis aliquam velit, rutrum in diam lacus, praesent tempor pellentesque dictum semper augue. Felis
-explicabo massa amet lectus phasellus dolor. Ut lorem quis arcu neque felis ultricies, senectus vitae
-curabitur sed pellentesque et, id sed risus in sed ac accumsan, blandit arcu quam duis nunc.
-
-Sed leo sollicitudin odio vitae, purus sit egestas, justo eros inceptos auctor fermentum lectus. Ligula luctus
-turpis, quod massa vitae elementum orci, nullam fringilla elit tortor. Justo ante tempor amet quam posuere
-volutpat. Facilisis pede erat ut hac ultrices ipsum, wisi duis sit metus. Dolor vitae est sed sed vitae. Sed
-eu ligula, morbi vestibulum nunc nibh velit ut taciti, ligula elit semper sagittis in, auctor arcu vel eget.
-Mauris at vitae nec suspendisse et, aenean proin blandit suscipit. Morbi quam, dolor ultricies. Viverra
-tempus. Suspendisse sit dapibus, ac fuga aenean, magna nisl nonummy augue posuere, dictum ut fuga velit
-parturient augue interdum, mattis sit tellus.
-
-Vehicula commodo tempus curabitur eros, lacinia erat vulputate lorem vel fermentum donec, lectus sed conubia
-id pellentesque. Vel senectus donec pede aliquet dolor sit, nec vivamus justo placerat interdum maecenas,
-sodales euismod. Quis netus sapien amet, vestibulum quam nec amet lacinia, quis aliquet, tempor vivamus tellus
-enim, suscipit quis eleifend. Amet class phasellus orci pretium, risus in nulla. Neque sit ullamcorper,
-ultricies platea id nec suspendisse ac. Et elementum. Dictum nam, ut dui fermentum egestas facilisis elit
-augue, adipiscing donec ipsum erat nam pellentesque convallis, vestibulum vestibulum risus id nulla ut mauris,
-curabitur aute aptent. Ultrices orci wisi dui ipsum praesent, pharetra felis eu quis. Est fringilla etiam,
-maxime sem dapibus et eget, mi enim dignissim nec pretium, augue vehicula, volutpat proin. Et occaecati
-lobortis viverra, cum in sed, vivamus tellus. Libero at malesuada est vivamus leo tortor.
-
-
-The simplescrollbars
addon defines two
-styles of non-native scrollbars: "simple"
and "overlay"
(click to try), which can be passed to
-the scrollbarStyle
option. These implement
-the scrollbar using DOM elements, allowing more control over
-its appearance .
-
-
-
diff --git a/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html b/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html
deleted file mode 100644
index 879d99b606..0000000000
--- a/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
CodeMirror: Automatically derive odd wrapping behavior for your browser
-
-
-
-
-
-
-Automatically derive odd wrapping behavior for your browser
-
-
- This is a hack to automatically derive
- a spanAffectsWrapping
regexp for a browser. See the
- comments above that variable
- in lib/codemirror.js
- for some more details.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/sublime.html b/public/js/lib/codemirror/demo/sublime.html
deleted file mode 100644
index b3b5342c97..0000000000
--- a/public/js/lib/codemirror/demo/sublime.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
CodeMirror: Sublime Text bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Sublime Text bindings demo
-
-The sublime
keymap defines many Sublime Text-specific
-bindings for CodeMirror. See the code below for an overview.
-
-Enable the keymap by
-loading keymap/sublime.js
-and setting
-the keyMap
-option to "sublime"
.
-
-(A lot of the search functionality is still missing.)
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/tern.html b/public/js/lib/codemirror/demo/tern.html
deleted file mode 100644
index 19135faf7f..0000000000
--- a/public/js/lib/codemirror/demo/tern.html
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
CodeMirror: Tern Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Tern Demo
-// Use ctrl-space to complete something
-// Put the cursor in or after an expression, press ctrl-o to
-// find its type
-
-var foo = ["array", "of", "strings"];
-var bar = foo.slice(0, 2).join("").split("a")[0];
-
-// Works for locally defined types too.
-
-function CTor() { this.size = 10; }
-CTor.prototype.hallo = "hallo";
-
-var baz = new CTor;
-baz.
-
-// You can press ctrl-q when the cursor is on a variable name to
-// rename it. Try it with CTor...
-
-// When the cursor is in an argument list, the arguments are
-// shown below the editor.
-
-[1].reduce( );
-
-// And a little more advanced code...
-
-(function(exports) {
- exports.randomElt = function(arr) {
- return arr[Math.floor(arr.length * Math.random())];
- };
- exports.strList = "foo".split("");
- exports.intList = exports.strList.map(function(s) { return s.charCodeAt(0); });
-})(window.myMod = {});
-
-var randomStr = myMod.randomElt(myMod.strList);
-var randomInt = myMod.randomElt(myMod.intList);
-
-
-Demonstrates integration of Tern
-and CodeMirror. The following keys are bound:
-
-
- Ctrl-Space Autocomplete
- Ctrl-O Find docs for the expression at the cursor
- Ctrl-I Find type at cursor
- Alt-. Jump to definition (Alt-, to jump back)
- Ctrl-Q Rename variable
- Ctrl-. Select all occurrences of a variable
-
-
-Documentation is sparse for now. See the top of
-the script for a rough API
-overview.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/theme.html b/public/js/lib/codemirror/demo/theme.html
deleted file mode 100644
index e951c84c36..0000000000
--- a/public/js/lib/codemirror/demo/theme.html
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
CodeMirror: Theme Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Theme Demo
-
-function findSequence(goal) {
- function find(start, history) {
- if (start == goal)
- return history;
- else if (start > goal)
- return null;
- else
- return find(start + 5, "(" + history + " + 5)") ||
- find(start * 3, "(" + history + " * 3)");
- }
- return find(1, "1");
-}
-
-Select a theme:
- default
- 3024-day
- 3024-night
- ambiance
- base16-dark
- base16-light
- blackboard
- cobalt
- eclipse
- elegant
- erlang-dark
- lesser-dark
- mbo
- mdn-like
- midnight
- monokai
- neat
- neo
- night
- paraiso-dark
- paraiso-light
- pastel-on-dark
- rubyblue
- solarized dark
- solarized light
- the-matrix
- tomorrow-night-bright
- tomorrow-night-eighties
- twilight
- vibrant-ink
- xq-dark
- xq-light
- zenburn
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/trailingspace.html b/public/js/lib/codemirror/demo/trailingspace.html
deleted file mode 100644
index 1992ba3ff9..0000000000
--- a/public/js/lib/codemirror/demo/trailingspace.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
CodeMirror: Trailing Whitespace Demo
-
-
-
-
-
-
-
-
-
-
-Trailing Whitespace Demo
-This text
- has some
-trailing whitespace!
-
-
-
-Uses
-the trailingspace
-addon to highlight trailing whitespace.
-
-
diff --git a/public/js/lib/codemirror/demo/variableheight.html b/public/js/lib/codemirror/demo/variableheight.html
deleted file mode 100644
index d49942864b..0000000000
--- a/public/js/lib/codemirror/demo/variableheight.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
CodeMirror: Variable Height Demo
-
-
-
-
-
-
-
-
-
-
-
-Variable Height Demo
-# A First Level Header
-
-**Bold** text in a normal-size paragraph.
-
-And a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long, wrapped line with a piece of **big** text inside of it.
-
-## A Second Level Header
-
-Now is the time for all good men to come to
-the aid of their country. This is just a
-regular paragraph.
-
-The quick brown fox jumped over the lazy
-dog's back.
-
-### Header 3
-
-> This is a blockquote.
->
-> This is the second paragraph in the blockquote.
->
-> ## This is an H2 in a blockquote
-
-
-
diff --git a/public/js/lib/codemirror/demo/vim.html b/public/js/lib/codemirror/demo/vim.html
deleted file mode 100644
index 6a33a6c075..0000000000
--- a/public/js/lib/codemirror/demo/vim.html
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
CodeMirror: Vim bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Vim bindings demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-Key buffer:
-
-The vim keybindings are enabled by
-including keymap/vim.js and setting
-the vimMode
option to true
. This will also
-automatically change the keyMap
option to "vim"
.
-
-Features
-
-
- All common motions and operators, including text objects
- Operator motion orthogonality
- Visual mode - characterwise, linewise, partial support for blockwise
- Full macro support (q, @)
- Incremental highlighted search (/, ?, #, *, g#, g*)
- Search/replace with confirm (:substitute, :%s)
- Search history
- Jump lists (Ctrl-o, Ctrl-i)
- Key/command mapping with API (:map, :nmap, :vmap)
- Sort (:sort)
- Marks (`, ')
- :global
- Insert mode behaves identical to base CodeMirror
- Cross-buffer yank/paste
-
-
-Note that while the vim mode tries to emulate the most useful features of
-vim as faithfully as possible, it does not strive to become a complete vim
-implementation
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/visibletabs.html b/public/js/lib/codemirror/demo/visibletabs.html
deleted file mode 100644
index 2eec337ed3..0000000000
--- a/public/js/lib/codemirror/demo/visibletabs.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
CodeMirror: Visible tabs demo
-
-
-
-
-
-
-
-
-
-
-Visible tabs demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-
-Tabs inside the editor are spans with the
-class cm-tab
, and can be styled.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/widget.html b/public/js/lib/codemirror/demo/widget.html
deleted file mode 100644
index da39a9297a..0000000000
--- a/public/js/lib/codemirror/demo/widget.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
CodeMirror: Inline Widget Demo
-
-
-
-
-
-
-
-
-
-
-
-Inline Widget Demo
-
-
-
-
-This demo runs JSHint over the code
-in the editor (which is the script used on this page), and
-inserts line widgets to
-display the warnings that JSHint comes up with.
-
diff --git a/public/js/lib/codemirror/demo/xmlcomplete.html b/public/js/lib/codemirror/demo/xmlcomplete.html
deleted file mode 100644
index bd452e6f6e..0000000000
--- a/public/js/lib/codemirror/demo/xmlcomplete.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
CodeMirror: XML Autocomplete Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML Autocomplete Demo
-
-
-
- Press ctrl-space , or type a '<' character to
- activate autocompletion. This demo defines a simple schema that
- guides completion. The schema can be customized—see
- the manual .
-
- Development of the xml-hint
addon was kindly
- sponsored
- by www.xperiment.mobi .
-
-
-
From 3196824b61425e0b6facc039f6d8f579d8e36ca5 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:49:44 -0700
Subject: [PATCH 210/548] remove unnecessary codemirror modes
---
public/js/lib/codemirror/mode/apl/apl.js | 175 ----
public/js/lib/codemirror/mode/apl/index.html | 72 --
.../lib/codemirror/mode/asterisk/asterisk.js | 198 -----
.../lib/codemirror/mode/asterisk/index.html | 154 ----
public/js/lib/codemirror/mode/clike/clike.js | 489 ----------
.../js/lib/codemirror/mode/clike/index.html | 251 ------
.../js/lib/codemirror/mode/clike/scala.html | 767 ----------------
.../js/lib/codemirror/mode/clojure/clojure.js | 243 -----
.../js/lib/codemirror/mode/clojure/index.html | 88 --
public/js/lib/codemirror/mode/cobol/cobol.js | 255 ------
.../js/lib/codemirror/mode/cobol/index.html | 210 -----
.../mode/coffeescript/coffeescript.js | 369 --------
.../codemirror/mode/coffeescript/index.html | 740 ----------------
.../codemirror/mode/commonlisp/commonlisp.js | 122 ---
.../lib/codemirror/mode/commonlisp/index.html | 177 ----
.../js/lib/codemirror/mode/cypher/cypher.js | 146 ---
.../js/lib/codemirror/mode/cypher/index.html | 63 --
public/js/lib/codemirror/mode/d/d.js | 218 -----
public/js/lib/codemirror/mode/d/index.html | 273 ------
public/js/lib/codemirror/mode/dart/dart.js | 50 --
public/js/lib/codemirror/mode/dart/index.html | 71 --
public/js/lib/codemirror/mode/diff/diff.js | 47 -
public/js/lib/codemirror/mode/diff/index.html | 117 ---
.../js/lib/codemirror/mode/django/django.js | 67 --
.../js/lib/codemirror/mode/django/index.html | 63 --
.../codemirror/mode/dockerfile/dockerfile.js | 76 --
.../lib/codemirror/mode/dockerfile/index.html | 73 --
public/js/lib/codemirror/mode/dtd/dtd.js | 142 ---
public/js/lib/codemirror/mode/dtd/index.html | 89 --
public/js/lib/codemirror/mode/dylan/dylan.js | 299 -------
.../js/lib/codemirror/mode/dylan/index.html | 407 ---------
public/js/lib/codemirror/mode/ebnf/ebnf.js | 195 ----
public/js/lib/codemirror/mode/ebnf/index.html | 102 ---
public/js/lib/codemirror/mode/ecl/ecl.js | 207 -----
public/js/lib/codemirror/mode/ecl/index.html | 52 --
.../js/lib/codemirror/mode/eiffel/eiffel.js | 162 ----
.../js/lib/codemirror/mode/eiffel/index.html | 429 ---------
.../js/lib/codemirror/mode/erlang/erlang.js | 622 -------------
.../js/lib/codemirror/mode/erlang/index.html | 76 --
.../js/lib/codemirror/mode/fortran/fortran.js | 188 ----
.../js/lib/codemirror/mode/fortran/index.html | 81 --
public/js/lib/codemirror/mode/gas/gas.js | 345 --------
public/js/lib/codemirror/mode/gas/index.html | 68 --
public/js/lib/codemirror/mode/gfm/gfm.js | 123 ---
public/js/lib/codemirror/mode/gfm/index.html | 93 --
public/js/lib/codemirror/mode/gfm/test.js | 213 -----
.../js/lib/codemirror/mode/gherkin/gherkin.js | 178 ----
.../js/lib/codemirror/mode/gherkin/index.html | 48 -
public/js/lib/codemirror/mode/go/go.js | 184 ----
public/js/lib/codemirror/mode/go/index.html | 85 --
.../js/lib/codemirror/mode/groovy/groovy.js | 226 -----
.../js/lib/codemirror/mode/groovy/index.html | 84 --
public/js/lib/codemirror/mode/haml/haml.js | 159 ----
public/js/lib/codemirror/mode/haml/index.html | 79 --
public/js/lib/codemirror/mode/haml/test.js | 97 --
.../js/lib/codemirror/mode/haskell/haskell.js | 267 ------
.../js/lib/codemirror/mode/haskell/index.html | 73 --
public/js/lib/codemirror/mode/haxe/haxe.js | 518 -----------
public/js/lib/codemirror/mode/haxe/index.html | 124 ---
public/js/lib/codemirror/mode/http/http.js | 113 ---
public/js/lib/codemirror/mode/http/index.html | 45 -
public/js/lib/codemirror/mode/index.html | 132 ---
.../js/lib/codemirror/mode/jinja2/index.html | 54 --
.../js/lib/codemirror/mode/jinja2/jinja2.js | 142 ---
.../js/lib/codemirror/mode/julia/index.html | 195 ----
public/js/lib/codemirror/mode/julia/julia.js | 301 -------
.../js/lib/codemirror/mode/kotlin/index.html | 89 --
.../js/lib/codemirror/mode/kotlin/kotlin.js | 280 ------
.../lib/codemirror/mode/livescript/index.html | 459 ----------
.../codemirror/mode/livescript/livescript.js | 280 ------
public/js/lib/codemirror/mode/lua/index.html | 85 --
public/js/lib/codemirror/mode/lua/lua.js | 159 ----
public/js/lib/codemirror/mode/mirc/index.html | 160 ----
public/js/lib/codemirror/mode/mirc/mirc.js | 193 ----
.../js/lib/codemirror/mode/mllike/index.html | 179 ----
.../js/lib/codemirror/mode/mllike/mllike.js | 205 -----
.../lib/codemirror/mode/modelica/index.html | 67 --
.../lib/codemirror/mode/modelica/modelica.js | 245 ------
.../js/lib/codemirror/mode/nginx/index.html | 181 ----
public/js/lib/codemirror/mode/nginx/nginx.js | 178 ----
.../lib/codemirror/mode/ntriples/index.html | 45 -
.../lib/codemirror/mode/ntriples/ntriples.js | 186 ----
.../js/lib/codemirror/mode/octave/index.html | 83 --
.../js/lib/codemirror/mode/octave/octave.js | 135 ---
.../js/lib/codemirror/mode/pascal/index.html | 61 --
.../js/lib/codemirror/mode/pascal/pascal.js | 109 ---
.../js/lib/codemirror/mode/pegjs/index.html | 66 --
public/js/lib/codemirror/mode/pegjs/pegjs.js | 114 ---
public/js/lib/codemirror/mode/perl/index.html | 75 --
public/js/lib/codemirror/mode/perl/perl.js | 832 ------------------
public/js/lib/codemirror/mode/php/index.html | 64 --
public/js/lib/codemirror/mode/php/php.js | 226 -----
public/js/lib/codemirror/mode/php/test.js | 154 ----
public/js/lib/codemirror/mode/pig/index.html | 55 --
public/js/lib/codemirror/mode/pig/pig.js | 188 ----
.../lib/codemirror/mode/properties/index.html | 53 --
.../codemirror/mode/properties/properties.js | 78 --
.../js/lib/codemirror/mode/puppet/index.html | 121 ---
.../js/lib/codemirror/mode/puppet/puppet.js | 220 -----
.../js/lib/codemirror/mode/python/index.html | 198 -----
.../js/lib/codemirror/mode/python/python.js | 359 --------
public/js/lib/codemirror/mode/q/index.html | 144 ---
public/js/lib/codemirror/mode/q/q.js | 139 ---
public/js/lib/codemirror/mode/r/index.html | 85 --
public/js/lib/codemirror/mode/r/r.js | 162 ----
.../codemirror/mode/rpm/changes/index.html | 66 --
public/js/lib/codemirror/mode/rpm/index.html | 149 ----
public/js/lib/codemirror/mode/rpm/rpm.js | 101 ---
public/js/lib/codemirror/mode/rst/index.html | 535 -----------
public/js/lib/codemirror/mode/rst/rst.js | 557 ------------
public/js/lib/codemirror/mode/ruby/index.html | 183 ----
public/js/lib/codemirror/mode/ruby/ruby.js | 285 ------
public/js/lib/codemirror/mode/ruby/test.js | 14 -
public/js/lib/codemirror/mode/rust/index.html | 60 --
public/js/lib/codemirror/mode/rust/rust.js | 451 ----------
public/js/lib/codemirror/mode/sass/index.html | 66 --
public/js/lib/codemirror/mode/sass/sass.js | 327 -------
.../js/lib/codemirror/mode/scheme/index.html | 77 --
.../js/lib/codemirror/mode/scheme/scheme.js | 248 ------
.../js/lib/codemirror/mode/shell/index.html | 66 --
public/js/lib/codemirror/mode/shell/shell.js | 139 ---
public/js/lib/codemirror/mode/shell/test.js | 58 --
.../js/lib/codemirror/mode/sieve/index.html | 93 --
public/js/lib/codemirror/mode/sieve/sieve.js | 193 ----
public/js/lib/codemirror/mode/slim/index.html | 96 --
public/js/lib/codemirror/mode/slim/slim.js | 575 ------------
public/js/lib/codemirror/mode/slim/test.js | 96 --
.../lib/codemirror/mode/smalltalk/index.html | 68 --
.../codemirror/mode/smalltalk/smalltalk.js | 168 ----
.../js/lib/codemirror/mode/smarty/index.html | 136 ---
.../js/lib/codemirror/mode/smarty/smarty.js | 221 -----
.../codemirror/mode/smartymixed/index.html | 114 ---
.../mode/smartymixed/smartymixed.js | 197 -----
public/js/lib/codemirror/mode/solr/index.html | 57 --
public/js/lib/codemirror/mode/solr/solr.js | 104 ---
public/js/lib/codemirror/mode/soy/index.html | 68 --
public/js/lib/codemirror/mode/soy/soy.js | 198 -----
.../js/lib/codemirror/mode/sparql/index.html | 61 --
.../js/lib/codemirror/mode/sparql/sparql.js | 174 ----
.../codemirror/mode/spreadsheet/index.html | 42 -
.../mode/spreadsheet/spreadsheet.js | 109 ---
public/js/lib/codemirror/mode/sql/index.html | 84 --
public/js/lib/codemirror/mode/sql/sql.js | 391 --------
public/js/lib/codemirror/mode/stex/index.html | 110 ---
public/js/lib/codemirror/mode/stex/stex.js | 251 ------
public/js/lib/codemirror/mode/stex/test.js | 123 ---
public/js/lib/codemirror/mode/tcl/index.html | 142 ---
public/js/lib/codemirror/mode/tcl/tcl.js | 147 ----
.../js/lib/codemirror/mode/textile/index.html | 191 ----
public/js/lib/codemirror/mode/textile/test.js | 417 ---------
.../js/lib/codemirror/mode/textile/textile.js | 469 ----------
.../lib/codemirror/mode/tiddlywiki/index.html | 154 ----
.../codemirror/mode/tiddlywiki/tiddlywiki.css | 14 -
.../codemirror/mode/tiddlywiki/tiddlywiki.js | 369 --------
public/js/lib/codemirror/mode/tiki/index.html | 95 --
public/js/lib/codemirror/mode/tiki/tiki.css | 26 -
public/js/lib/codemirror/mode/tiki/tiki.js | 323 -------
public/js/lib/codemirror/mode/toml/index.html | 73 --
public/js/lib/codemirror/mode/toml/toml.js | 88 --
.../js/lib/codemirror/mode/tornado/index.html | 63 --
.../js/lib/codemirror/mode/tornado/tornado.js | 68 --
.../js/lib/codemirror/mode/turtle/index.html | 50 --
.../js/lib/codemirror/mode/turtle/turtle.js | 162 ----
public/js/lib/codemirror/mode/vb/index.html | 102 ---
public/js/lib/codemirror/mode/vb/vb.js | 274 ------
.../lib/codemirror/mode/vbscript/index.html | 55 --
.../lib/codemirror/mode/vbscript/vbscript.js | 350 --------
.../lib/codemirror/mode/velocity/index.html | 118 ---
.../lib/codemirror/mode/velocity/velocity.js | 201 -----
.../js/lib/codemirror/mode/verilog/index.html | 120 ---
public/js/lib/codemirror/mode/verilog/test.js | 273 ------
.../js/lib/codemirror/mode/verilog/verilog.js | 364 --------
.../js/lib/codemirror/mode/xquery/index.html | 210 -----
public/js/lib/codemirror/mode/xquery/test.js | 67 --
.../js/lib/codemirror/mode/xquery/xquery.js | 447 ----------
public/js/lib/codemirror/mode/z80/index.html | 52 --
public/js/lib/codemirror/mode/z80/z80.js | 100 ---
177 files changed, 31978 deletions(-)
delete mode 100644 public/js/lib/codemirror/mode/apl/apl.js
delete mode 100644 public/js/lib/codemirror/mode/apl/index.html
delete mode 100644 public/js/lib/codemirror/mode/asterisk/asterisk.js
delete mode 100644 public/js/lib/codemirror/mode/asterisk/index.html
delete mode 100644 public/js/lib/codemirror/mode/clike/clike.js
delete mode 100644 public/js/lib/codemirror/mode/clike/index.html
delete mode 100644 public/js/lib/codemirror/mode/clike/scala.html
delete mode 100644 public/js/lib/codemirror/mode/clojure/clojure.js
delete mode 100644 public/js/lib/codemirror/mode/clojure/index.html
delete mode 100644 public/js/lib/codemirror/mode/cobol/cobol.js
delete mode 100644 public/js/lib/codemirror/mode/cobol/index.html
delete mode 100644 public/js/lib/codemirror/mode/coffeescript/coffeescript.js
delete mode 100644 public/js/lib/codemirror/mode/coffeescript/index.html
delete mode 100644 public/js/lib/codemirror/mode/commonlisp/commonlisp.js
delete mode 100644 public/js/lib/codemirror/mode/commonlisp/index.html
delete mode 100644 public/js/lib/codemirror/mode/cypher/cypher.js
delete mode 100644 public/js/lib/codemirror/mode/cypher/index.html
delete mode 100644 public/js/lib/codemirror/mode/d/d.js
delete mode 100644 public/js/lib/codemirror/mode/d/index.html
delete mode 100644 public/js/lib/codemirror/mode/dart/dart.js
delete mode 100644 public/js/lib/codemirror/mode/dart/index.html
delete mode 100644 public/js/lib/codemirror/mode/diff/diff.js
delete mode 100644 public/js/lib/codemirror/mode/diff/index.html
delete mode 100644 public/js/lib/codemirror/mode/django/django.js
delete mode 100644 public/js/lib/codemirror/mode/django/index.html
delete mode 100644 public/js/lib/codemirror/mode/dockerfile/dockerfile.js
delete mode 100644 public/js/lib/codemirror/mode/dockerfile/index.html
delete mode 100644 public/js/lib/codemirror/mode/dtd/dtd.js
delete mode 100644 public/js/lib/codemirror/mode/dtd/index.html
delete mode 100644 public/js/lib/codemirror/mode/dylan/dylan.js
delete mode 100644 public/js/lib/codemirror/mode/dylan/index.html
delete mode 100644 public/js/lib/codemirror/mode/ebnf/ebnf.js
delete mode 100644 public/js/lib/codemirror/mode/ebnf/index.html
delete mode 100644 public/js/lib/codemirror/mode/ecl/ecl.js
delete mode 100644 public/js/lib/codemirror/mode/ecl/index.html
delete mode 100644 public/js/lib/codemirror/mode/eiffel/eiffel.js
delete mode 100644 public/js/lib/codemirror/mode/eiffel/index.html
delete mode 100644 public/js/lib/codemirror/mode/erlang/erlang.js
delete mode 100644 public/js/lib/codemirror/mode/erlang/index.html
delete mode 100644 public/js/lib/codemirror/mode/fortran/fortran.js
delete mode 100644 public/js/lib/codemirror/mode/fortran/index.html
delete mode 100644 public/js/lib/codemirror/mode/gas/gas.js
delete mode 100644 public/js/lib/codemirror/mode/gas/index.html
delete mode 100644 public/js/lib/codemirror/mode/gfm/gfm.js
delete mode 100644 public/js/lib/codemirror/mode/gfm/index.html
delete mode 100644 public/js/lib/codemirror/mode/gfm/test.js
delete mode 100644 public/js/lib/codemirror/mode/gherkin/gherkin.js
delete mode 100644 public/js/lib/codemirror/mode/gherkin/index.html
delete mode 100644 public/js/lib/codemirror/mode/go/go.js
delete mode 100644 public/js/lib/codemirror/mode/go/index.html
delete mode 100644 public/js/lib/codemirror/mode/groovy/groovy.js
delete mode 100644 public/js/lib/codemirror/mode/groovy/index.html
delete mode 100644 public/js/lib/codemirror/mode/haml/haml.js
delete mode 100644 public/js/lib/codemirror/mode/haml/index.html
delete mode 100644 public/js/lib/codemirror/mode/haml/test.js
delete mode 100644 public/js/lib/codemirror/mode/haskell/haskell.js
delete mode 100644 public/js/lib/codemirror/mode/haskell/index.html
delete mode 100644 public/js/lib/codemirror/mode/haxe/haxe.js
delete mode 100644 public/js/lib/codemirror/mode/haxe/index.html
delete mode 100644 public/js/lib/codemirror/mode/http/http.js
delete mode 100644 public/js/lib/codemirror/mode/http/index.html
delete mode 100644 public/js/lib/codemirror/mode/index.html
delete mode 100644 public/js/lib/codemirror/mode/jinja2/index.html
delete mode 100644 public/js/lib/codemirror/mode/jinja2/jinja2.js
delete mode 100644 public/js/lib/codemirror/mode/julia/index.html
delete mode 100644 public/js/lib/codemirror/mode/julia/julia.js
delete mode 100644 public/js/lib/codemirror/mode/kotlin/index.html
delete mode 100644 public/js/lib/codemirror/mode/kotlin/kotlin.js
delete mode 100644 public/js/lib/codemirror/mode/livescript/index.html
delete mode 100644 public/js/lib/codemirror/mode/livescript/livescript.js
delete mode 100644 public/js/lib/codemirror/mode/lua/index.html
delete mode 100644 public/js/lib/codemirror/mode/lua/lua.js
delete mode 100644 public/js/lib/codemirror/mode/mirc/index.html
delete mode 100644 public/js/lib/codemirror/mode/mirc/mirc.js
delete mode 100644 public/js/lib/codemirror/mode/mllike/index.html
delete mode 100644 public/js/lib/codemirror/mode/mllike/mllike.js
delete mode 100644 public/js/lib/codemirror/mode/modelica/index.html
delete mode 100644 public/js/lib/codemirror/mode/modelica/modelica.js
delete mode 100644 public/js/lib/codemirror/mode/nginx/index.html
delete mode 100644 public/js/lib/codemirror/mode/nginx/nginx.js
delete mode 100644 public/js/lib/codemirror/mode/ntriples/index.html
delete mode 100644 public/js/lib/codemirror/mode/ntriples/ntriples.js
delete mode 100644 public/js/lib/codemirror/mode/octave/index.html
delete mode 100644 public/js/lib/codemirror/mode/octave/octave.js
delete mode 100644 public/js/lib/codemirror/mode/pascal/index.html
delete mode 100644 public/js/lib/codemirror/mode/pascal/pascal.js
delete mode 100644 public/js/lib/codemirror/mode/pegjs/index.html
delete mode 100644 public/js/lib/codemirror/mode/pegjs/pegjs.js
delete mode 100644 public/js/lib/codemirror/mode/perl/index.html
delete mode 100644 public/js/lib/codemirror/mode/perl/perl.js
delete mode 100644 public/js/lib/codemirror/mode/php/index.html
delete mode 100644 public/js/lib/codemirror/mode/php/php.js
delete mode 100644 public/js/lib/codemirror/mode/php/test.js
delete mode 100644 public/js/lib/codemirror/mode/pig/index.html
delete mode 100644 public/js/lib/codemirror/mode/pig/pig.js
delete mode 100644 public/js/lib/codemirror/mode/properties/index.html
delete mode 100644 public/js/lib/codemirror/mode/properties/properties.js
delete mode 100644 public/js/lib/codemirror/mode/puppet/index.html
delete mode 100644 public/js/lib/codemirror/mode/puppet/puppet.js
delete mode 100644 public/js/lib/codemirror/mode/python/index.html
delete mode 100644 public/js/lib/codemirror/mode/python/python.js
delete mode 100644 public/js/lib/codemirror/mode/q/index.html
delete mode 100644 public/js/lib/codemirror/mode/q/q.js
delete mode 100644 public/js/lib/codemirror/mode/r/index.html
delete mode 100644 public/js/lib/codemirror/mode/r/r.js
delete mode 100644 public/js/lib/codemirror/mode/rpm/changes/index.html
delete mode 100644 public/js/lib/codemirror/mode/rpm/index.html
delete mode 100644 public/js/lib/codemirror/mode/rpm/rpm.js
delete mode 100644 public/js/lib/codemirror/mode/rst/index.html
delete mode 100644 public/js/lib/codemirror/mode/rst/rst.js
delete mode 100644 public/js/lib/codemirror/mode/ruby/index.html
delete mode 100644 public/js/lib/codemirror/mode/ruby/ruby.js
delete mode 100644 public/js/lib/codemirror/mode/ruby/test.js
delete mode 100644 public/js/lib/codemirror/mode/rust/index.html
delete mode 100644 public/js/lib/codemirror/mode/rust/rust.js
delete mode 100644 public/js/lib/codemirror/mode/sass/index.html
delete mode 100644 public/js/lib/codemirror/mode/sass/sass.js
delete mode 100644 public/js/lib/codemirror/mode/scheme/index.html
delete mode 100644 public/js/lib/codemirror/mode/scheme/scheme.js
delete mode 100644 public/js/lib/codemirror/mode/shell/index.html
delete mode 100644 public/js/lib/codemirror/mode/shell/shell.js
delete mode 100644 public/js/lib/codemirror/mode/shell/test.js
delete mode 100644 public/js/lib/codemirror/mode/sieve/index.html
delete mode 100644 public/js/lib/codemirror/mode/sieve/sieve.js
delete mode 100644 public/js/lib/codemirror/mode/slim/index.html
delete mode 100644 public/js/lib/codemirror/mode/slim/slim.js
delete mode 100644 public/js/lib/codemirror/mode/slim/test.js
delete mode 100644 public/js/lib/codemirror/mode/smalltalk/index.html
delete mode 100644 public/js/lib/codemirror/mode/smalltalk/smalltalk.js
delete mode 100644 public/js/lib/codemirror/mode/smarty/index.html
delete mode 100644 public/js/lib/codemirror/mode/smarty/smarty.js
delete mode 100644 public/js/lib/codemirror/mode/smartymixed/index.html
delete mode 100644 public/js/lib/codemirror/mode/smartymixed/smartymixed.js
delete mode 100644 public/js/lib/codemirror/mode/solr/index.html
delete mode 100644 public/js/lib/codemirror/mode/solr/solr.js
delete mode 100644 public/js/lib/codemirror/mode/soy/index.html
delete mode 100644 public/js/lib/codemirror/mode/soy/soy.js
delete mode 100644 public/js/lib/codemirror/mode/sparql/index.html
delete mode 100644 public/js/lib/codemirror/mode/sparql/sparql.js
delete mode 100644 public/js/lib/codemirror/mode/spreadsheet/index.html
delete mode 100644 public/js/lib/codemirror/mode/spreadsheet/spreadsheet.js
delete mode 100644 public/js/lib/codemirror/mode/sql/index.html
delete mode 100644 public/js/lib/codemirror/mode/sql/sql.js
delete mode 100644 public/js/lib/codemirror/mode/stex/index.html
delete mode 100644 public/js/lib/codemirror/mode/stex/stex.js
delete mode 100644 public/js/lib/codemirror/mode/stex/test.js
delete mode 100644 public/js/lib/codemirror/mode/tcl/index.html
delete mode 100644 public/js/lib/codemirror/mode/tcl/tcl.js
delete mode 100644 public/js/lib/codemirror/mode/textile/index.html
delete mode 100644 public/js/lib/codemirror/mode/textile/test.js
delete mode 100644 public/js/lib/codemirror/mode/textile/textile.js
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/index.html
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/tiddlywiki.css
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/tiddlywiki.js
delete mode 100644 public/js/lib/codemirror/mode/tiki/index.html
delete mode 100644 public/js/lib/codemirror/mode/tiki/tiki.css
delete mode 100644 public/js/lib/codemirror/mode/tiki/tiki.js
delete mode 100644 public/js/lib/codemirror/mode/toml/index.html
delete mode 100644 public/js/lib/codemirror/mode/toml/toml.js
delete mode 100644 public/js/lib/codemirror/mode/tornado/index.html
delete mode 100644 public/js/lib/codemirror/mode/tornado/tornado.js
delete mode 100644 public/js/lib/codemirror/mode/turtle/index.html
delete mode 100644 public/js/lib/codemirror/mode/turtle/turtle.js
delete mode 100644 public/js/lib/codemirror/mode/vb/index.html
delete mode 100644 public/js/lib/codemirror/mode/vb/vb.js
delete mode 100644 public/js/lib/codemirror/mode/vbscript/index.html
delete mode 100644 public/js/lib/codemirror/mode/vbscript/vbscript.js
delete mode 100644 public/js/lib/codemirror/mode/velocity/index.html
delete mode 100644 public/js/lib/codemirror/mode/velocity/velocity.js
delete mode 100644 public/js/lib/codemirror/mode/verilog/index.html
delete mode 100644 public/js/lib/codemirror/mode/verilog/test.js
delete mode 100644 public/js/lib/codemirror/mode/verilog/verilog.js
delete mode 100644 public/js/lib/codemirror/mode/xquery/index.html
delete mode 100644 public/js/lib/codemirror/mode/xquery/test.js
delete mode 100644 public/js/lib/codemirror/mode/xquery/xquery.js
delete mode 100644 public/js/lib/codemirror/mode/z80/index.html
delete mode 100644 public/js/lib/codemirror/mode/z80/z80.js
diff --git a/public/js/lib/codemirror/mode/apl/apl.js b/public/js/lib/codemirror/mode/apl/apl.js
deleted file mode 100644
index 4357bed475..0000000000
--- a/public/js/lib/codemirror/mode/apl/apl.js
+++ /dev/null
@@ -1,175 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("apl", function() {
- var builtInOps = {
- ".": "innerProduct",
- "\\": "scan",
- "/": "reduce",
- "⌿": "reduce1Axis",
- "⍀": "scan1Axis",
- "¨": "each",
- "⍣": "power"
- };
- var builtInFuncs = {
- "+": ["conjugate", "add"],
- "−": ["negate", "subtract"],
- "×": ["signOf", "multiply"],
- "÷": ["reciprocal", "divide"],
- "⌈": ["ceiling", "greaterOf"],
- "⌊": ["floor", "lesserOf"],
- "∣": ["absolute", "residue"],
- "⍳": ["indexGenerate", "indexOf"],
- "?": ["roll", "deal"],
- "⋆": ["exponentiate", "toThePowerOf"],
- "⍟": ["naturalLog", "logToTheBase"],
- "○": ["piTimes", "circularFuncs"],
- "!": ["factorial", "binomial"],
- "⌹": ["matrixInverse", "matrixDivide"],
- "<": [null, "lessThan"],
- "≤": [null, "lessThanOrEqual"],
- "=": [null, "equals"],
- ">": [null, "greaterThan"],
- "≥": [null, "greaterThanOrEqual"],
- "≠": [null, "notEqual"],
- "≡": ["depth", "match"],
- "≢": [null, "notMatch"],
- "∈": ["enlist", "membership"],
- "⍷": [null, "find"],
- "∪": ["unique", "union"],
- "∩": [null, "intersection"],
- "∼": ["not", "without"],
- "∨": [null, "or"],
- "∧": [null, "and"],
- "⍱": [null, "nor"],
- "⍲": [null, "nand"],
- "⍴": ["shapeOf", "reshape"],
- ",": ["ravel", "catenate"],
- "⍪": [null, "firstAxisCatenate"],
- "⌽": ["reverse", "rotate"],
- "⊖": ["axis1Reverse", "axis1Rotate"],
- "⍉": ["transpose", null],
- "↑": ["first", "take"],
- "↓": [null, "drop"],
- "⊂": ["enclose", "partitionWithAxis"],
- "⊃": ["diclose", "pick"],
- "⌷": [null, "index"],
- "⍋": ["gradeUp", null],
- "⍒": ["gradeDown", null],
- "⊤": ["encode", null],
- "⊥": ["decode", null],
- "⍕": ["format", "formatByExample"],
- "⍎": ["execute", null],
- "⊣": ["stop", "left"],
- "⊢": ["pass", "right"]
- };
-
- var isOperator = /[\.\/⌿⍀¨⍣]/;
- var isNiladic = /⍬/;
- var isFunction = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/;
- var isArrow = /←/;
- var isComment = /[⍝#].*$/;
-
- var stringEater = function(type) {
- var prev;
- prev = false;
- return function(c) {
- prev = c;
- if (c === type) {
- return prev === "\\";
- }
- return true;
- };
- };
- return {
- startState: function() {
- return {
- prev: false,
- func: false,
- op: false,
- string: false,
- escape: false
- };
- },
- token: function(stream, state) {
- var ch, funcName, word;
- if (stream.eatSpace()) {
- return null;
- }
- ch = stream.next();
- if (ch === '"' || ch === "'") {
- stream.eatWhile(stringEater(ch));
- stream.next();
- state.prev = true;
- return "string";
- }
- if (/[\[{\(]/.test(ch)) {
- state.prev = false;
- return null;
- }
- if (/[\]}\)]/.test(ch)) {
- state.prev = true;
- return null;
- }
- if (isNiladic.test(ch)) {
- state.prev = false;
- return "niladic";
- }
- if (/[¯\d]/.test(ch)) {
- if (state.func) {
- state.func = false;
- state.prev = false;
- } else {
- state.prev = true;
- }
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (isOperator.test(ch)) {
- return "operator apl-" + builtInOps[ch];
- }
- if (isArrow.test(ch)) {
- return "apl-arrow";
- }
- if (isFunction.test(ch)) {
- funcName = "apl-";
- if (builtInFuncs[ch] != null) {
- if (state.prev) {
- funcName += builtInFuncs[ch][1];
- } else {
- funcName += builtInFuncs[ch][0];
- }
- }
- state.func = true;
- state.prev = false;
- return "function " + funcName;
- }
- if (isComment.test(ch)) {
- stream.skipToEnd();
- return "comment";
- }
- if (ch === "∘" && stream.peek() === ".") {
- stream.next();
- return "function jot-dot";
- }
- stream.eatWhile(/[\w\$_]/);
- word = stream.current();
- state.prev = true;
- return "keyword";
- }
- };
-});
-
-CodeMirror.defineMIME("text/apl", "apl");
-
-});
diff --git a/public/js/lib/codemirror/mode/apl/index.html b/public/js/lib/codemirror/mode/apl/index.html
deleted file mode 100644
index 53dda6b586..0000000000
--- a/public/js/lib/codemirror/mode/apl/index.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-CodeMirror: APL mode
-
-
-
-
-
-
-
-
-
-
-
-APL mode
-
-⍝ Conway's game of life
-
-⍝ This example was inspired by the impressive demo at
-⍝ http://www.youtube.com/watch?v=a9xAKttWgP4
-
-⍝ Create a matrix:
-⍝ 0 1 1
-⍝ 1 1 0
-⍝ 0 1 0
-creature ← (3 3 ⍴ ⍳ 9) ∈ 1 2 3 4 7 ⍝ Original creature from demo
-creature ← (3 3 ⍴ ⍳ 9) ∈ 1 3 6 7 8 ⍝ Glider
-
-⍝ Place the creature on a larger board, near the centre
-board ← ¯1 ⊖ ¯2 ⌽ 5 7 ↑ creature
-
-⍝ A function to move from one generation to the next
-life ← {∨/ 1 ⍵ ∧ 3 4 = ⊂+/ +⌿ 1 0 ¯1 ∘.⊖ 1 0 ¯1 ⌽¨ ⊂⍵}
-
-⍝ Compute n-th generation and format it as a
-⍝ character matrix
-gen ← {' #'[(life ⍣ ⍵) board]}
-
-⍝ Show first three generations
-(gen 1) (gen 2) (gen 3)
-
-
-
-
- Simple mode that tries to handle APL as well as it can.
- It attempts to label functions/operators based upon
- monadic/dyadic usage (but this is far from fully fleshed out).
- This means there are meaningful classnames so hover states can
- have popups etc.
-
- MIME types defined: text/apl
(APL code)
-
diff --git a/public/js/lib/codemirror/mode/asterisk/asterisk.js b/public/js/lib/codemirror/mode/asterisk/asterisk.js
deleted file mode 100644
index a1ead1157a..0000000000
--- a/public/js/lib/codemirror/mode/asterisk/asterisk.js
+++ /dev/null
@@ -1,198 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
- * =====================================================================================
- *
- * Filename: mode/asterisk/asterisk.js
- *
- * Description: CodeMirror mode for Asterisk dialplan
- *
- * Created: 05/17/2012 09:20:25 PM
- * Revision: none
- *
- * Author: Stas Kobzar (stas@modulis.ca),
- * Company: Modulis.ca Inc.
- *
- * =====================================================================================
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("asterisk", function() {
- var atoms = ["exten", "same", "include","ignorepat","switch"],
- dpcmd = ["#include","#exec"],
- apps = [
- "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi",
- "alarmreceiver","amd","answer","authenticate","background","backgrounddetect",
- "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent",
- "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge",
- "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge",
- "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility",
- "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa",
- "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy",
- "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif",
- "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete",
- "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus",
- "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme",
- "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete",
- "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode",
- "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish",
- "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce",
- "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones",
- "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten",
- "readfile","receivefax","receivefax","receivefax","record","removequeuemember",
- "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun",
- "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax",
- "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags",
- "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel",
- "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground",
- "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound",
- "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor",
- "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec",
- "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate",
- "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring",
- "waitforsilence","waitmusiconhold","waituntil","while","zapateller"
- ];
-
- function basicToken(stream,state){
- var cur = '';
- var ch = '';
- ch = stream.next();
- // comment
- if(ch == ";") {
- stream.skipToEnd();
- return "comment";
- }
- // context
- if(ch == '[') {
- stream.skipTo(']');
- stream.eat(']');
- return "header";
- }
- // string
- if(ch == '"') {
- stream.skipTo('"');
- return "string";
- }
- if(ch == "'") {
- stream.skipTo("'");
- return "string-2";
- }
- // dialplan commands
- if(ch == '#') {
- stream.eatWhile(/\w/);
- cur = stream.current();
- if(dpcmd.indexOf(cur) !== -1) {
- stream.skipToEnd();
- return "strong";
- }
- }
- // application args
- if(ch == '$'){
- var ch1 = stream.peek();
- if(ch1 == '{'){
- stream.skipTo('}');
- stream.eat('}');
- return "variable-3";
- }
- }
- // extension
- stream.eatWhile(/\w/);
- cur = stream.current();
- if(atoms.indexOf(cur) !== -1) {
- state.extenStart = true;
- switch(cur) {
- case 'same': state.extenSame = true; break;
- case 'include':
- case 'switch':
- case 'ignorepat':
- state.extenInclude = true;break;
- default:break;
- }
- return "atom";
- }
- }
-
- return {
- startState: function() {
- return {
- extenStart: false,
- extenSame: false,
- extenInclude: false,
- extenExten: false,
- extenPriority: false,
- extenApplication: false
- };
- },
- token: function(stream, state) {
-
- var cur = '';
- var ch = '';
- if(stream.eatSpace()) return null;
- // extension started
- if(state.extenStart){
- stream.eatWhile(/[^\s]/);
- cur = stream.current();
- if(/^=>?$/.test(cur)){
- state.extenExten = true;
- state.extenStart = false;
- return "strong";
- } else {
- state.extenStart = false;
- stream.skipToEnd();
- return "error";
- }
- } else if(state.extenExten) {
- // set exten and priority
- state.extenExten = false;
- state.extenPriority = true;
- stream.eatWhile(/[^,]/);
- if(state.extenInclude) {
- stream.skipToEnd();
- state.extenPriority = false;
- state.extenInclude = false;
- }
- if(state.extenSame) {
- state.extenPriority = false;
- state.extenSame = false;
- state.extenApplication = true;
- }
- return "tag";
- } else if(state.extenPriority) {
- state.extenPriority = false;
- state.extenApplication = true;
- ch = stream.next(); // get comma
- if(state.extenSame) return null;
- stream.eatWhile(/[^,]/);
- return "number";
- } else if(state.extenApplication) {
- stream.eatWhile(/,/);
- cur = stream.current();
- if(cur === ',') return null;
- stream.eatWhile(/\w/);
- cur = stream.current().toLowerCase();
- state.extenApplication = false;
- if(apps.indexOf(cur) !== -1){
- return "def strong";
- }
- } else{
- return basicToken(stream,state);
- }
-
- return null;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-asterisk", "asterisk");
-
-});
diff --git a/public/js/lib/codemirror/mode/asterisk/index.html b/public/js/lib/codemirror/mode/asterisk/index.html
deleted file mode 100644
index 257bd39875..0000000000
--- a/public/js/lib/codemirror/mode/asterisk/index.html
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-CodeMirror: Asterisk dialplan mode
-
-
-
-
-
-
-
-
-
-
-Asterisk dialplan mode
-
-; extensions.conf - the Asterisk dial plan
-;
-
-[general]
-;
-; If static is set to no, or omitted, then the pbx_config will rewrite
-; this file when extensions are modified. Remember that all comments
-; made in the file will be lost when that happens.
-static=yes
-
-#include "/etc/asterisk/additional_general.conf
-
-[iaxprovider]
-switch => IAX2/user:[key]@myserver/mycontext
-
-[dynamic]
-#exec /usr/bin/dynamic-peers.pl
-
-[trunkint]
-;
-; International long distance through trunk
-;
-exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
-exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})
-
-[local]
-;
-; Master context for local, toll-free, and iaxtel calls only
-;
-ignorepat => 9
-include => default
-
-[demo]
-include => stdexten
-;
-; We start with what to do when a call first comes in.
-;
-exten => s,1,Wait(1) ; Wait a second, just for fun
-same => n,Answer ; Answer the line
-same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
-same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
-same => n(restart),BackGround(demo-congrats) ; Play a congratulatory message
-same => n(instruct),BackGround(demo-instruct) ; Play some instructions
-same => n,WaitExten ; Wait for an extension to be dialed.
-
-exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
-exten => 2,n,Goto(s,instruct)
-
-exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
-exten => 3,n,Goto(s,restart) ; Start with the congratulations
-
-exten => 1000,1,Goto(default,s,1)
-;
-; We also create an example user, 1234, who is on the console and has
-; voicemail, etc.
-;
-exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
- ; (but skip if channel is not up)
-exten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))
-exten => 1234,n,Goto(default,s,1) ; exited Voicemail
-
-exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
-
-exten => 1236,1,Dial(Console/dsp) ; Ring forever
-exten => 1236,n,Voicemail(1234,b) ; Unless busy
-
-;
-; # for when they're done with the demo
-;
-exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
-exten => #,n,Hangup ; Hang them up.
-
-;
-; A timeout and "invalid extension rule"
-;
-exten => t,1,Goto(#,1) ; If they take too long, give up
-exten => i,1,Playback(invalid) ; "That's not valid, try again"
-
-;
-; Create an extension, 500, for dialing the
-; Asterisk demo.
-;
-exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
-exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo
-exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site
-exten => 500,n,Goto(s,6) ; Return to the start over message.
-
-;
-; Create an extension, 600, for evaluating echo latency.
-;
-exten => 600,1,Playback(demo-echotest) ; Let them know what's going on
-exten => 600,n,Echo ; Do the echo test
-exten => 600,n,Playback(demo-echodone) ; Let them know it's over
-exten => 600,n,Goto(s,6) ; Start over
-
-;
-; You can use the Macro Page to intercom a individual user
-exten => 76245,1,Macro(page,SIP/Grandstream1)
-; or if your peernames are the same as extensions
-exten => _7XXX,1,Macro(page,SIP/${EXTEN})
-;
-;
-; System Wide Page at extension 7999
-;
-exten => 7999,1,Set(TIMEOUT(absolute)=60)
-exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d)
-
-; Give voicemail at extension 8500
-;
-exten => 8500,1,VoicemailMain
-exten => 8500,n,Goto(s,6)
-
-
-
-
- MIME types defined: text/x-asterisk
.
-
-
diff --git a/public/js/lib/codemirror/mode/clike/clike.js b/public/js/lib/codemirror/mode/clike/clike.js
deleted file mode 100644
index 710953b229..0000000000
--- a/public/js/lib/codemirror/mode/clike/clike.js
+++ /dev/null
@@ -1,489 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("clike", function(config, parserConfig) {
- var indentUnit = config.indentUnit,
- statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
- dontAlignCalls = parserConfig.dontAlignCalls,
- keywords = parserConfig.keywords || {},
- builtin = parserConfig.builtin || {},
- blockKeywords = parserConfig.blockKeywords || {},
- atoms = parserConfig.atoms || {},
- hooks = parserConfig.hooks || {},
- multiLineStrings = parserConfig.multiLineStrings,
- indentStatements = parserConfig.indentStatements !== false;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- var indent = state.indented;
- if (state.context && state.context.type == "statement")
- indent = state.context.indented;
- return state.context = new Context(indent, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (indentStatements &&
- (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') ||
- (ctx.type == "statement" && curPunc == "newstatement")))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
- else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1);
- else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit;
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//",
- fold: "brace"
- };
-});
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
- "double static else struct entry switch extern typedef float union for unsigned " +
- "goto while enum void const signed volatile";
-
- function cppHook(stream, state) {
- if (!state.startOfLine) return false;
- for (;;) {
- if (stream.skipTo("\\")) {
- stream.next();
- if (stream.eol()) {
- state.tokenize = cppHook;
- break;
- }
- } else {
- stream.skipToEnd();
- state.tokenize = null;
- break;
- }
- }
- return "meta";
- }
-
- function cpp11StringHook(stream, state) {
- stream.backUp(1);
- // Raw strings.
- if (stream.match(/(R|u8R|uR|UR|LR)/)) {
- var match = stream.match(/"([^\s\\()]{0,16})\(/);
- if (!match) {
- return false;
- }
- state.cpp11RawStringDelim = match[1];
- state.tokenize = tokenRawString;
- return tokenRawString(stream, state);
- }
- // Unicode strings/chars.
- if (stream.match(/(u8|u|U|L)/)) {
- if (stream.match(/["']/, /* eat */ false)) {
- return "string";
- }
- return false;
- }
- // Ignore this hook.
- stream.next();
- return false;
- }
-
- // C#-style strings where "" escapes a quote.
- function tokenAtString(stream, state) {
- var next;
- while ((next = stream.next()) != null) {
- if (next == '"' && !stream.eat('"')) {
- state.tokenize = null;
- break;
- }
- }
- return "string";
- }
-
- // C++11 raw string literal is "( anything )", where
- // can be a string up to 16 characters long.
- function tokenRawString(stream, state) {
- // Escape characters that have special regex meanings.
- var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
- var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
- if (match)
- state.tokenize = null;
- else
- stream.skipToEnd();
- return "string";
- }
-
- function def(mimes, mode) {
- if (typeof mimes == "string") mimes = [mimes];
- var words = [];
- function add(obj) {
- if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
- words.push(prop);
- }
- add(mode.keywords);
- add(mode.builtin);
- add(mode.atoms);
- if (words.length) {
- mode.helperType = mimes[0];
- CodeMirror.registerHelper("hintWords", mimes[0], words);
- }
-
- for (var i = 0; i < mimes.length; ++i)
- CodeMirror.defineMIME(mimes[i], mode);
- }
-
- def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
- name: "clike",
- keywords: words(cKeywords),
- blockKeywords: words("case do else for if switch while struct"),
- atoms: words("null"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def(["text/x-c++src", "text/x-c++hdr"], {
- name: "clike",
- keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
- "static_cast typeid catch operator template typename class friend private " +
- "this using const_cast inline public throw virtual delete mutable protected " +
- "wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final " +
- "static_assert override"),
- blockKeywords: words("catch class do else finally for if struct switch try while"),
- atoms: words("true false null"),
- hooks: {
- "#": cppHook,
- "u": cpp11StringHook,
- "U": cpp11StringHook,
- "L": cpp11StringHook,
- "R": cpp11StringHook
- },
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-java", {
- name: "clike",
- keywords: words("abstract assert boolean break byte case catch char class const continue default " +
- "do double else enum extends final finally float for goto if implements import " +
- "instanceof int interface long native new package private protected public " +
- "return short static strictfp super switch synchronized this throw throws transient " +
- "try void volatile while"),
- blockKeywords: words("catch class do else finally for if switch try while"),
- atoms: words("true false null"),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- },
- modeProps: {fold: ["brace", "import"]}
- });
-
- def("text/x-csharp", {
- name: "clike",
- keywords: words("abstract as base break case catch checked class const continue" +
- " default delegate do else enum event explicit extern finally fixed for" +
- " foreach goto if implicit in interface internal is lock namespace new" +
- " operator out override params private protected public readonly ref return sealed" +
- " sizeof stackalloc static struct switch this throw try typeof unchecked" +
- " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
- " global group into join let orderby partial remove select set value var yield"),
- blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
- builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" +
- " Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" +
- " UInt64 bool byte char decimal double short int long object" +
- " sbyte float string ushort uint ulong"),
- atoms: words("true false null"),
- hooks: {
- "@": function(stream, state) {
- if (stream.eat('"')) {
- state.tokenize = tokenAtString;
- return tokenAtString(stream, state);
- }
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
- function tokenTripleString(stream, state) {
- var escaped = false;
- while (!stream.eol()) {
- if (!escaped && stream.match('"""')) {
- state.tokenize = null;
- break;
- }
- escaped = stream.next() != "\\" && !escaped;
- }
- return "string";
- }
-
- def("text/x-scala", {
- name: "clike",
- keywords: words(
-
- /* scala */
- "abstract case catch class def do else extends false final finally for forSome if " +
- "implicit import lazy match new null object override package private protected return " +
- "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
- "<% >: # @ " +
-
- /* package scala */
- "assert assume require print println printf readLine readBoolean readByte readShort " +
- "readChar readInt readLong readFloat readDouble " +
-
- "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
- "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
- "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
- "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
- "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
-
- /* package java.lang */
- "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
- "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
- "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
- "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
- ),
- multiLineStrings: true,
- blockKeywords: words("catch class do else finally for forSome if match switch try while"),
- atoms: words("true false null"),
- indentStatements: false,
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- },
- '"': function(stream, state) {
- if (!stream.match('""')) return false;
- state.tokenize = tokenTripleString;
- return state.tokenize(stream, state);
- }
- }
- });
-
- def(["x-shader/x-vertex", "x-shader/x-fragment"], {
- name: "clike",
- keywords: words("float int bool void " +
- "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
- "mat2 mat3 mat4 " +
- "sampler1D sampler2D sampler3D samplerCube " +
- "sampler1DShadow sampler2DShadow" +
- "const attribute uniform varying " +
- "break continue discard return " +
- "for while do if else struct " +
- "in out inout"),
- blockKeywords: words("for while do if else struct"),
- builtin: words("radians degrees sin cos tan asin acos atan " +
- "pow exp log exp2 sqrt inversesqrt " +
- "abs sign floor ceil fract mod min max clamp mix step smootstep " +
- "length distance dot cross normalize ftransform faceforward " +
- "reflect refract matrixCompMult " +
- "lessThan lessThanEqual greaterThan greaterThanEqual " +
- "equal notEqual any all not " +
- "texture1D texture1DProj texture1DLod texture1DProjLod " +
- "texture2D texture2DProj texture2DLod texture2DProjLod " +
- "texture3D texture3DProj texture3DLod texture3DProjLod " +
- "textureCube textureCubeLod " +
- "shadow1D shadow2D shadow1DProj shadow2DProj " +
- "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
- "dFdx dFdy fwidth " +
- "noise1 noise2 noise3 noise4"),
- atoms: words("true false " +
- "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
- "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
- "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
- "gl_FogCoord " +
- "gl_Position gl_PointSize gl_ClipVertex " +
- "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
- "gl_TexCoord gl_FogFragCoord " +
- "gl_FragCoord gl_FrontFacing " +
- "gl_FragColor gl_FragData gl_FragDepth " +
- "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
- "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
- "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
- "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
- "gl_ProjectionMatrixInverseTranspose " +
- "gl_ModelViewProjectionMatrixInverseTranspose " +
- "gl_TextureMatrixInverseTranspose " +
- "gl_NormalScale gl_DepthRange gl_ClipPlane " +
- "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
- "gl_FrontLightModelProduct gl_BackLightModelProduct " +
- "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
- "gl_FogParameters " +
- "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
- "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
- "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
- "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
- "gl_MaxDrawBuffers"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-nesc", {
- name: "clike",
- keywords: words(cKeywords + "as atomic async call command component components configuration event generic " +
- "implementation includes interface module new norace nx_struct nx_union post provides " +
- "signal task uses abstract extends"),
- blockKeywords: words("case do else for if switch while struct"),
- atoms: words("null"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-objectivec", {
- name: "clike",
- keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in " +
- "inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),
- atoms: words("YES NO NULL NILL ON OFF"),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$]/);
- return "keyword";
- },
- "#": cppHook
- },
- modeProps: {fold: "brace"}
- });
-
-});
diff --git a/public/js/lib/codemirror/mode/clike/index.html b/public/js/lib/codemirror/mode/clike/index.html
deleted file mode 100644
index 8b386d22e0..0000000000
--- a/public/js/lib/codemirror/mode/clike/index.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-CodeMirror: C-like mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-C-like mode
-
-
-/* C demo code */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-typedef struct {
- void* arg_socket;
- zmq_msg_t* arg_msg;
- char* arg_string;
- unsigned long arg_len;
- int arg_int, arg_command;
-
- int signal_fd;
- int pad;
- void* context;
- sem_t sem;
-} acl_zmq_context;
-
-#define p(X) (context->arg_##X)
-
-void* zmq_thread(void* context_pointer) {
- acl_zmq_context* context = (acl_zmq_context*)context_pointer;
- char ok = 'K', err = 'X';
- int res;
-
- while (1) {
- while ((res = sem_wait(&context->sem)) == EINTR);
- if (res) {write(context->signal_fd, &err, 1); goto cleanup;}
- switch(p(command)) {
- case 0: goto cleanup;
- case 1: p(socket) = zmq_socket(context->context, p(int)); break;
- case 2: p(int) = zmq_close(p(socket)); break;
- case 3: p(int) = zmq_bind(p(socket), p(string)); break;
- case 4: p(int) = zmq_connect(p(socket), p(string)); break;
- case 5: p(int) = zmq_getsockopt(p(socket), p(int), (void*)p(string), &p(len)); break;
- case 6: p(int) = zmq_setsockopt(p(socket), p(int), (void*)p(string), p(len)); break;
- case 7: p(int) = zmq_send(p(socket), p(msg), p(int)); break;
- case 8: p(int) = zmq_recv(p(socket), p(msg), p(int)); break;
- case 9: p(int) = zmq_poll(p(socket), p(int), p(len)); break;
- }
- p(command) = errno;
- write(context->signal_fd, &ok, 1);
- }
- cleanup:
- close(context->signal_fd);
- free(context_pointer);
- return 0;
-}
-
-void* zmq_thread_init(void* zmq_context, int signal_fd) {
- acl_zmq_context* context = malloc(sizeof(acl_zmq_context));
- pthread_t thread;
-
- context->context = zmq_context;
- context->signal_fd = signal_fd;
- sem_init(&context->sem, 1, 0);
- pthread_create(&thread, 0, &zmq_thread, context);
- pthread_detach(thread);
- return context;
-}
-
-
-C++ example
-
-
-#include
-#include "mystuff/util.h"
-
-namespace {
-enum Enum {
- VAL1, VAL2, VAL3
-};
-
-char32_t unicode_string = U"\U0010FFFF";
-string raw_string = R"delim(anything
-you
-want)delim";
-
-int Helper(const MyType& param) {
- return 0;
-}
-} // namespace
-
-class ForwardDec;
-
-template
-class Class : public BaseClass {
- const MyType member_;
-
- public:
- const MyType& Method() const {
- return member_;
- }
-
- void Method2(MyType* value);
-}
-
-template
-void Class::Method2(MyType* value) {
- std::out << 1 >> method();
- value->Method3(member_);
- member_ = value;
-}
-
-
-Objective-C example
-
-
-/*
-This is a longer comment
-That spans two lines
-*/
-
-#import
-@implementation YourAppDelegate
-
-// This is a one-line comment
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
- char myString[] = "This is a C character array";
- int test = 5;
- return YES;
-}
-
-
-Java example
-
-
-import com.demo.util.MyType;
-import com.demo.util.MyInterface;
-
-public enum Enum {
- VAL1, VAL2, VAL3
-}
-
-public class Class implements MyInterface {
- public static final MyType member;
-
- private class InnerClass {
- public int zero() {
- return 0;
- }
- }
-
- @Override
- public MyType method() {
- return member;
- }
-
- public void method2(MyType value) {
- method();
- value.method3();
- member = value;
- }
-}
-
-
-Scala example
-
-
-object FilterTest extends App {
- def filter(xs: List[Int], threshold: Int) = {
- def process(ys: List[Int]): List[Int] =
- if (ys.isEmpty) ys
- else if (ys.head < threshold) ys.head :: process(ys.tail)
- else process(ys.tail)
- process(xs)
- }
- println(filter(List(1, 9, 2, 8, 3, 7, 4), 5))
-}
-
-
-
-
- Simple mode that tries to handle C-like languages as well as it
- can. Takes two configuration parameters: keywords
, an
- object whose property names are the keywords in the language,
- and useCPP
, which determines whether C preprocessor
- directives are recognized.
-
- MIME types defined: text/x-csrc
- (C), text/x-c++src
(C++), text/x-java
- (Java), text/x-csharp
(C#),
- text/x-objectivec
(Objective-C),
- text/x-scala
(Scala), text/x-vertex
- and x-shader/x-fragment
(shader programs).
-
diff --git a/public/js/lib/codemirror/mode/clike/scala.html b/public/js/lib/codemirror/mode/clike/scala.html
deleted file mode 100644
index aa04cf0f04..0000000000
--- a/public/js/lib/codemirror/mode/clike/scala.html
+++ /dev/null
@@ -1,767 +0,0 @@
-
-
-CodeMirror: Scala mode
-
-
-
-
-
-
-
-
-
-
-
-Scala mode
-
-
-
- /* __ *\
- ** ________ ___ / / ___ Scala API **
- ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
- ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
- ** /____/\___/_/ |_/____/_/ | | **
- ** |/ **
- \* */
-
- package scala.collection
-
- import generic._
- import mutable.{ Builder, ListBuffer }
- import annotation.{tailrec, migration, bridge}
- import annotation.unchecked.{ uncheckedVariance => uV }
- import parallel.ParIterable
-
- /** A template trait for traversable collections of type `Traversable[A]`.
- *
- * $traversableInfo
- * @define mutability
- * @define traversableInfo
- * This is a base trait of all kinds of $mutability Scala collections. It
- * implements the behavior common to all collections, in terms of a method
- * `foreach` with signature:
- * {{{
- * def foreach[U](f: Elem => U): Unit
- * }}}
- * Collection classes mixing in this trait provide a concrete
- * `foreach` method which traverses all the
- * elements contained in the collection, applying a given function to each.
- * They also need to provide a method `newBuilder`
- * which creates a builder for collections of the same kind.
- *
- * A traversable class might or might not have two properties: strictness
- * and orderedness. Neither is represented as a type.
- *
- * The instances of a strict collection class have all their elements
- * computed before they can be used as values. By contrast, instances of
- * a non-strict collection class may defer computation of some of their
- * elements until after the instance is available as a value.
- * A typical example of a non-strict collection class is a
- *
- * `scala.collection.immutable.Stream` .
- * A more general class of examples are `TraversableViews`.
- *
- * If a collection is an instance of an ordered collection class, traversing
- * its elements with `foreach` will always visit elements in the
- * same order, even for different runs of the program. If the class is not
- * ordered, `foreach` can visit elements in different orders for
- * different runs (but it will keep the same order in the same run).'
- *
- * A typical example of a collection class which is not ordered is a
- * `HashMap` of objects. The traversal order for hash maps will
- * depend on the hash codes of its elements, and these hash codes might
- * differ from one run to the next. By contrast, a `LinkedHashMap`
- * is ordered because it's `foreach` method visits elements in the
- * order they were inserted into the `HashMap`.
- *
- * @author Martin Odersky
- * @version 2.8
- * @since 2.8
- * @tparam A the element type of the collection
- * @tparam Repr the type of the actual collection containing the elements.
- *
- * @define Coll Traversable
- * @define coll traversable collection
- */
- trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr]
- with FilterMonadic[A, Repr]
- with TraversableOnce[A]
- with GenTraversableLike[A, Repr]
- with Parallelizable[A, ParIterable[A]]
- {
- self =>
-
- import Traversable.breaks._
-
- /** The type implementing this traversable */
- protected type Self = Repr
-
- /** The collection of type $coll underlying this `TraversableLike` object.
- * By default this is implemented as the `TraversableLike` object itself,
- * but this can be overridden.
- */
- def repr: Repr = this.asInstanceOf[Repr]
-
- /** The underlying collection seen as an instance of `$Coll`.
- * By default this is implemented as the current collection object itself,
- * but this can be overridden.
- */
- protected[this] def thisCollection: Traversable[A] = this.asInstanceOf[Traversable[A]]
-
- /** A conversion from collections of type `Repr` to `$Coll` objects.
- * By default this is implemented as just a cast, but this can be overridden.
- */
- protected[this] def toCollection(repr: Repr): Traversable[A] = repr.asInstanceOf[Traversable[A]]
-
- /** Creates a new builder for this collection type.
- */
- protected[this] def newBuilder: Builder[A, Repr]
-
- protected[this] def parCombiner = ParIterable.newCombiner[A]
-
- /** Applies a function `f` to all elements of this $coll.
- *
- * Note: this method underlies the implementation of most other bulk operations.
- * It's important to implement this method in an efficient way.
- *
- *
- * @param f the function that is applied for its side-effect to every element.
- * The result of function `f` is discarded.
- *
- * @tparam U the type parameter describing the result of function `f`.
- * This result will always be ignored. Typically `U` is `Unit`,
- * but this is not necessary.
- *
- * @usecase def foreach(f: A => Unit): Unit
- */
- def foreach[U](f: A => U): Unit
-
- /** Tests whether this $coll is empty.
- *
- * @return `true` if the $coll contain no elements, `false` otherwise.
- */
- def isEmpty: Boolean = {
- var result = true
- breakable {
- for (x <- this) {
- result = false
- break
- }
- }
- result
- }
-
- /** Tests whether this $coll is known to have a finite size.
- * All strict collections are known to have finite size. For a non-strict collection
- * such as `Stream`, the predicate returns `true` if all elements have been computed.
- * It returns `false` if the stream is not yet evaluated to the end.
- *
- * Note: many collection methods will not work on collections of infinite sizes.
- *
- * @return `true` if this collection is known to have finite size, `false` otherwise.
- */
- def hasDefiniteSize = true
-
- def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.seq.size)
- b ++= thisCollection
- b ++= that.seq
- b.result
- }
-
- @bridge
- def ++[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
- ++(that: GenTraversableOnce[B])(bf)
-
- /** Concatenates this $coll with the elements of a traversable collection.
- * It differs from ++ in that the right operand determines the type of the
- * resulting collection rather than the left one.
- *
- * @param that the traversable to append.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` which contains all elements
- * of this $coll followed by all elements of `that`.
- *
- * @usecase def ++:[B](that: TraversableOnce[B]): $Coll[B]
- *
- * @return a new $coll which contains all elements of this $coll
- * followed by all elements of `that`.
- */
- def ++:[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.size)
- b ++= that
- b ++= thisCollection
- b.result
- }
-
- /** This overload exists because: for the implementation of ++: we should reuse
- * that of ++ because many collections override it with more efficient versions.
- * Since TraversableOnce has no '++' method, we have to implement that directly,
- * but Traversable and down can use the overload.
- */
- def ++:[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
- (that ++ seq)(breakOut)
-
- def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- b.sizeHint(this)
- for (x <- this) b += f(x)
- b.result
- }
-
- def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this) b ++= f(x).seq
- b.result
- }
-
- /** Selects all elements of this $coll which satisfy a predicate.
- *
- * @param p the predicate used to test elements.
- * @return a new $coll consisting of all elements of this $coll that satisfy the given
- * predicate `p`. The order of the elements is preserved.
- */
- def filter(p: A => Boolean): Repr = {
- val b = newBuilder
- for (x <- this)
- if (p(x)) b += x
- b.result
- }
-
- /** Selects all elements of this $coll which do not satisfy a predicate.
- *
- * @param p the predicate used to test elements.
- * @return a new $coll consisting of all elements of this $coll that do not satisfy the given
- * predicate `p`. The order of the elements is preserved.
- */
- def filterNot(p: A => Boolean): Repr = filter(!p(_))
-
- def collect[B, That](pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this) if (pf.isDefinedAt(x)) b += pf(x)
- b.result
- }
-
- /** Builds a new collection by applying an option-valued function to all
- * elements of this $coll on which the function is defined.
- *
- * @param f the option-valued function which filters and maps the $coll.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying the option-valued function
- * `f` to each element and collecting all defined results.
- * The order of the elements is preserved.
- *
- * @usecase def filterMap[B](f: A => Option[B]): $Coll[B]
- *
- * @param pf the partial function which filters and maps the $coll.
- * @return a new $coll resulting from applying the given option-valued function
- * `f` to each element and collecting all defined results.
- * The order of the elements is preserved.
- def filterMap[B, That](f: A => Option[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this)
- f(x) match {
- case Some(y) => b += y
- case _ =>
- }
- b.result
- }
- */
-
- /** Partitions this $coll in two ${coll}s according to a predicate.
- *
- * @param p the predicate on which to partition.
- * @return a pair of ${coll}s: the first $coll consists of all elements that
- * satisfy the predicate `p` and the second $coll consists of all elements
- * that don't. The relative order of the elements in the resulting ${coll}s
- * is the same as in the original $coll.
- */
- def partition(p: A => Boolean): (Repr, Repr) = {
- val l, r = newBuilder
- for (x <- this) (if (p(x)) l else r) += x
- (l.result, r.result)
- }
-
- def groupBy[K](f: A => K): immutable.Map[K, Repr] = {
- val m = mutable.Map.empty[K, Builder[A, Repr]]
- for (elem <- this) {
- val key = f(elem)
- val bldr = m.getOrElseUpdate(key, newBuilder)
- bldr += elem
- }
- val b = immutable.Map.newBuilder[K, Repr]
- for ((k, v) <- m)
- b += ((k, v.result))
-
- b.result
- }
-
- /** Tests whether a predicate holds for all elements of this $coll.
- *
- * $mayNotTerminateInf
- *
- * @param p the predicate used to test elements.
- * @return `true` if the given predicate `p` holds for all elements
- * of this $coll, otherwise `false`.
- */
- def forall(p: A => Boolean): Boolean = {
- var result = true
- breakable {
- for (x <- this)
- if (!p(x)) { result = false; break }
- }
- result
- }
-
- /** Tests whether a predicate holds for some of the elements of this $coll.
- *
- * $mayNotTerminateInf
- *
- * @param p the predicate used to test elements.
- * @return `true` if the given predicate `p` holds for some of the
- * elements of this $coll, otherwise `false`.
- */
- def exists(p: A => Boolean): Boolean = {
- var result = false
- breakable {
- for (x <- this)
- if (p(x)) { result = true; break }
- }
- result
- }
-
- /** Finds the first element of the $coll satisfying a predicate, if any.
- *
- * $mayNotTerminateInf
- * $orderDependent
- *
- * @param p the predicate used to test elements.
- * @return an option value containing the first element in the $coll
- * that satisfies `p`, or `None` if none exists.
- */
- def find(p: A => Boolean): Option[A] = {
- var result: Option[A] = None
- breakable {
- for (x <- this)
- if (p(x)) { result = Some(x); break }
- }
- result
- }
-
- def scan[B >: A, That](z: B)(op: (B, B) => B)(implicit cbf: CanBuildFrom[Repr, B, That]): That = scanLeft(z)(op)
-
- def scanLeft[B, That](z: B)(op: (B, A) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- b.sizeHint(this, 1)
- var acc = z
- b += acc
- for (x <- this) { acc = op(acc, x); b += acc }
- b.result
- }
-
- @migration(2, 9,
- "This scanRight definition has changed in 2.9.\n" +
- "The previous behavior can be reproduced with scanRight.reverse."
- )
- def scanRight[B, That](z: B)(op: (A, B) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- var scanned = List(z)
- var acc = z
- for (x <- reversed) {
- acc = op(x, acc)
- scanned ::= acc
- }
- val b = bf(repr)
- for (elem <- scanned) b += elem
- b.result
- }
-
- /** Selects the first element of this $coll.
- * $orderDependent
- * @return the first element of this $coll.
- * @throws `NoSuchElementException` if the $coll is empty.
- */
- def head: A = {
- var result: () => A = () => throw new NoSuchElementException
- breakable {
- for (x <- this) {
- result = () => x
- break
- }
- }
- result()
- }
-
- /** Optionally selects the first element.
- * $orderDependent
- * @return the first element of this $coll if it is nonempty, `None` if it is empty.
- */
- def headOption: Option[A] = if (isEmpty) None else Some(head)
-
- /** Selects all elements except the first.
- * $orderDependent
- * @return a $coll consisting of all elements of this $coll
- * except the first one.
- * @throws `UnsupportedOperationException` if the $coll is empty.
- */
- override def tail: Repr = {
- if (isEmpty) throw new UnsupportedOperationException("empty.tail")
- drop(1)
- }
-
- /** Selects the last element.
- * $orderDependent
- * @return The last element of this $coll.
- * @throws NoSuchElementException If the $coll is empty.
- */
- def last: A = {
- var lst = head
- for (x <- this)
- lst = x
- lst
- }
-
- /** Optionally selects the last element.
- * $orderDependent
- * @return the last element of this $coll$ if it is nonempty, `None` if it is empty.
- */
- def lastOption: Option[A] = if (isEmpty) None else Some(last)
-
- /** Selects all elements except the last.
- * $orderDependent
- * @return a $coll consisting of all elements of this $coll
- * except the last one.
- * @throws `UnsupportedOperationException` if the $coll is empty.
- */
- def init: Repr = {
- if (isEmpty) throw new UnsupportedOperationException("empty.init")
- var lst = head
- var follow = false
- val b = newBuilder
- b.sizeHint(this, -1)
- for (x <- this.seq) {
- if (follow) b += lst
- else follow = true
- lst = x
- }
- b.result
- }
-
- def take(n: Int): Repr = slice(0, n)
-
- def drop(n: Int): Repr =
- if (n <= 0) {
- val b = newBuilder
- b.sizeHint(this)
- b ++= thisCollection result
- }
- else sliceWithKnownDelta(n, Int.MaxValue, -n)
-
- def slice(from: Int, until: Int): Repr = sliceWithKnownBound(math.max(from, 0), until)
-
- // Precondition: from >= 0, until > 0, builder already configured for building.
- private[this] def sliceInternal(from: Int, until: Int, b: Builder[A, Repr]): Repr = {
- var i = 0
- breakable {
- for (x <- this.seq) {
- if (i >= from) b += x
- i += 1
- if (i >= until) break
- }
- }
- b.result
- }
- // Precondition: from >= 0
- private[scala] def sliceWithKnownDelta(from: Int, until: Int, delta: Int): Repr = {
- val b = newBuilder
- if (until <= from) b.result
- else {
- b.sizeHint(this, delta)
- sliceInternal(from, until, b)
- }
- }
- // Precondition: from >= 0
- private[scala] def sliceWithKnownBound(from: Int, until: Int): Repr = {
- val b = newBuilder
- if (until <= from) b.result
- else {
- b.sizeHintBounded(until - from, this)
- sliceInternal(from, until, b)
- }
- }
-
- def takeWhile(p: A => Boolean): Repr = {
- val b = newBuilder
- breakable {
- for (x <- this) {
- if (!p(x)) break
- b += x
- }
- }
- b.result
- }
-
- def dropWhile(p: A => Boolean): Repr = {
- val b = newBuilder
- var go = false
- for (x <- this) {
- if (!p(x)) go = true
- if (go) b += x
- }
- b.result
- }
-
- def span(p: A => Boolean): (Repr, Repr) = {
- val l, r = newBuilder
- var toLeft = true
- for (x <- this) {
- toLeft = toLeft && p(x)
- (if (toLeft) l else r) += x
- }
- (l.result, r.result)
- }
-
- def splitAt(n: Int): (Repr, Repr) = {
- val l, r = newBuilder
- l.sizeHintBounded(n, this)
- if (n >= 0) r.sizeHint(this, -n)
- var i = 0
- for (x <- this) {
- (if (i < n) l else r) += x
- i += 1
- }
- (l.result, r.result)
- }
-
- /** Iterates over the tails of this $coll. The first value will be this
- * $coll and the final one will be an empty $coll, with the intervening
- * values the results of successive applications of `tail`.
- *
- * @return an iterator over all the tails of this $coll
- * @example `List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)`
- */
- def tails: Iterator[Repr] = iterateUntilEmpty(_.tail)
-
- /** Iterates over the inits of this $coll. The first value will be this
- * $coll and the final one will be an empty $coll, with the intervening
- * values the results of successive applications of `init`.
- *
- * @return an iterator over all the inits of this $coll
- * @example `List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)`
- */
- def inits: Iterator[Repr] = iterateUntilEmpty(_.init)
-
- /** Copies elements of this $coll to an array.
- * Fills the given array `xs` with at most `len` elements of
- * this $coll, starting at position `start`.
- * Copying will stop once either the end of the current $coll is reached,
- * or the end of the array is reached, or `len` elements have been copied.
- *
- * $willNotTerminateInf
- *
- * @param xs the array to fill.
- * @param start the starting index.
- * @param len the maximal number of elements to copy.
- * @tparam B the type of the elements of the array.
- *
- *
- * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit
- */
- def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) {
- var i = start
- val end = (start + len) min xs.length
- breakable {
- for (x <- this) {
- if (i >= end) break
- xs(i) = x
- i += 1
- }
- }
- }
-
- def toTraversable: Traversable[A] = thisCollection
- def toIterator: Iterator[A] = toStream.iterator
- def toStream: Stream[A] = toBuffer.toStream
-
- /** Converts this $coll to a string.
- *
- * @return a string representation of this collection. By default this
- * string consists of the `stringPrefix` of this $coll,
- * followed by all elements separated by commas and enclosed in parentheses.
- */
- override def toString = mkString(stringPrefix + "(", ", ", ")")
-
- /** Defines the prefix of this object's `toString` representation.
- *
- * @return a string representation which starts the result of `toString`
- * applied to this $coll. By default the string prefix is the
- * simple name of the collection class $coll.
- */
- def stringPrefix : String = {
- var string = repr.asInstanceOf[AnyRef].getClass.getName
- val idx1 = string.lastIndexOf('.' : Int)
- if (idx1 != -1) string = string.substring(idx1 + 1)
- val idx2 = string.indexOf('$')
- if (idx2 != -1) string = string.substring(0, idx2)
- string
- }
-
- /** Creates a non-strict view of this $coll.
- *
- * @return a non-strict view of this $coll.
- */
- def view = new TraversableView[A, Repr] {
- protected lazy val underlying = self.repr
- override def foreach[U](f: A => U) = self foreach f
- }
-
- /** Creates a non-strict view of a slice of this $coll.
- *
- * Note: the difference between `view` and `slice` is that `view` produces
- * a view of the current $coll, whereas `slice` produces a new $coll.
- *
- * Note: `view(from, to)` is equivalent to `view.slice(from, to)`
- * $orderDependent
- *
- * @param from the index of the first element of the view
- * @param until the index of the element following the view
- * @return a non-strict view of a slice of this $coll, starting at index `from`
- * and extending up to (but not including) index `until`.
- */
- def view(from: Int, until: Int): TraversableView[A, Repr] = view.slice(from, until)
-
- /** Creates a non-strict filter of this $coll.
- *
- * Note: the difference between `c filter p` and `c withFilter p` is that
- * the former creates a new collection, whereas the latter only
- * restricts the domain of subsequent `map`, `flatMap`, `foreach`,
- * and `withFilter` operations.
- * $orderDependent
- *
- * @param p the predicate used to test elements.
- * @return an object of class `WithFilter`, which supports
- * `map`, `flatMap`, `foreach`, and `withFilter` operations.
- * All these operations apply to those elements of this $coll which
- * satisfy the predicate `p`.
- */
- def withFilter(p: A => Boolean): FilterMonadic[A, Repr] = new WithFilter(p)
-
- /** A class supporting filtered operations. Instances of this class are
- * returned by method `withFilter`.
- */
- class WithFilter(p: A => Boolean) extends FilterMonadic[A, Repr] {
-
- /** Builds a new collection by applying a function to all elements of the
- * outer $coll containing this `WithFilter` instance that satisfy predicate `p`.
- *
- * @param f the function to apply to each element.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying
- * the given function `f` to each element of the outer $coll
- * that satisfies predicate `p` and collecting the results.
- *
- * @usecase def map[B](f: A => B): $Coll[B]
- *
- * @return a new $coll resulting from applying the given function
- * `f` to each element of the outer $coll that satisfies
- * predicate `p` and collecting the results.
- */
- def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- self)
- if (p(x)) b += f(x)
- b.result
- }
-
- /** Builds a new collection by applying a function to all elements of the
- * outer $coll containing this `WithFilter` instance that satisfy
- * predicate `p` and concatenating the results.
- *
- * @param f the function to apply to each element.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying
- * the given collection-valued function `f` to each element
- * of the outer $coll that satisfies predicate `p` and
- * concatenating the results.
- *
- * @usecase def flatMap[B](f: A => TraversableOnce[B]): $Coll[B]
- *
- * @return a new $coll resulting from applying the given collection-valued function
- * `f` to each element of the outer $coll that satisfies predicate `p` and concatenating the results.
- */
- def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- self)
- if (p(x)) b ++= f(x).seq
- b.result
- }
-
- /** Applies a function `f` to all elements of the outer $coll containing
- * this `WithFilter` instance that satisfy predicate `p`.
- *
- * @param f the function that is applied for its side-effect to every element.
- * The result of function `f` is discarded.
- *
- * @tparam U the type parameter describing the result of function `f`.
- * This result will always be ignored. Typically `U` is `Unit`,
- * but this is not necessary.
- *
- * @usecase def foreach(f: A => Unit): Unit
- */
- def foreach[U](f: A => U): Unit =
- for (x <- self)
- if (p(x)) f(x)
-
- /** Further refines the filter for this $coll.
- *
- * @param q the predicate used to test elements.
- * @return an object of class `WithFilter`, which supports
- * `map`, `flatMap`, `foreach`, and `withFilter` operations.
- * All these operations apply to those elements of this $coll which
- * satisfy the predicate `q` in addition to the predicate `p`.
- */
- def withFilter(q: A => Boolean): WithFilter =
- new WithFilter(x => p(x) && q(x))
- }
-
- // A helper for tails and inits.
- private def iterateUntilEmpty(f: Traversable[A @uV] => Traversable[A @uV]): Iterator[Repr] = {
- val it = Iterator.iterate(thisCollection)(f) takeWhile (x => !x.isEmpty)
- it ++ Iterator(Nil) map (newBuilder ++= _ result)
- }
- }
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/clojure/clojure.js b/public/js/lib/codemirror/mode/clojure/clojure.js
deleted file mode 100644
index c334de7300..0000000000
--- a/public/js/lib/codemirror/mode/clojure/clojure.js
+++ /dev/null
@@ -1,243 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Author: Hans Engel
- * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("clojure", function (options) {
- var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2",
- ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword", VAR = "variable";
- var INDENT_WORD_SKIP = options.indentUnit || 2;
- var NORMAL_INDENT_UNIT = options.indentUnit || 2;
-
- function makeKeywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var atoms = makeKeywords("true false nil");
-
- var keywords = makeKeywords(
- "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle");
-
- var builtins = makeKeywords(
- "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>");
-
- var indentKeys = makeKeywords(
- // Built-ins
- "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " +
-
- // Binding forms
- "let letfn binding loop for doseq dotimes when-let if-let " +
-
- // Data structures
- "defstruct struct-map assoc " +
-
- // clojure.test
- "testing deftest " +
-
- // contrib
- "handler-case handle dotrace deftrace");
-
- var tests = {
- digit: /\d/,
- digit_or_colon: /[\d:]/,
- hex: /[0-9a-f]/i,
- sign: /[+-]/,
- exponent: /e/i,
- keyword_char: /[^\s\(\[\;\)\]]/,
- symbol: /[\w*+!\-\._?:<>\/\xa1-\uffff]/
- };
-
- function stateStack(indent, type, prev) { // represents a state stack object
- this.indent = indent;
- this.type = type;
- this.prev = prev;
- }
-
- function pushStack(state, indent, type) {
- state.indentStack = new stateStack(indent, type, state.indentStack);
- }
-
- function popStack(state) {
- state.indentStack = state.indentStack.prev;
- }
-
- function isNumber(ch, stream){
- // hex
- if ( ch === '0' && stream.eat(/x/i) ) {
- stream.eatWhile(tests.hex);
- return true;
- }
-
- // leading sign
- if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
- stream.eat(tests.sign);
- ch = stream.next();
- }
-
- if ( tests.digit.test(ch) ) {
- stream.eat(ch);
- stream.eatWhile(tests.digit);
-
- if ( '.' == stream.peek() ) {
- stream.eat('.');
- stream.eatWhile(tests.digit);
- }
-
- if ( stream.eat(tests.exponent) ) {
- stream.eat(tests.sign);
- stream.eatWhile(tests.digit);
- }
-
- return true;
- }
-
- return false;
- }
-
- // Eat character that starts after backslash \
- function eatCharacter(stream) {
- var first = stream.next();
- // Read special literals: backspace, newline, space, return.
- // Just read all lowercase letters.
- if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {
- return;
- }
- // Read unicode character: \u1000 \uA0a1
- if (first === "u") {
- stream.match(/[0-9a-z]{4}/i, true);
- }
- }
-
- return {
- startState: function () {
- return {
- indentStack: null,
- indentation: 0,
- mode: false
- };
- },
-
- token: function (stream, state) {
- if (state.indentStack == null && stream.sol()) {
- // update indentation, but only if indentStack is empty
- state.indentation = stream.indentation();
- }
-
- // skip spaces
- if (stream.eatSpace()) {
- return null;
- }
- var returnType = null;
-
- switch(state.mode){
- case "string": // multi-line string parsing mode
- var next, escaped = false;
- while ((next = stream.next()) != null) {
- if (next == "\"" && !escaped) {
-
- state.mode = false;
- break;
- }
- escaped = !escaped && next == "\\";
- }
- returnType = STRING; // continue on in string mode
- break;
- default: // default parsing mode
- var ch = stream.next();
-
- if (ch == "\"") {
- state.mode = "string";
- returnType = STRING;
- } else if (ch == "\\") {
- eatCharacter(stream);
- returnType = CHARACTER;
- } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
- returnType = ATOM;
- } else if (ch == ";") { // comment
- stream.skipToEnd(); // rest of the line is a comment
- returnType = COMMENT;
- } else if (isNumber(ch,stream)){
- returnType = NUMBER;
- } else if (ch == "(" || ch == "[" || ch == "{" ) {
- var keyWord = '', indentTemp = stream.column(), letter;
- /**
- Either
- (indent-word ..
- (non-indent-word ..
- (;something else, bracket, etc.
- */
-
- if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) {
- keyWord += letter;
- }
-
- if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||
- /^(?:def|with)/.test(keyWord))) { // indent-word
- pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
- } else { // non-indent word
- // we continue eating the spaces
- stream.eatSpace();
- if (stream.eol() || stream.peek() == ";") {
- // nothing significant after
- // we restart indentation the user defined spaces after
- pushStack(state, indentTemp + NORMAL_INDENT_UNIT, ch);
- } else {
- pushStack(state, indentTemp + stream.current().length, ch); // else we match
- }
- }
- stream.backUp(stream.current().length - 1); // undo all the eating
-
- returnType = BRACKET;
- } else if (ch == ")" || ch == "]" || ch == "}") {
- returnType = BRACKET;
- if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) {
- popStack(state);
- }
- } else if ( ch == ":" ) {
- stream.eatWhile(tests.symbol);
- return ATOM;
- } else {
- stream.eatWhile(tests.symbol);
-
- if (keywords && keywords.propertyIsEnumerable(stream.current())) {
- returnType = KEYWORD;
- } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {
- returnType = BUILTIN;
- } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {
- returnType = ATOM;
- } else {
- returnType = VAR;
- }
- }
- }
-
- return returnType;
- },
-
- indent: function (state) {
- if (state.indentStack == null) return state.indentation;
- return state.indentStack.indent;
- },
-
- lineComment: ";;"
- };
-});
-
-CodeMirror.defineMIME("text/x-clojure", "clojure");
-
-});
diff --git a/public/js/lib/codemirror/mode/clojure/index.html b/public/js/lib/codemirror/mode/clojure/index.html
deleted file mode 100644
index 3ecf4c4862..0000000000
--- a/public/js/lib/codemirror/mode/clojure/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-CodeMirror: Clojure mode
-
-
-
-
-
-
-
-
-
-
-Clojure mode
-
-; Conway's Game of Life, based on the work of:
-;; Laurent Petit https://gist.github.com/1200343
-;; Christophe Grand http://clj-me.cgrand.net/2011/08/19/conways-game-of-life
-
-(ns ^{:doc "Conway's Game of Life."}
- game-of-life)
-
-;; Core game of life's algorithm functions
-
-(defn neighbours
- "Given a cell's coordinates, returns the coordinates of its neighbours."
- [[x y]]
- (for [dx [-1 0 1] dy (if (zero? dx) [-1 1] [-1 0 1])]
- [(+ dx x) (+ dy y)]))
-
-(defn step
- "Given a set of living cells, computes the new set of living cells."
- [cells]
- (set (for [[cell n] (frequencies (mapcat neighbours cells))
- :when (or (= n 3) (and (= n 2) (cells cell)))]
- cell)))
-
-;; Utility methods for displaying game on a text terminal
-
-(defn print-board
- "Prints a board on *out*, representing a step in the game."
- [board w h]
- (doseq [x (range (inc w)) y (range (inc h))]
- (if (= y 0) (print "\n"))
- (print (if (board [x y]) "[X]" " . "))))
-
-(defn display-grids
- "Prints a squence of boards on *out*, representing several steps."
- [grids w h]
- (doseq [board grids]
- (print-board board w h)
- (print "\n")))
-
-;; Launches an example board
-
-(def
- ^{:doc "board represents the initial set of living cells"}
- board #{[2 1] [2 2] [2 3]})
-
-(display-grids (take 3 (iterate step board)) 5 5)
-
-;; Let's play with characters
-(println \1 \a \# \\
- \" \( \newline
- \} \" \space
- \tab \return \backspace
- \u1000 \uAaAa \u9F9F)
-
-
-
-
- MIME types defined: text/x-clojure
.
-
-
diff --git a/public/js/lib/codemirror/mode/cobol/cobol.js b/public/js/lib/codemirror/mode/cobol/cobol.js
deleted file mode 100644
index 897022b18c..0000000000
--- a/public/js/lib/codemirror/mode/cobol/cobol.js
+++ /dev/null
@@ -1,255 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Author: Gautam Mehta
- * Branched from CodeMirror's Scheme mode
- */
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("cobol", function () {
- var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
- ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header",
- COBOLLINENUM = "def", PERIOD = "link";
- function makeKeywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES ");
- var keywords = makeKeywords(
- "ACCEPT ACCESS ACQUIRE ADD ADDRESS " +
- "ADVANCING AFTER ALIAS ALL ALPHABET " +
- "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " +
- "ALSO ALTER ALTERNATE AND ANY " +
- "ARE AREA AREAS ARITHMETIC ASCENDING " +
- "ASSIGN AT ATTRIBUTE AUTHOR AUTO " +
- "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " +
- "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " +
- "BEFORE BELL BINARY BIT BITS " +
- "BLANK BLINK BLOCK BOOLEAN BOTTOM " +
- "BY CALL CANCEL CD CF " +
- "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " +
- "CLOSE COBOL CODE CODE-SET COL " +
- "COLLATING COLUMN COMMA COMMIT COMMITMENT " +
- "COMMON COMMUNICATION COMP COMP-0 COMP-1 " +
- "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " +
- "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " +
- "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " +
- "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " +
- "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " +
- "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " +
- "CONVERTING COPY CORR CORRESPONDING COUNT " +
- "CRT CRT-UNDER CURRENCY CURRENT CURSOR " +
- "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " +
- "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " +
- "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " +
- "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " +
- "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " +
- "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " +
- "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " +
- "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " +
- "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " +
- "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " +
- "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " +
- "EBCDIC EGI EJECT ELSE EMI " +
- "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " +
- "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " +
- "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " +
- "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " +
- "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " +
- "END-UNSTRING END-WRITE END-XML ENTER ENTRY " +
- "ENVIRONMENT EOP EQUAL EQUALS ERASE " +
- "ERROR ESI EVALUATE EVERY EXCEEDS " +
- "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " +
- "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " +
- "FILE-STREAM FILES FILLER FINAL FIND " +
- "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " +
- "FOREGROUND-COLOUR FORMAT FREE FROM FULL " +
- "FUNCTION GENERATE GET GIVING GLOBAL " +
- "GO GOBACK GREATER GROUP HEADING " +
- "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " +
- "ID IDENTIFICATION IF IN INDEX " +
- "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " +
- "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " +
- "INDIC INDICATE INDICATOR INDICATORS INITIAL " +
- "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " +
- "INSTALLATION INTO INVALID INVOKE IS " +
- "JUST JUSTIFIED KANJI KEEP KEY " +
- "LABEL LAST LD LEADING LEFT " +
- "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " +
- "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " +
- "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " +
- "LOCALE LOCALLY LOCK " +
- "MEMBER MEMORY MERGE MESSAGE METACLASS " +
- "MODE MODIFIED MODIFY MODULES MOVE " +
- "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " +
- "NEXT NO NO-ECHO NONE NOT " +
- "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " +
- "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " +
- "OF OFF OMITTED ON ONLY " +
- "OPEN OPTIONAL OR ORDER ORGANIZATION " +
- "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " +
- "PADDING PAGE PAGE-COUNTER PARSE PERFORM " +
- "PF PH PIC PICTURE PLUS " +
- "POINTER POSITION POSITIVE PREFIX PRESENT " +
- "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " +
- "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " +
- "PROMPT PROTECTED PURGE QUEUE QUOTE " +
- "QUOTES RANDOM RD READ READY " +
- "REALM RECEIVE RECONNECT RECORD RECORD-NAME " +
- "RECORDS RECURSIVE REDEFINES REEL REFERENCE " +
- "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " +
- "REMAINDER REMOVAL RENAMES REPEATED REPLACE " +
- "REPLACING REPORT REPORTING REPORTS REPOSITORY " +
- "REQUIRED RERUN RESERVE RESET RETAINING " +
- "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " +
- "REVERSED REWIND REWRITE RF RH " +
- "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " +
- "RUN SAME SCREEN SD SEARCH " +
- "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " +
- "SELECT SEND SENTENCE SEPARATE SEQUENCE " +
- "SEQUENTIAL SET SHARED SIGN SIZE " +
- "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " +
- "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " +
- "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " +
- "START STARTING STATUS STOP STORE " +
- "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " +
- "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " +
- "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " +
- "TABLE TALLYING TAPE TENANT TERMINAL " +
- "TERMINATE TEST TEXT THAN THEN " +
- "THROUGH THRU TIME TIMES TITLE " +
- "TO TOP TRAILING TRAILING-SIGN TRANSACTION " +
- "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " +
- "UNSTRING UNTIL UP UPDATE UPON " +
- "USAGE USAGE-MODE USE USING VALID " +
- "VALIDATE VALUE VALUES VARYING VLR " +
- "WAIT WHEN WHEN-COMPILED WITH WITHIN " +
- "WORDS WORKING-STORAGE WRITE XML XML-CODE " +
- "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " );
-
- var builtins = makeKeywords("- * ** / + < <= = > >= ");
- var tests = {
- digit: /\d/,
- digit_or_colon: /[\d:]/,
- hex: /[0-9a-f]/i,
- sign: /[+-]/,
- exponent: /e/i,
- keyword_char: /[^\s\(\[\;\)\]]/,
- symbol: /[\w*+\-]/
- };
- function isNumber(ch, stream){
- // hex
- if ( ch === '0' && stream.eat(/x/i) ) {
- stream.eatWhile(tests.hex);
- return true;
- }
- // leading sign
- if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
- stream.eat(tests.sign);
- ch = stream.next();
- }
- if ( tests.digit.test(ch) ) {
- stream.eat(ch);
- stream.eatWhile(tests.digit);
- if ( '.' == stream.peek()) {
- stream.eat('.');
- stream.eatWhile(tests.digit);
- }
- if ( stream.eat(tests.exponent) ) {
- stream.eat(tests.sign);
- stream.eatWhile(tests.digit);
- }
- return true;
- }
- return false;
- }
- return {
- startState: function () {
- return {
- indentStack: null,
- indentation: 0,
- mode: false
- };
- },
- token: function (stream, state) {
- if (state.indentStack == null && stream.sol()) {
- // update indentation, but only if indentStack is empty
- state.indentation = 6 ; //stream.indentation();
- }
- // skip spaces
- if (stream.eatSpace()) {
- return null;
- }
- var returnType = null;
- switch(state.mode){
- case "string": // multi-line string parsing mode
- var next = false;
- while ((next = stream.next()) != null) {
- if (next == "\"" || next == "\'") {
- state.mode = false;
- break;
- }
- }
- returnType = STRING; // continue on in string mode
- break;
- default: // default parsing mode
- var ch = stream.next();
- var col = stream.column();
- if (col >= 0 && col <= 5) {
- returnType = COBOLLINENUM;
- } else if (col >= 72 && col <= 79) {
- stream.skipToEnd();
- returnType = MODTAG;
- } else if (ch == "*" && col == 6) { // comment
- stream.skipToEnd(); // rest of the line is a comment
- returnType = COMMENT;
- } else if (ch == "\"" || ch == "\'") {
- state.mode = "string";
- returnType = STRING;
- } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
- returnType = ATOM;
- } else if (ch == ".") {
- returnType = PERIOD;
- } else if (isNumber(ch,stream)){
- returnType = NUMBER;
- } else {
- if (stream.current().match(tests.symbol)) {
- while (col < 71) {
- if (stream.eat(tests.symbol) === undefined) {
- break;
- } else {
- col++;
- }
- }
- }
- if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = KEYWORD;
- } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = BUILTIN;
- } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = ATOM;
- } else returnType = null;
- }
- }
- return returnType;
- },
- indent: function (state) {
- if (state.indentStack == null) return state.indentation;
- return state.indentStack.indent;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-cobol", "cobol");
-
-});
diff --git a/public/js/lib/codemirror/mode/cobol/index.html b/public/js/lib/codemirror/mode/cobol/index.html
deleted file mode 100644
index 4352419a0c..0000000000
--- a/public/js/lib/codemirror/mode/cobol/index.html
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-CodeMirror: COBOL mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-COBOL mode
-
- Select Theme
- default
- ambiance
- blackboard
- cobalt
- eclipse
- elegant
- erlang-dark
- lesser-dark
- midnight
- monokai
- neat
- night
- rubyblue
- solarized dark
- solarized light
- twilight
- vibrant-ink
- xq-dark
- xq-light
- Select Font Size
- 13px
- 14px
- 16px
- 18px
- 20px
- 24px
- 26px
- 28px
- 30px
- 32px
- 34px
- 36px
-
-Read-only
-
-Insert Spaces on Tab
-
-
-
----------1---------2---------3---------4---------5---------6---------7---------8
-12345678911234567892123456789312345678941234567895123456789612345678971234567898
-000010 IDENTIFICATION DIVISION. MODTGHERE
-000020 PROGRAM-ID. SAMPLE.
-000030 AUTHOR. TEST SAM.
-000040 DATE-WRITTEN. 5 February 2013
-000041
-000042* A sample program just to show the form.
-000043* The program copies its input to the output,
-000044* and counts the number of records.
-000045* At the end this number is printed.
-000046
-000050 ENVIRONMENT DIVISION.
-000060 INPUT-OUTPUT SECTION.
-000070 FILE-CONTROL.
-000080 SELECT STUDENT-FILE ASSIGN TO SYSIN
-000090 ORGANIZATION IS LINE SEQUENTIAL.
-000100 SELECT PRINT-FILE ASSIGN TO SYSOUT
-000110 ORGANIZATION IS LINE SEQUENTIAL.
-000120
-000130 DATA DIVISION.
-000140 FILE SECTION.
-000150 FD STUDENT-FILE
-000160 RECORD CONTAINS 43 CHARACTERS
-000170 DATA RECORD IS STUDENT-IN.
-000180 01 STUDENT-IN PIC X(43).
-000190
-000200 FD PRINT-FILE
-000210 RECORD CONTAINS 80 CHARACTERS
-000220 DATA RECORD IS PRINT-LINE.
-000230 01 PRINT-LINE PIC X(80).
-000240
-000250 WORKING-STORAGE SECTION.
-000260 01 DATA-REMAINS-SWITCH PIC X(2) VALUE SPACES.
-000261 01 RECORDS-WRITTEN PIC 99.
-000270
-000280 01 DETAIL-LINE.
-000290 05 FILLER PIC X(7) VALUE SPACES.
-000300 05 RECORD-IMAGE PIC X(43).
-000310 05 FILLER PIC X(30) VALUE SPACES.
-000311
-000312 01 SUMMARY-LINE.
-000313 05 FILLER PIC X(7) VALUE SPACES.
-000314 05 TOTAL-READ PIC 99.
-000315 05 FILLER PIC X VALUE SPACE.
-000316 05 FILLER PIC X(17)
-000317 VALUE 'Records were read'.
-000318 05 FILLER PIC X(53) VALUE SPACES.
-000319
-000320 PROCEDURE DIVISION.
-000321
-000330 PREPARE-SENIOR-REPORT.
-000340 OPEN INPUT STUDENT-FILE
-000350 OUTPUT PRINT-FILE.
-000351 MOVE ZERO TO RECORDS-WRITTEN.
-000360 READ STUDENT-FILE
-000370 AT END MOVE 'NO' TO DATA-REMAINS-SWITCH
-000380 END-READ.
-000390 PERFORM PROCESS-RECORDS
-000410 UNTIL DATA-REMAINS-SWITCH = 'NO'.
-000411 PERFORM PRINT-SUMMARY.
-000420 CLOSE STUDENT-FILE
-000430 PRINT-FILE.
-000440 STOP RUN.
-000450
-000460 PROCESS-RECORDS.
-000470 MOVE STUDENT-IN TO RECORD-IMAGE.
-000480 MOVE DETAIL-LINE TO PRINT-LINE.
-000490 WRITE PRINT-LINE.
-000500 ADD 1 TO RECORDS-WRITTEN.
-000510 READ STUDENT-FILE
-000520 AT END MOVE 'NO' TO DATA-REMAINS-SWITCH
-000530 END-READ.
-000540
-000550 PRINT-SUMMARY.
-000560 MOVE RECORDS-WRITTEN TO TOTAL-READ.
-000570 MOVE SUMMARY-LINE TO PRINT-LINE.
-000571 WRITE PRINT-LINE.
-000572
-000580
-
-
-
diff --git a/public/js/lib/codemirror/mode/coffeescript/coffeescript.js b/public/js/lib/codemirror/mode/coffeescript/coffeescript.js
deleted file mode 100644
index da0eb2d518..0000000000
--- a/public/js/lib/codemirror/mode/coffeescript/coffeescript.js
+++ /dev/null
@@ -1,369 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Link to the project's GitHub page:
- * https://github.com/pickhardt/coffeescript-codemirror-mode
- */
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("coffeescript", function(conf, parserConf) {
- var ERRORCLASS = "error";
-
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/;
- var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/;
- var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;
- var properties = /^(@|this\.)[_A-Za-z$][_A-Za-z$0-9]*/;
-
- var wordOperators = wordRegexp(["and", "or", "not",
- "is", "isnt", "in",
- "instanceof", "typeof"]);
- var indentKeywords = ["for", "while", "loop", "if", "unless", "else",
- "switch", "try", "catch", "finally", "class"];
- var commonKeywords = ["break", "by", "continue", "debugger", "delete",
- "do", "in", "of", "new", "return", "then",
- "this", "@", "throw", "when", "until", "extends"];
-
- var keywords = wordRegexp(indentKeywords.concat(commonKeywords));
-
- indentKeywords = wordRegexp(indentKeywords);
-
-
- var stringPrefixes = /^('{3}|\"{3}|['\"])/;
- var regexPrefixes = /^(\/{3}|\/)/;
- var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];
- var constants = wordRegexp(commonConstants);
-
- // Tokenizers
- function tokenBase(stream, state) {
- // Handle scope changes
- if (stream.sol()) {
- if (state.scope.align === null) state.scope.align = false;
- var scopeOffset = state.scope.offset;
- if (stream.eatSpace()) {
- var lineOffset = stream.indentation();
- if (lineOffset > scopeOffset && state.scope.type == "coffee") {
- return "indent";
- } else if (lineOffset < scopeOffset) {
- return "dedent";
- }
- return null;
- } else {
- if (scopeOffset > 0) {
- dedent(stream, state);
- }
- }
- }
- if (stream.eatSpace()) {
- return null;
- }
-
- var ch = stream.peek();
-
- // Handle docco title comment (single line)
- if (stream.match("####")) {
- stream.skipToEnd();
- return "comment";
- }
-
- // Handle multi line comments
- if (stream.match("###")) {
- state.tokenize = longComment;
- return state.tokenize(stream, state);
- }
-
- // Single line comment
- if (ch === "#") {
- stream.skipToEnd();
- return "comment";
- }
-
- // Handle number literals
- if (stream.match(/^-?[0-9\.]/, false)) {
- var floatLiteral = false;
- // Floats
- if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) {
- floatLiteral = true;
- }
- if (stream.match(/^-?\d+\.\d*/)) {
- floatLiteral = true;
- }
- if (stream.match(/^-?\.\d+/)) {
- floatLiteral = true;
- }
-
- if (floatLiteral) {
- // prevent from getting extra . on 1..
- if (stream.peek() == "."){
- stream.backUp(1);
- }
- return "number";
- }
- // Integers
- var intLiteral = false;
- // Hex
- if (stream.match(/^-?0x[0-9a-f]+/i)) {
- intLiteral = true;
- }
- // Decimal
- if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) {
- intLiteral = true;
- }
- // Zero by itself with no other piece of number.
- if (stream.match(/^-?0(?![\dx])/i)) {
- intLiteral = true;
- }
- if (intLiteral) {
- return "number";
- }
- }
-
- // Handle strings
- if (stream.match(stringPrefixes)) {
- state.tokenize = tokenFactory(stream.current(), false, "string");
- return state.tokenize(stream, state);
- }
- // Handle regex literals
- if (stream.match(regexPrefixes)) {
- if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division
- state.tokenize = tokenFactory(stream.current(), true, "string-2");
- return state.tokenize(stream, state);
- } else {
- stream.backUp(1);
- }
- }
-
- // Handle operators and delimiters
- if (stream.match(operators) || stream.match(wordOperators)) {
- return "operator";
- }
- if (stream.match(delimiters)) {
- return "punctuation";
- }
-
- if (stream.match(constants)) {
- return "atom";
- }
-
- if (stream.match(keywords)) {
- return "keyword";
- }
-
- if (stream.match(identifiers)) {
- return "variable";
- }
-
- if (stream.match(properties)) {
- return "property";
- }
-
- // Handle non-detected items
- stream.next();
- return ERRORCLASS;
- }
-
- function tokenFactory(delimiter, singleline, outclass) {
- return function(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^'"\/\\]/);
- if (stream.eat("\\")) {
- stream.next();
- if (singleline && stream.eol()) {
- return outclass;
- }
- } else if (stream.match(delimiter)) {
- state.tokenize = tokenBase;
- return outclass;
- } else {
- stream.eat(/['"\/]/);
- }
- }
- if (singleline) {
- if (parserConf.singleLineStringErrors) {
- outclass = ERRORCLASS;
- } else {
- state.tokenize = tokenBase;
- }
- }
- return outclass;
- };
- }
-
- function longComment(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^#]/);
- if (stream.match("###")) {
- state.tokenize = tokenBase;
- break;
- }
- stream.eatWhile("#");
- }
- return "comment";
- }
-
- function indent(stream, state, type) {
- type = type || "coffee";
- var offset = 0, align = false, alignOffset = null;
- for (var scope = state.scope; scope; scope = scope.prev) {
- if (scope.type === "coffee" || scope.type == "}") {
- offset = scope.offset + conf.indentUnit;
- break;
- }
- }
- if (type !== "coffee") {
- align = null;
- alignOffset = stream.column() + stream.current().length;
- } else if (state.scope.align) {
- state.scope.align = false;
- }
- state.scope = {
- offset: offset,
- type: type,
- prev: state.scope,
- align: align,
- alignOffset: alignOffset
- };
- }
-
- function dedent(stream, state) {
- if (!state.scope.prev) return;
- if (state.scope.type === "coffee") {
- var _indent = stream.indentation();
- var matched = false;
- for (var scope = state.scope; scope; scope = scope.prev) {
- if (_indent === scope.offset) {
- matched = true;
- break;
- }
- }
- if (!matched) {
- return true;
- }
- while (state.scope.prev && state.scope.offset !== _indent) {
- state.scope = state.scope.prev;
- }
- return false;
- } else {
- state.scope = state.scope.prev;
- return false;
- }
- }
-
- function tokenLexer(stream, state) {
- var style = state.tokenize(stream, state);
- var current = stream.current();
-
- // Handle "." connected identifiers
- if (current === ".") {
- style = state.tokenize(stream, state);
- current = stream.current();
- if (/^\.[\w$]+$/.test(current)) {
- return "variable";
- } else {
- return ERRORCLASS;
- }
- }
-
- // Handle scope changes.
- if (current === "return") {
- state.dedent = true;
- }
- if (((current === "->" || current === "=>") &&
- !state.lambda &&
- !stream.peek())
- || style === "indent") {
- indent(stream, state);
- }
- var delimiter_index = "[({".indexOf(current);
- if (delimiter_index !== -1) {
- indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
- }
- if (indentKeywords.exec(current)){
- indent(stream, state);
- }
- if (current == "then"){
- dedent(stream, state);
- }
-
-
- if (style === "dedent") {
- if (dedent(stream, state)) {
- return ERRORCLASS;
- }
- }
- delimiter_index = "])}".indexOf(current);
- if (delimiter_index !== -1) {
- while (state.scope.type == "coffee" && state.scope.prev)
- state.scope = state.scope.prev;
- if (state.scope.type == current)
- state.scope = state.scope.prev;
- }
- if (state.dedent && stream.eol()) {
- if (state.scope.type == "coffee" && state.scope.prev)
- state.scope = state.scope.prev;
- state.dedent = false;
- }
-
- return style;
- }
-
- var external = {
- startState: function(basecolumn) {
- return {
- tokenize: tokenBase,
- scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},
- lastToken: null,
- lambda: false,
- dedent: 0
- };
- },
-
- token: function(stream, state) {
- var fillAlign = state.scope.align === null && state.scope;
- if (fillAlign && stream.sol()) fillAlign.align = false;
-
- var style = tokenLexer(stream, state);
- if (fillAlign && style && style != "comment") fillAlign.align = true;
-
- state.lastToken = {style:style, content: stream.current()};
-
- if (stream.eol() && stream.lambda) {
- state.lambda = false;
- }
-
- return style;
- },
-
- indent: function(state, text) {
- if (state.tokenize != tokenBase) return 0;
- var scope = state.scope;
- var closer = text && "])}".indexOf(text.charAt(0)) > -1;
- if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;
- var closes = closer && scope.type === text.charAt(0);
- if (scope.align)
- return scope.alignOffset - (closes ? 1 : 0);
- else
- return (closes ? scope.prev : scope).offset;
- },
-
- lineComment: "#",
- fold: "indent"
- };
- return external;
-});
-
-CodeMirror.defineMIME("text/x-coffeescript", "coffeescript");
-
-});
diff --git a/public/js/lib/codemirror/mode/coffeescript/index.html b/public/js/lib/codemirror/mode/coffeescript/index.html
deleted file mode 100644
index 93a5f4f309..0000000000
--- a/public/js/lib/codemirror/mode/coffeescript/index.html
+++ /dev/null
@@ -1,740 +0,0 @@
-
-
-CodeMirror: CoffeeScript mode
-
-
-
-
-
-
-
-
-
-
-CoffeeScript mode
-
-# CoffeeScript mode for CodeMirror
-# Copyright (c) 2011 Jeff Pickhardt, released under
-# the MIT License.
-#
-# Modified from the Python CodeMirror mode, which also is
-# under the MIT License Copyright (c) 2010 Timothy Farrell.
-#
-# The following script, Underscore.coffee, is used to
-# demonstrate CoffeeScript mode for CodeMirror.
-#
-# To download CoffeeScript mode for CodeMirror, go to:
-# https://github.com/pickhardt/coffeescript-codemirror-mode
-
-# **Underscore.coffee
-# (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.**
-# Underscore is freely distributable under the terms of the
-# [MIT license](http://en.wikipedia.org/wiki/MIT_License).
-# Portions of Underscore are inspired by or borrowed from
-# [Prototype.js](http://prototypejs.org/api), Oliver Steele's
-# [Functional](http://osteele.com), and John Resig's
-# [Micro-Templating](http://ejohn.org).
-# For all details and documentation:
-# http://documentcloud.github.com/underscore/
-
-
-# Baseline setup
-# --------------
-
-# Establish the root object, `window` in the browser, or `global` on the server.
-root = this
-
-
-# Save the previous value of the `_` variable.
-previousUnderscore = root._
-
-### Multiline
- comment
-###
-
-# Establish the object that gets thrown to break out of a loop iteration.
-# `StopIteration` is SOP on Mozilla.
-breaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration
-
-
-#### Docco style single line comment (title)
-
-
-# Helper function to escape **RegExp** contents, because JS doesn't have one.
-escapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1')
-
-
-# Save bytes in the minified (but not gzipped) version:
-ArrayProto = Array.prototype
-ObjProto = Object.prototype
-
-
-# Create quick reference variables for speed access to core prototypes.
-slice = ArrayProto.slice
-unshift = ArrayProto.unshift
-toString = ObjProto.toString
-hasOwnProperty = ObjProto.hasOwnProperty
-propertyIsEnumerable = ObjProto.propertyIsEnumerable
-
-
-# All **ECMA5** native implementations we hope to use are declared here.
-nativeForEach = ArrayProto.forEach
-nativeMap = ArrayProto.map
-nativeReduce = ArrayProto.reduce
-nativeReduceRight = ArrayProto.reduceRight
-nativeFilter = ArrayProto.filter
-nativeEvery = ArrayProto.every
-nativeSome = ArrayProto.some
-nativeIndexOf = ArrayProto.indexOf
-nativeLastIndexOf = ArrayProto.lastIndexOf
-nativeIsArray = Array.isArray
-nativeKeys = Object.keys
-
-
-# Create a safe reference to the Underscore object for use below.
-_ = (obj) -> new wrapper(obj)
-
-
-# Export the Underscore object for **CommonJS**.
-if typeof(exports) != 'undefined' then exports._ = _
-
-
-# Export Underscore to global scope.
-root._ = _
-
-
-# Current version.
-_.VERSION = '1.1.0'
-
-
-# Collection Functions
-# --------------------
-
-# The cornerstone, an **each** implementation.
-# Handles objects implementing **forEach**, arrays, and raw objects.
-_.each = (obj, iterator, context) ->
- try
- if nativeForEach and obj.forEach is nativeForEach
- obj.forEach iterator, context
- else if _.isNumber obj.length
- iterator.call context, obj[i], i, obj for i in [0...obj.length]
- else
- iterator.call context, val, key, obj for own key, val of obj
- catch e
- throw e if e isnt breaker
- obj
-
-
-# Return the results of applying the iterator to each element. Use JavaScript
-# 1.6's version of **map**, if possible.
-_.map = (obj, iterator, context) ->
- return obj.map(iterator, context) if nativeMap and obj.map is nativeMap
- results = []
- _.each obj, (value, index, list) ->
- results.push iterator.call context, value, index, list
- results
-
-
-# **Reduce** builds up a single result from a list of values. Also known as
-# **inject**, or **foldl**. Uses JavaScript 1.8's version of **reduce**, if possible.
-_.reduce = (obj, iterator, memo, context) ->
- if nativeReduce and obj.reduce is nativeReduce
- iterator = _.bind iterator, context if context
- return obj.reduce iterator, memo
- _.each obj, (value, index, list) ->
- memo = iterator.call context, memo, value, index, list
- memo
-
-
-# The right-associative version of **reduce**, also known as **foldr**. Uses
-# JavaScript 1.8's version of **reduceRight**, if available.
-_.reduceRight = (obj, iterator, memo, context) ->
- if nativeReduceRight and obj.reduceRight is nativeReduceRight
- iterator = _.bind iterator, context if context
- return obj.reduceRight iterator, memo
- reversed = _.clone(_.toArray(obj)).reverse()
- _.reduce reversed, iterator, memo, context
-
-
-# Return the first value which passes a truth test.
-_.detect = (obj, iterator, context) ->
- result = null
- _.each obj, (value, index, list) ->
- if iterator.call context, value, index, list
- result = value
- _.breakLoop()
- result
-
-
-# Return all the elements that pass a truth test. Use JavaScript 1.6's
-# **filter**, if it exists.
-_.filter = (obj, iterator, context) ->
- return obj.filter iterator, context if nativeFilter and obj.filter is nativeFilter
- results = []
- _.each obj, (value, index, list) ->
- results.push value if iterator.call context, value, index, list
- results
-
-
-# Return all the elements for which a truth test fails.
-_.reject = (obj, iterator, context) ->
- results = []
- _.each obj, (value, index, list) ->
- results.push value if not iterator.call context, value, index, list
- results
-
-
-# Determine whether all of the elements match a truth test. Delegate to
-# JavaScript 1.6's **every**, if it is present.
-_.every = (obj, iterator, context) ->
- iterator ||= _.identity
- return obj.every iterator, context if nativeEvery and obj.every is nativeEvery
- result = true
- _.each obj, (value, index, list) ->
- _.breakLoop() unless (result = result and iterator.call(context, value, index, list))
- result
-
-
-# Determine if at least one element in the object matches a truth test. Use
-# JavaScript 1.6's **some**, if it exists.
-_.some = (obj, iterator, context) ->
- iterator ||= _.identity
- return obj.some iterator, context if nativeSome and obj.some is nativeSome
- result = false
- _.each obj, (value, index, list) ->
- _.breakLoop() if (result = iterator.call(context, value, index, list))
- result
-
-
-# Determine if a given value is included in the array or object,
-# based on `===`.
-_.include = (obj, target) ->
- return _.indexOf(obj, target) isnt -1 if nativeIndexOf and obj.indexOf is nativeIndexOf
- return true for own key, val of obj when val is target
- false
-
-
-# Invoke a method with arguments on every item in a collection.
-_.invoke = (obj, method) ->
- args = _.rest arguments, 2
- (if method then val[method] else val).apply(val, args) for val in obj
-
-
-# Convenience version of a common use case of **map**: fetching a property.
-_.pluck = (obj, key) ->
- _.map(obj, (val) -> val[key])
-
-
-# Return the maximum item or (item-based computation).
-_.max = (obj, iterator, context) ->
- return Math.max.apply(Math, obj) if not iterator and _.isArray(obj)
- result = computed: -Infinity
- _.each obj, (value, index, list) ->
- computed = if iterator then iterator.call(context, value, index, list) else value
- computed >= result.computed and (result = {value: value, computed: computed})
- result.value
-
-
-# Return the minimum element (or element-based computation).
-_.min = (obj, iterator, context) ->
- return Math.min.apply(Math, obj) if not iterator and _.isArray(obj)
- result = computed: Infinity
- _.each obj, (value, index, list) ->
- computed = if iterator then iterator.call(context, value, index, list) else value
- computed < result.computed and (result = {value: value, computed: computed})
- result.value
-
-
-# Sort the object's values by a criterion produced by an iterator.
-_.sortBy = (obj, iterator, context) ->
- _.pluck(((_.map obj, (value, index, list) ->
- {value: value, criteria: iterator.call(context, value, index, list)}
- ).sort((left, right) ->
- a = left.criteria; b = right.criteria
- if a < b then -1 else if a > b then 1 else 0
- )), 'value')
-
-
-# Use a comparator function to figure out at what index an object should
-# be inserted so as to maintain order. Uses binary search.
-_.sortedIndex = (array, obj, iterator) ->
- iterator ||= _.identity
- low = 0
- high = array.length
- while low < high
- mid = (low + high) >> 1
- if iterator(array[mid]) < iterator(obj) then low = mid + 1 else high = mid
- low
-
-
-# Convert anything iterable into a real, live array.
-_.toArray = (iterable) ->
- return [] if (!iterable)
- return iterable.toArray() if (iterable.toArray)
- return iterable if (_.isArray(iterable))
- return slice.call(iterable) if (_.isArguments(iterable))
- _.values(iterable)
-
-
-# Return the number of elements in an object.
-_.size = (obj) -> _.toArray(obj).length
-
-
-# Array Functions
-# ---------------
-
-# Get the first element of an array. Passing `n` will return the first N
-# values in the array. Aliased as **head**. The `guard` check allows it to work
-# with **map**.
-_.first = (array, n, guard) ->
- if n and not guard then slice.call(array, 0, n) else array[0]
-
-
-# Returns everything but the first entry of the array. Aliased as **tail**.
-# Especially useful on the arguments object. Passing an `index` will return
-# the rest of the values in the array from that index onward. The `guard`
-# check allows it to work with **map**.
-_.rest = (array, index, guard) ->
- slice.call(array, if _.isUndefined(index) or guard then 1 else index)
-
-
-# Get the last element of an array.
-_.last = (array) -> array[array.length - 1]
-
-
-# Trim out all falsy values from an array.
-_.compact = (array) -> item for item in array when item
-
-
-# Return a completely flattened version of an array.
-_.flatten = (array) ->
- _.reduce array, (memo, value) ->
- return memo.concat(_.flatten(value)) if _.isArray value
- memo.push value
- memo
- , []
-
-
-# Return a version of the array that does not contain the specified value(s).
-_.without = (array) ->
- values = _.rest arguments
- val for val in _.toArray(array) when not _.include values, val
-
-
-# Produce a duplicate-free version of the array. If the array has already
-# been sorted, you have the option of using a faster algorithm.
-_.uniq = (array, isSorted) ->
- memo = []
- for el, i in _.toArray array
- memo.push el if i is 0 || (if isSorted is true then _.last(memo) isnt el else not _.include(memo, el))
- memo
-
-
-# Produce an array that contains every item shared between all the
-# passed-in arrays.
-_.intersect = (array) ->
- rest = _.rest arguments
- _.select _.uniq(array), (item) ->
- _.all rest, (other) ->
- _.indexOf(other, item) >= 0
-
-
-# Zip together multiple lists into a single array -- elements that share
-# an index go together.
-_.zip = ->
- length = _.max _.pluck arguments, 'length'
- results = new Array length
- for i in [0...length]
- results[i] = _.pluck arguments, String i
- results
-
-
-# If the browser doesn't supply us with **indexOf** (I'm looking at you, MSIE),
-# we need this function. Return the position of the first occurrence of an
-# item in an array, or -1 if the item is not included in the array.
-_.indexOf = (array, item) ->
- return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf
- i = 0; l = array.length
- while l - i
- if array[i] is item then return i else i++
- -1
-
-
-# Provide JavaScript 1.6's **lastIndexOf**, delegating to the native function,
-# if possible.
-_.lastIndexOf = (array, item) ->
- return array.lastIndexOf(item) if nativeLastIndexOf and array.lastIndexOf is nativeLastIndexOf
- i = array.length
- while i
- if array[i] is item then return i else i--
- -1
-
-
-# Generate an integer Array containing an arithmetic progression. A port of
-# [the native Python **range** function](http://docs.python.org/library/functions.html#range).
-_.range = (start, stop, step) ->
- a = arguments
- solo = a.length <= 1
- i = start = if solo then 0 else a[0]
- stop = if solo then a[0] else a[1]
- step = a[2] or 1
- len = Math.ceil((stop - start) / step)
- return [] if len <= 0
- range = new Array len
- idx = 0
- loop
- return range if (if step > 0 then i - stop else stop - i) >= 0
- range[idx] = i
- idx++
- i+= step
-
-
-# Function Functions
-# ------------------
-
-# Create a function bound to a given object (assigning `this`, and arguments,
-# optionally). Binding with arguments is also known as **curry**.
-_.bind = (func, obj) ->
- args = _.rest arguments, 2
- -> func.apply obj or root, args.concat arguments
-
-
-# Bind all of an object's methods to that object. Useful for ensuring that
-# all callbacks defined on an object belong to it.
-_.bindAll = (obj) ->
- funcs = if arguments.length > 1 then _.rest(arguments) else _.functions(obj)
- _.each funcs, (f) -> obj[f] = _.bind obj[f], obj
- obj
-
-
-# Delays a function for the given number of milliseconds, and then calls
-# it with the arguments supplied.
-_.delay = (func, wait) ->
- args = _.rest arguments, 2
- setTimeout((-> func.apply(func, args)), wait)
-
-
-# Memoize an expensive function by storing its results.
-_.memoize = (func, hasher) ->
- memo = {}
- hasher or= _.identity
- ->
- key = hasher.apply this, arguments
- return memo[key] if key of memo
- memo[key] = func.apply this, arguments
-
-
-# Defers a function, scheduling it to run after the current call stack has
-# cleared.
-_.defer = (func) ->
- _.delay.apply _, [func, 1].concat _.rest arguments
-
-
-# Returns the first function passed as an argument to the second,
-# allowing you to adjust arguments, run code before and after, and
-# conditionally execute the original function.
-_.wrap = (func, wrapper) ->
- -> wrapper.apply wrapper, [func].concat arguments
-
-
-# Returns a function that is the composition of a list of functions, each
-# consuming the return value of the function that follows.
-_.compose = ->
- funcs = arguments
- ->
- args = arguments
- for i in [funcs.length - 1..0] by -1
- args = [funcs[i].apply(this, args)]
- args[0]
-
-
-# Object Functions
-# ----------------
-
-# Retrieve the names of an object's properties.
-_.keys = nativeKeys or (obj) ->
- return _.range 0, obj.length if _.isArray(obj)
- key for key, val of obj
-
-
-# Retrieve the values of an object's properties.
-_.values = (obj) ->
- _.map obj, _.identity
-
-
-# Return a sorted list of the function names available in Underscore.
-_.functions = (obj) ->
- _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()
-
-
-# Extend a given object with all of the properties in a source object.
-_.extend = (obj) ->
- for source in _.rest(arguments)
- obj[key] = val for key, val of source
- obj
-
-
-# Create a (shallow-cloned) duplicate of an object.
-_.clone = (obj) ->
- return obj.slice 0 if _.isArray obj
- _.extend {}, obj
-
-
-# Invokes interceptor with the obj, and then returns obj.
-# The primary purpose of this method is to "tap into" a method chain,
-# in order to perform operations on intermediate results within
- the chain.
-_.tap = (obj, interceptor) ->
- interceptor obj
- obj
-
-
-# Perform a deep comparison to check if two objects are equal.
-_.isEqual = (a, b) ->
- # Check object identity.
- return true if a is b
- # Different types?
- atype = typeof(a); btype = typeof(b)
- return false if atype isnt btype
- # Basic equality test (watch out for coercions).
- return true if `a == b`
- # One is falsy and the other truthy.
- return false if (!a and b) or (a and !b)
- # One of them implements an `isEqual()`?
- return a.isEqual(b) if a.isEqual
- # Check dates' integer values.
- return a.getTime() is b.getTime() if _.isDate(a) and _.isDate(b)
- # Both are NaN?
- return false if _.isNaN(a) and _.isNaN(b)
- # Compare regular expressions.
- if _.isRegExp(a) and _.isRegExp(b)
- return a.source is b.source and
- a.global is b.global and
- a.ignoreCase is b.ignoreCase and
- a.multiline is b.multiline
- # If a is not an object by this point, we can't handle it.
- return false if atype isnt 'object'
- # Check for different array lengths before comparing contents.
- return false if a.length and (a.length isnt b.length)
- # Nothing else worked, deep compare the contents.
- aKeys = _.keys(a); bKeys = _.keys(b)
- # Different object sizes?
- return false if aKeys.length isnt bKeys.length
- # Recursive comparison of contents.
- return false for key, val of a when !(key of b) or !_.isEqual(val, b[key])
- true
-
-
-# Is a given array or object empty?
-_.isEmpty = (obj) ->
- return obj.length is 0 if _.isArray(obj) or _.isString(obj)
- return false for own key of obj
- true
-
-
-# Is a given value a DOM element?
-_.isElement = (obj) -> obj and obj.nodeType is 1
-
-
-# Is a given value an array?
-_.isArray = nativeIsArray or (obj) -> !!(obj and obj.concat and obj.unshift and not obj.callee)
-
-
-# Is a given variable an arguments object?
-_.isArguments = (obj) -> obj and obj.callee
-
-
-# Is the given value a function?
-_.isFunction = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)
-
-
-# Is the given value a string?
-_.isString = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))
-
-
-# Is a given value a number?
-_.isNumber = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'
-
-
-# Is a given value a boolean?
-_.isBoolean = (obj) -> obj is true or obj is false
-
-
-# Is a given value a Date?
-_.isDate = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)
-
-
-# Is the given value a regular expression?
-_.isRegExp = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))
-
-
-# Is the given value NaN -- this one is interesting. `NaN != NaN`, and
-# `isNaN(undefined) == true`, so we make sure it's a number first.
-_.isNaN = (obj) -> _.isNumber(obj) and window.isNaN(obj)
-
-
-# Is a given value equal to null?
-_.isNull = (obj) -> obj is null
-
-
-# Is a given variable undefined?
-_.isUndefined = (obj) -> typeof obj is 'undefined'
-
-
-# Utility Functions
-# -----------------
-
-# Run Underscore.js in noConflict mode, returning the `_` variable to its
-# previous owner. Returns a reference to the Underscore object.
-_.noConflict = ->
- root._ = previousUnderscore
- this
-
-
-# Keep the identity function around for default iterators.
-_.identity = (value) -> value
-
-
-# Run a function `n` times.
-_.times = (n, iterator, context) ->
- iterator.call context, i for i in [0...n]
-
-
-# Break out of the middle of an iteration.
-_.breakLoop = -> throw breaker
-
-
-# Add your own custom functions to the Underscore object, ensuring that
-# they're correctly added to the OOP wrapper as well.
-_.mixin = (obj) ->
- for name in _.functions(obj)
- addToWrapper name, _[name] = obj[name]
-
-
-# Generate a unique integer id (unique within the entire client session).
-# Useful for temporary DOM ids.
-idCounter = 0
-_.uniqueId = (prefix) ->
- (prefix or '') + idCounter++
-
-
-# By default, Underscore uses **ERB**-style template delimiters, change the
-# following template settings to use alternative delimiters.
-_.templateSettings = {
- start: '<%'
- end: '%>'
- interpolate: /<%=(.+?)%>/g
-}
-
-
-# JavaScript templating a-la **ERB**, pilfered from John Resig's
-# *Secrets of the JavaScript Ninja*, page 83.
-# Single-quote fix from Rick Strahl.
-# With alterations for arbitrary delimiters, and to preserve whitespace.
-_.template = (str, data) ->
- c = _.templateSettings
- endMatch = new RegExp("'(?=[^"+c.end.substr(0, 1)+"]*"+escapeRegExp(c.end)+")","g")
- fn = new Function 'obj',
- 'var p=[],print=function(){p.push.apply(p,arguments);};' +
- 'with(obj||{}){p.push(\'' +
- str.replace(/\r/g, '\\r')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- .replace(endMatch,"���")
- .split("'").join("\\'")
- .split("���").join("'")
- .replace(c.interpolate, "',$1,'")
- .split(c.start).join("');")
- .split(c.end).join("p.push('") +
- "');}return p.join('');"
- if data then fn(data) else fn
-
-
-# Aliases
-# -------
-
-_.forEach = _.each
-_.foldl = _.inject = _.reduce
-_.foldr = _.reduceRight
-_.select = _.filter
-_.all = _.every
-_.any = _.some
-_.contains = _.include
-_.head = _.first
-_.tail = _.rest
-_.methods = _.functions
-
-
-# Setup the OOP Wrapper
-# ---------------------
-
-# If Underscore is called as a function, it returns a wrapped object that
-# can be used OO-style. This wrapper holds altered versions of all the
-# underscore functions. Wrapped objects may be chained.
-wrapper = (obj) ->
- this._wrapped = obj
- this
-
-
-# Helper function to continue chaining intermediate results.
-result = (obj, chain) ->
- if chain then _(obj).chain() else obj
-
-
-# A method to easily add functions to the OOP wrapper.
-addToWrapper = (name, func) ->
- wrapper.prototype[name] = ->
- args = _.toArray arguments
- unshift.call args, this._wrapped
- result func.apply(_, args), this._chain
-
-
-# Add all ofthe Underscore functions to the wrapper object.
-_.mixin _
-
-
-# Add all mutator Array functions to the wrapper.
-_.each ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], (name) ->
- method = Array.prototype[name]
- wrapper.prototype[name] = ->
- method.apply(this._wrapped, arguments)
- result(this._wrapped, this._chain)
-
-
-# Add all accessor Array functions to the wrapper.
-_.each ['concat', 'join', 'slice'], (name) ->
- method = Array.prototype[name]
- wrapper.prototype[name] = ->
- result(method.apply(this._wrapped, arguments), this._chain)
-
-
-# Start chaining a wrapped Underscore object.
-wrapper::chain = ->
- this._chain = true
- this
-
-
-# Extracts the result from a wrapped and chained object.
-wrapper::value = -> this._wrapped
-
-
-
- MIME types defined: text/x-coffeescript
.
-
- The CoffeeScript mode was written by Jeff Pickhardt.
-
-
diff --git a/public/js/lib/codemirror/mode/commonlisp/commonlisp.js b/public/js/lib/codemirror/mode/commonlisp/commonlisp.js
deleted file mode 100644
index 5f50b352de..0000000000
--- a/public/js/lib/codemirror/mode/commonlisp/commonlisp.js
+++ /dev/null
@@ -1,122 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("commonlisp", function (config) {
- var specialForm = /^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/;
- var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;
- var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;
- var symbol = /[^\s'`,@()\[\]";]/;
- var type;
-
- function readSym(stream) {
- var ch;
- while (ch = stream.next()) {
- if (ch == "\\") stream.next();
- else if (!symbol.test(ch)) { stream.backUp(1); break; }
- }
- return stream.current();
- }
-
- function base(stream, state) {
- if (stream.eatSpace()) {type = "ws"; return null;}
- if (stream.match(numLiteral)) return "number";
- var ch = stream.next();
- if (ch == "\\") ch = stream.next();
-
- if (ch == '"') return (state.tokenize = inString)(stream, state);
- else if (ch == "(") { type = "open"; return "bracket"; }
- else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; }
- else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; }
- else if (/['`,@]/.test(ch)) return null;
- else if (ch == "|") {
- if (stream.skipTo("|")) { stream.next(); return "symbol"; }
- else { stream.skipToEnd(); return "error"; }
- } else if (ch == "#") {
- var ch = stream.next();
- if (ch == "[") { type = "open"; return "bracket"; }
- else if (/[+\-=\.']/.test(ch)) return null;
- else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null;
- else if (ch == "|") return (state.tokenize = inComment)(stream, state);
- else if (ch == ":") { readSym(stream); return "meta"; }
- else return "error";
- } else {
- var name = readSym(stream);
- if (name == ".") return null;
- type = "symbol";
- if (name == "nil" || name == "t" || name.charAt(0) == ":") return "atom";
- if (state.lastType == "open" && (specialForm.test(name) || assumeBody.test(name))) return "keyword";
- if (name.charAt(0) == "&") return "variable-2";
- return "variable";
- }
- }
-
- function inString(stream, state) {
- var escaped = false, next;
- while (next = stream.next()) {
- if (next == '"' && !escaped) { state.tokenize = base; break; }
- escaped = !escaped && next == "\\";
- }
- return "string";
- }
-
- function inComment(stream, state) {
- var next, last;
- while (next = stream.next()) {
- if (next == "#" && last == "|") { state.tokenize = base; break; }
- last = next;
- }
- type = "ws";
- return "comment";
- }
-
- return {
- startState: function () {
- return {ctx: {prev: null, start: 0, indentTo: 0}, lastType: null, tokenize: base};
- },
-
- token: function (stream, state) {
- if (stream.sol() && typeof state.ctx.indentTo != "number")
- state.ctx.indentTo = state.ctx.start + 1;
-
- type = null;
- var style = state.tokenize(stream, state);
- if (type != "ws") {
- if (state.ctx.indentTo == null) {
- if (type == "symbol" && assumeBody.test(stream.current()))
- state.ctx.indentTo = state.ctx.start + config.indentUnit;
- else
- state.ctx.indentTo = "next";
- } else if (state.ctx.indentTo == "next") {
- state.ctx.indentTo = stream.column();
- }
- state.lastType = type;
- }
- if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};
- else if (type == "close") state.ctx = state.ctx.prev || state.ctx;
- return style;
- },
-
- indent: function (state, _textAfter) {
- var i = state.ctx.indentTo;
- return typeof i == "number" ? i : state.ctx.start + 1;
- },
-
- lineComment: ";;",
- blockCommentStart: "#|",
- blockCommentEnd: "|#"
- };
-});
-
-CodeMirror.defineMIME("text/x-common-lisp", "commonlisp");
-
-});
diff --git a/public/js/lib/codemirror/mode/commonlisp/index.html b/public/js/lib/codemirror/mode/commonlisp/index.html
deleted file mode 100644
index f2bf4522d6..0000000000
--- a/public/js/lib/codemirror/mode/commonlisp/index.html
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-CodeMirror: Common Lisp mode
-
-
-
-
-
-
-
-
-
-
-Common Lisp mode
-(in-package :cl-postgres)
-
-;; These are used to synthesize reader and writer names for integer
-;; reading/writing functions when the amount of bytes and the
-;; signedness is known. Both the macro that creates the functions and
-;; some macros that use them create names this way.
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defun integer-reader-name (bytes signed)
- (intern (with-standard-io-syntax
- (format nil "~a~a~a~a" '#:read- (if signed "" '#:u) '#:int bytes))))
- (defun integer-writer-name (bytes signed)
- (intern (with-standard-io-syntax
- (format nil "~a~a~a~a" '#:write- (if signed "" '#:u) '#:int bytes)))))
-
-(defmacro integer-reader (bytes)
- "Create a function to read integers from a binary stream."
- (let ((bits (* bytes 8)))
- (labels ((return-form (signed)
- (if signed
- `(if (logbitp ,(1- bits) result)
- (dpb result (byte ,(1- bits) 0) -1)
- result)
- `result))
- (generate-reader (signed)
- `(defun ,(integer-reader-name bytes signed) (socket)
- (declare (type stream socket)
- #.*optimize*)
- ,(if (= bytes 1)
- `(let ((result (the (unsigned-byte 8) (read-byte socket))))
- (declare (type (unsigned-byte 8) result))
- ,(return-form signed))
- `(let ((result 0))
- (declare (type (unsigned-byte ,bits) result))
- ,@(loop :for byte :from (1- bytes) :downto 0
- :collect `(setf (ldb (byte 8 ,(* 8 byte)) result)
- (the (unsigned-byte 8) (read-byte socket))))
- ,(return-form signed))))))
- `(progn
-;; This causes weird errors on SBCL in some circumstances. Disabled for now.
-;; (declaim (inline ,(integer-reader-name bytes t)
-;; ,(integer-reader-name bytes nil)))
- (declaim (ftype (function (t) (signed-byte ,bits))
- ,(integer-reader-name bytes t)))
- ,(generate-reader t)
- (declaim (ftype (function (t) (unsigned-byte ,bits))
- ,(integer-reader-name bytes nil)))
- ,(generate-reader nil)))))
-
-(defmacro integer-writer (bytes)
- "Create a function to write integers to a binary stream."
- (let ((bits (* 8 bytes)))
- `(progn
- (declaim (inline ,(integer-writer-name bytes t)
- ,(integer-writer-name bytes nil)))
- (defun ,(integer-writer-name bytes nil) (socket value)
- (declare (type stream socket)
- (type (unsigned-byte ,bits) value)
- #.*optimize*)
- ,@(if (= bytes 1)
- `((write-byte value socket))
- (loop :for byte :from (1- bytes) :downto 0
- :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)
- socket)))
- (values))
- (defun ,(integer-writer-name bytes t) (socket value)
- (declare (type stream socket)
- (type (signed-byte ,bits) value)
- #.*optimize*)
- ,@(if (= bytes 1)
- `((write-byte (ldb (byte 8 0) value) socket))
- (loop :for byte :from (1- bytes) :downto 0
- :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)
- socket)))
- (values)))))
-
-;; All the instances of the above that we need.
-
-(integer-reader 1)
-(integer-reader 2)
-(integer-reader 4)
-(integer-reader 8)
-
-(integer-writer 1)
-(integer-writer 2)
-(integer-writer 4)
-
-(defun write-bytes (socket bytes)
- "Write a byte-array to a stream."
- (declare (type stream socket)
- (type (simple-array (unsigned-byte 8)) bytes)
- #.*optimize*)
- (write-sequence bytes socket))
-
-(defun write-str (socket string)
- "Write a null-terminated string to a stream \(encoding it when UTF-8
-support is enabled.)."
- (declare (type stream socket)
- (type string string)
- #.*optimize*)
- (enc-write-string string socket)
- (write-uint1 socket 0))
-
-(declaim (ftype (function (t unsigned-byte)
- (simple-array (unsigned-byte 8) (*)))
- read-bytes))
-(defun read-bytes (socket length)
- "Read a byte array of the given length from a stream."
- (declare (type stream socket)
- (type fixnum length)
- #.*optimize*)
- (let ((result (make-array length :element-type '(unsigned-byte 8))))
- (read-sequence result socket)
- result))
-
-(declaim (ftype (function (t) string) read-str))
-(defun read-str (socket)
- "Read a null-terminated string from a stream. Takes care of encoding
-when UTF-8 support is enabled."
- (declare (type stream socket)
- #.*optimize*)
- (enc-read-string socket :null-terminated t))
-
-(defun skip-bytes (socket length)
- "Skip a given number of bytes in a binary stream."
- (declare (type stream socket)
- (type (unsigned-byte 32) length)
- #.*optimize*)
- (dotimes (i length)
- (read-byte socket)))
-
-(defun skip-str (socket)
- "Skip a null-terminated string."
- (declare (type stream socket)
- #.*optimize*)
- (loop :for char :of-type fixnum = (read-byte socket)
- :until (zerop char)))
-
-(defun ensure-socket-is-closed (socket &key abort)
- (when (open-stream-p socket)
- (handler-case
- (close socket :abort abort)
- (error (error)
- (warn "Ignoring the error which happened while trying to close PostgreSQL socket: ~A" error)))))
-
-
-
- MIME types defined: text/x-common-lisp
.
-
-
diff --git a/public/js/lib/codemirror/mode/cypher/cypher.js b/public/js/lib/codemirror/mode/cypher/cypher.js
deleted file mode 100644
index 315778706e..0000000000
--- a/public/js/lib/codemirror/mode/cypher/cypher.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// By the Neo4j Team and contributors.
-// https://github.com/neo4j-contrib/CodeMirror
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
- var wordRegexp = function(words) {
- return new RegExp("^(?:" + words.join("|") + ")$", "i");
- };
-
- CodeMirror.defineMode("cypher", function(config) {
- var tokenBase = function(stream/*, state*/) {
- var ch = stream.next(), curPunc = null;
- if (ch === "\"" || ch === "'") {
- stream.match(/.+?["']/);
- return "string";
- }
- if (/[{}\(\),\.;\[\]]/.test(ch)) {
- curPunc = ch;
- return "node";
- } else if (ch === "/" && stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- } else if (operatorChars.test(ch)) {
- stream.eatWhile(operatorChars);
- return null;
- } else {
- stream.eatWhile(/[_\w\d]/);
- if (stream.eat(":")) {
- stream.eatWhile(/[\w\d_\-]/);
- return "atom";
- }
- var word = stream.current();
- if (funcs.test(word)) return "builtin";
- if (preds.test(word)) return "def";
- if (keywords.test(word)) return "keyword";
- return "variable";
- }
- };
- var pushContext = function(state, type, col) {
- return state.context = {
- prev: state.context,
- indent: state.indent,
- col: col,
- type: type
- };
- };
- var popContext = function(state) {
- state.indent = state.context.indent;
- return state.context = state.context.prev;
- };
- var indentUnit = config.indentUnit;
- var curPunc;
- var funcs = wordRegexp(["abs", "acos", "allShortestPaths", "asin", "atan", "atan2", "avg", "ceil", "coalesce", "collect", "cos", "cot", "count", "degrees", "e", "endnode", "exp", "extract", "filter", "floor", "haversin", "head", "id", "labels", "last", "left", "length", "log", "log10", "lower", "ltrim", "max", "min", "node", "nodes", "percentileCont", "percentileDisc", "pi", "radians", "rand", "range", "reduce", "rel", "relationship", "relationships", "replace", "right", "round", "rtrim", "shortestPath", "sign", "sin", "split", "sqrt", "startnode", "stdev", "stdevp", "str", "substring", "sum", "tail", "tan", "timestamp", "toFloat", "toInt", "trim", "type", "upper"]);
- var preds = wordRegexp(["all", "and", "any", "has", "in", "none", "not", "or", "single", "xor"]);
- var keywords = wordRegexp(["as", "asc", "ascending", "assert", "by", "case", "commit", "constraint", "create", "csv", "cypher", "delete", "desc", "descending", "distinct", "drop", "else", "end", "explain", "false", "fieldterminator", "foreach", "from", "headers", "in", "index", "is", "limit", "load", "match", "merge", "null", "on", "optional", "order", "periodic", "profile", "remove", "return", "scan", "set", "skip", "start", "then", "true", "union", "unique", "unwind", "using", "when", "where", "with"]);
- var operatorChars = /[*+\-<>=&|~%^]/;
-
- return {
- startState: function(/*base*/) {
- return {
- tokenize: tokenBase,
- context: null,
- indent: 0,
- col: 0
- };
- },
- token: function(stream, state) {
- if (stream.sol()) {
- if (state.context && (state.context.align == null)) {
- state.context.align = false;
- }
- state.indent = stream.indentation();
- }
- if (stream.eatSpace()) {
- return null;
- }
- var style = state.tokenize(stream, state);
- if (style !== "comment" && state.context && (state.context.align == null) && state.context.type !== "pattern") {
- state.context.align = true;
- }
- if (curPunc === "(") {
- pushContext(state, ")", stream.column());
- } else if (curPunc === "[") {
- pushContext(state, "]", stream.column());
- } else if (curPunc === "{") {
- pushContext(state, "}", stream.column());
- } else if (/[\]\}\)]/.test(curPunc)) {
- while (state.context && state.context.type === "pattern") {
- popContext(state);
- }
- if (state.context && curPunc === state.context.type) {
- popContext(state);
- }
- } else if (curPunc === "." && state.context && state.context.type === "pattern") {
- popContext(state);
- } else if (/atom|string|variable/.test(style) && state.context) {
- if (/[\}\]]/.test(state.context.type)) {
- pushContext(state, "pattern", stream.column());
- } else if (state.context.type === "pattern" && !state.context.align) {
- state.context.align = true;
- state.context.col = stream.column();
- }
- }
- return style;
- },
- indent: function(state, textAfter) {
- var firstChar = textAfter && textAfter.charAt(0);
- var context = state.context;
- if (/[\]\}]/.test(firstChar)) {
- while (context && context.type === "pattern") {
- context = context.prev;
- }
- }
- var closing = context && firstChar === context.type;
- if (!context) return 0;
- if (context.type === "keywords") return CodeMirror.commands.newlineAndIndent;
- if (context.align) return context.col + (closing ? 0 : 1);
- return context.indent + (closing ? 0 : indentUnit);
- }
- };
- });
-
- CodeMirror.modeExtensions["cypher"] = {
- autoFormatLineBreaks: function(text) {
- var i, lines, reProcessedPortion;
- var lines = text.split("\n");
- var reProcessedPortion = /\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g;
- for (var i = 0; i < lines.length; i++)
- lines[i] = lines[i].replace(reProcessedPortion, " \n$1 ").trim();
- return lines.join("\n");
- }
- };
-
- CodeMirror.defineMIME("application/x-cypher-query", "cypher");
-
-});
diff --git a/public/js/lib/codemirror/mode/cypher/index.html b/public/js/lib/codemirror/mode/cypher/index.html
deleted file mode 100644
index b8bd75c8b3..0000000000
--- a/public/js/lib/codemirror/mode/cypher/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-CodeMirror: Cypher Mode for CodeMirror
-
-
-
-
-
-
-
-
-
-
-
-Cypher Mode for CodeMirror
-
- // Cypher Mode for CodeMirror, using the neo theme
-MATCH (joe { name: 'Joe' })-[:knows*2..2]-(friend_of_friend)
-WHERE NOT (joe)-[:knows]-(friend_of_friend)
-RETURN friend_of_friend.name, COUNT(*)
-ORDER BY COUNT(*) DESC , friend_of_friend.name
-
-
- MIME types defined:
- application/x-cypher-query
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/d/d.js b/public/js/lib/codemirror/mode/d/d.js
deleted file mode 100644
index c927a7e358..0000000000
--- a/public/js/lib/codemirror/mode/d/d.js
+++ /dev/null
@@ -1,218 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("d", function(config, parserConfig) {
- var indentUnit = config.indentUnit,
- statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
- keywords = parserConfig.keywords || {},
- builtin = parserConfig.builtin || {},
- blockKeywords = parserConfig.blockKeywords || {},
- atoms = parserConfig.atoms || {},
- hooks = parserConfig.hooks || {},
- multiLineStrings = parserConfig.multiLineStrings;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'" || ch == "`") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("+")) {
- state.tokenize = tokenComment;
- return tokenNestedComment(stream, state);
- }
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function tokenNestedComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "+");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- var indent = state.indented;
- if (state.context && state.context.type == "statement")
- indent = state.context.indented;
- return state.context = new Context(indent, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " +
- "out scope struct switch try union unittest version while with";
-
- CodeMirror.defineMIME("text/x-d", {
- name: "d",
- keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " +
- "debug default delegate delete deprecated export extern final finally function goto immutable " +
- "import inout invariant is lazy macro module new nothrow override package pragma private " +
- "protected public pure ref return shared short static super synchronized template this " +
- "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " +
- blockKeywords),
- blockKeywords: words(blockKeywords),
- builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " +
- "ucent uint ulong ushort wchar wstring void size_t sizediff_t"),
- atoms: words("exit failure success true false null"),
- hooks: {
- "@": function(stream, _state) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
-});
diff --git a/public/js/lib/codemirror/mode/d/index.html b/public/js/lib/codemirror/mode/d/index.html
deleted file mode 100644
index 08cabd8a2e..0000000000
--- a/public/js/lib/codemirror/mode/d/index.html
+++ /dev/null
@@ -1,273 +0,0 @@
-
-
-CodeMirror: D mode
-
-
-
-
-
-
-
-
-
-
-
-D mode
-
-/* D demo code // copied from phobos/sd/metastrings.d */
-// Written in the D programming language.
-
-/**
-Templates with which to do compile-time manipulation of strings.
-
-Macros:
- WIKI = Phobos/StdMetastrings
-
-Copyright: Copyright Digital Mars 2007 - 2009.
-License: Boost License 1.0 .
-Authors: $(WEB digitalmars.com, Walter Bright),
- Don Clugston
-Source: $(PHOBOSSRC std/_metastrings.d)
-*/
-/*
- Copyright Digital Mars 2007 - 2009.
-Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
- */
-module std.metastrings;
-
-/**
-Formats constants into a string at compile time. Analogous to $(XREF
-string,format).
-
-Parameters:
-
-A = tuple of constants, which can be strings, characters, or integral
- values.
-
-Formats:
- * The formats supported are %s for strings, and %%
- * for the % character.
-Example:
----
-import std.metastrings;
-import std.stdio;
-
-void main()
-{
- string s = Format!("Arg %s = %s", "foo", 27);
- writefln(s); // "Arg foo = 27"
-}
- * ---
- */
-
-template Format(A...)
-{
- static if (A.length == 0)
- enum Format = "";
- else static if (is(typeof(A[0]) : const(char)[]))
- enum Format = FormatString!(A[0], A[1..$]);
- else
- enum Format = toStringNow!(A[0]) ~ Format!(A[1..$]);
-}
-
-template FormatString(const(char)[] F, A...)
-{
- static if (F.length == 0)
- enum FormatString = Format!(A);
- else static if (F.length == 1)
- enum FormatString = F[0] ~ Format!(A);
- else static if (F[0..2] == "%s")
- enum FormatString
- = toStringNow!(A[0]) ~ FormatString!(F[2..$],A[1..$]);
- else static if (F[0..2] == "%%")
- enum FormatString = "%" ~ FormatString!(F[2..$],A);
- else
- {
- static assert(F[0] != '%', "unrecognized format %" ~ F[1]);
- enum FormatString = F[0] ~ FormatString!(F[1..$],A);
- }
-}
-
-unittest
-{
- auto s = Format!("hel%slo", "world", -138, 'c', true);
- assert(s == "helworldlo-138ctrue", "[" ~ s ~ "]");
-}
-
-/**
- * Convert constant argument to a string.
- */
-
-template toStringNow(ulong v)
-{
- static if (v < 10)
- enum toStringNow = "" ~ cast(char)(v + '0');
- else
- enum toStringNow = toStringNow!(v / 10) ~ toStringNow!(v % 10);
-}
-
-unittest
-{
- static assert(toStringNow!(1uL << 62) == "4611686018427387904");
-}
-
-/// ditto
-template toStringNow(long v)
-{
- static if (v < 0)
- enum toStringNow = "-" ~ toStringNow!(cast(ulong) -v);
- else
- enum toStringNow = toStringNow!(cast(ulong) v);
-}
-
-unittest
-{
- static assert(toStringNow!(0x100000000) == "4294967296");
- static assert(toStringNow!(-138L) == "-138");
-}
-
-/// ditto
-template toStringNow(uint U)
-{
- enum toStringNow = toStringNow!(cast(ulong)U);
-}
-
-/// ditto
-template toStringNow(int I)
-{
- enum toStringNow = toStringNow!(cast(long)I);
-}
-
-/// ditto
-template toStringNow(bool B)
-{
- enum toStringNow = B ? "true" : "false";
-}
-
-/// ditto
-template toStringNow(string S)
-{
- enum toStringNow = S;
-}
-
-/// ditto
-template toStringNow(char C)
-{
- enum toStringNow = "" ~ C;
-}
-
-
-/********
- * Parse unsigned integer literal from the start of string s.
- * returns:
- * .value = the integer literal as a string,
- * .rest = the string following the integer literal
- * Otherwise:
- * .value = null,
- * .rest = s
- */
-
-template parseUinteger(const(char)[] s)
-{
- static if (s.length == 0)
- {
- enum value = "";
- enum rest = "";
- }
- else static if (s[0] >= '0' && s[0] <= '9')
- {
- enum value = s[0] ~ parseUinteger!(s[1..$]).value;
- enum rest = parseUinteger!(s[1..$]).rest;
- }
- else
- {
- enum value = "";
- enum rest = s;
- }
-}
-
-/********
-Parse integer literal optionally preceded by $(D '-') from the start
-of string $(D s).
-
-Returns:
- .value = the integer literal as a string,
- .rest = the string following the integer literal
-
-Otherwise:
- .value = null,
- .rest = s
-*/
-
-template parseInteger(const(char)[] s)
-{
- static if (s.length == 0)
- {
- enum value = "";
- enum rest = "";
- }
- else static if (s[0] >= '0' && s[0] <= '9')
- {
- enum value = s[0] ~ parseUinteger!(s[1..$]).value;
- enum rest = parseUinteger!(s[1..$]).rest;
- }
- else static if (s.length >= 2 &&
- s[0] == '-' && s[1] >= '0' && s[1] <= '9')
- {
- enum value = s[0..2] ~ parseUinteger!(s[2..$]).value;
- enum rest = parseUinteger!(s[2..$]).rest;
- }
- else
- {
- enum value = "";
- enum rest = s;
- }
-}
-
-unittest
-{
- assert(parseUinteger!("1234abc").value == "1234");
- assert(parseUinteger!("1234abc").rest == "abc");
- assert(parseInteger!("-1234abc").value == "-1234");
- assert(parseInteger!("-1234abc").rest == "abc");
-}
-
-/**
-Deprecated aliases held for backward compatibility.
-*/
-deprecated alias toStringNow ToString;
-/// Ditto
-deprecated alias parseUinteger ParseUinteger;
-/// Ditto
-deprecated alias parseUinteger ParseInteger;
-
-
-
-
-
- Simple mode that handle D-Syntax (DLang Homepage ).
-
- MIME types defined: text/x-d
- .
-
diff --git a/public/js/lib/codemirror/mode/dart/dart.js b/public/js/lib/codemirror/mode/dart/dart.js
deleted file mode 100644
index a49e218c3b..0000000000
--- a/public/js/lib/codemirror/mode/dart/dart.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../clike/clike"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../clike/clike"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- var keywords = ("this super static final const abstract class extends external factory " +
- "implements get native operator set typedef with enum throw rethrow " +
- "assert break case continue default in return new deferred async await " +
- "try catch finally do else for if switch while import library export " +
- "part of show hide is").split(" ");
- var blockKeywords = "try catch finally do else for if switch while".split(" ");
- var atoms = "true false null".split(" ");
- var builtins = "void bool num int double dynamic var String".split(" ");
-
- function set(words) {
- var obj = {};
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- CodeMirror.defineMIME("application/dart", {
- name: "clike",
- keywords: set(keywords),
- multiLineStrings: true,
- blockKeywords: set(blockKeywords),
- builtin: set(builtins),
- atoms: set(atoms),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
- CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins));
-
- // This is needed to make loading through meta.js work.
- CodeMirror.defineMode("dart", function(conf) {
- return CodeMirror.getMode(conf, "application/dart");
- }, "clike");
-});
diff --git a/public/js/lib/codemirror/mode/dart/index.html b/public/js/lib/codemirror/mode/dart/index.html
deleted file mode 100644
index e79da5a8b0..0000000000
--- a/public/js/lib/codemirror/mode/dart/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-CodeMirror: Dart mode
-
-
-
-
-
-
-
-
-
-
-Dart mode
-
-
-import 'dart:math' show Random;
-
-void main() {
- print(new Die(n: 12).roll());
-}
-
-// Define a class.
-class Die {
- // Define a class variable.
- static Random shaker = new Random();
-
- // Define instance variables.
- int sides, value;
-
- // Define a method using shorthand syntax.
- String toString() => '$value';
-
- // Define a constructor.
- Die({int n: 6}) {
- if (4 <= n && n <= 20) {
- sides = n;
- } else {
- // Support for errors and exceptions.
- throw new ArgumentError(/* */);
- }
- }
-
- // Define an instance method.
- int roll() {
- return value = shaker.nextInt(sides) + 1;
- }
-}
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/diff/diff.js b/public/js/lib/codemirror/mode/diff/diff.js
deleted file mode 100644
index fe0305e7b6..0000000000
--- a/public/js/lib/codemirror/mode/diff/diff.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("diff", function() {
-
- var TOKEN_NAMES = {
- '+': 'positive',
- '-': 'negative',
- '@': 'meta'
- };
-
- return {
- token: function(stream) {
- var tw_pos = stream.string.search(/[\t ]+?$/);
-
- if (!stream.sol() || tw_pos === 0) {
- stream.skipToEnd();
- return ("error " + (
- TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
- }
-
- var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
-
- if (tw_pos === -1) {
- stream.skipToEnd();
- } else {
- stream.pos = tw_pos;
- }
-
- return token_name;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-diff", "diff");
-
-});
diff --git a/public/js/lib/codemirror/mode/diff/index.html b/public/js/lib/codemirror/mode/diff/index.html
deleted file mode 100644
index 0af611fa48..0000000000
--- a/public/js/lib/codemirror/mode/diff/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-CodeMirror: Diff mode
-
-
-
-
-
-
-
-
-
-
-Diff mode
-
-diff --git a/index.html b/index.html
-index c1d9156..7764744 100644
---- a/index.html
-+++ b/index.html
-@@ -95,7 +95,8 @@ StringStream.prototype = {
-
-
-diff --git a/lib/codemirror.js b/lib/codemirror.js
-index 04646a9..9a39cc7 100644
---- a/lib/codemirror.js
-+++ b/lib/codemirror.js
-@@ -399,10 +399,16 @@ var CodeMirror = (function() {
- }
-
- function onMouseDown(e) {
-- var start = posFromMouse(e), last = start;
-+ var start = posFromMouse(e), last = start, target = e.target();
- if (!start) return;
- setCursor(start.line, start.ch, false);
- if (e.button() != 1) return;
-+ if (target.parentNode == gutter) {
-+ if (options.onGutterClick)
-+ options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);
-+ return;
-+ }
-+
- if (!focused) onFocus();
-
- e.stop();
-@@ -808,7 +814,7 @@ var CodeMirror = (function() {
- for (var i = showingFrom; i < showingTo; ++i) {
- var marker = lines[i].gutterMarker;
- if (marker) html.push('' + htmlEscape(marker.text) + '
');
-- else html.push("" + (options.lineNumbers ? i + 1 : "\u00a0") + "
");
-+ else html.push("" + (options.lineNumbers ? i + options.firstLineNumber : "\u00a0") + "
");
- }
- gutter.style.display = "none"; // TODO test whether this actually helps
- gutter.innerHTML = html.join("");
-@@ -1371,10 +1377,8 @@ var CodeMirror = (function() {
- if (option == "parser") setParser(value);
- else if (option === "lineNumbers") setLineNumbers(value);
- else if (option === "gutter") setGutter(value);
-- else if (option === "readOnly") options.readOnly = value;
-- else if (option === "indentUnit") {options.indentUnit = indentUnit = value; setParser(options.parser);}
-- else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;
-- else throw new Error("Can't set option " + option);
-+ else if (option === "indentUnit") {options.indentUnit = value; setParser(options.parser);}
-+ else options[option] = value;
- },
- cursorCoords: cursorCoords,
- undo: operation(undo),
-@@ -1402,7 +1406,8 @@ var CodeMirror = (function() {
- replaceRange: operation(replaceRange),
-
- operation: function(f){return operation(f)();},
-- refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}
-+ refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},
-+ getInputField: function(){return input;}
- };
- return instance;
- }
-@@ -1420,6 +1425,7 @@ var CodeMirror = (function() {
- readOnly: false,
- onChange: null,
- onCursorActivity: null,
-+ onGutterClick: null,
- autoMatchBrackets: false,
- workTime: 200,
- workDelay: 300,
-
-
-
- MIME types defined: text/x-diff
.
-
-
diff --git a/public/js/lib/codemirror/mode/django/django.js b/public/js/lib/codemirror/mode/django/django.js
deleted file mode 100644
index d70b2fe948..0000000000
--- a/public/js/lib/codemirror/mode/django/django.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
- require("../../addon/mode/overlay"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
- "../../addon/mode/overlay"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("django:inner", function() {
- var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false",
- "loop", "none", "self", "super", "if", "endif", "as", "not", "and",
- "else", "import", "with", "endwith", "without", "context", "ifequal", "endifequal",
- "ifnotequal", "endifnotequal", "extends", "include", "load", "length", "comment",
- "endcomment", "empty"];
- keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
-
- function tokenBase (stream, state) {
- stream.eatWhile(/[^\{]/);
- var ch = stream.next();
- if (ch == "{") {
- if (ch = stream.eat(/\{|%|#/)) {
- state.tokenize = inTag(ch);
- return "tag";
- }
- }
- }
- function inTag (close) {
- if (close == "{") {
- close = "}";
- }
- return function (stream, state) {
- var ch = stream.next();
- if ((ch == close) && stream.eat("}")) {
- state.tokenize = tokenBase;
- return "tag";
- }
- if (stream.match(keywords)) {
- return "keyword";
- }
- return close == "#" ? "comment" : "string";
- };
- }
- return {
- startState: function () {
- return {tokenize: tokenBase};
- },
- token: function (stream, state) {
- return state.tokenize(stream, state);
- }
- };
- });
-
- CodeMirror.defineMode("django", function(config) {
- var htmlBase = CodeMirror.getMode(config, "text/html");
- var djangoInner = CodeMirror.getMode(config, "django:inner");
- return CodeMirror.overlayMode(htmlBase, djangoInner);
- });
-
- CodeMirror.defineMIME("text/x-django", "django");
-});
diff --git a/public/js/lib/codemirror/mode/django/index.html b/public/js/lib/codemirror/mode/django/index.html
deleted file mode 100644
index 79d9a6a04b..0000000000
--- a/public/js/lib/codemirror/mode/django/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-CodeMirror: Django template mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Django template mode
-
-
-
-
- My Django web application
-
-
-
- {{ page.title }}
-
-
- {% for item in items %}
- {% item.name %}
- {% empty %}
- You have no items in your list.
- {% endfor %}
-
-
-
-
-
-
-
- Mode for HTML with embedded Django template markup.
-
- MIME types defined: text/x-django
-
diff --git a/public/js/lib/codemirror/mode/dockerfile/dockerfile.js b/public/js/lib/codemirror/mode/dockerfile/dockerfile.js
deleted file mode 100644
index 6d51775067..0000000000
--- a/public/js/lib/codemirror/mode/dockerfile/dockerfile.js
+++ /dev/null
@@ -1,76 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- // Collect all Dockerfile directives
- var instructions = ["from", "maintainer", "run", "cmd", "expose", "env",
- "add", "copy", "entrypoint", "volume", "user",
- "workdir", "onbuild"],
- instructionRegex = "(" + instructions.join('|') + ")",
- instructionOnlyLine = new RegExp(instructionRegex + "\\s*$", "i"),
- instructionWithArguments = new RegExp(instructionRegex + "(\\s+)", "i");
-
- CodeMirror.defineSimpleMode("dockerfile", {
- start: [
- // Block comment: This is a line starting with a comment
- {
- regex: /#.*$/,
- token: "comment"
- },
- // Highlight an instruction without any arguments (for convenience)
- {
- regex: instructionOnlyLine,
- token: "variable-2"
- },
- // Highlight an instruction followed by arguments
- {
- regex: instructionWithArguments,
- token: ["variable-2", null],
- next: "arguments"
- },
- {
- regex: /./,
- token: null
- }
- ],
- arguments: [
- {
- // Line comment without instruction arguments is an error
- regex: /#.*$/,
- token: "error",
- next: "start"
- },
- {
- regex: /[^#]+\\$/,
- token: null
- },
- {
- // Match everything except for the inline comment
- regex: /[^#]+/,
- token: null,
- next: "start"
- },
- {
- regex: /$/,
- token: null,
- next: "start"
- },
- // Fail safe return to start
- {
- token: null,
- next: "start"
- }
- ]
- });
-
- CodeMirror.defineMIME("text/x-dockerfile", "dockerfile");
-});
diff --git a/public/js/lib/codemirror/mode/dockerfile/index.html b/public/js/lib/codemirror/mode/dockerfile/index.html
deleted file mode 100644
index a31759bce1..0000000000
--- a/public/js/lib/codemirror/mode/dockerfile/index.html
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-CodeMirror: Dockerfile mode
-
-
-
-
-
-
-
-
-
-
-
-Dockerfile mode
-# Install Ghost blogging platform and run development environment
-#
-# VERSION 1.0.0
-
-FROM ubuntu:12.10
-MAINTAINER Amer Grgic "amer@livebyt.es"
-WORKDIR /data/ghost
-
-# Install dependencies for nginx installation
-RUN apt-get update
-RUN apt-get install -y python g++ make software-properties-common --force-yes
-RUN add-apt-repository ppa:chris-lea/node.js
-RUN apt-get update
-# Install unzip
-RUN apt-get install -y unzip
-# Install curl
-RUN apt-get install -y curl
-# Install nodejs & npm
-RUN apt-get install -y rlwrap
-RUN apt-get install -y nodejs
-# Download Ghost v0.4.1
-RUN curl -L https://ghost.org/zip/ghost-latest.zip -o /tmp/ghost.zip
-# Unzip Ghost zip to /data/ghost
-RUN unzip -uo /tmp/ghost.zip -d /data/ghost
-# Add custom config js to /data/ghost
-ADD ./config.example.js /data/ghost/config.js
-# Install Ghost with NPM
-RUN cd /data/ghost/ && npm install --production
-# Expose port 2368
-EXPOSE 2368
-# Run Ghost
-CMD ["npm","start"]
-
-
-
-
- Dockerfile syntax highlighting for CodeMirror. Depends on
- the simplemode addon.
-
- MIME types defined: text/x-dockerfile
-
diff --git a/public/js/lib/codemirror/mode/dtd/dtd.js b/public/js/lib/codemirror/mode/dtd/dtd.js
deleted file mode 100644
index f37029a77d..0000000000
--- a/public/js/lib/codemirror/mode/dtd/dtd.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
- DTD mode
- Ported to CodeMirror by Peter Kroon
- Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
- GitHub: @peterkroon
-*/
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("dtd", function(config) {
- var indentUnit = config.indentUnit, type;
- function ret(style, tp) {type = tp; return style;}
-
- function tokenBase(stream, state) {
- var ch = stream.next();
-
- if (ch == "<" && stream.eat("!") ) {
- if (stream.eatWhile(/[\-]/)) {
- state.tokenize = tokenSGMLComment;
- return tokenSGMLComment(stream, state);
- } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
- } else if (ch == "<" && stream.eat("?")) { //xml declaration
- state.tokenize = inBlock("meta", "?>");
- return ret("meta", ch);
- } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
- else if (ch == "|") return ret("keyword", "seperator");
- else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
- else if (ch.match(/[\[\]]/)) return ret("rule", ch);
- else if (ch == "\"" || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
- var sc = stream.current();
- if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
- return ret("tag", "tag");
- } else if (ch == "%" || ch == "*" ) return ret("number", "number");
- else {
- stream.eatWhile(/[\w\\\-_%.{,]/);
- return ret(null, null);
- }
- }
-
- function tokenSGMLComment(stream, state) {
- var dashes = 0, ch;
- while ((ch = stream.next()) != null) {
- if (dashes >= 2 && ch == ">") {
- state.tokenize = tokenBase;
- break;
- }
- dashes = (ch == "-") ? dashes + 1 : 0;
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped) {
- state.tokenize = tokenBase;
- break;
- }
- escaped = !escaped && ch == "\\";
- }
- return ret("string", "tag");
- };
- }
-
- function inBlock(style, terminator) {
- return function(stream, state) {
- while (!stream.eol()) {
- if (stream.match(terminator)) {
- state.tokenize = tokenBase;
- break;
- }
- stream.next();
- }
- return style;
- };
- }
-
- return {
- startState: function(base) {
- return {tokenize: tokenBase,
- baseIndent: base || 0,
- stack: []};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
-
- var context = state.stack[state.stack.length-1];
- if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
- else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
- else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
- else if (type == "[") state.stack.push("[");
- return style;
- },
-
- indent: function(state, textAfter) {
- var n = state.stack.length;
-
- if( textAfter.match(/\]\s+|\]/) )n=n-1;
- else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
- if(textAfter.substr(0,1) === "<")n;
- else if( type == "doindent" && textAfter.length > 1 )n;
- else if( type == "doindent")n--;
- else if( type == ">" && textAfter.length > 1)n;
- else if( type == "tag" && textAfter !== ">")n;
- else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
- else if( type == "tag")n++;
- else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
- else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n;
- else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
- else if( textAfter === ">")n;
- else n=n-1;
- //over rule them all
- if(type == null || type == "]")n--;
- }
-
- return state.baseIndent + n * indentUnit;
- },
-
- electricChars: "]>"
- };
-});
-
-CodeMirror.defineMIME("application/xml-dtd", "dtd");
-
-});
diff --git a/public/js/lib/codemirror/mode/dtd/index.html b/public/js/lib/codemirror/mode/dtd/index.html
deleted file mode 100644
index e6798a748a..0000000000
--- a/public/js/lib/codemirror/mode/dtd/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-CodeMirror: DTD mode
-
-
-
-
-
-
-
-
-
-
-DTD mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]
->
-
-
-
-
-
-
- MIME types defined: application/xml-dtd
.
-
diff --git a/public/js/lib/codemirror/mode/dylan/dylan.js b/public/js/lib/codemirror/mode/dylan/dylan.js
deleted file mode 100644
index be2986adb5..0000000000
--- a/public/js/lib/codemirror/mode/dylan/dylan.js
+++ /dev/null
@@ -1,299 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("dylan", function(_config) {
- // Words
- var words = {
- // Words that introduce unnamed definitions like "define interface"
- unnamedDefinition: ["interface"],
-
- // Words that introduce simple named definitions like "define library"
- namedDefinition: ["module", "library", "macro",
- "C-struct", "C-union",
- "C-function", "C-callable-wrapper"
- ],
-
- // Words that introduce type definitions like "define class".
- // These are also parameterized like "define method" and are
- // appended to otherParameterizedDefinitionWords
- typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"],
-
- // Words that introduce trickier definitions like "define method".
- // These require special definitions to be added to startExpressions
- otherParameterizedDefinition: ["method", "function",
- "C-variable", "C-address"
- ],
-
- // Words that introduce module constant definitions.
- // These must also be simple definitions and are
- // appended to otherSimpleDefinitionWords
- constantSimpleDefinition: ["constant"],
-
- // Words that introduce module variable definitions.
- // These must also be simple definitions and are
- // appended to otherSimpleDefinitionWords
- variableSimpleDefinition: ["variable"],
-
- // Other words that introduce simple definitions
- // (without implicit bodies).
- otherSimpleDefinition: ["generic", "domain",
- "C-pointer-type",
- "table"
- ],
-
- // Words that begin statements with implicit bodies.
- statement: ["if", "block", "begin", "method", "case",
- "for", "select", "when", "unless", "until",
- "while", "iterate", "profiling", "dynamic-bind"
- ],
-
- // Patterns that act as separators in compound statements.
- // This may include any general pattern that must be indented
- // specially.
- separator: ["finally", "exception", "cleanup", "else",
- "elseif", "afterwards"
- ],
-
- // Keywords that do not require special indentation handling,
- // but which should be highlighted
- other: ["above", "below", "by", "from", "handler", "in",
- "instance", "let", "local", "otherwise", "slot",
- "subclass", "then", "to", "keyed-by", "virtual"
- ],
-
- // Condition signaling function calls
- signalingCalls: ["signal", "error", "cerror",
- "break", "check-type", "abort"
- ]
- };
-
- words["otherDefinition"] =
- words["unnamedDefinition"]
- .concat(words["namedDefinition"])
- .concat(words["otherParameterizedDefinition"]);
-
- words["definition"] =
- words["typeParameterizedDefinition"]
- .concat(words["otherDefinition"]);
-
- words["parameterizedDefinition"] =
- words["typeParameterizedDefinition"]
- .concat(words["otherParameterizedDefinition"]);
-
- words["simpleDefinition"] =
- words["constantSimpleDefinition"]
- .concat(words["variableSimpleDefinition"])
- .concat(words["otherSimpleDefinition"]);
-
- words["keyword"] =
- words["statement"]
- .concat(words["separator"])
- .concat(words["other"]);
-
- // Patterns
- var symbolPattern = "[-_a-zA-Z?!*@<>$%]+";
- var symbol = new RegExp("^" + symbolPattern);
- var patterns = {
- // Symbols with special syntax
- symbolKeyword: symbolPattern + ":",
- symbolClass: "<" + symbolPattern + ">",
- symbolGlobal: "\\*" + symbolPattern + "\\*",
- symbolConstant: "\\$" + symbolPattern
- };
- var patternStyles = {
- symbolKeyword: "atom",
- symbolClass: "tag",
- symbolGlobal: "variable-2",
- symbolConstant: "variable-3"
- };
-
- // Compile all patterns to regular expressions
- for (var patternName in patterns)
- if (patterns.hasOwnProperty(patternName))
- patterns[patternName] = new RegExp("^" + patterns[patternName]);
-
- // Names beginning "with-" and "without-" are commonly
- // used as statement macro
- patterns["keyword"] = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];
-
- var styles = {};
- styles["keyword"] = "keyword";
- styles["definition"] = "def";
- styles["simpleDefinition"] = "def";
- styles["signalingCalls"] = "builtin";
-
- // protected words lookup table
- var wordLookup = {};
- var styleLookup = {};
-
- [
- "keyword",
- "definition",
- "simpleDefinition",
- "signalingCalls"
- ].forEach(function(type) {
- words[type].forEach(function(word) {
- wordLookup[word] = type;
- styleLookup[word] = styles[type];
- });
- });
-
-
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
-
- var type, content;
-
- function ret(_type, style, _content) {
- type = _type;
- content = _content;
- return style;
- }
-
- function tokenBase(stream, state) {
- // String
- var ch = stream.peek();
- if (ch == "'" || ch == '"') {
- stream.next();
- return chain(stream, state, tokenString(ch, "string", "string"));
- }
- // Comment
- else if (ch == "/") {
- stream.next();
- if (stream.eat("*")) {
- return chain(stream, state, tokenComment);
- } else if (stream.eat("/")) {
- stream.skipToEnd();
- return ret("comment", "comment");
- } else {
- stream.skipTo(" ");
- return ret("operator", "operator");
- }
- }
- // Decimal
- else if (/\d/.test(ch)) {
- stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/);
- return ret("number", "number");
- }
- // Hash
- else if (ch == "#") {
- stream.next();
- // Symbol with string syntax
- ch = stream.peek();
- if (ch == '"') {
- stream.next();
- return chain(stream, state, tokenString('"', "symbol", "string-2"));
- }
- // Binary number
- else if (ch == "b") {
- stream.next();
- stream.eatWhile(/[01]/);
- return ret("number", "number");
- }
- // Hex number
- else if (ch == "x") {
- stream.next();
- stream.eatWhile(/[\da-f]/i);
- return ret("number", "number");
- }
- // Octal number
- else if (ch == "o") {
- stream.next();
- stream.eatWhile(/[0-7]/);
- return ret("number", "number");
- }
- // Hash symbol
- else {
- stream.eatWhile(/[-a-zA-Z]/);
- return ret("hash", "keyword");
- }
- } else if (stream.match("end")) {
- return ret("end", "keyword");
- }
- for (var name in patterns) {
- if (patterns.hasOwnProperty(name)) {
- var pattern = patterns[name];
- if ((pattern instanceof Array && pattern.some(function(p) {
- return stream.match(p);
- })) || stream.match(pattern))
- return ret(name, patternStyles[name], stream.current());
- }
- }
- if (stream.match("define")) {
- return ret("definition", "def");
- } else {
- stream.eatWhile(/[\w\-]/);
- // Keyword
- if (wordLookup[stream.current()]) {
- return ret(wordLookup[stream.current()], styleLookup[stream.current()], stream.current());
- } else if (stream.current().match(symbol)) {
- return ret("variable", "variable");
- } else {
- stream.next();
- return ret("other", "variable-2");
- }
- }
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false,
- ch;
- while ((ch = stream.next())) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote, type, style) {
- return function(stream, state) {
- var next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote) {
- end = true;
- break;
- }
- }
- if (end)
- state.tokenize = tokenBase;
- return ret(type, style);
- };
- }
-
- // Interface
- return {
- startState: function() {
- return {
- tokenize: tokenBase,
- currentIndent: 0
- };
- },
- token: function(stream, state) {
- if (stream.eatSpace())
- return null;
- var style = state.tokenize(stream, state);
- return style;
- },
- blockCommentStart: "/*",
- blockCommentEnd: "*/"
- };
-});
-
-CodeMirror.defineMIME("text/x-dylan", "dylan");
-
-});
diff --git a/public/js/lib/codemirror/mode/dylan/index.html b/public/js/lib/codemirror/mode/dylan/index.html
deleted file mode 100644
index ddf5ad067d..0000000000
--- a/public/js/lib/codemirror/mode/dylan/index.html
+++ /dev/null
@@ -1,407 +0,0 @@
-
-
-CodeMirror: Dylan mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Dylan mode
-
-
-
-Module: locators-internals
-Synopsis: Abstract modeling of locations
-Author: Andy Armstrong
-Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
- All rights reserved.
-License: See License.txt in this distribution for details.
-Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
-
-define open generic locator-server
- (locator :: ) => (server :: false-or());
-define open generic locator-host
- (locator :: ) => (host :: false-or());
-define open generic locator-volume
- (locator :: ) => (volume :: false-or());
-define open generic locator-directory
- (locator :: ) => (directory :: false-or());
-define open generic locator-relative?
- (locator :: ) => (relative? :: );
-define open generic locator-path
- (locator :: ) => (path :: );
-define open generic locator-base
- (locator :: ) => (base :: false-or());
-define open generic locator-extension
- (locator :: ) => (extension :: false-or());
-
-/// Locator classes
-
-define open abstract class ()
-end class ;
-
-define open abstract class ()
-end class ;
-
-define method as
- (class == , string :: )
- => (locator :: )
- as(, string)
-end method as;
-
-define method make
- (class == ,
- #key server :: false-or() = #f,
- path :: = #[],
- relative? :: = #f,
- name :: false-or() = #f)
- => (locator :: )
- make(,
- server: server,
- path: path,
- relative?: relative?,
- name: name)
-end method make;
-
-define method as
- (class == , string :: )
- => (locator :: )
- as(, string)
-end method as;
-
-define method make
- (class == ,
- #key directory :: false-or() = #f,
- base :: false-or() = #f,
- extension :: false-or() = #f,
- name :: false-or() = #f)
- => (locator :: )
- make(,
- directory: directory,
- base: base,
- extension: extension,
- name: name)
-end method make;
-
-/// Locator coercion
-
-//---*** andrewa: This caching scheme doesn't work yet, so disable it.
-define constant $cache-locators? = #f;
-define constant $cache-locator-strings? = #f;
-
-define constant $locator-to-string-cache = make(, weak: #"key");
-define constant $string-to-locator-cache = make(, weak: #"value");
-
-define open generic locator-as-string
- (class :: subclass(), locator :: )
- => (string :: );
-
-define open generic string-as-locator
- (class :: subclass(), string :: )
- => (locator :: );
-
-define sealed sideways method as
- (class :: subclass(), locator :: )
- => (string :: )
- let string = element($locator-to-string-cache, locator, default: #f);
- if (string)
- as(class, string)
- else
- let string = locator-as-string(class, locator);
- if ($cache-locator-strings?)
- element($locator-to-string-cache, locator) := string;
- else
- string
- end
- end
-end method as;
-
-define sealed sideways method as
- (class :: subclass(), string :: )
- => (locator :: )
- let locator = element($string-to-locator-cache, string, default: #f);
- if (instance?(locator, class))
- locator
- else
- let locator = string-as-locator(class, string);
- if ($cache-locators?)
- element($string-to-locator-cache, string) := locator;
- else
- locator
- end
- end
-end method as;
-
-/// Locator conditions
-
-define class (, )
-end class ;
-
-define function locator-error
- (format-string :: , #rest format-arguments)
- error(make(,
- format-string: format-string,
- format-arguments: format-arguments))
-end function locator-error;
-
-/// Useful locator protocols
-
-define open generic locator-test
- (locator :: ) => (test :: );
-
-define method locator-test
- (locator :: ) => (test :: )
- \=
-end method locator-test;
-
-define open generic locator-might-have-links?
- (locator :: ) => (links? :: );
-
-define method locator-might-have-links?
- (locator :: ) => (links? :: singleton(#f))
- #f
-end method locator-might-have-links?;
-
-define method locator-relative?
- (locator :: ) => (relative? :: )
- let directory = locator.locator-directory;
- ~directory | directory.locator-relative?
-end method locator-relative?;
-
-define method current-directory-locator?
- (locator :: ) => (current-directory? :: )
- locator.locator-relative?
- & locator.locator-path = #[#"self"]
-end method current-directory-locator?;
-
-define method locator-directory
- (locator :: ) => (parent :: false-or())
- let path = locator.locator-path;
- unless (empty?(path))
- make(object-class(locator),
- server: locator.locator-server,
- path: copy-sequence(path, end: path.size - 1),
- relative?: locator.locator-relative?)
- end
-end method locator-directory;
-
-/// Simplify locator
-
-define open generic simplify-locator
- (locator :: )
- => (simplified-locator :: );
-
-define method simplify-locator
- (locator :: )
- => (simplified-locator :: )
- let path = locator.locator-path;
- let relative? = locator.locator-relative?;
- let resolve-parent? = ~locator.locator-might-have-links?;
- let simplified-path
- = simplify-path(path,
- resolve-parent?: resolve-parent?,
- relative?: relative?);
- if (path ~= simplified-path)
- make(object-class(locator),
- server: locator.locator-server,
- path: simplified-path,
- relative?: locator.locator-relative?)
- else
- locator
- end
-end method simplify-locator;
-
-define method simplify-locator
- (locator :: ) => (simplified-locator :: )
- let directory = locator.locator-directory;
- let simplified-directory = directory & simplify-locator(directory);
- if (directory ~= simplified-directory)
- make(object-class(locator),
- directory: simplified-directory,
- base: locator.locator-base,
- extension: locator.locator-extension)
- else
- locator
- end
-end method simplify-locator;
-
-/// Subdirectory locator
-
-define open generic subdirectory-locator
- (locator :: , #rest sub-path)
- => (subdirectory :: );
-
-define method subdirectory-locator
- (locator :: , #rest sub-path)
- => (subdirectory :: )
- let old-path = locator.locator-path;
- let new-path = concatenate-as(, old-path, sub-path);
- make(object-class(locator),
- server: locator.locator-server,
- path: new-path,
- relative?: locator.locator-relative?)
-end method subdirectory-locator;
-
-/// Relative locator
-
-define open generic relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: );
-
-define method relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: )
- let path = locator.locator-path;
- let from-path = from-locator.locator-path;
- case
- ~locator.locator-relative? & from-locator.locator-relative? =>
- locator-error
- ("Cannot find relative path of absolute locator %= from relative locator %=",
- locator, from-locator);
- locator.locator-server ~= from-locator.locator-server =>
- locator;
- path = from-path =>
- make(object-class(locator),
- path: vector(#"self"),
- relative?: #t);
- otherwise =>
- make(object-class(locator),
- path: relative-path(path, from-path, test: locator.locator-test),
- relative?: #t);
- end
-end method relative-locator;
-
-define method relative-locator
- (locator :: , from-directory :: )
- => (relative-locator :: )
- let directory = locator.locator-directory;
- let relative-directory = directory & relative-locator(directory, from-directory);
- if (relative-directory ~= directory)
- simplify-locator
- (make(object-class(locator),
- directory: relative-directory,
- base: locator.locator-base,
- extension: locator.locator-extension))
- else
- locator
- end
-end method relative-locator;
-
-define method relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: )
- let from-directory = from-locator.locator-directory;
- case
- from-directory =>
- relative-locator(locator, from-directory);
- ~locator.locator-relative? =>
- locator-error
- ("Cannot find relative path of absolute locator %= from relative locator %=",
- locator, from-locator);
- otherwise =>
- locator;
- end
-end method relative-locator;
-
-/// Merge locators
-
-define open generic merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: );
-
-/// Merge locators
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- if (locator.locator-relative?)
- let path = concatenate(from-locator.locator-path, locator.locator-path);
- simplify-locator
- (make(object-class(locator),
- server: from-locator.locator-server,
- path: path,
- relative?: from-locator.locator-relative?))
- else
- locator
- end
-end method merge-locators;
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- let directory = locator.locator-directory;
- let merged-directory
- = if (directory)
- merge-locators(directory, from-locator)
- else
- simplify-locator(from-locator)
- end;
- if (merged-directory ~= directory)
- make(object-class(locator),
- directory: merged-directory,
- base: locator.locator-base,
- extension: locator.locator-extension)
- else
- locator
- end
-end method merge-locators;
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- let from-directory = from-locator.locator-directory;
- if (from-directory)
- merge-locators(locator, from-directory)
- else
- locator
- end
-end method merge-locators;
-
-/// Locator protocols
-
-define sideways method supports-open-locator?
- (locator :: ) => (openable? :: )
- ~locator.locator-relative?
-end method supports-open-locator?;
-
-define sideways method open-locator
- (locator :: , #rest keywords, #key, #all-keys)
- => (stream :: )
- apply(open-file-stream, locator, keywords)
-end method open-locator;
-
-
-
-
- MIME types defined: text/x-dylan
.
-
diff --git a/public/js/lib/codemirror/mode/ebnf/ebnf.js b/public/js/lib/codemirror/mode/ebnf/ebnf.js
deleted file mode 100644
index 6b51aba07e..0000000000
--- a/public/js/lib/codemirror/mode/ebnf/ebnf.js
+++ /dev/null
@@ -1,195 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("ebnf", function (config) {
- var commentType = {slash: 0, parenthesis: 1};
- var stateType = {comment: 0, _string: 1, characterClass: 2};
- var bracesMode = null;
-
- if (config.bracesMode)
- bracesMode = CodeMirror.getMode(config, config.bracesMode);
-
- return {
- startState: function () {
- return {
- stringType: null,
- commentType: null,
- braced: 0,
- lhs: true,
- localState: null,
- stack: [],
- inDefinition: false
- };
- },
- token: function (stream, state) {
- if (!stream) return;
-
- //check for state changes
- if (state.stack.length === 0) {
- //strings
- if ((stream.peek() == '"') || (stream.peek() == "'")) {
- state.stringType = stream.peek();
- stream.next(); // Skip quote
- state.stack.unshift(stateType._string);
- } else if (stream.match(/^\/\*/)) { //comments starting with /*
- state.stack.unshift(stateType.comment);
- state.commentType = commentType.slash;
- } else if (stream.match(/^\(\*/)) { //comments starting with (*
- state.stack.unshift(stateType.comment);
- state.commentType = commentType.parenthesis;
- }
- }
-
- //return state
- //stack has
- switch (state.stack[0]) {
- case stateType._string:
- while (state.stack[0] === stateType._string && !stream.eol()) {
- if (stream.peek() === state.stringType) {
- stream.next(); // Skip quote
- state.stack.shift(); // Clear flag
- } else if (stream.peek() === "\\") {
- stream.next();
- stream.next();
- } else {
- stream.match(/^.[^\\\"\']*/);
- }
- }
- return state.lhs ? "property string" : "string"; // Token style
-
- case stateType.comment:
- while (state.stack[0] === stateType.comment && !stream.eol()) {
- if (state.commentType === commentType.slash && stream.match(/\*\//)) {
- state.stack.shift(); // Clear flag
- state.commentType = null;
- } else if (state.commentType === commentType.parenthesis && stream.match(/\*\)/)) {
- state.stack.shift(); // Clear flag
- state.commentType = null;
- } else {
- stream.match(/^.[^\*]*/);
- }
- }
- return "comment";
-
- case stateType.characterClass:
- while (state.stack[0] === stateType.characterClass && !stream.eol()) {
- if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
- state.stack.shift();
- }
- }
- return "operator";
- }
-
- var peek = stream.peek();
-
- if (bracesMode !== null && (state.braced || peek === "{")) {
- if (state.localState === null)
- state.localState = bracesMode.startState();
-
- var token = bracesMode.token(stream, state.localState),
- text = stream.current();
-
- if (!token) {
- for (var i = 0; i < text.length; i++) {
- if (text[i] === "{") {
- if (state.braced === 0) {
- token = "matchingbracket";
- }
- state.braced++;
- } else if (text[i] === "}") {
- state.braced--;
- if (state.braced === 0) {
- token = "matchingbracket";
- }
- }
- }
- }
- return token;
- }
-
- //no stack
- switch (peek) {
- case "[":
- stream.next();
- state.stack.unshift(stateType.characterClass);
- return "bracket";
- case ":":
- case "|":
- case ";":
- stream.next();
- return "operator";
- case "%":
- if (stream.match("%%")) {
- return "header";
- } else if (stream.match(/[%][A-Za-z]+/)) {
- return "keyword";
- } else if (stream.match(/[%][}]/)) {
- return "matchingbracket";
- }
- break;
- case "/":
- if (stream.match(/[\/][A-Za-z]+/)) {
- return "keyword";
- }
- case "\\":
- if (stream.match(/[\][a-z]+/)) {
- return "string-2";
- }
- case ".":
- if (stream.match(".")) {
- return "atom";
- }
- case "*":
- case "-":
- case "+":
- case "^":
- if (stream.match(peek)) {
- return "atom";
- }
- case "$":
- if (stream.match("$$")) {
- return "builtin";
- } else if (stream.match(/[$][0-9]+/)) {
- return "variable-3";
- }
- case "<":
- if (stream.match(/<<[a-zA-Z_]+>>/)) {
- return "builtin";
- }
- }
-
- if (stream.match(/^\/\//)) {
- stream.skipToEnd();
- return "comment";
- } else if (stream.match(/return/)) {
- return "operator";
- } else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {
- if (stream.match(/(?=[\(.])/)) {
- return "variable";
- } else if (stream.match(/(?=[\s\n]*[:=])/)) {
- return "def";
- }
- return "variable-2";
- } else if (["[", "]", "(", ")"].indexOf(stream.peek()) != -1) {
- stream.next();
- return "bracket";
- } else if (!stream.eatSpace()) {
- stream.next();
- }
- return null;
- }
- };
- });
-
- CodeMirror.defineMIME("text/x-ebnf", "ebnf");
-});
diff --git a/public/js/lib/codemirror/mode/ebnf/index.html b/public/js/lib/codemirror/mode/ebnf/index.html
deleted file mode 100644
index 13845629b3..0000000000
--- a/public/js/lib/codemirror/mode/ebnf/index.html
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
- CodeMirror: EBNF Mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- EBNF Mode (bracesMode setting = "javascript")
-
-/* description: Parses end executes mathematical expressions. */
-
-/* lexical grammar */
-%lex
-
-%%
-\s+ /* skip whitespace */
-[0-9]+("."[0-9]+)?\b return 'NUMBER';
-"*" return '*';
-"/" return '/';
-"-" return '-';
-"+" return '+';
-"^" return '^';
-"(" return '(';
-")" return ')';
-"PI" return 'PI';
-"E" return 'E';
-<<EOF>> return 'EOF';
-
-/lex
-
-/* operator associations and precedence */
-
-%left '+' '-'
-%left '*' '/'
-%left '^'
-%left UMINUS
-
-%start expressions
-
-%% /* language grammar */
-
-expressions
-: e EOF
-{print($1); return $1;}
-;
-
-e
-: e '+' e
-{$$ = $1+$3;}
-| e '-' e
-{$$ = $1-$3;}
-| e '*' e
-{$$ = $1*$3;}
-| e '/' e
-{$$ = $1/$3;}
-| e '^' e
-{$$ = Math.pow($1, $3);}
-| '-' e %prec UMINUS
-{$$ = -$2;}
-| '(' e ')'
-{$$ = $2;}
-| NUMBER
-{$$ = Number(yytext);}
-| E
-{$$ = Math.E;}
-| PI
-{$$ = Math.PI;}
-;
-
- The EBNF Mode
- Created by Robert Plummer
-
-
-
diff --git a/public/js/lib/codemirror/mode/ecl/ecl.js b/public/js/lib/codemirror/mode/ecl/ecl.js
deleted file mode 100644
index 18778f1691..0000000000
--- a/public/js/lib/codemirror/mode/ecl/ecl.js
+++ /dev/null
@@ -1,207 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("ecl", function(config) {
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- function metaHook(stream, state) {
- if (!state.startOfLine) return false;
- stream.skipToEnd();
- return "meta";
- }
-
- var indentUnit = config.indentUnit;
- var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode");
- var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait");
- var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath");
- var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode");
- var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when");
- var blockKeywords = words("catch class do else finally for if switch try while");
- var atoms = words("true false null");
- var hooks = {"#": metaHook};
- var multiLineStrings;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var cur = stream.current().toLowerCase();
- if (keyword.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- } else if (variable.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable";
- } else if (variable_2.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable-2";
- } else if (variable_3.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable-3";
- } else if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- } else { //Data types are of from KEYWORD##
- var i = cur.length - 1;
- while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))
- --i;
-
- if (i > 0) {
- var cur2 = cur.substr(0, i + 1);
- if (variable_3.propertyIsEnumerable(cur2)) {
- if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement";
- return "variable-3";
- }
- }
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return null;
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = tokenBase;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return 0;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-ecl", "ecl");
-
-});
diff --git a/public/js/lib/codemirror/mode/ecl/index.html b/public/js/lib/codemirror/mode/ecl/index.html
deleted file mode 100644
index 2306860dcb..0000000000
--- a/public/js/lib/codemirror/mode/ecl/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-CodeMirror: ECL mode
-
-
-
-
-
-
-
-
-
-
-ECL mode
-
-/*
-sample useless code to demonstrate ecl syntax highlighting
-this is a multiline comment!
-*/
-
-// this is a singleline comment!
-
-import ut;
-r :=
- record
- string22 s1 := '123';
- integer4 i1 := 123;
- end;
-#option('tmp', true);
-d := dataset('tmp::qb', r, thor);
-output(d);
-
-
-
- Based on CodeMirror's clike mode. For more information see HPCC Systems web site.
- MIME types defined: text/x-ecl
.
-
-
diff --git a/public/js/lib/codemirror/mode/eiffel/eiffel.js b/public/js/lib/codemirror/mode/eiffel/eiffel.js
deleted file mode 100644
index fcdf295cbc..0000000000
--- a/public/js/lib/codemirror/mode/eiffel/eiffel.js
+++ /dev/null
@@ -1,162 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("eiffel", function() {
- function wordObj(words) {
- var o = {};
- for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
- return o;
- }
- var keywords = wordObj([
- 'note',
- 'across',
- 'when',
- 'variant',
- 'until',
- 'unique',
- 'undefine',
- 'then',
- 'strip',
- 'select',
- 'retry',
- 'rescue',
- 'require',
- 'rename',
- 'reference',
- 'redefine',
- 'prefix',
- 'once',
- 'old',
- 'obsolete',
- 'loop',
- 'local',
- 'like',
- 'is',
- 'inspect',
- 'infix',
- 'include',
- 'if',
- 'frozen',
- 'from',
- 'external',
- 'export',
- 'ensure',
- 'end',
- 'elseif',
- 'else',
- 'do',
- 'creation',
- 'create',
- 'check',
- 'alias',
- 'agent',
- 'separate',
- 'invariant',
- 'inherit',
- 'indexing',
- 'feature',
- 'expanded',
- 'deferred',
- 'class',
- 'Void',
- 'True',
- 'Result',
- 'Precursor',
- 'False',
- 'Current',
- 'create',
- 'attached',
- 'detachable',
- 'as',
- 'and',
- 'implies',
- 'not',
- 'or'
- ]);
- var operators = wordObj([":=", "and then","and", "or","<<",">>"]);
- var curPunc;
-
- function chain(newtok, stream, state) {
- state.tokenize.push(newtok);
- return newtok(stream, state);
- }
-
- function tokenBase(stream, state) {
- curPunc = null;
- if (stream.eatSpace()) return null;
- var ch = stream.next();
- if (ch == '"'||ch == "'") {
- return chain(readQuoted(ch, "string"), stream, state);
- } else if (ch == "-"&&stream.eat("-")) {
- stream.skipToEnd();
- return "comment";
- } else if (ch == ":"&&stream.eat("=")) {
- return "operator";
- } else if (/[0-9]/.test(ch)) {
- stream.eatWhile(/[xXbBCc0-9\.]/);
- stream.eat(/[\?\!]/);
- return "ident";
- } else if (/[a-zA-Z_0-9]/.test(ch)) {
- stream.eatWhile(/[a-zA-Z_0-9]/);
- stream.eat(/[\?\!]/);
- return "ident";
- } else if (/[=+\-\/*^%<>~]/.test(ch)) {
- stream.eatWhile(/[=+\-\/*^%<>~]/);
- return "operator";
- } else {
- return null;
- }
- }
-
- function readQuoted(quote, style, unescaped) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && (unescaped || !escaped)) {
- state.tokenize.pop();
- break;
- }
- escaped = !escaped && ch == "%";
- }
- return style;
- };
- }
-
- return {
- startState: function() {
- return {tokenize: [tokenBase]};
- },
-
- token: function(stream, state) {
- var style = state.tokenize[state.tokenize.length-1](stream, state);
- if (style == "ident") {
- var word = stream.current();
- style = keywords.propertyIsEnumerable(stream.current()) ? "keyword"
- : operators.propertyIsEnumerable(stream.current()) ? "operator"
- : /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag"
- : /^0[bB][0-1]+$/g.test(word) ? "number"
- : /^0[cC][0-7]+$/g.test(word) ? "number"
- : /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number"
- : /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number"
- : /^[0-9]+$/g.test(word) ? "number"
- : "variable";
- }
- return style;
- },
- lineComment: "--"
- };
-});
-
-CodeMirror.defineMIME("text/x-eiffel", "eiffel");
-
-});
diff --git a/public/js/lib/codemirror/mode/eiffel/index.html b/public/js/lib/codemirror/mode/eiffel/index.html
deleted file mode 100644
index 108a71bec8..0000000000
--- a/public/js/lib/codemirror/mode/eiffel/index.html
+++ /dev/null
@@ -1,429 +0,0 @@
-
-
-CodeMirror: Eiffel mode
-
-
-
-
-
-
-
-
-
-
-
-Eiffel mode
-
-note
- description: "[
- Project-wide universal properties.
- This class is an ancestor to all developer-written classes.
- ANY may be customized for individual projects or teams.
- ]"
-
- library: "Free implementation of ELKS library"
- status: "See notice at end of class."
- legal: "See notice at end of class."
- date: "$Date: 2013-01-25 11:49:00 -0800 (Fri, 25 Jan 2013) $"
- revision: "$Revision: 712 $"
-
-class
- ANY
-
-feature -- Customization
-
-feature -- Access
-
- generator: STRING
- -- Name of current object's generating class
- -- (base class of the type of which it is a direct instance)
- external
- "built_in"
- ensure
- generator_not_void: Result /= Void
- generator_not_empty: not Result.is_empty
- end
-
- generating_type: TYPE [detachable like Current]
- -- Type of current object
- -- (type of which it is a direct instance)
- do
- Result := {detachable like Current}
- ensure
- generating_type_not_void: Result /= Void
- end
-
-feature -- Status report
-
- conforms_to (other: ANY): BOOLEAN
- -- Does type of current object conform to type
- -- of `other' (as per Eiffel: The Language, chapter 13)?
- require
- other_not_void: other /= Void
- external
- "built_in"
- end
-
- same_type (other: ANY): BOOLEAN
- -- Is type of current object identical to type of `other'?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- definition: Result = (conforms_to (other) and
- other.conforms_to (Current))
- end
-
-feature -- Comparison
-
- is_equal (other: like Current): BOOLEAN
- -- Is `other' attached to an object considered
- -- equal to current object?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- symmetric: Result implies other ~ Current
- consistent: standard_is_equal (other) implies Result
- end
-
- frozen standard_is_equal (other: like Current): BOOLEAN
- -- Is `other' attached to an object of the same type
- -- as current object, and field-by-field identical to it?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- same_type: Result implies same_type (other)
- symmetric: Result implies other.standard_is_equal (Current)
- end
-
- frozen equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void or attached
- -- to objects considered equal?
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then
- a.is_equal (b)
- end
- ensure
- definition: Result = (a = Void and b = Void) or else
- ((a /= Void and b /= Void) and then
- a.is_equal (b))
- end
-
- frozen standard_equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void or attached to
- -- field-by-field identical objects of the same type?
- -- Always uses default object comparison criterion.
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then
- a.standard_is_equal (b)
- end
- ensure
- definition: Result = (a = Void and b = Void) or else
- ((a /= Void and b /= Void) and then
- a.standard_is_equal (b))
- end
-
- frozen is_deep_equal (other: like Current): BOOLEAN
- -- Are `Current' and `other' attached to isomorphic object structures?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- shallow_implies_deep: standard_is_equal (other) implies Result
- same_type: Result implies same_type (other)
- symmetric: Result implies other.is_deep_equal (Current)
- end
-
- frozen deep_equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void
- -- or attached to isomorphic object structures?
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then a.is_deep_equal (b)
- end
- ensure
- shallow_implies_deep: standard_equal (a, b) implies Result
- both_or_none_void: (a = Void) implies (Result = (b = Void))
- same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b))
- symmetric: Result implies deep_equal (b, a)
- end
-
-feature -- Duplication
-
- frozen twin: like Current
- -- New object equal to `Current'
- -- `twin' calls `copy'; to change copying/twinning semantics, redefine `copy'.
- external
- "built_in"
- ensure
- twin_not_void: Result /= Void
- is_equal: Result ~ Current
- end
-
- copy (other: like Current)
- -- Update current object using fields of object attached
- -- to `other', so as to yield equal objects.
- require
- other_not_void: other /= Void
- type_identity: same_type (other)
- external
- "built_in"
- ensure
- is_equal: Current ~ other
- end
-
- frozen standard_copy (other: like Current)
- -- Copy every field of `other' onto corresponding field
- -- of current object.
- require
- other_not_void: other /= Void
- type_identity: same_type (other)
- external
- "built_in"
- ensure
- is_standard_equal: standard_is_equal (other)
- end
-
- frozen clone (other: detachable ANY): like other
- -- Void if `other' is void; otherwise new object
- -- equal to `other'
- --
- -- For non-void `other', `clone' calls `copy';
- -- to change copying/cloning semantics, redefine `copy'.
- obsolete
- "Use `twin' instead."
- do
- if other /= Void then
- Result := other.twin
- end
- ensure
- equal: Result ~ other
- end
-
- frozen standard_clone (other: detachable ANY): like other
- -- Void if `other' is void; otherwise new object
- -- field-by-field identical to `other'.
- -- Always uses default copying semantics.
- obsolete
- "Use `standard_twin' instead."
- do
- if other /= Void then
- Result := other.standard_twin
- end
- ensure
- equal: standard_equal (Result, other)
- end
-
- frozen standard_twin: like Current
- -- New object field-by-field identical to `other'.
- -- Always uses default copying semantics.
- external
- "built_in"
- ensure
- standard_twin_not_void: Result /= Void
- equal: standard_equal (Result, Current)
- end
-
- frozen deep_twin: like Current
- -- New object structure recursively duplicated from Current.
- external
- "built_in"
- ensure
- deep_twin_not_void: Result /= Void
- deep_equal: deep_equal (Current, Result)
- end
-
- frozen deep_clone (other: detachable ANY): like other
- -- Void if `other' is void: otherwise, new object structure
- -- recursively duplicated from the one attached to `other'
- obsolete
- "Use `deep_twin' instead."
- do
- if other /= Void then
- Result := other.deep_twin
- end
- ensure
- deep_equal: deep_equal (other, Result)
- end
-
- frozen deep_copy (other: like Current)
- -- Effect equivalent to that of:
- -- `copy' (`other' . `deep_twin')
- require
- other_not_void: other /= Void
- do
- copy (other.deep_twin)
- ensure
- deep_equal: deep_equal (Current, other)
- end
-
-feature {NONE} -- Retrieval
-
- frozen internal_correct_mismatch
- -- Called from runtime to perform a proper dynamic dispatch on `correct_mismatch'
- -- from MISMATCH_CORRECTOR.
- local
- l_msg: STRING
- l_exc: EXCEPTIONS
- do
- if attached {MISMATCH_CORRECTOR} Current as l_corrector then
- l_corrector.correct_mismatch
- else
- create l_msg.make_from_string ("Mismatch: ")
- create l_exc
- l_msg.append (generating_type.name)
- l_exc.raise_retrieval_exception (l_msg)
- end
- end
-
-feature -- Output
-
- io: STD_FILES
- -- Handle to standard file setup
- once
- create Result
- Result.set_output_default
- ensure
- io_not_void: Result /= Void
- end
-
- out: STRING
- -- New string containing terse printable representation
- -- of current object
- do
- Result := tagged_out
- ensure
- out_not_void: Result /= Void
- end
-
- frozen tagged_out: STRING
- -- New string containing terse printable representation
- -- of current object
- external
- "built_in"
- ensure
- tagged_out_not_void: Result /= Void
- end
-
- print (o: detachable ANY)
- -- Write terse external representation of `o'
- -- on standard output.
- do
- if o /= Void then
- io.put_string (o.out)
- end
- end
-
-feature -- Platform
-
- Operating_environment: OPERATING_ENVIRONMENT
- -- Objects available from the operating system
- once
- create Result
- ensure
- operating_environment_not_void: Result /= Void
- end
-
-feature {NONE} -- Initialization
-
- default_create
- -- Process instances of classes with no creation clause.
- -- (Default: do nothing.)
- do
- end
-
-feature -- Basic operations
-
- default_rescue
- -- Process exception for routines with no Rescue clause.
- -- (Default: do nothing.)
- do
- end
-
- frozen do_nothing
- -- Execute a null action.
- do
- end
-
- frozen default: detachable like Current
- -- Default value of object's type
- do
- end
-
- frozen default_pointer: POINTER
- -- Default value of type `POINTER'
- -- (Avoid the need to write `p'.`default' for
- -- some `p' of type `POINTER'.)
- do
- ensure
- -- Result = Result.default
- end
-
- frozen as_attached: attached like Current
- -- Attached version of Current
- -- (Can be used during transitional period to convert
- -- non-void-safe classes to void-safe ones.)
- do
- Result := Current
- end
-
-invariant
- reflexive_equality: standard_is_equal (Current)
- reflexive_conformance: conforms_to (Current)
-
-note
- copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
- license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
- source: "[
- Eiffel Software
- 5949 Hollister Ave., Goleta, CA 93117 USA
- Telephone 805-685-1006, Fax 805-685-6869
- Website http://www.eiffel.com
- Customer support http://support.eiffel.com
- ]"
-
-end
-
-
-
-
- MIME types defined: text/x-eiffel
.
-
- Created by YNH .
-
diff --git a/public/js/lib/codemirror/mode/erlang/erlang.js b/public/js/lib/codemirror/mode/erlang/erlang.js
deleted file mode 100644
index fbca292f03..0000000000
--- a/public/js/lib/codemirror/mode/erlang/erlang.js
+++ /dev/null
@@ -1,622 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*jshint unused:true, eqnull:true, curly:true, bitwise:true */
-/*jshint undef:true, latedef:true, trailing:true */
-/*global CodeMirror:true */
-
-// erlang mode.
-// tokenizer -> token types -> CodeMirror styles
-// tokenizer maintains a parse stack
-// indenter uses the parse stack
-
-// TODO indenter:
-// bit syntax
-// old guard/bif/conversion clashes (e.g. "float/1")
-// type/spec/opaque
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMIME("text/x-erlang", "erlang");
-
-CodeMirror.defineMode("erlang", function(cmCfg) {
- "use strict";
-
-/////////////////////////////////////////////////////////////////////////////
-// constants
-
- var typeWords = [
- "-type", "-spec", "-export_type", "-opaque"];
-
- var keywordWords = [
- "after","begin","catch","case","cond","end","fun","if",
- "let","of","query","receive","try","when"];
-
- var separatorRE = /[\->,;]/;
- var separatorWords = [
- "->",";",","];
-
- var operatorAtomWords = [
- "and","andalso","band","bnot","bor","bsl","bsr","bxor",
- "div","not","or","orelse","rem","xor"];
-
- var operatorSymbolRE = /[\+\-\*\/<>=\|:!]/;
- var operatorSymbolWords = [
- "=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"];
-
- var openParenRE = /[<\(\[\{]/;
- var openParenWords = [
- "<<","(","[","{"];
-
- var closeParenRE = /[>\)\]\}]/;
- var closeParenWords = [
- "}","]",")",">>"];
-
- var guardWords = [
- "is_atom","is_binary","is_bitstring","is_boolean","is_float",
- "is_function","is_integer","is_list","is_number","is_pid",
- "is_port","is_record","is_reference","is_tuple",
- "atom","binary","bitstring","boolean","function","integer","list",
- "number","pid","port","record","reference","tuple"];
-
- var bifWords = [
- "abs","adler32","adler32_combine","alive","apply","atom_to_binary",
- "atom_to_list","binary_to_atom","binary_to_existing_atom",
- "binary_to_list","binary_to_term","bit_size","bitstring_to_list",
- "byte_size","check_process_code","contact_binary","crc32",
- "crc32_combine","date","decode_packet","delete_module",
- "disconnect_node","element","erase","exit","float","float_to_list",
- "garbage_collect","get","get_keys","group_leader","halt","hd",
- "integer_to_list","internal_bif","iolist_size","iolist_to_binary",
- "is_alive","is_atom","is_binary","is_bitstring","is_boolean",
- "is_float","is_function","is_integer","is_list","is_number","is_pid",
- "is_port","is_process_alive","is_record","is_reference","is_tuple",
- "length","link","list_to_atom","list_to_binary","list_to_bitstring",
- "list_to_existing_atom","list_to_float","list_to_integer",
- "list_to_pid","list_to_tuple","load_module","make_ref","module_loaded",
- "monitor_node","node","node_link","node_unlink","nodes","notalive",
- "now","open_port","pid_to_list","port_close","port_command",
- "port_connect","port_control","pre_loaded","process_flag",
- "process_info","processes","purge_module","put","register",
- "registered","round","self","setelement","size","spawn","spawn_link",
- "spawn_monitor","spawn_opt","split_binary","statistics",
- "term_to_binary","time","throw","tl","trunc","tuple_size",
- "tuple_to_list","unlink","unregister","whereis"];
-
-// upper case: [A-Z] [Ø-Þ] [À-Ö]
-// lower case: [a-z] [ß-ö] [ø-ÿ]
- var anumRE = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/;
- var escapesRE =
- /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;
-
-/////////////////////////////////////////////////////////////////////////////
-// tokenizer
-
- function tokenizer(stream,state) {
- // in multi-line string
- if (state.in_string) {
- state.in_string = (!doubleQuote(stream));
- return rval(state,stream,"string");
- }
-
- // in multi-line atom
- if (state.in_atom) {
- state.in_atom = (!singleQuote(stream));
- return rval(state,stream,"atom");
- }
-
- // whitespace
- if (stream.eatSpace()) {
- return rval(state,stream,"whitespace");
- }
-
- // attributes and type specs
- if (!peekToken(state) &&
- stream.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)) {
- if (is_member(stream.current(),typeWords)) {
- return rval(state,stream,"type");
- }else{
- return rval(state,stream,"attribute");
- }
- }
-
- var ch = stream.next();
-
- // comment
- if (ch == '%') {
- stream.skipToEnd();
- return rval(state,stream,"comment");
- }
-
- // colon
- if (ch == ":") {
- return rval(state,stream,"colon");
- }
-
- // macro
- if (ch == '?') {
- stream.eatSpace();
- stream.eatWhile(anumRE);
- return rval(state,stream,"macro");
- }
-
- // record
- if (ch == "#") {
- stream.eatSpace();
- stream.eatWhile(anumRE);
- return rval(state,stream,"record");
- }
-
- // dollar escape
- if (ch == "$") {
- if (stream.next() == "\\" && !stream.match(escapesRE)) {
- return rval(state,stream,"error");
- }
- return rval(state,stream,"number");
- }
-
- // dot
- if (ch == ".") {
- return rval(state,stream,"dot");
- }
-
- // quoted atom
- if (ch == '\'') {
- if (!(state.in_atom = (!singleQuote(stream)))) {
- if (stream.match(/\s*\/\s*[0-9]/,false)) {
- stream.match(/\s*\/\s*[0-9]/,true);
- return rval(state,stream,"fun"); // 'f'/0 style fun
- }
- if (stream.match(/\s*\(/,false) || stream.match(/\s*:/,false)) {
- return rval(state,stream,"function");
- }
- }
- return rval(state,stream,"atom");
- }
-
- // string
- if (ch == '"') {
- state.in_string = (!doubleQuote(stream));
- return rval(state,stream,"string");
- }
-
- // variable
- if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) {
- stream.eatWhile(anumRE);
- return rval(state,stream,"variable");
- }
-
- // atom/keyword/BIF/function
- if (/[a-z_ß-öø-ÿ]/.test(ch)) {
- stream.eatWhile(anumRE);
-
- if (stream.match(/\s*\/\s*[0-9]/,false)) {
- stream.match(/\s*\/\s*[0-9]/,true);
- return rval(state,stream,"fun"); // f/0 style fun
- }
-
- var w = stream.current();
-
- if (is_member(w,keywordWords)) {
- return rval(state,stream,"keyword");
- }else if (is_member(w,operatorAtomWords)) {
- return rval(state,stream,"operator");
- }else if (stream.match(/\s*\(/,false)) {
- // 'put' and 'erlang:put' are bifs, 'foo:put' is not
- if (is_member(w,bifWords) &&
- ((peekToken(state).token != ":") ||
- (peekToken(state,2).token == "erlang"))) {
- return rval(state,stream,"builtin");
- }else if (is_member(w,guardWords)) {
- return rval(state,stream,"guard");
- }else{
- return rval(state,stream,"function");
- }
- }else if (is_member(w,operatorAtomWords)) {
- return rval(state,stream,"operator");
- }else if (lookahead(stream) == ":") {
- if (w == "erlang") {
- return rval(state,stream,"builtin");
- } else {
- return rval(state,stream,"function");
- }
- }else if (is_member(w,["true","false"])) {
- return rval(state,stream,"boolean");
- }else if (is_member(w,["true","false"])) {
- return rval(state,stream,"boolean");
- }else{
- return rval(state,stream,"atom");
- }
- }
-
- // number
- var digitRE = /[0-9]/;
- var radixRE = /[0-9a-zA-Z]/; // 36#zZ style int
- if (digitRE.test(ch)) {
- stream.eatWhile(digitRE);
- if (stream.eat('#')) { // 36#aZ style integer
- if (!stream.eatWhile(radixRE)) {
- stream.backUp(1); //"36#" - syntax error
- }
- } else if (stream.eat('.')) { // float
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(1); // "3." - probably end of function
- } else {
- if (stream.eat(/[eE]/)) { // float with exponent
- if (stream.eat(/[-+]/)) {
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(2); // "2e-" - syntax error
- }
- } else {
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(1); // "2e" - syntax error
- }
- }
- }
- }
- }
- return rval(state,stream,"number"); // normal integer
- }
-
- // open parens
- if (nongreedy(stream,openParenRE,openParenWords)) {
- return rval(state,stream,"open_paren");
- }
-
- // close parens
- if (nongreedy(stream,closeParenRE,closeParenWords)) {
- return rval(state,stream,"close_paren");
- }
-
- // separators
- if (greedy(stream,separatorRE,separatorWords)) {
- return rval(state,stream,"separator");
- }
-
- // operators
- if (greedy(stream,operatorSymbolRE,operatorSymbolWords)) {
- return rval(state,stream,"operator");
- }
-
- return rval(state,stream,null);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// utilities
- function nongreedy(stream,re,words) {
- if (stream.current().length == 1 && re.test(stream.current())) {
- stream.backUp(1);
- while (re.test(stream.peek())) {
- stream.next();
- if (is_member(stream.current(),words)) {
- return true;
- }
- }
- stream.backUp(stream.current().length-1);
- }
- return false;
- }
-
- function greedy(stream,re,words) {
- if (stream.current().length == 1 && re.test(stream.current())) {
- while (re.test(stream.peek())) {
- stream.next();
- }
- while (0 < stream.current().length) {
- if (is_member(stream.current(),words)) {
- return true;
- }else{
- stream.backUp(1);
- }
- }
- stream.next();
- }
- return false;
- }
-
- function doubleQuote(stream) {
- return quote(stream, '"', '\\');
- }
-
- function singleQuote(stream) {
- return quote(stream,'\'','\\');
- }
-
- function quote(stream,quoteChar,escapeChar) {
- while (!stream.eol()) {
- var ch = stream.next();
- if (ch == quoteChar) {
- return true;
- }else if (ch == escapeChar) {
- stream.next();
- }
- }
- return false;
- }
-
- function lookahead(stream) {
- var m = stream.match(/([\n\s]+|%[^\n]*\n)*(.)/,false);
- return m ? m.pop() : "";
- }
-
- function is_member(element,list) {
- return (-1 < list.indexOf(element));
- }
-
- function rval(state,stream,type) {
-
- // parse stack
- pushToken(state,realToken(type,stream));
-
- // map erlang token type to CodeMirror style class
- // erlang -> CodeMirror tag
- switch (type) {
- case "atom": return "atom";
- case "attribute": return "attribute";
- case "boolean": return "atom";
- case "builtin": return "builtin";
- case "close_paren": return null;
- case "colon": return null;
- case "comment": return "comment";
- case "dot": return null;
- case "error": return "error";
- case "fun": return "meta";
- case "function": return "tag";
- case "guard": return "property";
- case "keyword": return "keyword";
- case "macro": return "variable-2";
- case "number": return "number";
- case "open_paren": return null;
- case "operator": return "operator";
- case "record": return "bracket";
- case "separator": return null;
- case "string": return "string";
- case "type": return "def";
- case "variable": return "variable";
- default: return null;
- }
- }
-
- function aToken(tok,col,ind,typ) {
- return {token: tok,
- column: col,
- indent: ind,
- type: typ};
- }
-
- function realToken(type,stream) {
- return aToken(stream.current(),
- stream.column(),
- stream.indentation(),
- type);
- }
-
- function fakeToken(type) {
- return aToken(type,0,0,type);
- }
-
- function peekToken(state,depth) {
- var len = state.tokenStack.length;
- var dep = (depth ? depth : 1);
-
- if (len < dep) {
- return false;
- }else{
- return state.tokenStack[len-dep];
- }
- }
-
- function pushToken(state,token) {
-
- if (!(token.type == "comment" || token.type == "whitespace")) {
- state.tokenStack = maybe_drop_pre(state.tokenStack,token);
- state.tokenStack = maybe_drop_post(state.tokenStack);
- }
- }
-
- function maybe_drop_pre(s,token) {
- var last = s.length-1;
-
- if (0 < last && s[last].type === "record" && token.type === "dot") {
- s.pop();
- }else if (0 < last && s[last].type === "group") {
- s.pop();
- s.push(token);
- }else{
- s.push(token);
- }
- return s;
- }
-
- function maybe_drop_post(s) {
- var last = s.length-1;
-
- if (s[last].type === "dot") {
- return [];
- }
- if (s[last].type === "fun" && s[last-1].token === "fun") {
- return s.slice(0,last-1);
- }
- switch (s[s.length-1].token) {
- case "}": return d(s,{g:["{"]});
- case "]": return d(s,{i:["["]});
- case ")": return d(s,{i:["("]});
- case ">>": return d(s,{i:["<<"]});
- case "end": return d(s,{i:["begin","case","fun","if","receive","try"]});
- case ",": return d(s,{e:["begin","try","when","->",
- ",","(","[","{","<<"]});
- case "->": return d(s,{r:["when"],
- m:["try","if","case","receive"]});
- case ";": return d(s,{E:["case","fun","if","receive","try","when"]});
- case "catch":return d(s,{e:["try"]});
- case "of": return d(s,{e:["case"]});
- case "after":return d(s,{e:["receive","try"]});
- default: return s;
- }
- }
-
- function d(stack,tt) {
- // stack is a stack of Token objects.
- // tt is an object; {type:tokens}
- // type is a char, tokens is a list of token strings.
- // The function returns (possibly truncated) stack.
- // It will descend the stack, looking for a Token such that Token.token
- // is a member of tokens. If it does not find that, it will normally (but
- // see "E" below) return stack. If it does find a match, it will remove
- // all the Tokens between the top and the matched Token.
- // If type is "m", that is all it does.
- // If type is "i", it will also remove the matched Token and the top Token.
- // If type is "g", like "i", but add a fake "group" token at the top.
- // If type is "r", it will remove the matched Token, but not the top Token.
- // If type is "e", it will keep the matched Token but not the top Token.
- // If type is "E", it behaves as for type "e", except if there is no match,
- // in which case it will return an empty stack.
-
- for (var type in tt) {
- var len = stack.length-1;
- var tokens = tt[type];
- for (var i = len-1; -1 < i ; i--) {
- if (is_member(stack[i].token,tokens)) {
- var ss = stack.slice(0,i);
- switch (type) {
- case "m": return ss.concat(stack[i]).concat(stack[len]);
- case "r": return ss.concat(stack[len]);
- case "i": return ss;
- case "g": return ss.concat(fakeToken("group"));
- case "E": return ss.concat(stack[i]);
- case "e": return ss.concat(stack[i]);
- }
- }
- }
- }
- return (type == "E" ? [] : stack);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// indenter
-
- function indenter(state,textAfter) {
- var t;
- var unit = cmCfg.indentUnit;
- var wordAfter = wordafter(textAfter);
- var currT = peekToken(state,1);
- var prevT = peekToken(state,2);
-
- if (state.in_string || state.in_atom) {
- return CodeMirror.Pass;
- }else if (!prevT) {
- return 0;
- }else if (currT.token == "when") {
- return currT.column+unit;
- }else if (wordAfter === "when" && prevT.type === "function") {
- return prevT.indent+unit;
- }else if (wordAfter === "(" && currT.token === "fun") {
- return currT.column+3;
- }else if (wordAfter === "catch" && (t = getToken(state,["try"]))) {
- return t.column;
- }else if (is_member(wordAfter,["end","after","of"])) {
- t = getToken(state,["begin","case","fun","if","receive","try"]);
- return t ? t.column : CodeMirror.Pass;
- }else if (is_member(wordAfter,closeParenWords)) {
- t = getToken(state,openParenWords);
- return t ? t.column : CodeMirror.Pass;
- }else if (is_member(currT.token,[",","|","||"]) ||
- is_member(wordAfter,[",","|","||"])) {
- t = postcommaToken(state);
- return t ? t.column+t.token.length : unit;
- }else if (currT.token == "->") {
- if (is_member(prevT.token, ["receive","case","if","try"])) {
- return prevT.column+unit+unit;
- }else{
- return prevT.column+unit;
- }
- }else if (is_member(currT.token,openParenWords)) {
- return currT.column+currT.token.length;
- }else{
- t = defaultToken(state);
- return truthy(t) ? t.column+unit : 0;
- }
- }
-
- function wordafter(str) {
- var m = str.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);
-
- return truthy(m) && (m.index === 0) ? m[0] : "";
- }
-
- function postcommaToken(state) {
- var objs = state.tokenStack.slice(0,-1);
- var i = getTokenIndex(objs,"type",["open_paren"]);
-
- return truthy(objs[i]) ? objs[i] : false;
- }
-
- function defaultToken(state) {
- var objs = state.tokenStack;
- var stop = getTokenIndex(objs,"type",["open_paren","separator","keyword"]);
- var oper = getTokenIndex(objs,"type",["operator"]);
-
- if (truthy(stop) && truthy(oper) && stop < oper) {
- return objs[stop+1];
- } else if (truthy(stop)) {
- return objs[stop];
- } else {
- return false;
- }
- }
-
- function getToken(state,tokens) {
- var objs = state.tokenStack;
- var i = getTokenIndex(objs,"token",tokens);
-
- return truthy(objs[i]) ? objs[i] : false;
- }
-
- function getTokenIndex(objs,propname,propvals) {
-
- for (var i = objs.length-1; -1 < i ; i--) {
- if (is_member(objs[i][propname],propvals)) {
- return i;
- }
- }
- return false;
- }
-
- function truthy(x) {
- return (x !== false) && (x != null);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// this object defines the mode
-
- return {
- startState:
- function() {
- return {tokenStack: [],
- in_string: false,
- in_atom: false};
- },
-
- token:
- function(stream, state) {
- return tokenizer(stream, state);
- },
-
- indent:
- function(state, textAfter) {
- return indenter(state,textAfter);
- },
-
- lineComment: "%"
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/erlang/index.html b/public/js/lib/codemirror/mode/erlang/index.html
deleted file mode 100644
index 6d06a890a2..0000000000
--- a/public/js/lib/codemirror/mode/erlang/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-CodeMirror: Erlang mode
-
-
-
-
-
-
-
-
-
-
-
-
-Erlang mode
-
-%% -*- mode: erlang; erlang-indent-level: 2 -*-
-%%% Created : 7 May 2012 by mats cronqvist
-
-%% @doc
-%% Demonstrates how to print a record.
-%% @end
-
--module('ex').
--author('mats cronqvist').
--export([demo/0,
- rec_info/1]).
-
--record(demo,{a="One",b="Two",c="Three",d="Four"}).
-
-rec_info(demo) -> record_info(fields,demo).
-
-demo() -> expand_recs(?MODULE,#demo{a="A",b="BB"}).
-
-expand_recs(M,List) when is_list(List) ->
- [expand_recs(M,L)||L<-List];
-expand_recs(M,Tup) when is_tuple(Tup) ->
- case tuple_size(Tup) of
- L when L < 1 -> Tup;
- L ->
- try
- Fields = M:rec_info(element(1,Tup)),
- L = length(Fields)+1,
- lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))
- catch
- _:_ -> list_to_tuple(expand_recs(M,tuple_to_list(Tup)))
- end
- end;
-expand_recs(_,Term) ->
- Term.
-
-
-
-
- MIME types defined: text/x-erlang
.
-
diff --git a/public/js/lib/codemirror/mode/fortran/fortran.js b/public/js/lib/codemirror/mode/fortran/fortran.js
deleted file mode 100644
index 4d88f006aa..0000000000
--- a/public/js/lib/codemirror/mode/fortran/fortran.js
+++ /dev/null
@@ -1,188 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("fortran", function() {
- function words(array) {
- var keys = {};
- for (var i = 0; i < array.length; ++i) {
- keys[array[i]] = true;
- }
- return keys;
- }
-
- var keywords = words([
- "abstract", "accept", "allocatable", "allocate",
- "array", "assign", "asynchronous", "backspace",
- "bind", "block", "byte", "call", "case",
- "class", "close", "common", "contains",
- "continue", "cycle", "data", "deallocate",
- "decode", "deferred", "dimension", "do",
- "elemental", "else", "encode", "end",
- "endif", "entry", "enumerator", "equivalence",
- "exit", "external", "extrinsic", "final",
- "forall", "format", "function", "generic",
- "go", "goto", "if", "implicit", "import", "include",
- "inquire", "intent", "interface", "intrinsic",
- "module", "namelist", "non_intrinsic",
- "non_overridable", "none", "nopass",
- "nullify", "open", "optional", "options",
- "parameter", "pass", "pause", "pointer",
- "print", "private", "program", "protected",
- "public", "pure", "read", "recursive", "result",
- "return", "rewind", "save", "select", "sequence",
- "stop", "subroutine", "target", "then", "to", "type",
- "use", "value", "volatile", "where", "while",
- "write"]);
- var builtins = words(["abort", "abs", "access", "achar", "acos",
- "adjustl", "adjustr", "aimag", "aint", "alarm",
- "all", "allocated", "alog", "amax", "amin",
- "amod", "and", "anint", "any", "asin",
- "associated", "atan", "besj", "besjn", "besy",
- "besyn", "bit_size", "btest", "cabs", "ccos",
- "ceiling", "cexp", "char", "chdir", "chmod",
- "clog", "cmplx", "command_argument_count",
- "complex", "conjg", "cos", "cosh", "count",
- "cpu_time", "cshift", "csin", "csqrt", "ctime",
- "c_funloc", "c_loc", "c_associated", "c_null_ptr",
- "c_null_funptr", "c_f_pointer", "c_null_char",
- "c_alert", "c_backspace", "c_form_feed",
- "c_new_line", "c_carriage_return",
- "c_horizontal_tab", "c_vertical_tab", "dabs",
- "dacos", "dasin", "datan", "date_and_time",
- "dbesj", "dbesj", "dbesjn", "dbesy", "dbesy",
- "dbesyn", "dble", "dcos", "dcosh", "ddim", "derf",
- "derfc", "dexp", "digits", "dim", "dint", "dlog",
- "dlog", "dmax", "dmin", "dmod", "dnint",
- "dot_product", "dprod", "dsign", "dsinh",
- "dsin", "dsqrt", "dtanh", "dtan", "dtime",
- "eoshift", "epsilon", "erf", "erfc", "etime",
- "exit", "exp", "exponent", "extends_type_of",
- "fdate", "fget", "fgetc", "float", "floor",
- "flush", "fnum", "fputc", "fput", "fraction",
- "fseek", "fstat", "ftell", "gerror", "getarg",
- "get_command", "get_command_argument",
- "get_environment_variable", "getcwd",
- "getenv", "getgid", "getlog", "getpid",
- "getuid", "gmtime", "hostnm", "huge", "iabs",
- "iachar", "iand", "iargc", "ibclr", "ibits",
- "ibset", "ichar", "idate", "idim", "idint",
- "idnint", "ieor", "ierrno", "ifix", "imag",
- "imagpart", "index", "int", "ior", "irand",
- "isatty", "ishft", "ishftc", "isign",
- "iso_c_binding", "is_iostat_end", "is_iostat_eor",
- "itime", "kill", "kind", "lbound", "len", "len_trim",
- "lge", "lgt", "link", "lle", "llt", "lnblnk", "loc",
- "log", "logical", "long", "lshift", "lstat", "ltime",
- "matmul", "max", "maxexponent", "maxloc", "maxval",
- "mclock", "merge", "move_alloc", "min", "minexponent",
- "minloc", "minval", "mod", "modulo", "mvbits",
- "nearest", "new_line", "nint", "not", "or", "pack",
- "perror", "precision", "present", "product", "radix",
- "rand", "random_number", "random_seed", "range",
- "real", "realpart", "rename", "repeat", "reshape",
- "rrspacing", "rshift", "same_type_as", "scale",
- "scan", "second", "selected_int_kind",
- "selected_real_kind", "set_exponent", "shape",
- "short", "sign", "signal", "sinh", "sin", "sleep",
- "sngl", "spacing", "spread", "sqrt", "srand", "stat",
- "sum", "symlnk", "system", "system_clock", "tan",
- "tanh", "time", "tiny", "transfer", "transpose",
- "trim", "ttynam", "ubound", "umask", "unlink",
- "unpack", "verify", "xor", "zabs", "zcos", "zexp",
- "zlog", "zsin", "zsqrt"]);
-
- var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex",
- "c_float", "c_float_complex", "c_funptr", "c_int",
- "c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t",
- "c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t",
- "c_int_fast8_t", "c_int_least16_t", "c_int_least32_t",
- "c_int_least64_t", "c_int_least8_t", "c_intmax_t",
- "c_intptr_t", "c_long", "c_long_double",
- "c_long_double_complex", "c_long_long", "c_ptr",
- "c_short", "c_signed_char", "c_size_t", "character",
- "complex", "double", "integer", "logical", "real"]);
- var isOperatorChar = /[+\-*&=<>\/\:]/;
- var litOperator = new RegExp("(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)", "i");
-
- function tokenBase(stream, state) {
-
- if (stream.match(litOperator)){
- return 'operator';
- }
-
- var ch = stream.next();
- if (ch == "!") {
- stream.skipToEnd();
- return "comment";
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]\(\),]/.test(ch)) {
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var word = stream.current().toLowerCase();
-
- if (keywords.hasOwnProperty(word)){
- return 'keyword';
- }
- if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) {
- return 'builtin';
- }
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- end = true;
- break;
- }
- escaped = !escaped && next == "\\";
- }
- if (end || !escaped) state.tokenize = null;
- return "string";
- };
- }
-
- // Interface
-
- return {
- startState: function() {
- return {tokenize: null};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- return style;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-fortran", "fortran");
-
-});
diff --git a/public/js/lib/codemirror/mode/fortran/index.html b/public/js/lib/codemirror/mode/fortran/index.html
deleted file mode 100644
index 102e8f8269..0000000000
--- a/public/js/lib/codemirror/mode/fortran/index.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-CodeMirror: Fortran mode
-
-
-
-
-
-
-
-
-
-
-Fortran mode
-
-
-
-! Example Fortran code
- program average
-
- ! Read in some numbers and take the average
- ! As written, if there are no data points, an average of zero is returned
- ! While this may not be desired behavior, it keeps this example simple
-
- implicit none
-
- real, dimension(:), allocatable :: points
- integer :: number_of_points
- real :: average_points=0., positive_average=0., negative_average=0.
-
- write (*,*) "Input number of points to average:"
- read (*,*) number_of_points
-
- allocate (points(number_of_points))
-
- write (*,*) "Enter the points to average:"
- read (*,*) points
-
- ! Take the average by summing points and dividing by number_of_points
- if (number_of_points > 0) average_points = sum(points) / number_of_points
-
- ! Now form average over positive and negative points only
- if (count(points > 0.) > 0) then
- positive_average = sum(points, points > 0.) / count(points > 0.)
- end if
-
- if (count(points < 0.) > 0) then
- negative_average = sum(points, points < 0.) / count(points < 0.)
- end if
-
- deallocate (points)
-
- ! Print result to terminal
- write (*,'(a,g12.4)') 'Average = ', average_points
- write (*,'(a,g12.4)') 'Average of positive points = ', positive_average
- write (*,'(a,g12.4)') 'Average of negative points = ', negative_average
-
- end program average
-
-
-
-
- MIME types defined: text/x-Fortran
.
-
diff --git a/public/js/lib/codemirror/mode/gas/gas.js b/public/js/lib/codemirror/mode/gas/gas.js
deleted file mode 100644
index 0c74bedc57..0000000000
--- a/public/js/lib/codemirror/mode/gas/gas.js
+++ /dev/null
@@ -1,345 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gas", function(_config, parserConfig) {
- 'use strict';
-
- // If an architecture is specified, its initialization function may
- // populate this array with custom parsing functions which will be
- // tried in the event that the standard functions do not find a match.
- var custom = [];
-
- // The symbol used to start a line comment changes based on the target
- // architecture.
- // If no architecture is pased in "parserConfig" then only multiline
- // comments will have syntax support.
- var lineCommentStartSymbol = "";
-
- // These directives are architecture independent.
- // Machine specific directives should go in their respective
- // architecture initialization function.
- // Reference:
- // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops
- var directives = {
- ".abort" : "builtin",
- ".align" : "builtin",
- ".altmacro" : "builtin",
- ".ascii" : "builtin",
- ".asciz" : "builtin",
- ".balign" : "builtin",
- ".balignw" : "builtin",
- ".balignl" : "builtin",
- ".bundle_align_mode" : "builtin",
- ".bundle_lock" : "builtin",
- ".bundle_unlock" : "builtin",
- ".byte" : "builtin",
- ".cfi_startproc" : "builtin",
- ".comm" : "builtin",
- ".data" : "builtin",
- ".def" : "builtin",
- ".desc" : "builtin",
- ".dim" : "builtin",
- ".double" : "builtin",
- ".eject" : "builtin",
- ".else" : "builtin",
- ".elseif" : "builtin",
- ".end" : "builtin",
- ".endef" : "builtin",
- ".endfunc" : "builtin",
- ".endif" : "builtin",
- ".equ" : "builtin",
- ".equiv" : "builtin",
- ".eqv" : "builtin",
- ".err" : "builtin",
- ".error" : "builtin",
- ".exitm" : "builtin",
- ".extern" : "builtin",
- ".fail" : "builtin",
- ".file" : "builtin",
- ".fill" : "builtin",
- ".float" : "builtin",
- ".func" : "builtin",
- ".global" : "builtin",
- ".gnu_attribute" : "builtin",
- ".hidden" : "builtin",
- ".hword" : "builtin",
- ".ident" : "builtin",
- ".if" : "builtin",
- ".incbin" : "builtin",
- ".include" : "builtin",
- ".int" : "builtin",
- ".internal" : "builtin",
- ".irp" : "builtin",
- ".irpc" : "builtin",
- ".lcomm" : "builtin",
- ".lflags" : "builtin",
- ".line" : "builtin",
- ".linkonce" : "builtin",
- ".list" : "builtin",
- ".ln" : "builtin",
- ".loc" : "builtin",
- ".loc_mark_labels" : "builtin",
- ".local" : "builtin",
- ".long" : "builtin",
- ".macro" : "builtin",
- ".mri" : "builtin",
- ".noaltmacro" : "builtin",
- ".nolist" : "builtin",
- ".octa" : "builtin",
- ".offset" : "builtin",
- ".org" : "builtin",
- ".p2align" : "builtin",
- ".popsection" : "builtin",
- ".previous" : "builtin",
- ".print" : "builtin",
- ".protected" : "builtin",
- ".psize" : "builtin",
- ".purgem" : "builtin",
- ".pushsection" : "builtin",
- ".quad" : "builtin",
- ".reloc" : "builtin",
- ".rept" : "builtin",
- ".sbttl" : "builtin",
- ".scl" : "builtin",
- ".section" : "builtin",
- ".set" : "builtin",
- ".short" : "builtin",
- ".single" : "builtin",
- ".size" : "builtin",
- ".skip" : "builtin",
- ".sleb128" : "builtin",
- ".space" : "builtin",
- ".stab" : "builtin",
- ".string" : "builtin",
- ".struct" : "builtin",
- ".subsection" : "builtin",
- ".symver" : "builtin",
- ".tag" : "builtin",
- ".text" : "builtin",
- ".title" : "builtin",
- ".type" : "builtin",
- ".uleb128" : "builtin",
- ".val" : "builtin",
- ".version" : "builtin",
- ".vtable_entry" : "builtin",
- ".vtable_inherit" : "builtin",
- ".warning" : "builtin",
- ".weak" : "builtin",
- ".weakref" : "builtin",
- ".word" : "builtin"
- };
-
- var registers = {};
-
- function x86(_parserConfig) {
- lineCommentStartSymbol = "#";
-
- registers.ax = "variable";
- registers.eax = "variable-2";
- registers.rax = "variable-3";
-
- registers.bx = "variable";
- registers.ebx = "variable-2";
- registers.rbx = "variable-3";
-
- registers.cx = "variable";
- registers.ecx = "variable-2";
- registers.rcx = "variable-3";
-
- registers.dx = "variable";
- registers.edx = "variable-2";
- registers.rdx = "variable-3";
-
- registers.si = "variable";
- registers.esi = "variable-2";
- registers.rsi = "variable-3";
-
- registers.di = "variable";
- registers.edi = "variable-2";
- registers.rdi = "variable-3";
-
- registers.sp = "variable";
- registers.esp = "variable-2";
- registers.rsp = "variable-3";
-
- registers.bp = "variable";
- registers.ebp = "variable-2";
- registers.rbp = "variable-3";
-
- registers.ip = "variable";
- registers.eip = "variable-2";
- registers.rip = "variable-3";
-
- registers.cs = "keyword";
- registers.ds = "keyword";
- registers.ss = "keyword";
- registers.es = "keyword";
- registers.fs = "keyword";
- registers.gs = "keyword";
- }
-
- function armv6(_parserConfig) {
- // Reference:
- // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf
- // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf
- lineCommentStartSymbol = "@";
- directives.syntax = "builtin";
-
- registers.r0 = "variable";
- registers.r1 = "variable";
- registers.r2 = "variable";
- registers.r3 = "variable";
- registers.r4 = "variable";
- registers.r5 = "variable";
- registers.r6 = "variable";
- registers.r7 = "variable";
- registers.r8 = "variable";
- registers.r9 = "variable";
- registers.r10 = "variable";
- registers.r11 = "variable";
- registers.r12 = "variable";
-
- registers.sp = "variable-2";
- registers.lr = "variable-2";
- registers.pc = "variable-2";
- registers.r13 = registers.sp;
- registers.r14 = registers.lr;
- registers.r15 = registers.pc;
-
- custom.push(function(ch, stream) {
- if (ch === '#') {
- stream.eatWhile(/\w/);
- return "number";
- }
- });
- }
-
- var arch = (parserConfig.architecture || "x86").toLowerCase();
- if (arch === "x86") {
- x86(parserConfig);
- } else if (arch === "arm" || arch === "armv6") {
- armv6(parserConfig);
- }
-
- function nextUntilUnescaped(stream, end) {
- var escaped = false, next;
- while ((next = stream.next()) != null) {
- if (next === end && !escaped) {
- return false;
- }
- escaped = !escaped && next === "\\";
- }
- return escaped;
- }
-
- function clikeComment(stream, state) {
- var maybeEnd = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch === "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch === "*");
- }
- return "comment";
- }
-
- return {
- startState: function() {
- return {
- tokenize: null
- };
- },
-
- token: function(stream, state) {
- if (state.tokenize) {
- return state.tokenize(stream, state);
- }
-
- if (stream.eatSpace()) {
- return null;
- }
-
- var style, cur, ch = stream.next();
-
- if (ch === "/") {
- if (stream.eat("*")) {
- state.tokenize = clikeComment;
- return clikeComment(stream, state);
- }
- }
-
- if (ch === lineCommentStartSymbol) {
- stream.skipToEnd();
- return "comment";
- }
-
- if (ch === '"') {
- nextUntilUnescaped(stream, '"');
- return "string";
- }
-
- if (ch === '.') {
- stream.eatWhile(/\w/);
- cur = stream.current().toLowerCase();
- style = directives[cur];
- return style || null;
- }
-
- if (ch === '=') {
- stream.eatWhile(/\w/);
- return "tag";
- }
-
- if (ch === '{') {
- return "braket";
- }
-
- if (ch === '}') {
- return "braket";
- }
-
- if (/\d/.test(ch)) {
- if (ch === "0" && stream.eat("x")) {
- stream.eatWhile(/[0-9a-fA-F]/);
- return "number";
- }
- stream.eatWhile(/\d/);
- return "number";
- }
-
- if (/\w/.test(ch)) {
- stream.eatWhile(/\w/);
- if (stream.eat(":")) {
- return 'tag';
- }
- cur = stream.current().toLowerCase();
- style = registers[cur];
- return style || null;
- }
-
- for (var i = 0; i < custom.length; i++) {
- style = custom[i](ch, stream, state);
- if (style) {
- return style;
- }
- }
- },
-
- lineComment: lineCommentStartSymbol,
- blockCommentStart: "/*",
- blockCommentEnd: "*/"
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/gas/index.html b/public/js/lib/codemirror/mode/gas/index.html
deleted file mode 100644
index df75ca2db7..0000000000
--- a/public/js/lib/codemirror/mode/gas/index.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-CodeMirror: Gas mode
-
-
-
-
-
-
-
-
-
-
-Gas mode
-
-
-.syntax unified
-.global main
-
-/*
- * A
- * multi-line
- * comment.
- */
-
-@ A single line comment.
-
-main:
- push {sp, lr}
- ldr r0, =message
- bl puts
- mov r0, #0
- pop {sp, pc}
-
-message:
- .asciz "Hello world! "
-
-
-
-
-
- Handles AT&T assembler syntax (more specifically this handles
- the GNU Assembler (gas) syntax.)
- It takes a single optional configuration parameter:
- architecture
, which can be one of "ARM"
,
- "ARMv6"
or "x86"
.
- Including the parameter adds syntax for the registers and special
- directives for the supplied architecture.
-
-
MIME types defined: text/x-gas
-
diff --git a/public/js/lib/codemirror/mode/gfm/gfm.js b/public/js/lib/codemirror/mode/gfm/gfm.js
deleted file mode 100644
index 80a8e2c84d..0000000000
--- a/public/js/lib/codemirror/mode/gfm/gfm.js
+++ /dev/null
@@ -1,123 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gfm", function(config, modeConfig) {
- var codeDepth = 0;
- function blankLine(state) {
- state.code = false;
- return null;
- }
- var gfmOverlay = {
- startState: function() {
- return {
- code: false,
- codeBlock: false,
- ateSpace: false
- };
- },
- copyState: function(s) {
- return {
- code: s.code,
- codeBlock: s.codeBlock,
- ateSpace: s.ateSpace
- };
- },
- token: function(stream, state) {
- state.combineTokens = null;
-
- // Hack to prevent formatting override inside code blocks (block and inline)
- if (state.codeBlock) {
- if (stream.match(/^```/)) {
- state.codeBlock = false;
- return null;
- }
- stream.skipToEnd();
- return null;
- }
- if (stream.sol()) {
- state.code = false;
- }
- if (stream.sol() && stream.match(/^```/)) {
- stream.skipToEnd();
- state.codeBlock = true;
- return null;
- }
- // If this block is changed, it may need to be updated in Markdown mode
- if (stream.peek() === '`') {
- stream.next();
- var before = stream.pos;
- stream.eatWhile('`');
- var difference = 1 + stream.pos - before;
- if (!state.code) {
- codeDepth = difference;
- state.code = true;
- } else {
- if (difference === codeDepth) { // Must be exact
- state.code = false;
- }
- }
- return null;
- } else if (state.code) {
- stream.next();
- return null;
- }
- // Check if space. If so, links can be formatted later on
- if (stream.eatSpace()) {
- state.ateSpace = true;
- return null;
- }
- if (stream.sol() || state.ateSpace) {
- state.ateSpace = false;
- if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) {
- // User/Project@SHA
- // User@SHA
- // SHA
- state.combineTokens = true;
- return "link";
- } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
- // User/Project#Num
- // User#Num
- // #Num
- state.combineTokens = true;
- return "link";
- }
- }
- if (stream.match(/^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i) &&
- stream.string.slice(stream.start - 2, stream.start) != "](") {
- // URLs
- // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
- // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
- state.combineTokens = true;
- return "link";
- }
- stream.next();
- return null;
- },
- blankLine: blankLine
- };
-
- var markdownConfig = {
- underscoresBreakWords: false,
- taskLists: true,
- fencedCodeBlocks: true,
- strikethrough: true
- };
- for (var attr in modeConfig) {
- markdownConfig[attr] = modeConfig[attr];
- }
- markdownConfig.name = "markdown";
- CodeMirror.defineMIME("gfmBase", markdownConfig);
- return CodeMirror.overlayMode(CodeMirror.getMode(config, "gfmBase"), gfmOverlay);
-}, "markdown");
-
-});
diff --git a/public/js/lib/codemirror/mode/gfm/index.html b/public/js/lib/codemirror/mode/gfm/index.html
deleted file mode 100644
index 7e38c52d60..0000000000
--- a/public/js/lib/codemirror/mode/gfm/index.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-CodeMirror: GFM mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-GFM mode
-
-GitHub Flavored Markdown
-========================
-
-Everything from markdown plus GFM features:
-
-## URL autolinking
-
-Underscores_are_allowed_between_words.
-
-## Strikethrough text
-
-GFM adds syntax to strikethrough text, which is missing from standard Markdown.
-
-~~Mistaken text.~~
-~~**works with other fomatting**~~
-
-~~spans across
-lines~~
-
-## Fenced code blocks (and syntax highlighting)
-
-```javascript
-for (var i = 0; i < items.length; i++) {
- console.log(items[i], i); // log them
-}
-```
-
-## Task Lists
-
-- [ ] Incomplete task list item
-- [x] **Completed** task list item
-
-## A bit of GitHub spice
-
-* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* \#Num: #1
-* User/#Num: mojombo#1
-* User/Project#Num: mojombo/god#1
-
-See http://github.github.com/github-flavored-markdown/.
-
-
-
-
-
- Optionally depends on other modes for properly highlighted code blocks.
-
- Parsing/Highlighting Tests: normal , verbose .
-
-
diff --git a/public/js/lib/codemirror/mode/gfm/test.js b/public/js/lib/codemirror/mode/gfm/test.js
deleted file mode 100644
index c2bc38fd57..0000000000
--- a/public/js/lib/codemirror/mode/gfm/test.js
+++ /dev/null
@@ -1,213 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
- var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "gfm", highlightFormatting: true});
- function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
-
- FT("codeBackticks",
- "[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
-
- FT("doubleBackticks",
- "[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
-
- FT("codeBlock",
- "[comment&formatting&formatting-code-block ```css]",
- "[tag foo]",
- "[comment&formatting&formatting-code-block ```]");
-
- FT("taskList",
- "[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]",
- "[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]");
-
- FT("formatting_strikethrough",
- "[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]");
-
- FT("formatting_strikethrough",
- "foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]");
-
- MT("emInWordAsterisk",
- "foo[em *bar*]hello");
-
- MT("emInWordUnderscore",
- "foo_bar_hello");
-
- MT("emStrongUnderscore",
- "[strong __][em&strong _foo__][em _] bar");
-
- MT("fencedCodeBlocks",
- "[comment ```]",
- "[comment foo]",
- "",
- "[comment ```]",
- "bar");
-
- MT("fencedCodeBlockModeSwitching",
- "[comment ```javascript]",
- "[variable foo]",
- "",
- "[comment ```]",
- "bar");
-
- MT("taskListAsterisk",
- "[variable-2 * []] foo]", // Invalid; must have space or x between []
- "[variable-2 * [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 * [x]]hello]", // Invalid; must have space after ]
- "[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListPlus",
- "[variable-2 + []] foo]", // Invalid; must have space or x between []
- "[variable-2 + [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 + [x]]hello]", // Invalid; must have space after ]
- "[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListDash",
- "[variable-2 - []] foo]", // Invalid; must have space or x between []
- "[variable-2 - [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 - [x]]hello]", // Invalid; must have space after ]
- "[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListNumber",
- "[variable-2 1. []] foo]", // Invalid; must have space or x between []
- "[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 3. [x]]hello]", // Invalid; must have space after ]
- "[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("SHA",
- "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
-
- MT("SHAEmphasis",
- "[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("shortSHA",
- "foo [link be6a8cc] bar");
-
- MT("tooShortSHA",
- "foo be6a8c bar");
-
- MT("longSHA",
- "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
-
- MT("badSHA",
- "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
-
- MT("userSHA",
- "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
-
- MT("userSHAEmphasis",
- "[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("userProjectSHA",
- "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
-
- MT("userProjectSHAEmphasis",
- "[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("num",
- "foo [link #1] bar");
-
- MT("numEmphasis",
- "[em *foo ][em&link #1][em *]");
-
- MT("badNum",
- "foo #1bar hello");
-
- MT("userNum",
- "foo [link bar#1] hello");
-
- MT("userNumEmphasis",
- "[em *foo ][em&link bar#1][em *]");
-
- MT("userProjectNum",
- "foo [link bar/hello#1] world");
-
- MT("userProjectNumEmphasis",
- "[em *foo ][em&link bar/hello#1][em *]");
-
- MT("vanillaLink",
- "foo [link http://www.example.com/] bar");
-
- MT("vanillaLinkPunctuation",
- "foo [link http://www.example.com/]. bar");
-
- MT("vanillaLinkExtension",
- "foo [link http://www.example.com/index.html] bar");
-
- MT("vanillaLinkEmphasis",
- "foo [em *][em&link http://www.example.com/index.html][em *] bar");
-
- MT("notALink",
- "[comment ```css]",
- "[tag foo] {[property color]:[keyword black];}",
- "[comment ```][link http://www.example.com/]");
-
- MT("notALink",
- "[comment ``foo `bar` http://www.example.com/``] hello");
-
- MT("notALink",
- "[comment `foo]",
- "[link http://www.example.com/]",
- "[comment `foo]",
- "",
- "[link http://www.example.com/]");
-
- MT("headerCodeBlockGithub",
- "[header&header-1 # heading]",
- "",
- "[comment ```]",
- "[comment code]",
- "[comment ```]",
- "",
- "Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]",
- "Issue: [link #1]",
- "Link: [link http://www.example.com/]");
-
- MT("strikethrough",
- "[strikethrough ~~foo~~]");
-
- MT("strikethroughWithStartingSpace",
- "~~ foo~~");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo~~~]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~ bar]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~ bar~~]hello");
-
- MT("strikethroughOneLetter",
- "[strikethrough ~~a~~]");
-
- MT("strikethroughWrapped",
- "[strikethrough ~~foo]",
- "[strikethrough foo~~]");
-
- MT("strikethroughParagraph",
- "[strikethrough ~~foo]",
- "",
- "foo[strikethrough ~~bar]");
-
- MT("strikethroughEm",
- "[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]");
-
- MT("strikethroughEm",
- "[em *][em&strikethrough ~~foo~~][em *]");
-
- MT("strikethroughStrong",
- "[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]");
-
- MT("strikethroughStrong",
- "[strong **][strong&strikethrough ~~foo~~][strong **]");
-
-})();
diff --git a/public/js/lib/codemirror/mode/gherkin/gherkin.js b/public/js/lib/codemirror/mode/gherkin/gherkin.js
deleted file mode 100644
index fc2ebee167..0000000000
--- a/public/js/lib/codemirror/mode/gherkin/gherkin.js
+++ /dev/null
@@ -1,178 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
-Gherkin mode - http://www.cukes.info/
-Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
-*/
-
-// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js
-//var Quotes = {
-// SINGLE: 1,
-// DOUBLE: 2
-//};
-
-//var regex = {
-// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/
-//};
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gherkin", function () {
- return {
- startState: function () {
- return {
- lineNumber: 0,
- tableHeaderLine: false,
- allowFeature: true,
- allowBackground: false,
- allowScenario: false,
- allowSteps: false,
- allowPlaceholders: false,
- allowMultilineArgument: false,
- inMultilineString: false,
- inMultilineTable: false,
- inKeywordLine: false
- };
- },
- token: function (stream, state) {
- if (stream.sol()) {
- state.lineNumber++;
- state.inKeywordLine = false;
- if (state.inMultilineTable) {
- state.tableHeaderLine = false;
- if (!stream.match(/\s*\|/, false)) {
- state.allowMultilineArgument = false;
- state.inMultilineTable = false;
- }
- }
- }
-
- stream.eatSpace();
-
- if (state.allowMultilineArgument) {
-
- // STRING
- if (state.inMultilineString) {
- if (stream.match('"""')) {
- state.inMultilineString = false;
- state.allowMultilineArgument = false;
- } else {
- stream.match(/.*/);
- }
- return "string";
- }
-
- // TABLE
- if (state.inMultilineTable) {
- if (stream.match(/\|\s*/)) {
- return "bracket";
- } else {
- stream.match(/[^\|]*/);
- return state.tableHeaderLine ? "header" : "string";
- }
- }
-
- // DETECT START
- if (stream.match('"""')) {
- // String
- state.inMultilineString = true;
- return "string";
- } else if (stream.match("|")) {
- // Table
- state.inMultilineTable = true;
- state.tableHeaderLine = true;
- return "bracket";
- }
-
- }
-
- // LINE COMMENT
- if (stream.match(/#.*/)) {
- return "comment";
-
- // TAG
- } else if (!state.inKeywordLine && stream.match(/@\S+/)) {
- return "tag";
-
- // FEATURE
- } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {
- state.allowScenario = true;
- state.allowBackground = true;
- state.allowPlaceholders = false;
- state.allowSteps = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // BACKGROUND
- } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // SCENARIO OUTLINE
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {
- state.allowPlaceholders = true;
- state.allowSteps = true;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // EXAMPLES
- } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = true;
- return "keyword";
-
- // SCENARIO
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // STEPS
- } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) {
- state.inStep = true;
- state.allowPlaceholders = true;
- state.allowMultilineArgument = true;
- state.inKeywordLine = true;
- return "keyword";
-
- // INLINE STRING
- } else if (stream.match(/"[^"]*"?/)) {
- return "string";
-
- // PLACEHOLDER
- } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {
- return "variable";
-
- // Fall through
- } else {
- stream.next();
- stream.eatWhile(/[^@"<#]/);
- return null;
- }
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-feature", "gherkin");
-
-});
diff --git a/public/js/lib/codemirror/mode/gherkin/index.html b/public/js/lib/codemirror/mode/gherkin/index.html
deleted file mode 100644
index af8184c981..0000000000
--- a/public/js/lib/codemirror/mode/gherkin/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-CodeMirror: Gherkin mode
-
-
-
-
-
-
-
-
-
-
-Gherkin mode
-
-Feature: Using Google
- Background:
- Something something
- Something else
- Scenario: Has a homepage
- When I navigate to the google home page
- Then the home page should contain the menu and the search form
- Scenario: Searching for a term
- When I navigate to the google home page
- When I search for Tofu
- Then the search results page is displayed
- Then the search results page contains 10 individual search results
- Then the search results contain a link to the wikipedia tofu page
-
-
-
- MIME types defined: text/x-feature
.
-
-
diff --git a/public/js/lib/codemirror/mode/go/go.js b/public/js/lib/codemirror/mode/go/go.js
deleted file mode 100644
index 173e034d0c..0000000000
--- a/public/js/lib/codemirror/mode/go/go.js
+++ /dev/null
@@ -1,184 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("go", function(config) {
- var indentUnit = config.indentUnit;
-
- var keywords = {
- "break":true, "case":true, "chan":true, "const":true, "continue":true,
- "default":true, "defer":true, "else":true, "fallthrough":true, "for":true,
- "func":true, "go":true, "goto":true, "if":true, "import":true,
- "interface":true, "map":true, "package":true, "range":true, "return":true,
- "select":true, "struct":true, "switch":true, "type":true, "var":true,
- "bool":true, "byte":true, "complex64":true, "complex128":true,
- "float32":true, "float64":true, "int8":true, "int16":true, "int32":true,
- "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,
- "uint64":true, "int":true, "uint":true, "uintptr":true
- };
-
- var atoms = {
- "true":true, "false":true, "iota":true, "nil":true, "append":true,
- "cap":true, "close":true, "complex":true, "copy":true, "imag":true,
- "len":true, "make":true, "new":true, "panic":true, "print":true,
- "println":true, "real":true, "recover":true
- };
-
- var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'" || ch == "`") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\d\.]/.test(ch)) {
- if (ch == ".") {
- stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
- } else if (ch == "0") {
- stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
- } else {
- stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
- }
- return "number";
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (cur == "case" || cur == "default") curPunc = "case";
- return "keyword";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || quote == "`"))
- state.tokenize = tokenBase;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- if (ctx.type == "case") ctx.type = "}";
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
-
- if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "case") ctx.type = "case";
- else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state);
- else if (curPunc == ctx.type) popContext(state);
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return 0;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
- state.context.type = "}";
- return ctx.indented;
- }
- var closing = firstChar == ctx.type;
- if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}):",
- fold: "brace",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
-});
-
-CodeMirror.defineMIME("text/x-go", "go");
-
-});
diff --git a/public/js/lib/codemirror/mode/go/index.html b/public/js/lib/codemirror/mode/go/index.html
deleted file mode 100644
index 72e3b364c6..0000000000
--- a/public/js/lib/codemirror/mode/go/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Go mode
-
-
-
-
-
-
-
-
-
-
-
-
-Go mode
-
-// Prime Sieve in Go.
-// Taken from the Go specification.
-// Copyright © The Go Authors.
-
-package main
-
-import "fmt"
-
-// Send the sequence 2, 3, 4, ... to channel 'ch'.
-func generate(ch chan<- int) {
- for i := 2; ; i++ {
- ch <- i // Send 'i' to channel 'ch'
- }
-}
-
-// Copy the values from channel 'src' to channel 'dst',
-// removing those divisible by 'prime'.
-func filter(src <-chan int, dst chan<- int, prime int) {
- for i := range src { // Loop over values received from 'src'.
- if i%prime != 0 {
- dst <- i // Send 'i' to channel 'dst'.
- }
- }
-}
-
-// The prime sieve: Daisy-chain filter processes together.
-func sieve() {
- ch := make(chan int) // Create a new channel.
- go generate(ch) // Start generate() as a subprocess.
- for {
- prime := <-ch
- fmt.Print(prime, "\n")
- ch1 := make(chan int)
- go filter(ch, ch1, prime)
- ch = ch1
- }
-}
-
-func main() {
- sieve()
-}
-
-
-
-
- MIME type: text/x-go
-
diff --git a/public/js/lib/codemirror/mode/groovy/groovy.js b/public/js/lib/codemirror/mode/groovy/groovy.js
deleted file mode 100644
index 89b8224cf5..0000000000
--- a/public/js/lib/codemirror/mode/groovy/groovy.js
+++ /dev/null
@@ -1,226 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("groovy", function(config) {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var keywords = words(
- "abstract as assert boolean break byte case catch char class const continue def default " +
- "do double else enum extends final finally float for goto if implements import in " +
- "instanceof int interface long native new package private protected public return " +
- "short static strictfp super switch synchronized threadsafe throw throws transient " +
- "try void volatile while");
- var blockKeywords = words("catch class do else finally for if switch try while enum interface def");
- var atoms = words("null true false this");
-
- var curPunc;
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'") {
- return startString(ch, stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); }
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize.push(tokenComment);
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- if (expectExpression(state.lastToken)) {
- return startString(ch, stream, state);
- }
- }
- if (ch == "-" && stream.eat(">")) {
- curPunc = "->";
- return null;
- }
- if (/[+\-*&%=<>!?|\/~]/.test(ch)) {
- stream.eatWhile(/[+\-*&%=<>|~]/);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; }
- if (state.lastToken == ".") return "property";
- if (stream.eat(":")) { curPunc = "proplabel"; return "property"; }
- var cur = stream.current();
- if (atoms.propertyIsEnumerable(cur)) { return "atom"; }
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- return "variable";
- }
- tokenBase.isBase = true;
-
- function startString(quote, stream, state) {
- var tripleQuoted = false;
- if (quote != "/" && stream.eat(quote)) {
- if (stream.eat(quote)) tripleQuoted = true;
- else return "string";
- }
- function t(stream, state) {
- var escaped = false, next, end = !tripleQuoted;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- if (!tripleQuoted) { break; }
- if (stream.match(quote + quote)) { end = true; break; }
- }
- if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
- state.tokenize.push(tokenBaseUntilBrace());
- return "string";
- }
- escaped = !escaped && next == "\\";
- }
- if (end) state.tokenize.pop();
- return "string";
- }
- state.tokenize.push(t);
- return t(stream, state);
- }
-
- function tokenBaseUntilBrace() {
- var depth = 1;
- function t(stream, state) {
- if (stream.peek() == "}") {
- depth--;
- if (depth == 0) {
- state.tokenize.pop();
- return state.tokenize[state.tokenize.length-1](stream, state);
- }
- } else if (stream.peek() == "{") {
- depth++;
- }
- return tokenBase(stream, state);
- }
- t.isBase = true;
- return t;
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize.pop();
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function expectExpression(last) {
- return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
- last == "newstatement" || last == "keyword" || last == "proplabel";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: [tokenBase],
- context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true,
- lastToken: null
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- // Automatic semicolon insertion
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) {
- popContext(state); ctx = state.context;
- }
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = state.tokenize[state.tokenize.length-1](stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- // Handle indentation for {x -> \n ... }
- else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
- popContext(state);
- state.context.align = false;
- }
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- state.lastToken = curPunc || style;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (!state.tokenize[state.tokenize.length-1].isBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : config.indentUnit);
- },
-
- electricChars: "{}",
- fold: "brace"
- };
-});
-
-CodeMirror.defineMIME("text/x-groovy", "groovy");
-
-});
diff --git a/public/js/lib/codemirror/mode/groovy/index.html b/public/js/lib/codemirror/mode/groovy/index.html
deleted file mode 100644
index bb0df078c3..0000000000
--- a/public/js/lib/codemirror/mode/groovy/index.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-CodeMirror: Groovy mode
-
-
-
-
-
-
-
-
-
-
-
-Groovy mode
-
-//Pattern for groovy script
-def p = ~/.*\.groovy/
-new File( 'd:\\scripts' ).eachFileMatch(p) {f ->
- // imports list
- def imports = []
- f.eachLine {
- // condition to detect an import instruction
- ln -> if ( ln =~ '^import .*' ) {
- imports << "${ln - 'import '}"
- }
- }
- // print thmen
- if ( ! imports.empty ) {
- println f
- imports.each{ println " $it" }
- }
-}
-
-/* Coin changer demo code from http://groovy.codehaus.org */
-
-enum UsCoin {
- quarter(25), dime(10), nickel(5), penny(1)
- UsCoin(v) { value = v }
- final value
-}
-
-enum OzzieCoin {
- fifty(50), twenty(20), ten(10), five(5)
- OzzieCoin(v) { value = v }
- final value
-}
-
-def plural(word, count) {
- if (count == 1) return word
- word[-1] == 'y' ? word[0..-2] + "ies" : word + "s"
-}
-
-def change(currency, amount) {
- currency.values().inject([]){ list, coin ->
- int count = amount / coin.value
- amount = amount % coin.value
- list += "$count ${plural(coin.toString(), count)}"
- }
-}
-
-
-
-
- MIME types defined: text/x-groovy
-
diff --git a/public/js/lib/codemirror/mode/haml/haml.js b/public/js/lib/codemirror/mode/haml/haml.js
deleted file mode 100644
index 8fe63b0203..0000000000
--- a/public/js/lib/codemirror/mode/haml/haml.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
- // full haml mode. This handled embeded ruby and html fragments too
- CodeMirror.defineMode("haml", function(config) {
- var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"});
- var rubyMode = CodeMirror.getMode(config, "ruby");
-
- function rubyInQuote(endQuote) {
- return function(stream, state) {
- var ch = stream.peek();
- if (ch == endQuote && state.rubyState.tokenize.length == 1) {
- // step out of ruby context as it seems to complete processing all the braces
- stream.next();
- state.tokenize = html;
- return "closeAttributeTag";
- } else {
- return ruby(stream, state);
- }
- };
- }
-
- function ruby(stream, state) {
- if (stream.match("-#")) {
- stream.skipToEnd();
- return "comment";
- }
- return rubyMode.token(stream, state.rubyState);
- }
-
- function html(stream, state) {
- var ch = stream.peek();
-
- // handle haml declarations. All declarations that cant be handled here
- // will be passed to html mode
- if (state.previousToken.style == "comment" ) {
- if (state.indented > state.previousToken.indented) {
- stream.skipToEnd();
- return "commentLine";
- }
- }
-
- if (state.startOfLine) {
- if (ch == "!" && stream.match("!!")) {
- stream.skipToEnd();
- return "tag";
- } else if (stream.match(/^%[\w:#\.]+=/)) {
- state.tokenize = ruby;
- return "hamlTag";
- } else if (stream.match(/^%[\w:]+/)) {
- return "hamlTag";
- } else if (ch == "/" ) {
- stream.skipToEnd();
- return "comment";
- }
- }
-
- if (state.startOfLine || state.previousToken.style == "hamlTag") {
- if ( ch == "#" || ch == ".") {
- stream.match(/[\w-#\.]*/);
- return "hamlAttribute";
- }
- }
-
- // donot handle --> as valid ruby, make it HTML close comment instead
- if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) {
- state.tokenize = ruby;
- return state.tokenize(stream, state);
- }
-
- if (state.previousToken.style == "hamlTag" ||
- state.previousToken.style == "closeAttributeTag" ||
- state.previousToken.style == "hamlAttribute") {
- if (ch == "(") {
- state.tokenize = rubyInQuote(")");
- return state.tokenize(stream, state);
- } else if (ch == "{") {
- state.tokenize = rubyInQuote("}");
- return state.tokenize(stream, state);
- }
- }
-
- return htmlMode.token(stream, state.htmlState);
- }
-
- return {
- // default to html mode
- startState: function() {
- var htmlState = htmlMode.startState();
- var rubyState = rubyMode.startState();
- return {
- htmlState: htmlState,
- rubyState: rubyState,
- indented: 0,
- previousToken: { style: null, indented: 0},
- tokenize: html
- };
- },
-
- copyState: function(state) {
- return {
- htmlState : CodeMirror.copyState(htmlMode, state.htmlState),
- rubyState: CodeMirror.copyState(rubyMode, state.rubyState),
- indented: state.indented,
- previousToken: state.previousToken,
- tokenize: state.tokenize
- };
- },
-
- token: function(stream, state) {
- if (stream.sol()) {
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
- state.startOfLine = false;
- // dont record comment line as we only want to measure comment line with
- // the opening comment block
- if (style && style != "commentLine") {
- state.previousToken = { style: style, indented: state.indented };
- }
- // if current state is ruby and the previous token is not `,` reset the
- // tokenize to html
- if (stream.eol() && state.tokenize == ruby) {
- stream.backUp(1);
- var ch = stream.peek();
- stream.next();
- if (ch && ch != ",") {
- state.tokenize = html;
- }
- }
- // reprocess some of the specific style tag when finish setting previousToken
- if (style == "hamlTag") {
- style = "tag";
- } else if (style == "commentLine") {
- style = "comment";
- } else if (style == "hamlAttribute") {
- style = "attribute";
- } else if (style == "closeAttributeTag") {
- style = null;
- }
- return style;
- }
- };
- }, "htmlmixed", "ruby");
-
- CodeMirror.defineMIME("text/x-haml", "haml");
-});
diff --git a/public/js/lib/codemirror/mode/haml/index.html b/public/js/lib/codemirror/mode/haml/index.html
deleted file mode 100644
index 2894a938e8..0000000000
--- a/public/js/lib/codemirror/mode/haml/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-CodeMirror: HAML mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-HAML mode
-
-!!!
-#content
-.left.column(title="title"){:href => "/hello", :test => "#{hello}_#{world}"}
-
- %h2 Welcome to our site!
- %p= puts "HAML MODE"
- .right.column
- = render :partial => "sidebar"
-
-.container
- .row
- .span8
- %h1.title= @page_title
-%p.title= @page_title
-%p
- /
- The same as HTML comment
- Hello multiline comment
-
- -# haml comment
- This wont be displayed
- nor will this
- Date/Time:
- - now = DateTime.now
- %strong= now
- - if now > DateTime.parse("December 31, 2006")
- = "Happy new " + "year!"
-
-%title
- = @title
- \= @title
- Title
-
- Title
-
-
-
-
- MIME types defined: text/x-haml
.
-
- Parsing/Highlighting Tests: normal , verbose .
-
-
diff --git a/public/js/lib/codemirror/mode/haml/test.js b/public/js/lib/codemirror/mode/haml/test.js
deleted file mode 100644
index 508458a437..0000000000
--- a/public/js/lib/codemirror/mode/haml/test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
- // Requires at least one media query
- MT("elementName",
- "[tag %h1] Hey There");
-
- MT("oneElementPerLine",
- "[tag %h1] Hey There %h2");
-
- MT("idSelector",
- "[tag %h1][attribute #test] Hey There");
-
- MT("classSelector",
- "[tag %h1][attribute .hello] Hey There");
-
- MT("docType",
- "[tag !!! XML]");
-
- MT("comment",
- "[comment / Hello WORLD]");
-
- MT("notComment",
- "[tag %h1] This is not a / comment ");
-
- MT("attributes",
- "[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}");
-
- MT("htmlCode",
- "[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket ][tag h1][tag&bracket >]");
-
- MT("rubyBlock",
- "[operator =][variable-2 @item]");
-
- MT("selectorRubyBlock",
- "[tag %a.selector=] [variable-2 @item]");
-
- MT("nestedRubyBlock",
- "[tag %a]",
- " [operator =][variable puts] [string \"test\"]");
-
- MT("multilinePlaintext",
- "[tag %p]",
- " Hello,",
- " World");
-
- MT("multilineRuby",
- "[tag %p]",
- " [comment -# this is a comment]",
- " [comment and this is a comment too]",
- " Date/Time",
- " [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]",
- " [tag %strong=] [variable now]",
- " [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
- " [operator =][string \"Happy\"]",
- " [operator =][string \"Belated\"]",
- " [operator =][string \"Birthday\"]");
-
- MT("multilineComment",
- "[comment /]",
- " [comment Multiline]",
- " [comment Comment]");
-
- MT("hamlComment",
- "[comment -# this is a comment]");
-
- MT("multilineHamlComment",
- "[comment -# this is a comment]",
- " [comment and this is a comment too]");
-
- MT("multilineHTMLComment",
- "[comment ]");
-
- MT("hamlAfterRubyTag",
- "[attribute .block]",
- " [tag %strong=] [variable now]",
- " [attribute .test]",
- " [operator =][variable now]",
- " [attribute .right]");
-
- MT("stretchedRuby",
- "[operator =] [variable puts] [string \"Hello\"],",
- " [string \"World\"]");
-
- MT("interpolationInHashAttribute",
- //"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
- "[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
-
- MT("interpolationInHTMLAttribute",
- "[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test");
-})();
diff --git a/public/js/lib/codemirror/mode/haskell/haskell.js b/public/js/lib/codemirror/mode/haskell/haskell.js
deleted file mode 100644
index fe0bab67ed..0000000000
--- a/public/js/lib/codemirror/mode/haskell/haskell.js
+++ /dev/null
@@ -1,267 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("haskell", function(_config, modeConfig) {
-
- function switchState(source, setState, f) {
- setState(f);
- return f(source, setState);
- }
-
- // These should all be Unicode extended, as per the Haskell 2010 report
- var smallRE = /[a-z_]/;
- var largeRE = /[A-Z]/;
- var digitRE = /\d/;
- var hexitRE = /[0-9A-Fa-f]/;
- var octitRE = /[0-7]/;
- var idRE = /[a-z_A-Z0-9'\xa1-\uffff]/;
- var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/;
- var specialRE = /[(),;[\]`{}]/;
- var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer
-
- function normal(source, setState) {
- if (source.eatWhile(whiteCharRE)) {
- return null;
- }
-
- var ch = source.next();
- if (specialRE.test(ch)) {
- if (ch == '{' && source.eat('-')) {
- var t = "comment";
- if (source.eat('#')) {
- t = "meta";
- }
- return switchState(source, setState, ncomment(t, 1));
- }
- return null;
- }
-
- if (ch == '\'') {
- if (source.eat('\\')) {
- source.next(); // should handle other escapes here
- }
- else {
- source.next();
- }
- if (source.eat('\'')) {
- return "string";
- }
- return "error";
- }
-
- if (ch == '"') {
- return switchState(source, setState, stringLiteral);
- }
-
- if (largeRE.test(ch)) {
- source.eatWhile(idRE);
- if (source.eat('.')) {
- return "qualifier";
- }
- return "variable-2";
- }
-
- if (smallRE.test(ch)) {
- source.eatWhile(idRE);
- return "variable";
- }
-
- if (digitRE.test(ch)) {
- if (ch == '0') {
- if (source.eat(/[xX]/)) {
- source.eatWhile(hexitRE); // should require at least 1
- return "integer";
- }
- if (source.eat(/[oO]/)) {
- source.eatWhile(octitRE); // should require at least 1
- return "number";
- }
- }
- source.eatWhile(digitRE);
- var t = "number";
- if (source.match(/^\.\d+/)) {
- t = "number";
- }
- if (source.eat(/[eE]/)) {
- t = "number";
- source.eat(/[-+]/);
- source.eatWhile(digitRE); // should require at least 1
- }
- return t;
- }
-
- if (ch == "." && source.eat("."))
- return "keyword";
-
- if (symbolRE.test(ch)) {
- if (ch == '-' && source.eat(/-/)) {
- source.eatWhile(/-/);
- if (!source.eat(symbolRE)) {
- source.skipToEnd();
- return "comment";
- }
- }
- var t = "variable";
- if (ch == ':') {
- t = "variable-2";
- }
- source.eatWhile(symbolRE);
- return t;
- }
-
- return "error";
- }
-
- function ncomment(type, nest) {
- if (nest == 0) {
- return normal;
- }
- return function(source, setState) {
- var currNest = nest;
- while (!source.eol()) {
- var ch = source.next();
- if (ch == '{' && source.eat('-')) {
- ++currNest;
- }
- else if (ch == '-' && source.eat('}')) {
- --currNest;
- if (currNest == 0) {
- setState(normal);
- return type;
- }
- }
- }
- setState(ncomment(type, currNest));
- return type;
- };
- }
-
- function stringLiteral(source, setState) {
- while (!source.eol()) {
- var ch = source.next();
- if (ch == '"') {
- setState(normal);
- return "string";
- }
- if (ch == '\\') {
- if (source.eol() || source.eat(whiteCharRE)) {
- setState(stringGap);
- return "string";
- }
- if (source.eat('&')) {
- }
- else {
- source.next(); // should handle other escapes here
- }
- }
- }
- setState(normal);
- return "error";
- }
-
- function stringGap(source, setState) {
- if (source.eat('\\')) {
- return switchState(source, setState, stringLiteral);
- }
- source.next();
- setState(normal);
- return "error";
- }
-
-
- var wellKnownWords = (function() {
- var wkw = {};
- function setType(t) {
- return function () {
- for (var i = 0; i < arguments.length; i++)
- wkw[arguments[i]] = t;
- };
- }
-
- setType("keyword")(
- "case", "class", "data", "default", "deriving", "do", "else", "foreign",
- "if", "import", "in", "infix", "infixl", "infixr", "instance", "let",
- "module", "newtype", "of", "then", "type", "where", "_");
-
- setType("keyword")(
- "\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>");
-
- setType("builtin")(
- "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<",
- "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**");
-
- setType("builtin")(
- "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", "Eq",
- "False", "FilePath", "Float", "Floating", "Fractional", "Functor", "GT",
- "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left",
- "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read",
- "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS",
- "String", "True");
-
- setType("builtin")(
- "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf",
- "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling",
- "compare", "concat", "concatMap", "const", "cos", "cosh", "curry",
- "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either",
- "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo",
- "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter",
- "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap",
- "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger",
- "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents",
- "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized",
- "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last",
- "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map",
- "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound",
- "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or",
- "otherwise", "pi", "pred", "print", "product", "properFraction",
- "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile",
- "readIO", "readList", "readLn", "readParen", "reads", "readsPrec",
- "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse",
- "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq",
- "sequence", "sequence_", "show", "showChar", "showList", "showParen",
- "showString", "shows", "showsPrec", "significand", "signum", "sin",
- "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum",
- "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger",
- "toRational", "truncate", "uncurry", "undefined", "unlines", "until",
- "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip",
- "zip3", "zipWith", "zipWith3");
-
- var override = modeConfig.overrideKeywords;
- if (override) for (var word in override) if (override.hasOwnProperty(word))
- wkw[word] = override[word];
-
- return wkw;
- })();
-
-
-
- return {
- startState: function () { return { f: normal }; },
- copyState: function (s) { return { f: s.f }; },
-
- token: function(stream, state) {
- var t = state.f(stream, function(s) { state.f = s; });
- var w = stream.current();
- return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t;
- },
-
- blockCommentStart: "{-",
- blockCommentEnd: "-}",
- lineComment: "--"
- };
-
-});
-
-CodeMirror.defineMIME("text/x-haskell", "haskell");
-
-});
diff --git a/public/js/lib/codemirror/mode/haskell/index.html b/public/js/lib/codemirror/mode/haskell/index.html
deleted file mode 100644
index 42240b0f2f..0000000000
--- a/public/js/lib/codemirror/mode/haskell/index.html
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-CodeMirror: Haskell mode
-
-
-
-
-
-
-
-
-
-
-
-
-Haskell mode
-
-module UniquePerms (
- uniquePerms
- )
-where
-
--- | Find all unique permutations of a list where there might be duplicates.
-uniquePerms :: (Eq a) => [a] -> [[a]]
-uniquePerms = permBag . makeBag
-
--- | An unordered collection where duplicate values are allowed,
--- but represented with a single value and a count.
-type Bag a = [(a, Int)]
-
-makeBag :: (Eq a) => [a] -> Bag a
-makeBag [] = []
-makeBag (a:as) = mix a $ makeBag as
- where
- mix a [] = [(a,1)]
- mix a (bn@(b,n):bs) | a == b = (b,n+1):bs
- | otherwise = bn : mix a bs
-
-permBag :: Bag a -> [[a]]
-permBag [] = [[]]
-permBag bs = concatMap (\(f,cs) -> map (f:) $ permBag cs) . oneOfEach $ bs
- where
- oneOfEach [] = []
- oneOfEach (an@(a,n):bs) =
- let bs' = if n == 1 then bs else (a,n-1):bs
- in (a,bs') : mapSnd (an:) (oneOfEach bs)
-
- apSnd f (a,b) = (a, f b)
- mapSnd = map . apSnd
-
-
-
-
- MIME types defined: text/x-haskell
.
-
diff --git a/public/js/lib/codemirror/mode/haxe/haxe.js b/public/js/lib/codemirror/mode/haxe/haxe.js
deleted file mode 100644
index d49ad70f99..0000000000
--- a/public/js/lib/codemirror/mode/haxe/haxe.js
+++ /dev/null
@@ -1,518 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("haxe", function(config, parserConfig) {
- var indentUnit = config.indentUnit;
-
- // Tokenizer
-
- var keywords = function(){
- function kw(type) {return {type: type, style: "keyword"};}
- var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
- var operator = kw("operator"), atom = {type: "atom", style: "atom"}, attribute = {type:"attribute", style: "attribute"};
- var type = kw("typedef");
- return {
- "if": A, "while": A, "else": B, "do": B, "try": B,
- "return": C, "break": C, "continue": C, "new": C, "throw": C,
- "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"),
- "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"),
- "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"),
- "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
- "in": operator, "never": kw("property_access"), "trace":kw("trace"),
- "class": type, "abstract":type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type,
- "true": atom, "false": atom, "null": atom
- };
- }();
-
- var isOperatorChar = /[+\-*&%=<>!?|]/;
-
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
-
- function nextUntilUnescaped(stream, end) {
- var escaped = false, next;
- while ((next = stream.next()) != null) {
- if (next == end && !escaped)
- return false;
- escaped = !escaped && next == "\\";
- }
- return escaped;
- }
-
- // Used as scratch variables to communicate multiple values without
- // consing up tons of objects.
- var type, content;
- function ret(tp, style, cont) {
- type = tp; content = cont;
- return style;
- }
-
- function haxeTokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'")
- return chain(stream, state, haxeTokenString(ch));
- else if (/[\[\]{}\(\),;\:\.]/.test(ch))
- return ret(ch);
- else if (ch == "0" && stream.eat(/x/i)) {
- stream.eatWhile(/[\da-f]/i);
- return ret("number", "number");
- }
- else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
- stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
- return ret("number", "number");
- }
- else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) {
- nextUntilUnescaped(stream, "/");
- stream.eatWhile(/[gimsu]/);
- return ret("regexp", "string-2");
- }
- else if (ch == "/") {
- if (stream.eat("*")) {
- return chain(stream, state, haxeTokenComment);
- }
- else if (stream.eat("/")) {
- stream.skipToEnd();
- return ret("comment", "comment");
- }
- else {
- stream.eatWhile(isOperatorChar);
- return ret("operator", null, stream.current());
- }
- }
- else if (ch == "#") {
- stream.skipToEnd();
- return ret("conditional", "meta");
- }
- else if (ch == "@") {
- stream.eat(/:/);
- stream.eatWhile(/[\w_]/);
- return ret ("metadata", "meta");
- }
- else if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return ret("operator", null, stream.current());
- }
- else {
- var word;
- if(/[A-Z]/.test(ch))
- {
- stream.eatWhile(/[\w_<>]/);
- word = stream.current();
- return ret("type", "variable-3", word);
- }
- else
- {
- stream.eatWhile(/[\w_]/);
- var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
- return (known && state.kwAllowed) ? ret(known.type, known.style, word) :
- ret("variable", "variable", word);
- }
- }
- }
-
- function haxeTokenString(quote) {
- return function(stream, state) {
- if (!nextUntilUnescaped(stream, quote))
- state.tokenize = haxeTokenBase;
- return ret("string", "string");
- };
- }
-
- function haxeTokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = haxeTokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- // Parser
-
- var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true};
-
- function HaxeLexical(indented, column, type, align, prev, info) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.prev = prev;
- this.info = info;
- if (align != null) this.align = align;
- }
-
- function inScope(state, varname) {
- for (var v = state.localVars; v; v = v.next)
- if (v.name == varname) return true;
- }
-
- function parseHaxe(state, style, type, content, stream) {
- var cc = state.cc;
- // Communicate our context to the combinators.
- // (Less wasteful than consing up a hundred closures on every call.)
- cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
-
- if (!state.lexical.hasOwnProperty("align"))
- state.lexical.align = true;
-
- while(true) {
- var combinator = cc.length ? cc.pop() : statement;
- if (combinator(type, content)) {
- while(cc.length && cc[cc.length - 1].lex)
- cc.pop()();
- if (cx.marked) return cx.marked;
- if (type == "variable" && inScope(state, content)) return "variable-2";
- if (type == "variable" && imported(state, content)) return "variable-3";
- return style;
- }
- }
- }
-
- function imported(state, typename)
- {
- if (/[a-z]/.test(typename.charAt(0)))
- return false;
- var len = state.importedtypes.length;
- for (var i = 0; i= 0; i--) cx.cc.push(arguments[i]);
- }
- function cont() {
- pass.apply(null, arguments);
- return true;
- }
- function register(varname) {
- var state = cx.state;
- if (state.context) {
- cx.marked = "def";
- for (var v = state.localVars; v; v = v.next)
- if (v.name == varname) return;
- state.localVars = {name: varname, next: state.localVars};
- }
- }
-
- // Combinators
-
- var defaultVars = {name: "this", next: null};
- function pushcontext() {
- if (!cx.state.context) cx.state.localVars = defaultVars;
- cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
- }
- function popcontext() {
- cx.state.localVars = cx.state.context.vars;
- cx.state.context = cx.state.context.prev;
- }
- function pushlex(type, info) {
- var result = function() {
- var state = cx.state;
- state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info);
- };
- result.lex = true;
- return result;
- }
- function poplex() {
- var state = cx.state;
- if (state.lexical.prev) {
- if (state.lexical.type == ")")
- state.indented = state.lexical.indented;
- state.lexical = state.lexical.prev;
- }
- }
- poplex.lex = true;
-
- function expect(wanted) {
- function f(type) {
- if (type == wanted) return cont();
- else if (wanted == ";") return pass();
- else return cont(f);
- };
- return f;
- }
-
- function statement(type) {
- if (type == "@") return cont(metadef);
- if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
- if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
- if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
- if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext);
- if (type == ";") return cont();
- if (type == "attribute") return cont(maybeattribute);
- if (type == "function") return cont(functiondef);
- if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
- poplex, statement, poplex);
- if (type == "variable") return cont(pushlex("stat"), maybelabel);
- if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
- block, poplex, poplex);
- if (type == "case") return cont(expression, expect(":"));
- if (type == "default") return cont(expect(":"));
- if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
- statement, poplex, popcontext);
- if (type == "import") return cont(importdef, expect(";"));
- if (type == "typedef") return cont(typedef);
- return pass(pushlex("stat"), expression, expect(";"), poplex);
- }
- function expression(type) {
- if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
- if (type == "function") return cont(functiondef);
- if (type == "keyword c") return cont(maybeexpression);
- if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
- if (type == "operator") return cont(expression);
- if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
- if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
- return cont();
- }
- function maybeexpression(type) {
- if (type.match(/[;\}\)\],]/)) return pass();
- return pass(expression);
- }
-
- function maybeoperator(type, value) {
- if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
- if (type == "operator" || type == ":") return cont(expression);
- if (type == ";") return;
- if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
- if (type == ".") return cont(property, maybeoperator);
- if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
- }
-
- function maybeattribute(type) {
- if (type == "attribute") return cont(maybeattribute);
- if (type == "function") return cont(functiondef);
- if (type == "var") return cont(vardef1);
- }
-
- function metadef(type) {
- if(type == ":") return cont(metadef);
- if(type == "variable") return cont(metadef);
- if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement);
- }
- function metaargs(type) {
- if(type == "variable") return cont();
- }
-
- function importdef (type, value) {
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
- else if(type == "variable" || type == "property" || type == "." || value == "*") return cont(importdef);
- }
-
- function typedef (type, value)
- {
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
- else if (type == "type" && /[A-Z]/.test(value.charAt(0))) { return cont(); }
- }
-
- function maybelabel(type) {
- if (type == ":") return cont(poplex, statement);
- return pass(maybeoperator, expect(";"), poplex);
- }
- function property(type) {
- if (type == "variable") {cx.marked = "property"; return cont();}
- }
- function objprop(type) {
- if (type == "variable") cx.marked = "property";
- if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression);
- }
- function commasep(what, end) {
- function proceed(type) {
- if (type == ",") return cont(what, proceed);
- if (type == end) return cont();
- return cont(expect(end));
- }
- return function(type) {
- if (type == end) return cont();
- else return pass(what, proceed);
- };
- }
- function block(type) {
- if (type == "}") return cont();
- return pass(statement, block);
- }
- function vardef1(type, value) {
- if (type == "variable"){register(value); return cont(typeuse, vardef2);}
- return cont();
- }
- function vardef2(type, value) {
- if (value == "=") return cont(expression, vardef2);
- if (type == ",") return cont(vardef1);
- }
- function forspec1(type, value) {
- if (type == "variable") {
- register(value);
- }
- return cont(pushlex(")"), pushcontext, forin, expression, poplex, statement, popcontext);
- }
- function forin(_type, value) {
- if (value == "in") return cont();
- }
- function functiondef(type, value) {
- if (type == "variable") {register(value); return cont(functiondef);}
- if (value == "new") return cont(functiondef);
- if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext);
- }
- function typeuse(type) {
- if(type == ":") return cont(typestring);
- }
- function typestring(type) {
- if(type == "type") return cont();
- if(type == "variable") return cont();
- if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex);
- }
- function typeprop(type) {
- if(type == "variable") return cont(typeuse);
- }
- function funarg(type, value) {
- if (type == "variable") {register(value); return cont(typeuse);}
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"];
- return {
- tokenize: haxeTokenBase,
- reAllowed: true,
- kwAllowed: true,
- cc: [],
- lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, "block", false),
- localVars: parserConfig.localVars,
- importedtypes: defaulttypes,
- context: parserConfig.localVars && {vars: parserConfig.localVars},
- indented: 0
- };
- },
-
- token: function(stream, state) {
- if (stream.sol()) {
- if (!state.lexical.hasOwnProperty("align"))
- state.lexical.align = false;
- state.indented = stream.indentation();
- }
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
- if (type == "comment") return style;
- state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
- state.kwAllowed = type != '.';
- return parseHaxe(state, style, type, content, stream);
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != haxeTokenBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
- if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
- var type = lexical.type, closing = firstChar == type;
- if (type == "vardef") return lexical.indented + 4;
- else if (type == "form" && firstChar == "{") return lexical.indented;
- else if (type == "stat" || type == "form") return lexical.indented + indentUnit;
- else if (lexical.info == "switch" && !closing)
- return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
- else if (lexical.align) return lexical.column + (closing ? 0 : 1);
- else return lexical.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
-});
-
-CodeMirror.defineMIME("text/x-haxe", "haxe");
-
-CodeMirror.defineMode("hxml", function () {
-
- return {
- startState: function () {
- return {
- define: false,
- inString: false
- };
- },
- token: function (stream, state) {
- var ch = stream.peek();
- var sol = stream.sol();
-
- ///* comments */
- if (ch == "#") {
- stream.skipToEnd();
- return "comment";
- }
- if (sol && ch == "-") {
- var style = "variable-2";
-
- stream.eat(/-/);
-
- if (stream.peek() == "-") {
- stream.eat(/-/);
- style = "keyword a";
- }
-
- if (stream.peek() == "D") {
- stream.eat(/[D]/);
- style = "keyword c";
- state.define = true;
- }
-
- stream.eatWhile(/[A-Z]/i);
- return style;
- }
-
- var ch = stream.peek();
-
- if (state.inString == false && ch == "'") {
- state.inString = true;
- ch = stream.next();
- }
-
- if (state.inString == true) {
- if (stream.skipTo("'")) {
-
- } else {
- stream.skipToEnd();
- }
-
- if (stream.peek() == "'") {
- stream.next();
- state.inString = false;
- }
-
- return "string";
- }
-
- stream.next();
- return null;
- },
- lineComment: "#"
- };
-});
-
-CodeMirror.defineMIME("text/x-hxml", "hxml");
-
-});
diff --git a/public/js/lib/codemirror/mode/haxe/index.html b/public/js/lib/codemirror/mode/haxe/index.html
deleted file mode 100644
index d415b5e109..0000000000
--- a/public/js/lib/codemirror/mode/haxe/index.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-CodeMirror: Haxe mode
-
-
-
-
-
-
-
-
-
-
-Haxe mode
-
-
-
-import one.two.Three;
-
-@attr("test")
-class Foo<T> extends Three
-{
- public function new()
- {
- noFoo = 12;
- }
-
- public static inline function doFoo(obj:{k:Int, l:Float}):Int
- {
- for(i in 0...10)
- {
- obj.k++;
- trace(i);
- var var1 = new Array();
- if(var1.length > 1)
- throw "Error";
- }
- // The following line should not be colored, the variable is scoped out
- var1;
- /* Multi line
- * Comment test
- */
- return obj.k;
- }
- private function bar():Void
- {
- #if flash
- var t1:String = "1.21";
- #end
- try {
- doFoo({k:3, l:1.2});
- }
- catch (e : String) {
- trace(e);
- }
- var t2:Float = cast(3.2);
- var t3:haxe.Timer = new haxe.Timer();
- var t4 = {k:Std.int(t2), l:Std.parseFloat(t1)};
- var t5 = ~/123+.*$/i;
- doFoo(t4);
- untyped t1 = 4;
- bob = new Foo<Int>
- }
- public var okFoo(default, never):Float;
- var noFoo(getFoo, null):Int;
- function getFoo():Int {
- return noFoo;
- }
-
- public var three:Int;
-}
-enum Color
-{
- red;
- green;
- blue;
- grey( v : Int );
- rgb (r:Int,g:Int,b:Int);
-}
-
-
-
Hxml mode:
-
-
--cp test
--js path/to/file.js
-#-remap nme:flash
---next
--D source-map-content
--cmd 'test'
--lib lime
-
-
-
-
-
- MIME types defined: text/x-haxe, text/x-hxml
.
-
diff --git a/public/js/lib/codemirror/mode/http/http.js b/public/js/lib/codemirror/mode/http/http.js
deleted file mode 100644
index 9a3c5f9fd8..0000000000
--- a/public/js/lib/codemirror/mode/http/http.js
+++ /dev/null
@@ -1,113 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("http", function() {
- function failFirstLine(stream, state) {
- stream.skipToEnd();
- state.cur = header;
- return "error";
- }
-
- function start(stream, state) {
- if (stream.match(/^HTTP\/\d\.\d/)) {
- state.cur = responseStatusCode;
- return "keyword";
- } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
- state.cur = requestPath;
- return "keyword";
- } else {
- return failFirstLine(stream, state);
- }
- }
-
- function responseStatusCode(stream, state) {
- var code = stream.match(/^\d+/);
- if (!code) return failFirstLine(stream, state);
-
- state.cur = responseStatusText;
- var status = Number(code[0]);
- if (status >= 100 && status < 200) {
- return "positive informational";
- } else if (status >= 200 && status < 300) {
- return "positive success";
- } else if (status >= 300 && status < 400) {
- return "positive redirect";
- } else if (status >= 400 && status < 500) {
- return "negative client-error";
- } else if (status >= 500 && status < 600) {
- return "negative server-error";
- } else {
- return "error";
- }
- }
-
- function responseStatusText(stream, state) {
- stream.skipToEnd();
- state.cur = header;
- return null;
- }
-
- function requestPath(stream, state) {
- stream.eatWhile(/\S/);
- state.cur = requestProtocol;
- return "string-2";
- }
-
- function requestProtocol(stream, state) {
- if (stream.match(/^HTTP\/\d\.\d$/)) {
- state.cur = header;
- return "keyword";
- } else {
- return failFirstLine(stream, state);
- }
- }
-
- function header(stream) {
- if (stream.sol() && !stream.eat(/[ \t]/)) {
- if (stream.match(/^.*?:/)) {
- return "atom";
- } else {
- stream.skipToEnd();
- return "error";
- }
- } else {
- stream.skipToEnd();
- return "string";
- }
- }
-
- function body(stream) {
- stream.skipToEnd();
- return null;
- }
-
- return {
- token: function(stream, state) {
- var cur = state.cur;
- if (cur != header && cur != body && stream.eatSpace()) return null;
- return cur(stream, state);
- },
-
- blankLine: function(state) {
- state.cur = body;
- },
-
- startState: function() {
- return {cur: start};
- }
- };
-});
-
-CodeMirror.defineMIME("message/http", "http");
-
-});
diff --git a/public/js/lib/codemirror/mode/http/index.html b/public/js/lib/codemirror/mode/http/index.html
deleted file mode 100644
index 0b8d5315da..0000000000
--- a/public/js/lib/codemirror/mode/http/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-CodeMirror: HTTP mode
-
-
-
-
-
-
-
-
-
-
-HTTP mode
-
-
-
-POST /somewhere HTTP/1.1
-Host: example.com
-If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
-Content-Type: application/x-www-form-urlencoded;
- charset=utf-8
-User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
-
-This is the request body!
-
-
-
-
- MIME types defined: message/http
.
-
diff --git a/public/js/lib/codemirror/mode/index.html b/public/js/lib/codemirror/mode/index.html
deleted file mode 100644
index c933e1e943..0000000000
--- a/public/js/lib/codemirror/mode/index.html
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-CodeMirror: Language Modes
-
-
-
-
-
-
-
- Language modes
-
- This is a list of every mode in the distribution. Each mode lives
-in a subdirectory of the mode/
directory, and typically
-defines a single JavaScript file that implements the mode. Loading
-such file will make the language available to CodeMirror, through
-the mode
-option.
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/jinja2/index.html b/public/js/lib/codemirror/mode/jinja2/index.html
deleted file mode 100644
index 5a70e9153b..0000000000
--- a/public/js/lib/codemirror/mode/jinja2/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-CodeMirror: Jinja2 mode
-
-
-
-
-
-
-
-
-
-
-Jinja2 mode
-
-{# this is a comment #}
-{%- for item in li -%}
- <li>{{ item.label }}</li>
-{% endfor -%}
-{{ item.sand == true and item.keyword == false ? 1 : 0 }}
-{{ app.get(55, 1.2, true) }}
-{% if app.get('_route') == ('_home') %}home{% endif %}
-{% if app.session.flashbag.has('message') %}
- {% for message in app.session.flashbag.get('message') %}
- {{ message.content }}
- {% endfor %}
-{% endif %}
-{{ path('_home', {'section': app.request.get('section')}) }}
-{{ path('_home', {
- 'section': app.request.get('section'),
- 'boolean': true,
- 'number': 55.33
- })
-}}
-{% include ('test.incl.html.twig') %}
-
-
-
diff --git a/public/js/lib/codemirror/mode/jinja2/jinja2.js b/public/js/lib/codemirror/mode/jinja2/jinja2.js
deleted file mode 100644
index ed195581cf..0000000000
--- a/public/js/lib/codemirror/mode/jinja2/jinja2.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("jinja2", function() {
- var keywords = ["and", "as", "block", "endblock", "by", "cycle", "debug", "else", "elif",
- "extends", "filter", "endfilter", "firstof", "for",
- "endfor", "if", "endif", "ifchanged", "endifchanged",
- "ifequal", "endifequal", "ifnotequal",
- "endifnotequal", "in", "include", "load", "not", "now", "or",
- "parsed", "regroup", "reversed", "spaceless",
- "endspaceless", "ssi", "templatetag", "openblock",
- "closeblock", "openvariable", "closevariable",
- "openbrace", "closebrace", "opencomment",
- "closecomment", "widthratio", "url", "with", "endwith",
- "get_current_language", "trans", "endtrans", "noop", "blocktrans",
- "endblocktrans", "get_available_languages",
- "get_current_language_bidi", "plural"],
- operator = /^[+\-*&%=<>!?|~^]/,
- sign = /^[:\[\(\{]/,
- atom = ["true", "false"],
- number = /^(\d[+\-\*\/])?\d+(\.\d+)?/;
-
- keywords = new RegExp("((" + keywords.join(")|(") + "))\\b");
- atom = new RegExp("((" + atom.join(")|(") + "))\\b");
-
- function tokenBase (stream, state) {
- var ch = stream.peek();
-
- //Comment
- if (state.incomment) {
- if(!stream.skipTo("#}")) {
- stream.skipToEnd();
- } else {
- stream.eatWhile(/\#|}/);
- state.incomment = false;
- }
- return "comment";
- //Tag
- } else if (state.intag) {
- //After operator
- if(state.operator) {
- state.operator = false;
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- }
- //After sign
- if(state.sign) {
- state.sign = false;
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- }
-
- if(state.instring) {
- if(ch == state.instring) {
- state.instring = false;
- }
- stream.next();
- return "string";
- } else if(ch == "'" || ch == '"') {
- state.instring = ch;
- stream.next();
- return "string";
- } else if(stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}")) {
- state.intag = false;
- return "tag";
- } else if(stream.match(operator)) {
- state.operator = true;
- return "operator";
- } else if(stream.match(sign)) {
- state.sign = true;
- } else {
- if(stream.eat(" ") || stream.sol()) {
- if(stream.match(keywords)) {
- return "keyword";
- }
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- if(stream.sol()) {
- stream.next();
- }
- } else {
- stream.next();
- }
-
- }
- return "variable";
- } else if (stream.eat("{")) {
- if (ch = stream.eat("#")) {
- state.incomment = true;
- if(!stream.skipTo("#}")) {
- stream.skipToEnd();
- } else {
- stream.eatWhile(/\#|}/);
- state.incomment = false;
- }
- return "comment";
- //Open tag
- } else if (ch = stream.eat(/\{|%/)) {
- //Cache close tag
- state.intag = ch;
- if(ch == "{") {
- state.intag = "}";
- }
- stream.eat("-");
- return "tag";
- }
- }
- stream.next();
- };
-
- return {
- startState: function () {
- return {tokenize: tokenBase};
- },
- token: function (stream, state) {
- return state.tokenize(stream, state);
- }
- };
- });
-});
diff --git a/public/js/lib/codemirror/mode/julia/index.html b/public/js/lib/codemirror/mode/julia/index.html
deleted file mode 100644
index e1492c210f..0000000000
--- a/public/js/lib/codemirror/mode/julia/index.html
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-CodeMirror: Julia mode
-
-
-
-
-
-
-
-
-
-
-Julia mode
-
-
-#numbers
-1234
-1234im
-.234
-.234im
-2.23im
-2.3f3
-23e2
-0x234
-
-#strings
-'a'
-"asdf"
-r"regex"
-b"bytestring"
-
-"""
-multiline string
-"""
-
-#identifiers
-a
-as123
-function_name!
-
-#unicode identifiers
-# a = x\ddot
-a⃗ = ẍ
-# a = v\dot
-a⃗ = v̇
-#F\vec = m \cdotp a\vec
-F⃗ = m·a⃗
-
-#literal identifier multiples
-3x
-4[1, 2, 3]
-
-#dicts and indexing
-x=[1, 2, 3]
-x[end-1]
-x={"julia"=>"language of technical computing"}
-
-
-#exception handling
-try
- f()
-catch
- @printf "Error"
-finally
- g()
-end
-
-#types
-immutable Color{T<:Number}
- r::T
- g::T
- b::T
-end
-
-#functions
-function change!(x::Vector{Float64})
- for i = 1:length(x)
- x[i] *= 2
- end
-end
-
-#function invocation
-f('b', (2, 3)...)
-
-#operators
-|=
-&=
-^=
-\-
-%=
-*=
-+=
--=
-<=
->=
-!=
-==
-%
-*
-+
--
-<
->
-!
-=
-|
-&
-^
-\
-?
-~
-:
-$
-<:
-.<
-.>
-<<
-<<=
->>
->>>>
->>=
->>>=
-<<=
-<<<=
-.<=
-.>=
-.==
-->
-//
-in
-...
-//
-:=
-.//=
-.*=
-./=
-.^=
-.%=
-.+=
-.-=
-\=
-\\=
-||
-===
-&&
-|=
-.|=
-<:
->:
-|>
-<|
-::
-x ? y : z
-
-#macros
-@spawnat 2 1+1
-@eval(:x)
-
-#keywords and operators
-if else elseif while for
- begin let end do
-try catch finally return break continue
-global local const
-export import importall using
-function macro module baremodule
-type immutable quote
-true false enumerate
-
-
-
-
-
- MIME types defined: text/x-julia
.
-
diff --git a/public/js/lib/codemirror/mode/julia/julia.js b/public/js/lib/codemirror/mode/julia/julia.js
deleted file mode 100644
index e854988aa3..0000000000
--- a/public/js/lib/codemirror/mode/julia/julia.js
+++ /dev/null
@@ -1,301 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("julia", function(_conf, parserConf) {
- var ERRORCLASS = 'error';
-
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var operators = parserConf.operators || /^\.?[|&^\\%*+\-<>!=\/]=?|\?|~|:|\$|\.[<>]|<<=?|>>>?=?|\.[<>=]=|->?|\/\/|\bin\b/;
- var delimiters = parserConf.delimiters || /^[;,()[\]{}]/;
- var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*!*/;
- var blockOpeners = ["begin", "function", "type", "immutable", "let", "macro", "for", "while", "quote", "if", "else", "elseif", "try", "finally", "catch", "do"];
- var blockClosers = ["end", "else", "elseif", "catch", "finally"];
- var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall'];
- var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf'];
-
- //var stringPrefixes = new RegExp("^[br]?('|\")")
- var stringPrefixes = /^(`|'|"{3}|([br]?"))/;
- var keywords = wordRegexp(keywordList);
- var builtins = wordRegexp(builtinList);
- var openers = wordRegexp(blockOpeners);
- var closers = wordRegexp(blockClosers);
- var macro = /^@[_A-Za-z][_A-Za-z0-9]*/;
- var symbol = /^:[_A-Za-z][_A-Za-z0-9]*/;
- var indentInfo = null;
-
- function in_array(state) {
- var ch = cur_scope(state);
- if(ch=="[" || ch=="{") {
- return true;
- }
- else {
- return false;
- }
- }
-
- function cur_scope(state) {
- if(state.scopes.length==0) {
- return null;
- }
- return state.scopes[state.scopes.length - 1];
- }
-
- // tokenizers
- function tokenBase(stream, state) {
- // Handle scope changes
- var leaving_expr = state.leaving_expr;
- if(stream.sol()) {
- leaving_expr = false;
- }
- state.leaving_expr = false;
- if(leaving_expr) {
- if(stream.match(/^'+/)) {
- return 'operator';
- }
-
- }
-
- if(stream.match(/^\.{2,3}/)) {
- return 'operator';
- }
-
- if (stream.eatSpace()) {
- return null;
- }
-
- var ch = stream.peek();
- // Handle Comments
- if (ch === '#') {
- stream.skipToEnd();
- return 'comment';
- }
- if(ch==='[') {
- state.scopes.push("[");
- }
-
- if(ch==='{') {
- state.scopes.push("{");
- }
-
- var scope=cur_scope(state);
-
- if(scope==='[' && ch===']') {
- state.scopes.pop();
- state.leaving_expr=true;
- }
-
- if(scope==='{' && ch==='}') {
- state.scopes.pop();
- state.leaving_expr=true;
- }
-
- if(ch===')') {
- state.leaving_expr = true;
- }
-
- var match;
- if(!in_array(state) && (match=stream.match(openers, false))) {
- state.scopes.push(match);
- }
-
- if(!in_array(state) && stream.match(closers, false)) {
- state.scopes.pop();
- }
-
- if(in_array(state)) {
- if(stream.match(/^end/)) {
- return 'number';
- }
-
- }
-
- if(stream.match(/^=>/)) {
- return 'operator';
- }
-
-
- // Handle Number Literals
- if (stream.match(/^[0-9\.]/, false)) {
- var imMatcher = RegExp(/^im\b/);
- var floatLiteral = false;
- // Floats
- if (stream.match(/^\d*\.(?!\.)\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; }
- if (stream.match(/^\d+\.(?!\.)\d*/)) { floatLiteral = true; }
- if (stream.match(/^\.\d+/)) { floatLiteral = true; }
- if (floatLiteral) {
- // Float literals may be "imaginary"
- stream.match(imMatcher);
- state.leaving_expr = true;
- return 'number';
- }
- // Integers
- var intLiteral = false;
- // Hex
- if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; }
- // Binary
- if (stream.match(/^0b[01]+/i)) { intLiteral = true; }
- // Octal
- if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; }
- // Decimal
- if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) {
- intLiteral = true;
- }
- // Zero by itself with no other piece of number.
- if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; }
- if (intLiteral) {
- // Integer literals may be "long"
- stream.match(imMatcher);
- state.leaving_expr = true;
- return 'number';
- }
- }
-
- if(stream.match(/^(::)|(<:)/)) {
- return 'operator';
- }
-
- // Handle symbols
- if(!leaving_expr && stream.match(symbol)) {
- return 'string';
- }
-
- // Handle operators and Delimiters
- if (stream.match(operators)) {
- return 'operator';
- }
-
-
- // Handle Strings
- if (stream.match(stringPrefixes)) {
- state.tokenize = tokenStringFactory(stream.current());
- return state.tokenize(stream, state);
- }
-
- if (stream.match(macro)) {
- return 'meta';
- }
-
-
- if (stream.match(delimiters)) {
- return null;
- }
-
- if (stream.match(keywords)) {
- return 'keyword';
- }
-
- if (stream.match(builtins)) {
- return 'builtin';
- }
-
-
- if (stream.match(identifiers)) {
- state.leaving_expr=true;
- return 'variable';
- }
- // Handle non-detected items
- stream.next();
- return ERRORCLASS;
- }
-
- function tokenStringFactory(delimiter) {
- while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {
- delimiter = delimiter.substr(1);
- }
- var singleline = delimiter.length == 1;
- var OUTCLASS = 'string';
-
- function tokenString(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^'"\\]/);
- if (stream.eat('\\')) {
- stream.next();
- if (singleline && stream.eol()) {
- return OUTCLASS;
- }
- } else if (stream.match(delimiter)) {
- state.tokenize = tokenBase;
- return OUTCLASS;
- } else {
- stream.eat(/['"]/);
- }
- }
- if (singleline) {
- if (parserConf.singleLineStringErrors) {
- return ERRORCLASS;
- } else {
- state.tokenize = tokenBase;
- }
- }
- return OUTCLASS;
- }
- tokenString.isString = true;
- return tokenString;
- }
-
- function tokenLexer(stream, state) {
- indentInfo = null;
- var style = state.tokenize(stream, state);
- var current = stream.current();
-
- // Handle '.' connected identifiers
- if (current === '.') {
- style = stream.match(identifiers, false) ? null : ERRORCLASS;
- if (style === null && state.lastStyle === 'meta') {
- // Apply 'meta' style to '.' connected identifiers when
- // appropriate.
- style = 'meta';
- }
- return style;
- }
-
- return style;
- }
-
- var external = {
- startState: function() {
- return {
- tokenize: tokenBase,
- scopes: [],
- leaving_expr: false
- };
- },
-
- token: function(stream, state) {
- var style = tokenLexer(stream, state);
- state.lastStyle = style;
- return style;
- },
-
- indent: function(state, textAfter) {
- var delta = 0;
- if(textAfter=="end" || textAfter=="]" || textAfter=="}" || textAfter=="else" || textAfter=="elseif" || textAfter=="catch" || textAfter=="finally") {
- delta = -1;
- }
- return (state.scopes.length + delta) * 4;
- },
-
- lineComment: "#",
- fold: "indent",
- electricChars: "edlsifyh]}"
- };
- return external;
-});
-
-
-CodeMirror.defineMIME("text/x-julia", "julia");
-
-});
diff --git a/public/js/lib/codemirror/mode/kotlin/index.html b/public/js/lib/codemirror/mode/kotlin/index.html
deleted file mode 100644
index 859e109fb8..0000000000
--- a/public/js/lib/codemirror/mode/kotlin/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-CodeMirror: Kotlin mode
-
-
-
-
-
-
-
-
-
-
-Kotlin mode
-
-
-
-package org.wasabi.http
-
-import java.util.concurrent.Executors
-import java.net.InetSocketAddress
-import org.wasabi.app.AppConfiguration
-import io.netty.bootstrap.ServerBootstrap
-import io.netty.channel.nio.NioEventLoopGroup
-import io.netty.channel.socket.nio.NioServerSocketChannel
-import org.wasabi.app.AppServer
-
-public class HttpServer(private val appServer: AppServer) {
-
- val bootstrap: ServerBootstrap
- val primaryGroup: NioEventLoopGroup
- val workerGroup: NioEventLoopGroup
-
- {
- // Define worker groups
- primaryGroup = NioEventLoopGroup()
- workerGroup = NioEventLoopGroup()
-
- // Initialize bootstrap of server
- bootstrap = ServerBootstrap()
-
- bootstrap.group(primaryGroup, workerGroup)
- bootstrap.channel(javaClass())
- bootstrap.childHandler(NettyPipelineInitializer(appServer))
- }
-
- public fun start(wait: Boolean = true) {
- val channel = bootstrap.bind(appServer.configuration.port)?.sync()?.channel()
-
- if (wait) {
- channel?.closeFuture()?.sync()
- }
- }
-
- public fun stop() {
- // Shutdown all event loops
- primaryGroup.shutdownGracefully()
- workerGroup.shutdownGracefully()
-
- // Wait till all threads are terminated
- primaryGroup.terminationFuture().sync()
- workerGroup.terminationFuture().sync()
- }
-}
-
-
-
- Mode for Kotlin (http://kotlin.jetbrains.org/)
- Developed by Hadi Hariri (https://github.com/hhariri).
- MIME type defined: text/x-kotlin
.
-
diff --git a/public/js/lib/codemirror/mode/kotlin/kotlin.js b/public/js/lib/codemirror/mode/kotlin/kotlin.js
deleted file mode 100644
index 73c84f6c4f..0000000000
--- a/public/js/lib/codemirror/mode/kotlin/kotlin.js
+++ /dev/null
@@ -1,280 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("kotlin", function (config, parserConfig) {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var multiLineStrings = parserConfig.multiLineStrings;
-
- var keywords = words(
- "package continue return object while break class data trait throw super" +
- " when type this else This try val var fun for is in if do as true false null get set");
- var softKeywords = words("import" +
- " where by get set abstract enum open annotation override private public internal" +
- " protected catch out vararg inline finally final ref");
- var blockKeywords = words("catch class do else finally for if where try while enum");
- var atoms = words("null true false this");
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'") {
- return startString(ch, stream, state);
- }
- // Wildcard import w/o trailing semicolon (import smth.*)
- if (ch == "." && stream.eat("*")) {
- return "word";
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- if (stream.eat(/eE/)) {
- stream.eat(/\+\-/);
- stream.eatWhile(/\d/);
- }
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize.push(tokenComment);
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- if (expectExpression(state.lastToken)) {
- return startString(ch, stream, state);
- }
- }
- // Commented
- if (ch == "-" && stream.eat(">")) {
- curPunc = "->";
- return null;
- }
- if (/[\-+*&%=<>!?|\/~]/.test(ch)) {
- stream.eatWhile(/[\-+*&%=<>|~]/);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
-
- var cur = stream.current();
- if (atoms.propertyIsEnumerable(cur)) {
- return "atom";
- }
- if (softKeywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "softKeyword";
- }
-
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- return "word";
- }
-
- tokenBase.isBase = true;
-
- function startString(quote, stream, state) {
- var tripleQuoted = false;
- if (quote != "/" && stream.eat(quote)) {
- if (stream.eat(quote)) tripleQuoted = true;
- else return "string";
- }
- function t(stream, state) {
- var escaped = false, next, end = !tripleQuoted;
-
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- if (!tripleQuoted) {
- break;
- }
- if (stream.match(quote + quote)) {
- end = true;
- break;
- }
- }
-
- if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
- state.tokenize.push(tokenBaseUntilBrace());
- return "string";
- }
-
- if (next == "$" && !escaped && !stream.eat(" ")) {
- state.tokenize.push(tokenBaseUntilSpace());
- return "string";
- }
- escaped = !escaped && next == "\\";
- }
- if (multiLineStrings)
- state.tokenize.push(t);
- if (end) state.tokenize.pop();
- return "string";
- }
-
- state.tokenize.push(t);
- return t(stream, state);
- }
-
- function tokenBaseUntilBrace() {
- var depth = 1;
-
- function t(stream, state) {
- if (stream.peek() == "}") {
- depth--;
- if (depth == 0) {
- state.tokenize.pop();
- return state.tokenize[state.tokenize.length - 1](stream, state);
- }
- } else if (stream.peek() == "{") {
- depth++;
- }
- return tokenBase(stream, state);
- }
-
- t.isBase = true;
- return t;
- }
-
- function tokenBaseUntilSpace() {
- function t(stream, state) {
- if (stream.eat(/[\w]/)) {
- var isWord = stream.eatWhile(/[\w]/);
- if (isWord) {
- state.tokenize.pop();
- return "word";
- }
- }
- state.tokenize.pop();
- return "string";
- }
-
- t.isBase = true;
- return t;
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize.pop();
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function expectExpression(last) {
- return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
- last == "newstatement" || last == "keyword" || last == "proplabel";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
-
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
-
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function (basecolumn) {
- return {
- tokenize: [tokenBase],
- context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true,
- lastToken: null
- };
- },
-
- token: function (stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- // Automatic semicolon insertion
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) {
- popContext(state);
- ctx = state.context;
- }
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = state.tokenize[state.tokenize.length - 1](stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- // Handle indentation for {x -> \n ... }
- else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
- popContext(state);
- state.context.align = false;
- }
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- state.lastToken = curPunc || style;
- return style;
- },
-
- indent: function (state, textAfter) {
- if (!state.tokenize[state.tokenize.length - 1].isBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") {
- return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
- }
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : config.indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-kotlin", "kotlin");
-
-});
diff --git a/public/js/lib/codemirror/mode/livescript/index.html b/public/js/lib/codemirror/mode/livescript/index.html
deleted file mode 100644
index f415479876..0000000000
--- a/public/js/lib/codemirror/mode/livescript/index.html
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
-CodeMirror: LiveScript mode
-
-
-
-
-
-
-
-
-
-
-
-LiveScript mode
-
-# LiveScript mode for CodeMirror
-# The following script, prelude.ls, is used to
-# demonstrate LiveScript mode for CodeMirror.
-# https://github.com/gkz/prelude-ls
-
-export objToFunc = objToFunc = (obj) ->
- (key) -> obj[key]
-
-export each = (f, xs) -->
- if typeof! xs is \Object
- for , x of xs then f x
- else
- for x in xs then f x
- xs
-
-export map = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, f x] for key, x of xs}
- else
- result = [f x for x in xs]
- if type is \String then result * '' else result
-
-export filter = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, x] for key, x of xs when f x}
- else
- result = [x for x in xs when f x]
- if type is \String then result * '' else result
-
-export reject = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, x] for key, x of xs when not f x}
- else
- result = [x for x in xs when not f x]
- if type is \String then result * '' else result
-
-export partition = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- passed = {}
- failed = {}
- for key, x of xs
- (if f x then passed else failed)[key] = x
- else
- passed = []
- failed = []
- for x in xs
- (if f x then passed else failed)push x
- if type is \String
- passed *= ''
- failed *= ''
- [passed, failed]
-
-export find = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- if typeof! xs is \Object
- for , x of xs when f x then return x
- else
- for x in xs when f x then return x
- void
-
-export head = export first = (xs) ->
- return void if not xs.length
- xs.0
-
-export tail = (xs) ->
- return void if not xs.length
- xs.slice 1
-
-export last = (xs) ->
- return void if not xs.length
- xs[*-1]
-
-export initial = (xs) ->
- return void if not xs.length
- xs.slice 0 xs.length - 1
-
-export empty = (xs) ->
- if typeof! xs is \Object
- for x of xs then return false
- return yes
- not xs.length
-
-export values = (obj) ->
- [x for , x of obj]
-
-export keys = (obj) ->
- [x for x of obj]
-
-export len = (xs) ->
- xs = values xs if typeof! xs is \Object
- xs.length
-
-export cons = (x, xs) -->
- if typeof! xs is \String then x + xs else [x] ++ xs
-
-export append = (xs, ys) -->
- if typeof! ys is \String then xs + ys else xs ++ ys
-
-export join = (sep, xs) -->
- xs = values xs if typeof! xs is \Object
- xs.join sep
-
-export reverse = (xs) ->
- if typeof! xs is \String
- then (xs / '')reverse! * ''
- else xs.slice!reverse!
-
-export fold = export foldl = (f, memo, xs) -->
- if typeof! xs is \Object
- for , x of xs then memo = f memo, x
- else
- for x in xs then memo = f memo, x
- memo
-
-export fold1 = export foldl1 = (f, xs) --> fold f, xs.0, xs.slice 1
-
-export foldr = (f, memo, xs) --> fold f, memo, xs.slice!reverse!
-
-export foldr1 = (f, xs) -->
- xs.=slice!reverse!
- fold f, xs.0, xs.slice 1
-
-export unfoldr = export unfold = (f, b) -->
- if (f b)?
- [that.0] ++ unfoldr f, that.1
- else
- []
-
-export andList = (xs) ->
- for x in xs when not x
- return false
- true
-
-export orList = (xs) ->
- for x in xs when x
- return true
- false
-
-export any = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- for x in xs when f x
- return yes
- no
-
-export all = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- for x in xs when not f x
- return no
- yes
-
-export unique = (xs) ->
- result = []
- if typeof! xs is \Object
- for , x of xs when x not in result then result.push x
- else
- for x in xs when x not in result then result.push x
- if typeof! xs is \String then result * '' else result
-
-export sort = (xs) ->
- xs.concat!sort (x, y) ->
- | x > y => 1
- | x < y => -1
- | _ => 0
-
-export sortBy = (f, xs) -->
- return [] unless xs.length
- xs.concat!sort f
-
-export compare = (f, x, y) -->
- | (f x) > (f y) => 1
- | (f x) < (f y) => -1
- | otherwise => 0
-
-export sum = (xs) ->
- result = 0
- if typeof! xs is \Object
- for , x of xs then result += x
- else
- for x in xs then result += x
- result
-
-export product = (xs) ->
- result = 1
- if typeof! xs is \Object
- for , x of xs then result *= x
- else
- for x in xs then result *= x
- result
-
-export mean = export average = (xs) -> (sum xs) / len xs
-
-export concat = (xss) -> fold append, [], xss
-
-export concatMap = (f, xs) --> fold ((memo, x) -> append memo, f x), [], xs
-
-export listToObj = (xs) ->
- {[x.0, x.1] for x in xs}
-
-export maximum = (xs) -> fold1 (>?), xs
-
-export minimum = (xs) -> fold1 (), xs
-
-export scan = export scanl = (f, memo, xs) -->
- last = memo
- if typeof! xs is \Object
- then [memo] ++ [last = f last, x for , x of xs]
- else [memo] ++ [last = f last, x for x in xs]
-
-export scan1 = export scanl1 = (f, xs) --> scan f, xs.0, xs.slice 1
-
-export scanr = (f, memo, xs) -->
- xs.=slice!reverse!
- scan f, memo, xs .reverse!
-
-export scanr1 = (f, xs) -->
- xs.=slice!reverse!
- scan f, xs.0, xs.slice 1 .reverse!
-
-export replicate = (n, x) -->
- result = []
- i = 0
- while i < n, ++i then result.push x
- result
-
-export take = (n, xs) -->
- | n <= 0
- if typeof! xs is \String then '' else []
- | not xs.length => xs
- | otherwise => xs.slice 0, n
-
-export drop = (n, xs) -->
- | n <= 0 => xs
- | not xs.length => xs
- | otherwise => xs.slice n
-
-export splitAt = (n, xs) --> [(take n, xs), (drop n, xs)]
-
-export takeWhile = (p, xs) -->
- return xs if not xs.length
- p = objToFunc p if typeof! p isnt \Function
- result = []
- for x in xs
- break if not p x
- result.push x
- if typeof! xs is \String then result * '' else result
-
-export dropWhile = (p, xs) -->
- return xs if not xs.length
- p = objToFunc p if typeof! p isnt \Function
- i = 0
- for x in xs
- break if not p x
- ++i
- drop i, xs
-
-export span = (p, xs) --> [(takeWhile p, xs), (dropWhile p, xs)]
-
-export breakIt = (p, xs) --> span (not) << p, xs
-
-export zip = (xs, ys) -->
- result = []
- for zs, i in [xs, ys]
- for z, j in zs
- result.push [] if i is 0
- result[j]?push z
- result
-
-export zipWith = (f,xs, ys) -->
- f = objToFunc f if typeof! f isnt \Function
- if not xs.length or not ys.length
- []
- else
- [f.apply this, zs for zs in zip.call this, xs, ys]
-
-export zipAll = (...xss) ->
- result = []
- for xs, i in xss
- for x, j in xs
- result.push [] if i is 0
- result[j]?push x
- result
-
-export zipAllWith = (f, ...xss) ->
- f = objToFunc f if typeof! f isnt \Function
- if not xss.0.length or not xss.1.length
- []
- else
- [f.apply this, xs for xs in zipAll.apply this, xss]
-
-export compose = (...funcs) ->
- ->
- args = arguments
- for f in funcs
- args = [f.apply this, args]
- args.0
-
-export curry = (f) ->
- curry$ f # using util method curry$ from livescript
-
-export id = (x) -> x
-
-export flip = (f, x, y) --> f y, x
-
-export fix = (f) ->
- ( (g, x) -> -> f(g g) ...arguments ) do
- (g, x) -> -> f(g g) ...arguments
-
-export lines = (str) ->
- return [] if not str.length
- str / \\n
-
-export unlines = (strs) -> strs * \\n
-
-export words = (str) ->
- return [] if not str.length
- str / /[ ]+/
-
-export unwords = (strs) -> strs * ' '
-
-export max = (>?)
-
-export min = ()
-
-export negate = (x) -> -x
-
-export abs = Math.abs
-
-export signum = (x) ->
- | x < 0 => -1
- | x > 0 => 1
- | otherwise => 0
-
-export quot = (x, y) --> ~~(x / y)
-
-export rem = (%)
-
-export div = (x, y) --> Math.floor x / y
-
-export mod = (%%)
-
-export recip = (1 /)
-
-export pi = Math.PI
-
-export tau = pi * 2
-
-export exp = Math.exp
-
-export sqrt = Math.sqrt
-
-# changed from log as log is a
-# common function for logging things
-export ln = Math.log
-
-export pow = (^)
-
-export sin = Math.sin
-
-export tan = Math.tan
-
-export cos = Math.cos
-
-export asin = Math.asin
-
-export acos = Math.acos
-
-export atan = Math.atan
-
-export atan2 = (x, y) --> Math.atan2 x, y
-
-# sinh
-# tanh
-# cosh
-# asinh
-# atanh
-# acosh
-
-export truncate = (x) -> ~~x
-
-export round = Math.round
-
-export ceiling = Math.ceil
-
-export floor = Math.floor
-
-export isItNaN = (x) -> x isnt x
-
-export even = (x) -> x % 2 == 0
-
-export odd = (x) -> x % 2 != 0
-
-export gcd = (x, y) -->
- x = Math.abs x
- y = Math.abs y
- until y is 0
- z = x % y
- x = y
- y = z
- x
-
-export lcm = (x, y) -->
- Math.abs Math.floor (x / (gcd x, y) * y)
-
-# meta
-export installPrelude = !(target) ->
- unless target.prelude?isInstalled
- target <<< out$ # using out$ generated by livescript
- target <<< target.prelude.isInstalled = true
-
-export prelude = out$
-
-
-
- MIME types defined: text/x-livescript
.
-
- The LiveScript mode was written by Kenneth Bentley.
-
-
diff --git a/public/js/lib/codemirror/mode/livescript/livescript.js b/public/js/lib/codemirror/mode/livescript/livescript.js
deleted file mode 100644
index 55882efc3b..0000000000
--- a/public/js/lib/codemirror/mode/livescript/livescript.js
+++ /dev/null
@@ -1,280 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Link to the project's GitHub page:
- * https://github.com/duralog/CodeMirror
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode('livescript', function(){
- var tokenBase = function(stream, state) {
- var next_rule = state.next || "start";
- if (next_rule) {
- state.next = state.next;
- var nr = Rules[next_rule];
- if (nr.splice) {
- for (var i$ = 0; i$ < nr.length; ++i$) {
- var r = nr[i$], m;
- if (r.regex && (m = stream.match(r.regex))) {
- state.next = r.next || state.next;
- return r.token;
- }
- }
- stream.next();
- return 'error';
- }
- if (stream.match(r = Rules[next_rule])) {
- if (r.regex && stream.match(r.regex)) {
- state.next = r.next;
- return r.token;
- } else {
- stream.next();
- return 'error';
- }
- }
- }
- stream.next();
- return 'error';
- };
- var external = {
- startState: function(){
- return {
- next: 'start',
- lastToken: null
- };
- },
- token: function(stream, state){
- while (stream.pos == stream.start)
- var style = tokenBase(stream, state);
- state.lastToken = {
- style: style,
- indent: stream.indentation(),
- content: stream.current()
- };
- return style.replace(/\./g, ' ');
- },
- indent: function(state){
- var indentation = state.lastToken.indent;
- if (state.lastToken.content.match(indenter)) {
- indentation += 2;
- }
- return indentation;
- }
- };
- return external;
- });
-
- var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
- var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
- var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
- var stringfill = {
- token: 'string',
- regex: '.+'
- };
- var Rules = {
- start: [
- {
- token: 'comment.doc',
- regex: '/\\*',
- next: 'comment'
- }, {
- token: 'comment',
- regex: '#.*'
- }, {
- token: 'keyword',
- regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
- }, {
- token: 'constant.language',
- regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
- }, {
- token: 'invalid.illegal',
- regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
- }, {
- token: 'language.support.class',
- regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
- }, {
- token: 'language.support.function',
- regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
- }, {
- token: 'variable.language',
- regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
- }, {
- token: 'identifier',
- regex: identifier + '\\s*:(?![:=])'
- }, {
- token: 'variable',
- regex: identifier
- }, {
- token: 'keyword.operator',
- regex: '(?:\\.{3}|\\s+\\?)'
- }, {
- token: 'keyword.variable',
- regex: '(?:@+|::|\\.\\.)',
- next: 'key'
- }, {
- token: 'keyword.operator',
- regex: '\\.\\s*',
- next: 'key'
- }, {
- token: 'string',
- regex: '\\\\\\S[^\\s,;)}\\]]*'
- }, {
- token: 'string.doc',
- regex: '\'\'\'',
- next: 'qdoc'
- }, {
- token: 'string.doc',
- regex: '"""',
- next: 'qqdoc'
- }, {
- token: 'string',
- regex: '\'',
- next: 'qstring'
- }, {
- token: 'string',
- regex: '"',
- next: 'qqstring'
- }, {
- token: 'string',
- regex: '`',
- next: 'js'
- }, {
- token: 'string',
- regex: '<\\[',
- next: 'words'
- }, {
- token: 'string.regex',
- regex: '//',
- next: 'heregex'
- }, {
- token: 'string.regex',
- regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
- next: 'key'
- }, {
- token: 'constant.numeric',
- regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
- }, {
- token: 'lparen',
- regex: '[({[]'
- }, {
- token: 'rparen',
- regex: '[)}\\]]',
- next: 'key'
- }, {
- token: 'keyword.operator',
- regex: '\\S+'
- }, {
- token: 'text',
- regex: '\\s+'
- }
- ],
- heregex: [
- {
- token: 'string.regex',
- regex: '.*?//[gimy$?]{0,4}',
- next: 'start'
- }, {
- token: 'string.regex',
- regex: '\\s*#{'
- }, {
- token: 'comment.regex',
- regex: '\\s+(?:#.*)?'
- }, {
- token: 'string.regex',
- regex: '\\S+'
- }
- ],
- key: [
- {
- token: 'keyword.operator',
- regex: '[.?@!]+'
- }, {
- token: 'identifier',
- regex: identifier,
- next: 'start'
- }, {
- token: 'text',
- regex: '',
- next: 'start'
- }
- ],
- comment: [
- {
- token: 'comment.doc',
- regex: '.*?\\*/',
- next: 'start'
- }, {
- token: 'comment.doc',
- regex: '.+'
- }
- ],
- qdoc: [
- {
- token: 'string',
- regex: ".*?'''",
- next: 'key'
- }, stringfill
- ],
- qqdoc: [
- {
- token: 'string',
- regex: '.*?"""',
- next: 'key'
- }, stringfill
- ],
- qstring: [
- {
- token: 'string',
- regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
- next: 'key'
- }, stringfill
- ],
- qqstring: [
- {
- token: 'string',
- regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
- next: 'key'
- }, stringfill
- ],
- js: [
- {
- token: 'string',
- regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
- next: 'key'
- }, stringfill
- ],
- words: [
- {
- token: 'string',
- regex: '.*?\\]>',
- next: 'key'
- }, stringfill
- ]
- };
- for (var idx in Rules) {
- var r = Rules[idx];
- if (r.splice) {
- for (var i = 0, len = r.length; i < len; ++i) {
- var rr = r[i];
- if (typeof rr.regex === 'string') {
- Rules[idx][i].regex = new RegExp('^' + rr.regex);
- }
- }
- } else if (typeof rr.regex === 'string') {
- Rules[idx].regex = new RegExp('^' + r.regex);
- }
- }
-
- CodeMirror.defineMIME('text/x-livescript', 'livescript');
-
-});
diff --git a/public/js/lib/codemirror/mode/lua/index.html b/public/js/lib/codemirror/mode/lua/index.html
deleted file mode 100644
index fc98b94468..0000000000
--- a/public/js/lib/codemirror/mode/lua/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Lua mode
-
-
-
-
-
-
-
-
-
-
-
-
-Lua mode
-
---[[
-example useless code to show lua syntax highlighting
-this is multiline comment
-]]
-
-function blahblahblah(x)
-
- local table = {
- "asd" = 123,
- "x" = 0.34,
- }
- if x ~= 3 then
- print( x )
- elseif x == "string"
- my_custom_function( 0x34 )
- else
- unknown_function( "some string" )
- end
-
- --single line comment
-
-end
-
-function blablabla3()
-
- for k,v in ipairs( table ) do
- --abcde..
- y=[=[
- x=[[
- x is a multi line string
- ]]
- but its definition is iside a highest level string!
- ]=]
- print(" \"\" ")
-
- s = math.sin( x )
- end
-
-end
-
-
-
- Loosely based on Franciszek
- Wawrzak's CodeMirror
- 1 mode . One configuration parameter is
- supported, specials
, to which you can provide an
- array of strings to have those identifiers highlighted with
- the lua-special
style.
- MIME types defined: text/x-lua
.
-
-
diff --git a/public/js/lib/codemirror/mode/lua/lua.js b/public/js/lib/codemirror/mode/lua/lua.js
deleted file mode 100644
index 0b19abd304..0000000000
--- a/public/js/lib/codemirror/mode/lua/lua.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's
-// CodeMirror 1 mode.
-// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("lua", function(config, parserConfig) {
- var indentUnit = config.indentUnit;
-
- function prefixRE(words) {
- return new RegExp("^(?:" + words.join("|") + ")", "i");
- }
- function wordRE(words) {
- return new RegExp("^(?:" + words.join("|") + ")$", "i");
- }
- var specials = wordRE(parserConfig.specials || []);
-
- // long list of standard functions from lua manual
- var builtins = wordRE([
- "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load",
- "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require",
- "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",
-
- "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",
-
- "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable",
- "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable",
- "debug.setupvalue","debug.traceback",
-
- "close","flush","lines","read","seek","setvbuf","write",
-
- "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin",
- "io.stdout","io.tmpfile","io.type","io.write",
-
- "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg",
- "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max",
- "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh",
- "math.sqrt","math.tan","math.tanh",
-
- "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale",
- "os.time","os.tmpname",
-
- "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload",
- "package.seeall",
-
- "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub",
- "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",
-
- "table.concat","table.insert","table.maxn","table.remove","table.sort"
- ]);
- var keywords = wordRE(["and","break","elseif","false","nil","not","or","return",
- "true","function", "end", "if", "then", "else", "do",
- "while", "repeat", "until", "for", "in", "local" ]);
-
- var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]);
- var dedentTokens = wordRE(["end", "until", "\\)", "}"]);
- var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]);
-
- function readBracket(stream) {
- var level = 0;
- while (stream.eat("=")) ++level;
- stream.eat("[");
- return level;
- }
-
- function normal(stream, state) {
- var ch = stream.next();
- if (ch == "-" && stream.eat("-")) {
- if (stream.eat("[") && stream.eat("["))
- return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state);
- stream.skipToEnd();
- return "comment";
- }
- if (ch == "\"" || ch == "'")
- return (state.cur = string(ch))(stream, state);
- if (ch == "[" && /[\[=]/.test(stream.peek()))
- return (state.cur = bracketed(readBracket(stream), "string"))(stream, state);
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w.%]/);
- return "number";
- }
- if (/[\w_]/.test(ch)) {
- stream.eatWhile(/[\w\\\-_.]/);
- return "variable";
- }
- return null;
- }
-
- function bracketed(level, style) {
- return function(stream, state) {
- var curlev = null, ch;
- while ((ch = stream.next()) != null) {
- if (curlev == null) {if (ch == "]") curlev = 0;}
- else if (ch == "=") ++curlev;
- else if (ch == "]" && curlev == level) { state.cur = normal; break; }
- else curlev = null;
- }
- return style;
- };
- }
-
- function string(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped) break;
- escaped = !escaped && ch == "\\";
- }
- if (!escaped) state.cur = normal;
- return "string";
- };
- }
-
- return {
- startState: function(basecol) {
- return {basecol: basecol || 0, indentDepth: 0, cur: normal};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = state.cur(stream, state);
- var word = stream.current();
- if (style == "variable") {
- if (keywords.test(word)) style = "keyword";
- else if (builtins.test(word)) style = "builtin";
- else if (specials.test(word)) style = "variable-2";
- }
- if ((style != "comment") && (style != "string")){
- if (indentTokens.test(word)) ++state.indentDepth;
- else if (dedentTokens.test(word)) --state.indentDepth;
- }
- return style;
- },
-
- indent: function(state, textAfter) {
- var closing = dedentPartial.test(textAfter);
- return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));
- },
-
- lineComment: "--",
- blockCommentStart: "--[[",
- blockCommentEnd: "]]"
- };
-});
-
-CodeMirror.defineMIME("text/x-lua", "lua");
-
-});
diff --git a/public/js/lib/codemirror/mode/mirc/index.html b/public/js/lib/codemirror/mode/mirc/index.html
deleted file mode 100644
index fd2f34e4ba..0000000000
--- a/public/js/lib/codemirror/mode/mirc/index.html
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-CodeMirror: mIRC mode
-
-
-
-
-
-
-
-
-
-
-
-mIRC mode
-
-;AKA Nick Tracker by Ford_Lawnmower irc.GeekShed.net #Script-Help
-;*****************************************************************************;
-;**Start Setup
-;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
-alias -l JoinDisplay { return 1 }
-;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
-alias -l MaxNicks { return 20 }
-;Change AKALogo, below, To the text you want displayed before each AKA result.
-alias -l AKALogo { return 06 05A06K07A 06 }
-;**End Setup
-;*****************************************************************************;
-On *:Join:#: {
- if ($nick == $me) { .timer 1 1 ialupdateCheck $chan }
- NickNamesAdd $nick $+($network,$wildsite)
- if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
-}
-on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
-alias -l NickNames.display {
- if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
- echo -g $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44)),2,-1)
- }
-}
-alias -l NickNamesAdd {
- if ($hget(NickNames,$2)) {
- if (!$regex($hget(NickNames,$2),/~\Q $+ $replacecs($1,\E,\E\\E\Q) $+ \E~/i)) {
- if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
- hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
- }
- else {
- hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
- }
- }
- }
- else {
- hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
- }
-}
-alias -l Fix.All.MindUser {
- var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}~/,0,r).data
- while (%Fix.Count) {
- if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data))) {
- echo -ag Record %Fix.Count - $v1 - Was Cleaned
- hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data $v1
- }
- dec %Fix.Count
- }
-}
-alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}~/g,$null) }
-menu nicklist,query {
- -
- .AKA
- ..Check $$1: {
- if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
- NickNames.display $1 $active $network $address($1,2)
- }
- else { echo -ag $AKALogo $+(09,$1) 07has not been known by any other nicknames while I have been watching. }
- }
- ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
- ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
- ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
- -
-}
-menu status,channel {
- -
- .AKA
- ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
- ..Clean All Records:Fix.All.Minduser
- -
-}
-dialog AKA_Search {
- title "AKA Search Engine"
- size -1 -1 206 221
- option dbu
- edit "", 1, 8 5 149 10, autohs
- button "Search", 2, 163 4 32 12
- radio "Search HostMask", 4, 61 22 55 10
- radio "Search Nicknames", 5, 123 22 56 10
- list 6, 8 38 190 169, sort extsel vsbar
- button "Check Selected", 7, 67 206 40 12
- button "Close", 8, 160 206 38 12, cancel
- box "Search Type", 3, 11 17 183 18
- button "Copy to Clipboard", 9, 111 206 46 12
-}
-On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
-On *:Dialog:Aka_Search:Sclick:2,7,9: {
- if ($did == 2) && ($did($dname,1)) {
- did -r $dname 6
- var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
- while (%matches) {
- did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
- dec %matches
- }
- did -c $dname 6 1
- }
- elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
- elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
-}
-On *:Start:{
- if (!$hget(NickNames)) { hmake NickNames 10 }
- if ($isfile(NickNames.hsh)) { hload NickNames NickNames.hsh }
-}
-On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
-On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
-On *:Unload: { hfree NickNames }
-alias -l ialupdateCheck {
- inc -z $+(%,ialupdateCheck,$network) $calc($nick($1,0) / 4)
- ;If your ial is already being updated on join .who $1 out.
- ;If you are using /names to update ial you will still need this line.
- .who $1
-}
-Raw 352:*: {
- if ($($+(%,ialupdateCheck,$network),2)) haltdef
- NickNamesAdd $6 $+($network,$address($6,2))
-}
-Raw 315:*: {
- if ($($+(%,ialupdateCheck,$network),2)) haltdef
-}
-
-
-
-
- MIME types defined: text/mirc
.
-
-
diff --git a/public/js/lib/codemirror/mode/mirc/mirc.js b/public/js/lib/codemirror/mode/mirc/mirc.js
deleted file mode 100644
index f0d5c6ad50..0000000000
--- a/public/js/lib/codemirror/mode/mirc/mirc.js
+++ /dev/null
@@ -1,193 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMIME("text/mirc", "mirc");
-CodeMirror.defineMode("mirc", function() {
- function parseWords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " +
- "$activewid $address $addtok $agent $agentname $agentstat $agentver " +
- "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " +
- "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " +
- "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " +
- "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " +
- "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " +
- "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " +
- "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " +
- "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " +
- "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " +
- "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " +
- "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " +
- "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " +
- "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " +
- "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " +
- "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " +
- "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " +
- "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " +
- "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " +
- "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " +
- "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " +
- "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " +
- "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " +
- "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " +
- "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " +
- "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " +
- "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " +
- "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " +
- "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " +
- "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " +
- "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " +
- "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " +
- "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " +
- "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " +
- "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor");
- var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " +
- "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " +
- "channel clear clearall cline clipboard close cnick color comclose comopen " +
- "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " +
- "debug dec describe dialog did didtok disable disconnect dlevel dline dll " +
- "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " +
- "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " +
- "events exit fclose filter findtext finger firewall flash flist flood flush " +
- "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " +
- "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " +
- "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " +
- "ialmark identd if ignore iline inc invite iuser join kick linesep links list " +
- "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " +
- "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " +
- "qme qmsg query queryn quit raw reload remini remote remove rename renwin " +
- "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " +
- "say scid scon server set showmirc signam sline sockaccept sockclose socklist " +
- "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " +
- "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " +
- "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " +
- "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " +
- "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " +
- "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " +
- "elseif else goto menu nicklist status title icon size option text edit " +
- "button check radio box scroll list combo link tab item");
- var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
- var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
- function tokenBase(stream, state) {
- var beforeParams = state.beforeParams;
- state.beforeParams = false;
- var ch = stream.next();
- if (/[\[\]{}\(\),\.]/.test(ch)) {
- if (ch == "(" && beforeParams) state.inParams = true;
- else if (ch == ")") state.inParams = false;
- return null;
- }
- else if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- else if (ch == "\\") {
- stream.eat("\\");
- stream.eat(/./);
- return "number";
- }
- else if (ch == "/" && stream.eat("*")) {
- return chain(stream, state, tokenComment);
- }
- else if (ch == ";" && stream.match(/ *\( *\(/)) {
- return chain(stream, state, tokenUnparsed);
- }
- else if (ch == ";" && !state.inParams) {
- stream.skipToEnd();
- return "comment";
- }
- else if (ch == '"') {
- stream.eat(/"/);
- return "keyword";
- }
- else if (ch == "$") {
- stream.eatWhile(/[$_a-z0-9A-Z\.:]/);
- if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {
- return "keyword";
- }
- else {
- state.beforeParams = true;
- return "builtin";
- }
- }
- else if (ch == "%") {
- stream.eatWhile(/[^,^\s^\(^\)]/);
- state.beforeParams = true;
- return "string";
- }
- else if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- else {
- stream.eatWhile(/[\w\$_{}]/);
- var word = stream.current().toLowerCase();
- if (keywords && keywords.propertyIsEnumerable(word))
- return "keyword";
- if (functions && functions.propertyIsEnumerable(word)) {
- state.beforeParams = true;
- return "keyword";
- }
- return null;
- }
- }
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
- function tokenUnparsed(stream, state) {
- var maybeEnd = 0, ch;
- while (ch = stream.next()) {
- if (ch == ";" && maybeEnd == 2) {
- state.tokenize = tokenBase;
- break;
- }
- if (ch == ")")
- maybeEnd++;
- else if (ch != " ")
- maybeEnd = 0;
- }
- return "meta";
- }
- return {
- startState: function() {
- return {
- tokenize: tokenBase,
- beforeParams: false,
- inParams: false
- };
- },
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- return state.tokenize(stream, state);
- }
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/mllike/index.html b/public/js/lib/codemirror/mode/mllike/index.html
deleted file mode 100644
index 5923af8f87..0000000000
--- a/public/js/lib/codemirror/mode/mllike/index.html
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-CodeMirror: ML-like mode
-
-
-
-
-
-
-
-
-
-
-
-OCaml mode
-
-
-
-(* Summing a list of integers *)
-let rec sum xs =
- match xs with
- | [] -> 0
- | x :: xs' -> x + sum xs'
-
-(* Quicksort *)
-let rec qsort = function
- | [] -> []
- | pivot :: rest ->
- let is_less x = x < pivot in
- let left, right = List.partition is_less rest in
- qsort left @ [pivot] @ qsort right
-
-(* Fibonacci Sequence *)
-let rec fib_aux n a b =
- match n with
- | 0 -> a
- | _ -> fib_aux (n - 1) (a + b) a
-let fib n = fib_aux n 0 1
-
-(* Birthday paradox *)
-let year_size = 365.
-
-let rec birthday_paradox prob people =
- let prob' = (year_size -. float people) /. year_size *. prob in
- if prob' < 0.5 then
- Printf.printf "answer = %d\n" (people+1)
- else
- birthday_paradox prob' (people+1) ;;
-
-birthday_paradox 1.0 1
-
-(* Church numerals *)
-let zero f x = x
-let succ n f x = f (n f x)
-let one = succ zero
-let two = succ (succ zero)
-let add n1 n2 f x = n1 f (n2 f x)
-let to_string n = n (fun k -> "S" ^ k) "0"
-let _ = to_string (add (succ two) two)
-
-(* Elementary functions *)
-let square x = x * x;;
-let rec fact x =
- if x <= 1 then 1 else x * fact (x - 1);;
-
-(* Automatic memory management *)
-let l = 1 :: 2 :: 3 :: [];;
-[1; 2; 3];;
-5 :: l;;
-
-(* Polymorphism: sorting lists *)
-let rec sort = function
- | [] -> []
- | x :: l -> insert x (sort l)
-
-and insert elem = function
- | [] -> [elem]
- | x :: l ->
- if elem < x then elem :: x :: l else x :: insert elem l;;
-
-(* Imperative features *)
-let add_polynom p1 p2 =
- let n1 = Array.length p1
- and n2 = Array.length p2 in
- let result = Array.create (max n1 n2) 0 in
- for i = 0 to n1 - 1 do result.(i) <- p1.(i) done;
- for i = 0 to n2 - 1 do result.(i) <- result.(i) + p2.(i) done;
- result;;
-add_polynom [| 1; 2 |] [| 1; 2; 3 |];;
-
-(* We may redefine fact using a reference cell and a for loop *)
-let fact n =
- let result = ref 1 in
- for i = 2 to n do
- result := i * !result
- done;
- !result;;
-fact 5;;
-
-(* Triangle (graphics) *)
-let () =
- ignore( Glut.init Sys.argv );
- Glut.initDisplayMode ~double_buffer:true ();
- ignore (Glut.createWindow ~title:"OpenGL Demo");
- let angle t = 10. *. t *. t in
- let render () =
- GlClear.clear [ `color ];
- GlMat.load_identity ();
- GlMat.rotate ~angle: (angle (Sys.time ())) ~z:1. ();
- GlDraw.begins `triangles;
- List.iter GlDraw.vertex2 [-1., -1.; 0., 1.; 1., -1.];
- GlDraw.ends ();
- Glut.swapBuffers () in
- GlMat.mode `modelview;
- Glut.displayFunc ~cb:render;
- Glut.idleFunc ~cb:(Some Glut.postRedisplay);
- Glut.mainLoop ()
-
-(* A Hundred Lines of Caml - http://caml.inria.fr/about/taste.en.html *)
-(* OCaml page on Wikipedia - http://en.wikipedia.org/wiki/OCaml *)
-
-
-F# mode
-
-module CodeMirror.FSharp
-
-let rec fib = function
- | 0 -> 0
- | 1 -> 1
- | n -> fib (n - 1) + fib (n - 2)
-
-type Point =
- {
- x : int
- y : int
- }
-
-type Color =
- | Red
- | Green
- | Blue
-
-[0 .. 10]
-|> List.map ((+) 2)
-|> List.fold (fun x y -> x + y) 0
-|> printf "%i"
-
-
-
-
-
-MIME types defined: text/x-ocaml
(OCaml) and text/x-fsharp
(F#).
-
diff --git a/public/js/lib/codemirror/mode/mllike/mllike.js b/public/js/lib/codemirror/mode/mllike/mllike.js
deleted file mode 100644
index 04ab1c98ec..0000000000
--- a/public/js/lib/codemirror/mode/mllike/mllike.js
+++ /dev/null
@@ -1,205 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode('mllike', function(_config, parserConfig) {
- var words = {
- 'let': 'keyword',
- 'rec': 'keyword',
- 'in': 'keyword',
- 'of': 'keyword',
- 'and': 'keyword',
- 'if': 'keyword',
- 'then': 'keyword',
- 'else': 'keyword',
- 'for': 'keyword',
- 'to': 'keyword',
- 'while': 'keyword',
- 'do': 'keyword',
- 'done': 'keyword',
- 'fun': 'keyword',
- 'function': 'keyword',
- 'val': 'keyword',
- 'type': 'keyword',
- 'mutable': 'keyword',
- 'match': 'keyword',
- 'with': 'keyword',
- 'try': 'keyword',
- 'open': 'builtin',
- 'ignore': 'builtin',
- 'begin': 'keyword',
- 'end': 'keyword'
- };
-
- var extraWords = parserConfig.extraWords || {};
- for (var prop in extraWords) {
- if (extraWords.hasOwnProperty(prop)) {
- words[prop] = parserConfig.extraWords[prop];
- }
- }
-
- function tokenBase(stream, state) {
- var ch = stream.next();
-
- if (ch === '"') {
- state.tokenize = tokenString;
- return state.tokenize(stream, state);
- }
- if (ch === '(') {
- if (stream.eat('*')) {
- state.commentLevel++;
- state.tokenize = tokenComment;
- return state.tokenize(stream, state);
- }
- }
- if (ch === '~') {
- stream.eatWhile(/\w/);
- return 'variable-2';
- }
- if (ch === '`') {
- stream.eatWhile(/\w/);
- return 'quote';
- }
- if (ch === '/' && parserConfig.slashComments && stream.eat('/')) {
- stream.skipToEnd();
- return 'comment';
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\d]/);
- if (stream.eat('.')) {
- stream.eatWhile(/[\d]/);
- }
- return 'number';
- }
- if ( /[+\-*&%=<>!?|]/.test(ch)) {
- return 'operator';
- }
- stream.eatWhile(/\w/);
- var cur = stream.current();
- return words[cur] || 'variable';
- }
-
- function tokenString(stream, state) {
- var next, end = false, escaped = false;
- while ((next = stream.next()) != null) {
- if (next === '"' && !escaped) {
- end = true;
- break;
- }
- escaped = !escaped && next === '\\';
- }
- if (end && !escaped) {
- state.tokenize = tokenBase;
- }
- return 'string';
- };
-
- function tokenComment(stream, state) {
- var prev, next;
- while(state.commentLevel > 0 && (next = stream.next()) != null) {
- if (prev === '(' && next === '*') state.commentLevel++;
- if (prev === '*' && next === ')') state.commentLevel--;
- prev = next;
- }
- if (state.commentLevel <= 0) {
- state.tokenize = tokenBase;
- }
- return 'comment';
- }
-
- return {
- startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- return state.tokenize(stream, state);
- },
-
- blockCommentStart: "(*",
- blockCommentEnd: "*)",
- lineComment: parserConfig.slashComments ? "//" : null
- };
-});
-
-CodeMirror.defineMIME('text/x-ocaml', {
- name: 'mllike',
- extraWords: {
- 'succ': 'keyword',
- 'trace': 'builtin',
- 'exit': 'builtin',
- 'print_string': 'builtin',
- 'print_endline': 'builtin',
- 'true': 'atom',
- 'false': 'atom',
- 'raise': 'keyword'
- }
-});
-
-CodeMirror.defineMIME('text/x-fsharp', {
- name: 'mllike',
- extraWords: {
- 'abstract': 'keyword',
- 'as': 'keyword',
- 'assert': 'keyword',
- 'base': 'keyword',
- 'class': 'keyword',
- 'default': 'keyword',
- 'delegate': 'keyword',
- 'downcast': 'keyword',
- 'downto': 'keyword',
- 'elif': 'keyword',
- 'exception': 'keyword',
- 'extern': 'keyword',
- 'finally': 'keyword',
- 'global': 'keyword',
- 'inherit': 'keyword',
- 'inline': 'keyword',
- 'interface': 'keyword',
- 'internal': 'keyword',
- 'lazy': 'keyword',
- 'let!': 'keyword',
- 'member' : 'keyword',
- 'module': 'keyword',
- 'namespace': 'keyword',
- 'new': 'keyword',
- 'null': 'keyword',
- 'override': 'keyword',
- 'private': 'keyword',
- 'public': 'keyword',
- 'return': 'keyword',
- 'return!': 'keyword',
- 'select': 'keyword',
- 'static': 'keyword',
- 'struct': 'keyword',
- 'upcast': 'keyword',
- 'use': 'keyword',
- 'use!': 'keyword',
- 'val': 'keyword',
- 'when': 'keyword',
- 'yield': 'keyword',
- 'yield!': 'keyword',
-
- 'List': 'builtin',
- 'Seq': 'builtin',
- 'Map': 'builtin',
- 'Set': 'builtin',
- 'int': 'builtin',
- 'string': 'builtin',
- 'raise': 'builtin',
- 'failwith': 'builtin',
- 'not': 'builtin',
- 'true': 'builtin',
- 'false': 'builtin'
- },
- slashComments: true
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/modelica/index.html b/public/js/lib/codemirror/mode/modelica/index.html
deleted file mode 100644
index 408c3b17e3..0000000000
--- a/public/js/lib/codemirror/mode/modelica/index.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-CodeMirror: Modelica mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Modelica mode
-
-
-model BouncingBall
- parameter Real e = 0.7;
- parameter Real g = 9.81;
- Real h(start=1);
- Real v;
- Boolean flying(start=true);
- Boolean impact;
- Real v_new;
-equation
- impact = h <= 0.0;
- der(v) = if flying then -g else 0;
- der(h) = v;
- when {h <= 0.0 and v <= 0.0, impact} then
- v_new = if edge(impact) then -e*pre(v) else 0;
- flying = v_new > 0;
- reinit(v, v_new);
- end when;
- annotation (uses(Modelica(version="3.2")));
-end BouncingBall;
-
-
-
-
- Simple mode that tries to handle Modelica as well as it can.
-
- MIME types defined: text/x-modelica
- (Modlica code).
-
diff --git a/public/js/lib/codemirror/mode/modelica/modelica.js b/public/js/lib/codemirror/mode/modelica/modelica.js
deleted file mode 100644
index 77ec7a3c18..0000000000
--- a/public/js/lib/codemirror/mode/modelica/modelica.js
+++ /dev/null
@@ -1,245 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Modelica support for CodeMirror, copyright (c) by Lennart Ochel
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})
-
-(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("modelica", function(config, parserConfig) {
-
- var indentUnit = config.indentUnit;
- var keywords = parserConfig.keywords || {};
- var builtin = parserConfig.builtin || {};
- var atoms = parserConfig.atoms || {};
-
- var isSingleOperatorChar = /[;=\(:\),{}.*<>+\-\/^\[\]]/;
- var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/;
- var isDigit = /[0-9]/;
- var isNonDigit = /[_a-zA-Z]/;
-
- function tokenLineComment(stream, state) {
- stream.skipToEnd();
- state.tokenize = null;
- return "comment";
- }
-
- function tokenBlockComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (maybeEnd && ch == "/") {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function tokenString(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == '"' && !escaped) {
- state.tokenize = null;
- state.sol = false;
- break;
- }
- escaped = !escaped && ch == "\\";
- }
-
- return "string";
- }
-
- function tokenIdent(stream, state) {
- stream.eatWhile(isDigit);
- while (stream.eat(isDigit) || stream.eat(isNonDigit)) { }
-
-
- var cur = stream.current();
-
- if(state.sol && (cur == "package" || cur == "model" || cur == "when" || cur == "connector")) state.level++;
- else if(state.sol && cur == "end" && state.level > 0) state.level--;
-
- state.tokenize = null;
- state.sol = false;
-
- if (keywords.propertyIsEnumerable(cur)) return "keyword";
- else if (builtin.propertyIsEnumerable(cur)) return "builtin";
- else if (atoms.propertyIsEnumerable(cur)) return "atom";
- else return "variable";
- }
-
- function tokenQIdent(stream, state) {
- while (stream.eat(/[^']/)) { }
-
- state.tokenize = null;
- state.sol = false;
-
- if(stream.eat("'"))
- return "variable";
- else
- return "error";
- }
-
- function tokenUnsignedNuber(stream, state) {
- stream.eatWhile(isDigit);
- if (stream.eat('.')) {
- stream.eatWhile(isDigit);
- }
- if (stream.eat('e') || stream.eat('E')) {
- if (!stream.eat('-'))
- stream.eat('+');
- stream.eatWhile(isDigit);
- }
-
- state.tokenize = null;
- state.sol = false;
- return "number";
- }
-
- // Interface
- return {
- startState: function() {
- return {
- tokenize: null,
- level: 0,
- sol: true
- };
- },
-
- token: function(stream, state) {
- if(state.tokenize != null) {
- return state.tokenize(stream, state);
- }
-
- if(stream.sol()) {
- state.sol = true;
- }
-
- // WHITESPACE
- if(stream.eatSpace()) {
- state.tokenize = null;
- return null;
- }
-
- var ch = stream.next();
-
- // LINECOMMENT
- if(ch == '/' && stream.eat('/')) {
- state.tokenize = tokenLineComment;
- }
- // BLOCKCOMMENT
- else if(ch == '/' && stream.eat('*')) {
- state.tokenize = tokenBlockComment;
- }
- // TWO SYMBOL TOKENS
- else if(isDoubleOperatorChar.test(ch+stream.peek())) {
- stream.next();
- state.tokenize = null;
- return "operator";
- }
- // SINGLE SYMBOL TOKENS
- else if(isSingleOperatorChar.test(ch)) {
- state.tokenize = null;
- return "operator";
- }
- // IDENT
- else if(isNonDigit.test(ch)) {
- state.tokenize = tokenIdent;
- }
- // Q-IDENT
- else if(ch == "'" && stream.peek() && stream.peek() != "'") {
- state.tokenize = tokenQIdent;
- }
- // STRING
- else if(ch == '"') {
- state.tokenize = tokenString;
- }
- // UNSIGNED_NUBER
- else if(isDigit.test(ch)) {
- state.tokenize = tokenUnsignedNuber;
- }
- // ERROR
- else {
- state.tokenize = null;
- return "error";
- }
-
- return state.tokenize(stream, state);
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != null) return CodeMirror.Pass;
-
- var level = state.level;
- if(/(algorithm)/.test(textAfter)) level--;
- if(/(equation)/.test(textAfter)) level--;
- if(/(initial algorithm)/.test(textAfter)) level--;
- if(/(initial equation)/.test(textAfter)) level--;
- if(/(end)/.test(textAfter)) level--;
-
- if(level > 0)
- return indentUnit*level;
- else
- return 0;
- },
-
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
- });
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i=0; i
-
-CodeMirror: NGINX mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-NGINX mode
-
-server {
- listen 173.255.219.235:80;
- server_name website.com.au;
- rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
-}
-
-server {
- listen 173.255.219.235:443;
- server_name website.com.au;
- rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
-}
-
-server {
-
- listen 173.255.219.235:80;
- server_name www.website.com.au;
-
-
-
- root /data/www;
- index index.html index.php;
-
- location / {
- index index.html index.php; ## Allow a static html file to be shown first
- try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
- expires 30d; ## Assume all files are cachable
- }
-
- ## These locations would be hidden by .htaccess normally
- location /app/ { deny all; }
- location /includes/ { deny all; }
- location /lib/ { deny all; }
- location /media/downloadable/ { deny all; }
- location /pkginfo/ { deny all; }
- location /report/config.xml { deny all; }
- location /var/ { deny all; }
-
- location /var/export/ { ## Allow admins only to view export folder
- auth_basic "Restricted"; ## Message shown in login window
- auth_basic_user_file /rs/passwords/testfile; ## See /etc/nginx/htpassword
- autoindex on;
- }
-
- location /. { ## Disable .htaccess and other hidden files
- return 404;
- }
-
- location @handler { ## Magento uses a common front handler
- rewrite / /index.php;
- }
-
- location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
- rewrite ^/(.*.php)/ /$1 last;
- }
-
- location ~ \.php$ {
- if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss
-
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /rs/confs/nginx/fastcgi_params;
- }
-
-}
-
-
-server {
-
- listen 173.255.219.235:443;
- server_name website.com.au www.website.com.au;
-
- root /data/www;
- index index.html index.php;
-
- ssl on;
- ssl_certificate /rs/ssl/ssl.crt;
- ssl_certificate_key /rs/ssl/ssl.key;
-
- ssl_session_timeout 5m;
-
- ssl_protocols SSLv2 SSLv3 TLSv1;
- ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
- ssl_prefer_server_ciphers on;
-
-
-
- location / {
- index index.html index.php; ## Allow a static html file to be shown first
- try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
- expires 30d; ## Assume all files are cachable
- }
-
- ## These locations would be hidden by .htaccess normally
- location /app/ { deny all; }
- location /includes/ { deny all; }
- location /lib/ { deny all; }
- location /media/downloadable/ { deny all; }
- location /pkginfo/ { deny all; }
- location /report/config.xml { deny all; }
- location /var/ { deny all; }
-
- location /var/export/ { ## Allow admins only to view export folder
- auth_basic "Restricted"; ## Message shown in login window
- auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
- autoindex on;
- }
-
- location /. { ## Disable .htaccess and other hidden files
- return 404;
- }
-
- location @handler { ## Magento uses a common front handler
- rewrite / /index.php;
- }
-
- location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
- rewrite ^/(.*.php)/ /$1 last;
- }
-
- location ~ .php$ { ## Execute PHP scripts
- if (!-e $request_filename) { rewrite /index.php last; } ## Catch 404s that try_files miss
-
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /rs/confs/nginx/fastcgi_params;
-
- fastcgi_param HTTPS on;
- }
-
-}
-
-
-
- MIME types defined: text/nginx
.
-
-
diff --git a/public/js/lib/codemirror/mode/nginx/nginx.js b/public/js/lib/codemirror/mode/nginx/nginx.js
deleted file mode 100644
index 135b9cc7f8..0000000000
--- a/public/js/lib/codemirror/mode/nginx/nginx.js
+++ /dev/null
@@ -1,178 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("nginx", function(config) {
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var keywords = words(
- /* ngxDirectiveControl */ "break return rewrite set" +
- /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"
- );
-
- var keywords_block = words(
- /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map"
- );
-
- var keywords_important = words(
- /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"
- );
-
- var indentUnit = config.indentUnit, type;
- function ret(style, tp) {type = tp; return style;}
-
- function tokenBase(stream, state) {
-
-
- stream.eatWhile(/[\w\$_]/);
-
- var cur = stream.current();
-
-
- if (keywords.propertyIsEnumerable(cur)) {
- return "keyword";
- }
- else if (keywords_block.propertyIsEnumerable(cur)) {
- return "variable-2";
- }
- else if (keywords_important.propertyIsEnumerable(cur)) {
- return "string-2";
- }
- /**/
-
- var ch = stream.next();
- if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
- else if (ch == "/" && stream.eat("*")) {
- state.tokenize = tokenCComment;
- return tokenCComment(stream, state);
- }
- else if (ch == "<" && stream.eat("!")) {
- state.tokenize = tokenSGMLComment;
- return tokenSGMLComment(stream, state);
- }
- else if (ch == "=") ret(null, "compare");
- else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare");
- else if (ch == "\"" || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- else if (ch == "#") {
- stream.skipToEnd();
- return ret("comment", "comment");
- }
- else if (ch == "!") {
- stream.match(/^\s*\w*/);
- return ret("keyword", "important");
- }
- else if (/\d/.test(ch)) {
- stream.eatWhile(/[\w.%]/);
- return ret("number", "unit");
- }
- else if (/[,.+>*\/]/.test(ch)) {
- return ret(null, "select-op");
- }
- else if (/[;{}:\[\]]/.test(ch)) {
- return ret(null, ch);
- }
- else {
- stream.eatWhile(/[\w\\\-]/);
- return ret("variable", "variable");
- }
- }
-
- function tokenCComment(stream, state) {
- var maybeEnd = false, ch;
- while ((ch = stream.next()) != null) {
- if (maybeEnd && ch == "/") {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- function tokenSGMLComment(stream, state) {
- var dashes = 0, ch;
- while ((ch = stream.next()) != null) {
- if (dashes >= 2 && ch == ">") {
- state.tokenize = tokenBase;
- break;
- }
- dashes = (ch == "-") ? dashes + 1 : 0;
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped)
- break;
- escaped = !escaped && ch == "\\";
- }
- if (!escaped) state.tokenize = tokenBase;
- return ret("string", "string");
- };
- }
-
- return {
- startState: function(base) {
- return {tokenize: tokenBase,
- baseIndent: base || 0,
- stack: []};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- type = null;
- var style = state.tokenize(stream, state);
-
- var context = state.stack[state.stack.length-1];
- if (type == "hash" && context == "rule") style = "atom";
- else if (style == "variable") {
- if (context == "rule") style = "number";
- else if (!context || context == "@media{") style = "tag";
- }
-
- if (context == "rule" && /^[\{\};]$/.test(type))
- state.stack.pop();
- if (type == "{") {
- if (context == "@media") state.stack[state.stack.length-1] = "@media{";
- else state.stack.push("{");
- }
- else if (type == "}") state.stack.pop();
- else if (type == "@media") state.stack.push("@media");
- else if (context == "{" && type != "comment") state.stack.push("rule");
- return style;
- },
-
- indent: function(state, textAfter) {
- var n = state.stack.length;
- if (/^\}/.test(textAfter))
- n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
- return state.baseIndent + n * indentUnit;
- },
-
- electricChars: "}"
- };
-});
-
-CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf");
-
-});
diff --git a/public/js/lib/codemirror/mode/ntriples/index.html b/public/js/lib/codemirror/mode/ntriples/index.html
deleted file mode 100644
index 1355e7189e..0000000000
--- a/public/js/lib/codemirror/mode/ntriples/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-CodeMirror: NTriples mode
-
-
-
-
-
-
-
-
-
-
-NTriples mode
-
-
- .
- "literal 1" .
- _:bnode3 .
-_:bnode4 "literal 2"@lang .
-_:bnode5 "literal 3"^^ .
-
-
-
-
- MIME types defined: text/n-triples
.
-
diff --git a/public/js/lib/codemirror/mode/ntriples/ntriples.js b/public/js/lib/codemirror/mode/ntriples/ntriples.js
deleted file mode 100644
index 0524b1e8ab..0000000000
--- a/public/js/lib/codemirror/mode/ntriples/ntriples.js
+++ /dev/null
@@ -1,186 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**********************************************************
-* This script provides syntax highlighting support for
-* the Ntriples format.
-* Ntriples format specification:
-* http://www.w3.org/TR/rdf-testcases/#ntriples
-***********************************************************/
-
-/*
- The following expression defines the defined ASF grammar transitions.
-
- pre_subject ->
- {
- ( writing_subject_uri | writing_bnode_uri )
- -> pre_predicate
- -> writing_predicate_uri
- -> pre_object
- -> writing_object_uri | writing_object_bnode |
- (
- writing_object_literal
- -> writing_literal_lang | writing_literal_type
- )
- -> post_object
- -> BEGIN
- } otherwise {
- -> ERROR
- }
-*/
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("ntriples", function() {
-
- var Location = {
- PRE_SUBJECT : 0,
- WRITING_SUB_URI : 1,
- WRITING_BNODE_URI : 2,
- PRE_PRED : 3,
- WRITING_PRED_URI : 4,
- PRE_OBJ : 5,
- WRITING_OBJ_URI : 6,
- WRITING_OBJ_BNODE : 7,
- WRITING_OBJ_LITERAL : 8,
- WRITING_LIT_LANG : 9,
- WRITING_LIT_TYPE : 10,
- POST_OBJ : 11,
- ERROR : 12
- };
- function transitState(currState, c) {
- var currLocation = currState.location;
- var ret;
-
- // Opening.
- if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;
- else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;
- else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI;
- else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI;
- else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE;
- else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL;
-
- // Closing.
- else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED;
- else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED;
- else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ;
- else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;
-
- // Closing typed and language literal.
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;
-
- // Spaces.
- else if( c == ' ' &&
- (
- currLocation == Location.PRE_SUBJECT ||
- currLocation == Location.PRE_PRED ||
- currLocation == Location.PRE_OBJ ||
- currLocation == Location.POST_OBJ
- )
- ) ret = currLocation;
-
- // Reset.
- else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
-
- // Error
- else ret = Location.ERROR;
-
- currState.location=ret;
- }
-
- return {
- startState: function() {
- return {
- location : Location.PRE_SUBJECT,
- uris : [],
- anchors : [],
- bnodes : [],
- langs : [],
- types : []
- };
- },
- token: function(stream, state) {
- var ch = stream.next();
- if(ch == '<') {
- transitState(state, ch);
- var parsedURI = '';
- stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );
- state.uris.push(parsedURI);
- if( stream.match('#', false) ) return 'variable';
- stream.next();
- transitState(state, '>');
- return 'variable';
- }
- if(ch == '#') {
- var parsedAnchor = '';
- stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
- state.anchors.push(parsedAnchor);
- return 'variable-2';
- }
- if(ch == '>') {
- transitState(state, '>');
- return 'variable';
- }
- if(ch == '_') {
- transitState(state, ch);
- var parsedBNode = '';
- stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});
- state.bnodes.push(parsedBNode);
- stream.next();
- transitState(state, ' ');
- return 'builtin';
- }
- if(ch == '"') {
- transitState(state, ch);
- stream.eatWhile( function(c) { return c != '"'; } );
- stream.next();
- if( stream.peek() != '@' && stream.peek() != '^' ) {
- transitState(state, '"');
- }
- return 'string';
- }
- if( ch == '@' ) {
- transitState(state, '@');
- var parsedLang = '';
- stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});
- state.langs.push(parsedLang);
- stream.next();
- transitState(state, ' ');
- return 'string-2';
- }
- if( ch == '^' ) {
- stream.next();
- transitState(state, '^');
- var parsedType = '';
- stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );
- state.types.push(parsedType);
- stream.next();
- transitState(state, '>');
- return 'variable';
- }
- if( ch == ' ' ) {
- transitState(state, ch);
- }
- if( ch == '.' ) {
- transitState(state, ch);
- }
- }
- };
-});
-
-CodeMirror.defineMIME("text/n-triples", "ntriples");
-
-});
diff --git a/public/js/lib/codemirror/mode/octave/index.html b/public/js/lib/codemirror/mode/octave/index.html
deleted file mode 100644
index 79df581199..0000000000
--- a/public/js/lib/codemirror/mode/octave/index.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-CodeMirror: Octave mode
-
-
-
-
-
-
-
-
-
-
-Octave mode
-
-
-%numbers
-[1234 1234i 1234j]
-[.234 .234j 2.23i]
-[23e2 12E1j 123D-4 0x234]
-
-%strings
-'asda''a'
-"asda""a"
-
-%identifiers
-a + as123 - __asd__
-
-%operators
--
-+
-=
-==
->
-<
->=
-<=
-&
-~
-...
-break zeros default margin round ones rand
-ceil floor size clear zeros eye mean std cov
-error eval function
-abs acos atan asin cos cosh exp log prod sum
-log10 max min sign sin sinh sqrt tan reshape
-return
-case switch
-else elseif end if otherwise
-do for while
-try catch
-classdef properties events methods
-global persistent
-
-%one line comment
-%{ multi
-line commment %}
-
-
-
-
- MIME types defined: text/x-octave
.
-
diff --git a/public/js/lib/codemirror/mode/octave/octave.js b/public/js/lib/codemirror/mode/octave/octave.js
deleted file mode 100644
index a7bec030c2..0000000000
--- a/public/js/lib/codemirror/mode/octave/octave.js
+++ /dev/null
@@ -1,135 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("octave", function() {
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var singleOperators = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]");
- var singleDelimiters = new RegExp('^[\\(\\[\\{\\},:=;]');
- var doubleOperators = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))");
- var doubleDelimiters = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))");
- var tripleDelimiters = new RegExp("^((>>=)|(<<=))");
- var expressionEnd = new RegExp("^[\\]\\)]");
- var identifiers = new RegExp("^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*");
-
- var builtins = wordRegexp([
- 'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos',
- 'cosh', 'exp', 'log', 'prod', 'sum', 'log10', 'max', 'min', 'sign', 'sin', 'sinh',
- 'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones',
- 'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov',
- 'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot',
- 'title', 'xlabel', 'ylabel', 'legend', 'text', 'grid', 'meshgrid', 'mesh', 'num2str',
- 'fft', 'ifft', 'arrayfun', 'cellfun', 'input', 'fliplr', 'flipud', 'ismember'
- ]);
-
- var keywords = wordRegexp([
- 'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction',
- 'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events',
- 'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'sprintf', 'disp', 'until',
- 'continue', 'pkg'
- ]);
-
-
- // tokenizers
- function tokenTranspose(stream, state) {
- if (!stream.sol() && stream.peek() === '\'') {
- stream.next();
- state.tokenize = tokenBase;
- return 'operator';
- }
- state.tokenize = tokenBase;
- return tokenBase(stream, state);
- }
-
-
- function tokenComment(stream, state) {
- if (stream.match(/^.*%}/)) {
- state.tokenize = tokenBase;
- return 'comment';
- };
- stream.skipToEnd();
- return 'comment';
- }
-
- function tokenBase(stream, state) {
- // whitespaces
- if (stream.eatSpace()) return null;
-
- // Handle one line Comments
- if (stream.match('%{')){
- state.tokenize = tokenComment;
- stream.skipToEnd();
- return 'comment';
- }
-
- if (stream.match(/^[%#]/)){
- stream.skipToEnd();
- return 'comment';
- }
-
- // Handle Number Literals
- if (stream.match(/^[0-9\.+-]/, false)) {
- if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) {
- stream.tokenize = tokenBase;
- return 'number'; };
- if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; };
- if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; };
- }
- if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; };
-
- // Handle Strings
- if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; } ;
- if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } ;
-
- // Handle words
- if (stream.match(keywords)) { return 'keyword'; } ;
- if (stream.match(builtins)) { return 'builtin'; } ;
- if (stream.match(identifiers)) { return 'variable'; } ;
-
- if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; };
- if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; };
-
- if (stream.match(expressionEnd)) {
- state.tokenize = tokenTranspose;
- return null;
- };
-
-
- // Handle non-detected items
- stream.next();
- return 'error';
- };
-
-
- return {
- startState: function() {
- return {
- tokenize: tokenBase
- };
- },
-
- token: function(stream, state) {
- var style = state.tokenize(stream, state);
- if (style === 'number' || style === 'variable'){
- state.tokenize = tokenTranspose;
- }
- return style;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-octave", "octave");
-
-});
diff --git a/public/js/lib/codemirror/mode/pascal/index.html b/public/js/lib/codemirror/mode/pascal/index.html
deleted file mode 100644
index f8a99ad01e..0000000000
--- a/public/js/lib/codemirror/mode/pascal/index.html
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-CodeMirror: Pascal mode
-
-
-
-
-
-
-
-
-
-
-Pascal mode
-
-
-
-(* Example Pascal code *)
-
-while a <> b do writeln('Waiting');
-
-if a > b then
- writeln('Condition met')
-else
- writeln('Condition not met');
-
-for i := 1 to 10 do
- writeln('Iteration: ', i:1);
-
-repeat
- a := a + 1
-until a = 10;
-
-case i of
- 0: write('zero');
- 1: write('one');
- 2: write('two')
-end;
-
-
-
-
- MIME types defined: text/x-pascal
.
-
diff --git a/public/js/lib/codemirror/mode/pascal/pascal.js b/public/js/lib/codemirror/mode/pascal/pascal.js
deleted file mode 100644
index 2d0c3d4240..0000000000
--- a/public/js/lib/codemirror/mode/pascal/pascal.js
+++ /dev/null
@@ -1,109 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("pascal", function() {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var keywords = words("and array begin case const div do downto else end file for forward integer " +
- "boolean char function goto if in label mod nil not of or packed procedure " +
- "program record repeat set string then to type until var while with");
- var atoms = {"null": true};
-
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == "#" && state.startOfLine) {
- stream.skipToEnd();
- return "meta";
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (ch == "(" && stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) return "keyword";
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !escaped) state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == ")" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- // Interface
-
- return {
- startState: function() {
- return {tokenize: null};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- return style;
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-pascal", "pascal");
-
-});
diff --git a/public/js/lib/codemirror/mode/pegjs/index.html b/public/js/lib/codemirror/mode/pegjs/index.html
deleted file mode 100644
index 0c74604881..0000000000
--- a/public/js/lib/codemirror/mode/pegjs/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
- CodeMirror: PEG.js Mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- PEG.js Mode
-
-/*
- * Classic example grammar, which recognizes simple arithmetic expressions like
- * "2*(3+4)". The parser generated from this grammar then computes their value.
- */
-
-start
- = additive
-
-additive
- = left:multiplicative "+" right:additive { return left + right; }
- / multiplicative
-
-multiplicative
- = left:primary "*" right:multiplicative { return left * right; }
- / primary
-
-primary
- = integer
- / "(" additive:additive ")" { return additive; }
-
-integer "integer"
- = digits:[0-9]+ { return parseInt(digits.join(""), 10); }
-
-letter = [a-z]+
-
- The PEG.js Mode
- Created by Forbes Lindesay.
-
-
-
diff --git a/public/js/lib/codemirror/mode/pegjs/pegjs.js b/public/js/lib/codemirror/mode/pegjs/pegjs.js
deleted file mode 100644
index 306e3768c9..0000000000
--- a/public/js/lib/codemirror/mode/pegjs/pegjs.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../javascript/javascript"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../javascript/javascript"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("pegjs", function (config) {
- var jsMode = CodeMirror.getMode(config, "javascript");
-
- function identifier(stream) {
- return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);
- }
-
- return {
- startState: function () {
- return {
- inString: false,
- stringType: null,
- inComment: false,
- inChracterClass: false,
- braced: 0,
- lhs: true,
- localState: null
- };
- },
- token: function (stream, state) {
- if (stream)
-
- //check for state changes
- if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) {
- state.stringType = stream.peek();
- stream.next(); // Skip quote
- state.inString = true; // Update state
- }
- if (!state.inString && !state.inComment && stream.match(/^\/\*/)) {
- state.inComment = true;
- }
-
- //return state
- if (state.inString) {
- while (state.inString && !stream.eol()) {
- if (stream.peek() === state.stringType) {
- stream.next(); // Skip quote
- state.inString = false; // Clear flag
- } else if (stream.peek() === '\\') {
- stream.next();
- stream.next();
- } else {
- stream.match(/^.[^\\\"\']*/);
- }
- }
- return state.lhs ? "property string" : "string"; // Token style
- } else if (state.inComment) {
- while (state.inComment && !stream.eol()) {
- if (stream.match(/\*\//)) {
- state.inComment = false; // Clear flag
- } else {
- stream.match(/^.[^\*]*/);
- }
- }
- return "comment";
- } else if (state.inChracterClass) {
- while (state.inChracterClass && !stream.eol()) {
- if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
- state.inChracterClass = false;
- }
- }
- } else if (stream.peek() === '[') {
- stream.next();
- state.inChracterClass = true;
- return 'bracket';
- } else if (stream.match(/^\/\//)) {
- stream.skipToEnd();
- return "comment";
- } else if (state.braced || stream.peek() === '{') {
- if (state.localState === null) {
- state.localState = jsMode.startState();
- }
- var token = jsMode.token(stream, state.localState);
- var text = stream.current();
- if (!token) {
- for (var i = 0; i < text.length; i++) {
- if (text[i] === '{') {
- state.braced++;
- } else if (text[i] === '}') {
- state.braced--;
- }
- };
- }
- return token;
- } else if (identifier(stream)) {
- if (stream.peek() === ':') {
- return 'variable';
- }
- return 'variable-2';
- } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) {
- stream.next();
- return 'bracket';
- } else if (!stream.eatSpace()) {
- stream.next();
- }
- return null;
- }
- };
-}, "javascript");
-
-});
diff --git a/public/js/lib/codemirror/mode/perl/index.html b/public/js/lib/codemirror/mode/perl/index.html
deleted file mode 100644
index 8c1021c42b..0000000000
--- a/public/js/lib/codemirror/mode/perl/index.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-CodeMirror: Perl mode
-
-
-
-
-
-
-
-
-
-
-Perl mode
-
-
-
-#!/usr/bin/perl
-
-use Something qw(func1 func2);
-
-# strings
-my $s1 = qq'single line';
-our $s2 = q(multi-
- line);
-
-=item Something
- Example.
-=cut
-
-my $html=<<'HTML'
-
-hi!
-
-HTML
-
-print "first,".join(',', 'second', qq~third~);
-
-if($s1 =~ m[(?{$1}=$$.' predefined variables';
- $s2 =~ s/\-line//ox;
- $s1 =~ s[
- line ]
- [
- block
- ]ox;
-}
-
-1; # numbers and comments
-
-__END__
-something...
-
-
-
-
-
- MIME types defined: text/x-perl
.
-
diff --git a/public/js/lib/codemirror/mode/perl/perl.js b/public/js/lib/codemirror/mode/perl/perl.js
deleted file mode 100644
index 311574e74a..0000000000
--- a/public/js/lib/codemirror/mode/perl/perl.js
+++ /dev/null
@@ -1,832 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)
-// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("perl",function(){
- // http://perldoc.perl.org
- var PERL={ // null - magic touch
- // 1 - keyword
- // 2 - def
- // 3 - atom
- // 4 - operator
- // 5 - variable-2 (predefined)
- // [x,y] - x=1,2,3; y=must be defined if x{...}
- // PERL operators
- '->' : 4,
- '++' : 4,
- '--' : 4,
- '**' : 4,
- // ! ~ \ and unary + and -
- '=~' : 4,
- '!~' : 4,
- '*' : 4,
- '/' : 4,
- '%' : 4,
- 'x' : 4,
- '+' : 4,
- '-' : 4,
- '.' : 4,
- '<<' : 4,
- '>>' : 4,
- // named unary operators
- '<' : 4,
- '>' : 4,
- '<=' : 4,
- '>=' : 4,
- 'lt' : 4,
- 'gt' : 4,
- 'le' : 4,
- 'ge' : 4,
- '==' : 4,
- '!=' : 4,
- '<=>' : 4,
- 'eq' : 4,
- 'ne' : 4,
- 'cmp' : 4,
- '~~' : 4,
- '&' : 4,
- '|' : 4,
- '^' : 4,
- '&&' : 4,
- '||' : 4,
- '//' : 4,
- '..' : 4,
- '...' : 4,
- '?' : 4,
- ':' : 4,
- '=' : 4,
- '+=' : 4,
- '-=' : 4,
- '*=' : 4, // etc. ???
- ',' : 4,
- '=>' : 4,
- '::' : 4,
- // list operators (rightward)
- 'not' : 4,
- 'and' : 4,
- 'or' : 4,
- 'xor' : 4,
- // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)
- 'BEGIN' : [5,1],
- 'END' : [5,1],
- 'PRINT' : [5,1],
- 'PRINTF' : [5,1],
- 'GETC' : [5,1],
- 'READ' : [5,1],
- 'READLINE' : [5,1],
- 'DESTROY' : [5,1],
- 'TIE' : [5,1],
- 'TIEHANDLE' : [5,1],
- 'UNTIE' : [5,1],
- 'STDIN' : 5,
- 'STDIN_TOP' : 5,
- 'STDOUT' : 5,
- 'STDOUT_TOP' : 5,
- 'STDERR' : 5,
- 'STDERR_TOP' : 5,
- '$ARG' : 5,
- '$_' : 5,
- '@ARG' : 5,
- '@_' : 5,
- '$LIST_SEPARATOR' : 5,
- '$"' : 5,
- '$PROCESS_ID' : 5,
- '$PID' : 5,
- '$$' : 5,
- '$REAL_GROUP_ID' : 5,
- '$GID' : 5,
- '$(' : 5,
- '$EFFECTIVE_GROUP_ID' : 5,
- '$EGID' : 5,
- '$)' : 5,
- '$PROGRAM_NAME' : 5,
- '$0' : 5,
- '$SUBSCRIPT_SEPARATOR' : 5,
- '$SUBSEP' : 5,
- '$;' : 5,
- '$REAL_USER_ID' : 5,
- '$UID' : 5,
- '$<' : 5,
- '$EFFECTIVE_USER_ID' : 5,
- '$EUID' : 5,
- '$>' : 5,
- '$a' : 5,
- '$b' : 5,
- '$COMPILING' : 5,
- '$^C' : 5,
- '$DEBUGGING' : 5,
- '$^D' : 5,
- '${^ENCODING}' : 5,
- '$ENV' : 5,
- '%ENV' : 5,
- '$SYSTEM_FD_MAX' : 5,
- '$^F' : 5,
- '@F' : 5,
- '${^GLOBAL_PHASE}' : 5,
- '$^H' : 5,
- '%^H' : 5,
- '@INC' : 5,
- '%INC' : 5,
- '$INPLACE_EDIT' : 5,
- '$^I' : 5,
- '$^M' : 5,
- '$OSNAME' : 5,
- '$^O' : 5,
- '${^OPEN}' : 5,
- '$PERLDB' : 5,
- '$^P' : 5,
- '$SIG' : 5,
- '%SIG' : 5,
- '$BASETIME' : 5,
- '$^T' : 5,
- '${^TAINT}' : 5,
- '${^UNICODE}' : 5,
- '${^UTF8CACHE}' : 5,
- '${^UTF8LOCALE}' : 5,
- '$PERL_VERSION' : 5,
- '$^V' : 5,
- '${^WIN32_SLOPPY_STAT}' : 5,
- '$EXECUTABLE_NAME' : 5,
- '$^X' : 5,
- '$1' : 5, // - regexp $1, $2...
- '$MATCH' : 5,
- '$&' : 5,
- '${^MATCH}' : 5,
- '$PREMATCH' : 5,
- '$`' : 5,
- '${^PREMATCH}' : 5,
- '$POSTMATCH' : 5,
- "$'" : 5,
- '${^POSTMATCH}' : 5,
- '$LAST_PAREN_MATCH' : 5,
- '$+' : 5,
- '$LAST_SUBMATCH_RESULT' : 5,
- '$^N' : 5,
- '@LAST_MATCH_END' : 5,
- '@+' : 5,
- '%LAST_PAREN_MATCH' : 5,
- '%+' : 5,
- '@LAST_MATCH_START' : 5,
- '@-' : 5,
- '%LAST_MATCH_START' : 5,
- '%-' : 5,
- '$LAST_REGEXP_CODE_RESULT' : 5,
- '$^R' : 5,
- '${^RE_DEBUG_FLAGS}' : 5,
- '${^RE_TRIE_MAXBUF}' : 5,
- '$ARGV' : 5,
- '@ARGV' : 5,
- 'ARGV' : 5,
- 'ARGVOUT' : 5,
- '$OUTPUT_FIELD_SEPARATOR' : 5,
- '$OFS' : 5,
- '$,' : 5,
- '$INPUT_LINE_NUMBER' : 5,
- '$NR' : 5,
- '$.' : 5,
- '$INPUT_RECORD_SEPARATOR' : 5,
- '$RS' : 5,
- '$/' : 5,
- '$OUTPUT_RECORD_SEPARATOR' : 5,
- '$ORS' : 5,
- '$\\' : 5,
- '$OUTPUT_AUTOFLUSH' : 5,
- '$|' : 5,
- '$ACCUMULATOR' : 5,
- '$^A' : 5,
- '$FORMAT_FORMFEED' : 5,
- '$^L' : 5,
- '$FORMAT_PAGE_NUMBER' : 5,
- '$%' : 5,
- '$FORMAT_LINES_LEFT' : 5,
- '$-' : 5,
- '$FORMAT_LINE_BREAK_CHARACTERS' : 5,
- '$:' : 5,
- '$FORMAT_LINES_PER_PAGE' : 5,
- '$=' : 5,
- '$FORMAT_TOP_NAME' : 5,
- '$^' : 5,
- '$FORMAT_NAME' : 5,
- '$~' : 5,
- '${^CHILD_ERROR_NATIVE}' : 5,
- '$EXTENDED_OS_ERROR' : 5,
- '$^E' : 5,
- '$EXCEPTIONS_BEING_CAUGHT' : 5,
- '$^S' : 5,
- '$WARNING' : 5,
- '$^W' : 5,
- '${^WARNING_BITS}' : 5,
- '$OS_ERROR' : 5,
- '$ERRNO' : 5,
- '$!' : 5,
- '%OS_ERROR' : 5,
- '%ERRNO' : 5,
- '%!' : 5,
- '$CHILD_ERROR' : 5,
- '$?' : 5,
- '$EVAL_ERROR' : 5,
- '$@' : 5,
- '$OFMT' : 5,
- '$#' : 5,
- '$*' : 5,
- '$ARRAY_BASE' : 5,
- '$[' : 5,
- '$OLD_PERL_VERSION' : 5,
- '$]' : 5,
- // PERL blocks
- 'if' :[1,1],
- elsif :[1,1],
- 'else' :[1,1],
- 'while' :[1,1],
- unless :[1,1],
- 'for' :[1,1],
- foreach :[1,1],
- // PERL functions
- 'abs' :1, // - absolute value function
- accept :1, // - accept an incoming socket connect
- alarm :1, // - schedule a SIGALRM
- 'atan2' :1, // - arctangent of Y/X in the range -PI to PI
- bind :1, // - binds an address to a socket
- binmode :1, // - prepare binary files for I/O
- bless :1, // - create an object
- bootstrap :1, //
- 'break' :1, // - break out of a "given" block
- caller :1, // - get context of the current subroutine call
- chdir :1, // - change your current working directory
- chmod :1, // - changes the permissions on a list of files
- chomp :1, // - remove a trailing record separator from a string
- chop :1, // - remove the last character from a string
- chown :1, // - change the owership on a list of files
- chr :1, // - get character this number represents
- chroot :1, // - make directory new root for path lookups
- close :1, // - close file (or pipe or socket) handle
- closedir :1, // - close directory handle
- connect :1, // - connect to a remote socket
- 'continue' :[1,1], // - optional trailing block in a while or foreach
- 'cos' :1, // - cosine function
- crypt :1, // - one-way passwd-style encryption
- dbmclose :1, // - breaks binding on a tied dbm file
- dbmopen :1, // - create binding on a tied dbm file
- 'default' :1, //
- defined :1, // - test whether a value, variable, or function is defined
- 'delete' :1, // - deletes a value from a hash
- die :1, // - raise an exception or bail out
- 'do' :1, // - turn a BLOCK into a TERM
- dump :1, // - create an immediate core dump
- each :1, // - retrieve the next key/value pair from a hash
- endgrent :1, // - be done using group file
- endhostent :1, // - be done using hosts file
- endnetent :1, // - be done using networks file
- endprotoent :1, // - be done using protocols file
- endpwent :1, // - be done using passwd file
- endservent :1, // - be done using services file
- eof :1, // - test a filehandle for its end
- 'eval' :1, // - catch exceptions or compile and run code
- 'exec' :1, // - abandon this program to run another
- exists :1, // - test whether a hash key is present
- exit :1, // - terminate this program
- 'exp' :1, // - raise I to a power
- fcntl :1, // - file control system call
- fileno :1, // - return file descriptor from filehandle
- flock :1, // - lock an entire file with an advisory lock
- fork :1, // - create a new process just like this one
- format :1, // - declare a picture format with use by the write() function
- formline :1, // - internal function used for formats
- getc :1, // - get the next character from the filehandle
- getgrent :1, // - get next group record
- getgrgid :1, // - get group record given group user ID
- getgrnam :1, // - get group record given group name
- gethostbyaddr :1, // - get host record given its address
- gethostbyname :1, // - get host record given name
- gethostent :1, // - get next hosts record
- getlogin :1, // - return who logged in at this tty
- getnetbyaddr :1, // - get network record given its address
- getnetbyname :1, // - get networks record given name
- getnetent :1, // - get next networks record
- getpeername :1, // - find the other end of a socket connection
- getpgrp :1, // - get process group
- getppid :1, // - get parent process ID
- getpriority :1, // - get current nice value
- getprotobyname :1, // - get protocol record given name
- getprotobynumber :1, // - get protocol record numeric protocol
- getprotoent :1, // - get next protocols record
- getpwent :1, // - get next passwd record
- getpwnam :1, // - get passwd record given user login name
- getpwuid :1, // - get passwd record given user ID
- getservbyname :1, // - get services record given its name
- getservbyport :1, // - get services record given numeric port
- getservent :1, // - get next services record
- getsockname :1, // - retrieve the sockaddr for a given socket
- getsockopt :1, // - get socket options on a given socket
- given :1, //
- glob :1, // - expand filenames using wildcards
- gmtime :1, // - convert UNIX time into record or string using Greenwich time
- 'goto' :1, // - create spaghetti code
- grep :1, // - locate elements in a list test true against a given criterion
- hex :1, // - convert a string to a hexadecimal number
- 'import' :1, // - patch a module's namespace into your own
- index :1, // - find a substring within a string
- 'int' :1, // - get the integer portion of a number
- ioctl :1, // - system-dependent device control system call
- 'join' :1, // - join a list into a string using a separator
- keys :1, // - retrieve list of indices from a hash
- kill :1, // - send a signal to a process or process group
- last :1, // - exit a block prematurely
- lc :1, // - return lower-case version of a string
- lcfirst :1, // - return a string with just the next letter in lower case
- length :1, // - return the number of bytes in a string
- 'link' :1, // - create a hard link in the filesytem
- listen :1, // - register your socket as a server
- local : 2, // - create a temporary value for a global variable (dynamic scoping)
- localtime :1, // - convert UNIX time into record or string using local time
- lock :1, // - get a thread lock on a variable, subroutine, or method
- 'log' :1, // - retrieve the natural logarithm for a number
- lstat :1, // - stat a symbolic link
- m :null, // - match a string with a regular expression pattern
- map :1, // - apply a change to a list to get back a new list with the changes
- mkdir :1, // - create a directory
- msgctl :1, // - SysV IPC message control operations
- msgget :1, // - get SysV IPC message queue
- msgrcv :1, // - receive a SysV IPC message from a message queue
- msgsnd :1, // - send a SysV IPC message to a message queue
- my : 2, // - declare and assign a local variable (lexical scoping)
- 'new' :1, //
- next :1, // - iterate a block prematurely
- no :1, // - unimport some module symbols or semantics at compile time
- oct :1, // - convert a string to an octal number
- open :1, // - open a file, pipe, or descriptor
- opendir :1, // - open a directory
- ord :1, // - find a character's numeric representation
- our : 2, // - declare and assign a package variable (lexical scoping)
- pack :1, // - convert a list into a binary representation
- 'package' :1, // - declare a separate global namespace
- pipe :1, // - open a pair of connected filehandles
- pop :1, // - remove the last element from an array and return it
- pos :1, // - find or set the offset for the last/next m//g search
- print :1, // - output a list to a filehandle
- printf :1, // - output a formatted list to a filehandle
- prototype :1, // - get the prototype (if any) of a subroutine
- push :1, // - append one or more elements to an array
- q :null, // - singly quote a string
- qq :null, // - doubly quote a string
- qr :null, // - Compile pattern
- quotemeta :null, // - quote regular expression magic characters
- qw :null, // - quote a list of words
- qx :null, // - backquote quote a string
- rand :1, // - retrieve the next pseudorandom number
- read :1, // - fixed-length buffered input from a filehandle
- readdir :1, // - get a directory from a directory handle
- readline :1, // - fetch a record from a file
- readlink :1, // - determine where a symbolic link is pointing
- readpipe :1, // - execute a system command and collect standard output
- recv :1, // - receive a message over a Socket
- redo :1, // - start this loop iteration over again
- ref :1, // - find out the type of thing being referenced
- rename :1, // - change a filename
- require :1, // - load in external functions from a library at runtime
- reset :1, // - clear all variables of a given name
- 'return' :1, // - get out of a function early
- reverse :1, // - flip a string or a list
- rewinddir :1, // - reset directory handle
- rindex :1, // - right-to-left substring search
- rmdir :1, // - remove a directory
- s :null, // - replace a pattern with a string
- say :1, // - print with newline
- scalar :1, // - force a scalar context
- seek :1, // - reposition file pointer for random-access I/O
- seekdir :1, // - reposition directory pointer
- select :1, // - reset default output or do I/O multiplexing
- semctl :1, // - SysV semaphore control operations
- semget :1, // - get set of SysV semaphores
- semop :1, // - SysV semaphore operations
- send :1, // - send a message over a socket
- setgrent :1, // - prepare group file for use
- sethostent :1, // - prepare hosts file for use
- setnetent :1, // - prepare networks file for use
- setpgrp :1, // - set the process group of a process
- setpriority :1, // - set a process's nice value
- setprotoent :1, // - prepare protocols file for use
- setpwent :1, // - prepare passwd file for use
- setservent :1, // - prepare services file for use
- setsockopt :1, // - set some socket options
- shift :1, // - remove the first element of an array, and return it
- shmctl :1, // - SysV shared memory operations
- shmget :1, // - get SysV shared memory segment identifier
- shmread :1, // - read SysV shared memory
- shmwrite :1, // - write SysV shared memory
- shutdown :1, // - close down just half of a socket connection
- 'sin' :1, // - return the sine of a number
- sleep :1, // - block for some number of seconds
- socket :1, // - create a socket
- socketpair :1, // - create a pair of sockets
- 'sort' :1, // - sort a list of values
- splice :1, // - add or remove elements anywhere in an array
- 'split' :1, // - split up a string using a regexp delimiter
- sprintf :1, // - formatted print into a string
- 'sqrt' :1, // - square root function
- srand :1, // - seed the random number generator
- stat :1, // - get a file's status information
- state :1, // - declare and assign a state variable (persistent lexical scoping)
- study :1, // - optimize input data for repeated searches
- 'sub' :1, // - declare a subroutine, possibly anonymously
- 'substr' :1, // - get or alter a portion of a stirng
- symlink :1, // - create a symbolic link to a file
- syscall :1, // - execute an arbitrary system call
- sysopen :1, // - open a file, pipe, or descriptor
- sysread :1, // - fixed-length unbuffered input from a filehandle
- sysseek :1, // - position I/O pointer on handle used with sysread and syswrite
- system :1, // - run a separate program
- syswrite :1, // - fixed-length unbuffered output to a filehandle
- tell :1, // - get current seekpointer on a filehandle
- telldir :1, // - get current seekpointer on a directory handle
- tie :1, // - bind a variable to an object class
- tied :1, // - get a reference to the object underlying a tied variable
- time :1, // - return number of seconds since 1970
- times :1, // - return elapsed time for self and child processes
- tr :null, // - transliterate a string
- truncate :1, // - shorten a file
- uc :1, // - return upper-case version of a string
- ucfirst :1, // - return a string with just the next letter in upper case
- umask :1, // - set file creation mode mask
- undef :1, // - remove a variable or function definition
- unlink :1, // - remove one link to a file
- unpack :1, // - convert binary structure into normal perl variables
- unshift :1, // - prepend more elements to the beginning of a list
- untie :1, // - break a tie binding to a variable
- use :1, // - load in a module at compile time
- utime :1, // - set a file's last access and modify times
- values :1, // - return a list of the values in a hash
- vec :1, // - test or set particular bits in a string
- wait :1, // - wait for any child process to die
- waitpid :1, // - wait for a particular child process to die
- wantarray :1, // - get void vs scalar vs list context of current subroutine call
- warn :1, // - print debugging info
- when :1, //
- write :1, // - print a picture record
- y :null}; // - transliterate a string
-
- var RXstyle="string-2";
- var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type
-
- function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;)
- state.chain=null; // 12 3tail
- state.style=null;
- state.tail=null;
- state.tokenize=function(stream,state){
- var e=false,c,i=0;
- while(c=stream.next()){
- if(c===chain[i]&&!e){
- if(chain[++i]!==undefined){
- state.chain=chain[i];
- state.style=style;
- state.tail=tail;}
- else if(tail)
- stream.eatWhile(tail);
- state.tokenize=tokenPerl;
- return style;}
- e=!e&&c=="\\";}
- return style;};
- return state.tokenize(stream,state);}
-
- function tokenSOMETHING(stream,state,string){
- state.tokenize=function(stream,state){
- if(stream.string==string)
- state.tokenize=tokenPerl;
- stream.skipToEnd();
- return "string";};
- return state.tokenize(stream,state);}
-
- function tokenPerl(stream,state){
- if(stream.eatSpace())
- return null;
- if(state.chain)
- return tokenChain(stream,state,state.chain,state.style,state.tail);
- if(stream.match(/^\-?[\d\.]/,false))
- if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))
- return 'number';
- if(stream.match(/^<<(?=\w)/)){ // NOTE: <"],RXstyle,RXmodifiers);}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
- else if(c=="q"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],"string");}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],"string");}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],"string");}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],"string");}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],"string");}}
- else if(c=="w"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],"bracket");}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],"bracket");}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],"bracket");}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],"bracket");}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],"bracket");}}
- else if(c=="r"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
- else if(/[\^'"!~\/(\[{<]/.test(c)){
- if(c=="("){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[")"],"string");}
- if(c=="["){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,["]"],"string");}
- if(c=="{"){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,["}"],"string");}
- if(c=="<"){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[">"],"string");}
- if(/[\^'"!~\/]/.test(c)){
- return tokenChain(stream,state,[stream.eat(c)],"string");}}}}
- if(ch=="m"){
- var c=look(stream, -2);
- if(!(c&&/\w/.test(c))){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(/[\^'"!~\/]/.test(c)){
- return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}
- if(c=="("){
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
- if(c=="["){
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
- if(c=="{"){
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
- if(c=="<"){
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}}
- if(ch=="s"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
- if(ch=="y"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
- if(ch=="t"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat("r");if(c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}
- if(ch=="`"){
- return tokenChain(stream,state,[ch],"variable-2");}
- if(ch=="/"){
- if(!/~\s*$/.test(prefix(stream)))
- return "operator";
- else
- return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}
- if(ch=="$"){
- var p=stream.pos;
- if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}"))
- return "variable-2";
- else
- stream.pos=p;}
- if(/[$@%]/.test(ch)){
- var p=stream.pos;
- if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(look(stream, -2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){
- var c=stream.current();
- if(PERL[c])
- return "variable-2";}
- stream.pos=p;}
- if(/[$@%&]/.test(ch)){
- if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){
- var c=stream.current();
- if(PERL[c])
- return "variable-2";
- else
- return "variable";}}
- if(ch=="#"){
- if(look(stream, -2)!="$"){
- stream.skipToEnd();
- return "comment";}}
- if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){
- var p=stream.pos;
- stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
- if(PERL[stream.current()])
- return "operator";
- else
- stream.pos=p;}
- if(ch=="_"){
- if(stream.pos==1){
- if(suffix(stream, 6)=="_END__"){
- return tokenChain(stream,state,['\0'],"comment");}
- else if(suffix(stream, 7)=="_DATA__"){
- return tokenChain(stream,state,['\0'],"variable-2");}
- else if(suffix(stream, 7)=="_C__"){
- return tokenChain(stream,state,['\0'],"string");}}}
- if(/\w/.test(ch)){
- var p=stream.pos;
- if(look(stream, -2)=="{"&&(look(stream, 0)=="}"||stream.eatWhile(/\w/)&&look(stream, 0)=="}"))
- return "string";
- else
- stream.pos=p;}
- if(/[A-Z]/.test(ch)){
- var l=look(stream, -2);
- var p=stream.pos;
- stream.eatWhile(/[A-Z_]/);
- if(/[\da-z]/.test(look(stream, 0))){
- stream.pos=p;}
- else{
- var c=PERL[stream.current()];
- if(!c)
- return "meta";
- if(c[1])
- c=c[0];
- if(l!=":"){
- if(c==1)
- return "keyword";
- else if(c==2)
- return "def";
- else if(c==3)
- return "atom";
- else if(c==4)
- return "operator";
- else if(c==5)
- return "variable-2";
- else
- return "meta";}
- else
- return "meta";}}
- if(/[a-zA-Z_]/.test(ch)){
- var l=look(stream, -2);
- stream.eatWhile(/\w/);
- var c=PERL[stream.current()];
- if(!c)
- return "meta";
- if(c[1])
- c=c[0];
- if(l!=":"){
- if(c==1)
- return "keyword";
- else if(c==2)
- return "def";
- else if(c==3)
- return "atom";
- else if(c==4)
- return "operator";
- else if(c==5)
- return "variable-2";
- else
- return "meta";}
- else
- return "meta";}
- return null;}
-
- return{
- startState:function(){
- return{
- tokenize:tokenPerl,
- chain:null,
- style:null,
- tail:null};},
- token:function(stream,state){
- return (state.tokenize||tokenPerl)(stream,state);}
- };});
-
-CodeMirror.registerHelper("wordChars", "perl", /[\w$]/);
-
-CodeMirror.defineMIME("text/x-perl", "perl");
-
-// it's like "peek", but need for look-ahead or look-behind if index < 0
-function look(stream, c){
- return stream.string.charAt(stream.pos+(c||0));
-}
-
-// return a part of prefix of current stream from current position
-function prefix(stream, c){
- if(c){
- var x=stream.pos-c;
- return stream.string.substr((x>=0?x:0),c);}
- else{
- return stream.string.substr(0,stream.pos-1);
- }
-}
-
-// return a part of suffix of current stream from current position
-function suffix(stream, c){
- var y=stream.string.length;
- var x=y-stream.pos+1;
- return stream.string.substr(stream.pos,(c&&c=(y=stream.string.length-1))
- stream.pos=y;
- else
- stream.pos=x;
-}
-
-});
diff --git a/public/js/lib/codemirror/mode/php/index.html b/public/js/lib/codemirror/mode/php/index.html
deleted file mode 100644
index adf6b1be22..0000000000
--- a/public/js/lib/codemirror/mode/php/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-CodeMirror: PHP mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-PHP mode
-
- 1, 'b' => 2, 3 => 'c');
-
-echo "$a[a] ${a[3] /* } comment */} {$a[b]} \$a[a]";
-
-function hello($who) {
- return "Hello $who!";
-}
-?>
-The program says = hello("World") ?>.
-
-
-
-
-
- Simple HTML/PHP mode based on
- the C-like mode. Depends on XML,
- JavaScript, CSS, HTMLMixed, and C-like modes.
-
- MIME types defined: application/x-httpd-php
(HTML with PHP code), text/x-php
(plain, non-wrapped PHP code).
-
diff --git a/public/js/lib/codemirror/mode/php/php.js b/public/js/lib/codemirror/mode/php/php.js
deleted file mode 100644
index e112d91121..0000000000
--- a/public/js/lib/codemirror/mode/php/php.js
+++ /dev/null
@@ -1,226 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- function keywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- // Helper for stringWithEscapes
- function matchSequence(list, end) {
- if (list.length == 0) return stringWithEscapes(end);
- return function (stream, state) {
- var patterns = list[0];
- for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
- state.tokenize = matchSequence(list.slice(1), end);
- return patterns[i][1];
- }
- state.tokenize = stringWithEscapes(end);
- return "string";
- };
- }
- function stringWithEscapes(closing) {
- return function(stream, state) { return stringWithEscapes_(stream, state, closing); };
- }
- function stringWithEscapes_(stream, state, closing) {
- // "Complex" syntax
- if (stream.match("${", false) || stream.match("{$", false)) {
- state.tokenize = null;
- return "string";
- }
-
- // Simple syntax
- if (stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
- // After the variable name there may appear array or object operator.
- if (stream.match("[", false)) {
- // Match array operator
- state.tokenize = matchSequence([
- [["[", null]],
- [[/\d[\w\.]*/, "number"],
- [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
- [/[\w\$]+/, "variable"]],
- [["]", null]]
- ], closing);
- }
- if (stream.match(/\-\>\w/, false)) {
- // Match object operator
- state.tokenize = matchSequence([
- [["->", null]],
- [[/[\w]+/, "variable"]]
- ], closing);
- }
- return "variable-2";
- }
-
- var escaped = false;
- // Normal string
- while (!stream.eol() &&
- (escaped || (!stream.match("{$", false) &&
- !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
- if (!escaped && stream.match(closing)) {
- state.tokenize = null;
- state.tokStack.pop(); state.tokStack.pop();
- break;
- }
- escaped = stream.next() == "\\" && !escaped;
- }
- return "string";
- }
-
- var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
- "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " +
- "for foreach function global goto if implements interface instanceof namespace " +
- "new or private protected public static switch throw trait try use var while xor " +
- "die echo empty exit eval include include_once isset list require require_once return " +
- "print unset __halt_compiler self static parent yield insteadof finally";
- var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
- var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
- CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
- CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
-
- var phpConfig = {
- name: "clike",
- helperType: "php",
- keywords: keywords(phpKeywords),
- blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
- atoms: keywords(phpAtoms),
- builtin: keywords(phpBuiltin),
- multiLineStrings: true,
- hooks: {
- "$": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "variable-2";
- },
- "<": function(stream, state) {
- if (stream.match(/<)) {
- stream.eatWhile(/[\w\.]/);
- var delim = stream.current().slice(3);
- if (delim) {
- (state.tokStack || (state.tokStack = [])).push(delim, 0);
- state.tokenize = stringWithEscapes(delim);
- return "string";
- }
- }
- return false;
- },
- "#": function(stream) {
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
- return "comment";
- },
- "/": function(stream) {
- if (stream.eat("/")) {
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
- return "comment";
- }
- return false;
- },
- '"': function(_stream, state) {
- (state.tokStack || (state.tokStack = [])).push('"', 0);
- state.tokenize = stringWithEscapes('"');
- return "string";
- },
- "{": function(_stream, state) {
- if (state.tokStack && state.tokStack.length)
- state.tokStack[state.tokStack.length - 1]++;
- return false;
- },
- "}": function(_stream, state) {
- if (state.tokStack && state.tokStack.length > 0 &&
- !--state.tokStack[state.tokStack.length - 1]) {
- state.tokenize = stringWithEscapes(state.tokStack[state.tokStack.length - 2]);
- }
- return false;
- }
- }
- };
-
- CodeMirror.defineMode("php", function(config, parserConfig) {
- var htmlMode = CodeMirror.getMode(config, "text/html");
- var phpMode = CodeMirror.getMode(config, phpConfig);
-
- function dispatch(stream, state) {
- var isPHP = state.curMode == phpMode;
- if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
- if (!isPHP) {
- if (stream.match(/^<\?\w*/)) {
- state.curMode = phpMode;
- state.curState = state.php;
- return "meta";
- }
- if (state.pending == '"' || state.pending == "'") {
- while (!stream.eol() && stream.next() != state.pending) {}
- var style = "string";
- } else if (state.pending && stream.pos < state.pending.end) {
- stream.pos = state.pending.end;
- var style = state.pending.style;
- } else {
- var style = htmlMode.token(stream, state.curState);
- }
- if (state.pending) state.pending = null;
- var cur = stream.current(), openPHP = cur.search(/<\?/), m;
- if (openPHP != -1) {
- if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
- else state.pending = {end: stream.pos, style: style};
- stream.backUp(cur.length - openPHP);
- }
- return style;
- } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
- state.curMode = htmlMode;
- state.curState = state.html;
- return "meta";
- } else {
- return phpMode.token(stream, state.curState);
- }
- }
-
- return {
- startState: function() {
- var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode);
- return {html: html,
- php: php,
- curMode: parserConfig.startOpen ? phpMode : htmlMode,
- curState: parserConfig.startOpen ? php : html,
- pending: null};
- },
-
- copyState: function(state) {
- var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
- php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
- if (state.curMode == htmlMode) cur = htmlNew;
- else cur = phpNew;
- return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
- pending: state.pending};
- },
-
- token: dispatch,
-
- indent: function(state, textAfter) {
- if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
- (state.curMode == phpMode && /^\?>/.test(textAfter)))
- return htmlMode.indent(state.html, textAfter);
- return state.curMode.indent(state.curState, textAfter);
- },
-
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//",
-
- innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
- };
- }, "htmlmixed", "clike");
-
- CodeMirror.defineMIME("application/x-httpd-php", "php");
- CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
- CodeMirror.defineMIME("text/x-php", phpConfig);
-});
diff --git a/public/js/lib/codemirror/mode/php/test.js b/public/js/lib/codemirror/mode/php/test.js
deleted file mode 100644
index e2ecefc187..0000000000
--- a/public/js/lib/codemirror/mode/php/test.js
+++ /dev/null
@@ -1,154 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({indentUnit: 2}, "php");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
- MT('simple_test',
- '[meta ]');
-
- MT('variable_interpolation_non_alphanumeric',
- '[meta $/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]',
- '[meta ?>]');
-
- MT('variable_interpolation_digits',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_1',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_2',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_3',
- '[meta [variable aaaaa][string .aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];',
- '[meta ?>]');
-
- MT('variable_interpolation_escaping',
- '[meta aaa.aaa"];',
- '[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];',
- '[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];',
- '[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];',
- '[meta ?>]');
-
- MT('variable_interpolation_complex_syntax_1',
- '[meta aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');
-
- MT('variable_interpolation_complex_syntax_2',
- '[meta } $aaaaaa.aaa"];',
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];',
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];');
-
-
- function build_recursive_monsters(nt, t, n){
- var monsters = [t];
- for (var i = 1; i <= n; ++i)
- monsters[i] = nt.join(monsters[i - 1]);
- return monsters;
- }
-
- var m1 = build_recursive_monsters(
- ['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'],
- '[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]',
- 10
- );
-
- MT('variable_interpolation_complex_syntax_3_1',
- '[meta ]');
-
- var m2 = build_recursive_monsters(
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'],
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
- 5
- );
-
- MT('variable_interpolation_complex_syntax_3_2',
- '[meta ]');
-
- function build_recursive_monsters_2(mf1, mf2, nt, t, n){
- var monsters = [t];
- for (var i = 1; i <= n; ++i)
- monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];
- return monsters;
- }
-
- var m3 = build_recursive_monsters_2(
- m1,
- m2,
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'],
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
- 4
- );
-
- MT('variable_interpolation_complex_syntax_3_3',
- '[meta ]');
-
- MT("variable_interpolation_heredoc",
- "[meta
-
-CodeMirror: Pig Latin mode
-
-
-
-
-
-
-
-
-
-
-Pig Latin mode
-
--- Apache Pig (Pig Latin Language) Demo
-/*
-This is a multiline comment.
-*/
-a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray);
-b = GROUP a BY (x,y,3+4);
-c = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z;
-STORE c INTO "\path\to\output";
-
---
-
-
-
-
-
- Simple mode that handles Pig Latin language.
-
-
- MIME type defined: text/x-pig
- (PIG code)
-