These are chat archives for FreeCodeCamp/Help

13th
Mar 2018
Love Exists
@spiritloveroot_twitter
Mar 13 2018 00:56
hi, the website is broken for me.. it seems the bottom half of the website gets cut off and i can't move from lesson to lesson because there is no button to do so
can someone help?
also how do i submit a picture here to show?
si
@demon9181
Mar 13 2018 01:31
function smallestCommons(arr) {
  var x = true;
  var lcm = 0;
  var larger = 0;
  var smaller = 0;
  var range = [];
  if(arr[0] > arr[1]){
    larger = arr[0];
    smaller = arr[1];
  } else{
    larger = arr[1];
    smaller = arr[0];
  }
  for(x = 0;smaller <= larger;smaller++){
    range.push(smaller); 
  }

  while(x == true){
    lcm++;
    for(a = 0;a <= range.length - 1;a++){
      if(lcm % a !== 0 ){
        break;
      }
      else if(j == range.length -1)
      {
        x = false;
      }
    }
  }
return lcm;
}
smallestCommons([1,4]);
hi all any ideas why my code is not running the while loop i have here to get the lowest common multiple?
the first half of my code just gets the array( range) in order
this is the lowest common multiple algo challenge
Kyle Holm
@thekholm80
Mar 13 2018 01:39
@demon9181 it might be because you're reusing x here for(x = 0;smaller <= larger;smaller++){
so you're starting with x = true then reassigning it x = 0 then testing to see if it's still true while(x == true){
王凤翔
@ayfh
Mar 13 2018 01:47
How to satisfy your form element's background-color should be green.
Kyle Holm
@thekholm80
Mar 13 2018 01:57
@ayfh what have you tried?
Ken Haduch
@khaduch
Mar 13 2018 01:58

@ayfh - what you want to do is get a CSS property background-color: green; associated with your <form> element. There are several ways to do it - what are they asking for? You can use an inline style such as <form style="background-color: green">, or a style element with the "form" as as a selector:

<style>
 form {
    background-color: green;
}
</style>

Or create a class like "green-background" and put <form class="green-background"> and then a CSS selector:

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

You could also do it with an ID selector, similar to the class. It depends what method they are looking for in the lesson and the tests that verify your solution.

Kyle Holm
@thekholm80
Mar 13 2018 01:59
@khaduch :wave:
Ken Haduch
@khaduch
Mar 13 2018 02:00
@thekholm80 - hey there Kyle! :)
Alexander R Bott
@Abott1222
Mar 13 2018 06:41
the answer is 42
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 13 2018 06:42
:laughing:
Aleksandar Zdravkovski
@azdravkovski
Mar 13 2018 09:01
Hi guys. I'm trying to work out a RegEx that would match the following pattern: &A or &E or &EF or &EL. I'm stuck on getting it to match the L or F after the &E. Thanks for your help.
Jing
@1JioAcceleratorW1thNoBrake
Mar 13 2018 09:13
what does it mean:make sure ur 'a' element has a ending label
Claudio Restifo
@Marmiz
Mar 13 2018 09:24
probably you are missing the cloing tag?
*closing
Johnny
@JohnnyBizzel
Mar 13 2018 09:53
@azdravkovski what have you tried?
Yossi Fisch
@yoizfefisch
Mar 13 2018 11:18

I am on the ES6: Explore Differences Between the var and let Keywords lesson and it says:

Remember that since let prevents variables from being overridden, you will need to remove one of the declarations entirely.

But I don't find anything in the code that needs to be removed. Is that an issue to be reported?

Stephen James
@sjames1958gm
Mar 13 2018 11:23
@yoizfefisch Yeah, I don't see the same variable declared twice?
Daniel
@dkapexhiu
Mar 13 2018 11:25

someone good at php can tell me why this not work:

// get the 'id' value from the URL (if it exists), making sure that it is valid (checing that it is numeric/larger than 0)
    if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id'] > 0){
// query db
        $id = $_GET['id'];
        $sql = "SELECT * FROM njoftime WHERE id=$id";
        $result = $db->query($sql);
        $row = $result->fetch_assoc();
