These are chat archives for FreeCodeCamp/HelpFrontEnd

30th
Dec 2017
Botenga
@Botenga
Dec 30 2017 00:02
@sorinr uuuuh im using the same libraries you used in your pens and it still not working smh.
Sorin Ruse
@sorinr
Dec 30 2017 00:03

@Botenga delete this code you have at the end of your html:

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="bootstrap.css">

</body>

and it should work now

Botenga
@Botenga
Dec 30 2017 00:04
deleted
just deleted
still
not working
firas omrane
@firou1925
Dec 30 2017 00:05
@Botenga share your pen code to see the problem
firas omrane
@firou1925
Dec 30 2017 00:06
what is the problem ?
Botenga
@Botenga
Dec 30 2017 00:08
My hamburger isnt working
Sorin Ruse
@sorinr
Dec 30 2017 00:09
@Botenga change the version of jquery to thje minified one. that way it works
@Botenga you need this one: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
Botenga
@Botenga
Dec 30 2017 00:10
smh I dont know what the issue is
Sorin Ruse
@sorinr
Dec 30 2017 00:11
@Botenga probably you have copy pasted in like: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1 without the jquery.min.js part
Botenga
@Botenga
Dec 30 2017 00:12
@sorinr thanx its finally worked
CamperBot
@camperbot
Dec 30 2017 00:12
botenga sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1381 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Dec 30 2017 00:12
@Botenga welcome
@Botenga :+1:
Botenga
@Botenga
Dec 30 2017 00:13
But why the hell does this pen work same code same nav bar just with embeded links?
https://codepen.io/Botenga/pen/aEWBaW
I made this like 3 days ago
firas omrane
@firou1925
Dec 30 2017 00:15
we can use embeded links
or codepen made it easier to include libraries
Botenga
@Botenga
Dec 30 2017 00:18
yeah but I use those same links in my recent pen and it didnt work
firas omrane
@firou1925
Dec 30 2017 00:21
try it again and we will try to get the problem
Botenga
@Botenga
Dec 30 2017 00:22
yeah i found the solution for embedding it! Just now
lolz
but thanks for caring man
firas omrane
@firou1925
Dec 30 2017 00:23
u r welcome
Joseph A. Sangine
@HTML-joe
Dec 30 2017 00:51
Question I need to look up a list of JavaScript and Json commands (not sure if command is the right word ) Right now I know certain things like $("targeted obj").html()
but what is that .html called and where would be a good place too look it up
I want to learn more things like .click
Sorin Ruse
@sorinr
Dec 30 2017 01:14
@HTML-joe here: http://api.jquery.com/html/
@HTML-joe for jquery events here: https://api.jquery.com/category/events/
Joseph A. Sangine
@HTML-joe
Dec 30 2017 01:17
@sorinr Thank you so much exactly what I needed!
CamperBot
@camperbot
Dec 30 2017 01:17
html-joe sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1382 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Dec 30 2017 01:18
@HTML-joe welcome
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:18
anybody home?
Tom
@moT01
Dec 30 2017 02:47
@Hoxtygen
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:49
@moT01 hi, got a problem with fetching image from the weather api https://codepen.io/hoxtygen/pen/wpzRPZ
Tom
@moT01
Dec 30 2017 02:50
what image
where
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:52
@moT01 weather icon depicting the weather condition
Tom
@moT01
Dec 30 2017 02:54
does the rest work?
i cant log the longt
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:55
@moT01 everything works except the image... You have to enable access to your location to make it work
Tom
@moT01
Dec 30 2017 02:56
i click allow and nothing
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:56
@moT01 connection problem i guess, im looking at something here
@moT01 reload maybe?
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:01
@moT01 already did that no luck. the image isnt constant, it changes based on the weather condition hence i cant giuve it an absolute url
Tom
@moT01
Dec 30 2017 03:02
well, you can't make it exact
you have to put the variable in there
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:02
@moT01 you can check my javascript code, its in there
Tom
@moT01
Dec 30 2017 03:03
variable wouldnt need ' around it
i saved it again
a little different
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:08
@moT01 you're talking about this line right?
var img = document.createElement('img')
             img.src = stringified.weather[0].icon
