These are chat archives for FreeCodeCamp/HelpFrontEnd

20th
Dec 2016
Alec Breinz
@Breinzy
Dec 20 2016 00:04
hi guys, I'm having trouble getting my image to show up on my tribute page. Here is the code i have so far <img src="/Users/Breinz/Downloads/bob.jpg" alt="Oops! Looks like Bob didn't load" style="width:620px; height:350px;">
Jason Luboff
@JLuboff
Dec 20 2016 00:05
@Breinzy You need to actually host your image on an image hosting site like http://photobucket.com People can't access images on your computer..
Alec Breinz
@Breinzy
Dec 20 2016 00:05
@JLuboff thanks, the internet isn't very helpful
CamperBot
@camperbot
Dec 20 2016 00:05
breinzy sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 500 | @jluboff |http://www.freecodecamp.com/jluboff
Abhishek Kumar
@Mr-Kumar-Abhishek
Dec 20 2016 00:08
@JLuboff I should give a limit on numbers too...
Howard
@hzhou849
Dec 20 2016 00:09
Hey guys, question is it proper practice for writing return statements with a statement or always use a variable?
example
return value;
vs
return myObj.methodCall;
Abubakar Gabdo
@Atiku2039
Dec 20 2016 00:16
@JLuboff thnaks for the image hosting advice... off and running.. yosh, lets do this
Jason Luboff
@JLuboff
Dec 20 2016 00:16
@Atiku2039 :+1:
@hzhou849 Don't quote me on this...but if you don't need to variable in the return, its one less line of code
@khaduch @forkerino thanks very much (for your advice many hours ago!)
CamperBot
@camperbot
Dec 20 2016 00:21
mltr sends brownie points to @khaduch and @forkerino :sparkles: :thumbsup: :sparkles:
:cookie: 415 | @forkerino |http://www.freecodecamp.com/forkerino
:star2: 2132 | @khaduch |http://www.freecodecamp.com/khaduch
Reggie
@Reggie01
Dec 20 2016 00:41
@hzhou849 What are you expecting back when you call the function?
myObj.methodCall is just a function. So does your code expect back a value or a function.
Travis
@blazintrav197
Dec 20 2016 00:53
I'm trying to build the tribute page and I can't figure out how to center align the <ul> elements I can get the text to center but not the bullets
Dominick White
@DominickW
Dec 20 2016 01:01
Did u set it CSS to Bootstrap? After that, use the <div "text-center"> to center your text. That should move everything. Let me know how it works out.
Travis, Did u set it CSS to Bootstrap? After that, use the <div "text-center"> to center your text. That should move everything. Let me know how it works out
Travis
@blazintrav197
Dec 20 2016 01:03
yeah thats what I've been trying it just won't move the bullets for some reason
WVKING20
@WVKING20
Dec 20 2016 01:09
i am on the tribute page and i've been trying to figure out how to center my image for the longest time and cannot figure it out
Travis
@blazintrav197
Dec 20 2016 01:12
this is what I got befor the image tag <div class="thumbnail text-center center-block img-responsive">
@WVKING20
If you figure out how to center the bullets let me know lol
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:15
@Mr-Kumar-Abhishek Try 0.04 - 0.03 = floating arithmetic problem
WVKING20
@WVKING20
Dec 20 2016 01:15
Thanks man i got it but how did you know about the thumbnail class? Like how could i figure that out?
for the center text the only thing i can say is text-center
Travis
@blazintrav197
Dec 20 2016 01:17
Yeah I just searched on how to center images with bootstrap I think i found it on the bootstrap page
Abhishek Kumar
@Mr-Kumar-Abhishek
Dec 20 2016 01:18
@TylerMoeller thanks
CamperBot
@camperbot
Dec 20 2016 01:18
mr-kumar-abhishek sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1171 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:18
@WVKING20 It's good to read through all the bootstrap documentation. If you want to work with images, for example, there's a section on images here: http://getbootstrap.com/css/#images
Abhishek Kumar
@Mr-Kumar-Abhishek
Dec 20 2016 01:19
@JLuboff @moT01 thanks for checking the calculator out
CamperBot
@camperbot
Dec 20 2016 01:19
mr-kumar-abhishek sends brownie points to @jluboff and @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 431 | @mot01 |http://www.freecodecamp.com/mot01
:cookie: 502 | @jluboff |http://www.freecodecamp.com/jluboff
WVKING20
@WVKING20
Dec 20 2016 01:21
@blazintrav197 @TylerMoeller Thanks guys i've been wondering this the entire time ive been on this website lol
CamperBot
@camperbot
Dec 20 2016 01:21
wvking20 sends brownie points to @blazintrav197 and @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1172 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
:cookie: 119 | @blazintrav197 |http://www.freecodecamp.com/blazintrav197
Travis
@blazintrav197
Dec 20 2016 01:24
<div class="container">
<div class="jumbotron">
<div class="text-center">
<ul>
<li>
<-- bullet is not center
</li>
</ul>

</div>
</div>
</div>
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:42
@blazintrav197 With bootstrap, the easy way is to put the bullet list in a column and use an offset. http://getbootstrap.com/css/#grid-offsetting
Here are some examples of different ways to use the grid: http://codepen.io/TylerMoeller/pen/qNrbok
Without bootstrap, this approach works: http://stackoverflow.com/a/5347910
Waqas Abbasi
@Waqas909
Dec 20 2016 01:49
@TylerMoeller Hey! I dont know if you remember, but i tried .forEach and .mpa
map*
and they both seem to execute before even waiting for the ajax request
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:49
Yeah, I remember, I'll look at that pen again and see what's up
nvm, you deleted it and the most recent one is using a for loop again
Waqas Abbasi
@Waqas909
Dec 20 2016 01:51
yea
that's the only way i could get to the work .-.
Thanks I appreciate it!
@TylerMoeller Thanks*
CamperBot
@camperbot
Dec 20 2016 01:51
waqas909 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1173 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Travis
@blazintrav197
Dec 20 2016 01:51
@TylerMoeller Thank you
CamperBot
@camperbot
Dec 20 2016 01:51
blazintrav197 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1174 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Waqas Abbasi
@Waqas909
Dec 20 2016 01:52
I could just have 3 seperate Ajax requests, but That would not really help me because, if I make my channel list longer... than that means more ajax requests. That's why I went for a loop
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:53
If I remember correctly, you'll need at least two ajax requests - one to determine if the user account is closed or not and another to get their channel information
(if their account is not closed)
So, the big challenge of this project is getting data asynchronously without freezing up the browser by setting async: false in a $.ajax request
Waqas Abbasi
@Waqas909
Dec 20 2016 01:55
yup
the APi i'm using, gives me both of those
Tyler Moeller
@TylerMoeller
Dec 20 2016 01:58
@Waqas909 So, here's an example of how the two methods work: http://codepen.io/TylerMoeller/pen/vybMPz
They countdown from 10-> 0 waiting a second in between. The for loop, prints out all 0s because it doesn't have a callback to wait for the setTimeout. The .map() has a callback so it processes each number correctly
Waqas Abbasi
@Waqas909
Dec 20 2016 02:00
I tried the .map() but it didn't work
Ken Haduch
@khaduch
Dec 20 2016 02:00
@mltr - :point_up: December 19, 2016 7:21 PM - you're welcome!
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:00
@Waqas909 Give it a try again and I'll review it to see why it isn't working
Waqas Abbasi
@Waqas909
Dec 20 2016 02:01
@TylerMoeller Oh okay
Waqas Abbasi
@Waqas909
Dec 20 2016 02:08
@TylerMoeller I tried it... It seems it's only calling the ajax request once.. Not sure if i used it correctly
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:10
@Waqas909 Okay, looks like something else is going on, brb
@Waqas909 It's failing because it's hitting error looking for data1[counter].stream on cretetion.
To fix it, you may want to refresh on this challenge to handle properties that don't exist: https://www.freecodecamp.com/challenges/record-collection
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:16
(trying not to just give you the answer)
Waqas Abbasi
@Waqas909
Dec 20 2016 02:16
xD I understand, I will look into it :-)
Thanks @TylerMoeller
CamperBot
@camperbot
Dec 20 2016 02:17
waqas909 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: waqas909 already gave tylermoeller points
Waqas Abbasi
@Waqas909
Dec 20 2016 02:17
So if i just fix this error
it should work?
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:17
Yes, you can verify by commenting out your first if/else statement after the Ajax call - everything runs great.
The error is in that if/else statement, not the way you are making the api calls
Waqas Abbasi
@Waqas909
Dec 20 2016 02:18
@TylerMoeller Thanks once again!
CamperBot
@camperbot
Dec 20 2016 02:18
waqas909 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: waqas909 already gave tylermoeller points
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:19
@Waqas909 See here for one small change I made to your .map() function, but with the failing code removed to see how everything logs to the console: https://codepen.io/TylerMoeller/pen/jVdoWq?editors=0011
This is a fork of your code ^^
Waqas Abbasi
@Waqas909
Dec 20 2016 02:31
@TylerMoeller :D Thanks
CamperBot
@camperbot
Dec 20 2016 02:31
waqas909 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: waqas909 already gave tylermoeller points
Waqas Abbasi
@Waqas909
Dec 20 2016 02:33
@TylerMoeller I see you added two parameters to the map function
so having 2nd parameter is the same as counter++
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:35
@Waqas909 Yes, it's referred to as the key or the counter, telling you how many times it has looped through the array so far. The index of the array.
['a', 'b', 'c', 'd', 'e'].map(function(letter, counter) {
  console.log('Letter: ' + letter + ' Counter: ' + counter)
});

