Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
damn Batman is no longer maintained
Stephen James
@rhozeta is findOne asynchronous?
Ahmed Al-Gallad
Hello guys
I am a little bit stuck the algorithm of Title case a sentence

function titleCase(str) {
var words = str.split(" ");
var capsOn = "";

for (var i = 0; i < words.length; i++) {

capsOn = words[i].substring(0,1).toUpperCase() + words[i].substring(1).toLowerCase();




titleCase("I'm a little tea pot");

The function is working if I return capsOn ....What I am stuck in is how to return the whole sentence again joined
after the iterations inside the for loop
Nate Mallison
@Gallad23 you don't have to search to far.....
You could also do capsOn += ....
or this
Ahmed Al-Gallad
that's great thank you so much appreciate it :smile:
@DraGoNKiSs That's what i was thinking. But to actually open the new page you'd need a bit of JS right?
@Gallad23 You could turn capsOn into an array and then push the manipulated words into it. Then you can return the array, and join it back up again by using .join(" ")
@MuhammedKarim pm me
doesnt even mean anything
are u asking us to decrypt it?
ive seem some very handy decrypter out there
@Frosty427 Lorem ipsum text is not really latin
It has a bunch of latin in it though
Aloha everyone
Eric Weiss
guten tag
How you doing this evening?
Eric Weiss
learning react
What should i be aware of security-wise when setting up a site with a database without a PHP framework?
@LeeConnelly12 Uh all of them? (sorry for being generic I just idk haha)
Hey I'm try to learn visual basic and in my textbook there is a project where I need to make a program the when you enter your name as lastname,first name it will switch the names places and remove the comma I cant seem to find out how to do this any help would be appreciated.
Ken Haduch
@AJB14 - I don't know visual basic, at least haven't looked at it in years - look at string manipulation functions (I might try to google and see what hints I could give) but something like a "split" method or function, that's where I would start.
Ken Haduch
@AJB14 - this page looks like it would be what you want to use - "Split" and you specify a delimiter, it returns an array of the strings that are found. There is "RTrim" and "LTrim" to remove leading and trailing spaces. Then a "Join" to form them back to a string, or maybe just concatenate them using a space in between the two words.
Hey, can anyone help me out! I am trying to do authentication with JsonWebToken and Passport, but I keep getting this error after applying passport.authenticate to my route:
(node:2624) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): CastError: Cast to ObjectId failed for value "undefined" at path "_id" for model "Post"
(node:2624) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Here is the strategy:
var opts = {}
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken()
opts.secretOrKey = 'theysaidnmlmlm'
opts.issuer = 'accounts.theysaid.co'
opts.audience = 'theysaid.co'
passport.use(new JwtStrategy(opts, function(jwt_payload, done) {
  User.findOne({id: jwt_payload.sub}, function(err, user) {
    if (err) {
      return done(err, false)
    if (user) {
      return done(null, user)
    } else {
      return done(null, false)
Abraham Andres Luna
You could always browse the internet for more resources and tutorials about what you need to build. i like codeproject
@jvondarke try codeproject
@rhozeta I don't see the where you define the 'done' variable
Ryan Williams
Can someone please help me with this div background image moving, the image moves as text appears and I just want the image to stay still, any help is greatly appreciated https://codereese.com/
Abraham Andres Luna
@Ryanwfile body {
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
The fixed position will stop it from scrolling
Ryan Williams
@geniusFunk Thank you so much, tried editing so much CSS in the inspector and couldn't pinpoint it
ryanwfile sends brownie points to @geniusfunk :sparkles: :thumbsup: :sparkles:
:cookie: 13 | @geniusfunk |http://www.freecodecamp.org/geniusfunk
Abraham Andres Luna
Thx for da brownies @Ryanwfile
What IDE are you using?
Ryan Williams
@geniusFunk The site is on wordpress
Ryan Williams
@geniusFunk I have tried that css in a few locations in the chrome inspector and can't seem to fix the image moving issue, where specifically should I use this css?
Abraham Andres Luna
@Ryanwfile use that css on the div class definition
Let me fire up the laptop and review your code
does anyone know useful links for understanding authentication in express just the basic without using mongoose for modelling.. every tutorial i find uses this piece of #### like the writers just copy paste each other
Ali Bulut