These are chat archives for FreeCodeCamp/HelpFrontEnd

15th
Jun 2017
tsully
@tsully
Jun 15 2017 00:01
hmm interesting - OK I'll adapt the code. I'm confused because the darksky website said it would return JSON
Jorge
@OrangeKulture
Jun 15 2017 00:02
JSONP is JSON .. it's just a format some servers use to bypass the problem you are currently experiencing
gabewolf
@gabewolf
Jun 15 2017 00:14
someone send me an email usig m form so i can see if it works
Gulsvi
@gulsvi
Jun 15 2017 00:19
@gabewolf You can test this out yourself. Add a plus sign and a word after your email address for unlimited email addresses all going to the same inbox. http://fieldguide.gizmodo.com/how-to-use-the-infinite-number-of-email-addresses-gmail-1609458192
Hello @OrangeKulture - long time, by the way :) hope all is well
gabewolf
@gabewolf
Jun 15 2017 00:21
just do it plz if i send it it akes me re confirm it everytime @SkyC0der
Dante M Brown
@Vyceroy
Jun 15 2017 00:22
Hey can someone help me with making a button that scrolls the page on click?
Adel
@AdelMahjoub
Jun 15 2017 00:23
@tsully it did work ith jsonp ?
gabewolf
@gabewolf
Jun 15 2017 00:23
@AdelMahjoub send a email usig my form plz so i can see if it works
Adel
@AdelMahjoub
Jun 15 2017 00:24
@gabewolf I did, got the confirm email message again
Jorge
@OrangeKulture
Jun 15 2017 00:24
Heey @SkyC0der ! hows it going?? yeah defo a long time ..
had some stuff happen on personal side of things, havent done much coding this june .. hopefully it'll pick up now
really wanna finish the front end cert and come close to finishing the back end too
Adel
@AdelMahjoub
Jun 15 2017 00:25
@gabewolf maybe formspree don't work on codepen
Gulsvi
@gulsvi
Jun 15 2017 00:25
@gabewolf That's because you haven't confirmed your email address
gabewolf
@gabewolf
Jun 15 2017 00:26
@SkyC0der ive comfirmed it like a millio times
Gulsvi
@gulsvi
Jun 15 2017 00:26
@gabewolf Nevermind, I just read the documentation, you have to confirm for every URL. Codepen uses a different URL in edit mode every time you refresh the page.
Put your site on github, it will have the same URL every time. Or test it out from Codepen's debug view
Adel
@AdelMahjoub
Jun 15 2017 00:27
@SkyC0der that explains it , thanks
CamperBot
@camperbot
Jun 15 2017 00:27
adelmahjoub sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1705 | @skyc0der |http://www.freecodecamp.com/skyc0der
gabewolf
@gabewolf
Jun 15 2017 00:27
k i just confirmed it again someone due it o debug mode
ive confirmed that
Gulsvi
@gulsvi
Jun 15 2017 00:28
You have to open it in debug mode, confirm it for that URL, then send us the URL to your debug view
gabewolf
@gabewolf
Jun 15 2017 00:29
im just going to quit coding istead
Gulsvi
@gulsvi
Jun 15 2017 00:29
@AdelMahjoub Very cool service it seems, just a lot of anti-spam measures in place. Probably a good thing :)
Jorge
@OrangeKulture
Jun 15 2017 00:30
waaahah
cbot
CamperBot
@camperbot
Jun 15 2017 00:31
you called?
Jorge
@OrangeKulture
Jun 15 2017 00:31
(insert the "well, that escalated quickly" - Ron Burgundy meme)
Gulsvi
@gulsvi
Jun 15 2017 00:34
haha
Christopher Shank
@ChrisShank
Jun 15 2017 00:35
Hey guys I am working on the Random Quote Generator and I am really close to being done! Everything works except there are <p> and </p> tags around my quote when I tweet the quote. I figured that I could just splice out the tags and would be fine, but then javascript doesnt change the href attribute. Any help? Thanks! :smile: https://codepen.io/shankc2323/pen/VWKybY
Gulsvi
@gulsvi
Jun 15 2017 00:40
@ChrisShank If you use .text() in jQuery, it will remove all the HTML for you
Christopher Shank
@ChrisShank
Jun 15 2017 00:43
@SkyC0der thanks, I turns out that you cant splice a string you SLICE a string. Buts thanks for the help!
CamperBot
@camperbot
Jun 15 2017 00:43
chrisshank sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1706 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 00:47
@ChrisShank You can .splice if you .split('') the string first, but splice and slice are not the correct solution to this problem.
(Try tweeting quote ID 992, for example)
CallMeOrange
@EgnaroDev
Jun 15 2017 00:52
@SkyC0der Hey
Can you help me with project?
I just have classes problem
Gulsvi
@gulsvi
Jun 15 2017 00:54
@MCTwoDigitZero Sure, what's up?
gray and gon-thumbnail classes
oh... because of two class attributes?
Yep thats the issues :/
Gulsvi
@gulsvi
Jun 15 2017 00:56
Yes - <div class="text gray">
<div class="box gon-thumbnail">
CallMeOrange
@EgnaroDev
Jun 15 2017 00:57
Yea
I just realized :/
You have seen my project, any suggestions?
ChrisAB74
@ChrisAB74
Jun 15 2017 01:02
image.png
Having some trouble getting my top section to be at the top of my page under my nav bar.
Hayk Simonyan
@hayksim
Jun 15 2017 01:03
Do inspect element from the browser, you might gave extra margins
Gulsvi
@gulsvi
Jun 15 2017 01:06
@MCTwoDigitZero It needs a picture - and a different color for the links. Off to a good start though.
CallMeOrange
@EgnaroDev
Jun 15 2017 01:07
@SkyC0der Yeah Im trying to import different picture for each character section
How do you get different color for links?
in css?

a {
color: blue;
}
Christopher Shank
@ChrisShank
Jun 15 2017 01:08
@SkyC0der thanks , I am a little confused as to what would my selector for .text() be though?
CallMeOrange
@EgnaroDev
Jun 15 2017 01:08
I see that works
Gulsvi
@gulsvi
Jun 15 2017 01:09
@ChrisShank You can use $("#quote") for your selector
$("#quote").htm('<p>Some text</p>')
after that
$("#quote").text() will give you Some text without the <p> tags.
You can also make your quote a variable and do $(myVariable).text() https://stackoverflow.com/questions/7889765/remove-all-htmltags-in-a-string-with-the-jquery-text-function
Christopher Shank
@ChrisShank
Jun 15 2017 01:13
@SkyC0der thanks I will try it out, and get back to you! :smile:
CamperBot
@camperbot
Jun 15 2017 01:13
chrisshank sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: chrisshank already gave skyc0der points
John
@AnonymousLords
Jun 15 2017 01:25
Hello
Anyone here :D?
Christopher Shank
@ChrisShank
Jun 15 2017 01:27
@SkyC0der ya it works, thanks again!!
CamperBot
@camperbot
Jun 15 2017 01:27
chrisshank sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: chrisshank already gave skyc0der points
Gulsvi
@gulsvi
Jun 15 2017 01:28
No problem
@John-freeCodeCamp what's up?
CallMeOrange
@EgnaroDev
Jun 15 2017 01:29
@SkyC0der I feel like you are only helper here
In this room
Gulsvi
@gulsvi
Jun 15 2017 01:32
usually more people are here
CallMeOrange
@EgnaroDev
Jun 15 2017 01:33
Yeah I just feel like
:/
Gulsvi
@gulsvi
Jun 15 2017 01:34
:/
CallMeOrange
@EgnaroDev
Jun 15 2017 01:34
... two persons in different room keeps typing "about @MCTwoDigitZero"
Gulsvi
@gulsvi
Jun 15 2017 01:35
lol
CallMeOrange
@EgnaroDev
Jun 15 2017 01:35
Like everyday
Gulsvi
@gulsvi
Jun 15 2017 01:35
about @MCTwoDigitZero
CamperBot
@camperbot
Jun 15 2017 01:35
:cookie: 159 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 15 2017 01:35
Just once per day
lol
Gulsvi
@gulsvi
Jun 15 2017 01:35
three now haha
CallMeOrange
@EgnaroDev
Jun 15 2017 01:35
In my project, I feel like im missing something
Gulsvi
@gulsvi
Jun 15 2017 01:36
Are you on windows?
CallMeOrange
@EgnaroDev
Jun 15 2017 01:36
no
why?
Gulsvi
@gulsvi
Jun 15 2017 01:37
Oh, I was going to say, you can use ms paint to get the exact colors from that image and then make the rest of your page colors match
CallMeOrange
@EgnaroDev
Jun 15 2017 01:37
Oh
Gulsvi
@gulsvi
Jun 15 2017 01:37
Don't know how to do that on Mac OS
CallMeOrange
@EgnaroDev
Jun 15 2017 01:37
I know a link that can pick a color that match from link
like hex color picker
Gulsvi
@gulsvi
Jun 15 2017 01:37
Maybe chrome does that in debug tools?
CallMeOrange
@EgnaroDev
Jun 15 2017 01:37
Not sure
Gulsvi
@gulsvi
Jun 15 2017 01:38
The green background color doesn't seem right :)
CallMeOrange
@EgnaroDev
Jun 15 2017 01:38
Yeah I think that is what bothering me
First
What do you think about the image?
I will find good background like textures
Gulsvi
@gulsvi
Jun 15 2017 01:39
The image is good
looks like chrome has the color picker in the styles sidebar
CallMeOrange
@EgnaroDev
Jun 15 2017 01:40
I changed background
Background looks amazing but the problem is the text
I think old one is actually better.
Gulsvi
@gulsvi
Jun 15 2017 01:43
Try this color for your hyperlinks: #1883f2
Or #002da3
Or #f74800 for orange lol
CallMeOrange
@EgnaroDev
Jun 15 2017 01:45
for #002da3 I think I should change text color to white
lol I will try orange
I think either #f74800 or second one
Those seem like major colors from the logo
CallMeOrange
@EgnaroDev
Jun 15 2017 01:46
Yeah
I'll pick #1883f2
Thanks @SkyC0der
CamperBot
@camperbot
Jun 15 2017 01:47
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1707 | @skyc0der |http://www.freecodecamp.com/skyc0der
CallMeOrange
@EgnaroDev
Jun 15 2017 01:49
When I finish a list of characters, importing an image for each character section then I might add scrolling
Scrolling for lists only
Gulsvi
@gulsvi
Jun 15 2017 01:50
That could be a nice feature
CallMeOrange
@EgnaroDev
Jun 15 2017 01:51
Yea
I want to learn how to code for scrolling :/ not just copying then paste
Gulsvi
@gulsvi
Jun 15 2017 01:55
I think you'll have to learn jQuery .animate() for that
I'm working on a bouncing ball...and struggling with it to be honest...
CallMeOrange
@EgnaroDev
Jun 15 2017 01:57
@SkyC0der lol good luck with it
Ghost
@ghost~56a80c91e610378809be5d28
Jun 15 2017 02:18
ew don't use JS for animations
shivam gupta
@shivamg11000
Jun 15 2017 02:18
@CodeDraken why not
Ghost
@ghost~56a80c91e610378809be5d28
Jun 15 2017 02:21
You don't need it most of the time
Gulsvi
@gulsvi
Jun 15 2017 02:22
Most objections that deal with absolutes are typically opinionated or misinformed
Always cases for CSS and for JS
shivam gupta
@shivamg11000
Jun 15 2017 02:24
@CodeDraken both have their plus and minus
Long Nguyen
@longnt80
Jun 15 2017 02:32
@SkyC0der that's a good read, thanks!
CamperBot
@camperbot
Jun 15 2017 02:32
longnt80 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1708 | @skyc0der |http://www.freecodecamp.com/skyc0der
lakshmi pallavi
@pallavilakhi9
Jun 15 2017 02:33

Hi everyone , i am trying to get my navigation bar opaque so that while scrolling down it does not show text going down. <div class="container-fluid wrapper">

<div class="row">
<div class="nav col-sm-12">
<a class="name" href="#">Pallavi</a>
<div class="right">
<a href="#About">About</a>
<a href="#Portfolioa">Portfolio</a>
<a href="#Contactme">Contact</a>
</div>
</div>
</div>

</div>
and my css code is
Gulsvi
@gulsvi
Jun 15 2017 02:33
@longnt80 A lot of went over my head lol, but I liked it too. Makes me want to try some of that library
lakshmi pallavi
@pallavilakhi9
Jun 15 2017 02:33
.nav {
width:100%;
margin: 0;
background-color:rgb(255,127,80);
height:50px;
position:fixed;
opacity:1;
}
Please help me out . Thanks
Long Nguyen
@longnt80
Jun 15 2017 02:35
@SkyC0der first time I hear about GSAP
KARIM FARAH
@karimfarahsp48
Jun 15 2017 02:35
Guys. I don't understand what I will do in this project. Can you explain it to me
German Gamboa Gonzalez
@germangamboa95
Jun 15 2017 02:35
is the issue with animations on CSS mainly support on IE?
KARIM FARAH
@karimfarahsp48
Jun 15 2017 02:36
The project's name is "Build a personal portfolio webpage"
Long Nguyen
@longnt80
Jun 15 2017 02:37
@germangamboa95 I think they have limits too compared to js animation
@germangamboa95 but for most cases, they're good enough
Gulsvi
@gulsvi
Jun 15 2017 02:39
I think for really great animations, we need to be looking at WebGL but that's probably overkill for most of the stuff we're trying here
German Gamboa Gonzalez
@germangamboa95
Jun 15 2017 02:40
@SkyC0der Thanks for the article.
CamperBot
@camperbot
Jun 15 2017 02:40
germangamboa95 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1710 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 02:40
I don't think CSS can compare with WebGL on most levels as far as capabilities and performance go, but I'm a noob at this stuff
German Gamboa Gonzalez
@germangamboa95
Jun 15 2017 02:41
guys I made a place holder for my portfolio site germangamboa.com. The only issue I found is getting the icons to stay in the center of the picture. Any help?
Long Nguyen
@longnt80
Jun 15 2017 02:41
I just started looking into canvas
@germangamboa95 looks like it's in the center to me, no?
@germangamboa95 wait, I see the problem
German Gamboa Gonzalez
@germangamboa95
Jun 15 2017 02:46
yep lol.
Long Nguyen
@longnt80
Jun 15 2017 02:52
Maura
@mloew1
Jun 15 2017 02:57
I am also having trouble with centering! I'm working on my first project, the tribute page: https://codepen.io/maural/pen/BZLMYO
Long Nguyen
@longnt80
Jun 15 2017 03:00
@mloew1 what's not centered?
Maura
@mloew1
Jun 15 2017 03:01
Well, the image sticks out to the left side of the header text
But not the right
But now that you ask, I'm having trouble figuring that out too
I think it's the image
The image also isn't responsive if I make my browser window narrower
Mukul Agrawal
@mukul09
Jun 15 2017 03:06
@mloew1 add BootStrap 3 to your code
to make image responsive
Long Nguyen
@longnt80
Jun 15 2017 03:07

@mloew1 change this:

<div class="col-md-2"></div>
    <div class="col-md-8">
      <img class="img-responsive" src=http://www.azquotes.com/picture-quotes/quote-i-was-captured-for-life-by-chemistry-and-by-crystals-dorothy-hodgkin-71-12-96.jpg></div>
    <div class="col-md-2"></div>

to this:

<div class="col-md-12" style="text-align:center">
      <img class="img-responsive" src=http://www.azquotes.com/picture-quotes/quote-i-was-captured-for-life-by-chemistry-and-by-crystals-dorothy-hodgkin-71-12-96.jpg>
    </div>