Output:
  "Letter: a Counter: 0"
  "Letter: b Counter: 1"
  "Letter: c Counter: 2"
  "Letter: d Counter: 3"
  "Letter: e Counter: 4"
Waqas Abbasi
@Waqas909
Dec 20 2016 02:40
oooh I get it! now!
That explains everything

@TylerMoeller

  names.map(function(name, counter) {
    var url = 'https://api.twitch.tv/kraken/streams/' + names[counter];
    console.log(url)
    $.ajax({
      type: 'GET',
      url: url,
      headers: {
        'Client-ID': 'kiq0dmuoi4yyz2xtldpwtkp8z8scbb'
      },
      success: function(data2) {
        data1.push(data2);

      }
    });
  });
  console.log(data1);
});

Gives an empty array

Waqas Abbasi
@Waqas909
Dec 20 2016 02:47
but if i declared it before, shouldn't it be a global array?
Tyler Moeller
@TylerMoeller
Dec 20 2016 02:57
@Waqas909 In this case, the code has to go out to the API, get the data, and then place it in the array. console.log(data1) is run before it is populated
So, more accurately, it's populated inside your success function, but called before the success function completes all the API calls
Making me do some research to ensure I explain all of this right :D -- had this figured out in my head, but harder to explain it out loud
Waqas Abbasi
@Waqas909
Dec 20 2016 03:01
:D You're very Helpful! I understand the problem now, So it's best I run whatever code I want to run with data1 inside the successfunction?
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:02
Yes, that's the best way to do it - or call a function like:
  names.map(function(name, counter) {
    var url = 'https://api.twitch.tv/kraken/streams/' + names[counter];
    console.log(url)
    $.ajax({
      type: 'GET',
      url: url,
      headers: {
        'Client-ID': 'kiq0dmuoi4yyz2xtldpwtkp8z8scbb'
      },
      success: displayTwitchUserData
    });
  });

  function displayTwitchUserData(data) {
    // write all the data to the page  
  }
Waqas Abbasi
@Waqas909
Dec 20 2016 03:05
Oh yea that makse sense now! Thanks for all the help. I really appreciate it! @TylerMoeller
CamperBot
@camperbot
Dec 20 2016 03:05
:star2: 1175 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
waqas909 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:05
No problem - thanks for helping me explain it better lol
@Waqas909 Is your browser language in dutch by chance?
I'm trying to test something out and don't want to change my languages...
Anyway, if you get a chance, can you tell me if the time is shown with "AM" or "PM" on this page? (I'm hoping it does not if your browser language is Dutch): https://s.codepen.io/TylerMoeller/debug/woRygW
Waqas Abbasi
@Waqas909
Dec 20 2016 03:10

@TylerMoeller My Default Browser Language is English.

And Yea your page shows the correct time (Shows AM) :-)

Tyler Moeller
@TylerMoeller
Dec 20 2016 03:10
I'm hoping it shows in 24hr time for people who do not use that kind of time format. Can't find anyone to test it on lol
Waqas Abbasi
@Waqas909
Dec 20 2016 03:11
xD
C
@engineerwithoutfear
Dec 20 2016 03:15
@TylerMoeller it shows as 10:14 PM for me
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:17
@engineerwithoutfear @Waqas909 Thanks - trying to find someone who expects it show something like 22:14 instead of a AM/PM time format.
CamperBot
@camperbot
Dec 20 2016 03:17
:cookie: 318 | @engineerwithoutfear |http://www.freecodecamp.com/engineerwithoutfear
:cookie: 283 | @waqas909 |http://www.freecodecamp.com/waqas909
tylermoeller sends brownie points to @engineerwithoutfear and @waqas909 :sparkles: :thumbsup: :sparkles:
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:18
It "should" work, I may just have to change my browser settings to verify
C
@engineerwithoutfear
Dec 20 2016 03:18
@TylerMoeller oh, whoops. I misread lol
Enjoy an extraneous datapoint, then :P
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:18
:)
Tom
@moT01
Dec 20 2016 03:19
@TylerMoeller changed my computer clock to 24 hour format, ...didn't show on the page
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:20
I need to figure out how that works - it should be based on browser settings, and those can be different than the OS/Computer settings
Easier to do on the server side rather than with client-side javascript, more research needed :)
Simranjit Singh
@sim3001
Dec 20 2016 03:23
can someone help me with a problem im having?
i have a form on my page and when i load the website it goes down to the form when i want it to open at the top
i dont know how to fix the issue as it focuses the form as it is looking for text input
Tom
@moT01
Dec 20 2016 03:24
got a pen?
could be like, cached or something that its going down there
or maybe it starts with the field focused, is that what you were trying to sa
y
Tyler Moeller
@TylerMoeller
Dec 20 2016 03:27
Okay, it works.... but only based on the browser's UI Language, not on the user's system locale... changed my browser language to dutch and it says "maandag, 19:23" instead of "Monday, 7:23 PM"
Tom
@moT01
Dec 20 2016 03:30
its something, not sure its what you were going for
im down to one algorithm left
S7eve
@S7eve
Dec 20 2016 03:50
$("#main-form input[name='yubikeyOTP']").val($("#nyroModal-form input[name='yubikeyOTP']").val());
can anyone help me? I really dont get what is the meaning of the code above...any help will be greatly appreciated! cheers
@sim3001 maybe you can post the source code here? so we can actually see whats wrong with ur code?
Pramod Potdar
@ppmakeitcount
Dec 20 2016 03:52
var wikiUrl="http://en.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&prop=extracts&exchars=100&format=json";