Tom
@moT01
Dec 30 2017 03:08
right - you can see an example in the pen
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:16
@moT01 thank you man...................it works
CamperBot
@camperbot
Dec 30 2017 03:16
hoxtygen sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 946 | @mot01 |http://www.freecodecamp.org/mot01
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:17
@moT01 been on it for three days
@moT01 sometimes the obvious isnt that obvious............
Sorin Ruse
@sorinr
Dec 30 2017 03:18
@Hoxtygen your code version was wrong in here:
document.getElementById('image-container').innerHTML = "<img src = "+stringified.weather[0].icon+">";
@Hoxtygen you needed two " one before variable and one after
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:19
@sorinr actually resorted to that when the one i commented out wasnt working, even i know it wont work. was just tweaking
@sorinr it now works all thanks to @moT01
CamperBot
@camperbot
Dec 30 2017 03:20
hoxtygen sends brownie points to @sorinr and @mot01 :sparkles: :thumbsup: :sparkles:
api offline
:star2: 1383 | @sorinr |http://www.freecodecamp.org/sorinr
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:20
Now i can move on to other things
Tom
@moT01
Dec 30 2017 03:21
@Hoxtygen yea, weve all been there
yea, i noticed that you tried to do something along the lines of what @sorinr said - that would be another way to do it
i think
Sorin Ruse
@sorinr
Dec 30 2017 03:23
@moT01 yea. it was just a concatenation error
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:25
@moT01 @sorinr do i need to make it mobile responsive or just move along to other challenges?
Tom
@moT01
Dec 30 2017 03:25
its not required
doesnt hurt though
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:26
@moT01 okay, I like your style
gotta sleep, its 4:26am
Madeline Collins
@indikoro
Dec 30 2017 04:53
Hey guys! Hopefully a simple Javascript question. I wanted to implement the following into a site: https://safi.me.uk/typewriterjs/ I cannot seem to get it to work on my own site. I have the external script linked, the smaller script in the html file, and the html in the body. Am I doing something wrong?
Shahe Imran
@bddarknight
Dec 30 2017 04:58
Hey Guys, how can I add jquery library and Animate.css to my codepen project. I am now practicing jquery via freecodecamp. But apart from their own editor I was thinking of using codepen to practice independently.
Terence Mangram
@terensu-desu
Dec 30 2017 04:58
I'm stuck on the Twitch API challenge if anyone can help. I'm building it using React and using axios to make the API calls, but my component receiving the props doesn't actually have the received API data as prop data (console.log says the data has been 'elevated just now'). Nothing I've tried works. How can I get it to wait / get the data correctly? await try{this.getStreamData()}.catch(error){console.log(error)}; didn't work out when I made getStreamData async. Here's my pen:
https://codepen.io/terensu-desu/pen/KZWjjZ
@catherinewoodward In your codepen project, click on the "gear" icon next to CSS, and you can add a CSS library from there either with the dropdown, if it's there, or by pasting a CDN link
and the save next to the JavaScript "gear" icon
the same*
for jQuery that is
Shahe Imran
@bddarknight
Dec 30 2017 05:01
Do I have to add any script to my html editor? I am not sure if they are pre-integrated to function accordingly.
I mean "html" "css" "JS"
Terence Mangram
@terensu-desu
Dec 30 2017 05:04
@catherinewoodward It depends, but for the most part you should be good to go.
primuscovenant
@primuscovenant
Dec 30 2017 05:05
@heroiczero thx
CamperBot
@camperbot
Dec 30 2017 05:05
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2121 | @heroiczero |http://www.freecodecamp.org/heroiczero
Shahe Imran
@bddarknight
Dec 30 2017 05:06
@terensu-desu Thankz, I will check and update my lab test :D
CamperBot
@camperbot
Dec 30 2017 05:06
catherinewoodward sends brownie points to @terensu-desu :sparkles: :thumbsup: :sparkles:
:cookie: 289 | @terensu-desu |http://www.freecodecamp.org/terensu-desu
Ken Haduch
@khaduch
Dec 30 2017 05:06
@catherinewoodward - if you are talking about CodePen - only HTML code should be in the HTML panel, CSS in the CSS panel, JS in the JS panel. And each configuration box for each panel has places to add external resources such as jquery.js in the JS external libs, etc. CodePen uses a template and fills in all of the panels and libraries. Check the "frame source" after you get a page loaded and you'll see the structure. The HTML panel should not have the <html>, <body> sections in them - that is provided by the template.
Terence Mangram
@terensu-desu
Dec 30 2017 05:06
@catherinewoodward You're welcome, good luck
@indikoro Can you be any more specific about your troubles?
Shahe Imran
@bddarknight
Dec 30 2017 05:07
@khaduch Got it
Ken Haduch
@khaduch
Dec 30 2017 05:08
ok...
Shahe Imran
@bddarknight
Dec 30 2017 05:11
Ken Haduch
@khaduch
Dec 30 2017 05:12
@catherinewoodward - if you know the URL for a library, like animate.css you can paste it into the resource boxes directly, or they have "quick adds" and a way to search for the package that you want. CodePen is a nice useful site - just remember to stick with "Pen" items for your pages, as a free user (unless you've paid) you only have one "Project". I don't think that there is a limit to the number of "Pen" items? I have seen people get confused by the fact that they can only have one "project"... maybe that will be helpful to be aware of that.
Madeline Collins
@indikoro
Dec 30 2017 05:12

@terensu-desu Sure!

<html>
<head>
    <script type="text/javascript" src="https://safi.me.uk/typewriterjs/js/typewriter.js"></script>
    <script>
    var app = document.getElementById('app');

var typewriter = new Typewriter(app, {
  loop: true
});

typewriter.typeString('Hello World!')
  .pauseFor(2500)
  .deleteAll()
  .typeString('Strings can be removed')
  .pauseFor(2500)
  .deleteChars(7)
  .typeString('altered!')
  .start();
    </script>
</head>
<body>
    <div id="app"></div>
</body>
</html>

This is my code currently. Nothing shows when I run it. Just a blank page!

Shahe Imran
@bddarknight
Dec 30 2017 05:13
I did and itz working :)
http://prntscr.com/hu37nk
Madeline Collins
@indikoro
Dec 30 2017 05:13
New to Gitter, sorry for the incorrect code markup. 😕
Ken Haduch
@khaduch
Dec 30 2017 05:14
@indikoro - https://forum.freecodecamp.com/t/markdown-code-formatting/18391 - that link shows the format for posting code properly to the gitter room... hope that helps! Basically for a block of code, three backticks ``` on separate lines before and after your code block. You can go and edit your posts for a few minutes to add them in. The link has full details on the code posting syntax.
@catherinewoodward :+1:
Shahe Imran
@bddarknight
Dec 30 2017 05:15
@khaduch :thumbsup:
Madeline Collins
@indikoro
Dec 30 2017 05:17
@khaduch Thank you so much! Had no idea a backtick was the thing. Was using the wrong character!
CamperBot
@camperbot
Dec 30 2017 05:17
indikoro sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3634 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Dec 30 2017 05:19
@indikoro - it just takes a couple tries to get it right! You're welcome. I'm going to try and paste your code into a jsbin page and see if I can see anything with a quick peek...
@indikoro - I just put your code into a CodePen pen and it seems to be working right off the bat. Here is the URL for the Pen I made. If you are having trouble, first thing is to check your devtools console for errors.
Ken Haduch
@khaduch
Dec 30 2017 05:25
@indikoro - you might try moving your <script> element to the end just before the </body> closing tag. That will insure that the page is loaded before it tries to run the JS.
Madeline Collins
@indikoro
Dec 30 2017 05:28
That worked!! Thank you so much!
For future reference, should scripts be sourced at the end in general?
@khaduch
Ken Haduch
@khaduch
Dec 30 2017 05:36
I think that is the recommended technique these days. There might be exceptions but googling for an answer might be a good idea. Generally anything that refers to DOM elements works if you put scripts at the end or you have to use "onload" or in jquery the $(document).wait()
Those wait until the DOM is built then invoke the enclosed code.
alteducation
@alteducation
Dec 30 2017 13:09

hi can someone tell me how to fix this issue

