Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Jun 19 2021 12:31
    @texas2010 banned @therichaverma
  • Jun 19 2020 20:05
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Aug 17 2019 01:43
    @bjorno43 banned @linkin-park
  • Jun 20 2019 21:20
    @bjorno43 banned @shenerd140
  • May 10 2019 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 27 2019 19:47
    @mstellaluna banned @zhonghuacx
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Jan 08 2019 22:00
    @mstellaluna banned @dertiuss323
  • Dec 15 2018 23:36
    @mstellaluna banned @18835579411
  • Dec 13 2018 23:57
    @mstellaluna banned @brandon6190
  • 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:13
    User @bjorno43 unbanned @androuino
Christopher McCormack
Hello! If you are new here and want to join the conversation, please head over to the freeCodeCamp Discord channel! https://www.freecodecamp.org/news/freecodecamp-discord-chat-room-server/
Tunde Oretade

hi guys i need help with this:

filterData = () => {
      const {
        enrollee, id,
      } = this.state;
      const newData = enrollee.filter(data => {
        if (data.id === id) {
          return data;
        return null;

      this.setState({ singleUser: newData });

what am I doing wrong?

Jagdish Parihar
Hi. I want to design a project using MVC in express.
Can anyone help me with the design I should follow for that.
I want to know. What should be the folder structure look like
so that, it can be easily modifiable in the future
Vanessa Correia
have you tried using express-generator, @jatin510? take a look here: https://expressjs.com/en/starter/generator.html
Jagdish Parihar
thanks @wordlesspirate :)
Cesar Gomez
Hey everyone, I could use a little help understanding an NPM package that was used by Brad Traversy(Udemy Instructor)

It seems simple enough to put into practice, however I am confused on how the function is being called. Here is the meat of the file.

const asyncUtil = fn =>
function asyncUtilWrap(...args) {
  const fnReturn = fn(...args)
  const next = args[args.length-1]
  return Promise.resolve(fnReturn).catch(next)


Here is an example of what its use is
const asyncHandler = require('express-async-handler')

express.get('/', asyncHandler(async (req, res, next) => {
    const bar = await foo.findAll();

Without express-async-handler

express.get('/',(req, res, next) => {
    .then ( bar => {
     } )
    .catch(next); // error passed on to the error handling route

I don't understand when asyncUtilWrap gets called.
I understand that asyncUtil accepts a function as an argument. In most cases it will be the callback from express. Then in the example we query are databases for all the items. At what point does asuncUtilWrap take over. By the name of it it sounds like it wraps our original function. However I have tried a few console messages within the function and I can't get it to fire off. Any help would be appreciated . Thank you!

Corey Lewis
@zootechdrum is asyncUtilWrap exported from that file? or is it used in another func in that file that is exported?\
asyncUtil is creating a closure, so the function passed to it will "initialize" the func, returning asyncUtilWrap with whatever fn was passed to it; but it'd have to invoked
did you place a console.log inside the node_modules file? If that's the case and you didn't see anything, it might be because you put the log into the unbuilt file rather than the built file; you'd need to find the built file usually in like lib which will be the transpiled code actually being used from the packag
Corey Lewis
so looks like express.get initializes asyncHandler with the callback you give it, then when the route gets hit I'd expect that asyncUtilWrap to fire
Jake Giri
do i need/should learn sql if i'm planning to learn/use graphql in the end?
Corey Lewis
@JakeDVirus graphql isnt a database, it's an alternative to REST database queries, you can use graphql with sql or NoSQL databases
Hi , everyone

I got a question please, I have built a react application with MongoDB. In the structure of my project I have 2 folders one is for the Front-end and the other for Backend. In order for me to see the actual result, I run nodemon server.js within the backend folder, and then I run on the project level npm start. My application is working perfectly.

My question to you guys, Would I face any issue if I deploy my project to Netlify ?

Hi everyone! I have just finished building my VueJS (frontend) and Strapi (backend) project... In two main folders, "frontend", and "backend", each with their own NodeJS / yarn configurations. I am completely stuck trying to deploy it on cPanel with Namecheap... Currently, the Vue part runs on localhost:8080, and Strapi on localhost:1337; I have no idea what these URLs become once on the server?

hi guys,
i code website using laravel,
i set up mysql is my first database, mongodb is my second database
my .env:

and i query builder, i get this error:
i have fixed everything i can, please help me

HI , i want to duplicate entitis but in same time i want to know the original entity of duplicated entities , does Someone have any idea ? thx :)
Has anybody tried to download the git repository Xuggler at https://github.com/artclarke/xuggle-xuggler? I installed MinGW to be able to configure and compile xuggler. When I followed the INSTALL Readme file, I was able to do "./configure", but am still unable to execute the "make" command on the makeFile without getting an error. Also, I got the "make" command by Chocolatey if that is of any good information. But my error is of the following:
Makefile:813: /c/Users/NICK/Desktop/XugglerFolder/xuggle-xuggler/mk/Makefile.global: No such file or directory
make: * No rule to make target '/c/Users/NICK/Desktop/XugglerFolder/xuggle-xuggler/mk/Makefile.global'. Stop.
FYI I created the "XugglerFolder" in which the "xuggle-xuggler" repos folder is in. So what exactly does the error mean and how do I fix it? Thanks
hey great community
any one can help ??
when i go for change password he tell me Failed to Change Password !!
  // Check whether the Submit Button is Clicked or not
    //echo "Cliked";
    //1. Get the Data From Form
    $current_password = md5($_POST['current_password']);
    $new_password =md5($_POST['new_password']);
    $confirm_password  = md5($_POST['confirm_password']);
    //2.Check whether the user with current id and password exist or not
    $sql = "SELECT * FROM tbl_admin WHERE id=$id AND password='$current_password'";
    // Execute the Query
    $res = mysqli_query($conn,$sql);
      //Check whether data is avilable or not
      $count = mysqli_num_rows($res);
        //User Exist and Password Can be Changed
        //echo "User Found";
        //Check whether the new password and confirm match or not
          //Update the Password
          //echo "Password Match";
          $sql2 = "UPDATE tbl_admin SET passowrd = '$new_password' WHERE id=$id";
          //Execute the Query
          $res2 = mysqli_query($conn, $sql2);
          //Check whether the query executed or not
            //Display Succes Message
            //Redirect to MNG Admin Page with Success Message
            $_SESSION['change-pwd'] = "<div class='success'>Password Changed Successfully.</div>";
            //Redirect the User
            //Display Erorr Message
            //Redirect to MNG Admin Page with Erorr Message
            $_SESSION['change-pwd'] = "<div class='error'>Failed to Change Password.</div>";
            //Redirect the User
          //Redirect to MNG Admin Page with Erorr Message
          $_SESSION['pwd-not-match'] = "<div class='error'>Password Did Not Match.</div>";
          //Redirect the User
        //User Does not Exist Set Message and Redirect
        $_SESSION['user-not-found'] = "<div class='error'>User Not Found.</div>";
        //Redirect the User

    //3. Check whether the New Password and Confirm Password Match or Not

    //4. Change Password if all above is true


Rok Z
@MohameddAli error in UPDATE tbl_admin SET passowrd
-> password
hello everyone
i'm new here pls i have a problem about my coding
can someone help me out pls pls
Uncaught SyntaxError: Identifier 'tittle' has already been declared
Vanessa Correia
not entirely sure without a snippet of code to look at, @rajirashed2010 , but if I had to guess, there must be a variable in our code that you are reusing. something along these lines:
let name = "a"

let name = "b"
let name = "b"

SyntaxError: Identifier 'name' has already been declared
thanks @wordlesspirate not that ma.
@wordlesspirate pls how can i sent my code to you so u can play around it together please
Vanessa Correia
if it is not too long of a piece of code, i would say you can paste here. just make sure to use quotations code inside so your code formats into a snippet, makes it a little easier to read.
quotations i mean these: ```. at the start and end of your code block.
guys anyone has experience with apache tomcat !
John Melody Me

Hey guys I use cheerio to scrape this table but it return nothing. Did I somehow did wrong ?

<table class="table trackTable">
                                <th colspan="4">Consignment No: MY37011088606</th>
                            <th>Consignment No</th>
                            <th>Date &amp; Time</th>
                                    <td>03/07/2020 14:58:43</td>



and my code was

$ = cheerio.load(response['data']);


            $('.table#trackTable').each((index, element) => {
                if (index === 0) return (true);


Any idea ? is the naming of the selctor wrong?

in the browser i did

$(".table > tbody:nth-child(2)").each(function(i,item) { console.log(item.innerText) });

and it return something , but cheerio doesn't

2 replies
Hi guys !
Anybody here to support me on one task
If user inputs an email for example@gmail.com , I would like to force the user not to add any extra letters after the .com
is there a way to do this please?
1 reply
schawnnara jiri
need help
What websites do you guys develop code in? I use repl.it unless I am working with webpages, then I use codepen. Repl.it always seems to have server issues and I seem to loose work often due to frequent down times
Tunde Oretade
hi guys. I need help. I have this Api that I am trying to consume: https://torre.bio/api/bios/ and I usually get this error Access to XMLHttpRequest at 'https://torre.bio/api/bios/john' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. on close investigation at the network tab I found out that any time I hit the above url I am being redirected to https://bio.torre.co/api/bios. Which seems to show that I may need a proxy server backend to handle access to this url. I have searched and nothing comes close to a solution. A stackoverflow respose "https://stackoverflow.com/questions/70114502/access-to-xmlhttprequest-at-from-origin-http-localhost4200-has-been-bloc " is a close answer but it was implemented with .Net. My app codebase is in react and I need help on setting up a proxy server to consume the API above. Thanks.
Nicolas Ramirez
Hey everyone! I would like to get deep knowledge of nodejs and backend concepts. I have been working as a software dev for a 5 years already, but mostly focusing on frontend. Can you give me some hints on what I need to know to become a really good backend/nodejs developer?
Dan Stockham
@kamatheuska the best thing I can suggest is getting an understanding how the http web server frameworks for nodejs work and getting comfortable building things with them