These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Jun 2017
Ilya
@Dar0n
Jun 22 2017 00:00
@adamfaraj Oh, and your '"' will also not pass, encode this as well)
@adamfaraj I would rather make a single string from all this things, together with '"', then used encodeURIComponent on it, and then simply passed this string to your href attribute
Now I'm gone)
mrgrizzlie33
@mrgrizzlie33
Jun 22 2017 00:04

@mrgrizzlie33
Hey guys, I've run into a weird problem. Here's my code:

var gear=0;

this.setGear=function(change) {
gear += change;
};
this.getGear=function() {
return gear;
};
};

var myCar = new Car();

var myBike = new Bike();

And here are the conditions to be met:

Yes)The method getGear of myBike should be accessible outside the object.
Yes)The method setGear of myBike should be accessible outside the object.
Yes)myBike.gear should remain undefined.
Yes)myBike.getGear() should return 4 after calling myBike.setGear(4).
No)myBike.getGear() should return 3 after calling myBike.setGear(3).
No)myBike.getGear() should return 1 after calling myBike.setGear(1).

You can see why I'm confused...

Roxroy
@roxroy
Jun 22 2017 00:10
@mrgrizzlie33 , here you are increasing the gear gear += change;, you need to set the gear to the number send in from the change variable
mrgrizzlie33
@mrgrizzlie33
Jun 22 2017 00:12
Thanks @roxroy
CamperBot
@camperbot
Jun 22 2017 00:12
mrgrizzlie33 sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:star2: 1015 | @roxroy |http://www.freecodecamp.com/roxroy
Mike
@sprint68
Jun 22 2017 00:37
How do I center my image directly under my subheading using css?
Adam Faraj
@adamfaraj
Jun 22 2017 00:37
margin: 0 auto
oh wait, i read that incorrectly
link?
Adam Faraj
@adamfaraj
Jun 22 2017 00:40
<div class="container">
 <h1 class="text-center" style="font-size:90px">John "Jocko" Willink</h1>

 <h2 class="text-center" style="font-size:20px">Former Navy SEAL Commander, Author, Podcaster, & All-Around Badass</h2>


 <img src="http://static4.businessinsider.com/image/56290c39bd86ef1b008c3f12-480/jocko-willink-and-leif-babin.jpg" alt="Jocko Willink in combat gear">
  </div>
Adam Faraj
@adamfaraj
Jun 22 2017 00:41
.container{
  display: flex;

  flex-direction: column;
}
@sprint68 read up on flexbox
Tom
@moT01
Jun 22 2017 00:42
flex is great and i would read up on it, but im not sure its best to do all that just to center one thing
i guess its the same amount of code as any other way
Mike
@sprint68
Jun 22 2017 00:43
Ok, thanks guys :)
Adam Faraj
@adamfaraj
Jun 22 2017 00:43
@moT01 he could wrap the image in a div container then set it to margin: 0 auto
Tom
@moT01
Jun 22 2017 00:43
there's more happening in my head though
Adam Faraj
@adamfaraj
Jun 22 2017 00:43
there's plenty of ways, but if it works, it works
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 00:43
how could I put the label "strict" below the yellow button in my pen https://codepen.io/Mr-Kumar-Abhishek/pen/yXVKGg
All my attempts to do that have failed , is there something wrong I am doing here ?
Tom
@moT01
Jun 22 2017 00:43
click the names and say thanks
for brownie sharing
i dunno man @Mr-Kumar-Abhishek
Adam Faraj
@adamfaraj
Jun 22 2017 00:49
@Mr-Kumar-Abhishek i'm playing with it
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 00:50
@moT01 Thanks for looking into it :)
CamperBot
@camperbot
Jun 22 2017 00:50
mr-kumar-abhishek sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 730 | @mot01 |http://www.freecodecamp.com/mot01
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 00:51
@adamfaraj Thanks a lot ! I am stuck with it for few hours
CamperBot
@camperbot
Jun 22 2017 00:51
mr-kumar-abhishek sends brownie points to @adamfaraj :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @adamfaraj |http://www.freecodecamp.com/adamfaraj
Tom
@moT01
Jun 22 2017 00:52
@Mr-Kumar-Abhishek if you make the font small enough they will line up
Adam Faraj
@adamfaraj
Jun 22 2017 00:53
@Mr-Kumar-Abhishek got it
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 00:53
Um... @moT01 could you give an example or something ?
Adam Faraj
@adamfaraj
Jun 22 2017 00:54
@Mr-Kumar-Abhishek get rid of this
.btn-block+.btn-block {
    /* margin-top: 5px; */
}
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 00:54
@adamfaraj how ... ah... okay thanks !
CamperBot
@camperbot
Jun 22 2017 00:54
mr-kumar-abhishek sends brownie points to @adamfaraj :sparkles: :thumbsup: :sparkles:
:warning: mr-kumar-abhishek already gave adamfaraj points
Adam Faraj
@adamfaraj
Jun 22 2017 00:54
.yellow {
    background: yellow;
    /* top: 10px; */
}
get rid of the top
line up perfectly
Mike
@sprint68
Jun 22 2017 00:57
@moT01 @adamfaraj Thanks :)
CamperBot
@camperbot
Jun 22 2017 00:57
sprint68 sends brownie points to @mot01 and @adamfaraj :sparkles: :thumbsup: :sparkles:
:cookie: 731 | @mot01 |http://www.freecodecamp.com/mot01
:cookie: 281 | @adamfaraj |http://www.freecodecamp.com/adamfaraj
Mike
@sprint68
Jun 22 2017 01:07
Is there a class or style element to underline?
underline text*
Mike
@sprint68
Jun 22 2017 01:09
@moT01 thanks
CamperBot
@camperbot
Jun 22 2017 01:09
sprint68 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:warning: sprint68 already gave mot01 points
NBlackold
@NBlackold
Jun 22 2017 01:10
@Mike, try with <u> </u> in HTML or CSS text-decoration: underline;
Abhishek Kumar
@Mr-Kumar-Abhishek
Jun 22 2017 01:28
@adamfaraj it lined up perfectly thanks a lot :D
CamperBot
@camperbot
Jun 22 2017 01:28
mr-kumar-abhishek sends brownie points to @adamfaraj :sparkles: :thumbsup: :sparkles:
:warning: mr-kumar-abhishek already gave adamfaraj points
Adam Faraj
@adamfaraj
Jun 22 2017 01:28
no worries @Mr-Kumar-Abhishek
Botenga
@Botenga
Jun 22 2017 02:21
https://codepen.io/Botenga/pen/wdEjdJ
Hey guys i need help with my portfolio page.
i am having an issue with one of my input box that input box being the message one. where the text message appears in the middle i want it to appear in the upper left coner.
Mike
@sprint68
Jun 22 2017 02:32
@adamfaraj @Mr-Kumar-Abhishek @moT01 @Dar0n Thanks for the help! Let me know how I did!
CamperBot
@camperbot
Jun 22 2017 02:32
:cookie: 269 | @dar0n |http://www.freecodecamp.com/dar0n
:cookie: 282 | @adamfaraj |http://www.freecodecamp.com/adamfaraj
:cookie: 732 | @mot01 |http://www.freecodecamp.com/mot01
:cookie: 491 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
sprint68 sends brownie points to @adamfaraj and @mr-kumar-abhishek and @mot01 and @dar0n :sparkles: :thumbsup: :sparkles:
Tom
@moT01
Jun 22 2017 02:35
@sprint68 looks good enough to move on if you want
but im not thrilled about the color scheme
the bottom section could use some centering maybe, ....or at least some space on the left
and maybe center the middle as well
it looks like bullet points are centered but not the titles
and if you're moving on - i wouldn't put too much effort into the portfolio yet
i did mine last, ...you will want to completely redo it after you complete more projects if you do it right away
Csaba Balogh
@JasonCorp84
Jun 22 2017 02:40
Hello
here is my wikipedia page. Any suggestion? https://codepen.io/JasonCorp/full/pweQeB/
Sorin Ruse
@sorinr
Jun 22 2017 02:57
@JasonCorp84 your js code must be something like:
<a href=" +
              data[3][i] +
              " target='_blank'>"
Sorin Ruse
@sorinr
Jun 22 2017 03:02
@JasonCorp84 try also to move all your inline css to the css part in codepen. this way you'll have all styling in one place
kalzimonium
@kalzimonium
Jun 22 2017 03:27
hello everyone
I would like some help, please.
how do i change the font color in my nav here? https://codepen.io/kalzimonium/pen/EXXWEm
anyone?
Sunny Wong
@swong194
Jun 22 2017 03:32
@kalzimonium set ur anchor color
@kalzimonium there are many ways to do it, im not sure how the rest of ur site will go, but u can do something like..... li>a {color:white;}
kalzimonium
@kalzimonium
Jun 22 2017 03:40
@swong194 I don't get it
@swong194 ok got it. thanks
CamperBot
@camperbot
Jun 22 2017 03:43
kalzimonium sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @swong194 |http://www.freecodecamp.com/swong194
Csaba Balogh
@JasonCorp84
Jun 22 2017 04:03
@sorinr thank you!
CamperBot
@camperbot
Jun 22 2017 04:03
jasoncorp84 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1302 | @sorinr |http://www.freecodecamp.com/sorinr
help my message text doesnt appear in the top left hand coner but instead it appears in the middle
Bill Hefty
@bhefty
Jun 22 2017 04:20
@Botenga Which text in particular? From what section?
Botenga
@Botenga
Jun 22 2017 04:20
@bhefty the message text box
Bill Hefty
@bhefty
Jun 22 2017 04:21
Oh, the form. Gotcha. Let me take a look
Ken Haduch
@khaduch
Jun 22 2017 04:25
@Botenga = I think that you want to use a <textarea> element for that message area, instead of an input - textarea gives multiple lines, you specify with <textarea rows="5" cols="50"></textarea> that would probably work better.
Rashaun Ellison
@rellison27
Jun 22 2017 04:27
Hey Guys, I'm having some issues. My code in the JSHint says my functions shouldn't be in loops but I don't know what to do. Can someone help? The issues are on line 29 & 35 https://github.com/rellison27/Neighborhood-Map/blob/master/js/map.js
Botenga
@Botenga
Jun 22 2017 04:30
@khaduch so <textare rows="50" cols="50">message</textarea>
also I would not pit this in the form
Ken Haduch
@khaduch
Jun 22 2017 04:31
@Botenga - it should be part of the form - it is a form element. is that your question?
@rellison27 - I think that you could just define the functions outside of the loop, and just call them in the places where you are currently defining them?
Bill Hefty
@bhefty
Jun 22 2017 04:33
@Botenga Sorry my internet crapped out on me before I could get back to you. Yeah, it should be a <textarea></textarea> tag. Maybe look into the how the Bootstrap documentation shows this since you already have Bootstrap loaded? http://getbootstrap.com/css/#forms
Rashaun Ellison
@rellison27
Jun 22 2017 04:35
@khaduch is it possible to get an example of what you mean by that?
@khaduch only because I feel that I already have the functions defined outside
Ken Haduch
@khaduch
Jun 22 2017 04:46

@rellison27 - well, you are defining callback functions inside the for loop code - like this:

for ( ... ) {
    // details omitted
          marker.addListener('click', function() {
            populateInfoWindow(this, infowindow);
        });
    // more stuff
} // end the for loop

What I'm suggesting is to try something like this:

function populateCallback(infoWindow){
    populateInfoWindow(this, infoWindow);
}

// then the for loop as above
for ( ... ) {
    // details omitted
          marker.addListener('click', populateCallback(infoWindow);
        });
    // more stuff
} // end the for loop

So the callback function is only defined once, but called any time you add a listener.
Not sure if it will work, but that's the idea I was shooting for

Rashaun Ellison
@rellison27
Jun 22 2017 04:52
oooh! @khaduch I'll try it out and let you know how it goes. thank you
CamperBot
@camperbot
Jun 22 2017 04:52
rellison27 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3026 | @khaduch |http://www.freecodecamp.com/khaduch
Botenga
@Botenga
Jun 22 2017 04:53
@khaduch @bhefty Thanks for the help.
CamperBot
@camperbot
Jun 22 2017 04:53
botenga sends brownie points to @khaduch and @bhefty :sparkles: :thumbsup: :sparkles:
:cookie: 371 | @bhefty |http://www.freecodecamp.com/bhefty
:star2: 3027 | @khaduch |http://www.freecodecamp.com/khaduch
Botenga
@Botenga
Jun 22 2017 04:53
there some cookies for the help lolz
Rashaun Ellison
@rellison27
Jun 22 2017 04:57
no, didn't work I'm getting this message in the console now map.js:46 Uncaught TypeError: Cannot read property 'marker' of undefined @khaduch
Abhijeet Singh
@abhijeetps
Jun 22 2017 04:57
Hello developers, I have developed this website http://iiitt.ac.in.
I need a help in this.
How to remove the horizontal scrollbar?
Anybody?
Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 04:58
@aps120797 It does not load in for me.
Abhijeet Singh
@abhijeetps
Jun 22 2017 04:58
Ohh. Sorry, Visit http://www.iiitt.ac.in
glitz20
@glitz20
Jun 22 2017 04:58
can anyone help me in making image cover the full width? https://codepen.io/sabin20/pen/GEENVj
Abhijeet Singh
@abhijeetps
Jun 22 2017 04:59
Hello developers, I have developed this website http://www.iiitt.ac.in.
I need a help in this.
How to remove the horizontal scrollbar?
Anybody?
Varun Pandey
@varun30300
Jun 22 2017 05:01

hey guys , this is the code i wrote for the background to be grey

body{background-color:grey;}

but i dont want all of it to be grey i want a some width in the left end and the right end to be white , how can i do it ?

Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 05:01
@sabin20
#coverphoto{
  margin-top: 70px;
  width: 100vw;
  position: relative;
  left: -15px;
}
@varun30300 Would you like to add content to the white background spaces? (later)
Varun Pandey
@varun30300
Jun 22 2017 05:02
@ivancsicsmarkus no
i mean maybe , i'm not sure
Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 05:03
@varun30300 ?
@varun30300 It works.
@aps120797
body {
    width: 100vw;
    overflow: hidden;
}
glitz20
@glitz20
Jun 22 2017 05:05
@ivancsicsmarkus how can I make it fit exactly in the screen?
Abhijeet Singh
@abhijeetps
Jun 22 2017 05:05
@ivancsicsmarkus Not working, already tried that.
Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 05:07
@aps120797
html {
    width: 100vw;
    overflow: hidden;
}
Gulsvi
@gulsvi
Jun 22 2017 05:07
@sprint68 Sorry, stepped away. You can use .animate() to animate almost any CSS effect. There's also the animate.css library that has a lot of nice effects: https://daneden.github.io/animate.css/
glitz20
@glitz20
Jun 22 2017 05:09
@ivancsicsmarkus @varun30300 it didnot work any other solutions?
Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 05:10