Mukul Agrawal
@mukul09
Jun 15 2017 03:07
@mloew1 the link of the image should be double quotes ("")
Maura
@mloew1
Jun 15 2017 03:07
@mukul09 Perfect! I had added Bootstrap 4
Mukul Agrawal
@mukul09
Jun 15 2017 03:08
@mloew1 :+1:
Maura
@mloew1
Jun 15 2017 03:10
@longnt80 Now it's left-aligned, which seems weird
CallMeOrange
@EgnaroDev
Jun 15 2017 03:11
@gabewolf programmer not programer
Incorrect spell
denizenofcode
@denizenofcode
Jun 15 2017 03:12
Can someone please explain why it isn’t displaying weather.time? It is fetching “undefined”.
Long Nguyen
@longnt80
Jun 15 2017 03:13
@mloew1 remove class="img-responsive" on img seems to work
Maura
@mloew1
Jun 15 2017 03:14
That's true
Johnny
@jtan3
Jun 15 2017 03:17
@denizenofcode
$.getJSON( "https://api.darksky.net/forecast/98a838431653b09632986332015ef863/" + latitude + "," + longitude + "?callback=?", function(data){ console.log(data.timezone) }); try this
gabewolf
@gabewolf
Jun 15 2017 03:20
i cant seem to get my imgs or contact info to center someone help plz https://codepen.io/gabewolf3880/pen/dWepPO
denizenofcode
@denizenofcode
Jun 15 2017 03:20
@jtan3 , thank you so much. I thought I was supposed to replace the “function(data)” with my own custom function and it messed me up.
CamperBot
@camperbot
Jun 15 2017 03:20
denizenofcode sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 409 | @jtan3 |http://www.freecodecamp.com/jtan3
Ken Haduch
@khaduch
Jun 15 2017 03:24
@gabewolf - you are loading Bootstrap V4 (codepen's current setting for the Bootstrap quick adds) but using img-responsive which is a v3 class, you can load v3 and use those settings, or refer to the migration document to see the differences between 3 and 4. https://v4-alpha.getbootstrap.com/migration/ - where you can find the highlights of the V3 to V4 bootstrap modifications.
also, you do not want to have the </style> and </head> closing tags in your CSS panel. Just CSS code.
and get those <html> and <body> tags out of the HTML panel, too. Only the "body" code should be in the HTML panel, that is what CodePen requires.
gabewolf
@gabewolf
Jun 15 2017 03:30
k i chaged it to v4 command did not do anything
@khaduch
Ken Haduch
@khaduch
Jun 15 2017 03:35
what do you mean?
Johnny
@jtan3
Jun 15 2017 03:38
@gabewolf try putting each section in its own <div class="container"></div>
Gulsvi
@gulsvi
Jun 15 2017 03:40
@gabewolf Click the gear icon for your HTML panel and change your HTML preprocessor to "None". It's set to "Pug" right now.
Use text-center to center text, use d-block mx-auto to center images in Bootstrap 4.
Remove </style> and </head> from your CSS panel
gabewolf
@gabewolf
Jun 15 2017 03:53
if i take off pug my sectios stop working rendering my navbar useless @SkyC0der
Gulsvi
@gulsvi
Jun 15 2017 03:54
@gabewolf Pug is a HTML templating language - we don't learn it here at Free Code Camp. If you're studying it and trying to use it, by all means, switch it back.
Otherwise, I'd recommend implementing your code with pure HTML like we learn here
gabewolf
@gabewolf
Jun 15 2017 03:54
now my contact section went to a weird place @SkyC0der
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:00
Could any one help me with how to add a tweet to my random quote machine? I can add a tweet bird and link it to twitter, but the big problem is how to get it to tweet the quote.
Gulsvi
@gulsvi
Jun 15 2017 04:05
@gabewolf You have some CSS conflicts, along with a mix of pug and regular HTML causing some issues. You will need to clean that up.
Start simple - get your navbar the way you want. Add one section at a time after that.
It's okay to create each part of your page in separate codepen projects and then copy/paste it all together
Long Nguyen
@longnt80
Jun 15 2017 04:06
gabewolf
@gabewolf
Jun 15 2017 04:07
im so tired of this stupid site and stupid projects i QUIT @SkyC0der
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:07
Thanks @longnt80 !
CamperBot
@camperbot
Jun 15 2017 04:07
mrbaker1917 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 376 | @longnt80 |http://www.freecodecamp.com/longnt80
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:07
I looked repeatedly for that.
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:13
Actually, the link on that page brought me back to a page I tried using before: publish.twitter.com. The problem there is I cannot figure out what from their list I would like to embed. The choices are very limited, and they do not include a quote.
Long Nguyen
@longnt80
Jun 15 2017 04:15
@mrbaker1917 sorry, I haven't used the tweet button though, twitter is not popular where I come from so I didn't inlude it in my quote machine
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:15
That is great for you! Where are you from?
Long Nguyen
@longnt80
Jun 15 2017 04:15
Vietnam
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:15
I want to go to there!
Gulsvi
@gulsvi
Jun 15 2017 04:15
@mrbaker1917 This is the URL to use for tweeting the word "hello"
https://twitter.com/intent/tweet?text=hello
For your quote machine, the challenge is to replace the word hello from above with your quote text.
In the end, you'll have a link that looks like a twitter button with a href= to an URL like that one
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:16
Just another reason to go to Vietnam; I have accumulated several others already.
Thanks, @SkyC0der !
CamperBot
@camperbot
Jun 15 2017 04:18
mrbaker1917 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1711 | @skyc0der |http://www.freecodecamp.com/skyc0der
Long Nguyen
@longnt80
Jun 15 2017 04:19
@mrbaker1917 the reason is no twitter?
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:19
One of them, a new one.
I do not like twitter.
Long Nguyen
@longnt80
Jun 15 2017 04:20
@SkyC0der hey, can you explain this piece of code: https://repl.it/ISo5/7
why it logged out all 10
Gulsvi
@gulsvi
Jun 15 2017 04:22
@longnt80 It's because the loop finishes before the setTimeout runs. If you change var to let it will work as expected.
var count = "";
var doSomething = function(i) {
  console.log(i);
};

// First example - result is always the highest value - 10
for (let i = 0; i < 10; i++){
  setTimeout(doSomething(i), 100)
}
Long Nguyen
@longnt80
Jun 15 2017 04:24
@SkyC0der how can i get to 10?
Gulsvi
@gulsvi
Jun 15 2017 04:26
@longnt80 I forget all the technical details behind it - it has to do with rebinding the value
Long Nguyen
@longnt80
Jun 15 2017 04:26
@SkyC0der this also give the correct value:
var doSomething = function() {
  console.log(i);
};
  // First example - result is always the highest value - 10
  for (var i = 0; i < 10; i++){
    setTimeout( doSomething(), 100)
  }
it has to do with closures I guess
Long Nguyen
@longnt80
Jun 15 2017 04:27
@SkyC0der thanks, I've been searching for it
CamperBot
@camperbot
Jun 15 2017 04:27
longnt80 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1712 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 04:28
I don't know why your second piece of code works...
Long Nguyen
@longnt80
Jun 15 2017 04:28
yeah, the guy gave me this code said it has to do with closures
but I'm not sure how
Gulsvi
@gulsvi
Jun 15 2017 04:29
I'm curious how the other function knows about i
Long Nguyen
@longnt80
Jun 15 2017 04:29
the last example he uses var and something similar to what I did above: doSomething()
I took out all the param and variable but it still works
Gulsvi
@gulsvi
Jun 15 2017 04:31
No idea why lol
Long Nguyen
@longnt80
Jun 15 2017 04:31
no clue why
Gulsvi
@gulsvi
Jun 15 2017 04:31
I only use var and const now - and this problem is something I don't hit with those
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:32
@SkyC0der Is the idea that I am supposed to adapt that page you kindly linked for me to my random quote machine page or to incorporate some of the code from it into my page? I know I need to change the initial content, just confused about the way to do it.
Gulsvi
@gulsvi
Jun 15 2017 04:33
@mrbaker1917 Neither, really. It's only a matter of updating the text at the end of the link with your quote text.
Long Nguyen
@longnt80
Jun 15 2017 04:34
@SkyC0der btw, in the repl https://repl.it/ISo5/10
in the console, what is the green arrow output?
in this repl it said => 11, what is it?
Gulsvi
@gulsvi
Jun 15 2017 04:34
When you get a new quote, you have to write HTML to show the quote.
When you write that quote, you can also add the HTML for your link at the same time. @mrbaker1917
@longnt80 I'm not sure - I don't use repl.it :/
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:36
But I am not writing the quotes each time; I am using a switch statement to vary them.
Gulsvi
@gulsvi
Jun 15 2017 04:36
@mrbaker1917 Maybe "write" isn't the correct verb. When you show the next quote on your page.
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:37
I see, sort of. but I do not really understand what I am supposed to do with the page you linked. Is it just an example?
Gulsvi
@gulsvi
Jun 15 2017 04:38
@mrbaker1917 Yes, it's an example. Here's another example:
https://twitter.com/intent/tweet?text=hello, how are you @mrbaker1917?
All of your quote text goes after the = sign in that link
Then it will take your visitors to a page where they can tweet the quote
The example quote machine for the project should take you to the same page
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:44
Great. Thank you! Can the hello be replaced with an id?
Gulsvi
@gulsvi
Jun 15 2017 04:46
It will need to be text - if that ID is a variable representing text it will work
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:49
Hmm, would it be better to create a separate tweet variable in the js section, and add it to the cases for the switch statement?
Gulsvi
@gulsvi
Jun 15 2017 04:52
If you already have a quote and an author variable, you only need to add those to your link
'https://twitter.com/intent/tweet?text=' + quote + ' -' + author
You could certainly create another variable for that, however. Just not necessarily better or necessary
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:53
in your code are "quote" and "author" my ids for those variables in the switch statement?
Gulsvi
@gulsvi
Jun 15 2017 04:55
they are variables representing the text of the quote you show on the page and the author associated with that quote
Mark R. Baker
@mrbaker1917
Jun 15 2017 04:56
Great! Thanks, Sky!
Do I need a closing quotation mark at the end of that?
Gulsvi
@gulsvi
Jun 15 2017 04:59
No, but that's just an example of a string representing the URL. Trying to give a hint without giving the exact code - more is needed to complete this part of the project.
Mark R. Baker
@mrbaker1917
Jun 15 2017 05:00
OK, as I wrote earlier, what I would really like is a link to a resource where this aspect of web design is discussed. I wan tto learn how to do this, not just how to complete this challenge.
Gulsvi
@gulsvi
Jun 15 2017 05:03
@mrbaker1917 This is where you will need to start: https://api.jquery.com/category/manipulation/
All of those methods allow you to manipulate the HTML as needed for your intended design
Botenga
@Botenga
Jun 15 2017 05:03
https://codepen.io/Botenga/pen/wdEjdJ
hey guys I need some help i am having issues with align my text to the left near my bootstrap symbol can anbody help
Mark R. Baker
@mrbaker1917
Jun 15 2017 05:05
Thanks, Sky! That link does not open here in Istanbul, but could be the Turkish government blocked it for some arbitrary, unknown reason.
Gulsvi
@gulsvi
Jun 15 2017 05:05
That is really unfortunate :( it is very important information for understanding how to use jQuery and I'm not aware of an alternate
Mark R. Baker
@mrbaker1917
Jun 15 2017 05:06
I just have to turn on my vpn, no big deal.
Long Nguyen
@longnt80
Jun 15 2017 05:08
@mrbaker1917 what, blocking jQuery?
Mark R. Baker
@mrbaker1917
Jun 15 2017 05:10
yes, weird, but the Turkish government's reasons for doing most things are obscure and illogical.
Works now.
with the vpn
prakash chandra yadav
@prakashyadav008
Jun 15 2017 06:25
nice one @Botenga
can someone show me their portfolio page for ..so i get an idea
Botenga
@Botenga
Jun 15 2017 06:32
@prakashyadav008 just go t code pen and search up portfolio and some will pop up
they will give you a good idea of how you want your portfolio to look
prakash chandra yadav
@prakashyadav008
Jun 15 2017 06:35
I am a machine learning engineer and was working as an intern building algorithms
but i am interested in web development also so i found freecodecamp
Botenga
@Botenga
Jun 15 2017 06:38
you know what that sounds like
?
more opportunities smiley face
:smile:
走你飛艇
@gofighting123
Jun 15 2017 07:01
could someone tell me how to call vuex methods recursively?
i got a problem call stack exceed maxmium.
Michael Schmidt
@lafisrap
Jun 15 2017 07:07
@gofighting123 You have some code?
走你飛艇
@gofighting123
Jun 15 2017 07:08
@lafisrap hold on :)
走你飛艇
@gofighting123
Jun 15 2017 07:25
export default {
  name: 'add',
  mixins: [original],
  method: {
    this.combinations(arr, 3)
  },
  polynomial(n, m) {
      return (this.factorial(n) / this.factorial(n - m))
  },
  combinations(n, m) {
      return this.polynomial(n, m) / this.factorial(m)
  },
  factorial(n) {
      if (n === 1 || n === 0) {
          return 1
      } else {
          return n * this.factorial(n - 1)
      }
  }  
}
i got error Maximum call stack size exceeded.
Michael Schmidt
@lafisrap
Jun 15 2017 07:29
@gofighting123 n is arr, might be undefined, and will never be 1 or 0 so it loops endlessly.
@gofighting123 Put a console.log(n) into the factorial loop and see.
走你飛艇
@gofighting123
Jun 15 2017 07:30
working on it
you got it....it's NaN.....
@lafisrap in vue it got first array and the others all ware NaN
Michael Schmidt
@lafisrap
Jun 15 2017 07:34
@gofighting123 Array can't be multiplicated ;-)
走你飛艇
@gofighting123
Jun 15 2017 07:40
@lafisrap thanks, i should pass the arr.length
CamperBot
@camperbot
Jun 15 2017 07:40
gofighting123 sends brownie points to @lafisrap :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @lafisrap |http://www.freecodecamp.com/lafisrap
走你飛艇
@gofighting123
Jun 15 2017 07:43

my another question is how can i use this codes in es6

        combine: function(list, num, last) {
            var result = [],
                i = 0;
            last = last || [];
            if (num == 0) {
                return [last];
            }
            for (; i <= list.length - num; i++) {
                result = result.concat(arguments.callee(list.slice(i + 1), num - 1, last.slice(0).concat(list[i])));
            }
            return result;
        }

i found the es6 alternative callee, but i can't find one answer

Michael Schmidt
@lafisrap
Jun 15 2017 07:47
Sorry, have to go ... Stackoverflow looks good, but I don't know what you want to achieve,
走你飛艇
@gofighting123
Jun 15 2017 07:48
thanks : )
Winston Young
@winston-young
Jun 15 2017 07:49
Hello, I'm working on the Tic Tac Toe project. The game basically works, but I am trying to get the computer to check each empty spot (1-9) to see if it will win the game, based on a specified array of winning combinations. My problem: I can only check the first in the list of blank spots: https://codepen.io/winstonyoung92/pen/KqMbKZ
Any advice, or a way to simplify the logic would be much appreciated!
alpox
@alpox
Jun 15 2017 08:13
@winston-young
Usually its done the way that you'd use indices for the whole board to specify positions on the board
This would lead to a winningHand of:
[
      [0, 1, 2],
      [3, 4, 5],
      [6, 7, 8],
      [0, 3, 6],
      [1, 4, 7],
      [2, 5, 8],
      [0, 4, 8],
      [2, 4, 6]
    ]
