These are chat archives for FreeCodeCamp/HelpFrontEnd

19th
Jul 2016
greg
@wearenotgroot
Jul 19 2016 00:00 UTC
@max77p double check the api docs
Xavier Velez
@JonSnow08
Jul 19 2016 00:01 UTC
@jianninetorres if you're finding those tough then the intermediate ziplines will be near impossible. Trust me on this, take your time
Jiannine Torres
@jianninetorres
Jul 19 2016 00:01 UTC
how long did it take you guys to get through the basic algorithms, if I may ask?
I've got 5/16 done, but not without a little Googling for a couple of them
max77p
@max77p
Jul 19 2016 00:02 UTC
@wearenotgroot yea don't think it pulls every single stream, there seems to be a limit and on top of that, it seems like it just pulls the ones online
Islam Ibakaev
@dagman
Jul 19 2016 00:11 UTC
@max77p let them show how to do it
Edmund To
@edmundtfy
Jul 19 2016 00:49 UTC
hello... can someone tell me why this doesn't work?
function findUser(data) { .....; $getJSON (URL, findData()) ) // declared findUser, calling findData
function findData (data) { ... $getJSON (URL, pushHTML()) } // declared findData, calling pushHTML()
function pushHTML(data) { ... } // declared pushHTML()
$(document).ready $(document).ready(
  function(){ ... for(i=0;i<array;i++) { //the array contains different URL
    $getJSON(array[i], findUser())
  }
}
// what I expect: documentReady --> findUser --> findData --> pushHTML --> loop
// what happened: it loops, but all the content being pushed to the HTML is the same, data from the second last data I wanted to find in that array... why????
Greg Duncan
@GregatGit
Jul 19 2016 01:11 UTC
@edmundtfy in the loop it should be array.length - and you should never call an array 'array' call it 'arr' or even better 'channelsArr' - so the user can tell what is in it without having to search through your code
@max77p That's is basically how I did it
max77p
@max77p
Jul 19 2016 01:13 UTC
@GregatGit iterating through for loop?
Greg Duncan
@GregatGit
Jul 19 2016 01:13 UTC
@max77p yes
max77p
@max77p
Jul 19 2016 01:14 UTC
@GregatGit ok sweet, thanks!
CamperBot
@camperbot
Jul 19 2016 01:14 UTC
max77p sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 695 | @gregatgit |http://www.freecodecamp.com/gregatgit
Edmund To
@edmundtfy
Jul 19 2016 01:15 UTC
@GregatGit sorry I just typed that up, I used array.length in the code
Greg Duncan
@GregatGit
Jul 19 2016 01:16 UTC
@max77p If they are online when you do the call - then everything you need is brought down in that call - you can also access the channels api if they are offline through that call
@edmundtfy where is array defined
Edmund To
@edmundtfy
Jul 19 2016 01:17 UTC
@GregatGit before everything, at the very top
Greg Duncan
@GregatGit
Jul 19 2016 01:17 UTC
@edmundtfy are you doing this in code pen
Edmund To
@edmundtfy
Jul 19 2016 01:18 UTC
yes doing it in codepen as part of the Twitch.tv application
Greg Duncan
@GregatGit
Jul 19 2016 01:18 UTC
@edmundtfy can you post your pen
it's a bit of a mess..... @GregatGit
Greg Duncan
@GregatGit
Jul 19 2016 01:28 UTC
Tidy.JPG
@edmundtfy don't forget to use the tidy button
@edmundtfy your naming in general is not good - one good example tho is pushHtml - I know exactly what it does just by reading the function name
@edmundtfy What is your main problem right now?
max77p
@max77p
Jul 19 2016 01:31 UTC
@GregatGit hey so i know using chromes console that my code is pulling info on the array of names i requested
however, for simplicity purposes all i am trying to do right now is output the status name of whatever is online, and then just output "offline" for whatever is offline on the page
or into my div
having a little trouble doing this though
i get the online status names to output, but not sure how to work the if statement so that the word "offline" is output below the two for the other ones
Edmund To
@edmundtfy
Jul 19 2016 01:32 UTC
@GregatGit the entire thing being pushed to the HTML is wrong, you can't see it in your computer?
@GregatGit everything overlap on the same row, and everything being pushed is the same...
Greg Duncan
@GregatGit
Jul 19 2016 01:34 UTC
@edmundtfy I think you have made your pushHtml function to complicated
it should be simple
instead of using lots of jQuery to add classes and attribute - build a block of html like a string - then add (append) the block -
Greg Duncan
@GregatGit
Jul 19 2016 01:41 UTC
@edmundtfy a basic example
function buildHtml(img, class, address){
   var myHtml = '<div class="' + class + '">';
   myHtml += <a href="' + address // and keep building it

$("#channels").append(myHtml);
}
Greg Duncan
@GregatGit
Jul 19 2016 01:46 UTC
@max77p if (json.hasOwnProperty('error') check for errors (do nothing but console it if its there are there 'else if' check if(json.data === null) - now you know its offline - 'else' - its online
Edmund To
@edmundtfy
Jul 19 2016 01:52 UTC
@GregatGit you are right I got it to go into the right format, but still, duplicating the same result...
Edmund To
@edmundtfy
Jul 19 2016 01:59 UTC
@GregatGit seems like the variables aren't resetting: after I declare a certain value to a variable, it sticks for the first loop and doesn't change after the first loop...
Ben Elliot
@SuperNerd1
Jul 19 2016 02:02 UTC
How do I create a set of radio buttons? So far i have:
Greg Duncan
@GregatGit
Jul 19 2016 02:02 UTC
make your function take in parameters @edmundtfy
Ben Elliot
@SuperNerd1
Jul 19 2016 02:03 UTC
<radio><input type="radio"name="indoor"> indoor</radio>
<radio><input type="radio"name="outdoor"> outdoor</radio>
Ben Elliot
@SuperNerd1
Jul 19 2016 02:04 UTC
@GregatGit Thanks!
CamperBot
@camperbot
Jul 19 2016 02:04 UTC
supernerd1 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 696 | @gregatgit |http://www.freecodecamp.com/gregatgit
Edmund To
@edmundtfy
Jul 19 2016 02:13 UTC
@GregatGit what do you mean let the function take in parameters? I declared global variables, change the value in the functions, and push to the HTML, and the second loop I also set a new value to the variables, but seems like not working
Greg Duncan
@GregatGit
Jul 19 2016 02:24 UTC
@edmundtfy
myFunction(str){
  var greeting = "Hi " + str + "!";
  return greeting;
}
@edmundtfy also declare variable where you need them - not globally
Nupur Gorian
@NupurGorian
Jul 19 2016 02:35 UTC
what is unexpected token indent in html
????????????
hi @edmundtfy
john94
@lpy1994
Jul 19 2016 02:37 UTC
hello
Screen Shot 2016-07-18 at 10.37.57 PM.png
how can I put them in line??
Edmund To
@edmundtfy
Jul 19 2016 02:38 UTC
@GregatGit sorry, but why can't I declare it globally? If I declare it non-globally, then the other function would not be able to grab those variables right? I have 3 functions, so I decided to declare them globally. Not a good practice?
@NupurGorian hello there~
Nupur Gorian
@NupurGorian
Jul 19 2016 02:39 UTC
hello
pooranp
@pooranp
Jul 19 2016 02:39 UTC

How can I add links to my portfolio? I tried going back in the previous lessons but couldn't find an answer

'User Story: I can click different buttons that will take me to the portfolio creator's different social media pages.'

Nupur Gorian
@NupurGorian
Jul 19 2016 02:40 UTC
I want to know about unexpected token in html.It is an error showing in my tribute page
@edmundtfy
原田 美幸
@mykhrd
Jul 19 2016 02:40 UTC
@lpy1994 set width or set its display to block with margin and such
Nupur Gorian
@NupurGorian
Jul 19 2016 02:43 UTC
hi anyone there to help
I want to know about unexpected token in html.It is an error showing in my tribute page
hi @pooranp
did you completed the tribute page
john94
@lpy1994
Jul 19 2016 02:47 UTC
@mykhrd I tried. something wrong with my code, i think I have to rewrite it
Nupur Gorian
@NupurGorian
Jul 19 2016 02:47 UTC
@lpy1994 hi
blackhat144
@blackhat144
Jul 19 2016 02:51 UTC
Sorry for copy-pasting this but no one would help me in the CPP chatroom: Can someone a) review my tribute page and b) help me with these three bugs? first, there's a little white edge to the rounded green border I'm using for the first quote. Second, I can't get the margins to work on the second quote, and third, there's a vertical white line running down to the left of the biography and above the graph. Thanks!
原田 美幸
@mykhrd
Jul 19 2016 02:54 UTC
@blackhat144 your blockquote style has border-left: 5px #ee on it. your using bootstrap so just overwrite it
Nupur Gorian
@NupurGorian
Jul 19 2016 02:55 UTC
@mykhrd helo
原田 美幸
@mykhrd
Jul 19 2016 02:55 UTC
and dont forget to use inspect tools through the browser to check your code
@NupurGorian hi
Nupur Gorian
@NupurGorian
Jul 19 2016 02:55 UTC
i have a problem in my tribute page
原田 美幸
@mykhrd
Jul 19 2016 02:56 UTC
@NupurGorian i haven’t finished mine yet but if you have a link i could check it tho.
Nupur Gorian
@NupurGorian
Jul 19 2016 02:56 UTC
error showing is unexpected token indent
原田 美幸
@mykhrd
Jul 19 2016 03:00 UTC
@NupurGorian why is html in jade? i believe your writing in plain html. but the file is set to jade
blackhat144
@blackhat144
Jul 19 2016 03:03 UTC
@mykhrd sorry for late response, but how do I overwrite it?
原田 美幸
@mykhrd
Jul 19 2016 03:04 UTC
@blackhat144 if !important is allowed you can use it in css or just dont use blockquote. instead, use div and specify a class to it.
pooranp
@pooranp
Jul 19 2016 03:05 UTC

"Navigate to different sections of the webpage by clicking buttons in the navigation."

^how can I complete that?

Nupur Gorian
@NupurGorian
Jul 19 2016 03:05 UTC
what should i do html in jade
@mykhrd
means what should i set to html
helo @mykhrd plain is not there in html setting
Mimi
@mimi26
Jul 19 2016 03:09 UTC
hi. can someone help me figure out why href links don't seem to be working in codepen? I tried the target="_blank" thing, and it's still not working.
Luke
@lukenetti3
Jul 19 2016 03:10 UTC
Hey guys, check out my Wikipedia Viewer. I do have one question of simplicity. I realize I did this a messy way, but what would be the most efficient way for the section where I append the results in my javascript http://codepen.io/lukenetti3/pen/akwEQk
@mimi26 Can you attach the link in here and maybe I can help
i was trying to put in a tweet button, which wasn't working, so I put in another random url to see if any links would work. that didn't work either.
Nupur Gorian
@NupurGorian
Jul 19 2016 03:13 UTC
why the bullet signs in my tribute page not moving to the center
evryon sleeping or what
pooranp
@pooranp
Jul 19 2016 03:18 UTC
@mimi26 i tried going to your URL and it took me to gmail, which I'm assuming is the "random URL" you tried. if so, it seems to be working fine for me
Mimi
@mimi26
Jul 19 2016 03:20 UTC
yes it was. huh, that's weird. not working for me.
Mimi
@mimi26
Jul 19 2016 03:24 UTC
@GregatGit the issue that I'm having is that the href tag doesn't seem to be working at all for me right now.
max77p
@max77p
Jul 19 2016 03:32 UTC
@GregatGit thanks for all your help!
CamperBot
@camperbot
Jul 19 2016 03:32 UTC
max77p sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 697 | @gregatgit |http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Jul 19 2016 03:38 UTC
@mimi26 it the way you have set up your background img - its messing with the html -
@mimi26 use css and put the img as a background url
@mimi26
body {
  background: url("your img url")no-repeat center fixed;
  background-size: cover;
  text-align: center;
}
Kevin Kuehler
@kevinkuehler
Jul 19 2016 03:42 UTC
Does anyone know why Open Weather get request returns an object with all of my location info?
not the correct response..
Justin Woodward
@jwoo92
Jul 19 2016 03:57 UTC
@mimi26 your issue seems to lie somewhere in your CSS
blackhat144
@blackhat144
Jul 19 2016 04:01 UTC
Can someone help me with my tribute page? I cant understand what I'm doing that results in the vertical white line above the graph or the margins on the second quote not working. Thanks!
Nupur Gorian
@NupurGorian
Jul 19 2016 04:04 UTC
my <div class="container">is not showing any result
can anyone help-
Anukath
@Anukath
Jul 19 2016 04:07 UTC
guys how to add bootsrap in codepen?
Mimi
@mimi26
Jul 19 2016 04:08 UTC
that did make href work @GregatGit
Anukath
@Anukath
Jul 19 2016 04:09 UTC
?
@Anukath thanks
CamperBot
@camperbot
Jul 19 2016 04:10 UTC
sorry anukath, you can't send brownie points to yourself! :sparkles: :sparkles:
Anukath
@Anukath
Jul 19 2016 04:10 UTC
lol
hello @camperbot
Mimi
@mimi26
Jul 19 2016 04:11 UTC
@GregatGit can I still change the opacity, and positioning of the background image?
Justin Woodward
@jwoo92
Jul 19 2016 04:13 UTC
@blackhat144 the white line above your graph is resulting from you using <blockquote> in bootstrap. When using bootstrap, it will automatically give you a border-left. you can combat this by creating border: none; for your blockquote.
Sorin Ruse
@sorinr
Jul 19 2016 04:15 UTC
@d1sr3 yes. but you forgot to clear first the old bord class then add it to the div selected. if you leave it like this when you return to the page you will have bord class active on all clicked elements not only on the last one. like: $('div[id^=par]').removeClass('bord'); I would also change the color when hovering to be different from the green one(active) in the bord class
Sorin Ruse
@sorinr
Jul 19 2016 04:31 UTC
@d1sr3 you can also change if you want .parag:hover{} to.parag:not(.bord):hover{}
blackhat144
@blackhat144
Jul 19 2016 04:33 UTC
@jwoo92 thanks so much! Can you help me with my margins?
CamperBot
@camperbot
Jul 19 2016 04:33 UTC
blackhat144 sends brownie points to @jwoo92 :sparkles: :thumbsup: :sparkles:
:cookie: 390 | @jwoo92 |http://www.freecodecamp.com/jwoo92
Greg Duncan
@GregatGit
Jul 19 2016 04:51 UTC
@mimi26 yes, that got it working - you can (and should) do that all in the css -
DamianMitchell
@DamianMitchell
Jul 19 2016 05:45 UTC
ok...I back with a good one: if an API has the actual latitude and longitude coordinates in the https:// and its the only way to gather the data, what do I do than when it's no long a string
Sorin Ruse
@sorinr
Jul 19 2016 05:55 UTC
@DamianMitchell usually the apis are returning a json object so you can just, in ur callback function, grab what you want from the returned response
Russell Grigg
@russellg
Jul 19 2016 06:50 UTC
Hi guys, have a problem some of you may have come across. I am trying to use Foundation framework for a sticky magellan responsive navigation system. Everything is fine... except I cant seem to find a solution to center the navigation so that it looks good on a mobile device and a desktop device
This message was deleted
CamperBot
@camperbot
Jul 19 2016 06:55 UTC
:bulb: to format code use backticks! ``` more info
Russell Grigg
@russellg
Jul 19 2016 06:57 UTC
<div data-sticky-container>
  <div class="title-bar" data-sticky data-options="marginTop:0;stickyOn:small" style="width:100%;" data-responsive-toggle="example-menu" data-hide-for="medium">
      <button class="menu-icon" type="button" data-toggle></button>
      <div class="title-bar-title">
        pyxis
      </div>
    </div>
    <div class="top-bar" id="example-menu" data-sticky data-options="marginTop:0;stickyOn:small" style="width:100%;">
      <div>
        <div class="top-bar-right">
          <ul class="dropdown menu" data-dropdown-menu>
            <li class="menu-text">pyxis</li>
            <li><a href="#about">about</a></li>
            <li><a href="#portfolio">portfolio</a></li>
            <li><a href="#contact">contact</a></li>
          </ul>
        </div>
      </div>
    </div>
</div>
CamperBot
@camperbot
Jul 19 2016 06:57 UTC
:bulb: to format code use backticks! ``` more info
Russell Grigg
@russellg
Jul 19 2016 06:59 UTC
Is there a way I can center the menu so regardless of screen size, it centers the navigation and places the same size indent between the menu-text item and the navigation options, so that it doesnt go off screen once toggled to mobile? hope this makes sense.
Sorin Ruse
@sorinr
Jul 19 2016 07:01 UTC
@russellg have you added: <meta name="viewport" content="width=device-width, initial-scale=1.0"/> into your <head> ?
Russell Grigg
@russellg
Jul 19 2016 07:02 UTC
@sorinr yes I have
Sorin Ruse
@sorinr
Jul 19 2016 07:02 UTC
@russellg can you post your pen link?
Ashan Mohammed
@AshanMohammed
Jul 19 2016 07:04 UTC
hello frontend nerd!
Russell Grigg
@russellg
Jul 19 2016 07:04 UTC
@sorinr I did not do this using codepen. I'll upload now
I'm actually wondering if I am just thinking about this the wrong way
Sorin Ruse
@sorinr
Jul 19 2016 07:05 UTC
@russellg lets see what we can do
Shivam Mehta
@shivam13
Jul 19 2016 07:08 UTC
hi @sorinr
Sorin Ruse
@sorinr
Jul 19 2016 07:08 UTC
@AshanMohammed hi there
@shivam13 hi
Shivam Mehta
@shivam13
Jul 19 2016 07:09 UTC
i am still stuck in fetch in current location
Sorin Ruse
@sorinr
Jul 19 2016 07:11 UTC
@shivam13 whats the problem?
Russell Grigg
@russellg
Jul 19 2016 07:13 UTC
Ok this is not formatting correcting in codepen but this is close: http://codepen.io/russellg/pen/qNxogP
Shivam Mehta
@shivam13
Jul 19 2016 07:14 UTC
i got it @sorinr
:smile:
Russell Grigg
@russellg
Jul 19 2016 07:15 UTC
the top nav should be centered (and is for me on my desktop using Atom) and it will be centered on a mobile device when it toggles the menu view. What I want though, is for the menu to be the width of the green box underneath and 'pyxis' to float to the left within that boundary and the menu items to float right within that boundary. However it needs to be visible when toggled to mobile view. hope this makes sense...
Sorin Ruse
@sorinr
Jul 19 2016 07:17 UTC
@russellg let me see i i got it: on desk your top nav menu links shoud be centered within the nav. right?
Russell Grigg
@russellg
Jul 19 2016 07:18 UTC
This message was deleted
on my desktop the nav is centered, I want to stretch it so its the same size as the div underneath, without screwing up the view when on a mobile device
Sorin Ruse
@sorinr
Jul 19 2016 07:20 UTC
@russellg if you placed the ul navigation into a <div class="top-bar-right"> its normal to float to the right
Russell Grigg
@russellg
Jul 19 2016 07:20 UTC
@sorinr ah I though the align-center attribute would fix that up, in the div above. admittedly this is very messy right now :)
there was a top-bar-left as well but I removed it
Shivam Mehta
@shivam13
Jul 19 2016 07:21 UTC
https://codepen.io/shivam13/pen/pbpqKA
Check it for your location @sorinr
Sorin Ruse
@sorinr
Jul 19 2016 07:22 UTC
@russellg top-bar-left and top-bar-right is pushing elements to the left or to the right
Russell Grigg
@russellg
Jul 19 2016 07:23 UTC
I have renamed it to something else locally
Shivam Mehta
@shivam13
Jul 19 2016 07:25 UTC
is this run properly?? @sorinr
kirbyedy
@kirbyedy
Jul 19 2016 07:27 UTC
@shivam13 Uncaught TypeError: Cannot read property 'formatted_address' of undefined
Russell Grigg
@russellg
Jul 19 2016 07:30 UTC
wait I think I worked out what I want to do
oh wow
this is why you dont study when you have a virus
its not exactly what I wanted... but I am happy @sorinr renamed the top-bar-right to top-bar-nav - specified width and now it seems to be doing the trick
sorry for the bother everyone :/ I need a rubber duck to talk to
Shivam Mehta
@shivam13
Jul 19 2016 07:32 UTC
sorry what you say @kirbyedy
kirbyedy
@kirbyedy
Jul 19 2016 07:32 UTC
that is the error from your console.log
Sorin Ruse
@sorinr
Jul 19 2016 07:32 UTC
@russellg iwas looking into this: http://zurb.com/building-blocks/centered-top-bar-with-logo I haven't used foundation for a long time :)
Russell Grigg
@russellg
Jul 19 2016 07:33 UTC
@sorinr that is pretty cool actually :D
thanks for taking a look btw
Artis Raudive
@ar14059
Jul 19 2016 07:34 UTC
Hi everyone! I can't find weather local weather API JSON. I found API for United States: http://api.wunderground.com/api/f33f498bd9750b19/conditions/q/CA/San_Francisco.json
How can i find link like that for other countries?
Sorin Ruse
@sorinr
Jul 19 2016 07:36 UTC
@russellg welcome
@shivam13 its working for me
Shivam Mehta
@shivam13
Jul 19 2016 07:37 UTC
its working for me too :smile:
@sorinr
Sorin Ruse
@sorinr
Jul 19 2016 07:38 UTC
@shivam13 good :)
Shivam Mehta
@shivam13
Jul 19 2016 07:38 UTC
thanks for share your pen of weather app which is useful to me
@sorinr
Sorin Ruse
@sorinr
Jul 19 2016 07:40 UTC
@ar14059 that is just an example. take a look here how you can format the api request: http://api.wunderground.com/weather/api/d/docs?d=data/index
@shivam13 welcome. its a public pen
Shivam Mehta
@shivam13
Jul 19 2016 07:43 UTC
ok
but thanks @sorinr
CamperBot
@camperbot
Jul 19 2016 07:43 UTC
shivam13 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 502 | @sorinr |http://www.freecodecamp.com/sorinr
kirbyedy
@kirbyedy
Jul 19 2016 07:43 UTC
@sorinr @shivam13 is it working in chrome for you?
Shivam Mehta
@shivam13
Jul 19 2016 07:44 UTC
yes @kirbyedy
kirbyedy
@kirbyedy
Jul 19 2016 07:44 UTC
hmmm
Shivam Mehta
@shivam13
Jul 19 2016 07:45 UTC
if its not working for you than first remove location from setting and try it
Sorin Ruse
@sorinr
Jul 19 2016 07:46 UTC
@kirbyedy yes. i am on chrome and its working
kirbyedy
@kirbyedy
Jul 19 2016 07:47 UTC
darn, does not work for me ?
mac or pc ?
Sorin Ruse
@sorinr
Jul 19 2016 07:47 UTC
@kirbyedy pc here
Shivam Mehta
@shivam13
Jul 19 2016 07:47 UTC
pc
kirbyedy
@kirbyedy
Jul 19 2016 07:47 UTC
maybe is this crappy mac then... well...
d1sr3
@d1sr3
Jul 19 2016 07:48 UTC
@sorinr I want it to be like that so I know which links I clicked yet and the other were good ideas thanks
CamperBot
@camperbot
Jul 19 2016 07:48 UTC
d1sr3 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 503 | @sorinr |http://www.freecodecamp.com/sorinr
Shivam Mehta
@shivam13
Jul 19 2016 07:48 UTC
check it on your mobile @kirbyedy
Sorin Ruse
@sorinr
Jul 19 2016 07:48 UTC
@d1sr3 welcome
kirbyedy
@kirbyedy
Jul 19 2016 07:52 UTC
works on mobile
Sorin Ruse
@sorinr
Jul 19 2016 07:52 UTC
@kirbyedy how do you have the locationsettled under permissions on chrome?
kirbyedy
@kirbyedy
Jul 19 2016 07:52 UTC
allowed for all
does not work in safari as well
Sorin Ruse
@sorinr
Jul 19 2016 07:53 UTC
@kirbyedy let me check it on edge
Ashan Mohammed
@AshanMohammed
Jul 19 2016 07:54 UTC
any resources that will teach me css color codes?
kirbyedy
@kirbyedy
Jul 19 2016 07:55 UTC
neaah... I give up
Sorin Ruse
@sorinr
Jul 19 2016 07:56 UTC
@kirbyedy in edge the location and temp is working but not showing the svgs
Shivam Mehta
@shivam13
Jul 19 2016 07:56 UTC
hey can you tell my how to add project on github??
svgs are not supported in opera mini too
Sorin Ruse
@sorinr
Jul 19 2016 08:05 UTC
@shivam13 go to github create a repository and then upload your files there
Joel Abees
@JoelAbees
Jul 19 2016 08:06 UTC
I know there are a lot of short comings but I finally did it. My tribute page challenge. http://codepen.io/JoelAbees/pen/LkQyWP
tell me what you think
Shivam Mehta
@shivam13
Jul 19 2016 08:08 UTC
but i want to add code of codepen @sorinr
DrYockel
@DrYockel
Jul 19 2016 08:11 UTC
hi! anyone have a good tip on whats a good front end offline editor? preferably free
Vyvojar123
@Vyvojar123
Jul 19 2016 08:12 UTC
hello how to do the simplest something like bar graph. I mean I have a table and I want to fill part of a cell. without absolute definition dimensions of table
Sorin Ruse
@sorinr
Jul 19 2016 08:16 UTC
@shivam13 copy it locally on your pc. verify that its still functional and after upload it to github
Shivam Mehta
@shivam13
Jul 19 2016 08:18 UTC
ok
:+1:
Greg Duncan
@GregatGit
Jul 19 2016 08:38 UTC
@DrYockel sublime is great - and when you are online you can link it with chrome
Hannah A M
@hmolette
Jul 19 2016 08:38 UTC
I am working on my tribute page but I can't seem to get my href's and article tags to work correctly
DrYockel
@DrYockel
Jul 19 2016 08:39 UTC
thanks Greg! havent heard of that one. I know Dreamweaver, but it's not free
NixonRichard
@NixonRichard
Jul 19 2016 08:44 UTC
Hi
Sorin Ruse
@sorinr
Jul 19 2016 08:45 UTC
@GregatGit sublime is really goodbut for some time i switched to atom. i just feel more comfortable using atom
DrYockel
@DrYockel
Jul 19 2016 08:45 UTC
ok another tool for the list. thanks
hey guyz
let s take a look at my portfolio
Vyvojar123
@Vyvojar123
Jul 19 2016 08:48 UTC
how to do the simplest something like bar graph. I mean I have a table and I want to fill part of a cell. without absolute definition dimensions of table
NixonRichard
@NixonRichard
Jul 19 2016 08:48 UTC
yes ?
hornedCherub
@hornedCherub
Jul 19 2016 08:57 UTC
Hey guys, anyone has an idea why chrome useragent would suddenly begin to override my styles?
Custom stylesheets are imported correctly and I can see it overriding them. And I'm using wordpress with my site.
Sorin Ruse
@sorinr
Jul 19 2016 08:57 UTC
This message was deleted
Nupur Gorian
@NupurGorian
Jul 19 2016 09:17 UTC
my <div class="container">is not showing any result
d1sr3
@d1sr3
Jul 19 2016 09:18 UTC