@sabin20

<title>sapktoasabin</title>
<div class="container-fluid text-center">
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
 <div class="navbar-header">
   <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
     <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span> 
   </button>
   <a id="navbar-brand" href="#about" style="text-decoration:none">sabinsapkota</a>
   </div>
    <div class="collapse navbar-collapse" id="myNavbar">
     <ul class="nav navbar-nav navbar-right" id="text">
       <li><a href="#about">ABOUT</a></li>
       <li><a href="#qualities">QUALITIES</a></li>
       <li><a href="#resume">RESUME</a></li>
       <li><a href="#contact">CONTACT</a></li>
      </ul>
    </div>
    </div>
  </nav>
</div>      
<div class="headline">

  </div>

css:

.headline{
  margin-top:50px;
  width: 100%;
  background-image: url(http://imagizer.imageshack.us/a/img922/1553/8yK7AY.jpg);
  background-repeat: no-repeat;
  min-height: 186px;
}
Varun Pandey
@varun30300
Jun 22 2017 05:12
glitz20
@glitz20
Jun 22 2017 05:13
@ivancsicsmarkus the solution doesnot cover the full screen
Markus Ivancsics
@ivancsicsmarkus
Jun 22 2017 05:20
:D
@sabin20 :D
Screen Shot 2017-06-22 at 7.20.47.png
@sabin20 Doesn’t it?
glitz20
@glitz20
Jun 22 2017 05:29
@ivancsicsmarkus thanks it does
CamperBot
@camperbot
Jun 22 2017 05:29
sabin20 sends brownie points to @ivancsicsmarkus :sparkles: :thumbsup: :sparkles:
:cookie: 634 | @ivancsicsmarkus |http://www.freecodecamp.com/ivancsicsmarkus
Azam Abidjanov
@Azamabidjanov
Jun 22 2017 05:55
Hi everyone! I am new to FCC and recently finished my first project about Tribute Page. I wanted to ask for feedback, specifically about the scaling of elements and how to make them adjust for different screen sizes. Thanks in advance!
https://codepen.io/azamab/pen/EXXmpd
Vincent Yan
@envincebal
Jun 22 2017 05:57
Hey guys, I'm on the Pomodoro Clock and I'm stuck. I'm trying to change the status text content between "break" and "session" depending on the countdown state. But I can't get the text content to change. I tried to set them on lines 90 and 66 on the JS. Any helped would be appreciated.
Varun Pandey
@varun30300
Jun 22 2017 05:59

hey guys whenever i am trying to leave a margin , a huge space is created in between text , plz help

https://codepen.io/varun30300/pen/mwwbKe

Azam Abidjanov
@Azamabidjanov
Jun 22 2017 06:07
@varun30300
When you specify the margin, you enter 4 values in order for top, right, bottom, and left. If you want to add 150px margin from left, rewrite your margins as: 0 0 0 150px;
Abhijeet Singh
@abhijeetps
Jun 22 2017 06:18
I have a doubt.
If I have built a full stack website by using technologies of FCC, and I can build many more.
But I don't have certificate of Full Stack Dev.
Can I call myself Full Stack Web Developer?
CallMeOrange
@EgnaroDev
Jun 22 2017 06:43
@SkyC0der :wave:
Samuel Way
@SWbottier
Jun 22 2017 06:49
Hi
Anyone on the Challenge : "Build a Random Quote Machine Incomplete " ??
bitcoinabdi
@bitcoinabdi
Jun 22 2017 06:56
heloo
Anyone home ?
Ir1dXD
@Ir1d
Jun 22 2017 07:22
Hi! I've got a question on Show the Local Weather
When I try to getJson from the API, I get error from the console:
 No 'Access-Control-Allow-Origin' header is present on the requested resource.
shivam gupta
@shivamg11000
Jun 22 2017 07:22
@Ir1d use callback
?callback=?
at the end of your url
Ir1dXD
@Ir1d
Jun 22 2017 07:25
sorry I dont quite understand
What should I write in the callback?
@shivamg11000
Marius Nicolae
@bytao7mao
Jun 22 2017 07:28
@aps120797 do you need a certificate to call yourself human ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:30
lol
Ir1dXD
@Ir1d
Jun 22 2017 07:30
@shivamg11000 Thx. Now I understand.XD
CamperBot
@camperbot
Jun 22 2017 07:30
ir1d sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
CallMeOrange
@EgnaroDev
Jun 22 2017 07:30
We are "Certificate" to call ourselves human
Marius Nicolae
@bytao7mao
Jun 22 2017 07:31
;DDD
CallMeOrange
@EgnaroDev
Jun 22 2017 07:31
Man now Im working on golf code
I guess I will work on it tomorrow
Marius Nicolae
@bytao7mao
Jun 22 2017 07:32
what is golf code
CallMeOrange
@EgnaroDev
Jun 22 2017 07:32
Well you will find out in JS
Marius Nicolae
@bytao7mao
Jun 22 2017 07:32
oh ok
it takes you a lot of hours to finish it ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:33
Nah... that depends..
Marius Nicolae
@bytao7mao
Jun 22 2017 07:34
or are you certificated a lazy human ?
;DDD
CallMeOrange
@EgnaroDev
Jun 22 2017 07:34
Last time I did it it was hard
lol
Marius Nicolae
@bytao7mao
Jun 22 2017 07:34
i'm just kidding
CallMeOrange
@EgnaroDev
Jun 22 2017 07:35
Hm I think this code is going to be easier than I thought
Marius Nicolae
@bytao7mao
Jun 22 2017 07:37
good, i know a little about algorithms , now i have a question, before learning js, does somebody know if algorithms are a must ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:38
Good question...
I think you learn JS to make algorithms
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:39
@bytao7mao If you want to be a developer it is a must. If you do not like it do not do it though
Marius Nicolae
@bytao7mao
Jun 22 2017 07:39
i like it, but it is hard to understand some methods
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:40
sure it is
Marius Nicolae
@bytao7mao
Jun 22 2017 07:40
but i think that i will force myself to learn it, thanks for opinion @JasonCorp84
CamperBot
@camperbot
Jun 22 2017 07:40
bytao7mao sends brownie points to @jasoncorp84 :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @jasoncorp84 |http://www.freecodecamp.com/jasoncorp84
CallMeOrange
@EgnaroDev
Jun 22 2017 07:40
Yeah of course I even had to relearn like 3 times
But this time will be easier
Just practice
Marius Nicolae
@bytao7mao
Jun 22 2017 07:41
i've done some algorithms in faculty but not enough to say that i know all methods
@MCTwoDigitZero yeah man you can do it ! :D
CallMeOrange
@EgnaroDev
Jun 22 2017 07:43
@JasonCorp84 have you do golf code?
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:45
@MCTwoDigitZero nope. What is that ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:45
A code in JS
for golf
think you will be able to help?
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:46

well, I am here :

Intermediate Algorithm Scripting[1]

so it depends on, but I will give it a try
CallMeOrange
@EgnaroDev
Jun 22 2017 07:46
Alright

function golfScore(par, strokes) {

  if (strokes <= 1) {
    return "Hole-in-one!";
  } else if (par - 2) {
    return "Eagle";
  } else if (par - 1) {
    return "Birdie";
  } else if (par) {
    return "Par";
  } else if (par + 1) {
    return "Bogey";
  } else if (par + 2) {
    return "Double Bogey";
  } else {
  return "Go Home";
  }

}

golfScore(4, 3);
Only Hole-in-one and Eagle work
hold on.. fCC said order it highest to lowest
Lemme fix it quickly
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:49
before you fix anything
musa1992
@musa1992
Jun 22 2017 07:49
Hi guys here's is my first code camp challenge(tribute page) https://codepen.io/musa1992/pen/KqmzoQ am trying to add a banner image but I have been unable to. also any positive criticism on the project is welcomed
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:49
I miss your = signs
CallMeOrange
@EgnaroDev
Jun 22 2017 07:50
All of it?
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:50
if (evaluation is true) then { this will happen;}
so
if (i ==2) <-- if this is true { then something happens here}
(par - 1)
is it true or false ?
it is not true or false, it is not a statment
CallMeOrange
@EgnaroDev
Jun 22 2017 07:53
I see so I need = sign
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:53
= is an assignment
if you say i = 2 it means i's value will be 2
CallMeOrange
@EgnaroDev
Jun 22 2017 07:53
Yea
Like this?
  if (strokes <= 1) {
    return "Hole-in-one!";
  } else if (par <= par + 3) {
    return "Go Home!";
  } else if (par == par + 2) {
    return "Double Bogey";
  } else if (par == par + 1) {
    return "Bogey";
  } else if (par == par) {
    return "Par";
  } else if (par == par - 1) {
    return "Birdie";
  } else if (par <= par - 2) {
    return "Eagle"; 
  }
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:54
if you want to compare 2 numbers you will need to use ==
CallMeOrange
@EgnaroDev
Jun 22 2017 07:54
Hold on forgot something
back just missed something
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:55
``` if (strokes <= 1)
  if (strokes <= 1)
how can you have a par with 0 shot?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:56
oh..
Sorry I dont know much about golf
Changed <= to ==
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:57
there is a description about par
amanar06
@amanar06
Jun 22 2017 07:57
what is the use of banner class
CallMeOrange
@EgnaroDev
Jun 22 2017 07:57
Yeah par is like the average of strokes
I actually know a little but not much
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:58
is it working now ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:58
Not all of them
amanar06
@amanar06
Jun 22 2017 07:58
anyone help me
Csaba Balogh
@JasonCorp84
Jun 22 2017 07:58
which one isn't ?
CallMeOrange
@EgnaroDev
Jun 22 2017 07:59
Eagle, Birdie, Bogey, double bogey and Go home
:/
I think Im supposed to use something else instead of ==
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:00
is it in the right order ?
else if (par <= par + 3) {
    return "Go Home!";
this means it took you 3 more shots then the average
CallMeOrange
@EgnaroDev
Jun 22 2017 08:01
I already changed that
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:01
and still this code is right after the best scenario. Are you sure that it is in the right order?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:01
Well I wrote else statement instead
I will make sure if its ordered highest to lowest
Hold on
Not sure if par<= par + 3 is lowest or highest..
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:05
what do you mean by highest ?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:06
Challenge said to write code by highest to lowest
These else/if statements
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:07
"Return the correct string according to this table which lists the strokes in order of priority; top (highest) to bottom (lowest):"
CallMeOrange
@EgnaroDev
Jun 22 2017 08:07
No matter how I move the order, nothing change..
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:07
accordint to the table
CallMeOrange
@EgnaroDev
Jun 22 2017 08:08
It must be ordered like the table?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:08
yes
CallMeOrange
@EgnaroDev
Jun 22 2017 08:08
Oh.
I ordered it according to the table and things are still the same
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:11
if (time < 10) {
    greeting = "Good morning";
} else if (time < 20) {
    greeting = "Good day";
} else {
    greeting = "Good evening";
}
where is your else statement ?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:12
Never mind I got Eagle and Birdie working
@JasonCorp84 "Good evening"
Last statement
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:12
in your code
CallMeOrange
@EgnaroDev
Jun 22 2017 08:12
the Go Home one?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:12
yes
CallMeOrange
@EgnaroDev
Jun 22 2017 08:13
Ok changed it to else statement
So no parameter?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:13
if (condition1) {
    block of code to be executed if condition1 is true
} else if (condition2) {
    block of code to be executed if the condition1 is false and condition2 is true
} else {
    block of code to be executed if the condition1 is false and condition2 is false
}
nope
CallMeOrange
@EgnaroDev
Jun 22 2017 08:13
if (strokes == 1) {
    return "Hole-in-one!";  
  } else if (strokes <= par - 2) {
    return "Eagle";
  } else if (strokes == par -1) {
    return "Birdie";
  } else if (par == par) {
    return "Par";
  } else if (par == par + 1) {
    return "Bogey";
  } else if (par == par+2) {
    return "Double Bogey";
  } else {
    return "Go Home!";
  }
alright Im close
Need to fix last 3 statements
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:14
:D
CallMeOrange
@EgnaroDev
Jun 22 2017 08:14
But why is last statement not working?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:14
look for the difference
in the condition
(par == par+2) VS (strokes <= par - 2)
CallMeOrange
@EgnaroDev
Jun 22 2017 08:15
strokes and par?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:15
yes
CallMeOrange
@EgnaroDev
Jun 22 2017 08:16
But what it does has to do with else statement?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:16
just fiz those first
CallMeOrange
@EgnaroDev
Jun 22 2017 08:18
Above else statement?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:18
since par == par is always true, you will never have a false statement
CallMeOrange
@EgnaroDev
Jun 22 2017 08:18
Hm..
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:18
so you will never go to the else statement
CallMeOrange
@EgnaroDev
Jun 22 2017 08:18
what if par == par + 1?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:19
you never go there
replace par with strokes..
on the left side
CallMeOrange
@EgnaroDev
Jun 22 2017 08:19
I tried
yeah
I think the problem is the sign
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:20
 } else if (par == par + 1) {
    return "Bogey";
this should be
 } else if (strokes == par + 1) {
    return "Bogey";
CallMeOrange
@EgnaroDev
Jun 22 2017 08:21
Both didnt work
I already tried strokes :/
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:21
it does work
CallMeOrange
@EgnaroDev
Jun 22 2017 08:22
well then I will just leave it strokes then
I think the problem is else if (par)
Because the parameter (4,5) is supposed to get Bogey not Par
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:23
?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:23
...
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:24
that supposed to get Birdey
CallMeOrange
@EgnaroDev
Jun 22 2017 08:24
with this golfScore(4, 5); I ran the test it got Par not Bogey
Why Birdie?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:24
Birdie*
ahh 4,5 ok
CallMeOrange
@EgnaroDev
Jun 22 2017 08:24
Birdie is 4,3
oh
So I guess the problem is Par
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:26
par?
you compare strokes to par
CallMeOrange
@EgnaroDev
Jun 22 2017 08:26
Why would I get Par instead of Bogey with 4.5
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:26
} else if (par == par) {
    return "Par";
CallMeOrange
@EgnaroDev
Jun 22 2017 08:26
I just tested just now, all with bogey, double bogey, and go home get Par instead
That why they didnt work
Yea That what I have
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:27
replace par to strokes...
everywhere
CallMeOrange
@EgnaroDev
Jun 22 2017 08:27
oh....
@JasonCorp84 thanks :/
CamperBot
@camperbot
Jun 22 2017 08:27
mctwodigitzero sends brownie points to @jasoncorp84 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @jasoncorp84 |http://www.freecodecamp.com/jasoncorp84
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:27
works now ? :)
CallMeOrange
@EgnaroDev
Jun 22 2017 08:28
Yeah
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:28
nice
gl
CallMeOrange
@EgnaroDev
Jun 22 2017 08:28
I should learn gold to understand how they work from this algs
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:28
compare 1 to 2 = (1==2)
CallMeOrange
@EgnaroDev
Jun 22 2017 08:29
@JasonCorp84 I completed this before but old me actually looked up
I see
I have a question
if I had a bunch of else if then what if I didnt have else statement at last?
Would last else if statement work?
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:31
test it
do your experiment
good night
CallMeOrange
@EgnaroDev
Jun 22 2017 08:31
Night
Csaba Balogh
@JasonCorp84
Jun 22 2017 08:31
but... by the way
what if the number is par + 1236
do you want to write 1236 else if statement ?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:32
So you write par >= 1000 instead?
Dunno if this work with golf code..
To answer your question, no I do not :/
Unless I want to improve my typing skills
@JasonCorp84 Oh I understand your question now
You just need else statement instead of writing a lot of other else if statements
Well have a nice day
Calin Seredenco
@Noit0ra
Jun 22 2017 08:53
good day all, does anyone know how to turn off https ?
CallMeOrange
@EgnaroDev
Jun 22 2017 08:56
In codepen? just delete s from https lol
Marius Nicolae
@bytao7mao
Jun 22 2017 08:57
haha
CallMeOrange
@EgnaroDev
Jun 22 2017 08:58
Its no joke :/
Calin Seredenco
@Noit0ra
Jun 22 2017 08:58
@MCTwoDigitZero very smart but it's not working "LOL"
CallMeOrange
@EgnaroDev
Jun 22 2017 08:58
really? I did it before
Marius Nicolae
@bytao7mao
Jun 22 2017 08:58
ahahahahahaha
CallMeOrange
@EgnaroDev
Jun 22 2017 08:59
Looks like they added a update..
Sorry I dont know anything besides that :/
h1tag
@h1tag
Jun 22 2017 08:59
@Noit0ra codepen now forces https
CallMeOrange
@EgnaroDev
Jun 22 2017 08:59
Ueaj
Yeah
Marius Nicolae
@bytao7mao
Jun 22 2017 08:59
from what i knew codepen it's only https
Calin Seredenco
@Noit0ra
Jun 22 2017 09:00
it's only https now, so there is a way to turn it off?
h1tag
@h1tag
Jun 22 2017 09:00
@Noit0ra I don't think so
CallMeOrange
@EgnaroDev
Jun 22 2017 09:01
@Noit0ra Why do you want to turn it off?
Is this because of API's?
Calin Seredenco
@Noit0ra
Jun 22 2017 09:01
@MCTwoDigitZero yes
CallMeOrange
@EgnaroDev
Jun 22 2017 09:02
@Noit0ra well sorry you have no choice but to change API's to https
Calin Seredenco
@Noit0ra
Jun 22 2017 09:03
thx
amanar06
@amanar06
Jun 22 2017 09:26
what is span used for?
Marius Nicolae
@bytao7mao
Jun 22 2017 09:38
from what i know is used to style parts from text
specific parts
niprobin
@niprobin
Jun 22 2017 09:58
Hey guys, I would like to list articles on a webpage and I want to display the article title and first lines automatically on the webpage instead of writing it in my HTML by myself. Since I am still a beginner in JS I just wanted to know where to look at to find info about this (and if it's possible only with front-end tools) thanks a lot :)
Zhu Wei
@zhuwei12
Jun 22 2017 10:21
https://codepen.io/Shallwe/pen/bRRRga anyone can help?I want to move the words which is in the bottom of the contact part to the right side?How can I do it without using the position?
Ben said
@BenSaidRachid
Jun 22 2017 10:48
hi all,why does my function loop() not working?it's working in the function start but not in the function clicked()
TWoerner94
@TWoerner94
Jun 22 2017 11:06
Hey hows it going guys, I have a small problem with my Javascript Calculator. I want to program it so that after displaying the result of the calculation, you can press any button to reset it and start a new calculation without having to press AC
The last if-loop (line 36 to 40) is my attempt at doing that but it's not working
Stephen James
@sjames1958gm
Jun 22 2017 11:48
@TWoerner94 When the if evEq code runs (once at start) it is undefined so the click handler is never registered.
That if check never happens again. Perhaps when you set evEq to not undefined you set the click handler
Matthias Lang
@MatLang
Jun 22 2017 12:01
Hi, can someone please help me center my wikipedia search engine vertically? I tried using flexbox but couldn't get the job done. Thanks. https://codepen.io/ltcMatt/full/pwwWjR/
@zhuwei12 try using flexbos. This should help: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Eric Weiss
@eweiss17
Jun 22 2017 12:29
@MatLang looks okay, what is wrong?
Ali Abbas
@Abbas-000
Jun 22 2017 12:50
Hi, can anyone help me with random quote machine here is my pen link
Eric Weiss
@eweiss17
Jun 22 2017 12:54
@Abbas-000 what about it...
Ali Abbas
@Abbas-000
Jun 22 2017 12:55
Only twitter button is working not others
How get others to work?
Eric Weiss
@eweiss17
Jun 22 2017 12:55
you don't have any code for the other buttons...?
function postQuoteT() {
  window.open("https://twitter.com/intent/tweet?text=" + document.getElementById('quote').textContent+"#quotes");
}
Ali Abbas
@Abbas-000
Jun 22 2017 12:56
I don't know how to post on other sites
Eric Weiss
@eweiss17
Jun 22 2017 12:56
well it's not required so neither do i
you need to look at their sites, i'm sure they display information about how to do it
Ali Abbas
@Abbas-000
Jun 22 2017 12:57
I looked at Facebook's developers page I didn't understand.
Eric Weiss
@eweiss17
Jun 22 2017 12:58
The other 2 aren't required for the project. It is possible they didn't require those because they are more difficult, you can just add an alert that says "coming soon" or something
Ali Abbas
@Abbas-000
Jun 22 2017 13:00
But it won't look good with only one social site don't you think
Eric Weiss
@eweiss17
Jun 22 2017 13:01
Like I said, you can leave them but add a Coming Soon message when you click them
Ali Abbas
@Abbas-000
Jun 22 2017 13:01
OK
Did you complete this challenge?
Eric Weiss
@eweiss17
Jun 22 2017 13:02
yes, but i only used twitter
Ali Abbas
@Abbas-000
Jun 22 2017 13:03
Yes that wasn't difficult.
Eric Weiss
@eweiss17
Jun 22 2017 13:06
you can try asking about the facebook and pintrest later when more people are on this chatroom, maybe somebody else did them and can help
but the "Coming Soon" message isn't a bad idea in the meantime, sites do that to show off potential new features ahead of time
Ali Abbas
@Abbas-000
Jun 22 2017 13:08
Yeah you are right.
Josh Daniell
@joshdaniell
Jun 22 2017 13:11
Hi everyone, rookie question here. I've been doing the Random Quote Generator project but have been stuck for a long time. The content just doesn't seem to be pulling through from the API. Can anyone spot where I'm going wrong? https://codepen.io/joshdaniell/pen/gRWJOY?editors=1111
h1tag
@h1tag
Jun 22 2017 13:14
@joshdaniell if you check the browser console, you'll find an error
Matthias Lang
@MatLang
Jun 22 2017 13:16
@eweiss17 Please open on codepen to see what the issue is. Before the result is shown, I want to center my content vertically.
@joshdaniell don't worry, a lot of people are having this issue in the beginning. Just check your console for the "http/s" issue. You're almost there.
TWoerner94
@TWoerner94
Jun 22 2017 13:20
Hey guys, I basically finished the calculator challenge but there is one, small cosmetic improvement I'd like to make. Does anyone have any idea how I can prevent long numbers from extending beyond the calculator "screen"?
This is my code
Josh Daniell
@joshdaniell
Jun 22 2017 13:24
@MatLang @h1tag Thank you so much. I was looking at the console on CodePen and for some reason there was no content in there. But with Chrome console it was very clear. So glad I didn't spend more hours mucking round on this. Appreciate your help!
CamperBot
@camperbot
Jun 22 2017 13:24
joshdaniell sends brownie points to @matlang and @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 864 | @h1tag |http://www.freecodecamp.com/h1tag
:cookie: 267 | @matlang |http://www.freecodecamp.com/matlang
Eric Weiss
@eweiss17
Jun 22 2017 13:24
@MatLang can you just like, move it from the top? say 45%?
Matthias Lang
@MatLang
Jun 22 2017 13:24
@eweiss17 well I could, but I want to move the content to the top once the API request is made.
Eric Weiss
@eweiss17
Jun 22 2017 13:25
so transition?
doridarien
@doridarien
Jun 22 2017 13:25
Hi guys I've just completed Build wiki viewer however, if I click back button to go back to my page, ajax data are gone, Can someone show me how to save data received from ajax request to browser local or sessionStorage and bind once back button is clicked..so it returns to the last searched page?
https://codepen.io/doridarien/pen/ZyyRaa
h1tag
@h1tag
Jun 22 2017 13:26
@joshdaniell the Codepen console doesn't show the errors
Matthias Lang
@MatLang
Jun 22 2017 13:27
@eweiss17 that would be possible, but I hoped there's a more elegant solution for this.
@eweiss17 will try though. thx :)
CamperBot
@camperbot
Jun 22 2017 13:27
matlang sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 487 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 22 2017 13:27
I don't understand what you want
content in middle
make api call
goes to top
that sounds like a transition
h1tag
@h1tag
Jun 22 2017 13:27
@doridarien I think you need back-end knowledge (running a database)
@TWoerner94 you can specify a length for max number the characters allowed on the screen
Matthias Lang
@MatLang
Jun 22 2017 13:28
@eweiss17 haven't worked with transitions before, so will have to read about them first.
TWoerner94
@TWoerner94
Jun 22 2017 13:29
How do I do that @h1tag?
I tried to set a max-width for the p field in CSS but that just causes it to overextend in the other direction lmao
Josh Daniell
@joshdaniell
Jun 22 2017 13:29
@h1tag Why doesn't it show errors? What do people use Codepen console for?
h1tag
@h1tag
Jun 22 2017 13:30
@TWoerner94 make a function that tests for the length of the characters
teevik
@teevik
Jun 22 2017 13:30
Hey, is this kind of layout for an calculator ok? Was thinking about removing the backspace button and giving the AC button more space, but this would give the calculator less functionality
Matthias Lang
@MatLang
Jun 22 2017 13:30
@eweiss17 Could you please give me an example of how I could implement this? Would really appreciate it.
teevik
@teevik
Jun 22 2017 13:31
image.png
Eric Weiss
@eweiss17
Jun 22 2017 13:31
Have all your content in a div
h1tag
@h1tag
Jun 22 2017 13:31
@joshdaniell IDK why. I think they use it for logging output. But I personally don't use it, the browser one has way more functionality and shows everything
TWoerner94
@TWoerner94
Jun 22 2017 13:31
And then @h1tag? I dont want it to throw an error or anything, i want the number to kind of scroll along the screen
EpicTriffid
@EpicTriffid
Jun 22 2017 13:32
Hi all, so I've just gotten to the "Build a Random Quote Machine" exercise, and I'm wondering where I start with it all?
Metin
@harmanlanmis
Jun 22 2017 13:32
Hi everyone! I have a question about the challenge "build a tribute page". I cannot caption the image as he did in the sample. I tried to use this code <div class="thumbnail">
<center><img src="http://i.huffpost.com/gen/1318605/thumbs/o-BORED-ELON-MUSK-facebook.jpg" alt="A picture of Elon Musk" class="img-responsive img-thumbnail" align="middle" id="elon-pic-vol1"></center>
<div class="caption">
<p class="text-center">Elon Reeve Musk (born June 28, 1971) is a South African-born Canadian-American business magnate, engineer, and investor.</p>
</div>
</div>
But they are still separate, can anyone help me with that?
Eric Weiss
@eweiss17
Jun 22 2017 13:34
@MatLang this actually looks more like what you want, a transform
Translate() method
h1tag
@h1tag
Jun 22 2017 13:34
@TWoerner94 Sorry, ignore my advice, I thought that was how I did it. I just discovered that I didn't account for this case in my project. But that's the way that I thought of doing it when I was building mine
TWoerner94
@TWoerner94
Jun 22 2017 13:35
I've been thinking about not making it scroll, but just not allowing any more input after 16 characters or so
andoreilly
@andoreilly
Jun 22 2017 13:35
<div class="logo">
<head> <p id="title"> The Old Oak </p>
</head>
<body>
<img src="https://i.imgur.com/MdRSuGB.jpg" id="harp-photo" alt="harp">
</div>
TWoerner94
@TWoerner94
Jun 22 2017 13:35
I've looked at some other online calculators and some of them seem to do the same thing
Matthias Lang
@MatLang
Jun 22 2017 13:35
alright, will check that out, thx.
andoreilly
@andoreilly
Jun 22 2017 13:35

title {

 margin-top: 30px;   
font-size: 6.5em;
color: black;
padding-left: 37%;

/ background-color: green; /
}

harp-photo {

box-sizing: default; 
margin: 0% 48%;
padding-top: 5px;

}

.logo {

  border: 3px rgb(86, 10, 10) solid;
  padding: 9px;
TWoerner94
@TWoerner94
Jun 22 2017 13:36
Just now I tried a while loop and crashed my browser lmao worth the risk though, it could have worked
andoreilly
@andoreilly
Jun 22 2017 13:36
can anyone tell me how i could move the harp-photo up closer towards the title?
h1tag
@h1tag
Jun 22 2017 13:36
@TWoerner94 lol
Eric Weiss
@eweiss17
Jun 22 2017 13:37
@andoreilly position: relative;
h1tag
@h1tag
Jun 22 2017 13:37
@EpicTriffid make the design using wireframes or on paper
Eric Weiss
@eweiss17
Jun 22 2017 13:37
then you can move how you want, such as, bottom: 5px, or whatev
andoreilly
@andoreilly
Jun 22 2017 13:38
thank you eric weiss!!!
sorry @eweiss17 thank you
CamperBot
@camperbot
Jun 22 2017 13:38
andoreilly sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 488 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 22 2017 13:40
@MatLang there is also BS animate, http://api.jquery.com/animate/ , gotta just experiment with what you want
h1tag
@h1tag
Jun 22 2017 13:40
@TWoerner94 maybe you can store the input in a var and after a certain limit you input 3 dots to the screen and keep storing the input in that variable after that
Josh Daniell
@joshdaniell
Jun 22 2017 13:41
Has anyone got a nice, simple modification to make the whole quote box centered? Using Bootstrap 3. https://codepen.io/joshdaniell/pen/gRWJOY?editors=1111
TWoerner94
@TWoerner94
Jun 22 2017 13:42
@h1tag I am storing the entire input in an eq already so I could try that out
In an array* sorry the name of the array is eq lol
teevik
@teevik
Jun 22 2017 13:45
@joshdaniell If you are using flexbox, you can just set justify-content: center; align-items: center; on the parent
Probably some way to do it directly in bootstrap too
TWoerner94
@TWoerner94
Jun 22 2017 13:47
@h1tag I actually feel dumb right now
I spent hours on this and a simple "overflow: hidden" in CSS solved it lmao
I don't know if I should laugh or cry
h1tag
@h1tag
Jun 22 2017 13:48
Haha
denizenofcode
@denizenofcode
Jun 22 2017 14:04
Hello, why isn’t my image resizing even though I gave it a CSS class with size constraints?
Eric Weiss
@eweiss17
Jun 22 2017 14:12
@denizenofcode you have errors in your css
for one, you have classes that do not lead with a . , those are being ignored
Eric Weiss
@eweiss17
Jun 22 2017 14:15
you included jquery, but you did vanilla JS here,
  document.getElementById("result1").appendChild(img);
utkarsh kulshrestha
@ukulsh
Jun 22 2017 14:15
what should i do to make it good
anyone??
reply
denizenofcode
@denizenofcode
Jun 22 2017 14:20
@eweiss17 thanks. I wasn’t aware that I couldn’t mix JS and jquery
CamperBot
@camperbot
Jun 22 2017 14:20
denizenofcode sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 489 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 22 2017 14:20
@denizenofcode ditch the height and width out of the frame class
and they won't be shoved into the left
utkarsh kulshrestha
@ukulsh
Jun 22 2017 14:20
for me
Eric Weiss
@eweiss17
Jun 22 2017 14:20
@denizenofcode You can..... It's just you included JQuery and didn't use it. IMO JQuery is far more readable and easier
denizenofcode
@denizenofcode
Jun 22 2017 14:21
ah, I’m still clueless about which functions belong to JQ
I’ll have to look at the docs
Eric Weiss
@eweiss17
Jun 22 2017 14:21
see that document.whatever.whatever
$(".class") is pretty much that
denizenofcode
@denizenofcode
Jun 22 2017 14:21
ohhh
I see
Eric Weiss
@eweiss17
Jun 22 2017 14:21
document.getElementById("result1")
$("#result1")
denizenofcode
@denizenofcode
Jun 22 2017 14:21
wow that’s a lot easier
Eric Weiss
@eweiss17
Jun 22 2017 14:22
see how much cleaner that is
denizenofcode
@denizenofcode
Jun 22 2017 14:22
thanks you just saved me a lot of future work
yeah
Eric Weiss
@eweiss17
Jun 22 2017 14:22
jquery has real good documentation
just search Jquery and whatever and you will find it

here are maybe some useful ones,

$("#result1").addClass("yourClass");

adds a class

$("#result1").attr("href", "Google.com");
adds the attribute href, google.com
denizenofcode
@denizenofcode
Jun 22 2017 14:24
that’s a lot neater
Eric Weiss
@eweiss17
Jun 22 2017 14:24
$("#result1").css("color", "red");
changes color in css to read
red*
for your json calls you gonna want to use
$("#whereYouWantYourInfo").text(jsonInfo);
ya check out the documentation for those ones, i'v used them all in the past
denizenofcode
@denizenofcode
Jun 22 2017 14:27
Perfect. Thanks man.
utkarsh kulshrestha
@ukulsh
Jun 22 2017 14:29
can some one help me out
Nick Sladic
@Nickadiemus
Jun 22 2017 14:31
@ukulsh What do you need help with?
this
how do i improve i feel like something is missing
Nick Sladic
@Nickadiemus
Jun 22 2017 14:38
@ukulsh It looks pretty good. I would maybe suggest centering the image so it flows with the rest of the page
Ken Haduch
@khaduch
Jun 22 2017 14:46
@ukulsh - I think that centering the bulleted lists that way doesn't look good, because the normal styling for a bulleted list is to have all of the bullets lined up. And I agree with @Nickadiemus about centering the image. Your bulleted lists could be moved toward the center, and remain aligned in a column, using the Bootstrap grid, if you wanted to try and change it.
andoreilly
@andoreilly
Jun 22 2017 14:50
Hi guys can anyone tell me why my <img> have a background color? i dont have any background colors at all on my site
Ken Haduch
@khaduch
Jun 22 2017 14:51
@andoreilly - what's your site URL? Or at least some code?
Ghost
@ghost~56c733f2e610378809c24d2c
Jun 22 2017 14:52

@ukulsh also get in the habit of doing a return of your curly brackets for your code, this makes someone elses life easier if they have to run through your stylesheet.

.border {

}

Just a suggestion.

Ken Haduch
@khaduch
Jun 22 2017 14:55
@travisboss - good point - code formatting is helpful in many ways!
Nick Sladic
@Nickadiemus
Jun 22 2017 14:57
Also commenting
but more so in javascript
Ghost
@ghost~56c733f2e610378809c24d2c
Jun 22 2017 14:59
@andoreilly are they jags or pngs? pngs can have transparent backgrounds.
Rajat
@rajataudichya
Jun 22 2017 15:06
The output of my second set of code is 25 which was the challenge but I don't know how it predicted the (num) as 5 ?
// Example
function minusSeven(num) {
  return num - 7;
}

// Only change code below this line

function timesFive(num){
  return num*5;
}
Nick Sladic
@Nickadiemus
Jun 22 2017 15:07
@rajataudichya What do you mean?
@rajataudichya are you confused on how "num" is 5?
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:08
thanks @travisboss
CamperBot
@camperbot
Jun 22 2017 15:08
ukulsh sends brownie points to @travisboss :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @travisboss |http://www.freecodecamp.com/travisboss
Rajat
@rajataudichya
Jun 22 2017 15:09
In this particular challenge I wanted to get 25 as the output using return function . I know that 5*5=25 but can you tell me that how the computer predicted that the timesFive(num) is 5?
@ @Nickadiemus
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:10
@khaduch thank you i'll look up how to do that
CamperBot
@camperbot
Jun 22 2017 15:10
ukulsh sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3029 | @khaduch |http://www.freecodecamp.com/khaduch
Nick Sladic
@Nickadiemus
Jun 22 2017 15:10
@rajataudichya well it didn't predict it. In the most basic sense, it tied the input to the variable "num" so if you input
function timesFive(6){
return 6*5;
}
it will return 30. The num is just a placeholder basically
@rajataudichya does that make sense?

The name for the variable can be anything, it doesn't have to be "num"

function timesFive(bread){
return bread * 5;
}

the function above will still return the same thing as

function timesFive(num){
return num * 5;
}
Rajat
@rajataudichya
Jun 22 2017 15:13
@Nickadiemus ok but I haven't input any number , so the function was just (num) and it multiplied (num*5) and got 25 , so I believe that the (num) will any numerical value that you input afterwards?
Nick Sladic
@Nickadiemus
Jun 22 2017 15:14
@rajataudichya when you run the tests in FCC they put multiple inputs so you might have seen the last input the editor tested
Rajat
@rajataudichya
Jun 22 2017 15:15
@Nickadiemus yes now i got it thanks
CamperBot
@camperbot
Jun 22 2017 15:15
rajataudichya sends brownie points to @nickadiemus :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @nickadiemus |http://www.freecodecamp.com/nickadiemus
Nick Sladic
@Nickadiemus
Jun 22 2017 15:16
@rajataudichya no problem
denizenofcode
@denizenofcode
Jun 22 2017 15:18
@eweiss17 I’m converting it all to JQ now, any idea why my simulatedFetch object won’t pass into the loop?
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:18
i am a bit afraid to start portfolio
Eric Weiss
@eweiss17
Jun 22 2017 15:18
@denizenofcode i don't have your pen anymore
Nick Sladic
@Nickadiemus
Jun 22 2017 15:18
@ukulsh Don't be. It's a great learning experience
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:19
thanks @Nickadiemus but i feellike its a bit hard
CamperBot
@camperbot
Jun 22 2017 15:20
ukulsh sends brownie points to @nickadiemus :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @nickadiemus |http://www.freecodecamp.com/nickadiemus
denizenofcode
@denizenofcode
Jun 22 2017 15:20
cannot read property length of undefined
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:20
and i have to look at commands again and again
Rajat
@rajataudichya
Jun 22 2017 15:21
@ukulsh its not hard at all , just get your bootstrap knowledge right and it could be done withing hours, although mine took a day....
have alook
Nick Sladic
@Nickadiemus
Jun 22 2017 15:22
@ukulsh practicing is the only way to learn
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:22
thanks @rajataudichya do you have to look at the commands or you did that in one go
CamperBot
@camperbot
Jun 22 2017 15:22
ukulsh sends brownie points to @rajataudichya :sparkles: :thumbsup: :sparkles:
:cookie: 187 | @rajataudichya |http://www.freecodecamp.com/rajataudichya
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:23
@Nickadiemus i know but i have to look through the commands it feels like starting something without finishing previous one
Nick Sladic
@Nickadiemus
Jun 22 2017 15:24
@ukulsh and once you get better at it you can really dive deep into open source libraries and host your own personal site through a server with a custom domain
Rajat
@rajataudichya
Jun 22 2017 15:24
At first I tried to do everything myself and not use bootstrap but it was creating issues, but I started bootstrap and everything was in place
Nick Sladic
@Nickadiemus
Jun 22 2017 15:24
@ukulsh don't feel bad. I've been working on and off with my portfolio site and I just finished it the other day
it's been about 3 months on and off @ukulsh
Rajat
@rajataudichya
Jun 22 2017 15:25
@Nickadiemus my portfolio page is having a white background and I cannot edit it, do you know what could have happened?
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:25
thanks guys ill do it how much time it takes.
Rajat
@rajataudichya
Jun 22 2017 15:25
@Nickadiemus can you send me the link to your portfolio I want to see :)\
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:25
yes me too
Ghost
@ghost~56c733f2e610378809c24d2c
Jun 22 2017 15:27
for those who are wanting to get in to this industry. its not as bad as you might think. i am a web designer and with my training and the internet to search on things are not that hard. also we do not have tight deadlines where i am. i have weeks to do something versus days or hours.
Nick Sladic
@Nickadiemus
Jun 22 2017 15:27
just click on my profile icon and it's listed there @rajataudichya @ukulsh
Aniket
@Aniket1994
Jun 22 2017 15:27

can anyone tell me what am i doing wrong here? the buttons on the top aren't appearing for about social portfolio etc. <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<!-- Navigation bar-->

<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="button-block navbar-togglescollapsed"data-toggle="collapse"data-target="#mynavbar>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">A.S.A</a>
</div>
<div class="collapse-navbar collapse" id="#mynavbar">
<ul class="nav navbar-nav">
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Social</a></li>
</ul>
</div>
</div>
</nav>

utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:27
@rajataudichya awesome portfolio
Eric Weiss
@eweiss17
Jun 22 2017 15:28
oh sorrys i was working on other work, what is the problem again
denizenofcode
@denizenofcode
Jun 22 2017 15:28
@eweiss17 my simulatedFetch array won’t pass into my for loop
"Cannot read property 'length' of undefined"
It’s no problem, you’re a huge help
When I know more I want to help people out too
utkarsh kulshrestha
@ukulsh
Jun 22 2017 15:30
@Nickadiemus nice one
Eric Weiss
@eweiss17
Jun 22 2017 15:30
which line ?
Nick Sladic
@Nickadiemus
Jun 22 2017 15:30
@ukulsh thanks!
CamperBot
@camperbot
Jun 22 2017 15:30
nickadiemus sends brownie points to @ukulsh :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @ukulsh |http://www.freecodecamp.com/ukulsh
denizenofcode
@denizenofcode
Jun 22 2017 15:33
@eweiss17 VM2367 jquery.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined
at getLogos (VM2322 pen.js:116)
at HTMLDocument.<anonymous> (VM2322 pen.js:129)
at j (VM2367 jquery.min.js:2)
at k (VM2367 jquery.min.js:2)
I try to find the length on line 123
Rajat
@rajataudichya
Jun 22 2017 15:33
@Nickadiemus which challenge are you on?
@Aniket1994 It would be better if you use codepen
Aniket
@Aniket1994
Jun 22 2017 15:35
@rajataudichya i am using codepen. Its the portfolio challenge i am stuck on right now. Should i post the link here?
Eric Weiss
@eweiss17
Jun 22 2017 15:35
@denizenofcode you never passed in your object in the function
getLogos(simulatedFetch)
135
you can console.log in the function and you see your object correctly
that doesn't fix your problem... but its a step to
Rajat
@rajataudichya
Jun 22 2017 15:36
@Aniket1994 Yes
Nick Sladic
@Nickadiemus
Jun 22 2017 15:37
@rajataudichya i'm currently on the data visualization making the FCC leaderboard
denizenofcode
@denizenofcode
Jun 22 2017 15:37
@eweiss17 Ah yeah I see that now. Noob mistake. Thanks again man.
CamperBot
@camperbot
Jun 22 2017 15:37
denizenofcode sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 490 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 22 2017 15:37
that still doesn't fix the .length though lol
Nick Sladic
@Nickadiemus
Jun 22 2017 15:38
@Aniket1994 what's your problem?
Aniket
@Aniket1994
Jun 22 2017 15:38
the buttons aren't visible ? do i need to style using css first?
Eric Weiss
@eweiss17
Jun 22 2017 15:39
@denizenofcode what is this line
for(i=simulatedFetch.length;i>0;i--) {
Nick Sladic
@Nickadiemus
Jun 22 2017 15:40
@Aniket1994 I'm looking
Pagnito
@Pagnito
Jun 22 2017 15:43
took 2 days to do ana algorithm on codefights, to fail the 30th test case which tests for 4000ms max execution time!!!
T.T
Eric Weiss
@eweiss17
Jun 22 2017 15:43
@denizenofcode I believe there is an error on lines 124-145
124-125
I got to go man, just keep console.log() ing to see how the information is being displayed
Andrew Hickman
@ahickman3
Jun 22 2017 15:49
has anyone ever used behonce gifs? cant figure out how to download some stuff lol
Nick Sladic
@Nickadiemus
Jun 22 2017 15:50
@fullmetal7777 I changed the part of your button on the top. your logo was making the navbar split. i believe there is a different className for branding
Rajat
@rajataudichya
Jun 22 2017 15:52
@Aniket1994 try this ```html
```html
Andrew Hickman
@ahickman3
Jun 22 2017 15:52
Wrong link? lol
Rajat
@rajataudichya
Jun 22 2017 15:52
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<!-- Navigation bar-->
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#mynavbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">A.S.A</a>
    </div>
   <div class="collapse-navbar collapse" id="mynavbar">
     <ul class="nav navbar-nav">
          <li><a href="#">About</a></li>
      <li><a href="#">Portfolio</a></li>
      <li><a href="#">Contact</a></li>
     <li><a href="#">Social</a></li>
    </ul>
  </div>
    </div>
</nav>
@Nickadiemus bro you are good....
Nick Sladic
@Nickadiemus
Jun 22 2017 15:54
@fullmetal7777 my bad lol
Michael
@michaelrmartinez
Jun 22 2017 15:59
Hi everyone, I seem to have submitted the wrong CodePen link to a project. Is there anything I can do to take it back?
Roxroy
@roxroy
Jun 22 2017 16:03
@michaelrmartinez , it happens. Just reopen the challenge and resubmit with the new link.
denizenofcode
@denizenofcode
Jun 22 2017 16:04
Can someone help me? "Cannot read property 'hasOwnProperty' of undefined"
JS line 124
Aniket
@Aniket1994
Jun 22 2017 16:08
@Nickadiemus allright ill try this one...i was looking to make it collapsed when i run it on the phone and a normal nav bar when on desktop or laptop
Nick Sladic
@Nickadiemus
Jun 22 2017 16:10
@Aniket1994 it should do that
Aniket
@Aniket1994
Jun 22 2017 16:10
@rajataudichya i tried your code but it still doesnt display the buttons on the navbar...Still thanks
Pagnito
@Pagnito
Jun 22 2017 16:11
@denizenofcode i think it might be because u didnt define i
Rajat
@rajataudichya
Jun 22 2017 16:12
@Aniket1994 @Nickadiemus His code is working the issue was that you haven't first closed the mynavbar tag "" and you had modified the default bootstrap code
Roxroy
@roxroy
Jun 22 2017 16:13
@denizenofcode , in the for loop for(i=simulatedFetch.length;i>0;i--) {, you need to use simulatedFetch.length -1, remember that the index is zero base. Your are getting the error because in the first iteration simulatedFetch[i] is undefined.
Pagnito
@Pagnito
Jun 22 2017 16:16
also when u say simulatedFetch[i].hasOwnProperty('stream') its only looking at the one property, which is only part of the object
Michael
@michaelrmartinez
Jun 22 2017 16:16
@roxroy Thank you!
CamperBot
@camperbot
Jun 22 2017 16:16
michaelrmartinez sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:star2: 1017 | @roxroy |http://www.freecodecamp.com/roxroy
Pagnito
@Pagnito
Jun 22 2017 16:16
remove the [i]
i think u might have to rebuild the function tho, but hasOwnProperty looks through the object by itself as i understand it
@denizenofcode
denizenofcode
@denizenofcode
Jun 22 2017 16:18
@roxroy @Pagnito thanks
CamperBot
@camperbot
Jun 22 2017 16:18
denizenofcode sends brownie points to @roxroy and @pagnito :sparkles: :thumbsup: :sparkles:
:star2: 1018 | @roxroy |http://www.freecodecamp.com/roxroy
:cookie: 253 | @pagnito |http://www.freecodecamp.com/pagnito
Pagnito
@Pagnito
Jun 22 2017 16:18
NP
np*
denizenofcode
@denizenofcode
Jun 22 2017 16:19
@Pagnito The for loop cycles through an array that contains objects, I’m not sure how I could rebuild it
Pagnito
@Pagnito
Jun 22 2017 16:19
oooh yea ok, then nvm, i think u dont have to
i was thinking it was one big object when i said that, my b
denizenofcode
@denizenofcode
Jun 22 2017 16:24
no problem. I keep getting it mixed up too
@roxroy want to take a shot at why it’s not producing images?
Aniket
@Aniket1994
Jun 22 2017 16:29
@rajataudichya yeah...i saw that too and corrected it. But the bootstrap v4 isn't showing same results as v3
PonniThirumoorthy
@PonniThirumoorthy
Jun 22 2017 16:36
how to start with portfolio page development? :(
denizenofcode
@denizenofcode
Jun 22 2017 16:37
@PonniThirumoorthy get a rough, empty bootstrap layout going then go from there
Make it functional before you make it pretty
PonniThirumoorthy
@PonniThirumoorthy
Jun 22 2017 16:38
any examples?
denizenofcode
@denizenofcode
Jun 22 2017 16:38
Can someone please help me? my getLogos() function is not producing images
Rick Brown
@RickBr0wn
Jun 22 2017 16:39
hi all..
can someone please explain why:
$.getJSON("https://ipinfo.io/json", function(locationData){ console.log(locationData); });
returns the object, but:
$.getJSON("https://api.darksky.net/forecast/6628ca8235beb8aed232889dbef9e9b1/51.1333,0.8833", function(weatherData){ console.log(weatherData); });
returns nothing?
denizenofcode
@denizenofcode
Jun 22 2017 16:39
@PonniThirumoorthy I remember the example from the portfolio instruction page being sufficient
@RickBr0wn please link your codepen
Ken Haduch
@khaduch
Jun 22 2017 16:44
@RickBr0wn - if I just open that darksky URL, it returns something, so it would be good to get a look at your project.
h1tag
@h1tag
Jun 22 2017 16:46
@RickBr0wn it's probably a CORS error. If you check the browser console, you'll see if there's any errors. You can solve the CORS error by adding ?callback=? at the end of the darksky url
Rick Brown
@RickBr0wn
Jun 22 2017 16:48
@h1tag thank you.. that is the solution.. now i guess i'm gonna have to read up about CORS :D :/
CamperBot
@camperbot
Jun 22 2017 16:48
rickbr0wn sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 865 | @h1tag |http://www.freecodecamp.com/h1tag
h1tag
@h1tag
Jun 22 2017 16:48
@RickBr0wn :+1:
Nick Sladic
@Nickadiemus
Jun 22 2017 16:50
Has anybody here completed the FCC leaderboard with react?
Beorn619
@Beorn619
Jun 22 2017 17:21
Hi there, can I get some feedback on my tribute page project so far? https://codepen.io/Beorn/pen/vZZvxd Any feedback is welcomed!
Rick Brown
@RickBr0wn
Jun 22 2017 17:23
@h1tag samecode pen.. why doesn't lines 31-37 not work.. They work in sublime? :/
Rick Brown
@RickBr0wn
Jun 22 2017 17:33
its ok... i got it
:D
h1tag
@h1tag
Jun 22 2017 17:36
@RickBr0wn what was the problem?
Andrew Hickman
@ahickman3
Jun 22 2017 17:39
im making a weather widget with a collapstible from 1day to 5 day forecast. Ive never done this, just wondering in what stages i should design it. Should i design the whole thing first, then figure out how to collapse the other 5 panels?
PipsChips
@PipsChips
Jun 22 2017 17:41
Hello! Can someone pls check out my 'Wikipedia Viewer' project? Pls let me know your opinion... https://codepen.io/PipsChips/full/zNLMyV/
CallMeOrange
@EgnaroDev
Jun 22 2017 17:41
Just figure out how to build 5 panels but if you cant, just leave it :/, no need to designs first
@PipsChips looks great and you should add a logo above search bar
Andrew Hickman
@ahickman3
Jun 22 2017 17:42
@MCTwoDigitZero I dont get that, everyone says to get the functionality first, why is that? I always prefer design first and get everything where its supposed to be, then add the functionality since i know what everything is supposed to do
PipsChips
@PipsChips
Jun 22 2017 17:43
@MCTwoDigitZero
Thank you!
CamperBot
@camperbot
Jun 22 2017 17:43
pipschips sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 22 2017 17:45
@fullmetal7777 Yeah that is good idea but what if you cant build 5 panels? then it would be a waste of designs
Well its your choice, designs first or build 5 panels first, doesnt matter :/
Andrew Hickman
@ahickman3
Jun 22 2017 17:46
@MCTwoDigitZero true, but anything functionality i know is possible, since it seems easy or ive seen it done. Is that the main reason, just in case it might be really difficult/impossible to implement the functionality you desire?
CallMeOrange
@EgnaroDev
Jun 22 2017 17:46
I dont really know... I have never built 5 panels before
Andrew Hickman
@ahickman3
Jun 22 2017 17:46
@MCTwoDigitZero heres the design http://imgur.com/a/CkkkS
I may be using the word panels wrong here lol
CallMeOrange
@EgnaroDev
Jun 22 2017 17:47
That panels seems difficult to build
Andrew Hickman
@ahickman3
Jun 22 2017 17:48
exactly lol
I figure, i might as well expose myself to as much stuff as possible right now
itl just make me look that much more to employers yno.
CallMeOrange
@EgnaroDev
Jun 22 2017 17:48
Will you be able to build it?
You should try to build 5 panels in a row then somehow change it :/
Andrew Hickman
@ahickman3
Jun 22 2017 17:49
Guess will find out lol so far ive been able to do everything ive thought up
CallMeOrange
@EgnaroDev
Jun 22 2017 17:49
Well then, Good luck
Andrew Hickman
@ahickman3
Jun 22 2017 17:49
want it to have an unfolding animation. Like the bottom line of the first panel scrolls down, if you get what i mean
CallMeOrange
@EgnaroDev
Jun 22 2017 17:50
not sure what you meant by unfolding animation
Andrew Hickman
@ahickman3
Jun 22 2017 17:50
Yeah im not very good with words lol were is scrolls down. Unfolding was definately the wrong word
CallMeOrange
@EgnaroDev
Jun 22 2017 17:50
Hold on you mean like first item folded then click it to be unfolded?
Andrew Hickman
@ahickman3
Jun 22 2017 17:50
So thats probably what ill be using to get this figured out
CallMeOrange
@EgnaroDev
Jun 22 2017 17:51
then panels will show up?
Andrew Hickman
@ahickman3
Jun 22 2017 17:51
erase the word folded, shouldnt have used that lol
the bottom line of the panel scrolls down when i click the button pretty much
CallMeOrange
@EgnaroDev
Jun 22 2017 17:51
lol alright
I see
Andrew Hickman
@ahickman3
Jun 22 2017 17:51
exactly like the thing i linked, were the block goes down
Doesnt seem too bad. I mean, its gunna suck, but its manageable i think
The random quote generator i did was... Ugh it was a pain, but i got it done lol
CallMeOrange
@EgnaroDev
Jun 22 2017 17:52
Looks good
Actually unfolding make sense :/
Andrew Hickman
@ahickman3
Jun 22 2017 17:52
Literally a whole day of that was getting 2 buttons to position and get them responsive correctly, it was terrible
ok fine, it unfolds then damnat lol
CallMeOrange
@EgnaroDev
Jun 22 2017 17:52
:/
Andrew Hickman
@ahickman3
Jun 22 2017 17:53
kinda cool actually
CallMeOrange
@EgnaroDev
Jun 22 2017 17:54
wow
I think it will looks cool on weather app
Andrew Hickman
@ahickman3
Jun 22 2017 17:54
Yep, doing that lol
CallMeOrange
@EgnaroDev
Jun 22 2017 17:54
You might be first one to have it if you built it
Andrew Hickman
@ahickman3
Jun 22 2017 17:55
Ahwwwwww yeuhh boyee. I try to implement cool ideas that ive seen around, but not specifically in what im doing. That way its a lot less work, looks awesome, and its an 'original' idea
CallMeOrange
@EgnaroDev
Jun 22 2017 17:56
I guess it will take few days to perfect that designs...
Andrew Hickman
@ahickman3
Jun 22 2017 17:56
Generally takes me a lot longer to finish my projects anyways, i dont like the basic cookie-cutter designs.
CallMeOrange
@EgnaroDev
Jun 22 2017 17:56
lol
Andrew Hickman
@ahickman3
Jun 22 2017 18:00
Its literally one line of endless code in the download for the folding. Omg, this format is giving my eyes cancer
Jorge
@flawedLogic506
Jun 22 2017 18:00
hey wazzup guys
Andrew Hickman
@ahickman3
Jun 22 2017 18:00
yoooooooooo
Jorge
@flawedLogic506
Jun 22 2017 18:00
whats happening? all good?
Andrew Hickman
@ahickman3
Jun 22 2017 18:00
@MCTwoDigitZero Oh yeah, i think i looked at your tribute or portfolio or whatever page for some reason. I swear im the only guy who couldnt get into hunterxhunter lol
@OrangeKulture a lot better now that your here bro
Jorge
@flawedLogic506
Jun 22 2017 18:01
:thumbsup: thanks! :D yeah .. came by to look for some wisdom on unit testing
CallMeOrange
@EgnaroDev
Jun 22 2017 18:01
@fullmetal7777 lol
Jorge
@flawedLogic506
Jun 22 2017 18:01
Anyone here does unit testing ?
CallMeOrange
@EgnaroDev
Jun 22 2017 18:01
unit testing?
Like a test for bootstrap grid system or something?
Andrew Hickman
@ahickman3
Jun 22 2017 18:02
im a professional female unit tester if thats what your needing advice on
CallMeOrange
@EgnaroDev
Jun 22 2017 18:02
lmao
Jorge
@flawedLogic506
Jun 22 2017 18:02
code modules .. and such
looool
CallMeOrange
@EgnaroDev
Jun 22 2017 18:02
eightball @fullmetal7777 a professional female unit tester?
Andrew Hickman
@ahickman3
Jun 22 2017 18:02
the road is long and ardious, but i can teach you, believe it!
CamperBot
@camperbot
Jun 22 2017 18:02
@MCTwoDigitZero :8ball: my sources say no :sparkles:
Jorge
@flawedLogic506
Jun 22 2017 18:02
woops
denied
CallMeOrange
@EgnaroDev
Jun 22 2017 18:02
@OrangeKulture Dont listen to him
Andrew Hickman
@ahickman3
Jun 22 2017 18:02
@MCTwoDigitZero ahahaha
CallMeOrange
@EgnaroDev
Jun 22 2017 18:02
lol
Andrew Hickman
@ahickman3
Jun 22 2017 18:03
THE EIGHTBALL LIES!
I SWEAR, i.. i do stuff! I'll see myself out....
Jorge
@flawedLogic506
Jun 22 2017 18:03
wahahaha
have u guys read the YDKJ book series?
CallMeOrange
@EgnaroDev
Jun 22 2017 18:04
Nah
Whats YDKJ?
about @OrangeKulture
CamperBot
@camperbot
Jun 22 2017 18:05
:cookie: 417 | @orangekulture |http://www.freecodecamp.com/orangekulture
CallMeOrange
@EgnaroDev
Jun 22 2017 18:05
hm...
Wanna know how to get cookies faster?
Andrew Hickman
@ahickman3
Jun 22 2017 18:05
Quick question, the jquery for the paperfold is local, is there anyway i can post it up somewhere and link to it in codepen via CDN(i think its called CDN? whatever they say when you link to a library over the web rather locally)
CallMeOrange
@EgnaroDev
Jun 22 2017 18:05
MDN?
Andrew Hickman
@ahickman3
Jun 22 2017 18:05
YDKJ?
speak english nerds
CallMeOrange
@EgnaroDev
Jun 22 2017 18:06
lol
vínαч puppαl
@vinaypuppal
Jun 22 2017 18:06
Andrew Hickman
@ahickman3
Jun 22 2017 18:07
Thought you were linking that to me as a subtle hint haha that answers that question. Hell no to that, i aint readin no book, cmon man, 'murica
Jorge
@flawedLogic506
Jun 22 2017 18:07
sry stepped outside for a sec
its a book series
You Dont Know Javascript
CallMeOrange
@EgnaroDev
Jun 22 2017 18:08
oh
Jorge
@flawedLogic506
Jun 22 2017 18:08
jquery for paperfold?
i love to read .. but i hate reading off the computer
CallMeOrange
@EgnaroDev
Jun 22 2017 18:08
@OrangeKulture It was seems familiar to me and I realized i have a book of it lol
Jorge
@flawedLogic506
Jun 22 2017 18:08
who prints these days .. paper printing is so 2015
@vinaypuppal have u read it?
CallMeOrange
@EgnaroDev
Jun 22 2017 18:09
I have first one "Up & Going"
@OrangeKulture What do you have?
Jorge
@flawedLogic506
Jun 22 2017 18:09
well the whole series is there, available for free
CallMeOrange
@EgnaroDev
Jun 22 2017 18:10
eh I like "offline book"
Jorge
@flawedLogic506
Jun 22 2017 18:11
first one is introductory i guess .. control flow and such. Wondering if Sky finished it, since i recall a mention of advanced algorithms book
baah .. i guess ill just print it or something
CallMeOrange
@EgnaroDev
Jun 22 2017 18:11
I dont think its YDKJS
Jorge
@flawedLogic506
Jun 22 2017 18:11
oh yeah no i know
i mean wondering if Sky has already gone through it .. so I can get the shorten, explained version :joy:
a.k.a the lazy version
CallMeOrange
@EgnaroDev
Jun 22 2017 18:12
lol
@OrangeKulture so what did you learn from "UP & Going"
Jorge
@flawedLogic506
Jun 22 2017 18:15
well, i think it was kinda introductory .. good examples on `this and stuff like that, it's a quick read. I just think i like reading better off of a book or printed material
CallMeOrange
@EgnaroDev
Jun 22 2017 18:16
yeah
But what did you learn from it?
Jorge
@flawedLogic506
Jun 22 2017 18:20
that i needed to read the second one?
haha j/k dunno not much, its introductory .. i already knew a little bit of JS and object oriented in general .. not too much tho, but the concepts
CallMeOrange
@EgnaroDev
Jun 22 2017 18:21
..
Jorge
@flawedLogic506
Jun 22 2017 18:21
im still wondering what @fullmetal7777 meant regarding paperfold
do u know?
Andrew Hickman
@ahickman3
Jun 22 2017 18:22
CallMeOrange
@EgnaroDev
Jun 22 2017 18:22
@OrangeKulture I know how
Jorge
@flawedLogic506
Jun 22 2017 18:22
ahh a JS library
CallMeOrange
@EgnaroDev
Jun 22 2017 18:22
Its so easy
Simple.
Get a paper then fold it
No need for a link
Jorge
@flawedLogic506
Jun 22 2017 18:23
nicee! why don't u do a super cool tutorial on that, dude :joy:
CallMeOrange
@EgnaroDev
Jun 22 2017 18:25
Sorry, Im not supposed to post video that is unrelated to coding
google "How to perfectly fold paper"
Perfect tutorial
Jorge
@flawedLogic506
Jun 22 2017 18:25
hahah awesome
will do
chat seems a lil dead .. let's jump to FCC main room
CallMeOrange
@EgnaroDev
Jun 22 2017 18:26
Sure
Andrew Hickman
@ahickman3
Jun 22 2017 18:27
yeah, some of us are too busy being PRODUCTIVO
Jorge
@flawedLogic506
Jun 22 2017 18:28
haha yeah i should probably start being productivo too .. fckn pomodoro clock
CallMeOrange
@EgnaroDev
Jun 22 2017 18:31
@OrangeKulture I have a friend who complete that kind project every 1 or 2 days
He is 12 but he know JS very well
Jorge
@flawedLogic506
Jun 22 2017 18:32
its an easy project ... im just struggling with some bugs
debuggin sucks
CallMeOrange
@EgnaroDev
Jun 22 2017 18:32
lol
I meant tic toe tac, simon game, and others
Jorge
@flawedLogic506
Jun 22 2017 18:33
yeah that's what i mean .. its not all that hard, i just get hung up on bugs
CallMeOrange
@EgnaroDev
Jun 22 2017 18:35
I see
Are you sure its easy?
easier than Api projects?
Jorge
@flawedLogic506
Jun 22 2017 18:37
what API? the backend?
ahh you mean the intermediate front end
i guess it's kinda similar .. only thing is that JS is heavier on the advanced
CallMeOrange
@EgnaroDev
Jun 22 2017 18:38
hm..
Andrew Hickman
@ahickman3
Jun 22 2017 18:39
I just did that api bs lol it was a pain
having my first api require keys and authentication, etc, ugh it was rough
Jorge
@flawedLogic506
Jun 22 2017 18:39
haha yeah? i think its actually lots of fun ..
yeah definitely the first few times is a little confusing .. but it definitely gets easier as you go
Andrew Hickman
@ahickman3
Jun 22 2017 18:40
i dont mind it now, but starting out, it was like jumping in the ocean, surrounded by sharks. I had no idea where to start
glitz20
@glitz20
Jun 22 2017 18:40
I am trying to put bottom border under "About ME" , but want its length and distance to be modified. Any help? https://codepen.io/sabin20/pen/GEENVj
Andrew Hickman
@ahickman3
Jun 22 2017 18:40
Its easy to me now though
Michael Cooley
@Coooley
Jun 22 2017 18:42
Hey all,
I'm trying to add like a... border/text box? around an image an its caption. Proving to be extremely difficult for me. Can anyone help? (It's the first "real" challenge)
Jorge
@flawedLogic506
Jun 22 2017 18:42
yeah exactly .. its hard at first, but then it gets easier and then it gets fun
Michael Cooley
@Coooley
Jun 22 2017 18:43
*First real challenge in FreeCodeCamp
Jorge
@flawedLogic506
Jun 22 2017 18:44
@sabin20 you can't modfy a borders length with vanilla CSS .. at least i dont think so .. u can change the border to be for h1 tag tho .. so it will be the length of the text
Michael Cooley
@Coooley
Jun 22 2017 18:45
And then just put the image and everything in h1?
Would a DIV work, too?
glitz20
@glitz20
Jun 22 2017 18:46
@OrangeKulture can I modify the underline?
Jorge
@flawedLogic506
Jun 22 2017 18:46
@Coooley sry , no I was talking to Sabin .. one sec
@sabin20 it all depends on what you want to achieve .. if you explain roughly what you wanna do, maybe I can help
glitz20
@glitz20
Jun 22 2017 18:48
@OrangeKulture I basically wanna have some line under 'about me' section to make it look clean
Jorge
@flawedLogic506
Jun 22 2017 18:48
@Coooley you want sort of like a frame?
Michael Cooley
@Coooley
Jun 22 2017 18:48
This is what I'm looking at: https://codepen.io/freeCodeCamp/full/NNvBQW
See how the image has like a box around it and its caption? How do I do that?
Jorge
@flawedLogic506
Jun 22 2017 18:48
@sabin20 but you do have that right now ... u want a line that's shorter? or ...?
glitz20
@glitz20
Jun 22 2017 18:49
yeah, a shorter line and a little bit away from the topic
Jorge
@flawedLogic506
Jun 22 2017 18:51
how about the <hr > tag ?
@sabin20 u know what i mean?
it acts like a <br /> (break line) tag , but it renders a line try it out
u can control width, height and color, if im not mistaken
@Coooley sry taking a look now
@Coooley that is a boostrap class
you will need to use bootstrap and use the clas thumbail and caption .. did u try that already?
Michael Cooley
@Coooley
Jun 22 2017 18:56
No I didn't. Will keep you posted.
glitz20
@glitz20
Jun 22 2017 18:56
@OrangeKulture I tried <h1><hr width="5%">ABOUT ME</hr></h1>, but it is not working https://codepen.io/sabin20/pen/GEENVj
Jorge
@flawedLogic506
Jun 22 2017 18:57
@sabin20 hr is a stand alone tag .. hold on, let me show u
CallMeOrange
@EgnaroDev
Jun 22 2017 18:58
@OrangeKulture what is hr tags?
Amit Patel
@AmitP88
Jun 22 2017 19:01
hey guys, for the Local Weather App, I managed to get the users' location to show up, but how do I get the local weather based on the users' location? Would I have to write a seperate function to send the request to the weather api, but still use the users' location from the other api? I'm just asking because I'm trying to think of how to do it without causing interference with the request that's accessing the users' location: https://codepen.io/AmitP88/pen/oWVjqL?editors=0010 And I'll be using the apixu API https://www.apixu.com/
Jorge
@flawedLogic506
Jun 22 2017 19:01
hr is a HTML element .. draws a line, sort of like a border but its not attached to another element
Gulsvi
@gulsvi
Jun 22 2017 19:02

