These are chat archives for FreeCodeCamp/HelpFrontEnd

8th
Oct 2016
@AllanPooley
Girzima
@Girzima
Oct 08 2016 03:58
Don't use imgur links for pictures
Henry Cabello
@hacu9
Oct 08 2016 06:45
Im lost with this tic tac toe game,i cant get my head around the minimax thingy ._.
A_A
@Otto-AA
Oct 08 2016 06:46
@hacu9 Maybe I can help you if you explain a bit more (sorry if you already did, but I didn't read everything O.o)
2 player is okay-ish but i dont get how to make the IA for the 1 player mode
A_A
@Otto-AA
Oct 08 2016 06:49
@hacu9 I guess the simplest method would be a random choice for the computer (make sure the field is empty then)
Henry Cabello
@hacu9
Oct 08 2016 06:50
i tried that but they (in the vid at least) ask for a game you cant win,only tie
A_A
@Otto-AA
Oct 08 2016 06:50
@hacu9 Ah ok, I haven't done this yet ^^
Henry Cabello
@hacu9
Oct 08 2016 06:51
:c im getting frustrated
A_A
@Otto-AA
Oct 08 2016 06:51
@hacu9 Do you know how to play Tic-Tac-Toe the way you never loose?
Henry Cabello
@hacu9
Oct 08 2016 06:52
Wiki has a guide about it,i could try getting that in code but itll be pretty long and probably not efficient (Like my checkWinner function)
CamperBot
@camperbot
Oct 08 2016 06:52
no wiki entry for: has a guide about iti could try getting that in code but itll be pretty long and probably not efficient like my checkwinner function
Henry Cabello
@hacu9
Oct 08 2016 06:52
wiki tic tac toe
CamperBot
@camperbot
Oct 08 2016 06:52
no wiki entry for: tic tac toe
Henry Cabello
@hacu9
Oct 08 2016 06:53
:0 curious,anyways theres also minimax which seems like the best way to go,but its pretty complicated xd
A_A
@Otto-AA
Oct 08 2016 06:53
@hacu9 well, I've never heard of minimax ^_^ I'll take a look at it
A_A
@Otto-AA
Oct 08 2016 06:55
already found it ;)
what about the youtube video?
Henry Cabello
@hacu9
Oct 08 2016 06:58
Lets try that
A_A
@Otto-AA
Oct 08 2016 06:58
I haven't watched it, but YT is often helpful ;)
Gabriel Betancourt
@mau5atron
Oct 08 2016 07:00
Probably seems like an easy thing but I'm having trouble aligning my unordered lists such like this:
item 1 item 4
item2 but then reach a certain point and start a new list next to that one --> item 5
item 3 item 6
I guess what I am asking is how would I go about having lists side by side but decide when the current list continues onto a list next to the first if that makes sense.
lol that didn't come out right
A_A
@Otto-AA
Oct 08 2016 07:03
@mau5atron So basically a list with 2 columns (easy to search for tbh)
@mau5atron If you want I can give you an example, but learning to search is really helpful for coding ;)
Gabriel Betancourt
@mau5atron
Oct 08 2016 07:04
@Otto-AA I've searched but probably wasn't wording it correctly
A_A
@Otto-AA
Oct 08 2016 07:04
@mau5atron Then try it with that: css list with 2 columns
Gabriel Betancourt
@mau5atron
Oct 08 2016 07:05
@Otto-AA I actually found a way to do it but then my 3rd column was completely wonky it would only show lists vertically
@Otto-AA as if I was running out horizontal space
A_A
@Otto-AA
Oct 08 2016 07:07
@mau5atron Maybe I'll find out why if I look at your code
Btw, here is how the internet told me ;P https://jsfiddle.net/yejm72g5/
Gabriel Betancourt
@mau5atron
Oct 08 2016 07:08
@Otto-AA should I put all of my lists in a <div> though?
@Otto-AA Cause I currently have them in a div that changes the text color to white so I figure might as well use that div to do the columns
A_A
@Otto-AA
Oct 08 2016 07:11
I would use
<div class="whatever">
   <ul id="x-columns">
     <li>blabla</li>
     ....
     <li>blablah</li>
   </ul>
