These are chat archives for FreeCodeCamp/Help

2nd
Mar 2016
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:00
hello @techtolentino I'm doing my first test and I I'm trying to figure out how to check if I get 200 stus and json file
Do you think you could help me out?
Randy
@techtolentino
Mar 02 2016 00:01
You have code already?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:02
yes
this is what I had before, used to work as long as i had the server running https://github.com/Rafase282/Mangadb/blob/master/tests/test-server.js
Randy
@techtolentino
Mar 02 2016 00:03
Not sure if this will help
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:03
this is what i'm trying:
var request = require("request");
var assert = require('assert');
var server = require("../server.js");
var base_url = "http://localhost:" + process.env.PORT;

describe("MangaDB API", function() {

  describe("GET /", function() {
    it("returns status code 200", function(done) {
      request.get(base_url, function(error, response, body) {
        //expect(response.statusCode).toBe(200);
        assert.equal(200, response.statusCode);
        done();
      });
    }); // END it code 200
  }); // End Get /

  describe("GET /api", function() {
      it("returns json msg", function(done) {
      request.get(base_url + "/api", function(error, response, body) {
        //expect(body).toBe("Hello World");
        assert.equal("Hello World", body);
        done();
      });
    }); // END it json msg
  }) // End Get /api

}); // End API Test
Randy
@techtolentino
Mar 02 2016 00:03
Scroll down to Writing the Response Test
He has a test case for a 200
Oh ok... What are you getting when you test?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:04
the test for the status code works
the get /api is where im failing
i get html so either error or home page
Randy
@techtolentino
Mar 02 2016 00:04
I see
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:05
it is on c9 if you want i can invite you
Randy
@techtolentino
Mar 02 2016 00:05
Im on my phone lol
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:05
Uncaught 'Hello World' == 'TypeError: Cannot read property &#39;split&#39; of undefined<br> &nbsp; &nbsp;at exports.logConnection (/home/ubuntu/workspace/
      + expected - actual
however the tutorials i see they are all different in many ways
if i coudl turn https://github.com/Rafase282/Mangadb/blob/master/tests/test-server.js into code that would run with my current file i'll be happy
Randy
@techtolentino
Mar 02 2016 00:07
What's undedined... Have you been able to console what's undefined?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:08
i know what that is
i deaded it with before
using this code
var request = require('supertest');
var expect = require('chai').expect;

var url = 'https://mangadb-rafase282.c9users.io';

describe('GET /api', function(){
  it('respond with json', function(done){
    request(url)
      .get('/api')
      .set('accept-language', 'no, Just testing')
      .set('user-agent', 'a test server (Test unit with mocha) Test stuff')
      .expect('Content-Type', /json/)
      .expect(200)
      .end(function(err, res){
        if (err) return done(err);
        console.log(res.body)
        done();
      });
  });
})
basically i had to set headers manually
Randy
@techtolentino
Mar 02 2016 00:08
Hmmm
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:08
my api extracts info fro a few of them
so the two set fixes that
Misael Valera
@MisaV
Mar 02 2016 00:09
guys how do you nest the existing img element within an a element?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:09
but this is supertest not just mocha
Chris Davis
@chrisdav6
Mar 02 2016 00:10
<a href="#">
<img src="someURL">
</a>
Misael Valera
@MisaV
Mar 02 2016 00:10
thanks so much!!!
Chris Davis
@chrisdav6
Mar 02 2016 00:10
you are welcome sir :)
Randy
@techtolentino
Mar 02 2016 00:10
Interesting... I prolly can't fig it out until i get on a comp and you'll prob get it before then... My bad man
Jack Heaton
@LikeClockwork
Mar 02 2016 00:11
Anyone make it to the steamroller problem yet?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:11
is okay, thanks for trying @techtolentino
CamperBot
@camperbot
Mar 02 2016 00:11
rafase282 sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 202 | @techtolentino | http://www.freecodecamp.com/techtolentino
Randy
@techtolentino
Mar 02 2016 00:12
Oh i see you created an issue too, nice
Nm, that might be different
What are you doing with the response?
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:16
I take it youa re still talking to me? If so yes, I do have an issue on it.
Which response? the 200 or the one on /api which is failing?
Randy
@techtolentino
Mar 02 2016 00:20
Api
(im learning at this point)
Rafael J. Rodriguez
@Rafase282
Mar 02 2016 00:28
well what's your question
Rachel
@totallyrhombus
Mar 02 2016 00:35
i've been trying to make the font awesome icons larger on the buttons at the bottom of my page. any suggestions?
kelvinshang
@kelvinshang
Mar 02 2016 00:36
@totallyrhombus use fa-lg
Rachel
@totallyrhombus
Mar 02 2016 00:36
ah thanks @kelvinshang
CamperBot
@camperbot
Mar 02 2016 00:36
totallyrhombus sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 186 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Rushdi Felimban
@rushfel
Mar 02 2016 00:53
@icthieves , thanks a lot, it worked like a breeze. I also uploaded the image to Google drive and followed their instructions on public sharing on the web. But, only displayed a small icon only!. If any body had a successful similar experience with Google drive, let me know with regards.
CamperBot
@camperbot
Mar 02 2016 00:53
rushfel sends brownie points to @icthieves :sparkles: :thumbsup: :sparkles:
:star: 132 | @icthieves | http://www.freecodecamp.com/icthieves
senshis
@senshis
Mar 02 2016 00:59
Hey guys, i believe there's some "HelpJS"(or something along those lines) room out here. Specifically for javascript. Can anyone help me find it?
DJ
@qualitymanifest
Mar 02 2016 00:59
help rooms
CamperBot
@camperbot
Mar 02 2016 00:59

:point_right: help rooms [wiki]

Help Rooms

Choose the right room for your question!

:pencil: read more about help rooms on the FCC Wiki