i have setup a fixed navbar , the issue is the banner goes below the navbar
how to get the banner to showup after the navbar?

Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:10
is there a link for this?
alteducation
@alteducation
Dec 30 2017 13:11
schild.surge.sh
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:16
what you can do is give to the body
a padding-top
of the size of the nabar
since its fixed the nav wont move but the contnet will move bellow the space needed
alteducation
@alteducation
Dec 30 2017 13:17
adding padding top is giving me inconsistent layouts on different devices
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:17
do you change the font-size or others from the nav at some scree nsizes?
can you give me an example of the inconsistnet ones?
do you mean this?
image.png
alteducation
@alteducation
Dec 30 2017 13:20
yeah
stuff like that
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:20
for what I saw you are only forced to change the distance once more and that's
when you change the menu to the icon one
on that querie
change the padding top from the body
and all the issues will be solved for the sizes below I think
alteducation
@alteducation
Dec 30 2017 13:21
i was having issues with firefox. i found that firefox doesnt support flexbox and percentage widths. changing to rem values fixed some issues.
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:22
Are you using some prefixer?
If you dont use it test agaib and it will work
alteducation
@alteducation
Dec 30 2017 13:23
i added prefixers in hopes of fixing these issues
i am new to web design
should i add prefixers? if so could you suggest one?
also is there a way to get consistency on font rendering across browsers? fonts on firefox look wierd
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:34
Are youvwriting css or something like sass just to understandbsomething first
alteducation
@alteducation
Dec 30 2017 13:35
no just css
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36
hum do you know how to use node ?
alteducation
@alteducation
Dec 30 2017 13:36
no
just basic javascript
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36
ok im gonna give you an online website that does the prefix for you
just paste in the css
alteducation
@alteducation
Dec 30 2017 13:36
i used this same website
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36
did you?
alteducation
@alteducation
Dec 30 2017 13:36
came up when i googled
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36
change the amount of versions below
set up 20 :D
alteducation
@alteducation
Dec 30 2017 13:37
thanks let me try that
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:38
I have a portfolio built using quite a bit of flexbox
and it works perfectly on mo<zila
and ie I think
alteducation
@alteducation
Dec 30 2017 13:39
percentage values for margin and padding works fine?
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:40
I do have margins on items using percentage yes
Btw cool design ans colorsvwas made for you?
By*
alteducation
@alteducation
Dec 30 2017 13:42
thanks. i used the site uigradients to generate the colours
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:44
Congrats :smile:
Looks good
alteducation
@alteducation
Dec 30 2017 13:47
i am having issues in android aosp browser. the slider swiper javascript plugin that i used doesn't work. Also could you tell me what is the standard procedure to ensure cross browser compactability
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:48
well first I would say that for this kind of things use much css as possible and avoid js if is there no need at all, after that use prefixes and test everything around if something fails what I think that will be quite hard following this steps improve what's failing, ofcourse if oyu are using things like grid layouts at this point the browser support for things like ie and others will be bad
Reinier Blanco-Diaz
@reycuban
Dec 30 2017 13:52
@davidberco i am so sorry i didnt replay you back. if want the button to go back to the postion slower . i will user like 0.3s
good morning or good evening..
Reinier Blanco-Diaz
@reycuban
Dec 30 2017 13:57
i want the icons to bounce when u hovering. but i got no idea how to do it.. if want to work on this code please fork and comment so i can se what u did? please .. the best way to learn is working each other
sorry for my english .. it is so bad lol
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:58
uou will have to use transform translate
then on translate you have X and Y axis
and if you want them to bounce you can move them to negative lije -15
Reinier Blanco-Diaz
@reycuban
Dec 30 2017 14:05
@tiagocorreiaalmeida i see your point.
@reycuban thank you
CamperBot
@camperbot
Dec 30 2017 14:06
sorry reycuban, you can't send brownie points to yourself! :sparkles: :sparkles:
Reinier Blanco-Diaz
@reycuban
Dec 30 2017 14:06
@tiagocorreiaalmeida thank you
CamperBot
@camperbot
Dec 30 2017 14:06
reycuban sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 482 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
responsive flexbox review section
alteducation
@alteducation
Dec 30 2017 14:27
@tiagocorreiaalmeida could you help me with one more thing. for the testimonials section the slider dots are displayed with the property sticky. but this only works correctly on chrome and firefox. on aosp and safari this seems to not work properly. Is there a fix for the same?
url http://schild.surge.sh/
dinesh
@1532j0004kg
Dec 30 2017 14:28
hi
guys , i am struggling in finding error can anyone help me to fix that error?
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 14:30
@alteducation not sure maybe try to change it into positon absolute ?:|
not really sure
Marc
@MWBauer
Dec 30 2017 15:00
HEY YA'LL!
Tom
@moT01
Dec 30 2017 15:08
:wave:
@1532j0004kg
dinesh
@1532j0004kg
Dec 30 2017 15:09
hi @moT01
Tom
@moT01
Dec 30 2017 15:11
having problems?
dinesh
@1532j0004kg
Dec 30 2017 15:11
yup.
dinesh
@1532j0004kg
Dec 30 2017 15:16
can u help me.
?
Marc
@MWBauer
Dec 30 2017 15:20
Aren't most of us here because we're having problems???
lol
Us newbs don't know what we're doing. But...we're trying
dinesh
@1532j0004kg
Dec 30 2017 15:21

its not actually, error . but when i trying to post the data and getting back the data its actually working good . but when ever i reload the page the data's i got by the server and displayed in browser is actually removed , why?
additional info'

robomongo is not supported for my system
so i cant able to seet the data stored or not!
my system is 32bit os!

this is the problem.
Marc
@MWBauer
Dec 30 2017 15:22
THere's a new guy that's just started. I need to find out what his name is. I work with him and he's just a sponge. He's going thru nursing school while working at a pharmacy. He's learned disc golf and is pretty good after just a few rounds.
Now he's learning coding.
Tom
@moT01
Dec 30 2017 15:36
throw the disc golf thing in there
nursing school - pharmacy, impressive
coding, impressive
learned disc golf
Lisa Copeland
@lisacopeland
Dec 30 2017 15:37
what is disc golf
Tom
@moT01
Dec 30 2017 15:37
its like regular golf - but with frisbees
that you throw into a basket
i play - its fun
Marc
@MWBauer
Dec 30 2017 15:38
Imagine instead of using a crooked stick and a ball you throw discs that are like smaller frisbees.
Tom
@moT01
Dec 30 2017 15:38
but not hard to learn
Lisa Copeland
@lisacopeland
Dec 30 2017 15:38
that sounds fun
Marc
@MWBauer
Dec 30 2017 15:38
Not hard to learn, but being good at it....that takes time.
Lisa, it's a lot of fun. Seeing a disc fly on just the right path, going around trees and skipping up to the basket...
Tom
@moT01
Dec 30 2017 15:39
disc golf is pretty big around here - minnesota
Marc
@MWBauer
Dec 30 2017 15:39
TN has a good crowd too. I wanna
get to GBO this year.
not to play, but to vol.
Lisa Copeland
@lisacopeland
Dec 30 2017 15:39
whats GBO
Marc
@MWBauer
Dec 30 2017 15:39
Glass Blown Open. It's one of the major tournaments.
Lisa Copeland
@lisacopeland
Dec 30 2017 15:40
cool where is it held
Marc
@MWBauer
Dec 30 2017 15:40
Look up on Youtube Paul McBeth, Ricky Wysocki, Eagle McMahon
Tom
@moT01
Dec 30 2017 15:40
glass blown open
wow
Marc
@MWBauer
Dec 30 2017 15:40
Paige Pierce,
Tom
@moT01
Dec 30 2017 15:40
ha
Marc
@MWBauer
Dec 30 2017 15:40
Emporia, KS
I love watching these tournaments. Sometimes in horrendous downpours, sometimes the sun is so hot...and sometimes it's just beautiful.
Lisa Copeland
@lisacopeland
Dec 30 2017 15:41
right now the weather is too crappy here to do anything - I have my bike on a trainer in my living room
Marc
@MWBauer
Dec 30 2017 15:41
The Australia tournaments are so wonderful.
Last year McBeth broke a disc just by throwing it. It was so hot in Australia that the plastic just gave way after it landed.
Tom
@moT01
Dec 30 2017 15:43
we have the ice bowl here - tournament in the snow - i think its in february
Lisa Copeland
@lisacopeland
Dec 30 2017 15:44
That sounds extreme
dinesh
@1532j0004kg
Dec 30 2017 15:44
hi did u fix my error.
?
@moT01
Tom
@moT01
Dec 30 2017 15:44
hopefully its not as cold then as it is now
@1532j0004kg i dont see an error
dinesh
@1532j0004kg
Dec 30 2017 15:45

