These are chat archives for FreeCodeCamp/Help

10th
Jan 2019
Levis
@agabyte
Jan 10 00:17
Hi. Why does my computer freeze as soon as i type <DisplayMessages /> in the React and Redux: Manage State Locally First challenge? Is there a memory leak?
Jason Luboff
@JLuboff
Jan 10 00:22
Why are you using <DisplayMessages />? Based on a quick glance at the challenge... you're causing an endless loop (calling itself)
JhanviDeAwesome
@JhanviDeAwesome
Jan 10 01:32
Can I help start a Java course?
I mean, or help contribute to a Java course?
nsonhouse
@nsonhouse
Jan 10 01:56
@JLuboff Jason Im back
Question for you or for any one that can answer this. I am using the mssql utility from npm. I have successfully connected to the DB. I want to very a connection to the DB without performing a query. Is there a way to do that? With MySQL and MongoDB I can open a connection, get status, and close the connection. Can I do that with this mssql utility?
Kranti Nebhwani
@darkphotonKN
Jan 10 03:21

In a project I'm working on I can currently successfully make a get request to a backend and load content for the home page, but if I try use the application router (react router) to go back to home page (by clicking on a link to the home page that's handled with react router), it gives this error in the console:

Mixed Content: The page at 'example.com/xxx' was loaded over HTTPS, but requested an insecure resource 'http://xxx.xxx.xx.xx/osnnp/common/api/content/HomeBanner'. This request has been blocked; the content must be served over HTTPS.

I did some research but i couldn't find why this is. If I make it a normal link i.e. <a href="/"> Home </a> it manages to go back to the home page and the request and content load is fine, but if I use the router it's suddenly request blocked

Does anyone know what's up with this error? could it be that I'm initially making the request on server side before rendering the page, so that if I click a routed link back to home page it's not fetching the request on the server-side anymore but only client side? But that doesn't explain why a plain <a> tag would then work fine
Claudio Restifo
@Marmiz
Jan 10 03:57
are you mixing server side routing with client side?
Niraj Nandish
@Nirajn2311
Jan 10 04:13
@cmccormack strange, none of us got that error
Jason Luboff
@JLuboff
Jan 10 05:03
@nsonhouse I’ll send you my connect function tomorrow when I’m at my work computer, I use the same mssql module so it’ll be pretty much plug and play. You’ll just have to pass it your config
nsonhouse
@nsonhouse
Jan 10 05:04
@JLuboff One more thing. I can not figure out or find documentation on how to CREATE DATABASE and CREATE TABLE.
Levis
@agabyte
Jan 10 05:17
@JLuboff thanks, needed some rest
glitz20
@glitz20
Jan 10 05:29

hey guys I have getting this random error in my react url
http://localhost:3000/%7B'/profile/'%20+%20this.props.username%7D

I donot know where this %7B and %7D is coming from