</div>
@mau5atron but you should know that I am also pretty new to HTML and CSS
Gabriel Betancourt
@mau5atron
Oct 08 2016 07:13
@Otto-AA I was thinking something like that but would also like to change the gap between columns so stuff from here would look like something I would need http://www.w3schools.com/css/css3_multiple_columns.asp
@Otto-AA But you helped me out I hadn't considered the columns so thank you!
CamperBot
@camperbot
Oct 08 2016 07:13
mau5atron sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 08 2016 07:14
@mau5atron You're welcome
Ajay Tanwar
@ajayt365
Oct 08 2016 08:02
https://codepen.io/ajayt365/pen/LRzNmq i am trying to make a CORS request. what should be my headers here in ajax request ?
c0d0er
@c0d0er
Oct 08 2016 08:28
could anybody help to explain $ in RegExp? very confusing!
kat-mag
@kat-mag
Oct 08 2016 08:32
@c0d0er it matches end of the line/string
c0d0er
@c0d0er
Oct 08 2016 08:32
@kat-mag could you give me a simple code to explain this?
kat-mag
@kat-mag
Oct 08 2016 08:40
hm... If you were to find a pincode that is 4 digits in length exactly, and you're given input differing in length...
you would write something like /^(\d{4})$/
so nothing that's 5digits, 3, whatever - wouldn't go through
Le Xuan Trung
@tangkiemandao
Oct 08 2016 08:42
Hi all.
kat-mag
@kat-mag
Oct 08 2016 08:44
@c0d0er http://regexr.com/3edcg you can try out the patterns here. Cool site
@tangkiemandao yo
c0d0er
@c0d0er
Oct 08 2016 08:56
@kat-mag thanks
CamperBot
@camperbot
Oct 08 2016 08:56
c0d0er sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @kat-mag |http://www.freecodecamp.com/kat-mag
Amit Patel
@AmitP88
Oct 08 2016 09:06
hey guys, do you think Free Code Camp can really help me get hired as a junior dev?
A_A
@Otto-AA
Oct 08 2016 09:13
@AmitP88 I think it can help you to understand coding a bit and therefore is good for getting hired.
Amit Patel
@AmitP88
Oct 08 2016 09:14
@Otto-AA well I mean, I already did the Udacity Front End program, that's why I was wondering. the only thing that's hurting my chances is that I have no real world exp
kat-mag
@kat-mag
Oct 08 2016 09:14
@AmitP88 we had like a way-too-long conversation about that and you're still in doubt. Really, make a decision already ;d
Amit Patel
@AmitP88
Oct 08 2016 09:14
@kat-mag lol sry. I mean, I'm still doing it and will still follow through
A_A
@Otto-AA
Oct 08 2016 09:15
@AmitP88 I don't know about the Udacity-thing, but no school or course can bring you real world exp
Amit Patel
@AmitP88
Oct 08 2016 09:15
lol sry
@Otto-AA yeah, I might also contact local businesses to see if I can make a free website for them
I'm hoping that will help
A_A
@Otto-AA
Oct 08 2016 09:16
You can ask your friends if they know someone and stuff
kat-mag
@kat-mag
Oct 08 2016 09:16
and you said you were going to make your own project ;o
Amit Patel
@AmitP88
Oct 08 2016 09:17
@kat-mag yeah, and I still will =P
@Otto-AA I tried that, but didn't have much luck
sigh I just hope I can get hired somewhere is all
kat-mag
@kat-mag
Oct 08 2016 09:18
It's like you're wondering whether reading a documentation for some stupid API is going to be useful instead of actually READING IT.
If it doesn't work for you - do sth else. If you don't like projects/curriculum on FCC - go somewhere else. DO your OWN project.
Don't think too much... I'm the girl here, I should be having such issues with overthinking xD
A_A
@Otto-AA
Oct 08 2016 09:19
@kat-mag eyyy, no sexism pls ;P
kat-mag
@kat-mag
Oct 08 2016 09:20
@Otto-AA feminist much? :D
Amit Patel
@AmitP88
Oct 08 2016 09:20
@kat-mag lol ok ok. sorry, and yeah, overthinking has always been my problem since my college days
A_A
@Otto-AA
Oct 08 2016 09:20
@kat-mag dunno, but I just don't want sexism ^^
Parley Kennelly
@parleydk
Oct 08 2016 09:20
I'm working on my first challenge. http://codepen.io/pdkennelly/full/mApqyk/14
I'll fill out the timeline once I have the formatting right. I'm currently using .container .row . col-xs-* for the timeline piece, but it's not as responsive as the sample provided by Quincy. Any hints?
Once I've got his sample replicated, I'll fork it and make a pretty one.
Amit Patel
@AmitP88
Oct 08 2016 09:20
@Otto-AA remove the 'ism' part jk jk
A_A
@Otto-AA
Oct 08 2016 09:21
@AmitP88 O.o
Amit Patel
@AmitP88
Oct 08 2016 09:21
lmao sry, couldn't resist XD
kat-mag
@kat-mag
Oct 08 2016 09:22
@parleydk col-xs, col-md, col-lg (might've messed this up - no bootstrap fan). Adding up to 12.
@AmitP88 touchy subjects apparently ;D
Amit Patel
@AmitP88
Oct 08 2016 09:23
@kat-mag yup, quite literally
XP
kat-mag
@kat-mag
Oct 08 2016 09:23
khhh :D
Parley Kennelly
@parleydk
Oct 08 2016 09:23
Oh. so put the classes for all screen sizes. brb
kat-mag
@kat-mag
Oct 08 2016 09:23
let's not lower the level :D
Amit Patel
@AmitP88
Oct 08 2016 09:24
lol
A_A
@Otto-AA
Oct 08 2016 09:24
@kat-mag which level?
@kat-mag but I guess we should talk about coding stuff instead
Amit Patel
@AmitP88
Oct 08 2016 09:26
lol actually I should go to bed. it's 2:30am here and I g2g to work at 11am tomorrow. come on kat jk jk
A_A
@Otto-AA
Oct 08 2016 09:27
@AmitP88 11:30am for me ;)
kat-mag
@kat-mag
Oct 08 2016 09:27
11:30 AM here!
Amit Patel
@AmitP88
Oct 08 2016 09:27
lol you guys are lucky haha
A_A
@Otto-AA
Oct 08 2016 09:27
@kat-mag Eyy, also europe?
kat-mag
@kat-mag
Oct 08 2016 09:27
Yup ;d
Amit Patel
@AmitP88
Oct 08 2016 09:27
well, gnite! :D
Parley Kennelly
@parleydk
Oct 08 2016 09:28
5:26am in North Carolina
kat-mag
@kat-mag
Oct 08 2016 09:28
@parleydk u no sleep? ;o
Parley Kennelly
@parleydk
Oct 08 2016 09:28
Sleep vs Computer.
The computer almost always wins.
kat-mag
@kat-mag
Oct 08 2016 09:29
Darn, can't live like this anymore. When I try to stay up during the night... I just see my bed and simply can't resist xD
Parley Kennelly
@parleydk
Oct 08 2016 09:30
well, I did go to be at 10pm then woke up at 4am. so that's six hours.
A_A
@Otto-AA
Oct 08 2016 09:30
@kat-mag Well, it's good for your health
Parley Kennelly
@parleydk
Oct 08 2016 09:30
I wish I could get a telecommuting job in Europe so I could double my salary. ;)
@kat-mag your tip seems to have fixed my responsive issue.
http://codepen.io/pdkennelly/full/mApqyk/
kat-mag
@kat-mag
Oct 08 2016 09:34
yay for bootstrap ;p
Parley Kennelly
@parleydk
Oct 08 2016 09:38
@Otto-AA did you get your Tic-Tac-Toe question answered? I found this on Quora <3
https://www.quora.com/Is-there-a-way-to-never-lose-at-Tic-Tac-Toe/answer/Arjun-Subramaniam?srid=OYhm
A_A
@Otto-AA
Oct 08 2016 09:40
@parleydk Well, the person who asked (@hacu9) didn't reply if he got it now or not
Parley Kennelly
@parleydk
Oct 08 2016 09:41
Oh. I didn't see who asked first so I wasn't sure.
A_A
@Otto-AA
Oct 08 2016 09:49
Does anyone of you have an idea to improve my Wikipedia Viewer?
http://codepen.io/A_A/pen/RGQQJJ
@Otto-AA Seems like it doesn't work here :/
Stephen James
@sjames1958gm
Oct 08 2016 09:52
@Otto-AA I like it - the animation is good not overdone. I would clear the search box on return - cute use of stupedia when no data is entered.
A_A
@Otto-AA
Oct 08 2016 09:52
@sjames1958gm Ok, thanks for the feedback ;)
CamperBot
@camperbot
Oct 08 2016 09:52
otto-aa sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3739 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Parley Kennelly
@parleydk
Oct 08 2016 09:53
I like it better than the original interface.
A_A
@Otto-AA
Oct 08 2016 09:53
@parleydk Lol, thanks ^_^
CamperBot
@camperbot
Oct 08 2016 09:53
otto-aa sends brownie points to @parleydk :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @parleydk |http://www.freecodecamp.com/parleydk
Parley Kennelly
@parleydk
Oct 08 2016 09:58
@Otto-AA though, I wonder if there is a way to incorporate the language selection without messing up your look and feel.
A_A
@Otto-AA
Oct 08 2016 09:59
@parleydk Oh, I actually didn't intent to make one, but maybe later... :)
Hanif Marwat
@Hanifmrwt
Oct 08 2016 10:01
http://codepen.io/hanifmrwt/full/ZpAwXG/ I want to improve my page please give me some suggestion
http://codepen.io/hanifmrwt/full/ZpAwXG/ i created the gallery at the end but what i enterd after the gallery everything becomes a link type, I tried to remove the links but failed as you can see the line at bottom. please help me
Parley Kennelly
@parleydk
Oct 08 2016 10:29

@Hanifmrwt I'm still looking at it, but I noticed in you .sep class you have color: listed twice.
.sep{
width:100%;
text-decoration: none;
font-size:20px;
text-align: center;
color:black;
font-family: cursive;
background-color: #000;
padding:10px;
margin:0px;
color:white;

}

Parley Kennelly
@parleydk
Oct 08 2016 10:37
@Hanifmrwt , you don't have closing </a> tags that's why everything is a link.
Hanif Marwat
@Hanifmrwt
Oct 08 2016 11:04
thanx @parleydk
CamperBot
@camperbot
Oct 08 2016 11:04
hanifmrwt sends brownie points to @parleydk :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @parleydk |http://www.freecodecamp.com/parleydk
Hanif Marwat
@Hanifmrwt
Oct 08 2016 11:11
@parleydk its working, thanx again
CamperBot
@camperbot
Oct 08 2016 11:11
hanifmrwt sends brownie points to @parleydk :sparkles: :thumbsup: :sparkles:
:warning: hanifmrwt already gave parleydk points
Parley Kennelly
@parleydk
Oct 08 2016 11:13
hey no problem, that's why we're here.
Ajay Tanwar
@ajayt365
Oct 08 2016 11:18
How to make a CORS request with appropriate headers ?
Stephen James
@sjames1958gm
Oct 08 2016 11:22
@ajayt365 The server is the one that controls the CORS - you cannot force it from codepen side
alpox
@alpox
Oct 08 2016 11:32
@ajayt365 you can come around the CORS issue with using jsonp
If the server supports jsonp of course. Mostly they do. If they don't you can use crossorigin.me
Ajay Tanwar
@ajayt365
Oct 08 2016 11:34
@sjames1958gm yes man . but they require some parameter to be sent by the client like wikipedia accepts origin header . but what i don't know is what value i should write of origin attribute in ajax block while making a CORS request
alpox
@alpox
Oct 08 2016 11:35
@ajayt365 The accepts origin header has to be sent by the server, not the client
Ajay Tanwar
@ajayt365
Oct 08 2016 11:36
@alpox The MediaWiki API also requires that the origin be supplied as a request parameter, appropriately named "origin", which is matched against the Origin header required by the CORS protocol . src: mediawiki
alpox
@alpox
Oct 08 2016 11:38
@ajayt365 Do you have a link to that resource?
alpox
@alpox
Oct 08 2016 11:43