$.ajax({
  url: wikiUrl,
  dataType: "jsonp",
  success: function( response ){
    console.log(response);
    var randomTitle = response.query.pages[pageid].extract;

   // console.log(randomTitle);
  }
})
hey guys. can anyone help me to store title of wikipidea entry into variable.
Tom
@moT01
Dec 20 2016 03:54
your response gives you some objects?
i got slowed there for a bit, ...look into a .each or a .foreach or maybe a .map in jquery, i think theres an example in the exercise as well. if your problem is what i think it is
Pramod Potdar
@ppmakeitcount
Dec 20 2016 03:57
@moT01 yea it gives me object. i has everything. information is in query.pages."someid" and someid is allways diffrent
S7eve
@S7eve
Dec 20 2016 03:58
<input type="hidden" name="login" value="1" />
guys does anyone know what was the real function of "value =1" in this line of code? why it is there and for what purpose? any help will be greatly appreciated! cheers guys!
Pramod Potdar
@ppmakeitcount
Dec 20 2016 03:59
Screen Shot 2016-12-20 at 9.28.20 AM.png
Tom
@moT01
Dec 20 2016 04:00
im not sure of its designed purpose, i used it on my calculator to get the values of the buttons
Pramod Potdar
@ppmakeitcount
Dec 20 2016 04:00
@moT01 take a look at this image. pages:object has one property. which is not same everytime. so how can i access it??
Tom
@moT01
Dec 20 2016 04:00
i think a button will show that value if theres nothing in between the tags
got a pen? i think its what i was trying to tell you, but im not sure. it's not the same, because its a random page right?
Pramod Potdar
@ppmakeitcount
Dec 20 2016 04:02
yes
Tom
@moT01
Dec 20 2016 04:02
@S7eve as for your earlier question, im not sure. i looks like your trying to get the value of something with a dynamically created id
from a form input
Tyler Moeller
@TylerMoeller
Dec 20 2016 04:09
@PP-MakeItCount use Object.keys to get the ID, for example: Object.keys(response.query.pages)
any 1 know why the href wont change color?
Zaurbek Zhakupov
@zzhakupov
Dec 20 2016 04:19
Hello is there any React gurus online?
Pramod Potdar
@ppmakeitcount
Dec 20 2016 04:24
@TylerMoeller that worked man. thanks a lot.
CamperBot
@camperbot
Dec 20 2016 04:24
pp-makeitcount sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1176 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Michael Karpinski
@karpimpski
Dec 20 2016 04:29
does anybody know why this React code won't render anything to my page?
class Recipe extends React.component {
  render(){
    return(
      <div class='recipe'>
        <div class='name'>
          {this.props.name}
        </div>
        {this.props.ingredients.map(function(ingredient, index){
          return(
            <div class='ingredient'>{ingredient}</div>
          );
        })}
      </div>
    );
  }
}
var name = 'test';
var ingredients = ['ingredient one', 'ingredient two'];
ReactDOM.render(<Recipe name={name} ingredients={ingredients}/>, document.body);
nevermind, I didn't capitalize my C :P
Coy Sanders
@coymeetsworld
Dec 20 2016 05:20
can't use class keyword in React @karpimpski, needs to be replaced with className
Michael Karpinski
@karpimpski
Dec 20 2016 05:21
@coymeetsworld sorry, should've mentioned that i fixed it. the class error is non-fatal, what messed me up was not capitalizing my C in component
thank you for the help! :)
Coy Sanders
@coymeetsworld
Dec 20 2016 05:22
but you had to change class too right?
except at the top, i mean within the render function
Paulo Kinopk
@pkinopk
Dec 20 2016 06:07
Hey guys, I'm really stuck. What is wrong with my code that it doesn't show the random quotes? $(document).ready(function () { newColor(); $("#newQuote").on("click", function () { $("#quote").fadeOut(1000); $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function (json) { $("#quote").html(JSON.stringify(json)); }); setTimeout(newColor, 1000); $("#quote").fadeIn(1000); }); });
$(document).ready(function () { newColor(); $("#newQuote").on("click", function () { $("#quote").fadeOut(1000); $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function (json) { $("#quote").html(JSON.stringify(json)); }); setTimeout(newColor, 1000); $("#quote").fadeIn(1000); }); });
Yanuar
@Yanuarpr
Dec 20 2016 06:49
help i always get this message in my console: Access to Font at 'https://production-assets.codepen.io/assets/telefon/black/3f32b1c9-8e26-465…0-3-6435f1279663bb84d4a1d8effe0adafbf8499ff6efdd01a59be848c90d8c4c0b.woff2' from origin 'http://s.codepen.io' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://s.codepen.io' that is not equal to the supplied origin. Origin 'http://s.codepen.io' is therefore not allowed access.
CamperBot
@camperbot
Dec 20 2016 06:49
no wiki entry for: i always get this message in my console access to font at httpsproduction-assetscodepenioassetstelefonblack3f32b1c9-8e26-4650-3-6435f1279663bb84d4a1d8effe0adafbf8499ff6efdd01a59be848c90d8c4c0bwoff2 from origin httpscodepenio has been blocked by cors policy the access-control-allow-origin header has a value httpsscodepenio that is not equal to the supplied origin origin httpscodepenio is therefore not allowed access
Sorin Ruse
@sorinr
Dec 20 2016 07:01
@pkinopk where is your newColor() function defined? and your api call i think is wrong. it returns same quote each time. see this example
Coy Sanders
@coymeetsworld
Dec 20 2016 07:03
in short @Yanuarpr, you can't make secure calls (https) from non-secure sessions (http). Or vice versa
try googling CORS for further details on it
its a security measure
Yanuar
@Yanuarpr
Dec 20 2016 07:06
@coymeetsworld thanks
CamperBot
@camperbot
Dec 20 2016 07:06
yanuarpr sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 1658 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Dec 20 2016 07:07
np
tommy
@tommygebru
Dec 20 2016 07:30

hey people i was able to find a team on twitch, becauase I saw that the api had mentioned "teams"

so i found one called nicebuilds, and i can access it with the api but now im wondering how to access or just find out ---- is there even a way to access the streamers on this page?
https://www.twitch.tv/team/nicebuilds

tommy
@tommygebru
Dec 20 2016 07:38
this is what i can view when i look up the "teams" name on api call
Screen Shot 2016-12-19 at 11.38.03 PM.png
grantknaver
@grantknaver
Dec 20 2016 07:39
anyone have any ideas as to why this clearTimeout() does not work?
the one attached to mouseleave()
any help would be a huge help
Ashan Mohammed
@AshanMohammed
Dec 20 2016 07:53
Hello!
text and a div overrides each other and looks collapsed in small devices. i am using twitter bootstrap to make it responsive but couldn't get it right.
<div class="container-fluid">
           <div class="row"> 
              <div class="headtop col-lg-12 col-md-12 col-sm-12 col-xs-12">
                 <h2 class="text-center">text text text text  text text  text text  text text  text text  text text  text text  text text  text text  text text  text text  text text  text text  text text text text  text text  text text  text text  </h2>
              </div>
              <div class="optin col-lg 6 col-md-6 col-sm-8 col-xs-12">

              </div>
           </div>  
        </div>
body{
    background-image: url(images/mttb.jpg);
    background-size: 100% 110vh;
    background-repeat: no-repeat;
}

 .headtop{
     width:100%;
     height:100px;
     position: absolute;
      }

 .headtop h2{
  font-weight: bold;
  color:#FFFFFF;
  position: absolute;
 }

  .optin{
      background-color:rgb(200,200,200);
      height: 50px;
      width: 200px;
  }