@winston-young And you would keep the full state of the board only in one array instead of in 3 or so
@winston-young Ok now that i told you how its usually done, i'll take another look to get a way for you with which you wouldn't have to rewrite other logic :D hold on
alpox
@alpox
Jun 15 2017 08:20
@winston-young In your case you can put the for loops right into each other, create one variable in the outer loop which is a boolean and specifies if all 3 in a row are set. Then in the inner loop you would set the variable to false if one spot is not found - and evaluate the win after the inner loop:
for(var i....) {
    var isWin = true;
    for(var j....) {
        if(hand.indexOf(winningHand[i][j]) === -1)
            isWin = false;
    }
    if(isWin) {
        // Player won
        return; // Exit
    }
}
Buhaianu Remus
@Remus432
Jun 15 2017 10:09
Hey guys who can help me with some issues regarding the local weather app api?
Ben said
@BenSaidRachid
Jun 15 2017 10:55
hi all,the color doesn't fill the fiv to the right,why?and it does for the first div?
Mbonu Basil
@mbonubasil
Jun 15 2017 11:11
Hello all, am having issues with my navbar; the navbar-toggle is not working, pls help<nav>
<div class="navbar navbar-default navbar-fixed-top" id="navbar-color">
<div class="container">
<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 href="" class="navbar-brand">CoreHouse</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about-ref">About</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</div>
</div>
</nav>
Rodi
@rodiw
Jun 15 2017 11:19
@mbonubasil Do you mean when it shrinks the icon dosen't show up? or is there something else?
@mbonubasil I think you're missing two things. First, link to the the Bootstrap JS library. Second, you're missing a link to the jQuery library.
Will Waymel
@willwaymel
Jun 15 2017 11:24
@abdel974 are you talking about the color filling vertically?
odinolini
@odinolini
Jun 15 2017 11:30
Hey total noob question here... Trying to make a 4x4 grid with bootstrap, but why is there such a large space between my rows? What is the correct way of making them all fit together? https://codepen.io/odinolini/pen/gRLOdV
Mbonu Basil
@mbonubasil
Jun 15 2017 11:32
@rodiw yes. when I shrink it to mobile size, the tooggle didn't work
Will Waymel
@willwaymel
Jun 15 2017 11:37
more centering with flexbox questions.... I have this almost how I want it. except I want the timer text to be centered within the circle and the text above it that says "Start!! to be between it and the top.... any ideas? currently using flexbox to center them with margin: auto; https://codepen.io/willwaymel/pen/XgKRRj
@odinolini you made 4 boxes that were 100px each of color
Ben said
@BenSaidRachid
Jun 15 2017 11:38
@willwaymel yes i was talking about this,but i found the answer,it fixed nox,thanks for your concern
CamperBot
@camperbot
Jun 15 2017 11:38
abdel974 sends brownie points to @willwaymel :sparkles: :thumbsup: :sparkles:
:cookie: 301 | @willwaymel |http://www.freecodecamp.com/willwaymel
Rodi
@rodiw
Jun 15 2017 11:39
@mbonubasil It works for me when I have linked both the Bootstrap JS and jQuery. What bootstrap version are you using? Try these lines in your html file; at the bottom of your <body> tag.
 <!-- jQuery JS -->
  <script src="https://code.jquery.com/jquery-3.2.1.min.js" 
    integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="   
    crossorigin="anonymous"></script>
  <!-- Bootstrap JS -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"  
    integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" 
    crossorigin="anonymous"></script>
Will Waymel
@willwaymel
Jun 15 2017 11:41
@odinolini ok... try this.
            <div class="col-md-6 one">
                <div class="one"></div>
            </div>
            <div class="col-md-6 two">
                <div class="two"></div>
Mbonu Basil
@mbonubasil
Jun 15 2017 11:44
@odinolini I added a row for you. just look into it.
odinolini
@odinolini
Jun 15 2017 11:44
@willwaymel Thanks! I removed my "extra" divs (the one, two three four) and added the one two classes to the col-divs. that appears to be right
CamperBot
@camperbot
Jun 15 2017 11:44
odinolini sends brownie points to @willwaymel :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @willwaymel |http://www.freecodecamp.com/willwaymel
Mbonu Basil
@mbonubasil
Jun 15 2017 11:46
@rodiw am using bootstrap 3.3.7 offline not the CDN. Let me try with the CDN link
@rodiw thanks, you just saved my day. The issue was that I didn't reference the correct path to my bootstarp.js file properly. Thanks once again
CamperBot
@camperbot
Jun 15 2017 11:49
mbonubasil sends brownie points to @rodiw :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @rodiw |http://www.freecodecamp.com/rodiw
Long Nguyen
@longnt80
Jun 15 2017 11:50

@willwaymel

more centering with flexbox questions.... I have this almost how I want it. except I want the timer text to be centered within the circle and the text above it that says "Start!! to be between it and the top.... any ideas? currently using flexbox to center them with margin: auto;

you can use position:absolute combined with transform:translate

Mbonu Basil
@mbonubasil
Jun 15 2017 11:51
@rodiw please how did you add that code environment with code to this chat group?
Rodi
@rodiw
Jun 15 2017 11:52
@mbonubasil That's great! I always messed up the pathing so i started to use CDN all the time. For adding the code in the chat you use "```" over and under the text you want to codeify
Mbonu Basil
@mbonubasil
Jun 15 2017 11:53
wonderful, thanks once again
Rodi
@rodiw
Jun 15 2017 11:54
No problem, have a great day!
Mbonu Basil
@mbonubasil
Jun 15 2017 11:54
you too
Marcus Zierke
@marcuszierke
Jun 15 2017 11:57
hey guys, quick question: I am trying to code the RANDOM QUOTE GENERATOR. Let me show you my code first:
            $(document).ready(function() {
                var quotPick = quotes[Math.floor(Math.random()*quotes.length)];
                $("#click").click(function() {
                    $("#text").text(quotPick);
                });
                $("#tweet").click(function() {
                    window.open('https://twitter.com/intent/tweet?hashtags= californication, hankmoody&text='   + quotPick);
                });
            });
it's about the var quotPick
if I code it like that I can obviously just generate one quote, same if I define the var before the $(document) ...
if I define it within both click events I will get a different quote displayed then exported to twitter
question is where / how do I have to define var quotPick so it's global / the same for both click events?
Fred
@JangoG
Jun 15 2017 12:01
I am still doing my best and am starting to see the light on few things. Still a long journey to understand the big picture, but I keep going :-)
Still stuck on some CSS things..for example why my float right button is not working? etc etc
https://codepen.io/JangoF/pen/WOoewg
Will Waymel
@willwaymel
Jun 15 2017 12:05
@longnt80 would I have to specify a fixed position for the transform: translate?
h1tag
@h1tag
Jun 15 2017 12:06
@marcuszierke to define a global var, you have to define it outside of any code blocks {}
Marcus Zierke
@marcuszierke
Jun 15 2017 12:15
@h1tag that's what I thought so I defined it within the <script> ... but the problem seems to be that it just gets defined once and not over and over again (I am talking about the random() function)
tsss85
@tsss85
Jun 15 2017 12:19
Hi,
i 've a problem with the random quote machine.
I can not import the JSON file found on this API https://quotesondesign.com/api-v4-0/
My pen : https://codepen.io/tsss85/pen/WOwVya/
Will Waymel
@willwaymel
Jun 15 2017 12:21
@tsss85 change your url to https
@tsss85 tip -- hit control + shift + c on your browser to open the console log and view errors
tsss85
@tsss85
Jun 15 2017 12:23
@willwaymel thanks you, i'll try !
CamperBot
@camperbot
Jun 15 2017 12:23
tsss85 sends brownie points to @willwaymel :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @willwaymel |http://www.freecodecamp.com/willwaymel
tsss85
@tsss85
Jun 15 2017 12:25
@willwaymel it works !
Will Waymel
@willwaymel
Jun 15 2017 12:25
@tsss85 :)
tsss85
@tsss85
Jun 15 2017 12:25
@willwaymel thank's
CamperBot
@camperbot
Jun 15 2017 12:25
tsss85 sends brownie points to @willwaymel :sparkles: :thumbsup: :sparkles:
:warning: tsss85 already gave willwaymel points
Tom Robinson
@tomerobin
Jun 15 2017 12:29
i've got a question for the quote generator too, I am using the wikiquotes API to pull from some pages i like. however the call never produces a success, even thought he url itself will when typed in a browser. Here's my codepen: https://codepen.io/tomerobe/pen/mwdvpR?editors=0010
Faiz Ahmed
@Faiz7412
Jun 15 2017 12:33
Hi! I'm trying to implement this
https://codepen.io/dudleystorey/pen/kiajB
multiple galleries within divs in a single page. I replaced the #carousel and #spinner ids with classes of the same name in html and css as well as js. What am i doing wrong/?
Ramesh
@rnallu
Jun 15 2017 12:38
Hi guys, Can any one help with this, how to do auto complete with this data. My code as follows:

var data = [

  {
    "city_id": "375dd5879001acbd84a4683dedfb933e",
    "city_url": "Montreal,Quebec,Canada",
    "full_name": "Montreal, Quebec, Canada"
  },
  {
    "city_id": "375dd5879001acbd84a4683dedaab0e1",
    "city_url": "Montevideo,Montevideo,Uruguay",
    "full_name": "Montevideo, Departamento de Montevideo, Uruguay"
  },
  {
    "city_id": "1bd27fec73a7b466133eaba87d314682",
    "city_url": "Monterrey,NuevoLeon,Mexico",
    "full_name": "Monterrey, Nuevo León, Mexico"
  },
  {
    "city_id": "8359ea19b60b6c5b8200638f641fc77f",
    "city_url": "Monchengladbach,GallicEmpire,Germany",
    "full_name": "Mönchengladbach, Gallic Empire, Germany"
  }

  ]



$(document).ready(


  function () {

    $( "#fromDest, #toDest" ).autocomplete({

      source:data,
      autoFocus: true ,
      minLength: 2

    });
  }

);
I need to take only full name
Eric Weiss
@eweiss17
Jun 15 2017 12:40
your function is wrong, there can be no spaces between function and the ()
Toby Pagan
@WarMonkeyX
Jun 15 2017 12:43
Hey everyone, I'm having a weird problem in html/css. I have 3 inline-blocks and the actual blocks are aligned, but the content inside the 3rd block is moved below and to the left of the screen. Any ideas what could cause this?
Ramesh
@rnallu
Jun 15 2017 12:45
@eweiss17 Ohh thanks, n what about the code
CamperBot
@camperbot
Jun 15 2017 12:45
rnallu sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 478 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Ramesh
@rnallu
Jun 15 2017 12:45
@WarMonkeyX code?
i only have it in codepen at them moment, its for practice.
Eric Weiss
@eweiss17
Jun 15 2017 12:47
I am not familar with autocomplete. is it from jquery?
Ramesh
@rnallu
Jun 15 2017 12:51
@eweiss17 yep
Long Nguyen
@longnt80
Jun 15 2017 12:52
@WarMonkeyX you tag is closed at the wrong place
@WarMonkeyX <article class="service-windows"></article>
Toby Pagan
@WarMonkeyX
Jun 15 2017 12:53
wow haha thanks @longnt80 , just a mental mistake as usual
CamperBot
@camperbot
Jun 15 2017 12:53
warmonkeyx sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
Jun 15 2017 12:55
@WarMonkeyX happens to all off us
Eric Weiss
@eweiss17
Jun 15 2017 12:55
@rnallu hmmm... are you sure you can use objects for it?
The datasource is a simple JavaScript array,
again, i have never used it before, if you know you can then say so
I believe you also need a ; after your ]
Ramesh
@rnallu
Jun 15 2017 12:58
@WarMonkeyX your article tag is closed before the heading
rajaaa216
@rajaaa216
Jun 15 2017 12:58
Hi I need help in creating portfolio project
im trying to create nav-tabs
but when i put the code in it doesn't come out right?
Eric Weiss
@eweiss17
Jun 15 2017 13:00
i'm assuming you are using bootstrap, did you make sure you included it
rajaaa216
@rajaaa216
Jun 15 2017 13:01
@eweiss17 yes is it bootstrap 3 or bootstrap 4?
Eric Weiss
@eweiss17
Jun 15 2017 13:02
you tell me
rajaaa216
@rajaaa216
Jun 15 2017 13:02
@eweiss17 im not sure which one is the right one?
@eweiss17 I picked bootstrap 3
Eric Weiss
@eweiss17
Jun 15 2017 13:05
I believe nav-tabs would be on version 3 and 4....
Tom Robinson
@tomerobin
Jun 15 2017 13:06
@tomerobin Just responding to my own question in case anyone else encounters the same issue: cross domain requests are not allowed with AJAX in JSON format, you either have to useJSONP - datatype: "jsonp" or set an origin: using CORS
Eric Weiss
@eweiss17
Jun 15 2017 13:07
you probably have some syntax off, post your pen
Tai Jones
@taiJones00
Jun 15 2017 13:09
Does anybody else have trouble linking to images on their own computer on codepen
Eric Weiss
@eweiss17
Jun 15 2017 13:11
you have to post your image in a hosting site
Yanek Yuk
@yanekyuk
Jun 15 2017 13:12
Hey everybody. This is for tictactoe project . I don't know for how many days I'm trying to fix this it seems like I am making it worse everytime I try. It was working without AI making the moves for the human player. I tried for loop, swicth statement, while loop to write every AI code from stratch to catch what I'm missing. So far, It's only worse than before. At least the code is way more readable. I'd be very happy if any of you guys hinted me about the problem.
Ramesh
@rnallu
Jun 15 2017 13:20
Hi guys, Can any one help with this, Its getting auto complete with this data, but its not filtering , its showing all the 4 objects. My code as follows:
var data = [

  {
    "city_id": "375dd5879001acbd84a4683dedfb933e",
    "city_url": "Montreal,Quebec,Canada",
    "full_name": "Montreal, Quebec, Canada"
  },
  {
    "city_id": "375dd5879001acbd84a4683dedaab0e1",
    "city_url": "Montevideo,Montevideo,Uruguay",
    "full_name": "Montevideo, Departamento de Montevideo, Uruguay"
  },
  {
    "city_id": "1bd27fec73a7b466133eaba87d314682",
    "city_url": "Monterrey,NuevoLeon,Mexico",
    "full_name": "Monterrey, Nuevo León, Mexico"
  },
  {
    "city_id": "8359ea19b60b6c5b8200638f641fc77f",
    "city_url": "Monchengladbach,GallicEmpire,Germany",
    "full_name": "Mönchengladbach, Gallic Empire, Germany"
  }

  ]



$(document).ready(function() {

    $( "#fromDest, #toDest" ).autocomplete({

        source: function (request, response) {
            response($.map(data, function (value, key) {
                return {
                    label: value.full_name,
                    value: value.city_url
                }
            }));

        },      
        autoFocus: true ,
        minLength: 2

    });
  }

);
Jack Lyons
@JackEdwardLyons
Jun 15 2017 13:28
hey guys is there anyone living in australia right now? i have a date/time question about a datepicker that im using on a client website and im currently in america, and i'm not getting proper comparisons because of the different time formats in USA and Australia
capturethemoon
@capturethemoon
Jun 15 2017 14:00
@SkyC0der @khaduch Thanks for help from both of you! I made some more changes to my code yesterday, and came up with something very similar to what SkyC0der made. I just need to adjust the JavaScript and CSS so that the temperature changes from Fahrenheit to Celsius on one click. @khaduch your advice about reading the Skycons documentation was helpful--I looked through it, and suddenly everything
made sense.
CamperBot
@camperbot
Jun 15 2017 14:00
capturethemoon sends brownie points to @skyc0der and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1713 | @skyc0der |http://www.freecodecamp.com/skyc0der
:star2: 2990 | @khaduch |http://www.freecodecamp.com/khaduch
Faiz Ahmed
@Faiz7412
Jun 15 2017 14:05
has anyone here worked with BluImp gallery before? https://blueimp.github.io/Gallery/
BrunoM24
@BrunoM24
Jun 15 2017 14:08
where are you @SkyC0der ?
Miljan Grcic
@Nightimer
Jun 15 2017 14:12
I am currently on Show the Local weather chailenge, and i have question
Miljan Grcic
@Nightimer
Jun 15 2017 14:18
//function that will check if browser supports geolocation, if yes it will execute getCurrentPosition method
function getLocation () {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showLocation);
  } else {
    alert("Geolocation is not avilable");
  }
};

