These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Jan 2017
Hello911
@Hello911
Jan 13 2017 00:06
http://codepen.io/Hello911/pen/ygOQwp?editors=1100 I have this problem with my welcome section of the web page. One, it is partially blocked by the navigation bar. Two, I want to make that section the height of the screen.
Francois van Leersum
@Blockshot12
Jan 13 2017 00:18
@Hello911 Your navbar is ‘blocking’ the header because your navbar position is fixed.
a couple of questions….why use flexbox if you already use bootstrap?
or why use bootstrap if you want to use flexbox?
Hello911
@Hello911
Jan 13 2017 00:31
@Blockshot12 I don't know alot about Bootstrap is so I might be kinda confused in its usage. How would you solved my problem though. I want the nav bar to be fixed when people scroll through the page. But I don;t wan it to block either.
Francois van Leersum
@Blockshot12
Jan 13 2017 00:41
@Hello911 You need to give the element containing ‘welcome’ and 'This is David’s portfolio page’ margin-top: 50px;or what ever height your navbar is.
@Hello911 But I’m looking at your code and I’m a little bit confused.
Coding Machine
@EphremL
Jan 13 2017 01:29
http://codepen.io/EphremL/details/WRxeBN/ pease tell how my navbar template looks
Nathan Parsons
@10milliondollarwebpage
Jan 13 2017 01:30
Hello my pen is not working when ever I use the position fixed element in css my header goes down instead of staying all the way at the top.
http://codepen.io/Unlawfulspoon/pen/MJegBK
Coding Machine
@EphremL
Jan 13 2017 01:32
use float position css elements @unlawfulspoonisback
Nathan Parsons
@10milliondollarwebpage
Jan 13 2017 01:34
what do you mean @EphremL
Coding Machine
@EphremL
Jan 13 2017 01:35
use css float postioning or ablolute to get accurate positioning
or make sure the order you write your html is good
Esera
@drakho
Jan 13 2017 02:10
@EphremL did you use css for that?
Coding Machine
@EphremL
Jan 13 2017 02:20
yes @drakho
Esera
@drakho
Jan 13 2017 02:23
@EphremL Got to get my CSS on.. if its not already obvious I'M a bnoob ☺...
Randy0927
@Randy0927
Jan 13 2017 02:53
how do i make a list be horizontal
aqsa-ayman
@aqsa-ayman
Jan 13 2017 03:12
i think you use display: inline; on your list
Randy0927
@Randy0927
Jan 13 2017 03:21
@aqsa-ayman thank you and how do you align a list vertical?
CamperBot
@camperbot
Jan 13 2017 03:21
randy0927 sends brownie points to @aqsa-ayman :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @aqsa-ayman |http://www.freecodecamp.com/aqsa-ayman
Paulo Tokimatu
@paulotokimatu
Jan 13 2017 03:22
@Randy0927 what do you mean?
Randy0927
@Randy0927
Jan 13 2017 03:24
i am trying to make a list that goes down and is straight all the way down
Paulo Tokimatu
@paulotokimatu
Jan 13 2017 03:25
can you send me your code pen? so I can understand better
Randy0927
@Randy0927
Jan 13 2017 03:27
it is ok i figured it out but thanks anyway @paulotokimatu
CamperBot
@camperbot
Jan 13 2017 03:27
randy0927 sends brownie points to @paulotokimatu :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @paulotokimatu |http://www.freecodecamp.com/paulotokimatu
Paulo Tokimatu
@paulotokimatu
Jan 13 2017 03:28
well, if you need anything else just ask
Randy0927
@Randy0927
Jan 13 2017 03:28
thanks
Linda Kovacs
@lindakovacs
Jan 13 2017 04:55

100DaysOfCode Day10: Working on my Portfolio as #FreeCodeCamp challenge, tomorrow I will have to fix back-to-top & active page. I feel excited for building this page for myself, otherwise I will never have it done.

https://lindakovacs.github.io/Linda-Kovacs-Portfolio/index.html
Stuart
@SAHarris
Jan 13 2017 04:55
Hi guys! Anybody finish the"Use the Twitchtv JSON API" since Twitch started requiring the the Client-ID in the API calls?
For making sections the height of the screen, use vw units: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_unit_vw
Chiu Yong
@chiuyong
Jan 13 2017 05:17
is there anybody here?
can somebody help me?
alpox
@alpox
Jan 13 2017 06:07
hey chiu, i would like to help you but again im having an exam in about an hour :/
sudarshan gupta
@sudarshan395
Jan 13 2017 06:18
can i combine this by anyway ???? var a = {"M1":{"Direction":"CW","Speed":"250"}}{"M2":{ "Direction" : "ACW", "3","Speed":120}};
Krikor Ailanjian
@kailanjian
Jan 13 2017 06:39
@SAHarris there is a guide in the problem prompt on how to do it without Client-ID
can anyone please have a look and let me know whats going wrong?
Megan
@megan32
Jan 13 2017 06:57
anyone know how to get the open weather API to work? I tried putting in my personal appid as people said in a variety of sources (github, forums, youtube), but still no luck....
kirbyedy
@kirbyedy
Jan 13 2017 06:58
which api is it ?
Karan Vyas
@karanpvyas
Jan 13 2017 06:58
@*
Coy Sanders
@coymeetsworld
Jan 13 2017 06:59
make sure the URL you use for openweather is http @megan32, and also that your codepen or wherever you're testing it is http as well
Coy Sanders
@coymeetsworld
Jan 13 2017 07:00
that appid is invalid, is that yours?
Megan
@megan32
Jan 13 2017 07:00
I'm not even to the point of testing. I click to open the link and it's a dead page
"{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}"
double check the appid was copied correctly, maybe you're missing a character
Megan
@megan32
Jan 13 2017 07:03
yeah, no luck
Ritvars
@RitvarsZ
Jan 13 2017 07:04
@SAHarris On the FCC's twitch api project page, look on the bottom, there is an alternate way of making requests without a client id
Coy Sanders
@coymeetsworld
Jan 13 2017 07:04
do you have to confirm your OpenWeather account in your email @megan32? I forget its been a while since i signed up for it
can you at least see my link working?
Megan
@megan32
Jan 13 2017 07:06
oh that is genius Thank you @coymeetsworld
CamperBot
@camperbot
Jan 13 2017 07:06
megan32 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1800 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jan 13 2017 07:06
which part? need to finish registering?
6thSen
@6thSen
Jan 13 2017 07:09
hi guys, I'm working on the weather app javascript. I'm trying to pass some values from a $.getJSON function to a global variable however, I'm not able to do so. Would really appreciate it if you could look over my code and tell me what I'm doing wrong.
var locationData = {
    city: "",
    country: ""
};

$.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?').done(function(location) {
        locationData = {
            city: location.city,
            country: location.country_code
        };
        console.log(locationData);
});
console.log(locationData);
vivekpadia70
@vivekpadia70
Jan 13 2017 07:09
anybody here knowing smallest common multiple??
Coy Sanders
@coymeetsworld
Jan 13 2017 07:10
@6thSen getJSON is an asynchronous function, you have to keep that in mind
Chiu Yong
@chiuyong
Jan 13 2017 07:10
hello
Coy Sanders
@coymeetsworld
Jan 13 2017 07:11
you have 2 console.log statements, but you cannot reliably determine which one will get executed first
vivekpadia70
@vivekpadia70
Jan 13 2017 07:12

function smallestCommons(arr) {
  arr = arr.sort();
  function lcm(a,b){
    c = b/a;
    if(c === parseInt(c, 10)){
      return b;
    }
    else return a*b;
  }
  var total=arr[1];
  for(var i=arr[1]; i>=arr[0]; i--){
    if(i == 1)
      break;
    var c = lcm(i-1, total);
    total = c;
  }
  console.log(total);
  return total;
}