DJ
@qualitymanifest
Mar 02 2016 00:59
second one down
senshis
@senshis
Mar 02 2016 00:59
@qualitymanifest Thanks :)
CamperBot
@camperbot
Mar 02 2016 00:59
senshis sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1032 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Mar 02 2016 01:00
np :+1:
Phillip Kelley-Dotson
@pkdotson
Mar 02 2016 01:12
How do you change the text input in your form to the class form-control? This is what I have so far:
kelvinshang
@kelvinshang
Mar 02 2016 01:15
<input class="form-control"></input>
@pkdotson ^
David Godfrey
@dgodfrey95
Mar 02 2016 01:19
This is my code for print JSON information. The name of the exercise is called "Convert JSON Data to HTML". The code works (when I click on the #getMessage button the message is shown) but the program won't submit.
$("#getMessage").on("click", function() {
      $.getJSON("/json/cats.json", function(json) {

        var html = "";
        var keys = Object.keys(json);
        html += "<div class = 'cat'>";
        keys.forEach(function(key) {
          html += "<b>" + key + "</b>: " + json[key] + "<br>";
        });
        html += "</div><br>";

           $(".message").html(html);

      });
    });
sotol007
@sotol007
Mar 02 2016 01:23
hey, do u see a mistake in here ? <img class= "responsive" src="http://bit.ly/fcc-running-cats" </img>
David Godfrey
@dgodfrey95
Mar 02 2016 01:24
@sotol007 img does not have a closing tag.
Jonathan Coleman
@jondcoleman
Mar 02 2016 01:24
@dgodfrey95 I don't get the message in the message box when running your code
sotol007
@sotol007
Mar 02 2016 01:24
@dgodfrey95 still doesn't solve the problem
Jonathan Coleman
@jondcoleman
Mar 02 2016 01:25
this is what I get:
0: [object Object]
1: [object Object]
2: [object Object]
DJ
@qualitymanifest
Mar 02 2016 01:25
@sotol007 the class is img-responsive not just responsive
and yeah, missing the > and you don't need </img>.
kelvinshang
@kelvinshang
Mar 02 2016 01:25
@sotol007 you're also missing >
sotol007
@sotol007
Mar 02 2016 01:26
@qualitymanifest thx it worked
CamperBot
@camperbot
Mar 02 2016 01:26
sotol007 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1033 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Jonathan Coleman
@jondcoleman
Mar 02 2016 01:26
@dgodfrey95 you are missing the first and last lines of the code snippet they give you
David Godfrey
@dgodfrey95
Mar 02 2016 01:27
@jondcoleman Here is what I changed it to. It still doesn't work. ```
$(document).ready(function() {

    $("#getMessage").on("click", function() {
      $.getJSON("/json/cats.json", function(json) {

        var html = "";
        var keys = Object.keys(json);
        html += "<div class = 'cat'>";
        keys.forEach(function(key) {
          html += "<b>" + key + "</b>: " + JSON.stringify(json[key]) + "<br>";
        });
        html += "</div><br>";

           $(".message").html(html);

      });
    });
  });
Elifaz Filho
@Elifaz
Mar 02 2016 01:31
wiki everything true
CamperBot
@camperbot
Mar 02 2016 01:31
no wiki entry for: everything true
Elifaz Filho
@Elifaz
Mar 02 2016 01:31
wiki Everything Be True
CamperBot
@camperbot
Mar 02 2016 01:31

:point_right: algorithm everything be true [wiki]

Explanation:

The program needs to check if the second argument is a truthy element, and it must check this for each object in the first argument.

Hint: 1

Remember to iterate through the first argument to check each object.

Hint: 2

Only if all of them are truth will we return true, so make sure all of them check.

Hint: 3

You could use loops or callbacks functions, there are multiple ways to solve this problem.

Spoiler Alert!

687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

Solutions ahead!

:pencil: read more about algorithm everything be true on the FCC Wiki

Phillip Kelley-Dotson
@pkdotson
Mar 02 2016 01:31
thanks @kelvinshang
CamperBot
@camperbot
Mar 02 2016 01:31
pkdotson sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 197 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Misael Valera
@MisaV
Mar 02 2016 01:45
how do you put a pink CSS class in the <style>
B. Garber
@TheBGar
Mar 02 2016 01:46
@MisaV you can do it a number of ways...
@MisaV have you learned how to do internal css yet?
Misael Valera
@MisaV
Mar 02 2016 01:48
Im still on the first basic html5 stuff but I have learned CSS
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:49
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<div class="container-fluid">
  <h2 class="red-text">CatPhotoApp</h2>
  <h2 class="img-responsive"><img src=http://bit.ly/fcc-running cats></h2>
  <p>Click here for <a href="#">cat photos</a>.</p>

  <a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
B. Garber
@TheBGar
Mar 02 2016 01:49
@MisaV can you post your code? I'd be happy to help. Please use the markdown format listed below :point_down:
explain format
CamperBot
@camperbot
Mar 02 2016 01:49

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Mikayla Porter
@mikaylaporter
Mar 02 2016 01:50
Can i please get help with fixing the button element with the text like
B. Garber
@TheBGar
Mar 02 2016 01:50
@mikaylaporter what is your problem?
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:51
Can I please get help with making an new button element with the text like
Because I can't figure it out
B. Garber
@TheBGar
Mar 02 2016 01:52
@mikaylaporter are you familiar with making a button in general?
Sean
@ofperfection
Mar 02 2016 01:52
function slasher(arr, howMany) {
  // it doesn't always pay to be first

  var result = arr.splice(0,howMany);

  return result;
}

slasher([1, 2, 3], 2);
Why is that code returning '2'
I thought splice
would cause
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:52
Yes
Sean
@ofperfection
Mar 02 2016 01:52
index 0
removal of 2 elements
per the splice documentation
But the result is 1,2
and not [3]
B. Garber
@TheBGar
Mar 02 2016 01:53
@mikaylaporter ok, so check out the code you posted....do you see the code for the "submit" button?
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:54
Yes I am
Sean
@ofperfection
Mar 02 2016 01:54
// myFish is ['angel', 'clown', 'trumpet', 'surgeon'] 
// removes 2 elements from index 0, and inserts 'parrot', 'anemone' and 'blue'
removed = myFish.splice(0, 2, 'parrot', 'anemone', 'blue');
// myFish is ['parrot', 'anemone', 'blue', 'trumpet', 'surgeon']
// removed is ['angel', 'clown']
Misael Valera
@MisaV
Mar 02 2016 01:54
h
DJ
@qualitymanifest
Mar 02 2016 01:54
@SeanSaibot you'll want to BEGIN your splice at howMany's length
B. Garber
@TheBGar
Mar 02 2016 01:54
@mikaylaporter use that code as your guide to writing the code for a "Like" button
@MisaV are you able to post the code you have thus far?
DJ
@qualitymanifest
Mar 02 2016 01:55
@SeanSaibot currently you're saying "return the numbers between index 0 and howMany" which is 1, 2
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:56
@TheBGar should it look like this
<button type="like"> Like</button>
DJ
@qualitymanifest
Mar 02 2016 01:56
@SeanSaibot you want to return the numbers starting at howMany
Sean
@ofperfection
Mar 02 2016 01:56
ah, I thought splice REMOVED elements
DJ
@qualitymanifest
Mar 02 2016 01:56
@SeanSaibot it does
@SeanSaibot one sec i'll get an example
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:57
Yes I do
B. Garber
@TheBGar
Mar 02 2016 01:57
@mikaylaporter close! the type shouldn't be "like". What are you wanting the button to do?
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:58
So should the code look like the line of code above
DJ
@qualitymanifest
Mar 02 2016 01:58
@SeanSaibot nevermind on the example. but basically: splice removes elements, and if you assign them to a variable, or return them, that variable or return gets the removed elements.
B. Garber
@TheBGar
Mar 02 2016 01:58
@mikaylaporter make sure you "mention" me when responding so I know you're still talking to me :wink2:
Sean
@ofperfection
Mar 02 2016 01:59
okay I understand
I think
B. Garber
@TheBGar
Mar 02 2016 01:59
@mikaylaporter yes, it should look almost exactly the same -- just need to adjust the "type"
Mikayla Porter
@mikaylaporter
Mar 02 2016 01:59
Hello
Sean
@ofperfection
Mar 02 2016 02:00
WHOO! Thanks @qualitymanifest !
CamperBot
@camperbot
Mar 02 2016 02:00
seansaibot sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1035 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Mar 02 2016 02:00
np :+1:
B. Garber
@TheBGar
Mar 02 2016 02:01
@mikaylaporter in this case, I believe you want your type to be "submit", yeah? Which exercise is this for?
Sean
@ofperfection
Mar 02 2016 02:01
So i just called the original array instead of a new spliced variable and it ran correctly!
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:01
Wait never mind I figured it out
Jennifer Linkenauger
@jlinkenauger
Mar 02 2016 02:02
Does anyone know if the <header> tag doesn't work in all browsers?
B. Garber
@TheBGar
Mar 02 2016 02:03
@jlinkenauger here's a great resource -- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header
@jlinkenauger check the browser compatibility section at the bottom of the listing
Jennifer Linkenauger
@jlinkenauger
Mar 02 2016 02:03
thank you @TheBGar
CamperBot
@camperbot
Mar 02 2016 02:03
jlinkenauger sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 318 | @thebgar | http://www.freecodecamp.com/thebgar
B. Garber
@TheBGar
Mar 02 2016 02:03
@jlinkenauger :thumbsup:
rocaportland
@rocaportland
Mar 02 2016 02:06

Did anyone solved this challenge?
Add Borders Around your Elements
CSS borders have properties like style, color and width

For example, if we wanted to create a red, 5 pixel border around an HTML element, we could use this class:

<style>
.thin-red-border {
border-color: red;
border-width: 5px;
border-style: solid;
}
</style>
Create a class called thick-green-border that puts a 10-pixel-wide green border with a style of solid around an HTML element, and apply that class to your cat photo.

Remember that you can apply multiple classes to an element by separating each class with a space within its class attribute. For example:

<img class="class1 class2">

Run tests (ctrl + enter)
Reset Help Bug
Your img element should have the class smaller-image.
Your img element should have the class thick-green-border.
Give your image a border width of 10px.
Give your image a border style of solid.
The border around your img element should be green.

Create an a element that links to http://freecatphotoapp.com and has "cat photos" as its anchor text.
Greg D
@mosaic-greg
Mar 02 2016 02:08
@rocaportland where are you stuck
kelvinshang
@kelvinshang
Mar 02 2016 02:10
I am completely lost in the "Stand in Line" challenge, its asking: Write a function queue which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The queue function should then return the element that was removed.
function queue(arr, item) {
  // Your code here
  console.log(arr, item);
  console.log(arr.push(item));
  console.log(arr.shift());
  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
rocaportland
@rocaportland
Mar 02 2016 02:10
am stuck on Create an a element that links to http://freecatphotoapp.com and has "cat photos" as its anchor text.
B. Garber
@TheBGar
Mar 02 2016 02:12
@rocaportland what are you having a hard time understanding
rocaportland
@rocaportland
Mar 02 2016 02:12
I am lost in the part that say" your element should have the anchor text of "cat photo"
B. Garber
@TheBGar
Mar 02 2016 02:13
@rocaportland can you post your code using the markdown format?
explain format
CamperBot
@camperbot
Mar 02 2016 02:13

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Mikayla Porter
@mikaylaporter
Mar 02 2016 02:13
Can I please get help with use the bootstrap grid to put elements side by side
B. Garber
@TheBGar
Mar 02 2016 02:14
@mikaylaporter look into the class "row" :wink:
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:14
Here is my code
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

  <p>Click here for <a href="#">cat photos</a>.</p>

  <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">
  <div class="row">
    <button class="btn btn-block btn-primary <div col-xs-4>">Like</button>
    <button class="btn btn-block btn-info <div col-xs-4>">Info</button>
<button class="btn btn-block btn-danger <div col-xs-4>">Delete</button>
  <p>Things cats love:</p>
  <ul>
<li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
rocaportland
@rocaportland
Mar 02 2016 02:14
<p>Here's a <a href="http://freecatphotoapp.com"> cat photo</a> for you to follow.</p>
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:15
Is that for me?
B. Garber
@TheBGar
Mar 02 2016 02:15
@mikaylaporter did that help?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:16
Did what help
B. Garber
@TheBGar
Mar 02 2016 02:16
@rocaportland looks like you just need to make sure you set the link in it
@mikaylaporter :point_up: March 1, 2016 8:14 PM
DJ
@qualitymanifest
Mar 02 2016 02:16
This message was deleted
oddly enough that code passes for me when i copy and pasted, even though it's incorrect
B. Garber
@TheBGar
Mar 02 2016 02:18
@rocaportland looks like you have the right example....not sure what your question is?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:18
Well how do I fix it
@qualitymanifest
B. Garber
@TheBGar
Mar 02 2016 02:19
@mikaylaporter which exercise is this for?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:19
Do you just want the link
http://www.freecodecamp.com/challenges/use-the-bootstrap-grid-to-put-elements-side-by-side#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch2%20class%3D%22red-text%20text-center%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%20%20%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%20%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%20%20%3Cimg%20src%3D%22http%3A%2F%2Fbit.ly%2Ffcc-running-cats%22%20class%3D%22img-responsive%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-primary%20%3Cdiv%20col-xs-4%3E%22%3ELike%3C%2Fbutton%3E%0A%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-info%20%3Cdiv%20col-xs-4%3E%22%3EInfo%3C%2Fbutton%3E%0A%3Cbutton%20class%3D%22btn%20btn-block%20btn-danger%20%3Cdiv%20col-xs-4%3E%22%3EDelete%3C%2Fbutton%3E%0A%20%20%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%20%20%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Indoor%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Outdoor%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Loving%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Lazy%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Crazy%3C%2Flabel%3E%0A%20%20%20%20%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%20%20%3C%2Fform%3E%0A%3C%2Fdiv%3E%0A
B. Garber
@TheBGar
Mar 02 2016 02:19
@mikaylaporter if that's easiest, just trying to get the context to help you out
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:19
Okay
Kazadi K.
@kazadi
Mar 02 2016 02:19
is anyone able to help with the Palindrome exercise?
B. Garber
@TheBGar
Mar 02 2016 02:20
@mikaylaporter got it. Ok so you need to make sure you always close your <div> tags
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:21
Okay
B. Garber
@TheBGar
Mar 02 2016 02:22
@mikaylaporter it's a simple thing but always be on the lookout for missing open/close tags....secondly, when assigning a class to an html element you need to name it such...<div col-md-4> doesn't give the div that class....do you remember how to do inline css?
@TheBGar or assigning classes and ids?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:22
Well i added to it and it still isnt working
B. Garber
@TheBGar
Mar 02 2016 02:23
@mikaylaporter did you find the missing closing tag?
Rita Alfonso
@alfonsotech
Mar 02 2016 02:23
@kazadi yes, can you post the code you have so far
B. Garber
@TheBGar
Mar 02 2016 02:23
@mikaylaporter and did you ad the proper code for class to each of the divs?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:24
Well here
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

  <p>Click here for <a href="#">cat photos</a>.</p>

  <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">
  <div class="row">
    <button class="btn btn-block btn-primary <div col-xs-4>">Like</button></div>
    <button class="btn btn-block btn-info <div col-xs-4>">Info</button></div>
    <button class="btn btn-block btn-danger <div col-xs-4>">Delete</button></div>
  <p>Things cats love:</p>
<ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
Kazadi K.
@kazadi
Mar 02 2016 02:24
function reverseMe(word){
    // possibly use reduce amount of variables?
    var wordArr = word.split('').reverse();
    var revStr = wordArr.join('');
    var backWord = tidyUp(revStr);

    return backWord;
}

function tidyUp(mess){
    var clean = mess.replace(/\W+/gi, '');
    // console.log(clean);

    return clean.toLowerCase();
}

function palindrome(str) {
    // console.log(tidyUp(str));
    var    rev_str = reverseMe(tidyUp(str));
    // console.log(rev_str);
    return (tidyUp(rev_str) == str);
}
I’ve passed 10/11 cases
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:24
@TheBGar I don't know what the class should be
B. Garber
@TheBGar
Mar 02 2016 02:24
@mikaylaporter you still need to add your closing tag and the class to the div
Rita Alfonso
@alfonsotech
Mar 02 2016 02:24
I think the wikepedia viewer is much easier than the local weather app, but it comes afterwards. Oh well, I guess it won't take me several days to do this one then.... yei
DJ
@qualitymanifest
Mar 02 2016 02:24
@kazadi underscores are considered a word character
B. Garber
@TheBGar
Mar 02 2016 02:25
@mikaylaporter you have the right class you just didn't write the code correctly
DJ
@qualitymanifest
Mar 02 2016 02:25
@kazadi so replacing \W won't get rid of underscores
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:25
I don't know how it should look
Can you please help me with that
Kazadi K.
@kazadi
Mar 02 2016 02:26
@qualitymanifest hmm…so should I add another special case for underscores?
Rita Alfonso
@alfonsotech
Mar 02 2016 02:26
@kazadi what case(s) are you missing? oh, underscores, got it.
Kazadi K.
@kazadi
Mar 02 2016 02:26
console.log(palindrome("0_0 (: /-\ :) 0-0"));
returns false on terminal, but fCC says it should be true
DJ
@qualitymanifest
Mar 02 2016 02:27
@kazadi you can do multiple things like [thing1thing2] or thing1|thing2
\W would be the first thing
Kazadi K.
@kazadi
Mar 02 2016 02:27
@alfonsotech
DJ
@qualitymanifest
Mar 02 2016 02:27
_ would be the second
B. Garber
@TheBGar
Mar 02 2016 02:27
@mikaylaporter and remember to close your div tag that is still "open"
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:27
How should it be closed
B. Garber
@TheBGar
Mar 02 2016 02:27
@mikaylaporter I'm trying to help without just giving you the answer
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:28
are I not closing it right
I understand that
B. Garber
@TheBGar
Mar 02 2016 02:28
@mikaylaporter you haven't closed it at all yet
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:28
@TheBGar
Okay I will try it again
B. Garber
@TheBGar
Mar 02 2016 02:28
@mikaylaporter currently you have a <div class="row> tag but no closing div tag for it
Rita Alfonso
@alfonsotech
Mar 02 2016 02:28
^ @kazadi right, so you need to take out/eliminate underscore and some other things in there as well
B. Garber
@TheBGar
Mar 02 2016 02:29
@mikaylaporter and you properly styled that div tag with the class "row" but you didn't properly style the buttons in the same format
DJ
@qualitymanifest
Mar 02 2016 02:29
\W and the underscore will cover all non-alphanumerics.
Kazadi K.
@kazadi
Mar 02 2016 02:32
awesome. thanks @alfonsotech thanks @qualitymanifest ill look into the docs
CamperBot
@camperbot
Mar 02 2016 02:32
kazadi sends brownie points to @alfonsotech and @qualitymanifest :sparkles: :thumbsup: :sparkles:
Rita Alfonso
@alfonsotech
Mar 02 2016 02:32
@qualitymanifest what about numbers and spaces?
CamperBot
@camperbot
Mar 02 2016 02:32
:star: 1036 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 322 | @alfonsotech | http://www.freecodecamp.com/alfonsotech
Rita Alfonso
@alfonsotech
Mar 02 2016 02:34
@qualitymanifest You mean I can shorten this? .replace(/\s|\W|[0,2-9]|\_/g, "")
DJ
@qualitymanifest
Mar 02 2016 02:34
@alfonsotech it replaces everything that's not A-Z, a-z, 0-9 and underscores. so it will replace spaces which you want to get rid of, and won't replace numbers since you want to keep those
yes
B. Garber
@TheBGar
Mar 02 2016 02:34
explain brownie points
CamperBot
@camperbot
Mar 02 2016 02:34

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Rita Alfonso
@alfonsotech
Mar 02 2016 02:35
@qualitymanifest indeed, I was able to shorten it. Nice to know.
thanks @qualitymanifest
CamperBot
@camperbot
Mar 02 2016 02:36
alfonsotech sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1037 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Mar 02 2016 02:36
yw :+1:
rprusia
@rprusia
Mar 02 2016 02:37
Any idea why this won't pass my challenge?
Create a class called thick-green-border that puts a 10-pixel-wide green border with a style of solid around an HTML element, and apply that class to your cat photo.
.think-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
my border actually has a green, 10px, solid line around the img
B. Garber
@TheBGar
Mar 02 2016 02:37
@rprusia did you make sure you put that class in the html?
Rita Alfonso
@alfonsotech
Mar 02 2016 02:37
Any idea why this won't pass my challenge?
.think-green-border is mis-spelled
B. Garber
@TheBGar
Mar 02 2016 02:38
@rprusia and yeah, @alfonsotech great catch!
rprusia
@rprusia
Mar 02 2016 02:38
boy you guys are awesome!
i need spell check
Rita Alfonso
@alfonsotech
Mar 02 2016 02:39
you can also put all that on a single line:
.thick-green-border {
border: size style color;
}
wait, is tha tthe right order of things?
B. Garber
@TheBGar
Mar 02 2016 02:40

@rprusia just make sure to think-green-border too! :wink2: haha also,

@alfonsotech is right, common practice is

h1 {
border: 1px solid green;
}
Rita Alfonso
@alfonsotech
Mar 02 2016 02:40
border: 5px solid red; :thumbsup: ^
B. Garber
@TheBGar
Mar 02 2016 02:41
@mikaylaporter did you get it figured out?
@rprusia make sense?
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:49
NO @TheBGar
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

  <p>Click here for <a href="#">cat photos</a>.</p>

  <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">
  <div class="row">
    <div><button class="btn btn-block btn-primary col-xs-4">Like</button></div>
    <div><button class="btn btn-block btn-info col-xs-4">Info</button></div>
    <div><button class="btn btn-block btn-danger col-xs-4">Delete</button></div>
  </div>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <div>
    <button type="submit">Submit</button>
    </div>
  </form>
</div>
And I don't see the problem
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:56
@TheBGar do you see the problem
B. Garber
@TheBGar
Mar 02 2016 02:58
@mikaylaporter try moving the column classes from your buttons to their respective divs
@mikaylaporter after all, you are wanting the divs to have the column styles, not the buttons
Mikayla Porter
@mikaylaporter
Mar 02 2016 02:59
 I will try thank you @TheBGar
CamperBot
@camperbot
Mar 02 2016 02:59
mikaylaporter sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:star: 320 | @thebgar | http://www.freecodecamp.com/thebgar
Mikayla Porter
@mikaylaporter
Mar 02 2016 03:00
Yes that worked thank you so much @TheBGar
CamperBot
@camperbot
Mar 02 2016 03:00
mikaylaporter sends brownie points to @thebgar :sparkles: :thumbsup: :sparkles:
:warning: mikaylaporter already gave thebgar points
B. Garber
@TheBGar
Mar 02 2016 03:00
@mikaylaporter rock on :thumbsup:
sprtn
@sprtn
Mar 02 2016 03:11
Love the name
Youssef Zahra
@yimba
Mar 02 2016 03:12
can someone please help me with the private variables and methods
sprtn
@sprtn
Mar 02 2016 03:14
Can you specify your problem? ^^
comaeternal
@comaeternal
Mar 02 2016 03:16
does anyone know how to set an ID to an element?
Coy Sanders
@coymeetsworld
Mar 02 2016 03:17
@comaeternal id="some_id"
i.e. <div id="title_row">
comaeternal
@comaeternal
Mar 02 2016 03:17
in the DIV element?
Coy Sanders
@coymeetsworld
Mar 02 2016 03:17
any element, but yeah div works too
could do <a id="some_id">, <h2 id="some_other_id">
silencefierce
@silencefierce
Mar 02 2016 03:18

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>

how to uncomment h1 h2 and p
Coy Sanders
@coymeetsworld
Mar 02 2016 03:19
uncomment? looks uncommented like that right there
sprtn
@sprtn
Mar 02 2016 03:19
<h1 id="something">Header</h1>
comaeternal
@comaeternal
Mar 02 2016 03:19
'''
CamperBot
@camperbot
Mar 02 2016 03:19
:bulb: to format code use backticks! ``` more info
Coy Sanders
@coymeetsworld
Mar 02 2016 03:19
comment tags in html are the <!-- and --> tags, anything between that is commented out
Youssef Zahra
@yimba
Mar 02 2016 03:19

Now try it yourself! Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value.

// these are public methods
this.accelerate = function(change) {
speed += change;
};

this.decelerate = function() {
speed -= 5;
};

this.getSpeed = function() {
return speed;
};
};

var Bike = function() {

var gear;
this.getGear = function(pickedSpeed){

};
this.setGear = function(pickedSpeedTwo) {

};

};

var myCar = new Car();

var myBike = new Bike();
myBike.gear();

comaeternal
@comaeternal
Mar 02 2016 03:19
<form id=cat-photo-app>
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>;'''
CamperBot
@camperbot
Mar 02 2016 03:19
:bulb: to format code use backticks! ``` more info
Youssef Zahra
@yimba
Mar 02 2016 03:19
dont know why but all of this has really confused me. if anyone can help that would be great
Coy Sanders
@coymeetsworld
Mar 02 2016 03:21
@camperbot cat-photo-app needs to be in quotes
@comaeternal i mean lol
comaeternal
@comaeternal
Mar 02 2016 03:21

```<form id=cat-photo-app>

<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>

<label><input type="radio" name="indoor-outdoor"> Outdoor</label>

<label><input type="checkbox" name="personality" checked> Loving</label>

<label><input type="checkbox" name="personality"> Lazy</label>

<label><input type="checkbox" name="personality"> Energetic</label>

<input type="text" placeholder="cat photo URL" required>

<button type="submit">Submit</button>
</form>;```

im trying to copy and paste it. Ill try it out. thanks
Coy Sanders
@coymeetsworld
Mar 02 2016 03:22
think the ``` needs to be on its own lines for it to format correctly
@yimba what challenge is that again? i forget
silencefierce
@silencefierce
Mar 02 2016 03:22

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>
how to uncomment h1 h2 and p but make visible in page

comaeternal
@comaeternal
Mar 02 2016 03:23
<form id="cat-photo-app">
Youssef Zahra
@yimba
Mar 02 2016 03:23
@coymeetsworld its the Make Object Properties Private challenge
comaeternal
@comaeternal
Mar 02 2016 03:23
still doesn't work.
Youssef Zahra
@yimba
Mar 02 2016 03:23
@coymeetsworld The method getGear of myBike should be accessible outside the object.
The method setGear of myBike should be accessible outside the object.
myBike.gear should remain undefined.
myBike.getGear() should return 4 after calling myBike.setGear(4).
myBike.getGear() should return 3 after calling myBike.setGear(3).
myBike.getGear() should return 1 after calling myBike.setGear(1).
^ this is what i should be trying to get. but i am having a bit of a struggle with that
Juan Sierra
@juan-sierra
Mar 02 2016 03:24
Has anyone here done “Testing Objects for Properties” ?
Coy Sanders
@coymeetsworld
Mar 02 2016 03:24
yeah but that doesn't mean you declare the methods outside of the Car function
when it says accessible outside the object, that doesn't mean they're DECLARED outside of the object
@comaeternal want to show your entire code again? what's not working specifically?
silencefierce
@silencefierce
Mar 02 2016 03:26

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>
how to uncomment h1,h2,p but make visible on page

sprtn
@sprtn
Mar 02 2016 03:26

commenting in html is done with these:
<!--

-->

Anything inbetween those are commented away
I'm not sure what you're asking, silence?
comaeternal
@comaeternal
Mar 02 2016 03:27
well the challenge is to "Give your form element the id cat-photo-form." This my code.
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 02 2016 03:27
Kazadi K.
@kazadi
Mar 02 2016 03:27
@jasierragarcia i have. whatup
comaeternal
@comaeternal
Mar 02 2016 03:28

```

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>;

silencefierce
@silencefierce
Mar 02 2016 03:28
but all the elements disappear @sprtn
Juan Sierra
@juan-sierra
Mar 02 2016 03:28
I solved it already, just wanted to see what other wayst there are to solve it @kazadi
comaeternal
@comaeternal
Mar 02 2016 03:28
<form action="/submit-cat-photo"> <label><input type="radio" name="indoor-outdoor" checked> Indoor</label> <label><input type="radio" name="indoor-outdoor"> Outdoor</label> <label><input type="checkbox" name="personality" checked> Loving</label> <label><input type="checkbox" name="personality"> Lazy</label> <label><input type="checkbox" name="personality"> Energetic</label> <input type="text" placeholder="cat photo URL" required> <button type="submit">Submit</button> </form>
sprtn
@sprtn
Mar 02 2016 03:28
That's what commenting does, @silencefierce
Kazadi K.
@kazadi
Mar 02 2016 03:29
@jasierragarcia ohhh. you want to compare code?
Coy Sanders
@coymeetsworld
Mar 02 2016 03:29
what test you not passing @comaeternal ?
Juan Sierra
@juan-sierra
Mar 02 2016 03:29
@kazadi yeah
comaeternal
@comaeternal
Mar 02 2016 03:29
test 40
sprtn
@sprtn
Mar 02 2016 03:29
You need to end the comment with the -->. Anything between "<!--" and "-->" is commented away, so that it's not shown in the website
Kazadi K.
@kazadi
Mar 02 2016 03:30
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {

  if (myObj.hasOwnProperty(checkProp))
          return myObj[checkProp];
  else 
      return "Not Found";
}

// Test your code by modifying these values
console.log(checkObj("gift"));
@jasierragarcia
Aeoryth
@Aeoryth
Mar 02 2016 03:30
@comaeternal after form in <form action=, put id="cat-photo-app"
comaeternal
@comaeternal
Mar 02 2016 03:30
<div class="gray-background">
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
Kevin Brennan Guzi
@kevinbg012
Mar 02 2016 03:30
@yimba The getGear function should not have a parameter, just the setGear
Juan Sierra
@juan-sierra
Mar 02 2016 03:31
@kazadi I’ll chat you up privately
Kevin Brennan Guzi
@kevinbg012
Mar 02 2016 03:31
the getGear is to return the gear value inside the function constructor
Aeoryth
@Aeoryth
Mar 02 2016 03:31
It should say <form action="/submit-cat-photo" id="cat-photo-form">
Kevin Brennan Guzi
@kevinbg012
Mar 02 2016 03:31
the setGear is to set the variable gear, that is why it should have a parameter
comaeternal
@comaeternal
Mar 02 2016 03:32
<form action="/submit-cat-photo" id="cat-photo-app">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
Kazadi K.
@kazadi
Mar 02 2016 03:33
thats cool
comaeternal
@comaeternal
Mar 02 2016 03:33
I input this in and I still cant pass the challenge
Aeoryth
@Aeoryth
Mar 02 2016 03:33
@comaeternal it needs to be id='cat-photo-form' not 'id='cat-photo-app'
sprtn
@sprtn
Mar 02 2016 03:33
^
Aeoryth
@Aeoryth
Mar 02 2016 03:34
You're using the word "app" instead of the word "form"
comaeternal
@comaeternal
Mar 02 2016 03:34
@Aeoryth thanks that worked lol
CamperBot
@camperbot
Mar 02 2016 03:34
comaeternal sends brownie points to @aeoryth :sparkles: :thumbsup: :sparkles:
:star: 134 | @aeoryth | http://www.freecodecamp.com/aeoryth
Aeoryth
@Aeoryth
Mar 02 2016 03:34
The code tester is rather specific about how you word things. When you're doing your own stuff it doesn't matter as long as you can remember and use the IDs that you set, but for the purposes of your units you have to be exact.
Not a problem! Glad I could help.
Coy Sanders
@coymeetsworld
Mar 02 2016 03:35
oh missed that lol @Aeoryth , been a while since i did that
Aeoryth
@Aeoryth
Mar 02 2016 03:35
@coymeetsworld I actually went back to my map and looked at my code and compared it to his to find it haha
Is there anyone that could kind of guide me on the "Personal Portfolio" project? I feel like I'm getting thrown into the water here and I don't know how to swim yet. I broke one of the rules and looked at the example code, but to be honest I don't understand much of it anyway.
Jose Barakat
@JoseBarakat
Mar 02 2016 03:37
Hi, need help with "Validate US Telephone Numbers" in "Advanced Algorithm Scripting"
Aeoryth
@Aeoryth
Mar 02 2016 03:39
I get the concepts, but I feel I don't really know enough about boostrap or CSS in general to style the page in an appealing way. I get the whole read-search-ask thing but I feel like if you're going to throw a project like this on someone you should at least show them a little more code first. I tried searching up a few of the things I wanted to do, and I was so overwhelmed by all of the different things out there that I just thought I'd come here.
sprtn
@sprtn
Mar 02 2016 03:41
:smile:
Coy Sanders
@coymeetsworld
Mar 02 2016 03:41
how far have you gotten and what are you trying to do now @Aeoryth
sprtn
@sprtn
Mar 02 2016 03:43
I keep pressing ctrl+s to submit my challenges. So used to notepad++
Brandon Lindsey
@bmlindsey
Mar 02 2016 03:43
@Aeoryth check out http://getbootstrap.com/css/ and http://getbootstrap.com/components/ for reference, gives you a reference on what you can do with bootstrap and how you can do it
Aeoryth
@Aeoryth
Mar 02 2016 03:47
@coymeetsworld I made a navbar, but I basically just googled "how to make a navbar in boostrap" and copied what I saw on w3schools. That's about as far as I've gotten. Code is easy for me to understand. Design, however, is not. I have some really cool ideas for how i'd LIKE it to look, but at this point I'm just trying to get this done so I can move on and learn more code. I'll come back to it when I'm more confident. So really I'd just like to copy the example as best as possible, with a few minor tweaks
sprtn
@sprtn
Mar 02 2016 03:48
There are many great designs already made which you can copy, so you only have to focus on the structure
Coy Sanders
@coymeetsworld
Mar 02 2016 03:49
yeah my design blows lol
Aeoryth
@Aeoryth
Mar 02 2016 03:50
@sprtn I suppose you're right. I understand how to make the /functions/ of the website just fine. It's just structuring things and putting them in their proper place that eludes me. Linking inside the page, making buttons work, etc. I get. Creating those buttons and such, I'm not quite as confident with.
Coy Sanders
@coymeetsworld
Mar 02 2016 03:50
my portfolio page looks embarassing, i didn't care just moved on. I did what I was supposed to but style wise it looks bad
but don't get bogged on the design, all I did for displaying the different sections is use a different background color that's it
sprtn
@sprtn
Mar 02 2016 03:51
@Aeoryth I suggest you make the structure (bare html) first, then worry about css and placement. That helped me in the start, as CSS can be very hard at the start.
Aeoryth
@Aeoryth
Mar 02 2016 03:51
I have ideas that I find quite beautiful, but putting them into reality is where I have trouble. Pretty much any art form eludes me on that
crajcan
@crajcan
Mar 02 2016 03:51
hey guys, Im having trouble getting my bootstrap well to center, my h1 is centered, but my well is not . it's all in a container-fluid:
<div class="col-xs-9">
<div class="well">
<img src="http://screenrant.com/wp-content/uploads/Curb-Your-Enthusiasm-Season-8-Trailer.jpg" class="img-responsive center-block img-rounded">
</div>
</div>
</div>
DJ
@qualitymanifest
Mar 02 2016 03:51
@JoseBarakat if you have code and you just need help with a couple things, i'd be happy to take a look.
sprtn
@sprtn
Mar 02 2016 03:52
You close a div too many, @crajcan
Aeoryth
@Aeoryth
Mar 02 2016 03:52
^
sprtn
@sprtn
Mar 02 2016 03:52
Or maybe you just copied more than intended
crajcan
@crajcan
Mar 02 2016 03:52
that last one is for the container-fluid
that is above, and i didn't paste
DJ
@qualitymanifest
Mar 02 2016 03:54
@crajcan do you have a codepen for this?
sprtn
@sprtn
Mar 02 2016 03:54
Kinda hard to know what to say without the code and/or the assignment. I'd suggest using float, but y'know... Might not be what's asked of you
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 02 2016 03:55
oh, BTW, can anyone tell me if i may use another CSS Framework? Just as Pure CSS?
sprtn
@sprtn
Mar 02 2016 03:56
Make sure you're centering everything you want to center. "text-align: center;" doesn't work with div's, to my understanding.
Aeoryth
@Aeoryth
Mar 02 2016 03:56
@sprtn Doing the bare html is probably my best bet for now. One of my problems is that I want my code to look neat and I find that when I have to add extra div elements or something later on (for styling) my code gets messy and my OCD kicks in and I spend 20 minutes backspacing and tabbing until it looks just right.
Manish Giri
@Manish-Giri
Mar 02 2016 03:56
@Aeoryth or you can just use tidy in codepen
Aeoryth
@Aeoryth
Mar 02 2016 03:57
@Manish-Giri that's a thing?
sprtn
@sprtn
Mar 02 2016 03:57
@Aeoryth I'm the same. It's a habit you get into as you learn how many divs you need and such.
Manish Giri
@Manish-Giri
Mar 02 2016 03:57
@Aeoryth yep, does all the formatting for you, in a matter of milliseconds
Jhony Alberto Grillet Medina
@ChinuxParibus
Mar 02 2016 03:57
@sprtn you're right, that's why Boostrap has a text-center helper class
Aeoryth
@Aeoryth
Mar 02 2016 03:57
@Manish-Giri You are my hero. Thanks -- brownie points for you.
CamperBot
@camperbot
Mar 02 2016 03:57
aeoryth sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 695 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Mar 02 2016 03:57
@Aeoryth lol, my pleasure!
sprtn
@sprtn
Mar 02 2016 03:57
@crajcan you never center the div you want to center. A nested div doesn't count as text
Thus doesn't work with text-align
DJ
@qualitymanifest
Mar 02 2016 03:58
@crajcan it's your use of col-xs-9. that takes up 9 of the 12 columns. you could make it col-xs-8 and offset it by 2. or you could just not use bootstrap and give .well margin: 0 auto;
sprtn
@sprtn
Mar 02 2016 03:58
^
crajcan
@crajcan
Mar 02 2016 03:58
@sprtn right, that was for my h1, I realize a well isn't text
gonna give a few of these suggestions a try. thanks
sprtn
@sprtn
Mar 02 2016 04:00
@crajcan Sorry, didn't intend to sound condecending. I know you dont think it's a text, but I was thinking you might think it had the same function. My bad. Did not mean to offend.
Aeoryth
@Aeoryth
Mar 02 2016 04:00
Is it best practice to give your large div elements class="container fluid"? I don't quite understand what that does -- is it for responsiveness?
crajcan
@crajcan
Mar 02 2016 04:00
@sprtn nah, don't worry. I didn't think you were being condecending, I was just trying to clarify my thought process for you. thanks for the help
CamperBot
@camperbot
Mar 02 2016 04:00
crajcan sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sprtn
Aeoryth
@Aeoryth
Mar 02 2016 04:01
(I get what container does, it's the fluid part that I'm more interested in)
@Aeoryth It creates a container spanning the entire width of your viewport
Aeoryth
@Aeoryth
Mar 02 2016 04:02
@sprtn Yeah maybe I just need to read more
sprtn
@sprtn
Mar 02 2016 04:03
Google is your friend, @Aeoryth ;)
Aeoryth
@Aeoryth
Mar 02 2016 04:03
@sprtn The problem I have with Googling things is that I usually end up with about 10 links that all seem to do what I want, but in different ways. I have no way to tell which is best
@sprtn In this case, however, I probably should've just googled how fluid works
sprtn
@sprtn
Mar 02 2016 04:05
@Aeoryth It's no biggie. I have 5 more hours to kill before my first lecture of the morning, what's a google search now and again
Aeoryth
@Aeoryth
Mar 02 2016 04:06
@sprtn In reference to my previous comment about having a lot of different solutions to the same problem: is it just personal preference or are there practices that are best for certain types of websites/styles?
When I was looking into how to make a navbar I found far too many ways to do so
sprtn
@sprtn
Mar 02 2016 04:06
@Aeoryth Yes to both. Some are better, and some are personal preference.
Aeoryth
@Aeoryth
Mar 02 2016 04:07
@sprtn Ugh... That's what I was afraid of. I guess experience will be the best teacher in that case, eh?
sprtn
@sprtn
Mar 02 2016 04:07
@Aeoryth I suggest reading up on w3schools.com
@Aeoryth According to HTML5, there are certain names for certain elements.
<aside></aside>" f.ex
Aeoryth
@Aeoryth
Mar 02 2016 04:08
@sprtn I was turned away from w3schools when I was going through The Odin Project to learn webdev. Not sure if that was an elitism thing or what, but the general consensus seemed to be that w3 had some misleading information.
sprtn
@sprtn
Mar 02 2016 04:09
@Aeoryth They do.
Aeoryth
@Aeoryth
Mar 02 2016 04:09
Nearly any time I mentioned it, it was a near-guarantee that someone would post a link to www.w3fools.com
Oh that site has changed
sprtn
@sprtn
Mar 02 2016 04:11
@Aeoryth my professors in web-programming reccomend w3schools, but advise caution with any and all pages, as they should.
crajcan
@crajcan
Mar 02 2016 04:11
hmm, so i've tried <div class="well"; margin: 0 auto> and <div class="col-xs-8 well offset2"> the first gives me a huge well going all the way across the page, the second doesn't seem to change anything. perhaps i need a separate div for the col?
Aeoryth
@Aeoryth
Mar 02 2016 04:11
@sprtn I suppose that's a best practice for any educational materials.
sprtn
@sprtn
Mar 02 2016 04:13
@crajcan I really reccomend not styling within the html itself unless you absolutely feel like you must. Other than that, trial and error is your friend.
crajcan
@crajcan
Mar 02 2016 04:16
K. I'll rearrange things a bit and go for pure bootstrap
sprtn
@sprtn
Mar 02 2016 04:16
Because the styling in the html will override any and all other styling you put elsewhere. It may cause you hours of headscratching.
Now I'm talking about styling within the elements, really.
Having a <style></style> on top is completely fine.
I personally use a seperate css-file to my webpages, but that's all in personal taste.
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:18
Hello! Need help with
Style Text Inputs as Form Controls
crajcan
@crajcan
Mar 02 2016 04:18
okay, but isn't <div class="col-xs-8 well offset2"> just bootstrap or is the offset html?
sprtn
@sprtn
Mar 02 2016 04:18
That's bootstrap
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:18
There are four steps. I can't get the first one, but I completed the other three steps
sprtn
@sprtn
Mar 02 2016 04:19
Which I'm fairly new to, so that's why I cant be of much help.
crajcan
@crajcan
Mar 02 2016 04:19
okay, so that's what i'm using now, i also tried <div class="well"; margin: 0 auto> but not both at once
sprtn
@sprtn
Mar 02 2016 04:19
Can you share your code @awanumair ?
try setting margin: 0 auto; width: 50%;
@crajcan
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:20
sure @sprtn. Should I just copy and paste the whole thing or just the part I need help in
Steve Gregg
@sgregg85
Mar 02 2016 04:21
I am looking for some help/guidance with the Profile Lookup challenge. Anyone able to help me out
sprtn
@sprtn
Mar 02 2016 04:21
Just do whatever you like, awanumair.
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:22

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
h2 {
font-family: Lobster, Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

</style>

<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div>
<img src="http://bit.ly/fcc-running-cats" class="img-responsive">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input type="text"class="form-control" placeholder="cat photo URL" required>
<button type="submit">Submit <i class="fa fa-paper-plane">
</i>
</button>
</form>
</div>

Steve Gregg
@sgregg85
Mar 02 2016 04:22
Ive tried using a nested if approach and only got one test to pass
sprtn
@sprtn
Mar 02 2016 04:22
What is it that isn't right, @awanumair ?
kelvinshang
@kelvinshang
Mar 02 2016 04:23
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
h2 {
font-family: Lobster, Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

</style>
<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div>
<img src="http://bit.ly/fcc-running-cats" class="img-responsive">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input type="text"class="form-control" placeholder="cat photo URL" required>
<button type="submit">Submit <i class="fa fa-paper-plane">
</i>
</button>
</form>
</div>
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:23
this is the question i'm stuck on: Give the submit button in your form the classes btn btn-primary.
sprtn
@sprtn
Mar 02 2016 04:24
<button type="submit" class="btn btn-primary">
Methinks
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:25
I tried that.
but no luck
sprtn
@sprtn
Mar 02 2016 04:26
Which number are you on?
I can check my code
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:26
Style Text Inputs as Form Controls
sprtn
@sprtn
Mar 02 2016 04:27
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane">Submit</i></button>
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:27
let me try again
sprtn
@sprtn
Mar 02 2016 04:27
<i>Submit</i>
Not-the-Commonwealth
@awanumair
Mar 02 2016 04:28
thanks for helping @sprtn
CamperBot
@camperbot
Mar 02 2016 04:28
awanumair sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sprtn
sprtn
@sprtn
Mar 02 2016 04:28
No problem @awanumair
@sgregg85 What was your issue?
Kelvin-penang
@Kelvin-penang
Mar 02 2016 04:30
hi, can I get some advice? I've been building a row of buttons on my header for Nav purposes. But when I introduce an a item (like a href=...), the text in the button changes color to the default blue. Any Idea how I can change it back to white again?
sprtn
@sprtn
Mar 02 2016 04:31
Yes
Gjovani
@Gorvok
Mar 02 2016 04:31
Hello World
CamperBot
@camperbot
Mar 02 2016 04:31

welcome to FreeCodeCamp @Gorvok!

sprtn
@sprtn
Mar 02 2016 04:32
You need to use css to change the color of links (url's)
swissricola
@swissricola
Mar 02 2016 04:32
anyone know what's wrong with this?
// Setup
var testObj = {
  "an entree": "hamburger",
  "my side": "veggies",
  "the drink": "water"
};

// Only change code below this line

testObj["an entree"];
testObj["the drink"];
Kelvin-penang
@Kelvin-penang
Mar 02 2016 04:32
@sprtn how do I do that?
I mean, specify a class for "a"?
Jose Barakat
@JoseBarakat
Mar 02 2016 04:33
thanks @qualitymanifest
CamperBot
@camperbot
Mar 02 2016 04:33
josebarakat sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 1041 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Mar 02 2016 04:33
@JoseBarakat :+1:
sprtn
@sprtn
Mar 02 2016 04:33

@Kelvin-penang I'd suggest you try writing something like this in your style sheet:

link {
color: black;
}

Been a while since I dabbled in it
Kelvin-penang
@Kelvin-penang
Mar 02 2016 04:34
@sprtn thanks!
CamperBot
@camperbot
Mar 02 2016 04:34
kelvin-penang sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sprtn
sprtn
@sprtn
Mar 02 2016 04:34
Did it work? ^^;
DJ
@qualitymanifest
Mar 02 2016 04:35
This message was deleted
Kelvin-penang
@Kelvin-penang
Mar 02 2016 04:35
@sprtn yes! thanks again!
CamperBot
@camperbot
Mar 02 2016 04:35
kelvin-penang sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sprtn
Kelvin-penang
@Kelvin-penang
Mar 02 2016 04:35
@qualitymanifest yup
thats right
@qualitymanifest thanks
CamperBot
@camperbot
Mar 02 2016 04:35
kelvin-penang sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
sprtn
@sprtn
Mar 02 2016 04:35

a: link {
color: whatever;
}
a: visited {

}

a: active {

}

Steve Gregg
@sgregg85
Mar 02 2016 04:35
@sprtn im not sure how to access the rest of the properties once I confirm that the firstName exists
CamperBot
@camperbot
Mar 02 2016 04:35
:star: 1042 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
sprtn
@sprtn
Mar 02 2016 04:35
You need those three I believe
@sgregg85 Can you link the pic again?
Not sure if I can help you
But I can certainly try
Steve Gregg
@sgregg85
Mar 02 2016 04:38
@sprtn in the record collection challenge I was able to use "collection[id][prop]" to access the items but in this one I cant use that and I am not sure how to
sprtn
@sprtn
Mar 02 2016 04:40
@sgregg85 I dont know the answer to that. Maybe there's someone wiser than me online?
Steve Gregg
@sgregg85
Mar 02 2016 04:42
did u already complete that challenge
@sprtn did u already complete that challenge
sprtn
@sprtn
Mar 02 2016 04:45
@sgregg85 No. If I did, I would help you. I only started these challenges today. I'm at 101
Steve Gregg
@sgregg85
Mar 02 2016 04:45
ok @sprtn thanks anyway, ill keep trying
CamperBot
@camperbot
Mar 02 2016 04:45
sgregg85 sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for sprtn
sprtn
@sprtn
Mar 02 2016 04:47
@sgregg85 Go on here and ask: http://www.twitch.tv/freecodecamp
asaki444
@asaki444
Mar 02 2016 04:53
''' ''
CamperBot
@camperbot
Mar 02 2016 04:53
:bulb: to format code use backticks! ``` more info
asaki444
@asaki444
Mar 02 2016 04:53
''' k'''
CamperBot
@camperbot
Mar 02 2016 04:53
:bulb: to format code use backticks! ``` more info
sprtn
@sprtn
Mar 02 2016 04:53
I'm gonna be off the chat for a while.
asaki444
@asaki444
Mar 02 2016 04:54

``` function myTest(val) {
var answer = "";
// Only change code below this line
switch(val){
case 1:
console.log("alpha");
break;
case 2:
console.log("beta");
break;
case 3:
console.log("gamma");
break;
case 4:
console.log("delta");
break;
}

}

// Only change code above this line

// Change this value to test
myTest(1);```

Selecting from many options with Switch Statements
kelvinshang
@kelvinshang
Mar 02 2016 04:55
@asaki444 you dont need the console.log function

case 1:
answer = "alpha";
break;

etc.

asaki444
@asaki444
Mar 02 2016 04:57
OH!
@kelvinshang thank you
CamperBot
@camperbot
Mar 02 2016 04:57
asaki444 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 227 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
asaki444
@asaki444
Mar 02 2016 05:09
@kelvinshang thank you so much, do you have any info about switch statenetbs
CamperBot
@camperbot
Mar 02 2016 05:09
asaki444 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:warning: asaki444 already gave kelvinshang points
asaki444
@asaki444
Mar 02 2016 05:09
it still isnt runnig
:worried:
kelvinshang
@kelvinshang
Mar 02 2016 05:09
@asaki444 can you show me the code?
Bennn123
@Bennn123
Mar 02 2016 05:19
Your p element should contain the first few words of the provided additional kitty ipsum text.
Do not add a class attribute to the second p element, without removing it from the first one.
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
I don't know where is wrong!

<style>
.red-text {
color: red;
}
.p{
font-size:16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, </p>
<p class="p"> shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

kevharvell
@kevharvell
Mar 02 2016 05:20
remove . in front of p @Bennn123
kelvinshang
@kelvinshang
Mar 02 2016 05:20
@Bennn123 also remove class="p"
Bennn123
@Bennn123
Mar 02 2016 05:22
@kevharvell @kelvinshang like this?

<style>
.red-text {
color: red;
}
.p{
font-size:16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, </p>
<p> shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

kelvinshang
@kelvinshang
Mar 02 2016 05:23
@Bennn123 you haven't removed the . in front of p in the style section
kevharvell
@kevharvell
Mar 02 2016 05:23
still need to remove . in front of .p
Bennn123
@Bennn123
Mar 02 2016 05:27
thank you !@kevharvell @kelvinshang
CamperBot
@camperbot
Mar 02 2016 05:27
bennn123 sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 229 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Bennn123
@Bennn123
Mar 02 2016 05:29
@camperbot It's good
someoneoffl
@someoneoffl
Mar 02 2016 05:33
@Bennn123 For elements, such as <p> <h1> <body> , we need to use p { } h1 { } body { } in css
@Bennn123 for classes, such as <p class="red-text"> we need to use .(period) in front of the element in css. ex: .p
* ex: .red-text (dont look at the above ex)
@Bennn123 for ids, such as <p id="unique"> we need to use # before the element ex: #unique
milpool
@milpool
Mar 02 2016 05:44
this is retarded. I started a new account so that all the code would be reset but it is not. All the code that I did on my other account is in the new account.
Bennn123
@Bennn123
Mar 02 2016 05:44
@someoneoffl I have known that!It's helpful
Michael Warenycia
@wolfindustries
Mar 02 2016 05:44
@milpool Clear cookies? Try a different browser?
kelvinshang
@kelvinshang
Mar 02 2016 05:44
@milpool it could be saved to your cookies, try making a new account in a different browser
Michael Warenycia
@wolfindustries
Mar 02 2016 05:45
I wanna call jinx...
kelvinshang
@kelvinshang
Mar 02 2016 05:45
how about we say: great minds think alike?
Michael Warenycia
@wolfindustries
Mar 02 2016 05:45
Works for me :)
milpool
@milpool
Mar 02 2016 05:45
I will try that
Kevin Ngo
@swivel806
Mar 02 2016 05:54
Hello, I am stuck on one of the challenges. I don't understand what this means: Only add one class with each of your three selectors?
sprtn
@sprtn
Mar 02 2016 05:55
Add one class for each selector
$("#target1").addClass("");
$("#target2").addClass("");
$("#target3").addClass("");
And of course add the classes within the addClass function
@swivel806
Kevin Ngo
@swivel806
Mar 02 2016 05:57
I got thanks! What threw me off is that one of the instructions said I needed to 3 classes to one of my selectors so I did.
but when I changed it to 1, it was successful. Thanks @sprtn !
CamperBot
@camperbot
Mar 02 2016 05:58
swivel806 sends brownie points to @sprtn :sparkles: :thumbsup: :sparkles:
:star: 123 | @sprtn | http://www.freecodecamp.com/sprtn
sprtn
@sprtn
Mar 02 2016 05:58
No problem bro
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:23

Having difficulty with the Target the same element with multiple jQuery Selectors,

<script>
$(document).ready(function() {
$("button").addClass("animate");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");
});
</script>
can anyone tell me what I'm missing?

Aki-hiko
@Aki-hiko
Mar 02 2016 06:24
Hey guys, I'm having trouble with the jQuery challenge: "Target the same element with multiple jQuery Selectors" I have all of the challenges complete except for the: "Only add one class with each of your three selectors"
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:25
@Aki-hiko I think I'm having the same problem, I just posted my code above your comment, yours look similar?
Aki-hiko
@Aki-hiko
Mar 02 2016 06:26
no mine is a bit different but I suspect we are missing the exact same thing
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:27
what have you got? maybe somewhere between the two we could figure it out
Aki-hiko
@Aki-hiko
Mar 02 2016 06:28
it sounds to me like we have to put each selector on one line
but I tried it and it doesn't work
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:30
I just figured out what was wrong with mine, I was missing a d in the .addClass("Animated")
Aki-hiko
@Aki-hiko
Mar 02 2016 06:30
awesome. good job. I'll give it a shot
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:31
Cheers bud let me know how you get on
Thomas Noe
@t3h2mas
Mar 02 2016 06:32
if you still have issues post your code @Aki-hiko
Aki-hiko
@Aki-hiko
Mar 02 2016 06:34
Awesome I got it too @Kieran-Moore
Kieran Moore
@Kieran-Moore
Mar 02 2016 06:35
good stuff! @Aki-hiko
Aki-hiko
@Aki-hiko
Mar 02 2016 06:36
@t3h2mas Thank you for the offer :)
CamperBot
@camperbot
Mar 02 2016 06:36
aki-hiko sends brownie points to @t3h2mas :sparkles: :thumbsup: :sparkles:
:star: 184 | @t3h2mas | http://www.freecodecamp.com/t3h2mas
Tabi
@mrpassiontea
Mar 02 2016 06:37
Can anyone help, http://codepen.io/mrpassiontea/pen/WwbBdW I can't figure out why my vertical nav bar and heading has a whitespace above it... If I do background-color it's the html tag...
padding and margins are set to zero
and I tried setting the position to relative but that doesn't help, just messes the code up more.
Nevermind, fixed
Thanks @kelvinshang
CamperBot
@camperbot
Mar 02 2016 06:42
mrpassiontea sends brownie points to @kelvinshang :sparkles: :thumbsup: :sparkles:
:star: 234 | @kelvinshang | http://www.freecodecamp.com/kelvinshang
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:43
Anyone on who groks json?
Thomas Noe
@t3h2mas
Mar 02 2016 06:46
what you need @ChadKreutzer
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:48
So I can get the info up and even access it, but I was trying to get the data out of the $.getJson function. or do I even want to do that? I was figuring if I could then I could just treat it like any variable.
Thomas Noe
@t3h2mas
Mar 02 2016 06:48
oh yeah I see.
If you want to do it w/ ajax you'd use $.getJSON or some variant.
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:49
yeah. i did that. here:
$(document).ready(function() {
  $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&jsonp=callback=?", function(json) {
     $(".raw").html(JSON.stringify(json));
    var text = json.quoteText;
    var author = json.quoteAuthor;
   });
  $(".clean").html("<b>" + text + "</b>");
});
so the .raw shows up just fine. and if I put the .clean inside the .getJson it does too, but I want to be able to access the info elsewhere--or do I?
Thomas Noe
@t3h2mas
Mar 02 2016 06:52
Oh I see
So you can see the raw but you want to access it like a variable, correct?
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:53
exactly. I'm thinking it has something to do with scope and I should probably know how to get around it, but I'm blanking.
Thomas Noe
@t3h2mas
Mar 02 2016 06:54
I would keep $('.clean')... in the getJSON callback
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:54
is that just the way its done? is there no occasion where you would want to access the data from the api outside the callback/
Thomas Noe
@t3h2mas
Mar 02 2016 06:54
the alternative would be to do something like declare variables before the call to $.getJSON and to set them in the callback, but that could get messy
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:54
?
Thomas Noe
@t3h2mas
Mar 02 2016 06:55
in this case it's small, but if you were working with lots of variables/values it could be a pain
Sam Peden
@samduel
Mar 02 2016 06:55
Anyone else running FCC on Windows?
sprtn
@sprtn
Mar 02 2016 06:56
Good morning Europe
jayhomz
@jayhomz
Mar 02 2016 06:56

here's my code after struggling for a while, and it works ```

<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");

});
</script>
```

Chad Kreutzer
@ChadKreutzer
Mar 02 2016 06:56
ah. so in general you want to just do all your api manipulation inside the callback?
Thomas Noe
@t3h2mas
Mar 02 2016 06:58
I'd say so. There are alternatives to callbacks and nesting callbacks that you may want to look into sometime
but make sure that you understand that you may have issues with the asynch aspects
say you do something like
var placeholderl
$.getJSON // or any anyc function
doSomethingTo(placeholder);
placeholder may not be defined in time for doSomethingTo to work.
sorry my formatting probably sucks. I'm not on the normal gitter client
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:00
but what if they are all inside the $(document).ready/
my timing is off with the shift for the question mark.
and no worries on your formatting. i get the gist.
Thomas Noe
@t3h2mas
Mar 02 2016 07:03
check this link out, it looks like he shows the issue I'm talking about pretty quickly
someoneoffl
@someoneoffl
Mar 02 2016 07:03
@Bennn123 :smile:
Thomas Noe
@t3h2mas
Mar 02 2016 07:03
the second example
Matt
@MattBat27
Mar 02 2016 07:04

<style>
.red-text {
color: red;
}
#p{
font-size: 16px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p2>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p2>

WHAT AM I DOING WRONG?
Scratch the # in front of the p
sprtn
@sprtn
Mar 02 2016 07:05
p2?
I dont think p2 is a thing
Matt
@MattBat27
Mar 02 2016 07:06
WAIT
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:06
@t3h2mas okay.
Matt
@MattBat27
Mar 02 2016 07:06
Now I understand. I though I needed to number the paragraphs for some reason. Feel like a dummy lol
thought*
sprtn
@sprtn
Mar 02 2016 07:07
@MattBat27 ;) Just remove teh "2" in the seconds p. <p> just defines that this is a paragraph
Thomas Noe
@t3h2mas
Mar 02 2016 07:07
:p
someoneoffl
@someoneoffl
Mar 02 2016 07:07
@MattBat27 heading is the only element which ranges 4rm h1 to h6
Thomas Noe
@t3h2mas
Mar 02 2016 07:07
it's all good. I've banged my head against my keyboard a few times wondering why I was getting undefined data
sprtn
@sprtn
Mar 02 2016 07:07
Haha no worries, coding will do that to you
Matt
@MattBat27
Mar 02 2016 07:08
Thanks peeps! Same thing applies to headers, and anything else of the like, correct?
someoneoffl
@someoneoffl
Mar 02 2016 07:08
@MattBat27 remove # before p in css declaration... # is used for ids
Matt
@MattBat27
Mar 02 2016 07:09
NVM you just answered my question @someoneoffl lol
Really glad this site has a great community!
someoneoffl
@someoneoffl
Mar 02 2016 07:10
@MattBat27 kudos...!! :+1:
sprtn
@sprtn
Mar 02 2016 07:11
I was suprised as well
gorgatron2012
@gorgatron2012
Mar 02 2016 07:18
I am stumped
what do you put into a button tag to change the text in side the button?
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:19
@t3h2mas that works. I actually knew about async as it related to functional programming, I just wasn't thinking in those terms. thanks for putting it in context.
CamperBot
@camperbot
Mar 02 2016 07:19
chadkreutzer sends brownie points to @t3h2mas :sparkles: :thumbsup: :sparkles:
:star: 186 | @t3h2mas | http://www.freecodecamp.com/t3h2mas
sprtn
@sprtn
Mar 02 2016 07:28
I have an issue...
jayhomz
@jayhomz
Mar 02 2016 07:28
what issue @sprtn
sprtn
@sprtn
Mar 02 2016 07:28
In the "Convert Celcius to Fahrenheit"-task, how to I make it convert all six numbers?
Because for every time I change "var celcius = 0" to one of the other 4 numbers I need to check, the ones I had checked no longer are checked
jayhomz
@jayhomz
Mar 02 2016 07:30
i have not reached there yet, anyone?
sprtn
@sprtn
Mar 02 2016 07:30
148
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:31
It's been a long time since I did that. lemme take a look.
sprtn
@sprtn
Mar 02 2016 07:32

function convert(celsius) {
// Only change code below this line

var celcius = 0;
var fahrenheit = celcius * 9 / 5 + 32;

// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(30);

This is my code
Every time I manually edit the var celcius = x; the page reloads, and the ones I had hooked off goes to big red X'es again ^^;
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:33
ah ha. completely ditch the var clecius = 0;
sprtn
@sprtn
Mar 02 2016 07:34
Then I get an error
ReferenceError: celcius is not defined
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:35
you just have a mispelling. change "celcius" to "celsius"
Brian
@sludge256
Mar 02 2016 07:35
look how it's spelled up at the top
sprtn
@sprtn
Mar 02 2016 07:35
Probably because I use it in my equation
Thank you.
Chad Kreutzer
@ChadKreutzer
Mar 02 2016 07:35
oftentimes it's the stupid stuff. like a mispelling or a misplaced punctuation mark.
sprtn
@sprtn
Mar 02 2016 07:36
Yeh
I tried without it first, but then I got celcius undefined variable.
It's so obvious
xD
Divyadeep Sawhney
@divyadeepsawhney
Mar 02 2016 07:47
I am stuck at second challenge of creating a git repository
I have created the repository & tried to run git-it verify many times
It isn't showing it as completed
can anyone help?
Thomas Noe
@t3h2mas
Mar 02 2016 07:53
it should give you feedback on what you're missing right
Sloth
@RMo-Sloth
Mar 02 2016 07:53
Someone tell me the difference between an app and a mobile friendly website.
Thomas Noe
@t3h2mas
Mar 02 2016 07:54
it's in the eye of the beholder.
You can make a mobile friendly site with one picture and description
(that's it)
that is reactive to screensize
an app is dynamic.
Sloth
@RMo-Sloth
Mar 02 2016 07:58
The app from a local restaurant isn't that dynamic I assume. Anyway thx @t3h2mas , the word app has been confusing me like crazy. Everything is an app these days and I was like....isn't it just a website. So it is marketing I guess.
CamperBot
@camperbot
Mar 02 2016 07:58
robmo sends brownie points to @t3h2mas :sparkles: :thumbsup: :sparkles:
:star: 187 | @t3h2mas | http://www.freecodecamp.com/t3h2mas
Thomas Noe
@t3h2mas
Mar 02 2016 07:58
depends.
Is the content static or dynamically created?
a restaurant menu in a database that you can edit and display could be considered a small app.
mobile ordering is def in that category.
jayhomz
@jayhomz
Mar 02 2016 07:59
some apps are just a link to a certain website
Sloth
@RMo-Sloth
Mar 02 2016 08:00
So if I use a CMS like Joomla/Wordpress it would technically make my website an "app".
jayhomz
@jayhomz
Mar 02 2016 08:00
I would say an app to be something you install on your device while a website is just there, as in you don't need to install it, all you need is a web browser
Sloth
@RMo-Sloth
Mar 02 2016 08:01
@jayhomz then why are apps so popular? Isn t it easier to just visit a website?
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:01
@RobMo do you use facebook or twitter?
Sloth
@RMo-Sloth
Mar 02 2016 08:02
@VibhorThakral nope, got an old-school mobile as well.
jayhomz
@jayhomz
Mar 02 2016 08:02
An app gives you updates on your phone instantly compared to a website.
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:03
@RobMo An app is much faster on a mobile device than compared to a website, it's much more user friendly sometimes and is more comfortable to use on small screen mobile phones
jayhomz
@jayhomz
Mar 02 2016 08:04
Yeah true @RobMo
Its made specifically for the mobile so they are less bugs
Paul
@PaulGaudet
Mar 02 2016 08:04
Hi all, my first time with code camp… I’m surprised to be stuck on the first challenge, cat photo app, and wonder if someone could help?
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:05
@PaulGaudet sure what's the problem you having?
Paul
@PaulGaudet
Mar 02 2016 08:05

‘code’ <style>
h2 {color: red;}
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

hmm, i obviously don’t know how to paste code
well that code won’t let me get to the next step
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:06
challenge name?
Paul
@PaulGaudet
Mar 02 2016 08:06
use-css-selectors-to-style-elements
Sloth
@RMo-Sloth
Mar 02 2016 08:06
Hmm so the main difference is that you don t have to download a website every time, but can just "open" it and contact a server for some small updates?
jayhomz
@jayhomz
Mar 02 2016 08:06
their some problems with your code
Paul
@PaulGaudet
Mar 02 2016 08:06
there is … i must be tired then
what do you see
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:06
you need to change red to blue
Sloth
@RMo-Sloth
Mar 02 2016 08:07
@PaulGaudet type css to properly paste it.
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:07
if you see just above the run tests button, you will see it's written there
Paul
@PaulGaudet
Mar 02 2016 08:07
yes i see it now
jayhomz
@jayhomz
Mar 02 2016 08:07
<style>
h2 {color: red;}
</style>
Paul
@PaulGaudet
Mar 02 2016 08:07
i wasn’t reading the instructions carefully enough
so.. let me try the paste quickly
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:07
ok
Sloth
@RMo-Sloth
Mar 02 2016 08:08
@PaulGaudet '''css things here''' (replace ' with `)
CamperBot
@camperbot
Mar 02 2016 08:08
:bulb: to format code use backticks! ``` more info
Paul
@PaulGaudet
Mar 02 2016 08:08
‘css’ <style>
h2 {color: red;}
</style>
oh
css<style>
h2 {color: red;}
</style>
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:08
<style>
  h2 {
    color:blue;
  }
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Paul
@PaulGaudet
Mar 02 2016 08:08
yes i see the answer now should have been blue
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:08
there you go :)
Paul
@PaulGaudet
Mar 02 2016 08:08
thanks!!!
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:09
no problemo ;)
jayhomz
@jayhomz
Mar 02 2016 08:12
read the instructions carefully, and ensure the spellings are correct. With that in mind, you will be flying past the courses like no ones business @PaulGaudet
Paul
@PaulGaudet
Mar 02 2016 08:13
good advice, pay attention to the instructions!
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:13
well till the time you reach js
Paul
@PaulGaudet
Mar 02 2016 08:13
haha
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:13
then you will slow down :p
jayhomz
@jayhomz
Mar 02 2016 08:14
yeah :smile: am in js right now and all am doing is being in the chat room
But by tonight i must finish it
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:15
@jayhomz I did till jquery, I am polishing on my html and css right now
I feel the content is a little lacking on fcc for html and css, so first I am gonna polish that then move to js
jayhomz
@jayhomz
Mar 02 2016 08:18
yeah, try W3C School
Even knew from there that you can draw an image using HTML or even make a game. And the amazing thing about it is that it's very light.
Vibhor Thakral
@VibhorThakral
Mar 02 2016 08:20
improvements in html5 are indeed awesome xD
Han Khuat
@han2236
Mar 02 2016 08:35
Hi everyone, Newbie for Programming and FCC here :D

I got bug in CSS Selectors to Style Elements, anyone can help
<style>
h2{color: blue;}
</style>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Paul
@PaulGaudet
Mar 02 2016 08:38
where is your h2 element above the <p>?
i just did that one …. haha
Umar Khan
@umar-khan
Mar 02 2016 08:40
hey all
stuck on "Falsy Bouncer"
Han Khuat
@han2236
Mar 02 2016 08:40
Done ~~, I hope that in the future someone newbie will get that error like me :P
Umar Khan
@umar-khan
Mar 02 2016 08:40
How do we check if a list literally contains NaN
I'm tryin got solve it using
function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  var falsyValues = [false, null, 0, "", undefined, NaN];

  var filteredArray = arr.filter(function (value) {
    return falsyValues.indexOf(value) < 0;
  });

  return filteredArray;
}
Paul
@PaulGaudet
Mar 02 2016 08:41
@han2236 guaranteed =]
Umar Khan
@umar-khan
Mar 02 2016 08:41
But searching an array with indexOf(NaN) always returns -1 even if the array contains NaN
saad fattoh
@saad1998
Mar 02 2016 08:45
h2 {
font-family: Lobster, Monospace;
}
Markus Kiili
@Masd925
Mar 02 2016 08:49
@umar-khan You can test for NaN with value!==value because NaN is the only value for which value!==value.
Umar Khan
@umar-khan
Mar 02 2016 08:56
thanks @Masd925! was able to modify my function using that to get it to work :)
CamperBot
@camperbot
Mar 02 2016 08:56
umar-khan sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 1112 | @masd925 | http://www.freecodecamp.com/masd925
Umar Khan
@umar-khan
Mar 02 2016 08:56
function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  var falsyValues = [false, null, 0, "", undefined, NaN];

  var filteredArray = arr.filter(function (value) {
    if (value!==value) {
      return false;
    } else if (falsyValues.indexOf(value) < 0) {
      return true;
    }
  });

  return filteredArray;
}
Markus Kiili
@Masd925
Mar 02 2016 08:58
@umar-khan Works now. Nice! Inside the filter callback, you are actually doing the same as built-in Boolean function. You could use it instead.
Angelo C. IGITEGO
@AngeloRwanda
Mar 02 2016 08:59
@Masd925 Hi there.
I am having some trouble, can you help, please? I am on this challenge " Change the Font Size of an Element (HTML/CSS)"
Han Khuat
@han2236
Mar 02 2016 09:00

'<style>
<h2>
.red-text {
color: red;
}
</h2>
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>', please find the error in Use a CSS Class to Style an Elemet.

Umar Khan
@umar-khan
Mar 02 2016 09:00
What do you mean by use the built-in boolean function
Angelo C. IGITEGO
@AngeloRwanda
Mar 02 2016 09:01
I am told that the text zoom should be at 100%. How can I do that?
Markus Kiili
@Masd925
Mar 02 2016 09:03
@umar-khan There is a function in JS called Boolean, that coerces values to Boolean. You are actually doing just the same with your code. You could do this:
This message was deleted
Umar Khan
@umar-khan
Mar 02 2016 09:03
@AngeloRwanda that just refers to your browser zoom level
Humphrey
@Humphreto
Mar 02 2016 09:03
Hi @AngeloRwanda i couldnt understand you
is it the challenge
Umar Khan
@umar-khan
Mar 02 2016 09:03
Usually you can reset this to 100% by pressing keyboard shortcut
Ctrl + 0
Markus Kiili
@Masd925
Mar 02 2016 09:03
@umar-khan
function bouncer(arr) {

  return arr.filter(Boolean);

}
Angelo C. IGITEGO
@AngeloRwanda
Mar 02 2016 09:04
Ok
@Humphreto Yes, it is the challenge
Paul
@PaulGaudet
Mar 02 2016 09:04
@han2236 <h2> does not go inside <style>
Umar Khan
@umar-khan
Mar 02 2016 09:05
@Masd925 That... was ... so much faster XD
haha
Han Khuat
@han2236
Mar 02 2016 09:08

@PaulGaudet
' <h2>

<style>
.red-text {
color: red;
}
</style>
</h2>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p> '

Paul
@PaulGaudet
Mar 02 2016 09:09
@han2236 <h2> tags wrap around the title text only… not the <style> tags
Umar Khan
@umar-khan
Mar 02 2016 09:09
@Masd925 Why do you not have to pass a value to Boolean? I would have though it would have to be something like arr.filter(Boolean(value))
Han Khuat
@han2236
Mar 02 2016 09:11

@PaulGaudet So why I can not get through the class stage
`<style>
.red-text {
color: red;
}
</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
`

Humphrey
@Humphreto
Mar 02 2016 09:11
@AngeloRwanda have you be able to win. if not share the link and we can help
Paul
@PaulGaudet
Mar 02 2016 09:12
@han2236 i’m not sure what challenge you are on but you have to add the class .red-text to the text you want to be red
ie. <h2 class=“red-text”>…
to the tag that wraps around the text you want to be red I should say
Han Khuat
@han2236
Mar 02 2016 09:15
@PaulGaudet Oh, I know where I got wrong. You make my day, my first day at programing indeed ;)
Paul
@PaulGaudet
Mar 02 2016 09:15
haha no problem
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:16
i need help with a js exercise
Steven Cruz
@itsstoiven
Mar 02 2016 09:21
can anyone help critique my code pls
@surbhioberoi you need to use conversion for celsius to farenheit
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:23

var fahrenheit= (celsius*9/5)+32;

i did this

i doesn't work

function convert(celsius) {
// Only change code below this line
var fahrenheit= (celsius*9/5)+32;

// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(30);

Steven Cruz
@itsstoiven
Mar 02 2016 09:24
@surbhioberoi because you're not doing the arithmetic right
Paul
@PaulGaudet
Mar 02 2016 09:24
@surbhioberoi no brackets after =
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:24
oh
@itsstoiven what should be the airthmetic then? :(
Steven Cruz
@itsstoiven
Mar 02 2016 09:25
can anyone critique this code
function titleCase(str) {
  str = str.split(" ");
  //map out array and make everything lowercase first
  str = str.map(function(str) {
    return str.toLowerCase();
  });
  //then turn the first letters uppercase
  for (var i = 0; i < str.length; i++) {
    str[i] = str[i].substring(0,1).toUpperCase() + str[i].substring(1);
  }
  str = str.join(" ");
  return str;
}

titleCase("I'm a little tea pot");
Paul
@PaulGaudet
Mar 02 2016 09:25
celsius*(9/5)+32
Steven Cruz
@itsstoiven
Mar 02 2016 09:25
my code works but im wondering if there would be something simpler than this
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:25
@PaulGaudet oh yes, right!
Paul
@PaulGaudet
Mar 02 2016 09:25
you were close!
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:26
thank you @PaulGaudet
CamperBot
@camperbot
Mar 02 2016 09:26
surbhioberoi sends brownie points to @paulgaudet :sparkles: :thumbsup: :sparkles:
:star: 73 | @paulgaudet | http://www.freecodecamp.com/paulgaudet
Paul
@PaulGaudet
Mar 02 2016 09:26
im still doing basic html challenge too haha…. thanks for the brownie points!!!!
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:26
@PaulGaudet i started this freecamp code day before yesterday.. lol
freecodecamp*
Paul
@PaulGaudet
Mar 02 2016 09:27
nice! about 1/2 hr ago for me haha
to learn javascript too… you made it pretty far in a day
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:27
@PaulGaudet you'll notice that the time mentioned for the exercises to take is over-estimated.. haha
Paul
@PaulGaudet
Mar 02 2016 09:27
i certainly hope so =]
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:28
@PaulGaudet i know python, but that doesn't improve my functions in any way!
Paul
@PaulGaudet
Mar 02 2016 09:28
@surbhioberoi python… isn’t that a snake?
just kidding
=]
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:28
@PaulGaudet haha... i wish it was only that!
Paul
@PaulGaudet
Mar 02 2016 09:29
how do you give brownie points?
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:29
i don't now, i guess they are automatic whenever someone says "thank you"
Paul
@PaulGaudet
Mar 02 2016 09:29
oh ya? cool.
well thank you!
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:29
i am just guessing
hahah and i m wrong
:D
Paul
@PaulGaudet
Mar 02 2016 09:29
hah
Humphrey
@Humphreto
Mar 02 2016 09:30
@surbhioberoi yap that they way of saYING but you mention the person too
try it
@surbhioberoi thank you
CamperBot
@camperbot
Mar 02 2016 09:30
humphreto sends brownie points to @surbhioberoi :sparkles: :thumbsup: :sparkles:
:star: 155 | @surbhioberoi | http://www.freecodecamp.com/surbhioberoi
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:30
ohh @Humphreto thank you
Paul
@PaulGaudet
Mar 02 2016 09:30
cool
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:30
@Humphreto you didn't get any?
Humphrey
@Humphreto
Mar 02 2016 09:30
dont mind
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:31
@Humphreto :smile:
silencefierce
@silencefierce
Mar 02 2016 09:31
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
{how to do this}
Yaroslav
@YVeselovskyi
Mar 02 2016 09:31
Hello, who knows sass?)
Paul
@PaulGaudet
Mar 02 2016 09:32
@silencefierce which part? font size or text zoom
silencefierce
@silencefierce
Mar 02 2016 09:33
both @paulage
Paul
@PaulGaudet
Mar 02 2016 09:35
@silencefierce if the challenge asks you to make a style for your <p> tags have you done that?
reset browser font size by hitting control-zero on your keyboard (or cmd-0 on a mac)
savaj
@savaj
Mar 02 2016 09:45
@surbhioberoi are u there.
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:46
@savaj yes?
savaj
@savaj
Mar 02 2016 09:47
i need some help for the design.
Surbhi Oberoi
@surbhioberoi
Mar 02 2016 09:48
@savaj share the link?
silencefierce
@silencefierce
Mar 02 2016 09:48
thankyou @PaulGaudet
Paul
@PaulGaudet
Mar 02 2016 09:49
@silencefierce you got it, good!
Ashraful Islam
@iashraful
Mar 02 2016 09:51
@silencefierce too good am afraid. not good for the rest of us :worried:
Markus Kiili
@Masd925
Mar 02 2016 09:55
@umar-khan What you pass into filter is a function object. The passed function is not invoked with (). Filter method uses that passed function to filter the array.
Ashraful Islam
@iashraful
Mar 02 2016 09:59
@Masd925 yes very true
@Masd925 we can also pass our own named functions too
Ivan
@ivan-pavlovic9398
Mar 02 2016 10:00

var myGlobal=10;

function fun1() {
var output= "";
if (typeof myGlobal != "undefined") {
output += "myGlobal: " + myGlobal;
}
if (typeof oopsGlobal != "undefined") {
output += " oopsGlobal: " + 5;
}
console.log(output);
}

oopsGlobal should have the value of 5
Can somebody help me?!
Ashraful Islam
@iashraful
Mar 02 2016 10:02
var myGlobal=10;
oopsGlobal = 5; // nice nice
function fun1() {
  var output= "";
  if (typeof myGlobal != "undefined") {
    output += "myGlobal: " + myGlobal;
  }
  if (typeof oopsGlobal != "undefined") {
    output += " oopsGlobal: " + 5;
  }
  console.log(output);
}
@ivan-pavlovic9398 I think it not like this, can you post the whole thing please?
Ivan
@ivan-pavlovic9398
Mar 02 2016 10:04
it worked thanks a lot
Ashraful Islam
@iashraful
Mar 02 2016 10:04
@ivan-pavlovic9398 it is not supposed to, its wrong in so many places :D
I think your browser is broken
Ivan
@ivan-pavlovic9398
Mar 02 2016 10:04
i don't care as long as it works
:D
Ashraful Islam
@iashraful
Mar 02 2016 10:05
@ivan-pavlovic9398 that's the spirit man! go go :thumbsup:
Sherlock Holmes
@SherlcokHolmes
Mar 02 2016 10:28
<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" height="500" width=100% border="5" border-style: solid; / ></a>
Whats wrong with this code
The image doesnt appear
Randy
@techtolentino
Mar 02 2016 10:30
so the styles in the image tag aren't correct @SherlcokHolmes
<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png">></a> will work
now to add the styles, you need to give the image a style attribute like so
<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" style="height:500px; width:100%; border:5px; border-style: solid; / ></a>
something like that
@SherlcokHolmes try something like :point_up:
Yaroslav
@YVeselovskyi
Mar 02 2016 10:48
blob
hello, why this white space appears?
蒲公英の生活
@fewspider
Mar 02 2016 10:48
margin
Yaroslav
@YVeselovskyi
Mar 02 2016 10:48
I found :)
thanks
Berchie Agyemang Nti
@YawBerkye
Mar 02 2016 10:49
<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" style= " height:500px width=100% border: 5px border-style: solid;" / ></a>
try this code @SherlcokHolmes
Randy
@techtolentino
Mar 02 2016 10:52

@YawBerkye <a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" style= " height:500px width=100%; border: 5px; border-style: solid;" / ></a>

I think there might need to be ; between the styles

Berchie Agyemang Nti
@YawBerkye
Mar 02 2016 10:53
yeah
@techtolentino
here is the update
<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" style= " height:500px; width=100%; border-style: 5px; border-style: solid;" ></a>
Randy
@techtolentino
Mar 02 2016 10:57

Yup... also there has to be a space removed between style= "height...

and... the <a href="https//www.google.com"> should be fixed.

<a href://www.google.com><img class="k" src="http://s17.postimg.org/7x2fpujm7/Screenshot_2016_02_28_18_04_28.png" style="height:500px; width=100%; border-style: 5px; border-style: solid;" ></a>

Berchie Agyemang Nti
@YawBerkye
Mar 02 2016 11:00
:+1:
Yaroslav
@YVeselovskyi
Mar 02 2016 11:03
how to make background like that?
blob
Randy
@techtolentino
Mar 02 2016 11:05
@YVeselovskyi first, you need that background wallpaper as an image... either jpg or png should work.
then, look up some css that allows you to do a "full screen background with css"
Ashraful Islam
@iashraful
Mar 02 2016 11:05
^
Randy
@techtolentino
Mar 02 2016 11:06
Yaroslav
@YVeselovskyi
Mar 02 2016 11:06
@techtolentino thank you :)
CamperBot
@camperbot
Mar 02 2016 11:06
yveselovskyi sends brownie points to @techtolentino :sparkles: :thumbsup: :sparkles:
:star: 211 | @techtolentino | http://www.freecodecamp.com/techtolentino
John Deegan
@JohnDeegs
Mar 02 2016 11:06

Hey all, I'm currently on Random Quote Generator and I'm trying to do the twitter button part where you land on a create tweet page with the current quote pre typed into the compose tweet box.

 $(".twitter-share-button").click(function(){
    $(this).attr("href", 'https://twitter.com/intent/tweet?text=' + randomQuote);
  });

However, this just results in a link being put into the compose tweet box. Any ideas? Here is my codepen. http://codepen.io/JohnDeegs/pen/eZmLGb

Ashraful Islam
@iashraful
Mar 02 2016 11:10
@JohnDeegs I think you need to click the twitter button first to do that :D
you better put that assignment of randomQuote in getquote button
Yaroslav
@YVeselovskyi
Mar 02 2016 11:12
I've done it :)
How to make it responsive ? :D
Ashraful Islam
@iashraful
Mar 02 2016 11:12
@JohnDeegs also there seems to be scope confusion on your code
:D
you are trying to access a variable from getQuote from outside :D
@JohnDeegs here is the fixed code for your js part
  $(document).ready(function() {

    function getQuote() {
      var quotes = ["Nothing is impossible to those who try.", "Paul Walker was a medicore actor.", "Champagne Supernova in the sky", "Where'd you get them scars?"];

      var randomNum = Math.floor((Math.random() * quotes.length));

      var randomQuote = quotes[randomNum];

      $(".quote").text(randomQuote);
      $(".twitter-share-button").attr("href", 'https://twitter.com/intent/tweet?text=' + randomQuote);

    }// END: getQuote

    $("#getMessage").on("click", function() {
      getQuote();
    }); // END: getMessage.on

  });// END: document.ready
^
John Deegan
@JohnDeegs
Mar 02 2016 11:18
@iashraful Ah I just had it in the wrong place, thanks !
CamperBot
@camperbot
Mar 02 2016 11:18
johndeegs sends brownie points to @iashraful :sparkles: :thumbsup: :sparkles:
:star: 471 | @iashraful | http://www.freecodecamp.com/iashraful
tushar3112
@tushar3112
Mar 02 2016 11:26
-->Your img element should have the class smaller-image.
Your img element should have the class thick-green- border.
Give your image a border width of 10px.
Give your image a border style of solid.
The border around your img element should be green.
How to use 2 classes?
I have 2 classes say class1 and class2, how do I combine them with my img src?
Buzz Tarek
@buzzth
Mar 02 2016 11:27
Hey guys, can anyone explain what does form-control do in a form element
Yaroslav
@YVeselovskyi
Mar 02 2016 11:28
@techtolentino are you here?
Randy
@techtolentino
Mar 02 2016 11:32
In an out... What's up @YVeselovskyi
Yaroslav
@YVeselovskyi
Mar 02 2016 11:47
blob
nice?)
Hasham Babar
@hash004
Mar 02 2016 11:48
@YVeselovskyi ooo I like that. Is it a personal site or portfolio page?
Yaroslav
@YVeselovskyi
Mar 02 2016 11:54
I am just training to make sites from free psd templates
Hasham Babar
@hash004
Mar 02 2016 11:55
@YVeselovskyi Nice. Have you thought about using http://brackets.io/ Adobe made the editor to make life easier when converting PSD designs to code.
Yaroslav
@YVeselovskyi
Mar 02 2016 11:59
Oh, i didn't know about that
thanks, I will try
what it helps to do?
Anna Sakoyan
@ansakoy
Mar 02 2016 11:59

Just faced an issue. I'm trying to fill an empty object using a for loop. Here's a simple example:

var arr = [1, 2, 3];
var obj = {};
    arr.forEach(function(item) {
    obj[item] = item * 2;
     // console.log(obj);
});
console.log(obj);

Now, if I print out the object on each iteration, it adds new fields and values as it should. But when I print the object after the loop it is empty. Looks like the object only exists in its filled form inside the loop, while I actually need to use it further in the code. What am I doing wrong and how do I fix it?

Hasham Babar
@hash004
Mar 02 2016 12:00
@YVeselovskyi It gives you code hints and lets you easily pull images, colours, dimensions etc from the PSD.
@ansakoy I don't know what your issue is. I just tried pasting your code into the console and the object was console logged without issue :S
Markus Kiili
@Masd925
Mar 02 2016 12:03
@ansakoy obj is { '1': 2, '2': 4, '3': 6 }
Carlos
@socarlosb
Mar 02 2016 12:04
@ansakoy 'return' keyword?
Islam Ibakaev
@dagman
Mar 02 2016 12:06
maybe this
var arr = [1, 2, 3];
var obj = {};
    arr.forEach(function(item, pos) {
    obj[pos] = item * 2;
     // console.log(obj);
});
console.log(obj);
Anna Sakoyan
@ansakoy
Mar 02 2016 12:08

@hash004 interesting, because I tested it inside the console and it keeps showing something like this:

a = [1, 2, 3]
> [1, 2, 3]
b = {}
> Object {}
a.forEach(function(x) {b[x] = x * 2;});
> undefined
b
> Object {1: 2, 2: 4, 3: 6}
console.log(b)
> Object {1: 2, 2: 4, 3: 6}
> undefined

and this undefined thing creeps me out.

@dagman I'll try this.
Ann Siapno
@AnnSiapno
Mar 02 2016 12:09

Can someone please tell me what's wrong with this code:

var ua = window.navigator.userAgent;

    var xhr = new XMLHttpRequest();
    xhr.open("GET", "https://en.wikipedia.org/w/api.php?action=query&formatversion=2&prop=pageimages%7Cpageterms&titles=Albert%20Einstein", false);
xhr.setRequestHeader('Api-User-Agent', ua); 
    xhr.send();
    console.log(xhr.status);
    console.log(xhr.statusText);

It gives an error of: "XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&formatversion=2&prop=pageimages%7Cpageterms&titles=Albert%20Einstein. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access."

Hasham Babar
@hash004
Mar 02 2016 12:09
@ansakoy the undefined means you're not actually returning anything, nothing to worry about at the moment
Markus Kiili
@Masd925
Mar 02 2016 12:10
@ansakoy What the problem is there? Object is created as should.
Anna Sakoyan
@ansakoy
Mar 02 2016 12:11
@hash004 ah, right, sure. Just used to Python's None and this undefined misleads me every time :)
Markus Kiili
@Masd925
Mar 02 2016 12:11
@ansakoy Return value of foreach is always undefined.
Anna Sakoyan
@ansakoy
Mar 02 2016 12:12
@Masd925 right, I'll check it with return, maybe this is the problem.
Sebastion
@Sebastion1
Mar 02 2016 12:18
Hello!
Blake Bye
@blakebye
Mar 02 2016 12:19
hey guys i'm just working through the first few challenges here.. how important is the semi-colon in a CSS selector?
h2 {color: blue;}
Alice
@virgoeun
Mar 02 2016 12:19
can anybody help me to correct CSS class called red-text?
Also I'd like to put a image here but i don't know how
:(
John Deegan
@JohnDeegs
Mar 02 2016 12:21
@blakebye Very, if there's no ; the code isn't valid
Blake Bye
@blakebye
Mar 02 2016 12:22
thanks @JohnDeegs
CamperBot
@camperbot
Mar 02 2016 12:22
blakebye sends brownie points to @johndeegs :sparkles: :thumbsup: :sparkles:
:star: 284 | @johndeegs | http://www.freecodecamp.com/johndeegs
Rahul
@rahulshinde235
Mar 02 2016 12:32
how to comment out in html
Alice
@virgoeun
Mar 02 2016 12:32
somehow I figured it out lol don't bother guys.
Brandon Mitchell
@OlympusBrons
Mar 02 2016 12:34
@rahulshinde235
<!-- text or code here -->
Konstantinos Malliaras
@zCPa
Mar 02 2016 12:46
can anyone help Italicize the text in your target4 button by adding HTML tags.
iigmir
@iigmir
Mar 02 2016 12:48

Hi there, can I ask about my own work?

<!DOCTYPE html>
<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
        <meta charset='UTF-8'>
    </head>
    <body>
        <form>
            <select id="type">
                <option value=1000>Volvo</option>
                <option value=2000>Saab</option>
                <option value=3000>Opel</option>
                <option value=4000>Audi</option>
            </select>
            <select id="times">
                <option value=1>1</option>
                <option value=2>2</option>
                <option value=3>3</option>
                <option value=4>4</option>
            </select>
            <button>Submit</button>
        </form>
        <p id="result"></p>
        <script>
        $('button').on('click', function ()
        {  // use jQuery
            var original = $('#type').val() * $('#times').val();
            var services = original * 0.1;
            var sum = original + services;
            $('p').text(sum);
        });
        </script>
    </body>
</html>

The question is, once I click Submit button, result will print...in second, then refresh immediately. How can I just print result and don't refresh?

Phenoix8
@Phenoix8
Mar 02 2016 12:50
does anyone know how to do this
Nest your first image and your h2 element within a single <div class="row"> element. Nest your h2 element within a <div class="col-xs-8"> and your image in a <div class="col-xs-4"> so that they are on the same line.
iigmir
@iigmir
Mar 02 2016 13:00
@Phenoix8 I don't know which Challenges you are in? Nest Many Elements within a Single Div Element ?
Ann Siapno
@AnnSiapno
Mar 02 2016 13:04

@Phenoix8 I think you mean:

<div class="row">
<div class="col-xs-8">
<h2></h2>
</div>
<div class="col-xs-4">
<img></img>
</div>
</div>

Phenoix8
@Phenoix8
Mar 02 2016 13:04
guys is it true that if you complete some of the certifications here you can get a job? has anyone gotten jobs with this
Markus Kiili
@Masd925
Mar 02 2016 13:07
@Phenoix8 You can use the certificates and projects you do here to show that you can do the job you apply for.
Phenoix8
@Phenoix8
Mar 02 2016 13:10
do you know anyone who this has worked for @Masd925
mudi thareja
@tharejamudit
Mar 02 2016 13:23
i am stuck at this
"Selecting from many options with Switch Statements"
someone please help
David Young
@dayvidwhy
Mar 02 2016 13:24
do you have some code?
mudi thareja
@tharejamudit
Mar 02 2016 13:24
yup

function myTest(val) {
var answer = "";
// Only change code below this line
switch(val){
case 1:
val="alpha";
break;
case 2:
val="beta";
break;
case 3:
val="gamma";
break;
case 4:
val="delta";
break;

}

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

// Change this value to test
myTest(1);

@deedubwhy
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:27
I think you want answer="" in your cases, instead of val
@tharejamudit
did that help?
replace val with answer in all cases
David Young
@dayvidwhy
Mar 02 2016 13:28
^
mudi thareja
@tharejamudit
Mar 02 2016 13:29
thanks alot @OlympusBrons @deedubwhy
CamperBot
@camperbot
Mar 02 2016 13:29
tharejamudit sends brownie points to @olympusbrons and @deedubwhy :sparkles: :thumbsup: :sparkles:
:star: 112 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
:star: 6 | @deedubwhy | http://www.freecodecamp.com/deedubwhy
David Young
@dayvidwhy
Mar 02 2016 13:29
haha i dont know if I deserve a star
Fsalker
@Fsalker
Mar 02 2016 13:29
hm, what's wrong with his code, though? is he not allowed to edit val's value inside of the function?
David Young
@dayvidwhy
Mar 02 2016 13:29
@iigmir generally jquery selectors need “ instead of ‘, see https://api.jquery.com/category/selectors/
Fsalker
@Fsalker
Mar 02 2016 13:29
at least in C++, it's acceptable
David Young
@dayvidwhy
Mar 02 2016 13:30
@Fsalker hes wanting to return the value from the switch statement
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:30
val is his input, answer is his output
David Young
@dayvidwhy
Mar 02 2016 13:30
the switch statement takes a val, and adjust the variable answer
Fsalker
@Fsalker
Mar 02 2016 13:30
what if he changed it to "return val;" ?
that'd be ugly, but would it work?
David Young
@dayvidwhy
Mar 02 2016 13:30
try it
Fsalker
@Fsalker
Mar 02 2016 13:31
well, i haven't reached that point. heh
David Young
@dayvidwhy
Mar 02 2016 13:31
generally yes, your allowed to write over it
Fsalker
@Fsalker
Mar 02 2016 13:31
and i'm not sure what language that is either. probably js
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:31
you can reuse val, but more readable to have another variable
Fsalker
@Fsalker
Mar 02 2016 13:31
oh okay, thanks @OlympusBrons
CamperBot
@camperbot
Mar 02 2016 13:31
fsalker sends brownie points to @olympusbrons :sparkles: :thumbsup: :sparkles:
:star: 113 | @olympusbrons | http://www.freecodecamp.com/olympusbrons
David Young
@dayvidwhy
Mar 02 2016 13:32
@Fsalker javascript generally stands out with its ‘var’ declarations
mudi thareja
@tharejamudit
Mar 02 2016 13:32
i was stuck as hell on that
Fsalker
@Fsalker
Mar 02 2016 13:32
yeah, the var's are really flexible. i wonder how it does that
Blake Brown
@Blake253
Mar 02 2016 13:32
Hey guys running into a bit of a problem that I cant seem to find a definitive answer on. I got through all the the first half of the Front End training fine and am on the tribute page project. I would like to center an image in my well at the top of the page but it seems to be stuck in the left margin.
Yaroslav
@YVeselovskyi
Mar 02 2016 13:32
blob
how to make this div correctly?
Markus Kiili
@Masd925
Mar 02 2016 13:32
@Phenoix8 No.
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:34
@Blake253 Could you paste some of your code please?
Fsalker
@Fsalker
Mar 02 2016 13:34
@Blake253 have you tried using a margin of 0, border of 0, padding of 30%? i'm rather unexperienced with html, but perhaps you can do some tricks
padding-left, to be precise
mudi thareja
@tharejamudit
Mar 02 2016 13:35
@YVeselovskyi share the code
Blake Brown
@Blake253
Mar 02 2016 13:35
Here's my code. I've been trying to figure of whats wrong so bare with me if it's a mess.
<div class="container-fluid" id="body">
<div class="main">
<div class="well" id="mainwell">
<div class="main">
<div id="heading">
<h1 class="text-center" id="title">The Life Of Kanye</h1>
<div class="row">
<div id="image" class="image img-responsive center">
<img id="mainimage" src="http://i.imgur.com/IC7CxXU.jpg?1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Raviteja
@ravitejarp
Mar 02 2016 13:35
@Blake253 you can try to use align:center in CSS
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:35
@Blake253 Try the bootstrap class "text-center" for the div you want centered
oh wait, nvm
^ not entirely sure if that's right haha
Fsalker
@Fsalker
Mar 02 2016 13:36
hey, what's bootrstrap?
Blake Brown
@Blake253
Mar 02 2016 13:36
Ok. Thanks for the help guys. By the way, how do I post code in here so that's it's presentable
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:36
help format
CamperBot
@camperbot
Mar 02 2016 13:36

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Blake Brown
@Blake253
Mar 02 2016 13:36
I'm on codepen
Vantrav
@vantrav
Mar 02 2016 13:37
Thanks @luishendrix92 @Rafase282 @hallaathrad for your help with Algorithm: Factorialize a Number
CamperBot
@camperbot
Mar 02 2016 13:37
vantrav sends brownie points to @luishendrix92 and @rafase282 and @hallaathrad :sparkles: :thumbsup: :sparkles:
:star: 1031 | @rafase282 | http://www.freecodecamp.com/rafase282
:star: 760 | @luishendrix92 | http://www.freecodecamp.com/luishendrix92
:star: 452 | @hallaathrad | http://www.freecodecamp.com/hallaathrad
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:37
@Blake253 for codepen, just paste the link to your code, it should automatically embed here
Justin Richardsson
@hallaathrad
Mar 02 2016 13:37
:+1:
Fsalker
@Fsalker
Mar 02 2016 13:38
what do you mean by "help format"? i presume it's a FAQ and i gotta look it up on a list
drose608
@drose608
Mar 02 2016 13:38
can some one tell me what im doing
Learn how Script Tags and Document Ready Work
mudi thareja
@tharejamudit
Mar 02 2016 13:38
js
drose608
@drose608
Mar 02 2016 13:39
<script> $(document).ready(function(){
})
is that correct?
Fsalker
@Fsalker
Mar 02 2016 13:39
<!-- Hello -->
mhm
@mierea
Mar 02 2016 13:39
with a semicolon at the end @drose608
mhm
@mierea
Mar 02 2016 13:40
@Blake253 thats alot of Kanye
and whats upsetting is that there is not Kardashian =p
jk
Blake Brown
@Blake253
Mar 02 2016 13:41
It's coming in the bio part lol
mhm
@mierea
Mar 02 2016 13:41
looks nice
but i would center the picture
sroujiel
@sroujiel
Mar 02 2016 13:41
Hi guys, I just started freecode camp and im suppose to change the style of h2 to blue, it doesn't seem to work can someone tell me whats up
drose608
@drose608
Mar 02 2016 13:41
how do i create a script element for that?
sroujiel
@sroujiel
Mar 02 2016 13:42

<style> h2 {color: blue;} </style>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

mhm
@mierea
Mar 02 2016 13:42
@drose608 I am not sure I understand what you mean
Brandon Mitchell
@OlympusBrons
Mar 02 2016 13:42
@Fsalker "help format" is a FreeCodeCamp thing, more info here https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/camperbot
mhm
@mierea
Mar 02 2016 13:42
you mean how do you put it in script tags?
drose608
@drose608
Mar 02 2016 13:42
i need <script> </script>
mhm
@mierea
Mar 02 2016 13:42
so jquery is a js library
basically its js
Jloeup
@Jloeup
Mar 02 2016 13:43
<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("target4").text("#target4");
});
</script>
Yaroslav
@YVeselovskyi
Mar 02 2016 13:43
mhm
@mierea
Mar 02 2016 13:43
so you treat it like normal js
Jloeup
@Jloeup
Mar 02 2016 13:43
does that look right?
mhm
@mierea
Mar 02 2016 13:44
@Jloeup not entirely
Vishnu Airy (Aero-vision)
@AndrewMcSwain
Mar 02 2016 13:44

I need some help working with object property assignments. I assigned a RegExp.test() method to an object property. I then push the results of the test to an array. As an object property the test returns null every time. As a variable it runs just fine.
```
var strLength = str.length;
var testArray = [];

for(i= 0; i < strLength; i++){
var char = str.charAt(i);
char.isSpace = /\s/.test(char);
testArray.push(char.isSpace);
if(char.isSpace === true)
return str.charAt(i+1).toUpperCase;
}
return testArray;

}

Blake Brown
@Blake253
Mar 02 2016 13:44
Thank you @OlympusBrons @fsalker @ravitejarp
CamperBot
@camperbot
Mar 02 2016 13:44
blake253 sends brownie points to @olympusbrons and @fsalker and @ravitejarp :sparkles: :thumbsup: :sparkles:
:star: 114 | @olympusbrons | http://www.freecodecamp.com/olympusbrons