// if getCurrentPosition method is sucesfull 
function showLocation(position) {
  //extracting values from position object and storing them into variables
  var myLatitude = position.coords.latitude;
  var myLongitude = position.coords.longitude;
  // preparing more values to pass into URL for ajax request
  var secretKey = "75c9284a614daa3e35a3d1440f1ef090";
  var unitsSi = "units=si";
  var corsUrl = "https://cors-anywhere.herokuapp.com/";
  // URL that is ready for AJAX request
  var completeUrl = corsUrl + "https://api.darksky.net/forecast/"+secretKey+"/"+myLatitude+","+myLongitude+ "?" + unitsSi;

  //:::::::::AJAX REQUEST::::::::::://
  $.getJSON(completeUrl, gotData);
  //if ajax request is sucesfull, gotData will be executed
};

// request was sucesfull and requested data is stored into gotData parametar "gotData(data)"
function gotData (data) {
  //extract weather conditions from data object
  var temperature = data.currently.temperature;
  //function that will push weather conditions, that are wraped inside div tags, into HTML
  function pushData() {
      $(".test").append("<div class='tempValueHolder'>" + temperature + "</p>");
   };
  //calling function
  pushData();
};

// calling function
getLocation(); 

// ::::::: DATA IS NOW INSIDE HTML :::::: 


var metricUnits = {
  "celsius": {
    "unitSign": "\u2103",
    "valueRecalculate": function ()  {
      var y = $(".tempValueHolder").text();
      var fahrenheitNumber = parseFloat(y);
      var celsiusTemp = ((fahrenheitNumber - 32) * (5 / 9)).toFixed(2);
      return celsiusTemp;
     }
  },
  "fahrenheit": {
    "unitSign": "&#8457",
    "valueRecalculate": function () {
       var x = $(".tempValueHolder").text();
       var celsiusNumber = parseFloat(x);
       var fahrenheitTemp = ((celsiusNumber * 9) / 5 + 32).toFixed(2);
       return fahrenheitTemp;
    }
  }
};


$(".unitButton").html(metricUnits.celsius.unitSign)


// defining function for switching between Celsius and Fahrenheit
var switchVar = 1;
function unitSwitch () {
  if (switchVar === 1) {
    $(".unitButton").html(metricUnits.fahrenheit.unitSign);
    $(".tempValueHolder").html(metricUnits.fahrenheit.valueRecalculate);

    switchVar += 1;
  } else {
    $(".unitButton").html(metricUnits.celsius.unitSign);
    $(".tempValueHolder").html(metricUnits.celsius.valueRecalculate);
    switchVar -= 1;
  };
};

// calling unitSwitch function whenever unitTempButton is clicked
$(".unitButton").on("click", function() {
  unitSwitch();
});
Ken Haduch
@khaduch
Jun 15 2017 14:20
@Nightimer - what is your question, or is it buried somewhere in the code?
@capturethemoon - great!
Tom
@moT01
Jun 15 2017 14:21
ha, i didn't see a question in there either
BrunoM24
@BrunoM24
Jun 15 2017 14:22
Updated! floating point implemented and AC button
https://codepen.io/BrunoM24/full/WObJzw/
Miljan Grcic
@Nightimer
Jun 15 2017 14:23
"valueRecalculate": function () {
  var y = $(".tempValueHolder").text();
  var fahrenheitNumber = parseFloat(y);
  var celsiusTemp = ((fahrenheitNumber - 32) * (5 / 9)).toFixed(2);
  return celsiusTemp;
 }