it should just be http://localhost:3000/profile/this.props.username
and it used to work before
Claudio Restifo
@Marmiz
Jan 10 05:30
@glitz20 those are the unicode for { and } respectively.
I guess you didn't escape properly :smile:
mstellaluna
@mstellaluna
Jan 10 05:32
@JhanviDeAwesome FreeCodeCamp currently does not have nor plan to have any courses on Java. We do have the guides at https://guide.freecodecamp.org/ if you wish to contribute an article. Please ask in the https://gitter.im/FreeCodeCamp/Contributors room if you need more information.
glitz20
@glitz20
Jan 10 05:34
@Marmiz got it thanks
Claudio Restifo
@Marmiz
Jan 10 05:37
:+1:
Anand Potukuchi
@anandpotukchi
Jan 10 05:40
im getting the donate modal every challenge in fcc
kamransagheir
@kamransagheir
Jan 10 06:30
Hi
can someone help me out with rest api using maven and jar-rx
asap plz
psyperl
@psyperl
Jan 10 07:55
I have a wooden shelve in front of my room that is heavy and I like to move it aside but I can't do on my own, if anyone willing to help will be greatly appreciated thanks :trollface:
Karma Drukpa
@coderkarma
Jan 10 08:35
I am coming...
πŸ™ƒ
kamransagheir
@kamransagheir
Jan 10 13:41
@kamransagheir
Hi
can someone help me out with rest api using maven and jar-rx
asap plz
kamransagheir
@kamransagheir
Jan 10 13:58
anybody? no body
kamransagheir
@kamransagheir
Jan 10 14:10
so, I'm trying to impliment a rest api that uses Java, Jar-rx, maven and jersey. My code works fine as java application but when I run it on maven server, It doesn't do anything. It is supposed to create a new file and then read from the previous file and extend a string to it
any clue why it is doing so?
Philip Durbin
@pdurbin
Jan 10 14:25
@kamransagheir have you posted your code anywhere?
kamransagheir
@kamransagheir
Jan 10 14:51
no
I haven't
@pdurbin
I'm not allowed to do si
so*
some obligations
Kyle Holm
@thekholm80
Jan 10 14:53
it's really hard to debug code without seeing the code
kamransagheir
@kamransagheir
Jan 10 14:55
but what I have done is that, I'm using post method: and inside a class, I have written code that that uses two methods : one of them creates a new file and the other one makes changes to it. then inside main method it calls the methods and do changes but all of it works fien when I run it as java appilcation
It's like part o f my internship and I'm not allowed to distribute or share anything related to it.
idk what to do cz when I run it on server, it does nothing
maybe of anyone can point to an example that performs such action, that will be great
in the same code, I had written code to read from one of the other files and that works fine
its only that when I try to add string to it and then create a file in my system and try to save it, it don't work
so all the rest api is supposed to do is to read off a file, make some changes to it and then save the modifed file as a new one
kamransagheir
@kamransagheir
Jan 10 15:00
any help will be highly appreciated
mstellaluna
@mstellaluna
Jan 10 15:43
@kamransagheir Go to https://coderanch.com/, its an extensive java forum. They might be able to help you.
Jason Luboff
@JLuboff
Jan 10 16:17
@nsonhouse sent you a private message
May Kittens Devour Your Soul
@diomed
Jan 10 16:46
hey, people, is anyone here pretty often on codepen?
if you are - do you ever see odd stuff like couple of letters on beginning of your pen,
that weren't supposed to be there.
like - you wrote that inside of a pen, but for some reason it appears on the very start,
before anything else in code. [or is this just my issue]?
Christopher McCormack
@cmccormack
Jan 10 16:51
you mean in the preview pane?
Jason Luboff
@JLuboff
Jan 10 16:56
I've had it inject {" "} into my React code...dunno why
Christopher McCormack
@cmccormack
Jan 10 16:58
if I had to guess it would be due to improperly closed tags somewhere
@JLuboff was that code within JSX?
Jason Luboff
@JLuboff
Jan 10 17:06
@cmccormack I can't fully recall... I do know that you were the one to point it out though lol
Christopher McCormack
@cmccormack
Jan 10 17:06
haha I have no memory of this
Jason Luboff
@JLuboff
Jan 10 17:07
Ya figures :P
Christopher McCormack
@cmccormack
Jan 10 17:11
I have the memory of a drug-addled goldfish
Jason Luboff
@JLuboff
Jan 10 17:13
:joy:
Niraj Nandish
@Nirajn2311
Jan 10 17:17
This was the best thing I read today πŸ˜‚πŸ˜‚
Nazar
@IsaakNazar
Jan 10 17:17
hey everybody! Does anyone have an experience in writing routing in vanilla js or jquery, if so, pls share your experience
May Kittens Devour Your Soul
@diomed
Jan 10 17:17

This was the best thing I read today πŸ˜‚πŸ˜‚

what? this?

I have the memory of a drug-addled goldfish