fijeko
@fijeko
Dec 20 2016 08:05
@grantknaver clearTimeout acctualy works and it clears your timeout function before it start
grantknaver
@grantknaver
Dec 20 2016 08:06
@fijeko quick question than how do I fire my setTimeout than
Dilip Kumar Joshi
@DILIPKUMARJOSHI
Dec 20 2016 08:10
Hi i am stuck at first project.How to start it pls anyone tell me
project name is Build a Tribute page
Help
Fatah N
@fatahn
Dec 20 2016 08:18
@DILIPKUMARJOSHI Just start. open codepen.io and type some html youve learn. And build slowly, everything wiill fall into place. Start then let us know where you are stuck & dont worry most of us have been there
Dilip Kumar Joshi
@DILIPKUMARJOSHI
Dec 20 2016 08:22
okay
@nfatah i opened codepen.io but what do after that i am unable to understand
Dilip Kumar Joshi
@DILIPKUMARJOSHI
Dec 20 2016 08:28
anybody please how to start with
aj-willi
@aj-willi
Dec 20 2016 08:49
look at the example as reference
u can then style ur own
Baha Aiman
@bhshkh
Dec 20 2016 09:09
Hi
How do I upload image here?
Baha Aiman
@bhshkh
Dec 20 2016 09:14
Capture.PNG
How do I achieve input box like the above
?
Joel
@okmarq
Dec 20 2016 09:31
hey guys i need some advice on what course to study to achieve my aim. i want to actually do a course in college that i will end up developing games and related stuffs like that so what course do i take up in college thanks for your input
software engineering or computer science?
aj-willi
@aj-willi
Dec 20 2016 09:42
start by learning Unity 3d or Unreal and C C++ programming languages is a good start
C
@engineerwithoutfear
Dec 20 2016 09:44
More colleges will offer computer science--I think software engineering is a little rarer. Regardless, you should make things on your own outside of class using Unity/Unreal/C++ etc.
Sorin Ruse
@sorinr
Dec 20 2016 09:53
@AshanMohammed you have a problem in here: <div class="optin col-lg 6 col-md-6 col-sm-8 col-xs-12"> you missed "-" in col-lg-6
hey i have done most of the work. Can any one help me how to grab each object and add new title and extract of wiki entry to html
Abhishek Kumar
@Mr-Kumar-Abhishek
Dec 20 2016 10:02
someone help~ how to fill the half of the circle with different color ? I have tried z-index and all with no luck ~ https://mr-kumar-abhishek.github.io/pomodoro-clock/
alpox
@alpox
Dec 20 2016 10:16
@okmarq My guess is that computer science will be better suited in this case, since software engineering tends more to be about market solutions - application structures, planning, analysis etc.
Sorin Ruse
@sorinr
Dec 20 2016 10:25
@BahaAiman you can achieve this by something like: example
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 11:36
I'm trying to relearn everything I learned like 6 months ago. How do I find up to date info? developer.mozilla.org is telling me a bunch of stuff for DOM traversal is obsolete, but I'm not finding what I'm supposed to use now. There's still search results from the past year that still use them.
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 11:37
Hi, I'm having a trobble using Wikipedia's API
codepen are on https and wikipedia api url are in https to, but mozilla browser keep saying that "cross-origin request bloqued"
samething to do with Same Origin Policy that I dont get it
Sorin Ruse
@sorinr
Dec 20 2016 11:40
@SmailyCarrilho can u post the link to ur pen?
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 11:43
Sorin Ruse
@sorinr
Dec 20 2016 11:46
@SmailyCarrilho $("#inputSearch").val(); not $("#inputSearch").text();
@SmailyCarrilho it should be like: example
Sorin Ruse
@sorinr
Dec 20 2016 11:51
@SmailyCarrilho and ofc you should insert pesquisa val into your urlMediaWiki
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 11:55
@sorinr I dont quite understand whta really was the problem. It was only this "val()" and the missing "&callback=?" ?
Sorin Ruse
@sorinr
Dec 20 2016 11:58
@SmailyCarrilho and JSON.stringify(data) not JSON.stringify(json)
C
@engineerwithoutfear
Dec 20 2016 11:59
@SmailyCarrilho are you familiar with callback functions?
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 12:01
@engineerwithoutfear I think not. What it does?
@SmailyCarrilho http://callbackhell.com/ shorter explanation (read "what are callbacks?" section)
basically javascript goes on to the next line of code after asking wikipedia for its data. it doesn't wait. so your program will crash if the next line of code relies on having the wikipedia data!
Sorin Ruse
@sorinr
Dec 20 2016 12:05
@SmailyCarrilho on asynchronous calls you actually get the response from the ajax later so using the callback you instruct what function to use when the response has arrived
C
@engineerwithoutfear
Dec 20 2016 12:05
yup
Sorin Ruse
@sorinr
Dec 20 2016 12:10
@SmailyCarrilho if you add this to ajax call async: false your function will wait until gets back a response from the server. its bad practice coz if for some reason the server does not respond (the call is wrong formated, server cannot be reached, etc) will hold back your code to run
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 12:15
@sorinr @engineerwithoutfear So, what I have to do is create a function that will be waiting for response and than it will get the result and shown on screen? Than I dont need to use methods "success" or "error" from ajax call?
Sorin Ruse
@sorinr
Dec 20 2016 12:16
@SmailyCarrilho your ajax call as it is now its quite ok. i said do not add async: false coz bad things may happen
C
@engineerwithoutfear
Dec 20 2016 12:18
@SmailyCarrilho sort of.... also, it looks like you have jquery involved, wht not use getJSON? It's a bit easier
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 12:19
@sorinr Ok, Understood. Thanks for your help.
CamperBot
@camperbot
Dec 20 2016 12:19
smailycarrilho sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 982 | @sorinr |http://www.freecodecamp.com/sorinr
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 12:20
@engineerwithoutfear I've tried. But it was giving me the browser cross-origin error so I changed to $.ajax to see if that was the problem
C
@engineerwithoutfear
Dec 20 2016 12:20
format is:
$.getJSON(yourpickofURL + "?callback=?" , function(jsonfromurl) { // do whateva you want in here })
vengal
@vengal4327
Dec 20 2016 12:20
@vengal4327
Can someone help me with this? Here my header center is occupying all width that's left over from header_left and header_right. However, the header_right should wrap its content based on inner divs. In my case header_right is occupying more width than it's inner div elements as I gave min-width:500px (As alignment is off if i takeoff that min-width). Is there a way to make header_right to wrap content so that header_center can grab width correctly. Main criteria is alignment of header_left,header_center and header_right should be the same with reduced screen size and also when an additional element is added to Header_right it should wrap content. I got struck around this issue and couldn't move further.
http://codepen.io/anon/pen/XNOLXy
Sorin Ruse
@sorinr
Dec 20 2016 12:20
@SmailyCarrilho :+1:
C
@engineerwithoutfear
Dec 20 2016 12:20
@SmailyCarrilho yeah it's terribly difficult to work out at first
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 12:20
for DOM navigation am I supposed to use something called WeakMap ?
Smaily Carrilho
@SmailyCarrilho
Dec 20 2016 12:23
@engineerwithoutfear Thanks for your help!
CamperBot
@camperbot
Dec 20 2016 12:23
smailycarrilho sends brownie points to @engineerwithoutfear :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @engineerwithoutfear |http://www.freecodecamp.com/engineerwithoutfear
Waqas Abbasi
@Waqas909
Dec 20 2016 12:30

Finally Done!!
https://codepen.io/Waqas909/full/MbZVJx/

FeedBack needed!! The Code is not very efficient (It's a lot but most of it is copy paste)

The Search bar only works, if you enter the channel name exactly
Pieter Stokkink
@forkerino
Dec 20 2016 12:32
@Waqas909 Congrats, but really, you will learn a lot more by writing your own code. For this project you'll only need to make 2 ajax calls.
Looks fantastic, though
Waqas Abbasi
@Waqas909
Dec 20 2016 12:33
It makes an ajax call everytime someone switches the option from the menu ^^
I got stuck in my ways of doing it, so that seemed the most appropriate
Sorin Ruse
@sorinr
Dec 20 2016 12:34
@vengal4327 so if i understand right u need a row divided by 3 columns. left column that will be left aligned :) the middle column that you want everything in there to be always centered and the 3rd column should be right aligned and any elements inside will have to adjust width to accommodate the same space. did i get it the right way?
vengal
@vengal4327
Dec 20 2016 12:35
Yes you're right. Elements in 3rd columns should wrap content based on inner div elements.
@sorinr
Waqas Abbasi
@Waqas909
Dec 20 2016 12:36
@forkerino Thank you for the feedback
CamperBot
@camperbot
Dec 20 2016 12:36
waqas909 sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:cookie: 423 | @forkerino |http://www.freecodecamp.com/forkerino
Waqas Abbasi
@Waqas909
Dec 20 2016 12:37
@forkerino The reason for that is that I dont think my skills are at the point of achieving what I wanted to achieve, I already kind of overdid the Project.
Sorin Ruse
@sorinr
Dec 20 2016 12:39
@vengal4327 if you can wait i'll show you an example on how to do it using flexbox
vengal
@vengal4327
Dec 20 2016 12:41
In my case i can't use flexbox. Mine should support IE8
@sorinr
Darth Skywalker
@adityaparab
Dec 20 2016 12:42
IE is the reason for a long time retarded progress of humanity
vengal
@vengal4327
Dec 20 2016 12:42
@adityaparab True!
Sorin Ruse
@sorinr
Dec 20 2016 12:44
@vengal4327 ok. then floats and align-text its the way
vengal
@vengal4327
Dec 20 2016 12:45
@sorinr I tried doing float and inline-block for header-right but it's not working.
Kaito Kid 15
@kaitokid15
Dec 20 2016 12:49
guys, i wanna ask what is a user story??
Sorin Ruse
@sorinr
Dec 20 2016 12:50
@vengal4327 let me finish my cigarette and i'll try to put up a menu as you want :)
Kaito Kid 15
@kaitokid15
Dec 20 2016 12:50
i have some question to my first project in freecodecamp...
vengal
@vengal4327
Dec 20 2016 12:51
@sorinr cool 😀
Kaito Kid 15
@kaitokid15
Dec 20 2016 12:51
thanks :)
Darth Skywalker
@adityaparab
Dec 20 2016 12:51
@vengal4327 : If you're using float property then use of display:inline-block will be of no use
the float property modifies the value of display property to block
in fact float assumes the display to be block
vengal
@vengal4327
Dec 20 2016 12:52
Yeah I tried both separately
@adityaparab
Uros Tadic
@urketadic
Dec 20 2016 13:05
Can someone help me fix minutes on stopwatch?
if (seconds == 60) {
      console.log("minutes");
      minutes++;
      minutes = "0" + minutes;
      seconds = 0;
      appendSeconds.innerHTML = "0" + 0;
    }
Doesn't work, seconds just reset, minutes stay on 0.
Glory Wong Zhaohui
@GloryWong
Dec 20 2016 13:15
Hello
Anyone here?
Tyler Moeller
@TylerMoeller
Dec 20 2016 13:20
@tommygebru For team members, use v5 of the API: https://api.twitch.tv/kraken/teams/nicebuilds/?client_id=xxxxx&api_version=5
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:24
what exactly is a front end? I got sent here recently from helpjavascript.
bleh. I managed to change the <embed> element's src attribute with .setAttribute, and the console seems to show that it's changed, but the web page isn't updating with the new file. why?
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:33
god why is this so confusing?
so many dead ends.
searching for things. never knowing if you're searching for the right thing.
I need to change the DOM directly?
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:40
I can't find where to change attributes here. http://www.w3schools.com/js/js_htmldom.asp
I'm already using setAttribute! Why isn't it working??
how do I change an element's attribute? My code changes it by the webpage doesn't change with the code.
setAttribute changes the code, but the page doesn't update to show that.
I didn't put in jquery. back to the drawing board trying to jam that library in. :(
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:45
I have no idea. I guess no matter what I do I'm going to have to smash my head against a keyboard for an hour before I even hope to get it to work.
Tyler Moeller
@TylerMoeller
Dec 20 2016 13:46
@NEETWizardJanus Happy to help you with a specific problem here. Post your code and we can work through it. If you are just frustrated, maybe take a break and talk to people here: https://gitter.im/FreeCodeCamp/YouCanDoThis
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:46
... I have a feeling they just offloaded me to HelpFrontEnd, because my code isn't complicated enough to have more than one end.
my code's not formatted for online. ... I'm not sure how to put in placeholder files of like images instead of the flash files I'm using. I have a codepen account though.
Tyler Moeller
@TylerMoeller
Dec 20 2016 13:48
Post your codepen link - that's a good way to share your code
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:50
alright, I'll try to get it up... but I don't know how to link to images from codepen. like what sites will permit that.
Tyler Moeller
@TylerMoeller
Dec 20 2016 13:50
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:53
... I wonder what's more difficult. making a few dozen placeholder images or trying to change the code to... just... display plain colors or something. or looking for pre-made placeholder images.
why is everything so complicated?
Tyler Moeller
@TylerMoeller
Dec 20 2016 13:54
@NEETWizardJanus Placeholder images are easy with a service https://placehold.it
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 13:57
I don't know. my code's not even showing the alert window like it does locally. http://codepen.io/NEETWizardJanus/pen/dOwXJv
I only put in the code for the buttons on the larger cell in the top left.
Tyler Moeller
@TylerMoeller
Dec 20 2016 14:00
@NEETWizardJanus Have you considered doing the free code camp front end challenges? They will help you learn how to build a web page and use JavaScript: https://www.freecodecamp.com/map
Sorin Ruse
@sorinr
Dec 20 2016 14:00
@vengal4327 sorry. had something to finish first. here is the example no framework: example
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:01
I tried to, but they're both too easy and too hard and not interesting.
Tyler Moeller
@TylerMoeller
Dec 20 2016 14:03
@NEETWizardJanus They will help you out a lot if you can power through them. You are asking me about .setAttribute() and not using it in your code.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:04
oh, that's why. I was trying to change it to plain .attribute . changing it back to setAttribute and getAttribute at least brings back the alert window.
Pieter Stokkink
@forkerino
Dec 20 2016 14:05
@Waqas909 You will get there soon enough.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:05
ok. now it's changing the code like before. but I have no way of showing whether it's changing because I need to setup placeholder graphics.
... hmmmmm.... well now. the placeholder images are working as intended. they're changing when I click the buttons. but as flash files they don't change.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:10
could it be that flash files that are playing won't change the same way image files do?
Tyler Moeller
@TylerMoeller
Dec 20 2016 14:13
@NEETWizardJanus Flash files are in an <embed> tag and images are in a <img> tag. They are going to behave differently, but I can't help with flash files unfortunately. Haven't used those in a project before
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:14
hm. I might have found instructions on this. luckily. normally my web searches fail.
not that anyone else needs to know, but http://learnswfobject.com/advanced-topics/load-a-swf-using-javascript-onclick-event/ "Replacing a loaded SWF with another SWF" pretty complicated.
though it's from 2010
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:29
uhg. well so far this code isn't compatible. <object> to embed a flash file??
what's the point in learning anything if I won't use it and then I'll forget it?
human minds are so fragile.
and here I am killing mine with more sleep deprivation. just another day in over 2 decades of this horrible self care.
C
@engineerwithoutfear
Dec 20 2016 14:43
I don't think anyone really uses flash anymore. "Modern" flash is basically html5 canvas.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:45
well I gotta use these files.
C
@engineerwithoutfear
Dec 20 2016 14:46
Something like 80% of people won't be able to see it if you use flash. iOS, android, chrome, adobe all don't support it iirc.
Sorin Ruse
@sorinr
Dec 20 2016 14:48
@NEETWizardJanus i don't get why you r using table tag for layout. if u wanna make the page responsive you will meet "MR NIGHTMARE" and it will hurt u :)
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:50
I'm doing this for personal use.
I've heard I should be using div instead of table, but I don't want to add that to the list of things to figure out.
C
@engineerwithoutfear
Dec 20 2016 14:51
Tables are a real pain, we're lucky to have flexbox nowadays
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 14:51
flexbox? what's that? some kinda library?
hm. I see.
Sorin Ruse
@sorinr
Dec 20 2016 15:04
@NEETWizardJanus with html5 table remains as a semantic tabular data display but not for layout. i did it also 7-10 years ago. certain, its very easy to center elements in a table(both hor and vert) but look into the future not go back in time. sooner will be display: grid another one like flexbox. learn for the future i would say
C
@engineerwithoutfear
Dec 20 2016 15:18
^--
Cierra
@c9rb9
Dec 20 2016 15:36
Starting the 1st project but I'm confused on how to call Bootstrap functions. How do I know what to use? Is there a list or something of them.
C
@engineerwithoutfear
Dec 20 2016 15:40
@c9rb9 http://www.w3schools.com/bootstrap/ the left sidebar here has short summaries of all the little bits n bobs available
Sorin Ruse
@sorinr
Dec 20 2016 15:40
@c9rb9 the best way to learn is reading the docs and start with a copy paste of the examples for what u need and just change them to suit ur needs. here the docs for bootstrap if you want to use the lib: http://getbootstrap.com/getting-started/
Cierra
@c9rb9
Dec 20 2016 15:45
Thank you!
Sorin Ruse
@sorinr
Dec 20 2016 15:50
@c9rb9 welcome
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:13
I like how I watched a video and looked through a bunch of pages on flexbox and I still have no idea how to use it.
Jason Luboff
@JLuboff
Dec 20 2016 16:14
@NEETWizardJanus Practice practice practice
Sorin Ruse
@sorinr
Dec 20 2016 16:16
@NEETWizardJanus trial and error its the mother of learning in this field :)
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:17
naw. nothing's working.
Sorin Ruse
@sorinr
Dec 20 2016 16:17
@NEETWizardJanus what is not working?
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:18
I think the educational material isn't working.
Jason Luboff
@JLuboff
Dec 20 2016 16:18
@NEETWizardJanus Well with an attitude like that, of course its not :laughing: as @sorinr said, trial and error.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:19
I've heard people have different preferences for how they learn but I wonder if there's a better source for learning flexbox.
I wish my computer wouldn't lock up every time I look at youtube videos. I'm cursed.
Sorin Ruse
@sorinr
Dec 20 2016 16:21
@NEETWizardJanus just think what you want a page to look like like and let us know. and tell wha thtml elements u think u need to use to accomplish that
C
@engineerwithoutfear
Dec 20 2016 16:22
@NEETWizardJanus this is a good resource for understanding flexbox: https://www.smashingmagazine.com/2015/08/flexible-future-for-web-design-with-flexbox/
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:22
great. I closed the tab and the youtube video is still playing. I want to die.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:23
had to close my whole browser.
I hate being in Ubuntu.
I'm too stupid to be using this. but I swore off Windows 2 years ago.
oh, @engineerwithoutfear thanks for the links.
CamperBot
@camperbot
Dec 20 2016 16:24
neetwizardjanus sends brownie points to @engineerwithoutfear :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @engineerwithoutfear |http://www.freecodecamp.com/engineerwithoutfear
C
@engineerwithoutfear
Dec 20 2016 16:25
@NEETWizardJanus np. don't be depressed! take it slowly a step at a time, and you'll get there eventually.
:)
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:26
so is there somethingn that allows a flexbox constainer to constrain the contents?
ah. I shoulda searched for "max" instead of "constrain"
hm. nope. can't seem to constrain the contents.
nope. those pages both tell me nothing.
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:36
I need drugs, because I'm too old to be wasting days on this with zero progress and nothing making sense.
pisses me off how nothing's explained. "oh yeah, so in this tutorial I'm using Jade. Here's a video about it." except that in that he's not using it in codepen where the newer video uses it, so I have no idea how he's using it. surprise surprise, no web searches explain it.
and then I waste an hour just trying to figure out how someone did something rather than actually following the video.
bite your tongue, Janus!
I'm biting it.
Tom
@moT01
Dec 20 2016 16:39
ha
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:39
I'll say something that'll get me banned if I'm not careful.
Tom
@moT01
Dec 20 2016 16:40
what tutorial?
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:42
I'm not on a tutorial. just trying to learn Flexbox.
Tom
@moT01
Dec 20 2016 16:44
that devtips channel guy on youtube usually does a pretty good job of explaining things
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:45
yeah. he's the jerk who mentioned jade, but doesn't explain how to use it in codepen where he's doing the new video.
I'm going down endless rabbit holes.
Sam Griffen
@ssgriffen
Dec 20 2016 16:46
Anybody have a good idea as to why my wiki project search doesn't return anything for certain searches like "terrier dog" while the FCC example does? http://codepen.io/ssgriffen/pen/KNraGP
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:46
and no rabbits to show for it
god, my head hurts.
I wish I had control over my life. make myself alert, make myself go unconscious.
Tom
@moT01
Dec 20 2016 16:48
@NEETWizardJanus i think jade is just shorthand html, ...an easier way to write html with less code, ...then that gets compiled to regular html, ...in the first video that popped up of his, he mentions it but hes not using it
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:49
they don't teach you how to do any of that. the best you can do is artificially force it through medication.
ADD/ADHD medication for people who don't have ADD/ADHD.
Tom
@moT01
Dec 20 2016 16:50
there must be a video on jade if you want to learn it, ...i would just stick with html since you know it somewhat, and youre trying to learn flexbox, ...not jade
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:50
so codepen compiles it without requiring any settings to tell it to do so?
Tom
@moT01
Dec 20 2016 16:52
i dont think so
@ssgriffen ill take a look in a second
livonian-router
@livonian-router
Dec 20 2016 16:54
Guys, is this code efficient?
Sum All Odd Fibonacci Numbers

