These are chat archives for FreeCodeCamp/HelpFrontEnd

30th
Dec 2017
Botenga
@Botenga
Dec 30 2017 00:02 UTC
@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 UTC

@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 UTC
deleted
just deleted
still
not working
firas omrane
@firou1925
Dec 30 2017 00:05 UTC
@Botenga share your pen code to see the problem
firas omrane
@firou1925
Dec 30 2017 00:06 UTC
what is the problem ?
Botenga
@Botenga
Dec 30 2017 00:08 UTC
My hamburger isnt working
Sorin Ruse
@sorinr
Dec 30 2017 00:09 UTC
@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 UTC
smh I dont know what the issue is
Sorin Ruse
@sorinr
Dec 30 2017 00:11 UTC
@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 UTC
@sorinr thanx its finally worked
CamperBot
@camperbot
Dec 30 2017 00:12 UTC
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 UTC
@Botenga welcome
@Botenga :+1:
Botenga
@Botenga
Dec 30 2017 00:13 UTC
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 UTC
we can use embeded links
or codepen made it easier to include libraries
Botenga
@Botenga
Dec 30 2017 00:18 UTC
yeah but I use those same links in my recent pen and it didnt work
firas omrane
@firou1925
Dec 30 2017 00:21 UTC
try it again and we will try to get the problem
Botenga
@Botenga
Dec 30 2017 00:22 UTC
yeah i found the solution for embedding it! Just now
lolz
but thanks for caring man
firas omrane
@firou1925
Dec 30 2017 00:23 UTC
u r welcome
Joseph A. Sangine
@HTML-joe
Dec 30 2017 00:51 UTC
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 UTC
@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 UTC
@sorinr Thank you so much exactly what I needed!
CamperBot
@camperbot
Dec 30 2017 01:17 UTC
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 UTC
@HTML-joe welcome
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:18 UTC
anybody home?
@Hoxtygen
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:49 UTC
@moT01 hi, got a problem with fetching image from the weather api https://codepen.io/hoxtygen/pen/wpzRPZ
what image
where
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:52 UTC
@moT01 weather icon depicting the weather condition
does the rest work?
i cant log the longt
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:55 UTC
@moT01 everything works except the image... You have to enable access to your location to make it work
i click allow and nothing
Wasiu Idowu
@Hoxtygen
Dec 30 2017 02:56 UTC
@moT01 connection problem i guess, im looking at something here
@moT01 reload maybe?
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:01 UTC
@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
well, you can't make it exact
you have to put the variable in there
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:02 UTC
@moT01 you can check my javascript code, its in there
variable wouldnt need ' around it
i saved it again
a little different
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:08 UTC
@moT01 you're talking about this line right?
var img = document.createElement('img')
             img.src = stringified.weather[0].icon
right - you can see an example in the pen
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:16 UTC
@moT01 thank you man...................it works
CamperBot
@camperbot
Dec 30 2017 03:16 UTC
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 UTC
@moT01 been on it for three days
@moT01 sometimes the obvious isnt that obvious............
Sorin Ruse
@sorinr
Dec 30 2017 03:18 UTC
@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 UTC
@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 UTC
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 UTC
Now i can move on to other things
@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 UTC
@moT01 yea. it was just a concatenation error
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:25 UTC
@moT01 @sorinr do i need to make it mobile responsive or just move along to other challenges?
its not required
doesnt hurt though
Wasiu Idowu
@Hoxtygen
Dec 30 2017 03:26 UTC
@moT01 okay, I like your style
gotta sleep, its 4:26am
Madeline Collins
@indikoro
Dec 30 2017 04:53 UTC
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 UTC
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 UTC
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 UTC
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 UTC
@catherinewoodward It depends, but for the most part you should be good to go.
primuscovenant
@primuscovenant
Dec 30 2017 05:05 UTC
@heroiczero thx
CamperBot
@camperbot
Dec 30 2017 05:05 UTC
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 UTC
@terensu-desu Thankz, I will check and update my lab test :D
CamperBot
@camperbot
Dec 30 2017 05:06 UTC
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 UTC
@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 UTC
@catherinewoodward You're welcome, good luck
@indikoro Can you be any more specific about your troubles?
Shahe Imran
@bddarknight
Dec 30 2017 05:07 UTC
@khaduch Got it
Ken Haduch
@khaduch
Dec 30 2017 05:08 UTC
ok...
Ken Haduch
@khaduch
Dec 30 2017 05:12 UTC
@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 UTC