```
this part here, i dont know is it good practise to take HTML
Scott Mac Donald
@Corinos
Jun 15 2017 14:24
Hey all, something about my initial call to get my geolocation doesn't seem to be firing and I don't know why. I'm sure it's a syntactic issue I don't quite understand. Can I get a hand?
Miljan Grcic
@Nightimer
Jun 15 2017 14:24
then transform it into number, and then work with it
BrunoM24
@BrunoM24
Jun 15 2017 14:25
@Corinos you have this erros showing in the console -> Error: Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.
Ken Haduch
@khaduch
Jun 15 2017 14:25
@Corinos - you have to load jQuery.js and you have something called consoleLog that is not defined. Try console.log
Scott Mac Donald
@Corinos
Jun 15 2017 14:28
@BrunoM24 @khaduch I do have jQuery loaded. I tested by just using $("#where-2").html("test"); outside of the first call and it works.
Tom
@moT01
Jun 15 2017 14:28
@Nightimer you get the temp from the json data so it seems a little much to get it again from the html
Scott Mac Donald
@Corinos
Jun 15 2017 14:29
I did see that error in the browser log as well though, which confused me.
Ken Haduch
@khaduch
Jun 15 2017 14:29
@Corinos - oh, sorry, you have to load jquery.js before you load bootstrap.js, that might be the reason for that error. Also, you have your variable named parsed_jason but are using it as parsed_json.
Miljan Grcic
@Nightimer
Jun 15 2017 14:30
@moT01 That was exactly what i was thinking, it looks like too much
Scott Mac Donald
@Corinos
Jun 15 2017 14:31
@khaduch Awesome, that could be an issue. I did swap the order of Bootstrap and jQuery though and that fixed that error.
Miljan Grcic
@Nightimer
Jun 15 2017 14:31
Should i make temperature global variable?
Tom
@moT01
Jun 15 2017 14:34
one way to go
not sure what the best way would be, ...lot of ways to do things
Ken Haduch
@khaduch
Jun 15 2017 14:35
@Corinos - now you need to figure out what consoleLog is supposed to be doing? I think that you want to use console.log() as the way to output your information to the console.
Scott Mac Donald
@Corinos
Jun 15 2017 14:35
@khaduch Is there something obvious that's wrong with the way I'm calling the navigator and dumping something to a var?
Ken Haduch
@khaduch
Jun 15 2017 14:36
@Corinos - it's just the consoleLog() function that you are trying to use - it doesn't exist. You have to change those to console.log and then it outputs the information to the console.
Scott Mac Donald
@Corinos
Jun 15 2017 14:37
@khaduch Yup, I've updated that and still nothing, heh.
Saved again, just in case.
Ken Haduch
@khaduch
Jun 15 2017 14:37
did you save your pen? Let me reload it and see what you have.
Scott Mac Donald
@Corinos
Jun 15 2017 14:37
I always seem to be missing a basic first step or concept, heh
Ken Haduch
@khaduch
Jun 15 2017 14:38
@Corinos - all lowercase in console.log - you have console.Log with an UPPERCASE L
@Corinos - you really need to use the browser devtools console to see all of the errors - they don't show up in the CodePen Console.
Scott Mac Donald
@Corinos
Jun 15 2017 14:39
@khaduch Yeah, I have them open. Looking now. Of course that upper case L was an issue that moved me ahead.
@khaduch Wow! I didn't think that error with the log would block it from executing the jQuery replace, but sure enough, it did!
Ken Haduch
@khaduch
Jun 15 2017 14:41
@Corinos - normally, a fatal error stops things...
Scott Mac Donald
@Corinos
Jun 15 2017 14:41
@khaduch Thank you so much! I say this every time I weigh into this channel, but I SUPER appreciate having people like you around to help us plebeians out.
CamperBot
@camperbot
Jun 15 2017 14:41
corinos sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2991 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 15 2017 14:42
@Corinos - you're welcome. You just have to learn how to read and process all of the error information and get some good debugging skills, because there are almost always bugs that need a bit of digging to get through.
bilaal-s
@bilaal-s
Jun 15 2017 14:43
so guys, why is my main content not centering?
https://codepen.io/bilaal-s/pen/zzrPze
Scott Mac Donald
@Corinos
Jun 15 2017 14:44
-=nods=- For sure. I've been picking away at this one for about a week, picking it up, trying a new approach, failing, coming back etc. I'm Jazzed that it's finally working!
Ken Haduch
@khaduch
Jun 15 2017 14:45
@Corinos - yes, looks like it's moving in the right direction - good luck with that project!
Scott Mac Donald
@Corinos
Jun 15 2017 14:46
Thanks again!
ChrisAB74
@ChrisAB74
Jun 15 2017 14:48
Hello everyone, How do I stretch my background image across the width of the page? Right now it only goes part of the way and then starts to repeat.
Ken Haduch
@khaduch
Jun 15 2017 14:53
@bilaal-s - add align-items: center; to your .stream-wrapper - that seems to do it.
Gulsvi
@gulsvi
Jun 15 2017 15:00
@BrunoM24 I'm still seeing some floating point issues - try 1.05 - 1.04. The button order doesn't seem to match a normal calculator - is that part of the design?
image.png
bilaal-s
@bilaal-s
Jun 15 2017 15:04
@khaduch thanks
CamperBot
@camperbot
Jun 15 2017 15:04
bilaal-s sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2992 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 15 2017 15:06
@bilaal-s - you're welcome. I still have a lot of confusion in my mind about flexbox CSS properties. I really cannot remember them, so I always look for a reference! Good luck with that project...
bilaal-s
@bilaal-s
Jun 15 2017 15:08
@khaduch yeah, as soon as you told me I rembered when you change the flex direction, horizontal becomes vertical and vertical becomes horizontal. This also reminds me to refer to documentaiton more often!!
@khaduch the project is done btw, but it looks terrible xD I dont care I want to move on to scripting
Sameer Kumar Bisoyi
@sameer3389
Jun 15 2017 15:10
hi guys, I just finished the Portfolio, pls review and let me know the shortcomings
https://codepen.io/sameer3389/full/qjboNG/
bilaal-s
@bilaal-s
Jun 15 2017 15:13
@sameer3389 you have a lot of skills xD
@sameer3389 good job (y)
Sameer Kumar Bisoyi
@sameer3389
Jun 15 2017 15:14
yes, in functional backend, in frontend design part, I am really bad
@bilaal-s, thanks for the feedback btw, still trying to improve on the front-end, especially bootstrap and angular too, still don't know angular JS fully and they have come up with angular 4 now I hear :smile:
CamperBot
@camperbot
Jun 15 2017 15:18
sameer3389 sends brownie points to @bilaal-s :sparkles: :thumbsup: :sparkles:
:cookie: 243 | @bilaal-s |http://www.freecodecamp.com/bilaal-s
4javier
@4javier
Jun 15 2017 15:26
There's something I don't get in media query: if they're set on a pixel-number basis, a classic 17" monitor 1280x1024 will be considered smaller than a 5" smartphone HD display? They probably will fall into the same breakpoint? Or the second one could even be considered bigger? That's weird...
Andrew Hickman
@ahickman3
Jun 15 2017 15:29
is it possible to use postman with any json request? Got super fconfused about json requests, learned about postman and figure ill stick with it if its viable
Sylvain Breton
@roadrunnor
Jun 15 2017 15:31
unable to fix that hamburger (not showing my social network links)
<nav class="navbar navbar-default navbar-fixed-top">
<div class="fluid-container">
                    <div class="navbar-header">
                        <button type="button" 
                            data-target="#collapsemenu"
                            class="navbar-toggle collapsed" 
                            data-toggle="collapse" 
                            aria-expended=false>
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <div class="space">
                            <a class="navbar-brand" 
                                 href="https://codepen.io/RoadRunnor/project/live/AzvoyG/"><em>RF </em> | </a>
                        </div>
                    </div>
sorry , here the correct pasting
            <nav class="navbar navbar-default navbar-fixed-top">
                <div class="fluid-container">

                    <div class="navbar-header">
                        <button type="button" 
                            data-target="#collapsemenu"
                            class="navbar-toggle collapsed" 
                            data-toggle="collapse" 
                            aria-expended=false>
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <div class="space">
                            <a class="navbar-brand" 
                                 href="https://codepen.io/RoadRunnor/project/live/AzvoyG/"><em>RF </em> | </a>
                        </div>
                    </div>

                    <div class="collapse navbar-collapse" 
                             id="collapsemenu">
                        <ul class="nav navbar-nav">
                            <li><a href="https://twitter.com/SylvainBreton1" 
                                         class="btn btn-default" 
                                         role="group" 
                                         target="blank">Twitter</a></li>
                            <li><a href="https://www.linkedin.com/in/roadrunnor/" 
                                         class="btn btn-default" 
                                         role="group" 
                                         target="blank">LinkedIn</a></li>
                            <li><a href="https://github.com/RoadRunnor" 
                                         class="btn btn-default" 
                                         role="group" 
                                         target="blank">GitHub</a></li>
                            <li><a href="https://www.freecodecamp.com/roadrunnor" 
                                         class="btn btn-default" 
                                         role="group" 
                                         target="blank">freeCodeCamp</a></li>
                        </ul>
                    </div>

                </div>
            </nav>
Priscilla
@priscaxo
Jun 15 2017 15:38
Okay! I finished my tribute page! Check it out and if there is a problem, PLEASE let me know lol I feel SO DARN proud of myself for making this on my own :)https://codepen.io/priscillamosby/full/EXgjQN/
ChrisAB74
@ChrisAB74
Jun 15 2017 15:38
@priscaxo Nice.
Gulsvi
@gulsvi
Jun 15 2017 15:39
@priscaxo Great work, the King would be proud :)
ChrisAB74
@ChrisAB74
Jun 15 2017 15:39
I have updated my Portfolio. Could I get some feedback?
Ken Haduch
@khaduch
Jun 15 2017 15:41
@RoadRunnor - just so you know this - you can go back and edit or delete an incorrect post for a few minutes after you send it. Probably too late after 8 minutes or so, but hover over the three dot menu next to the post time for your comment and it will pop up a menu. Just helps to keep the chat room from getting too cluttered, because it's already difficult enough to sort through all of the postings! :)
Priscilla
@priscaxo
Jun 15 2017 15:41
@ChrisAB74 @SkyC0der Thank you guys :D
CamperBot
@camperbot
Jun 15 2017 15:41
priscaxo sends brownie points to @chrisab74 and @skyc0der :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @chrisab74 |http://www.freecodecamp.com/chrisab74
:star2: 1714 | @skyc0der |http://www.freecodecamp.com/skyc0der
Nick Sladic
@Nickadiemus
Jun 15 2017 15:41
@ChrisAB74 It looks good. I would suggest centering or not allowing everything to be the full width of the page
Sylvain Breton
@roadrunnor
Jun 15 2017 15:41
@SkyC0der dunno if they are setup in Codepen. Don't know how to see it either.
Nick Sladic
@Nickadiemus
Jun 15 2017 15:42
@ChrisAB74 Also your contact section does not work
BrunoM24
@BrunoM24
Jun 15 2017 15:42
@SkyC0der I dont know why 1.05 - 1.04 is 0.010000000000000009
ChrisAB74
@ChrisAB74
Jun 15 2017 15:43
Yeah, I know I don't have it set up. I can't seem to get it to fill out out the boxes, and then when I submit it just brings me to my email with my mainto Email address populated.
Gulsvi
@gulsvi
Jun 15 2017 15:43
@RoadRunnor Your HTML is valid - as you can see from the pen I sent you. That's just a copy/paste of the code you put here in chat. I don't know how to configure codepen projects, we mostly use codepen pens here instead. You'll likely need to add jQuery and bootstrap.js in <script> tags before your closing </body> tag in a codepen project.
Sylvain Breton
@roadrunnor
Jun 15 2017 15:46
@khaduch thanks will do - thanks informing
CamperBot
@camperbot
Jun 15 2017 15:46
roadrunnor sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2993 | @khaduch |http://www.freecodecamp.com/khaduch
Sylvain Breton
@roadrunnor
Jun 15 2017 15:49
@SkyC0der ok thanks - I'll see what i can do about it. later
CamperBot
@camperbot
Jun 15 2017 15:49
roadrunnor sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1715 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 15:51
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="fluid-container">
    <div class="navbar-header"> <button type="button" data-target="#collapsemenu" class="navbar-toggle collapsed" data-toggle="collapse" aria-expended=false> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
      <div class="space"> <a class="navbar-brand" href="https://codepen.io/RoadRunnor/project/live/AzvoyG/"><em>RF </em> | </a> </div>
    </div>
    <div class="collapse navbar-collapse" id="collapsemenu">
      <ul class="nav navbar-nav">
        <li><a href="https://twitter.com/SylvainBreton1" class="btn btn-default" role="group" target="blank">Twitter</a></li>
        <li><a href="https://www.linkedin.com/in/roadrunnor/" class="btn btn-default" role="group" target="blank">LinkedIn</a></li>
        <li><a href="https://github.com/RoadRunnor" class="btn btn-default" role="group" target="blank">GitHub</a></li>
        <li><a href="https://www.freecodecamp.com/roadrunnor" class="btn btn-default" role="group" target="blank">freeCodeCamp</a></li>
      </ul>
    </div>
  </div>
</nav>
<!-- 

  the rest of the HTML for your page 

-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
^^ Like that @RoadRunnor
Sylvain Breton
@roadrunnor
Jun 15 2017 15:56
@SkyC0der lol... super duper thanks bud! I'll give a look to this website Cloudflare too - thanks adding up
CamperBot
@camperbot
Jun 15 2017 15:56
roadrunnor sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: roadrunnor already gave skyc0der points
Nick Sladic
@Nickadiemus
Jun 15 2017 15:56
hey guys

This is my personal site. It's still in the early stages but let me know what you guys think of it thanks!

nicksladic.me

Ben said
@BenSaidRachid
Jun 15 2017 16:07
@Nickadiemus nice,i like
@priscaxo nice
denizenofcode
@denizenofcode
Jun 15 2017 16:09
@Nickadiemus I really like it
Andrew Hickman
@ahickman3
Jun 15 2017 16:11
how am i supposed to access and api that requires authentication/client id/etc (assuming i have all those now)
denizenofcode
@denizenofcode
Jun 15 2017 16:11
What notation do I use to send optional parameters to dark sky? I’ve tried spacing it with ?’s, &’s, etc. to no avail.
JS line 31, how do i get this to pass?
to change to si units
Nick Sladic
@Nickadiemus
Jun 15 2017 16:12
@fullmetal7777 Usually you'll have to read the API's Documentation or register with that API
Andrew Hickman
@ahickman3
Jun 15 2017 16:12
@Nickadiemus trying to access imgur api, and the only instructions they give is through using postman, which i dont really want to use. Id rather do it through js, hence why im a tad bit confused atm
Gulsvi
@gulsvi
Jun 15 2017 16:13
@denizenofcode A query string starts with a ? with additional parameters separated by &
So, change your &units to a ?units and change your ?callback=? to &callback=?
or reverse their places in the URL
Nick Sladic
@Nickadiemus
Jun 15 2017 16:15
@fullmetal7777 It says here that you must register to get a client verificaiton
Register an Application (IMPORTANT)
Each client must register their application and receive the client_id and client_secret.
For public read-only and anonymous resources, such as getting image info, looking up user comments, etc. all you need to do is send an authorization header with your client_id in your requests. This also works if you'd like to upload images anonymously (without the image being tied to an account), or if you'd like to create an anonymous album. This lets us know which application is accessing the API.
Authorization: Client-ID YOUR_CLIENT_ID
denizenofcode
@denizenofcode
Jun 15 2017 16:15
@SkyC0der ahh that did it. I didn’t realize the callback was a param. Thanks so much!
CamperBot
@camperbot
Jun 15 2017 16:15
denizenofcode sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1716 | @skyc0der |http://www.freecodecamp.com/skyc0der
Dinesh GR
@GR-D
Jun 15 2017 16:16
@GR-D
hi there so I am trying to make my kaushan script bold however I am not able to do it, any ideas
<h3 class="text-center"> <p> Here's a link to learn more about <a href="https://en.wikipedia.org/wiki/Ada_Lovelace" target="blank"> Ada Lovelace </a> <p> </h3>
h3 {
font-family: 'kaushan script', cursive;
font-weight: bold;
}
my html and my css
Andrew Hickman
@ahickman3
Jun 15 2017 16:17
@Nickadiemus Ive gotten all that, but honestly im just not sure how to do all that other stuff. I understand this block of code, about all i get at the moment though http://prntscr.com/fk5o1l
Gulsvi
@gulsvi
Jun 15 2017 16:19
@GR-D Kaushan script only comes with one font weight: https://fonts.google.com/selection?selection.family=Kaushan+Script
(it can't be bold)
Nick Sladic
@Nickadiemus
Jun 15 2017 16:22
@fullmetal7777 I believe you need to add your verification to the ajax call
Dinesh GR
@GR-D
Jun 15 2017 16:22
@SkyC0der thanks !!! I was trying to google about the kaushan script, however I did not read about its weights!
CamperBot
@camperbot
Jun 15 2017 16:22
gr-d sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1717 | @skyc0der |http://www.freecodecamp.com/skyc0der
Dinesh GR
@GR-D
Jun 15 2017 16:22
thanks you very much :)
Andrew Hickman
@ahickman3
Jun 15 2017 16:22
@Nickadiemus in the data section?
Gulsvi
@gulsvi
Jun 15 2017 16:22
I'm sure there's an alternative out there somewhere :)
Dinesh GR
@GR-D
Jun 15 2017 16:23
@SkyC0der so kaushan script has only regular font !! gotcha !
Nick Sladic
@Nickadiemus
Jun 15 2017 16:23
@fullmetal7777 no, you just need to add
@fullmetal7777
Authorization: Client-ID YOUR_CLIENT_ID
to the call
Gulsvi
@gulsvi
Jun 15 2017 16:24
@GR-D Yep! Only font-weight: 400. I'm curious if there's a way to add a shadow effect maybe that will make it look thicker though?
Andrew Hickman
@ahickman3
Jun 15 2017 16:24
and that goes before the ajax call? Sorry if im being frustrating, just trying to wrap my head around all this lol dont know why this is such a difficult concept for me to understand
Dinesh GR
@GR-D
Jun 15 2017 16:26
@SkyC0der wondering the same. maybe it can be done, but my google search is abysmal !!
Gulsvi
@gulsvi
Jun 15 2017 16:26
Try text-shadow: 1px .4px #000000;
Nick Sladic
@Nickadiemus
Jun 15 2017 16:26
@fullmetal7777 No it must go inside the ajax call so imgur's API can verify
ChrisAB74
@ChrisAB74
Jun 15 2017 16:26
Nick Sladic
@Nickadiemus
Jun 15 2017 16:26
You also I think must use a header Authorization too
Here's an example of a header auth that I used in my Wiki search
$.ajax({
        url: url,
        type: 'GET',
        dataType: 'jsonp',
        headers: { 'Api-User-Agent': '*' },
        success: function(data) {
Gulsvi
@gulsvi
Jun 15 2017 16:29
@GR-D Actually, the amount of shadow you use might depend on the size of the font. Maybe try this instead:
  text-shadow: 0.01em .05em black;
then it should stay consistent regardless of font size
Nick Sladic
@Nickadiemus
Jun 15 2017 16:30
@fullmetal7777 Try taking a Ajax call like this
$.ajax({
        url: url,
        type: 'GET',
        dataType: 'jsonp',
        Authorization: YOUR CLIENT ID,
        headers: { 
                 'Api-User-Agent': '*'
        },
        success: function(data) {
$.ajax({
        url: url,
        type: 'GET',
        dataType: 'jsonp',
        headers: { 
                 'Api-User-Agent': '*',
                 ' Authorization':' YOUR CLIENT ID'
        },
        success: function(data) {
or the other*
Your data might be required in a different format @fullmetal7777
Andrew Hickman
@ahickman3
Jun 15 2017 16:31
@Nickadiemus not certain what api-user-agent means
Gulsvi
@gulsvi
Jun 15 2017 16:38
@fullmetal7777 You can use ajax's beforeSend method to set the necessary headers with your API Key. For example, to use Imgur to get info on a specific image:
  var imgurID = 'some image id from imgur'
  var key = "your api key";
  $.ajax({
    url: 'https://api.imgur.com/3/image/' + imgurID,
    beforeSend: function(request) {
      request.setRequestHeader('Authorization', 'Client-ID '+ key);
    }
  }).done(function(data) {
    console.log(data);
  });
Dinesh GR
@GR-D
Jun 15 2017 16:42
@SkyC0der check this codepen of mine. The bold css for kaushan script actually worked. DO you think we can tweak this ? https://codepen.io/GR-D/pen/pPBPbb?editors=1100
Gulsvi
@gulsvi
Jun 15 2017 16:43
@GR-D lol, wow! Why didn't it work the first time?
Maybe they need to update that page :p
Dinesh GR
@GR-D
Jun 15 2017 16:44
but then it did not work in the part where it says "here's a link to learn more about ada lovelace" in that part the bold ain't working !!
Denin b
@denin16
Jun 15 2017 16:44
hey i am new to web development. i know little about html and css. i am looking for some projects to practice those skills
Dinesh GR
@GR-D
Jun 15 2017 16:44
I tried tried !!its so stubborn @SkyC0der
Will you be able to help me out ?
Andrew Hickman
@ahickman3
Jun 15 2017 16:46
@SkyC0der i think it worked? http://prntscr.com/fk612z im not seeing any json output though
Gulsvi
@gulsvi
Jun 15 2017 16:46

@GR-D Maybe create a class name for all the places you want to use that bold font?

.kaushan-bold {
  font-family: 'kaushan script', cursive;
  font-weight: bold;
}

Then in your HTML, use class="kaushan-bold" whenever you want to use it.

Nikki L.R.
@nikkilr88
Jun 15 2017 16:46
Could anyone please help me out with Git?
I messed up my project.
Gulsvi
@gulsvi
Jun 15 2017 16:48
@fullmetal7777 That looks like JSON output to me - did you click the triangle to expand it?
Andrew Hickman
@ahickman3
Jun 15 2017 16:49
@SkyC0der once again, i am dumb and you are smart lol thats awesome man. This is a huge hurdle you helped me overcome, thanks a bunch. Gunna study your code now and figure out what the heck is actually going on. Thanks man!
CamperBot
@camperbot
Jun 15 2017 16:49
fullmetal7777 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1718 | @skyc0der |http://www.freecodecamp.com/skyc0der
Dinesh GR
@GR-D
Jun 15 2017 16:51
@SkyC0der The funny story is the boldness reflects only when I increase the font-size !!
denizenofcode
@denizenofcode
Jun 15 2017 16:51
Thank you for all of your help, especially @SkyC0der . Finally have a working model. I can add things from here.
CamperBot
@camperbot
Jun 15 2017 16:51
denizenofcode sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: denizenofcode already gave skyc0der points
Gulsvi
@gulsvi
Jun 15 2017 16:54
Great job @denizenofcode !
John
@AnonymousLords
Jun 15 2017 16:56
Has anyone here finished the cat photo app?
Bceause i have a question.
Do i ahve to make a "linkin" account on step 106
I mean 107
Markus Ivancsics
@ivancsicsmarkus
Jun 15 2017 16:59
@John-freeCodeCamp Cat Photo App? Yes.
@John-freeCodeCamp There are no challange numbers, only titles.
Do i ahe to complete this?
have*
Like make a account?
Markus Ivancsics
@ivancsicsmarkus
Jun 15 2017 17:00
@John-freeCodeCamp No, you can easily skip this.
denizenofcode
@denizenofcode
Jun 15 2017 17:01
@John-freeCodeCamp just open the link and click next
it will count
John
@AnonymousLords
Jun 15 2017 17:01
@ivancsicsmarkus thx
CamperBot
@camperbot
Jun 15 2017 17:01
john-freecodecamp sends brownie points to @ivancsicsmarkus :sparkles: :thumbsup: :sparkles:
:cookie: 618 | @ivancsicsmarkus |http://www.freecodecamp.com/ivancsicsmarkus
Markus Ivancsics
@ivancsicsmarkus
Jun 15 2017 17:01
@John-freeCodeCamp Click: Open link in new tab (this unlocks the next step) then close the new tab, then Finish challange!
John
@AnonymousLords
Jun 15 2017 17:01
:D
John
@AnonymousLords
Jun 15 2017 17:06
I scirpt hard to learn? Im starting it...
Anyways i gtg
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:15
@denizenofcode im new to codepen....can you tell me how you got your project to show up in this chat room...is it that you choose the 'embed' button at the bottom of pen..??
denizenofcode
@denizenofcode
Jun 15 2017 17:16
@flyfishingbarbara copy and paste the url at the top of your web browser into this chat
the url of your codepen
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:17
@denizenofcode ahhh okay, simple enuff.thnx
denizenofcode
@denizenofcode
Jun 15 2017 17:17
no problem
CallMeOrange
@EgnaroDev
Jun 15 2017 17:27
@denizenofcode hey nice project for weather app but there is two problems
I cannot switch either C or F and location is not exactly accurate
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:35
@swong194 ...hi sunny are you here...?
@ivancsicsmarkus hi markus...can you take a look and find out why my images at top are not all 4 in a row..?? https://codepen.io/flyfishingbarbara/pen/rwxZOX
Johnny
@jtan3
Jun 15 2017 17:41
@flyfishingbarbara you shouldn't have 2 bootstraps in your css settings
@flyfishingbarbara also you didn't close your anchor tags on some of the images
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:44
@jtan3 so in setting I got rid of one bootstrap and choose bootstrap3. I will look at img tags...
Johnny
@jtan3
Jun 15 2017 17:46
@flyfishingbarbara you closed the first on but not the other 3
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:47
@jtan3 aha....yep...now take a look...good right...?https://codepen.io/flyfishingbarbara/pen/rwxZOX
Johnny
@jtan3
Jun 15 2017 17:47
@flyfishingbarbara good job
CallMeOrange
@EgnaroDev
Jun 15 2017 17:47
@flyfishingbarbara Hey how did you import image each section like you did with fish
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:47
@jtan3 it looks sooo cute now! thanks
CamperBot
@camperbot
Jun 15 2017 17:47
flyfishingbarbara sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @jtan3 |http://www.freecodecamp.com/jtan3
Johnny
@jtan3
Jun 15 2017 17:48
@flyfishingbarbara what are those images suppose to link to?
CallMeOrange
@EgnaroDev
Jun 15 2017 17:49
@jtan3 nothing
There is no anchor elements within it
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:50
@MCTwoDigitZero I googled line art for trout...then went to shutterfly website. then I selected image I wanted and cut and paste the url. I had a bit of trouble but @swong194 said to open the image in a separate tab to cut and paste url for image...soooo FUN! hope that helps...
CallMeOrange
@EgnaroDev
Jun 15 2017 17:51
@flyfishingbarbara I was trying to figure out how to import an image but I dont know about the size but I saw the class col-xs-6 which make it smaller
Good thing that I took a look at your code...
Johnny
@jtan3
Jun 15 2017 17:51
https://postimage.io/ @MCTwoDigitZero use that
CallMeOrange
@EgnaroDev
Jun 15 2017 17:51
@jtan3 Thats for changing address
http to https
Do you mean changing size?
Johnny
@jtan3
Jun 15 2017 17:52
it uploads your picture
CallMeOrange
@EgnaroDev
Jun 15 2017 17:52
I know I have used that link before
:/
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:52
@jtan3 nothing yet....does the image have to link or ...I have some links "orvis" and "nature conservancy"...
CallMeOrange
@EgnaroDev
Jun 15 2017 17:53
@flyfishingbarbara He probably thought your images have the link to go different links
But there is no anchor elements within img element
Johnny
@jtan3
Jun 15 2017 17:53
@flyfishingbarbara I thought you wanted to link to something.
CallMeOrange
@EgnaroDev
Jun 15 2017 17:54
@flyfishingbarbara I think you should add an image to background
Might be better
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 17:55
@jtan3 no just visual for now...1 step at a time for me...haha or it gets a bit frustrating...haha
CallMeOrange
@EgnaroDev
Jun 15 2017 17:56
What does img-responsive do?
Johnny
@jtan3
Jun 15 2017 17:57
@MCTwoDigitZero google it
Eric Weiss
@eweiss17
Jun 15 2017 17:57
makes the image responsive
CallMeOrange
@EgnaroDev
Jun 15 2017 17:58
Good answer..
Nick Sladic
@Nickadiemus
Jun 15 2017 17:59
Can anybody help me with a horizontal scroll overflow?
@Nickadiemus What's the question?
@flyfishingbarbara It looks better, but watch the spelling on that class name img-resposive should be img-responsive
Randal Obringer
@h2obringer
Jun 15 2017 18:06
currently working on the "Show the Local Weather" project: need help testing the call to the API; error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.darksky.net/forecast/[replacedKeyForThisQuestion]/43.5925601,-116.179001. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Baibhav Gautam
@baibhavx
Jun 15 2017 18:07
To tweet the random quote should I use an ajax post request or should I use something like clicktotweet.com
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 18:08
@jtan3 ok so im going to put a pix of my dad... @SkyC0der thnks, nice catch...
CallMeOrange
@EgnaroDev
Jun 15 2017 18:08
@SkyC0der I figured it out already but thanks :/
CamperBot
@camperbot
Jun 15 2017 18:08
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1720 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 18:08
Just for completeness - not really needed though because the thumbnail class basically does the same thing
@MCTwoDigitZero Probably been a while since you did that challenge
Baibhav Gautam
@baibhavx
Jun 15 2017 18:09
To tweet the random quote should I use an ajax post request or should I use something like clicktotweet.com? Can someone please help
CallMeOrange
@EgnaroDev
Jun 15 2017 18:09
Actually I thought there was more to img responsive but I guess its the size
Gulsvi
@gulsvi
Jun 15 2017 18:09
@h2obringer That weather API requires you to use JSONP. If you're using $.ajax, change the dataType to 'jsonp'
CallMeOrange
@EgnaroDev
Jun 15 2017 18:09
I need help to make the image size
<div class="col-xs-3">
  <img class="img-responsive" src="https://s10.postimg.org/mzaps9zc9/hunter-x-hunter-killua-zoldyck-2011-35141104-500.png">
  </div>
Randal Obringer
@h2obringer
Jun 15 2017 18:10
I will give that a try
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 18:10
@SkyC0der so if I have thumbnail class, I dont have to have 'img-responsive' class..?
Randal Obringer
@h2obringer
Jun 15 2017 18:11
that seems to have worked, thank you very much
CallMeOrange
@EgnaroDev
Jun 15 2017 18:12
I got scrolling working but I dont want far right or left to be scrollable
Gulsvi
@gulsvi
Jun 15 2017 18:12

@flyfishingbarbara Correct, they both use the same CSS:

.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  display: block;
  max-width: 100%;
  height: auto;
}

From: https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css

Randal Obringer
@h2obringer
Jun 15 2017 18:12
@SkyC0der I'm just curious but are there other solutions other than jsonp?
Gulsvi
@gulsvi
Jun 15 2017 18:13
@h2obringer You can also use a CORS proxy, but that involves setting up your own server or connecting to a 3rd party one out there like https://crossorigin.me.
With 3rd party servers, they can go down or slow down without notice, plus you're sending your API key and everyone's location to some unknown 3rd party :)
ChrisAB74
@ChrisAB74
Jun 15 2017 18:14
How do you make a button larger?
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 18:14
@SkyC0der thnx
CamperBot
@camperbot
Jun 15 2017 18:14
flyfishingbarbara sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1721 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 18:15
@MCTwoDigitZero What do you mean you don't want the far right to be scrollable?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:15
far right and left
Well like you scroll? only center not right or left
Gulsvi
@gulsvi
Jun 15 2017 18:15
It only scrolls up and down
CallMeOrange
@EgnaroDev
Jun 15 2017 18:15
Yeah
Im not talking about horizontal scrolling
Like where you scroll
Using mouse cursor to scroll
Gulsvi
@gulsvi
Jun 15 2017 18:16
You want the scroll bar to be closer to the center of the page?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:16
Yeah I guess
Randal Obringer
@h2obringer
Jun 15 2017 18:17
@SkyC0der I was attempting to try CORS but didn't have a full understanding of how it worked. So you would practically have to own the server on which the API is hosted on in order to set the Access-Control-Allow header values and send appropriate responses?
Gulsvi
@gulsvi
Jun 15 2017 18:17
@MCTwoDigitZero You'll have to adjust the width of that section to bring the scroll bar in closer to the center
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:18
I need some help
How do I place the buttons to the left of my name?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:19
oh so width: auto; is not right
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:19
Also, in the portfolio section, I want to have some space between the three things I mentioned. How to manually give space between each element?
Randal Obringer
@h2obringer
Jun 15 2017 18:20
@FlashBlaze you can use apply a class to your buttons and then in the CSS selector on that class you can use float: right; ensure the button elements are placed before your name
CallMeOrange
@EgnaroDev
Jun 15 2017 18:20
@FlashBlaze There should not be two "A" in Codecademy
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:20
@MCTwoDigitZero so just width: auto in the css section?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:20
@FlashBlaze No that was for me
Randal Obringer
@h2obringer
Jun 15 2017 18:20
*float:left
CallMeOrange
@EgnaroDev
Jun 15 2017 18:20
Sorry :/
Gulsvi
@gulsvi
Jun 15 2017 18:20
@h2obringer You would need a server in the middle of your request - it's a proxy. You send your API request to that proxy server, it then makes a request on your behalf with the information that the API requires. Only a server can send that information, not the web browser of every visitor to your web page.
Randal Obringer
@h2obringer
Jun 15 2017 18:21
@SkyC0der Got it. Thanks for the help.
CamperBot
@camperbot
Jun 15 2017 18:21
h2obringer sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1722 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 18:21
If you really want to dive in :) check out the source code for a popular CORS proxy here: https://github.com/Rob--W/cors-anywhere
@h2obringer
CallMeOrange
@EgnaroDev
Jun 15 2017 18:23
... I hate coding in scrolling
@SkyC0der Do you know any link that changes px to percentage?
Like 300px to ?%
Gulsvi
@gulsvi
Jun 15 2017 18:24
@FlashBlaze Use the template provided in the documentation for your navbar: https://getbootstrap.com/components/#navbar
@MCTwoDigitZero It doesn't really work that way - 300px would be 100% of your mobile phone and maybe only 30% of your laptop screen.
If you want it to always be a percentage of the width of your screen size, use vh and vw units
CallMeOrange
@EgnaroDev
Jun 15 2017 18:26
<div style="width: 100%; height: 300px; overflow-y: scroll;">
So change height: 300px to ?vh?
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:27
@h2obringer I meant right. My bad. So I did as you told and gave a bottom padding to elevate them but that didn't work
Gulsvi
@gulsvi
Jun 15 2017 18:27
% is also a percentage of the parent container's width. So, if you have no width set up on the parent container, 100% won't do anything
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:27
@SkyC0der yup. Will try that
CallMeOrange
@EgnaroDev
Jun 15 2017 18:28
@SkyC0der Never mind I got it
Gulsvi
@gulsvi
Jun 15 2017 18:28
@MCTwoDigitZero What percentage of the screen height do you want that text to take up?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:28
Just the title "gon freecss" to last sentence
Gulsvi
@gulsvi
Jun 15 2017 18:28
300vh = 3 times taller than your screen
CallMeOrange
@EgnaroDev
Jun 15 2017 18:28
But I figured it out
Oh I see
I used 75vh
So any number of vh and vw is considered as percentage?
Gulsvi
@gulsvi
Jun 15 2017 18:29
It's a percentage of the viewport height/width
CallMeOrange
@EgnaroDev
Jun 15 2017 18:30
Didnt work very well with full screen..
Gotta fix that
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:31
@MCTwoDigitZero off topic. HxH fan?
CallMeOrange
@EgnaroDev
Jun 15 2017 18:32
Not really
I just like to watch that anime
ku0100
@ku0100
Jun 15 2017 18:32
hello all, im trying to do the random quote machine exercise for FCC
CallMeOrange
@EgnaroDev
Jun 15 2017 18:32
@FlashBlaze Its only thing I could think of to write about for tribute page
ku0100
@ku0100
Jun 15 2017 18:32
i am really struggling how to get the tweet button to work
if anyone has any links that can assist/point me in the right direction i'd really appreciate it
not sure if this is the proper way to ask for help on here, im still just beginning
CallMeOrange
@EgnaroDev
Jun 15 2017 18:33
@ku0100 Just make a button that send you directly to different page but I dont know about different link each time you quote
@FlashBlaze So I see you are not a beginner of front end
Where did you learn it from?
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:35
@MCTwoDigitZero why do you think that? lol
Scott Mac Donald
@Corinos
Jun 15 2017 18:35
Can someone have a look at the way I'm trying to implement an if statement in my JS? It's not doing anything and I'm not sure why. I don't see any errors anywhere...
CallMeOrange
@EgnaroDev
Jun 15 2017 18:35
I saw your portfolio
You made these websites
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:35
@MCTwoDigitZero freecodecamp
CallMeOrange
@EgnaroDev
Jun 15 2017 18:36
That it?
Neeraj Lagwankar
@FlashBlaze
Jun 15 2017 18:36
@MCTwoDigitZero what? noooooo. those were just random images
CallMeOrange
@EgnaroDev
Jun 15 2017 18:36
You managed to make these websites just with knowledge from fCC
oh I see
Gulsvi
@gulsvi
Jun 15 2017 18:36
@ku0100 You'll want to add your quote text to the end of the link, like this one where it tweets "hello world"
https://twitter.com/intent/tweet?text=hello world
ku0100
@ku0100
Jun 15 2017 18:37
thank you @SkyC0der and @MCTwoDigitZero
CamperBot
@camperbot
Jun 15 2017 18:37
ku0100 sends brownie points to @skyc0der and @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 160 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
:star2: 1723 | @skyc0der |http://www.freecodecamp.com/skyc0der
ku0100
@ku0100
Jun 15 2017 18:37
i'll look into both of those suggestions, i really appreciate
it
CallMeOrange
@EgnaroDev
Jun 15 2017 18:37
No problem
Gulsvi
@gulsvi
Jun 15 2017 18:38
@ku0100 No problem - and yes, that's the right way to ask for help.
@Corinos I think .search() will return -1 if false, so you'll need to see if minuteSummary.search("snow") != -1
Scott Mac Donald
@Corinos
Jun 15 2017 18:41
I see an issue already, as well @SkyC0der , thanks. I'll get back to that.
CamperBot
@camperbot
Jun 15 2017 18:41
corinos sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1724 | @skyc0der |http://www.freecodecamp.com/skyc0der
Ken Haduch
@khaduch
Jun 15 2017 18:41
@Corinos - one thing that is a little strange is that you are using a class, or at least the functions to add classes, and you have your CSS selectors named with #, which is the indicator for an ID. Try using . in your CSS selector instead of the hash, and when you add the class, do not put the . in front of the name. Either that, or switch to using ID functions and still don't put the # when you are adding the id.... one way or another it might clear up the confusion?
Gulsvi
@gulsvi
Jun 15 2017 18:42
@Corinos For what it's worth - that API is designed to work with an icon set that will show an icon of the current weather conditions. You should see the 'icon' property in your JSON. https://darkskyapp.github.io/skycons/
ChrisAB74
@ChrisAB74
Jun 15 2017 18:42
Could I get some feed back?
Scott Mac Donald
@Corinos
Jun 15 2017 18:43
@khaduch I knew there was something funky about the way I was using the hash. Thanks.
CamperBot
@camperbot
Jun 15 2017 18:43
corinos sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2994 | @khaduch |http://www.freecodecamp.com/khaduch
Gulsvi
@gulsvi
Jun 15 2017 18:45
@ChrisAB74 Your links don't seem to work and your portfolio images overlap on smaller screens
I'm not a big fan of the color palette you chose either, but that's just a personal preference :)
This website is really helpful for choosing colors: http://www.palettable.io/
ChrisAB74
@ChrisAB74
Jun 15 2017 18:46
@SkyC0der to stop them from overlapping I would use Image responsive correct?
What links are not working?
Gulsvi
@gulsvi
Jun 15 2017 18:46
One last feedback - you have Bootstrap 3 in your CSS and Bootstrap 4 in your JavaScript
@ChrisAB74 Are all the links working for you? None of them work for me.
(I'm on firefox at the moment)
ChrisAB74
@ChrisAB74
Jun 15 2017 18:47
@SkyC0der The social media ones work from me on Chrome
capturethemoon
@capturethemoon
Jun 15 2017 18:48
Hey all, one last thing before I officially complete my Show the Weather project. I'm trying to use JavaScript to make the temperature toggle between a Fahrenheit and a Celsius div. However, for some reason, the script keeps getting stuck after it switches to the Celsius div. Any suggestions on how to make it work? I'm just trying to create a simple toggle div. https://codepen.io/capturethemoon/pen/JXNNLE
CallMeOrange
@EgnaroDev
Jun 15 2017 18:49
@ChrisAB74 "Front End Web Developer"
Should be Front end or Web Developer
Looks nice
ChrisAB74
@ChrisAB74
Jun 15 2017 18:50
@MCTwoDigitZero Thanks
CamperBot
@camperbot
Jun 15 2017 18:50
chrisab74 sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 161 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
Tamas Csonka
@csnktms
Jun 15 2017 18:51
Hello everyone
anyone experienced with react could help for a sec?
Nick Sladic
@Nickadiemus
Jun 15 2017 18:52
@csnktms what are you working on?
Tamas Csonka
@csnktms
Jun 15 2017 18:53
@Nickadiemus So, I'm working on a page. I'm returning an svg from an arrow function and then exporting it out. Importing it to my Main wrapper module, and passing it as a prop to the children component.
Inside the children component it's empty. There is nothing inside, 0 X 0 dimensions.
no errors
ChrisAB74
@ChrisAB74
Jun 15 2017 18:54
@SkyC0der You are right, they are only working on Chrome. Don't seem to be working on IE or FF. Any suggestions to fix that?
Tamas Csonka
@csnktms
Jun 15 2017 18:55
@Nickadiemus solved it in the meanwhile, sorry for bothering, I forgot to pass it as {<BarChart />}
Faisal
@Faisa1khan
Jun 15 2017 18:55
https://codepen.io/Hackplacea/full/Gmwxqd/ whenever i hover on projects headline it's underline and act like a link , i hate it please help
Tamas Csonka
@csnktms
Jun 15 2017 18:55
I wrote {BarChart}
Gulsvi
@gulsvi
Jun 15 2017 18:56
@ChrisAB74 I think you should create your navbar the way Bootstrap instructs us to do it - they have some template code here: http://getbootstrap.com/components/#navbar
ChrisAB74
@ChrisAB74
Jun 15 2017 18:57
@SkyC0der thanks
CamperBot
@camperbot
Jun 15 2017 18:57
chrisab74 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1725 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 18:57
@Hackplacea Above your headline, you have some <a> tags that are not closed properly. Should be </a> not <a/>
Nazrul
@nazrulmanik
Jun 15 2017 18:59
Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
What does it mean. what can i do?
to see google map working
Gulsvi
@gulsvi
Jun 15 2017 19:00
Look at the JavaScript console for details?
Ctrl+Shift+J on windows
Command+Option+J on Mac
John Sumner
@sumnercommajohn
Jun 15 2017 19:00
Hey everyone. Kinda new to the community, not sure the protocol for posting for help. I'm having an issue with image links on my tribute page, basically I want them to open fullscreen but they are opening at full size, bigger than most viewports. I'm hosting my images on Cloudinary. Here's the link, hopefully I'm doing it right:
https://codepen.io/sumnercommajohn/full/OmdWbz/
And for that matter, any feedback on the code or design is much appreciated.
Faisal
@Faisa1khan
Jun 15 2017 19:01
@SkyC0der thanks i'll check it out
CamperBot
@camperbot
Jun 15 2017 19:01
hackplacea sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1726 | @skyc0der |http://www.freecodecamp.com/skyc0der
Nazrul
@nazrulmanik
Jun 15 2017 19:05
my google map is not working. When i refresh my site this showing some thing like:Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
Gulsvi
@gulsvi
Jun 15 2017 19:08
@nazrulmanik What does the javascript console say?
No Name
@ilincicd
Jun 15 2017 19:10
Someone?
pitanje.jpg
Liam Docherty
@ldocherty1
Jun 15 2017 19:22
Hey, does anyone have any codepen links to how I can do a similar text effect like shown on this developers portfolio https://caferati.me?
Hello911
@Hello911
Jun 15 2017 19:28
What does &:hover{} and &#tweet-quote mean? The symbols mainly.
Kaz Baig
@kbaig
Jun 15 2017 19:30
@ilincicd can we see the code
Sam Bateman
@Cyberdr8gon
Jun 15 2017 19:30
Hey guys this is a more fancy solution but I am wondering why this isn't working for binary agents in beta.freecodecamp
function bin2Num(binString) {
  let binArr = binString.split("");
  let acc = 0;

  for(let i = 0; binArr.length; i++) {
    if(binArr.pop() == "1") {
      acc += (1 << i);
    }
  }

  return acc;

}


function binaryAgent(str) {


  console.log(str.split(" ").map(bin2Num).map(String.fromCharCode).join(""));
}
Kaz Baig
@kbaig
Jun 15 2017 19:31
@sumnercommajohn you could set the images as a background to a div
@sumnercommajohn and user 100vh, 100vw as the dimensions of the div, while setting background size: cover
miriam-z
@miriam-z
Jun 15 2017 19:33
hi can anyone answer if it is still possible to complete the git project on ffc with mac os and no ubuntu?
did anyone do this?
Syed Hasan
@Weekndo
Jun 15 2017 19:41
https://codepen.io/Weekndo/pen/owYeEK -- Can somebody give me a feedback on this tribute page?
Rohit Gautam
@AzzlerV
Jun 15 2017 19:43
What's wrong?? Can't color the body....
https://codepen.io/Azzler/pen/eRBBza?editors=1100
@Weekndo sleek and simple... :D
No Name
@ilincicd
Jun 15 2017 19:46
kod pomoci.jpg
@kbaig off course
Luke Miller
@dalumiller
Jun 15 2017 19:47

Can anyone help me understand why my function isn't getting rid of the #1?

function palindrome(str) {
var strLowerCase = str.toLowerCase();
strLowerCase= strLowerCase.replace('[0-9]',"");
return strLowerCase;
}
palindrome("1Eye");

No Name
@ilincicd
Jun 15 2017 19:48
@kbaig CSS
kod pomoci.jpg
CallMeOrange
@EgnaroDev
Jun 15 2017 19:50
@ilincicd Use margin-top
.margin {
margin-top: -10px;
}
Gurpreet SIngh
@Gurpreet3131
Jun 15 2017 19:51
Can I ask a question related to jquery and js here?
Kaz Baig
@kbaig
Jun 15 2017 19:51
@ilincicd right now it's appearing below the yellow area because it has to be below the clear:both div
CallMeOrange
@EgnaroDev
Jun 15 2017 19:51
@Gurpreet3131 Just ask
Gurpreet SIngh
@Gurpreet3131
Jun 15 2017 19:51
how can i fetch a value in jquery into a js variable?
CallMeOrange
@EgnaroDev
Jun 15 2017 19:52
Oh I have no idea
Gurpreet SIngh
@Gurpreet3131
Jun 15 2017 19:52
I have made a slider using jquery, and now I want to fetch the value of the slider into javascript. This is my slider jquery code
```
Kaz Baig
@kbaig
Jun 15 2017 19:52
@ilincicd so maybe stick the image into a div and float that to the left, and the headline and nav into another div and to the right. That's one way of doing it without needing to clear:both
Gurpreet SIngh
@Gurpreet3131
Jun 15 2017 19:52
<script>
  $(function(){
    $("#speed-slider").slider({
        orientation: "horizontal",
        range: "min",
        min: 1,
        max: 100,
        value: 80,
        slide: function( event, ui ) {
            $("#amount").val( ui.value );
            $(this).find('.ui-slider-handle').text(ui.value);
        },
        create: function(event, ui) {
            var v=$(this).slider('value');
            $(this).find('.ui-slider-handle').text(v);
        }
    });    
  });