Another option, @sabin20 is to add a border, for example:
HTML

<h1 class="section-title">ABOUT ME</h1>

CSS

.section-title {
  border-bottom: 2px solid #f4511e;
}
CallMeOrange
@EgnaroDev
Jun 22 2017 19:02
@OrangeKulture oh so that what hr tags is for..
Gulsvi
@gulsvi
Jun 22 2017 19:02
:wave: hello
glitz20
@glitz20
Jun 22 2017 19:02
@SkyC0der I could do that but I want to control the length
Jorge
@flawedLogic506
Jun 22 2017 19:02
yeah i mentioned that .. but he wants to control the width
Gulsvi
@gulsvi
Jun 22 2017 19:02
@sabin20 Add width: 40% to your CSS
adjust as desired
Jorge
@flawedLogic506
Jun 22 2017 19:03
whats up Sky .. all good in the hood ?
Gulsvi
@gulsvi
Jun 22 2017 19:03
use margin-left: auto, margin-right: auto to keep it centered
glitz20
@glitz20
Jun 22 2017 19:03
@SkyC0der like border-width?
Jorge
@flawedLogic506
Jun 22 2017 19:03
no .. he means the width of the element, which in turn renders the bottom border
Gulsvi
@gulsvi
Jun 22 2017 19:03
@sabin20 Like:
.section-title {
  border-bottom: 2px solid #f4511e;
  width: 200px;
  margin-left: auto;
  margin-right: auto;
}
Adjust the width as needed
Jorge
@flawedLogic506
Jun 22 2017 19:04
you can target the hr as well
Gulsvi
@gulsvi
Jun 22 2017 19:05
<hr> might still show a horizontal line in some browsers, but in HTML5, it's only a semantic element
(to be pedantic :p)
Jorge
@flawedLogic506
Jun 22 2017 19:05
nah its actually good ..my first go to thing was the border of the element instead of the dive
Gulsvi
@gulsvi
Jun 22 2017 19:05
All is good! I went on a road trip this morning to the USA :) at a coffee shop waiting for my friends to get off of work
Jorge
@flawedLogic506
Jun 22 2017 19:06
ahh nice! road trips are the best
i heard that if you mention you are Canadian on a donkin u get a free coffee to try and covert you from hortons? is it ? not too familiar with your chains
Gulsvi
@gulsvi
Jun 22 2017 19:07
lol, I don't think so
No idea
CallMeOrange
@EgnaroDev
Jun 22 2017 19:08
@SkyC0der You came to US?
Jorge
@flawedLogic506
Jun 22 2017 19:08
hahah nah yeah .. i did hear that and from a Canadian.. i dont drink much coffee tho, so I didnt pay attention
Gulsvi
@gulsvi
Jun 22 2017 19:08
This is just a local cafe, with cupcakes
Jorge
@flawedLogic506
Jun 22 2017 19:08
kinda ironic , since im from CR
we kick Juan Valdez ass
Gulsvi
@gulsvi
Jun 22 2017 19:09
Yep, beautiful country you have here @MCTwoDigitZero :grin:
CallMeOrange
@EgnaroDev
Jun 22 2017 19:09
lol
First time?
glitz20
@glitz20
Jun 22 2017 19:09
@SkyC0der thnaks
Gulsvi
@gulsvi
Jun 22 2017 19:09
No, I visit all the time, just 4hr drive
CallMeOrange
@EgnaroDev
Jun 22 2017 19:10
oh
So you live in Canada?
Or Mexico?
Gulsvi
@gulsvi
Jun 22 2017 19:10
Canada
@MCTwoDigitZero What else should go on deadpool's portfolio?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:13
Deadpool's girlfriend
Or his face
Gulsvi
@gulsvi
Jun 22 2017 19:14
I wanted to add a timeline, but it's way too complicated
CallMeOrange
@EgnaroDev
Jun 22 2017 19:14
Yeah that why I gave up lol
Gulsvi
@gulsvi
Jun 22 2017 19:14
haha
Andrew Hickman
@ahickman3
Jun 22 2017 19:14