Christopher McCormack
@cmccormack
Jan 10 17:18
@IsaakNazar front-end or back-end routing?
you should bring back the fox!
May Kittens Devour Your Soul
@diomed
Jan 10 17:19
pls no sexual terms here
Nazar
@IsaakNazar
Jan 10 17:19
@cmccormack ok, I'll do it :)
front end
May Kittens Devour Your Soul
@diomed
Jan 10 17:20
@Nirajn2311 I thought I wont see you today
Christopher McCormack
@cmccormack
Jan 10 17:20
@IsaakNazar I've done routing with React router and a little bit using vanilla - what are you trying to do?
May Kittens Devour Your Soul
@diomed
Jan 10 17:20
up for another round of wheel of fortune / hangman?
Christopher McCormack
@cmccormack
Jan 10 17:21
you can use the Location API @IsaakNazar
Niraj Nandish
@Nirajn2311
Jan 10 17:22
@diomed now why would think that I won't be here today
Nazar
@IsaakNazar
Jan 10 17:23
@cmccormack I'm trying to write SPA in plain JS
May Kittens Devour Your Soul
@diomed
Jan 10 17:24
@Nirajn2311 coz u+re barely around anymore
unless you're just hiding from me :smile:
Niraj Nandish
@Nirajn2311
Jan 10 17:25
The fox ain't scared of a little cat
Nazar
@IsaakNazar
Jan 10 17:25
single container class, and a content of this class will change depending which nav menu I clicked on. Also routing should change
Niraj Nandish
@Nirajn2311
Jan 10 17:25
I'm barely around cos I'm busy nowadays
Nazar
@IsaakNazar
Jan 10 17:26
by routing i mean URL @cmccormack
nothing more
May Kittens Devour Your Soul
@diomed
Jan 10 17:26
_ H _
M _ J _ _ _ _ C
_ _ _ C _ R _
@Nirajn2311 be buisy with my projects instead :smirk_cat: :yum:
Nazar
@IsaakNazar
Jan 10 17:27
@diomed hey Kitty, how's it going ?
Niraj Nandish
@Nirajn2311
Jan 10 17:28
T
Christopher McCormack
@cmccormack
Jan 10 17:28
@IsaakNazar location api lets you change it without necessarily jumping to a new page I believe
May Kittens Devour Your Soul
@diomed
Jan 10 17:28
@IsaakNazar good going. pls participate in my game :)
Nazar
@IsaakNazar
Jan 10 17:28
@cmccormack yeah, got it, thank you Chris
Christopher McCormack
@cmccormack
Jan 10 17:28
@diomed T
May Kittens Devour Your Soul
@diomed
Jan 10 17:28
@Nirajn2311 pls go easy with the wovels this time
T H _
M _ J _ _ T _ C
_ _ _ C _ R _
Christopher McCormack
@cmccormack
Jan 10 17:28
oh
S
May Kittens Devour Your Soul
@diomed
Jan 10 17:29
T H _
M _ J _ S T _ C
_ _ _ C _ R _
Niraj Nandish
@Nirajn2311
Jan 10 17:29
E
May Kittens Devour Your Soul
@diomed
Jan 10 17:29
what did I just say ? :angry:
Nazar
@IsaakNazar
Jan 10 17:29
@diomed the second word majestic
Niraj Nandish
@Nirajn2311
Jan 10 17:29
Letter by letter
Christopher McCormack
@cmccormack
Jan 10 17:29
@IsaakNazar gotta guess letters
or the full answer
May Kittens Devour Your Soul
@diomed
Jan 10 17:29
who told you that? @IsaakNazar
good guidelines
T H E
M _ J E S T _ C
_ _ _ C _ R _
Niraj Nandish
@Nirajn2311
Jan 10 17:30
D
Christopher McCormack
@cmccormack
Jan 10 17:30
Y is sometimes not a vowel
May Kittens Devour Your Soul
@diomed
Jan 10 17:30
@IsaakNazar did you see in wheel of fortune people guessing only middle word
would you like an Y
Nazar
@IsaakNazar
Jan 10 17:30
ah sorry
May Kittens Devour Your Soul
@diomed
Jan 10 17:30
noD 32
Niraj Nandish
@Nirajn2311
Jan 10 17:31
U
May Kittens Devour Your Soul
@diomed
Jan 10 17:31
yup. wanna guess?
T H E
M _ J E S T _ C
U _ _ C _ R _
Christopher McCormack
@cmccormack
Jan 10 17:31
THE MAJESTIC UNICORN
May Kittens Devour Your Soul
@diomed
Jan 10 17:32
:congratulations: @cmccormack :tada: :ballot_box_with_check:
Nazar
@IsaakNazar
Jan 10 17:32
damn, nice shot Chris :)
May Kittens Devour Your Soul
@diomed
Jan 10 17:32
as you can see here, totally real; displayed in nature museum
Nazar
@IsaakNazar
Jan 10 17:32
hahah
Christopher McCormack
@cmccormack
Jan 10 17:32
LOL
Niraj Nandish
@Nirajn2311
Jan 10 17:32
πŸ˜‚πŸ˜‚
@cmccormack were you able to setup the tools repo yesterday
Nazar
@IsaakNazar
Jan 10 17:33
what a beautiful creature
May Kittens Devour Your Soul
@diomed
Jan 10 17:33
indeed
here's a little science behind it all
May Kittens Devour Your Soul
@diomed
Jan 10 17:41
@Nirajn2311 uno mas?
Christopher McCormack
@cmccormack
Jan 10 17:41
sure!
Niraj Nandish
@Nirajn2311
Jan 10 17:42
I ain't Spanish but I only understood the first word
Christopher McCormack
@cmccormack
Jan 10 17:42
one more
May Kittens Devour Your Soul
@diomed
Jan 10 17:43
:uno: cards
@Nirajn2311 there they were , out in the desert, exposed on the open. and she said - but there's only one savage.
but he said: Hay uno, mas vendrΓ‘n otros.

