These are chat archives for FreeCodeCamp/Help

10th
Feb 2016
Aleksander Gębicki
@Takumar
Feb 10 2016 00:00

@bobs95 this code:

function reverseString(str) {
  var reverseStr = str.split("").reverse().join("");
  return reverseStr;
}
reverseString('hello');

is good for sure, I have just checked it on "Reverse a String" challenge!

@tdelacruz707 copy text in your FCC editor, just like you do in basic text editor, using Ctrl+C or Ctrl+Insert keys, and paste here by Ctrl+V (on Windows, if you have Mac I don't know how is it there)
Gbemi Emmanuel
@bobs95
Feb 10 2016 00:01
@Takumar alright boss
Aleksander Gębicki
@Takumar
Feb 10 2016 00:02

@tdelacruz707 for example for paragraph, you will do:

<style>
  p {
    font-size: 20px;
  }
</style>
<p>This is paragraph with text of size 20px</p>

its only that.

Tatjana
@tdelacruz707
Feb 10 2016 00:06
<style>
<style> .red-text { color: red;} { font-size: 16px; ] </style>
This isn't working. : /
Andy March
@andycaree
Feb 10 2016 00:08
Hello! I am just starting out and am on the "Importing a Google font" lesson. This is how I applied the Lobster font-family to my H2 element, and I passed the lesson, but I think it is wrong. Any thoughts?
Gbemi Emmanuel
@bobs95
Feb 10 2016 00:08
@tdelacruz707 it has to b within ur style element
Raj
@rjshekar90
Feb 10 2016 00:09
delete the <style> at top
Andy March
@andycaree
Feb 10 2016 00:09
Forgot to add my HTML
<h2 class="red-text";h2 style=font-family:"Lobster">CatPhotoApp</h2>
Raj
@rjshekar90
Feb 10 2016 00:09
delet the brackets too
Aleksander Gębicki
@Takumar
Feb 10 2016 00:09
@tdelacruz707 if you want to add type style for paragraph, ad p before braces
p { font-size: 16px; }
and use only curly braces not brackets ]
Gbemi Emmanuel
@bobs95
Feb 10 2016 00:09
and u ar supposed to use {} instead of [] @tdelacruz707
Tatjana
@tdelacruz707
Feb 10 2016 00:10
Thanks, guys. I'll try it.
aaronK
@aaronk73
Feb 10 2016 00:11
  function isEqual(a, b) {
    return a === b;
}
will someone check the code and see where my mistake is
Aleksander Gębicki
@Takumar
Feb 10 2016 00:15
@aaronk73 your function will return true if values are strictly equal. Is anything wrong with it?
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 00:15
@aaronk73 if not strictly use only ==
Melkisedek Hamakali
@melkisedek
Feb 10 2016 00:16
This is supposed to return [["a","b"],["c","d"]]
I can't spot the problem
function chunk(arr, size) {
  var two= [[]];
  var j=0;
  for(var i=0; i < arr.length*size;i++){  
    for(; j < size; j++)
      two[i].push(arr.shift());
  }
  console.log(two);
  return two;
}