dumb question, trying to target the second h2 in this code

<div class="widget col-lg-4">
                    <h2>Weather Widget App</h2>
                    <h3></h3>
                    <h3></h3>
                </div>

via jquery. Tried this and not working

$('.widget:nth-child(2)').text(days[d.getDay()]);

assuming its not 0 indexing

Gulsvi
@gulsvi
Jun 22 2017 19:15
There's only one <h2> @fullmetal7777
Andrew Hickman
@ahickman3
Jun 22 2017 19:15
also tried .widget > h2:nth-child... and notta
aRtoo
@artoodeeto
Jun 22 2017 19:16

hi guys am I being hacked?? Im trying to run this API link http://rest.learncode.academy/api/learncode/friends. heres the code

$(document).ready(function(){

$.ajax({
  type: 'GET',
  url: 'http://rest.learncode.academy/api/learncode/friends',
  success: function(data){
    //console.log(data[1].name + '  ' + data[1].age);
    //$('#display').html( 'name:' + data[1].name + '    ' + 'age:' + data[1].age);
        data.forEach(function(test){
          //$('#display').html(test.name);
          console.log(test.name);
        })

      }
    })
});
but the output is this in my console.
main.js:11 undefined
4main.js:11 I deleted everyone
2main.js:11 In the End
7main.js:11 Go to this link for free hacking abilities