smallestCommons([1,5]);
it doesn't pass all the queries
6thSen
@6thSen
Jan 13 2017 07:13
@coymeetsworld I'm sorry I'm not quite sure what that means. I'll have to look up what an asynchronous function means.
Megan
@megan32
Jan 13 2017 07:13
@coymeetsworld sorry, yeah had to click through links in the email
Coy Sanders
@coymeetsworld
Jan 13 2017 07:13
@6thSen look it up, its an important concept
Chiu Yong
@chiuyong
Jan 13 2017 07:13
I need someone to help me with bootstrap
Coy Sanders
@coymeetsworld
Jan 13 2017 07:14
especially since a majority of projects now deal with some sort of API, especially in the DataVis section
one thing to think about is not having global variables, those are bad in practice anyways
6thSen
@6thSen
Jan 13 2017 07:15
thanks @coymeetsworld for the heads up!
CamperBot
@camperbot
Jan 13 2017 07:15
6thsen sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1801 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jan 13 2017 07:15
no problem @6thSen good luck with it
badalsaibo
@heyDante
Jan 13 2017 07:17
@chiuyong Yes elaborate
Chiu Yong
@chiuyong
Jan 13 2017 07:21
@heyDante Private
badalsaibo
@heyDante
Jan 13 2017 07:35
@chiuyong ???
Dinesh
@dinesh333
Jan 13 2017 08:02
Hey guys how does my pseudo-tribute page for queen look?
http://codepen.io/dinesh333/full/wgBgRQ/
badalsaibo
@heyDante
Jan 13 2017 08:06
@dinesh333 Looks great.
Kha Nguyen
@Reservations
Jan 13 2017 08:07
@dinesh333 Love it.
Dinesh
@dinesh333
Jan 13 2017 08:12
Thanks guys!! One to the portfolio now. Looks much much harder.
Kha Nguyen
@Reservations
Jan 13 2017 08:13
@dinesh333 Same. Portfolio looks super clean.
Dinesh
@dinesh333
Jan 13 2017 08:14
Haha I meant on** to the fortfolio now.. The 2nd project in front-end-beginner series.. from the example shown, it looks pretty complicated.
Kha Nguyen
@Reservations
Jan 13 2017 08:15
@dinesh333 Yes, same here haha. I mean't that the example portfolio they gave looks super clean and nice visually.
DarylKnapp
@DarylKnapp
Jan 13 2017 08:15

Can anyone tell me for some reason why my font on my page font change color at all?

Here's my CSS for my Nav

.navbar {
background-color: #161920;
font-family: 'Oswald', sans-serif;
color: rgb(46,81,88);
text-transform: uppercase;
font-weight: 700;

Dinesh
@dinesh333
Jan 13 2017 08:16
Ahh. got you.. yea.. I would be stoked if I could build something like that.. Lets see. Looking forward to work on it during the weekend.
kirbyedy
@kirbyedy
Jan 13 2017 08:35
@DarylKnapp your font should have this color: color: rgb(46,81,88);
DarylKnapp
@DarylKnapp
Jan 13 2017 08:36
@kirbyedy Still not working its for the font on my nav bar..
kirbyedy
@kirbyedy
Jan 13 2017 08:37
link your pen
DarylKnapp
@DarylKnapp
Jan 13 2017 08:37
@kirbyedy i dont use pen sorry.
Alexeggers
@Alexeggers
Jan 13 2017 08:58
Hey guys, I'm having an odd problem. I am trying to truly center my main container on the page. Ive tried using flexbox as well as top 50% left 50% transform (-50% -50%) and nothing works. When I try it using an html file on my computer, it works just fine.
Is this an issue with codepen?
kirbyedy
@kirbyedy
Jan 13 2017 09:03
did you try with margin auto?
Alexeggers
@Alexeggers
Jan 13 2017 09:04
i did, but I seem to have found the problem
for some reason, I need to set the parent container to "position absolute" in codepen
oh margin auto is ALSO required
without that, it never leaves the top left corner
without position absolute it stays at the top
shreyas23sk
@shreyas23sk
Jan 13 2017 09:34
I somebody here?
Alexeggers
@Alexeggers
Jan 13 2017 09:34
@shreyas23sk whats the problem?
shreyas23sk
@shreyas23sk
Jan 13 2017 09:35
can somebody tell me why isnt it logging the data or sending the get request
@Alexeggers it isnt sending the request, i think
Alexeggers
@Alexeggers
Jan 13 2017 09:36
this is a security feature of https. You cannot send cross site requests via http if you are on https
shreyas23sk
@shreyas23sk
Jan 13 2017 09:36
oh
How do i fix that
Alexeggers
@Alexeggers
Jan 13 2017 09:36
Either find an API that allows https requests, or use http yourself.
Only problem is, if you are using chrome, you can't use the navigator geolocation on http
So I would advise to use an IP locator instead
shreyas23sk
@shreyas23sk
Jan 13 2017 09:37
ok, thanks
thanks @Alexeggers
CamperBot
@camperbot
Jan 13 2017 09:37
:cookie: 215 | @alexeggers |http://www.freecodecamp.com/alexeggers
shreyas23sk sends brownie points to @alexeggers :sparkles: :thumbsup: :sparkles:
Alexeggers
@Alexeggers
Jan 13 2017 09:37
no problem :)
Alexeggers
@Alexeggers
Jan 13 2017 09:43

@shreyas23sk Just a side note, if you want to dive deeper into JS, I would recommend you use Promises to make API requests. Take a look at these 3 links:

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
https://promisesaplus.com/
http://codeheaven.io/how-to-use-axios-as-your-http-client/

shreyas23sk
@shreyas23sk
Jan 13 2017 09:46
<code> Thanks</code>
Alexeggers
@Alexeggers
Jan 13 2017 09:48
no worries
artjia
@artjia
Jan 13 2017 09:58
guys, can someone take a look at my code http://codepen.io/artjia/pen/GrqpPg I don't understand why when I click the button, #content are change for 1 sec and then gone again
Alexeggers
@Alexeggers
Jan 13 2017 10:01
Your button is nested in a <form> element. By default, form opens a new page. The content doesn't change back, you just load a new page
artjia
@artjia
Jan 13 2017 10:02
thanks man @Alexeggers
CamperBot
@camperbot
Jan 13 2017 10:02
artjia sends brownie points to @alexeggers :sparkles: :thumbsup: :sparkles:
:cookie: 216 | @alexeggers |http://www.freecodecamp.com/alexeggers
Alexeggers
@Alexeggers
Jan 13 2017 10:02
@artjia No worries
Alexeggers
@Alexeggers
Jan 13 2017 11:01
Looks impressive!
beimnet
@beimnetfatgithub
Jan 13 2017 11:01
hey guys...how can i store pics on codepen for free?.....or is there any other way of accessing my resources?.....help me pls....:)
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:02
embed the pic in your html/js by base64 encoded uri
beimnet
@beimnetfatgithub
Jan 13 2017 11:03
u mean no need to load resource first?
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:04
maybe read what base64 encoded uri is
the resource is embedded in your html or code
beimnet
@beimnetfatgithub
Jan 13 2017 11:04
k....thank u
i will read on that
Alexeggers
@Alexeggers
Jan 13 2017 11:05
@jacobus-brogly but you still need somewhere where it's stored right? AFAIK codepen doesn't allow storing assets without the pro version
or am I misunderstanding base64 uri
I think he asked how to include his own images in his codepen code
beimnet
@beimnetfatgithub
Jan 13 2017 11:16
no.....i know to do that.....but i need to store my asset first....right?....but couldnt afford the pro version....so what i am saying is is there any other method of storing my asset?
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:16
@Alexeggers you didnt read it right?
"embedded"
Alexeggers
@Alexeggers
Jan 13 2017 11:17
@jacobus-brogly I did. If I understand it correctly, it is a way to create a uri to data as though it was an external resource. But his data needs to be hosted somewhere. That is the issue here
Correct me if I'm wrong
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:17
you are wrong
Ajith
@ajithvallabai
Jan 13 2017 11:17
hi guys i dont know why Digitadd() function is not geting executed in this pen (i have linked the function for the number 1) .this is my pen http://codepen.io/indian46/pen/egZKMz
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:17
the data is embedded in your html directly, because there is no external uri?
Alexeggers
@Alexeggers
Jan 13 2017 11:18
Ah I was googling imprecisely. I get what you mean now!
jacobus-brogly
@jacobus-brogly
Jan 13 2017 11:18
@Alexeggers there are many examples???
Alexeggers
@Alexeggers
Jan 13 2017 11:18
That's a pretty cool feature
Cristian Polycarpou
@OmniPoly
Jan 13 2017 11:18
hey guys
How would i set my paragraph text to not stretch across the entire screen?
Alexeggers
@Alexeggers
Jan 13 2017 11:19
@OmniPoly Hi
I would probably nest it in a div and give that div a max-width
Ajith
@ajithvallabai
Jan 13 2017 11:19
Cristian Polycarpou
@OmniPoly
Jan 13 2017 11:20
ahh ok xs-6-?.. .how do you do it again
@Alexeggers
Robert Purcea
@RobertPurcea
Jan 13 2017 11:51
here is a really nice loading screen I found on a tutorial, added some new little features as well
Muhammad Hasham
@MohammadHasham
Jan 13 2017 11:52
Can anyone help me with simon says game?
Robert Purcea
@RobertPurcea
Jan 13 2017 11:54
@MohammadHasham I made a month ago what is your problem
made it*
Muhammad Hasham
@MohammadHasham
Jan 13 2017 11:54
how can i make the color highlight
green,light and blue
@Robertb4
Robert Purcea
@RobertPurcea
Jan 13 2017 11:55
either modify the opacity
or add new colors on highlight
Muhammad Hasham
@MohammadHasham
Jan 13 2017 11:56
but how i'll make that to return to old state back once it has been highlighted
@Robertb4
give it a look
Muhammad Hasham
@MohammadHasham
Jan 13 2017 11:57
can you just tell me that! actually i don't want to dwell in the code before i finish it.
i just want to know that how do you return to back to original stage once highlighted?
@Robertb4
Robert Purcea
@RobertPurcea
Jan 13 2017 12:00
everytime a button is pressed, add a class that defines the background color you want on button press
As soon as the button is not pressed anymore, remove that class
@MohammadHasham
Muhammad Hasham
@MohammadHasham
Jan 13 2017 12:00
@Robertb4 Thanks i'll look forward to it.
CamperBot
@camperbot
Jan 13 2017 12:00
mohammadhasham sends brownie points to @robertb4 :sparkles: :thumbsup: :sparkles:
:cookie: 310 | @robertb4 |http://www.freecodecamp.com/robertb4
Robert Purcea
@RobertPurcea
Jan 13 2017 12:00
no problem
Muhammad Hasham
@MohammadHasham
Jan 13 2017 12:18
@Robertb4 can you help me with this code snippet
function callColor(counter) {
  var value = counter;
    while (value!=0){
      var x = Math.floor((Math.random()*4)+1); /**Any number generated between 1 to 4**/

      value--;
    }
  }