Hello I'm working with the twitch api and I might not get closed stream json :

$.ajax({
          dataType: 'json',
          type: 'GET',
          url: 'https://api.twitch.tv/kraken/streams/brunofin',
          success: function(response) {
                  console.log(response);
}
});

When I'm trying to do it with a normal unclosed stream I have no problems

anvarov
@anvarov
Jul 19 2016 09:30 UTC
@JoelAbees it is good, did you try to use bootstrap framework, it would add responsible design, and other miscellaneous features
kali12345
@kali12345
Jul 19 2016 09:31 UTC
<img class="smaller-image""thick green border"src="https://bit.ly/fcc-relaxing-cat">
is this right to put a thick green border around the phone app
cat app
Vyvojar123
@Vyvojar123
Jul 19 2016 09:35 UTC
how to do the simplest something like bar graph. I mean I have a table and I want to fill part of a cell. without absolute definition dimensions of table
d1sr3
@d1sr3
Jul 19 2016 09:41 UTC
@d1sr3 I solved mine
Sorin Ruse
@sorinr
Jul 19 2016 09:46 UTC
@d1sr3 yep. finally decided to keep "active" all visited links
Promise Tochi
@Promhize
Jul 19 2016 10:11 UTC
Hey guys, I am using the navigator.geolocaton api to get latitude and longitude to request for local weather from openweatheramap.org, its working but this requires a user to share his or location, i noticed that the example for the weather app challenge doesn't request for me to share my location. Is there another way to do this without using the navigator.geolocation api?
Sorin Ruse
@sorinr
Jul 19 2016 10:29 UTC
@Promhize use https://crossorigin.me/http://openweather bla bla bla
@Promhize sorry this one was for tricking cors problems with the api weather. as for geolocation u can try using http://ip-api.com/json
d1sr3
@d1sr3
Jul 19 2016 10:42 UTC
http://codepen.io/d1sr3/pen/WxrGaR?editors=1111 please look at variable "htt" why does JS run code which is behind forEach function before it actually finishes the function?
Promise Tochi
@Promhize
Jul 19 2016 10:42 UTC
@sorinr Thanks man!
CamperBot
@camperbot
Jul 19 2016 10:42 UTC
promhize sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 504 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Jul 19 2016 10:57 UTC
@d1sr3 try $.each(streams, function (key,value) {{... and url: 'https://api.twitch.tv/kraken/streams/' + streams[key],
Jakub Adamec
@jadamec16
Jul 19 2016 10:59 UTC

Hi guys, why in Firefox it doesn't work? ReferenceError: event is not defined

function createBoard() { 
  for (var i = 0; i < n; i++) {
    board_array[i] = new Array(n);
    for (var j = 0; j < n; j++) {
      var tile = document.createElement("div");
      tile.setAttribute("id", j + "-" + i);
      tile.onmousedown = function() {clickField(this, event);}; // THIS
      document.getElementById("board").appendChild(tile);
      board_array[i][j] = 0;
    }
  }
}

How can I do that? Thanks.

d1sr3
@d1sr3
Jul 19 2016 11:02 UTC
@sorinr it does the same
Sorin Ruse
@sorinr
Jul 19 2016 11:04 UTC
@d1sr3 are you closing the foreach in the right place?
@d1sr3 or maybe try to explain me what you mean by "JS run code which is behind forEach"
d1sr3
@d1sr3
Jul 19 2016 11:09 UTC
@sorinr Those console.logs which are behind the forEach are being called sooner than those in the forEach so when I want to add htt to an element at the end it's empty
Sorin Ruse
@sorinr
Jul 19 2016 11:15 UTC
@d1sr3 i will fork it and take a look but later. in the mean time if it helps take a look at the methods:updatestreamers: in my pen: http://codepen.io/sorinr/pen/EymkWr If you want to see it fully working here: http://codepen.io/sorinr/debug/EymkWr
NixonRichard
@NixonRichard
Jul 19 2016 11:15 UTC
hi guyz
Sorin Ruse
@sorinr
Jul 19 2016 11:15 UTC
@NixonRichard hi
Marc M
@Marc-Moeller
Jul 19 2016 11:15 UTC
Hi people
Sorin Ruse
@sorinr
Jul 19 2016 11:16 UTC
@flyyyperth hi there
NixonRichard
@NixonRichard
Jul 19 2016 11:16 UTC
u guyz can see that my sign in button is weird
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:16 UTC
Hello, I have a question of image sizing and positioning into bootstrap columns. I have 3 images with different sizes, that I want to place in a 3-column row, one on each, and wish that images stay in the center of each box, how can I adjust the images to be plaed in the center of the box?
Marc M
@Marc-Moeller
Jul 19 2016 11:16 UTC
I have a small question for menu text staying underlined even when user clicks somewhere else.
d1sr3
@d1sr3
Jul 19 2016 11:16 UTC
@sorinr ok thanks, hopefully I'll do it myself
CamperBot
@camperbot
Jul 19 2016 11:16 UTC
d1sr3 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 505 | @sorinr |http://www.freecodecamp.com/sorinr
NixonRichard
@NixonRichard
Jul 19 2016 11:16 UTC
  <button type="submit" class="pure-button pure-input-1-2 pure-button-primary">Sign in</button>
Marc M
@Marc-Moeller
Jul 19 2016 11:16 UTC
-->>> http://businessdemo1.xyz how do I keep the menu text underlined for as long as the user is on that page ?
NixonRichard
@NixonRichard
Jul 19 2016 11:17 UTC
@flyyyperth u have to show us the code , man
Marc M
@Marc-Moeller
Jul 19 2016 11:18 UTC
@NixonRichard sure thing, one sec
Sorin Ruse
@sorinr
Jul 19 2016 11:18 UTC
@NixonRichard .bt{float:right;} ?
NixonRichard
@NixonRichard
Jul 19 2016 11:19 UTC
that s for the buttons that i deleted
Marc M
@Marc-Moeller
Jul 19 2016 11:20 UTC

```<a class="current hvr-underline-from-center" href="#0"> Home </a>

.hvr-underline-from-center {

  1. display: inline-block;
  2. vertical-align: middle;
  3. -webkit-transform: translateZ(0);
  4. transform: translateZ(0);
  5. box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  6. -webkit-backface-visibility: hidden;
  7. backface-visibility: hidden;
  8. -moz-osx-font-smoothing: grayscale;
  9. position: relative;
  10. overflow: hidden;```
NixonRichard
@NixonRichard
Jul 19 2016 11:20 UTC
so it s kind of useless now
Sorin Ruse
@sorinr
Jul 19 2016 11:20 UTC
@NixonRichard delete it. its confusing. but where are this classes : "pure-button pure-input-1-2 pure-button-primary"
NixonRichard
@NixonRichard
Jul 19 2016 11:21 UTC
they r purecss s classes
<form class="pure-form">
    <fieldset class="pure-group">
        <input type="text" class="pure-input-1-2" placeholder="Username">
        <input type="text" class="pure-input-1-2" placeholder="Password">
        <input type="email" class="pure-input-1-2" placeholder="Email">
    </fieldset>

    <fieldset class="pure-group">
        <input type="text" class="pure-input-1-2" placeholder="A title">
        <textarea class="pure-input-1-2" placeholder="Textareas work too"></textarea>
    </fieldset>

    <button type="submit" class="pure-button pure-input-1-2 pure-button-primary">Sign in</button>
</form>
these r the full codes
Sorin Ruse
@sorinr
Jul 19 2016 11:25 UTC
@NixonRichard do you have a pure.css library that define those pure- classes because i see in your pen you have uploaded bootstrap and i haven't heard of a pure-... class definition ?
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:26 UTC
can I vertically align an image in html?
NixonRichard
@NixonRichard
Jul 19 2016 11:28 UTC
here @sorinr
Sorin Ruse
@sorinr
Jul 19 2016 11:29 UTC
@NixonRichard ok then where do you load it in your pen to be recognised?
Kevin
@KevinBruland
Jul 19 2016 11:30 UTC
@CarlosFerrerCeldran still trying to vertically align an image?
NixonRichard
@NixonRichard
Jul 19 2016 11:30 UTC
<head>

  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
i added the link here
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:30 UTC
yes, used center to adjust horizontally but can't seem to do it vertically
Sorin Ruse
@sorinr
Jul 19 2016 11:31 UTC
@NixonRichard put it after bootstrap.css
Kevin
@KevinBruland
Jul 19 2016 11:31 UTC
@CarlosFerrerCeldran do you want it centered vertically, or like snapped to the top / bottom?
Erklik
@Erklik
Jul 19 2016 11:31 UTC
Hey guys,
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:32 UTC
centered vertically please
NixonRichard
@NixonRichard
Jul 19 2016 11:32 UTC
<head>

  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
   <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
like this ? @sorinr
Erklik
@Erklik
Jul 19 2016 11:32 UTC
Quick Question / Seeking Advice, Does anyone know a good tutorial or source of info on how i would go about creating a Vertical Accordion like Navigation?
Kevin
@KevinBruland
Jul 19 2016 11:32 UTC
@CarlosFerrerCeldran I strongly advise checking out https://css-tricks.com/centering-css-complete-guide/
Sorin Ruse
@sorinr
Jul 19 2016 11:33 UTC
@NixonRichard yes but not twice. get rid of that above bootstrap
Kevin
@KevinBruland
Jul 19 2016 11:33 UTC
@CarlosFerrerCeldran I usually use flexbox, but that page is extremely useful... and will be useful in the future for helping to center things
d1sr3
@d1sr3
Jul 19 2016 11:33 UTC
@sorinr solved it you don't have to bother with it anymore
NixonRichard
@NixonRichard
Jul 19 2016 11:34 UTC
<head>

  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
   <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
it remained the same
d1sr3
@d1sr3
Jul 19 2016 11:35 UTC
@sorinr $.ajax() does asynchronous calls by default and it messed up everything
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:36 UTC
if I use flexbox, will that affect bootstrap's grid layout?
Kevin
@KevinBruland
Jul 19 2016 11:37 UTC
@CarlosFerrerCeldran it shouldn't, no
Sorin Ruse
@sorinr
Jul 19 2016 11:37 UTC
@d1sr3 yes. it does make calls async
Kevin
@KevinBruland
Jul 19 2016 11:38 UTC
@CarlosFerrerCeldran I frequently use flexbox and bootstrap together
Carlos
@CarlosFerrerCeldran
Jul 19 2016 11:38 UTC
ok, I'll try introducing flexbox and see what happens, thanks!
d1sr3
@d1sr3
Jul 19 2016 11:38 UTC
@CarlosFerrerCeldran I used margin-top/bottom:x vh when I needed to move something vertically
kirbyedy
@kirbyedy
Jul 19 2016 11:38 UTC
+1 for the flexbox :thumbsup:
very easy to work with
Sorin Ruse
@sorinr
Jul 19 2016 11:39 UTC
@d1sr3 use async: false in ajax call if you want it sync
NixonRichard
@NixonRichard
Jul 19 2016 11:40 UTC
hmm
@sorinr hey can u fix it ?
d1sr3
@d1sr3
Jul 19 2016 11:41 UTC
@sorinr yes I just googled it and .responseText at the end
Sorin Ruse
@sorinr
Jul 19 2016 11:42 UTC
@d1sr3 yep. i forgot to mention that :)
@NixonRichard yep. load your pen over http not https like: http://codepen.io/Ayanami_Rei/pen/zBRYdB
NixonRichard
@NixonRichard
Jul 19 2016 11:46 UTC
why did that happen ?
http and https
Sorin Ruse
@sorinr
Jul 19 2016 11:47 UTC
@NixonRichard because over https it does not load you pure.css
NixonRichard
@NixonRichard
Jul 19 2016 11:47 UTC
weirddd
...
do u think this pure.css s a good framework ?
it doesnt much stuffs as foundation or boostrap
but reponsive
and lightweight
Sorin Ruse
@sorinr
Jul 19 2016 11:49 UTC
@NixonRichard all of them are responsive. i haven't used it before but for curiosity i'll take a look at it
NixonRichard
@NixonRichard
Jul 19 2016 11:51 UTC
@sorinr ok then btw which one s better ? foundation or boostrap ?
i heard ppl say bootstrap s codes r messy
even they provide more stuffs
Sorin Ruse
@sorinr
Jul 19 2016 12:08 UTC
@NixonRichard you can start learning how boostrap works because it is widely used and you get faster answers on issues, then when you will understand the principles, its easy to switch to other frameworks
Daddyhughes111
@Daddyhughes111
Jul 19 2016 12:09 UTC
I'm really stuck on how to start the Build a Personal Portfolio Webpage challenge...
Carlos
@CarlosFerrerCeldran
Jul 19 2016 12:10 UTC
do I have to call flexbox like I do with bootstrap to use it?
Sorin Ruse
@sorinr
Jul 19 2016 12:11 UTC
@CarlosFerrerCeldran nope
Carlos
@CarlosFerrerCeldran
Jul 19 2016 12:12 UTC
ok, so I just have to add atributes to the container, making a class for .container with the atributes I want it to have, right?
Sorin Ruse
@sorinr
Jul 19 2016 12:12 UTC
@CarlosFerrerCeldran take a look here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
@CarlosFerrerCeldran the flex its for the layout part (grid as in bootstrap and other frameworks)
Carlos
@CarlosFerrerCeldran
Jul 19 2016 12:15 UTC
I did the layout with bootstrap, but need to center 3 images vertically and someone suggested using flexbox would do it
alternatly, is it possible to shrink an image to a max-height keeping the aspect ratio?
Evan
@EvanDCP
Jul 19 2016 12:26 UTC
hey guys can anyone help me build my portfolio? this is what I have so far but need help formatting! http://codepen.io/EvanDCP/pen/RRQLWP
anyone?
Carlos
@CarlosFerrerCeldran
Jul 19 2016 12:30 UTC
@EvanDCP Hi Evan, I suggest using a container div for the whole page, then separate divs with class row for each of the sections, like one for about me, another for portfolio and another for contact me sections
that will split the page into sections and organize the layout
Evan
@EvanDCP
Jul 19 2016 12:33 UTC
@CarlosFerrerCeldran thanks!! gonna try!
CamperBot
@camperbot
Jul 19 2016 12:33 UTC
evandcp sends brownie points to @carlosferrerceldran :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @carlosferrerceldran |http://www.freecodecamp.com/carlosferrerceldran
Evan
@EvanDCP
Jul 19 2016 12:39 UTC
@CarlosFerrerCeldran it hasn't changed anything :/
Niroshan Perera
@addland002
Jul 19 2016 13:28 UTC

hello, please help me to make imacro to click dynamic generate link.
need to click that link via imacro.

<div class="title" id="title-33">
<span itemprop="name">
<h2>
<a href="/story.php?id=33">Pahasu.lk | Free Classifieds Ads Sri lanka.</a>
</h2>
</span>

Thanks

Jomar Montuya
@jomz0918
Jul 19 2016 13:29 UTC
hi all
anyone here knows about css frameworks ? ive found website with top 10 framewoks see this http://backspacecorner.weebly.com/blog/top-10-web-development-front-end-frameworks-2016
i would like to ask is this is easy to use?
kirbyedy
@kirbyedy
Jul 19 2016 13:31 UTC
This message was deleted
Jakub Adamec
@jadamec16
Jul 19 2016 13:34 UTC
Hi guys, exist some app for mobile thanks to which I can test responsivity of html, css,js page?
My pen does what I would expect it to do. However, when I 'uncomment' lines 11&12 in javaScript in an attempt to filter out the fields I don't want, I get no quotes displayed. I have the developer console of chrome open and don't see any errors there... can someone help please?
kirbyedy
@kirbyedy
Jul 19 2016 13:35 UTC
@jadamec16 not sure, but I usually open the dev tools in chrome and there is an option to preview the site on mobile devices
Jakub Adamec
@jadamec16
Jul 19 2016 13:36 UTC
@kirbyedy I know, but it doesn't work correctly.. or?
kirbyedy
@kirbyedy
Jul 19 2016 13:36 UTC
well maybe its not 100% correct... but at least does something
for the dedicated app I really dont know
Jakub Adamec
@jadamec16
Jul 19 2016 13:37 UTC
@kirbyedy at least :D
kirbyedy
@kirbyedy
Jul 19 2016 13:37 UTC
you can add a custom device :)
Jakub Adamec
@jadamec16
Jul 19 2016 13:38 UTC
wow :D Problem is that Android works quite different
kirbyedy
@kirbyedy
Jul 19 2016 13:40 UTC
This message was deleted
This message was deleted
Carlos
@CarlosFerrerCeldran
Jul 19 2016 13:45 UTC
Hi again, I ended up resizing all images to same height, any suggestions on how to improve the portfolio pen?
somehow I have all images set to 200 height but it didn't quite work well...
Peter Kenward
@PeterKenward
Jul 19 2016 13:52 UTC
@CarlosFerrerCeldran , it's looking good. I think the project description calls for the ability to navigate to different sections of the page? Perhaps you could add that in?
Carlos
@CarlosFerrerCeldran
Jul 19 2016 13:54 UTC
yes, I think so too, going to get working on that, any suggestions on the image sizing? they don't show their full 200 height, maybe the grid system makes them smaller to fit the grid boxes width?
Peter Kenward
@PeterKenward
Jul 19 2016 13:59 UTC
Have a look at the bootstrap exercises you did... I believe one of them is on image sizing? You can also look up the bootstrap documentation. (Which is short for I would need to look it up) :)
Carlos
@CarlosFerrerCeldran
Jul 19 2016 14:00 UTC
a quick question, container-flex and img-responsive can be used at the same time without conflicts?
DrYockel
@DrYockel
Jul 19 2016 14:01 UTC
hi there. im having trouble with dropdown menus not working in codepen. no matter which example i paste in the "dropdown-menu" class does not seem to work
is this a bug?
Carlos
@CarlosFerrerCeldran
Jul 19 2016 14:01 UTC
maybe I should make the 3 boxes flexible, place an image on each, and make each image img-responsive?
Peter Kenward
@PeterKenward
Jul 19 2016 14:05 UTC
@CarlosFerrerCeldran I'm not so sure about container-flex, but img-responsive is what I have used for my images in bootstrap...
Mathew Joseph
@MathewtheCoder
Jul 19 2016 14:06 UTC
Hi fr8's I have two function f1 and f2, f1 consists of some setTimeouts so f2 is getting executed before f1 is finished.How can i use callback to deal with this
Carlos
@CarlosFerrerCeldran
Jul 19 2016 14:08 UTC
ok, I think that's the problem, fixing col-md-4 sets a maximum width for the column, so the image shrinks accordingly to fit inside
Shivam Mehta
@shivam13
Jul 19 2016 14:09 UTC
can any one tell me how to built up the wiki viewer??
DrYockel
@DrYockel
Jul 19 2016 14:10 UTC
ok i got it. in case any1 wants to know how to get dropdowns working. you need to import the js scripts. stupid me
Peter Kenward
@PeterKenward
Jul 19 2016 14:12 UTC
@CarlosFerrerCeldran I see you have bootstrap installed on your CSS page, I may be wrong here, but I think you have to add bootstrap in JS too?
Evan
@EvanDCP
Jul 19 2016 14:13 UTC
guys please help me format my website! this is what I have now:
Carlos
@CarlosFerrerCeldran
Jul 19 2016 14:13 UTC
Just did Peter, nothing changed with images
Evan
@EvanDCP
Jul 19 2016 14:14 UTC
also github link doesn't take me to my github account, it says wrong link, why is that?
Peter Kenward
@PeterKenward
Jul 19 2016 14:16 UTC
@CarlosFerrerCeldran maybe that's only needed when you have some javascript?
PeterKenward @PeterKenward isn't sure
Carlos
@CarlosFerrerCeldran
Jul 19 2016 14:17 UTC
don't worry, it's a bit minor issue Peter, thanks for the suggestions!
Peter Kenward
@PeterKenward
Jul 19 2016 14:19 UTC
I like the thin text btw
Eric Bezanson
@ericbezanson
Jul 19 2016 14:42 UTC
Hey Evan I'm not sure if you can nest a button inside an anchor element. Check out this link http://stackoverflow.com/questions/6393827/can-i-nest-a-button-element-inside-an-a-using-html5
Evan
@EvanDCP
Jul 19 2016 14:51 UTC
@ericbezanson I see, thanks man!
CamperBot
@camperbot
Jul 19 2016 14:51 UTC
evandcp sends brownie points to @ericbezanson :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @ericbezanson |http://www.freecodecamp.com/ericbezanson
Eric Bezanson
@ericbezanson
Jul 19 2016 14:52 UTC
No prob ! Hopefully that works!
sethun60
@sethun60
Jul 19 2016 15:36 UTC
Screenshot (439).png
Hey guys can you plz
help to find the mistake in my code
CamperBot
@camperbot
Jul 19 2016 15:37 UTC
no wiki entry for: to find the mistake in my code
sethun60
@sethun60
Jul 19 2016 15:37 UTC
It is not returning the desired output "pony" when gift is passed
Tyler Moeller
@TylerMoeller
Jul 19 2016 15:43 UTC
@sethun60 bracket notation is required when using variables: return myObj[checkProp] should work.
Marcus Eisele
@eiselems
Jul 19 2016 16:19 UTC
Just finished my prototype for a chat application? What do you think about it? https://node-socketio-chat.herokuapp.com/
Sonya Chan
@cysonya
Jul 19 2016 16:24 UTC
@eiselems pretty cool!
NixonRichard
@NixonRichard
Jul 19 2016 16:25 UTC
hi guyz
Sonya Chan
@cysonya
Jul 19 2016 16:25 UTC
@eiselems the images in 'online users' isn't showing though
can someone help make the images appear at the same size ?
Marcus Eisele
@eiselems
Jul 19 2016 16:25 UTC
@cysonya mhm strange for me it is
Sonya Chan
@cysonya
Jul 19 2016 16:26 UTC
@eiselems hmm after I refresh it twice it shows
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:30 UTC
hi guys
how y'all doing
needs some help with javascript
anyone to help?
Sonya Chan
@cysonya
Jul 19 2016 16:31 UTC
@Hoxtygen sure, what do you need help on?
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:32 UTC
If computerChoice is between 0 and 0.33, make computerChoice equal to "rock". @cysonya
Sonya Chan
@cysonya
Jul 19 2016 16:33 UTC
@Hoxtygen what do you have so far?
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:33 UTC
@cysonya how do you write that code using math.random() in javascriipt
@cysonya the question is to make the computer bahave in a manner if a number is chosen betwwn two extremes
@cysonya like make the computer behave this way if the user choses a number between 1 and 4
Sonya Chan
@cysonya
Jul 19 2016 16:35 UTC
@Hoxtygen I think I understand your question, what do you have coded so far?
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:37 UTC
@cysonya