</script>
CallMeOrange
@EgnaroDev
Jun 15 2017 19:52
Gurpreet SIngh
@Gurpreet3131
Jun 15 2017 19:52
ok i wll ask there
Kaz Baig
@kbaig
Jun 15 2017 19:53
@ilincicd Wait you don't need to put the image into a div, everything else tho you could do
No Name
@ilincicd
Jun 15 2017 19:54
@kbaig I am also trying to solve, but I don't have idea...
where is the trick
CallMeOrange
@EgnaroDev
Jun 15 2017 19:54
@kbaig what about margin-top?
:/
Kaz Baig
@kbaig
Jun 15 2017 19:55
@MCTwoDigitZero could do that but it's not a clean fix
CallMeOrange
@EgnaroDev
Jun 15 2017 19:55
True but its only way I could think of
Kaz Baig
@kbaig
Jun 15 2017 19:56
@MCTwoDigitZero They could keep the image floated to the left and put the nav + title into a div and float that to the right
CallMeOrange
@EgnaroDev
Jun 15 2017 19:56
Im not good with nav stuffs
No Name
@ilincicd
Jun 15 2017 19:57
@kbaig Do you have a solution of my problem, maybe :)
?
Kaz Baig
@kbaig
Jun 15 2017 19:58
@ilincicd You could also position: absolute the image and not need to worry about floats
No Name
@ilincicd
Jun 15 2017 19:58
for example, can you write a code to see?
Kaz Baig
@kbaig
Jun 15 2017 19:59
@ilincicd it would be nice to be given your code in a pen or something, can't type all of yours down
No Name
@ilincicd
Jun 15 2017 20:01
@kbaig https://codepen.io/ilincicd/full/owYerX/ As you see... image is on my computer, and now on codepen is inside... :)
Kaz Baig
@kbaig
Jun 15 2017 20:02
@ilincicd What are the dimensions of your image
No Name
@ilincicd
Jun 15 2017 20:02
@kbaig When I delete the image, ul is inside the navigation bar... so, the image is a problem. Wait, let me see...
@kbaig 107*99
@kbaig Heyyy... I change my mind, but I need a help again :) How to move this picture as I draw on screen?
pitanje.jpg
I entered float:center pa nothing is happened...
Kaz Baig
@kbaig
Jun 15 2017 20:08
@ilincicd center does not exist
@ilincicd my proposed solution
https://codepen.io/kbaig/pen/bRBrXa?editors=0100
No Name
@ilincicd
Jun 15 2017 20:09
@kbaig I see now in sublime editor
@kbaig thanks
CamperBot
@camperbot
Jun 15 2017 20:09
ilincicd sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @kbaig |http://www.freecodecamp.com/kbaig
No Name
@ilincicd
Jun 15 2017 20:09
@kbaig You change the code only in CSS?
Kaz Baig
@kbaig
Jun 15 2017 20:09
@ilincicd I removed the clr div
@ilincicd rest of the changes are in whatever was floating and also nav
No Name
@ilincicd
Jun 15 2017 20:14
@kbaig thanks
CamperBot
@camperbot
Jun 15 2017 20:14
ilincicd sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:warning: ilincicd already gave kbaig points
No Name
@ilincicd
Jun 15 2017 20:14
@kbaig I saw in code, that you change position: apsolute. What it means, can you tell me?
bitcoinabdi
@bitcoinabdi
Jun 15 2017 20:14
good afternoon campers
someone pleaseeeee take a look at my twitch project am stuck !!https://codepen.io/abdihakim/pen/BZLMeM?editors=1010
teevik
@teevik
Jun 15 2017 21:02
You need to get an twitch Client ID
Andrew Hickman
@ahickman3
Jun 15 2017 21:08
do yall typically use beforesend or just straight headers: when getting access to api's? I dont really see a difference other than beforesend can overrite previous headers, but i dont see why that would matter if you havnt defined any, you would either use one or the other lol
@bitcoinabdi I just figured out how to get access to an imgur api, which seems similar to what you would have to do with a twitch api
bitcoinabdi
@bitcoinabdi
Jun 15 2017 21:11
@fullmetal7777 nice
Abhimanyu Ray
@maad-boy
Jun 15 2017 21:15
what does this means "you can verify this works by adding brunofin and comster404 to your array of Twitch streamers." in twitch tv api
Danny
@WaterYourRoots
Jun 15 2017 21:21
Question, I have a personal website for my clothing company, and it has its own favicon, does anyone know how to add that as a media button that id put on my portfolio page?
Jorge
@OrangeKulture
Jun 15 2017 21:24
@maad-boy when you make your api call, you have to include a user, i.e freecodecamp ... that is basically saying you should make a call to those two users to get a response for a closed and/or non existent account
@WaterYourRoots you need to specify your favicon.ico in your meta data section
Clinton Shepard
@Taslack
Jun 15 2017 21:30
@maad-boy Its adding that to the twitch users array that your supposed to use to meet the user story.
@WaterYourRoots Is it css?
Kaz Baig
@kbaig
Jun 15 2017 21:30
@ilincicd it means i am manually placing it somewhere
@ilincicd i also set the header to position: relative. This makes it so that when I position the nav using direction attributes, the values are in relation to the header rather than the page.
Danny
@WaterYourRoots
Jun 15 2017 21:32
@Taslack @maad-boy it's in html, its the font awesome classes that CSS tricks talks about (fa fa...)
would i use a meta link to it and then still use the font awesome class like the other?
Andrew Hickman
@ahickman3
Jun 15 2017 21:33
alright, got a possibly dumb scope related question. Im trying to get my json data that ive successfully gotten inside a var i created, it successfuly copies to the variable INSIDE the function, yet when i do console log of that variable outside the function, it suddenly doesnt contain it anymore. here my code
var imgurID = '0RQtP';
var key = "cfb3f86a62ab07c";
var jsonData = '';