anyway:
_ _ _ _ _ _ L L
Christopher McCormack
@cmccormack
Jan 10 17:47
unomas.gif
May Kittens Devour Your Soul
@diomed
Jan 10 17:48
strange porn
Christopher McCormack
@cmccormack
Jan 10 17:48
G
Shanghai Noon - Uno Mas scene - great movie
May Kittens Devour Your Soul
@diomed
Jan 10 17:48
egg noG
Christopher McCormack
@cmccormack
Jan 10 17:48
NOBODY SAID F
May Kittens Devour Your Soul
@diomed
Jan 10 17:48
and no1 should. coz there's no F
Christopher McCormack
@cmccormack
Jan 10 17:48
G
:)
this is getting confusing I'm out
I'm back
S
May Kittens Devour Your Soul
@diomed
Jan 10 17:49
good one. now you know how it starts
S _ _ _ _ _ L L
Ene Catalin
@EneCatalin
Jan 10 17:49
A
May Kittens Devour Your Soul
@diomed
Jan 10 17:49
noAh
Ene Catalin
@EneCatalin
Jan 10 17:49
H
May Kittens Devour Your Soul
@diomed
Jan 10 17:50
clever bird
S H _ _ _ _ L L
Ene Catalin
@EneCatalin
Jan 10 17:50
w
May Kittens Devour Your Soul
@diomed
Jan 10 17:50
now now now
Ene Catalin
@EneCatalin
Jan 10 17:50
N
May Kittens Devour Your Soul
@diomed
Jan 10 17:50
-
Christopher McCormack
@cmccormack
Jan 10 17:50
T
May Kittens Devour Your Soul
@diomed
Jan 10 17:50
noT
Christopher McCormack
@cmccormack
Jan 10 17:51
R
Ene Catalin
@EneCatalin
Jan 10 17:51
E
May Kittens Devour Your Soul
@diomed
Jan 10 17:51
sea shell
S H _ E _ _ L L
Ene Catalin
@EneCatalin
Jan 10 17:52
O
May Kittens Devour Your Soul
@diomed
Jan 10 17:52
:shoe: _ _ L L
Ene Catalin
@EneCatalin
Jan 10 17:53
m
May Kittens Devour Your Soul
@diomed
Jan 10 17:53
noM
Ene Catalin
@EneCatalin
Jan 10 17:53
s
May Kittens Devour Your Soul
@diomed
Jan 10 17:53
:interrobang:
Christopher McCormack
@cmccormack
Jan 10 17:54
B
May Kittens Devour Your Soul
@diomed
Jan 10 17:54
yes
now guess
Christopher McCormack
@cmccormack
Jan 10 17:54
no idea
SHOEBILL?
May Kittens Devour Your Soul
@diomed
Jan 10 17:54
:shoe: B _ L L
@cmccormack see, you know :congratulations: :tada:
Christopher McCormack
@cmccormack
Jan 10 17:55
only vowel that made sense lol
May Kittens Devour Your Soul
@diomed
Jan 10 17:55
haha
what a bird
Christopher McCormack
@cmccormack
Jan 10 17:55
It looks like a parody of itself
May Kittens Devour Your Soul
@diomed
Jan 10 17:55
better than ostrich, I've heard :smirk:
Christopher McCormack
@cmccormack
Jan 10 17:57
tasting, or in general?
May Kittens Devour Your Soul
@diomed
Jan 10 17:57
in general
Christopher McCormack
@cmccormack
Jan 10 17:58
We have an ostrich festival in Chandler every year, maybe I should start a Shoebill festival in Flagstaff
May Kittens Devour Your Soul
@diomed
Jan 10 17:59
start emu festival. I've heard they're greater birds
isn't that right @EneCatalin
I mean - they did win one war, after all :smirk_cat:
Ene Catalin
@EneCatalin
Jan 10 18:00
emus suck
they lack nobility
May Kittens Devour Your Soul
@diomed
Jan 10 18:01
that probably won them that war
Christopher McCormack
@cmccormack
Jan 10 18:02