@cysonya var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();

if (computerChoice = Math.random(0, 0.33)) { computerChoice = "rock";
} else if (computerChoice = Math.random(0.34, 0.66)) {
computerChoice = "paper";
} else (computerChoice = Math.random(0.67, 1)){
computerChoice = "scissors";

}
@cysonya iis that readable? i just copy and pasted it from the editor i'm using
Sonya Chan
@cysonya
Jul 19 2016 16:39 UTC
So you already set computerChoice to = Math.random(), at that point computerChoice equals to something between 0 and 1. In your if statement you don't need to set it to Math.random() again
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:41 UTC
@cysonya okay. so i should remove all instance of the math.random from the conditional statement? and what else?
Sonya Chan
@cysonya
Jul 19 2016 16:41 UTC
Also to check if computerChoice is between 0 and 0.33, you would need to use comparison operators which are (<, >, <=, >= etc..)
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:42 UTC
@cysonya i initially used =< but then it doesnt make sense to me
Sonya Chan
@cysonya
Jul 19 2016 16:42 UTC
@Hoxtygen what are you confused about? :P
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:44 UTC
@cysonya not really sure if its the right operator to use
@cysonya lest i forget i should thank you for your time
CamperBot
@camperbot
Jul 19 2016 16:45 UTC
hoxtygen sends brownie points to @cysonya :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @cysonya |http://www.freecodecamp.com/cysonya
Sonya Chan
@cysonya
Jul 19 2016 16:46 UTC
Hmm, ok let's check if computerChoice is between 0 and 0.33 first. How do you think you can check for that?
no problem :)
Wasiu Idowu
@Hoxtygen
Jul 19 2016 16:52 UTC
using =< @cysonya
Shivam Mehta
@shivam13
Jul 19 2016 16:53 UTC
hey any one help me with wikipedia viewer ??
Sonya Chan
@cysonya
Jul 19 2016 16:57 UTC
@Hoxtygen I've messaged you, might be easier to help you out there :D
Shivam Mehta
@shivam13
Jul 19 2016 16:59 UTC
i got the error when i click on the search button
Chris Rutherford
@cjrutherford
Jul 19 2016 17:08 UTC
Can i get a critique on my Pomodoro timer so far?
Dylan
@dhcodes
Jul 19 2016 17:24 UTC
@cjrutherford are you loading the timer or the bg image?
it doesn't really function yet, but I think I can see where you're going. Looks fine, but the bg image takes awhile to load so you might opt for a color or pattern
Chris Rutherford
@cjrutherford
Jul 19 2016 17:26 UTC
yeah, it's not functional just yet, and yeah I was thinking of using the loading bar as the timer visual.
the BG image is hosted somewhere out on the internet.... pulled in from google images.
mor1990
@mor1990
Jul 19 2016 17:36 UTC
Hi everyone
I'm having a bit of trouble with my Wikipedia viewer
Occasionally it will append the info for a split second and then disappear, but most of the time it just won't work.
Kevin
@KevinBruland
Jul 19 2016 17:41 UTC
@mor1990 im 90% sure its the form
@mor1990 and form control
@mor1990 delete the form element entirely and then try :)
@mor1990 just leave the inputs there
mor1990
@mor1990
Jul 19 2016 17:42 UTC
@Benalron thanks for the response, I'll give it a try
CamperBot
@camperbot
Jul 19 2016 17:42 UTC
mor1990 sends brownie points to @benalron :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @benalron |http://www.freecodecamp.com/benalron
Kevin
@KevinBruland
Jul 19 2016 17:43 UTC
@mor1990 you are lucky that I specifically dealt with <form> screwing up a wikipedia viewer page... took me a while to figure it out the first time
@mor1990 since I was so used to starting at the JS
Luke
@lukenetti3
Jul 19 2016 17:45 UTC
@mor1990 Yeah if you just change that form element to a div element it gets the results
mor1990
@mor1990
Jul 19 2016 17:45 UTC
@Benalron It worked, thanks again.
CamperBot
@camperbot
Jul 19 2016 17:45 UTC
mor1990 sends brownie points to @benalron :sparkles: :thumbsup: :sparkles:
:warning: mor1990 already gave benalron points
Kevin
@KevinBruland
Jul 19 2016 17:46 UTC
@mor1990 NP
Luke
@lukenetti3
Jul 19 2016 17:47 UTC
Can anyone help me with my Wikipedia Viewer. The code works fine, but my Javascript is a little messy. Any tips on how to clean up the .append section?http://codepen.io/lukenetti3/pen/akwEQk?editors=0010
Taras Yaremkiv
@Y-Taras
Jul 19 2016 18:01 UTC