$.ajax({
    type: 'GET',
    url: 'https://api.imgur.com/3/album/' + imgurID + '/images',
    // beforeSend: function(request) {
    //     request.setRequestHeader('Authorization', 'Client-ID '+ key)
    // },
    headers: {'Authorization': 'Client-ID '+ key},
    }).done(function(data) {

        jsonData = data;
    console.log(jsonData);
  });
    console.log(jsonData);
    $('body').html(JSON.stringify(jsonData));
Clinton Shepard
@Taslack
Jun 15 2017 21:33
@WaterYourRoots Just load in the fontawesome library in the css settings.
Danny
@WaterYourRoots
Jun 15 2017 21:33
i did that
Clinton Shepard
@Taslack
Jun 15 2017 21:34
@WaterYourRoots K then put in the class whatever icon you want to use.
Danny
@WaterYourRoots
Jun 15 2017 21:34
i have the other icons i want, i jus was wondering how you would add another websites icon
Clinton Shepard
@Taslack
Jun 15 2017 21:34
@WaterYourRoots You would just load in the link like you do all the other libraries.
Danny
@WaterYourRoots
Jun 15 2017 21:37
so I would load in the link, and then still add it to the font awesome line (<li><a href="#" class="fa fa-"icon"></a></li>)?
No Name
@ilincicd
Jun 15 2017 21:38
Guys, someone can help me?
izgled navoigacije.jpg
Clinton Shepard
@Taslack
Jun 15 2017 21:38
@fullmetal7777 Its do too the asyncronous data call of json......so the data loads into your webpage after it is recieved....aka....after everything loads.
@fullmetal7777 so you need to load the data on your page inside of the ajax call.
Andrew Hickman
@ahickman3
Jun 15 2017 21:40
@Taslack ah, so getting the json data to save to a variable outside of the function, and keep the data isnt possible? Theres probably no reason for it to, just messing around atm
Clinton Shepard
@Taslack
Jun 15 2017 21:41
@WaterYourRoots It all depends on what it is....if its css...then yes, you would load the external css file from the companyies website. Then you would define whatever class you want to the div you want.
@fullmetal7777 ya not reall....because then the page would have to "wait" for the data to load in order to continue. You can use a technique called promises in order to get the data to load different. i would definately recommend reading up on promises. https://www.promisejs.org/
@ilincicd What are we helping you with?
Andrew Hickman
@ahickman3
Jun 15 2017 21:43
@Taslack gotcha. Yeah just gunna not do that then lol thanks though, ill check promises out
CamperBot
@camperbot
Jun 15 2017 21:43
fullmetal7777 sends brownie points to @taslack :sparkles: :thumbsup: :sparkles:
:cookie: 405 | @taslack |http://www.freecodecamp.com/taslack
No Name
@ilincicd
Jun 15 2017 21:44
@Taslack It's written in picture. I want to separate navigation bar and article
Clinton Shepard
@Taslack
Jun 15 2017 21:44
@ilincicd Without looking at your code, add some padding to the bottom of your nav bar
teevik
@teevik
Jun 15 2017 21:49
Separate it? As in space or in styling?
No Name
@ilincicd
Jun 15 2017 21:50
@teevik Just to be empty space betven navigation and article... as you see, it's spplitted and it's not looking good. :)
BrunoM24
@BrunoM24
Jun 15 2017 21:50
who have done the pomodoro clock?
teevik
@teevik
Jun 15 2017 21:51
@ilincicd Use margin
No Name
@ilincicd
Jun 15 2017 21:52
@teevik hahahahah
@teevik thanks
CamperBot
@camperbot
Jun 15 2017 21:52
ilincicd sends brownie points to @teevik :sparkles: :thumbsup: :sparkles:
:cookie: 129 | @teevik |http://www.freecodecamp.com/teevik
Andrew Hickman
@ahickman3
Jun 15 2017 21:55
is there any reason why
$('body').html(JSON.stringify(data));
crap wait..
$('body').html(data);
ok why this wont work lol data being JSON js object
it doesnt put anything into the body. But JSON.stringify(data) will. Im assuming you cant just throw objects into html and expect it to display it? Would probably make sense.. just making sure though
Clinton Shepard
@Taslack
Jun 15 2017 21:57
@fullmetal7777 if you look at your pages source the data is probably displayed there.
Andrew Hickman
@ahickman3
Jun 15 2017 21:58
@Taslack i see it in the console. Was just wondering if it was possible to display object data as a js object through an html file
Gulsvi
@gulsvi
Jun 15 2017 22:01
@fullmetal7777 If you want it looking formatted like in the console, do:
$('body').html(`<pre>${JSON.stringify(data, null, '\t')}</pre>`);
Andrew Hickman
@ahickman3
Jun 15 2017 22:02
@SkyC0der ah, that is beautiful. Thank you once again lol
CamperBot
@camperbot
Jun 15 2017 22:02
fullmetal7777 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1728 | @skyc0der |http://www.freecodecamp.com/skyc0der
Jay Vora
@jayvora92
Jun 15 2017 22:15
hey all i have a issue with the javascript associated with the checkbox button
Gulsvi
@gulsvi
Jun 15 2017 22:16
@jayvora92 What's the question?
Jay Vora
@jayvora92
Jun 15 2017 22:16
on the backend i have to validate this checkbox and it doesn't have element by id( which is horrible) so I am trying to parse through its exact name. So i am thinking that if i give the exact name and its value i can parse it. I am stuck what i should replace in the code snippet on which radio button so my code works correctly.
Harshal
@harshalamin9
Jun 15 2017 22:16
can someone give me a feedback on my first project tribute page: https://codepen.io/harshalamin/pen/aWgrqp
Jay Vora
@jayvora92
Jun 15 2017 22:16
backend snippet js code.PNG
Capture checkbox.PNG
Capture js checkbox.PNG
on the backend i have to validate this checkbox and it doesn't have element by id( which is horrible) so I am trying to parse through its exact name. So i am thinking that if i give the exact name and its value i can parse it. I am stuck what i should replace in the code snippet on which radio button so my code works correctly.
Gulsvi
@gulsvi
Jun 15 2017 22:17
@jayvora92 Select it by looking at the input elements in the .form-item class
with jQuery $('.form-item input[type="checkbox"]')
Cookie419
@Cookie419
Jun 15 2017 22:18
need help. messed up my brackets IDE attempting to put "open in browser" on the debug tool. How can I fix this when I don't know what's missing ? Any suggestions????? I'll listen to anything. In school need my IDE back, messed up at very bottom of debug tool. deleted some text by mistake. No idea what????
Harshal
@harshalamin9
Jun 15 2017 22:19
@SkyC0der can you give me feedback on my first project - thanx https://codepen.io/harshalamin/pen/aWgrqp
CamperBot
@camperbot
Jun 15 2017 22:19
harshalamin9 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1729 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 22:19
@jayvora92 You can also select by name, as you're trying to do. I believe those need to be unique: https://api.jquery.com/attribute-equals-selector/
Jay Vora
@jayvora92
Jun 15 2017 22:20
@SkyC0der ok but I still have define a variable name ?
Gulsvi
@gulsvi
Jun 15 2017 22:20
No, but if you're going to look up that element multiple times, you should define a variable for it.
Harshal
@harshalamin9
Jun 15 2017 22:20
@BrunoM24 can you give me feedback on my first project https://codepen.io/harshalamin/pen/aWgrqp
@fullmetal7777 can you give me feedback on my first project https://codepen.io/harshalamin/pen/aWgrqp
Jay Vora
@jayvora92
Jun 15 2017 22:21
@skycoder ok but now in defining the variable is this the correct format
Gulsvi
@gulsvi
Jun 15 2017 22:22
@harshalamin9 Good job - you should try to make it responsive and move all of your CSS into the CSS panel of codepen.
Jay Vora
@jayvora92
Jun 15 2017 22:22
var x= " I agree to the xyz Terms of Use and Privacy Policy."
var x=1;
Harshal
@harshalamin9
Jun 15 2017 22:23
ok I will try that in my second project. Thank You for your feedback. Much appreciated
Jay Vora
@jayvora92
Jun 15 2017 22:23
i know more python you can do that but nor sure about javascript
coz i want to store it in a variable and give a value too
@SkyC0der
Gulsvi
@gulsvi
Jun 15 2017 22:23
That code sets the value of x equal to the text string and then sets it equal to the number 1.
It overwrites the value and makes it 1
Jay Vora
@jayvora92
Jun 15 2017 22:24
oh ok :(
then how can give a value to that string
also if the sentence as anchor link do i need to provide while i am describe it in a avariable
Gulsvi
@gulsvi
Jun 15 2017 22:25
var company = "GitHub";
var x = 'I agree to the ' + company + ' Terms of Use and Privacy Policy.';
Panayiotis Mangafas
@mangafas
Jun 15 2017 22:27

hey... the function to make linear gradient background isn't like that?

background: linear-gradient( 35deg, #CCFFFF, #FFCCCC );

Jay Vora
@jayvora92
Jun 15 2017 22:27
and to validate it I have to make sure it takes the value which in the debugger is given 1.
backend snippet js code.PNG
Tyler Johnson
@tylerjj17
Jun 15 2017 22:28
dumb question but how do i put the search button to the right of the search bar
https://codepen.io/tylerjj17/pen/jwEXMb
niprobin
@niprobin
Jun 15 2017 22:28
Hey guys, I used some jquery to add a smooth scrolling but it has disabled the links in my navbar (these ones do not need the smooth scrolling function). Any idea why?
Gulsvi
@gulsvi
Jun 15 2017 22:29
@jayvora92 You can use .value() to get the value of an input
Jay Vora
@jayvora92
Jun 15 2017 22:30
@SkyC0der so based on your previous approach I am going to do
var terms and condition= "anchor link" and then var x= ' I agree to xyz '+' terms and condition' @SkyC0der
but again while describing I can't space in varaibale
which was my exact issue
Gulsvi
@gulsvi
Jun 15 2017 22:33
@jayvora92 No, that won't work. Like you say, there are spaces in your variable name. You should do the courses here at Free Code Camp - they have some challenges around setting variables.
Jay Vora
@jayvora92
Jun 15 2017 22:36
yes i would but do have a specific solution which would help to solve the current issue
@SkyC0der
Gulsvi
@gulsvi
Jun 15 2017 22:37
@jayvora92 I don't understand the scope of what you are trying to accomplish
You say you are trying to validate the code on the back-end - is this with Node.js?
@tylerjj17 Give your <input> element display: inline-block and remove all those <br> elements - that element is for poems and addresses, not creating vertical space.
@niprobin If you have event.preventDefault() somewhere in your click function, it will disable the link functionality. If you can share the code, we can take a closer look
Jay Vora
@jayvora92
Jun 15 2017 22:44
@SkyC0der var radioName = "I agree to the XYZ <a href="/legal-information/website-terms-use">Terms of Use</a> and <a href="/legal-information/privacy-statement">Privacy Policy</a>.";
would this be valid declaration?
Gulsvi
@gulsvi
Jun 15 2017 22:46
@jayvora92 No, you would need to escape the double quotes in your string - just like in python.
Jake
@JakeDVirus
Jun 15 2017 22:47
i gave the particular image (class name --> imageRight) a css property .banner .imageRight {margin-top: 15%}, but it act like it has been given approximaltelymargin-top: 30%. i dont know whats going under the hood. try to view the codepen link in full page mode..
https://codepen.io/neel111/full/VWYQKw/
Gulsvi
@gulsvi
Jun 15 2017 22:47
"I agree to the XYZ <a href=\"/legal-information/website-terms-use\">Terms of Use</a> and <a href=\"/legal-information/privacy-statement\">Privacy Policy</a>."
niprobin
@niprobin
Jun 15 2017 22:48
@SkyC0der hey yes I am using the event.preventDefault() so I guess that's why. Here is the jquery code:
$(document).on('click', 'a', function(event) {
                            event.preventDefault();

                            $('html, body').animate({
                                scrollTop: $($.attr(this, 'href')).offset().top
                            }, 500);
                        });
                        $(document).ready(function() {
                            $("a").on('click', function(event) {

                                if (this.hash !== "") {
                                    event.preventDefault();

                                    var hash = this.hash;

                                    $('html, body').animate({
                                        scrollTop: $(hash).offset().top
                                    }, 800, function() {

                                        window.location.hash = hash;
                                    });
                                } 
                            });
                        });
Gulsvi
@gulsvi
Jun 15 2017 22:50
@niprobin If you only want the functionality to apply to specific links, don't use a for your selector. That selects every single <a> tag on the page. Select elements by class name instead.
And, try to tidy your code indentation - it will help make it easier to debug, understand, and maintain
BrunoM24
@BrunoM24
Jun 15 2017 22:55
@harshalamin9 its good
@SkyC0der you have done the pomodoro clock? I will start doing the pomodoro until I find a good way to solve the issue with the floating in the calculator
Jay Vora
@jayvora92
Jun 15 2017 22:58
@SkyC0der thanks for the correct syntax
CamperBot
@camperbot
Jun 15 2017 22:58
jayvora92 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1730 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 23:00
@BrunoM24 I have the main algorithm in place. No UI yet
BrunoM24
@BrunoM24
Jun 15 2017 23:01
@SkyC0der you have used the Date function?
Gulsvi
@gulsvi
Jun 15 2017 23:02
Yes @BrunoM24
BrunoM24
@BrunoM24
Jun 15 2017 23:04
@SkyC0der I havent start yet, but I think I will use the Date to create a new Date depending on the variables defined, and have a setInterval() to update the count down
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 23:05
@harshalamin9 i have a quest.... how did you get a margin on the left side of your <ul> I like that...I looked at code and I can't find it....ps im a newbie too
Gulsvi
@gulsvi
Jun 15 2017 23:05
setInterval is probably plenty @BrunoM24
If you want it to be accurate, you can check against the date and adjust if needed
Jay Vora
@jayvora92
Jun 15 2017 23:06
the below code throwing undefined . can anyone tell me the potential problem

```function() {

var radioName = "I agree to the xyz Terms <a href=\"/legal-information/website-terms-use\">Terms of Use</a> and <a href=\"/legal-information/privacy-statement\">Privacy Policy</a>.";

var buttons = {{Form Element}}.querySelectorAll('[name="' + radioName + '"]') || [];
var i, len;
for (i = 0, len = buttons.length; i < len; i++) {
if (buttons[i].checked) {
return buttons[i].value;
}
}
return undefined;
} ```

BrunoM24
@BrunoM24
Jun 15 2017 23:08
@SkyC0der just using setInterval? its need two then right? one to update every second and one to update when the 25 minutes end?
Gulsvi
@gulsvi
Jun 15 2017 23:09
@BrunoM24 One timing function that takes an argument of the number of minutes to start counting down from.
BrunoM24
@BrunoM24
Jun 15 2017 23:10
@SkyC0der something like this
setInterval(alertFunc, 1000 * 60 * timeDefined);
Jay Vora
@jayvora92
Jun 15 2017 23:11
function() {

  var radioName = "I agree to the  xyz Terms <a href=\"/legal-information/website-terms-use\">Terms of Use</a> and <a href=\"/legal-information/privacy-statement\">Privacy Policy</a>.";

  var buttons = {{Form Element}}.querySelectorAll('[name="' + radioName + '"]') || [];
  var i, len;
  for (i = 0, len = buttons.length; i < len; i++) {
    if (buttons[i].checked) {
      return buttons[i].value;
    }
  }
  return undefined;
}
@SkyC0der
Long Nguyen
@longnt80
Jun 15 2017 23:12

@BrunoM24

@SkyC0der just using setInterval? its need two then right? one to update every second and one to update when the 25 minutes end?

you need only one setInterval to check the Date (in milliesecond), use that millisecond to calculate how many seconds, minutes, hours has passed

Gulsvi
@gulsvi
Jun 15 2017 23:13
@longnt80 You don't need to check the Date - you just tell setInterval to run at 1000 millisecond intervals, subtract the time on the page by 1 second for every interval, until the time on the page reaches 0.
oops lol, misunderstood what you meant and thought I was talking to Bruno lol
Long Nguyen
@longnt80
Jun 15 2017 23:15
@SkyC0der check the date because @BrunoM24 is gonna use Date object to measure it
it did the same thing with my clock
Gulsvi
@gulsvi
Jun 15 2017 23:15
Yeah, that's a self-adjusting timer. More accurate doing that
BrunoM24
@BrunoM24
Jun 15 2017 23:16
@SkyC0der tomorrow I will start codding, and hope ending xD I think I dont will use the Date object, I will try to do without Date object @longnt80
Barbara Pentoney
@flyfishingbarbara
Jun 15 2017 23:16
@harshalamin9 ....never mind. I figured it out...
Long Nguyen
@longnt80
Jun 15 2017 23:17
@BrunoM24 even though setInterval is ok but I suggest you use the Date object
@BrunoM24 setInterval just make the clock feels like a toy clock
I made my clock with only setInterval first but redid it with Date object
BrunoM24
@BrunoM24
Jun 15 2017 23:20
@longnt80 can you show me your project?
niprobin
@niprobin
Jun 15 2017 23:24
@SkyC0der Thank you very much that work just fine ! And will try to indent better as well, thanks for the advice :) :+1:
CamperBot
@camperbot
Jun 15 2017 23:24
niprobin sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1731 | @skyc0der |http://www.freecodecamp.com/skyc0der
doridarien
@doridarien
Jun 15 2017 23:38

Hi I have question regarding Random Quote machine.. here are my js code.

$("#pusher").on("click", genQuote);

function genQuote() {
$.ajaxSetup({ cache:false });
$.get("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function (a) {
//console.log(a[0].content + "<p>-" + a[0].title + "<p>")
$("#quote").html(a[0].content + "<p>-" + a[0].title + "<p>")
})
};