its not actually, error . but when i trying to post the data and getting back the data its actually working good . but when ever i reload the page the data's i got by the server and displayed in browser is actually removed , why?
additional info'

robomongo is not supported for my system
so i cant able to seet the data stored or not!
my system is 32bit os!
this is the problem.

Marc
@MWBauer
Dec 30 2017 15:45
Lisa, the sport can, and is, played in all sorts of weather. Snow doesn't stop them. Most of the major manufacturers have a line of plastic especially made for the snow temps
Lisa Copeland
@lisacopeland
Dec 30 2017 15:46
@MWBauer Wow - I wonder if it is played around here - in Washington State
Tom
@moT01
Dec 30 2017 15:46
has to be
@1532j0004kg are those supposed to be links or something
?
im still not seeing anything
dinesh
@1532j0004kg
Dec 30 2017 15:47
@1532j0004kg
const express = require('express');
const router = express.Router();
const cricketModel = require('../model/score');

router.get('/api/maxi',function(req,res){
  res.send({"type" : "get"});
});

router.post('/api/maxi/',function(req,res){
  cricketModel.create(req.body).then(function(data){
   res.send(data);
  console.log(data);
  }).catch(err => console.error(err) && res.status(400).send(err));
});

router.delete('/api/maxi/:id',function(req,res){
  res.send({"type" : "delete"});
});

router.put('/api/maxi/:id',function(req,res){
  res.send({"type" : "update"});
});

module.exports = router;
const express = require('express');
const router = require('./api/router.js');
const bodyParser = require('body-parser');
const mongoose = require('mongoose');

const app = express();


mongoose.connect("mongodb://localhost/gomaxi");
mongoose.Promise = global.Promise;

app.use(express.static('public'));

app.use(bodyParser.json());

app.use(router);


app.listen(4000,function(){
  console.log("server is listening for the request on port 4000 , hurray !");
});
Lisa Copeland
@lisacopeland
Dec 30 2017 15:48
@moT01 https://www.dgcoursereview.com/course.php?id=738 very close to my house!
Tom
@moT01
Dec 30 2017 15:49
@lisacopeland most of them are free
go buy a couple discs for like 30$
Lisa Copeland
@lisacopeland
Dec 30 2017 15:50
@1532j0004kg why don't you set mongoose debug to true
Tom
@moT01
Dec 30 2017 15:50
there's different styles - like golf clubs - some for driving/distance
some for putting
dinesh
@1532j0004kg
Dec 30 2017 15:51
where to set?
@lisacopeland
Lisa Copeland
@lisacopeland
Dec 30 2017 15:51
after you require it
mongoose.set('debug', true);
dinesh
@1532j0004kg
Dec 30 2017 15:51
thats the problem?
Lisa Copeland
@lisacopeland
Dec 30 2017 15:52
no it'll help you debug
are you not getting an error from the way you are connecting?
you should connect like this mongoose.connect(url, { useMongoClient: true });
@1532j0004kg I wasn't following your thread - are you having trouble with post or get?
Have you tried using Postman?
dinesh
@1532j0004kg
Dec 30 2017 15:55

its not actually, error . but when i trying to post the data and getting back the data its actually working good . but when ever i reload the page the data's i got by the server and displayed in browser is actually removed , why?

note :
robomongo is not supported for my system
so i cant able to seet the data stored or not!
my system is 32bit os!

Lisa Copeland
@lisacopeland
Dec 30 2017 15:56
what are you using to persist the data
Tom
@moT01
Dec 30 2017 15:57
so, for clarity - the post is working? and you are able to hit that route and send that data back
perhaps on the reload - its hits the .get
Lisa Copeland
@lisacopeland
Dec 30 2017 15:58
What happens when you use something besides your client to hit the server
dinesh
@1532j0004kg
Dec 30 2017 15:58
yes, i can able to view the data in browser
Lisa Copeland
@lisacopeland
Dec 30 2017 15:58
where is your client code
Tom
@moT01
Dec 30 2017 15:58
put some console logs in there...
router.get('/api/maxi',function(req,res){
  console.log('1');
  res.send({"type" : "get"});
});

router.post('/api/maxi/',function(req,res){
  console.log('2')
  cricketModel.create(req.body).then(function(data){
   res.send(data);
  console.log(data);
  }).catch(err => console.error(err) && res.status(400).send(err));
});

router.delete('/api/maxi/:id',function(req,res){
  res.send({"type" : "delete"});
});

router.put('/api/maxi/:id',function(req,res){
  res.send({"type" : "update"});
});
dinesh
@1532j0004kg
Dec 30 2017 15:59
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>maxi</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

  </head>
  <body>
    <input id="search1" placeholder="enter playername">
    <input id="search2" placeholder="enter playerscore">
    <button class="btn-primary">click</button>
         <div class="well"></div>
  </body>
  <script>
               $(document).ready(function(){
                    $(".btn-primary").click(function(){
                    console.log("click");

                    var obj = {
                     "player" : $("#search1").val(),
                     "score" :  $("#search2").val()
                   };

                     $.ajax({
                           type : "POST",
                           url : "http://localhost:4000/api/maxi/",
                           contentType  : "application/json",
                           data : JSON.stringify(obj),
                              success : function(data){
                                console.log(data);
                               $(".well").append("<h1>"+data.player + data.score+"</h1>");
                           },
                           error : function(err){
                             console.log('error' ,err);
                           },
                           dataType : "json"
                         });
                    });
               });
  </script>