Hello everyone. I was trying to make my background change on button click but it changes only one time. Any suggestions what it wrong in my JS code?

function removeBackground() {
    "use strict";

    var newColor = document.getElementsByTagName('p');
    var url1 = "url('http://saunders1865.com/wp-content/uploads/2014/10/poppy.jpg')";
    var url2 = "url('http://wallpapercave.com/wp/w9yJH4s.jpg')";

    function changeImage() {
        var temp = document.getElementsByClassName('demo-layout-transparent')[0];
        var newImage = temp.style.backgroundImage;
        if (newImage == url1) {
            newImage = url2;

        } else {

            newImage = url1;
            console.log('url1 ', url1);
            console.log('newImage = ', newImage);
        }

        temp.style.backgroundImage = newImage;
    }
    changeImage();

    for (let i = 0; i < newColor.length; i += 1) {
        newColor[i].style.color = "blue";
    }

}

a link to the page on the codepen is http://codepen.io/Y-Taras/pen/rLJPxd

Bhushan933
@Bhushan933
Jul 19 2016 18:17 UTC
Hi
Replace these two lines
the double quote is the diference
use outside single quote and inside single quote
I hope you got it ... are you?
Taras Yaremkiv
@Y-Taras
Jul 19 2016 18:22 UTC
Nope
as far as I concerned
One can't use inside and outside doublequotes ore singlequotes
Bhushan933
@Bhushan933
Jul 19 2016 18:23 UTC
no it will not create a problem, believe me it will work :)
blob
check out this image
click on it ... it will open in new tab
Taras Yaremkiv
@Y-Taras
Jul 19 2016 18:28 UTC
@Bhushan933 thanks) its unbelievable but it works
CamperBot
@camperbot
Jul 19 2016 18:28 UTC
:warning: could not find receiver for bhushan933
y-taras sends brownie points to @bhushan933 :sparkles: :thumbsup: :sparkles:
Bhushan933
@Bhushan933
Jul 19 2016 18:29 UTC
you welcome :)
Taras Yaremkiv
@Y-Taras
Jul 19 2016 18:29 UTC
@Bhushan933 it happend because in the url we must use double quotes?
Bhushan933
@Bhushan933
Jul 19 2016 18:30 UTC
yes, when you access the background property ... by default it wrap it in double quote
but I think you should use a flag rather than checking a background Image property
Marc Vesper
@marcvesper
Jul 19 2016 18:42 UTC
for the twitch api project, is it possible to make a single call for multiple stream objects, or will i have to iterate calls for each streamer in my array?
Kevin
@KevinBruland
Jul 19 2016 18:50 UTC
@marcvesper as far as I know, iterate for each streamer
@marcvesper same for channel info, no way to combine them unfortunately
Marc Vesper
@marcvesper
Jul 19 2016 18:50 UTC
@Benalron cheers, thought as much
Muhammad Hasham
@MohammadHasham
Jul 19 2016 19:08 UTC
how can i get geo location and use it in my local wweather machine??
Stephen James
@sjames1958gm
Jul 19 2016 19:10 UTC
@MohammadHasham If you are not using chrome (or are able to use https) - then use the geolocation api in the browser. Else, you can use something like http://ip-api.com/jsonwhich is by IP address an less accurate but enough so for the project
Daniel Sousa
@dgsousa
Jul 19 2016 19:20 UTC
Hey guys, does anyone know why font-size might be unresponsive inside the scope of a controller in angularjs?
Luke
@lhovee
Jul 19 2016 19:21 UTC
There isn't anyone in the HelpDataViz chatroom today so I'm here. Can anyone tell me why the React I put in the JS window isn't creating an h2 elem at the top center of my pen? I'm just learning React
http://codepen.io/lhovee/pen/zBpXXm
blackhat144
@blackhat144
Jul 19 2016 19:23 UTC
Can someone please help me with my tribute page? Why isn't the CSS border:none; for the quote class getting rid of the white smear on the left end of the green border for the first quote? Yesterday, I had the same problem, and fixed it with the aforementioned CSS- what am I doing this time that makes it not work?
Chris Rutherford
@cjrutherford
Jul 19 2016 19:25 UTC
question.... I'm re-vamping my portfolio and I want to have it go through an JSON object that houses all the information for my sections under Social media and Projects, and I'm not sure why it's not adding stuff to the appropriate sections..... http://codepen.io/christopherrutherford/pen/LkZANY
Stephen James
@sjames1958gm
Jul 19 2016 19:28 UTC
@cjrutherford $('social-content') this needs a . or # for class or id -
Chris Rutherford
@cjrutherford
Jul 19 2016 19:28 UTC
@sjames1958gm thanks again, blond moment....
CamperBot
@camperbot
Jul 19 2016 19:28 UTC
cjrutherford sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 2018 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 19 2016 19:28 UTC
@camperbot :)
Bhushan933
@Bhushan933
Jul 19 2016 19:29 UTC
@blackhat144 place border: none; at line no 8 in your index.css
Daniel Sousa
@dgsousa
Jul 19 2016 19:31 UTC
http://codepen.io/danielmooncloud/pen/BzYNbA?editors=1111 Does anyone know why font-size would be unresponsive inside the scope of the controller?
Chris Rutherford
@cjrutherford
Jul 19 2016 19:34 UTC
@sjames1958gm .... it still isn't doing it..... but I have another one that I did that I'm trying to recreate.....
blackhat144
@blackhat144
Jul 19 2016 19:35 UTC
@Bhushan933 it didn't work
Bhushan933
@Bhushan933
Jul 19 2016 19:36 UTC
@blackhat144 which browser you are testing ?
Muhammad Hasham
@MohammadHasham
Jul 19 2016 19:37 UTC
Ia m using google chrome how can i get geolocation using jquery?
Stephen James
@sjames1958gm
Jul 19 2016 19:37 UTC
@cjrutherford I found a div with id include # only the jquery reference should have the #
Kevin Norris
@kevinnorris
Jul 19 2016 19:39 UTC
@blackhat144 The blockquote element has a line on the left be default. Perhaps its a better idea to use a <p> or a header element, and then style this rather than use an element where you have to remove its default style to achieve the look you desire.
Chris Rutherford
@cjrutherford
Jul 19 2016 19:39 UTC
@sjames1958gm hmmm.... doesn't work with or without it though....
Bhushan933
@Bhushan933
Jul 19 2016 19:40 UTC
@blackhat144 on your codePen link I have placed it on line No 4 in CSS and it worked #first-quote{background-color:green; border-radius:5px 5px 28% 28%; margin:auto 10px 10px 10px; font-size:25px;border:none;}
Chris Rutherford
@cjrutherford
Jul 19 2016 19:41 UTC
@sjames1958gm found it.... was using $(document).load() instead of $(document).ready()
Philip Eckert
@pae4557
Jul 19 2016 19:42 UTC
Can anybody help me with my navbar on my portfolio? When its condensed, the button wont load a drop-down menu philipeckert.com
Stephen James
@sjames1958gm
Jul 19 2016 19:42 UTC
@cjrutherford Try document.ready not load - may be something weird with codepen and iframes
@cjrutherford lol - just saw that
Daniel Sousa
@dgsousa
Jul 19 2016 19:51 UTC
noone?
blackhat144
@blackhat144
Jul 19 2016 19:52 UTC
@Steedler thanks! you're right
CamperBot
@camperbot
Jul 19 2016 19:52 UTC
blackhat144 sends brownie points to @steedler :sparkles: :thumbsup: :sparkles:
:cookie: 315 | @steedler |http://www.freecodecamp.com/steedler
blackhat144
@blackhat144
Jul 19 2016 19:52 UTC
@Bhushan933 thanks also!
CamperBot
@camperbot
Jul 19 2016 19:52 UTC
blackhat144 sends brownie points to @bhushan933 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for bhushan933
blackhat144
@blackhat144
Jul 19 2016 19:53 UTC
@Steedler could you help me with the margins on my second quote?
Bhushan933
@Bhushan933
Jul 19 2016 19:57 UTC
quick question ... why I am getting the error mark saying "could not find receiver for bhushan933" when someone giving me brownie points ?
blackhat144
@blackhat144
Jul 19 2016 19:57 UTC
maybe you werent online then?
lemme try again
thanks @Bhushan933 !
CamperBot
@camperbot
Jul 19 2016 19:57 UTC
blackhat144 sends brownie points to @bhushan933 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for bhushan933
blackhat144
@blackhat144
Jul 19 2016 19:57 UTC
nooooo
Bhushan933
@Bhushan933
Jul 19 2016 19:58 UTC
@blackhat144 you see ... the error
blackhat144
@blackhat144
Jul 19 2016 20:01 UTC
yup idk why that's happening
Could someone please help me with the margins on my second quote? here's the codepen
I want the text to be wrapped inside the main <div> (so that all the text is inside the background color) and a left-margin of 40px
blackhat144
@blackhat144
Jul 19 2016 20:08 UTC
also I want the text farther down the page- how would I do that?
Bhushan933
@Bhushan933
Jul 19 2016 20:13 UTC
@blackhat144 where is the second quote ?
Bhushan933
@Bhushan933
Jul 19 2016 20:19 UTC
@blackhat144 you can give me the points now I have linked it with FCC
blackhat144
@blackhat144
Jul 19 2016 20:24 UTC
Could I get some feedback on my tribute page please? HUGE thanks to everyone who helped me with it.
Dylan
@dhcodes
Jul 19 2016 20:30 UTC
@blackhat144 i like that you just used markdown to post that link
classy
blackhat144
@blackhat144
Jul 19 2016 20:30 UTC
thanks lol
reddit has taught me well
Dylan
@dhcodes
Jul 19 2016 20:32 UTC
@blackhat144 looks good but on mobile it seems like everything below the picture/headline goes to the right or isn't centered
blackhat144
@blackhat144
Jul 19 2016 20:32 UTC
hmm
how would I go about fixing that?
Dylan
@dhcodes
Jul 19 2016 20:32 UTC
I'd also add some padding on mobile
blackhat144
@blackhat144
Jul 19 2016 20:32 UTC
any padding lessons I should look at?
Bhushan933
@Bhushan933
Jul 19 2016 20:33 UTC
Hi, I want to work on responsive design, I want a partner for this who can design the layout in PSD
blackhat144
@blackhat144
Jul 19 2016 20:33 UTC
and how would I make the padding only apply for mobile?
Dylan
@dhcodes
Jul 19 2016 20:33 UTC
@blackhat144 to fix the centering issue, add a media query for mobile devices that adds margin:0 auto; for mobile devices
same, media query
blackhat144
@blackhat144
Jul 19 2016 20:33 UTC
thanks @dhcodes
CamperBot
@camperbot
Jul 19 2016 20:33 UTC
blackhat144 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1226 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Jul 19 2016 20:34 UTC
you don't really need a padding tutorial, just use a media query to select you text and then add padding: 2vw; or something
blackhat144
@blackhat144
Jul 19 2016 20:34 UTC
what's a media query? i cn't find and good w3schools lessons
can't*
Dylan
@dhcodes
Jul 19 2016 20:35 UTC
@blackhat144 here's an example of how to use them
blackhat144
@blackhat144
Jul 19 2016 20:35 UTC
thanks
abhijith shenoy
@shenoyabhijith
Jul 19 2016 20:37 UTC
guys how to add image in code pen
images are not loading
any 1 der?
blackhat144
@blackhat144
Jul 19 2016 20:50 UTC
@shenoyabhijith use the <img> tag
<img src="link-to-image" alt="alt-text">
dhuddleston
@dhuddleston
Jul 19 2016 20:56 UTC
Working on the Tic-Tac-Toe project. This is still early on, I don't need help with anything in particular yet, just wanted to see if I'm on the right track: http://codepen.io/dhuddleston/pen/yJvPjL?editors=1010
abhijith shenoy
@shenoyabhijith
Jul 19 2016 20:59 UTC
thanks dude @blackhat144
CamperBot
@camperbot
Jul 19 2016 20:59 UTC
shenoyabhijith sends brownie points to @blackhat144 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for blackhat144
Ayush Sharma
@a-y-u-s-h
Jul 19 2016 21:04 UTC

