These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Oct 2016
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 00:00
@kat-mag @kat-mag to be honest i have no idea on how to do it..
Jack Lyons
@JackEdwardLyons
Oct 13 2016 00:08
@jdc101214 if you want a full image background then this code should work
```
background-img: url('YOUR_URL') no-repeat center center fixed;
background-size: cover;
background-img: url('YOUR_URL') no-repeat center center fixed;
background-size: cover;
background-image
haha sorry
but currently you've set the image to the homepage link? what's up there?
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:16
Stuck I need to add a Tweet button to my quote machince. Could someone help me get started with this? http://codepen.io/jkmullen/pen/pbKByY
Stephen
@stephepush
Oct 13 2016 00:24
hi, my random quote generator isn't working. Can someone look over the code?
http://codepen.io/stephepush/pen/dXQKjW
Tyler Moeller
@TylerMoeller
Oct 13 2016 00:27
@stephepush The forismatic api appears to be down. My quote machine isn't working either right now. To verify, follow the link you're passing to the API: http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?
Stephen
@stephepush
Oct 13 2016 00:27
ah okay, @TylerMoeller
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:31
Hello??????????????????????
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:31
@MrJkmullen just use the tweet sharing url over a tweet button .. you decode the url by sharing any page from the existing share buttons (content of the tweet is included in the url)
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:32
No sure what you mean @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:32
@MrJkmullen hold on
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:34
I place one on my page but its real basic http://codepen.io/jkmullen/pen/pbKByY @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:35
@MrJkmullen hmmm....so you need help with css html or API ?
@MrJkmullen hmmm....you could use fontawsome icons for small twitter logo
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:37
the api and css , I wanted to look somewhat like the real twitter bird @Mr-Kumar-Abhishek ....I displayed it in the html
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:38
@MrJkmullen get the icons from searching here
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:39
ok do i place that in html @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:40
@MrJkmullen you will need to add their css (which is in a CDN) in your setting of the code pen then
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:41
? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:42
@MrJkmullen only adding their html will not bring the bird , you will need to add their css file too
@MrJkmullen you could get the link from here https://cdnjs.com/libraries/font-awesome
@MrJkmullen if you have trouble understanding the ask , or I will not know how much is needed to be explained
@MrJkmullen if you have trouble understanding then ask , or I will not know how much is needed to be explained
Cristina Patrao
@crisrp
Oct 13 2016 00:45
@MrJkmullen @Mr-Kumar-Abhishek on codepen, going into settings of the pen, then css tab is the perfect place to insert that link that points to the fontawesome library
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:47
@crisrp ahh..thanks , :) forgot font awsome is included in settings section ??
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:48
I added to css and html and still not display @Mr-Kumar-Abhishek http://codepen.io/jkmullen/pen/pbKByY
Cristina Patrao
@crisrp
Oct 13 2016 00:48
@Mr-Kumar-Abhishek no problem, it's a nice feature but tricky for me to find at first
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:49
@crisrp oh sorry , i thought it was already available like bootstrap in settings section
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:49
@crisrp I See!
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:50
@crisrp you still need add the files from cdn isn't though ?
@MrJkmullen add the file links from cdn like I gave you before ? :)
@MrJkmullen or you could use other cdn links too
Johnathan Mullen
@MrJkmullen
Oct 13 2016 00:52
just did @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:54
@MrJkmullen hmm.... still no icon let me see what you are missing there
Cristina Patrao
@crisrp
Oct 13 2016 00:54
@MrJkmullen @Mr-Kumar-Abhishek you're missing the button element, that's important, or there's nothing to click on. Nest the <i> element inside the button element next to whatever text you want the button to display
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 00:56
@MrJkmullen you need to do that what @crisrp has said but first fix your link in settings
@MrJkmullen open this page and you will get the links but don't include this link https://cdnjs.com/libraries/font-awesome
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:03
I need somebody to display some text I can't understand @Mr-Kumar-Abhishek @crisrp http://codepen.io/jkmullen/pen/pbKByY Am i close?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:05
@MrJkmullen I am checking your code ... button is placed now add the fontawsome html int
html in it
@MrJkmullen hold on
@MrJkmullen i am getting ahead here. first add the last link I gave in the settings (css section) [ no codes are required in this ]
@MrJkmullen
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:08
Should be in there already at the bottom @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:09
@MrJkmullen link is wrong this is what found in the current refresh of the page https://cdnjs.com/libraries/font-awesome
@MrJkmullen notice the .css ending of the link
@MrJkmullen got it ? :)
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:12
Got it now I need to to actually send it to twitter @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:14
@MrJkmullen that is fine looking tweet button :) now to use the tweet url
@MrJkmullen this is tweet URL `http://www.twitter.com/intent/tweet?text=<tweet text goes here>``
@MrJkmullen ignore the less than and greater than sign too <>
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:18
as a a href ? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:20
@MrJkmullen yes but keep the target as new ~
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:22
is it placed correctly? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:23
@MrJkmullen hold on checking ~
@MrJkmullen no, you have to wrap the button in anchor tag ~
@MrJkmullen pseudo-code -> <a><button></button></a>
@MrJkmullen href attribute should be the url I gave but don't forget concat your quote inside that link
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:31
I wrapped it but when i click it gives me and error. and it changes the quot because of my onclick function inJS @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:32
@MrJkmullen checking you code ...
@MrJkmullen minor bugs.... you need to remove the ticks from the URL
@MrJkmullen also.. once it is done and working for a single url , you have to write a js function to update that link so it corresponds with the quote
Brad Jackson
@hakeon
Oct 13 2016 01:38
hello all, i am working in CodePen on my tribute page and wondering if it is possible to use an image with the free CodePen platform? the usual <img src"" doesn't seem to work, and all the help options point to a paid level platform??? thanks
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:40
@MrJkmullen <a href ="http://www.twitter.com/intent/tweet?text="> this should be the correct line (for now ) but it will change with every new quote from a js function
@hakeon host the image someplace flicker or imgur or whatever and then hotlink to code pen
@hakeon hope it help ^_^
Brad Jackson
@hakeon
Oct 13 2016 01:43
@Mr-Kumar-Abhishek :: yeah... thought i had, but i'll try again (just good to know it should work) must be me... if i continue to struggle, i'll post the code for review... thanks!
CamperBot
@camperbot
Oct 13 2016 01:43
hakeon sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 384 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:44
@hakeon send the codepen link here and I could take quick look and check if something is wrong
Brad Jackson
@hakeon
Oct 13 2016 01:46
@Mr-Kumar-Abhishek || <div id="pageCenterColumn" class="col-md-8">
<img scr="http://www.jambands.com/images/2016/01/20/58089/lemmy-vodka.png" alt="Lemmy" style="width:128px;height:128px;">
</div>
Michael Karpinski
@karpimpski
Oct 13 2016 01:46
http://codepen.io/karpimpski/pen/ALdQNZ hey guys, I'm just about done my checkers game but I've got one last bug. when a King tries to double-jump a piece JavaScript gets an error saying that it has exceeded the maximum memory stack or something along those lines. that happens at my isValidMove function. can anybody take a look?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:48
@hakeon it would be src not scr
Michael Karpinski
@karpimpski
Oct 13 2016 01:48
http://codepen.io/karpimpski/pen/ALdQNZ hey guys, I'm just about done my checkers game but I've got one last bug. when a King tries to double-jump a piece JavaScript gets an error saying that it has exceeded the maximum memory stack or something along those lines. that happens at my isValidMove function. can anybody take a look?
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:48
@Mr-Kumar-Abhishek on fixed the onclick but when i hit the tweent button it goes to a white page?
Brad Jackson
@hakeon
Oct 13 2016 01:48
@Mr-Kumar-Abhishek || are you kiddin' me! doh! <sheepish> thanks...
CamperBot
@camperbot
Oct 13 2016 01:48
hakeon sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:warning: hakeon already gave mr-kumar-abhishek points
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:49
@MrJkmullen checking ~
Brad Jackson
@hakeon
Oct 13 2016 01:50
@MrJkmullen :: yup... that did it... thanks! so many chars, so few eyes
CamperBot
@camperbot
Oct 13 2016 01:50
hakeon sends brownie points to @mrjkmullen :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @mrjkmullen |http://www.freecodecamp.com/mrjkmullen
Monesul Haque
@mones-cse
Oct 13 2016 01:51
@richa-coder thanks ::)
CamperBot
@camperbot
Oct 13 2016 01:51
mones-cse sends brownie points to @richa-coder :sparkles: :thumbsup: :sparkles:
:cookie: 52 | @richa-coder |http://www.freecodecamp.com/richa-coder
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:51
@hakeon no problem :p
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:54
? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:54
@MrJkmullen <a target="_blank" href ="http://www.twitter.com/intent/tweet?text="> keep target blank or new ~
Johnathan Mullen
@MrJkmullen
Oct 13 2016 01:55
whats the difference? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 01:55
@MrJkmullen next step is to write its js function ~
@MrJkmullen codepen will not render twitter in its own interface , so it is needed in order to open it in new tab
@MrJkmullen also check here for indepth difference of blank and new http://stackoverflow.com/questions/4964130/target-blank-vs-target-new
Johnathan Mullen
@MrJkmullen
Oct 13 2016 02:00
q function that displays i wording in the twitter app? @Mr-Kumar-Abhishek
HBarefoot
@Elgalo87
Oct 13 2016 02:02
hello get stuck
need help

function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line

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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Instructions
Modify function multiplyAll so that it multiplies the product variable by each number in the sub-arrays of arr
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:03
@MrJkmullen you could extend you existing js function to update anchor tag of the tweet also..
@MrJkmullen it will go something like... $("#tweet_this").attr('href', 'http://www.twitter.com/intent/tweet?text=' + ...
silver537
@silver537
Oct 13 2016 02:05
@Elgalo87 what have you done so far?
HBarefoot
@Elgalo87
Oct 13 2016 02:06
This message was deleted
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:06
@MrJkmullen you could put in any class or ID
HBarefoot
@Elgalo87
Oct 13 2016 02:07
@silver537 i just delet it to start again
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:08
@Elgalo87 what is the problem in understanding or solving the challenge ?
HBarefoot
@Elgalo87
Oct 13 2016 02:10
@Mr-Kumar-Abhishek solving the challenge
@Mr-Kumar-Abhishek i tried different ways but nothing
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:12
@Elgalo87 show us a incomplete/non working way and we will fix it ;)
HBarefoot
@Elgalo87
Oct 13 2016 02:12
@Mr-Kumar-Abhishek let me made it again
Johnathan Mullen
@MrJkmullen
Oct 13 2016 02:15
what element would i give the class to ? @Mr-Kumar-Abhishek
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:16
@MrJkmullen why anchor tag of course , because there is what you want to change the href tag isn't it ?
Dan-1
@Dan-1
Oct 13 2016 02:16
Hey any advice as to how to add social media buttons in codepen?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:17
@Dan-1 it depends , if you are asking for full facebook like , share etc you need to follow their API documentation
if it really simple stuff you could just hack your way through ~
Dan-1
@Dan-1
Oct 13 2016 02:18
I just want a button that they can click to view my profile. Im having trouble getting a facebook button in codepen
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:19
@Dan-1 give the codepen link :)
Also having nav bar difficulties :frowning:
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:21
@Dan-1 checking ...
Johnathan Mullen
@MrJkmullen
Oct 13 2016 02:21
@Mr-Kumar-Abhishek ? not working
HBarefoot
@Elgalo87
Oct 13 2016 02:21
@Mr-Kumar-Abhishek

