These are chat archives for FreeCodeCamp/HelpFrontEnd

2nd
Apr 2016
Stephen James
@sjames1958gm
Apr 02 2016 00:00
data.lon not data.long and
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:00
When I scroll to the bottom my navigation bar is set to appear, but when I scroll up, the animation runs again.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:00
@sjames1958gm ah.. it shows NaN
Stephen James
@sjames1958gm
Apr 02 2016 00:00
data.long is undefined when added to another number is NAN
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:01
Anyone willing to take a look?
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:01
@sjames1958gm still says NaN..
oh wait
Stephen James
@sjames1958gm
Apr 02 2016 00:01
Try console.log(lat + " " + long) to convert to string
@OferSheffer The nav bar is interesting, but it disappears when you need it.
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:02
It is set to disappear on scroll down and reappear on scroll up
was the design of the website I was supposed to copy
when reaching the bottom, it is set to reappear
I don't like how it skips and replays the reappear animation when scrolling up from the bottom of the page
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:03
wow.. @sjames1958gm it actually works! how cool..been basically researching and reading for 6 hours and thats all the code i got..
its inside a function.. when i try to call those data values they are local and not global
Stephen James
@sjames1958gm
Apr 02 2016 00:04
@Dueldrawer8 Yes and you can call your weather function passing them and that function can $.ajax your weather.
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:05
I sat on this page the entire day and it's 3am
can't keep my eyes
open
Stephen James
@sjames1958gm
Apr 02 2016 00:05
Go
to
sleep
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:06
if anyone is willing to give it a look and send me a message on what they saw... that'll be lovely
I have two issues...
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:06
@sjames1958gm dont have a weather function yet.. so you suggest i use $.ajax instead of $.getJSON again?
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:06
one... the 2nd reappearance once scrolling up from the bottom of the page
Stephen James
@sjames1958gm
Apr 02 2016 00:06
@Dueldrawer8 getJSON is fine - I was still on another person
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:07
@sjames1958gm oh ok
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:07
and the stupid buttons on my nav bar don't fill up the drop-down in the small screen view.
when I fiddle with them, the large screen design is ruined
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:07
have to go get food.. so annoying.. ill be back on soon
Stephen James
@sjames1958gm
Apr 02 2016 00:08
@Dueldrawer8 Eating what a pain :)
@OferSheffer Laila Tov
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:08
@sjames1958gm well.. im getting food for my mother and brother
Stephen James
@sjames1958gm
Apr 02 2016 00:08
@Dueldrawer8 Oh. Family what a bother ;)
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:08
@sjames1958gm none for me.. i ate about an hour ago lol
Ofer Sheffer
@OferSheffer
Apr 02 2016 00:08
g'night
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 00:09
@sjames1958gm working 40 hours a week, interning 20hrs, and college.. it gets to ya and makes me want to do nothing
especially after this great breakthrough that ive been spending 6 hours on and you cracked it in 2 min!
Eternalfalter
@Eternalfalter
Apr 02 2016 00:43
Feeling dumb here. Trying to center an image using only HTML5. What's the most efficient way to center an image (or the entire page, really) without using CSS?
I know how to do it with CSS but the project says to use HTML5 only, and I'm not finding anything via Google that doesn't use CSS
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:46
@Eternalfalter what project
Eternalfalter
@Eternalfalter
Apr 02 2016 00:46
@MichaelArnoldOwens The first real one, "Build a Tribute Page"
I guess there's nothing that says you can't use CSS unless you watch the video, where he doesn't use CSS
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:47
where does it say don't use css
Eternalfalter
@Eternalfalter
Apr 02 2016 00:48
In the video. He uses HTML5 to do it all except for a bit about the margin at the top
I think I may have found a solution with <div class=text-center>
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:49
that's still CSS. that's called a CSS Class. yeah don't forget quotes
a bootstrap css class to be more specific @Eternalfalter
Eternalfalter
@Eternalfalter
Apr 02 2016 00:49
Ah, Gotcha. Yeah I'm going to just ignore the whole don't use CSS thing then.
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:49
gl hf
Eternalfalter
@Eternalfalter
Apr 02 2016 00:49
Thanks @MichaelArnoldOwens
CamperBot
@camperbot
Apr 02 2016 00:49
eternalfalter sends brownie points to @michaelarnoldowens :sparkles: :thumbsup: :sparkles:
:star: 98 | @michaelarnoldowens | http://www.freecodecamp.com/michaelarnoldowens
Clare Dickerson
@claredickerson
Apr 02 2016 00:51

@claredickerson
HEY! For this exercise:
if (condition1) {
statement1
} else if (condition2) {
statement2
} else if (condition3) {
statement3
. . .
} else {
statementN
}

...how am I supposed to format the statements?
I've tried a number of ways but they all feel (and are) incorrect.

lol yes i copy and pasted that.
Stephen James
@sjames1958gm
Apr 02 2016 00:54
@claredickerson Are you supposed to convert that to a switch statement?
Clare Dickerson
@claredickerson
Apr 02 2016 00:54
yes
let me copy the whole thang

Write chained if/else if statements to fulfill the following conditions:

num < 5 - return "Tiny"
num < 10 - return "Small"
num < 15 - return "Medium"
num < 20 - return "Large"
num >= 20 - return "Huge"