Hey, I was making a random CSS transition thingy earlier some hours ago, (not a fcc challenge) and I just noticed that something's wrong with the output.

Here's my pen:
http://codepen.io/a-y-u-s-h/pen/VjQNpG?editors=0100

The problem is, I applied the same CSS for all li elements, but the first card flips a bit differently than the others. Anyone knows how to fix that?

Just when one hovers out of the first card, that character flips back with some sort of glitch, which is not observed in other cards.
Revaz Nakhutsrishvili
@hirevaz
Jul 19 2016 21:12 UTC
Hey guys :-) I just finished my first project here and I want to hear your thoughts about this (please)… http://codepen.io/hiRevaz/pen/xOYBXE
Fazila Kizakkaypattuthodi
@siyafazila
Jul 19 2016 21:12 UTC
hey! Just finished coding the personal portfolio webpage. Would love to get some feedback on it pls.
http://codepen.io/siyafazila/pen/NAXPdR
Revaz Nakhutsrishvili
@hirevaz
Jul 19 2016 21:14 UTC

@siyafazila Nice one but why you didn’t make hero image’s width 100%? that would be better I think..

PS. I also finished my first project here and please see and let me know what are you thinking :) http://codepen.io/hiRevaz/pen/xOYBXE

Fazila Kizakkaypattuthodi
@siyafazila
Jul 19 2016 21:15 UTC
@hirevaz which image?? i'll check urs
@hirevaz the overview menu list and your social icon list is passing through the page as I scrolled down.
Revaz Nakhutsrishvili
@hirevaz
Jul 19 2016 21:17 UTC
@siyafazila http://i58.photobucket.com/albums/g268/siyafazila/snappa_1468500471_zpsazgczz2t.jpg <— That one.. I checked your code and everything is ok but this image is too small for desktop…
@siyafazila It’s fixed for better user experience.. main links always follows you :D
Ken Haduch
@khaduch
Jul 19 2016 21:19 UTC
@pae4557 - it appears that you are not loading jQuery.js - not sure about your URL? Try https://code.jquery.com/jquery-2.2.4.min.js and see?
Fazila Kizakkaypattuthodi
@siyafazila
Jul 19 2016 21:19 UTC
@hirevaz I did make it 100% width. It's not fitting the screen huh? Any sugeestions I can get it fixed?
Revaz Nakhutsrishvili
@hirevaz
Jul 19 2016 21:22 UTC
@siyafazila image is too small.. use bigger image please :-))
Fazila Kizakkaypattuthodi
@siyafazila
Jul 19 2016 21:24 UTC
@hirevaz thnk u:)
Revaz Nakhutsrishvili
@hirevaz
Jul 19 2016 21:52 UTC
@siyafazila You’re welcome ^_^
max77p
@max77p
Jul 19 2016 22:09 UTC
anyone here done the twitch app?
need some help please
what is the best way to just get the logo if a stream is offline?
var twitchArr = ["monstercat","freecodecamp", "noobs2ninjas"];