Wow...

The machine-gunners' dreams of point blank fire into serried masses of Emus were soon dissipated. The Emu command had evidently ordered guerrilla tactics, and its unwieldy army soon split up into innumerable small units that made use of the military equipment uneconomic. A crestfallen field force therefore withdrew from the combat area after about a month

May Kittens Devour Your Soul
@diomed
Jan 10 18:04
those birds are no joke
Ene Catalin
@EneCatalin
Jan 10 18:06
still not ostriches
smaller
weaker
uglier
slower
Christopher McCormack
@cmccormack
Jan 10 18:06
The meek shall inherit the Earth...
May Kittens Devour Your Soul
@diomed
Jan 10 18:11
:grey_question:
@Nirajn2311 :arrow_up:
Niraj Nandish
@Nirajn2311
Jan 10 18:15
πŸ˜‚πŸ˜‚πŸ˜‚
True af
Christopher McCormack
@cmccormack
Jan 10 18:27
Do I look like an ungulate to you @diomed ???
May Kittens Devour Your Soul
@diomed
Jan 10 18:29
@cmccormack on good days
:yum:
Ariel
@ArielLeslie
Jan 10 18:47
@diomed I sure can. My home has crap for insulation, so I just walk around as a pile of blankets.
May Kittens Devour Your Soul
@diomed
Jan 10 18:59
lol, yeah. I have the same problem :-/
Ariel
@ArielLeslie
Jan 10 19:00
I have thick warm socks and a sweater within reach of bed, so I put them on before I get out from under the covers
May Kittens Devour Your Soul
@diomed
Jan 10 19:04
smart move. I should employ it as well
Ariel
@ArielLeslie
Jan 10 19:04
I'm such a wuss about winter.
psyperl
@psyperl
Jan 10 19:05
no hair dryer under the blanket?
May Kittens Devour Your Soul
@diomed
Jan 10 19:05
of course not, that's for bath time
Ariel
@ArielLeslie
Jan 10 19:06
electric blankets are where it's at
May Kittens Devour Your Soul
@diomed
Jan 10 19:11
I'd say yes, but old grandma in nearby area burnt in flames coz of a faulty one, so...
psyperl
@psyperl
Jan 10 19:12
that's not good for health then
Joshua Arnett
@josha5
Jan 10 19:23
Has anyone ever had any issues staging files in the git bash terminal when you run command "git add -A" nothing happens?
master branch is up to date and I can stage files in other repos except for this one
psyperl
@psyperl
Jan 10 19:26
just a random guess/question, would it be possible to add a file that is included in gitignore list ?
Joshua Arnett
@josha5
Jan 10 19:27
Yeah nothing I'm staging is in my gitignore i checked that aswell
Anytime I run the command its just hanging up and I have to ctrl + c to exit out of it
psyperl
@psyperl
Jan 10 19:29
do you have large number of files?
Joshua Arnett
@josha5
Jan 10 19:29
Yes
psyperl
@psyperl
Jan 10 19:30

from doc it says this for the -A switch