chunk(["a", "b", "c", "d"], 2);
Hossam
@hossamfayed
Feb 10 2016 00:16
How do i do an h2 element i just started
Melkisedek Hamakali
@melkisedek
Feb 10 2016 00:16
@hossamfayed <h2>Hello</h2>
Hossam
@hossamfayed
Feb 10 2016 00:17
Thank you
aaronK
@aaronk73
Feb 10 2016 00:17
@Takumar @massilva they are not equal is less(10, 15); on bottom
ibetimothy
@ibetimothy
Feb 10 2016 00:18
Capture.PNG
Can someone tell me what I'm doing wrong here?
Melkisedek Hamakali
@melkisedek
Feb 10 2016 00:18
@aaronk73 What the function supposed to do?
ibetimothy
@ibetimothy
Feb 10 2016 00:18
the objective is to size the image down to 100px
Aleksander Gębicki
@Takumar
Feb 10 2016 00:18
@aaronk73 you showed us only isEqual()function: :point_up: 10 lutego 2016 01:11
aaronK
@aaronk73
Feb 10 2016 00:19
function isLess(a, b) {
  // Fix this code

  function isEqual(a, b) {
    return a  b;
}


// Change these values to test
isLess(10, 15);
Aleksander Gębicki
@Takumar
Feb 10 2016 00:19
@aaronk73 === is operator of equality, how do you write in math, that something is less than other thing? What operator you use?
Ken
@Kparelius
Feb 10 2016 00:20
@ibetimothy Do you need to change the height as well? I only see width.
aaronK
@aaronk73
Feb 10 2016 00:20
<
Aleksander Gębicki
@Takumar
Feb 10 2016 00:20
@aaronk73 you don't need isEqual() function at all in this code.
ibetimothy
@ibetimothy
Feb 10 2016 00:20
"Create a class called smaller-image and use it to resize the image so that it's only 100 pixels wide." This is all it tells me, so I assume it only wants width..?
Aleksander Gębicki
@Takumar
Feb 10 2016 00:21
@aaronk73 you start from such code:
function isLess(a, b) {
  // Fix this code
  if (a < b) {
    return true;
  } else {
    return false;
  }
}
aaronK
@aaronk73
Feb 10 2016 00:21
function isLess(a, b) {
  // Fix this code
  if (a < b) {
    return true;
  } else {
    return false;
  }
}

// Change these values to test
isLess(10, 15);
`
Aleksander Gębicki
@Takumar
Feb 10 2016 00:21
@aaronk73 and you have to do entire comparison with one line: return ....
What is value of 10 < 15 to computer?
It is boolean value, it is either true or false. (true with values 10 and 15)
So you don't need to check if (a < b) because you can simply return:
return a < b;
Ken
@Kparelius
Feb 10 2016 00:21
@ibetimothy That's odd. Which exercise is it? Did you declare the class in the HTML as well?
Melkisedek Hamakali
@melkisedek
Feb 10 2016 00:23
@aaronk73 The fix
function isLess(a, b) {
    return a < b;
}
isLess(10, 15);
DawhnEnchant
@FROSTxKILLERx37
Feb 10 2016 00:24
Uncomment HTML
?
ibetimothy
@ibetimothy
Feb 10 2016 00:24
@Kparelius Exercise 22. The image I posted is all I have to work with; I don't think they give me an option to separate the HTML and style sheets yet (I'm still very new at this)
Ken
@Kparelius
Feb 10 2016 00:24
@ibetimothy Oh yeah, it's right there. You'll need to add the class to the image tag to use it.
ibetimothy
@ibetimothy
Feb 10 2016 00:25
@Kparelius ohhhh haha I attached it to the wrong image ...oy vey
aaronK
@aaronk73
Feb 10 2016 00:25
@melkisedek still error
Tatjana
@tdelacruz707
Feb 10 2016 00:26

I'm ready to throw Mac through wall. Please bear with the inability to paste this on comment section.

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

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

<p class="red-text">Kitty Ipsum</p>

<p2 class="red-text">Kitty Ipsum et al</p2>

Ken
@Kparelius
Feb 10 2016 00:26
@ibetimothy It seems like all of my mistakes are like that. haha.
Andres B
@andreudekker
Feb 10 2016 00:26

function phoneticLookup(val) {
var result = "";

// Only change code below this line
var phoneticLookup = {
"alpha": "Adams",
"Bravo": "Boston",
"charlie":"chicago",
"Delta": "Denver",
"echo": "Easy",
"foxtrot":"frank"
};

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

// Change this value to test
phoneticLookup("charlie");
*phoneticLookup("alpha") should equal "Adams"

ibetimothy
@ibetimothy
Feb 10 2016 00:27
@Kparelius Right? haha well thanks for the second set of eyes
CamperBot
@camperbot
Feb 10 2016 00:27
ibetimothy sends brownie points to @kparelius :sparkles: :thumbsup: :sparkles:
:star: 353 | @kparelius | http://www.freecodecamp.com/kparelius
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 00:27
@aaronk73 function isLess(a, b) { return a < b; }
Ken
@Kparelius
Feb 10 2016 00:27
@ibetimothy No prob.
Aleksander Gębicki
@Takumar
Feb 10 2016 00:27
@andreudekker don't call your object the same as name of function: phoneticLookup
@andreudekker also you have to return something more useful than undefined :-(
Value of property val from your object.
aaronK
@aaronk73
Feb 10 2016 00:28
@massilva it is still not going through
Aleksander Gębicki
@Takumar
Feb 10 2016 00:29
@aaronk73 there is no other solution, try to refresh your browser: Ctrl + F5
@tdelacruz707 there is no "<p2>" tag :-( there is only <p> for paragraphs!
aaronK
@aaronk73
Feb 10 2016 00:31
@Takumar @massilva thank you
CamperBot
@camperbot
Feb 10 2016 00:31
aaronk73 sends brownie points to @takumar and @massilva :sparkles: :thumbsup: :sparkles:
:star: 2257 | @takumar | http://www.freecodecamp.com/takumar
:star: 285 | @massilva | http://www.freecodecamp.com/massilva
Wesley Robertson
@adoptedmanatee
Feb 10 2016 00:31
anyone mind helping me out with “Record Collection” in JS? I am trying to use if (prop !== "tracks" && value !== ""){
return prop = value;
}
if (prop == "tracks" && value !== ""){
  return tracks.push(value);
}
aaronK
@aaronk73
Feb 10 2016 00:32
refresh worked
Tatjana
@tdelacruz707
Feb 10 2016 00:32
Thanks, Takumar. Corrected that but still no go.
Aleksander Gębicki
@Takumar
Feb 10 2016 00:32
@aaronk73 you are welcome. Remember about refresh it is quite useful :-) sometimes old code is stored in cache.
aaronK
@aaronk73
Feb 10 2016 00:33
is the ctrl +f5 for mac enviornment too
Andres B
@andreudekker
Feb 10 2016 00:33
@Takumar Ok, thks, but i can´t resolve this* phoneticLookup("alpha") should equal "Adams"
CamperBot
@camperbot
Feb 10 2016 00:33
andreudekker sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2258 | @takumar | http://www.freecodecamp.com/takumar
aaronK
@aaronk73
Feb 10 2016 00:33
@Takumar thank you
CamperBot
@camperbot
Feb 10 2016 00:33
aaronk73 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: aaronk73 already gave takumar points
Aleksander Gębicki
@Takumar
Feb 10 2016 00:35

@tdelacruz707

<style>
.red-text { color: red; }
p { font-size: 16px; }
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p class="red-text">Kitty Ipsum</p>
<p>Purr jump eat the </p>

Text for second paragraph should be different.

Andres B
@andreudekker
Feb 10 2016 00:35

@Takumar function phoneticLookup(val) {
var result = "";

// Only change code below this line
var City = {
"alpha": "Adams",
"Bravo": "Boston",
"charlie":"chicago",
"Delta": "Denver",
"echo": "Easy",
"foxtrot":"frank"
};

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

// Change this value to test
phoneticLookup("charlie");

Aleksander Gębicki
@Takumar
Feb 10 2016 00:35
@andreudekker val is parameter of your function which contains name of property, you have to use bracket notation to get access to the value of City object of property val
Try: return City[val];
Tatjana
@tdelacruz707
Feb 10 2016 00:36
Takumar, you are a beautiful human being. Thanks.
Aleksander Gębicki
@Takumar
Feb 10 2016 00:37
@tdelacruz707 you are welcome :-)
James Malonson
@Sunady
Feb 10 2016 00:40

<h2>CatPhotoApp</h2> <h2 style="color: red">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>

is this right?
Rob
@poolbuoy
Feb 10 2016 00:42
Where do i create a suppository? :P *repository
Brett Guillory
@kurzninja
Feb 10 2016 00:43
can someone help me out with some advanced function writing? I'm trying to overload a function like jQuery does and I'm having issues wrapping my head around how to do it
Thierry
@tcharlem
Feb 10 2016 00:43
@Sunady What are you trying to accomplish?
Aleksander Gębicki
@Takumar
Feb 10 2016 00:43
@andreudekker you have mistyped also: "Chicago" and "Frank"
@poolbuoy on GitHub?
Rob
@poolbuoy
Feb 10 2016 00:44
Yes. Email told me to create a repository but nothing about how or where
greg
@wearenotgroot
Feb 10 2016 00:45
@poolbuoy github?
Brett Guillory
@kurzninja
Feb 10 2016 00:46
@poolbuoy go to Github and click the + in the upper right of the screen
Andres B
@andreudekker
Feb 10 2016 00:47
@Takumar ok, Thanks a lot !! I got it
CamperBot
@camperbot
Feb 10 2016 00:47
andreudekker sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: andreudekker already gave takumar points
aaronK
@aaronk73
Feb 10 2016 00:48
need help with this waypoint. "Return Early Pattern for Functions"
Rob
@poolbuoy
Feb 10 2016 00:48
@kurzninja thanks. Trying to map all this out in my brain without screwing up the initialization
CamperBot
@camperbot
Feb 10 2016 00:48
poolbuoy sends brownie points to @kurzninja :sparkles: :thumbsup: :sparkles:
aaronK
@aaronk73
Feb 10 2016 00:49
do not know where to start
CamperBot
@camperbot
Feb 10 2016 00:49
:star: 397 | @kurzninja | http://www.freecodecamp.com/kurzninja
Jnrjose
@jnrjose
Feb 10 2016 00:50
dont know where i am missing it out
Brett Guillory
@kurzninja
Feb 10 2016 00:51
/help waypoint
CamperBot
@camperbot
Feb 10 2016 00:51
no wiki entry for: waypoint
Rob
@poolbuoy
Feb 10 2016 00:51
Confused on repository settings. Public vs Private, initialize with Readme, add gitmore and/or license...
Brett Guillory
@kurzninja
Feb 10 2016 00:52
@poolbuoy public means anyone can view the code in the repository, it's publicly available. Private repositories aren't free
Initialize with readme means that you can open the repository with a readme file if you want, you can always create one later if you don't want to do it now
license is probably not something you need to worry about right now
@jnrjose You need to include your style declaration up in the <style> tag, not inside the <p> tag where you put it
Rob
@poolbuoy
Feb 10 2016 00:54
@kurzninja thnx again! This should be much easier than i'm making it :/
CamperBot
@camperbot
Feb 10 2016 00:54
poolbuoy sends brownie points to @kurzninja :sparkles: :thumbsup: :sparkles:
:warning: poolbuoy already gave kurzninja points
aaronK
@aaronk73
Feb 10 2016 00:55
// Setup
function abTest(a, b) {
  // Only change code below this line
  function abTest(2,-2);


  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(-2,2);
Jnrjose
@jnrjose
Feb 10 2016 00:56
 ```<style>

.red-text {
color: red;

h1
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>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your </p> ```

<style>
.red-text {
color: red;

h1
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>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your </p>

Brett Guillory
@kurzninja
Feb 10 2016 00:57
you don't need the h1 in there, that's just part of the example
h1 is a selector
you're not trying to change the h1's, you're trying to change the p tags
Rob
@poolbuoy
Feb 10 2016 00:59
One last Q: How do i save my spot in tutorial before log out? Assuming that's what the repository is for??
Brett Guillory
@kurzninja
Feb 10 2016 00:59
a CSS rule looks like this:
selector {
parameter: value;
}
so you already have one CSS rule in your <style> tag
you need to add a second one
@poolbuoy the Github tutorial?
Rob
@poolbuoy
Feb 10 2016 01:00
No the FreeCodeCamp lesson
Brett Guillory
@kurzninja
Feb 10 2016 01:01
I'm not sure I know what you mean
link?
Rob
@poolbuoy
Feb 10 2016 01:01
Just bookmark it?
Duh. Was thinking i was actually writing code to save. Sry
Brett Guillory
@kurzninja
Feb 10 2016 01:01
when you come back to FCC, just click on "Learn" and it should take you to the last waypoint you were working on, if you're already logged in
dinner time all, bbiab
kurzninja @kurzninja is afk, leave a message
Rob
@poolbuoy
Feb 10 2016 01:02
OIC. Wasn't sure. Thanks everyone. i'll b back !
ajflowers
@ajflowers
Feb 10 2016 01:08
I'm stuck at "target the same element with multiple jQuery selectors" http://www.freecodecamp.com/challenges/target-the-same-element-with-multiple-jquery-selectors
and I'm not sure if I'm making a dumb typo or if this is bugged
cause I've had the last couple jQuery challenges refuse to go till I deleted everything and retyped the same thing

so for instructions:
Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

Add the btn-primary class to the button with id #target1.

I've got:
<script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addclass("btn-primary");
  });
</script>
Is there something wrong in my syntax or a spelling I keep missing?
and literally as soon as I paste it, I see the missing camelCase :D
never mind lil ol me :poop:
Raven Fuentes
@RavenFuentes
Feb 10 2016 01:12
wew
aaronK
@aaronk73
Feb 10 2016 01:12
will someone help me with Return Early Pattern for Functions"
do not know where to start
Jin Choi
@JiniHendrix
Feb 10 2016 01:18
anyone else have trouble with the Steamroller?
Alister Najib Mada
@alistermada
Feb 10 2016 01:18
@aaronk73 First you'll need an if statement to check if a or b are less than 0.
Jin Choi
@JiniHendrix
Feb 10 2016 01:18
it is steamrolling me
aaronK
@aaronk73
Feb 10 2016 01:19
// Setup
function abTest(a, b) {
  // Only change code below this line
  function abTest (-2,2);

  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);
@alistermada thats what i have so far
Alister Najib Mada
@alistermada
Feb 10 2016 01:22
@aaronk73 You don't need to declare function abTest again. You need to replace it with an if statement like:
if (condition is true) {
   //do something
}
aaronK
@aaronk73
Feb 10 2016 01:22
where to start?
Alister Najib Mada
@alistermada
Feb 10 2016 01:22
That condition is "a or b are less than 0"
aaronK
@aaronk73
Feb 10 2016 01:25
@alistermada still lost
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:26

@aaronk73

will someone help me with Return Early Pattern for Functions">
What do you mean?

aaronK
@aaronk73
Feb 10 2016 01:27
thats the way point im on
Alister Najib Mada
@alistermada
Feb 10 2016 01:28
@aaronk73 For example if the condition was "c or d are greater than 10" I would write:
if (c > 10 || d >10) {
   //do something
}
aaronK
@aaronk73
Feb 10 2016 01:29
// Setup
function abTest(a, b) {
  // Only change code below this line
  if (a,b)
    else = "undefined";

  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);
Alister Najib Mada
@alistermada
Feb 10 2016 01:30
Remember, undefined is a keyword not a string so you don't need quotes. It's asking you to return undefined
aaronK
@aaronk73
Feb 10 2016 01:30
oh
if (a>=b)
else
return undefined;
Alister Najib Mada
@alistermada
Feb 10 2016 01:34
@aaronk73 There shouldn't be an else. Also, you're not supposed to compare a with b, but a with 0 and b with 0 .
aaronK
@aaronk73
Feb 10 2016 01:35
ok
if (a>=0 b<=0);
else
return 0;
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:38

@aaronk73 Ok. The return keyword causes to return to the point after the statement that called the function. Example :

// Setup 
function abTest(a, b) { // Only change code below this line
  return 0;//example
  if (a,b) //not executed
    return "undefined"; // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2)); } // Change values below to test your code
abTest(2,2);
//execution continues here

So, when abTest(2,2) is called/executed the the function executes until it reaches the first return statement. The function returns 0 and the rest of the code in it is not executed. You should see the zero that is returned in your console box.

Alister Najib Mada
@alistermada
Feb 10 2016 01:38
@aaronk73 You're getting closer to the solution. You should remove that else. Remember, the instructions say to check if "a or b are less than 0". You will need to use the "or" operator in your if statement: ||
also you should return undefined not 0
aaronK
@aaronk73
Feb 10 2016 01:40
if (a>=0 || b<=0);
else
return "undefined";
if (a>=0 || b<=0);
return "undefined";
Alister Najib Mada
@alistermada
Feb 10 2016 01:43
@aaronk73 Getting closer. Remember, no quotes around undefined and no ; after the parentheses in front of your if statement
Jared Carinal
@jcarinal
Feb 10 2016 01:44
@avflowers have you figured that out? i am stuck with that challenge too.
ajflowers
@ajflowers
Feb 10 2016 01:44
@jcarinal my last line I typed "addclass" where it should have said "addClass" (no quotes there ofc)
Alister Najib Mada
@alistermada
Feb 10 2016 01:45
@aaronk73 Note: Your if statement is saying "a is greater than or equal to 0 or b is less than or equal to 0". It should be "a is less than 0 or b is less than 0"
aaronK
@aaronk73
Feb 10 2016 01:45
if (a>=0 || b<=0);
else
return undefined;
thank you for being patient with silly me
Brett Guillory
@kurzninja
Feb 10 2016 01:46
Can anyone give me instruction on writing an overloaded function that can also set and return private variables depending on the arguments provided?
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:46
This function is supposed to return [["a", "b"],["c", "d"]] but it only returns the first part i.e [["a", "b"]]. Need help finding the bug.
function chunk(arr, size) {
  var two= [[]];
  var j=0;
  for(var i=0; i < arr.length;i++){  
    for(; j < size; j++)
      two[i].push(arr.shift());
    console.log(two[i]); //for debugging
  }
  return two;
}
chunk(["a", "b", "c", "d"], 2);
Alister Najib Mada
@alistermada
Feb 10 2016 01:46
@aaronk73 You're adding that else again. It should not be in your code
Brett Guillory
@kurzninja
Feb 10 2016 01:47
@melkisedek check where you're using your i's and j's ;)
Alister Najib Mada
@alistermada
Feb 10 2016 01:47
@aaronk73 Don't worry. Programming can be a bit confusing sometimes
aaronK
@aaronk73
Feb 10 2016 01:47
i removed it, when i added it , almost all code was ok
i removed it
is something wronge in the if statement
Alister Najib Mada
@alistermada
Feb 10 2016 01:49
@aaronk73 That's because your if statement a>=0 || b<=0 is catching all the other values and returning undefined
Jared Carinal
@jcarinal
Feb 10 2016 01:50
@avflowers thanks..
CamperBot
@camperbot
Feb 10 2016 01:50
jcarinal sends brownie points to @avflowers :sparkles: :thumbsup: :sparkles:
Alister Najib Mada
@alistermada
Feb 10 2016 01:50
@aaronk73 a>=0 || b<=0is basically saying "a is greater than or equal to 0 or b is less than or equal to 0". It should be "a is less than 0 or b is less than 0"
CamperBot
@camperbot
Feb 10 2016 01:50
:star: 129 | @avflowers | http://www.freecodecamp.com/avflowers
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:50
@aaronk73 remove the ; don't use it with if statement. it should look like if(condition){do stuff;}
aaronK
@aaronk73
Feb 10 2016 01:51
oh my gosh you guys are so great
@alistermada @melkisedek thank you
CamperBot
@camperbot
Feb 10 2016 01:51
aaronk73 sends brownie points to @alistermada and @melkisedek :sparkles: :thumbsup: :sparkles:
:star: 368 | @alistermada | http://www.freecodecamp.com/alistermada
:star: 256 | @melkisedek | http://www.freecodecamp.com/melkisedek
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:52
@kurzninja I still don't see the bug :worried:
Alister Najib Mada
@alistermada
Feb 10 2016 01:52
@aaronk73 Glad I could help. :smile:
aaronK
@aaronk73
Feb 10 2016 01:52
@alistermada thank you for being so patient with me
CamperBot
@camperbot
Feb 10 2016 01:52
aaronk73 sends brownie points to @alistermada :sparkles: :thumbsup: :sparkles:
:warning: aaronk73 already gave alistermada points
aaronK
@aaronk73
Feb 10 2016 01:52
i feel like :stuck_out_tongue_winking_eye:
Brett Guillory
@kurzninja
Feb 10 2016 01:52
@melkisedek where are you actually making use of the j variable?
Alister Najib Mada
@alistermada
Feb 10 2016 01:53
No problem.
aaronK
@aaronk73
Feb 10 2016 01:53
@alistermada so smart. i will go over it again
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:56
@kurzninja Yes.Only in the loop terminating condition. The function should return a two dimensional array of with each sub-array containing chunks of size size
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 01:56
I'm stuck on an exercise that says I'm supposed to put 'a'space in my 'p' element just before the 'a' element but it won't read it <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
oops i also dont know how to get the code to display :(
Kevin Mulligan
@kmulligan
Feb 10 2016 01:57
Wiki code
CamperBot
@camperbot
Feb 10 2016 01:57

:point_right: 10 steps to plan better so you can write less code [wiki]

Learn how to plan your future project!

Blog post written by BiancaMihai - GitHub / Twitter

An ounce of preparation is worth a pound of cure. That's true in medicine, and that's definitely true in software development.

Here's a structured 10-step workflow that will guide you through the app planning process, with the goal of saving you from writing a lot of unnecessary code.

Together, we'll plan out a simple "To-do" single-page web app. We'll also plan for an API backend for a future mobile app.

:pencil: read more about 10 steps to plan better so you can write less code on the FCC Wiki

aaronK
@aaronk73
Feb 10 2016 01:57
@melkisedek thank you
CamperBot
@camperbot
Feb 10 2016 01:57
aaronk73 sends brownie points to @melkisedek :sparkles: :thumbsup: :sparkles:
:warning: aaronk73 already gave melkisedek points
Brett Guillory
@kurzninja
Feb 10 2016 01:58
@melkisedek my point is, what's the point of iterating through a loop if you aren't actually using that iteration for anything? You're just looping just to loop. You need to actually use the j variable to do something
Melkisedek Hamakali
@melkisedek
Feb 10 2016 01:58
@aaronk73 No biggy.
Brian
@sludge256
Feb 10 2016 01:58
@DiogenestheDog did you create an entirely new line of code or did you modify the existing anchor element?
Kevin Mulligan
@kmulligan
Feb 10 2016 01:59
@DiogenestheDog add 3 backticks before your code and after it on separate lines
so
@@@
example code
@@@
but use backticks (next to 1 key) instead of @@@
`
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:00
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
oh ok thanks
Nicholas
@DaRealElmo
Feb 10 2016 02:02
Can someone help me with jQuery please
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:02
@sludge256 I wrote the anchor and then I wrote the 'p' around it
Brett Guillory
@kurzninja
Feb 10 2016 02:02
@DaRealElmo what's the issue?
Nicholas
@DaRealElmo
Feb 10 2016 02:02
How do only add one class with each of your three selectors
Brian
@sludge256
Feb 10 2016 02:02
@DiogenestheDog there should already be an anchor that you put the p element around
Nicholas
@DaRealElmo
Feb 10 2016 02:02
selectors*
Brian
@sludge256
Feb 10 2016 02:02
instead of making a new anchor
Nicholas
@DaRealElmo
Feb 10 2016 02:02
@kurzninja
Brett Guillory
@kurzninja
Feb 10 2016 02:03
@DaRealElmo I don't understand what you mean
Nicholas
@DaRealElmo
Feb 10 2016 02:03
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".btn").addClass("animated shake");
$("#target1").addClass("animated shake btn-primary")
});
</script>
I need to make it so my button btn and target are all in the same class
Brian
@sludge256
Feb 10 2016 02:03
@DaRealElmo Your last addClass has three classes in it
Espinoza
@paespi0
Feb 10 2016 02:04
anyone know they sytax for creating an entry for p elements inside a <style> tag?
Brian
@sludge256
Feb 10 2016 02:04
the first and second have two
Espinoza
@paespi0
Feb 10 2016 02:04
sorry...noob
Brian
@sludge256
Feb 10 2016 02:04
@paespi0 just p
Kamal Sharif
@ksharifbd
Feb 10 2016 02:04

for challenge 217

my solution is

function update(id, prop, value) {
  var makeIdString = id.toString();
  var thisId = collection[makeIdString];

  if (value !=='') {
    if (prop === 'tracks') {
      thisId[prop].push(value);
    }

    else {
      thisId[prop] = value;
    }
  }

  else {
    delete thisId[prop];
  }


  return collection;
}

I think there is the better way. I need you guy's help

Cornualhorse
@Cornualhorse
Feb 10 2016 02:04
Hi guys I am working on some html right now and dont really understand what this is asking "Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%"
Nicholas
@DaRealElmo
Feb 10 2016 02:05
@sludge256 im sorry but that makes no sence
@Cornualhorse use the style tag as p{ font size:16px;}
Espinoza
@paespi0
Feb 10 2016 02:05
so this:
<style>
.red-text {
color: red;
p font-size: 16px;
}
</style>
Brian
@sludge256
Feb 10 2016 02:06

@DaRealElmo

<script>
  $(document).ready(function() {
        $("button").addClass("(1)animated (2)bounce");
        $(".btn").addClass("(1)animated (2)shake");
        $("#target1").addClass("(1)animated (2)shake (3)btn-primary")
  });
</script>

Each line should be only adding one class