twitchArr.forEach(function(twitch) {
  $.getJSON('https://api.twitch.tv/kraken/streams/' + twitch, function(data) {

    if(data.stream===null){

    }
  });
});
in this case how would i write the code? because if a stream is offline then i cant simply go into data.stream.channel.logo
Rada
@Radascript
Jul 19 2016 22:12 UTC
@max77p I didn't add the logos but they should still show up in the data object no?
ah
for example this is offline..so i would have to go into data._links.channel
i am wondering does this mean i have to do another json call?
or is there a easier way of grabbing the logo if its null
stuck on this lol
Kevin K. Lee
@kevinkiklee
Jul 19 2016 22:15 UTC
@max77p oh man. that was the exact problem i had when i designed it. i had to build a separate function. let me take a look at my code.
Rada
@Radascript
Jul 19 2016 22:16 UTC
@max77p ah I see sorry, not sure how to do that, I didn't like that challenge and did nothing other than fulfill the bare necessary user stories, my app looks like a potato
Kevin K. Lee
@kevinkiklee
Jul 19 2016 22:17 UTC
@max77p yep, i also did two separate json calls. i also used data.stream like you did. i had one json call when data.stream was null, and another json call when data.stream was not null.
Kevin K. Lee
@kevinkiklee
Jul 19 2016 22:24 UTC
wow. i just looked at my fcc calendar.
it took me 8 days to start from scratch and finish upto the twitch api.
and i had never really touched JS before.
fucking a. i solved 112 problems on one day. i'm an addict.
Carlos
@CarlosFerrerCeldran
Jul 19 2016 22:27 UTC
Hi guys, why do I keep getting this error on images?
Failed to load resource: the server responded with a status of 403 (Forbidden)
Kevin K. Lee
@kevinkiklee
Jul 19 2016 22:27 UTC
@CarlosFerrerCeldran need more context. what are you trying to do
Carlos
@CarlosFerrerCeldran
Jul 19 2016 22:31 UTC
It happens to images with an href="http://wheretheimageis/image.png or jpg"
max77p
@max77p
Jul 19 2016 22:31 UTC
@iserbit sweet thanks! so i guess thats okay to make two json calls
CamperBot
@camperbot
Jul 19 2016 22:31 UTC
max77p sends brownie points to @iserbit :sparkles: :thumbsup: :sparkles:
:cookie: 289 | @iserbit |http://www.freecodecamp.com/iserbit
max77p
@max77p
Jul 19 2016 22:31 UTC
and i guess i am on the right track then
Kevin K. Lee
@kevinkiklee
Jul 19 2016 22:35 UTC
@max77p yep good luck dude.
Ken Haduch
@khaduch
Jul 19 2016 22:36 UTC
@CarlosFerrerCeldran - not all service providers will allow you to link to pictures on their site - for example, imgur forbids cross-linking. Other times is might be a matter of trying to access your page with https:// and the images with http:// - mixing transport types causes some issues. If you have a link to a project where you are trying to do this, perhaps we can confirm what the problem is?
Carlos
@CarlosFerrerCeldran
Jul 19 2016 22:39 UTC
Found the mistake, there was typo error with https and http, thanks for the information on the picture linking from sites!
Nicolas Reboredo
@nicolasmdf
Jul 19 2016 22:43 UTC
hey guys, could I maybe get some help? Im working on the weather app and I have a few questions about geolocation
Ken Haduch
@khaduch
Jul 19 2016 23:01 UTC
@nicolasmdf - geolocation only works on the Chrome browser when you use https:// transport, but if you are using the free version of openweather, then http:// is required for that, so they won't cooperate together. The workaround is to use the IP-based site http://ip-api.com/json which only works on http://. Firefox supports (at least as of my last check) geolocation on http:// so it will work there, but you don't know what browser people will be using. I don't know if that gives you an answer for your question or if you have another? So you can potentially try the geolocation, and if it returns an error, then fall back to the ip-api site. Or just use http://ip-api.com/json, potentially less accurate, but I don't really think that you need accuracy so much as to learn the techniques and design the site to work reliably.
Luke
@lhovee
Jul 19 2016 23:03 UTC
Hey guys, can someone give me some ideas for how to reduce the amount of code I'm using here?
$("#state2").click(function() {
 $.getJSON("https://fcctop100.herokuapp.com/api/fccusers/top/alltime", function(data) {  
   $("#username1").html(data[0].username);
      $("#recent1").html(data[0].recent);
      $("#total1").html(data[0].alltime);
      $("#username2").html(data[1].username);
      $("#recent2").html(data[1].recent);
      $("#total2").html(data[1].alltime);
      $("#username3").html(data[2].username);
      $("#recent3").html(data[2].recent);
      $("#total3").html(data[2].alltime);
      $("#username4").html(data[3].username);
      $("#recent4").html(data[3].recent);
      $("#total4").html(data[3].alltime);
      $("#username5").html(data[4].username);
      $("#recent5").html(data[4].recent);
      $("#total5").html(data[4].alltime);
    });
Rada
@Radascript
Jul 19 2016 23:08 UTC
@lhovee you can make an array of names and write a function that takes in paramenters "name" and "index" and does this for each name in an array?
Ken Haduch
@khaduch
Jul 19 2016 23:10 UTC
@lhovee - yes, as @Radascript says, make a function that loops over an array, generates the ID names that you are generating by appending the index value to the strings #username, #recent, and #total - you might also have fixed divs or something in your HTML - you can generate the appropriate number of divs and append them to the DOM in a similar way, using jQuery.
Luke
@lhovee
Jul 19 2016 23:14 UTC
@Radascript something like this?
var arr = [username1, username2, etc]
for (var i=0; i<arr.length; i++) {$("#arr[i]).html(data[i].username}
@khaduch could you give me a snippet of what that might look like if I was trying to use React to add the appropriate number of divs to the DOM?
kayzon
@quezanw
Jul 19 2016 23:19 UTC
for the twitch api project is it bad practice to use a for loop instead 'for each' to interate through my array to get the channel name and attach it to the api url?
Ken Haduch
@khaduch
Jul 19 2016 23:22 UTC
@lhovee - I don't know React at all - I don't know if it would be different there vs. a jQuery example?
Luke
@lhovee
Jul 19 2016 23:23 UTC
@khaduch no worries, thank you for the help!
CamperBot
@camperbot
Jul 19 2016 23:23 UTC
lhovee sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1452 | @khaduch |http://www.freecodecamp.com/khaduch
Luke
@lhovee
Jul 19 2016 23:23 UTC
@Radascript thank you for the help!
CamperBot
@camperbot
Jul 19 2016 23:23 UTC
lhovee sends brownie points to @radascript :sparkles: :thumbsup: :sparkles:
:cookie: 367 | @radascript |http://www.freecodecamp.com/radascript
Coy Sanders
@coymeetsworld
Jul 19 2016 23:31 UTC
@quezanw don't see a problem using either way of looping
Luke
@lhovee
Jul 19 2016 23:35 UTC
@Radascript @khaduch hey guys, I tried implementing the suggestion you gave me and came up with this. I'm thinking the format of the getJSON and click can't deviate from what the program expects .... ideas?
var arr = [username1, recent1, total1, username2, recent2, total2, username3, recent3, total3, username4, recent4, total4, username5, recent5, total5];
$(document).ready(function() {
  $("#state2").click(function() {
 $.getJSON("https://fcctop100.herokuapp.com/api/fccusers/top/alltime", function(data) {
      for (var i = 0; i < arr.length; i++) {
        if (i == 0 || i == 3 || i == 6 || i == 9 || i == 12) {
          $("#arr[i]").html(data[i].username)
        };
        else if (i == 1 || i == 4 || i == 7 || i == 10 || i == 13) {
          $("#arr[i]").html(data[i].recent)
        };
        else if (i == 2 || i == 5 || i == 8 || i == 11 || i == 14) {
          $("#arr[i]").html(data[i].total)
        };
      };
    });
  });
or maybe I didn't write this very well .... suggestions much appreciated
Coy Sanders
@coymeetsworld
Jul 19 2016 23:39 UTC
think your semicolons are misplaced @lhovee, i would look into that as a potential issue
Luke
@lhovee
Jul 19 2016 23:39 UTC
@coymeetsworld okay I will, thank you
CamperBot
@camperbot
Jul 19 2016 23:39 UTC
lhovee sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1260 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jul 19 2016 23:39 UTC
also your jQuery selectors are probably not what you want either
its not going to evaluate i in there, its a String
Luke
@lhovee
Jul 19 2016 23:41 UTC
@coymeetsworld dang. How can I use jQuery with this array? I'm trying to abbreviate this code:
$("#state1").click(function() {
    $.getJSON("https://fcctop100.herokuapp.com/api/fccusers/top/recent", function(data) {
      $("#username1").html(data[0].username);
      $("#recent1").html(data[0].recent);
      $("#total1").html(data[0].alltime);
      $("#username2").html(data[1].username);
      $("#recent2").html(data[1].recent);
      $("#total2").html(data[1].alltime);
      $("#username3").html(data[2].username);
      $("#recent3").html(data[2].recent);
      $("#total3").html(data[2].alltime);
      $("#username4").html(data[3].username);
      $("#recent4").html(data[3].recent);
      $("#total4").html(data[3].alltime);
      $("#username5").html(data[4].username);
      $("#recent5").html(data[4].recent);
      $("#total5").html(data[4].alltime);
    });
  });
this is supposed to be repeated 100 times and I know writing 300 lines is the wrong answer
Coy Sanders
@coymeetsworld
Jul 19 2016 23:42 UTC
you can still do that, just saying that "arr[i]" won't evaluate i or arr[i] for you
it will look for the id literally named "arr[i]"
Luke
@lhovee
Jul 19 2016 23:42 UTC
@coymeetsworld don't I have to leave the "" in the jQuery?
Coy Sanders
@coymeetsworld
Jul 19 2016 23:43 UTC
no you can put variables in there
the variable will have to be a String I believe
Luke
@lhovee
Jul 19 2016 23:44 UTC
@coymeetsworld I see! fantastic I appreciate it
Coy Sanders
@coymeetsworld
Jul 19 2016 23:44 UTC
like for example I have this in my Twitch code:
var iconColumn = $('<div>');
$(iconColumn).appendTo(channelItem);
also have something like this in my Simon code:
$(buttonObj.buttonID).css('background', buttonObj.buttonBG);
buttonObj is a JSON object and buttonID is a String property
Luke
@lhovee
Jul 19 2016 23:52 UTC
@coymeetsworld I'm closer to something that works I think. Can you take a look at this and see if you can determine why it's not working?
$.getJSON("https://fcctop100.herokuapp.com/api/fccusers/top/alltime", function(data) {
      var arr = ["#username1", "#recent1", "#total1", "#username2", "#recent2", "#total2", "#username3", "#recent3", "#total3", "#username4", "#recent4", "#total4", "#username5", "#recent5", "total5"];
      for (var i = 0; i < arr.length; i++) {
        if (i == 0 || i == 3 || i == 6 || i == 9 || i == 12) {
          $(arr[i]).html(data[i].username);
        } else if (i == 1 || i == 4 || i == 7 || i == 10 || i == 13) {
          $(arr[i]).html(data[i].recent);
        } else if (i == 2 || i == 5 || i == 8 || i == 11 || i == 14) {
          $(arr[i]).html(data[i].total);
        }
      };
    });
  });
Coy Sanders
@coymeetsworld
Jul 19 2016 23:54 UTC
that can be improved too, but I have another question, why do you need to add these to an id?
unless you're doing something that specifically targets each section that's probably not necessary
maybe just using jQuery's append would be better if you're just listing out users
Luke
@lhovee
Jul 19 2016 23:55 UTC
@coymeetsworld I'm open to suggestions!
https://codepen.io/lhovee/pen/zBpXXm?editors=1010#0
Coy Sanders
@coymeetsworld
Jul 19 2016 23:55 UTC
have you done all the Front End projects yet @lhovee?
Pitmation
@Pitmation
Jul 19 2016 23:56 UTC
I am having issues with jQuery. Can someone give me guidance on how to make my name menu stay on top of page while all other content scrolls beneath it?
Coy Sanders
@coymeetsworld
Jul 19 2016 23:57 UTC
don't think that's a jQuery issue @Pitmation, you can solve that with CSS if you want to fix the placement of something
max77p
@max77p
Jul 19 2016 23:57 UTC
@coymeetsworld hey i am having trouble passing a function value into another function
hoping you can help me?
Coy Sanders
@coymeetsworld
Jul 19 2016 23:58 UTC
which part?
max77p
@max77p
Jul 19 2016 23:58 UTC
i want to pass the twitchLogo function here into the function below if (data.stream===null)
right now for simplicity sake i just want it to output to console