@ajayt365 Ah they have a pre-test, alright. JSONP should work too though.
They gave you a link to further resources where i found this:

$.ajax( {
    url: 'https://en.wikipedia.org/w/api.php',
    data: {
        action: 'query',
        meta: 'userinfo',
        format: 'json',
        origin: 'https://www.mediawiki.org'
    },
    xhrFields: {
        withCredentials: true
    },
    dataType: 'json'
} ).done( function ( data ) {
    alert( 'Foreign user ' + data.query.userinfo.name +
        ' (ID ' + data.query.userinfo.id + ')' );
} );

As an example request

Utsav Goel
@utsavgoel
Oct 08 2016 12:02
has anybody donw the two front end development projects?
??
anybody??
Patrick Fitzgerald
@mrpf1
Oct 08 2016 12:41
Any advice on how to differentiate between online and offline for Twitch TV feeds?
A_A
@Otto-AA
Oct 08 2016 12:56
@utsavgoel yeah, why?
Sorin Ruse
@sorinr
Oct 08 2016 12:59
@mrpf1 just check if your response call stream has some value. like if(data.stream !== ""){do something}else{do something else}
Rachel Reinheimer
@glgirl28
Oct 08 2016 13:59
I posted in another FCC room, but maybe this is the right place: I wrote my own unit tests for algorithms, but I feel lost trying to unit test my projects. I'm trying Mocha and Jasmine, but I am open to any suggestions!
Waqas Abbasi
@Waqas909
Oct 08 2016 14:13
Hey guys, How do I make background image opacity low and now lower the opacity of my text.
if i set background-image for the body and lower the opacity , it makes everything low opacity
Ganadore
@Ganadore
Oct 08 2016 14:33
I thought this tribute page was going to be easy. Its like all the code left my brains when your not being guided
Waqas Abbasi
@Waqas909
Oct 08 2016 14:34
@Ganadore well it's easy if you want to make a simple one.... but i mean we're all tryning to make it fancy
thats why it's hard
Christopher
@cferrell2
Oct 08 2016 14:35
@Ganadore I'm working on it myself. I'm having problem with my unordered list.
Waqas Abbasi
@Waqas909
Oct 08 2016 14:35
@cferrell2 Ask here, maybe one of us can help?
Christopher
@cferrell2
Oct 08 2016 14:35
Tribute page - I can't figure out why there is a large space between the bullets and text on my unordered list.
Ganadore
@Ganadore
Oct 08 2016 14:36
not going to lie, it took me like 6 whole minutes to get my text red and succeeded when i pulled a reference, it was here where i realized that its not going to take me 15 minutes
Waqas Abbasi
@Waqas909
Oct 08 2016 14:36
might be because you used text-allign
instead of making the whole unorderlist center
for some reason, for me !important doesnt work
Christopher
@cferrell2
Oct 08 2016 14:37
I have text-center within my container class. When I remove that it takes away the space but of course everything is now left aligned
Waqas Abbasi
@Waqas909
Oct 08 2016 14:37
yea that's the problem
Christopher
@cferrell2
Oct 08 2016 14:37
I have no alignment specified within UL element
Waqas Abbasi
@Waqas909
Oct 08 2016 14:37
text-center only focuses text
not ur bllet points
perhaps you should search more into how to center the container
@cferrell2 Then the bullet points also go center
kat-mag
@kat-mag
Oct 08 2016 14:39
@cferrell2 It's better if you post your pen here, then someone can actually help you instead of guessing :)
kirbyedy
@kirbyedy
Oct 08 2016 14:40
if you align left and then offset the specific column it should be ok @cferrell2
Christopher
@cferrell2
Oct 08 2016 14:40
@kirbyedy @Waqas909 thanks...I'll try to research more.
CamperBot
@camperbot
Oct 08 2016 14:40
:star2: 1438 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
:cookie: 119 | @waqas909 |http://www.freecodecamp.com/waqas909
cferrell2 sends brownie points to @kirbyedy and @waqas909 :sparkles: :thumbsup: :sparkles:
Waqas Abbasi
@Waqas909
Oct 08 2016 14:41
do i just Link my pen here to post it ? @kat-mag
kat-mag
@kat-mag
Oct 08 2016 14:41
yep
How do i change my background image opacity?
because if i change the opacity with Opacity: 0.5;
then the text also gets affected
Christopher
@cferrell2
Oct 08 2016 14:43
Here is what I have so far...vanilla as it is. : ) http://codepen.io/cferrell2/pen/qaxgjR
JD Tadlock
@jdtdesigns
Oct 08 2016 14:54
Going to be building an app for the Dev War from the ground up through cloud9 starting soon. If anybody's interested in team coding with me or watching, sign up for an account at https://c9.io/.
kat-mag
@kat-mag
Oct 08 2016 15:01
@Waqas909 set bg on .body::before and give it a z-index: -1; and your opacity.
Waqas Abbasi
@Waqas909
Oct 08 2016 15:01
oh okay let me try @kat-mag
kat-mag
@kat-mag
Oct 08 2016 15:01
And ffs, don't call your own classes 'body'. Please ;D
Waqas Abbasi
@Waqas909
Oct 08 2016 15:02
@kat-mag kkk :smile:
Christopher
@cferrell2
Oct 08 2016 15:07
@Waqas909 @kat-mag Figured it out...I placed the list in a div / row and used column with offset.
Waqas Abbasi
@Waqas909
Oct 08 2016 15:07
@cferrell2 Nice
@kat-mag Doesnt work :P
kat-mag
@kat-mag
Oct 08 2016 15:09
.body{
  padding: 10px 10px 10px 10px;
  margin: 10px 10px 10px 10px;
  position: relative;
}
.body::before {
  content: "";
  position: absolute;
  left:0;top:0;
  width: 100%;
  height: 100%;
  opacity: .5;
  background-image: url("http://www.southafrica.net/cache/ce_cache/made/cb43030a00a807f4/SAFlag_960_472_80auto_s_c1_center_center.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
}
and that class name hurtz mah eyezzzzz, change please :bear:
Waqas Abbasi
@Waqas909
Oct 08 2016 15:10
@kat-mag Thanks! but I'm not sure why that works?
CamperBot
@camperbot
Oct 08 2016 15:10
waqas909 sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 357 | @kat-mag |http://www.freecodecamp.com/kat-mag
Waqas Abbasi
@Waqas909
Oct 08 2016 15:10
xd sure
JD Tadlock
@jdtdesigns
Oct 08 2016 15:11
@Waqas909
/** change this **/
padding: 10px 10px 10px 10px;
margin: 10px 10px 10px 10px;

/** to this **/
padding: 10px;
margin: 10px;
kat-mag
@kat-mag
Oct 08 2016 15:12
@Waqas909 works because you're setting your div '.body' to be a parent for a pseudoelement. Then setting your ::before to stay still & behind the text & other content with z-index
image stays in place and doesn't interrupt anything else.
Kacper
@KacMac
Oct 08 2016 15:12
Hi, why when I press the button "Tweet out" it doesnt open a new window?
kat-mag
@kat-mag
Oct 08 2016 15:12
and what @jdtdesigns said ;D +1
Waqas Abbasi
@Waqas909
Oct 08 2016 15:13
@kat-mag But if i have another div inside, and change that div opacity and set it to !important, why doesnt that work?
@JD
@jdtdesigns Thanks for the tip!
CamperBot
@camperbot
Oct 08 2016 15:13
waqas909 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 683 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
kat-mag
@kat-mag
Oct 08 2016 15:13
@KacMac add target="_blank" to your <a> tag
@Waqas909 if you can go around without EVER using !important - you'll be good ;D
JD Tadlock
@jdtdesigns
Oct 08 2016 15:14
what @kat-mag said :D
Waqas Abbasi
@Waqas909
Oct 08 2016 15:14
Anyway Thanks!
Kacper
@KacMac
Oct 08 2016 15:14
@kat-mag well it I didnt say precisely, when I added it it opens new tab but not twitter webpage
its like refreshing my page
Sorin Ruse
@sorinr
Oct 08 2016 15:16
@KacMac if you copy paste that same url link in a new tab it will work. its a matter of sandboxing that has nothing to do with ur code
Waqas Abbasi
@Waqas909
Oct 08 2016 15:17
This message was deleted
Kacper
@KacMac
Oct 08 2016 15:17
I dont get it
Waqas Abbasi
@Waqas909
Oct 08 2016 15:18
@KacMac target="_blank" opens a new tab
and then runs ur link
Kacper
@KacMac
Oct 08 2016 15:21
@walidashri yop, but my intention on this button is to open a new tab with twitter page but in my case my button opens again my page
I think that I made a mistake in my javascript code
Stephen James
@sjames1958gm
Oct 08 2016 15:22
@KacMac You can post a link - it might be just refreshing the current page.
@KacMac It opens your page in another tab?
Kacper
@KacMac
Oct 08 2016 15:23
@sjames1958gm yes
Stephen James
@sjames1958gm
Oct 08 2016 15:27
@KacMac Your button is an anchor tag with href="#" - that is why it opens your page
You don't appear to have jquery loaeded
@KacMac I added jquery and change from <a> to <button> and it went to twitter.
Kacper
@KacMac
Oct 08 2016 15:29
@sjames1958gm that's exactly what I needed at this moment, thanks a lot :)
CamperBot
@camperbot
Oct 08 2016 15:29
kacmac sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3749 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 08 2016 15:30
:+1:
Ganadore
@Ganadore
Oct 08 2016 15:42
hmmm, on my tribute page im using <ul><b>something<b></ul> but im not getting the little cirles on the left. Any guesses as to why?
hmmm i think i know why, let me try something
yep got it
Mayur
@mayurpande
Oct 08 2016 16:02
I have finished the random quote machine project, using an object and pure javascript. Does anyone think there is point in me re-doing it in jquery or using an api?
Stephen James
@sjames1958gm
Oct 08 2016 16:10
@mayurpande I don't the next three challenges all use APIs
Johnathan Mullen
@MrJkmullen
Oct 08 2016 16:19
where can i get the API key for my city?
Ganadore
@Ganadore
Oct 08 2016 16:19
for the tribute page, do we make a nice long one or just enough to show we have the concept?
Johnathan Mullen
@MrJkmullen
Oct 08 2016 16:27
Could someone help me get my city ID please?
Waqas Abbasi
@Waqas909
Oct 08 2016 17:02
@Ganadore Just try to be creative with it :-)
David Jaimes
@DavidJaimesDesign
Oct 08 2016 17:13
For the images we use in our portfolio where can we get some free ones that wont be infringing on copyright? Is gettyimage embeds ok?
Annu Nirmal
@annunirmal
Oct 08 2016 17:16
i am done with wikipedia viewer. suggestions are more than welcome. :)
https://codepen.io/nirmalannu/full/gwvWgK
Johnathan Mullen
@MrJkmullen
Oct 08 2016 17:31
Why is it not displaying long and lat http://codepen.io/jkmullen/pen/WGzvoY?editors=1010
Sorin Ruse
@sorinr
Oct 08 2016 17:32
@annunirmal just add target="_blank" like $("#article-list").append('<li><h2><a target="_blank" href="http://en.wikipedia.org/?curid=' + page.pageid + '">' + page.title + '</a></h2>' + '<p>' + extract + '</p>' + '</li>');
Christopher
@cferrell2
Oct 08 2016 17:33
Finished Tribute page. I welcome any criticism. I know it's quite plain. http://codepen.io/cferrell2/pen/qaxgjR
Eric Weiss
@eweiss17
Oct 08 2016 17:35
@cferrell2 Put less padding on the top of the page. Also the image is a little blurry (probably not your fault). Other then that pretty good!
You should implement some of your own css, bootstrap will only take you so far
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 17:39
@cferrell2 Maybe you could make the 'Robert Noyce' headline bigger, and make the subtitle "the man behind the microchip' italicised or something?
Christopher
@cferrell2
Oct 08 2016 17:40
thanks @eweiss17 Yeah I may add more later. Right now I'm exausted..just trying to get things right. : ) Especially figuring out how to get rid of space between the bullets and text on the list.
CamperBot
@camperbot
Oct 08 2016 17:40
cferrell2 sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Christopher
@cferrell2
Oct 08 2016 17:40
Thanks for the feedback
Eric Weiss
@eweiss17
Oct 08 2016 17:41
np looks good for a first project definitely
furofo
@furofo
Oct 08 2016 17:42
hey everybody
Christopher
@cferrell2
Oct 08 2016 17:43
Figured out that I wasn't using the grid initially...should have known better as that is one of the main reasons for bootstrap.
furofo
@furofo
Oct 08 2016 17:43
you guys know of any good tutorials to really sink this whole interacting with API thing for me
I have been trying for days now to understand it and Im in a perpetual loop of sorts
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 17:43
@Ganadore Make sure it's in '''<li></li>''' tags, and if all else fails, you can use '''list-style-type:disc''', or there is a lot of other kinds of markers you can use here.
CamperBot
@camperbot
Oct 08 2016 17:43
:bulb: to format code use backticks! ``` more info
Eric Weiss
@eweiss17
Oct 08 2016 17:43
doing the projects relating to API's , (wikipedia, Weather, Twitch) really helped me
You learn by doing and reading the documentation on how to implement them
furofo
@furofo
Oct 08 2016 17:44
@eweiss17 I barely got my quote my machine working but I have no idea why
Eric Weiss
@eweiss17
Oct 08 2016 17:44
what api did u use for quote machine
I can share all the sites I used for my API's on my projects if you don't know which one to use
furofo
@furofo
Oct 08 2016 17:46
@eweiss17 forismatic api
i got really luckyand found a codepen to emulate roughlyto get what i wanted
but I don't know hwo to go in and just interact with one
literally everytime I try i either get a authentication error or nothing happens
I went through a code academy course and trying to go through a udacity one on Ajax but it is pretty ambigous and outdated
Eric Weiss
@eweiss17
Oct 08 2016 17:48
Most require authentication keys to access
Some you just sign up for and they give you the key to put in your pull request
I used this one for my quote machine, was real easy
furofo
@furofo
Oct 08 2016 17:50
yes, I have gathered that much would you mind looking over a post I made on reddit and telling me why the submit doesn't do anything?
furofo
@furofo
Oct 08 2016 17:50
the code isn't really long
Eric Weiss
@eweiss17
Oct 08 2016 17:50
that one doesn't require a key either
furofo
@furofo
Oct 08 2016 17:50
ah cool so you just put the link in there and append your query too it right?
Eric Weiss
@eweiss17
Oct 08 2016 17:51
I can link my codepen and you can see how i did it
I commented a bit in the code
okay that would be awesome thanks
Go to where the // quote generator starts
furofo
@furofo
Oct 08 2016 17:52
the problem I am having with this code is it should bring up a goole image in teh background of the page when you type in an address but I can't get it do squat
and hit submit
Eric Weiss
@eweiss17
Oct 08 2016 17:52
the start of the JS is just swapping colors of the box.... you will see what it does if u click get quotes
furofo
@furofo
Oct 08 2016 17:53
when you hit submit I mean
Eric Weiss
@eweiss17
Oct 08 2016 17:53
k i can look at your reddit post now
do you have a codepen of this code? its easier to debug if I can try it myself....
furofo
@furofo
Oct 08 2016 17:55
i can put it in a code pen right quick
I understand your color changing javascript but the Ajax is where I start to get lost lol
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 17:56
@furofo Try $(".background").css("background-image", "url(/path_to_image.png)");
furofo
@furofo
Oct 08 2016 17:57
@AwesomeIndustry allright will do, instead of the append right?
Eric Weiss
@eweiss17
Oct 08 2016 17:57
there you go try what he said lol
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 17:57
@furofo Try that, and see if it works...
Eric Weiss
@eweiss17
Oct 08 2016 17:58
$.ajax( {
      url: 'http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=',
that is the the api call
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 17:58
Also, you could take the non-jquery route, and use document.body.style.background-image("url('path_to_image.png')");
@furofo
Eric Weiss
@eweiss17
Oct 08 2016 18:00
the information you get from the api is in a javascript object, so you can access the data by going through the object
furofo
@furofo
Oct 08 2016 18:00
okay so here is the code pen
okay so I have been using jQuery to call ajax with getJSON method
but now that I think about it this code doesn't really use AJAx
it is adding a query to the end of a google maps url but for some reason it doesn't work
@AwesomeIndustry I put that in instead of the append but it is still not doing what I need it to do
Eric Weiss
@eweiss17
Oct 08 2016 18:03
btw great way to debug is doing console.out(information) and look at your console to see what is displayed (F12 - Console tab)
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:03
@furofo Try wrapping everything in <body></body>
tags
@furofo then try $(document.body).css("background-image", "url(/path_to_image.png)");
PS: Thanks for sending me your CodePen.
Eric Weiss
@eweiss17
Oct 08 2016 18:06
@AwesomeIndustry You got any experience with connecting to REST Api's?
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:07
Sorry, no. Most of my experience lies with socket.io and Pure JS.
Eric Weiss
@eweiss17
Oct 08 2016 18:08
just did a project with sockets in c++ the other day.....was annoying
furofo
@furofo
Oct 08 2016 18:08
still trying lol now im getting error messages smh
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:10
@eweiss17 socket.io is actually part of node js. I recommend you check it out
Eric Weiss
@eweiss17
Oct 08 2016 18:11
I used winsocket , any relation?
It was a client/server project
learning node.js is on my to do list lol
furofo
@furofo
Oct 08 2016 18:11
okay so still nothing
Eric Weiss
@eweiss17
Oct 08 2016 18:12
Failed to load resource: the server responded with a status of 404 (Not Found)
Press F12 and check out console messages man
furofo
@furofo
Oct 08 2016 18:14
okay so i see it and it has something to do with js.script i think?
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:14

@zarruk I see that collection is a list of objects, and each object has the properties first and last. To access a the 2nd last value, you could use

collection[1].last

Hope this helps!

Salomon
@zarruk
Oct 08 2016 18:15
@AwesomeIndustry I want it to work for any other property, not just last
Eric Weiss
@eweiss17
Oct 08 2016 18:15
well thats just saying the javascript section of your pen is what is causing problem
furofo
@furofo
Oct 08 2016 18:16
ah ok
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:16
@zarruk Then just replace last with another property, like first
So, instead you could do
collection[1].first
Eric Weiss
@eweiss17
Oct 08 2016 18:16
Uncaught ReferenceError: address is not defined
?
Salomon
@zarruk
Oct 08 2016 18:17
@AwesomeIndustry I mean, an undefined property. Look at the instructions
Eric Weiss
@eweiss17
Oct 08 2016 18:17
@furofo did you do anything regarding pressing the submit button?
$("button").on('click', function(e)
furofo
@furofo
Oct 08 2016 18:18
supposedly the line on the bottom was suppose to open that but maybe i misinterpeted
I am going through a udacity course and thats what the guy said but now that you mention it that does seem strange
Eric Weiss
@eweiss17
Oct 08 2016 18:19
I don't know but yeah I think address is just not getting the information
try commenting that out and trying with getting the info after they press submit
furofo
@furofo
Oct 08 2016 18:23
working on it
are my quotations right here?
$(document.body).css("background-image", "url(https://maps.googleapis.com/maps/api/streetview?size=600x400&location=" + address + '&key' + apikey);
  }
AwesomeIndustry
@AwesomeIndustry
Oct 08 2016 18:24
@zarruk I think they want you to use the property in source to figure out what objects in collection contain that property-and-value pair. I would start by looping through collection and using array.push() to add all the items in collection that contain all the name-value pairs in source to a separate list.
Eric Weiss
@eweiss17
Oct 08 2016 18:28
@furofo Haha i'm trying to fix it and i'm making it worse
I think it's set up in a way that you have to use what you were using
furofo
@furofo
Oct 08 2016 18:28
lol it might be
@eweiss17 I feel like giving up now lol
Eric Weiss
@eweiss17
Oct 08 2016 18:29
Why don't you do that random quote project....
use the api i used
it was easy
furofo
@furofo
Oct 08 2016 18:29
yeah im done with that one lol
Eric Weiss
@eweiss17
Oct 08 2016 18:29
oh you completed it?
furofo
@furofo
Oct 08 2016 18:29
I was trying to understand apis a little better and thought a tutorial would make it easy lol
yes aside from some styling stuff
Eric Weiss
@eweiss17
Oct 08 2016 18:30
jokes on you, you are more confused now haha
did u start the weather api one?
A_A
@Otto-AA
Oct 08 2016 18:30
@furofo I think "url('link...')"should be right
Eric Weiss
@eweiss17
Oct 08 2016 18:30
I had a lot of problems finding a correct api for that one
i used a random rgb value to generate a bunch of different colors in mine
Eric Weiss
@eweiss17
Oct 08 2016 18:31
looks better than mine rofl
furofo
@furofo
Oct 08 2016 18:31
for some reason though it has to be run as http: and not https: something about secruity lol
and thanks
Eric Weiss
@eweiss17
Oct 08 2016 18:31
animate the box though
makes it look smoother
furofo
@furofo
Oct 08 2016 18:32
I appreciate it but I assure you, you know way more about coding than I lol
Im trying to understand the back end of things better atm but good suggestion
@Otto-AA thanks I will keep firing away at it
CamperBot
@camperbot
Oct 08 2016 18:32
furofo sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 269 | @otto-aa |http://www.freecodecamp.com/otto-aa
furofo
@furofo
Oct 08 2016 18:33
@eweiss17 thanks to you too
CamperBot
@camperbot
Oct 08 2016 18:33
furofo sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 333 | @eweiss17 |http://www.freecodecamp.com/eweiss17
furofo
@furofo
Oct 08 2016 18:33
brownie points for everybody lol
Eric Weiss
@eweiss17
Oct 08 2016 18:33
woo 333
A_A
@Otto-AA
Oct 08 2016 18:33
@furofo I'd load a quote already at the beginning (e.g. with $('#quoteGETJSON').trigger('click'); which will trigger a click)
Eric Weiss
@eweiss17
Oct 08 2016 18:33
i am at a hault on intermediate algorithm scripting on here though.... Its extremely tough
or i should say intermediately tough
furofo
@furofo
Oct 08 2016 18:34
@eweiss17 damn even worse then this
Eric Weiss
@eweiss17
Oct 08 2016 18:34
I enjoyed doing the project
thesee..... i do not enjoy
furofo
@furofo
Oct 08 2016 18:34
ノಠل͟ಠ༽ノ -
Eric Weiss
@eweiss17
Oct 08 2016 18:34
require a lot of thinking
and a lot of "Plz help me here is my code"
and then they switch one thing and it works and u feel like a moron
that kind of thing
furofo
@furofo
Oct 08 2016 18:34
haha well I have done plenty of that already
glad to know im not the onlyone
Eric Weiss
@eweiss17
Oct 08 2016 18:35
yeah haha i always try to do it myself then post what i did so at least they know my thought process
and that i tried
oh but if u are going to do the weather one
let me share my api and how to use it because that took me a while
furofo
@furofo
Oct 08 2016 18:35
not sure if you have udacity but this is what i was trying to do
yeah for sure which api did you use?
they have a great course on git hub btw if yourinterested
Eric Weiss
@eweiss17
Oct 08 2016 18:37
wunderground weather api
wunderground.com, their api
you need to sign up to get a key
furofo
@furofo
Oct 08 2016 18:37
ok will do
Eric Weiss
@eweiss17
Oct 08 2016 18:37
Make sure your project is not on auto run because you have a limited amount of calls
like so you have to press run code to see changes
furofo
@furofo
Oct 08 2016 18:38
is it limited per day or total?
Eric Weiss
@eweiss17
Oct 08 2016 18:38
limited like per minute...
i got emails about it like 3 times about using too much
this is mine, it's probably my best project so far
reg0r
@reg0r
Oct 08 2016 18:40
Hi! Just finished my Wiki Viewer. I'll be appreciated for some feedback.
http://codepen.io/reg0r/full/RGQxBK/
furofo
@furofo
Oct 08 2016 18:41
@eweiss17 sweet thats awesome man now time run 30 times muahhah
Eric Weiss
@eweiss17
Oct 08 2016 18:42
lol i think my api key will become invalid if that happens again
Funny, I had the warning message "Please run more than 10 times ...." , not "Please do not run..." i just changed it...
furofo
@furofo
Oct 08 2016 18:43
@reg0r looks great on desktop
whats the present thing underneath the line for?
@eweiss17 dang that sucks pretty spot on for my area, thanks to hurricane matthew
CamperBot
@camperbot
Oct 08 2016 18:43
furofo sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:warning: furofo already gave eweiss17 points
A_A
@Otto-AA
Oct 08 2016 18:44
@reg0r Hover-effect is pretty nice ;)
Maybe make the results a little smaller
Eric Weiss
@eweiss17
Oct 08 2016 18:44
@furofo wait haha what does it say?
furofo
@furofo
Oct 08 2016 18:44
heavy rain
and the temparture
Eric Weiss
@eweiss17
Oct 08 2016 18:44
is there an animated icon for that?
reg0r
@reg0r
Oct 08 2016 18:44
@furofo present thing for random surprise
furofo
@furofo
Oct 08 2016 18:45
um let me check
@reg0r ah okay well maybe a tag or something for that that was the only thing that confused me
@eweiss17 no icon for that
i followed you on git by the way
reg0r
@reg0r
Oct 08 2016 18:47
@furofo It's bootstrap glyphicon
Eric Weiss
@eweiss17
Oct 08 2016 18:48
@furofo Try to see if there is an icon now
reg0r
@reg0r
Oct 08 2016 18:50
@Otto-AA Thanks for feedback. I'll try to make results smaller.
CamperBot
@camperbot
Oct 08 2016 18:50
reg0r sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @otto-aa |http://www.freecodecamp.com/otto-aa
reg0r
@reg0r
Oct 08 2016 18:51
@furofo Thanks for feedback.
CamperBot
@camperbot
Oct 08 2016 18:51
reg0r sends brownie points to @furofo :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @furofo |http://www.freecodecamp.com/furofo
furofo
@furofo
Oct 08 2016 18:51
@eweiss17 yep its there now
Eric Weiss
@eweiss17
Oct 08 2016 18:52
Thanks for checking and for following me.... though I don't post much on github right now, maybe in the future though
The one guy that i am following was a previous co worker of mine that is very very good at front end development
furofo
@furofo
Oct 08 2016 18:59
ah okay lol, well if you every want to pair program or something in the future that'd be awesome, It will take me a little while to catch up to you though lol
or maybe a long while
Salomon
@zarruk
Oct 08 2016 19:03
can somebody please tell me why my code here isnt working?
```

function whatIsInAName(collection, source) {
  // What's in a name?
  var arr = [];
  var arr2 = [];
  // Only change code below this line
  arr = Object.keys(source);

  for (var i = 0; i < collection.length; i++){
    for (var j in arr){
      if (collection[i].hasOwnProperty(j)){
        if (collection[i].j == source.j){
          arr2.push(collection[i]);
        }
      }
    }
  }
  return arr2;
  // Only change code above this line
}

whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
This is the "Wherefore art thou" challenge
furofo
@furofo
Oct 08 2016 19:07
@eweiss17 it works!!
Eric Weiss
@eweiss17
Oct 08 2016 19:11
@furofo It knows where I live !
@furofo Yeah man I'll have to message you on github or something and we can do a project together
furofo
@furofo
Oct 08 2016 19:13
@eweiss17 sounds awesome man if ya want i can give you my fb on there
Eric Weiss
@eweiss17
Oct 08 2016 19:13
i think u can add me on code pen
furofo
@furofo
Oct 08 2016 19:13
i wasn't using $ for my jquery variables and my quotes were wrong on this line $body.append('<img class="bgimg" src="' + streetViewHandler + '">');
Eric Weiss
@eweiss17
Oct 08 2016 19:14
actually u can just pm me facebook then
furofo
@furofo
Oct 08 2016 19:14
but allright will see if i can figure that
Eric Weiss
@eweiss17
Oct 08 2016 19:14
it's allowing following on codepen no friends
only*
furofo
@furofo
Oct 08 2016 19:14
ah
yeah you can't message on any of these sites lol
This message was deleted
Eric Weiss
@eweiss17
Oct 08 2016 19:20
u can pm here
i found u ez though since u have same pic
furofo
@furofo
Oct 08 2016 19:21
ah well im not concerned but how do you do that?
Eric Weiss
@eweiss17
Oct 08 2016 19:21
hover over photo chat privatly
furofo
@furofo
Oct 08 2016 19:22
yeah i don't have that lol
Eric Weiss
@eweiss17
Oct 08 2016 19:22
wow a grand master sensee whopper slayer, it's an honor to meet you
oh you using this as a side window on free code camp? or a separate tab?
furofo
@furofo
Oct 08 2016 19:23
yes i am (slaps forehead)
got it now
and yep haha you can tell I don't update things often
so your in the intermediate challenges right now then?
Eric Weiss
@eweiss17
Oct 08 2016 19:31
intermediate algorithm
I haven't done it in a bit i'v been busy
furofo
@furofo
Oct 08 2016 19:37
ah okay
Eric Weiss
@eweiss17
Oct 08 2016 19:37
the algorithm scripting is where it gets hard though
just pure javascripting
furofo
@furofo
Oct 08 2016 19:37
so when you code these things do you try and write it all form scratch, I did until these projects but mainly I have been googling code for specific things and tweaking it a little
Eric Weiss
@eweiss17
Oct 08 2016 19:38
oh well if you are on random quote you already did basic algorithm scripting
I try to set it all up by myself
and then like if I don't know how to animate a part i'll look that up and implement it
furofo
@furofo
Oct 08 2016 19:39
thats awesome man, I did to but this is where I completely lost my grip on what is going on if that makes sense
Eric Weiss
@eweiss17
Oct 08 2016 19:39
try to look at other peoples projects (without looking at code) and make it look similar
A_A
@Otto-AA
Oct 08 2016 19:40
@zarruk 1) var j in arr -> arr is equal to 'last' at this moment; I think you want source instead of arr there
2) when you want to use a variable as a key you need bracket notation: collection[i][j] == source[j]
Eric Weiss
@eweiss17
Oct 08 2016 19:42
my reccomendation is to try to learn jade for html and saas for css
Preprocessors
helps a lot
furofo
@furofo
Oct 08 2016 19:42
ok will do
A_A
@Otto-AA
Oct 08 2016 19:45
@furofo When you google for code and implement it, always try to understand it (else you wouldn't learn much and it's harder to find errors afterwards :/ )
furofo
@furofo
Oct 08 2016 19:46
@Otto-AA yes I have been trying to understand it by changing it and seeing what it does
Eric Weiss
@eweiss17
Oct 08 2016 19:46
'it works because it does' is the best explanation
A_A
@Otto-AA
Oct 08 2016 19:47
"It does'nt work and I don't know why."
"It works and I don't know why."
best quote imo
Eric Weiss
@eweiss17
Oct 08 2016 19:47
i have used that second one too many times
A_A
@Otto-AA
Oct 08 2016 19:48
^_^
Eric Weiss
@eweiss17
Oct 08 2016 19:48
'it works, don't question it' is usually my phrase
A_A
@Otto-AA
Oct 08 2016 19:48
well, that's the moment when you should try to understand it :P
xSnowpeltx
@xSnowpeltx
Oct 08 2016 19:49
so im working on the javascript calculator and I set up my js with a bunch of $().click functions for all the numbers on the pad that reference a function that puts that digit into the number being typed and the total expression. However for some reason when I run it, even though theyr'e all $().click functions, it acts like youve clicked all the buttons even though I havent. I can't figure out why it's doing that. Heres my pen http://codepen.io/xSnowpeltx/pen/rrdVPO/
Timothy Dake
@spaco67
Oct 08 2016 19:49
hi all
Eric Weiss
@eweiss17
Oct 08 2016 19:51
i'm done for today bye
A_A
@Otto-AA
Oct 08 2016 19:52
@xSnowpeltx put the function declaration of onNum outside the document.ready() part (no matter if above or below)
xSnowpeltx
@xSnowpeltx
Oct 08 2016 19:53
still doesnt work. I think something might be wrong with my buttons? clicking them doesnt even do anything
A_A
@Otto-AA
Oct 08 2016 19:54
@xSnowpeltx Btw, val is not declared in the function
xSnowpeltx
@xSnowpeltx
Oct 08 2016 19:54
I wanted to declare val outside the function
A_A
@Otto-AA
Oct 08 2016 19:54
oh, I see
xSnowpeltx
@xSnowpeltx
Oct 08 2016 19:54
shouldnt it be able to access global variables?
cuz I'm gonna use val and expression and total in a bunch of functions
A_A
@Otto-AA
Oct 08 2016 19:55
then put it out of the .ready() too
furofo
@furofo
Oct 08 2016 19:55
@eweiss17 haha too true see ya ma
A_A
@Otto-AA
Oct 08 2016 19:55
busy for ~30min now
xSnowpeltx
@xSnowpeltx
Oct 08 2016 19:56
yeah I did that.
im gonna try to change the buttons to divs and see if that does anything
xSnowpeltx
@xSnowpeltx
Oct 08 2016 20:08
turns out I needed to do function() { then call the function i made
Greg
@Gregb1609
Oct 08 2016 20:27
hey room, think I might be in the wrong place but wondered if anyone could help me with a JS floating point query... Im pulling my hair out here!! :smile:
A_A
@Otto-AA
Oct 08 2016 20:28
Maybe, what exactly do you want to do?
Greg
@Gregb1609
Oct 08 2016 20:29
output a typeof number to two decimal places regardless of what the decimal places value is
have tried toFixed, toPrecision multiplying and dividing by 100 casting with number() converting with parseFlaot
and variations of the above
any thoughts??
A_A
@Otto-AA
Oct 08 2016 20:31
so for instance if you have 1.2345 you want it to be 1.23?
Greg
@Gregb1609
Oct 08 2016 20:31
@Otto-AA that's the easy one, more if I have 1 I want it to be 1.00
A_A
@Otto-AA
Oct 08 2016 20:32
@Gregb1609 ah ok
Greg
@Gregb1609
Oct 08 2016 20:32
@Otto-AA that works with the divide round multiply
A_A
@Otto-AA
Oct 08 2016 20:32
let's give me a moment
Greg
@Gregb1609
Oct 08 2016 20:32
@Otto-AA Thanks in advance
CamperBot
@camperbot
Oct 08 2016 20:32
gregb1609 sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @otto-aa |http://www.freecodecamp.com/otto-aa
jgoldverg
@jgoldverg
Oct 08 2016 20:33
hey guys im really stuck on the weather api i dont know how to manipulate the json object here is my copepen any advice would be great
A_A
@Otto-AA
Oct 08 2016 20:34
@Gregb1609 well num.toFixed(2)works fine for me
Greg
@Gregb1609
Oct 08 2016 20:34
@Otto-AA but it returns a string not typeof number
@Otto-AA same with toPrecision
A_A
@Otto-AA
Oct 08 2016 20:35
@Gregb1609 ok, then wait another moment
^^
Greg
@Gregb1609
Oct 08 2016 20:36
@jgoldverg hi first thing I can notice is that you are calling a window to open your API URL. Try looking in to the getAJAX() (more complicated) or getJSON() methods. they are what you will want to use.
Greg
@Gregb1609
Oct 08 2016 20:38
@Otto-AA nope I have read that article and tried it out. It doesn't seem to work either.
A_A
@Otto-AA
Oct 08 2016 20:38
nevermind
I see...
but what do you need it for?
jgoldverg
@jgoldverg
Oct 08 2016 20:39
@Gregb1609 okay thanks a lot!
CamperBot
@camperbot
Oct 08 2016 20:39
:cookie: 296 | @gregb1609 |http://www.freecodecamp.com/gregb1609
jgoldverg sends brownie points to @gregb1609 :sparkles: :thumbsup: :sparkles:
Greg
@Gregb1609
Oct 08 2016 20:39
@jgoldverg no worries :+1:
@Otto-AA the exact change challenge
@Otto-AA it requires a returned array to two DP
A_A
@Otto-AA
Oct 08 2016 20:41
@Gregb1609 And I guess when it's a string it won't work?
Greg
@Gregb1609
Oct 08 2016 20:41
@Otto-AA right
A_A
@Otto-AA
Oct 08 2016 20:41
:/
Greg
@Gregb1609
Oct 08 2016 20:42
quite... I think I went passed that about lunchtime and am now closer to :fire:
@Otto-AA the joy of JS... :smile:
A_A
@Otto-AA
Oct 08 2016 20:43
@Gregb1609 Gonna do my twitch now ;P
Greg
@Gregb1609
Oct 08 2016 20:44
@Otto-AA lol, good luck!!
@Otto-AA thanks for the time...
CamperBot
@camperbot
Oct 08 2016 20:44
gregb1609 sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:warning: gregb1609 already gave otto-aa points
A_A
@Otto-AA
Oct 08 2016 20:47
@Gregb1609 Thanks too ;)
CamperBot
@camperbot
Oct 08 2016 20:47
otto-aa sends brownie points to @gregb1609 :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @gregb1609 |http://www.freecodecamp.com/gregb1609
Sinesaw
@Sinesaw
Oct 08 2016 20:54
Hello to everyone :)
A_A
@Otto-AA
Oct 08 2016 20:55
@Sinesaw Hi Sinesaw :)
Sinesaw
@Sinesaw
Oct 08 2016 20:55
Does someone else have issue with setting up bootstrap on codepen.io?
A_A
@Otto-AA
Oct 08 2016 20:56
@Sinesaw Settings -> CSS -> Quick-Add -> Bootstrap
Sinesaw
@Sinesaw
Oct 08 2016 20:57
seems to me that class affix and scroll do not work correctly..anyone have this issue?
A_A
@Otto-AA
Oct 08 2016 20:57
works for me
can you show me your codepen?
Sinesaw
@Sinesaw
Oct 08 2016 20:57
Sorry I did not express myself well enough...yes
I copied the code from w3schools..before that i tried everything and still wont work...so i copied the whole code from w3schools and it still does not work
the ul list should be displayed as nav-pills
A_A
@Otto-AA
Oct 08 2016 20:59
It seems like you didn't add bootstrap to your pen
GetBig33
@GetBig33
Oct 08 2016 21:00
hey guys so am starting this code pen okey I think am now lost on how to even start. so to my understanding am basically crearting something like the catApp thing right?
Sinesaw
@Sinesaw
Oct 08 2016 21:00
it was add but i removed it because in the code from w3schools they use older version and i tested it in notepad++,copied code and save as html..and it works..it does not work on the codepen..
Hello GetBig33
yes something Like that
GetBig33
@GetBig33
Oct 08 2016 21:01
hi @Sinesaw
A_A
@Otto-AA
Oct 08 2016 21:01
Cuty catty :)
Sinesaw
@Sinesaw
Oct 08 2016 21:01
You are building pages that can be viewed online immediately after save
GetBig33
@GetBig33
Oct 08 2016 21:02
@Sinesaw but this time making it what I want right
so not like cat App?
Sinesaw
@Sinesaw
Oct 08 2016 21:02
yes of course..you can experiment with everything you want but for the projects you must complete the check points..
GetBig33
@GetBig33
Oct 08 2016 21:02
ave watched this vid like 5 times lol
A_A
@Otto-AA
Oct 08 2016 21:02
@Sinesaw Can't help you then, I've never used bootstraps scrollspy, sry :/
Sinesaw
@Sinesaw
Oct 08 2016 21:03
oh...Well thank you any way A_A :D
i will find solution soon :D
GetBig33
@GetBig33
Oct 08 2016 21:03
@Sinesaw what checked projects may be am looking at something diff
Sinesaw
@Sinesaw
Oct 08 2016 21:04
where are you at the map now GetBig33?
@Sinesaw I accidentally closed the page how do I get back to codepen
A_A
@Otto-AA
Oct 08 2016 21:06
@GetBig33 Do you already have a person in mind?
GetBig33
@GetBig33
Oct 08 2016 21:07
me @Otto-AA hahahha
my self
omg how do I sign back into code pen
Sinesaw
@Sinesaw
Oct 08 2016 21:07
you can sign in with your github i think
GetBig33
@GetBig33
Oct 08 2016 21:10
okey am back in
so now what hahahha omg am alreay struggling
Sinesaw
@Sinesaw
Oct 08 2016 21:11
@GetBig33 start with viewing the example tribute page..but do not look at its code
GetBig33
@GetBig33
Oct 08 2016 21:11
@Sinesaw so new pen then
oke
yes :D new pen
GetBig33
@GetBig33
Oct 08 2016 21:12
omg
A_A
@Otto-AA
Oct 08 2016 21:12
then add Bootstrap: Settings -> CSS -> Quick-Add -> Bootstrap
GetBig33
@GetBig33
Oct 08 2016 21:12
so wer do I see my challenges
GetBig33
@GetBig33
Oct 08 2016 21:13
@Otto-AA am looking at that page and like huh
A_A
@Otto-AA
Oct 08 2016 21:14
@GetBig33 Yeah, it needs a bit to get used to but then codepen is really nice to work with ;)
GetBig33
@GetBig33
Oct 08 2016 21:15
@Otto-AA maybe I shud rest and come back fresh to it lol idk
am just here looking at the page
A_A
@Otto-AA
Oct 08 2016 21:16
Yeah, then better sleep over it :)
Sinesaw
@Sinesaw
Oct 08 2016 21:17
@GetBig33 Well don't be overwhelmed by it,take a break,but when you come back go step by step...just like in other challenges
A_A
@Otto-AA
Oct 08 2016 21:17
@Sinesaw :+1:
Sinesaw
@Sinesaw
Oct 08 2016 21:18
@GetBig33 they ask for this challenge to have images and links, do them one by one (preferably using the bootstrap :D because it will come in useful to know in future)
GetBig33
@GetBig33
Oct 08 2016 21:19
@Sinesaw so basically I can do it like cat app?
okey
Sinesaw
@Sinesaw
Oct 08 2016 21:20
Yes, you can make tribute to cats :D...humans freinds...or dogs..people best friend..gather few stories from internet and link them..image here and there,use the bootstrap grid layout to present them(if you remember the classes row and col-xs-number)
A_A
@Otto-AA
Oct 08 2016 21:23
Anyone has feedback for my Twitch-project?
http://codepen.io/A_A/pen/ZpxEoX
Sinesaw
@Sinesaw
Oct 08 2016 21:26
@Otto-AA it has nice layout but the background-color is not that great in my opinion
@Otto-AA Like the animation on hover as well
A_A
@Otto-AA
Oct 08 2016 21:26
@Sinesaw yeah, I wanted to make the reference to twitch but i guess I shouldn't do it this way O.o
Sinesaw
@Sinesaw
Oct 08 2016 21:27
@Otto-AA Maybe you can still use that color reference if you change the text and border colors
Got to go,have a nice evening everyone! :)
A_A
@Otto-AA
Oct 08 2016 21:28
@Sinesaw Maybe I'll try that tomorrow (or do homework and stuff :/ ) ;)
Bye
A_A
@Otto-AA
Oct 08 2016 21:36
@Sinesaw Found the solution for your scrollspy-problem: http://codepen.io/A_A/pen/ZpxQoV
The important part are the links in the HTML-Settings (and the CSS to make the page scrollable ^_^ )
Dhouglas Oaktree
@Dhouglas
Oct 08 2016 22:25
Hello guys, Can anyone help me add the scrolling feature to my page. Here is pen http://codepen.io/dhouglasc/pen/ZpxbxJ.
JD Tadlock
@jdtdesigns
Oct 08 2016 22:28
I'm starting the DevWar app if anyone wants to join in with coding or watching. https://ide.c9.io/jdtdesigns/devwar
JD Tadlock
@jdtdesigns
Oct 08 2016 22:33
if i don't add you to the project, please pm me to let me know you want to join
c0d0er
@c0d0er
Oct 08 2016 22:44
This message was deleted
hudsontaylor
@hudsontaylor
Oct 08 2016 23:05

I can't seem to access this object. Here is my code:

var input = $("input").val();
    var searchURL = "https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=" + input + "&callback=?";
    $.getJSON(searchURL, function(json) {
      var result = json.search;
      $(".well").html(JSON.stringify(result));

It works if just do "json", but not if I do something like "json[0]". Thanks!

hudsontaylor
@hudsontaylor
Oct 08 2016 23:12
Please help!
Walid Ashri
@walidashri
Oct 08 2016 23:17
@hudsontaylor $("input").val(); is this id or class or what?
hudsontaylor
@hudsontaylor
Oct 08 2016 23:18
That's not the problem. If I put "var result = json;" it works fine, and I get the whole object. But, I can't figure out how to access a specific part of the object.
GetBig33
@GetBig33
Oct 08 2016 23:25
alright guys am back at it ppl I need some help some to help me get a hang over this codepen beginning please right now am so blank
kat-mag
@kat-mag
Oct 08 2016 23:26
@hudsontaylor you can post your pen, we'll take a look. Because now it's basically fortune telling on what you did/didn't do ;d
@GetBig33 Huh, good luck ;D
Walid Ashri
@walidashri
Oct 08 2016 23:29
@hudsontaylor json.query.search[]
GetBig33
@GetBig33
Oct 08 2016 23:30
@kat-mag come kat I need some help here atleast a litle
hudsontaylor
@hudsontaylor
Oct 08 2016 23:34
Oh, thanks @walidashri! That worked perfectly!
CamperBot
@camperbot
Oct 08 2016 23:34
hudsontaylor sends brownie points to @walidashri :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @walidashri |http://www.freecodecamp.com/walidashri
kat-mag
@kat-mag
Oct 08 2016 23:34
need anything in particular, @GetBig33 ? Or I'm just supposed to tell you to get off the couch and code? ;d
GetBig33
@GetBig33
Oct 08 2016 23:37
hahahha am coding right now trying to get my footing on this page http://codepen.io/GetBig33/pen/qaokjq
this is what I have so far not sure if am on this right track
kat-mag
@kat-mag
Oct 08 2016 23:39
it's a start. Now go code ;D
GetBig33
@GetBig33
Oct 08 2016 23:40
i thot am coding
GetBig33
@GetBig33
Oct 08 2016 23:47
anyone else with a better explanation on how start and go about this that telling me go code?
kat-mag
@kat-mag
Oct 08 2016 23:50
Thought you were actually doing some project ;o
If you don't know how/what you want - I'd recommend pen & pencil & drawing out your layout/writing out ideas
GetBig33
@GetBig33
Oct 08 2016 23:52
i am starting one
using my name GetBig33 i know what i want in it i just need to figure out how to actually get this gng that's all
kat-mag
@kat-mag
Oct 08 2016 23:56
If you know what you want there just put it in some basic layout, so it's clear what you have to do next and what you still need. You can make it look fancy later