function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
   for (var i = 0; i < arr.length; i ++){
     for(var j = 0; j < arr[i].length; j ++){
      product += arr[i].length * arr[j].length;

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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:22
@Dan-1 you start by taking the icons from here http://fontawesome.io/icons/
@Dan-1 then hyperlink you profile addresses
@MrJkmullen where is the problem ?? hold on though
@Elgalo87 challange name ??
Dan-1
@Dan-1
Oct 13 2016 02:24
@Mr-Kumar-Abhishek I tried those and still no luck. i cant get the icon to appear
HBarefoot
@Elgalo87
Oct 13 2016 02:25
@MrJkmulleNesting For Loops
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:26
@MrJkmullen please if it is not too much of a trouble assist @Dan-1 till check your code
@Elgalo87 alright ...
Dan-1
@Dan-1
Oct 13 2016 02:27
Thank you for your help @Mr-Kumar-Abhishek
CamperBot
@camperbot
Oct 13 2016 02:27
dan-1 sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 385 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
HBarefoot
@Elgalo87
Oct 13 2016 02:28
@Dan-1 whats your code ?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:29
@Dan-1 lol you will have to wait ~ I just answer in order the questions others are there to help too
Dan-1
@Dan-1
Oct 13 2016 02:29
Oh sorry I was giving it to @Elgalo87
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:30
*in order the questions come
@Dan-1 np
HBarefoot
@Elgalo87
Oct 13 2016 02:30
@Dan-1 what do you want me to help you
Dan-1
@Dan-1
Oct 13 2016 02:31
I cant get any social media Icons to show up
HBarefoot
@Elgalo87
Oct 13 2016 02:31
@give a mint
silver537
@silver537
Oct 13 2016 02:31
@Elgalo87 why are you multiplying by the length of the areay?
@Dan-1 i have some in this page
Amit Patel
@AmitP88
Oct 13 2016 02:34
hey guys, I'm stuck on the Testing Objects for Properties. I think i'm close, it's just my return statement I can't seem to get right
here's my code:
HBarefoot
@Elgalo87
Oct 13 2016 02:34
@silver537 give me an idea
Amit Patel
@AmitP88
Oct 13 2016 02:34

// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
// Your Code Here
myObj.hasOwnProperty("gift");
myObj.hasOwnProperty("pet");
myObj.hasOwnProperty("bed");

return checkProp;
}

// Test your code by modifying these values
checkObj("gift");

I know I wrote the function right, but I just don't know why my return statement isn't working
silver537
@silver537
Oct 13 2016 02:36
@Elgalo87 multiply by the number you are currently in.
Johnathan Mullen
@MrJkmullen
Oct 13 2016 02:36
@Elgalo87 I was trying to get my function to print the quote in the tweeet after i click it ..http://codepen.io/jkmullen/pen/pbKByY?editors=1010
silver537
@silver537
Oct 13 2016 02:37
@AmitP88 you're returning just the variable. you're not even accessing the object.
Amit Patel
@AmitP88
Oct 13 2016 02:37
so would it be return checkObj(checkProp); ?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:38
@MrJkmullen this should be in the getquote() $(".tweet_this").attr("href", "http://www.twitter.com/intent/tweet?text=" + randomquote + randomauthor);
HBarefoot
@Elgalo87
Oct 13 2016 02:38
@Dan-1 ```
<div class="a2a_kit a2a_kit_size_32 a2a_floating_style a2a_vertical_style" style="left:0px; top:40%;">
       <a class="a2a_button_facebook"></a>
       <a class="a2a_button_twitter"></a>
       <a class="a2a_button_google_plus"></a>
       <a class="a2a_button_pinterest"></a>
      </div>
     <script async src="https://static.addtoany.com/menu/page.js"></script>
  </div>
@Dan-1 that's the code
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:39
@MrJkmullen not outside it.
silver537
@silver537
Oct 13 2016 02:39
@AmitP88 checkObj is the function. use the actual object's name
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:39
@MrJkmullen also do check how i didn't us quotes for variables
silver537
@silver537
Oct 13 2016 02:40
@MrJkmullen use an API.
Amit Patel
@AmitP88
Oct 13 2016 02:40
@silver537 I'm confused =/
it's not myObj right?
silver537
@silver537
Oct 13 2016 02:41
@AmitP88 here: myObj.hasOwnProperty("gift"); you're accessing the object.
here: return checkProp; you're not
HBarefoot
@Elgalo87
Oct 13 2016 02:41
@silver537 bro no idea, can you help me to understand my challenge
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:41
@MrJkmullen @MrJkmullen also do check how i didn't use quotes for variables
Amit Patel
@AmitP88
Oct 13 2016 02:42
@silver537 hmmm, I tried this: return myObj.hasOwnProperty("");
and I got false output
silver537
@silver537
Oct 13 2016 02:42
@Elgalo87 how do you access the inner most element?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:42
@MrJkmullen hope this helps ~ ask here again if it is not solved
silver537
@silver537
Oct 13 2016 02:43
@AmitP88 .hasOwnProperty(""); returns a boolean value. which is what the name suggests. "does the object have this property?" yes/no
but how do you access the actual object with the variable?
Dan-1
@Dan-1
Oct 13 2016 02:43
Thank you @Elgalo87
CamperBot
@camperbot
Oct 13 2016 02:43
dan-1 sends brownie points to @elgalo87 :sparkles: :thumbsup: :sparkles:
:cookie: 216 | @elgalo87 |http://www.freecodecamp.com/elgalo87
HBarefoot
@Elgalo87
Oct 13 2016 02:43
arr[0] @silver537
silver537
@silver537
Oct 13 2016 02:44
@Elgalo87 that's the outer element. im talking about the inner element.
Amit Patel
@AmitP88
Oct 13 2016 02:44
@silver537 myObj.gift() ?
Johnathan Mullen
@MrJkmullen
Oct 13 2016 02:44
thank you @Mr-Kumar-Abhishek
CamperBot
@camperbot
Oct 13 2016 02:44
mrjkmullen sends brownie points to @mr-kumar-abhishek :sparkles: :thumbsup: :sparkles:
:cookie: 386 | @mr-kumar-abhishek |http://www.freecodecamp.com/mr-kumar-abhishek
silver537
@silver537
Oct 13 2016 02:44
@AmitP88 with variables, you have to use bracket notation. just like with arrays.
Amit Patel
@AmitP88
Oct 13 2016 02:46
@silver537 oooh I see. so it would be: myObj["gift"]; ?
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:46
@MrJkmullen there would be more bugs to clear though
silver537
@silver537
Oct 13 2016 02:46
@AmitP88 thats the right idea. but you're supposed to use the parameter(variable)
HBarefoot
@Elgalo87
Oct 13 2016 02:47
@silver537 inner element is same as child element?
Amit Patel
@AmitP88
Oct 13 2016 02:47
hmmm, ok. so myObj[checkProp]; ?
silver537
@silver537
Oct 13 2016 02:47
@AmitP88 bingo
Amit Patel
@AmitP88
Oct 13 2016 02:49
@silver537 hmm ok. so that passed 2/3 tests. now I'm trying to figure out how to test for a property that isn't there ("house")
silver537
@silver537
Oct 13 2016 02:49
@Elgalo87
        v-v---v-v-v--- inner elements   
[1,2,3,[1,2],[3,4,5]]
 ^-^-^-----outer elements
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:50
@MrJkmullen right forgot one thing ~ `
$(".tweet_this").attr("href", "http://www.twitter.com/intent/tweet?text=" + text(randomquote) + " -- " text(randomauthor);` don't forget to wrap the vars in text !!
@MrJkmullen $(".tweet_this").attr("href", "http://www.twitter.com/intent/tweet?text=" + text(randomquote) + " -- " text(randomauthor); don't forget to wrap the vars in text !!
silver537
@silver537
Oct 13 2016 02:51
@AmitP88 use an if statement that checks for the property, if true; return that property's value, if false return what ever they want as false
HBarefoot
@Elgalo87
Oct 13 2016 02:52
This message was deleted
This message was deleted
Amit Patel
@AmitP88
Oct 13 2016 02:52
@silver537 yeah, I was trying to do that just now, but it was throwing errors. lemme try it again
HBarefoot
@Elgalo87
Oct 13 2016 02:53
@silver537 like this myArr[1]
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:54
@MrJkmullen correction `
$(".tweet_this").attr("href", "http://www.twitter.com/intent/tweet?text=" + text(randomquote) + " -- "  + text(randomauthor);`
@MrJkmullen correction $(".tweet_this").attr("href", "http://www.twitter.com/intent/tweet?text=" + text(randomquote) + " -- " + text(randomauthor);
silver537
@silver537
Oct 13 2016 02:55
@Elgalo87
myArr = [[1,2],[3,4],[5,6,7]]

myArr[1] // [3,4]
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 02:55
@MrJkmullen after this it should work ...no bugs in the vicinity ...hmm...
Amit Patel
@AmitP88
Oct 13 2016 02:55
@silver537 hmm, my if statement doesn't seem to be working:
silver537
@silver537
Oct 13 2016 02:55
@Elgalo87 but we want just one number. how do we do this???
Amit Patel
@AmitP88
Oct 13 2016 02:56

// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
// Your Code Here
if (myObj.hasOwnProperty("gift"),
myObj.hasOwnProperty("pet"),
myObj.hasOwnProperty("bed")
) {
return myObj[checkProp];
}
else {
return "Not Found";
}

}

// Test your code by modifying these values
checkObj("house");

silver537
@silver537
Oct 13 2016 02:56

myObj.hasOwnProperty("gift"),
myObj.hasOwnProperty("pet"),
myObj.hasOwnProperty("bed")

this is on repeat. we have a variable that does this for us...

Amit Patel
@AmitP88
Oct 13 2016 02:57
checkProp?
silver537
@silver537
Oct 13 2016 02:57
yeeeeeeep
Amit Patel
@AmitP88
Oct 13 2016 02:57
ah ok
it passed :)
@silver537 thank you! man, I'm gonna study this function again because it confused me
CamperBot
@camperbot
Oct 13 2016 02:58
amitp88 sends brownie points to @silver537 :sparkles: :thumbsup: :sparkles:
:cookie: 621 | @silver537 |http://www.freecodecamp.com/silver537
Amit Patel
@AmitP88
Oct 13 2016 02:59
I think i'm thinking too hard about this lol
I need to think more "generic"
HBarefoot
@Elgalo87
Oct 13 2016 02:59
@silver537 might like this Arr[i][1].1
silver537
@silver537
Oct 13 2016 03:00

@AmitP88 objects gives you two ways of accessing their properties.
dot notation, and bracket notation.

dot notation are only meant for valid words like those you would use to declare variables(e.i you can declare a variable beginning with numbers or symbols)

Amit Patel
@AmitP88
Oct 13 2016 03:01
ah ok. and bracket notation is for array properties right?
silver537
@silver537
Oct 13 2016 03:02
@AmitP88 bracket notation gives you the ability to access properties using actual variables or numbers, or words with spaces.
var obj = {
  "hello you": "ITS ME",
  1: "hi",
  YOU: "WIN"
}
var num = "YOU"

obj[num] // 'WIN'

obj["hello you"] // 'ITS ME'

obj.num // undefined
Amit Patel
@AmitP88
Oct 13 2016 03:03
ah ok. I get it now ;)
silver537
@silver537
Oct 13 2016 03:04

@Elgalo87 array0 grabs inner arrays.

depending on how many subarrays you have within subarrays, will determine how many brackets you would use.

@Elgalo87 so basically the answer to your problem is this, : product *= arr[i][j]
HBarefoot
@Elgalo87
Oct 13 2016 03:06
thanks @silver537 :+1:
CamperBot
@camperbot
Oct 13 2016 03:06
elgalo87 sends brownie points to @silver537 :sparkles: :thumbsup: :sparkles:
:cookie: 622 | @silver537 |http://www.freecodecamp.com/silver537
Daniel
@DanielMW34
Oct 13 2016 03:26
Anybody familiar with getting/working with <input type="number"> ? I cannot seem to get the number from this input into a variable in order to do anything with it
Daniel
@DanielMW34
Oct 13 2016 03:31
using JavaScript / jQuery that is... :)
c0d0er
@c0d0er
Oct 13 2016 03:31
could anybody help to find out why the following code doesnt work? i want to remove all the whitespace and -s
"10 (757) 622-7382".replace(/\s+\+/gi,'')
Haphaxard "Scott"
@Haphaxard
Oct 13 2016 03:36
@DanielMW34 send me the full lecture link
working on the Pomodoro Timer
Haphaxard "Scott"
@Haphaxard
Oct 13 2016 03:37
k
Daniel
@DanielMW34
Oct 13 2016 03:38
@Haphaxard I just need to get the breakLength and sessionLength into my javascript
Daniel
@DanielMW34
Oct 13 2016 03:47
@Haphaxard do I need to put the <input> tags inside a <form> tag ? I can't believe I am getting stuck on this
Ken Haduch
@khaduch
Oct 13 2016 04:10
@DanielMW34 - you don't need to have input tags inside a form tag - you can read them with jquery or javascript - you probably won't want to submit a form for pomodoro anyway?
Daniel
@DanielMW34
Oct 13 2016 04:13
@khaduch I'm looking to submit the input values from breakSession and sessionLength
for some reason, none of the prescribed methods seems to be working
Ken Haduch
@khaduch
Oct 13 2016 04:14
@DanielMW34 -- Uncaught TypeError: document.getElementbyID is not a function - is the error being generated by clicking the button...
Daniel
@DanielMW34
Oct 13 2016 04:15
hmmmm
I had also tried $("#sessionLength").val(); however, I had no such luck there either
Ken Haduch
@khaduch
Oct 13 2016 04:16
@DanielMW34 - two things - the function is document.getElementById("sessionLength").value, and you have to put id="sessionLength" on your input form element...
Daniel
@DanielMW34
Oct 13 2016 04:17
@khaduch so....
<input type="number" name="sessionLength" min="1" max="60" value="30" style="text-align:center;">

should be changed to ....

<input type="number" id="sessionLength" min="1" max="60" value="30" style="text-align:center;">

or should I include "name=" as well as "id=" ?

@khaduch thank you, I finally got it to work
CamperBot
@camperbot
Oct 13 2016 04:20
danielmw34 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1786 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 13 2016 04:20
@DanielMW34 - I left the name attribute on there as well, but I don't know if you'll need it.
Daniel
@DanielMW34
Oct 13 2016 04:21
funny how these little nuances seem to cause all the problems
@khaduch seriously, thank you, I had been banging my head for a while due to that one
CamperBot
@camperbot
Oct 13 2016 04:21
danielmw34 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: danielmw34 already gave khaduch points
Ken Haduch
@khaduch
Oct 13 2016 04:22
I looked at the browser console as I tried to run it - it pointed out the errors about the function, and then when I got the correct function name, a second error TypeError: Cannot read property 'value' of null. That told me that it could not find the element with that ID...
Glad to help out! But I'm retiring for the night now... good luck!
Daniel
@DanielMW34
Oct 13 2016 04:44
@khaduch if I knew to do that, I would probably consider myself an actual 'developer'
Ken Haduch
@khaduch
Oct 13 2016 04:46
@DanielMW34 - you should spend some time to familiarize yourself with the developer's tools in the browser - there are some videos way down on the FCC map. Can be very helpful at times! B ut you have to take it a step at a time. Building a good "tool box" is an important thing!
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:10
hey guys i just want to make my tic tac toe randomly place an X or O as computer and play a simple game before embarking on the proper algorithm
could anyone help look over my code thus far?
it's a bit messy, im sorry
this is the code in particular which needs work
else if (opponent === "AI") {
            if (player_mark === "X")  {
              markTiles(this, "X", "O", player_mark_X, i) 

              let activeTiles = document.getElementsByClassName("active-tile");
              // pick a random tile and fill it
              var randomTile = gameboard.children[Math.floor(Math.random() * activeTiles.length + 1)];
              randomTile.dataset.check = "O";
              player_mark_O.push(randomTile);
              // randomTile.style.pointerEvents = "none";
           } else {
             this.dataset.check = "O";

              // Push mark into new array
              player_mark_O.push(i);
              // Check which tile was clicked to compae with winning tiles 
              console.log(`PLAYER X: ${player_mark_O}`);
              this.style.pointerEvents = "none";
              let activeTiles = document.getElementsByClassName("active-tile");
              // pick a random tile and fill it
              var randomTile = gameboard.children[Math.floor(Math.random() * activeTiles.length + 1)];
              randomTile.dataset.check = "X";
              // randomTile.style.pointerEvents = "none";
           }
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:26
ive modified it slightly now
but i suppose i really need just a few minutes to chat through it in real time :(
Mike
@Mikecar91
Oct 13 2016 05:28
im stuck on what seems like a easy problem lol
i am trying to put text within a box that i am able to resize and center onto my page
but i can not figure it our for the life of me
say i wanted to put this in a box
<p>HELP ME</p>
what do i do?
i have tried creating a class. i have tried nesting it withing the <p> element
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:31
do you have a pen @Mikecar91
?
Mike
@Mikecar91
Oct 13 2016 05:31
yes
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:32
you need to add some css to your box
Mike
@Mikecar91
Oct 13 2016 05:33
i know for sure i am doing something wrong lol
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:33
soemthing like this might work
.center-div
{
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background-color: #ccc;
like this ?
.center-div
{
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

<p class="center-div">Hello</p>
@Mikecar91
or maybe check out this blog post if that code above doesn't work
Mike
@Mikecar91
Oct 13 2016 05:37
omg the first one worked
i just have to play around with it until its just right
thanks so much man
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:38
cool
Mike
@Mikecar91
Oct 13 2016 05:38
can i give u brownie points? lol how do i do that?
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:38
you're welcome
haha
write thanks and @ My username
Mike
@Mikecar91
Oct 13 2016 05:39
thanks @JackEdwardLyons
CamperBot
@camperbot
Oct 13 2016 05:39
mikecar91 sends brownie points to @jackedwardlyons :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @jackedwardlyons |http://www.freecodecamp.com/jackedwardlyons
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:39
haha :)
Mike
@Mikecar91
Oct 13 2016 05:39
eh that was easy lol
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:39
good job
what r u working on btw?
Mike
@Mikecar91
Oct 13 2016 05:39
im doing the "build a tribute Page" section
this is what i have so far, just trying to add little touches to clean it up and make it stand out more
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:41
cool ill take a look
Mike
@Mikecar91
Oct 13 2016 05:41
thnx
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:41
dude take advantage of bootstraps responsive classes
like img-responsive
in your case the div needs a width
to be responsive
Mike
@Mikecar91
Oct 13 2016 05:45
im gonna have to work on that tomorrow
i gotta to go bed lol, i got work in 4 hrs
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:45
yeah something like .img1 img { margin: 0 auto width: 90%; }
Mike
@Mikecar91
Oct 13 2016 05:45
this shit is addicting lol
Jack Lyons
@JackEdwardLyons
Oct 13 2016 05:45
.img1 img {
  margin: 0 auto
  width: 90%;
}
cool
well done
Mike
@Mikecar91
Oct 13 2016 05:46
thnx for all the help though
seriously helpful!!
snickerz
@snickerz
Oct 13 2016 06:46
Got a question maybe someone can help me on the tribute page do you have to do it as in the video or can you choose something else??
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 06:47
@snickerz the idea is to folow the path, but you could do something else, but what do you have in mind?
snickerz
@snickerz
Oct 13 2016 06:48
well I am doing it on my grandpa
who would you believe it used cnc
have you done the tribute page??
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 06:51
@snickerz yeah, i did page on Ansel Adams, but i think page about your grandpa is ok, the key is to use html/css and basic framework like bootstrap it doesn't matter who is on the page ;)
snickerz
@snickerz
Oct 13 2016 06:51
was it easy to launch on the help chat thingy?
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 06:52
what do you mean?
snickerz
@snickerz
Oct 13 2016 06:53
to share the link on the help chat as other pple do?? when I first started lol
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 06:55
yeah
snickerz
@snickerz
Oct 13 2016 06:58
well thanx@ @MrBruckner
CamperBot
@camperbot
Oct 13 2016 06:58
snickerz sends brownie points to @mrbruckner :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @mrbruckner |http://www.freecodecamp.com/mrbruckner
RakeshNerkar
@Rakesh18754
Oct 13 2016 07:03
var chartDivContainer =  thumbnail ? $("#graph-thumbnail-chart") : $("#showChart");
var chartObject1 = bubbleChart(chartDivContainer);
is this the right syntax to pass a jqury object to a function?
c0d0er
@c0d0er
Oct 13 2016 07:09
does anybody know what is the difference between ^(IMG\d+\.png)$ and ^(IMG\d+)\.png$? what is the difference with or without the ()?
silver537
@silver537
Oct 13 2016 07:21
anyone awake?
kat-mag
@kat-mag
Oct 13 2016 07:25
not fkn yet. Need coffee
silver537
@silver537
Oct 13 2016 07:32
i hate this jquery slide down jump.
kat-mag
@kat-mag
Oct 13 2016 07:34
you could stop after 'jquery' ;d
Arman Vasilyan
@armvas
Oct 13 2016 07:40

Hello everyone. Soo. I've finished making the Show the Local Weather project,it works ok on my PC (brackets IDE setup), but I get this warning in codepen which breaks my API (openweathermap.org API)
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz

for more details.
How do I deal with this?
http://codepen.io/799arman/pen/ZpRxrO

silver537
@silver537
Oct 13 2016 08:28
i havn't created a function for changing the units. but this is what i got. :D
http://codepen.io/Silver537/full/gwKvmg/
Artur Giniyatullin
@ArturGini96
Oct 13 2016 08:40
Hello guys. Im STUCKED for 2 weeks at Local f"""" weather. Iwas so angry that I just watched FCC vidoe at youtube and copied it. And it still doesnt work:
http://codepen.io/arturthemagnificent/pen/VKAvxv/?editors=1010
What am I doing wrong
NatixDev
@NatixDev
Oct 13 2016 08:51
Hi guys, I'm working on a new test project and I need help for something, I would like to block the scroll or don't let the user see the band after #content2 when a user scroll to see the #content2, and the same thing when a user scroll back to #content1 he mustn't see a part of the header
http://s.codepen.io/NatixDev/debug/ALxrZY I tried with a scolltop inside my If and else if but it blocks definitely the scroll to the header or the band, I don't know which condition I should add to fix it
kat-mag
@kat-mag
Oct 13 2016 08:51
@ArturGIni96 check your JS brackets.
NatixDev
@NatixDev
Oct 13 2016 08:55
I know it blocks because my if condition will repeat the scrolltop if I add it inside, I'm just trying to find a way or to know if I made a mistake in my code
Miczysko
@Miczysko
Oct 13 2016 09:05
@ArturGIni96 as @kat-mag said, check your brackets, codepen analizyer is screaming about them. Also when u finally run the code you may have to use https cors; https://crossorigin.me/ paste this to ur var api so it will look like
var api = 'https://crossorigin.me/api.openweathermap.org/data/2.5/weather?lat='+lat+'&lon='+long+'&appid='+apikey;
Serton
@Serton
Oct 13 2016 10:00
Hi everyone
how can I call jQuery on codepen?
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 10:01
@Serton hi, go to settings, JavaScript and select jquery from drop down list
Hans Ng
@hans-ng
Oct 13 2016 10:02
@Serton Hi Serton, go to Settings - Javascript - choose jQuery from Quick-add
Serton
@Serton
Oct 13 2016 10:02
ok thank you
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 10:03
here on chat we thank with brownies, just include our names in thank you message :D (not that I insist on something) :+1:
Serton
@Serton
Oct 13 2016 10:08
like
thank you @MrBrukcner
?
CamperBot
@camperbot
Oct 13 2016 10:08
serton sends brownie points to @mrbrukcner :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for mrbrukcner
Serton
@Serton
Oct 13 2016 10:08
thank you Piotr Malecki-Jurek
damn not quite
lol
thank you @MrBruckner
CamperBot
@camperbot
Oct 13 2016 10:08
serton sends brownie points to @mrbruckner :sparkles: :thumbsup: :sparkles:
:cookie: 318 | @mrbruckner |http://www.freecodecamp.com/mrbruckner
Serton
@Serton
Oct 13 2016 10:09
thank you @hans-ng
CamperBot
@camperbot
Oct 13 2016 10:09
serton sends brownie points to @hans-ng :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @hans-ng |http://www.freecodecamp.com/hans-ng
Piotr Małecki-Jurek
@piotr-m-jurek
Oct 13 2016 10:12
great job, and welcome to the friendliest community evah! :D
Miguel
@MiguelMB
Oct 13 2016 11:25
Hi everyone , Is a good idea conect direct to App android using a SQL server (is a small app for company that use maybe 50 people no more )
Beth
@bethstc
Oct 13 2016 11:37
I've been stuck on the "Build a Tribute Page" for over 4 weeks now. I can't seem to figure out how to add an image from the web so that it shows up nice and big. I
This is what I typed: <div class="thumbnail"><a href="http://www.freeimages.com/search/dog"><img src="photo/dog-1402134" alt="Dog"></a>
kat-mag
@kat-mag
Oct 13 2016 11:38
@bethstc why would you split that url
@bethstc just add it as src
in the image tag
Beth
@bethstc
Oct 13 2016 11:39
Ok. Let me try that.
@kat-mag I did that, but nothing shows up in the view window. There is a tiny thumbnail box without any image.
kat-mag
@kat-mag
Oct 13 2016 11:42
what's the url you're trying to put there?
Beth
@bethstc
Oct 13 2016 11:43
It's from a free image site: http://www.freeimages.com/photo/dog-1402134
kat-mag
@kat-mag
Oct 13 2016 11:43
but that's not an image. that's a website
you need to choose an img you want from those pictures ;D
Beth
@bethstc
Oct 13 2016 11:45
That worked! I'm not understanding why, though.
kat-mag
@kat-mag
Oct 13 2016 11:46
because it ends with an image filename...
A_A
@Otto-AA
Oct 13 2016 11:47
@bethstc you need to link the picture itself, not the page on which you can see it
Volcyy
@Volcyy
Oct 13 2016 11:47
hey guys, for the random quote machine task, is there an API I should use or just enter the quotes manually ?
Beth
@bethstc
Oct 13 2016 11:48
I see. Thank you so much! I was stuck on that issue for way too long. Cheers @Otto-AA and @kat-mag
CamperBot
@camperbot
Oct 13 2016 11:48
bethstc sends brownie points to @otto-aa and @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 371 | @kat-mag |http://www.freecodecamp.com/kat-mag
:cookie: 297 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 13 2016 11:48
@Volcyy I used http://forismatic.com/en but you can do it both ways
Volcyy
@Volcyy
Oct 13 2016 11:49
thanks! @Otto-AA
CamperBot
@camperbot
Oct 13 2016 11:49
volcyy sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @otto-aa |http://www.freecodecamp.com/otto-aa
Ajinkya
@Ajinkya5509
Oct 13 2016 12:05
hi i"m Stuck at twitch.tv json task ...I need help about how to do it ?
algo will be great !!
A_A
@Otto-AA
Oct 13 2016 12:11
@Ajinkya5509 what do you mean with algo?
Ajinkya
@Ajinkya5509
Oct 13 2016 12:13
algorithm
A_A
@Otto-AA
Oct 13 2016 12:16
@Ajinkya5509 Sry, have to go in a few minutes and I don't really get where exactly you're stuck at :/
Anyway, you can use this example response from twitch if you are stuck with a key or somth: https://gist.githubusercontent.com/QuincyLarson/2ff6892f948d0b7118a99264fd9c1ce8/raw/ab163d77f2c37c19a1441025609bc60bd91ce53e/Twitch%2520sample%2520API%2520responses%2520in%2520array%2520form
Ajinkya
@Ajinkya5509
Oct 13 2016 12:17
thnx
A_A
@Otto-AA
Oct 13 2016 12:17
@Ajinkya5509 Bye, I hope you'll do it ;)
tcar
@tcar
Oct 13 2016 12:22
i have problem with twitch.tv api... here is my code, if anybody can help http://codepen.io/Tcar/pen/JRpgmj?editors=0011
Stephen James
@sjames1958gm
Oct 13 2016 12:24
@tcar Twitch API requires a client id now - https://discuss.dev.twitch.tv/t/client-id-requirement-faqs/6108
Sumit Yadav
@Rao-Sumeet
Oct 13 2016 12:28
heloo everyone
I anyone here to listen me !1
tcar
@tcar
Oct 13 2016 12:29
@sjames1958gm can i put client-id in url just like this...https://api.twitch.tv/kraken/streams&client-id=44sa6ds68d7adsa67"+user[i]+"?callback=?
Stephen James
@sjames1958gm
Oct 13 2016 12:51
@tcar I think i goes after the user - let me check my pen
This is mine so client id after user (before or after callback) start the query parmeters with ? but put & inbetween them
"https://api.twitch.tv/kraken/streams/" + user[i] + "?callback=?&client_id=chpgyoxoqpv2uy0xwbfjnpswj5ejctz"
tcar
@tcar
Oct 13 2016 13:16
@sjames1958gm tnx, i did it like this... http://codepen.io/Tcar/pen/JRpgmj?editors=0011
Baciu Denis
@baciudenis99
Oct 13 2016 13:17
hello. what do you think about my tribute page? https://codepen.io/denists66/pen/mAKyAk
Simon Cordova
@gbsimon87
Oct 13 2016 13:28
Good afternoon everyone :)
Evan Davis
@davisec52
Oct 13 2016 13:29
@baciudenis99 Hi. Looks good! Very clean and pretty leanly coded. As an extra challenge, when you have a spare moment, you might consider making a second version without bootstrap.
Simon Cordova
@gbsimon87
Oct 13 2016 13:30
@baciudenis99 yeah looking great, simple set of colors too.
The advice that @davisec52 just gave is rather crucial, play with media queries a bit to get a stronger grasp...great job though seriously
Stephen James
@sjames1958gm
Oct 13 2016 13:38
@tcar :+1:
Dylan
@dhcodes
Oct 13 2016 13:40
@baciudenis99 looks good. tiny thing but I'd make the margin at the top and bottom either the same or smaller at the top
dothedesign
@dothedesign
Oct 13 2016 13:43
Hey all I am having a bit of trouble with some divs aligning responsively. I had a bit of help yesterday and I am getting closer but still could use an extra set of eyes. It's not my code and its tons of code so maybe I could pm anyone who is feeling especailly helpful :)
Niklas Finck
@nikifinck
Oct 13 2016 13:44
how many steps can you do in total on ffc?
and what step are you now?
abitechcoder
@abitechcoder
Oct 13 2016 13:49
Hello I am new here, please help me out
A_A
@Otto-AA
Oct 13 2016 13:50
@abitechcoder What's the matter? (provide a link if neccessary)
Ken Haduch
@khaduch
Oct 13 2016 14:04
@dothedesign - do you have a link to your code?
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:08
I need to make responsive square field that will not overflow. I know how to make that kind of div based on width, but it overflows on certain screens (when width > height) https://jsfiddle.net/makstheimba/sqr5tvdr/ . Can you help me?
Also I am sure it is possible to do with js/jquery, but is there a css way?
Samir Sakanovic
@SagiSan
Oct 13 2016 14:13
I think easiest way is to use bootstrap
but if you really want css...search for @media rule in css...basically what it does..u specify css for different widths and heights...for ex: defining laptop screen..mobile screen...and pc screen...just google it..you will find better explanation..goodluck :D
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:16
@SagiSan Can you link to bootstrap implementation of something like this?
@SagiSan I googled already, may be "orientation" is the way to go here
Samir Sakanovic
@SagiSan
Oct 13 2016 14:17
idk..i know @media is used for those kind of things...but if u wanna learn how to build responsive things...check bootstrap tutorial
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:19
@SagiSan I tried to build it with bootstrap from the start. But it seems like it is not a solution here
Samir Sakanovic
@SagiSan
Oct 13 2016 14:19
what exactly are you trying to do
A_A
@Otto-AA
Oct 13 2016 14:19
he is trying to keep all fields in view (and they should be squares)
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:20
yes, you are right @Otto-AA
This is a link to fiddle again https://jsfiddle.net/makstheimba/sqr5tvdr/. It does almost what I need, except that field overflows on widescreens, and I dont need that
Samir Sakanovic
@SagiSan
Oct 13 2016 14:24
u should u @media then ..and define height and width for large screen resolutions
or build it for large screens..and define for small screens
you can also try with bootstrap adding col classes...like col-lg-4..then u would have 3 boxes in a row..col-md-4..when its on medium..and col-xs-4..when its on small screen
it would be responsive
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:29
@SagiSan col-xs-4 would be enough. But field will not be square
Samir Sakanovic
@SagiSan
Oct 13 2016 14:30
use @media then
A_A
@Otto-AA
Oct 13 2016 14:30
@makstheimba Wait a moment, I think I got it...
Samir Sakanovic
@SagiSan
Oct 13 2016 14:31
u should have one div surrounding those boxes..that div will be responsive..and the width height of boxes will be set according to that div...understand?
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:35
A_A
@Otto-AA
Oct 13 2016 14:36

put your divs into a container and then add that css:

.container {
  width: 100vw;
  height: 100vw;
}
@media (orientation:landscape) {
  .container {
      width: 100vh;
      height: 100vh;
    }
}

(and make div div divinstead of div div. Actually I would give them a class and make it that way but it will work anyway

Maksim Kulichenko
@makstheimba
Oct 13 2016 14:37
@Otto-AA thanks a lot. That's exactly what I wanted
CamperBot
@camperbot
Oct 13 2016 14:37
makstheimba sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 301 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 13 2016 14:38
@makstheimba I also learned something new from that :)
Maksim Kulichenko
@makstheimba
Oct 13 2016 14:40
I thought of changing width and height upon landscape/portrait, but your solution with container is much nicer
Alex
@alexdp1987
Oct 13 2016 15:19
Hi everyone, I'm starting right now the first challenge with Codepen: https://www.freecodecamp.com/challenges/build-a-tribute-page
what I don't understand is if I have to make exactly the same page
or i can make a page similar but that can describe an other person
Obama, the pope, Maradona or whatever :D
Kevin Davis
@osfan501
Oct 13 2016 15:21
@alexdp1987 no make a page on whoever you want! They were just giving an example!
Alex
@alexdp1987
Oct 13 2016 15:22
ok perfect XD
So I will do something similar but with my style
I think this is what it means "user stories" no?
Antony Marques
@antonygmarques
Oct 13 2016 15:46
brackets or sublime?
Dylan
@dhcodes
Oct 13 2016 15:47
@antonygmarques neither
atom
Evan Davis
@davisec52
Oct 13 2016 15:48
vim
Dylan
@dhcodes
Oct 13 2016 15:48
vim if you want to take a million years to set it up to your liking
Evan Davis
@davisec52
Oct 13 2016 15:48
heh heh heh
Dylan
@dhcodes
Oct 13 2016 15:48
you'll be ready to code in 2020
Evan Davis
@davisec52
Oct 13 2016 15:48
...future, here I come...
Antony Marques
@antonygmarques
Oct 13 2016 15:48
@dylan why?i started with brackets i liked livepreview but it bugged.
Slavoljub Popovic
@slavo7
Oct 13 2016 15:51
Brackets
Dylan
@dhcodes
Oct 13 2016 15:56
lol @davisec52
@antonygmarques it's your call friend
watch some youtubes
tcar
@tcar
Oct 13 2016 17:23
can anybody help me with wikipedia viewer. why slideDown is not working ... http://codepen.io/Tcar/pen/VKAvyL?editors=0010
A_A
@Otto-AA
Oct 13 2016 17:29
@tcar you need to hide it before sliding it down: $( "#popis" ).hide().slideDown( "slow" ); also place it into the success-function (else it would be called before the results are inserted)
Abhishek Kumar
@Mr-Kumar-Abhishek
Oct 13 2016 17:39
I don't know why clients where looking at my gists rather than my github profile ... well.. made most of it public :P https://gist.github.com/Mr-Kumar-Abhishek
Sebastián Ventura
@sevgit
Oct 13 2016 18:26

Quick question, campers. I'm on the Local Weather Zipline but ran into into a wall with HTTP/HTTPS

I'm using the getCurrentPosition() method to retrieve the latitude and long, but that only works with httpS. The thing is the API i'm using is http only, and therefore if I access codepen from HTTPS it will block my http request to the api.

What can I do here?

Ken Haduch
@khaduch
Oct 13 2016 18:27
@alexdp1987 - "User Stories" is a concept from Agile design methodologies, I think? Basically it describes the functionality that a user should be able to perform on the site, without specifying precise technical details. So as long as you fulfill the functionality that the user stories outline, then you're good to go!
Sebastián Ventura
@sevgit
Oct 13 2016 18:28
Long story short, I'm using https @ codepen but that will block my http request @ weather API
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 18:28

http://codepen.io/oshikurou/pen/LkvoyX

so i wanna make a smooth animation on everytime someone presses the "new quote" button. basically when someone presses the button the color of the background, the quotes text,the color of the buttons will change plus the quote will change as well.

A_A
@Otto-AA
Oct 13 2016 18:31
@thodorisanta you can add the css transition: background 1s; to every element which changes.
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 18:33
@Otto-AA wow thanks!
CamperBot
@camperbot
Oct 13 2016 18:33
thodorisanta sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @otto-aa |http://www.freecodecamp.com/otto-aa
A_A
@Otto-AA
Oct 13 2016 18:33
@thodorisanta you're welcome :)
Sebastián Ventura
@sevgit
Oct 13 2016 18:35
Any ideas on how to get around my HTTPS/HTTP issue?

Quick question, campers. I'm on the Local Weather Zipline but ran into into a wall with HTTP/HTTPS

I'm using the getCurrentPosition() method to retrieve the latitude and long, but that only works with httpS. The thing is the API i'm using is http only, and therefore if I access codepen from HTTPS it will block my http request to the api.

What can I do here?

A_A
@Otto-AA
Oct 13 2016 18:38
@sevgit ummm, you could use another functino to get the position (like getting json from http://ip-api.com/json )
Sebastián Ventura
@sevgit
Oct 13 2016 18:42
That could work, as long as it doesn't mix requests there should be no probs, let me check. Thx
Jason Luboff
@JLuboff
Oct 13 2016 18:49
@sevgit If you want to use Geolocater which is much more accurate this ip-api, use a proxy like https://crossorigin.me
@sevgit To use it, prepend the url to your api url i.e https://crossorigin.me/http://api.openweather....
@sevgit Then save it and reload your codepen but this time make sure codepen is run of https (meaning, change the url to have https://codepen.io/....)
Sebastián Ventura
@sevgit
Oct 13 2016 19:03
Well it worked, though I had to call two different api's in the end. Thanks @JLuboff !
CamperBot
@camperbot
Oct 13 2016 19:03
sevgit sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 399 | @jluboff |http://www.freecodecamp.com/jluboff
Sebastián Ventura
@sevgit
Oct 13 2016 19:04
The JSON portion of the course has to be revised, IMO. At least everything up to the ziplines that require json.
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 19:06

@Otto-AA http://codepen.io/oshikurou/pen/LkvoyX

so i putted the transition: background 2s; and it works on the buttons and the background. but i cant make it work on the "p" elements. can you help me?

Sebastián Ventura
@sevgit
Oct 13 2016 19:14

On a json call, can I use a variable within a data pair? as in:

object {

A_A
@Otto-AA
Oct 13 2016 19:14
@thodorisanta compare the line in which you change the color for the body with the one where you change the color for the paragraph. Do you find the difference?
Sebastián Ventura
@sevgit
Oct 13 2016 19:14
url: VAR
-...}
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 19:24
@Otto-AA no i cant :P
@Otto-AA oh you mean "background" and "color"
A_A
@Otto-AA
Oct 13 2016 19:26
@thodorisanta Ok then I'll tell you :)
$("body,.buttColor").css("background", colorKeeper);vs $("p").css("color", colorKeeper)
yup, that's what I mean ;)
so when you have transition: background 1s; it will become...?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 19:29
@Otto-AA transition: color 2s; ? :worried:
A_A
@Otto-AA
Oct 13 2016 19:29
@thodorisanta Yeah :)
(or 1s if you want it in the same time)
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 19:29
@Otto-AA thanks man! you are realy helpfull :)
CamperBot
@camperbot
Oct 13 2016 19:29
thodorisanta sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:warning: thodorisanta already gave otto-aa points
Robert Ridley
@robertridley1988
Oct 13 2016 19:30

I'm not sure why the links to the wikipedia pages don't work. Can anyone see what is going on?

http://codepen.io/robertridley1988/full/YGNVpV/

Here is an example of what I have done in my javascript:

if (wikiAnswerThree != ''){
                     $('.three').html('<a href' + wikiResponse[3][2] + "target='_blank'>" + '<h2>' +wikiResponse[1][2]+ '</h2></br><p>'+wikiAnswerThree+'</p></a></br></br>');
                     $('.input-group').hide();
                     $('#random').hide();
                  }
Evan W
@Dirtier
Oct 13 2016 19:38
Can someone help me figure out why my table cells in the same row aren't the same height?
They're being rendered w/ Vue, but I dont think that should matter
If you scroll down to the timeline, the text next to the image tiles shouldnt be all clumped together like that
A_A
@Otto-AA
Oct 13 2016 19:42
@robertridley This one is pretty messy: '<a href' + wikiResponse[3][1] + "target='_blank'>
it should be something like <a href="'+ wikiResponse[3][1] + '" target="_blank">...
Brady
@soccer99
Oct 13 2016 19:43
@Dirtier You’re only creating two <td>s
@Dirtier You’re looping and creating a bunch of <div>s, which adjust to the height of their content
Evan W
@Dirtier
Oct 13 2016 19:46
But the divs are inside the tds
and they have no CSS attached to them
would it still do that?
Robert Ridley
@robertridley1988
Oct 13 2016 19:46
@Otto-AA Got it. Thanks
CamperBot
@camperbot
Oct 13 2016 19:46
robertridley1988 sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @otto-aa |http://www.freecodecamp.com/otto-aa
Evan W
@Dirtier
Oct 13 2016 19:46
@soccer99
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 19:48

http://codepen.io/oshikurou/full/LkvoyX/

so when i press the "new quote" button theres a delay of 2 seconds on the color changes (on buttons,text,and background). but i want to do the same with the time the quote changes. can you help me?

Evan W
@Dirtier
Oct 13 2016 19:48
@soccer99 Ohhhhhh wow I see what you're saying, I'm an idiot haha
I've messed with it too many times, didn't have the v-for in the td this time =S
@soccer99 thanks man
CamperBot
@camperbot
Oct 13 2016 19:49
dirtier sends brownie points to @soccer99 :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @soccer99 |http://www.freecodecamp.com/soccer99
Brady
@soccer99
Oct 13 2016 19:50
@Dirtier yes div's with no CSS inside TDs will stack on top of each other and adjust to the size of the content inside them. You need to loop a new table row <tr>and td for each item
Haha good
Evan W
@Dirtier
Oct 13 2016 19:52
@soccer99 Is there even a way for me to do this? I'm having to get stuff out of two different data objects
and I can only make the one td a v-for
err not td
the one tr
because I want them side by side =S
Brady
@soccer99
Oct 13 2016 19:54
Yeah loop the one outer tr then put the two divs with the respective content in each
It'll create new rows each time each with two cells
Evan W
@Dirtier
Oct 13 2016 19:55
yea but I can only make one loop for the tr right?
and I have two data objects
so I still need another loop for the other one =S I tried putting everything into one object but it just wouldnt work right for some reason
and im so tired of typing all that shit lol
Brady
@soccer99
Oct 13 2016 19:56
Oh why two separate data objects?
Do the images correspond with one event each?
Evan W
@Dirtier
Oct 13 2016 19:57
Yea, they go with the text
but I tried putting them into one, but I wasnt able to access them by keys for some reason
Brady
@soccer99
Oct 13 2016 19:57
Then you should have one array data object with objects
Evan W
@Dirtier
Oct 13 2016 19:57
I've done it a buncha times, this time it just wasnt having it
hmmm ok ill try that
Brady
@soccer99
Oct 13 2016 19:58
You'll loop the array data[index].image or data[index].text
A_A
@Otto-AA
Oct 13 2016 19:58
@thodorisanta
// FadeOut the quote and author
$('#quote').fadeTo(1000, 0).fadeTo(1000, 1);
$("#author").fadeTo(1000, 0).fadeTo(1000, 1);
setTimeout(function() {
  // Change text when they are invisible
  $('#quote').text(quotes[newRandom]); //changes author.
  $('#author').text(authors[newRandom]);
}, 1000);
Evan W
@Dirtier
Oct 13 2016 19:58
@soccer99 wait if I did manage to get them all in one object
how do I even access the properties? when they're all named differently
do I need to make all the keys the same name?
Brady
@soccer99
Oct 13 2016 19:59
Data =[{text: "", image:""},{}]
Evan W
@Dirtier
Oct 13 2016 19:59
ok yea just a bunch of objects
thats what I thought
thanks man
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 20:00
@Otto-AA im confused. where should i put this.
A_A
@Otto-AA
Oct 13 2016 20:01
@thodorisanta Instead of the text-change of the quoted author
@thodorisanta Do you understand how it works?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 20:09
@Otto-AA oh yeah! but it doesnt work in the dash near the authors name :P
A_A
@Otto-AA
Oct 13 2016 20:12
@thodorisanta Oh, I didn't see that it's not in #author. So you have to change the selector to the one which includes the "-"
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 20:13
@Otto-AA so authorsP
A_A
@Otto-AA
Oct 13 2016 20:13
@thodorisanta Give it a try :)
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 20:16
@Otto-AA already did :) but how does the fadeTo(1000, 0).fadeTo(1000, 1); work? and why did we put 2 "fadeTo"
and this too setTimeout(function() { // Change text when they are invisible $('#quote').text(quotes[newRandom]); //changes quote. $('#author').text(authors[newRandom]); //changes author. }, 1000); :P
Evan W
@Dirtier
Oct 13 2016 20:17
@soccer99 Ok so this is the part where I get mixed up
totally blanking on how to get the first val in the item, and the second, do I need two divs?
blob
Brady
@soccer99
Oct 13 2016 20:19
item[key]
or actually
Evan W
@Dirtier
Oct 13 2016 20:19
item.img?
Brady
@soccer99
Oct 13 2016 20:19
Don’t loop through the item
Evan W
@Dirtier
Oct 13 2016 20:19
see thats what I thought I did before
Yea I took that part off
Brady
@soccer99
Oct 13 2016 20:19
Just hardcode the <div> elements
A_A
@Otto-AA
Oct 13 2016 20:19
@thodorisanta the jQuery function fadeTo has two parameters: (time[in ms], opacity). So it changes the opacity within 1s to 0 (=invisible). The second fadeTo is automatically called after that and changes it back to visible
Evan W
@Dirtier
Oct 13 2016 20:20
@soccer99 weyelll shittt now I can't get the index haha
with just a v-for items in timeline
Brady
@soccer99
Oct 13 2016 20:21
Link me to the pen again
A_A
@Otto-AA
Oct 13 2016 20:21
@thodorisanta setTimeout also accepts two params: (function(){code...}, time[ms]). So after 1s (exactly when the elements are invisible) it changes the text
Evan W
@Dirtier
Oct 13 2016 20:21
unless since its an array I can just do (items,index)?
Brady
@soccer99
Oct 13 2016 20:21
I’m at my computer now
Evan W
@Dirtier
Oct 13 2016 20:21
nvm I was thinking I would have to have a key too bc I thought it was an object, but its an array
I think ill be fine
Ok yea its working
@soccer99 Thanks a lot brotha
CamperBot
@camperbot
Oct 13 2016 20:22
dirtier sends brownie points to @soccer99 :sparkles: :thumbsup: :sparkles:
:warning: dirtier already gave soccer99 points
Evan W
@Dirtier
Oct 13 2016 20:23
ewww now its just kinda ugly lol
but the cells are working right
why is there so much white space between some of them O.o
old CSS nvm forget that part
all bueno
Brady
@soccer99
Oct 13 2016 20:24
No problem
Evan W
@Dirtier
Oct 13 2016 20:25
Did you click any of the images? Pretty sick right lol, though after all this idk if this is even gonna look good, listing em down like this
but I cant think of another way to make the timeline look good
Evan W
@Dirtier
Oct 13 2016 20:30
@soccer99 one last question and I promise I wont bother you ever again lol, sorry
Jacob
@jdc101214
Oct 13 2016 20:30
Hey yall! Im trying to make this backgroung img responive and i cant figure out how to.
Heres the link.
http://codepen.io/jdc101214/pen/dpVzLZ
Evan W
@Dirtier
Oct 13 2016 20:30
but the thing im using for the pics, can have an optional data-title='' attribute
and for some reason putting data-title=item.text no matter how you write it just wont work
can only certain attributes be bound like that?
@jdc101214
blob
It isnt responsive though, but it covers. wdu mean by responsive? like changes sides? Or do you mean more of a parallax?
Evan W
@Dirtier
Oct 13 2016 20:36
Oh woops nvm
It is responsive
@jdc101214 heres how I got it to work
body {
  background-image: url("https://static.pexels.com/photos/28756/pexels-photo.jpg");
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
its kind of hybrid parallax-responsive lol pretty cool actually
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 20:38
@Otto-AA $('#quote').fadeTo(500, 0).fadeTo(1000, 1); $("#authorsP").fadeTo(500, 0).fadeTo(1000, 1); setTimeout(function() { // Change text when they are invisible $('#quote').text(quotes[newRandom]); //changes quote. $('#author').text(authors[newRandom]); //changes author. }, 500);
i have a question though. When is the "setTimeout" function called? as i see it first the text should dissapear,then the same text should apear and then change to another text (cause the fuction is called) .but it seems like the function is called somewhere between the two "fadeout"s. why?
Maksim Kulichenko
@makstheimba
Oct 13 2016 20:39
setTimeout calls function after specified delay. In this case delay is 500, which is half a second
silver537
@silver537
Oct 13 2016 20:39
Boo
Evan W
@Dirtier
Oct 13 2016 20:40
@jdc101214 if you want it to be like that on your #home-page element, then you need to give it a 100% height
Rafael Mateo
@rafaelmateo
Oct 13 2016 20:40
Hello!!
I need some help
Greatwhite52
@Greatwhite52
Oct 13 2016 20:43
I am doing the portfolio project and I don't know where to even start. Help?
Brandon
@chunb
Oct 13 2016 20:48
For "Show the Local Weather," does anyone know if the Open Weather API provides a weather icon? It says it does, but I can't load it onto my webpage
I don't know what to do
How do I mark the background how he did?
Jacob
@jdc101214
Oct 13 2016 20:55
@Dirtier those tips didnt help.
About the responsive, I want it to look good on mobile screens.
Evan W
@Dirtier
Oct 13 2016 20:56
@jdc101214 then just use an image.
that should be responsive for mobile devices as well
you aren't ever going to get it to scale down perfectly for mobile devices, its impossible
tommy
@tommygebru
Oct 13 2016 20:56
is it just me or did Elon Musk crash Codepen?
Evan W
@Dirtier
Oct 13 2016 20:57
@jdc101214 by impossible I mean bc they don't have the same aspect ratio. That is pretty much as good as you'll get it for a background, it will have to cut off some of the sides
@tommygebru lol codepens getting DDOSed
gotta get that cloudflareee
Rafael Mateo
@rafaelmateo
Oct 13 2016 20:59
Okay so my page is under heavy load :P let me please
Evan W
@Dirtier
Oct 13 2016 20:59
@rafaelmateo lol its not just your page, its all of codepen
They're probably doing maintenance or something
Preston Edmands
@pedmands
Oct 13 2016 21:01
Can I use a recent project for my submission of these beginner challenges?
Evan W
@Dirtier
Oct 13 2016 21:02
Oh wow can't even save right now
that sucks
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:03
oh okks
Evan W
@Dirtier
Oct 13 2016 21:03
@pedmands I dont see why not, I don't think anyone actually even looks at these when you turn them in lol, its just that if you cheat, you're only cheating yourself. But if you already did it then you obviously already know how to do it, so not really cheating
Preston Edmands
@pedmands
Oct 13 2016 21:03
Okay, I'm glad you guys are talking about how bad Codepen is acting, right now, because I've just started using it today and I was scratching my head wondering how it was so popular...
Evan W
@Dirtier
Oct 13 2016 21:03
@pedmands Yea I've never seen this happen before and I've been using it for 2 years so
somethins definitely up
Jacob
@jdc101214
Oct 13 2016 21:04
@Dirtier Freaking out there for a min......
Preston Edmands
@pedmands
Oct 13 2016 21:04
@Dirtier Thanks, that's sort of what I figured. I'm just burning through the basics so I was hoping I didn't need to build a whole project just to move on.
CamperBot
@camperbot
Oct 13 2016 21:04
pedmands sends brownie points to @dirtier :sparkles: :thumbsup: :sparkles:
:cookie: 252 | @dirtier |http://www.freecodecamp.com/dirtier
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:04
@Dirtier Am I supposed to do the tribute page exactly like quincy? Because It is really difficult, I cant
I cant see his code, right?
Jacob
@jdc101214
Oct 13 2016 21:05
@rafaelmateo , No you dont have to and you cant see his code
Evan W
@Dirtier
Oct 13 2016 21:05
@rafaelmateo No it just needs to be functionally similar to it, you can choose whoever you want as for the subject matter
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 21:05
Im about to start the "Show the Local Weather" project. Can you give me any advice/tips?
Jacob
@jdc101214
Oct 13 2016 21:05
@rafaelmateo If code pen was working, I would show you my tribute page.
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:05
awww
@jdc101214 thanks
CamperBot
@camperbot
Oct 13 2016 21:05
rafaelmateo sends brownie points to @jdc101214 :sparkles: :thumbsup: :sparkles:
:cookie: 123 | @jdc101214 |http://www.freecodecamp.com/jdc101214
Evan W
@Dirtier
Oct 13 2016 21:06
You aren't supposed to look at his code, but again, its not like youre going to get banned or something lol. Its just better to try to do it for yourself, otherwise whats the point of even doing these projects
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:06
But it is impossible to do the page like him
Jacob
@jdc101214
Oct 13 2016 21:06
@rafaelmateo code pen is working again.
Heres my tribute page.
http://codepen.io/jdc101214/pen/PGJjyJ
Evan W
@Dirtier
Oct 13 2016 21:07
@thodorisanta http://www.geoplugin.com/ I used that to get location info
Jacob
@jdc101214
Oct 13 2016 21:07
@rafaelmateo As you can see, Im am not creative in any way.....
but it still functions well
Evan W
@Dirtier
Oct 13 2016 21:08
@thodorisanta really easy to use, user doesn't have to give you permission, and it's just as accurate as the navigator option. It isn't solely based on IP like some people think lol, it uses like the exact same algorithm
@jdc101214 That is the oldest cat in the history of ever
Jacob
@jdc101214
Oct 13 2016 21:08
LOL
What do you guys think about that?
Jacob
@jdc101214
Oct 13 2016 21:10
@rafaelmateo , I would make the bullet points next to the text. Other then that it looks good! :)
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:11
Thanks!
Let me try to do it that way, @jdc101214 thanks
CamperBot
@camperbot
Oct 13 2016 21:11
:warning: rafaelmateo already gave jdc101214 points
rafaelmateo sends brownie points to @jdc101214 :sparkles: :thumbsup: :sparkles:
Jacob
@jdc101214
Oct 13 2016 21:13
@Dirtier Is there any way I can make the image look good on a mobile device?
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:13
Nope lol, don't know how to, how would you do that?
@rafaelmateo I dont know.
I was at a codeing library program last night and the othern coders couldnt figure it out......
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:17
That is nice indeed
jummm
tommy
@tommygebru
Oct 13 2016 21:17
is that why none of my javascript works on codepen right now??!!!
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:17
How do you space text?
tommy
@tommygebru
Oct 13 2016 21:17
CODEPEN!!>>??
@rafaelmateo with space?
or in css
word-spacing, letter-spacing
Rafael Mateo
@rafaelmateo
Oct 13 2016 21:26
css!
Evan W
@Dirtier
Oct 13 2016 21:27
@jdc101214 I already told ya >.<
@jdc101214 there is no possible way to make a background image responsive for mobile devices other than using a parallax type thing, because the aspect ratio wont be the same
silver537
@silver537
Oct 13 2016 21:28
HEY GUYS what's that website that enables https for APIs?
Evan W
@Dirtier
Oct 13 2016 21:28
@jdc101214 The only way is to use that parallax, so that when the aspect ratio changes, it will cut some off the sides
SlimxaQ
@SlimxaQ
Oct 13 2016 21:29
How can I get how much person have money in PHP? And put this amount on site? For help this is my login form: http://pastebin.com/raw/WDaE8UP8 I want to get "PLN"
DJ
@qualitymanifest
Oct 13 2016 21:29
@silver537 crossorigin.me
silver537
@silver537
Oct 13 2016 21:29
https://iforgotthewebsitename/http://google.com <-- something like that
oh
nvm.
@qualitymanifest thanks
CamperBot
@camperbot
Oct 13 2016 21:29
silver537 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star2: 1437 | @qualitymanifest |http://www.freecodecamp.com/qualitymanifest
silver537
@silver537
Oct 13 2016 21:29
xD
DJ
@qualitymanifest
Oct 13 2016 21:29
yw
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 21:34
do i need to add something specific to codepen to take users location?
Evan W
@Dirtier
Oct 13 2016 21:39
@jdc101214 you see what im sayin?
@thodorisanta No you can use the vanilla JS navigator if you want. I used geoplugin though, which is a small library thats easier to use
Jacob
@jdc101214
Oct 13 2016 21:44
@Dirtier I think im gonna skip the mobile responiveness.....
Evan W
@Dirtier
Oct 13 2016 21:44
@jdc101214 learning mobile-first design, first, will help so much down the road
Just a tip
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 21:45

http://codepen.io/oshikurou/pen/pEkJEa

ok i realy need help with the "Show the Local Weather" project. I just copied the code for the location from the site but i cant even make that to work.

Evan W
@Dirtier
Oct 13 2016 21:45
@jdc101214 images themselves can be completely responsive, it's just when you try to make it a background image that it gets difficult
@thodorisanta try this http://www.geoplugin.com/
@thodorisanta all you need to do is link this script to your HTML, then
<script language="JavaScript" src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>
in your javascript, type like geoplugin_city() and see what it shows
or geoplugin_latitude() / geoplugin_longitude()
blob
Jacob
@jdc101214
Oct 13 2016 21:53
@Dirtier Thanks for the advice. Do you think a media querry whould do the trick?
CamperBot
@camperbot
Oct 13 2016 21:53
jdc101214 sends brownie points to @dirtier :sparkles: :thumbsup: :sparkles:
:cookie: 253 | @dirtier |http://www.freecodecamp.com/dirtier
Evan W
@Dirtier
Oct 13 2016 22:01
@jdc101214 Umm, I guess it could? It would take a ton of them though, for a bunch of different sizes
Idk explain to me exactly what you're trying to do again
If you're trying to make a background image change to fill the entire screen AND scale perfectly with it, it isn't possible no matter what you use. The ONLY way is to cut off portions of the side.
Its because your background image has a static aspect ratio because it's a picture, right?
And every different screen/device is gonna have a different aspect ratio based on the window size, orientation, etc
Evan W
@Dirtier
Oct 13 2016 22:06
So you can't make the image fit all those without stretching it (which would make it look weird) or cutting off the excess
Jacob
@jdc101214
Oct 13 2016 22:12
Gottcha
silver537
@silver537
Oct 13 2016 22:14
viewport width/height. will make the background image scale to the window's width/height
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:14

@Dirtier https://codepen.io/oshikurou/pen/pEkJEa?editors=1111

why it doesnt work with me tho

silver537
@silver537
Oct 13 2016 22:17
@thodorisanta what browser are you using?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:17
@silver537 chrome
silver537
@silver537
Oct 13 2016 22:18
@thodorisanta hit ctrl+shift+c
Evan W
@Dirtier
Oct 13 2016 22:18
one sec
silver537
@silver537
Oct 13 2016 22:19
@thodorisanta on your address bar it should be http
Evan W
@Dirtier
Oct 13 2016 22:20
@thodorisanta yea @silver537s right
somehow you messed up your codepen and made it use https, which wouldn't allow you to mix-in unsecure links
@thodorisanta you get it workin?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:24
@Dirtier yeah i changed it to http but in the console only a "" apears
Evan W
@Dirtier
Oct 13 2016 22:24
save it rq
so I can see
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:25
@Dirtier ok now the console show "Kavála" and my cities name is "kavala"
@thodorisanta lol console shows Kavála
Evan W
@Dirtier
Oct 13 2016 22:26
so its working now?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:26
@thodorisanta yeah thanks
CamperBot
@camperbot
Oct 13 2016 22:26
sorry thodorisanta, you can't send brownie points to yourself! :sparkles: :sparkles:
Evan W
@Dirtier
Oct 13 2016 22:26
I didn't realize you didnt live in the US
silver537
@silver537
Oct 13 2016 22:26
you're welcome
Evan W
@Dirtier
Oct 13 2016 22:26
@thodorisanta I would use geoplugin_latitude() and geoplugin_longitude() then
instead of geoplugin_city()
bc the lat and long are by far the most accurate way to get location, then you take the lat and long, and call open weather map with it, and it will return the weather for that location
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:28
@Dirtier yeah i live in greece @silver537 thanks. what should my next move be.
CamperBot
@camperbot
Oct 13 2016 22:28
thodorisanta sends brownie points to @dirtier and @silver537 :sparkles: :thumbsup: :sparkles:
:cookie: 254 | @dirtier |http://www.freecodecamp.com/dirtier
:cookie: 624 | @silver537 |http://www.freecodecamp.com/silver537
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:28
@Dirtier how am i suppose to open a map and call the weather
Evan W
@Dirtier
Oct 13 2016 22:28
@thodorisanta lol
it's called 'Open Weather Map', not open a weather map haha
that's the name of the website. You have to use a API call
@thodorisanta the easiest way is to just use a $.JSON() call, if you're using jQuery
the call looks like this
api.openweathermap.org/data/2.5/weather?lat=35&lon=139
so the whole thing would look like this
const lat = geoplugin_latitude();
const long = geoplugin_longitude();

$.getJSON('api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + long, function(data){
    console.log(data)
})
silver537
@silver537
Oct 13 2016 22:35
with your API key of course
Jacob
@jdc101214
Oct 13 2016 22:36
@silver537 I left the computer for a min.....
What are you talking about with viewport?
Evan W
@Dirtier
Oct 13 2016 22:36
oh shit that one does take a key I keep forgetting that
@jdc101214 he meant view window (vw) I think
but that wont work with a static aspect ratio background image
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:37
@Dirtier what key? lol how am i suppose to know all these :P
Evan W
@Dirtier
Oct 13 2016 22:37
it will distort it
Jacob
@jdc101214
Oct 13 2016 22:37
@Dirtier Still don't understand
silver537
@silver537
Oct 13 2016 22:37
@Dirtier the actual unit is called viewport width, or viewport height. vw/vh
i would work with a high resolution image
Evan W
@Dirtier
Oct 13 2016 22:38
O.o you can just use vw for all of it
I think were talking about two different things then
bc the vw im talking about stands for view window
and you just use
silver537
@silver537
Oct 13 2016 22:38
well yea you use vw vh, but it's the name.
Evan W
@Dirtier
Oct 13 2016 22:38
height: 10vw;
width: 10vw;
@thodorisanta API key from open weather map. You just have to sign up and you'll get it, its free
@Dirtier
Evan W
@Dirtier
Oct 13 2016 22:40
@thodorisanta I forgot about the API key though, so $.getJSON might not work, you might have to use $.ajax
Brandon
@chunb
Oct 13 2016 22:40
@Dirtier Do you know if that Open Weather Map API provides an icon for the weather? I think it does, but I can't make the icon show on my codepen
silver537
@silver537
Oct 13 2016 22:40
it does
Evan W
@Dirtier
Oct 13 2016 22:42
@chunb I just used the icon ID code from open weather map, but used icons from here http://erikflowers.github.io/weather-icons/
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 22:43
@Dirtier so what do i do now that i have the key :worried:
Evan W
@Dirtier
Oct 13 2016 22:43
look up jquery ajax
Brandon
@chunb
Oct 13 2016 22:44
@silver537 Thanks, much appreciated!
CamperBot
@camperbot
Oct 13 2016 22:44
chunb sends brownie points to @silver537 :sparkles: :thumbsup: :sparkles:
:cookie: 625 | @silver537 |http://www.freecodecamp.com/silver537
Evan W
@Dirtier
Oct 13 2016 22:44
those icons suck
lol theres like 8 of them
its convenient though
@thodorisanta Wait no I lied
You can use $.getJSON for this one
Take that $.getJSON I showed you earlier, and then just add your ID onto the end of it
$.getJSON('api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + long + YOURID, function(data){
    console.log(data)
})
silver537
@silver537
Oct 13 2016 22:50
This message was deleted
Alex Cooper
@JSmurf
Oct 13 2016 22:50
Ok, I'm really scratching my head about one part of my wikipedia viewer
I've got the api working well and everything, and have a variable set that contains the array from the callback
so I want to take that array and create a ul using said array
but I'm having a hard time figuring out a code that would work for it
Evan W
@Dirtier
Oct 13 2016 22:53
@JSmurf link it
that's my WIP
I ended up starting a different pen to work on playing around with lists and arrays
but I just kinda keep rebuilding functions :P
silver537
@silver537
Oct 13 2016 22:56
@jdc101214 whoops. this one is better
Evan W
@Dirtier
Oct 13 2016 22:56
which wiki API did you mean to use?
Evan W
@Dirtier
Oct 13 2016 22:57
@JSmurf Bc the one that I'm using returns objects
Alex Cooper
@JSmurf
Oct 13 2016 22:59
huh
maybe mine is doing the same, and I didn't realize it
Evan W
@Dirtier
Oct 13 2016 22:59
I mean do you want the array? If not, you can get the objects by adding a few more things into your API call
silver537
@silver537
Oct 13 2016 23:00
@JSmurf oh that is gonna take some serious logic.
Evan W
@Dirtier
Oct 13 2016 23:00
nah yours is returning an array, its bc of your headers
LOL
I typed 'dog' into yours, look what the 2nd result was
blob
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 23:00
@Dirtier how am i suppose to take Latitude and Longitude and make them a location?
Alex Cooper
@JSmurf
Oct 13 2016 23:00
no clue what I was thinking
Evan W
@Dirtier
Oct 13 2016 23:00
lmfao
Alex Cooper
@JSmurf
Oct 13 2016 23:00
lol
silver537
@silver537
Oct 13 2016 23:00
lmao
Alex Cooper
@JSmurf
Oct 13 2016 23:00
but yeah, I want it to be an array
Evan W
@Dirtier
Oct 13 2016 23:01
search dog, get doggystyle
Alex Cooper
@JSmurf
Oct 13 2016 23:01
because then I can just take my array, and use a for loop get each thing I'm looking for
or at least that was my though
thought*
Evan W
@Dirtier
Oct 13 2016 23:01
@JSmurf well that array isn't gonna help you much, unless all you want are the titles of a bunch of different articles relating to the search
silver537
@silver537
Oct 13 2016 23:02
@thodorisanta api.openweathermap.org/data/2.5/weather?lat=35&lon=139 you see in this string how it says lat, lon?
Spyrantis Theodoros
@thodorisanta
Oct 13 2016 23:02
@silver537 yeah
Evan W
@Dirtier
Oct 13 2016 23:02
@thodorisanta wdu mean? lat and long are locations, you just put them into that $.getJSON
silver537
@silver537
Oct 13 2016 23:03
@thodorisanta use your variables for that
Alex Cooper
@JSmurf
Oct 13 2016 23:03
if you look at that array, it has the title of the article, the summary, and the link
Evan W
@Dirtier
Oct 13 2016 23:03
Oh you're right, idk when I checked it on yours it just showed a bunch of titles
Alex Cooper
@JSmurf
Oct 13 2016 23:03
so I would be able to
LoL, no worries
silver537
@silver537
Oct 13 2016 23:03
api.openweathermap.org/data/2.5/weather?lat=+variable+&lon=+variable
@thodorisanta
Alex Cooper
@JSmurf
Oct 13 2016 23:04
but then I'd be able to have data[1][i], data[2][i], and data[3][i]
I believe
Evan W
@Dirtier
Oct 13 2016 23:04
@JSmurf you can do the same type of thing with a object though, but it really doesn't matter
Brandon
@chunb
Oct 13 2016 23:04
For the Open Weather API, has anyone run into the problem of not being able to load in the weather icon id? This line doesn't print anything: $("#...).html(json.weather.icon);
Alex Cooper
@JSmurf
Oct 13 2016 23:04
well, would it be easier to do it with an object?
@chunb I ended up using a different icon set for that
Evan W
@Dirtier
Oct 13 2016 23:05
@JSmurf ummm I dont really understand how that array is arranged
Is it just all titles first, and then all the descriptions after?
Bc if so, a bunch of objects would be way easier
Alex Cooper
@JSmurf
Oct 13 2016 23:06
how so?
Evan W
@Dirtier
Oct 13 2016 23:06
bc its like a list of objects, so you just iterate over it and use one variable on each property
Alex Cooper
@JSmurf
Oct 13 2016 23:07
it is, it's [searchterm,[titles],[descriptions],[urls]]
Evan W
@Dirtier
Oct 13 2016 23:07
like say Ii get data back
I would just do
data[i].title
data[i].snippet
Brady
@soccer99
Oct 13 2016 23:07
@chunb var icon_url = "http://openweathermap.org/img/w/" + data.weather[0].icon + ".png";
Evan W
@Dirtier
Oct 13 2016 23:07
data[i].whatever
silver537
@silver537
Oct 13 2016 23:07
@JSmurf
data.forEach(function(x){
    let list = [];
    list.push("<ul><li>"+x[0][1][2]+"</li></ul>")
})
$(htmlElement).append(list.join(''))
something like that
Evan W
@Dirtier
Oct 13 2016 23:07
see what I mean?
Alex Cooper
@JSmurf
Oct 13 2016 23:08
kinda?
Brandon
@chunb
Oct 13 2016 23:08
@soccer99 All right, I'll give it a shot
Evan W
@Dirtier
Oct 13 2016 23:08
ok like this
@JSmurf go here again, and then type something in with your console open
I already put the console.log() in
and if you literally just want that html
on your body
you just iterate over it like
for(items in data){
$('body').html(data)
}
silver537
@silver537
Oct 13 2016 23:10
@JSmurf i used the same method for my lists.
http://codepen.io/Silver537/pen/gwKvmg
 arr.forEach(x=>{
        let list = [],
            day = _dayConverter(x[0].dt_txt);
        x.forEach(y=>{
          let ID = y.weather[0].id,
              description = y.weather[0].description,
              icon = _iconConverter(y.dt_txt, ID),
              hour = _hourConverter(y.dt_txt);
          list.push(`
<li>
  <div class="row">
    <div class="weatherIcon"><i class='${icon}'></i></div>
    <div class="info">${Math.round(y.main.temp)+temp}<div>${hour}</div></div>
  </div>
  <div>${description}</div>
</li>`);
        })
        container.append(`
<div class="list">
  <span class="day">${day}</span>
  <ul>${list.join('')}</ul>
</div>`);
      })
Evan W
@Dirtier
Oct 13 2016 23:11
tellin you the object way is so much easier
Alex Cooper
@JSmurf
Oct 13 2016 23:11
ok
I guess I just don't know a ton of stuff about objects
I should do some more reading
silver537
@silver537
Oct 13 2016 23:11
@JSmurf neither do i.
Evan W
@Dirtier
Oct 13 2016 23:11
@JSmurf look heres the first one I made
doing it the object way, and I literally just took the objects and .html()ed them to the body
silver537
@silver537
Oct 13 2016 23:11
@Dirtier he aint gonna understand your vue shit nikka
This is the first one, not the Vue one
Alex Cooper
@JSmurf
Oct 13 2016 23:12
for some reason, when I hit enter on your pens, it doesn't do anything
Evan W
@Dirtier
Oct 13 2016 23:12
I did some stuff to take out the links and such bc they wont work anyway, but you dont even have to do all that
Oh thats OS specific I think
Brandon
@chunb
Oct 13 2016 23:13
@soccer99 It worked! Thanks, I'm done with the project now
CamperBot
@camperbot
Oct 13 2016 23:13
chunb sends brownie points to @soccer99 :sparkles: :thumbsup: :sparkles:
:cookie: 313 | @soccer99 |http://www.freecodecamp.com/soccer99
silver537
@silver537
Oct 13 2016 23:13
@JSmurf you gotta open them up in a browser
Alex Cooper
@JSmurf
Oct 13 2016 23:13
they are open in a browser...
in safari
I can try chrome thuhg
silver537
@silver537
Oct 13 2016 23:13
@JSmurf noooooooooooo
Evan W
@Dirtier
Oct 13 2016 23:13
@JSmurf the other one I linked you didnt even need to hit enter
the one w/ Vue, it just did it as you typed
silver537
@silver537
Oct 13 2016 23:14
safari is back in the stone age.
Alex Cooper
@JSmurf
Oct 13 2016 23:14
well, I like it
and it doesn't use all my RAM
Evan W
@Dirtier
Oct 13 2016 23:14
yea I even use chrome on my macbook lol, only place safari has an advantage is on iPhones
yea chrome can kinda suck up memory
Alex Cooper
@JSmurf
Oct 13 2016 23:15
see, I use safari on my iPhone, and I love being able to pull up my open tabs from my mac on my phone
Evan W
@Dirtier
Oct 13 2016 23:15
I just like that I can sync all my stuff across everything I own lol like passwords/history/tabs and whatnot
Alex Cooper
@JSmurf
Oct 13 2016 23:15
anyway, that's irrelevant
Evan W
@Dirtier
Oct 13 2016 23:15
Yea you can do the same thing with Chrome
if you sign in with your gmail or w/e
Alex Cooper
@JSmurf
Oct 13 2016 23:16
yeah, I just don't use the same gmail for everything
it's complicated :P
Evan W
@Dirtier
Oct 13 2016 23:16
haha yea I feel ya
did it work tho
Alex Cooper
@JSmurf
Oct 13 2016 23:16
yeah, I see it now in Chrome
Evan W
@Dirtier
Oct 13 2016 23:17
ok so that text that displays
is just taking the object
and .html()ing it onto that container
though I did filter out a bit
I did that one like forever ago so its pretty shitty lol but I was just trying to show you how the objects look when they come back
Alex Cooper
@JSmurf
Oct 13 2016 23:19
ok
Evan W
@Dirtier
Oct 13 2016 23:19
either way works though
if you wanna use the array
then I'd ask silver how to do it
bc I'm not even sure how that info is coming in in the array
Alex Cooper
@JSmurf
Oct 13 2016 23:19
I found a video where someone was working on theirs with an array
so I might just see how he deals with it
Evan W
@Dirtier
Oct 13 2016 23:20
ok
guess we didnt really help you at all then huh hahah
Alex Cooper
@JSmurf
Oct 13 2016 23:22
I mean, kinda!
silver537
@silver537
Oct 13 2016 23:22
it the logic that comes with it that's dreadful.
Alex Cooper
@JSmurf
Oct 13 2016 23:22
I definitely have more to look at, and when I get mine figured out, I'll try to wrap my head around yours :P
silver537
@silver537
Oct 13 2016 23:24

cause you gotta use a for, then use that for's index for another for, to grab the relavent data from the inner subarrays. cause you have this:
[1,2,3,4,5,[1,2,3,4,5,[1,2,3,4,5]]]
so you expect an output similar to this:

<ul>1,1,1</ul>
<ul>2,2,2</ul>
<ul>3,3,3</ul>
<ul>4,4,4</ul>
<ul>5,5,5</ul>

Spyrantis Theodoros
@thodorisanta
Oct 13 2016 23:26
okay im super confused. im gonna work on in more tomorrow :P
how am i suppose to know how to make a "show the local weather" project lol
anyway goodnight campers :)
Alex Cooper
@JSmurf
Oct 13 2016 23:27
but it's [[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]]
so I just need data[0][0], data[1][0], data[3][0]
and so on
so it's not so bad
[2]*
silver537
@silver537
Oct 13 2016 23:28
@JSmurf really? i saw it wrong haha
Alex Cooper
@JSmurf
Oct 13 2016 23:29
well, it's actually more like [1,[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]]
where the first "1" is the search term
I wish there was a nicer way to look at the data
it makes a bit more sense in the codepen console
but still
silver537
@silver537
Oct 13 2016 23:31
use the developer tools
Alex Cooper
@JSmurf
Oct 13 2016 23:31
all I need to do is create a for loop, and create my <il> using the "data[0][0], data[1][0], data[3][0]" business
silver537
@silver537
Oct 13 2016 23:31
in chrome
it shows it like this:
blob
Alex Cooper
@JSmurf
Oct 13 2016 23:32
damn
that's nice
silver537
@silver537
Oct 13 2016 23:33
@JSmurf and it's gonna be like data[1][0], data[2][1], data[3][2]
Alex Cooper
@JSmurf
Oct 13 2016 23:33
why is that?
silver537
@silver537
Oct 13 2016 23:33
or you could use 1 loop and do it like data[1][i-1], data[2][i-1], data[3][i-1]
because the first element is index 0.
but the first element for the actual description for the words are in the sub array, which start at index 0
Alex Cooper
@JSmurf
Oct 13 2016 23:36
right
but in the example in your screenshot:
silver537
@silver537
Oct 13 2016 23:36
so if you do,
data[1], data[1][0]
you would get 
"Cat",  "The domestic cat (Latin: Felis catus) or the feral cat (Latin: Felis silvestris catus) is a small, typically furry, carnivorous mammal."
Alex Cooper
@JSmurf
Oct 13 2016 23:37
wouldn't data [0][0] not be anything?
silver537
@silver537
Oct 13 2016 23:37
lol my bad
but if you do data[0][0] you would get nothing.
Alex Cooper
@JSmurf
Oct 13 2016 23:39
I did a console.log for data[1][0], data [2][0], and data [3][0]
and I got
"Cat"
"The domestic cat (Latin: Felis catus) or the feral cat (Latin: Felis silvestris catus) is a small, typically furry, carnivorous mammal."
"https://en.wikipedia.org/wiki/Cat"
which is what I want
I just then want to use those to do things
silver537
@silver537
Oct 13 2016 23:40
its confusing i know
Alex Cooper
@JSmurf
Oct 13 2016 23:40
?
silver537
@silver537
Oct 13 2016 23:41
it's cause your arrays are offsetted
Alex Cooper
@JSmurf
Oct 13 2016 23:42
no look
go here, put something in, and click submit
then look at the console
it's still logging the api url, lol
silver537
@silver537
Oct 13 2016 23:43
lol yea that!
lol
silver537
@silver537
Oct 13 2016 23:49
i was looking at this:
Array[4]
0:"cat"

1:Array[10]
  0:"Cat"
  1:"Catherine de' Medici"
  2:"Catherine Zeta-Jones"
  3:"Catholic Church"
  4:"Catherine, Duchess of Cambridge"
  5:"Cattle"
  6:"Catherine the Great"
  7:"Catherine of Aragon"
  8:"Catwoman"
  9:"Catalan language"

2:Array[10]
  0:"The domestic cat (Latin: Felis catus) or the feral cat (Latin: Felis silvestris catus) is a small, typically furry, carnivorous mammal."
  1:"Catherine de' Medici (Italian: Caterina de' Medici pronounced [kateˈriːna de ˈmɛːditʃi]; French: Catherine de Médicis pronounced: [katʁin də medisis], 13 April 1519 – 5 January 1589), daughter of Lorenzo II de' Medici and of Madeleine de La Tour d'Auvergne, was an Italian noblewoman who was Queen of France from 1547 until 1559, as the wife of King Henry II."
  2:"Catherine Zeta-Jones, CBE (/ˈziːtə/; born 25 September 1969) is a Welsh actress. Born and raised in Swansea, Zeta-Jones aspired to a theatrical career from an early age."
  3:"The Catholic Church, also known as the Roman Catholic Church, is the largest Christian church, with more than 1.27 billion members worldwide."
  4:"Catherine, Duchess of Cambridge (born Catherine Elizabeth "Kate" Middleton; 9 January 1982) is the wife of Prince William, Duke of Cambridge."
  5:"Cattle—colloquially cows—are the most common type of large domesticated ungulates. They are a prominent modern member of the subfamily Bovinae, are the most widespread species of the genus Bos, and are most commonly classified collectively as Bos taurus."
  6:"Catherine II of Russia (Russian: Екатерина Алексеевна Yekaterina Alekseyevna), also known as Catherine the Great (Екатерина II Великая, Yekaterina Velikaya; 2 May [O.S."
  7:"Catherine of Aragon (Castilian: Catalina; also spelled Katherine, 16 December 1485 – 7 January 1536) was the Queen of England from June 1509 until May 1533 as the first wife of King Henry VIII; she was previously Princess of Wales as the wife of Henry's elder brother Arthur."
  8:"Catwoman (Selina Kyle) is a fictional character appearing in American comic books published by DC Comics, commonly in association with the superhero Batman."
  9:"Catalan (/ˈkætəlæn/; autonym: català [kətəˈla] or [kataˈla]) is a Romance language named after Catalonia, in northeastern Spain and adjoining parts of France."

3:Array[10]
  0:"https://en.wikipedia.org/wiki/Cat"
  1:"https://en.wikipedia.org/wiki/Catherine_de%27_Medici"
  2:"https://en.wikipedia.org/wiki/Catherine_Zeta-Jones"
  3:"https://en.wikipedia.org/wiki/Catholic_Church"
  4:"https://en.wikipedia.org/wiki/Catherine,_Duchess_of_Cambridge"
  5:"https://en.wikipedia.org/wiki/Cattle"
  6:"https://en.wikipedia.org/wiki/Catherine_the_Great"
  7:"https://en.wikipedia.org/wiki/Catherine_of_Aragon"
  8:"https://en.wikipedia.org/wiki/Catwoman"
  9:"https://en.wikipedia.org/wiki/Catalan_language"
hehehehehe