my code is kind of a mess, so i don't want to provide it. i'm mostly looking for how to write the statement, not the entire exercise.
but any help/advice/explanation is welcome
Stephen James
@sjames1958gm
Apr 02 2016 00:55
the format that you have looks close
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:55
@claredickerson but also there's a logic error
Stephen James
@sjames1958gm
Apr 02 2016 00:56
switch statement does not allow comparisons
Clare Dickerson
@claredickerson
Apr 02 2016 00:56
it doesn't look like they're suggesting i do switch anyway
Stephen James
@sjames1958gm
Apr 02 2016 00:57
num < 5 is condition 1 and return "Tiny" is statement 1
Michael Owens
@MichaelArnoldOwens
Apr 02 2016 00:57
ah n
Clare Dickerson
@claredickerson
Apr 02 2016 00:58
@sjames1958gm yes, that's not what i'm asking
all i want to know is how to format the statements. do they go inside of anything or just out alone
the rest of it i can figure out
Stephen James
@sjames1958gm
Apr 02 2016 00:59
just inside the function() {
if (condition1) {
statement1
} else if
What you posted above looks fine
Clare Dickerson
@claredickerson
Apr 02 2016 00:59
ok. i did it that way and it didn't go through so i'll make sure i didn't mistype something along the way.
thanks @sjames1958gm
CamperBot
@camperbot
Apr 02 2016 00:59
claredickerson sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 399 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Apr 02 2016 01:00
np
Clare Dickerson
@claredickerson
Apr 02 2016 01:02
hmm. still not woking.
or working.
JK I GOT IT
  if (num < 5) { return 'Tiny'; }
  else if (num < 10) { return 'Small'; }
  else if (num < 15) { return 'Medium'; }
  else if (num < 20) { return 'Large'; }
  else { return 'Huge'; }
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:06
how do i get my city and country global
Stephen James
@sjames1958gm
Apr 02 2016 01:07
@Dueldrawer8 You can put var lat var lon outside any function.
Stephen James
@sjames1958gm
Apr 02 2016 01:08
or move your var city var country outside any function.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:08
is there a cleaner way to do it?
well it will work just trying to get this to work
says i have an unexpected string
Stephen James
@sjames1958gm
Apr 02 2016 01:09
you can pass them in a function call to a function that uses them for the weather call
missing + after country before " "
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:13
@sjames1958gm thanks
CamperBot
@camperbot
Apr 02 2016 01:13
dueldrawer8 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 400 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Josh Bivens
@joshbivens
Apr 02 2016 01:14
@joshbivens
I have a question about new Dates.
After I subtract 24 from my ...getHours() it's showing that it's 5, however it's actually 7 here. Are new Dates in a timezone?
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:17
@sjames1958gm are you able to see my temp wont log?
sorry why it wont log
Stephen James
@sjames1958gm
Apr 02 2016 01:20
There are a couple of things here - when you set api, city and country are not set because you have to wait for the response. You need to call $.ajax inside your callback from getting the response from ip-api.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:21
need to set $.ajax inside the $.json callback?
so instead of data it needs to be $.ajax?
cyounger88
@cyounger88
Apr 02 2016 01:23
How do I add a space in between these string? = myAdjective + myNoun + myVerb + myAdverb;
Stephen James
@sjames1958gm
Apr 02 2016 01:24
" " + myAdjective + " " +
cyounger88
@cyounger88
Apr 02 2016 01:24
okay thanks @sjames1958gm
CamperBot
@camperbot
Apr 02 2016 01:24
cyounger88 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 401 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Apr 02 2016 01:24
@Dueldrawer8 After you get city and country - build your api url - then call $ajax there
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:27
so i need to move my var api under the $.json function?
Stephen James
@sjames1958gm
Apr 02 2016 01:28
Since that is the only place you use it yes.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:29
so this works?
Paul Borawski
@iAmNawa
Apr 02 2016 01:30
@Dueldrawer8 no
Stephen James
@sjames1958gm
Apr 02 2016 01:30
Move line 11 down so that the following are inside of the callback.
Paul Borawski
@iAmNawa
Apr 02 2016 01:30
It shows in the console the correct city but temperature is off @Dueldrawer8
Stephen James
@sjames1958gm
Apr 02 2016 01:30
The api setting and the call have to occur after the city and country are returned and the only place is inside of the getJSON callback
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:31
so my $.ajax needs to go inside $.json?
Stephen James
@sjames1958gm
Apr 02 2016 01:32
yes, more specifically inside the callback.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:33

$.ajax({
url: api,
dataType: 'json',
success: function(data){
var temp = data.main.temp;
console.log(temp);
}

});

Stephen James
@sjames1958gm
Apr 02 2016 01:33
Close move var api in there as well
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:34
wow..looks cluttered..has to be an easier way to do it
Stephen James
@sjames1958gm
Apr 02 2016 01:34
Yes
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:35
can i make $.ajax a function?
Stephen James
@sjames1958gm
Apr 02 2016 01:35
Put var api and $.ajax in a function, function getWeather(city, country) { var api = ... $.ajax(...} and then call getWeather(city, country) from the callback.
Check!
While you are coding click the tidy button periodically, "tidy" code is easier to read and think about
nemonemo33
@nemonemo33
Apr 02 2016 01:41

Can anyone help me understand why I don't seem to be getting any data back from this ajax call in the Local Weather project?

http://codepen.io/MagicMarkers/pen/MyowXN

Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:44
says undefined
undefined means its created but not assigned to anything correct?
Stephen James
@sjames1958gm
Apr 02 2016 01:45
yes
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:45
getWeather is inside my callback
Stephen James
@sjames1958gm
Apr 02 2016 01:46
try console.log on values to make sure they are correct input to $.ajax
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:47
city and country and fine
wont let me console.log url, success, etv
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:53
ah finally worked
Stephen James
@sjames1958gm
Apr 02 2016 01:54
yeah
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:54
thanks @sjames1958gm @iAmNawa
CamperBot
@camperbot
Apr 02 2016 01:54
dueldrawer8 sends brownie points to @sjames1958gm and @iamnawa :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave sjames1958gm points
:star: 312 | @iamnawa | http://www.freecodecamp.com/iamnawa
Stephen James
@sjames1958gm
Apr 02 2016 01:56
if you use units=metric or units=imperial it will return temp in something other than kelvin
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 01:57
is that a jQuery method?
i could write a var to convert but that does it for me automatically?
@sjames1958gm in another words.. i cant find the documentation on it to understand how it works
走你飛艇
@gofighting123
Apr 02 2016 02:05
@sjames1958gm ....good morning....good afternoon and good night...
Stephen James
@sjames1958gm
Apr 02 2016 02:08
@Dueldrawer8 Its part of the URL to the weather site
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 02:08
where would i find that info of how to do that?
Stephen James
@sjames1958gm
Apr 02 2016 02:08
You add it to the URL and it returns the correct units
@gofighting123 Yo dude :)
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 02:09
@sjames1958gm thanks
CamperBot
@camperbot
Apr 02 2016 02:09
dueldrawer8 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave sjames1958gm points
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 02:09
@sjames1958gm yeah on the site..
Mike Haslam
@Ongomobile
Apr 02 2016 02:30
Hello campers! Having some trouble with bootstrap 4 navbar when the breakpoint collapses the navbar tried adding padding stumped on what I am missing here is pen http://codepen.io/Ongomobile/full/ONmYQE/
Candice
@smrtsmrf
Apr 02 2016 02:37
@nemonemo33 you need this line instead
$("#data").html(JSON.stringify(json));
Paul Borawski
@iAmNawa
Apr 02 2016 02:40
@Ongomobile what’s wrong?
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 02:40
how do i get my json info to display onto the html?
Paul Borawski
@iAmNawa
Apr 02 2016 02:41
@Ongomobile how do you get the background to stay while the rest of the screen scrolls up?
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 02:42
nvm..figured it out
Mike Haslam
@Ongomobile
Apr 02 2016 02:46
@iAmNawa Hi the background is fixed I will show css , my problem is when navbar gets to size where hamburger menu appears it dis appears
Paul Borawski
@iAmNawa
Apr 02 2016 02:51
@Ongomobile the navbar never disappears for me
Mike Haslam
@Ongomobile
Apr 02 2016 02:53
@iAmNawa what size or device did you use? when I use on Iphone in portrait it disappears when you tap it , and when I srink down browserwindow and click it it diss apears
@iAmNawa sorry I type slow
Paul Borawski
@iAmNawa
Apr 02 2016 02:54
google chrome I’m looking at it on a 50” television
走你飛艇
@gofighting123
Apr 02 2016 02:54
@iAmNawa ....
Paul Borawski
@iAmNawa
Apr 02 2016 02:55
@gofighting123 what’s up?
Mike Haslam
@Ongomobile
Apr 02 2016 02:55
shrink the browser window so hambuger menu appears then click it
走你飛艇
@gofighting123
Apr 02 2016 02:56
@iAmNawa he is testing on the 400px mobile i think :smile: you are on tv QAQ
Mike Haslam
@Ongomobile
Apr 02 2016 02:57
@iAmNawa The way I got the back ground image to stay fixed is using parralax effect the background image is in HTML jumbotron then parralax class in css styles
@gofighting123 thats right same when browser window shrinks
Paul Borawski
@iAmNawa
Apr 02 2016 02:59
@Ongomobile thanks!
CamperBot
@camperbot
Apr 02 2016 02:59
iamnawa sends brownie points to @ongomobile :sparkles: :thumbsup: :sparkles:
:star: 136 | @ongomobile | http://www.freecodecamp.com/ongomobile
Mike Haslam
@Ongomobile
Apr 02 2016 03:00
@iAmNawa Thanks for checking out my problem
CamperBot
@camperbot
Apr 02 2016 03:00
ongomobile sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
:star: 320 | @iamnawa | http://www.freecodecamp.com/iamnawa
Paul Borawski
@iAmNawa
Apr 02 2016 03:00
how do you set different scroll speeds? @Ongomobile
Mike Haslam
@Ongomobile
Apr 02 2016 03:02
@iAmNawa Sorry I don't know how to do that
走你飛艇
@gofighting123
Apr 02 2016 03:51
@Ongomobile you have two navbar2.................
@Ongomobile founded the bug = =
@Ongomobile :alien: nav id='navbar2'........................
echo Hail Hydra ?
CamperBot
@camperbot
Apr 02 2016 03:53
@gofighting123 said: echo Hail Hydra ?
Paul Borawski
@iAmNawa
Apr 02 2016 03:56
@Ongomobile you there?
Eternalfalter
@Eternalfalter
Apr 02 2016 03:56
So, I just created the very first thing I've ever coded in my life. It's all around rubbish, but the main question I have for it is how I can make it more mobile friendly. Would love if someone could take a look for me.
走你飛艇
@gofighting123
Apr 02 2016 03:57
.................... :alien:
Paul Borawski
@iAmNawa
Apr 02 2016 03:59
@Eternalfalter yes I can help
Eternalfalter
@Eternalfalter
Apr 02 2016 04:01
Thanks @iAmNawa . Just have the Pen here https://codepen.io/pen/ZWXJBL
CamperBot
@camperbot
Apr 02 2016 04:01
eternalfalter sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
:star: 321 | @iamnawa | http://www.freecodecamp.com/iamnawa
Eternalfalter
@Eternalfalter
Apr 02 2016 04:02
It's for the first Front End project, for the Tribute. I think I technically met all the requirements but I want to learn more.
I noticed when I opened it on my phone I had to scroll to the right to have it centered.
走你飛艇
@gofighting123
Apr 02 2016 04:03
@Eternalfalter RWD again....
Eternalfalter
@Eternalfalter
Apr 02 2016 04:04
RWD?
<-- never touched code or this community before yesterday.
走你飛艇
@gofighting123
Apr 02 2016 04:05
@Eternalfalter :clap: ......welcome........
Eternalfalter
@Eternalfalter
Apr 02 2016 04:05
Thanks @gofighting123
CamperBot
@camperbot
Apr 02 2016 04:05
eternalfalter sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 282 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 04:06
@Eternalfalter it's a complex field...with design and coding.....
Eternalfalter
@Eternalfalter
Apr 02 2016 04:06
Ah. So maybe it's above my level just yet.
走你飛艇
@gofighting123
Apr 02 2016 04:07
@Eternalfalter in a word....it's a mess..... :alien:
Paul Borawski
@iAmNawa
Apr 02 2016 04:07
@Eternalfalter It looks good
@media only screen and (min-width:480px) and (max-width: 640px) {
Eternalfalter
@Eternalfalter
Apr 02 2016 04:07
The requirements for the Tribute page were pretty easy, I just wanted it to be nicer. The next project though, the portfolio--- not even sure where to begin there.
Oh yeah? Where do I throw that in?
Paul Borawski
@iAmNawa
Apr 02 2016 04:08
if yout type that there and change the pixel widths, you code different css there, and inbetween those two pixel width the page will be different
走你飛艇
@gofighting123
Apr 02 2016 04:08
@iAmNawa you are so kind :alien:
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:09
Hi everyone! I'm trying to find some help with the finishing touches to my portfolio project :/
Paul Borawski
@iAmNawa
Apr 02 2016 04:09
@Eternalfalter Max it max width- like 400 maybe and redo all your css in that section to make everything smaller
make it max*
You can look up the exact pixel width of your phone and make the page so it will load perfectly on your phone if you wish
haha @gofighting123 thanks!
CamperBot
@camperbot
Apr 02 2016 04:10
iamnawa sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 283 | @gofighting123 | http://www.freecodecamp.com/gofighting123
Paul Borawski
@iAmNawa
Apr 02 2016 04:10
@ConnHurr post the code
The first thing is trying to center the thumbnails in the portfolio section...and the second is figuring out how to mouse over the thumbnails, make it darker, and have text appear... im lost on the second one!
走你飛艇
@gofighting123
Apr 02 2016 04:11
@iAmNawa should we try to teach newbie using templates without writing code by themself ?
Paul Borawski
@iAmNawa
Apr 02 2016 04:12
@ConnHurr Looks really good!
Eternalfalter
@Eternalfalter
Apr 02 2016 04:12
Thanks @iAmNawa . Not sure where to put the @media . Would that be under style? Div? a class? (not familiar with the @ tag at all).
CamperBot
@camperbot
Apr 02 2016 04:12
eternalfalter sends brownie points to @iamnawa and @media :sparkles: :thumbsup: :sparkles:
:warning: eternalfalter already gave iamnawa points
:star: 24 | @media | http://www.freecodecamp.com/media
Paul Borawski
@iAmNawa
Apr 02 2016 04:13
@Eternalfalter you put it in the bottom of your css and after that tag you start writing a whole new group of css
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:13
@iAmNawa thank you! im just not sure how to fix the portfolio section
CamperBot
@camperbot
Apr 02 2016 04:13
connhurr sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
:star: 322 | @iamnawa | http://www.freecodecamp.com/iamnawa
Eternalfalter
@Eternalfalter
Apr 02 2016 04:13
Ah, gotcha
Paul Borawski
@iAmNawa
Apr 02 2016 04:13
@ConnHurr look up css transitions
@ConnHurr also look up css hover
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:15
I have the :hover set up, but for some reason, it appears below
.coming-soon:hover > .overlay {
width:100%;
height:100%;
background-color:#000;
opacity:0.5;
}
I'm not sure if im setting it up correctly?
走你飛艇
@gofighting123
Apr 02 2016 04:15
@ConnHurr happy debug time :sparkles:
Paul Borawski
@iAmNawa
Apr 02 2016 04:16
I don’t know what that > .overlay is
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:16
@gofighting123 yup... I just want to get it done with so I can move on to JS
走你飛艇
@gofighting123
Apr 02 2016 04:16
@ConnHurr ..... :alien:
Paul Borawski
@iAmNawa
Apr 02 2016 04:16
get rid of the > .overlay and it should work
Mike Haslam
@Ongomobile
Apr 02 2016 04:17
@gofighting123 Thanks a lot sorry had to step away!
CamperBot
@camperbot
Apr 02 2016 04:17
ongomobile sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 284 | @gofighting123 | http://www.freecodecamp.com/gofighting123
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:18
What I was trying to do was make it so when you hover over, it adds the text from overlay on top of the thumbnail...is there a way to do that with css? or would I have to use jquery?
Paul Borawski
@iAmNawa
Apr 02 2016 04:18
@Ongomobile you there?
Mike Haslam
@Ongomobile
Apr 02 2016 04:18
Hi @iAmNawa
Connor Hastey-Palindat
@cpalindat
Apr 02 2016 04:18
I removed the overall and now it just shifts the one below it down :(
Paul Borawski
@iAmNawa
Apr 02 2016 04:18
check this out
I’m practicing parallax effect, I vow to get really good at it
走你飛艇
@gofighting123
Apr 02 2016 04:19
@Ongomobile why not use bs stable 3.x but 4.0 alpha....
Time to lunch , see ya.
Mike Haslam
@Ongomobile
Apr 02 2016 04:19
@iAmNawa looks cool
@gofighting123 wanted to try 4 have a nice lunch
Paul Borawski
@iAmNawa
Apr 02 2016 04:20
@Ongomobile I always wanted to figure that out, thanks for telling me about the parallax effect! @Ongomobile
CamperBot
@camperbot
Apr 02 2016 04:20
iamnawa sends brownie points to @ongomobile :sparkles: :thumbsup: :sparkles:
:star: 137 | @ongomobile | http://www.freecodecamp.com/ongomobile
Mike Haslam
@Ongomobile
Apr 02 2016 04:21
@iAmNawa glad I helped you sorry i don't explain well at times
Paul Borawski
@iAmNawa
Apr 02 2016 04:22
@Ongomobile giving me the name of the effect was enough, I’ve asked people in the past but no one seemed to knwo what it was called
Mike Haslam
@Ongomobile
Apr 02 2016 04:25
@iAmNawa You know FCC rocks we are all helping each other!
Paul Borawski
@iAmNawa
Apr 02 2016 04:28
yeah for sure I’m so glad I found this place
Eternalfalter
@Eternalfalter
Apr 02 2016 04:51
Okay @iAmNawa , I tried to figure it out but I'm just not getting the CSS @ media thing. So you type in @media only screen
and (min-device-width: 320px)
and (max-device-width: 480px) { then insert the new CSS here?
I've never actually used the CSS box. It's all been the HTML. Not sure the training covered a separate CSS box much...
Paul Borawski
@iAmNawa
Apr 02 2016 04:53
@Eternalfalter
@media screen and (max-width: 785px) {
  h1 {font-size: 1.8em;}
  h2 {font-size: 1.4em;}
  h3 {font-size: 1.1em;}
  a.btn {font-size: 1em;}

  /*header*/
  header a.logo {width: 145px; height: 60px;}
  header div.hero {top: 140px; left: 48%}

  /*section main*/
  section.main {margin-top: 10px; margin-bottom: 10px;}
  section.main aside div.content { background-size: 55px 55px; padding-top: 60px;}

/*section how to*/
section.how-to aside div.content img {width: 85%;}

/*nav*/
nav {padding-top: 80px;}
nav > ul {padding-left: 10px;}
}
that’s from one of my sites, that will make it so anything under 785 pixels will follow those rules
you can see I’ve changed font-sizes, widths, etc.
Eternalfalter
@Eternalfalter
Apr 02 2016 04:54
Gotcha. Okay.
Paul Borawski
@iAmNawa
Apr 02 2016 04:55
To be honest I like doing a max width and then declaring another section with a different max width
like now if i made another section that was max width 400px, by default the current one would then be between 400px and 785px
That way you can just declare max widths and don’t have to worry about the min width
Eternalfalter
@Eternalfalter
Apr 02 2016 04:56
Gotcha. Okay let me try to apply some of this. Half the stuff in your code I don't get so I have to try to translate haha. Thanks @iAmNawa .
CamperBot
@camperbot
Apr 02 2016 04:56
:warning: eternalfalter already gave iamnawa points
eternalfalter sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
Paul Borawski
@iAmNawa
Apr 02 2016 04:57
@Eternalfalter max a max width and just declare like one thing to change, then load it, and then drag the screen to that pixel width, and see if it works
use inspect element on google chrome and it will tell you the exact pixel width of the screen while you drag it smaller or larger
Eternalfalter
@Eternalfalter
Apr 02 2016 04:59
So what I mainly want to do is just eliminate the margins, because the text size and all that works all right for me for now. So I tried something like this: @media only screen
and (max-device-width: 480px) {
body {margin: 5px 5px 5px 5px;}
}
Not working, though
Paul Borawski
@iAmNawa
Apr 02 2016 05:00
you put the word only in there
Eternalfalter
@Eternalfalter
Apr 02 2016 05:00
ahh
Paul Borawski
@iAmNawa
Apr 02 2016 05:00
and it’s max-width not max device width
Eternalfalter
@Eternalfalter
Apr 02 2016 05:01
Okay, fixed those things. Must have gotten that from a google search
Still no change, though.
Paul Borawski
@iAmNawa
Apr 02 2016 05:01
target a h1 or p tag and change the color and see if it works
or font-size whatever
Eternalfalter
@Eternalfalter
Apr 02 2016 05:03
Nope. Hrm.
Paul Borawski
@iAmNawa
Apr 02 2016 05:04
where is your code?
Eternalfalter
@Eternalfalter
Apr 02 2016 05:05
Mostly in HTML with just the @ media in CSS
走你飛艇
@gofighting123
Apr 02 2016 05:09
help EST time
CamperBot
@camperbot
Apr 02 2016 05:09
no wiki entry for: est time
走你飛艇
@gofighting123
Apr 02 2016 05:10
3 hours later twitch FCC live?
Rafase282 showing how to contribute to the wiki #contributing #programming ...
Paul Borawski
@iAmNawa
Apr 02 2016 05:16
@Eternalfalter
ok I figured out a solution for you
you should keep all your css and html seperate in the future
but what i did is add a class to h1 and then when I change screens it works
走你飛艇
@gofighting123
Apr 02 2016 05:17
The Time Now in EST
00:16:46 Saturday, April 02, 2016
oh my 12 hours later.... :alien:
Paul Borawski
@iAmNawa
Apr 02 2016 05:17
I changed h1 to this
  <h1 class="barns"><strong>Porter Rockwell</h>
and then this worked
    @media screen and (max-width: 724px) {
        .barns {font-size: 30px;}
    }
@Eternalfalter
I checked and it was responsive
Eternalfalter
@Eternalfalter
Apr 02 2016 05:19
Barns huh? Okay, thanks man. I'll check it out real quick. All the training had the CSS and HTML in one box, so I'm not used to it having a separate box. Unless I'm totally remembering wrong...
走你飛艇
@gofighting123
Apr 02 2016 05:19
@iAmNawa do u use scss , less , or stylus ?
Paul Borawski
@iAmNawa
Apr 02 2016 05:27
I’ve used all
走你飛艇
@gofighting123
Apr 02 2016 05:27
@iAmNawa oh my....
Paul Borawski
@iAmNawa
Apr 02 2016 05:28
@Eternalfalter I think you are right, it’s just better to keep is seperate in most people’s opinion
Joe Narvaez
@wordyallen
Apr 02 2016 05:28
so for the quote generator.. do we need to do an OAuth Login?
for twitter?
走你飛艇
@gofighting123
Apr 02 2016 05:29
@wordyallen nope , just use its api call with ajax
Joe Narvaez
@wordyallen
Apr 02 2016 05:29
or can we just redirect them https://twitter.com/intent/tweet?text=${encodedQuote}
@gofighting123 do you have a link?
will my method pass?
走你飛艇
@gofighting123
Apr 02 2016 05:30
@wordyallen nope, just as ur code above
Joe Narvaez
@wordyallen
Apr 02 2016 05:30
gotcha
走你飛艇
@gofighting123
Apr 02 2016 05:30
@wordyallen :satisfied:
Eternalfalter
@Eternalfalter
Apr 02 2016 05:38
@iAmNawa After some thought, I figured out how to separate it all. You're right. So much easier and smoother.
Joe Narvaez
@wordyallen
Apr 02 2016 05:40
anyone know how to update a branch on github?
Joe Narvaez
@wordyallen
Apr 02 2016 05:42
hmmm....
I think I just gotta checkout and commit
Paul Borawski
@iAmNawa
Apr 02 2016 05:42
git merge in terminal @wordyallen
Joe Narvaez
@wordyallen
Apr 02 2016 05:42
that would be pull request
I'm too tired. I'll add a favicon and changed the document title tomorrow
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 05:50
could someone show me how to get my degree symbol on the same line as the temperature?
Joe Narvaez
@wordyallen
Apr 02 2016 05:50
°
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 05:51
oh no.. i hope its showing all the info
guess its late and no one is on
走你飛艇
@gofighting123
Apr 02 2016 05:53
@Dueldrawer8 walking dead outside all around ... :alien:
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 05:53
nvm figured it out
Joe Narvaez
@wordyallen
Apr 02 2016 06:07
it was git push --set-upstream origin gh-pages
Eternalfalter
@Eternalfalter
Apr 02 2016 06:08
@iAmNawa Finally able to adjust it perfect to the mobile with this:
@media screen
and (max-width: 480px) {
.container {margin: 20px 5px 20px 5px}
Thanks @iAmNawa for all your help!
CamperBot
@camperbot
Apr 02 2016 06:08
eternalfalter sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
:star: 325 | @iamnawa | http://www.freecodecamp.com/iamnawa
走你飛艇
@gofighting123
Apr 02 2016 06:09
@wordyallen :clap:
Paul Borawski
@iAmNawa
Apr 02 2016 06:09
great job @Eternalfalter
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:09
So I really like how my wikipedia viewer came out. I just don't like one thing: when you scroll up, instead of scrolling up to the top then attaching, the search bar scrolls a little bit then jumps to the top. any suggestions on what I did wrong? http://codepen.io/ChadKreutzer/full/mPEqmw/
走你飛艇
@gofighting123
Apr 02 2016 06:14
@ChadKreutzer sticky footer ?
Joe Narvaez
@wordyallen
Apr 02 2016 06:21
I wanna pull an all nighter and finish all of these
I gotta use these porjects like fun breaks
Paul Borawski
@iAmNawa
Apr 02 2016 06:21
Parallax effect!
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:24
@gofighting123 ? no, there's no footer. it's the affix property on the header.
走你飛艇
@gofighting123
Apr 02 2016 06:26

@ChadKreutzer

#searchElement {
  margin-left: 0px;
  margin-right: 0px;
  margin-bottom:0px;
/* use mix style */
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 10px;
  padding-bottom: 0px;
  box-shadow: 10px 10px 5px #444444;
  z-index: 1;
  position:fixed;
  bottom:0;   
  width:98%;
}

this ?

@ChadKreutzer i know u r using affix :alien:
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:28
@gofighting123 oh, I see what you mean. no. I want it to start in the middle of the screen then smoothly scroll up to the top and affix there.
走你飛艇
@gofighting123
Apr 02 2016 06:29
@ChadKreutzer i see, so u have to set the js part with affix to reserve the height from top margin
@ChadKreutzer data-offset-top=""
@ChadKreutzer ok u already set
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 06:32
anyone know why my function changeTemp isnt working?
function changeTempC(){ $('p').click(function(){ var text = $(this).text(); console.log( 'You clicked' + text); }); }
for some reason when i click on it..its not logging
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 06:38
anyone?
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:41
@gofighting123 perhaps just play with that?
@ChadKreutzer add this to before JQ
$('#searchElement').affix({
  offset: { top: $('#searchElement').offset().top }
});
@ChadKreutzer and modify the .affix i think @@
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:46
nope. that did it. @gofighting123 thanks.
CamperBot
@camperbot
Apr 02 2016 06:46
chadkreutzer sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 285 | @gofighting123 | http://www.freecodecamp.com/gofighting123
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:46
where did you find that so I can learn why that fixed it?
走你飛艇
@gofighting123
Apr 02 2016 06:47
@ChadKreutzer 0.0 ....
@ChadKreutzer bcz i modified affix js before...
@gofighting123 that did !?
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:49
yup. adding that bit of jquery fixed it without having to change anything else.
走你飛艇
@gofighting123
Apr 02 2016 06:50
...............that's wired..............
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 06:50
I just don't know why :D
走你飛艇
@gofighting123
Apr 02 2016 06:56
@ChadKreutzer affix has some default action packed , and some default setting..so u set offset 197 from top, and js part just make sure the offset as the code said
Chad Kreutzer
@ChadKreutzer
Apr 02 2016 07:03
@gofighting123 fair enough. well, at least it works right now.
khalsa777
@khalsa777
Apr 02 2016 07:05
plz review wiki viewer give critical review http://codepen.io/khalsa777/full/zqdQzb/
thanx @gofighting123 for support
CamperBot
@camperbot
Apr 02 2016 07:05
khalsa777 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 286 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 07:06
...
w t ....
@khalsa777 review for what kind of view(problem)?
khalsa777
@khalsa777
Apr 02 2016 07:11
@gofighting123 just general
走你飛艇
@gofighting123
Apr 02 2016 07:12
@khalsa777 /**/jQuery22203549399870026637_1459581124771({"batchcomplete":"","query":{"searchinfo":{"totalhits":0
},"search":[]}})
@khalsa777 it's ok for query wiki @@
kirbyedy
@kirbyedy
Apr 02 2016 07:13
@khalsa777 add a bit of padding on those buttons
走你飛艇
@gofighting123
Apr 02 2016 07:13
@kirbyedy hahah padding
@khalsa777 and the handler with no search result :>
kirbyedy
@kirbyedy
Apr 02 2016 07:14
@gofighting123 whats funny ?
khalsa777
@khalsa777
Apr 02 2016 07:15
@kirbyedy @gofighting123 ok
走你飛艇
@gofighting123
Apr 02 2016 07:15
@kirbyedy no, i just noticed that
@khalsa777 <div id="bttn" class="col-md-4"> ??
khalsa777
@khalsa777
Apr 02 2016 07:23
@gofighting123 ya thats needed
走你飛艇
@gofighting123
Apr 02 2016 07:24
@khalsa777 make it more semantic
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 07:24
anyone familar with changing temperature back and forth between F and C?
走你飛艇
@gofighting123
Apr 02 2016 07:25
@khalsa777 just like you are using bootstrap, they did :smile:
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 07:25
i got it to swtich over to C but cant get it to switch back
@gofighting123 ?
khalsa777
@khalsa777
Apr 02 2016 07:26
@gofighting123 hmmm
走你飛艇
@gofighting123
Apr 02 2016 07:26
@khalsa777 i think ajax with type:get it's ok, with post, nothing wrong ? i thought it will cause error :alien:
khalsa777
@khalsa777
Apr 02 2016 07:29
@gofighting123 ya they look functionally same
走你飛艇
@gofighting123
Apr 02 2016 07:29
@khalsa777 ok, i see..
Parminder Singh
@Trion129
Apr 02 2016 07:32
var weatherData;
$.getJSON('http://api.openweathermap.org/data/2.5/weather', {
  lat: latitude,
  lon: longitude,
  APPID: appid
}, function(json) {
  weatherData = json;
});
why is weatherData staying undefined? :worried: and how can I get the json object into a variable?
走你飛艇
@gofighting123
Apr 02 2016 07:34
@Dueldrawer8 where is the $(function() { } ??

``
$('p').on('click', function(){
$('p').text(changeTemp(temp));
$('p').toggleClass(changeTemp(temp));
})

function changeTemp(temp){
var cel = (temp - 32) * 5/9;
return cel;

};
``

``
$('p').on('click', function(){
$('p').text(changeTemp(temp));
$('p').toggleClass(changeTemp(temp));
})

function changeTemp(temp){
var cel = (temp - 32) * 5/9;
return cel;

};

``

hmm wont go to into code form.. but thats the code
i want it to toggle back and forth between F ad C
走你飛艇
@gofighting123
Apr 02 2016 07:38
@Dueldrawer8 ip.api may limit the service , i can't get the lat and longitude :alien:
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 07:39
so when you open it.. is it showing your location?
and temperature?
and i didnt want the api to get lat and long.. its suppose to get city and state (which i guess i didnt take country into consideration
well..
that was great help :P
走你飛艇
@gofighting123
Apr 02 2016 07:43
@Dueldrawer8 i use YQL ..... :alien:
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 07:44
im off to bed... night everyone
走你飛艇
@gofighting123
Apr 02 2016 07:44
@Dueldrawer8 see ya..
Thái Salem
@kazan221
Apr 02 2016 08:21
hi i have trouble in remembering regular expressions does anyone have any suggestion
走你飛艇
@gofighting123
Apr 02 2016 08:45
@kazan221 what is it about ?
Federico Dente
@fez994
Apr 02 2016 09:26
Hi guys i have a huge problem : I'm using SASS and it's working (It's compiling to the style.css) , the problem is : even if is compiling i can't see any difference on the screen, is like if my style.css is blank , anyone know how to fix this?
走你飛艇
@gofighting123
Apr 02 2016 09:28
@fez994 blank !? cache ? do u run the web pages locally?
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:29
Can anyone help me how to make the buttons in simon game play automatically with in specified time?
走你飛艇
@gofighting123
Apr 02 2016 09:31
@bunnyvishal6 simon game again !?.....
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:32
@gofighting123 simon game again !? I don't understand
走你飛艇
@gofighting123
Apr 02 2016 09:32
@bunnyvishal6 i just survey it on the github , and found someone did that not bad...in Object Oriented way...
@bunnyvishal6 i am wondering , change it to polygon mode......
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:33
@gofighting123 Oh! my problem is I don't know how to play the sounds one by one
走你飛艇
@gofighting123
Apr 02 2016 09:37
@bunnyvishal6 make your code piece by piece , make the structure first...
you will need array and then you can push the random 1~4 mp3 play by html5 audio
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:38
@gofighting123 I had array and also can make a random in 1~4 but Problem is " playing more than one audio one by one"
走你飛艇
@gofighting123
Apr 02 2016 09:41
@bunnyvishal6 according the array left, and play the audio ,is it?
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:46
@gofighting123 sorry i don't understand what you asked, but I had and array of four audios and they can play when i hit a button, thats fine but when its the computer turn the first time its playing good and when it has to play more than one audio file one by one its playing all the audio files at a time
走你飛艇
@gofighting123
Apr 02 2016 09:47
@bunnyvishal6 codepen ?
@gofighting123 I messaged you in private
走你飛艇
@gofighting123
Apr 02 2016 09:50
i need to refresh the window @bunnyvishal6 i think
Bunny Vishal
@bunnyvishal6
Apr 02 2016 09:50
ok
Coryphaeus
@cvdeby
Apr 02 2016 10:13
Hi guys, I have problem with hero image http://codepen.io/Coryph/full/VaMWdr/
How can I make this image aligned on absolute center?
nsloc22
@nsloc22
Apr 02 2016 10:16
@cvdeby try adding container-fluid class to your about-top-section div
or you can wrap whole body in container-fluid
Coryphaeus
@cvdeby
Apr 02 2016 10:25
@nsloc22 I wanna make this image like hero image, so I need 100vw width in there. I can't find actual technique for make image container responsive, but not image. I'm looking into media queries. Maybe mq will help)
Islam Ibakaev
@dagman
Apr 02 2016 10:29
done with wikipedia viewer any feedback is appreciated :smile: http://codepen.io/dagman/pen/xVLYOo
Coryphaeus
@cvdeby
Apr 02 2016 10:32
@gofighting123 Thanks a lot, what am I looked for! :smile:
CamperBot
@camperbot
Apr 02 2016 10:32
cvdeby sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 287 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 10:32
@cvdeby ok then. np
Abd-afeez Abd-hamid Adedamola
@Itsdenty
Apr 02 2016 10:36
Don't know why this code is not working here is my pen. http://codepen.io/itsdenty/pen/oxepBQ. Please help me out
var url = 'https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&format=json&callback=?&srsearch='+$('#squery').val() ;
  console.log(url);
$('form').on('submit',function(){   $.getJSON(url, function(response){
var arr = response.query.search;
      var list= $('<p></p>'); 
    var result=$.map(arr,function(item,index){
      $('<a href="http://www.wikipedia.org/wiki/'+item.title+'" target="_blank"><h2>'+item.title+'</h2></a>').appendTo(list);  
      $('<p>'+item.snippet+'</p>').appendTo(list);
        return list;
      });
      $('#display').html(result);

}); 
});
Thái Salem
@kazan221
Apr 02 2016 10:40
hello i dont quite understand what does "\1" do in regular expressions, can anyone give me an explaination
走你飛艇
@gofighting123
Apr 02 2016 10:41
\1 ?
Thái Salem
@kazan221
Apr 02 2016 10:42
yes like how "var regex = /(.)\1+/g;" would match repeated consecutive characters in string
走你飛艇
@gofighting123
Apr 02 2016 10:44
@kazan221 or decimal point \1, followed by four digits \d{4}.
https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Guide/Regular_Expressions
@kazan221 the regex u wrote , find any numbers?
Thái Salem
@kazan221
Apr 02 2016 10:47
@gofighting123 The first link would be useful, i have read it from MDN but its just not so clear, thank you
CamperBot
@camperbot
Apr 02 2016 10:47
kazan221 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 288 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 10:47
@kazan221 i am testing on https://regex101.com/ :alien:
@kazan221 it explain the regex u wrote...
matches the same text as most recently matched by the 1st capturing group
Thái Salem
@kazan221
Apr 02 2016 10:49
yes and im asking you what is 1st capturing group
走你飛艇
@gofighting123
Apr 02 2016 10:50
@kazan221 so (.)\1 find the doubled character....
@kazan221 ok then...regex101.com does better job than me :smile:
Abd-afeez Abd-hamid Adedamola
@Itsdenty
Apr 02 2016 10:52
Don't know why this code is not working here is my pen. http://codepen.io/itsdenty/pen/oxepBQ. Please help me out
var url = 'https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&format=json&callback=?&srsearch='+$('#squery').val() ;
  console.log(url);
$('form').on('submit',function(){   $.getJSON(url, function(response){
var arr = response.query.search;
      var list= $('<p></p>'); 
    var result=$.map(arr,function(item,index){
      $('<a href="http://www.wikipedia.org/wiki/'+item.title+'" target="_blank"><h2>'+item.title+'</h2></a>').appendTo(list);  
      $('<p>'+item.snippet+'</p>').appendTo(list);
        return list;
      });
      $('#display').html(result);

}); 
});
走你飛艇
@gofighting123
Apr 02 2016 10:52
@kazan221 the test string you can put 111113232312312222
Adam
@Grzybojad
Apr 02 2016 10:55
I'm doing the first fCC project (the tribute page) and I did a nice wikipedia-style info box to the right of the screen, and I have some text on the left side. The problem is, when I resize the window the text goes under the table because it has a fixed width. How can I make it resize accoring to the window (like having a width of 100% - 300px)?
Thái Salem
@kazan221
Apr 02 2016 10:55
well well finally got it, thank you so much @gofighting123
CamperBot
@camperbot
Apr 02 2016 10:55
kazan221 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:warning: kazan221 already gave gofighting123 points
Dranaxel
@Dranaxel
Apr 02 2016 11:14
Hello
Can someone tell me if it's possible to select all class used in an id
(ex all the <p> in my #home)
Abd-afeez Abd-hamid Adedamola
@Itsdenty
Apr 02 2016 11:30
@Dranaxel I dont get you, but I am sure it is possible, just make sure you use the right selector syntax
viswanathReddy
@viswanath007
Apr 02 2016 11:35

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
what should i do here?

kirbyedy
@kirbyedy
Apr 02 2016 11:36
@viswanath007 you should concatenate the words
first + second+ third...
Arend Groot Bleumink
@arendgb
Apr 02 2016 11:40
Could anyone help me with setting up anchors. In the Personal Page you should be able to navigate in 1 page, someone told me to use anchors but I don't know how to.
nsloc22
@nsloc22
Apr 02 2016 11:41
@Dranaxel try ("p[id=home]")
viswanathReddy
@viswanath007
Apr 02 2016 11:41
kirbyedy
can u expalaine please
kirbyedy
@kirbyedy
Apr 02 2016 11:41
myNoun +myAdjective +myVerb + myAdverb
but different order, so it makes a sentence
viswanathReddy
@viswanath007
Apr 02 2016 11:45
kirbyedy sorry, i don't understand.

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

kirbyedy
@kirbyedy
Apr 02 2016 11:51
make a sentence by adding you variables...
myNoun +myAdjective +myVerb + myAdverb like this
nsloc22
@nsloc22
Apr 02 2016 11:53
@Dranaxel it's $("#home>p") acutally
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 11:58
hi everyone
does anyone know how i can upload images to my server pls
Emil Aasa
@emilaasa
Apr 02 2016 11:59
@EdnaMode what kind of server?
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 11:59
i use pixabay for images for projects but i have to upload images to my server first they tell me
blob
Dranaxel
@Dranaxel
Apr 02 2016 12:01
@nsloc22 thks i'll try
CamperBot
@camperbot
Apr 02 2016 12:01
dranaxel sends brownie points to @nsloc22 :sparkles: :thumbsup: :sparkles:
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 12:01
blob
CamperBot
@camperbot
Apr 02 2016 12:01
:star: 324 | @nsloc22 | http://www.freecodecamp.com/nsloc22
Emil Aasa
@emilaasa
Apr 02 2016 12:01
@EdnaMode they are just telling you to not use them for image hosting
So if you want to put up a website, upload your pictures there
走你飛艇
@gofighting123
Apr 02 2016 12:01
edna.....
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 12:02
@emilaasa i dont think so that is what the sebsite is there for i thk??
CamperBot
@camperbot
Apr 02 2016 12:02
ednamode sends brownie points to @emilaasa :sparkles: :thumbsup: :sparkles:
:star: 335 | @emilaasa | http://www.freecodecamp.com/emilaasa
Emil Aasa
@emilaasa
Apr 02 2016 12:02
"NO HOTLINKING - what does that mean?
If you want to show Pixabay images on your website, please upload them to your server. Pixabay image URLs don't work on external sites."
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 12:03
sorry if i am being obtuse but i read that as telling u wht to do to be able to use them?
@emilaasa sorry if i am being obtuse but i read that as telling u wht to do to be able to use them?
Emil Aasa
@emilaasa
Apr 02 2016 12:04
It only means that Pixabay does not want to handle a bunch of traffic that is not their own.
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 12:04
@emilaasa k thks i get it
CamperBot
@camperbot
Apr 02 2016 12:04
:warning: ednamode already gave emilaasa points
ednamode sends brownie points to @emilaasa :sparkles: :thumbsup: :sparkles:
Emil Aasa
@emilaasa
Apr 02 2016 12:04
As for what you need to do, is copy over your images (copyright etc etc) to somewhere else and then link to that place.
Ednacode (New to Github and making mistakes)
@EdnaMode
Apr 02 2016 12:07
@emilaasa thks agn
CamperBot
@camperbot
Apr 02 2016 12:07
ednamode sends brownie points to @emilaasa :sparkles: :thumbsup: :sparkles:
:warning: ednamode already gave emilaasa points
Emil Aasa
@emilaasa
Apr 02 2016 12:07
No worries mate, keep on truckin!
走你飛艇
@gofighting123
Apr 02 2016 12:18
echo Hail Hydra
CamperBot
@camperbot
Apr 02 2016 12:18
@gofighting123 said: echo Hail Hydra
Nikita
@Yellowinastrip
Apr 02 2016 12:22
Guys, please help me understand the purpose of this line of code : function inIframe () { try { return window.self !== window.top; } catch (e) { return true; } }
走你飛艇
@gofighting123
Apr 02 2016 12:24
@Yellowinastrip
 function inIframe() {
   try {
     return window.self !== window.top;
   } catch (e) {
     return true;
   }
 }
@Yellowinastrip
https://developer.mozilla.org/en-US/docs/Web/API/Window/top
Returns a reference to the topmost window in the window hierarchy.
as the function name .....
Abd-afeez Abd-hamid Adedamola
@Itsdenty
Apr 02 2016 12:29
Don't know why this code is not working here is my pen. http://codepen.io/itsdenty/pen/oxepBQ. Please help me out
var url = 'https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&format=json&callback=?&srsearch='+$('#squery').val() ;
  console.log(url);
$('form').on('submit',function(){   $.getJSON(url, function(response){
var arr = response.query.search;
      var list= $('<p></p>'); 
    var result=$.map(arr,function(item,index){
      $('<a href="http://www.wikipedia.org/wiki/'+item.title+'" target="_blank"><h2>'+item.title+'</h2></a>').appendTo(list);  
      $('<p>'+item.snippet+'</p>').appendTo(list);
        return list;
      });
      $('#display').html(result);

}); 
});
走你飛艇
@gofighting123
Apr 02 2016 12:29
@Yellowinastrip maybe the code need to post to each other by iframe, so it need to check if it's iframe or not
@Yellowinastrip iframe can think as a isolated environment. by now, it's rarely use bcz ajax tech.
Stephen James
@sjames1958gm
Apr 02 2016 12:35
@Itsdenty If you check the devtools console you will see a "No 'Access-Control-Allow-Origin' header is present on the requested resource. " error. This requires using JSONP protocol to query the site (add &callback=?) to your URL.
走你飛艇
@gofighting123
Apr 02 2016 12:36
@sjames1958gm ............
Stephen James
@sjames1958gm
Apr 02 2016 12:36
@sjames1958gm Always good to check the devtools console when things are not working
@gofighting123 Yo Go
走你飛艇
@gofighting123
Apr 02 2016 12:36
@sjames1958gm good morning. and good nite... :alien:
Stephen James
@sjames1958gm
Apr 02 2016 12:36
@gofighting123 Same to you sir
@Yellowinastrip In order to have websites like codepen and jsbin, the users website has to be inside of the main website, but look like a standalone website. If you look in devtools while in codepen at the elements you will see that all of your html/css/js are inside a iframe.
Stephen James
@sjames1958gm
Apr 02 2016 12:48
Quiet morning here in the US
走你飛艇
@gofighting123
Apr 02 2016 12:48
.............
@sjames1958gm it's UCT+8 here....
@sjames1958gm so, US (which part of US ? ) am 5:50 ?
Stephen James
@sjames1958gm
Apr 02 2016 13:00
7:59 = UTC - 6 ( but -5 for daylight saving time)
Texas- yee haw
走你飛艇
@gofighting123
Apr 02 2016 13:04
@sjames1958gm i see
走你飛艇
@gofighting123
Apr 02 2016 13:15
Lobomuzenza continuing to make his html5 game #gamedev #programming............WTF...
mockup with mspaint !! ?
brackets....
.....
走你飛艇
@gofighting123
Apr 02 2016 13:24
hastebin....never use b4...
Stephen James
@sjames1958gm
Apr 02 2016 13:26
@gofighting123 I had heard of pastebin, but never used it
走你飛艇
@gofighting123
Apr 02 2016 13:26
@sjames1958gm kinda of IaaS ? like Azure,AWS 3....
socketio is not so popular in Asia i think...even github....
走你飛艇
@gofighting123
Apr 02 2016 13:31
ok nodeJS again....!?
Stephen James
@sjames1958gm
Apr 02 2016 13:32
@gofighting123 Yeah, likely node is the central server for the game.
走你飛艇
@gofighting123
Apr 02 2016 13:33
@sjames1958gm for the game !?
@sjames1958gm who's playing 2D game right now !?
Stephen James
@sjames1958gm
Apr 02 2016 13:35
@gofighting123 no-one
@gofighting123 maybe on some phone
走你飛艇
@gofighting123
Apr 02 2016 13:36
@sjames1958gm i am wondering why he is making a html5 2D game without any framework !?
Stephen James
@sjames1958gm
Apr 02 2016 13:36
@gofighting123 Demo purposes?
@sjames1958gm Seems like Unity or the like would be the platform
走你飛艇
@gofighting123
Apr 02 2016 13:38
@sjames1958gm i don't hear any F word :smile: english isn't my mother lang :smile:
Stephen James
@sjames1958gm
Apr 02 2016 13:43
@gofighting123 silgarth is me - and I did
走你飛艇
@gofighting123
Apr 02 2016 13:43
@sjames1958gm ...oh really...
Stephen James
@sjames1958gm
Apr 02 2016 13:43
Yeah :)
走你飛艇
@gofighting123
Apr 02 2016 13:43
@sjames1958gm oh my.....
Stephen James
@sjames1958gm
Apr 02 2016 13:43
lol
Except now he's singing :clap:
走你飛艇
@gofighting123
Apr 02 2016 13:44
....
https://github.com/leereilly/games there're lots of people doing html5 games
Stephen James
@sjames1958gm
Apr 02 2016 13:45
wow - better looking than this one :o:
走你飛艇
@gofighting123
Apr 02 2016 13:46
@sjames1958gm even looking at https://www.coolgithubprojects.com/ for the trend of people looking for ?
Stephen James
@sjames1958gm
Apr 02 2016 13:47
That's a cool page - never been there
走你飛艇
@gofighting123
Apr 02 2016 13:48
@sjames1958gm that's github trend page...kinda of webspider collecting result pages
watch me fail with socket.io ...............
WTF...
ok he has unique es6 skills....
.0......
走你飛艇
@gofighting123
Apr 02 2016 14:09
....freeze FCC twitch Live....
:alien:
Stephen James
@sjames1958gm
Apr 02 2016 14:26
@gofighting123 Watching video games on twitch ok. Watching coding on twitch - booooooooring
走你飛艇
@gofighting123
Apr 02 2016 14:27
@sjames1958gm he is not pro, so it's a little boring...but pro....is different...
Dominic Barretto
@Dominicbarretto
Apr 02 2016 14:31

<p data-height="126" data-theme-id="0" data-slug-hash="MyoBaY" data-default-tab="result" data-user="zabielski" data-preview="true" class="codepen">See the Pen <a href="https://codepen.io/zabielski/pen/MyoBaY/">Multi-layered Parallax Illustration </a> by Patryk Zabielski (<a href="http://codepen.io/zabielski">@zabielski</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

sorry by mistake
走你飛艇
@gofighting123
Apr 02 2016 14:31
...
hi batman.
that's too hard for me , haha
Sameer Shamsudeen
@sameershamsudheen
Apr 02 2016 14:37
hello pls help me with this css code, If i put a background-image: url("bg.jpg"); background-repeat: no-repeat to my body do i need a large image because of that no-repeat or a repeat-y is suitable for a large background
走你飛艇
@gofighting123
Apr 02 2016 14:38
Stephen James
@sjames1958gm
Apr 02 2016 14:39
@gofighting123 Great link - thanks
CamperBot
@camperbot
Apr 02 2016 14:39
sjames1958gm sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 289 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 14:39
@sjames1958gm ....
Sameer Shamsudeen
@sameershamsudheen
Apr 02 2016 14:39
@gofighting123 Thank You :smile:
CamperBot
@camperbot
Apr 02 2016 14:39
sameershamsudheen sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 290 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 14:40
@sjames1958gm np, u r like my older brother :alien:
Stephen James
@sjames1958gm
Apr 02 2016 14:40
@gofighting123 Thanks - mom must have been like 90 when she had you :ok:
CamperBot
@camperbot
Apr 02 2016 14:40
sjames1958gm sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:warning: sjames1958gm already gave gofighting123 points
Coryphaeus
@cvdeby
Apr 02 2016 14:41
Hi guys, Does it look normal? http://codepen.io/Coryph/full/VaMWdr/
走你飛艇
@gofighting123
Apr 02 2016 14:41
@cvdeby what's ur definition in "normal" ?
Dominic Lobban
@alkapwn3d
Apr 02 2016 14:42
anyone know a good site/ link where i can get daily web design challenges
Meet Mangukiya
@meetmangukiya
Apr 02 2016 14:42
how can I create a field in html that varies with time?
Dominic Lobban
@alkapwn3d
Apr 02 2016 14:42
dailyui seems to be down atm
Stephen James
@sjames1958gm
Apr 02 2016 14:42
@meetmangukiya Use javascript
Meet Mangukiya
@meetmangukiya
Apr 02 2016 14:42
something like displaying time
走你飛艇
@gofighting123
Apr 02 2016 14:42
@cvdeby that's great photos, i like the last one :smile:
Meet Mangukiya
@meetmangukiya
Apr 02 2016 14:42
creating a timer
Stephen James
@sjames1958gm
Apr 02 2016 14:43
Use javascript and setTimeout or setInterval
Coryphaeus
@cvdeby
Apr 02 2016 14:43
@gofighting123 About design, I'm new in design, and I don't know, how it looks for peoples, because few hours I tried to make it beautiful)
走你飛艇
@gofighting123
Apr 02 2016 14:43
@alkapwn3d codepen has DailyUI pen , what do u want to know and learn?
Boss7616
@Boss7616
Apr 02 2016 14:44
how can I use a nav bar button to navigate through the current page?
Stephen James
@sjames1958gm
Apr 02 2016 14:44
@cvdeby It is looking good - I would change the text in front of the bike guy - hard to read. Other than that it is looking good to me.
走你飛艇
@gofighting123
Apr 02 2016 14:44
@cvdeby it's not like u r new in design....u must have different view of that.
Coryphaeus
@cvdeby
Apr 02 2016 14:45
@gofighting123 @sjames1958gm Thanks)
CamperBot
@camperbot
Apr 02 2016 14:45
cvdeby sends brownie points to @gofighting123 and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 291 | @gofighting123 | http://www.freecodecamp.com/gofighting123
:star: 404 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Apr 02 2016 14:45
Coryphaeus
@cvdeby
Apr 02 2016 14:45
@Boss7616 I used bootstrap scrollspy for that
Stephen James
@sjames1958gm
Apr 02 2016 14:45
@sjames1958gm Basically you create anchors with the name attribute and then anchors pointing to the #name
走你飛艇
@gofighting123
Apr 02 2016 14:45
@sjames1958gm lol
Boss7616
@Boss7616
Apr 02 2016 14:46
@cvdeby @sjames1958gm thanks
CamperBot
@camperbot
Apr 02 2016 14:46
boss7616 sends brownie points to @cvdeby and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 132 | @cvdeby | http://www.freecodecamp.com/cvdeby
:star: 405 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
KiraBurova
@KiraBurova
Apr 02 2016 14:58
Hi guys. Can anyone help me improve my weather app? It seem to be working but I don't think that my code is good.
http://codepen.io/Allan11/pen/MyjEWJ
走你飛艇
@gofighting123
Apr 02 2016 14:58
teemo on duty...
Stephen James
@sjames1958gm
Apr 02 2016 15:00
@KiraBurova The coding looks fine, you haven't fulfilled all the requirements yet.
For mine, in order to test the code I put in a random location button that created a random lat/long to get other locations weather.
Boss7616
@Boss7616
Apr 02 2016 15:03
is there a way to override the default blue color on linked text?
走你飛艇
@gofighting123
Apr 02 2016 15:05
@Boss7616 get know to bootstrap , it's good
Matthew D.
@m4tty-d
Apr 02 2016 15:05
hey guys! I can't figure out why my unordered list's bullet is on the left. http://codepen.io/m4tty/full/pyWLzQ/ Any idea?
Stephen James
@sjames1958gm
Apr 02 2016 15:05
text decoration
Boss7616
@Boss7616
Apr 02 2016 15:05
@gofighting123 I know some but still not sure how to override the color for an anchor element
never mind I got it
走你飛艇
@gofighting123
Apr 02 2016 15:07
@Boss7616 bootstrap had already make lots of class for those , any purpose of using
Angelos Spyratos
@spyratos
Apr 02 2016 15:07
Hello guys I am building my portfolio project right now and I am trying to find how to put a relative height in each scrollable section of my page so that each section will take exatly the height of the user's screen anyone got an idea on how to do that ?
走你飛艇
@gofighting123
Apr 02 2016 15:07
@Boss7616 :smile:
Angelos Spyratos
@spyratos
Apr 02 2016 15:08
my css so far : ' #section1 {
padding-top: 50px;
height: 800px;
color: #fff;
background-color: #1E88E5;
}'
Boss7616
@Boss7616
Apr 02 2016 15:08
@gofighting123 thanks I just used some in line styling
CamperBot
@camperbot
Apr 02 2016 15:08
boss7616 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 292 | @gofighting123 | http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Apr 02 2016 15:09
@Boss7616 it's ok...good to know
James Hall
@James-H33
Apr 02 2016 15:09
@spyratos height: 100vh;
Angelos Spyratos
@spyratos
Apr 02 2016 15:10
@James-H33 thanks !
CamperBot
@camperbot
Apr 02 2016 15:10
spyratos sends brownie points to @james-h33 :sparkles: :thumbsup: :sparkles:
:star: 15 | @james-h33 | http://www.freecodecamp.com/james-h33
Meet Mangukiya
@meetmangukiya
Apr 02 2016 15:10
@sjames1958gm Thanks
CamperBot
@camperbot
Apr 02 2016 15:10
meetmangukiya sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 406 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
走你飛艇
@gofighting123
Apr 02 2016 15:11
Length units representing 1% of the viewport size for viewport width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax).
KiraBurova
@KiraBurova
Apr 02 2016 15:11
@sjames1958gm Thank you!
CamperBot
@camperbot
Apr 02 2016 15:11
kiraburova sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 407 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
James Hall
@James-H33
Apr 02 2016 15:12
@m4tty-d add this to the ul


ul {
  text-align: left; 
width: 50%; 
margin: 0 auto;

}
走你飛艇
@gofighting123
Apr 02 2016 15:12
@James-H33 good to know tks
CamperBot
@camperbot
Apr 02 2016 15:12
gofighting123 sends brownie points to @james-h33 :sparkles: :thumbsup: :sparkles:
:star: 16 | @james-h33 | http://www.freecodecamp.com/james-h33
James Hall
@James-H33
Apr 02 2016 15:13
@gofighting123 @spyratos no problem :)
Matthew D.
@m4tty-d
Apr 02 2016 15:14
@James-H33 Thanks! :) Was it messed up because of text-center?
CamperBot
@camperbot
Apr 02 2016 15:14
m4tty-d sends brownie points to @james-h33 :sparkles: :thumbsup: :sparkles:
:star: 17 | @james-h33 | http://www.freecodecamp.com/james-h33
James Hall
@James-H33
Apr 02 2016 15:19
@m4tty-d Well, the ul was taking up the whole width of the screen. So centering the text placed it in the middle of the width of the ul.
Matthew D.
@m4tty-d
Apr 02 2016 15:21
I see.
mjqblade
@mjqblade
Apr 02 2016 15:40
guys un a pen how do u put a border on a picture
@mjqblade or u want to customize your own bootstrap..http://bootstrap-live-customizer.com/
mjqblade
@mjqblade
Apr 02 2016 15:52
nvm
thx @gofighting123 do
CamperBot
@camperbot
Apr 02 2016 15:53
mjqblade sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 293 | @gofighting123 | http://www.freecodecamp.com/gofighting123
mjqblade
@mjqblade
Apr 02 2016 15:53
i got it
Angelos Spyratos
@spyratos
Apr 02 2016 16:06
guys how can i send a printscreen here? i somehow managed to crash codepen :P
Jeff
@adzam5
Apr 02 2016 16:07
@spyratos Just drag the image here
Angelos Spyratos
@spyratos
Apr 02 2016 16:07
Untitled.png
my whole view is like this
走你飛艇
@gofighting123
Apr 02 2016 16:07
@spyratos use browsser plugin to save the screenshot and drag into this chat window @@
Angelos Spyratos
@spyratos
Apr 02 2016 16:08
and when i get into my pens the same...
Maulik Darji
@maulikdarji
Apr 02 2016 16:08
@spyratos same here :smile:
Angelos Spyratos
@spyratos
Apr 02 2016 16:08
what can i do ? :P
走你飛艇
@gofighting123
Apr 02 2016 16:08
@spyratos oh my , same ...
Jeff
@adzam5
Apr 02 2016 16:09
@spyratos Looks like it's an issue with the site. Not something you did
走你飛艇
@gofighting123
Apr 02 2016 16:09
@spyratos wait for the fix....
Angelos Spyratos
@spyratos
Apr 02 2016 16:09
ohhhh thank god XD
走你飛艇
@gofighting123
Apr 02 2016 16:09
@spyratos btw, https://www.twitch.tv/FreeCodeCamp is Live for new features
Quincy is on the live view :alien:
Angelos Spyratos
@spyratos
Apr 02 2016 16:10
@gofighting123 thank you ! foe the info
CamperBot
@camperbot
Apr 02 2016 16:10
spyratos sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 294 | @gofighting123 | http://www.freecodecamp.com/gofighting123
Pawan
@pawan92
Apr 02 2016 16:17
can anyone point me in using the wiki api. im not uderstanding how to use it that link we are provided
kirbyedy
@kirbyedy
Apr 02 2016 16:23
@pawan92 did you try here ?
Jeff
@adzam5
Apr 02 2016 16:28
Anyone use Google AdSense or something similar?
Trevor Burns
@trevjburns
Apr 02 2016 16:30
Anyone able to help me understand why my data isn't available when I call generateStreamerHTML in javascript? http://codepen.io/trevjburns/pen/dMzQeJ
Pawan
@pawan92
Apr 02 2016 16:31
@kirbyedy reading into it :+1:
Stephen James
@sjames1958gm
Apr 02 2016 16:32
@trevjburns You need to put the call inside the callback from the getJSON call
Trevor Burns
@trevjburns
Apr 02 2016 16:34
@sjames1958gm So is this an issue with the async timing or do global variables work differently with callbacks? In other projects I put all the code inside the single callback, but wanted to try out making it more modular
Stephen James
@sjames1958gm
Apr 02 2016 16:34
Async timing. The data you are trying to use hasn't comeback yet
Trevor Burns
@trevjburns
Apr 02 2016 16:35
@sjames1958gm Ok, I thought so... but why does it execute if it's only executing if all items are processed?
Stephen James
@sjames1958gm
Apr 02 2016 16:35
@trevjburns You probably want to generate the HTML as each data value is returned
Trevor Burns
@trevjburns
Apr 02 2016 16:36
Or, why is it still empty if it's only executing the function when all items are processed in the callback
Stephen James
@sjames1958gm
Apr 02 2016 16:37
@trevjburns this code executes right after the last call to $getJSON -
    // This is how to deal with async!
    itemsProcessed++;
    if (itemsProcessed == array.length) {
      console.log("Loading done!");
      generateStreamerHTML();
    }
Long before the data for even the first one has returned
I would modify generateStreamerHTML to generate the HTML for one entry and call it each time an entry is returned
Trevor Burns
@trevjburns
Apr 02 2016 16:42
Ahhh, I see. I was focused on the forEach timing instead of the API call. Thanks @sjames1958gm
CamperBot
@camperbot
Apr 02 2016 16:42
trevjburns sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 408 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Sephem
@Sephem
Apr 02 2016 16:45
anyone know if ther is something wrong with codepen?
I am getting this error
Trevor Burns
@trevjburns
Apr 02 2016 16:48
@Sephem I'm getting the same error. I think it's down
Sephem
@Sephem
Apr 02 2016 16:48
yeah @trevjburns just watching their twitter page to see what they say
oh well I guess I better get some work done while I wait
Rishabh Kashyap
@iamrkcheers
Apr 02 2016 16:57
My CodePen page shows the following error on the output screen "Unable to resolve the server's DNS address."
Could anyone help.
ThankYou
走你飛艇
@gofighting123
Apr 02 2016 16:58
@trevjburns i think your code wrong bcz
u use streamObjects.push(stream); // array push a object ?
http://stackoverflow.com/questions/8660901/do-objects-pushed-into-an-array-in-javascript-deep-or-shallow-copy
as the best answer , array push object's reference, so ....it's empty .
Sephem
@Sephem
Apr 02 2016 16:59
it is back up
Rishabh Kashyap
@iamrkcheers
Apr 02 2016 17:00
yeah.
thanks anyway.
Dardan Demiri
@dardandemiri
Apr 02 2016 17:03
help Show the Local Weather
CamperBot
@camperbot
Apr 02 2016 17:03
no wiki entry for: show the local weather
Dardan Demiri
@dardandemiri
Apr 02 2016 17:03
People
I am trying so hard to finish this project
走你飛艇
@gofighting123
Apr 02 2016 17:03
they talk too fast ... i can't understand totally :alien:
Dardan Demiri
@dardandemiri
Apr 02 2016 17:04
I have made the UI, it looks perfect.
The only thing that I AM STUCK is the API !!!
$.getJSON(url, function(json){
    $("#location").html(json.name);
    $("#temp").html(json.)
});
is here anyone ?
走你飛艇
@gofighting123
Apr 02 2016 17:09
what's that on the table !?
that's FCC base ?
wt...
it's a factory......
:alien:
Ken Haduch
@khaduch
Apr 02 2016 17:15
@dardandemiri what are you passing for a URL? are you seeing any transaction for that weather site request - you can use the developer's tools and look in the Network section. If you aren't familiar with that - please post a link to your code on CodePen and we can take a look and advise.
@dardandemiri - in the code you posted, your #temp update doesn't seem to have a full reference to some json data, not sure if that's the only problem.
Chetan Meshram
@cheetahM
Apr 02 2016 17:22
@dardandemiri can you try this:
$.getJSON(url, function(data) {
// ...YOUR CODE...
}.bind(this));
Boss7616
@Boss7616
Apr 02 2016 17:34
If i make a form how can I save the input?
走你飛艇
@gofighting123
Apr 02 2016 17:36
@Boss7616 .....you mean...pass to somewhere or handler ? form action="" ?
Boss7616
@Boss7616
Apr 02 2016 17:37
@gofighting123 do I need to make a web page or something to store the data?
or alternatively can I just have a dummy form?
走你飛艇
@gofighting123
Apr 02 2016 17:38
@Boss7616 that depend ... u can use git to store the pages and form action.
Boss7616
@Boss7616
Apr 02 2016 17:39
ok so just to clarify it doesn't have to store it anywhere correct, I can just have it for looks
走你飛艇
@gofighting123
Apr 02 2016 17:39
@Boss7616 and practice the git toolbelt ? it's hot :alien:
@Boss7616 yes, sure, even not a real form , just a button and jquery to trigger it, it's fine
Boss7616
@Boss7616
Apr 02 2016 17:40
@gofighting123 ok cool thanks
CamperBot
@camperbot
Apr 02 2016 17:40
boss7616 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:star: 295 | @gofighting123 | http://www.freecodecamp.com/gofighting123
Gabe Pressman
@gpressman
Apr 02 2016 17:56
can anyone help me with the random quote generator? I'm not sure where to begin with the twitter api
Trevor Burns
@trevjburns
Apr 02 2016 17:57
@gofighting123 You are able to create an array of objects that way. My issue was that the API callback wasn't downloading data before my reference to the array
@gofighting123 Here's an example of it working: https://jsfiddle.net/cvc60qja/
Joe Narvaez
@wordyallen
Apr 02 2016 18:03
I've gotten reall obsessed with react this past month
anyone needing react help. pls get at me.
Pawan
@pawan92
Apr 02 2016 18:03
@wordyallen did you look into tylers free react course
Jeremy Benson
@jb840w
Apr 02 2016 18:04
@gpressman feel free to get other advice but after a day of reading the twitter API, I discovered that I really didn't need the full api to make a simple post. All I needed was https://twitter.com/intent/tweet?hastags=quotes&related=freecodecamp&text=
Joe Narvaez
@wordyallen
Apr 02 2016 18:04
@pawan92 nah I just read the docs
and did a fullstack redux app
now I'm doing it in native
its' tero's free tutorial
which is a community favorite
Pawan
@pawan92
Apr 02 2016 18:05
@wordyallen check it out tyler does an awesome job explaining. that was my first step into react. havent done much since but hope to go back one day http://courses.reactjsprogram.com/courses/reactjsfundamentals
Joe Narvaez
@wordyallen
Apr 02 2016 18:06
I saw it on hacker news
I'm moving away from pure react and more towards redux
either way I can def help people with some of the FE challenges if they want to avoid jquery
make a mobile version
Gabe Pressman
@gpressman
Apr 02 2016 18:09
@jb840w it seems I'm missing something, because that block of text isn't doing anything
 $("#tweet").click(function(){
    $.postJSON("https://twitter.com/intent/tweet?hastags=quotes&related=freecodecamp&text=\$('#quote')")
  });
Joe Narvaez
@wordyallen
Apr 02 2016 18:11
I'm also open to helping anyone move away from codepen to github pages. I talk to other guys I know in the industry and they agree that its more professonal because its shows deployment knowledge and its directly linked to the codebase
Andrey
@a-kud
Apr 02 2016 18:13
Hi. Have anybody received "Cross-Origin Request Blocked" while building Wikipedia Viewer? I'm trying to nail it with plain JS without jQuery and can't grasp how to bypass CORS.
Carol Pelu
@Tynael
Apr 02 2016 18:13
help Golf Code
CamperBot
@camperbot
Apr 02 2016 18:13

:point_right: checkpoint golf code [wiki]

Details

We will now use our knowledge about else if statements and comparison with equality, less and greater operators.

In the game of golf each hole has a par for the average number of strokes needed to sink the ball. Depending on how far above or below par your strokes are, there is a different nickname.

Your function will be passed a par and strokes. Return strings according to this table (based on order of priority - top (highest) to bottom (lowest)):

Strokes Return
1 "Hole-in-one!"
<= par - 2 "Eagle"
par - 1 "Birdie"
par "Par"
par + 1 "Bogey"
par + 2 "Double Bogey"
>= par + 3 "Go Home!"

par and strokes will always be numeric and positive.

Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.
:pencil: read more about checkpoint golf code on the FCC Wiki

Jeremy Benson
@jb840w
Apr 02 2016 18:19
You're right @gpressman , I was simply showing you the only line that needed to talk to twitter. there is still more code needed to open a new window and pull the data from from page/code
Gabe Pressman
@gpressman
Apr 02 2016 18:28
@jb840w unfortunately I'm pretty lost at where I'm supposed to go from here
Jeremy Benson
@jb840w
Apr 02 2016 18:35
My way may not have been the most elegant but feel free to look at my page
Pawan
@pawan92
Apr 02 2016 19:16
i cant seem to figure out this wiki api thing/as well as how to go about it in general. this is what i have so far: http://codepen.io/pawan92/pen/zqzWYB?editors=1111
any pointers would be nice
Sam
@Samwise12
Apr 02 2016 19:18
How do I figure out what the Twitchtv JSON API things mean as status?
Stephen James
@sjames1958gm
Apr 02 2016 19:18
@Samwise12 If there is a stream then they are online.
if (data.stream) then online
@pawan92 In order to get your search to work you need to attach a handler to the button and use the value of the input field in the $.ajax call
Sam
@Samwise12
Apr 02 2016 19:23
I'm talking about data.status
Jeff
@adzam5
Apr 02 2016 19:24
Can anyone recommend a good hosting company? I'm considering 1&1. Free domain and only 99 cents a month for first year.
Stephen James
@sjames1958gm
Apr 02 2016 19:25
@Samwise12 the only time data.status shows when there is an error data.status === 422
Otherwise, data.stream === null or not is how I could tell someone is online/offline
anddash
@anddash
Apr 02 2016 19:26
Hi. This is a question about Codepen. I've not used it before so I hope I can explain the problem properly. I have just finished my tribute page, and it looks fine when I go from editor view to full page view. However when I look at the pen in "my profile"(which I presume is what other people see) the image and its border are out of proportion and don't fit the page properly. I can't find anything that explains this. Can anyone help?
Jeff
@adzam5
Apr 02 2016 19:30
@anddash Are you referring to the image of your tribute page that appears in your profile?
anddash
@anddash
Apr 02 2016 19:35
Yes, the one titled parkrun https://codepen.io/anddash/
Pawan
@pawan92
Apr 02 2016 19:36
@sjames1958gm by handler you mean ID/class right. which i already have. im just trying to get the data for now
Jenni
@silverrain64
Apr 02 2016 19:36
(SIGH) I'm getting frustrated, to say the least, with pulling data from the Open Weather API. When I request ALL the data, or the "city" parameter, it works, but using any other parameter (i.e., "main" or "weather") returns "undefined".
Sam
@Samwise12
Apr 02 2016 19:39
@sjames1958gm is there a way I could of known about data.status and data.stream?
Jeff
@adzam5
Apr 02 2016 19:42
@anddash You have your image width set at 800px. This will cause it to be too wide on a narrow screen. You can try using Bootstraps .img-responsive class or set the width to a percentage of the screen width
@anddash Also, you are using absolute positioning on #picturetext Which is making the text go beyond your image on a narrow screen
Noah Fleitz
@burningPluto
Apr 02 2016 19:46
How can I keep this img to cover the body in the div i have it in but move the img up some so thee sky isnt so large so you can see the water in the img
John L.
@jomcode
Apr 02 2016 19:49
does anyone know if we are required to use regexp on the validating us telephone numbers problem?
Noah Fleitz
@burningPluto
Apr 02 2016 19:54
I've got it fixed now
nsloc22
@nsloc22
Apr 02 2016 20:03
anyone can test my weather app http://codepen.io/nsloc22/full/pyWVWE/
Jeff
@adzam5
Apr 02 2016 20:13
@nsloc22 Works for me
rocng
@rocng
Apr 02 2016 20:21
@jomcode I think you can use whatever you want as long as it solves the problem, but I'd highly recommend using regexp
Coy Sanders
@coymeetsworld
Apr 02 2016 20:21
using regex will involve the least amount of code @jomcode
and its the correct way to solve the problem so you should use it
nsloc22
@nsloc22
Apr 02 2016 20:22
!help
CamperBot
@camperbot
Apr 02 2016 20:22

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • Algorithm BONFIRENAME info on a Algorithm

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

nsloc22
@nsloc22
Apr 02 2016 20:22
thanks @adzam5
CamperBot
@camperbot
Apr 02 2016 20:22
nsloc22 sends brownie points to @adzam5 :sparkles: :thumbsup: :sparkles:
:star: 377 | @adzam5 | http://www.freecodecamp.com/adzam5
nsloc22
@nsloc22
Apr 02 2016 20:22
This message was deleted
CamperBot
@camperbot
Apr 02 2016 20:23
:star: 325 | @nsloc22 | http://www.freecodecamp.com/nsloc22
anddash
@anddash
Apr 02 2016 20:29
Thanks adzam5, I will give it a go.
Sephem
@Sephem
Apr 02 2016 20:33
hi all. Any feedback please
Dominic Lobban
@alkapwn3d
Apr 02 2016 20:35
does SEO have to cost any money when i do it myself? whats the deal with bidding on keywords?
Coy Sanders
@coymeetsworld
Apr 02 2016 20:37
looks good @Sephem !
Stephen James
@sjames1958gm
Apr 02 2016 20:37
@Sephem Look good - I might pull the text in the top a little to the center. When I went to phone size the images were not shown.
anddash
@anddash
Apr 02 2016 20:39
@adzam5 Unfortunately I haven't cracked it yet, but I've spent so long on it that I need to sleep on it :(
Stephen James
@sjames1958gm
Apr 02 2016 20:40
@Samwise12 Maybe, I don't know if twitch has good docs. I just kind of inferred from the format of the data.
@coymeetsworld Thanks
CamperBot
@camperbot
Apr 02 2016 20:41
sjames1958gm sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 437 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
henrywashere
@henrywashere
Apr 02 2016 20:46
guys my hamburger button isnt working properly. the button wont collapse after clicking on in the 2nd time...so the menu stays expanded.
http://codepen.io/henrywashere/full/XdXxRO/
Sephem
@Sephem
Apr 02 2016 20:47
what images where not shown?
Stephen James
@sjames1958gm
Apr 02 2016 20:48
All
Using devtools to make the screen like an iphone
Robert Uivarosi
@URobert
Apr 02 2016 20:48
@henrywashere test out your navbar in an isolated environment. functionally should not be in conflict with anything else from the page
Sephem
@Sephem
Apr 02 2016 20:48
@sjames1958gm ahh that is on purpose as if I leave the background then the text goes over the image and it looks ugle
Stephen James
@sjames1958gm
Apr 02 2016 20:49
Ok - then it works great!
henrywashere
@henrywashere
Apr 02 2016 20:51
ill try that
stupid question, how do i make a new pen?
Sephem
@Sephem
Apr 02 2016 20:54
click yout profile pick and click New Pen @henrywashere
henrywashere
@henrywashere
Apr 02 2016 20:54
ty
Robert Uivarosi
@URobert
Apr 02 2016 20:54
@henrywashere top right click on your icon, top right new pen
Sephem
@Sephem
Apr 02 2016 20:55
@sjames1958gm do you think the button should show the same symbol as it is not or should it show the oposit?
Stephen James
@sjames1958gm
Apr 02 2016 20:56
@Sephem I think it should show what the button will do.
So the opposite
Sephem
@Sephem
Apr 02 2016 20:56
okay will work on that @sjames1958gm
henrywashere
@henrywashere
Apr 02 2016 21:01
tried it in an isolated environment, and the hamburger button won't even open
Sephem
@Sephem
Apr 02 2016 21:01
silly question, but should functions be declared and created inside or outseide of
$(document).ready()
Stephen James
@sjames1958gm
Apr 02 2016 21:02
That's a person preference - I would put them outside.
Sephem
@Sephem
Apr 02 2016 21:02
@sjames1958gm that is what I was thinking
Stephen James
@sjames1958gm
Apr 02 2016 21:02
@Sephem Only because it becomes hard to know where the end of "$(document).ready(function() { " is.
henrywashere
@henrywashere
Apr 02 2016 21:03
anyone? my hamburger button wont collapse properly.
Sephem
@Sephem
Apr 02 2016 21:06
@sjames1958gm so from what I understand is outside of document ready, but inside if it modifies DOMs
Josh Bivens
@joshbivens
Apr 02 2016 21:07
is Codepen syntax highlighting down?
JD Tadlock
@jdtdesigns
Apr 02 2016 21:08
@Sephem Your functions should really be locally scoped and not global in the browser in the first place. Also document.ready() doesn't need to be used for your code if you call your script right above </body>
@henrywashere post your codepen and we can check it out
Sephem
@Sephem
Apr 02 2016 21:10
@jdtdesigns so how would I locally scope the functions?
henrywashere
@henrywashere
Apr 02 2016 21:10
it wont collapse after you click on it the 2nd time
JD Tadlock
@jdtdesigns
Apr 02 2016 21:13
@Sephem
var myFunction = (function() {
  // do something
});

myFunction(); // returns undefined
Sephem
@Sephem
Apr 02 2016 21:14
so how would you call the function then?
JD Tadlock
@jdtdesigns
Apr 02 2016 21:16
@henrywashere I wouldn't use BS for menus in the first place, but your problem is you have the jquery and BS js included like 10 times in your settings and the BS comes before jquery on the last call so BS is failing because it requres jquery.
delete all those includes except 2
jquery first then BS
henrywashere
@henrywashere
Apr 02 2016 21:18
in the Javascript section right?
yay that worked
thanks @jdtdesigns
CamperBot
@camperbot
Apr 02 2016 21:20
henrywashere sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star: 384 | @jdtdesigns | http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Apr 02 2016 21:21
@Sephem
var myApp = (function() { // anonymous so isn't set globally to browser

  var init = function() { // locally scoped to your app
   console.log('yep, works');
  };

  var doSomething = function() {  // also locally scoped to your app
   // do something
  };

  return { // return the init function as an object method and then you can use it outside this anonymous function
    init: init
  };
});

myApp.doSomething();  // returns undefined

myApp.init(); // returns 'yep, works' in the console
@henrywashere welcome ;)
Sephem
@Sephem
Apr 02 2016 21:22
ahh so create an anonymous function to scope all your functions in. As in using it like a class. @jdtdesigns
JD Tadlock
@jdtdesigns
Apr 02 2016 21:22
@Sephem correct
Sephem
@Sephem
Apr 02 2016 21:23
@jdtdesigns now that makes sense. Thanks
CamperBot
@camperbot
Apr 02 2016 21:23
sephem sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star: 385 | @jdtdesigns | http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Apr 02 2016 21:23
;)
henrywashere
@henrywashere
Apr 02 2016 21:29
hamburger button wont align itself properly. instead of being in the center, its located in the bottom right...how do i fix this?
JD Tadlock
@jdtdesigns
Apr 02 2016 21:34
@henrywashere BS will fight you with everything along the way when you don't know css. You're adding conflicting styles which cause it to goof up. It's the same scenario I see constantly. You really need to learn CSS before using BS. And if you learn CSS, you'll never want to(or need to) use BS.
I'll code up a quick responsive menu for you in 5 minutes if you'd like using flexbox
henrywashere
@henrywashere
Apr 02 2016 21:36
no idea what a flexbox is, but it sounds awesome :)
Dominic Lobban
@alkapwn3d
Apr 02 2016 21:36
does anyone else use Brackets for tect editing?
text*
and so you know of any extensions that let you see unclosed tags?
do*
Thad Seaver
@thadseaver
Apr 02 2016 21:49
can someone explain a few things to me about the seek and destroy algorithm challenge?
sorry, looks like i'm in the wrong room.
Dan Stockham
@DanStockham
Apr 02 2016 21:59
Can anyone give me an idea how to chain operations in the calculator project?
Stephen James
@sjames1958gm
Apr 02 2016 22:00
In an event handler function(e) { } is $(e.target) a good way to get jquery on the item in question. Or if you are using jquery is "this" the target
@DanStockham I am working on that now, I was going to code it with "if an operator is pressed, the previous operation is complete and the answer is put in the display and a new operation starts.
JD Tadlock
@jdtdesigns
Apr 02 2016 22:03
@DanStockham There are multiple ways, but a basic way is to build a string with the operators and numbers and then equate that string when total is pressed
Sephem
@Sephem
Apr 02 2016 22:05
@sjames1958gm is that better now? opposite button
Dan Stockham
@DanStockham
Apr 02 2016 22:05
@jdtdesigns parseInt('1+2')?
Stephen James
@sjames1958gm
Apr 02 2016 22:06
@Sephem Yep - weird part is how your web seems to know where I live :)
Sephem
@Sephem
Apr 02 2016 22:06
hehe
@sjames1958gm well it would not work if it did not
Stephen James
@sjames1958gm
Apr 02 2016 22:06
@Sephem It suprises me for a second everytime I open someones weather app then I feel like a dummy
Sephem
@Sephem
Apr 02 2016 22:07
hehe
Stephen James
@sjames1958gm
Apr 02 2016 22:08
@DanStockham I don't think that you need to do something that complex. I just pulled up my calculator and when you go 1 + 2 / (when you hit / it finishes the 1 + 2 displays 3 ) and then the next number is divided into 3
JD Tadlock
@jdtdesigns
Apr 02 2016 22:19
@henrywashere http://jsbin.com/takid/1/edit?css,output Had some fun and made an animation for the navicon too ;)
Jeff
@adzam5
Apr 02 2016 22:23
Can anyone recommend a good hosting company? I'm considering 1&1.
Dardan Demiri
@dardandemiri
Apr 02 2016 22:24
can someone tell me what's wrong with the Open Weather API
they return so HIGH temperatures
"main":
      {
       "temp":285.68,
       "humidity":74,
       "pressure":1016.8,
       "temp_min":284.82,
       "temp_max":286.48
      },