function sumFibs(num) {

  function fib(a)
  {
    if(a === 0)
      {
        return 0;
      }
    else if (a === 1)
      {
        return 1;
      }
    else
      {
      return fib(a-1) + fib(a-2);
      }
  }
  var sum = 0;

  for (var i = 0, j; (j = fib(i)) <= num; i++)
    {
      if (j % 2 !== 0)
        {
          sum += j;
        }
    }



  return sum;
}

sumFibs(75025);
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:54
... ok. I think at least half this headache might be from the corn chips and potato chips I had. I can not eat oily food. compounded by sleep deprivation, anger/frustration, and intense, prolonged concentration.
Tom
@moT01
Dec 20 2016 16:54
@NEETWizardJanus http://html2jade.org/ kinda shows how it works
you could use that and just copy paste into a .html file
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:55
strange. I saw him using it on codepen in that 2nd flexbox video.
he links to the codepen... maybe it's.... HTML Preprocessor: Pug?
Tom
@moT01
Dec 20 2016 16:58
@livonian-router does it work?
you make a function and dont use it
@ssgriffen my initial thought was it's cause of the space
NEETWizardJanus
@NEETWizardJanus
Dec 20 2016 16:58
hm. doesn't look like it's Pug.
I gotta stop and go to sleep before I kill myself.
livonian-router
@livonian-router
Dec 20 2016 16:59
@moT01 It works but I want to know the shortest way
vengal
@vengal4327
Dec 20 2016 17:01
@sorinr : Hey please check your example you sent : http://codepen.io/sorinr/pen/ENMKNb
Tom
@moT01
Dec 20 2016 17:02
@livonian-router oh, you do call it, ...looks pretty efficient to me
lets see what mine looks like
i bet its worse
vengal
@vengal4327
Dec 20 2016 17:02
When you reduce screen size header right is coming to bottom instead of aligning with other divs header-left and header-center
Mohannad
@Dudeson231
Dec 20 2016 17:03
Hello, for this front end development project could someone please help and tell me weather am supposed to build a page on my own topic or the same topic they gave me but in a different way? xDD i got confused...
Tom
@moT01
Dec 20 2016 17:04
@livonian-router here's my solution http://codepen.io/moT01/pen/zKXmKQ?editors=1010
@Dudeson231 the tribute page? your own topic, your own way, all youre suppose to do is fulfill the user stories
most of them look really similar to their example
Mohannad
@Dudeson231
Dec 20 2016 17:05
okay thanks
Tom
@moT01
Dec 20 2016 17:05
click name
say thanks
Mohannad
@Dudeson231
Dec 20 2016 17:05
hah ok
@moT01 thanks
CamperBot
@camperbot
Dec 20 2016 17:05
:cookie: 434 | @mot01 |http://www.freecodecamp.com/mot01
dudeson231 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
Tom
@moT01
Dec 20 2016 17:06
@ssgriffen any luck? is that the only term that doesn't work
other things with a space work
Sam Griffen
@ssgriffen
Dec 20 2016 17:10
@moT01 Unfortunatley I have to go to work so I can't mess around with it anymore...thanks tho
Tom
@moT01
Dec 20 2016 17:11
@ssgriffen searching wikipedia for terrier dog says that page doesn't exist
the example is using an api that must grab other pages as well as the the searched page
yours just grabs the searched page
need to add some parameters to ur url
livonian-router
@livonian-router
Dec 20 2016 17:14
@moT01 That's what I expected, sleek and short, thanks :D
CamperBot
@camperbot
Dec 20 2016 17:14
livonian-router sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 435 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Dec 20 2016 17:19
@livonian-router yours wasn't too bad at all in my opinion, ...there's a lot of empty lines you could take out, and it works so, that's all that matters
Sorin Ruse
@sorinr
Dec 20 2016 17:22
@vengal4327 whats wrong with it execpt its not yet responsive?
vengal
@vengal4327
Dec 20 2016 17:23
Header-right is wrapping to second row instead of being in same row when screen size is reduced
@sorinr Header-right is wrapping to second row instead of being in same row when screen size is reduced
Sorin Ruse
@sorinr
Dec 20 2016 17:25
@vengal4327 using media queries u can make it as u want
vengal
@vengal4327
Dec 20 2016 17:26
Ok i will check that. Thanks!
Sorin Ruse
@sorinr
Dec 20 2016 17:26
@vengal4327 i didn't know what you want to look like on smaller screens
@vengal4327 that one its just an example not a full solution
Tyler Moeller
@TylerMoeller
Dec 20 2016 17:27
@ssgriffen the Opensearch module, as it turns out, searches based on page title. There aren't any page titles starting with "Terrier Dog". Use the Query module to return pages related to the search term instead: https://www.mediawiki.org/wiki/API:Query
Mnatan777
@Mnatan777
Dec 20 2016 17:28
I am at the build a personal portfolio and actually overwhelmed. I really want to learn code and enjoyed the first portion of all of Free Code Camp tutorials but I feel that I am still not strong enough in the areas taught as I only had the surface of all of it. How can I remember this stuff and how can I get repetition? Also, I don't even know where to begin to build a portfolio since I feel like I am not yet strong in what I have learned. All advice is appreciated. Thank you :)
vengal
@vengal4327
Dec 20 2016 17:29
@sorinr : Yeah got it . Yes mine should work same even screen size is reduced. Thanks for the example
CamperBot
@camperbot
Dec 20 2016 17:29
vengal4327 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 983 | @sorinr |http://www.freecodecamp.com/sorinr
Tom
@moT01
Dec 20 2016 17:31
@Mnatan777 repetition will help to remember things, nobody knows everything so you often need to be able figure things out when you get there.
Sorin Ruse
@sorinr
Dec 20 2016 17:31
@vengal4327 welcome
Tom
@moT01
Dec 20 2016 17:32
i skipped my portfolio and continued with the lessons and other projects
you could start with something really simple, you will want to go back and add to it as you do more projects and things
Sorin Ruse
@sorinr
Dec 20 2016 17:52
@Mnatan777 for the moment just think that you want to introduce yourself to the virtual world. what info about u will like to present (put it down on a paper), in what colors you like to present things about you? its not that hard. its like a letter you write to the world telling about you. that letter have a title(menu) and some paragraphs, etc
@Mnatan777 ofc you can add some photos in there...
clairchen234
@clairchen234
Dec 20 2016 17:59
hey i have the stupid feeling that I forgot everything but i just started ?
Sorin Ruse
@sorinr
Dec 20 2016 18:02
@clairchen234 i have the same feeling every day but i go on:)
clairchen234
@clairchen234
Dec 20 2016 18:03
@sorinr oh thanks :)
CamperBot
@camperbot
Dec 20 2016 18:03
clairchen234 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 984 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Dec 20 2016 18:06
@clairchen234 reading something every day, make some coding will keep ur mind sharp
Akanksha
@aki2907
Dec 20 2016 18:15
How to build a tribute page??? someone please send some examples
Ali Murtaza
@AliMurtazaInnocent
Dec 20 2016 18:25
Hey I am stuck on bootstrap social icons, can anybody tell me please how can i pull social icons to my project with bootstrap?
Sorin Ruse
@sorinr
Dec 20 2016 18:25
@aki2907 just pick a subject, think how u will like to present it and go on:)
Ali Murtaza
@AliMurtazaInnocent
Dec 20 2016 18:27
I need some help anyone gonna help me please?
Sorin Ruse
@sorinr
Dec 20 2016 18:28
@AliMurtazaInnocent whats the problem?
Ali Murtaza
@AliMurtazaInnocent
Dec 20 2016 18:29
I am trying to add social font awesome to my code pen project but it's not working.
It's the last thing just left please solve this issue.
Sorin Ruse
@sorinr
Dec 20 2016 18:33
@AliMurtazaInnocent are u using font awesome library?
Ali Murtaza
@AliMurtazaInnocent
Dec 20 2016 18:33
thanks It's solved.
Sorin Ruse
@sorinr
Dec 20 2016 18:33
@AliMurtazaInnocent :+1:
Bakri
@POIbakri
Dec 20 2016 19:19
how do I put a background image?
James Shore
@Jimbobmahooley
Dec 20 2016 19:25
Hello, I am currently doing the "Selecting from many options with Switch Statements" challenge and am a bit stuck. Does anyone know how to do it who can help me?
Sorin Ruse
@sorinr
Dec 20 2016 19:40
@POIbakri element { background: url(the imsge url in here);}. you may also add background-size: cover or any other bg related proprties
Tom
@moT01
Dec 20 2016 19:41
@Jimbobmahooley whats the problem
Bakri
@POIbakri
Dec 20 2016 19:45
ive tried background size it isn't working
@sorin
@sorinr could I edit specifics the width and height?
Tom
@moT01
Dec 20 2016 19:53
the container it's in might be restricting its size
Shivank Sharma
@shivanksharma91
Dec 20 2016 19:58
hi, bootstrap carousel is not working any help?
<div class="dishImages">
        <div class="container">
            <div class="row">
            <div class="col-xs-12 col-xs-offset-1 col-md-12 col-md-offset-1">
                <div id="dishCarousel" class="carousel slide" data-ride="carousel">
                    <div class="carousel-inner">
                        <div class="item-active">
                            <img src="Images/img1.jpg" class="img-responsive">
                        </div>
                        <div class="item">
                            <img src="Images/img2.jpg" class="img-responsive">
                        </div>
                        <div class="item">
                            <img src="Images/img3.jpg" class="img-responsive">
                        </div>
                    </div>
                <a class="left carousel-control" href="#dishCarousel" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" href="#dishCarousel" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
                </a>
                </div>
            </div>
            </div>
        </div>
    </div>
