These are chat archives for FreeCodeCamp/Help

May 2019
May 13 07:48
body {
background-color: green;
</style> why font do not work ?
I get it
thank you
May 13 12:48
Christopher McCormack
May 13 15:03
@ayi616 what is your question?
May 13 15:12
help me. I use jquery.appendTo()

$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
<div class="col-xs-6">
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>

why use #right-well ?
May 13 15:46
i see it
May 13 18:04
@paulcarroty What are you stuck on? Are you getting errors?
Oh is that your comment?
Id say remove use strict, it might be messing up the error there, but its hard to tell from that stack
Pavlo Rudyi
May 13 18:06
expected '\'use strict\';\n\nconst express     = require(\'express\');\nconst session     = require(\'express-session\');\nconst bodyParser  = require(\'body-parser\');\nconst fccTesting  = require(\'./freeCodeCamp/fcctesting.js\');\nconst auth        = require(\'./app/auth.js\');\nconst routes      = require(\'./app/routes.js\');\nconst mongo       = require(\'mongodb\').MongoClient;\nconst passport    = require(\'passport\');\nconst cookieParser= require(\'cookie-parser\')\nconst app         = express();\nconst http        = require(\'http\').Server(app);\nconst sessionStore= new session.MemoryStore();\nconst io          = require(\'\')(http);\n\n\nconst cors = require(\'cors\');\napp.use(cors())\n\nfccTesting(app);\n\napp.use(\'/public\', express.static(process.cwd() + \'/public\'));\napp.use(cookieParser());\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: true }));\napp.set(\'view engine\', \'pug\')\n\napp.use(session({\n  secret: process.env.SESSION_SECRET,\n  resave: true,\n  saveUninitialized: true,\n  key: \'express.sid\',\n  store: sessionStore,\n}));\n\n\nvar currentUsers = 0\n\n\nmongo.connect(process.env.DATABASE, (err, db) => {\n    if(err) console.log(\'Database error: \' + err);\n  \n    auth(app, db);\n    routes(app, db);\n      \n    http.listen(process.env.PORT || 3000);\n\n  \n    //start code  \n\n\n\n  io.on(\'connection\', socket => {\n    console.log(\'A user has connected\');\n    ++currentUsers;\n\n  \n  io.emit(\'user count\', currentUsers);\n  \n  io.emit(\'disconnect\', --currentUsers);\n  \n  })\n\n    \n //end code\n    \n  \n});\n' to match /socket.on.*('|")disconnect('|")/gi
// tests completed
removed use strict, the same error
May 13 18:08
almost looks like a bug? But yea really hard to tell from that error. I don't have experience with this challenge so I can't offer my more help :(
Pavlo Rudyi
May 13 18:30
@bradtaniguchi maybe I'm cheater, but solved it by reading tests :D
testString: getUserInput => $.get(getUserInput('url')+ '/_api/server.js') .then(data => { assert.match(data, /socket.on.*('|")disconnect('|")/gi, ''); }, xhr => { throw new Error(xhr.statusText); })
May 13 18:36
haha, well if it works XD. I mean if you answer is really funky but the tests pass maybe open an issue? It's very possible it is a bug with that regex (it looks huge and error prone)
Pavlo Rudyi
May 13 18:44
added this in the forum thread. Sometimes be cheater is very profitable.
May 13 18:49
May 13 21:45
Dim S, e, cm, inches As Double
        S = CDbl(txtStart.Text)
        e = CDbl(txtEnd.Text)

        cm = S 'initialiser
        While cm <= e 'guard
            inches = cm / 2.54
            txtConversionChart.AddItem (cm & " cms = " & inches & "inches")
            cm = cm + 1
Hi, Please why isn't this code creating a chart cm to km?