Stephen James
@sjames1958gm
Apr 02 2016 22:24
Kelvin
add units=metric or unit=imperial to get celsius or farenheit (add to the URL)
Dardan Demiri
@dardandemiri
Apr 02 2016 22:25
is it in Fahrenheit ?
Stephen James
@sjames1958gm
Apr 02 2016 22:25
@dardandemiri No.
Dardan Demiri
@dardandemiri
Apr 02 2016 22:25
?
Stephen James
@sjames1958gm
Apr 02 2016 22:25
@dardandemiri Kelvin
Dardan Demiri
@dardandemiri
Apr 02 2016 22:25
ahhh

the units=metric

Should I add it on the endo

end ?
Stephen James
@sjames1958gm
Apr 02 2016 22:26
As if anyone getting weather wants to know the temperature in kelvin
JD Tadlock
@jdtdesigns
Apr 02 2016 22:26

@DanStockham

  var output = '';

  output += input.val();

  $('#screen').text(eval(output));

Just get the inputs as they are received and add them to the string, then calculate it.

Stephen James
@sjames1958gm
Apr 02 2016 22:26
Sure make sure you use &units=metric
Dardan Demiri
@dardandemiri
Apr 02 2016 22:27
@sjames1958gm thank you
CamperBot
@camperbot
Apr 02 2016 22:27
dardandemiri sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 409 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Dardan Demiri
@dardandemiri
Apr 02 2016 22:28
@sjames1958gm now it should return in Celcius ?
right ?
Stephen James
@sjames1958gm
Apr 02 2016 22:28
@dardandemiri yes
Dardan Demiri
@dardandemiri
Apr 02 2016 22:28
perfect
Dan Stockham
@DanStockham
Apr 02 2016 22:39
So I tried something different. I used my calc() function once two numbers were in the intArr and opArr has a non empty value in it's first element.
The only problem is calc() is being run twice.
apklip
@apklip
Apr 02 2016 22:40
My button doesn't seem to alert data[3] anymore.. http://codepen.io/DarkPigeons/pen/qZPpxy
Elbert Cortez
@trip16661
Apr 02 2016 22:45
does anyone know a quote api with author input value?
Eric Murta
@murtinha
Apr 02 2016 22:46
function sumPrimes(num) {
 var array=[];
 var prime=[2,3,5,7];
 var numb=[];
  var resul;
  var i=0;
  array[0]=1;
  while(array[i]<num){
   i++;
   array[i]=array[i-1]+1;
      if(prime.indexOf(array[i])!=-1){
     numb.push(array[i]);
   }

  else{
    var check=0;
    for(j=0;j<prime.length;j++){
      if((array[i]%prime[j])===0){
        check=1;
      }             
      }
    if(check!=1){
      numb.push(array[i]);
    }
    }
  }  
 resul=numb.reduce(function(a,b){
   return a+b;
 });

  return resul;
}