Tyler Moeller
@TylerMoeller
Dec 20 2016 19:58
@POIbakri Read through this page, try to get it working, and the post your code here if you are still in need of assistance: http://www.w3schools.com/cssref/css3_pr_background.asp
Marinau Raul
@evilmann2
Dec 20 2016 20:00
Could you guys tell me what happens after completing challenges such as the Tribute Page one ? Am I going to receive some kind of review of my project or how do I know if it was good enough or not?
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:01
@shivanksharma91 You can have up to 12 columns in a row, but you have 13 columns with your offset. Aside from that, do you have bootstrap.css, jQuery, and bootstrap.js added to your project?
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:04
@TylerMoeller
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" ></script> 
    <script src="Js/script.js"></script>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="Css/style.css"/>
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">

</head>
@TylerMoeller made columns also equal to 12, still not working
on clicking the navigation nothing happens
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:05
v1.11 of jQuery seems old - it is up to 3.1 now. Do you have a codepen to look at?
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:05
nope :/
@TylerMoeller is it necessary to specify role?
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:08
@shivanksharma91 the role attribute is an accessibility feature - so screen readers can tell users what they are seeing
@shivanksharma91 It appears you got your carousel code from the v4 bootstrap site: http://v4-alpha.getbootstrap.com/components/carousel/
But you are using v3 of bootstrap in your code
The codepen I have above is for v3 bootstrap, not v4
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:10
hmm, but there seems to be no difference in the code
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:11
I don't have this in my v3 bootstrap code: <div class="carousel-inner">
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:12
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:12
Yes, it uses v3 classes
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:14
@TylerMoeller dont know why its not working, only the active image is displayed and the next two dont appear :/
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:15
@shivanksharma91 Another possible change you can try, change: <div class="item-active"> to <div class="item active"> (replace the hyphen with a space)
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:16
@TylerMoeller already tried, no luck
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:16
Maybe it's backward compatible with v3, idk
To see why it isn't working for you, I'd have to see the console and debug. It would be helpful to have a codepen or jsbin of it.
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:21
@TylerMoeller i have the git https://github.com/shivanksharma91/Agni
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:30
@shivanksharma91 If you can deploy it as a gh-pages branch, we can investigate further
Click the 'branches' drop-down button, enter 'gh-pages' and select "Create branch: gh-pages", wait a few minutes, and then navigate to: https://shivanksharma91.github.io/Agni
If that isn't something you want to do - you might want to start with a working carousel in codepen and then integrate into your page
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:35
@TylerMoeller check the branch
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:37
@shivanksharma91 It appears to be the version of jQuery you are using - try using a later version. In the Console, I get this error:
Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3(…)
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:38
hmm, ok let me change
@TylerMoeller still no luck
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:40
I'm still seeing the same error in the console - looks like you added 3.1.1, but the error says it needs one lower than 3
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:40
@TylerMoeller and there is still error
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:41
Use the version I gave you - 2.2.24
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:42
@TylerMoeller using the version you gave
blob
Remove that hyphen before -active like we talked about above
<div class="item active">
So, in the end, it was a different version of jQuery needed and changing the class item-active to item active. It works for me now :)
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:49
@TylerMoeller hmm , still doesnt work for me :worried:
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:51
I still see class item-active here: https://shivanksharma91.github.io/Agni/
Shivank Sharma
@shivanksharma91
Dec 20 2016 20:56
@TylerMoeller thanks a lot, i still dont know why the hell it was not working on my side by even doing the changes :smile: p
CamperBot
@camperbot
Dec 20 2016 20:56
shivanksharma91 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1179 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Dec 20 2016 20:58
@shivanksharma91 No problem - it should work on github as well if you just change that one line of code to <div class="item active">
Chadd Williams
@chaddd980
Dec 20 2016 21:21
hey i need a little help with my random quote site. basically its done and all works perfectly fine. just when i copy the code to codepen, the ajax call doesn't work, so no quotes show up. i found that i needed to put https://crossorigin.me/ before the url of my ajax call. but that still didn't do anything. here is the link to my codepen https://codepen.io/chadd980/pen/NbJvmZ?editors=0010. does anyone have any experience with this?
Uros Tadic
@urketadic
Dec 20 2016 21:26
I have problem with http://codepen.io/urketadic/full/YpLgBX/ As you can see, jquery kinda has delay on hiding the elements, and they show for a second. Do you know how i can fix this?
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:26
@chaddd980 Forismatic only works over HTTP, so the only way to use your quote machine is to open your web page over HTTP: http://codepen.io/chadd980/pen/NbJvmZ?editors=0010
Jacob
@jdc101214
Dec 20 2016 21:26
Hey guys!
How would you set up an if statement when a button is clicked?
Vicfs
@Vicfs
Dec 20 2016 21:28
@TylerMoeller what would you say is the best way to make a "sectioned" portfolio?
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:28
@urketadic Your CSS will load before jQuery, so one way to fix this is to assign a class hide to the elements you want to be hidden and then remove that class when it's time to show them. In your CSS, the class hide would have a value of display: none
@Vicfs I would use <section> tags and assign a min-height to each section. Put a nice navbar at the top.
Chadd Williams
@chaddd980
Dec 20 2016 21:29
huh. interesting @TylerMoeller thanks
CamperBot
@camperbot
Dec 20 2016 21:29
chaddd980 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1180 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Vicfs
@Vicfs
Dec 20 2016 21:30
@TylerMoeller so i'd use the section tag the same way i use a div?
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:30
@chaddd980 Some people use the crossorigin.me as a proxy to get things working over HTTPS, but it is unreliable as you've seen ;) - best to use a quote API that supports HTTPS, in my opinion, otherwise, only support HTTP
Vicfs
@Vicfs
Dec 20 2016 21:30
@TylerMoeller and what's the difference actually?
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:31
@Vicfs Yes, you could also use divs if you prefer. Here's an explanation on the section tag: http://www.w3schools.com/html/html5_semantic_elements.asp
Vicfs
@Vicfs
Dec 20 2016 21:32
@TylerMoeller to achieve a "layer" effect do you simply apply margins to your body and then a background color/image?
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:33
@Vicfs "layer" like this: http://s.codepen.io/TylerMoeller/debug/xRagVr ??
Vicfs
@Vicfs
Dec 20 2016 21:34
yea, if you're talking about the black background vs the blue section
Jacob
@jdc101214
Dec 20 2016 21:34
How can I make js return an html element with text from an array?
http://codepen.io/jdc101214/pen/LRORwO
Tyler Moeller
@TylerMoeller
Dec 20 2016 21:35
Yes, that's all you need to do then - assign a background-color to each <section> and a minimum height with margins in between
@Vicfs
Vicfs
@Vicfs
Dec 20 2016 21:37
alright, so setting a background color to my body to achieve that is not considered bad practice right?
Jacob
@jdc101214
Dec 20 2016 21:37
@TylerMoeller Can you help me?
Tyler Conoff
@Yoplay8
Dec 20 2016 22:06
.
Sam Griffen
@ssgriffen
Dec 20 2016 22:11
Hey guys, coming to my trusted community to help me figure out why my JSON GET request isn't pulling back the data. http://codepen.io/ssgriffen/pen/rWRGgd
Jacob
@jdc101214
Dec 20 2016 22:13
How do I even start with the weather challenge?
Walid Ashri
@walidashri
Dec 20 2016 22:54
@ssgriffen this api requests a header u need to set the header for successful call
Phiggins567
@phiggins567
Dec 20 2016 23:07
Hi guys, I was wandering if someone could help me. I'm trying to get quotes using storm consultancy api, but having trouble displaying the data using jsonp. http://codepen.io/phiggins567/pen/aBMVWM
Pieter Stokkink
@forkerino
Dec 20 2016 23:18
@phiggins567 You don't have a function called 'my-method' as indicated by the callback in the url.
Phiggins567
@phiggins567
Dec 20 2016 23:20
@forkerino thanks, changed it to '?' and its started working
CamperBot
@camperbot
Dec 20 2016 23:20
phiggins567 sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:cookie: 433 | @forkerino |http://www.freecodecamp.com/forkerino
Pieter Stokkink
@forkerino
Dec 20 2016 23:20
@phiggins567 :thumbsup: sometimes solutions can be simple.
Phiggins567
@phiggins567
Dec 20 2016 23:22
yea i've found i like to over complicate things for myself!
Uros Tadic
@urketadic
Dec 20 2016 23:43
@TylerMoeller Thank you, so basically css display:none is equivilent to jquery hide
CamperBot
@camperbot
Dec 20 2016 23:43
urketadic sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1181 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Dustin Michael Jackson
@MasterJackson
Dec 20 2016 23:50
why do the html and css courses have only one text editor, shouldn't there be separate text editors to switch between for each language???????
i'm typing two languages inside one whole editor and its just all jumbled up together and unorganized, the devs team should work out a fix for this ASAP!!!! I'm use to switch between HTML and CSS.
Mikołaj
@khejit
Dec 20 2016 23:53
@MasterJackson aye, that would be nice
Dustin Michael Jackson
@MasterJackson
Dec 20 2016 23:55
yes it would @khejit, I am new to freecodecamp and ive my previous years of learning to code I became a student at codecademy.com and they have it structured a lot better then these courses....just saying.....and I also take online courses on my android phone with the help of the Sololearn app
but anyways, that's just my 2 cents of complaint so far.....I like somethings about freecodecamp that other web services do not offer.......yup