```

Andrew Hickman
@ahickman3
Jun 22 2017 19:16
ah nvm... lol
CallMeOrange
@EgnaroDev
Jun 22 2017 19:16
@fullmetal7777 you should try add an ID to h2 element
Andrew Hickman
@ahickman3
Jun 22 2017 19:16
@artoodeeto wtff lmao
BURN YOUR COMPUTER, QUICK!
KILL IT WITH FIRE!
CallMeOrange
@EgnaroDev
Jun 22 2017 19:16
@fullmetal7777 I think he is not joking?
Gulsvi
@gulsvi
Jun 22 2017 19:16
@fullmetal7777
.widget h3:nth-child(2)
Andrew Hickman
@ahickman3
Jun 22 2017 19:17

@SkyC0der

'.widget h3:nth-child(2)'

target the first h3 child, any idea why

CallMeOrange
@EgnaroDev
Jun 22 2017 19:17
@SkyC0der why h3?
Andrew Hickman
@ahickman3
Jun 22 2017 19:18
it seems like its picking the second child in .widget
which is an h3
not the second h3 child
CallMeOrange
@EgnaroDev
Jun 22 2017 19:18
yeah
Gulsvi
@gulsvi
Jun 22 2017 19:18
If you want the second h3 child, do .nth-child(3)
CallMeOrange
@EgnaroDev
Jun 22 2017 19:18
So why add h3?
Forget it...
Andrew Hickman
@ahickman3
Jun 22 2017 19:19
because im trying to target the h3 elements, mean to say h3 earlier lol
Amit Patel
@AmitP88
Jun 22 2017 19:19
@fullmetal7777 lmao that's one hell of a troll huh?
CamperBot
@camperbot
Jun 22 2017 19:19
:trollface: troll problems? notify admins here
Andrew Hickman
@ahickman3
Jun 22 2017 19:19
@SkyC0der why 3? Confusing lol should it target the second h3 child in .widget?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:19
No I meant this .widget h3:nth-child(2)
Andrew Hickman
@ahickman3
Jun 22 2017 19:19
dude thats nuts lol
CallMeOrange
@EgnaroDev
Jun 22 2017 19:20
@fullmetal7777 .widget select 3rd elements in div element
I think
Andrew Hickman
@ahickman3
Jun 22 2017 19:20
because im trying to target h3 elements you idnet lol
Gulsvi
@gulsvi
Jun 22 2017 19:20
there's always a way to avoid using .nth-child :)
Andrew Hickman
@ahickman3
Jun 22 2017 19:20
@SkyC0der how so
im up for suggestions lol
Gulsvi
@gulsvi
Jun 22 2017 19:20
give the elements class names
Andrew Hickman
@ahickman3
Jun 22 2017 19:20
yeahh i could do that
Gulsvi
@gulsvi
Jun 22 2017 19:20
:)
Andrew Hickman
@ahickman3
Jun 22 2017 19:20
then it gets crazy with id's
more work, just trying to understand why having nth-child
(2) gets the first h3 elements lol
make no sense to me. Shouldnt it get the second h3 elements in ..widget?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:21
Yeah,,
Andrew Hickman
@ahickman3
Jun 22 2017 19:21
$('.widget h3:nth-child(2)').text2(days[d.getDay()]);
CallMeOrange
@EgnaroDev
Jun 22 2017 19:21
no.. I think 1 = h2, 2 = first h3, 3= second h3
Without h3 I meant
Never mind after this Im gonna redo jQuery section
:/
Andrew Hickman
@ahickman3
Jun 22 2017 19:22
but shouldnt .widget h3:nth = 1 equal the first h3?
if it was just .widget: nth child, then yeah
CallMeOrange
@EgnaroDev
Jun 22 2017 19:23
I dont know why he added h3 to nth-child...
Gulsvi
@gulsvi
Jun 22 2017 19:23
It makes your code more readable, to do:
$('#date').text(days[d.getDay()])
CallMeOrange
@EgnaroDev
Jun 22 2017 19:23
^ much better
Andrew Hickman
@ahickman3
Jun 22 2017 19:23
ugh finee lol
CallMeOrange
@EgnaroDev
Jun 22 2017 19:23
lol
Gulsvi
@gulsvi
Jun 22 2017 19:23
but go ahead, get fancy if it makes you feel cool
Andrew Hickman
@ahickman3
Jun 22 2017 19:24
$('#day').text(days[d.getDay()]);
THERE DAD!
Gulsvi
@gulsvi
Jun 22 2017 19:24
:clap:
CallMeOrange
@EgnaroDev
Jun 22 2017 19:24
@fullmetal7777 how is panels going?
Andrew Hickman
@ahickman3
Jun 22 2017 19:24
@MCTwoDigitZero just making the layout atm. Still takes me a little bit to splooge out html and css, but its pretty easy at this point
CallMeOrange
@EgnaroDev
Jun 22 2017 19:24
@fullmetal7777 what does d mean in that?
variable? for date?
Gulsvi
@gulsvi
Jun 22 2017 19:25
var d = new Date();
CallMeOrange
@EgnaroDev
Jun 22 2017 19:25
Ah
Andrew Hickman
@ahickman3
Jun 22 2017 19:25
yo @SkyC0der this is what im doing for a 5 day forecast :D http://felixniklas.com/paperfold/
also yep
its be current date, then fold out for a 5 day
CallMeOrange
@EgnaroDev
Jun 22 2017 19:25
I see
Andrew Hickman
@ahickman3
Jun 22 2017 19:25
and I will be praise by all you peons
PRAISED I TELL YOU
CallMeOrange
@EgnaroDev
Jun 22 2017 19:25
lol
Good idea
Gulsvi
@gulsvi
Jun 22 2017 19:26
:)
An accordion?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:27
@SkyC0der hey forgot to ask
Whats your code for golf code?
Gulsvi
@gulsvi
Jun 22 2017 19:27
Let me check
Michael Cooley
@Coooley
Jun 22 2017 19:28
@OrangeKulture Thank you! Helped a lot
CamperBot
@camperbot
Jun 22 2017 19:28
coooley sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 419 | @orangekulture |http://www.freecodecamp.com/orangekulture
Gulsvi
@gulsvi
Jun 22 2017 19:28
I don't think I did that one lol
CallMeOrange
@EgnaroDev
Jun 22 2017 19:28
lmao
Jorge
@flawedLogic506
Jun 22 2017 19:28
@Coooley great stuff, welcome!
CallMeOrange
@EgnaroDev
Jun 22 2017 19:28
seriously?
Gulsvi
@gulsvi
Jun 22 2017 19:28
You only have to do the ones with asterisks next to them
CallMeOrange
@EgnaroDev
Jun 22 2017 19:28
yeah
I was just curiously what you did for golf code
Gulsvi
@gulsvi
Jun 22 2017 19:29
I guess I'd do it like you did above - lots of if/else
A cleaner way is maybe with a lookup?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:29
lookup?
Jorge
@flawedLogic506
Jun 22 2017 19:29
what challenge r u guys talking about?
CallMeOrange
@EgnaroDev
Jun 22 2017 19:30
golf code
in JS section
Jorge
@flawedLogic506
Jun 22 2017 19:30
huh ?
ohh u mean on the beta?
or
CallMeOrange
@EgnaroDev
Jun 22 2017 19:30
You didnt do it?
no...
Jorge
@flawedLogic506
Jun 22 2017 19:30
ahh yeah
i see it now
CallMeOrange
@EgnaroDev
Jun 22 2017 19:30
Can I see your?
Amit Patel
@AmitP88
Jun 22 2017 19:30
hey guys, for the Local Weather App, I managed to get the users' location to show up, but how do I get the local weather based on the users' location? Would I have to write a seperate function to send the request to the weather api, but still use the users' location from the other api? I'm just asking because I'm trying to think of how to do it without causing interference with the request that's accessing the users' location: https://codepen.io/AmitP88/pen/oWVjqL?editors=0010 And I'll be using the apixu API https://www.apixu.com/
Jorge
@flawedLogic506
Jun 22 2017 19:30
i could probably make it better
Gulsvi
@gulsvi
Jun 22 2017 19:30
  if(strokes === 1) {
    return "Hole-in-one!";
  } else if(strokes <= par - 2) {
    return "Eagle";
  } else if(strokes <= par - 1) {
    return "Birdie";
  } else if(strokes === par) {
    return "Par";
 etc...
Jorge
@flawedLogic506
Jun 22 2017 19:31
lots of if else
CallMeOrange
@EgnaroDev
Jun 22 2017 19:31
@SkyC0der yeah
Is there shorter code for it?
Jorge
@flawedLogic506
Jun 22 2017 19:31
maybe an object holding the info
Gulsvi
@gulsvi
Jun 22 2017 19:31
^^ Yeah, that's what I mean by a lookup
Like in profile lookup
CallMeOrange
@EgnaroDev
Jun 22 2017 19:32
oh yeah
@SkyC0der can you do one with lookup?
Gulsvi
@gulsvi
Jun 22 2017 19:33
function golfScore(par, strokes) {
  if (strokes == 1) return "Hole-in-one!";
  else if (strokes <= par - 2) return "Eagle";
  else if (strokes == par - 1) return "Birdie";
  else if (strokes == par) return "Par";
  else if (strokes == par + 1) return "Bogey";
  else if (strokes == par + 2) return "Double Bogey";
  else if (strokes >= par + 3) return "Go Home!";
}
That's a little cleaner :p
CallMeOrange
@EgnaroDev
Jun 22 2017 19:33
wow
Not a bunch of {}
Hm... interesting..
Jorge
@flawedLogic506
Jun 22 2017 19:34
u only need {} when executing a block of code
CallMeOrange
@EgnaroDev
Jun 22 2017 19:34
yea
this is mine now

function golfScore(par, strokes) {

  if (strokes == 1) return "Hole-in-one!";  
  else if (strokes <= par - 2) return "Eagle";
  else if (strokes == par -1) return "Birdie";
  else if (strokes == par) return "Par";
  else if (strokes == par + 1) return "Bogey";
  else if (strokes == par + 2) return "Double Bogey";
  else if (strokes >= par + 3) return "Go Home!";  
}

golfScore(5, 9);
[Evil Laughing]
@SkyC0der thanks for showing me a trick'
CamperBot
@camperbot
Jun 22 2017 19:37
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1806 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 22 2017 19:38
:+1: :+1:
lol
CallMeOrange
@EgnaroDev
Jun 22 2017 19:39
gotta let fCC know that I didnt copy it from somewhere'
Jorge
@flawedLogic506
Jun 22 2017 19:40
too late dude .. i already notified FCC cheat police
CallMeOrange
@EgnaroDev
Jun 22 2017 19:40
lol
Maybe I should make two of them
BrianWilliams28
@BrianWilliams28
Jun 22 2017 19:44
does anyone know the code to generate the results from an input field by pressing enter as opposed to clicking on a button?
Jorge
@flawedLogic506
Jun 22 2017 19:45
@BrianWilliams28 several ways .. u mean with jquery?
BrianWilliams28
@BrianWilliams28
Jun 22 2017 19:45
@OrangeKulture ya sure jquery is fine
Jorge
@flawedLogic506
Jun 22 2017 19:45
$('#yourSelector').on('keyup', function(val) {
    if (val.keyCode === 13) {
      var response = $('#query').val();
}
do magic with response ^
BrianWilliams28
@BrianWilliams28
Jun 22 2017 19:49
hmmm
@OrangeKulture so does the keycode value represent the number of characters in the field or something?
Justin Ketterman
@jkketts
Jun 22 2017 19:50
anyone know what is going on here? I have the key and long/lat hardcoded in… still getting ‘undefined'
var jsonLat;
  $.ajax({
    url: "https://api.darksky.net/forecast/5c4bdd38453500694d875be579678cb1/38.6273,-90.1979",
    async:false,
    dataType:'json',
    success: function(addData) {
      jsonLat = addData.latitude;
    }
  })

console.log(jsonLat);
David Darby
@AzFalconer
Jun 22 2017 19:52
Need help intercepting "return" in a form/input field... If user clicks submit button java intercepts and runs fine, if user hits return while in the input field the page reloads resetting all my variables... I've tried putting onClick="" and onSubmit="" in both form and input but no luck. Would appreicate some insight...
<form id="formZip">Select a new location: <input id="submitZip" type="text" placeholder="99999" size="2" pattern="\d{5}"><button onclick="setZip()">Submit</button>
</form>
@jkketts If you paste your query string into a browser does it work?
Justin Ketterman
@jkketts
Jun 22 2017 19:52
@AzFalconer Yes, it does.
David Darby
@AzFalconer
Jun 22 2017 19:53
have you tried opening console to see if there is a CORs issue?
Gulsvi
@gulsvi
Jun 22 2017 19:54
@BrianWilliams28 This is one example: just an <input> in a <form> and a handler for the submit event. https://codepen.io/skycoder/pen/MpKpJj
David Darby
@AzFalconer
Jun 22 2017 19:54
@jkketts that was my hang up for a whole day, a CORs issue.
aRtoo
@artoodeeto
Jun 22 2017 19:54

@artoodeeto
how can i style my css without ID or class.

  <div class="row">
          <div class="col-md-12">
            <h1>TITLE HERE</h1>
          </div>
        </div>

i was planning to style h1 without class. but i also have h1 underneath.
thanks
i tried

.col-md-12.h1
{

i got an error.

CamperBot
@camperbot
Jun 22 2017 19:54
sorry artoodeeto, you can't send brownie points to yourself! :sparkles: :sparkles:
Justin Ketterman
@jkketts
Jun 22 2017 19:55
@AzFalconer How do I go about confirming if that’s the issue? Try it in a different browser? Open the console in dev tools?
Romel Santoral
@arviesan24
Jun 22 2017 19:55

I'm a newbie in webdev and can't figure this out, can someone enlighten me on how to oroperly remove the side margins for a div that uses container-fluid whenever the I open it to a small screen. I tried

@media (min-width: 400px) {
.container-fluid {
padding:0;
margin:0;
}
but it doesn't work

David Darby
@AzFalconer
Jun 22 2017 19:55
I use chrome, just right click in page and select "inspect" then select console tab, will show errors
Gulsvi
@gulsvi
Jun 22 2017 19:55
@jkketts You will need to use dataType: 'jsonp' for the API
Justin Ketterman
@jkketts
Jun 22 2017 19:56
@SkyC0der Thought that it should be.. I tried that, still was undefined.
Gulsvi
@gulsvi
Jun 22 2017 19:56
Also, jsonLat needs to be inside your success function
ajax is asynchronous - so your console.log runs before your code goes to the server, gets the data, processes it, and brings it all back.
David Darby
@AzFalconer
Jun 22 2017 19:57
@jkketts I ended up with this...
$.getJSON("https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather?zip=" + zip + "&units=" + unitType + "&appid=5e8452b9d9f0a4").done(update).fail(console.log("error " + textStatus));
Gulsvi
@gulsvi
Jun 22 2017 19:58
@jkketts
$.ajax({
  url: "https://api.darksky.net/forecast/5c4bdd38453500694d875be579678cb1/38.6273,-90.1979",
  dataType: "jsonp",
  success: function(addData) {
    jsonLat = addData.latitude;
    console.log(jsonLat);
  }
});
^ That's all you need for the API call to succeed and to log your data
or, to use it elsewhere:
$.ajax({
  url: "https://api.darksky.net/forecast/5c4bdd38453500694d875be579678cb1/38.6273,-90.1979",
  dataType: "jsonp",
  success: function(addData) {
    jsonLat = addData.latitude;
    logMyData(jsonLat);
  }
});

function logMyData(data) {
  console.log(data); // 38 (your jsonLat)
}
Justin Ketterman
@jkketts
Jun 22 2017 20:00
thanks @SkyC0der , I’m going to have to stare at this a while and try and understand it. I kept reading about callback functions that I needed to use, but couldn’t figure out how to get them to work in my code
CamperBot
@camperbot
Jun 22 2017 20:00
jkketts sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1807 | @skyc0der |http://www.freecodecamp.com/skyc0der
Justin Ketterman
@jkketts
Jun 22 2017 20:00
thanks @AzFalconer
CamperBot
@camperbot
Jun 22 2017 20:00
jkketts sends brownie points to @azfalconer :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @azfalconer |http://www.freecodecamp.com/azfalconer
Gulsvi
@gulsvi
Jun 22 2017 20:00
@jkketts This is yet another approach:
$.ajax({
  url: "https://api.darksky.net/forecast/5c4bdd38453500694d875be579678cb1/38.6273,-90.1979",
  dataType: "jsonp",
  success: logMyData
});

function logMyData(data) {
  console.log(data.latitude); // 38 (your latitude)
}
David Darby
@AzFalconer
Jun 22 2017 20:02
@jkketts NP, I'm working on the same project. Trying to work up a solution for when the user doesn't allow geolocation...
stingathing
@stingathing
Jun 22 2017 20:03
Hey does anybody have some time to assist me with a few questions about the front end portfolio project for FCC? I've been stuck for a while on the navigation bar styling, pm me or mention me if possible thanks
Justin Ketterman
@jkketts
Jun 22 2017 20:04
@AzFalconer Oh, that’s a great idea. What are you going to use though if there is no location given? They enter what city they’re at or something?
David Darby
@AzFalconer
Jun 22 2017 20:08
@jkketts I'm using Zip (American centric, I know)
Justin Ketterman
@jkketts
Jun 22 2017 20:09
@SkyC0der So am I understanding this correctly? As soon as the $.ajax code is received, it starts working on that. Then if I want the variable outside of that code, I use that function so that when it’s finished, it can store it in a variable inside that function? Then I can use it anywhere?
@SkyC0der Maybe a better question… is this best practice what I’m doing here?
  $.ajax({
    url: "https://ipinfo.io/json",
    async: false,
    dataType:'json',
    success: function(data) {
      jsonLoc = data.loc;
      geoLocData(jsonLoc);
    }
  })

function geoLocData(data) {
  geoLoc = data
  console.log(geoLoc);

  $.ajax({
  url: "https://api.darksky.net/forecast/5c4bdd38453500694d875be579678cb1/" + geoLoc,
  dataType: "jsonp",
  success: function(addData) {
    jsonLat = addData.latitude;
    console.log(jsonLat);
  }
});
}
Ha Van
@NganHaVan
Jun 22 2017 20:17

Hi guys, I am doing the project Show Local Weather and really got stuck with the Bootstrap navigation.

<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
  <div class="navbar-header">
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
    </button>   
    <h4 class="navbar-brand" id="place">Location</h3>
</div>
 <div class="navbar-collapse">
<div class="nav navbar-nav navbar-left>
<h4>Show local weather</h4>
</div>  
</div>
<div class="navbar-collapse ">
  <ul class="nav navbar-nav navbar-right">
    <li><a href="#" class="degreeChange"><span class="glyphicon glyphicon-cog"></span>&nbsp Celcius/Fahrenheit</a></li>
    <li><a href="#"><span class="glyphicon glyphicon-user"></span> HaVan
        </a></li>
  </ul>
    </div>
    </div>
</nav>

I want the location in the middle of navbar, "show local weather" on the left of the navbar and both of navbar-left and navbar-right lies in one line> I tried to google and stackoverflow and it still didn't work

BrianWilliams28
@BrianWilliams28
Jun 22 2017 20:18
@SkyC0der thank you
CamperBot
@camperbot
Jun 22 2017 20:18
brianwilliams28 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1808 | @skyc0der |http://www.freecodecamp.com/skyc0der
Ha Van
@NganHaVan
Jun 22 2017 20:19

Hi guys, I am doing the project Show Local Weather and really got stuck with the Bootstrap navigation.

<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
  <div class="navbar-header">
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
    </button>   
    <h4 class="navbar-brand" id="place">Location</h3>
</div>
 <div class="navbar-collapse">
<div class="nav navbar-nav navbar-left">
<h4>Show local weather</h4>
</div>  
</div>
<div class="navbar-collapse ">
  <ul class="nav navbar-nav navbar-right">
    <li><a href="#" class="degreeChange"><span class="glyphicon glyphicon-cog"></span>&nbsp Celcius/Fahrenheit</a></li>
    <li><a href="#"><span class="glyphicon glyphicon-user"></span> HaVan
        </a></li>
  </ul>
    </div>
    </div>
</nav>

I want the location in the middle of navbar, "show local weather" on the left of the navbar and both of navbar-left and navbar-right lies in one line> I tried to google and stackoverflow and it still didn't work

aRtoo
@artoodeeto
Jun 22 2017 20:20
hi guys. im in the challenge make a random quote. but i have an issue of API. when i paste this link it doest give me a json file format. can you help?? https://forismatic.com/en/api/
Amit Patel
@AmitP88
Jun 22 2017 20:22
hey guys, I've tweaked my local weather app js in order to try and get the weather json data to show up in the dev console before trying to append it, but it's not working. I've looked over my code and not sure why it's not showing up. Note: I had to nest the WeatherRequest function inside the appendLocation function because the http request to get the weather needs the users location attached at the end of the weather api url. https://codepen.io/AmitP88/pen/oWVjqL?editors=0010
Ha Van
@NganHaVan
Jun 22 2017 20:23
the url must be like this: url="https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?". You have to choose the format for the api
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:26
@AmitP88 : did you declare your Jsonlocation variable as a local ?
Amit Patel
@AmitP88
Jun 22 2017 20:28
@Dhrumit14 yeah, it's local to appendWeather function
Justin Ketterman
@jkketts
Jun 22 2017 20:28
Did not realize there were APIs for random quotes…spent an hour pulling and writing quotes together… ha oops
CallMeOrange
@EgnaroDev
Jun 22 2017 20:29
lol
Justin Ketterman
@jkketts
Jun 22 2017 20:29
if it feels wrong… it probably is
CallMeOrange
@EgnaroDev
Jun 22 2017 20:29
I dont think I used an Api for random quotes machine
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:30
@jkketts there is an api
Justin Ketterman
@jkketts
Jun 22 2017 20:30
@MCTwoDigitZero 👍
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:30
let me send you
@AmitP88 weather request is using that same JsonLocation variable to get the weather for that particular location right ?
Amit Patel
@AmitP88
Jun 22 2017 20:32
@Dhrumit14 yes it is. That's why I had to nest WeatherRequest inside appendLocation function in order to access that variable
otherwise I get an error in the console
at least, that's what I was trying to do when nesting it
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:36
yes
Amit Patel
@AmitP88
Jun 22 2017 20:37
@Dhrumit14 damn, yours looks a lot more complicated than mine lol
I'm also trying not to use jQuery, as I want to get really good at vanilla JS first
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:38
yes it's
oh okay.
Amit Patel
@AmitP88
Jun 22 2017 20:39
I have no idea what I'm missing or what I'm doing wrong to get the weather data to show up on console
hmmm, ok, I tried calling appendWeather and I get an error "cannot read property of readyState of undefined" https://codepen.io/AmitP88/pen/oWVjqL?editors=0010
teevik
@teevik
Jun 22 2017 20:47
@AmitP88 Why not use JQuery?
Amit Patel
@AmitP88
Jun 22 2017 20:47
@teevik I'm actually trying to stay away from jQuery for now. I want to get really good at vanilla JS first before I start using that
CallMeOrange
@EgnaroDev
Jun 22 2017 20:49
@teevik hey fish
teevik
@teevik
Jun 22 2017 20:50
:fish:
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:50
Does anyone know how to avoid "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access" ?
I'm getting this error while calling weather api from search button
Sorry * wiki api
not weather
teevik
@teevik
Jun 22 2017 20:51
@Dhrumit14 You could either use JSONP while fetching, or use https://crossorigin.me/ which will slow down the request
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:52
@teevik : I am calling wiki api using Jquery
Brett Armstrong
@brar3449
Jun 22 2017 20:52
I have a really basic question that I just can't figure out. I am trying to add z-depth to a div container. This is for the portfolio project, but I've only just started. I know I need to add the class somewhere but no where I put it has any effect. Here is what I have in codepen atm. https://codepen.io/brar3449/pen/xrrebO
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:52
so would you able to give some idea how I can use JSONP
?
teevik
@teevik
Jun 22 2017 20:52
You using $.getJSON ?
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 20:53
yes
@AmitP88 Haven't really checked it thoroughly, but looks like you need to change it to work asynch
Amit Patel
@AmitP88
Jun 22 2017 20:59
@teevik hmmm, I wrote true on both the location and weather GET requests though
teevik
@teevik
Jun 22 2017 20:59
1 sec
Yeah, no idea
Amit Patel
@AmitP88
Jun 22 2017 21:02
@teevik hmmm, yeah, looks like I'll have to do that. I wanted to try writing it in vanilla JS first to get a better understanding of the process, but idk
Dhrumit Thakkar
@Dhrumit14
Jun 22 2017 21:02
@teevik : still getting the same error
teevik
@teevik
Jun 22 2017 21:03
What are you doing?
CallMeOrange
@EgnaroDev
Jun 22 2017 21:05
Need help with switch statements
Here's my code

function caseInSwitch(val) {
  var answer = "";
switch (val) {
    case "alpha":
    answer = 1;
    break;    
}


  return answer;  
}

caseInSwitch(1);
Why doesnt it return 1?
teevik
@teevik
Jun 22 2017 21:06
case "alpha"
CallMeOrange
@EgnaroDev
Jun 22 2017 21:06
"alpha" I meant
Wrong quote?
teevik
@teevik
Jun 22 2017 21:07
You are checking if val == "alpha", you are setting val = 1
CallMeOrange
@EgnaroDev
Jun 22 2017 21:08
got it thanks @teevik
CamperBot
@camperbot
Jun 22 2017 21:08
mctwodigitzero sends brownie points to @teevik :sparkles: :thumbsup: :sparkles:
:cookie: 167 | @teevik |