Melkisedek Hamakali
@melkisedek
Feb 10 2016 02:06
@kurzninja for(; j < size; j++) This means repeat this loop as long as j is smaller than size; and increase j after each iteration. Then two[i].push(arr.shift()); removes one element from the the arr array adds it to the two array at the same position, as indicated by i; It is the same position because this loop is inside the first one. When j reaches to a value the same as size, the loop stop and the first loop increments i to begin the process for the next position as indicated by the next value of i
Cornualhorse
@Cornualhorse
Feb 10 2016 02:07
<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>
I wrote this and it is not accepting it
Brian
@sludge256
Feb 10 2016 02:07
@Cornualhorse did you add a class to your second p element? if so remove it
Nicholas
@DaRealElmo
Feb 10 2016 02:07
@sludge256 its not working
Brian
@sludge256
Feb 10 2016 02:07
@DaRealElmo what's your new code?
Nicholas
@DaRealElmo
Feb 10 2016 02:08
firstu how do you add code so it looks like yours
first*
Brian
@sludge256
Feb 10 2016 02:08
explain format
CamperBot
@camperbot
Feb 10 2016 02:08

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

Brian
@sludge256
Feb 10 2016 02:08
use the code block format
Nicholas
@DaRealElmo
Feb 10 2016 02:09
'''
CamperBot
@camperbot
Feb 10 2016 02:09
:bulb: to format code use backticks! ``` more info
Cornualhorse
@Cornualhorse
Feb 10 2016 02:09
@sludge256 That was the problem thanks for helping me.
CamperBot
@camperbot
Feb 10 2016 02:09
cornualhorse sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1378 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Feb 10 2016 02:10
@DaRealElmo ` is under the esc key
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:10
This message was deleted
Melkisedek Hamakali
@melkisedek
Feb 10 2016 02:10
This message was deleted
Conrad Bogus
@ConradBo
Feb 10 2016 02:12

``
function bouncer(arr) {
// Don't show a false ID to this bouncer.

function isNotFalse(value) {
return value !== (false, null, 0, NaN, undefined, "");
}

var filtered = arr.filter(isNotFalse);

return arr;
}

bouncer([7, "ate", "", false, 9]);
``

function bouncer(arr) {
  // Don't show a false ID to this bouncer.

  function isNotFalse(value) {
  return value !== (false, null, 0, NaN, undefined, "");
}

var filtered = arr.filter(isNotFalse);


  return arr;
}

bouncer([7, "ate", "", false, 9]);
my attempt thus far. any tips suggestions?
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:14
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
so I'm getting the error "Your p element should have the text "View more " (with a space after it)." but I did put a space after it
Espinoza
@paespi0
Feb 10 2016 02:15
<style>
.red-text {
color: red;
}
p{
font-size: 16px;
}
</style>
this is not working for me...please help
I'm using chrome and zoom is set to 100%
Brian
@sludge256
Feb 10 2016 02:16
@paespi0 remove any classes from the second p element
if you added them
@DiogenestheDog Can you paste your full code?
Espinoza
@paespi0
Feb 10 2016 02:16
@sludge256 this is my code
<style>
.red-text {
color: red;
}
p{
font-size: 16px;
}
</style>
Brian
@sludge256
Feb 10 2016 02:16
@paespi0 you have other code also
Espinoza
@paespi0
Feb 10 2016 02:17

<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>

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Brian
@sludge256
Feb 10 2016 02:17
@paespi0 remove the class from the second p element
(the last line of instructions hints at this)
Melkisedek Hamakali
@melkisedek
Feb 10 2016 02:17
@ksharifbd
var collectionCopy = JSON.parse(JSON.stringify(collection));
// Only change code below this line
function update(id, prop, value) {
  if(value !== "" && prop !== "tracks")
    collection[id][prop] = value;
  else if (value !== "" && prop === "tracks")
    collection[id][prop].push(value);
  else if (value === "")
    collection[id] =[];
  return collection;
}
Espinoza
@paespi0
Feb 10 2016 02:18
that did it! So once you reference class for first <p> element...you don't have to reference it again for subsequent <p>'s?
Brian
@sludge256
Feb 10 2016 02:19
@paespi0 no the font-size rule will apply to all p elements
it's not a class
classes have to be applied
but if you style an element directly
it will apply to all elements by that name
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:20
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

</style>

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

<a href="http://www.freecatphotoapp.com">cat photos</a>

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

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Brian
@sludge256
Feb 10 2016 02:21
@DiogenestheDog
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

</style>

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

<!-- this line --> <a href="http://www.freecatphotoapp.com">cat photos</a>

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

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<!-- delete this line --> <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:23
I deleted the line but still got the same error. The only new line in the lesson is the last one
Brian
@sludge256
Feb 10 2016 02:23
You're supposed to modify the line where I said "this line"
do what you did to the line I told you to delete
Ryan Guthrie
@DiogenestheDog
Feb 10 2016 02:24
ok ill try that now
@sludge256 cool it works now thank you so much
CamperBot
@camperbot
Feb 10 2016 02:26
diogenesthedog sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1380 | @sludge256 | http://www.freecodecamp.com/sludge256
Jainil Sutaria
@jsutaria
Feb 10 2016 02:28
Screen Shot 2016-02-09 at 9.28.04 PM.png
Im getting a ton of errors when I try loading an app my friend made on his computer on my computer (using android developers studio). Any ideas? This is what I have right now https://github.com/jsutaria/ONEHUNDREDPERCENT and I am getting the following errors. This is my build.gradle (Module: app)
This message was deleted
Thomas Noe
@t3h2mas
Feb 10 2016 02:29
Looks like you need JDK7
Jainil Sutaria
@jsutaria
Feb 10 2016 02:29
IInstalled it, but it didn't work
francisfrances
@francisfrances
Feb 10 2016 02:29
hi
im looking for help with Add a Submit Button to a Form
have i come to the right place?
Jainil Sutaria
@jsutaria
Feb 10 2016 02:30
yeah
I think what you want is something along these lines @francisfrances http://www.w3schools.com/html/html_forms.asp
francisfrances
@francisfrances
Feb 10 2016 02:31
i am having probs with this Your submit button should have the text "Submit".
Jainil Sutaria
@jsutaria
Feb 10 2016 02:31
<input type="submit" value="Submit">?
and add an onClick
<input type ="submit" value="Submit" onClick="myFunction()"> and at the bottom add a js myFunction()
aaronK
@aaronk73
Feb 10 2016 02:34
var myObj ={
  hatvalue: "ballcap",
  shirtvalue: "jersey"
};
var hatValue = testObj.ballcap;       // Change this line
var shirtValue = testObj.jersey;     // Change this line
may i get some help on this
Alexander Køpke
@alexanderkopke
Feb 10 2016 02:34
<button type="submit">Submit</button> @francisfrances
@aaronk73 what you need to do?
Thomas Noe
@t3h2mas
Feb 10 2016 02:35
@aaronk73 how would you get "ballcap" from myObj
aaronK
@aaronk73
Feb 10 2016 02:36
The value of hatValue should be "ballcap" @t3h2mas
Thomas Noe
@t3h2mas
Feb 10 2016 02:36
that's correct
aaronK
@aaronk73
Feb 10 2016 02:36
Accessing Objects Properties with the Dot Operator
ok
Thomas Noe
@t3h2mas
Feb 10 2016 02:37
how do you get the balue of hatValue from myObj
remember it's
{ property: value}
aaronK
@aaronk73
Feb 10 2016 02:38
hatvalue: 2
testobj.ballcap
Thomas Noe
@t3h2mas
Feb 10 2016 02:39
Let's restate the objective.
Get the value of the hatValue property from myObj
if it's { property: value}
then calling testobj.ballcap looks for the ballcap property right?
Melkisedek Hamakali
@melkisedek
Feb 10 2016 02:41
var myObj ={
hatvalue: "ballcap",
shirtvalue: "jersey"
};
myObj.hatvalue; //returns "ballcap"
myObj.shirtvalue; // returns "jersey"
If you don't know how to program. Please understand the code. Don't just copy and paste.
aaronK
@aaronk73
Feb 10 2016 02:42
yes got that
Thomas Noe
@t3h2mas
Feb 10 2016 02:42
I gave you the answer. You just have to apply it to your problem
Jainil Sutaria
@jsutaria
Feb 10 2016 02:43
Oh @t3h2mas I found the issue: the 1.7 JDK was in my /library/java/javavirtual machines folder, not the one in /system. Ty for ur help
francisfrances
@francisfrances
Feb 10 2016 02:44
thks guys
got green light
Thomas Noe
@t3h2mas
Feb 10 2016 02:46
:thumbsup:
aaronK
@aaronk73
Feb 10 2016 02:50
@melkisedek ok i understand it what you wrote but it won’t go through
ajflowers
@ajflowers
Feb 10 2016 02:51
So, I'm a little confused on the terminology, because some of it doesn't seem to actually be used within the program map itself... waypoints would be the little mini-challenges within the javascript section, and bonfires would be the algorithm challenges?
Brian
@sludge256
Feb 10 2016 02:53
@avflowers the camp terminology was removed
ajflowers
@ajflowers
Feb 10 2016 02:53
@sludge256 I assumed as much but a lot of people still use it. Am I on track with that assumption there?
Brian
@sludge256
Feb 10 2016 02:53
Yep
waypoints were the things before the algorithms(bonfires)
Ziplines(front-end projects)
Basejumps(back-end projects)
Brett Guillory
@kurzninja
Feb 10 2016 02:55
I think I figured out the answer to my advanced function question
Melkisedek Hamakali
@melkisedek
Feb 10 2016 02:57
@aaronk73 What is the challenge?
aaronK
@aaronk73
Feb 10 2016 02:58
same one
Rae
@cs-knight
Feb 10 2016 03:03
trying to add mult jQuery selectors
<script>
  $(document).ready(function() {
  $("button") 
  });
</script>
Franco Zapata
@Francozt01
Feb 10 2016 03:04
@csrae ?
Rae
@cs-knight
Feb 10 2016 03:04
yes @Francozt01
Franco Zapata
@Francozt01
Feb 10 2016 03:05
trying to add multiple selectors?
Rae
@cs-knight
Feb 10 2016 03:05
yes
Franco Zapata
@Francozt01
Feb 10 2016 03:05
what are they going to do
Rae
@cs-knight
Feb 10 2016 03:05
animted
animated*
class
Franco Zapata
@Francozt01
Feb 10 2016 03:06
$("button") is equal to all the buttons
any button in specific
i mean the button with the id or class of "x"
with the id*
$("#ID").animated("shake");
@csrae something like that?
Rae
@cs-knight
Feb 10 2016 03:08
@Francozt01 yes but with addClass()
Franco Zapata
@Francozt01
Feb 10 2016 03:09
lol rigt
what button are u targeting
search for its ID name
$("#ID here").adClass("animated shake");
add*
aaronK
@aaronk73
Feb 10 2016 03:14
@melkisedek thank you
CamperBot
@camperbot
Feb 10 2016 03:14
aaronk73 sends brownie points to @melkisedek :sparkles: :thumbsup: :sparkles:
:star: 258 | @melkisedek | http://www.freecodecamp.com/melkisedek
Annika
@annikal88
Feb 10 2016 03:16
hey, I am trying to complete the Profile Lookup waypoint in Javascript and am stuck - I seem to be able to produce the right results for the first object in the array but not any others - which I presume means I not doing the for loop correctly
Melkisedek Hamakali
@melkisedek
Feb 10 2016 03:17

Note please, that is always the challenge. What you showed me earlier is test results.
Change this :

var hatValue = testObj;      // Change this line
var shirtValue = testObj;    // Change this line

To this

var hatValue = testObj.hat;    
var shirtValue = testObj.shirt;

Do not continue with the exercises if you don't understand. Please read documentation, always.

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


function lookUp(firstName, prop){
// Only change code below this line
for(var i = 0; i < contacts.length; i++) {
  if (contacts[i].firstName === firstName && contacts[i].hasOwnProperty(prop) === true) {
    return contacts[i][prop];
    } else if (contacts[i][firstName] !== firstName) {
    return "No such contact";
    } else {
      return "No such property"; 
    }
}
noi5e
@noi5e
Feb 10 2016 03:20
has anyone solved the tic tac toe challenge using alpha beta pruning? i need help with my algorithm
pikachu
@misonam03
Feb 10 2016 03:20
can anyone help me with this prob?
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
}
// Add record here
];
instruction says,
Add a new album to the myMusic JSON object. Add artist and title strings, release_year number, and a formats array of strings.
I don't know what I have to do
noi5e
@noi5e
Feb 10 2016 03:23

@misonam03 : var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
},
{

}
// Add record here
];

just fill in the blanks in between the curly braces
aaronK
@aaronk73
Feb 10 2016 03:27
@t3h2mas thank you
Annika
@annikal88
Feb 10 2016 03:36
never mind, managed to solve it
Girish Raman
@girish-r2011
Feb 10 2016 03:39
Hi
can some one help to pass this challenge
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
Dylan Larkins
@tmad40blue
Feb 10 2016 03:40
@girish-r2011 - what kind of issue are you having with it?
Girish Raman
@girish-r2011
Feb 10 2016 03:40
how to set 100% zoom. I have used the css property zoom: 100%;
Dylan Larkins
@tmad40blue
Feb 10 2016 03:40
oh =)
Girish Raman
@girish-r2011
Feb 10 2016 03:40
the test is not being passed
Dylan Larkins
@tmad40blue
Feb 10 2016 03:40
they mean your personal browser's zoom
not in the HTML
press Ctrl-0 (or Cmd-0 if you're on a Mac)
Girish Raman
@girish-r2011
Feb 10 2016 03:40
ok let me check
swissricola
@swissricola
Feb 10 2016 03:41
can anyone help with the "Use Bracket Notation to Find the First Character in a String" node?
```
// Example
var firstLetterOfFirstName = "";
var firstName = "Ada";

firstLetterOfFirstName = firstName[0];

// Setup
var firstLetterOfLastName = "";
var lastName = "Lovelace";

// Only change code below this line
firstLetterOfLastName = lastName;
Girish Raman
@girish-r2011
Feb 10 2016 03:41
i did cmd-0 but nothing happened
i am using chrome
and default zoom is showing 100%
i am using mac
Brian
@sludge256
Feb 10 2016 03:42
@girish-r2011 Did you add a class to your second p element? (you shouldn't)
Girish Raman
@girish-r2011
Feb 10 2016 03:42
i tried both
Brian
@sludge256
Feb 10 2016 03:42
post your code
Girish Raman
@girish-r2011
Feb 10 2016 03:43

<style>
.red-text {
color: red;
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>

<p class='red-text'> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched. </p>

Brian
@sludge256
Feb 10 2016 03:43
@girish-r2011 remove the class from your second p element and create a css rule for the p selector in your style element
@swissricola do what they did in the example code with firstName but do it to lastName
Egor
@Scruf
Feb 10 2016 03:44
@swissricola lasname[0]
Worost
@Worost
Feb 10 2016 03:44
Im on the same code
Girish Raman
@girish-r2011
Feb 10 2016 03:44
that worked
Worost
@Worost
Feb 10 2016 03:45
Im just stuck on the Text zoom
Girish Raman
@girish-r2011
Feb 10 2016 03:45
thanks @girish-r2011 remove the class from your second p element and create a css rule for the p selector in your style element
CamperBot
@camperbot
Feb 10 2016 03:45
sorry girish-r2011, you can't send brownie points to yourself! :sparkles: :sparkles:
Worost
@Worost
Feb 10 2016 03:45
can someone help me?
Girish Raman
@girish-r2011
Feb 10 2016 03:45
thanks
Worost
@Worost
Feb 10 2016 03:45
How do i change Text zoom?
akeem.o.
@akoko1
Feb 10 2016 03:45
hi please can anyone help me with this challenge?
Add a pair of radio buttons to your form. One should have the option of indoor and the other should have the option of outdoor.
Brian
@sludge256
Feb 10 2016 03:45
Most of the time it's not actually the Text Zoom
We're rewriting part of the instructions and adding a more descriptive test case to that challenge
Dylan Larkins
@tmad40blue
Feb 10 2016 03:47
@Worost - if it is indeed text zoom, press Ctrl-0 (zero) to reset it in your browser (or Cmd-0 on a Mac)
@akoko1 - what kind of issue are you having with the challenge?
pikachu
@misonam03
Feb 10 2016 03:48
@noi5e do you mean any type?
Worost
@Worost
Feb 10 2016 03:49
apparently it wasn't the text zoom...
It was bad code...
<style>
.red-text {
color: red;
}

p {
font-size: 16-px;
}
</style>
Is this not how you change font size?
of p elements?
pikachu
@misonam03
Feb 10 2016 03:51
I think it is just 16px;
not 16-px;
Dylan Larkins
@tmad40blue
Feb 10 2016 03:51
yeah, you have an extraneous dash in there
Worost
@Worost
Feb 10 2016 03:51
yup
thats what it was
Thanks!
Dylan Larkins
@tmad40blue
Feb 10 2016 03:51
no problem
Joshua Guevarra
@jguevarra01
Feb 10 2016 03:59
How do I Create a class called smaller-image and use it to resize the image so that it's only 100 pixels wide.
please help
Dylan Larkins
@tmad40blue
Feb 10 2016 04:00
@jguevarra01 - would you mind posting your code so far?
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:00
how would i be able to do that?
sorry im fairly new to this
Collin
@collinferry
Feb 10 2016 04:01
What are the most popular methods for pair programming remotely (and finding people to pair with)?
Dylan Larkins
@tmad40blue
Feb 10 2016 04:01
copy and paste into the text box here - preferably surrounding it with ````
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:01

<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;
}
img {
smaller-image
}

</style>

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

<img src="https://bit.ly/fcc-relaxing-cat">

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

like that?
Brian
@sludge256
Feb 10 2016 04:02
wiki pair programming
CamperBot
@camperbot
Feb 10 2016 04:02

:point_right: pair programming and why it is special [wiki]

Pair Programming is an Agile Development practice that was born out of the Extreme Programming movement.

Working as a team of [exactly] two, at a single computer, the pair will slide the keyboard and mouse back-and-forth throughout a "pairing session". This increases the code quality by providing a "greater than the sum of its parts" effect of two developers working on a single problem domain.

The increase in quality of the code, combined with the effect of knowledge and understanding on the project being spread across multiple developers, can produce a large savings in cost on the project as a whole.

In a Test Driven Development (TDD) shop, it is most common for each member of the pair to take turns a) writing a test and b) writing code to pass the test. This "ping pong" yields a cumulative effect on the overall quality of the final product.

To be most effective it is important that pairs are intermixed; not the same couple of developers always working together.

Pair programming is considered to be very "social". It can be akin to a marriage because you learn to cooperate with a peer in a close, give-and-take relationship. As such it is often very difficult to become comfortable with pair programming. Some developers simply NEVER feel quite at-home. In the end, the willingness to share, be a bit vulnerable and work cooperatively toward a better product will make you a far better developer (and a better person overall).

:pencil: read more about pair programming and why it is special on the FCC Wiki

Brian
@sludge256
Feb 10 2016 04:02
not that :(
find screen hero
CamperBot
@camperbot
Feb 10 2016 04:02
find screen hero
nothing found
Brian
@sludge256
Feb 10 2016 04:02
find screenhero
CamperBot
@camperbot
Feb 10 2016 04:02

find screenhero

:zero: how to install screenhero

Brian
@sludge256
Feb 10 2016 04:02
@collinferry :point_up:
Dylan Larkins
@tmad40blue
Feb 10 2016 04:03
@jguevarra01 - use your red-text class as an example
Herman Fassett
@HermanFassett
Feb 10 2016 04:03
some people like screenhero
Collin
@collinferry
Feb 10 2016 04:03
thanks @sludge256 - are you editing camperbot on the fly?
CamperBot
@camperbot
Feb 10 2016 04:03
collinferry sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1383 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Feb 10 2016 04:03
no just using the commands
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:03
@tmad40blue how would i do that
Brian
@sludge256
Feb 10 2016 04:03
also we have this room https://gitter.im/FreeCodeCamp/LetsPair
but it's not super active
Dylan Larkins
@tmad40blue
Feb 10 2016 04:04
for example, you have:
  .red-text {
    color: red;
  }
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:04
ah okay
Dylan Larkins
@tmad40blue
Feb 10 2016 04:04
so that class is creating red text to anything you call it with later (for example an h1, h2, or p)
Brian
@sludge256
Feb 10 2016 04:04
@HermanFassett I personally haven't used it but the FCC team does.
Dylan Larkins
@tmad40blue
Feb 10 2016 04:04
so you have a red-text "class" with a color "attribute"
now you need to make a smaller-image "class" with a width "attribute"
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:05
.smaller-image {
width: 100px;
}
liike that
Dylan Larkins
@tmad40blue
Feb 10 2016 04:05
precisely =)
oh and FYI, if you want to do the fancy code formatting in this gitter chat
Brian
@sludge256
Feb 10 2016 04:06
Yay learning :+1:
Dylan Larkins
@tmad40blue
Feb 10 2016 04:06
you can start with ````
and press Shift-Enter to start a new line without sending the message
type your code... and end with another ```` line
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:06
i did that but it wont complete the challenge
````
Brian
@sludge256
Feb 10 2016 04:06
@tmad40blue try sending a message of "wiki format"
Dylan Larkins
@tmad40blue
Feb 10 2016 04:06
did you apply the class to your selector?
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:07
 .smaller-image {
    width: 100px;
  }
Brian
@sludge256
Feb 10 2016 04:07
You've created the class
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:07
wdym appl the class to your selector
Brian
@sludge256
Feb 10 2016 04:07
now you have to apply it to an element
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:07
wdym by that
Dylan Larkins
@tmad40blue
Feb 10 2016 04:07
where do you want to use that class? you need to use it later on for something
Brian
@sludge256
Feb 10 2016 04:07
You've done it before with your red-text class
Dylan Larkins
@tmad40blue
Feb 10 2016 04:07
^ yep. where is your red-text being used further down?
you need to do the same thing with smaller-image
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:08
<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;
  }
  .smaller-image {
    width: 100px;
  }
</style>

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

<img src="https://bit.ly/fcc-relaxing-cat">

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Dylan Larkins
@tmad40blue
Feb 10 2016 04:09
so what part of your code (after </style>) do you want to actually use your smaller-image class?
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:09
im 15 so its hard for me to understand stuff like this
Manish Giri
@Manish-Giri
Feb 10 2016 04:09
@jguevarra01 img class=“smaller-image” src=“…”
@jguevarra01 apply your class to the img element
Dylan Larkins
@tmad40blue
Feb 10 2016 04:09
IMO age means very little - you are already far ahead of most 15-year-olds in tackling this learning =)
good job on getting started on this
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:10
thanks i wanna go into computer programming or something similat
Brett Guillory
@kurzninja
Feb 10 2016 04:10
modern browser JS APIs don't include built-in event emitter implementations do they?
Dylan Larkins
@tmad40blue
Feb 10 2016 04:10
so yes, you need to actually use the class you created: <img class="smaller-image" src="#">
Brian
@sludge256
Feb 10 2016 04:10
It's difficult for almost everyone in the beginning
it's learning a new language and a new set of concepts
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:11
I got it
Thanks guys
Dylan Larkins
@tmad40blue
Feb 10 2016 04:11
just like your <p> is using "red-text" later down. now your <img> is using "smaller-text"
Joshua Guevarra
@jguevarra01
Feb 10 2016 04:11
great help
Dylan Larkins
@tmad40blue
Feb 10 2016 04:11
no problem =)
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:31
Hi! I am having issue with Give a Background Color to a Div Element.
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 04:32

Dylan Larkins
@tmad40blue
Feb 10 2016 04:32
@Catherinesjkim - what kind of issue are you having with the challenge?
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:33
I can't turn the background into gray color
Dylan Larkins
@tmad40blue
Feb 10 2016 04:33
@Catherinesjkim - could you post your code so far?
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 04:33
I guess Gitter app on mobile doesn't do Github flavoured markdown
Ohans Emmanuel
@ohansemmanuel
Feb 10 2016 04:33
@Catherinesjkim posting the code would help
Dylan Larkins
@tmad40blue
Feb 10 2016 04:34
@Qoyyuum I was about to say... your code is so efficient that it's 0 lines long!
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 04:34
<body style="background-color: gray">
Maybe that will work
Prateekshit Deb
@pdeb93
Feb 10 2016 04:34
can anyone tell me exactly what we have to do in the bootstrap grid exercise?
Ohans Emmanuel
@ohansemmanuel
Feb 10 2016 04:35
@tmad40blue I'm stuck with the Caesar cipher challenge... The ROT13 one.
Daniel Ross
@gainiacster
Feb 10 2016 04:35
Hello all
Ohans Emmanuel
@ohansemmanuel
Feb 10 2016 04:35
Any help on the ROT13 challenge...
Dylan Larkins
@tmad40blue
Feb 10 2016 04:35
sorry @ohansemmanuel I'm not that far yet... =(
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:35

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;
}

.gray-background {
background-color: gray;
}
</style>

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<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>
<style>gray-background</style>
</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>

Dylan Larkins
@tmad40blue
Feb 10 2016 04:36
@Catherinesjkim - your gray-background class in <style> looks great, but you haven't actually used it anywhere below that
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 04:36
Could try adding a * style for gray background
Covers everything
Prateekshit Deb
@pdeb93
Feb 10 2016 04:36
thanks a lot catherine
Dylan Larkins
@tmad40blue
Feb 10 2016 04:37
so you said you wanted to make your <div> element have the background - right now it has no class assigned to it, it's just <div>
so you'll need to give it whichever class you want - <div class="foo">
Prateekshit Deb
@pdeb93
Feb 10 2016 04:39
ok guys i'm stuck at this part.... can anyone help? Your buttons should all be nested within the same div element with the class row.
Each of your Bootstrap buttons should be nested within its own div element with the class col-xs-4.
the first part is done

<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 class="col-xs-4">
<button class="btn btn-block btn-primary">Like</button>
<button class="btn btn-block btn-info">Info</button>
<button class="btn btn-block btn-danger">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>
<button type="submit">Submit</button>
</form>
</div>

what change do i have to make in this for the second part to work(col-xs-4 part)
Dylan Larkins
@tmad40blue
Feb 10 2016 04:40
@pdeb93 - right now all of your buttons are nested inside the same two <div> classes
the instructions say "Each of your Bootstrap buttons should be nested within its own div element"
Prateekshit Deb
@pdeb93
Feb 10 2016 04:41
so do i make two separate nested div elements within the primary div?
Dylan Larkins
@tmad40blue
Feb 10 2016 04:41
so that means each <button> class needs to be inside its own <div class="col-xs-4">
Ohans Emmanuel
@ohansemmanuel
Feb 10 2016 04:41
@tmad40blue thanks!... I'll take a look at it again
CamperBot
@camperbot
Feb 10 2016 04:41
ohansemmanuel sends brownie points to @tmad40blue :sparkles: :thumbsup: :sparkles:
:star: 57 | @tmad40blue | http://www.freecodecamp.com/tmad40blue
Prateekshit Deb
@pdeb93
Feb 10 2016 04:41
Peter Cortinas
@peterCortinas
Feb 10 2016 04:42
Hey all, I'm stuck on the Card Counting function. Any hints would be mucho appreciated
cannelflow
@cannelflow
Feb 10 2016 04:42
@peterCortinas use switch case and count + or - depending upon card
total it and create if else for return
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:43
@tmad40blue where do I add that?
Peter Cortinas
@peterCortinas
Feb 10 2016 04:44
Cool, I'll try adding if/esle statements. I was trying to do it with all switch statements.
Thanks!
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:44
Div is really confusing...
Daniel Ross
@gainiacster
Feb 10 2016 04:45
it can be but its a necessity for your layouts
cannelflow
@cannelflow
Feb 10 2016 04:45
@peterCortinas switch is easier
Dylan Larkins
@tmad40blue
Feb 10 2016 04:48
@Catherinesjkim - your <div> (immediately after your <a href> ) is just a plain <div> - it has no classes applied to it
bitgrower
@bitgrower
Feb 10 2016 04:48
is that a challenge, or are you talking about the html tag ?
Catherine Kim
@Catherinesjkim
Feb 10 2016 04:48
I did it. Thank you @tmad40blue!
CamperBot
@camperbot
Feb 10 2016 04:48
catherinesjkim sends brownie points to @tmad40blue :sparkles: :thumbsup: :sparkles:
Dylan Larkins
@tmad40blue
Feb 10 2016 04:48
no problem =)
CamperBot
@camperbot
Feb 10 2016 04:48
:star: 58 | @tmad40blue | http://www.freecodecamp.com/tmad40blue
Matt Leonard
@matty22
Feb 10 2016 04:52
I'm working through the Git section in FCC and can't get past a part. Anyone around who has done it?
bitgrower
@bitgrower
Feb 10 2016 04:53
which part are you having trouble with ... i've been working on it myself ...
Matt Leonard
@matty22
Feb 10 2016 04:53
commit to it
I create the txt file. git add it, git commit it with no problems.
bitgrower
@bitgrower
Feb 10 2016 04:54
and ?
did you create the file with the right name?
Matt Leonard
@matty22
Feb 10 2016 04:54
Then it says to edit it, so I add a line, save the file. git add it, git commit it and according to git status it is commited, but when I run the test it tells me I failed
yep readme.txt
bitgrower
@bitgrower
Feb 10 2016 04:55
can you copy everything it says ?
Matt Leonard
@matty22
Feb 10 2016 04:55
the shell?
bitgrower
@bitgrower
Feb 10 2016 04:55
in the error message?
yeah
could be you are in the wrong directory
Matt Leonard
@matty22
Feb 10 2016 04:55
matty22:~/workspace/hello-world (master) $ git-it verify
Verifying "COMMIT TO IT"...

ACTUAL                             EXPECTED
------                             --------
"Seems there are changes"       != "Changes have been committed!" 
"to commit still."              != ""                             
""                              != null                           
# FAIL

Your solution to COMMIT TO IT didn't match the expected output.
Try again!
-----------------------------------------------------------------
Omar Richardson
@omie86
Feb 10 2016 04:55
Stuck on something here guys - http://screencast.com/t/HfaBs4XU
I'm supposed to only add one class with each of the three selectors? Isn't that what I've done?
<script>
  $(document).ready(function() {
  $("button").addClass("animated");
  $(".btn").addClass("shake");
  $("#target1").addClass("animated shake btn-primary");
  });
</script>
Brian
@sludge256
Feb 10 2016 04:56
@omie86 your last selector has 3 classes
bitgrower
@bitgrower
Feb 10 2016 04:56
okay ... looks like you already have a file of that name in your repository ...
Matt Leonard
@matty22
Feb 10 2016 04:57
Yes. It told me to make a change to the file and commit the change.
Instructions:
Step: Make More Changes

Now add another line to readme.txt and save.

In terminal, you can view the difference between the file now and how it was at your last commit.

$ git diff

Now with what you just learned above, commit this latest change.
Omar Richardson
@omie86
Feb 10 2016 04:58
@sludge256 Thank you sir
bitgrower
@bitgrower
Feb 10 2016 04:58

matty22 -- do this ...

history | last -15

and paste the results in here

Matt Leonard
@matty22
Feb 10 2016 04:58

matty22:~/workspace/hello-world (master) $ history | last -15

wtmp begins Tue Dec 22 16:38:31 2015

bitgrower
@bitgrower
Feb 10 2016 04:59
can you try 1 more time ... just the same command
Omar Richardson
@omie86
Feb 10 2016 05:00
@matty22 Where is the git section.. I've been meaning to work on that at some point
Matt Leonard
@matty22
Feb 10 2016 05:00

matty22:~/workspace/hello-world (master) $ history | last -15

wtmp begins Tue Dec 22 16:38:31 2015

bitgrower
@bitgrower
Feb 10 2016 05:00
@omie86 -- it's about the 2nd challenge in the backend section
lol ... sigh ...
Omar Richardson
@omie86
Feb 10 2016 05:00
oh nice
@bitgrower thanks
CamperBot
@camperbot
Feb 10 2016 05:00
omie86 sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 422 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
Feb 10 2016 05:00
see if just typing history gives you some output ... (but DON'T paste it here!!!)
Matt Leonard
@matty22
Feb 10 2016 05:01
Yes it does
bitgrower
@bitgrower
Feb 10 2016 05:01
lots and lots ?
Matt Leonard
@matty22
Feb 10 2016 05:01
74 rows
bitgrower
@bitgrower
Feb 10 2016 05:01

okay ... try the original command again

history | last 15

maybe that was my problem ... shouldn't have been a neg #
ah ... hang on ...
Matt Leonard
@matty22
Feb 10 2016 05:02
No that does nothing
bitgrower
@bitgrower
Feb 10 2016 05:02
history | tail -15
by now probably history | tail -20
Matt Leonard
@matty22
Feb 10 2016 05:03
Haha now its just a ton of history commands. want me to run through my process once more and then use this command to get my process?
bitgrower
@bitgrower
Feb 10 2016 05:03
sorry ...
well, I was trying to see the sequence of commands you typed
Matt Leonard
@matty22
Feb 10 2016 05:03
61  git add readme.txt
   62  git commit -m "Restarting"
   63  git diff
   64  git status
   65  git add readme.txt
   66  git status
   67  git commit -m "Second commit"
   68  git status
   69  git-it verify
   70  git status
   71  history | last -15
   72  git history | last -15
   73  history | last -15
   74  history
   75  history | last 15
   76  history|last15
   77  history | last15
   78  history | last 15
   79  history | tail -15
   80  history | tail -20
matty22:~/workspace/hello-
So 62 is the commit of the initial readme.txt, then I make the change to the file and start at 63
bitgrower
@bitgrower
Feb 10 2016 05:04
so the error shows up on the second commit ...
Matt Leonard
@matty22
Feb 10 2016 05:04
yep. line 67 seems to work fine. line 68's git status shows all green
but when I run row 69 to test it, I err
bitgrower
@bitgrower
Feb 10 2016 05:05
yeah, it looks like you tried to add readme.txt twice ...
61 & 65
Matt Leonard
@matty22
Feb 10 2016 05:05
So if I make edits I don't have to add it again, just add it to the repo once and then I can go straight to committing?
bitgrower
@bitgrower
Feb 10 2016 05:05
no ... just commit again
Matt Leonard
@matty22
Feb 10 2016 05:05
Ok, lemme try that.
bitgrower
@bitgrower
Feb 10 2016 05:05
add is for a new file ...
but I don't know what state your repository is in now ...
basically, in a project, you create a file ... then you tell the version control (VC) system about it ... with add ...
what happens when you do a git diff ?
Matt Leonard
@matty22
Feb 10 2016 05:08
OK, when I edit the file and then go straight to commit, it gives me this error.
bitgrower
@bitgrower
Feb 10 2016 05:08
which error ?
Matt Leonard
@matty22
Feb 10 2016 05:08
This was my git diff
matty22:~/workspace/hello-world (master) $ git diff
diff --git a/hello-world/readme.txt b/hello-world/readme.txt
index 52c5a68..2117dc2 100644
--- a/hello-world/readme.txt
+++ b/hello-world/readme.txt
@@ -1 +1,3 @@
-Hello Again World
\ No newline at end of file
+Hello Again World^M
+^M
+One more edit then?
\ No newline at end of file
matty22:~/workspace/hello-world (master) $ git diff
diff --git a/hello-world/readme.txt b/hello-world/readme.txt
index 52c5a68..2117dc2 100644
--- a/hello-world/readme.txt
+++ b/hello-world/readme.txt
@@ -1 +1,3 @@
-Hello Again World
\ No newline at end of file
+Hello Again World^M
+^M
+One more edit then?
\ No newline at end of file
That looked good so I tried to commit and got this:
matty22:~/workspace/hello-world (master) $ git commit -m "Fifth times the charm"
On branch master
Changes not staged for commit:
        modified:   readme.txt

Untracked files:
        ../README.md
        ../client/
        ../package.json
        ../server.js

no changes added to commit
So I need to stage the changes before committing them. That's what I was trying to do with git add
bitgrower
@bitgrower
Feb 10 2016 05:09
what do you get with git status ?
Matt Leonard
@matty22
Feb 10 2016 05:10
matty22:~/workspace/hello-world (master) $ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   readme.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../README.md
        ../client/
        ../package.json
        ../server.js

no changes added to commit (use "git add" and/or "git commit -a")
bitgrower
@bitgrower
Feb 10 2016 05:10

try this (from the instructions)

git add .

then do the commit
Matt Leonard
@matty22
Feb 10 2016 05:10
just git add with no file name
?
bitgrower
@bitgrower
Feb 10 2016 05:11
with a period, it looks like ...
git add .
^^^^^^I period
or
---------^ period
Matt Leonard
@matty22
Feb 10 2016 05:12
Well right above that it tells me to use git add <filename>
bitgrower
@bitgrower
Feb 10 2016 05:13
y'know ... now I'm not even sure if I did the additional changes part of the exercise ... sigh ...
Matt Leonard
@matty22
Feb 10 2016 05:14
Here's what I did.
matty22:~/workspace/hello-world (master) $ git add .
matty22:~/workspace/hello-world (master) $ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   readme.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../README.md
        ../client/
        ../package.json
        ../server.js

matty22:~/workspace/hello-world (master) $ git commit -m "Commit message"
[master c7e744a] Commit message
 1 file changed, 3 insertions(+), 1 deletion(-)
matty22:~/workspace/hello-world (master) $ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../README.md
        ../client/
        ../package.json
        ../server.js

nothing added to commit but untracked files present (use "git add" to track)
matty22:~/workspace/hello-world (master) $ git-it verify
Verifying "COMMIT TO IT"...

ACTUAL                             EXPECTED
------                             --------
"Seems there are changes"       != "Changes have been committed!" 
"to commit still."              != ""                             
""                              != null                           
# FAIL

Your solution to COMMIT TO IT didn't match the expected output.
Try again!
-----------------------------------------------------------------
bitgrower
@bitgrower
Feb 10 2016 05:15
I do not think this is a great tutorial on version control ...
Matt Leonard
@matty22
Feb 10 2016 05:15
Haha
bitgrower
@bitgrower
Feb 10 2016 05:16
I've worked with tons of version control systems ... and this doesn't even really do a great job of refreshing my memory -- and VC systems are basically all trying to do the same thing ...
Matt Leonard
@matty22
Feb 10 2016 05:17
Maybe I'll bug the helpbackend channel. There have to be people who have passed this section of the curriculum
bitgrower
@bitgrower
Feb 10 2016 05:18
yeah ... not sure if anyone has responded to my last question ... but that's where I took my question ...
see ya there!
Kirby Simmons
@puckett15
Feb 10 2016 05:19
@matty22 do you think that you have to commit all the files that you have in your repo?
Matt Leonard
@matty22
Feb 10 2016 05:20
@puckett15 There is only 1 file in my repo
Thomas Noe
@t3h2mas
Feb 10 2016 05:20
git status
Kirby Simmons
@puckett15
Feb 10 2016 05:21
You have untracked files in your repo..
Matt Leonard
@matty22
Feb 10 2016 05:21
Here's the current git status
matty22:~/workspace/hello-world (master) $ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../README.md
        ../client/
        ../package.json
        ../server.js

nothing added to commit but untracked files present (use "git add" to track)
It doesn't tell me to do anything with these four files
Kirby Simmons
@puckett15
Feb 10 2016 05:22
do a git add -A and then a git status to see if it commits those untracked files
Matt Leonard
@matty22
Feb 10 2016 05:23
It doesn't stage those untracked files
Kirby Simmons
@puckett15
Feb 10 2016 05:24
That's strange...
Matt Leonard
@matty22
Feb 10 2016 05:26
Ok gonna start fresh once more
Kirby Simmons
@puckett15
Feb 10 2016 05:30
Where did you use git init in the directory workspace or hello-world ?
@matty22 because it seems like you ran git init in your workspace directory, which is why git is tracking those other files
lpix
@lpix
Feb 10 2016 05:33
@sensoph1 :+1: Thanks, I'll try it
CamperBot
@camperbot
Feb 10 2016 05:33
lpix sends brownie points to @sensoph1 :sparkles: :thumbsup: :sparkles:
:star: 247 | @sensoph1 | http://www.freecodecamp.com/sensoph1
Matt Leonard
@matty22
Feb 10 2016 05:34
No clue. I'm guessing I ran it inside hello-world
bitgrower
@bitgrower
Feb 10 2016 05:34
good one @puckett15
Kirby Simmons
@puckett15
Feb 10 2016 05:35
cd ../ back one directory and do a git status and see if you get anything
Matt Leonard
@matty22
Feb 10 2016 05:35
One directory up tells me matty22:~/workspace/hello-world (master) $ cd learninggit bash: cd: learninggit: No such file or directory
matty22:~/workspace/hello-world (master) $ cd learninggit
bash: cd: learninggit: No such file or directory
Sorry that's better
Bhargav Kowshik
@bkowshik
Feb 10 2016 05:36
I am a stuck with a test case in this problem. http://www.freecodecamp.com/challenges/where-do-i-belong
The Array.sort() function is acting wierd.
The test case is
where([5, 3, 20, 3], 5) should return 2.
Tim Bell
@MindfulBell
Feb 10 2016 05:37
Any React-ers on?
Kevin Mulligan
@kmulligan
Feb 10 2016 05:38

I am stuck on http://www.freecodecamp.com/challenges/return-largest-numbers-in-arrays

I know that

for (var i = 0; i < arr.length; i++) {

     }

lets me iterate through the main array, but not sure how to do a comparison inside the subarrays to find the biggest number in that array and output it into a new array

Matt Leonard
@matty22
Feb 10 2016 05:38
OK, I'll try it again tomorrow. It's bed time.
Thanks @puckett15 and @bitgrower
CamperBot
@camperbot
Feb 10 2016 05:38
matty22 sends brownie points to @puckett15 and @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 177 | @puckett15 | http://www.freecodecamp.com/puckett15
:star: 424 | @bitgrower | http://www.freecodecamp.com/bitgrower
Andrew Griesel
@griesel22
Feb 10 2016 05:39
guys ive got a super simple thing im having trouble on, im trying to change font size within a style tag for my <p> element, how do i write it out? ive got <style>
.red-text {
color: red; font-size: 16px
}
</style>
but i dont know how to make that correlate with the <p>
bitgrower
@bitgrower
Feb 10 2016 05:39
@kmulligan -- nested for loops
Dylan Larkins
@tmad40blue
Feb 10 2016 05:39
@griesel22 - first off you have slight formatting error
should read:
Kirby Simmons
@puckett15
Feb 10 2016 05:39
@matty22 I'm pretty sure that's your problem, you're going to have to delete that repo and create a new one in the hello world directory.
Dylan Larkins
@tmad40blue
Feb 10 2016 05:40
.red-text {
  color: red;
  font-size: 16px;
}
Kevin Mulligan
@kmulligan
Feb 10 2016 05:40

@bitgrower

for (var i = 0; i < arr.length; i++) {
   for {var j = 0; j < arr[j].length; j++) {}
     }

?

Andrew Griesel
@griesel22
Feb 10 2016 05:40
@tmad40blue ok i fixed that
Dylan Larkins
@tmad40blue
Feb 10 2016 05:41
then you need to actually use your red-text class later in your code
so right now i'm betting that you have a plain <p> element, with no class
Andrew Griesel
@griesel22
Feb 10 2016 05:41
I have that, ive got <p class="red-text">
blah blah blah </p>
Dylan Larkins
@tmad40blue
Feb 10 2016 05:41
so if you wanted <p> to have class foo, you would use <p class="foo">
hmm
post your code?
Andrew Griesel
@griesel22
Feb 10 2016 05:42

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

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

<p class="red-text">ipsum .</p>
<p> ipsum. </p>

Dylan Larkins
@tmad40blue
Feb 10 2016 05:42
you're still missing a semicolon
font-size: 16px;
Andrew Griesel
@griesel22
Feb 10 2016 05:42
ok fixed that
bitgrower
@bitgrower
Feb 10 2016 05:43
@kmulligan -- yup
at least basically -- you do have a problem with the inner for loop
Kevin Mulligan
@kmulligan
Feb 10 2016 05:44
yea switching the { to (
bitgrower
@bitgrower
Feb 10 2016 05:45
you have another problem as well ...
...but your problem sorta indicates you are on the right track ...
Catherine Kim
@Catherinesjkim
Feb 10 2016 05:49
Hi, I am stuck with Set the ID of an Element
Dylan Larkins
@tmad40blue
Feb 10 2016 05:49
@Catherinesjkim - what issue are you having?
Kevin Mulligan
@kmulligan
Feb 10 2016 05:49
@bitgrower I know this isn't right, just not sure why. It is returning the whole first subarray
var x = [1];
  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[j].length; j++) {
     if (x < arr[j]) {
       x = arr[j];
       return x;
     }

   }
     }
rather than stoping at each point of the subarray and doing a comparison
aaronK
@aaronk73
Feb 10 2016 05:50
  var lookup {
     alpha: "Adams",
     bravo: "Boston",
     charlie: "Chicago",
     delta: "Denver",
     echo: "Easy",
     foxtrot: "Frank"
  };
what am i missing???
Catherine Kim
@Catherinesjkim
Feb 10 2016 05:51
@tmad40blue I don't know how to give my form element the id of cat-photo-form.
Dylan Larkins
@tmad40blue
Feb 10 2016 05:52
@Catherinesjkim - it's very similar to adding a class
bitgrower
@bitgrower
Feb 10 2016 05:52
@kmulligan -- cool !!!! so, can you describe the missing piece of information ... you basically have, but I want you to put it in the form of "if I knew how to do this, I could solve the problem" ...
budimanfix
@budimanfix
Feb 10 2016 05:52
@aaronk73 result = lookup[]
Dylan Larkins
@tmad40blue
Feb 10 2016 05:52
so for example, you can add a class with <form class="foo">
so you can also add an id with <form class="bar">
bitgrower
@bitgrower
Feb 10 2016 05:52
(It's not the only thing which is wrong with your code, but it's at the heart of the challenge ... )
Dylan Larkins
@tmad40blue
Feb 10 2016 05:53
the two together might look like <form class="foo" id="bar">
aaronK
@aaronk73
Feb 10 2016 05:55
@budimanfix result = lookup [ alpha: "Adams", bravo: "Boston", charlie: "Chicago", delta: "Denver", echo: "Easy", foxtrot: "Frank" ];
  result = lookup [
     alpha: "Adams",
     bravo: "Boston",
     charlie: "Chicago",
     delta: "Denver",
     echo: "Easy",
     foxtrot: "Frank"
  ];
Kevin Mulligan
@kmulligan
Feb 10 2016 05:57
This won't be using the correct terms, but, if I knew how to access the data individually inside the subarray I could do a comparison to that data as to whether or not it was bigger than the other parts; e.g. if I knew how to say "okay, let's look at [4, 5, 1, 3]. Hello 4, are you bigger than X? If so, you are now X." then "Hey 5, are you bigger than X? If so you are now X. If not, X is still just X."
Catherine Kim
@Catherinesjkim
Feb 10 2016 05:57
It's so hard! I will take a break and then come back. Thanks!
budimanfix
@budimanfix
Feb 10 2016 05:59
@aaronk73 result = lookup[ val];
bitgrower
@bitgrower
Feb 10 2016 06:00
@kmulligan -- right, if you knew how to reference each element of the array, you'd be able to do the comparison ...
@Catherinesjkim -- taking breaks is a good plan !!!
Catherine Kim
@Catherinesjkim
Feb 10 2016 06:02
Seriously!
aaronK
@aaronk73
Feb 10 2016 06:02
@budimanfix do i need to fix anything on list
Kevin Mulligan
@kmulligan
Feb 10 2016 06:03
alright progress (?)
this gets me "4" instead of the whole subarray, but that tells me it isn't going on to 5, 1, 3 in the test data
 var x = [1];
  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[j].length; j++) {
     if (x < arr[i][j]) {
       x = arr[i][j];
       return x;
     }
DJ
@qualitymanifest
Feb 10 2016 06:04
@kmulligan when you return, it exits the function. maybe you should push x into an array?
budimanfix
@budimanfix
Feb 10 2016 06:05
@aaronk73 move that : result = lookup [val]
@aaronk73 button /below your code
Kevin Mulligan
@kmulligan
Feb 10 2016 06:14

@qualitymanifest ok...

var x = [];

  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[j].length; j++) {
     if (x < arr[i][j]) {
     x.push(arr[i][j]);
    return x;

this gets me [4], so again it is pushing the first time through into the array, but isn't going through to the next element, I'm guessing because of the return x causing it to exit the function?

bitgrower
@bitgrower
Feb 10 2016 06:15
well ... think about what your loops are doing @kmulligan
and you are comparing an element of the array to an empty array ... I don't even know what that would mean ...

the key term here is iteration ...

you want to iterate thru each subarray and find the largest number in that subarray

you know how to find one element (which?) -- so now you just have to figure out what you need to do to address other elements in the subarray you are looking at ...
DJ
@qualitymanifest
Feb 10 2016 06:19
@kmulligan you still have a return inside your loop, which ends the loop and exits the function
Yashaswini29
@Yashaswini29
Feb 10 2016 06:19
Hi. Am learning html. Am I not right about giving a font size of 16px to p elements here? <style>
.red-text {
color: red;
p {
font-size: 16px;
}
}
</style>
DJ
@qualitymanifest
Feb 10 2016 06:19
@kmulligan your return should be after the loop
Devashish
@newbie-07
Feb 10 2016 06:21
@Yashaswini29 close your .red.text
@Yashaswini29 before p
DJ
@qualitymanifest
Feb 10 2016 06:21
@kmulligan also it would be best if you could paste the whole function. as it is, it looks like you're missing three }'s, but if you're getting [4] that must not be the case
Devashish
@newbie-07
Feb 10 2016 06:21
with }
Kevin Mulligan
@kmulligan
Feb 10 2016 06:22
function largestOfFour(arr) {
  // You can do this!

//  var bigfour = "";
  var x = [];

  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[j].length; j++) {
     if (x < arr[i][j]) {
     x.push(arr[i][j]);
     }
   return x;
   }
  }


 // return arr;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Yashaswini29
@Yashaswini29
Feb 10 2016 06:22
@newbie-07 .. Thank you very much:)
CamperBot
@camperbot
Feb 10 2016 06:22
yashaswini29 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
Devashish
@newbie-07
Feb 10 2016 06:22
@newbie-07 did you get that?
CamperBot
@camperbot
Feb 10 2016 06:22
:star: 322 | @newbie-07 | http://www.freecodecamp.com/newbie-07
DJ
@qualitymanifest
Feb 10 2016 06:22
This message was deleted
bitgrower
@bitgrower
Feb 10 2016 06:23
LOL ... dang it, I was hinting around that problem ... :)
DJ
@qualitymanifest
Feb 10 2016 06:23
@kmulligan also x is an array and you're trying to compare it to arr[i][j] which is a number
@bitgrower oh, sorry, i didn't read that
:facepalm:
bitgrower
@bitgrower
Feb 10 2016 06:24
LOL ... np -- it was a ways up ...
Kevin Mulligan
@kmulligan
Feb 10 2016 06:24
It's fine, I still don't get it :|
This is one of those "I don't think this is for me" nights and I'm just going to call it a night
bitgrower
@bitgrower
Feb 10 2016 06:24
so ... how do you index into an array @kmulligan
ah ... give me 5-10 minutes ... I should have packed it in 30 minutes ago ...
Kamal Sharif
@ksharifbd
Feb 10 2016 06:29
Math.floor(Math.random() * (max - min + 1)) + min
not getting the code
Kevin Mulligan
@kmulligan
Feb 10 2016 06:30
@bitgrower when you say index into an array, do you mean how do you access the data in the array or modify it
myArray =  [1, 2]
myArray[0]; // results: 1
I think
aaronK
@aaronk73
Feb 10 2016 06:33
@newbie-07 thank you
CamperBot
@camperbot
Feb 10 2016 06:33
aaronk73 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
:star: 323 | @newbie-07 | http://www.freecodecamp.com/newbie-07
Devashish
@newbie-07
Feb 10 2016 06:34
@aaronk73 you are welcome
bitgrower
@bitgrower
Feb 10 2016 06:34
@kmulligan yep -- either way -- accessing or changing, the question is still the same ... "how do you address an element of an array"
if you know that, you can either access it or change it ...
now...the NEXT trick is ... an element of an array can be ANYTHING ... a string, a number, an object ... even (as in this case) another array ...
Kevin Mulligan
@kmulligan
Feb 10 2016 06:45
return arr[0][1];
gives me "5" in the example, so I want to use arr[i][j] in my calculations?
bitgrower
@bitgrower
Feb 10 2016 06:46
what do you think ?
what would happen if you did return[0][2] --- think about it ... what element will it access ... ?
Kevin Mulligan
@kmulligan
Feb 10 2016 06:49
3rd element in the 1st subarray

ok.. progress..

var x = 0;

  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[i].length; j++) {
   if (arr[i][j] > x){
     x = arr[i][j];

   }

   }
return x;
}
}

gets me the biggest number in the first subarray

DJ
@qualitymanifest
Feb 10 2016 06:50
@kmulligan your return is still inside your for first for loop
bitgrower
@bitgrower
Feb 10 2016 06:51
ah hah ... the main thing I wanted to help you understand before you left was knowing how to address each element of the sub arrays ...
once you know that, the rest is much easier ... :)
Kevin Mulligan
@kmulligan
Feb 10 2016 06:52
ok, so now i need to push the result into an array, then have it move on to the next subarray, push that result, etc.
bitgrower
@bitgrower
Feb 10 2016 06:52
there's still a "trick" or two ... but once have the addressing down, the rest is just arithmetic ...
DJ
@qualitymanifest
Feb 10 2016 06:52
@kmulligan yes. the only thing to add onto that is - reset the result at the beginning of each sub-array, otherwise you'll only get a new number with each sub-array if it's larger than the older number
bitgrower
@bitgrower
Feb 10 2016 06:55
what @qualitymanifest said ... when you are going thru your loop ... look to see how many values you are pushing ...
do you need all those values?
Youtheart
@Youtheart
Feb 10 2016 06:58
Hello - I am having trouble figuring out how I can skip ahead? Ex, if I want to skip all the way to the database portion, how can I do this? I am stuck looking at the beginning HTML stuff.
Brian
@sludge256
Feb 10 2016 07:00
Click the map button
Kevin Mulligan
@kmulligan
Feb 10 2016 07:03
Ok, I've gotten the first subarray to push to another one
function largestOfFour(arr) {
  // You can do this!
var x = 0;
  var numbers = []; //need to find a way to push the result into this array

  for (var i = 0; i < arr.length; i++) {
   for (var j = 0; j < arr[i].length; j++) {
   if (arr[i][j] > x){
     x = arr[i][j];

   }
   }
 numbers.push(x);
 return numbers;
}

}
largestOfFour([[4, 5, 1, 7], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
console shows [7]
Matt Burd
@EskimoBurd
Feb 10 2016 07:04

https://gyazo.com/556e6ecb6297616b00d801874c9d27f8

very close here help woudl be appreciated.

Brian
@sludge256
Feb 10 2016 07:05
@EskimoBurd If you look under your h2 there's already an anchor element
that's the one you should be modifying, instead of creating a new one
bitgrower
@bitgrower
Feb 10 2016 07:05
@kmulligan -- you still need to find the largest of EACH subarray ...
Kevin Mulligan
@kmulligan
Feb 10 2016 07:05
@bitgrowth Yea I know I'm just trying to work it out in my brain
Try to write something that I can understand how it works in phase 1 if that makes sense
Matt Burd
@EskimoBurd
Feb 10 2016 07:06
@sludge256 i deleted the one i added right by the text i added, and its taking away what I need to complete the task
bitgrower
@bitgrower
Feb 10 2016 07:06
sometime paper and pencil help ... follow the loop and think about what's happening ...
Brian
@sludge256
Feb 10 2016 07:07
@EskimoBurd Well your code as is has no space after View more
It would look like View more(space here)
Youtheart
@Youtheart
Feb 10 2016 07:10
@sludge256 Thank you
CamperBot
@camperbot
Feb 10 2016 07:10
youtheart sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1385 | @sludge256 | http://www.freecodecamp.com/sludge256
Kevin Mulligan
@kmulligan
Feb 10 2016 07:11
@bitgrower @qualitymanifest Thanks for the help... should have been in bed an hour ago, signing off for now
CamperBot
@camperbot
Feb 10 2016 07:11
kmulligan sends brownie points to @bitgrower and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 938 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 431 | @bitgrower | http://www.freecodecamp.com/bitgrower
Matt Burd
@EskimoBurd
Feb 10 2016 07:12
@sludge256 I tried to type that in as you put sludge, still missing what I need really.
bitgrower
@bitgrower
Feb 10 2016 07:12
understanding how to address each element in the array is a good thing to sleep on @kmulligan
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:13
hi
how to replace href attribute to a #
??
Brian
@sludge256
Feb 10 2016 07:15
@WalaBenGharbia
<a href="replacethisurl.com"></a>
@EskimoBurd this is what the code looks like without any changes
<h2 class="red-text">CatPhotoApp</h2>

<a href="http://www.freecatphotoapp.com">cat photos</a>

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

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Matt Burd
@EskimoBurd
Feb 10 2016 07:16
yes
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:16
thanks
Brian
@sludge256
Feb 10 2016 07:18
I've marked the only line you need to modify
<h2 class="red-text">CatPhotoApp</h2>

<!-- this line --><a href="http://www.freecatphotoapp.com">cat photos</a>

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

<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>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Matt Burd
@EskimoBurd
Feb 10 2016 07:19
yes that is the line that needs to be anchored, and I can almost get it, i just cant figure out how to achieve the "view more" requirement
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:19
@sludge256 it doesn't work with me
Brian
@sludge256
Feb 10 2016 07:20
@WalaBenGharbia Post your code
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:20
<p>Click here for <a herf="http://www.freecatphotoapp.com">cat photos</a>.</p>
Umut Yalçın
@yalcinumut
Feb 10 2016 07:21
Not herf mate href
Brian
@sludge256
Feb 10 2016 07:21
@EskimoBurd spot the difference?
<p>View more <random stuff>cat photos</p>
<p>View more<random stuff>cat photos</p>
Matt Burd
@EskimoBurd
Feb 10 2016 07:21
the space after view more? i had view more after it ill adjust see if it helps
Brian
@sludge256
Feb 10 2016 07:22
@WalaBenGharbia You did say you wanted to replace the attribute with # also.
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:22
it doesn't work to @Apekiox
yes
Kevin Mulligan
@kmulligan
Feb 10 2016 07:22
Wow @bitgrower @qualitymanifest I just got it... the reset hint helped, I thought I had it, but realized having X = 0 as global (I think that's what it is called) wouldn't reset every time I did the loop
So moving it inside the first for loop allowed it to reset everytime the loop reset
Lessons learned:
  1. accessing elements in subarrays
  2. clean code that is neatly nested so you can see where everything "kicks in" as it were, really helps
Matt Burd
@EskimoBurd
Feb 10 2016 07:24

https://gyazo.com/605d03a584f1402af03ca44356a71191

I know something is wrong with my <p>'s but if i try to adjust i end up losing requirements to complete.

Umut Yalçın
@yalcinumut
Feb 10 2016 07:24
@WalaBenGharbia whats the challange name?
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:24
Make Dead Links using the Hash Symbol
Kevin Mulligan
@kmulligan
Feb 10 2016 07:24
I can finally sleep :sparkles:
function largestOfFour(arr) {
  // You can do this!

var numbers = []; //need to find a way to push the result into this array

  for (var i = 0; i < arr.length; i++) {
    var x = 0;
   for (var j = 0; j < arr[i].length; j++) {
   if (arr[i][j] > x){
     x = arr[i][j];
   }
   }
  numbers.push(x);


}

return numbers;
}
largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Umut Yalçın
@yalcinumut
Feb 10 2016 07:25
change <a href="#" ...
Brian
@sludge256
Feb 10 2016 07:25
@EskimoBurd Press the reset button. You're doing extra stuff that isn't necessary and causing confusion for yourself.
Umut Yalçın
@yalcinumut
Feb 10 2016 07:25
like this its solves :)
Matt Burd
@EskimoBurd
Feb 10 2016 07:25
@sludge256 ok done
Brian
@sludge256
Feb 10 2016 07:26
@EskimoBurd
Now modify the line that has the anchor element
there's no need to create a new one
bitgrower
@bitgrower
Feb 10 2016 07:26
awesome sauce, @kmulligan -- happy coding !!!
WalaBenGharbia
@WalaBenGharbia
Feb 10 2016 07:26
thanks :) @Apekiox
CamperBot
@camperbot
Feb 10 2016 07:26
walabengharbia sends brownie points to @apekiox :sparkles: :thumbsup: :sparkles:
:star: 120 | @apekiox | http://www.freecodecamp.com/apekiox
DJ
@qualitymanifest
Feb 10 2016 07:26
@kmulligan :+1: happy sleeps
Matt Burd
@EskimoBurd
Feb 10 2016 07:27
got it ty
@sludge256 big help ty ty, ive bene really getting back into this last few days, and im coming to find its not that that hard (i am in the beginner stuff) but its just about being calm and making it simple and thinking it through.
Brian
@sludge256
Feb 10 2016 07:28
You'll get better with more practice
Soon you'll think back on these moments and shake your head :P
bitgrower
@bitgrower
Feb 10 2016 07:28
yep ... you got that one right, @EskimoBurd -- there are some shortcuts ... but shortcuts are best used AFTER you get your code working ... :)
Brian
@sludge256
Feb 10 2016 07:29
Another skill you'll pick up is interpreting instructions
and being able to modify how you interpreted it if you find out something isn't as expected.
Matt Burd
@EskimoBurd
Feb 10 2016 07:30
yea thats what i did really, i just was calm and read through them, granted might have been easier to see the mistake given that as i was working on it for 10 mins
bitgrower
@bitgrower
Feb 10 2016 07:30
hahahahaha too true, @sludge256
another thing I would recommend is TAKE NOTES ...
Matt Burd
@EskimoBurd
Feb 10 2016 07:33
i have a notebook i write the key pooints of lessoons in :)
bitgrower
@bitgrower
Feb 10 2016 07:33
sure, comment your code -- but also TAKE NOTES ... keep a notebook, use something like EVERNOTE or mindmaps ...
awesome -- you'll appreciate that ...
it will be very helpful to you in the future ... I wish we could tag the various lessons ...
Brian
@sludge256
Feb 10 2016 07:35
While it's a nice idea
I don't really see it being widely utilized
(depending on how it's implemented/or shown to the user)
bitgrower
@bitgrower
Feb 10 2016 07:36
probably true -- but then I think the challenge instructions are WAY underutilized ... so, whaddya gonna do ... ?
Brian
@sludge256
Feb 10 2016 07:37
Along with all the online documentation people can also refer to our wiki also
bitgrower
@bitgrower
Feb 10 2016 07:37
when I think of how many people have problems just using the format instructions ... LOL ...
Matt Burd
@EskimoBurd
Feb 10 2016 07:38
yea ive fouind i can google literally the lesson haha
but i try to talka dn learn first
Brian
@sludge256
Feb 10 2016 07:38
Pft who needs to read the instructions anyways? I'll just make a bug report and let the team deal with my code being wrong.
bitgrower
@bitgrower
Feb 10 2016 07:38
LOL ...
DJ
@qualitymanifest
Feb 10 2016 07:38
'''
CamperBot
@camperbot
Feb 10 2016 07:38
:bulb: to format code use backticks! ``` more info
Brian
@sludge256
Feb 10 2016 07:38
and I just got a PM regarding code
Big Brother is listening
DJ
@qualitymanifest
Feb 10 2016 07:39
,,,
bitgrower
@bitgrower
Feb 10 2016 07:40
I sometimes think we should preface the format instructions with "This is a small test in how well you can follow instructions....why is this important? Because you have to give a computer instructions ... So, your ability to solve this may well portend your future success as a programmer..."
or some nonsense like that ... probably less than optimally worded ...
DJ
@qualitymanifest
Feb 10 2016 07:42
besides working 11 hours, i learned something today. portend
bitgrower
@bitgrower
Feb 10 2016 07:42
LOL ...
Matt Burd
@EskimoBurd
Feb 10 2016 07:42

https://gyazo.com/af3fd117605669e101d61738fe4adee4

now to me my A element already is # properly

DJ
@qualitymanifest
Feb 10 2016 07:43
@EskimoBurd you also have an empty <a> element wrapping the image that should be wrapped in your <a href="#"> element
bitgrower
@bitgrower
Feb 10 2016 07:45
well ... night all ... it's been fun ... see ya again real soon now, I expect ... :)
Matt Burd
@EskimoBurd
Feb 10 2016 07:45
i messed it both of the a elements and neither semeed to work
gnight @bitgrower
DJ
@qualitymanifest
Feb 10 2016 07:45
@bitgrower :wave:
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:46
@EskimoBurd after your <a> element, there is no closing <p> element
Steven Parker
@Philosophist
Feb 10 2016 07:46
http://codepen.io/Philosophist/pen/ZQvJym
Hi room! My placeMarker function doesn't seem to be changing the value of my object MM when the new game button is pressed. Are objects not supposed to be changeable?
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:47
@EskimoBurd also your <a> element that your <img> is nesting in, doesn't have href="#"
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:47
Inside the same <style> tag that contains your red-text class, create an entry for p elements and set the font-size to 16 pixels (16px).
please help
Matt Burd
@EskimoBurd
Feb 10 2016 07:48
@Qoyyuum ok one sec lemme try something
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:48
@AllrightConcepts You need to declare p { } and add the font-size: 16px to it
kirbyedy
@kirbyedy
Feb 10 2016 07:48
@AllrightConcepts create a P element and style it
Matt Burd
@EskimoBurd
Feb 10 2016 07:48
i assume it needs to be together in the <img> area
the href should be there
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:49
I have done that
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:49
@EskimoBurd the href needs to go along with the <a> because its an attribute for the anchor tag
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:49
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
This is the problem now
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:50
@AllrightConcepts Maybe you missed a semi-colon after your font-size property?
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:50
ok
its there
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:51
@AllrightConcepts Show us your code. Maybe you're missing something
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:51
ok

<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>

<p class="red-text""font-size:16px"> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
</p>

Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:53
@AllrightConcepts your second paragraph doesn't need the class. Remove it.
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:53
I done that
Thomas Noe
@t3h2mas
Feb 10 2016 07:53
<p class="red-text""font-size:16px"> isn't valid
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:54
but still not accepting
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:54
Remove the class in the second paragraph.
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:54
All the class
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:54
yes
Thomas Noe
@t3h2mas
Feb 10 2016 07:54
as well as the style which wouldn't go in a class attribute.
Matt Burd
@EskimoBurd
Feb 10 2016 07:54

https://gyazo.com/b2e12de7ed99a5433b6195a701c2aff0

restarted fromt he beginning, followed the instructions from the start, but still having trouble

Thierry
@tcharlem
Feb 10 2016 07:54
What are you trying to do exactly?
Balogun Mansuur Adewale
@AllrightConcepts
Feb 10 2016 07:55
Wao tanks
I got it
@Qoyyuum , thanks
CamperBot
@camperbot
Feb 10 2016 07:55
allrightconcepts sends brownie points to @qoyyuum :sparkles: :thumbsup: :sparkles:
:star: 48 | @qoyyuum | http://www.freecodecamp.com/qoyyuum
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 07:56
@EskimoBurd At line 32, your <a> doesn't have an href
@AllrightConcepts no problem. Happy to help :smile_cat:
Matt Burd
@EskimoBurd
Feb 10 2016 07:57
@Qoyyuum ok that makes sense lemme sees
got it lol randomly sort of, i dont like it when i dont fully 100% grasp it but made sense.
Thomas Noe
@t3h2mas
Feb 10 2016 07:59
what's a link w/o a target?
Matt Burd
@EskimoBurd
Feb 10 2016 07:59
ty everyone bed time now gnight and ty again.
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:02
@t3h2mas a link not connected to anything anywhere
@EskimoBurd Good night!
Thomas Noe
@t3h2mas
Feb 10 2016 08:03
I'd still default to href="#"
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:05
@t3h2mas true but this about the lesson that needs it.
Adam Snetiker
@ajsnetiker
Feb 10 2016 08:26
@t3h2mas a target can also mean where you want the link to open. For example, to have the linked site or conten open it in a new window, you would add target="_blank" to your <a> tag after the href="URL"
Maxim Dudich
@MDudich
Feb 10 2016 08:27
Hello! I'm new here, what should i start from?
Thomas Noe
@t3h2mas
Feb 10 2016 08:27
Sure. I was asking for @EskimoBurd to get him thinking.
Adam Snetiker
@ajsnetiker
Feb 10 2016 08:27
@MDudich the very beginning of you don't know a thing. Click on map and start going through waypoints.
@t3h2mas ah ok
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:28
@ajsnetiker I heard that target="_blank" or _parent or otherwise has become deprecated. Is this true?
Maxim Dudich
@MDudich
Feb 10 2016 08:28
@ajsnetiker Thnx
CamperBot
@camperbot
Feb 10 2016 08:28
mdudich sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 291 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
budimanfix
@budimanfix
Feb 10 2016 08:43
guys.. what wrong wit my code here ?? : var secondTree = myPlants.flowers.list["trees"];
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:44

@budimanfix it's

myPlants.trees.list[i];

Where i is a numbered array.

budimanfix
@budimanfix
Feb 10 2016 08:50
@Qoyyuum Thank you :+1:
CamperBot
@camperbot
Feb 10 2016 08:50
budimanfix sends brownie points to @qoyyuum :sparkles: :thumbsup: :sparkles:
:star: 66 | @qoyyuum | http://www.freecodecamp.com/qoyyuum
Pranav Doshi
@pranavdoshi
Feb 10 2016 08:51
wassup guys after long time coming back
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:51
Welcome back @pranavdoshi
Blauelf
@Blauelf
Feb 10 2016 08:52
@budimanfix myPlants is an array and has no property "flowers", or "trees". Its second element (index 1) happens to have a property "type" with value "trees".
DJ Runas
@djrunas
Feb 10 2016 08:53
^^
As @Blauelf , you want to access the index with type trees in it first
budimanfix
@budimanfix
Feb 10 2016 08:56
@Blauelf Thank you :+1:
CamperBot
@camperbot
Feb 10 2016 08:56
budimanfix sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 1162 | @blauelf | http://www.freecodecamp.com/blauelf
Pranav Doshi
@pranavdoshi
Feb 10 2016 08:57
@Blauelf wat u want to do
?
Blauelf
@Blauelf
Feb 10 2016 08:58
?
Pranav Doshi
@pranavdoshi
Feb 10 2016 08:58
myplants array ??
Abdul Qoyyuum
@Qoyyuum
Feb 10 2016 08:59
@Blauelf was just helping out @budimanfix for his problem. @pranavdoshi
Pranav Doshi
@pranavdoshi
Feb 10 2016 09:00
ohh no worries
;)
Adam Snetiker
@ajsnetiker
Feb 10 2016 09:01
@Qoyyuum news to me, I don't know I still use target="_blank" on almost every link lol
Except navigation, but I use it on all external stuff
Pranav Doshi
@pranavdoshi
Feb 10 2016 09:02
if u want that link to open in new tab then use it
anthonygallina1
@anthonygallina1
Feb 10 2016 09:20
@ajsnetiker good habit I think Dont want to direct some one away from the original site.
@ajsnetiker page flow to away from my site :)
Alex Tsiras
@arialblack14
Feb 10 2016 09:26

@arialblack14
Hello people, I am trying the "Validate telephone numbers" and can't see why this does not work

function telephoneCheck(str) {
  regex = /^(1)?(\s)?(\d{3}|(\d{3}))[-\s]?\d{3}[-\s]?\d{4}$/;
  return str.match(regex) ? true : false;
}

any ideas?
Does not catch 3 cases

SefaB
@SefaB
Feb 10 2016 09:27
Hey, how can i complete Convert Celsius to Fahrenheit part in .js ? im stuck :(
cannelflow
@cannelflow
Feb 10 2016 09:28
@SefaB tried anything ?
SefaB
@SefaB
Feb 10 2016 09:29
yes, i created a var
Alex Tsiras
@arialblack14
Feb 10 2016 09:29
Nevermind i got it
cannelflow
@cannelflow
Feb 10 2016 09:29
@SefaB var f = c*(9/5)+32;
SefaB
@SefaB
Feb 10 2016 09:30
ohh , i got it, thanks @cannelflow
CamperBot
@camperbot
Feb 10 2016 09:30
sefab sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 765 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Feb 10 2016 09:31
@SefaB :+1:
SefaB
@SefaB
Feb 10 2016 09:31
thanks @camperbot i did it :)
CamperBot
@camperbot
Feb 10 2016 09:31
sefab sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 1152 | @camperbot | http://www.freecodecamp.com/camperbot
anthonygallina1
@anthonygallina1
Feb 10 2016 09:42
@cannelflow Hi
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:44
hi all
anybody can help me ?

<script>
$(document).ready(function() {
$("button").addclass("animated bounce");
$(".btn").addclass("animate shake");
$("#target1").addclass("btn-primary");
});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

this is my code for "Target the same element with multiple jQuery Selectors"
but I am not getting the correct results..
please guide me
cannelflow
@cannelflow
Feb 10 2016 09:46
@anthonygallina1 hello
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:47
@abisz ya its working now but shows an error "Only add one class with each of your three selectors."
cannelflow
@cannelflow
Feb 10 2016 09:47

@BASKARANVINOTH instruction is Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

you had class like animated bounce animated shake there
Simon Reinsperger
@abisz
Feb 10 2016 09:48
@BASKARANVINOTH can you post the code snippet again?
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:48

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

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

@abisz got it.. perfect now
cannelflow
@cannelflow
Feb 10 2016 09:49
$(document).ready(function() {
$("button").addClass("animated bounce");<--------Add the animated class to all elements with type button.
$(".btn").addClass("animated shake");<-----Add the shake class to all the buttons with class .btn.
$("#target1").addClass("btn-primary");
});
@BASKARANVINOTH
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:49
thank u very much
Simon Reinsperger
@abisz
Feb 10 2016 09:50
@BASKARANVINOTH no problem :)
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:50
@cannelflow thank u now got it :-)
CamperBot
@camperbot
Feb 10 2016 09:50
baskaranvinoth sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 766 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Feb 10 2016 09:50
@BASKARANVINOTH :+1:
B VINOTH
@BASKARANVINOTH
Feb 10 2016 09:50
@abisz thank u now got it
CamperBot
@camperbot
Feb 10 2016 09:50
baskaranvinoth sends brownie points to @abisz :sparkles: :thumbsup: :sparkles:
:star: 264 | @abisz | http://www.freecodecamp.com/abisz
Nicholas
@nick88p
Feb 10 2016 10:40

Hi Guys. Can someone tell me why my below program doesn't work unless I pass arguments when calling the below function in onClick? - I initially did not use any arguments or parameters and assumed my program would work, because I thought that document.getElementById would access the relevant HTML id regardless. I am really puzzled by that. Any help would be much appreciated.

html:

<body>
   Enter text to copy:
   <input type="text" id="toCopy">
   <input type="button" id="buttony" value="copy text" onClick="copyMach('toCopy','parent');">

js:

function copyMach (toCopy,parent) {
 var textToCopy = document.getElementById(toCopy).value;
var newPara = document.createElement('p');
var newText = document.createTextNode(textToCopy);
newPara.appendChild(newText);
var parentPara = document.getElementById(parent);
parentPara.appendChild(newPara);
}
obviously I have the html part embedded in the form elements. For some reason this does not appear on the code above.
Maulik Darji
@maulikdarji
Feb 10 2016 10:49
@nick88p Use of quotes while targetting elements by id should work.
Like: document.getElementById('toCopy').value;
greg
@wearenotgroot
Feb 10 2016 10:54
@nick88p or you could have done this
function clickHandler(e) {
    var target = e.target;
}
@nick88p if those two input are sibling you can get the parent or go up the chain
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 10:57
@nick88p your js code loading after page loaded ? Add 'defer' in script get.
Blauelf
@Blauelf
Feb 10 2016 11:01
"defer" is nothing one currently wants to rely on. There are other ways (placing your script at the bottom of the page, using jQuery, ...)
Vlad Zamfirescu
@vzamfirescu
Feb 10 2016 11:09
Hey, guys! I have one quick question - for the ziplines I saw that it is mentioned that we are free to use any available library out there. However, is it ok to use a more complex template that I then fully customized and adapt to my portfolio? Thanks a bunch!
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 11:34
@Blauelf @nick88p was using only JS. I think he does not want to use Jquery.
@vzamfirescu you can get the will. I did a simple layout.
Nicholas
@nick88p
Feb 10 2016 11:43
@massilva @Blauelf Thanks for your answer.
CamperBot
@camperbot
Feb 10 2016 11:43
nick88p sends brownie points to @massilva and @blauelf :sparkles: :thumbsup: :sparkles:
:star: 1166 | @blauelf | http://www.freecodecamp.com/blauelf
Nicholas
@nick88p
Feb 10 2016 11:44
I am not sure if that solves my problem though. I was under the impression that the function would not execute until I hit the html button.
CamperBot
@camperbot
Feb 10 2016 11:44
:star: 286 | @massilva | http://www.freecodecamp.com/massilva
Nicholas
@nick88p
Feb 10 2016 11:45
I don't understand why the code doesn't work without arguments/paraments.
Does anyone else have any suggestions_
Nicholas
@nick88p
Feb 10 2016 11:51

Here's my code again in case:
html:

   <form>
   Enter text to copy:
   <input type="text" id="toCopy">
   <input type="button" id="buttony" value="copy text" onClick="copyMach();">
  </form>
  <p id="parent"></p>

js:

function copyMach (toCopy,parent) {
 var textToCopy = document.getElementById(toCopy).value;
var newPara = document.createElement('p');
var newText = document.createTextNode(textToCopy);
newPara.appendChild(newText);
var parentPara = document.getElementById(parent);
parentPara.appendChild(newPara);
}
SefaB
@SefaB
Feb 10 2016 11:55
How can i use "/t" escape sequences with js ? anyone has a example for it ?
Alexander Køpke
@alexanderkopke
Feb 10 2016 11:58
it's \t but no, I can't say I've ever seen an example. I've never used escape I just change between " and ' but come to think of it escape would be easier to manage.
SefaB
@SefaB
Feb 10 2016 12:01
thanks for advice @alexanderkopke
CamperBot
@camperbot
Feb 10 2016 12:01
sefab sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 467 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Feb 10 2016 12:01
@SefaB \t would escape tab. Is that what your question was about ?
SefaB
@SefaB
Feb 10 2016 12:02
yes it was
Alexander Køpke
@alexanderkopke
Feb 10 2016 12:02
ok
then I didn't really answer your question. 8/
SefaB
@SefaB
Feb 10 2016 12:03
thanks for effort
Youtheart
@Youtheart
Feb 10 2016 12:10
@nick88p Trying to understand the premise of your question: "why the code doesn't work without arguments/paraments."
^ The code doesn't appear to work at all. Right?
With or without arguments
Chad Kreutzer
@ChadKreutzer
Feb 10 2016 12:15
Can someone take a look at my Sum All Numbers code to see how I can make it more elegant? I feel like I should be able to make it more functional.
function sumAll(arr) {
  return arr.sort(function(a, b){
    return a-b;
  }).reduce(function(prev, curr){
    var next = prev;
    while (next < curr){
      next++;
      prev += next;
    }
    return prev;
  });
}
Nicholas
@nick88p
Feb 10 2016 12:23
@Youtheart It works the way I showed you, i.e. with the args and parems
but not if I don't add them an just call the function(); without
And that is not logical to me, as I assumed that document.getElement ... would get the html info regardless.
Youtheart
@Youtheart
Feb 10 2016 12:26
I'm getting console errors on any rendition of your code.
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:34
@nick88p you can to use copyMach without paramas if you to change toCopy and parent to element id . But the function will add in the some element.
@ChadKreutzer arr is a one-dimensional array?
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:38
Hi this is going to be probably be an obvious answer once someone helps me but I cant for the life of me figure it out
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:38
@ChadKreutzer you don't need sort array because 1+2+3 = 3+1+2.
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:38

I'm trying to complete the following task: Here's how you would give the third element in each well the bounce class:

$(".target:nth-child(3)").addClass("animated bounce");

Make the second child in each of your well elements bounce. You must target the children of element with the target class.

But I can't seem to get the code right
I've entered $(".target:nth-child(3)").addClass("animated bounce"); in my script
and assuming that I need to specify the target
Err that should read: $(".target:nth-child(2)").addClass("animated bounce"); (since I want the second child to bounce)
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:40
@ChadKreutzer you reduce function is doing multiplication.
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:41
But I can't seem to pin down the target
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:41
@ClaireMansfield send your complete code
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:42

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "orange");
$(".target:nth-child(2)").addClass("animatedbounce");

});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

greg
@wearenotgroot
Feb 10 2016 12:43
@ClaireMansfield put space
CodeMustang
@CodeMustang
Feb 10 2016 12:43
@ClaireMansfield animatedbounce should have space between words
greg
@wearenotgroot
Feb 10 2016 12:43
@ClaireMansfield between animated and bounce
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:43
@ClaireMansfield $(".target:nth-child(2)").addClass("animated bounce");
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:43
oh good grief, thank you!
that not clear from the instruction window and I'm new to the commands
I knew it was something silly! Much appreciated.
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:44
@ClaireMansfield worked?
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:45
yes thank you! I had tried underscore but am such a newbie the space escaped me!
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:45
:smile:
Blauelf
@Blauelf
Feb 10 2016 12:45
@ChadKreutzer That way, you don't really need reduce, as you have exactly one iteration. I think what they intended when recommending reduce was to have an array with numbers of min to max (lower and greater number, respectively), and then using reduce to sum those up. Not sure why someone would do that, as they could add in the loop where they would populate that array.
There is also a solution without iterating, as the solution is the same as (min+max)*(max-min+1)/2
Thomas Tzanetoulakos
@tommasgr
Feb 10 2016 12:49
Good morning everyone!!!Guys i have prb here!"Create a Class to Target with jQuery Selectors" and this is what i have to do."Give each of your button elements the class target."
Marcos Antônio de Souza Silva
@massilva
Feb 10 2016 12:49
@ChadKreutzer if you to think in complexity one for is good solution. Because for to calculate the min and max have complexity O(nlog (n))
Thomas Tzanetoulakos
@tommasgr
Feb 10 2016 12:50
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<div class="well">
<button class="btn btn-default"></button>
<button class="btn btn-default"></button>
<button class="btn btn-default"></button>
</div>
</div>
<div class="col-xs-6">
<div class="well">
<button class="btn btn-default"></button>
<button class="btn btn-default"></button>
<button class="btn btn-default"></button>
</div>
</div>
</div>
</div>
CodeMustang
@CodeMustang
Feb 10 2016 12:51
@tommasgr <button class="btn btn-default target"></button>
For each of the buttons.
Jordan Miguel
@jordan-miguel
Feb 10 2016 12:52
quick question. Do you guys do side projects whilst going through freecodecamp in order to have a better understanding of what you are learning?
Thomas Tzanetoulakos
@tommasgr
Feb 10 2016 12:53
@CodeMustang didnt work mate
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:54

@tommasgr you want ti to look like this: <button class="btn btn-default target"></button>

<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6">
<div class="well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>

Thomas Tzanetoulakos
@tommasgr
Feb 10 2016 12:55
@ClaireMansfield Thank you
CamperBot
@camperbot
Feb 10 2016 12:55
tommasgr sends brownie points to @clairemansfield :sparkles: :thumbsup: :sparkles:
:star: 128 | @clairemansfield | http://www.freecodecamp.com/clairemansfield
Thomas Tzanetoulakos
@tommasgr
Feb 10 2016 12:55
@CodeMustang Thank you!
CamperBot
@camperbot
Feb 10 2016 12:55
tommasgr sends brownie points to @codemustang :sparkles: :thumbsup: :sparkles:
Kai Schoos
@skusku
Feb 10 2016 12:55
o/
CamperBot
@camperbot
Feb 10 2016 12:55
:star: 217 | @codemustang | http://www.freecodecamp.com/codemustang
Zak
@zakriazubair
Feb 10 2016 12:56

Hi guys I need help in understanding boolean in programming, there is this simple code:
<script>
var response, finished;
finished = false;
alert("Dave is a nice name");
while (!finished) {
response = prompt("Do you agree?");
if (response.indexOf("y") == 0)
finished = true;
}
</script>
What does var finished = false mean? Isn't !finished (not finished) the same as true, as finished we defined as false? So why doesn't the program run when we write
while (finished = true)

I think I might not be clear about the role of boolean in programming and why we used it here

Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:57
thanks @massilva
CamperBot
@camperbot
Feb 10 2016 12:57
clairemansfield sends brownie points to @massilva :sparkles: :thumbsup: :sparkles:
greg
@wearenotgroot
Feb 10 2016 12:57
@zakriazubair it just an initial value
CamperBot
@camperbot
Feb 10 2016 12:57
:star: 287 | @massilva | http://www.freecodecamp.com/massilva
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:57
thanks @wearenotgroot
CamperBot
@camperbot
Feb 10 2016 12:57
clairemansfield sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 724 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
Claire Mansfield
@ClaireMansfield
Feb 10 2016 12:57
thanks @CodeMustang
CamperBot
@camperbot
Feb 10 2016 12:57
clairemansfield sends brownie points to @codemustang :sparkles: :thumbsup: :sparkles:
:star: 218 | @codemustang | http://www.freecodecamp.com/codemustang
Kai Schoos
@skusku
Feb 10 2016 12:57

I have a question, I've been googling for quite some time but I can't really get an answer. Are CSS filters functioning in Firefox? https://developer.mozilla.org/en-US/docs/Web/CSS/filter kinda says they are, however my firefox seems to die because of following code:

  var hueRotation = 'hue-rotate(' + val + 'deg)';
  $('body')
    .css('webkitFilter', hueRotation)
    .css('filter', hueRotation)
    .css('transition', '3s');

Any help is greatly appreciated !

greg
@wearenotgroot
Feb 10 2016 12:57
@zakriazubair initial value is false so the the while loop will keep asking until the user give the y response then the finished becomes true
@zakriazubair boolean values are either true or false / on or off
Zak
@zakriazubair
Feb 10 2016 12:59
@wearenotgroot why do we use !finished? doesnt that mean 'not finished', which would be true as we set finished to false
greg
@wearenotgroot
Feb 10 2016 12:59
@zakriazubair use ! will invert the value of finished meaning if the value false then it will be evaluate as true
@zakriazubair in short ! mean not----------> not finished----------->not finished = false-------------->finished = not true
Zak
@zakriazubair
Feb 10 2016 13:01
hmmm let me digest that..
greg
@wearenotgroot
Feb 10 2016 13:04
@zakriazubair
var response, finished;
finished = false; //<-------------------------initial value false
alert("Dave is a nice name");
while (!finished) { //<----------------------------------------! evaluate the opposite of the initial value meaning as long as the finished