Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Jun 19 20:05
    @krisb1220 banned @Gastony
  • May 14 22:38
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:37
    @bjorno43 banned @real-action
  • Mar 05 07:17
    @krisb1220 banned @stevemeds12_gitlab
  • Feb 01 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 03:08
    @bjorno43 banned @doctor-sam
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 27 2019 19:47
    @mstellaluna banned @zhonghuacx
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Jan 08 2019 21:57
    @mstellaluna banned @dertiuss323
  • Dec 15 2018 23:39
    @mstellaluna banned @Julianna7x_gitlab
  • Nov 07 2018 04:43
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:26
    @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:15
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:13
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
Is anyone available to help me out with express routing? I'm making a quiz app and when I try to delete a question it comes back as a 500 error saying it can't read the query or the id
1 reply
I can pm my code and errors if so!
Corey Lewis
you can just post the code for that route here too and I'm sure someone will take a look
Any ideas from line-of-business application or is it a dead cause due to CRM and CMS off the shelf products. What are your views on it
guaco manzano
Dung Nguyen
hey how do i add html head and body tags fast?
im using sublime it was something forward slash
Mandeep Sharma
@Jetpacky hello emmet package may help you to achive this
save file by .html extension and then type html hit enter it will give u the basic boilerplate of html
Daniele Manca
does anybody know how to set images in css grid children which would fit the whole width and height of the container: https://codepen.io/danielemanca83/pen/vYGprdL
also without distorting the image possibly
let sampleWord = "astronaut";
let pwRegex = /^\D(?=\w{5})(?=\w*\d{2})/; // Change this line
let result = pwRegex.test(sampleWord);
how in the above code, the regex /^\D(?=\w{5})(?=\w*\d{2})/ is the correct answer according to the hint section? The challenge states that the characters have to be minimum 5 and can be more. But this regex sets the \w to exactly {5} ?
how to connect backend and front nd?
Corey Lewis
@abrarasrar12_gitlab the simple answer is that most databases have a package available to connect that give you a means of giving a "connection string" which is a string that allows you to send a username/password over the wire to the DB to connect. I.e. for PostgreSQL in javascript you could use https://www.npmjs.com/package/pg-connection-string. which has a connection string like:
var parse = require('pg-connection-string').parse;

var config = parse('postgres://someuser:somepassword@somehost:381/somedatabase')
things like that will exist for pretty much all databases, you could write your own too just to see how it does it behind the scenes too but that's a lot of already done work
the code particulars will differ by language and database, but the over-arching process is the same, you're just giving a web address and credentials to log into the DB
I'm trying to create an account on freecodecamp forum but i keep getting this , please, any idea on what i can do?
Nicholas Carrigan (he/him)
Hey @Bvkie__twitter, are you by chance using a VPN?
it appears so, could that be the problem?
Yaay, thank you so much @nhcarrigan . All this while i've been using my work computer which is connected to the office internet. When you mentioned VPN, i tried it again using my mobile phone, and it worked at once. I'm really happy because i've been battling with this for months
Nicholas Carrigan (he/him)
Glad I could help!
Jamie Ridding
Hi all! My name is Marcelo. I am 40 y.o and I am happy to share with you that I've just finished the basic javascript challenge of the data structures certification and I feel I'm on the right track. Now I am starting with the ES6 challenge. I just wanted to say that sometimes I feel totally overwhelmed by the algorithms and some other times I feel I have nailed them. Most of the time I don't really know how to feel.
Roger Futrell
Hi all, I'm stuck really bad on one of the microservice projects (shorten urls) due to an issue I'm having with mongoose. I can share my repl.it project URL if it's public, but the gist of the problem is that my mongoose queries are working but I can't for the life of me figure out how to store the query result in a variable for later use. It's probably directly related to my struggle with callbacks. Any help appreciated!
10 replies
Shivam Panjeta

I have a map of map in Javascript something like < Boolean , <StartDate, EndDate> >
On being given a date, I have to return the boolean value corresponding to the period it belongs to.

statusFlagMap = < Boolean , <StartDate, EndDate> >

checkFlagValueForDate(date) {
      return the Boolean Value from statusFlagMap corresponding to the period the inputted date belongs to

Not able to get how to resolve this, can anybody help with this if there is any straight-forward way

I am open to updating the Object type of statusFlagMap from map of map to something else also.

Kaz Baig
@shivampanjeta You'll probably have to use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries with the current data structure
Shivam Panjeta
@kbaig Thanks for sharing that. It seems like iterating through the map is the only option?
Kaz Baig
@shivampanjeta Probably. This isn't really a good use case for Maps
Shivam Panjeta
@kbaig this data structure is basically a sequence of dates with alternating periods of false and true between them.
Anders Nicolai Magnussen
document.getElementsByClassName('message')[0].textContent="Here is the message";
<h1>Cat Photo Finder</h1>
<p class="message box">
  The message will go here
Do you know what the [0] for the array refers to here?
@OfficialOneDev_twitter the [0] refers to the first item in the array that is created via the getElementsByClassName method. Every node with the class 'message' will be in that array, but you'll only be referring to the first item. [1] would refer to the second item in the array and so on.
Doni Yafi
Anyone looking for a partner to collaborate on their project PM me
I can help with MERN/MEVN stacks and Laravel
Cliff Galas
Hello Hello people :)
Taulut Hossain Washi
Hello Need Pair Programming Partner for learning new stuff. At least 1 hours per day. Please PM me if you are interested. Thanks.
Hello I am looking for some help on Basic Node and Express - Use the .env File I have read the instructions and went over the hint I have also tried several solutions from the free code camp forums but nothing seems to work. this is passing the test I mean because for me for me going to /json does show me the message in upper case and changing the .env key does turn the message value to lower case but the test is not being accepted and gives me this output
// running tests
The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE
// tests completed
Temidire Abobare
Hi gitters, i was setting up my FreeCodeCamp account, gitter link they provide is a dead link, i don't know if i'm in the right place
Jamie Ridding
Temidire Abobare
Hi @Themayu
Shreyansh Agarwal
Hello Can someone help me with a CSS problem
I am unable to remove space from my grid from sides.
Kobi Bar Hanin
Hi! I’ve built an interactive git cli - igit. Check it out: https://github.com/kobibarhanin/igit to install: pip install igit
Cliff Galas
Does anyone know how to get gitter into dark mode
Kaz Baig
@Sn0wm8n click your profile photo in top right -> toggle dark mode