@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 UTC
I did and itz working :)
http://prntscr.com/hu37nk
Madeline Collins
@indikoro
Dec 30 2017 05:13 UTC
New to Gitter, sorry for the incorrect code markup. 😕
Ken Haduch
@khaduch
Dec 30 2017 05:14 UTC
@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 UTC
@khaduch :thumbsup:
Madeline Collins
@indikoro
Dec 30 2017 05:17 UTC
@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 UTC
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 UTC
@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 UTC
@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 UTC
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 UTC
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 UTC

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 UTC
is there a link for this?
alteducation
@alteducation
Dec 30 2017 13:11 UTC
schild.surge.sh
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:16 UTC
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 UTC
adding padding top is giving me inconsistent layouts on different devices
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:17 UTC
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 UTC
yeah
stuff like that
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:20 UTC
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 UTC
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 UTC
Are you using some prefixer?
If you dont use it test agaib and it will work
alteducation
@alteducation
Dec 30 2017 13:23 UTC
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 UTC
Are youvwriting css or something like sass just to understandbsomething first
alteducation
@alteducation
Dec 30 2017 13:35 UTC
no just css
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36 UTC
hum do you know how to use node ?
alteducation
@alteducation
Dec 30 2017 13:36 UTC
no
just basic javascript
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36 UTC
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 UTC
i used this same website
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36 UTC
did you?
alteducation
@alteducation
Dec 30 2017 13:36 UTC
came up when i googled
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:36 UTC
change the amount of versions below
set up 20 :D
alteducation
@alteducation
Dec 30 2017 13:37 UTC
thanks let me try that
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:38 UTC
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 UTC
percentage values for margin and padding works fine?
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:40 UTC
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 UTC
thanks. i used the site uigradients to generate the colours
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 13:44 UTC
Congrats :smile:
Looks good
alteducation
@alteducation
Dec 30 2017 13:47 UTC
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 UTC
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 UTC
@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 UTC
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 UTC
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 UTC
@tiagocorreiaalmeida i see your point.
@reycuban thank you
CamperBot
@camperbot
Dec 30 2017 14:06 UTC
sorry reycuban, you can't send brownie points to yourself! :sparkles: :sparkles:
Reinier Blanco-Diaz
@reycuban
Dec 30 2017 14:06 UTC
@tiagocorreiaalmeida thank you
CamperBot
@camperbot
Dec 30 2017 14:06 UTC
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 UTC
@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 UTC
hi
guys , i am struggling in finding error can anyone help me to fix that error?
Tiago Correia
@tiagocorreiaalmeida
Dec 30 2017 14:30 UTC
@alteducation not sure maybe try to change it into positon absolute ?:|
not really sure
Marc
@MWBauer
Dec 30 2017 15:00 UTC
HEY YA'LL!
:wave:
@1532j0004kg
dinesh
@1532j0004kg
Dec 30 2017 15:09 UTC
hi @moT01
having problems?
dinesh
@1532j0004kg
Dec 30 2017 15:11 UTC
yup.
dinesh
@1532j0004kg
Dec 30 2017 15:16 UTC
can u help me.
?
Marc
@MWBauer
Dec 30 2017 15:20 UTC
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 UTC

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 UTC
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.
throw the disc golf thing in there
nursing school - pharmacy, impressive
coding, impressive
learned disc golf
Lisa Copeland
@lisacopeland
Dec 30 2017 15:37 UTC
what is disc golf
its like regular golf - but with frisbees
that you throw into a basket
i play - its fun
Marc
@MWBauer
Dec 30 2017 15:38 UTC
Imagine instead of using a crooked stick and a ball you throw discs that are like smaller frisbees.
but not hard to learn
Lisa Copeland
@lisacopeland
Dec 30 2017 15:38 UTC
that sounds fun
Marc
@MWBauer
Dec 30 2017 15:38 UTC
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...
disc golf is pretty big around here - minnesota
Marc
@MWBauer
Dec 30 2017 15:39 UTC
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 UTC
whats GBO
Marc
@MWBauer
Dec 30 2017 15:39 UTC
Glass Blown Open. It's one of the major tournaments.
Lisa Copeland
@lisacopeland
Dec 30 2017 15:40 UTC
cool where is it held
Marc
@MWBauer
Dec 30 2017 15:40 UTC
Look up on Youtube Paul McBeth, Ricky Wysocki, Eagle McMahon
glass blown open
wow
Marc
@MWBauer
Dec 30 2017 15:40 UTC
Paige Pierce,
ha
Marc
@MWBauer
Dec 30 2017 15:40 UTC
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 UTC
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 UTC
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.
we have the ice bowl here - tournament in the snow - i think its in february
Lisa Copeland
@lisacopeland
Dec 30 2017 15:44 UTC
That sounds extreme
dinesh
@1532j0004kg
Dec 30 2017 15:44 UTC
hi did u fix my error.
?
@moT01
hopefully its not as cold then as it is now
@1532j0004kg i dont see an error
dinesh
@1532j0004kg
Dec 30 2017 15:45 UTC

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 UTC
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 UTC
@MWBauer Wow - I wonder if it is played around here - in Washington State
has to be
@1532j0004kg are those supposed to be links or something
?
im still not seeing anything
dinesh
@1532j0004kg
Dec 30 2017 15:47 UTC
@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 UTC
@moT01 https://www.dgcoursereview.com/course.php?id=738 very close to my house!
@lisacopeland most of them are free
go buy a couple discs for like 30$
Lisa Copeland
@lisacopeland
Dec 30 2017 15:50 UTC
@1532j0004kg why don't you set mongoose debug to true
there's different styles - like golf clubs - some for driving/distance
some for putting
dinesh
@1532j0004kg
Dec 30 2017 15:51 UTC
where to set?
@lisacopeland
Lisa Copeland
@lisacopeland
Dec 30 2017 15:51 UTC
after you require it
mongoose.set('debug', true);
dinesh
@1532j0004kg
Dec 30 2017 15:51 UTC
thats the problem?
Lisa Copeland
@lisacopeland
Dec 30 2017 15:52 UTC
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 UTC

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 UTC
what are you using to persist the data
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 UTC
What happens when you use something besides your client to hit the server
dinesh
@1532j0004kg
Dec 30 2017 15:58 UTC
yes, i can able to view the data in browser
Lisa Copeland
@lisacopeland
Dec 30 2017 15:58 UTC
where is your client code
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 UTC
<!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 UTC
I don't know what robomongo is
dinesh
@1532j0004kg
Dec 30 2017 15:59 UTC
robo mongo is for view the stored data!
i feel like i might be right
Lisa Copeland
@lisacopeland
Dec 30 2017 16:00 UTC
can you use mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:00 UTC
then how u view the data in database without robomongo
Lisa Copeland
@lisacopeland
Dec 30 2017 16:00 UTC
use the mongo cli - mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:00 UTC
@lisacopeland where ?
mongo.exe in server?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:02 UTC
in the path where your mongod.exe is
can you not use postman?
dinesh
@1532j0004kg
Dec 30 2017 16:04 UTC
i used.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:04 UTC
@1532j0004kg sorry?
dinesh
@1532j0004kg
Dec 30 2017 16:06 UTC
am i want to use save();
did nobody hear what i said there? i still think i was on to something
dinesh
@1532j0004kg
Dec 30 2017 16:07 UTC
console is work!
@moT01
it consoling 2 , in server.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:08 UTC
@moT01 yep - I think you are right - I don't see where the data is actually saved
and on a refresh does it put 1?
dinesh
@1532j0004kg
Dec 30 2017 16:09 UTC
on browser?
server
Lisa Copeland
@lisacopeland
Dec 30 2017 16:09 UTC
why are you using create?
dinesh
@1532j0004kg
Dec 30 2017 16:10 UTC
to store!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:10 UTC
to write the data to mongo you should have modelname.save(function(err, result) {}
8 pages of disc courses within 100 miles of my house on that site
dinesh
@1532j0004kg
Dec 30 2017 16:11 UTC
no.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:11 UTC
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 UTC
ok
?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:12 UTC
It didn't work completely
Marc
@MWBauer
Dec 30 2017 16:13 UTC
@moT01 That's cool. Where are you?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:13 UTC
here - I am going to rewrite your router.post
dinesh
@1532j0004kg
Dec 30 2017 16:13 UTC
@moT01 no , when i reload the page it's not showing anything in server.
Marc
@MWBauer
Dec 30 2017 16:14 UTC
@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 UTC
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 UTC

@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 UTC
use shift+enter.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:16 UTC
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 UTC
``` shift+enter
use this way.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:18 UTC
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 UTC
unexpected end of input is error?
!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:20 UTC
whoops I forgot something
@MWBauer 56301
dinesh
@1532j0004kg
Dec 30 2017 16:21 UTC
@moT01
@lisacopeland what?
@moT01 did u find what is the error?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:21 UTC
@1532j0004kg gimme a sec
dinesh
@1532j0004kg
Dec 30 2017 16:21 UTC
i am really sruggling @moT01
@lisacopeland ok
@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 UTC
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 UTC
```

```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 UTC
this is the thing i got in server.
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 UTC

```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 UTC
yes
there is nothing putting data anywhere when you first load the page
dinesh
@1532j0004kg
Dec 30 2017 16:25 UTC
@1532j0004kg
Lisa Copeland
@lisacopeland
Dec 30 2017 16:25 UTC
My snippet isn't posting right
only when you click a button do you make a post request and append info somewhere
dinesh
@1532j0004kg
Dec 30 2017 16:25 UTC
@moT01
so when you refresh - that stuff doesnt happen
Lisa Copeland
@lisacopeland
Dec 30 2017 16:25 UTC
I really think you need to figure out if your data is saving correctly
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 UTC
@moT01 Yes
dinesh
@1532j0004kg
Dec 30 2017 16:26 UTC
@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 UTC
@1532j0004kg you are doing nothing to get and display existing data on the page after document ready
it disappears - cause like i said - it only gets put there when you click the button
dinesh
@1532j0004kg
Dec 30 2017 16:29 UTC
yes, what i want to do to store the data permanently there?
no data is retrieved or displayed when you first load the page
Lisa Copeland
@lisacopeland
Dec 30 2017 16:29 UTC
@moT01 yep
dinesh
@1532j0004kg
Dec 30 2017 16:29 UTC
yes
Lisa Copeland
@lisacopeland
Dec 30 2017 16:30 UTC
@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 UTC
my data's are there in a browser only temporarly!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:31 UTC
@1532j0004kg yes - you are not going to see your data unless you retrieve it from the datavase
dinesh
@1532j0004kg
Dec 30 2017 16:31 UTC
@lisacopeland but i use the res.send() in post!
you need to listen to us @1532j0004kg
dinesh
@1532j0004kg
Dec 30 2017 16:32 UTC
yes , i am listening .
Lisa Copeland
@lisacopeland
Dec 30 2017 16:33 UTC
@1532j0004kg when you refresh the page your page state goes away
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 UTC
ok i got it!
Lisa Copeland
@lisacopeland
Dec 30 2017 16:33 UTC
good luck!
dinesh
@1532j0004kg
Dec 30 2017 16:33 UTC
i want to write get type right?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:34 UTC
you want a router.get function in your server code
dinesh
@1532j0004kg
Dec 30 2017 16:34 UTC
yes.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:34 UTC
which executes a model.find
amd returns the data
dinesh
@1532j0004kg
Dec 30 2017 16:36 UTC
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 UTC
no
dinesh
@1532j0004kg
Dec 30 2017 16:36 UTC
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 UTC
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 UTC
how to view ?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:38 UTC
how to view what?
dinesh
@1532j0004kg
Dec 30 2017 16:38 UTC
mongo cli is for command line?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:38 UTC
yes - type mongo at the command line
dinesh
@1532j0004kg
Dec 30 2017 16:39 UTC
where can i get that?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:39 UTC
it's in the path with mongod.exe
dinesh
@1532j0004kg
Dec 30 2017 16:39 UTC
and its supports 32 bit os?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:39 UTC
yes
dinesh
@1532j0004kg
Dec 30 2017 16:40 UTC
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 UTC
so is that you manually inserting data?
dinesh
@1532j0004kg
Dec 30 2017 16:41 UTC
no.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:41 UTC
what happens when you do collection.find()
dinesh
@1532j0004kg
Dec 30 2017 16:42 UTC
collection.find() is a cmd?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:42 UTC
sorry scores.find()
dinesh
@1532j0004kg
Dec 30 2017 16:42 UTC
is it a cmd?
Lisa Copeland
@lisacopeland
Dec 30 2017 16:43 UTC
yes
dinesh
@1532j0004kg
Dec 30 2017 16:43 UTC
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 UTC
start mongo.exe
dinesh
@1532j0004kg
Dec 30 2017 16:44 UTC

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 UTC
go to the folder where mongod.exe is and start mongo
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 16:45 UTC
is your mongo on the path environment variable?
dinesh
@1532j0004kg
Dec 30 2017 16:47 UTC
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 UTC
type mongo right there
dinesh
@1532j0004kg
Dec 30 2017 16:49 UTC
> 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 UTC
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 UTC
> 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 UTC
do show collections
dinesh
@1532j0004kg
Dec 30 2017 16:53 UTC

> show collections
>
nothing happened.
Lisa Copeland
@lisacopeland
Dec 30 2017 16:54 UTC
ok - there you go - you are not successfully saving data to your database
Sweet Coding :)
@SweetCodingInc
Dec 30 2017 16:54 UTC
My guess is mongod is pointing to some other data source...
dinesh
@1532j0004kg
Dec 30 2017 16:55 UTC
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 UTC
@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 UTC
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 UTC
what error?
dinesh
@1532j0004kg
Dec 30 2017 17:11 UTC
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 UTC
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 UTC
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 UTC
@Nei-V do you want to be a web designer?
@TheRedstoneTaco yes
TheRedstoneTaco
@TheRedstoneTaco
Dec 30 2017 19:38 UTC
Alright break it
bwahhahaha who's name and username is boss, bosslife
Matej Bošnjak
@mbosnjak01
Dec 30 2017 19:40 UTC
looks like i'm out after this :(
cant buy more than 1 different symbol
i get an error back - but it shows in my history
Merrick
@omgMerrickD
Dec 30 2017 21:08 UTC
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 UTC
@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
@omgMerrickD
Dec 30 2017 21:26 UTC
@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 UTC
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 UTC
@omgMerrickD :+1:
Cristian
@GummyGod
Dec 30 2017 23:32 UTC
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 UTC
@GummyGod please format for code with the back ticks `
TheRedstoneTaco
@TheRedstoneTaco
Dec 30 2017 23:34 UTC
what is /[\W_]g ?
VaseJS
@VaseJS
Dec 30 2017 23:34 UTC
help format
where is that robot
help
find `
CamperBot
@camperbot
Dec 30 2017 23:34 UTC
find **
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34 UTC
find format
CamperBot
@camperbot
Dec 30 2017 23:34 UTC
find format
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34 UTC
find help
CamperBot
@camperbot
Dec 30 2017 23:34 UTC
find help
nothing found
VaseJS
@VaseJS
Dec 30 2017 23:34 UTC
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 UTC
surround your code with 3 ` at the top and bottom so it formats properly
SakisBal
@SakisBal
Dec 30 2017 23:40 UTC
hey a question
VaseJS
@VaseJS
Dec 30 2017 23:40 UTC
like this
@SakisBal we may have answers
SakisBal
@SakisBal
Dec 30 2017 23:40 UTC
does the frontend certificate hold any real value?
VaseJS
@VaseJS
Dec 30 2017 23:40 UTC
no
SakisBal
@SakisBal
Dec 30 2017 23:40 UTC
oh, i expected that xD
thank you
VaseJS
@VaseJS
Dec 30 2017 23:41 UTC
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 UTC
makes sense
VaseJS
@VaseJS
Dec 30 2017 23:42 UTC
:D
SakisBal
@SakisBal
Dec 30 2017 23:42 UTC
@VaseJS
what are these brownie points
Cristian
@GummyGod
Dec 30 2017 23:42 UTC
@VaseJS beside format
VaseJS
@VaseJS
Dec 30 2017 23:42 UTC
must collect all meaning points. do that and add thank you
Cristian
@GummyGod
Dec 30 2017 23:42 UTC
any help with that algorithm
why it doesn't work ?
VaseJS
@VaseJS
Dec 30 2017 23:42 UTC
post it again with proper formating so i can read it better
@VaseJS thank you
CamperBot
@camperbot
Dec 30 2017 23:43 UTC
sorry vasejs, you can't send brownie points to yourself! :sparkles: :sparkles:
VaseJS
@VaseJS
Dec 30 2017 23:43 UTC
but i can't give brownies to myself
Cristian
@GummyGod
Dec 30 2017 23:43 UTC

``` 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 UTC
no, just hit enter after the first 3
SakisBal
@SakisBal
Dec 30 2017 23:44 UTC
@VaseJS thank you
CamperBot
@camperbot
Dec 30 2017 23:44 UTC
sakisbal sends brownie points to @vasejs :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @vasejs |http://www.freecodecamp.org/vasejs
VaseJS
@VaseJS
Dec 30 2017 23:44 UTC
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 UTC
what do they do though
VaseJS
@VaseJS
Dec 30 2017 23:44 UTC
@SakisBal ...nothing!
Cristian
@GummyGod
Dec 30 2017 23:44 UTC
better?
VaseJS
@VaseJS
Dec 30 2017 23:45 UTC
just like in a video game, we're just collecting them just cuz
SakisBal
@SakisBal
Dec 30 2017 23:45 UTC
oh well x
VaseJS
@VaseJS
Dec 30 2017 23:45 UTC
high score, clout, etc
Cristian
@GummyGod
Dec 30 2017 23:45 UTC
@VaseJS any ideea about the algorithm?
VaseJS
@VaseJS
Dec 30 2017 23:45 UTC
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 UTC
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 UTC
ok, i get it. let me check again
link for the challenge
VaseJS
@VaseJS
Dec 30 2017 23:47 UTC
why are you reversing the string?
Cristian
@GummyGod
Dec 30 2017 23:49 UTC
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 UTC
oh yea, i remember this exercise
Cristian
@GummyGod
Dec 30 2017 23:53 UTC
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 UTC
ok, i've reviewed the exercise, let me look at it again
J.D. Sandifer
@jdsandifer
Dec 30 2017 23:56 UTC
Hi all. Could someone help me with the Wikipedia API call in the Wikipedia search challenge?
VaseJS
@VaseJS
Dec 30 2017 23:57 UTC
@GummyGod you're order is off
you are doing the correct thing, just in the wrong order
Cristian
@GummyGod
Dec 30 2017 23:58 UTC
Hmm
VaseJS
@VaseJS
Dec 30 2017 23:58 UTC
@jdsandifer what do you need
Cristian
@GummyGod
Dec 30 2017 23:58 UTC
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 UTC
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 UTC
@GummyGod coming up