old versions of Git used to limit the update to the current directory and its subdirectories

well maybe it's not done processing and actually take a long time then? or? how long have you waited?
Joshua Arnett
@josha5
Jan 10 19:31
Waited 10+ minutes for that case as well. I just added some small components and no additional npm packages so its not too heavy of a load
psyperl
@psyperl
Jan 10 19:32
maybe add manually per folders and see which folders that actually bogged down the process then inspect?
Joshua Arnett
@josha5
Jan 10 19:32
Assuming there is something broken on my end but I can't figure out what could have caused it. I did ctrl + c the first time i tried to stage my files and after that it has been broken since:(
Yeah I'll give that a go
Joshua Arnett
@josha5
Jan 10 19:42
Weird... thanks for the suggestion @psyperl added them individually worked
psyperl
@psyperl
Jan 10 19:42
awesome :thumbsup:
Joshua Arnett
@josha5
Jan 10 19:45
Wonder why you can't add Aux.js that was the issue
AlexanderSavva
@AlexanderSavva
Jan 10 19:46
How far into code camp do you need to go u till you can fully code a anaminated website? Im getting trough stuff pretty quick but feel like I forget the previous stuff! When do you get some hands on practice?
Joshua Arnett
@josha5
Jan 10 19:47
Ohhhh Aux is a reserved keyword on Windows 10. That was driving me absolutely crazy lol
psyperl
@psyperl
Jan 10 19:49
each chapter in curriculum ( https://learn.freecodecamp.org ) have challenge projects on the last section.. maybe that's what you meant by hands on practice @AlexanderSavva ?
May Kittens Devour Your Soul
@diomed
Jan 10 19:50
leaf2water ratio
AlexanderSavva
@AlexanderSavva
Jan 10 19:51
@psyperl no I mean when do you get challanges/projects with no explanation nor video so you can start coding basically on your own?
Christopher McCormack
@cmccormack
Jan 10 19:52
@AlexanderSavva you can do the projects in the Interview Prep section, those were moved out of the normal curriculum and can be done however you want
AlexanderSavva
@AlexanderSavva
Jan 10 19:53
Should I wait till I complete cssgrid to start doing projects? @christopher
Christopher McCormack
@cmccormack
Jan 10 19:54
that isn't me you mentioned but no, you aren't required to use any one tool in most of the projects
Don't hesitate though, if you want to start building stuff, go do it. Have an idea? create a small project to play with it
AlexanderSavva
@AlexanderSavva
Jan 10 19:58
Awesome thanks
Levis
@agabyte
Jan 10 22:31
How do I clear input after submission? React and Redux: Manage State Locally First
var code = 'formatted';
class DisplayMessages extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: '',
      messages: []
    }
    this.handleChange = this.handleChange.bind(this);
    this.submitMessage = this.submitMessage.bind(this);
  }
  // add handleChange() and submitMessage() methods here
handleChange(e){    
  this.setState({
    input: e.target.value
  });

}
submitMessage(e){    
  this.setState({
    messages: this.state.messages.concat(this.state.input)    
  });    
//following code does not work
this.setState({
input:''
});
}
  render() {
    return (
      <div>
        <h2>Type in a new Message:</h2>
        { /* render an input, button, and ul here */ }
        <input onChange={this.handleChange} />
        <button onClick={this.submitMessage}>Add Message</button>
        <ul>
          { this.state.messages.map(x => <li>{ x }</li>) }
        </ul>
        { /* change code above this line */ }
      </div>
    );
  }
};
Manish Giri
@Manish-Giri
Jan 10 22:36
@agabyte i don't think you need multiple setState() calls
  this.setState({
    messages: this.state.messages.concat(this.state.input),
    input: ''    
  });
try this
Levis
@agabyte
Jan 10 22:37
it didn't work either
the input isn't cleared when I press submit
This message was deleted
Manish Giri
@Manish-Giri
Jan 10 22:40
worked for me
sc2.png
<input onChange={this.handleChange} />
you aren't setting the value for the input
Levis
@agabyte
Jan 10 22:59
@Manish-Giri thanks!
Manish Giri
@Manish-Giri
Jan 10 23:01
:thumbsup: