These are chat archives for FreeCodeCamp/Help

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

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well")
});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<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>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<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>
</div>
</div>
</div>
</div>

why use #right-well ?
RNG001
@RNG001
May 13 15:46
i see it
Brad
@bradtaniguchi
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
@paulcarroty
May 13 18:06
@bradtaniguchi
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(\'socket.io\')(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 socket.io 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 socket.io code\n    \n  \n});\n' to match /socket.on.*('|")disconnect('|")/gi
// tests completed
removed use strict, the same error
Brad
@bradtaniguchi
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
@paulcarroty
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); })
Brad
@bradtaniguchi
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
@paulcarroty
May 13 18:44
added this in the forum thread. Sometimes be cheater is very profitable.
Brad
@bradtaniguchi
May 13 18:49
haha
Josebuendia
@Josebuendia
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")
            'advancer
            cm = cm + 1
            Wend
Hi, Please why isn't this code creating a chart cm to km?