why is it giving 'unexpected token error'
tptynlr
@tptynlr
Jan 13 2017 12:33

//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{
"firstName": "Harry",
"lastName": "Potter",
"number": "0994372684",
"likes": ["Hogwarts", "Magic", "Hagrid"]
},
{
"firstName": "Sherlock",
"lastName": "Holmes",
"number": "0487345643",
"likes": ["Intriguing Cases", "Violin"]
},
{
"firstName": "Kristian",
"lastName": "Vos",
"number": "unknown",
"likes": ["Javascript", "Gaming", "Foxes"]
}
];

function lookUpProfile(firstName, prop){
for( var i=0; i < contacts.length; i++){
if(contacts[i].firstName==firstName && contacts[i].hasOwnProperty(prop)){
x= contacts[i].prop;
return x;
}

}
return "No such property";

}

// Change these values to test your function
lookUpProfile("Harry", "likes");
example:"Sherlock", "likes" should return ["Intriguing Cases", "Violin"]

i am not getting the output.can u please pinpoint where is the error in my code?
Robert Purcea
@RobertPurcea
Jan 13 2017 12:36
@MohammadHasham still have problems?
you need to explain a bit more what you are trying to do there
it would be better btw, if you would just use the counter variable, and not assign it to value
Ken Haduch
@khaduch
Jan 13 2017 13:00
@tptynlr - did you get help with this? Not sure if you cross-posted in another chat room, since it has been 30 minutes?
@tptynlr - if you haven't figured it out, let me know.
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:34
guys any feed back on the weather app design
need any feedback
probably ill need to implement this !
Christopher Ryder
@cryder9898
Jan 13 2017 13:39
has anyone completed the twitch project using the clientId?
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:41
which api do i use for the weather app
any links would be helpfull
@shenoyabhijith http://openweathermap.org
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:43
how do i determine the location of the person'
?
@MacGuffin1990
Ajith
@ajithvallabai
Jan 13 2017 13:43
could anyone help me with calculator
in js
MacGuffin
@MacGuffin1990
Jan 13 2017 13:44
By city id or navigator.geolocation
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:44
okay
MacGuffin
@MacGuffin1990
Jan 13 2017 13:44
u need a api key
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:44
i need to do some research on it before implementing
@MacGuffin1990 thanks for helping out
CamperBot
@camperbot
Jan 13 2017 13:45
shenoyabhijith sends brownie points to @macguffin1990 :sparkles: :thumbsup: :sparkles:
:cookie: 255 | @macguffin1990 |http://www.freecodecamp.com/macguffin1990
Christopher Ryder
@cryder9898
Jan 13 2017 13:45
@ajithvallabai using navigator.geolocation might not work to find your location
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:45
how do i find location then
@cryder9898
Ajith
@ajithvallabai
Jan 13 2017 13:45
@cryder9898 i am designing calculator
Christopher Ryder
@cryder9898
Jan 13 2017 13:48
oh sorry :smile:
MacGuffin
@MacGuffin1990
Jan 13 2017 13:48
@cryder9898 i also want to know how to find my location
Christopher Ryder
@cryder9898
Jan 13 2017 13:48
I used weather underground api for my project
it lets you look up your location using 'http://api.wunderground.com/api/" + apiKey + "/geolookup/q/autoip.json'
MacGuffin
@MacGuffin1990
Jan 13 2017 13:50
@ajithvallabai listen to @cryder9898
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:50
@MacGuffin1990 which api is better to use
and beginner friendly
Christopher Ryder
@cryder9898
Jan 13 2017 13:51
@MacGuffin1990 so openweathermap doesnt use https
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:52
@cryder9898
MacGuffin
@MacGuffin1990
Jan 13 2017 13:52
i also have a problem with the weather app
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:52
any suggestions
Christopher Ryder
@cryder9898
Jan 13 2017 13:52
with [weatherunderground] (https://www.wunderground.com/) you can use https and the apis are equal in understanding
Ajith
@ajithvallabai
Jan 13 2017 13:55
@cryder9898 i dont know how to link the Digitadd() function with button 1 (html code) could you help me . http://codepen.io/indian46/pen/egZKMz
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:56
@cryder9898 the api is not free
you get only 500 calls
Christopher Ryder
@cryder9898
Jan 13 2017 13:56
I can show you my code for the weather app https://codepen.io/cryder9898/pen/zNOgxd
@shenoyabhijith 500 calls per day
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:58
ohh !
Christopher Ryder
@cryder9898
Jan 13 2017 13:58
@shenoyabhijith I dont see myself making more than that! :smile:
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:59
hehe if you wanna post it as a domain in the future
Christopher Ryder
@cryder9898
Jan 13 2017 13:59
@shenoyabhijith and it does the geolocation for you
abhijith shenoy
@shenoyabhijith
Jan 13 2017 13:59
okay ill use api
Christopher Ryder
@cryder9898
Jan 13 2017 14:00
@ajithvallabai I haven't done the calculator yet.. this twitch project is consuming all of my time
Ajith
@ajithvallabai
Jan 13 2017 14:02
@cryder9898 i skipped it :smile:
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:04
@cryder9898 ua weather api not showing temparature properly
check out
Christopher Ryder
@cryder9898
Jan 13 2017 14:05
mine? It shows the temp where I am
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:05
its showing 0degree for me
i dont know!
Christopher Ryder
@cryder9898
Jan 13 2017 14:06
@shenoyabhijith is it cold where you are :smile:
I think a lot of our problems are with codepen itself
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:06
the place where i live temperature never goes below 21 degree
Christopher Ryder
@cryder9898
Jan 13 2017 14:07
I switched over to using my localhost and publishing on github pages
Everything flows a lot better now
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:09
okay @cryder9898 how do you easy push ua codepen code to git hub
is there a easier way
Christopher Ryder
@cryder9898
Jan 13 2017 14:10
I havent transfered my codepens to github yet
@shenoyabhijith I read you can download your codepens to your machine and then do it that way, but I havent tried. When I started working on the twitch app I just started fresh with git and github
once I figured it out, its a lot faster
or you can copy paste the html to html file, css to cssfile and js to js file @shenoyabhijith
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:13
if ua using a ide i think u can develop much faster
yeah but the links which we add to jquery and boostrap
if ua using scss
again its a pain in the ass
@cryder9898
Christopher Ryder
@cryder9898
Jan 13 2017 14:14
@shenoyabhijith right you have to add the links and scripts and all that jazz
@shenoyabhijith thats the way it is, if we were at a job, we'd probably be using sublime text and browser for debugging, git for version control and using command line
abhijith shenoy
@shenoyabhijith
Jan 13 2017 14:16
freecodecamp advices you to use codepen
i use visual studio code
i got it recently !
Rahul Yedida
@yrahul3910
Jan 13 2017 14:21
Does simply reloading the page count as resetting the game in the projects?
@ajithvallabai For adding digits to the box I simply added the text of the button to the text box
@ajithvallabai I added all number buttons (except 0) to a class called number, and then simply handled the $('.number') click event
$(this).text() will give you the digit on the button.
Francesco Lippolis
@flipps-dev
Jan 13 2017 14:29
hello, someone knows how could i use a mine json file on codepen?
Ajith
@ajithvallabai
Jan 13 2017 14:31
thanks @yrahul3910 will work over that method
CamperBot
@camperbot
Jan 13 2017 14:31
:cookie: 4 | @yrahul3910 |http://www.freecodecamp.com/yrahul3910
ajithvallabai sends brownie points to @yrahul3910 :sparkles: :thumbsup: :sparkles:
Clyde Lobo
@oppiniated
Jan 13 2017 14:31
@flippss create a pen and add the json in the js section
Then use the link of the pen, append a .js to get the file eg, pen: http://codepen.io/timivey/pen/emQZYY, js file link http://codepen.io/timivey/pen/emQZYY.js
Francesco Lippolis
@flipps-dev
Jan 13 2017 14:38
@oppiniated goes the link in my project's js section or in the setting options?
Rahul Yedida
@yrahul3910
Jan 13 2017 14:39
@flippss Use the settings for that. There are some libraries like jQuery and Bootstrap that you can add from a drop-down too
Francesco Lippolis
@flipps-dev
Jan 13 2017 14:42
@oppiniated @yrahul3910 ok thanks now i try
CamperBot
@camperbot
Jan 13 2017 14:42
flippss sends brownie points to @oppiniated and @yrahul3910 :sparkles: :thumbsup: :sparkles:
:cookie: 499 | @oppiniated |http://www.freecodecamp.com/oppiniated
:cookie: 5 | @yrahul3910 |http://www.freecodecamp.com/yrahul3910
Andrew
@Aalis
Jan 13 2017 14:47
when i resize my page to mobile view the navbar brand is overlaping content below. how should i fix it? http://codepen.io/aalis/pen/egmmeW/
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 14:48
So I'm doing Simon Game and I have a doubt.
I used :active to make sure the color of divs changed when clicked on and then I used this function
```
 function startpattern(){
 var value = arr[Math.floor(Math.random() * arr.length)];
  $("."+value).click();
ehutchllew
@ehutchllew
Jan 13 2017 14:48
Hey all, quick question. I thought in my example here, that since I first stylized the ID, and later the Class, that the class would supersede the ID style:
#strict{
  color: #c1c1bf;
  background-color: #63625e;
}
#strict:hover{
  color: #f9f9f7;
  background-color: #424240;
}

.strictOn{
  color: #2e5100;
  background-color: #90ff00;
  box-shadow: 0px 0px 7px 2px #76ff00;
}
but it's still showing the #strict background color.
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 14:48
For telling javascript to click on div.
But the color won't change or it won't click.
The function executes but I don't see the click happening.
Rahul Yedida
@yrahul3910
Jan 13 2017 14:49
@ehutchllew I think it's what comes first that's given more importance
Clyde Lobo
@oppiniated
Jan 13 2017 14:49
@thenerdyouknow Whaaat?
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 14:50
@oppiniated The click won't register or you can't see it when you click start even though in CSS I've used the :active selector to make sure divs change color when clicked.
Why?
ehutchllew
@ehutchllew
Jan 13 2017 14:53
@yrahul3910 really? I thought it was the other way around.
Rahul Yedida
@yrahul3910
Jan 13 2017 14:55
Sorry, it is the other way around
If the element has both the class and the ID then try #id.class
ehutchllew
@ehutchllew
Jan 13 2017 14:56
@yrahul3910 Lemme give that a try
@yrahul3910 that worked! Thank You!
CamperBot
@camperbot
Jan 13 2017 14:57
ehutchllew sends brownie points to @yrahul3910 :sparkles: :thumbsup: :sparkles:
:cookie: 6 | @yrahul3910 |http://www.freecodecamp.com/yrahul3910
Rahul Yedida
@yrahul3910
Jan 13 2017 14:57
Welcome :)
@thenerdyouknow How did you design the board for the tic tac toe game?
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 14:59
@yrahul3910 Use the table format.
If you try to use divs they'll break when you place X's and O's in them.
Marios Papamanolis
@Papamakis
Jan 13 2017 14:59
hey guys i am new here!!
Ken Haduch
@khaduch
Jan 13 2017 15:00
@Papamakis - welcome!
Rahul Yedida
@yrahul3910
Jan 13 2017 15:00
@thenerdyouknow Ah, I see. Thanks :)
CamperBot
@camperbot
Jan 13 2017 15:00
yrahul3910 sends brownie points to @thenerdyouknow :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @thenerdyouknow |http://www.freecodecamp.com/thenerdyouknow
Marios Papamanolis
@Papamakis
Jan 13 2017 15:02
thank you ! @khaduch i have a question to make do i need here on portofolio project to build it all by my self or can i look the code of the example ?
CamperBot
@camperbot
Jan 13 2017 15:02
papamakis sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2265 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jan 13 2017 15:02
@Papamakis - I think that they tell you to figure it out without looking at the code that the example uses.
@Papamakis - however, you can look at other code sources, because essentially that's what you have to do to learn. I found the theme examples on http://w3schools.com/bootstrap to be really helpful to get my bearings on how to set up a page like that - they walk you through design and implementation of a page using bootstrap. It is a good foundation to have in learning a technique to set it up.
Rahul Yedida
@yrahul3910
Jan 13 2017 15:04
@Papamakis For projects you're supposed to do it on your own. If you're stuck, search on Google, read docs from MDN (Mozilla Developer Network), and if you're still stuck, come and ask here :)
Marios Papamanolis
@Papamakis
Jan 13 2017 15:05
Thanks appreciated for your help !! :)
Ken Haduch
@khaduch
Jan 13 2017 15:07
@Papamakis - and the bootstrap lessons on w3schools are useful for getting more detail than the freecodecamp lessons provide. It is a useful resource, I would say. Good luck, and as @yrahul3910 said, do some work on your own, it's the best way to start, and come here with questions!
Rahul Yedida
@yrahul3910
Jan 13 2017 15:08
@Papamakis I've found that while Googling on your own and reading stuff on Stack Overflow or MDN, you learn things they don't teach here, and that's really valuable :)
tptynlr
@tptynlr
Jan 13 2017 15:28
@khaduch got it
Ken Haduch
@khaduch
Jan 13 2017 15:28
@tptynlr - ok, good!
Andrew
@Aalis
Jan 13 2017 15:31
when i resize my page to mobile view the navbar brand is overlaping content below. how should i fix it? http://codepen.io/aalis/pen/egmmeW/
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 15:33
@Aalis Have you tried setting min-width to your navbar?
@Aalis Doing that usually stop it from getting smaller after a certain point.
mazury
@mazury
Jan 13 2017 16:03
Hi guys, anybody knows why fading in doesn't work here ? http://codepen.io/Adam92/pen/MJeWjp?editors=1011
Tyler Moeller
@TylerMoeller
Jan 13 2017 16:05
@adamgithub92 You have to hide the element first to fade it in. For example:
$('#quote').hide().html(json.quoteText).fadeIn(2000);
mazury
@mazury
Jan 13 2017 16:06
aah, i see, thanks @TylerMoeller
CamperBot
@camperbot
Jan 13 2017 16:06
adamgithub92 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1308 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
badalsaibo
@heyDante
Jan 13 2017 16:07
@TylerMoeller That helped me too. Thanks
CamperBot
@camperbot
Jan 13 2017 16:07
heydante sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1309 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Jan 13 2017 16:07
No problem :+1:
Sung Guk Lee
@katsuya245126
Jan 13 2017 16:16
Is it okay to copy and paste some info for the Build a Tribute Page or do I have to write everything myself?
Frank
@Frankbono
Jan 13 2017 16:16
Can anyone look at my code and see what I did wrong. I stumped here

var count = 0;

function cc(card) {
  // Only change code below this line
  var action = "";

  switch(card) {

      case 2: 
      case 3:
      case 4:
      case 5:
      case 6:
      count += 1;
      break;   

      case 7:
      case 8:
      case 9:
      count += 0;

      break;
      case 10:
      case "J":
      case "Q":
      case "K":
      case "A":
      count -= 1;


      if (count > 0) {
        action = count + " Bet";
      } else if (count >= 0) {
        action = count + " Hold";
      }
  }


  return action;
  // Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
It's for the "Counting Cards" exercise in Javascript https://www.freecodecamp.com/challenges/counting-cards
MaxLAB
@Max-LAB
Jan 13 2017 16:18
@Frankbono you dont need this part
      case 7:
      case 8:
      case 9:
      count += 0;
      break;
Frank
@Frankbono
Jan 13 2017 16:19
@Max-LAB I removed that but doesn't fix the code
MaxLAB
@Max-LAB
Jan 13 2017 16:21
@Frankbono also you dont need else if in here just put else
Frank
@Frankbono
Jan 13 2017 16:22
@Max-LAB I removed it and now it's working better but not all the arguments check off on the project. 3 out of 7 are still in the red
MaxLAB
@Max-LAB
Jan 13 2017 16:23
@Frankbono dont return action at the end, return it inside if and else
Tyler Moeller
@TylerMoeller
Jan 13 2017 16:25
(And if/else goes outside the switch statement)
Jason Luboff
@JLuboff
Jan 13 2017 16:26
@Frankbono as @TylerMoeller mentioned, you need to close your switch statement prior to your if/else statement
Frank
@Frankbono
Jan 13 2017 16:26
NIce! it worked
Tyler Moeller
@TylerMoeller
Jan 13 2017 16:26
@katsuya245126 All of your code has to be written by you, except for libraries you use: https://www.freecodecamp.com/academic-honesty
Frank
@Frankbono
Jan 13 2017 16:26
@Max-LAB Thank you for your help!
CamperBot
@camperbot
Jan 13 2017 16:26
frankbono sends brownie points to @max-lab :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @max-lab |http://www.freecodecamp.com/max-lab
Frank
@Frankbono
Jan 13 2017 16:27
@TylerMoeller Thank you for your help!
CamperBot
@camperbot
Jan 13 2017 16:27
frankbono sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1310 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
MaxLAB
@Max-LAB
Jan 13 2017 16:27
@Frankbono :+1:
can someone tell me why arentmy font awesome icons showing up
JD Tadlock
@jdtdesigns
Jan 13 2017 17:58
@sennator2 Also, there's no reason to use a no-conflict function --> jQuery(function($){}), especially when right above you're using the standard $.getJSON. Just create one function that uses $.getJSON() to get quote. I noticed you're using divs to hold text. Divs should only be used to 'contain' children elements or represent a shape or background, not for text. You could just add a paragraph and span element inside the quote area div and then place the api response into those two elements in the js. ;)
Ken Haduch
@khaduch
Jan 13 2017 18:01
@sennator2 - it looks like they are showing up - did you make a change? Although I don't see any text or symbol on your buttons - is that where you are having a problem?
@sennator2 - oh, wait, I see what it is. You are writing over your quote-area and that is clobbering the icons that you are putting in there. You should just make your quote-area a separate div within a div that has the quotes (the font-awesome quotes) And I see that @jdtdesigns addressed these things, I just had to read it... :)
Philipp Scholz
@philipp32
Jan 13 2017 18:13

I want to make one picture disappear and another one appear.

  $('sunny-day').style.display = "none";
   $('night').style.removeAttribute("display");

This is my code. Why doesn't it work?

JD Tadlock
@jdtdesigns
Jan 13 2017 18:22
@philipp32 You're selecting sunny-day and night without using the class or id selector. It would need to be $('.sunny-day') for a class and $('#sunny-day') for an id.
Philipp Scholz
@philipp32
Jan 13 2017 18:22
@jdtdesigns Already figured that out on my own. But thank you anyways. :)
CamperBot
@camperbot
Jan 13 2017 18:22
philipp32 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 845 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
sennator
@sennator2
Jan 13 2017 18:22
@khaduch @jdtdesigns thanks for your reply guys
CamperBot
@camperbot
Jan 13 2017 18:22
sennator2 sends brownie points to @khaduch and @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 2268 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 846 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
sennator
@sennator2
Jan 13 2017 18:23
i made some adjustments and now it works
Philipp Scholz
@philipp32
Jan 13 2017 18:23
var currentTime = new Date(),
      hours = currentTime.getHours(),
      minutes = currentTime.getMinutes();

    if (minutes < 10) {
     minutes = "0" + minutes;
  }
     window.time = hours + ":" + minutes;    
   var timeAndDateOutput= $('#time-date-output');
   timeAndDateOutput.html(time + " | " + date);
This is my function for getting the system time. I want to make the hours variable global. I tried using window.hours. Resulted in an error. I' ve tried moving it about var. Didn't work.
sennator
@sennator2
Jan 13 2017 18:24
@jdtdesigns didn't know that about divs. I will stick to your recomendation from now on
about jQuery stuff i litteraly dont have a clue what i m doing just trying to make it work :D
CamperBot
@camperbot
Jan 13 2017 18:24
you need to ask about @someone!
JD Tadlock
@jdtdesigns
Jan 13 2017 18:25
@philipp32 Post your pen and i can give you some ideas
Philipp Scholz
@philipp32
Jan 13 2017 18:26
r2d2
@UsamaHameed
Jan 13 2017 18:38
@philipp32 define the hours variable above all the code. This way, it will be available to everything below and thus it will be global
aqsa-ayman
@aqsa-ayman
Jan 13 2017 18:52
hi guys, would anyone mind checking my twitch viewer? I'm nearly done, just trying to add a logo to each profile but not all of them are displaying
Rahul Yedida
@yrahul3910
Jan 13 2017 18:56
Does the AI for the Tic Tac Toe game have to be unbeatable or can it be a random disaster?
Tom
@moT01
Jan 13 2017 18:57
@yrahul3910 doesn't say in the user stories
but it would be nice if it had a little something probly right
Rahul Yedida
@yrahul3910
Jan 13 2017 18:58
Yeah
Tom
@moT01
Jan 13 2017 18:59
@aqsa-ayman i didn't look at the code, but it seems to all be working
Michael Pope
@popemray00
Jan 13 2017 18:59
http://codepen.io/popemray/pen/rjLOxw?editors=1010 can anyone help me figure out how to make the quotes pre populate so when you share it will be added
aqsa-ayman
@aqsa-ayman
Jan 13 2017 18:59
hmm thanks @moT01
CamperBot
@camperbot
Jan 13 2017 18:59
:cookie: 458 | @mot01 |http://www.freecodecamp.com/mot01
aqsa-ayman sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
aqsa-ayman
@aqsa-ayman
Jan 13 2017 18:59
it's odd
every time i refresh a different number work
as in the profiles that display their logo
Tyler Moeller
@TylerMoeller
Jan 13 2017 19:00
@aqsa-ayman You're making your second .ajax call at the same time as the first, and sometimes the second one finishes before the first. In that case, there is no element to prepend to yet. Move your second ajax call into the success function of the first one to fix this.
aqsa-ayman
@aqsa-ayman
Jan 13 2017 19:02
that worked perfectly
@TylerMoeller thank you so much!
CamperBot
@camperbot
Jan 13 2017 19:02
aqsa-ayman sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1311 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tom
@moT01
Jan 13 2017 19:02
@popemray00 call getquote() in the code before your button click
i think
Tyler Moeller
@TylerMoeller
Jan 13 2017 19:03
No problem - nice work so far @aqsa-ayman
lol @popemray00 love your quotes
Michael Pope
@popemray00
Jan 13 2017 19:05
hahaha ya I quote them all the time
Tom
@moT01
Jan 13 2017 19:21
alright, im looking for some testers for my simon game...
http://codepen.io/moT01/pen/jyqrNr
i set it to 5 turns wins for now, let me know when you find a bug
Reggie
@Reggie01
Jan 13 2017 19:31
@moT01 Tried the game in both modes Strict/ Non- Strict. The game works, no bugs found.
Tom
@moT01
Jan 13 2017 19:32
thats good news, thanks @Reggie01
CamperBot
@camperbot
Jan 13 2017 19:32
mot01 sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:cookie: 380 | @reggie01 |http://www.freecodecamp.com/reggie01
aqsa-ayman
@aqsa-ayman
Jan 13 2017 19:50
works just fine for me as well
nicely done
Tom
@moT01
Jan 13 2017 20:00
@aqsa-ayman thanks, yea i think it turned out pretty good
CamperBot
@camperbot
Jan 13 2017 20:00
mot01 sends brownie points to @aqsa-ayman :sparkles: :thumbsup: :sparkles:
:cookie: 327 | @aqsa-ayman |http://www.freecodecamp.com/aqsa-ayman
Abdelrahman
@ARhman
Jan 13 2017 20:06
Guys any idea on improving the performance of my tic tac toe ai. As you can see it is so laggy
http://codepen.io/ARhman/full/egJLOb/
giovanniattina
@giovanniattina
Jan 13 2017 20:11
Hi! I'm having a problem, new I added two stremers and click in ALL and the function repeat the name of the last name added, but I put to show the object on console.log and there are right
I don't know if I explained right the error
Adel
@AdelMahjoub
Jan 13 2017 20:11
@ARhman my advice is to rethink it, and separate the rendering from the data
Abdelrahman
@ARhman
Jan 13 2017 20:12
@AdelMahjoub so the rendering is what's making the problem?
Adel
@AdelMahjoub
Jan 13 2017 20:15
@ARhman rewrite the game with a random IA, with an independant rendering rendering , then add your AI
kevinliu6102
@kevinliu6102
Jan 13 2017 20:15
How many people here did all the advanced algorithm problems before starting the front end final projects? These problems are so hard I'm starting to burn out on them..
Tom
@moT01
Jan 13 2017 20:16
@kevinliu6102 i skipped around and just did what i felt like
Adel
@AdelMahjoub
Jan 13 2017 20:17
@kevinliu6102 which ones you struggle into
Abdelrahman
@ARhman
Jan 13 2017 20:17
@AdelMahjoub Ahha, I'll try that
Reggie
@Reggie01
Jan 13 2017 20:17
@ARhman Just place first "X" or "O" marker for the AI in your startGame function
Adel
@AdelMahjoub
Jan 13 2017 20:18
@ARhman for games, always make the rendering just a data visualization,
kevinliu6102
@kevinliu6102
Jan 13 2017 20:18
@moT01 Do you mean you jumped around everything in the front end track or just between the algorithms and projects?
@AdelMahjoub I'm stuck on Exact Change right now but the one before this was giving me trouble too
Adel
@AdelMahjoub
Jan 13 2017 20:20
@kevinliu6102 and you finished symetricDifference or still struggling ?
kevinliu6102
@kevinliu6102
Jan 13 2017 20:21
@AdelMahjoub I finished it a few hours ago
Adel
@AdelMahjoub
Jan 13 2017 20:21
@kevinliu6102 nice, pick a pen and a paper and and execute that exact change challenge
Tom
@moT01
Jan 13 2017 20:22
@kevinliu6102 i just skipped around in the front end area
did a project or two, did some algorithms,
kevinliu6102
@kevinliu6102
Jan 13 2017 20:23
@AdelMahjoub Lol I guess it just comes down to sticking with it... I'll keep trying
@moT01 You're not going for the certs?
Reggie
@Reggie01
Jan 13 2017 20:23
@ARhman your decision tree is quite large for first minimax decision. so just choosing the ai first move will cut down size of tree for first move and speed up the rendering by quite a lot.
Adel
@AdelMahjoub
Jan 13 2017 20:24
@kevinliu6102 just pick an example, and write what the program should do, more than half of the program is just comparaisons
Tom
@moT01
Jan 13 2017 20:24
@kevinliu6102 im going for learning, and yea i want to do them all. i dont think theres anything against skipping around
Abdelrahman
@ARhman
Jan 13 2017 20:25
@Reggie01 so I should either hardcode a first move for the ai or make it choose a random block?
Reggie
@Reggie01
Jan 13 2017 20:28
@ARhman Yeah, hardcode the first move. You can choose a random first move and dynamically create the array. Probably just hardcode first just so you see the difference right away.
Abdelrahman
@ARhman
Jan 13 2017 20:29
@Reggie01 I will try that
Kaz Baig
@kbaig
Jan 13 2017 20:34
Hey guys, I'm on the Twitch app right now. Struggling with the part about a notification if a channel doesn't exist. Any suggestions? http://codepen.io/kbaig/pen/qRNPLX?editors=0010
Abdelrahman
@ARhman
Jan 13 2017 20:35
@Reggie01 well that worked. Thanks mate
CamperBot
@camperbot
Jan 13 2017 20:35
arhman sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:cookie: 381 | @reggie01 |http://www.freecodecamp.com/reggie01
kevinliu6102
@kevinliu6102
Jan 13 2017 20:36
@kbaig check if the API call returns a null status and create an alert or something to tell the user the channel doesn't exist. or if you dont want an alert you can just display in the list that the user doesn't exist
Abdelrahman
@ARhman
Jan 13 2017 20:37
@kbaig read the api documentation and play with different requests and see their responses... There is one that produces an error. How will you build on that
?
Reggie
@Reggie01
Jan 13 2017 20:37
@ARhman :thumbsup: glad that helped
Kaz Baig
@kbaig
Jan 13 2017 20:43
@ARhman I know that it returns a 404 when the channel doesn't exist. I'm just not sure how to do something when getting a 404 error
@kevinliu6102 how would I go about checking if it's null? I tried if(json==null), but that was a no go :(
Srđan Međo
@PerpetualWar
Jan 13 2017 20:47
Guys, how to scroll with jQuery ?
to have that smooth animation of scrolling when following link to something below on page ?
Srđan Međo
@PerpetualWar
Jan 13 2017 20:53
anyone ?
Kaz Baig
@kbaig
Jan 13 2017 20:56
@kevinliu6102 @ARhman I got it to work ty ty
CamperBot
@camperbot
Jan 13 2017 20:56
:cookie: 306 | @arhman |http://www.freecodecamp.com/arhman
:cookie: 290 | @kevinliu6102 |http://www.freecodecamp.com/kevinliu6102
kbaig sends brownie points to @kevinliu6102 and @arhman :sparkles: :thumbsup: :sparkles:
Rahul Yedida
@yrahul3910
Jan 13 2017 20:57
Could you guys have a look at my tic tac toe game?
http://codepen.io/yrahul/full/wgWmXK/
Abdelrahman
@ARhman
Jan 13 2017 21:01
is you're ai playing randomly?
@yrahul3910
Rahul Yedida
@yrahul3910
Jan 13 2017 21:02
Yeah, it randomly picks an empty square
Abdelrahman
@ARhman
Jan 13 2017 21:02
@yrahul3910 well that's alright as there are no user stories regarding that. However, how would you make your ai smarter?
Rahul Yedida
@yrahul3910
Jan 13 2017 21:04
Well, if the middle square isn't taken, then take that, otherwise, first check if you need to block the user from winning, and if you don't, then simply place your move right beside his move was my logic
Checking if the user would win in the next move is long so I implemented random move instead
Abdelrahman
@ARhman
Jan 13 2017 21:05
@yrahul3910 yup that would be really better
@yrahul3910 but it does not really happen
Kaz Baig
@kbaig
Jan 13 2017 21:06
Thoughts on my Twitch app so far? http://codepen.io/kbaig/full/qRNPLX
Rahul Yedida
@yrahul3910
Jan 13 2017 21:06
Meaning? @ARhman
Abdelrahman
@ARhman
Jan 13 2017 21:07
@yrahul3910 when I play, the ai does not take the middle square and it never checks if I am winning
Adel
@AdelMahjoub
Jan 13 2017 21:07
@yrahul3910 the width of cells is changing on click, and there is no AI, but it looks nice
Abdelrahman
@ARhman
Jan 13 2017 21:07
@yrahul3910 the layout is cool
Rahul Yedida
@yrahul3910
Jan 13 2017 21:08
@ARhman Thanks :) I used Materialize.css instead of Bootstrap
CamperBot
@camperbot
Jan 13 2017 21:08
yrahul3910 sends brownie points to @arhman :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @arhman |http://www.freecodecamp.com/arhman
Abdelrahman
@ARhman
Jan 13 2017 21:08
@kbaig looks nice... I did not look intensely though
Rahul Yedida
@yrahul3910
Jan 13 2017 21:08
I couldn't figure out why the width was changing, it's mostly due to each character having different widths. A monospace font might fix that
@kbaig It has a nice UI :)
Adel
@AdelMahjoub
Jan 13 2017 21:09
@yrahul3910 an the user can click after the end of a round
Kaz Baig
@kbaig
Jan 13 2017 21:10
@ARhman @yrahul3910 ty ty
CamperBot
@camperbot
Jan 13 2017 21:10
kbaig sends brownie points to @arhman and @yrahul3910 :sparkles: :thumbsup: :sparkles:
:warning: kbaig already gave arhman points
:cookie: 322 | @yrahul3910 |http://www.freecodecamp.com/yrahul3910
Rahul Yedida
@yrahul3910
Jan 13 2017 21:10
@AdelMahjoub Oops, I'll fix that. Thanks! :)
CamperBot
@camperbot
Jan 13 2017 21:10
yrahul3910 sends brownie points to @adelmahjoub :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
Adel
@AdelMahjoub
Jan 13 2017 21:13
@yrahul3910 you can use implement this AI if you want https://codepen.io/SultanCodeCamper/pen/zKJzVq?editors=1010
@yrahul3910 add this object is all what you need
//Game state
var state = {
    intelligence: 6, //Game difficulty
    combos: [], //All possible winning combos 
    board: [], //The game board state
    reset: function(){
        this.board = [];
    },
    undef: undefined
}
Rahul Yedida
@yrahul3910
Jan 13 2017 21:15
@AdelMahjoub Thank you! :D
CamperBot
@camperbot
Jan 13 2017 21:15
yrahul3910 sends brownie points to @adelmahjoub :sparkles: :thumbsup: :sparkles:
:warning: yrahul3910 already gave adelmahjoub points
Adel
@AdelMahjoub
Jan 13 2017 21:15
it is totally independant from rendering, can be implemented anywhere
Rahul Yedida
@yrahul3910
Jan 13 2017 21:17
Your pen is cool :O
Adel
@AdelMahjoub
Jan 13 2017 21:17
thanks, glad you like it
Sam Griffen
@ssgriffen
Jan 13 2017 21:30
when an api requires that you be on an https domain to interact with, will prepending the codepen domain with https and reloading the page always render a successful interaction with that API?...lmk if you don't understand what I'm asking. Basically I need to know if codepen will be a suitable environment to test interactions with a secure API
Adel
@AdelMahjoub
Jan 13 2017 21:31
@ssgriffen yes
Sam Griffen
@ssgriffen
Jan 13 2017 21:32
@AdelMahjoub Thanks Boss
CamperBot
@camperbot
Jan 13 2017 21:32
:cookie: 397 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
ssgriffen sends brownie points to @adelmahjoub :sparkles: :thumbsup: :sparkles:
Adel
@AdelMahjoub
Jan 13 2017 21:33
@ssgriffen :smile: you are welcome
Steven Jeffers
@Scubiesteve
Jan 13 2017 21:45
Does anyone know how I would go about calling variables in the middle of a JSON get request?
nheyse89
@nheyse89
Jan 13 2017 21:55
I am having trouble with the PERSONAL PORTFOLIO WEBPAGE about [119] in. I am trying to add a navbar up top. I am trying to use the class "nav-pills" but it continues to look like the default navbar. Is there something I'm doing wrong or is it a CodePen.io problem?
I am putting it in the <ul class="nav navbar-default nav-pills">
MaxLAB
@Max-LAB
Jan 13 2017 21:55
@nheyse89 can you provide your codepen link?
nheyse89
@nheyse89
Jan 13 2017 22:00
@Max-LAB I started one yesterday and didn't save it......but I was trying for over an hour to get it to work
should i be putting it in the header?
or maybe try another text editor to see if it looks different
?
MaxLAB
@Max-LAB
Jan 13 2017 22:03
@nheyse89 I'm presuming you are using bootstrap, you can read this to try to understand navbar. https://getbootstrap.com/components/#navbar. You need to put navbar inside <body> </body> tag
Jan Shah
@JanShah
Jan 13 2017 22:04
has anyone had any problems with https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api
I haven't been able to get my code to link to the site on my code and the example code has the same fault
Tony Miri
@TonyMiri
Jan 13 2017 22:05
@CentropyIT I could link to the site, but there is something about linking out of the CodePen sandbox that doesn't allow the twitch.tv pages to load properly anyway
MaxLAB
@Max-LAB
Jan 13 2017 22:05
@nheyse89 If you had working codepen version of your code it would be much easier to guide you through your problems
@FatTone225 I think you're right. Is there a way around it?
Tony Miri
@TonyMiri
Jan 13 2017 22:06
@CentropyIT Yep, same issue with mine. never resolved it. But if you host the code locally and run it in your browser it should work.
Jan Shah
@JanShah
Jan 13 2017 22:07
the example code has the same issue so I declare success.. :worried:
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:07
@CentropyIT open it in codepen's debug view and it should work that way.
Tony Miri
@TonyMiri
Jan 13 2017 22:07
@CentropyIT Last time I thought about the issue, which was a while ago, there was a guy in here trying to figure it out for hours and I thought it seemed like way too much effort having to go into something that is essentially just a proof of concept anyhow
Jan Shah
@JanShah
Jan 13 2017 22:08
@TylerMoeller it works :)
Tony Miri
@TonyMiri
Jan 13 2017 22:08
@TylerMoeller @CentropyIT Or that
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:08
As Tony said, it's about Codepen's use of iFrames to display your code.
A flash / security restriction I believe...can never find the one article out there that talks about it :)
Jan Shah
@JanShah
Jan 13 2017 22:09
@TylerMoeller & @FatTone225 thanks guys, you've been a great help!
CamperBot
@camperbot
Jan 13 2017 22:09
centropyit sends brownie points to @tylermoeller and @fattone225 :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @fattone225 |http://www.freecodecamp.com/fattone225
:star2: 1312 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Sam Griffen
@ssgriffen
Jan 13 2017 22:11
@TylerMoeller question
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:12
Sure
:)
Sam Griffen
@ssgriffen
Jan 13 2017 22:12
@TylerMoeller assuming the "XXX" are my correct information and I have this request working on postman, do you know why this isn't working on codepen? https://codepen.io/ssgriffen/pen/ygOOpe?editors=1111
mazury
@mazury
Jan 13 2017 22:12
Hello. Anybody knows why I can't tweet in this? http://codepen.io/Adam92/pen/MJeWjp?editors=1010
Sam Griffen
@ssgriffen
Jan 13 2017 22:13
@TylerMoeller I just copied the code postman spits out for you and pasted it into codepen... not sure why I can't get the request to work
mazury
@mazury
Jan 13 2017 22:13
tweet button doesn't react
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:13
@ssgriffen Does your console log anything when you have actual values in place of xxx? Looks like you may need to look for crossorigin issues
Sam Griffen
@ssgriffen
Jan 13 2017 22:14
No nothing happens in the console @TylerMoeller
@TylerMoeller Any ideas to try for crossoringin trouble shooting?
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:14
@ssgriffen It depends on the API, I'd have to learn about the API you are using
Sam Griffen
@ssgriffen
Jan 13 2017 22:15
Damn't haha @TylerMoeller I was hoping you'd have a common trouble shooting idea...I don't expect you to go read up on the api
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:15
And, to be clear, not the codepen console, the console your browser's developer tools provide. Usually Ctrl+Shift+J
I think it's Option + Shift + J on a mac
Sorry @ssgriffen :/
Jonathan Marx Domah
@marxcom
Jan 13 2017 22:16
hello everyone; how do I hide an object using jquery
MaxLAB
@Max-LAB
Jan 13 2017 22:16
@marxcom $( ".target" ).hide();
Jonathan Marx Domah
@marxcom
Jan 13 2017 22:18
@nheyse89 I will load it in codepen later. thanks
CamperBot
@camperbot
Jan 13 2017 22:18
marxcom sends brownie points to @nheyse89 :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @nheyse89 |http://www.freecodecamp.com/nheyse89
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:19
@adamgithub92 quoteText and quoteAuthor are not defined inside your anonymous click function for the tweet button
Looks like you just changed things to get the button working again - just need to use the right link and add the quote text to it now
Sam Griffen
@ssgriffen
Jan 13 2017 22:20
blob
@TylerMoeller
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:21
@ssgriffen Yes, that's a CORS issue. The API should tell you how to handle those - you might need to send a header or, if it supports JSONP, add something like ?callback=? to the end of the URL
mazury
@mazury
Jan 13 2017 22:22
Yeah, it's working now, @TylerMoeller but I noticed the new quote button doesn't react on my tablet, any idea why?
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:23
@adamgithub92 Not sure why that wouldn't work on a tablet. You aren't doing anything out of the ordinary.
mazury
@mazury
Jan 13 2017 22:23
tweet button works, but quote doesn't @TylerMoeller
Sam Griffen
@ssgriffen
Jan 13 2017 22:24
where would i send the header? @TylerMoeller
@TylerMoeller nvm...im guessing the headers part of the settings...
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:24
@ssgriffen Yeah, it's an ajax option:
    headers: {
        "My-First-Header":"first value",
        "My-Second-Header":"second value"
    }
Sam Griffen
@ssgriffen
Jan 13 2017 22:26
@TylerMoeller is there a chance this just wont work on codepen?
@TylerMoeller or is that unlikely?
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:27
@ssgriffen That's usually unlikely - codepen is just another server. I don't know much about the parsehub API though. Every API can have its own unique requirements.
Sam Griffen
@ssgriffen
Jan 13 2017 22:27
@TylerMoeller Thanks
CamperBot
@camperbot
Jan 13 2017 22:27
ssgriffen sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1313 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Jan 13 2017 22:29
@adamgithub92 You may want to move bootstrap and jQuery into the codepen settings rather than putting them at the top of your HTML panel.
You basically have them both at the top of your <body> and they don't belong there, so depending on the OS/browser you're using on your tablet, it may not like them there.
mazury
@mazury
Jan 13 2017 22:35
just did what you said and it didn't help @TylerMoeller
Tony Miri
@TonyMiri
Jan 13 2017 22:40
@adamgithub92 Are you using the code from twitter for your tweet button?
mazury
@mazury
Jan 13 2017 22:41
twitter button works already @FatTone225, no problem
Tony Miri
@TonyMiri
Jan 13 2017 22:41
oh, but the new quote button doesn't work on your tablet
Did you try on a phone?
mazury
@mazury
Jan 13 2017 22:42
yeah, oh i'll try on my phone
Tony Miri
@TonyMiri
Jan 13 2017 22:46
Your pen doesn't load for me. There's an error in the js section
mazury
@mazury
Jan 13 2017 22:46
on my phone neither of buttons works @FatTone225
wrong, actually tweet works
Tony Miri
@TonyMiri
Jan 13 2017 22:50
@adamgithub92 Not sure what's happening there. It's loading now and both buttons work on my phone
Android phone with chrome
Zaurbek Zhakupov
@zzhakupov
Jan 13 2017 22:52
Hello guys, can you pls have a look at my Bar Chart Project, I will highly appreaciate any feedback that you can afford. http://codepen.io/Zooll/pen/qRZQeG
Tony Miri
@TonyMiri
Jan 13 2017 22:54
@Zooll8 Looks great. No problems at first glance
mazury
@mazury
Jan 13 2017 22:57
@FatTone225 maybe chrome is not the newest version, i'll update
Venkatesh Thapan
@thenerdyouknow
Jan 13 2017 22:58
Almost done with Simon Game.
Only need help to disable buttons when computer is showing pattern.
Stackoverflow answers aren't helping.
Tom
@moT01
Jan 13 2017 23:13
@thenerdyouknow just finished mine, ...need any help?
finished i think*
mazury
@mazury
Jan 13 2017 23:16
@FatTone225 still not working... second issue - when I try to tweet, it redirects me to twitte rlogin page instead of /tweet... do you know why?
@TylerMoeller thanks for previous help
CamperBot
@camperbot
Jan 13 2017 23:17
adamgithub92 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1314 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Could somebody explain why I'm being marked wrong even though if I put the values in, I get the right answer?
Tom
@moT01
Jan 13 2017 23:23
@kbaig i dont think you are getting the right answer, the code your trying returns
[1, "calf", 3, "piglet", 1, "calf", 3, 4]
it should return ["piglet", 4]
Steven
@Ironwrangler
Jan 13 2017 23:26
Hello everyone !!!
I just finished the first section of free camp and now it's "Building a tribute pg.
Woohoo !!!
Kaz Baig
@kbaig
Jan 13 2017 23:26
@moT01 I'm seeing ["piglet", 4] :O
https://gyazo.com/a568db0acbe94357a5222424a7cd83cc
@Ironwrangler wooooo
Tom
@moT01
Jan 13 2017 23:28
and that test isn't passing?
Kaz Baig
@kbaig
Jan 13 2017 23:29
@moT01 nope :/
@moT01 I tried all of the test values and I'm seeing the right answers
Tom
@moT01
Jan 13 2017 23:31
i copied your code to a codepen and what it returned there is what i said
Kaz Baig
@kbaig
Jan 13 2017 23:34
interesting...
@moT01 any ideas as to what I did wrong?
Tom
@moT01
Jan 13 2017 23:38
no, that is wierd that it shows the correct answer on their little window there
Pieter Stokkink
@forkerino
Jan 13 2017 23:42
@kbaig in the console in my browser it also returns the wrong value (i.e. the concatenated arrays).
Chris
@bestintown23
Jan 13 2017 23:43
Hey guys how often is it necessary to validate your site through W3C?
Kaz Baig
@kbaig
Jan 13 2017 23:43
@forkerino any ideas as to why it's wrong/what I have done wrong?
Pieter Stokkink
@forkerino
Jan 13 2017 23:45
no.
:(
I can see in the small terminal window on FCC that the answers are correct as well...
Pieter Stokkink
@forkerino
Jan 13 2017 23:53
@kbaig I found it
Kaz Baig
@kbaig
Jan 13 2017 23:55
@forkerino sup?
Pieter Stokkink
@forkerino
Jan 13 2017 23:56
inside your filt function you need to use this.valueOf() instead of this, as thisis referring to an object containing the information you actually need to compare
Kaz Baig
@kbaig
Jan 13 2017 23:58
@forkerino omg thanks dude!
CamperBot
@camperbot
Jan 13 2017 23:58
kbaig sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:cookie: 639 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Jan 13 2017 23:59
@kbaig No problem, actually learned something myself. :D