sumPrimes(977);
Guys, challenge SUm All Primes... my result is 108789 and it should be 73156, whats wrong with the logic?
Pete
@petegarvin1
Apr 02 2016 22:47
Anyone not using codewars yet - I e found its really helped my JavaScript www.codewars.com/r/yfzYFQ
Stephen James
@sjames1958gm
Apr 02 2016 22:47
You have to calculate whether the number is a prime
Elbert Cortez
@trip16661
Apr 02 2016 22:51
does anyone know a quote api with author input value?
Eric Murta
@murtinha
Apr 02 2016 22:51
@sjames1958gm if((array[i]%prime[j])===0) doesnt that do it?
Stephen James
@sjames1958gm
Apr 02 2016 22:52
@DarkPigeons I think it is reloading your page - make sure your prevent defaults on the click event.
would 13 pass that test it is prime
Eric Murta
@murtinha
Apr 02 2016 22:55
@sjames1958gm 13 its right, the prime array is [2,3,5,7,11,13]...
Stephen James
@sjames1958gm
Apr 02 2016 22:57
17, 23, 29, 27, . . .
What makes a number a prime, you have to have code that checks that
Eric Murta
@murtinha
Apr 02 2016 22:59
@sjames1958gm they are all returning the right prime array... the problem is elsewhere
Donna Dietrich
@donnadietrich
Apr 02 2016 23:16
is anyone having problems with code pen displaying properly this evening?
Charlotte N.
@clnquacky
Apr 02 2016 23:39
@donnadietrich I am... When I tried to go to full screen view it came up wonky
demipixel
@demipixel
Apr 02 2016 23:46
HALPPPPPP
Stephen James
@sjames1958gm
Apr 02 2016 23:46
@demipixel :)
demipixel
@demipixel
Apr 02 2016 23:46
Can you scroll to the bottom of a div immediately after adding text?
Or does it have to load in?
apklip
@apklip
Apr 02 2016 23:52
@sjames1958gm Thanks!
CamperBot
@camperbot
Apr 02 2016 23:52
darkpigeons sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 410 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 23:56
Anyone know how to round numbers? I know its the math.round() function but where would i put that in my code? http://codepen.io/duel_drawer8/pen/bpoozL
Stephen James
@sjames1958gm
Apr 02 2016 23:58
If you are talking about temps. then right after I get them from the ajax response.
Randy Goldsmith
@Dueldrawer8
Apr 02 2016 23:59
@sjames1958gm yes
okay, so i can't apply the math.round inside the object?
that makes sense..lol