// check that the 'id' matches up with a row in the databse
        if($row){
// get data from db
            $emri = $row['emri'];
            $telefoni = $row['telefoni'];
            $email = $row['email'];
            $foto = $row['foto'];
            $njoftim = $row['njoftim'];

it throws error on query($sql)

Yossi Fisch
@yoizfefisch
Mar 13 2018 11:35
@sjames1958gm Exactly my point. Should I open a GitHub issue to remove that line?
Sandeep Chary
@dsandeepchary
Mar 13 2018 12:06
Any help on ceaser ciphers?
function rot13(str) { // LBH QVQ VG!
  var stringArray = str.split('');
  var asciiString = '';
  var charCodes = [];
  var returnStringArray = [];
  for(var i = 0; i < stringArray.length; i ++) {
    if(str[i] == ' ' || str[i] == '!' || str[i] == '?' || str[i] == '.') {
      charCodes.push(str[i]);
    } else {
    var charCode = str.charCodeAt(i) - 13;
    charCodes.push(charCode);
    }
  }
for(var j = 0; j < charCodes.length; j ++) {
  if(charCodes[j] == ' ' || charCodes[j] == '!' || charCodes[j] == '?' || charCodes[j] == '.') {
    returnStringArray.push(charCodes[j]);
  } else {
  returnStringArray.push(String.fromCharCode(charCodes[j]));
  }
}  
  return returnStringArray.join('');
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
The above code is returning numbers in some places.
Ken Haduch
@khaduch
Mar 13 2018 13:48
@dsandeepchary - it's been a while since you posted - have you gotten a solution? If not, the best way to approach this is to check for characters that have the character code in the range of "A" to "Z" inclusive, and only perform the modification on those, attempting to check for all other things that are non-letter characters is somewhat error prone.
Stephen James
@sjames1958gm
Mar 13 2018 14:02
@yoizfefisch Yes
Adam Snape
@inuhoo
Mar 13 2018 14:13

Hey guys, hopefully someone can shed some light on where I am going wrong on the [Intermediate Algorithm Scripting: Missing letters] (https://beta.freecodecamp.org/en/challenges/intermediate-algorithm-scripting/missing-letters) challenge. Although when logged to the console the code returns 'undefined' the last test of the challenge keeps failing - here's my code:-

var start; // var holds starting letter value
var missing; // var returns the first missing letter or stay undefined

function fearNotLetter(str) {
  // assigns the initial ASCII code
  start = str.charCodeAt(0);
  // splits the string and loops through a callback function
  str.split("").map(nextLetter);  

  // return the missing value or undefined if no value is assigned
  return missing;
  }

//call back function to test all the elements
var nextLetter = function(item, i, arr) {
  // check if current item matches the correct the ASCII value
  if (arr.join("").charCodeAt(i) != start) {
    missing = String.fromCharCode(start);
  } else {
    start++;
  }
};

I also have a working example on jsbin here - https://jsbin.com/dotokixuli/edit?js,console
Thanks in advance

Kyle Holm
@thekholm80
Mar 13 2018 14:23
@inuhoo what are you expecting it to return?
Adam Snape
@inuhoo
Mar 13 2018 14:26
Hi @thekholm80, when passed the last test fearNotLetter("abcdefghijklmnopqrstuvwxyz") it should return undefined and as far as I am aware it does, but it is getting failed on the challenge page.
Kyle Holm
@thekholm80
Mar 13 2018 14:27
it looks like your last test is returning "e" i wonder if this is because you're using global variables?
i'm not sure how the beta tests are run
Adam Snape
@inuhoo
Mar 13 2018 14:27
ahh ok I've got you, it's holding the value from the previous test.
Kyle Holm
@thekholm80
Mar 13 2018 14:28
yeah
i refactored so it's not using globals and it passes
function fearNotLetter(str) {
  var start;
  var missing;
  // assigns the initial ASCII code
  start = str.charCodeAt(0);
  // splits the string and loops through a callback function
  str.split("").map(function(item, i, arr) {
  // check if current item matches the correct the ASCII value
  if (arr.join("").charCodeAt(i) != start) {
    missing = String.fromCharCode(start);
  } else {
    start++;
  }
  });  

  // return the missing value or undefined if no value is assigned
  console.log(missing);
  return missing;
  }
Adam Snape
@inuhoo
Mar 13 2018 14:29
perfect, Thanks @thekholm80 , I don't know how I missed that!
CamperBot
@camperbot
Mar 13 2018 14:29
inuhoo sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1722 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Mar 13 2018 14:29
:+1:
Brinko7
@Brinko7
Mar 13 2018 14:39
Hi all, I mistakenly completed the survey form project on freecodecamp beta. I couldn't (and still can't) figure out how to do the Run Test on code pen, and tried to run the test by just submitting the link to the blank pen to see if it failed, but it marked it complete. Is there a way to reset this, or should I just re-submit when I actually complete it?
Kyle Holm
@thekholm80
Mar 13 2018 14:39
@Brinko7 you can resubmit and it will update
Brinko7
@Brinko7
Mar 13 2018 14:40
Also, if anyone can give me guidance on how to select the project on codepen and run test, it would be appreciated. Unless you have to have the paid subscription of code pen
Thanks kyle!
Kyle Holm
@thekholm80
Mar 13 2018 14:41
on codepen you should create a "Pen" not a "Project". you get unlimited(? or close to?) pens, but only one project for free
Brinko7
@Brinko7
Mar 13 2018 14:42
That makes sense. I was referring to the directions on codepen that seem to say I can run the tests for the Survey Form project from FreeCodeCamp.
INSTRUCTIONS:
  • Select the project you would
    like to complete from the dropdown
    menu.
  • Click the "RUN TESTS" button to
    run the tests against the blank
    pen.
  • Click the "TESTS" button to see
    the individual test cases.
    (should all be failing at first)
  • Start coding! As you fulfill each
    test case, you will see them go
    from red to green.
  • As you start to build out your
    project, when tests are failing,
    you should get helpful errors
    along the way!
Those are the instructions that I can't figure out
Kyle Holm
@thekholm80
Mar 13 2018 14:42
do you have a link to the fcc page for the project?
The above instructions are from this link: https://codepen.io/freeCodeCamp/pen/MJjpwO
Kyle Holm
@thekholm80
Mar 13 2018 14:44
okay
i just forked that pen, now i have my own copy on my codepen. if i were doing this project, i'd build my project inside this fork
Brinko7
@Brinko7
Mar 13 2018 14:45
I did that as well, I just couldn't figure out how to run the test
Kyle Holm
@thekholm80
Mar 13 2018 14:45
and as i worked on this project i'd select "Survey Form" from the drop down and click "Run Tests"
Danny Chan
@chandanny
Mar 13 2018 14:45
@Brinko7 i am doing beta freecodecamp too
Kyle Holm
@thekholm80
Mar 13 2018 14:45
then it will check my project to see if I've fulfilled the requirements
Brinko7
@Brinko7
Mar 13 2018 14:45
Where is the drop down? Maybe I am missing it
Kyle Holm
@thekholm80
Mar 13 2018 14:46
image.png
where it says "Select Test Suite"
image.png
Brinko7
@Brinko7
Mar 13 2018 14:47
Ahhhhhh, I don't have that on my end. Interesting.
Mine is just blank
Kyle Holm
@thekholm80
Mar 13 2018 14:47
strange
i'd start again by forking this pen
Brinko7
@Brinko7
Mar 13 2018 14:48
image.png
Still no dice :(
Kyle Holm
@thekholm80
Mar 13 2018 14:49
are there any errors on your console?
in chrome hit ctrl + shift + j
Brinko7
@Brinko7
Mar 13 2018 14:50
There were errors. I thinkyou've solved it. My work may be blocking it. Connecting to my hot spot to see if it fixes the issue.
Actually still getting errors
image.png
Kyle Holm
@thekholm80
Mar 13 2018 14:55
can you update the cdn link to https?
Settings => JavaScript, should be the first link
Brinko7
@Brinko7
Mar 13 2018 14:56
It's already https, so very strange that it's throwing that error out
Kyle Holm
@thekholm80
Mar 13 2018 14:56
hmm
Brinko7
@Brinko7
Mar 13 2018 14:57
I'm thinking it may be something to do with a policy on my work laptop. I'll give it another go later on my personal. Thanks for your help Kyle!
Kyle Holm
@thekholm80
Mar 13 2018 14:57
@Brinko7 sorry we couldn't get it figured out
Brinko7
@Brinko7
Mar 13 2018 14:58
No worries! Glad I found this community
Brinko7
@Brinko7
Mar 13 2018 15:16
Update: Tried to go to the link directly and it is blocked by my IT. Looks like I won't be working on my projects at lunch.
Kyle Holm
@thekholm80
Mar 13 2018 15:16
the obvious solution is to quit your job
:P
Brinko7
@Brinko7
Mar 13 2018 15:16
Haha I like the way you think
Ken Haduch
@khaduch
Mar 13 2018 15:19
@Brinko7 @thekholm80 - I just followed the instructions and ran through the tests, building the page sequentially to pass the tests. I like the way they have those lessons / exercises set up in the beta site. I ran it on Opera on windows, which is probably based on the same platform as Chrome, and it ran smoothly.
Kyle Holm
@thekholm80
Mar 13 2018 15:19
@khaduch i keep thinking i'll do the beta stuff but never get around to it
maybe when it becomes the 'stable' release
Ken Haduch
@khaduch
Mar 13 2018 15:20
@thekholm80 - I don't know how to go and restart everything in the beta? Have you seen information about doing that?
Kyle Holm
@thekholm80
Mar 13 2018 15:20
i haven't, sorry
Ken Haduch
@khaduch
Mar 13 2018 15:21
maybe the forum has a post about it - I'll go and check...
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:22
@khaduch Ser Ken :wave:
@thekholm80 Ser Kyle :wave:
Kyle Holm
@thekholm80
Mar 13 2018 15:22
@SweetCodingInc good morning
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:23
@thekholm80 It's almost 9pm.. Back to India
Kyle Holm
@thekholm80
Mar 13 2018 15:23
ah
what part of india?
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:23
btw, that code I shared for review last time?
I got job offer...
Kyle Holm
@thekholm80
Mar 13 2018 15:23
congrats!
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:23
so moving to either Berlin or Gdansk, Poland
thanks! :laughing:

what part of india?

Mumbai / Bombay

Kyle Holm
@thekholm80
Mar 13 2018 15:25
ah, you're by the ocean
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:25
Yo!
Bollywood lol
Kyle Holm
@thekholm80
Mar 13 2018 15:25
i'd love to visit india some day
Ken Haduch
@khaduch
Mar 13 2018 15:26
@SweetCodingInc :wave: :wave:
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:26
Come over before I get out
@khaduch :wave:
Kyle Holm
@thekholm80
Mar 13 2018 15:26
I'm too poor
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:26
lol
Kyle Holm
@thekholm80
Mar 13 2018 15:26
i'll just have to go to the local indian restaurant instead
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:27
American poor is still richer than indian middle class :laughing:
Kyle Holm
@thekholm80
Mar 13 2018 15:27
they make an amazing saag
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:27
Try what's called Palak Paneer if you like spinach
Kyle Holm
@thekholm80
Mar 13 2018 15:27
i do like spinach
omg i suck at typing today
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:28
hope you're not vegan
Kyle Holm
@thekholm80
Mar 13 2018 15:28
nooo
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:28
otherwise, you won't be eating paneer
Kyle Holm
@thekholm80
Mar 13 2018 15:28
animals taste good
especially baby animals
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:29
:laughing:
paneer aint meat though.. Its make of milk
Kyle Holm
@thekholm80
Mar 13 2018 15:29
i thought so, some kind of cheese
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:29
not cheese either
See, we're a complicated bunch of people :P
Kyle Holm
@thekholm80
Mar 13 2018 15:30
oh, you should update the wiki page then
Paneer (pronounced [pəniːr]) is a fresh cheese common in South Asia
Sweet Coding :)
@SweetCodingInc
Mar 13 2018 15:31
Oh! Cheese is a broad term
mostly misused these days
Cheese - a food made from the pressed curds of milk, firm and elastic or soft and semi-liquid in texture.
Darren
@DarrenfJ
Mar 13 2018 15:38
morning fCC
:wave: @thekholm80
Kyle Holm
@thekholm80
Mar 13 2018 15:38
@DarrenfJ hey!
Darren
@DarrenfJ
Mar 13 2018 15:38
what up brutha?
Kyle Holm
@thekholm80
Mar 13 2018 15:39
trying to decide what i want for breakfast: dayquil, orange juice or a nap
you?
Darren
@DarrenfJ
Mar 13 2018 15:39
i'm fighting a cold too.. dayquil sounds about right...
Ken Haduch
@khaduch
Mar 13 2018 15:39
@DarrenfJ - howdy! :wave:
Darren
@DarrenfJ
Mar 13 2018 15:39
but nyquil is dreamy
Kyle Holm
@thekholm80
Mar 13 2018 15:39
fortunately i seem to be on the downhill side of it
Darren
@DarrenfJ
Mar 13 2018 15:39
@khaduch hi buddy! :D
Ken Haduch
@khaduch
Mar 13 2018 15:40
@DarrenfJ - sorry to hear that you & Kyle are battling colds... seems to be a lot of lingering sicknesses this winter!
Darren
@DarrenfJ
Mar 13 2018 15:40
yah this winter has been the worst...
Kyle Holm
@thekholm80
Mar 13 2018 15:41
it always happens this time of year ... going from freezing to warm to freezing to warm temps really messes with me
Ken Haduch
@khaduch
Mar 13 2018 15:41
It's a tough time - then pollen and stuff starts up to add to the problems...
Kyle Holm
@thekholm80
Mar 13 2018 15:41
haha yeah
Darren
@DarrenfJ
Mar 13 2018 15:41
yah..bah! bah i say! ;)
Ene Catalin
@EneCatalin
Mar 13 2018 16:01
are functions with 8 parameters considered overkill ?
Kyle Holm
@thekholm80
Mar 13 2018 16:02
could you do it with 7?
Ene Catalin
@EneCatalin
Mar 13 2018 16:03
either 4 or 8
but 4 adds regex and array splitting
Kyle Holm
@thekholm80
Mar 13 2018 16:04
i'd take 8 args over regex any day
Ene Catalin
@EneCatalin
Mar 13 2018 16:04
1 line of regex
Kyle Holm
@thekholm80
Mar 13 2018 16:04
but that's just preference
Ene Catalin
@EneCatalin
Mar 13 2018 16:04
like a really short one
searches for a string like "bleah"
Manish Giri
@Manish-Giri
Mar 13 2018 16:04
regex is awesome
Ene Catalin
@EneCatalin
Mar 13 2018 16:04
regex is evil
"regular" expressions my ass, nobody uses them regularly
also that reads a lot like chinese
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:06
:wave: guys
Ene Catalin
@EneCatalin
Mar 13 2018 16:06
nvm, * is a placeholder
hi
Kyle Holm
@thekholm80
Mar 13 2018 16:06
i'm seeing most people on the google search i did split into 2 groups: use as many args as you need, and split into smaller functions for clarity
@kelechy :wave:
Manish Giri
@Manish-Giri
Mar 13 2018 16:07
@DarrenfJ @kelechy :wave:
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:07
@Manish-Giri hows it going?
Ene Catalin
@EneCatalin
Mar 13 2018 16:08
@thekholm80 so either seems accepted
Kyle Holm
@thekholm80
Mar 13 2018 16:08
i'd say do what makes the most sense for you
especially if you're not going to be code-reviewed by some senior dev
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:09
what are you working on? @thekholm80 and would beta fcc go live this year
Ene Catalin
@EneCatalin
Mar 13 2018 16:09
I guess I will try to split it first assuming I don't make a collosal fuck up since it's quite a bit more complicated this way
Manish Giri
@Manish-Giri
Mar 13 2018 16:09
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
  )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
  \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
  ?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
  \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
  31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
  ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
  (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:
  (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
  |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)
  ?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\
  r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[
   \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)
  ?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t]
  )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[
   \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*
  )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
  )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)
  *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+
  |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r
  \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:
  \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t
  ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031
  ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](
  ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?
  :(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?
  :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?
  :(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?
  [ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] 
  \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|
  \\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>
  @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"
  (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t]
  )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
  ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?
  :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[
  \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-
  \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(
  ?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;
  :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([
  ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\"
  .\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\
  ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\
  [\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\
  r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
  \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]
  |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0
  00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\
  .|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,
  ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?
  :[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?
Ene Catalin
@EneCatalin
Mar 13 2018 16:09
wtf
Manish Giri
@Manish-Giri
Mar 13 2018 16:09
how about that regex
Ene Catalin
@EneCatalin
Mar 13 2018 16:10
looks like lisp ?
Manish Giri
@Manish-Giri
Mar 13 2018 16:10
its truncated though, complete one here
Kyle Holm
@thekholm80
Mar 13 2018 16:10
@kelechy i'm not involved with beta, i have no idea what kind of schedule they're on
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:10
lol @thekholm80 i thought you were the admin
Manish Giri
@Manish-Giri
Mar 13 2018 16:11
lol
Kyle Holm
@thekholm80
Mar 13 2018 16:11
haha no
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:11
what pset are you on? @Manish-Giri
Manish Giri
@Manish-Giri
Mar 13 2018 16:12
um
i've been doing some java stuff recently, servlets, jdbc, that kind of stuff..will get to cs50 soon
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:13
nice
Manish Giri
@Manish-Giri
Mar 13 2018 16:13
which one are you on
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:16
last part of pset3, no time recently.. but I'm determined to get to the end :smile: @Manish-Giri
Manish Giri
@Manish-Giri
Mar 13 2018 16:16
:muscle:
Kelechi Chinaka
@ke1echi
Mar 13 2018 16:17
yea :muscle:
thanks @Manish-Giri
CamperBot
@camperbot
Mar 13 2018 16:17
kelechy sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6819 | @manish-giri |http://www.freecodecamp.org/manish-giri
Houshi Yu
@Fred-Yu
Mar 13 2018 18:15

<script>
$(document).ready(function() {
$("button").addClass("animated shake")
$(" .btn").addClass("animated shake")
$("#target1").addClass("btn-primary shake animated")
});
</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>

well,what's the mistake?
Kyle Holm
@thekholm80
Mar 13 2018 18:25
what are the instructions?
Stephen James
@sjames1958gm
Mar 13 2018 18:36
@Fred-Yu Only one class is added by each selector
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.
Ken Haduch
@khaduch
Mar 13 2018 18:36
@Fred-Yu - you want only one class in each of the .addClass method calls, per the instructions.
Kyle Holm
@thekholm80
Mar 13 2018 18:37
go team!
Kaz Baig
@kbaig
Mar 13 2018 18:46
:wave:
Ken Haduch
@khaduch
Mar 13 2018 18:48
@kbaig :wave:
oh, I see @sjames1958gm put the instructions there... so it is a team effort .... :)
Kyle Holm
@thekholm80
Mar 13 2018 18:53
@kbaig :wave:
Houshi Yu
@Fred-Yu
Mar 13 2018 18:53
Wow,Thanks!
Houshi Yu
@Fred-Yu
Mar 13 2018 18:59
<script>
$(document).ready(function() {
$("button").addClass("shake")
$(" .btn").addClass("shake")
$("#target1").addClass("shake")
$("#target1").addClass("animated")
$("#target1").addClass("btn-primary")
});
</script>
<script>
$(document).ready(function() {
$("button").addClass("shake")
$(" .btn").addClass("shake")
$("#target1").addClass("shake")
$("#target1").addClass("animated")
$("#target1").addClass("btn-primary")
});
</script>
<script>
$(document).ready(function() {
$("button").addClass("shake")
$(" .btn").addClass("shake")
$("#target1").addClass("shake")
$("#target1").addClass("animated")
$("#target1").addClass("btn-primary")
});
</script>
Already passed.Thanks
Ken Haduch
@khaduch
Mar 13 2018 19:09

@Fred-Yu - there is one thing that you don't need to do there - that is this:

$("#target1").addClass("shake")
$("#target1").addClass("animated")
$("#target1").addClass("btn-primary")

You do not need three different selectors for that ID - since the element with the ID of #target1 is a button, and has the class .btn, the individual selectors $("button") and $(".btn) will match that element, so the classes will be added to it with each of those more general selectors. Each of the selectors is a little more refined in what it is selecting. The general "button" selector will match any button element. The class ".btn" selector will match any element with that class, and finally the #target1 will only match the element with that ID value. And do you have three different <script> sections? There should really only be one, there only needs to be one.

Ken Haduch
@khaduch
Mar 13 2018 19:16
@Fred-Yu - to explain it another way, this: $("button").addClass("animated"); will add the class animated to all button elements, that includes the single button that has the target1 ID value (for which you use the selector #target1 to add the single class btn-primary later on. So it is unnecessary to add "animated" to that button again with an ID selector.
Aniculaesei
@Aniculaesei
Mar 13 2018 19:19

Hi guys!Can you please help me to resize a table for mobile device please?Thank you

https://codepen.io/Aniculaesei/pen/JLGEJX

Ken Haduch
@khaduch
Mar 13 2018 20:02
@Aniculaesei - what are you seeing now on your table on a mobile device? It is hard to view CodePen pages on a mobile device sometimes. It might be further complicated because you are not properly using CodePen to create your HTML code - the HTML panel should not have any of the <html>, <head>, <body>tags in it, only the code that is contained within the <body> and </body> tags. CodePen uses a template to generate the page, so this will result in a poorly formed HTML page. That could be one issue for viewing on mobile. But for your table - what are you seeing (perhaps you are looking at it on another platform other than Code Pen?) And what would you like it to be - the table format might not be the best for a responsive mobile view.
@Aniculaesei - my fork of your pen for experimentation - just some minor cleanup / reshuffling of code
Stephen James
@sjames1958gm
Mar 13 2018 20:14
@khaduch lol
Ken Haduch
@khaduch
Mar 13 2018 20:19
@Aniculaesei - here is an article that gives one potential solution for a responsive table - https://css-tricks.com/responsive-data-tables/ - maybe it's a good solution, although there seems to be a lot of discussion. Check the article there and all of the links that they point to... :)
Ken Haduch
@khaduch
Mar 13 2018 20:25
:dizzy_face: @sjames1958gm
Andrew
@MrAJGurney
Mar 13 2018 21:44
Unable to request a new password on freeCodeCamp's site, as I've forgotten it. I have the credentials saved with my browser so I can still log in on this machine, but whenever I try the "forgot my password" option I get a reset email, and when I enter a new password into the link I get "oops, something went wrong". Not sure what I'm doing wrong.
Kyle Holm
@thekholm80
Mar 13 2018 21:45
@MrAJGurney you might want to ask in https://gitter.im/FreeCodeCamp/Contributors this is where the people who work on the site hang out
Andrew
@MrAJGurney
Mar 13 2018 21:46
Cheers Kyle.
Francesca Davis
@fmd123
Mar 13 2018 23:48
I've come back after a few months of learning on other platforms and I can't find my progress. Is there any way to get it back or do I just have to redo it all?
Kyle Holm
@thekholm80
Mar 13 2018 23:49
@fmd123 https://www.freecodecamp.org/fmd123 you can view your progress here
Yossi Fisch
@yoizfefisch
Mar 13 2018 23:50
@sjames1958gm Done - freeCodeCamp/freeCodeCamp#16893