I don't understand $.ajaxSetup({ cache:false }); . If I remove this line, it will only generate the first quote and no more. why is that?

CallMeOrange
@EgnaroDev
Jun 15 2017 23:39
@SkyC0der hey you on?
doridarien
@doridarien
Jun 15 2017 23:40
addition to that this is cache description."A Boolean value indicating whether the browser should cache the requested pages. Default is true" still don't understand.
Gulsvi
@gulsvi
Jun 15 2017 23:43
Yeah @MCTwoDigitZero Hello
CallMeOrange
@EgnaroDev
Jun 15 2017 23:44
@SkyC0der I have problem with font awesome
I even added font-awesome link
Written and coded by McTwo...
<i style="color: orange" class="fa fa-icon-circle"></i>
I have no idea whats wrong with it
Gulsvi
@gulsvi
Jun 15 2017 23:47
@MCTwoDigitZero I don't see fa-icon-circle in their documentation
CallMeOrange
@EgnaroDev
Jun 15 2017 23:47
seriously?
Gulsvi
@gulsvi
Jun 15 2017 23:47
It works if I change it to fa-circle
CallMeOrange
@EgnaroDev
Jun 15 2017 23:47
It was used in fCC
I see so its just icon-circle
Gulsvi
@gulsvi
Jun 15 2017 23:47
Go here and search: http://fontawesome.io/icons/
CallMeOrange
@EgnaroDev
Jun 15 2017 23:47
thanks @SkyC0der
CamperBot
@camperbot
Jun 15 2017 23:47
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1732 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 15 2017 23:48
They have lots of examples of "circle"
CallMeOrange
@EgnaroDev
Jun 15 2017 23:48
Im pretty sure it was used in fCC
:/
Gulsvi
@gulsvi
Jun 15 2017 23:48
FCC is 2 years old - probably not around in the latest version of font awesome
CallMeOrange
@EgnaroDev
Jun 15 2017 23:49
Probably
Gotta go thanks again
Kaz Baig
@kbaig
Jun 15 2017 23:57
It's not done yet but I'd appreciate some feedback on my Simon game https://codepen.io/kbaig/full/KqgZvo/
CallMeOrange
@EgnaroDev
Jun 15 2017 23:57
@kbaig how its not done yet?
about @kbaig
CamperBot
@camperbot
Jun 15 2017 23:57
:cookie: 302 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
Jun 15 2017 23:58
@MCTwoDigitZero Gonna add a timer if the user takes to long to press a button
CallMeOrange
@EgnaroDev
Jun 15 2017 23:58
I see
good idea
Tyler Johnson
@tylerjj17
Jun 15 2017 23:58
Please help is there something wrong with my json or anything, but my wiki viewer isnt responding https://codepen.io/tylerjj17/pen/jwEXMb