</html>
Lisa Copeland
@lisacopeland
Dec 30 2017 15:59
I don't know what robomongo is
dinesh
@1532j0004kg
Dec 30 2017 15:59
robo mongo is for view the stored data!
Tom
@moT01
Dec 30 2017 16:00
i feel like i might be right
Lisa Copeland
@lisacopeland
Dec 30 2017 16:00
can you use mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:00
then how u view the data in database without robomongo
Lisa Copeland
@lisacopeland
Dec 30 2017 16:00
use the mongo cli - mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:00
@lisacopeland where ?
mongo.exe in server?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:02
in the path where your mongod.exe is
can you not use postman?
dinesh
@1532j0004kg
Dec 30 2017 16:04
i used.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:04
@1532j0004kg sorry?
dinesh
@1532j0004kg
Dec 30 2017 16:06
am i want to use save();
Tom
@moT01
Dec 30 2017 16:06
did nobody hear what i said there? i still think i was on to something
dinesh
@1532j0004kg
Dec 30 2017 16:07
console is work!
@moT01
it consoling 2 , in server.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:08
@moT01 yep - I think you are right - I don't see where the data is actually saved
Tom
@moT01
Dec 30 2017 16:08
and on a refresh does it put 1?
dinesh
@1532j0004kg
Dec 30 2017 16:09
on browser?
Tom
@moT01
Dec 30 2017 16:09
server
Lisa Copeland
@lisacopeland
Dec 30 2017 16:09
why are you using create?
dinesh
@1532j0004kg
Dec 30 2017 16:10
to store!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:10
to write the data to mongo you should have modelname.save(function(err, result) {}
Tom
@moT01
Dec 30 2017 16:10
8 pages of disc courses within 100 miles of my house on that site
dinesh
@1532j0004kg
Dec 30 2017 16:11
no.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:11
lemme see if I can post a code snippet

```router.post('/', function (req, res, next) {
var user = new User({
firstName: req.body.firstName,
lastName: req.body.lastName,
password: bcrypt.hashSync(req.body.password, 10),
email: req.body.email
});

user.save(function(err, result) {
    if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });
});

});```

dinesh
@1532j0004kg
Dec 30 2017 16:11
ok
?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:12
It didn't work completely
Marc
@MWBauer
Dec 30 2017 16:13
@moT01 That's cool. Where are you?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:13
here - I am going to rewrite your router.post
dinesh
@1532j0004kg
Dec 30 2017 16:13
@moT01 no , when i reload the page it's not showing anything in server.
Marc
@MWBauer
Dec 30 2017 16:14
@lisacopeland I promise you can find a course. D/l the app UDisc. it'll save your scores as you play if you want, and there is a map feature that allows you to look around whatever area and see the courses available
For about 5 bucks I think you can get a year of the unlimited access.
dinesh
@1532j0004kg
Dec 30 2017 16:15
const express = require('express');
const router = express.Router();
const cricketModel = require('../model/score');

router.get('/api/maxi',function(req,res){
  res.send({"type" : "get"});
});

router.post('/api/maxi/',function(req,res){
  console.log("2");
  cricketModel(req.body).save().then(function(data){
   res.send(data);
  console.log(data);
}).catch(err => console.error(err) && res.status(400).send(err));
});

router.delete('/api/maxi/:id',function(req,res){
  res.send({"type" : "delete"});
});

router.put('/api/maxi/:id',function(req,res){
  res.send({"type" : "update"});
});

module.exports = router;
Lisa Copeland
@lisacopeland
Dec 30 2017 16:15

@1532j0004kg how about ```router.post('/api/maxi/', function (req, res, next) {
console.log('2');
console.log(body);
cricketModel.save(function (err, result) {
if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });

});
```

lemme try again

```router.post('/api/maxi/', function (req, res, next) {
console.log('2');
console.log(body);
cricketModel.save(function (err, result) {
if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });

});
```

dinesh
@1532j0004kg
Dec 30 2017 16:16
use shift+enter.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:16
it's not posting the code snippet right

```router.post('/api/maxi/', function (req, res, next) {
console.log('2');
console.log(body);
cricketModel.save(function (err, result) {
if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });

});
```

dinesh
@1532j0004kg
Dec 30 2017 16:17
``` shift+enter
use this way.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:18
router.post('/api/maxi/', function (req, res, next) {
    console.log('2');
    console.log(body);
    cricketModel.save(function (err, result) {
        if (err) {

            // If there is an error, return from this function immediately with
            // the error code
            return res.status(500).json({
                title: 'An error occurred',
                error: err
            });
        }
        res.status(201).json({
            message: 'Saved User',
            obj: result
        });
});
sorry that should be req.body in the console.log
dinesh
@1532j0004kg
Dec 30 2017 16:20
unexpected end of input is error?
!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:20
whoops I forgot something
Tom
@moT01
Dec 30 2017 16:20
@MWBauer 56301
dinesh
@1532j0004kg
Dec 30 2017 16:21
@moT01
@lisacopeland what?
@moT01 did u find what is the error?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:21
@1532j0004kg gimme a sec
dinesh
@1532j0004kg
Dec 30 2017 16:21
i am really sruggling @moT01
@lisacopeland ok
Tom
@moT01
Dec 30 2017 16:22
@MWBauer their distance thing seems to be off - i put 75miles and it showed courses within 100 miles
dinesh
@1532j0004kg
Dec 30 2017 16:23
Mongoose: scores.insert({ player: 'q1', score: 1, _id: ObjectId("5a47bd6590f3561
5fc1c5ffe"), __v: 0 })
{ __v: 0, player: 'q1', score: 1, _id: 5a47bd6590f35615fc1c5ffe }
2
Mongoose: scores.insert({ player: 'q1w2', score: 1, _id: ObjectId("5a47bd6c90f35
615fc1c5fff"), __v: 0 })
{ __v: 0,
  player: 'q1w2',
  score: 1,
  _id: 5a47bd6c90f35615fc1c5fff }
2
Mongoose: scores.insert({ player: 'q1w2as', score: 1, _id: ObjectId("5a47bd7390f
35615fc1c6000"), __v: 0 })
{ __v: 0,
  player: 'q1w2as',
  score: 1,
  _id: 5a47bd7390f35615fc1c6000 }
Lisa Copeland
@lisacopeland
Dec 30 2017 16:23
```

```router.post('/api/maxi/', function (req, res, next) {
console.log('2');
console.log(body);
var cricketModel = new CricketModel({
firstField: req.body.firstField, // Your model fields here
lastField: req.body.lastField,
});

cricketModel.save(function (err, result) {
    if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });
});

});```

dinesh
@1532j0004kg
Dec 30 2017 16:24
this is the thing i got in server.
Tom
@moT01
Dec 30 2017 16:24
im not sure what you're trying to do
in my opinion - what you said was this - when you refresh the page - no data shows
Lisa Copeland
@lisacopeland
Dec 30 2017 16:24

```router.post('/api/maxi/', function (req, res, next) {
console.log('2');
console.log(body);
var cricketModel = new CricketModel({
firstField: req.body.firstField, // Your model fields here
lastField: req.body.lastField,
});

cricketModel.save(function (err, result) {
    if (err) {

        // If there is an error, return from this function immediately with
        // the error code
        return res.status(500).json({
            title: 'An error occurred',
            error: err
        });
    }
    res.status(201).json({
        message: 'Saved User',
        obj: result
    });
});

});```

dinesh
@1532j0004kg
Dec 30 2017 16:24
yes
Tom
@moT01
Dec 30 2017 16:24
there is nothing putting data anywhere when you first load the page
dinesh
@1532j0004kg
Dec 30 2017 16:25
@1532j0004kg
Lisa Copeland
@lisacopeland
Dec 30 2017 16:25
My snippet isn't posting right
Tom
@moT01
Dec 30 2017 16:25
only when you click a button do you make a post request and append info somewhere
dinesh
@1532j0004kg
Dec 30 2017 16:25
@moT01
Tom
@moT01
Dec 30 2017 16:25
so when you refresh - that stuff doesnt happen
Lisa Copeland
@lisacopeland
Dec 30 2017 16:25
I really think you need to figure out if your data is saving correctly
Tom
@moT01
Dec 30 2017 16:25
i think there's bigger problems @lisacopeland - the data does probly need to be saved
but just saving it wont display it
Lisa Copeland
@lisacopeland
Dec 30 2017 16:26
@moT01 Yes
dinesh
@1532j0004kg
Dec 30 2017 16:26
@moT01 yes the things appending on browser is working good,at the time of reload the data's in browser is disppear
Lisa Copeland
@lisacopeland
Dec 30 2017 16:28
@1532j0004kg you are doing nothing to get and display existing data on the page after document ready
Tom
@moT01
Dec 30 2017 16:28
it disappears - cause like i said - it only gets put there when you click the button
dinesh
@1532j0004kg
Dec 30 2017 16:29
yes, what i want to do to store the data permanently there?
Tom
@moT01
Dec 30 2017 16:29
no data is retrieved or displayed when you first load the page
Lisa Copeland
@lisacopeland
Dec 30 2017 16:29
@moT01 yep
dinesh
@1532j0004kg
Dec 30 2017 16:29
yes
Lisa Copeland
@lisacopeland
Dec 30 2017 16:30
@1532j0004kg you need a router.get that retrieves the data in your server code and then a function that makes an ajax call in your client that calls it to display the data from the database
dinesh
@1532j0004kg
Dec 30 2017 16:30
my data's are there in a browser only temporarly!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:31
@1532j0004kg yes - you are not going to see your data unless you retrieve it from the datavase
dinesh
@1532j0004kg
Dec 30 2017 16:31
@lisacopeland but i use the res.send() in post!
Tom
@moT01
Dec 30 2017 16:31
you need to listen to us @1532j0004kg
dinesh
@1532j0004kg
Dec 30 2017 16:32
yes , i am listening .
Lisa Copeland
@lisacopeland
Dec 30 2017 16:33
@1532j0004kg when you refresh the page your page state goes away
Tom
@moT01
Dec 30 2017 16:33
when the page first loads you need to get the data from the db and display it
you need to create more code to do that
dinesh
@1532j0004kg
Dec 30 2017 16:33
ok i got it!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:33
good luck!
dinesh
@1532j0004kg
Dec 30 2017 16:33
i want to write get type right?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:34
you want a router.get function in your server code
dinesh
@1532j0004kg
Dec 30 2017 16:34
yes.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:34
which executes a model.find
amd returns the data
dinesh
@1532j0004kg
Dec 30 2017 16:36
but in more websites , when we entering some thing and click submit . it is permanently in websites right?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:36
no
dinesh
@1532j0004kg
Dec 30 2017 16:36
when we reload the page the data we poted are not disappeared,right?
for example , conference app !
Lisa Copeland
@lisacopeland
Dec 30 2017 16:37
no - you are saving it to your database
when you reload the page you need to get it from your database
did you confirm that your data is being saved correctly?
you really need a tool (like the mongo cli) that you can use to confirm that your server is working correctly
dinesh
@1532j0004kg
Dec 30 2017 16:38
how to view ?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:38
how to view what?
dinesh
@1532j0004kg
Dec 30 2017 16:38
mongo cli is for command line?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:38
yes - type mongo at the command line
dinesh
@1532j0004kg
Dec 30 2017 16:39
where can i get that?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:39
it's in the path with mongod.exe
dinesh
@1532j0004kg
Dec 30 2017 16:39
and its supports 32 bit os?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:39
yes
dinesh
@1532j0004kg
Dec 30 2017 16:40
Mongoose: scores.insert({ player: 'q1', score: 1, _id: ObjectId("5a47bd6590f3561
5fc1c5ffe"), __v: 0 })
{ __v: 0, player: 'q1', score: 1, _id: 5a47bd6590f35615fc1c5ffe }
2
Mongoose: scores.insert({ player: 'q1w2', score: 1, _id: ObjectId("5a47bd6c90f35
615fc1c5fff"), __v: 0 })
{ __v: 0,
  player: 'q1w2',
  score: 1,
  _id: 5a47bd6c90f35615fc1c5fff }
2
Mongoose: scores.insert({ player: 'q1w2as', score: 1, _id: ObjectId("5a47bd7390f
35615fc1c6000"), __v: 0 })
{ __v: 0,
  player: 'q1w2as',
  score: 1,
  _id: 5a47bd7390f35615fc1c6000 }
i got this . when i entering data .\
and submit.
this is what i got in server .
Lisa Copeland
@lisacopeland
Dec 30 2017 16:41
so is that you manually inserting data?
dinesh
@1532j0004kg
Dec 30 2017 16:41
no.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:41
what happens when you do collection.find()
dinesh
@1532j0004kg
Dec 30 2017 16:42
collection.find() is a cmd?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:42
sorry scores.find()
dinesh
@1532j0004kg
Dec 30 2017 16:42
is it a cmd?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:43
yes
dinesh
@1532j0004kg
Dec 30 2017 16:43
C:\Users\dinesh\Desktop\app1>scores.find();
'scores.find' is not recognized as an internal or external command,
operable program or batch file.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:44
start mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:44

C:\Users\dinesh\Desktop\app1>mongo.exe
'mongo.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\dinesh\Desktop\app1>start mongo.exe
The system cannot find the file mongo.exe.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:45
go to the folder where mongod.exe is and start mongo
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 16:45
is your mongo on the path environment variable?
dinesh
@1532j0004kg
Dec 30 2017 16:47
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>
in this path?
@SweetCodingInc i cant able to get ur words?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:47
type mongo right there
dinesh
@1532j0004kg
Dec 30 2017 16:49
> scores.find();
2017-12-30T08:49:19.995-0800 E QUERY    [thread1] ReferenceError: scores is not
defined :
@(shell):1:1
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongo
2017-12-30T08:50:02.775-0800 I CONTROL  [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
MongoDB shell version: 3.2.18-4-g752daa3
connecting to: test
Server has startup warnings:
2017-12-30T06:55:07.242-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.242-0800 I CONTROL  [initandlisten] ** WARNING: This 32-bit
MongoDB binary is deprecated
2017-12-30T06:55:07.243-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.244-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.245-0800 I CONTROL  [initandlisten] ** NOTE: This is a 32 bi
t MongoDB binary.
2017-12-30T06:55:07.270-0800 I CONTROL  [initandlisten] **       32 bit builds a
re limited to less than 2GB of data (or less with --journal).
2017-12-30T06:55:07.271-0800 I CONTROL  [initandlisten] **       Note that journ
aling defaults to off for 32 bit and is currently off.
2017-12-30T06:55:07.272-0800 I CONTROL  [initandlisten] **       See http://doch
ub.mongodb.org/core/32bit
2017-12-30T06:55:07.274-0800 I CONTROL  [initandlisten]
>
Lisa Copeland
@lisacopeland
Dec 30 2017 16:50
what do you get if you do show collections
oh yeah - you have to do 'use database' first
dinesh
@1532j0004kg
Dec 30 2017 16:52
> use database
switched to db database
> scores.find()
2017-12-30T08:52:26.512-0800 E QUERY    [thread1] ReferenceError: scores is not
defined :
@(shell):1:1

> collections.find()
2017-12-30T08:52:36.159-0800 E QUERY    [thread1] ReferenceError: collections is
 not defined :
@(shell):1:1
Lisa Copeland
@lisacopeland
Dec 30 2017 16:53
do show collections
dinesh
@1532j0004kg
Dec 30 2017 16:53

> show collections
>
nothing happened.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:54
ok - there you go - you are not successfully saving data to your database
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 16:54
My guess is mongod is pointing to some other data source...
dinesh
@1532j0004kg
Dec 30 2017 16:55
what i want to do
?\
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongo
2017-12-30T08:50:02.775-0800 I CONTROL  [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
MongoDB shell version: 3.2.18-4-g752daa3
connecting to: test
Server has startup warnings:
2017-12-30T06:55:07.242-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.242-0800 I CONTROL  [initandlisten] ** WARNING: This 32-bit
MongoDB binary is deprecated
2017-12-30T06:55:07.243-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.244-0800 I CONTROL  [initandlisten]
2017-12-30T06:55:07.245-0800 I CONTROL  [initandlisten] ** NOTE: This is a 32 bi
t MongoDB binary.
2017-12-30T06:55:07.270-0800 I CONTROL  [initandlisten] **       32 bit builds a
re limited to less than 2GB of data (or less with --journal).
2017-12-30T06:55:07.271-0800 I CONTROL  [initandlisten] **       Note that journ
aling defaults to off for 32 bit and is currently off.
2017-12-30T06:55:07.272-0800 I CONTROL  [initandlisten] **       See http://doch
ub.mongodb.org/core/32bit
2017-12-30T06:55:07.274-0800 I CONTROL  [initandlisten]
>
is there any error in this?
it showing connecting to test.
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 16:57
@1532j0004kg First create a separate folder for your database say C:\mongodbs
and then do
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongod --dbpath C:\mongodbs
then once the server is up, open another command prompt and run your mongo command
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongo
dinesh
@1532j0004kg
Dec 30 2017 16:59
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongod --dbpath C:\mongodbs
it showing an err!
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 17:00
what error?
dinesh
@1532j0004kg
Dec 30 2017 17:11
C:\database_mongo\mongodb-win32-i386-3.2.18-4-g752daa3\bin>mongod --dbpath C:\mo
ngodbs
2017-12-30T08:59:19.588-0800 I CONTROL  [main]
2017-12-30T08:59:19.592-0800 W CONTROL  [main] 32-bit servers don't have journal
ing enabled by default. Please use --journal if you want durability.
2017-12-30T08:59:19.593-0800 I CONTROL  [main]
2017-12-30T08:59:19.602-0800 I CONTROL  [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
2017-12-30T08:59:19.611-0800 I CONTROL  [initandlisten] MongoDB starting : pid=3
544 port=27017 dbpath=C:\mongodbs 32-bit host=dinesh007
2017-12-30T08:59:19.614-0800 I CONTROL  [initandlisten] targetMinOS: Windows Vis
ta/Windows Server 2008
2017-12-30T08:59:19.615-0800 I CONTROL  [initandlisten] db version v3.2.18-4-g75
2daa3
2017-12-30T08:59:19.617-0800 I CONTROL  [initandlisten] git version: 752daa30609
5fb1610bb5db13b7b106ac87ec6cb
2017-12-30T08:59:19.618-0800 I CONTROL  [initandlisten] allocator: tcmalloc
2017-12-30T08:59:19.619-0800 I CONTROL  [initandlisten] modules: none
2017-12-30T08:59:19.622-0800 I CONTROL  [initandlisten] build environment:
2017-12-30T08:59:19.623-0800 I CONTROL  [initandlisten]     distarch: i386
2017-12-30T08:59:19.624-0800 I CONTROL  [initandlisten]     target_arch: i386
2017-12-30T08:59:19.625-0800 I CONTROL  [initandlisten] options: { storage: { db
Path: "C:\mongodbs" } }
2017-12-30T08:59:19.632-0800 E NETWORK  [initandlisten] listen(): bind() failed
errno:10048 Only one usage of each socket address (protocol/network address/port
) is normally permitted. for socket: 0.0.0.0:27017
2017-12-30T08:59:19.633-0800 E STORAGE  [initandlisten] Failed to set up sockets
 during startup.
2017-12-30T08:59:19.635-0800 I CONTROL  [initandlisten] dbexit:  rc: 48
Ion Varsescu
@Nei-V
Dec 30 2017 18:43
Hello, for those with more experice among you, should I inverst time in the design of the challenges pages, or is it enough to complete the functionality?
(I've completed the twitch challenge now, but I didn't spend to much time to beautify my challanges - didn't play with the css to much)
TheRedstoneTaco
@TheRedstoneTaco
Dec 30 2017 19:03
Is it cool if I post a link to my web app and ask people to break it
Matej Bošnjak
@mbosnjak01
Dec 30 2017 19:27
@Nei-V do you want to be a web designer?
Tom
@moT01
Dec 30 2017 19:28
@TheRedstoneTaco yes
TheRedstoneTaco
@TheRedstoneTaco
Dec 30 2017 19:38
Alright break it
bwahhahaha who's name and username is boss, bosslife
Matej Bošnjak
@mbosnjak01
Dec 30 2017 19:40
looks like i'm out after this :(
Tom
@moT01
Dec 30 2017 20:17
cant buy more than 1 different symbol
i get an error back - but it shows in my history
Merrick D.
@omgMerrickD
Dec 30 2017 21:08
When looking at a font page on Google fonts it shows Styles of the font like Thin, Extra-Light, Extra-Light Italic, Semi-Bold, etc. What's the CSS property to select those? Is it font-weight?
VaseJS
@VaseJS
Dec 30 2017 21:16
@omgMerrickD yes
and now
no
those are font faces @omgMerrickD
it depends on the font you are using if it has it or not
Merrick D.
@omgMerrickD
Dec 30 2017 21:26
@VaseJS Ahh got it, thank you. I didn't realize that you have to customize the Google font and styles you want and then it adds the correct weights to the @import declaration. Then just set the font-weight with the appropriate number.
CamperBot
@camperbot
Dec 30 2017 21:26
omgmerrickd sends brownie points to @vasejs and @import :sparkles: :thumbsup: :sparkles:
api offline
:cookie: 394 | @vasejs |http://www.freecodecamp.org/vasejs
VaseJS
@VaseJS
Dec 30 2017 21:27
@omgMerrickD :+1:
Cristian
@GummyGod
Dec 30 2017 23:32
Hello guys
I need help with my Algorithm exercise on palindromes
Basically,in theory,my code works,but it won't let me pass and it doesn't have the correct mark for the tasks
I have to check for palidromes,my approach was

function palindrome(str) {var x = str.split('').reverse().join('');
var y = x.replace(/[\W_]/g, '');var palindr = y.toLowerCase();
if ( palindr == str){return true;
}else {
return false;}
}

palindrome("eye");

VaseJS
@VaseJS
Dec 30 2017 23:33
@GummyGod please format for code with the back ticks `
TheRedstoneTaco
@TheRedstoneTaco
Dec 30 2017 23:34
what is /[\W_]g ?
VaseJS
@VaseJS
Dec 30 2017 23:34
help format
where is that robot
help
find `
CamperBot
@camperbot
Dec 30 2017 23:34
find **
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34
find format
CamperBot
@camperbot
Dec 30 2017 23:34
find format
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34
find help
CamperBot
@camperbot
Dec 30 2017 23:34
find help
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34
i don't know how to control him
@TheRedstoneTaco i don't see that, but it looks to be a regex
yes, its a regular expression used to replace a string
after the string (x) is reversed, the code uses a regex to replace anything that is not a word
\W means not word in regex
g = global as in all matches
and the [] means character set so if the string has an underscore (_) or anything that is not a word (numbers, spaces, etc), the are to be replace
then turned into lower case
VaseJS
@VaseJS
Dec 30 2017 23:40
surround your code with 3 ` at the top and bottom so it formats properly
SakisBal
@SakisBal
Dec 30 2017 23:40
hey a question
VaseJS
@VaseJS
Dec 30 2017 23:40
like this
@SakisBal we may have answers
SakisBal
@SakisBal
Dec 30 2017 23:40
does the frontend certificate hold any real value?
VaseJS
@VaseJS
Dec 30 2017 23:40
no
SakisBal
@SakisBal
Dec 30 2017 23:40
oh, i expected that xD
thank you
VaseJS
@VaseJS
Dec 30 2017 23:41
its just a cert from this group. it would be up to someone who is hiring you or knows and has an understanding of what FCC is or is clueless of what FCC is and likes the fact that you have a cert
i like my brownie points, @ me and re thank me please
SakisBal
@SakisBal
Dec 30 2017 23:42
makes sense
VaseJS
@VaseJS
Dec 30 2017 23:42
:D
SakisBal
@SakisBal
Dec 30 2017 23:42
@VaseJS
what are these brownie points
Cristian
@GummyGod
Dec 30 2017 23:42
@VaseJS beside format
VaseJS
@VaseJS
Dec 30 2017 23:42
must collect all meaning points. do that and add thank you
Cristian
@GummyGod
Dec 30 2017 23:42
any help with that algorithm
why it doesn't work ?
VaseJS
@VaseJS
Dec 30 2017 23:42
post it again with proper formating so i can read it better
@VaseJS thank you
CamperBot
@camperbot
Dec 30 2017 23:43
sorry vasejs, you can't send brownie points to yourself! :sparkles: :sparkles:
VaseJS
@VaseJS
Dec 30 2017 23:43
but i can't give brownies to myself
Cristian
@GummyGod
Dec 30 2017 23:43

``` function palindrome(str) {
var x = str.split('').reverse().join('');
var y = x.replace(/[\W_]/g, '');
var palindr = y.toLowerCase();
if ( palindr == str){
return true;
}
else {
return false;
}
}

palindrome("eye"); ```

3 back ticks after every sentence?
or
VaseJS
@VaseJS
Dec 30 2017 23:44
no, just hit enter after the first 3
SakisBal
@SakisBal
Dec 30 2017 23:44
@VaseJS thank you
CamperBot
@camperbot
Dec 30 2017 23:44
sakisbal sends brownie points to @vasejs :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @vasejs |http://www.freecodecamp.org/vasejs
VaseJS
@VaseJS
Dec 30 2017 23:44
yay
function palindrome(str) {
var x = str.split('').reverse().join('');
var y = x.replace(/[\W_]/g, '');
var palindr = y.toLowerCase();
if ( palindr == str){
return true;
}
else {
return false;
}
}

palindrome("eye");
like so
SakisBal
@SakisBal
Dec 30 2017 23:44
what do they do though
VaseJS
@VaseJS
Dec 30 2017 23:44
@SakisBal ...nothing!
Cristian
@GummyGod
Dec 30 2017 23:44
better?
VaseJS
@VaseJS
Dec 30 2017 23:45
just like in a video game, we're just collecting them just cuz
SakisBal
@SakisBal
Dec 30 2017 23:45
oh well x
VaseJS
@VaseJS
Dec 30 2017 23:45
high score, clout, etc
Cristian
@GummyGod
Dec 30 2017 23:45
@VaseJS any ideea about the algorithm?
VaseJS
@VaseJS
Dec 30 2017 23:45
meaningless pissing content
@GummyGod what are you trying to do with the code
what is the exercise called
@GummyGod how could palindr == str after you did that to it?
it will never equal true
Cristian
@GummyGod
Dec 30 2017 23:46
It is called check for palindromes
I mean ,it works
it turns Race car into racecar
and _Eye
into eye
VaseJS
@VaseJS
Dec 30 2017 23:47
ok, i get it. let me check again
link for the challenge
VaseJS
@VaseJS
Dec 30 2017 23:47
why are you reversing the string?
Cristian
@GummyGod
Dec 30 2017 23:49
Because a palindrome is basically
a word that means the same thing backwards
so i reversed it,and my logic was that
if reversed it is equal to the original word
it should pass,right?
VaseJS
@VaseJS
Dec 30 2017 23:52
oh yea, i remember this exercise
Cristian
@GummyGod
Dec 30 2017 23:53
So... theoritcally my approach is correct but.. u know,it doen't work
any ideea why it doesn't work but
this works
return str.replace(/[\W_]/g, '').toLowerCase()=== str.replace(/[\W_]/g, '').toLowerCase().split('').reverse().join('');
like mine should work too is basically the same thing but written different
VaseJS
@VaseJS
Dec 30 2017 23:54
ok, i've reviewed the exercise, let me look at it again
J.D. Sandifer
@jdsandifer
Dec 30 2017 23:56
Hi all. Could someone help me with the Wikipedia API call in the Wikipedia search challenge?
VaseJS
@VaseJS
Dec 30 2017 23:57
@GummyGod you're order is off
you are doing the correct thing, just in the wrong order
Cristian
@GummyGod
Dec 30 2017 23:58
Hmm
VaseJS
@VaseJS
Dec 30 2017 23:58
@jdsandifer what do you need
Cristian
@GummyGod
Dec 30 2017 23:58
How could i optimise it?
Can u gimme the correct order so i can analyse my mistakes if u wish please?
J.D. Sandifer
@jdsandifer
Dec 30 2017 23:58
Got this error from my ajax call: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access."
VaseJS
@VaseJS
Dec 30 2017 23:58
@GummyGod coming up