These are chat archives for FreeCodeCamp/Help

17th
Aug 2017
Margaret
@Margaret2
Aug 17 2017 00:00
@ahmedtarek2134 the CSS expert is here :laughing:
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:01
@Margaret2 ohhhh!!
u here too
actually I am coding some backend now hehe
Margaret
@Margaret2
Aug 17 2017 00:01
oh wow
node?
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:01
trying out mocha and chai tests too
yeah node
Albert Cardona II
@daddycardona
Aug 17 2017 00:01
Is there a ways I can l
Margaret
@Margaret2
Aug 17 2017 00:01
ah nice
i've done tutorials with mocha/chai, don't think i've ever written my own
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:02
I'm in love with node recently :smile:
I just started writing tests
tbh I write pointless tests but hey at least they check for something
Albert Cardona II
@daddycardona
Aug 17 2017 00:03
is there another way to do something without a loop for instance, I want to look into an array and say if num / bydivider ==1 but divider is an array?
Lance
@texas2010
Aug 17 2017 00:04
@Margaret2 yo. somoene need a help with vue.
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:04
@daddycardona why would you not want to use a loop?

Vue is :fire:

Lance
@texas2010
Aug 17 2017 00:04
@Margaret2 oh never mind.... sorry...
Margaret
@Margaret2
Aug 17 2017 00:04
huh what
Lance
@texas2010
Aug 17 2017 00:05
@Margaret2 look at main room. you will see who
Veronica Eulenberg
@HappyViki
Aug 17 2017 00:05
Margaret
@Margaret2
Aug 17 2017 00:05
oh
@daddycardona filter?
Albert Cardona II
@daddycardona
Aug 17 2017 00:06
I am doing the roman numeral thing and I can't seem to find the way to use a loop to make it write what I want it to write lol like 100 would be c but 36 is xxxvi lol
Gersho
@Gersho
Aug 17 2017 00:06
@daddycardona there's a lot of methods available for managing data in a array, you may want to look for "Array.prototype" to really have a complete list, otherwise pick any method like forEach, reduce, filter, etcetc
Margaret
@Margaret2
Aug 17 2017 00:06
:o i don't think i ever figured that one out :laughing: @daddycardona
Albert Cardona II
@daddycardona
Aug 17 2017 00:06
i can't seem to get that to work @ahmedtarek2134 that is why I hate this test lol
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:07

I haven't done most of the challenges hehehehe

Margaret
@Margaret2
Aug 17 2017 00:07
:p :p
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:07
link please and I'll try to figure it out
maybe
hope
Albert Cardona II
@daddycardona
Aug 17 2017 00:07
I will look into more array methods thanks Gersho :)
Gersho
@Gersho
Aug 17 2017 00:07
@daddycardona the trick with roman numeral, is that you can actually convert it directly from the decimal system for each digit separatly rather than as a whole
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:07
@HappyViki what?
Margaret
@Margaret2
Aug 17 2017 00:08
@Gersho :bulb:
Veronica Eulenberg
@HappyViki
Aug 17 2017 00:08
@ahmedtarek2134 you helped me a lot thanks again
CamperBot
@camperbot
Aug 17 2017 00:08
happyviki sends brownie points to @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:warning: happyviki already gave ahmedtarek2134 points
Albert Cardona II
@daddycardona
Aug 17 2017 00:08
I have this after deleting a lot of stuff
Gersho
@Gersho
Aug 17 2017 00:08
@daddycardona if you want a easy way to look up the documentation, try https://zealdocs.org
Veronica Eulenberg
@HappyViki
Aug 17 2017 00:08
@daddycardona what was the "what" for?
Gersho
@Gersho
Aug 17 2017 00:08
@Margaret2 was that sarcasm ? :3
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:09
@HappyViki u sent a link, is there another problem?
Albert Cardona II
@daddycardona
Aug 17 2017 00:09

$(function() {
    function convertToRoman(num) {
        var rN = ['M', 'CM', 'D', 'CD', 'C', 'XC',
            'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'
        ];
        var div = [1000, 900, 500, 400, 100, 90,
            50, 40, 10, 9, 5, 4, 1
        ];

        var nu = num;
        var x = 0;
        var y = 0;
        var collect = '';



        if (nu / div == 1) {
            x = nu / div[nu];
            collect = rN[nu];

            console.log('loggin collect :' + collect);

        }
        console.log('loggin collect outside :' + collect);
        return collect;
    }
    convertToRoman(100);
});
I originally had it in a loop so it was able to do the if statement lol
Margaret
@Margaret2
Aug 17 2017 00:09
no, i might actually be able to figure it out now haha @Gersho
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:09
@HappyViki my pleasure to help you hehe
Veronica Eulenberg
@HappyViki
Aug 17 2017 00:09
@ahmedtarek2134 woot = yay it works
Gersho
@Gersho
Aug 17 2017 00:09
@Margaret2 love css but not much into js ? ;p
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:10
@HappyViki ahaaaaa :smile:
Margaret
@Margaret2
Aug 17 2017 00:10
@Gersho no, i like js, just that one was too much work
:P
i like one-liners
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:11

I take my word back

Margaret
@Margaret2
Aug 17 2017 00:11
:joy:
Albert Cardona II
@daddycardona
Aug 17 2017 00:11
LOL
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:11
I don't know such a challenge name in my mind
you can take each digit separately and it works fine
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:12

Programming can't go back to the roman empire

Margaret
@Margaret2
Aug 17 2017 00:12
hahaha
Gersho
@Gersho
Aug 17 2017 00:13
well i play smartass on that one but for the fibonacci i had to google it to know what it meant :D
Margaret
@Margaret2
Aug 17 2017 00:13
i saw a book about ancient egyptian math, immediately wondered, "can i apply this to programming" :smirk:
that would be weird
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:13
anything egyptian is non human readable, even people
not**
Albert Cardona II
@daddycardona
Aug 17 2017 00:14
I understand that @Gersho just not how to implemented it in my code it is pissing me off
Gersho
@Gersho
Aug 17 2017 00:14
they were so hipster they used emoji before it was cool
Margaret
@Margaret2
Aug 17 2017 00:14
yass
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:14
yeeaahhh boiii we were always cool
Albert Cardona II
@daddycardona
Aug 17 2017 00:14
@ahmedtarek2134 lol
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:14

Egyptian hheeerrreee

we created emojis
Gersho
@Gersho
Aug 17 2017 00:14
@daddycardona as i recall you only have to handle values up to ~4000 or so ?
Albert Cardona II
@daddycardona
Aug 17 2017 00:15
yes but I am just trying to handle 100 very easy
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:15
I also heard we created algebra
Albert Cardona II
@daddycardona
Aug 17 2017 00:16
I did a for loop and if nu/div[i] ===1 and got my C
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:16
something I wish never happened
Albert Cardona II
@daddycardona
Aug 17 2017 00:16
dam you algebra lmao
Gersho
@Gersho
Aug 17 2017 00:16
well you take the 4 digit value (if it's less than 4 digits, thousands is 0, etc) cut it into 4 values (.split ?) and do your thing with each
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:16

math as a whole brother

Albert Cardona II
@daddycardona
Aug 17 2017 00:17
that I get but if my number.split is 3,6 then how do I make it 4 spaces?
Gersho
@Gersho
Aug 17 2017 00:17
gimme a min i'll try writing an exempe
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:20
guys a real quick question
is it too extra to create a whole file for just this?
const question = {
  type: 'input',
  name: 'keywords',
  message: 'Keywords: '
}

module.exports = question
it's more organized tho
this is node, this won't be on the browser
Albert Cardona II
@daddycardona
Aug 17 2017 00:21
I can't answer that lol
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:21
basically I have to create an array of questions
each question is an object
so I am splitting each question in a separate file
and the requiring them all together
but like this is seven lines total
idk really :smile:
Albert Cardona II
@daddycardona
Aug 17 2017 00:23
LOL
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:23
The test is bigger than the actual file :disappointed_relieved:
Gersho
@Gersho
Aug 17 2017 00:23
@daddycardona
  var numArr = num.toString().split("");
  var romArr=[];


 if (numArr.length<4){


   for (i=numArr.length; i<4; i++){
     numArr.unshift("0");
   }
 }
Albert Cardona II
@daddycardona
Aug 17 2017 00:24
dammit now I have to go understand unshift lol
Gersho
@Gersho
Aug 17 2017 00:24
it's like push
but instead of adding at the add it adds at the start
Margaret
@Margaret2
Aug 17 2017 00:25
ohh i'm so close :smile: almost got it
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:27

Margaret will probably finish it if she's that hyped...I know her

wait she solves everything, remembered
ohhhh, testing helped me for the first time ever
Gersho
@Gersho
Aug 17 2017 00:30
testing ?
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:30
yeah
mocha
unit testing
Albert Cardona II
@daddycardona
Aug 17 2017 00:30
so what does this do for me I don't understand but I think I do. The if statement is saying if the length of the array is less than 4 spaces for i = numArr this will get the lenght to 4 and shift the to the left 2 spaces 0036 if the number is 36 @Gersho
Margaret
@Margaret2
Aug 17 2017 00:31
@ahmedtarek2134 you're not wrong, just finished it :D
@Gersho ty
CamperBot
@camperbot
Aug 17 2017 00:31
margaret2 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @gersho |http://www.freecodecamp.com/gersho
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:32

Told u guys

Gersho
@Gersho
Aug 17 2017 00:32
yes, you can verify that by doing either console.log(numArr); or return numArr; (second method is for fcc challenge page, where you only see one line of return in the interface)
@daddycardona
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:33
@Margaret2 maaarrgaaarreettttttt
Albert Cardona II
@daddycardona
Aug 17 2017 00:33
Okay :)
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:33
did u use mocha and chai before ? @Margaret2
Margaret
@Margaret2
Aug 17 2017 00:34
@ahmedtarek2134 i told you, i've done tutorials, never done it for my own original project though
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:34
ohhh
29 tests for 8 files
idk if that's too much or too less?
Margaret
@Margaret2
Aug 17 2017 00:37
idk :confused:
i think the important thing is 100% coverage
Gersho
@Gersho
Aug 17 2017 00:37
https://codepen.io/Gersho/pen/jmZdzL
is there some way to alter an element's opacity while keeping the font fully opaque ? (try a search to see what i mean ) also i want some opinion on how it looks
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:37
@Margaret2 lemme tell u it does :joy:
a 5 line code has 4 tests
I check for every property
I am testing that the required properties are defined
Gersho
@Gersho
Aug 17 2017 00:38
are you testing the tests too ?
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 00:39
hmmm
i guess yes
cause if the mocha commands runs with an error
means the test files are written incorrectly hehehehehehe
Albert Cardona II
@daddycardona
Aug 17 2017 00:40
@gersho this is what I do for that div{background-color:rgba(0,0,0,0.5);}
Gersho
@Gersho
Aug 17 2017 00:42
rgb with it's lost sibling a ...of course !
i don't really get it, but it's more cool looking that way, thanks ! @daddycardona
CamperBot
@camperbot
Aug 17 2017 00:43
gersho sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 313 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Aug 17 2017 00:43
I just learned that like last month LOL I can't stop using it lol
Gersho
@Gersho
Aug 17 2017 00:44
i love css so much i'll probably have forgotten by tomorrow
but with that, i think my wikipedia viewer is done
Albert Cardona II
@daddycardona
Aug 17 2017 00:45
So I see what you did in my code makes sense but now if I use the divide the decimal dividers and this was the part that is going to drive me nuts lol
Gersho
@Gersho
Aug 17 2017 00:46
divide ? nono
you have an array with 4 number of 1 digit each right ?
Albert Cardona II
@daddycardona
Aug 17 2017 00:48
yes
Gersho
@Gersho
Aug 17 2017 00:48
ok so let's say you doing it on paper, what would you do with the first value ? (arr[0] )
it's representing the thousands
Albert Cardona II
@daddycardona
Aug 17 2017 00:49
0[0][1] nada I am using 36 now
Gersho
@Gersho
Aug 17 2017 00:50
so [0,0,3,6] ?
Albert Cardona II
@daddycardona
Aug 17 2017 00:50
yes
00 nothing they have no value
Gersho
@Gersho
Aug 17 2017 00:50
so let's worry about arr[2] = 3 for now
it's 3 for the 10's, so it would be XXX
Albert Cardona II
@daddycardona
Aug 17 2017 00:51
yes I was thinking in my head a for loop but that makes no sense either
yes
that is correct
Gersho
@Gersho
Aug 17 2017 00:52
then you store somewhere "XXX" as a variable (don't forget the quote, since we want a string)
Albert Cardona II
@daddycardona
Aug 17 2017 00:53
so what was the point of having 2 arrays like the hint indicated I am confused
Gersho
@Gersho
Aug 17 2017 00:53
oh it was in the hints, was avoiding to mention it lol :P
you store it in a second array, it's easier to put together at the end ;)
Albert Cardona II
@daddycardona
Aug 17 2017 00:54
I have that as well 2 arrays the letters
so I need to pull out of roman numeral array x 3 times that is why I did a loop in the begining
Gersho
@Gersho
Aug 17 2017 00:55
so your code should be like
(the part we discussed earlier with unshift to prepare the array)
you take a look at the thousands, based on it's value push something in the second array
same with the hundreds, tens and single,
merge the second array you made
????
profit
loop seems like a good idea, but since each digit use differents letters, it doesn't work
by the way you know about the switch/case function right ?
Albert Cardona II
@daddycardona
Aug 17 2017 00:57
Yes I understand them but been a while since I used them
Gersho
@Gersho
Aug 17 2017 00:58
well you'll probably want to have a look, or you'll be drowning in nested if's
Albert Cardona II
@daddycardona
Aug 17 2017 00:58
I have no Idea what you are talking about before switch statment lol

function convertToRoman(num) {
    var rN = ['M', 'CM', 'D', 'CD', 'C', 'XC',
        'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'
    ];
    var div = [1000, 900, 500, 400, 100, 90,
        50, 40, 10, 9, 5, 4, 1
    ];

    var nu = num.toString().split('');
    console.log(nu);
    if (nu.length < 4) {
        for (var i = nu.length; i < 4; i++) {
            nu.unshift('0');
        }
        console.log(nu)
    }
    return nu;
}
convertToRoman(36);
This is what I have so far and I feel it is wrong for some reason
so it added 0,0,3,6
Gersho
@Gersho
Aug 17 2017 01:00
well you don't need rN or div anymore if you go the array route
if you want to use them (if it feels more like your code that way ) you'll want to surbstract in a loop i guess ? in that case you won't need to convert it to a array
like if (num>1000), add M somewhere
Albert Cardona II
@daddycardona
Aug 17 2017 01:02
so you saying that I should make a switch statement with like case 30: var i = 'xxx'
I should be subtracting with a loop instead?
Gersho
@Gersho
Aug 17 2017 01:03
that would be case 3 since we already separated it in the array, but that's my point yes
you should choose the method that makes more sense to you
Albert Cardona II
@daddycardona
Aug 17 2017 01:04
I am going to read some more about filters and reduce and other methods because I am just reading for no reason
Gersho
@Gersho
Aug 17 2017 01:04
compare the two, discard the one that sounds ineficient
if you haven't downloaded it, take Zeal, it's great for accessing a lot of doc on the fly
Albert Cardona II
@daddycardona
Aug 17 2017 01:05
I am using that right now
Gersho
@Gersho
Aug 17 2017 01:05
<3
Albert Cardona II
@daddycardona
Aug 17 2017 01:07
I am just upset I do not understand what I am trying to do but got to this point with some understanding lol
Gersho
@Gersho
Aug 17 2017 01:10
for that i use Sequential function chart (actually graphcet, but couldn't find a better translation)
pen&paper, always good help
Joseph
@revisualize
Aug 17 2017 01:10
Hey.
Gersho
@Gersho
Aug 17 2017 01:10
:wave:
Albert Cardona II
@daddycardona
Aug 17 2017 01:10
I done pen and paper lol
hi @revisualize
Margaret
@Margaret2
Aug 17 2017 01:12
@ahmedtarek2134 sorry i had to leave, that's cool :+1:
Albert Cardona II
@daddycardona
Aug 17 2017 01:12
well later guys
Margaret
@Margaret2
Aug 17 2017 01:12
@daddycardona :wave:
Joseph
@revisualize
Aug 17 2017 01:12
@daddycardona Have you thought about not doing the if?
Margaret
@Margaret2
Aug 17 2017 01:13
i did an if lol :joy:
Joseph
@revisualize
Aug 17 2017 01:13
@daddycardona Have you thought about not doing the split?
Albert Cardona II
@daddycardona
Aug 17 2017 01:13
I was not using the split originally
Joseph
@revisualize
Aug 17 2017 01:13
@daddycardona Have you thought about not doing any of this: var nu = num.toString().split('');
@daddycardona Just do a for loop. and include in the for loop to reset i to 0 if the num is greater than 1000
Albert Cardona II
@daddycardona
Aug 17 2017 01:14

$(function() {
    function convertToRoman(num) {
        var rN = ['M', 'CM', 'D', 'CD', 'C', 'XC',
            'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'
        ];
        var div = [1000, 900, 500, 400, 100, 90,
            50, 40, 10, 9, 5, 4, 1
        ];
        //example 36 == XXXVI
        // so I find the highest decimal in div 
        //questin is how to get 10 for this example out of the array
        var hiDiv = function(number) {
            var nu = number;
            var x = 0;
            var y = 0;
            var collect = '';
            for (var i in div) {

                if (nu / div[i] > 1) {
                    x = nu / div[i];

                    console.log('loggin x ' + x);
                    if (nu % div[i] > 0) {
                        y = nu % div[i];
                        collect += rN[i]
                        console.log("logging y " + y);
                        nu = y;
                        console.log('this is the new nu ' + nu);
                        if (y === 1) {
                            collect += rN[div.length - 1];
                        }
                    } else if (nu % div[i] === 0) {
                        console.log("another y" + y)
                    }

                }
            }
            // var xy = parseInt('' + x + y);

            return collect;
        };


        console.log(hiDiv(num));

        $('.result').html(div + '  ' + rN);
        return num;

    }
    convertToRoman(100);
})
Joseph
@revisualize
Aug 17 2017 01:14
Just an idea.
Albert Cardona II
@daddycardona
Aug 17 2017 01:15
this was my original way of doing it then I realized if it equals 1 I can just quit
or break it @revisualize
No I have not thought about resetting lol I was like in a loop and trying to see everything. I wanted to try this got to many numbers for 36 lol
or letters
Joseph
@revisualize
Aug 17 2017 01:19
@daddycardona I just did a simple loop.
Albert Cardona II
@daddycardona
Aug 17 2017 01:20
LOL I originally started with a simple loop LOL
what was your simple loop ?
I try to keep stuff as simple as possible @revisualize
Gersho
@Gersho
Aug 17 2017 01:21
i'd go for nested if (decreasing, usnig the values you have in div)
Gersho
@Gersho
Aug 17 2017 01:22
you just have to make sure you don't forget an else or some lower number will trigger too early
@revisualize elegant
the 2 layer array is a nice touch
Joseph
@revisualize
Aug 17 2017 01:24
@Gersho Thanks. :)
CamperBot
@camperbot
Aug 17 2017 01:24
revisualize sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Aug 17 2017 01:26
mine has way more line, but if my understanding of function call is correct, should be more efficient (only supports up to 3999 however)
Joseph
@revisualize
Aug 17 2017 01:27
@Gersho If you notice I have two solutions on the same page.
Gersho
@Gersho
Aug 17 2017 01:27

function convertToRoman(num) {

  var numArr = num.toString().split("");
  var romArr=[];


 if (numArr.length<4){


   for (i=numArr.length; i<4; i++){
     numArr.unshift("0");
   }
 }




  switch (numArr[0]) {

    case "1":
      romArr.push("M");
      break;

    case "2":
      romArr.push("MM");
      break;

    case "3":
      romArr.push("MMM");
      break;

  }


   switch (numArr[1]) {

    case "1":
      romArr.push("C");
      break;

    case "2":
      romArr.push("CC");
      break;

    case "3":
      romArr.push("CCC");
      break;

        case "4":
      romArr.push("CD");
      break;

    case "5":
      romArr.push("D");
      break;

    case "6":
      romArr.push("DC");
      break;
        case "7":
      romArr.push("DCC");
      break;

    case "8":
      romArr.push("DCCC");
      break;

    case "9":
      romArr.push("CM");
      break;
  }

     switch (numArr[2]) {

    case "1":
      romArr.push("X");
      break;

    case "2":
      romArr.push("XX");
      break;

    case "3":
      romArr.push("XXX");
      break;

        case "4":
      romArr.push("XL");
      break;

    case "5":
      romArr.push("L");
      break;

    case "6":
      romArr.push("LX");
      break;

        case "7":
      romArr.push("LXX");
      break;

    case "8":
      romArr.push("LXXX");
      break;

    case "9":
      romArr.push("XC");
      break;
  }

     switch (numArr[3]) {

    case "1":
      romArr.push("I");
      break;

    case "2":
      romArr.push("II");
      break;

    case "3":
      romArr.push("III");
      break;

        case "4":
      romArr.push("IV");
      break;

    case "5":
      romArr.push("V");
      break;

    case "6":
      romArr.push("VI");
      break;
        case "7":
      romArr.push("VII");
      break;

    case "8":
      romArr.push("VIII");
      break;

    case "9":
      romArr.push("IX");
      break;
  }


  /*
1 = I
5 = V
10 = X
50 = L
100 = C
500 = D
1000 = M
*/


 var romStr = romArr.join("");

return romStr;

}
Joseph
@revisualize
Aug 17 2017 01:27
One is commented out.
Gersho
@Gersho
Aug 17 2017 01:31
your commented out version is weird, at least i don't understand
Albert Cardona II
@daddycardona
Aug 17 2017 01:32
I honestly just copied all the cases and just made it worked that way LOL
Gersho
@Gersho
Aug 17 2017 01:33
https://codepen.io/Gersho/pen/jmZdzL
last minute opinions before i send it as complete ?
Albert Cardona II
@daddycardona
Aug 17 2017 01:39
I like it nice and simple and looks nice too :)
Gersho
@Gersho
Aug 17 2017 01:41
i like minimalism
and when i try to go fancy it ends ugly
Albert Cardona II
@daddycardona
Aug 17 2017 01:41
@revisualize I was trying to do something like that but make it get xxx like another loop but that did nto work either lol
that was similar to mine lol
Gersho
@Gersho
Aug 17 2017 01:43
the bouncing wiki is cute (also i don't know how to do that)
we see a yellow line on mousing over the wikiball
oh and you should change the color of your submit btn
Albert Cardona II
@daddycardona
Aug 17 2017 01:46
yeah i did a hover the bounding image was a gif i found lol
I left it so simple because my goal was literally to see if I can get it done
Gersho
@Gersho
Aug 17 2017 01:47
well of course, first get it done, then make it pretty
Albert Cardona II
@daddycardona
Aug 17 2017 01:48
That is why I am trying to do all these things but make my code more efficient.
I don't undertand my code but thought I ded lol
@revisualize did your new code work?
Gersho
@Gersho
Aug 17 2017 01:49
well i've started every challenge (exept calculator) and i'm fairly advanced in most of them
but i've finished only 3
so i see what youo mean
Albert Cardona II
@daddycardona
Aug 17 2017 01:51
I finished all challenges before this one I am mad at the fact that I don't understand more than I know because I have been on and off javasctipt since the 90s and I know why I wanted to give up especially when netscape and CSS was harder than it was now
Margaret
@Margaret2
Aug 17 2017 01:52
@Gersho wow that's a lot of lines :astonished:
here's mine
function convertToRoman(num) {
 var str = num.toString().split('').reverse()
 var table = [['I','V'],['X','L'],['C','D'],['M']]
 return str.map((e, i)=>{
   if (e < 4) return table[i][0].repeat(e);
   if (e == 4) return table[i][0]+table[i][1]
   if (e < 9) return table[i][1] + table[i][0].repeat(e-5)
   else return table[i][0] + table[i+1][0]
 }).reverse().join('')
}
Joseph
@revisualize
Aug 17 2017 01:53
@daddycardona Did my what work?
Gersho
@Gersho
Aug 17 2017 01:53
@Margaret2 but not many function calls
Joseph
@revisualize
Aug 17 2017 01:54
@daddycardona Did my new code work? What new code?
Albert Cardona II
@daddycardona
Aug 17 2017 01:54
did your new code work you had old code commented out
Gersho
@Gersho
Aug 17 2017 01:54
i don't know map yet, i've heard of it tho
Margaret
@Margaret2
Aug 17 2017 01:54
i probably don't need to reverse it lol :joy: it was just easier for me to understand that way
Albert Cardona II
@daddycardona
Aug 17 2017 01:54
in your site
Joseph
@revisualize
Aug 17 2017 01:54
@daddycardona What? What site?
Gersho
@Gersho
Aug 17 2017 01:54
@Margaret2 left handed ?
Margaret
@Margaret2
Aug 17 2017 01:54
@Gersho learn it, it will make your js life 1000% better :laughing:
and no
Joseph
@revisualize
Aug 17 2017 01:55
@daddycardona I'm confused.
@daddycardona I don't post code online that doesn't work.
Gersho
@Gersho
Aug 17 2017 01:55
@Margaret2 it's a bit like apply, first time i've read the description it was like "wait, what ?"
Joseph
@revisualize
Aug 17 2017 01:55
if I'm linking to code on my github. It works. It may not work correctly. it may not be the most efficient. But, it gets a task done.
Margaret
@Margaret2
Aug 17 2017 01:56
@Gersho yeah, i remember filter was hard at first too
but map, filter, reduce <-- great to use
Albert Cardona II
@daddycardona
Aug 17 2017 01:57
you had on your code for convert to roman numerals, you had old code then you had somehting on top you was doing and you even commented out the middle of you do while loop
Gersho
@Gersho
Aug 17 2017 01:57
reduce i've learned to use in the dreaded steamroll challenge (i consider it the hardest challenge i've done so far)
Joseph
@revisualize
Aug 17 2017 01:57
@daddycardona The code works.
Albert Cardona II
@daddycardona
Aug 17 2017 01:58
I don't like your code @Margaret2 its like I understand it but mad I don't know how to incorperated it lol
I mean I can't come up with it
Don't get me wrong it is amazing @Margaret2 lol
so where does the e come from in this code @Margaret2 ? I don't get that
@revisualize oh okay I jsut saw that it was commented out /* let value = romans.find(function (n) { return Math.floor(num / n[0]) !== 0; }); */
Albert Cardona II
@daddycardona
Aug 17 2017 02:01
Nice and simple
was you suppose to or had to click online and offline etc..
Gersho
@Gersho
Aug 17 2017 02:03
oh it's supposed to open in a new tab (at least that's what i wanted)
Joseph
@revisualize
Aug 17 2017 02:03
@daddycardona That code is an expansion of the code above.
@daddycardona
        let value = romans.find(n => Math.floor(num / n[0]) !== 0);
        /*
        let value = romans.find(function (n) { 
            return Math.floor(num / n[0]) !== 0;
        });
        */
Albert Cardona II
@daddycardona
Aug 17 2017 02:04
no I meant somethign like online click it and see who is online and offline see whos off line
Joseph
@revisualize
Aug 17 2017 02:04
Those two code blocks are the same.
Albert Cardona II
@daddycardona
Aug 17 2017 02:04
@revisualize yes I was confused with that
Joseph
@revisualize
Aug 17 2017 02:04
@daddycardona I was learning about arrow functions at the time.
It's how I make notes.
Comment.
Albert Cardona II
@daddycardona
Aug 17 2017 02:04
oh I see that was the long way and you did it the short way n=> is function
yeah I did not put 2 and 2 together
Gersho
@Gersho
Aug 17 2017 02:06
@daddycardona well i don't see any reason to make the user clic when it can load on it's own (like the weather app)
Joseph
@revisualize
Aug 17 2017 02:06
@daddycardona You really need to start @ ing people when you talk to them.
Albert Cardona II
@daddycardona
Aug 17 2017 02:06
no I mean like if you clicked online you can see only the ones online and offline the same thing
okay @revisualize
Gersho
@Gersho
Aug 17 2017 02:07
oh, i see
that's something i would do if there was more channels in the list
Gersho
@Gersho
Aug 17 2017 02:08
dns is winning against bly, i have to go watch it
Albert Cardona II
@daddycardona
Aug 17 2017 02:08
Oh I thought it was required I did not read the whole thing just did what they did lol
have fun later @Gersho
Well I will be dreaming of what @Margaret2 did and what you did @revisualize and hopefully start understanding more for this challenge ;)
I like less code
Gersho
@Gersho
Aug 17 2017 02:17
well of course it had to be the end of the match, so i'm back
Margaret
@Margaret2
Aug 17 2017 02:33
@daddycardona oh, sorry, i was doing something, good night :stars:
Sorin Ruse
@sorinr
Aug 17 2017 02:34
@daddycardona you may add to your li tag in css cursor: pointer; to show that your all, online, offline are clickable
Ginger
@GingerChew
Aug 17 2017 02:53
can someone help me understand why this function executes an infinite loop when I use a word like glove
function translatePigLatin(str) {
  var regE = /[aeiou]/;
  if (str[0].match(regE)) {
    str = str.substring(0) + 'way';
  } else {
    do {
      var i=0;
      i++;
      if (str[i].match(regE)) {
        str = str.substring(i) + str.substring(0,i) + 'ay';
        break;
      }
    } while (!str[i].match(regE));
  }
  return str;
}
translatePigLatin('glove')
nvm i was being used out of scope making it goof
fixed it now
Long Nguyen
@longnt80
Aug 17 2017 02:56
@GingerChew I dont think you need a loop though
you just have to move the first letter
Gersho
@Gersho
Aug 17 2017 02:58
or first consonant cluster
translatePigLatin("glove") should return "oveglay".
Ginger
@GingerChew
Aug 17 2017 02:58
yeah, I got it to pass that tests
Gersho
@Gersho
Aug 17 2017 02:59
one way to see it is say "as long as the first letter isn't a vowel, move it at the end of the word"
I300tcamp
@I300tcamp
Aug 17 2017 02:59
hello ladies and gents
Gersho
@Gersho
Aug 17 2017 03:00
:wave:
I300tcamp
@I300tcamp
Aug 17 2017 03:00
so i been reading some query
and in diffren sites it will say to put my js and jqury at the bottom but w3schools say on top
which is correct?
does it even matter or not?
Gersho
@Gersho
Aug 17 2017 03:00
neither, put it in a separate .js file
no it doesn't
Ginger
@GingerChew
Aug 17 2017 03:01
@longnt80 for the sake of learning, what would be an example of doing it without the loop?
or even why would I want to avoid using a loop? Are loops last case resorts?
I300tcamp
@I300tcamp
Aug 17 2017 03:01
of course! @Gersho thank you
CamperBot
@camperbot
Aug 17 2017 03:01
i300tcamp sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @gersho |http://www.freecodecamp.com/gersho
Long Nguyen
@longnt80
Aug 17 2017 03:02
Ginger
@GingerChew
Aug 17 2017 03:04
@longnt80 ooooooookay, interesting. I didn't realize I could use the regex like that
Gersho
@Gersho
Aug 17 2017 03:05
str.split(vowel); took me a while to understand why it worked in multiple consonant too but i like it
Ginger
@GingerChew
Aug 17 2017 03:06
yeah that's really clever, I'm deff gonna save that for reference
Eric Miller
@ericmiller777
Aug 17 2017 03:16
hello again
lol
anyone know how to use a for each statement?
Ginger
@GingerChew
Aug 17 2017 03:17
you shouldn't have to use a for each statement
Gersho
@Gersho
Aug 17 2017 03:19
why not ? i had the channel list in an array
Ginger
@GingerChew
Aug 17 2017 03:19
if you build a function that sets up one listing with a variable in place (i.e. <listing data> + var + </listing data>) you can just use a for loop
*maybe its just a taste thing though
Gersho
@Gersho
Aug 17 2017 03:20
whatever works
Eric Miller
@ericmiller777
Aug 17 2017 03:20
lol ive been going crazy trying too use a for loop since yesterday
Ginger
@GingerChew
Aug 17 2017 03:20
actually looking back at my for loop it's basically just a for each loop so ifnore me
lol
basically for each works like this
Gersho
@Gersho
Aug 17 2017 03:20
arr.forEach(callback);
Ginger
@GingerChew
Aug 17 2017 03:21
//for each property in array
for (var prop in array) {
  do something
}
Long Nguyen
@longnt80
Aug 17 2017 03:21
for each is fine
@ericmiller777 I think the problem is not your for each loop
Gersho
@Gersho
Aug 17 2017 03:21
@GingerChew that's for in , forEach is a different one
Ginger
@GingerChew
Aug 17 2017 03:21
@Gersho back to the books for me
Gersho
@Gersho
Aug 17 2017 03:22
try Zeal, it's great
Eric Miller
@ericmiller777
Aug 17 2017 03:22
@longnt80 ive tryed everything, it just seems to ignore my if statement
the only thing i can think of is to learn to use promises or somthing to call both urls
Long Nguyen
@longnt80
Aug 17 2017 03:22
@ericmiller777 can you put this on codepen?
Gersho
@Gersho
Aug 17 2017 03:22
@ericmiller777 have you tried as a ternary operator ?
Eric Miller
@ericmiller777
Aug 17 2017 03:23
idk what that is :)
Long Nguyen
@longnt80
Aug 17 2017 03:23
@ericmiller777 no you don't need promise
Eric Miller
@ericmiller777
Aug 17 2017 03:23
;p;
Long Nguyen
@longnt80
Aug 17 2017 03:23
@ericmiller777 I used forEach for this project too
getJSON already has callback function
Eric Miller
@ericmiller777
Aug 17 2017 03:23
do you mind looking at my code im not sure how i pass it in?
usersArray.forEach( function(usersarray){
$.getJSON("https://wind-bow.glitch.me/twitch-api/users/" + usersArray, function (users) {
$.getJSON("https://wind-bow.glitch.me/twitch-api/streams/" + usersArray, function (streams) {
if (streams.stream == null){
    $("#main-group").append(`<li class="list-group-item btn btn-default" style="white-space: normal; overflow: hidden;" ><div class="row"><div class="col-xs-4 col-sm-4 col-md-2 col-lg-2"><img id = "logo" class="img-responsive" src="${users.logo}"></img></div><div class="col-xs-8 col-sm-8 col-md-10 col-lg-10"><span id="streamInfo" style="float: left"><span style="font-size: 25px;"><b>${users.display_name}</b></span><br>--offline</span></div></div><span>${users.bio}</span></li>`);
}else{
    $("#main-group").append(`<li class="list-group-item btn btn-default" style="white-space: normal; overflow: hidden;" ><div class="row"><div class="col-xs-4 col-sm-4 col-md-2 col-lg-2"><img id = "logo" class="img-responsive" src="${users.logo}"></img></div><div class="col-xs-8 col-sm-8 col-md-10 col-lg-10"><span id="streamInfo" style="float: left"><span style="font-size: 25px;"><b>${users.display_name}</b></span><br>${streams.stream.channel.status}</span></div></div><span>${users.bio}</span></li>`);
}           
});            
});
})
not really sure what to pass in
Long Nguyen
@longnt80
Aug 17 2017 03:25
I'm looking at it
Gersho
@Gersho
Aug 17 2017 03:25
@ericmiller777 have you tried as a ternary operator ?
Eric Miller
@ericmiller777
Aug 17 2017 03:25
ive never heard of taht ill look it up
Gersho
@Gersho
Aug 17 2017 03:26
that's the a?b:c we talked about yesterday
Long Nguyen
@longnt80
Aug 17 2017 03:26
@Gersho if the if doesn't work then I guess ternary wouldn't do anything
Gersho
@Gersho
Aug 17 2017 03:26
@longnt80 it wasn't in a getJSON, but i did encounter case where it fixed the issue
Eric Miller
@ericmiller777
Aug 17 2017 03:26
ah ive seen that before
never used it myself
i can put it back to a for loop
it just skips over my if statemewnt
statement
Long Nguyen
@longnt80
Aug 17 2017 03:30
@ericmiller777 you can put some console.log inside your if statement to see if your json are loaded correctly
console.log(users);
console.log(streams);
Eric Miller
@ericmiller777
Aug 17 2017 03:32
ill try it
anyone know how i would use the for each tho?
or can i not us etrhat for this?
glitz20
@glitz20
Aug 17 2017 03:33
@longnt80 are you familiar with express?
anyone else here familiar with express?
Long Nguyen
@longnt80
Aug 17 2017 03:34
@sabin20 sorry, I'm not
@ericmiller777 forEach is just loop
Long Nguyen
@longnt80
Aug 17 2017 03:40
@ericmiller777 please copy your code to codepen, it's not complicated. Copy the <body> to HTML, js to JS, css to CSS, then go to setting and import the link to bootstrap, jquery,..
Ginger
@GingerChew
Aug 17 2017 03:41
Is this right for the ternary usage?
function pairElement(str) {
  var arr = str.split(''), landArr = [], finalArr = [];
  for (var index:arr){
    switch (index) {
      case('G'):
        finalArr.push([index,'C']);
        break;
      case('C'):
        finalArr.push([index,'G']);
        break;
      case('A'):
        finalArr.push([index,'T']);
        break;
      case('T'):
        finalArr.push([index,'A']);
        break;
    }
  }
  return finalArr;
}
Eric Miller
@ericmiller777
Aug 17 2017 03:41
@longnt80 sure
Bill
@kirah1314
Aug 17 2017 03:44
@GingerChew I see the switch statement, is that what you mean the switch statement?
Gersho
@Gersho
Aug 17 2017 03:45
i see that for (var index:arr){ but i don't know this syntax
Bill
@kirah1314
Aug 17 2017 03:45
@GingerChew ternary usually goes condition ? A : B
Gersho
@Gersho
Aug 17 2017 03:45
@kirah1314 oh thanks i was wondering what i was missing ^^
CamperBot
@camperbot
Aug 17 2017 03:45
gersho sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:cookie: 999 | @kirah1314 |http://www.freecodecamp.com/kirah1314
Gersho
@Gersho
Aug 17 2017 03:45
that's the ternary i know too
Joseph
@revisualize
Aug 17 2017 03:47
@GingerChew Ternary Operators should be thought of as If / Else
Gersho
@Gersho
Aug 17 2017 03:48
if ? then : else
Eric Miller
@ericmiller777
Aug 17 2017 03:48
Ginger
@GingerChew
Aug 17 2017 03:48
maybe I'm using ternary in the wrong way
Eric Miller
@ericmiller777
Aug 17 2017 03:48
im not sure why it doesnt look right
Joseph
@revisualize
Aug 17 2017 03:48

@GingerChew

if (someValue > someOtherValue) { // something that evaluates to true / false
       doTrueStuff;
} else {
       doFalseStuff;
}

(someValue > someOtherValue) ? doTrueStuff : doFalseStuff;

Ginger
@GingerChew
Aug 17 2017 03:49
Ohhhhhh, okay
Joseph
@revisualize
Aug 17 2017 03:49
@GingerChew condition ? true : false;
Long Nguyen
@longnt80
Aug 17 2017 03:49
@ericmiller777 you forgot adding bootstrap
@ericmiller777 bootstrap css
and move jquery before bootstrap js
Joseph
@revisualize
Aug 17 2017 03:50
@GingerChew Did that help?
Eric Miller
@ericmiller777
Aug 17 2017 03:51
@longnt80 ? i added it
Long Nguyen
@longnt80
Aug 17 2017 03:51
@ericmiller777 so, looks like it's working?
after changing to for loop
?
no
the problem wasnt anything to do with that
its that its not checking if streams.stream is null
if it isnt its supposed to give the stream data
instead of offline
look at the if statement
Ginger
@GingerChew
Aug 17 2017 03:52
@revisualize Yeah, I get it now, I was mixing it up with concise statements in java 7 I think
Joseph
@revisualize
Aug 17 2017 03:53
I'm going to go back to fishing.
:fishing_pole_and_fish:
MattUnderwood
@MattUnderwood
Aug 17 2017 03:53

I've completed the FCC JavaScript track but am having quite a bit of trouble with the algorithm challenges (I'm about halfway through right now with each problem taking several hours). Is this normal or should I use some outside material to learn more about JavaScript and then come back to the challenges?

I'm considering codeacademy or Eloquent JavaScript. Any advice is appreciated! =)

Long Nguyen
@longnt80
Aug 17 2017 03:54
@ericmiller777 all your streams are null at the moment
Gersho
@Gersho
Aug 17 2017 03:54
@MattUnderwood it's normal, at least i think so, they don't teach you everything, but enougth to help you look for you own answers (doc, google, the chat, etc)
Joseph
@revisualize
Aug 17 2017 03:55
@MattUnderwood Struggling is real.
Long Nguyen
@longnt80
Aug 17 2017 03:55
@ericmiller777 wait
Eric Miller
@ericmiller777
Aug 17 2017 03:55
lemme see
2 shoudlnt be
the two staecraft streams dont stop
Joseph
@revisualize
Aug 17 2017 03:55
@MattUnderwood The algorithm section is where you're going to do the most learning. They don't really hold your hand any more. It's where you actually start using what you've learned.
@MattUnderwood One challenge took me over 22 hours to solve.
Eric Miller
@ericmiller777
Aug 17 2017 03:56
@longnt80 i added the console.log i see that it says they are null, but they are not
Gersho
@Gersho
Aug 17 2017 03:57
@MattUnderwood One challenge took me over 22 hours to solve.
took me 30+ for the steamroll
Long Nguyen
@longnt80
Aug 17 2017 03:57
@ericmiller777 ok you need to use let for the for loop
@ericmiller777 for (let i = 0; i < usersArray.length; i++)
Eric Miller
@ericmiller777
Aug 17 2017 03:57
sorry im used to wrieing inc3
c#
Joseph
@revisualize
Aug 17 2017 03:57
@MattUnderwood I'm not talking, I started one day at 5pm and solved it the next day at 3pm. I'm talking I worked on it for 4hrs one day, 3hrs another, 2hrs another, 4hrs another, 3hrs, ..... and eventually gave up trying to crack it and asked for help. Then I spent 6 hours in chat with someone asking for help
Eric Miller
@ericmiller777
Aug 17 2017 03:57
does that matter?
pretty sure javascript doesnt care
but testing it
Long Nguyen
@longnt80
Aug 17 2017 03:58
@ericmiller777 yes it does, this is an async issue
Gersho
@Gersho
Aug 17 2017 03:58
@MattUnderwood also remember the algorithm challenges is marked 50 hours for 17 challenges, so it's normal they take time
MattUnderwood
@MattUnderwood
Aug 17 2017 03:58
Oh wow, that is crazy.
Eric Miller
@ericmiller777
Aug 17 2017 03:59
:o:
im shocked if that worked
i owe you money or somthing
MattUnderwood
@MattUnderwood
Aug 17 2017 03:59
I've spent maybe up to 5ish on just one. It can get very fristrating. I've been getting good at looking up missing information, but am still considering another source to "fill in the gaps" of my JS knowledge and hopefully come back with a better understanding.
Long Nguyen
@longnt80
Aug 17 2017 03:59
@ericmiller777 it worked, right?
Eric Miller
@ericmiller777
Aug 17 2017 03:59
@longnt80 thanks
CamperBot
@camperbot
Aug 17 2017 03:59
ericmiller777 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 510 | @longnt80 |http://www.freecodecamp.com/longnt80
Eric Miller
@ericmiller777
Aug 17 2017 03:59
yes
please
explain to me
CamperBot
@camperbot
Aug 17 2017 03:59

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
Eric Miller
@ericmiller777
Aug 17 2017 03:59
trhe difference var and let made?
MattUnderwood
@MattUnderwood
Aug 17 2017 04:00
Do you think that is a good approach or should I struggle through and learn more by poking my way around?
Gersho
@Gersho
Aug 17 2017 04:00
@longnt80 async ? within a callback ? i assumed that was the whole point of having a callback
Long Nguyen
@longnt80
Aug 17 2017 04:00
@ericmiller777 var will make i a global variable, and by the time your api is loaded, i is already the last value which is 8 in your case
Tyler Furby
@tyler-furby
Aug 17 2017 04:01
So this may sound dumb, but why are there some node.js applications out there that only work with specific versions of node? Why can’t developers get these applications to work with more recent versions of node?
Long Nguyen
@longnt80
Aug 17 2017 04:01
@ericmiller777 this is a complicated concept
Eric Miller
@ericmiller777
Aug 17 2017 04:01
@longnt80
Gersho
@Gersho
Aug 17 2017 04:01
@MattUnderwood do a bit of both, you can either go to another site, read random doc pages (like Array.prototype) or hang in the chat and look at other and their problems
Eric Miller
@ericmiller777
Aug 17 2017 04:01
i dont understand exactly why is it already 8
@Gersho thanks
CamperBot
@camperbot
Aug 17 2017 04:01
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 333 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Aug 17 2017 04:01
@GingerChew THANKS
CamperBot
@camperbot
Aug 17 2017 04:01
ericmiller777 sends brownie points to @gingerchew :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @gingerchew |http://www.freecodecamp.com/gingerchew
Eric Miller
@ericmiller777
Aug 17 2017 04:01
@longnt80 thanks
CamperBot
@camperbot
Aug 17 2017 04:01
ericmiller777 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:warning: ericmiller777 already gave longnt80 points
Eric Miller
@ericmiller777
Aug 17 2017 04:01
oops
sorry about caps
its been so many hours
Long Nguyen
@longnt80
Aug 17 2017 04:02
@ericmiller777 yeah, it is very complicated, let me find the resource for you
MattUnderwood
@MattUnderwood
Aug 17 2017 04:02
@Gersho Thanks for the tips. I appreciate it.
CamperBot
@camperbot
Aug 17 2017 04:02
mattunderwood sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 334 | @gersho |http://www.freecodecamp.com/gersho
MattUnderwood
@MattUnderwood
Aug 17 2017 04:02
@revisualize Thanks. Its good to hear about others experiences with the algorithms their first time.
CamperBot
@camperbot
Aug 17 2017 04:02
mattunderwood sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
:star2: 4437 | @revisualize |http://www.freecodecamp.com/revisualize
Joseph
@revisualize
Aug 17 2017 04:18
@MattUnderwood We all struggle. This is a journey of learning. It isn't a sprint.
Gersho
@Gersho
Aug 17 2017 04:48
https://codepen.io/Gersho/pen/YxWLBJ
looking for suggestions (especially to make the buttons more fancy)
Gersho
@Gersho
Aug 17 2017 04:56
asleep already chat ? :3
Darren
@DarrenfJ
Aug 17 2017 05:14
evening fCC
Gersho
@Gersho
Aug 17 2017 05:14
:wave:
Darren
@DarrenfJ
Aug 17 2017 05:14
@Gersho helloHello! :D
Gersho
@Gersho
Aug 17 2017 05:15
i'm not staying for long, but opinions on the pomodoro are still welcome ^^
Darren
@DarrenfJ
Aug 17 2017 05:21
@Gersho ok lemme check it out
:D
@Gersho looks good man :D
a couple of next stage things you might want to add (although I think it already meets the use cases)
Gersho
@Gersho
Aug 17 2017 05:25
yeah i want to make a bit more fancy, but i suck at css
Darren
@DarrenfJ
Aug 17 2017 05:26
moving only by 1 minute at a time can take a while to go from 25 to 5.. maybe also have a set of << and >> to go by 10's? and/or holding it down to speed up it's 'change'.
and being able to type in the box when selected to change time
but otherwise it's good.. I like
Gersho
@Gersho
Aug 17 2017 05:28

moving only by 1 minute at a time can take a while to go from 25 to 5.

25 to 5 ? pomodoro and pause have independant buttons, but the holding down idea is nice

and being able to type in the box when selected to change time

this one is a design choice

prakash chandra yadav
@prakashyadav008
Aug 17 2017 05:28
hey can anyone help me out
i am trying to create a fixed header
for my weather app
so how to set the position of the <div> element for that
.?
Gersho
@Gersho
Aug 17 2017 05:29
link your pen
well i'm off, thanks @DarrenfJ for the hold down idea, good night
CamperBot
@camperbot
Aug 17 2017 05:31
gersho sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1975 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Aug 17 2017 05:31
@Gersho yah 25 to 5 like if i want the pomodoro time to move from 25 down quickly to 10 minutes it's 15 clicks... you know, for testing at least that's about a dozen more than i like.. but this is design and usability I'm talking about.. form a pure functionality perspective it's fine

I like the stark design btw, always prefer minimalism ;)

yeah i want to make a bit more fancy, but i suck at css

Gersho
@Gersho
Aug 17 2017 05:32
@DarrenfJ haha, for testing i had it to 1 min / 1 min
Darren
@DarrenfJ
Aug 17 2017 05:32
yah me too :D
1 and 2 also to test the pause interval..
Gersho
@Gersho
Aug 17 2017 05:32
my other challenges are minimalist, all of them, wanted to show i can do it fancy too :p
Darren
@DarrenfJ
Aug 17 2017 05:32
it's cool, like i said these are just design preferences I'm talking about.. in anycase, it's cool, and goos and i like it
Gersho
@Gersho
Aug 17 2017 05:33
anyway, i'm off to bed, cya :)
Darren
@DarrenfJ
Aug 17 2017 05:35
@Gersho have a good one brutha :D
prakash chandra yadav
@prakashyadav008
Aug 17 2017 05:42
luoyely
@luoyely2017
Aug 17 2017 06:47
hello
1
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 07:46
can someone look into my pen? https://codepen.io/tiagocorreia/pen/brYpog after getting the first color right it will rush fast and get into a loop, in case of doubth of the color for now I have a console log that tells the enxt color
@prakashyadav008 what's your idea mate?got a bit confusing what you trying to achieve
and @prakashyadav008 it looks fixed mate
the page doenst has enough height for you to atually see it working
Eric Miller
@ericmiller777
Aug 17 2017 07:51
Hey guys
What you think?
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 07:56
@ericmiller777 looks great how about now filter by status?eheh
Tyler Furby
@tyler-furby
Aug 17 2017 07:59
Does anyone here have experience with Heroku?
rscales02
@rscales02
Aug 17 2017 07:59

function rot13(str) { // LBH QVQ VG!
  var decrypted = [];
  for (var i = 0; i< str.length; i++) {
    if (str[i] == " ") { 
      return; //returns for new loop at a space
    } else if (str.charCodeAt(i) - 64 <= 13) {
      /* should take letters A-M and cypher back from Z*/
      return decrypted.push(str.charCodeAt(i)-13+26);
    } else {
      //should cypher letters N-Z back to A-M
      return decrypted.push(str.charCodeAt(i)-13);
    }
  }
  return decrypted; // returns 1
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
Why does decrypted not return a string or an array? and how do I convert numbers back to letters?
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 08:02
@rscales02 what's the exercise name?
rscales02
@rscales02
Aug 17 2017 08:03
Cesars Cipher
Tyler Furby
@tyler-furby
Aug 17 2017 08:03
@rscales02
if (str[i] == " ") { 
      return;  //This return is exiting out of your loop, prematurely I think
rscales02
@rscales02
Aug 17 2017 08:05
I think I exit the loop on the first iteration regardless
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 08:05
can someone look into my pen? https://codepen.io/tiagocorreia/pen/brYpog after getting the first color right it will rush fast and get into a loop, in case of doubth of the color for now I have a console log that tells the enxt color
Tyler Furby
@tyler-furby
Aug 17 2017 08:06
@rscales02 Remove your return statements, maybe store them in decrypted instead
@rscales02 For example:
decrypted.push(str.charCodeAt(i)-13+26);
Omit the returns
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 08:08
@tyler-furby do you have 1 min or 2 to look into my pen?
getting me nuts :D
rscales02
@rscales02
Aug 17 2017 08:09
I have removed those and it now returns empty
Tyler Furby
@tyler-furby
Aug 17 2017 08:10
@rscales02 One sec
rscales02
@rscales02
Aug 17 2017 08:10
@tyler-furby please take your time
@tyler-furby thanks! Now i Just need to convert back from numbers to letters...
CamperBot
@camperbot
Aug 17 2017 08:12
rscales02 sends brownie points to @tyler-furby :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @tyler-furby |http://www.freecodecamp.com/tyler-furby
Tyler Furby
@tyler-furby
Aug 17 2017 08:13
@rscales02 What’s the code you have so far?
rscales02
@rscales02
Aug 17 2017 08:15

function rot13(str) { // LBH QVQ VG!
  var decrypted = [];
  for (var i = 0; i< str.length; i++) {
    if (str[i] == " ") { 
      decrypted.push(" "); //returns for new loop at a space
    } else if (str.charCodeAt(i) - 64 <= 13) {
      /* should take letters A-M and cypher back from Z*/
      decrypted.push(str.charCodeAt(i)-13+26);
    } else {
      //should cypher letters N-Z back to A-M
      decrypted.push(str.charCodeAt(i)-13);
    }
  } 
  return decrypted; // returns a beautiful array of numbers and spaces
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
I can only think of another for loop to convert the array in decrypted back to letters
Tyler Furby
@tyler-furby
Aug 17 2017 08:17
@rscales02 Are you familiar with String.fromCharCode();
Essentially, it converts a unicode number into a character
rscales02
@rscales02
Aug 17 2017 08:19
opposite of str.charCode basically?
Tyler Furby
@tyler-furby
Aug 17 2017 08:20
@rscales02 Yes, so one way to solve it is to loop back over your array, and at each index, str[i].fromCharCode() to convert the value at that index to a character
I think it’s worth a shot to see if that could work
Just ensure that you give .fromCharCode() the proper parameter of a unicode number
rscales02
@rscales02
Aug 17 2017 08:23
function rot13(str) { // LBH QVQ VG!
  var decrypted = [];
  for (var i = 0; i< str.length; i++) {
    if (str[i] == " ") { 
      decrypted.push(" "); //returns for new loop at a space
    } else if (str.charCodeAt(i) - 64 <= 13) {
      /* should take letters A-M and cypher back from Z*/
      decrypted.push(str.charCodeAt(i)-13+26);
    } else {
      //should cypher letters N-Z back to A-M
      decrypted.push(str.charCodeAt(i)-13);
    }
  } var result = [];
  for (var x = 0; x<decrypted.length; x++) {
    if (decrypted[i] == " ") {
      result.push(decrypted[x].fromCharCode());
    } else {
      result.push(decrypted[x].fromCharCode());
    }
  }
  return result; // returns a beautiful array of numbers and spaces
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
"fromCharCode is not a function"
Tyler Furby
@tyler-furby
Aug 17 2017 08:24
if (decrypted[i] == " ") { Are you iterating over i here or x?
rscales02
@rscales02
Aug 17 2017 08:25
x, i fixed that and that first push to ```
if ...
result.push(" ");
Tyler Furby
@tyler-furby
Aug 17 2017 08:26
And I apologize, you cannot do decrypted[x].fromCharCode() as it only works on strings
String.fromCharCode() is the proper syntax
So what value should you pass into String.fromCharCode()
rscales02
@rscales02
Aug 17 2017 08:27
ok, so would I have to convert my array into a string of numbers?
or is there another way?
Tyler Furby
@tyler-furby
Aug 17 2017 08:28
Well, that’s one way, or since you already have a second loop written out
You could do
String.fromCharCode(decrypted[x])
rscales02
@rscales02
Aug 17 2017 08:33
 } var result = [];
  decrypted.toString();
  for (var x = 0; x<decrypted.length; x++) {
    if (decrypted[x] == " ") {
      result.push(" ");
    } else {
      result.push(decrypted.fromCharCode(decrypted[x]));
    }
  }
  return result; // returns a beautiful array of numbers and spaces
}
decrypted.fromCharCode is not a function
Tyler Furby
@tyler-furby
Aug 17 2017 08:35
String.fromCharCode(decrypted[x])
Is what you’re looking to do
rscales02
@rscales02
Aug 17 2017 08:35
if I type that it says string is not defined
nevermind I am an idiot
Tyler Furby
@tyler-furby
Aug 17 2017 08:35
Capital or lower case S in String
rscales02
@rscales02
Aug 17 2017 08:36
string and String are different
Tyler Furby
@tyler-furby
Aug 17 2017 08:36
Yes because one is an object, the other a variable
rscales02
@rscales02
Aug 17 2017 08:36
thanks! you rock! @tyler-furby
CamperBot
@camperbot
Aug 17 2017 08:36
rscales02 sends brownie points to @tyler-furby :sparkles: :thumbsup: :sparkles:
:warning: rscales02 already gave tyler-furby points
Tyler Furby
@tyler-furby
Aug 17 2017 08:36
String is an object while string is a variable
@rscales02 No problem my brotha! Code on!
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 08:38
@tyler-furby do you have the time to look into my pen now if possible? can't find a way to make it work
Tyler Furby
@tyler-furby
Aug 17 2017 08:42
@tiagocorreiaalmeida Hey sorry, I’m actually about to get off. But there’s tons of people here to help you out. Perhaps try FreeCodeCamp’s main page to get someone to help https://gitter.im/FreeCodeCamp/FreeCodeCamp
rscales02
@rscales02
Aug 17 2017 08:42
Is there a way to include punctuation along with my " "?
Tyler Furby
@tyler-furby
Aug 17 2017 08:43
@rscales02 I think what yourre looking for is a way to distinguish anything that isn’t a letter a-z, are you familiar with regex expressions?
cowCrazy
@cowCrazy
Aug 17 2017 08:43
@rscales02 punctuation in a string you mean?
rscales02
@rscales02
Aug 17 2017 08:44
@tyler-furby that is what I am referring to I believe
Tyler Furby
@tyler-furby
Aug 17 2017 08:44
@rscales02 Think of implmenting a regex in your if statement's conditional
rscales02
@rscales02
Aug 17 2017 08:45
ok thanks
Tyler Furby
@tyler-furby
Aug 17 2017 08:45
I’m getting off otheriwse I’d help you out more!
rscales02
@rscales02
Aug 17 2017 08:45
Have a great day or night or whatever wherever you are my friend!
Tyler Furby
@tyler-furby
Aug 17 2017 08:46
Right here in Denver!
Have a good night my friend!
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:23
@tiagocorreiaalmeida i want the <h3> element to change when i change the ancestor <div> element
Xueyang Chen
@cxy271957865
Aug 17 2017 09:24
how to solve this problem...
the finished input element should have legal grammar..
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:26
Dhananjay Sood
@DhananjaySood
Aug 17 2017 09:33
Hi. how do i create my online portfolio?
i have made some projects but i dont know where to show them.
which i made
heroiczero
@heroiczero
Aug 17 2017 09:37
@DhananjaySood you can probably host it in github
Dhananjay Sood
@DhananjaySood
Aug 17 2017 09:38
okay
thanks
@heroiczero thanks
CamperBot
@camperbot
Aug 17 2017 09:38
dhananjaysood sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1621 | @heroiczero |http://www.freecodecamp.com/heroiczero
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 09:42
@prakashyadav008 still need help?
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:47
ya
i made it work using the <p> element but still gotta understand the positioning
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 09:49
@prakashyadav008 you got some tag badly closed cause this appears at the top ">, and if I Can help with something else just let me know
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:49
that thing at the top how to remove it
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 09:50
that's on your html
you probably cdlosed some div wrong
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:50
all the tags are closed
it only appear when full screen
@tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Aug 17 2017 09:54
@prakashyadav008 sec
439236710
@439236710
Aug 17 2017 09:56
hello
prakash chandra yadav
@prakashyadav008
Aug 17 2017 09:58
@439236710 hey
cowCrazy
@cowCrazy
Aug 17 2017 09:59
@439236710 hi Brad :wave:
439236710
@439236710
Aug 17 2017 10:19
i am gona to be a computer engineering!So what's your job guys! @prakashyadav008 @cowCrazy
prakash chandra yadav
@prakashyadav008
Aug 17 2017 10:20
i am an engineer @439236710
439236710
@439236710
Aug 17 2017 10:21
Be an actress is so tired! I 'rather to be an engineer.
prakash chandra yadav
@prakashyadav008
Aug 17 2017 10:24
actress thats pretty cool
439236710
@439236710
Aug 17 2017 10:24
Oh bro! can u be my teacher? I admire you so much!
Dhananjay Sood
@DhananjaySood
Aug 17 2017 11:00
@DhananjaySood
Hi. i am going to start the portfolio page. I have a ques in my mind, is it necessary to use any library or should i leave using any library? like bootstrap
can i skip that?
439236710
@439236710
Aug 17 2017 11:01
Why are u @ yourself...
Stephen James
@sjames1958gm
Aug 17 2017 11:06
@DhananjaySood You can use a library or not, up to you.
Dhananjay Sood
@DhananjaySood
Aug 17 2017 11:07
@sjames1958gm Thanks
@439236710 did that by mistake :smile:
439236710
@439236710
Aug 17 2017 11:08
Stephen James is your real name? @sjames1958gm
Thats a cute mistake @DhananjaySood
Dhananjay Sood
@DhananjaySood
Aug 17 2017 11:09
@439236710 :smile:
Stephen James
@sjames1958gm
Aug 17 2017 11:10
@439236710 Yes
439236710
@439236710
Aug 17 2017 11:12
good name ,Curry and lebron be with you.
@sjames1958gm
Stephen James
@sjames1958gm
Aug 17 2017 11:15
@439236710 :) thx
CamperBot
@camperbot
Aug 17 2017 11:15
sjames1958gm sends brownie points to @439236710 :sparkles: :thumbsup: :sparkles:
:warning: @439236710's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
439236710
@439236710
Aug 17 2017 11:22
What?
I'm not linked?
Owais Ahmed
@owaisehmed
Aug 17 2017 11:43
JS not working in code pen
what should i do??
Prince Cris
@pecconlyz
Aug 17 2017 11:51
@owaisehmed is your code not running, or is JS not just working
Owais Ahmed
@owaisehmed
Aug 17 2017 11:55
Nothing in JS section is working
Margaret
@Margaret2
Aug 17 2017 11:58
@owaisehmed make sure you have the JS in the JS section, not the HTML section
like you're not supposed to use a <script> tag
rscales02
@rscales02
Aug 17 2017 12:05
function rot13(str) { // LBH QVQ VG!
  var decrypted = [];
  for (var i = 0; i< str.length; i++) {
    if ((str[i] == " ") || (str[i] =="!") || (str[i] == "?")) { 
      decrypted.push(str[i]); //issue line
    } else if (str.charCodeAt(i) - 64 <= 13) {
      /* should take letters A-M and cypher back from Z*/
      decrypted.push(str.charCodeAt(i)-13+26);
    } else {
      //should cypher letters N-Z back to A-M
      decrypted.push(str.charCodeAt(i)-13);
    }
  } var result = [];
  decrypted.toString();
  for (var x = 0; x<decrypted.length; x++) {
    if (decrypted[x] == " ") {
      result.push(" ");
    } else {
      result.push(String.fromCharCode(decrypted[x]));
    }
  }
  return result.join(""); // returns a beautiful array of numbers and spaces
}

// Change the inputs below to test
rot13("SERR CVMMN!");
I have figured out the cypher for the cesar cipher project, for some reason the "!" or "?" won't push onto the end. my results have a red dot on the end.
rscales02
@rscales02
Aug 17 2017 12:10
actually it seems to be adding the -13 from my code somehow. i changed the if to "if (str[i] == "\W") and spaces become hyphens
Margaret
@Margaret2
Aug 17 2017 12:12
@rscales02 the issue is when you get to String.fromCharCode('!')
that returns a space
so it adds a space to result instead of the exclamation point
all you gotta do is fix that one if statement to account for ? and !
rscales02
@rscales02
Aug 17 2017 12:14
and "."
how do you account for that?
ok nevermind
rscales02
@rscales02
Aug 17 2017 12:20
thanks @Margaret2
CamperBot
@camperbot
Aug 17 2017 12:20
rscales02 sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2887 | @margaret2 |http://www.freecodecamp.com/margaret2
Mike
@MikeJSchorah
Aug 17 2017 12:47
Is it better to use a popular WordPress theme or a niche WordPress theme?
Travis Boss
@travisboss
Aug 17 2017 12:57
its better to use a theme that fits your website
Mike
@MikeJSchorah
Aug 17 2017 13:00
So functionality doesn't matter?
Long Nguyen
@longnt80
Aug 17 2017 13:54
@MikeJSchorah is it your website or for a client?
if you use a popular theme with too many features, it might be confusing for your client
Mike
@MikeJSchorah
Aug 17 2017 13:59
@longnt80 How so?
Long Nguyen
@longnt80
Aug 17 2017 14:04
@MikeJSchorah your client might not know much about computer/website/cms/wordpress
teach them to use only the blog alone can be challenging
439236710
@439236710
Aug 17 2017 14:58
Hello everyone!
439236710
@439236710
Aug 17 2017 15:32
How to sign up a codepen account?
Stephen James
@sjames1958gm
Aug 17 2017 15:39
@439236710 go to codepen.io and click on sign up
Ahmed Tarek
@ahmedtarek2134
Aug 17 2017 15:48
@439236710 you can sing up with your existing github account
Pedro Silva
@pedrosilvahtml
Aug 17 2017 16:37
Anyone here care to help me on some javascript code?
Afiur Rahman Fahim
@faahim
Aug 17 2017 16:45
of which level?
@pedrosilvahtml
I'm a biginner
If it's something within my scope, I am happy to help
Gersho
@Gersho
Aug 17 2017 16:47
intense yawn hello chat
Gersho
@Gersho
Aug 17 2017 16:53
https://codepen.io/Gersho/pen/YxWLBJ
opinion/suggestions please
Joseph
@revisualize
Aug 17 2017 17:43
Hi.
Gersho
@Gersho
Aug 17 2017 17:44
:wave:
Dhaval
@Dhavalc2012
Aug 17 2017 18:12
hey @DarrenfJ
whats up bud @DarrenfJ
Justin25
@Justin25
Aug 17 2017 18:15

Hi, I need help with this function

function checkIfNew (link) {
    MongoClient.connect('mongodb://Justin25:<password>@ds111771.mlab.com:11771/freecodecamp', function(err, db) {
        if (err) throw err;
        var query = { original: link};
        db.collection("links").find(query).toArray(function(err, result) {
          if (err) throw err;
          console.log (result);
          return result;
          db.close();
        });
      });
;}

The console.log shows the result, however it is returning undefined.

Emmanuel Akodia
@akodiaemma
Aug 17 2017 18:15
can any one please tell me the font awesome icons arent appearing on my page http://akodia488.github.io
can any one please tell me why the font awesome icons arent appearing on my page http://akodia488.github.io
Justin25
@Justin25
Aug 17 2017 18:18
@akodia488 Did you use this <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> ?
Dhaval
@Dhavalc2012
Aug 17 2017 18:18
you are returning inside function value @Justin25
what abt checkIFNew return value ?
Emmanuel Akodia
@akodiaemma
Aug 17 2017 18:19
@Justin25 no i am using font awesome
not using bootstrap
Justin25
@Justin25
Aug 17 2017 18:19
Whoops
Meant to paste this one <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>
Ryan Draves
@RyanDraves
Aug 17 2017 18:22
Hello, I'm having issues with checking for neighbors in the Game of Life. can anyone help?
Stephen James
@sjames1958gm
Aug 17 2017 18:40
@RyanDraves What's the issue?
@Justin25 Are you trying to return some thing from checkIfNew? If so you cannot because you are inside of a async callback
You can provide a callback, or return a promise either way the code that calls this function will have to handle async as well
Kingsley
@Kingwindie
Aug 17 2017 18:43

```
body {
margin: 0;
padding: :0;
}

.buttons {
margin-left: 500px;
padding-left: 0;
left: 80px;
width: 80px;
background-color: limegreen;
display: inline;
border-radius: 10px;
cursor: pointer;
transition: 3s;
}

.material-icons {
display: inline;
text-align: center;
letter-spacing: 15px;
font-size: 30px;
}

.material-icons:hover {
padding: 18px;
margin: 18px;
background: white;
transition: 1.8s;
}

<!DOCTYPE html>

<html>

<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="iconBtns.css">
<title>Button Icons</title>
</head>

<body>
<div class="buttons">
<i class="material-icons">build</i>
<i class="material-icons">home</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>

</div>
</body>

</html>

```how do i make the div descend to the middle of the screen?

body {
margin: 0;
padding: :0;
}
.buttons {
margin-left: 500px;
padding-left: 0;
left: 80px;
width: 80px;
background-color: limegreen;
display: inline;
border-radius: 10px;
cursor: pointer;
transition: 3s;
}
.material-icons {
display: inline;
text-align: center;
letter-spacing: 15px;
font-size: 30px;
}
.material-icons:hover {
padding: 18px;
margin: 18px;
background: white;
transition: 1.8s;
}
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="iconBtns.css">
<title>Button Icons</title>
</head>

<body>
<div class="buttons">
<i class="material-icons">build</i>
<i class="material-icons">home</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>
<i class="material-icons">favorite</i>

</div>
</body>

</html>
Ryan Draves
@RyanDraves
Aug 17 2017 18:44
@sjames1958gm I can't seem to place it! Right now the board is 10x10. When all 100 check for neighbors, essentially none of them return a correct number. When only 1 checks at a time, it returns a correct number. It sounds like a synchronization issue, but I'm using (let i=0) in my for loop to prevent it. Here's the codepen, right now the cell 4 from the top, 4 from the left (33) logs its neighbors. https://codepen.io/RyanDraves/pen/BdmmqV?editors=0001
Stephen James
@sjames1958gm
Aug 17 2017 18:47
@RyanDraves copyIndex = index is not copying the array
Ryan Draves
@RyanDraves
Aug 17 2017 18:47
@sjames1958gm when I click the same pattern of neighbors around 33, it'll always log the same incorrect pattern back, i.e. the top 3 will log back "top left" and "top right"
@sjames1958gm sorry, that's a leftover. copyIndex isn't in use
Stephen James
@sjames1958gm
Aug 17 2017 18:48
@RyanDraves So you are updating the grid will computing neighbors, won't that affect the counts?
Ryan Draves
@RyanDraves
Aug 17 2017 18:49
@sjames1958gm the "index" array is updated, the state isn't updated until the for loop is done
Stephen James
@sjames1958gm
Aug 17 2017 18:50
@RyanDraves duh, sorry
Ryan Draves
@RyanDraves
Aug 17 2017 18:50
@sjames1958gm I tried separating the state update with a different button entirely, and the same issue occurred. it is specifically the for loop acting out of whack
Stephen James
@sjames1958gm
Aug 17 2017 18:52
@RyanDraves What is special about 33? the grid goes from 0 - 99 left - right top - bottom?
Ryan Draves
@RyanDraves
Aug 17 2017 18:53
@sjames1958gm it's just what I had set up to log neighbors back
Stephen James
@sjames1958gm
Aug 17 2017 18:55
@RyanDraves Are you having cells on the far left adjacent to ones on the far right?
@RyanDraves so zero is adjacent to 9 ? and 0 is adjancent to 89?
Ryan Draves
@RyanDraves
Aug 17 2017 18:56
@sjames1958gm eventually, yes. It's not coded to yet, lines 88-95 only work for the inner 8x8, the issue is that the inner 8x8 doesn't work as it should
Ziya2017
@Ziya2017
Aug 17 2017 18:56
hey folks, Im badly stuck here, can anyone help me out?
blob
blob
Ryan Draves
@RyanDraves
Aug 17 2017 18:58
@sjames1958gm I'm not worried about the edges yet, I haven't even started coding for that yet. I would just like help getting the neighbor checking to work in the for loop for the inner 8x8 (not edges) that for some reason isn't working. I'm away the outer edge of boxes does not check correctly, but that shouldn't have an effect on the rest of the board
@Ziya2017 try moving that to line 1 and see if it's just being picky about what line it's checking
Stephen James
@sjames1958gm
Aug 17 2017 19:01
@Ziya2017 Thrid should be Third
Ryan Draves
@RyanDraves
Aug 17 2017 19:02
ahaha I didn't even see that. nice catch
Ziya2017
@Ziya2017
Aug 17 2017 19:03
@sjames1958gm stupid of me lol, thank buddy
CamperBot
@camperbot
Aug 17 2017 19:03
ziya2017 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8333 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 17 2017 19:03
@Ziya2017 no prob
Ryan Draves
@RyanDraves
Aug 17 2017 19:07
@sjames1958gm got any idea what's going on with the for loop? It looks to me like something is going asynchronous, but I thought using "let i=0" prevents that
Stephen James
@sjames1958gm
Aug 17 2017 19:11
@RyanDraves But there is nothing async about that loop. Its all basic js
Ryan Draves
@RyanDraves
Aug 17 2017 19:12
@sjames1958gm ¯_(ツ)_/¯
Stephen James
@sjames1958gm
Aug 17 2017 19:12
you'll probably want < 100 in the end but that should affect this
Ryan Draves
@RyanDraves
Aug 17 2017 19:12
oops I put 99 there on accident when tweaking it. ty
Stephen James
@sjames1958gm
Aug 17 2017 19:14
THe math seems correct.
Ryan Draves
@RyanDraves
Aug 17 2017 19:17
@sjames1958gm this one's got me for sure. when you do the 3 on the right side, "top right" doesn't log. when you do all 8 neighbors, "top right" logs
@sjames1958gm would I get performance issues if I had each and every cell check its neighbors on a copy of the array and set the state based on it? it would be 100 setStates to do so
each simulation would make a copy of index beforehand, the cells would reference that, update index, then setstate based on it
actually nevermind I would use a for loop on that anyways to go through all the cells. ugh
Gersho
@Gersho
Aug 17 2017 19:25
https://codepen.io/Gersho/pen/YxWLBJ
looking for opinions/advice on the design
Stephen James
@sjames1958gm
Aug 17 2017 19:27
@RyanDraves I think you have an issue with index begin assign to state and being a reference to the same array.
that is this.state.index is the same array as index
Ryan Draves
@RyanDraves
Aug 17 2017 19:28
@sjames1958gm the use of it itself or having the same name?
James Price
@JamesDavidPrice
Aug 17 2017 19:28
2
Stephen James
@sjames1958gm
Aug 17 2017 19:31
@RyanDraves When you use setState you are just passing the reference to index so the state has the same array reference.|
Ryan Draves
@RyanDraves
Aug 17 2017 19:32
@sjames1958gm ok, but isn't index different than the state index? wouldn't it update it?
Stephen James
@sjames1958gm
Aug 17 2017 19:34
@RyanDraves Arrays are by reference - this is simply passing the reference of index in as the state so they will be the same (try index: index.slice() and see if the behavior changes)
    this.setState( {
      index: index
    })
index.slice() creates a new array
You may have to do something with your click handler as well
Usama Mahmood
@usamacjs
Aug 17 2017 19:38
Screen Shot 2017-08-17 at 10.28.42 PM.png
Ryan Draves
@RyanDraves
Aug 17 2017 19:38
I changed both the state and setState on update() to be index: index.slice(). no change
Usama Mahmood
@usamacjs
Aug 17 2017 19:38
Screen Shot 2017-08-17 at 10.28.58 PM.png
can someone please help me make this white space go away
Screen Shot 2017-08-17 at 10.28.42 PM.png
between these two background pictures
Ryan Draves
@RyanDraves
Aug 17 2017 19:40
@sjames1958gm what would have to change on the click handle? for the manual clicking? that seems to be working, as it just runs the update method when it's done
Stephen James
@sjames1958gm
Aug 17 2017 19:41
@RyanDraves I guess its ok, index gets update before you setState everytime so index/state.index are aligned
Ryan Draves
@RyanDraves
Aug 17 2017 19:42
@usamacjs I can't see your css, but you likely have some margins/paddings going on between the thing above/below the whitespace
Ryan Draves
@RyanDraves
Aug 17 2017 19:43
@sjames1958gm the .splice() addition didn't change anything, but I see where you were coming from. I'm going through other projects now to see if there's anything similar that worked...
Albert Cardona II
@daddycardona
Aug 17 2017 19:47
get rid of your padding @usamacjs
and your margin
Ryan Draves
@RyanDraves
Aug 17 2017 19:47
@usamacjs try fudging with some of the margins. it's difficult to tell what's wrapped in what when you move the news section over to the left
Usama Mahmood
@usamacjs
Aug 17 2017 19:47
@daddycardona okay, let me try
@RyanDraves okay
Albert Cardona II
@daddycardona
Aug 17 2017 19:48
*{padding:0; margin:0;} takes all the padding and margins off all elments
Usama Mahmood
@usamacjs
Aug 17 2017 19:49
@daddycardona @RyanDraves okay, let me try. Thank You
CamperBot
@camperbot
Aug 17 2017 19:49
usamacjs sends brownie points to @daddycardona and @ryandraves :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @daddycardona |http://www.freecodecamp.com/daddycardona
:cookie: 312 | @ryandraves |http://www.freecodecamp.com/ryandraves
Albert Cardona II
@daddycardona
Aug 17 2017 19:50
you welcome :)
Stephen James
@sjames1958gm
Aug 17 2017 19:53
@RyanDraves Maybe that they refer to the same objects as well - a deep copy is required :(
Ryan Draves
@RyanDraves
Aug 17 2017 19:53
@sjames1958gm :( perhaps it's just a better idea to rewrite the code from a different approach
John Gabriel Simmons
@sosmaniac-FCC
Aug 17 2017 19:54
I am struggling to successfully animate React elements using the ReactCSSTransitionGroup add-on for javascript react. Does anyone familiar with react know what may be causing the problem? Here is the code: https://codepen.io/sosmaniac/pen/oepOGw?editors=0110
Stephen James
@sjames1958gm
Aug 17 2017 19:57
@RyanDraves Just change your array to true/false (boolean not an object, use slice() and just remove .living)
I don't think you use the index in the object
Mark Kubik
@KUBIX90
Aug 17 2017 20:07

function largestOfFour(arr) {

  var array = [];
  var largestNum = 0;

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

  //return array.push(largestNum);
}  

largestOfFour([[2, 15, 9, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
I'm getting the largest number of the first array, but nothing else. Any idea why?
the array.push was somethingn I tried but doesn't seem to work
Stephen James
@sjames1958gm
Aug 17 2017 20:09
@KUBIX90 You aren't saving the largest in the array after the inner loop completes
The push has to be inside the outer loop but after the inner loop and then reset largestNum
Mark Kubik
@KUBIX90
Aug 17 2017 20:11
@sjames1958gm How do I save the value once I get it?
and then move onto the next sub array
Stephen James
@sjames1958gm
Aug 17 2017 20:11
@KUBIX90 array.push(largestNum);
Don't return from inside the loops
push inside the loops - return after the loops
@RyanDraves Here is your code without the array of objects.
https://codepen.io/silgarth/pen/mMpYVa?editors=0011
Chris
@bestintown23
Aug 17 2017 20:14
is codepen moving slow for anyone, or does any one know how to resolve? my pen is loading slow and requires me to refresh the page sometimes to show my changes.
Mark Kubik
@KUBIX90
Aug 17 2017 20:17
function largestOfFour(arr) {

  var array = [];
  var largestNum = 0;

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

    return array;
}  

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
like this @sjames1958gm ?
Nevermind, I've worked it out now, thanks for your help!!
Ryan Draves
@RyanDraves
Aug 17 2017 20:56
@sjames1958gm thank you so much! it does look my array + object usage was causing isssues
CamperBot
@camperbot
Aug 17 2017 20:56
ryandraves sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8334 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Vuyani M Ngcana
@celfInfinite
Aug 17 2017 21:09
@KUBIX90 How do you insert your function code? when asking a question like you did by inserting largestOfFour
Mark Kubik
@KUBIX90
Aug 17 2017 21:10
@celfInfinite ```
wrap your code with that like so
code goes here
Razvan
@razvanlikespizza
Aug 17 2017 21:11
thizzz iz code
Uriel Guzmán
@Burinson
Aug 17 2017 21:12
https://codepen.io/Burinson/full/eEEdoK/
Can anyone tell me why my background floats all the way up in mobile devices?
The Wikipedia image
Razvan
@razvanlikespizza
Aug 17 2017 21:12
@Burinson Its looking perfect for me... :|
korzo
@korzo
Aug 17 2017 21:13
@Burinson also ok from here
It looks like this on my Samsung S4 >(
:(
@korzo .
@razvanlikespizza .
Albert Cardona II
@daddycardona
Aug 17 2017 21:16
do you have @media
Uriel Guzmán
@Burinson
Aug 17 2017 21:16
No
Albert Cardona II
@daddycardona
Aug 17 2017 21:16
imports in the css
Uriel Guzmán
@Burinson
Aug 17 2017 21:16
What is it and how can I implement it?
Albert Cardona II
@daddycardona
Aug 17 2017 21:16
That should help you
hold on a second
Uriel Guzmán
@Burinson
Aug 17 2017 21:16
Cool
@Burinson
Razvan
@razvanlikespizza
Aug 17 2017 21:17
@daddycardona Do you have "@media" ,wtf? xDD>.
Uriel Guzmán
@Burinson
Aug 17 2017 21:18
@daddycardona Oh, but how can I use to fix the problem? :(
Albert Cardona II
@daddycardona
Aug 17 2017 21:18
You know what I mean @razvanlikespizza it helps
Uriel Guzmán
@Burinson
Aug 17 2017 21:18
I don't even know what the problem is to begin with
Razvan
@razvanlikespizza
Aug 17 2017 21:18
@daddycardona Yeah, but it sounds very weeeird.
Vuyani M Ngcana
@celfInfinite
Aug 17 2017 21:18
@KUBIX90 thank you.
CamperBot
@camperbot
Aug 17 2017 21:18
celfinfinite sends brownie points to @kubix90 :sparkles: :thumbsup: :sparkles:
:cookie: 243 | @kubix90 |http://www.freecodecamp.com/kubix90
korzo
@korzo
Aug 17 2017 21:19
@Burinson There is problem with http://caniuse.com/#feat=background-attachment on old Android and Ios phones
Uriel Guzmán
@Burinson
Aug 17 2017 21:20
@korzo I see
Albert Cardona II
@daddycardona
Aug 17 2017 21:20
Well you have a smaller screen so it should section out the smaller screen to help with that old problem I believe I could be wrong @Burinson
Uriel Guzmán
@Burinson
Aug 17 2017 21:22
@korzo How can I replace that with something that works on old Android devices?
Vuyani M Ngcana
@celfInfinite
Aug 17 2017 21:27

When i run the code below:

$(document).ready(function() {
  $('#icon').click(function() {
    var text = document.getElementById('search').value.replace(/\s/g,"%20");
    var url = "https://en.wikipedia.org/w/api.php?action=opensearch&search="+text+"&format=json";
   //console.log(url);
    //$.getJSON(url, function(json) {
      //console.log(json);
    //});
    $.ajax({
      type:"GET",
      url:url,
      async:true,
      datatype:"json",
      success:function(data) {
        console.log(data);
      },
      error:function(errorMessage) {
        console.log(errorMessage);
      }
    });
  });
});

i get this error bold Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://en.wikipedia.org/w/api.php?action=opensearch&search=Tupac&format=json. (Reason: CORS header 'Access-Control-Allow-Origin' missing). (unknown)
Object { readyState: 0, getResponseHeader: getResponseHeader(), getAllResponseHeaders: getAllResponseHeaders(), setRequestHeader: setRequestHeader(), overrideMimeType: overrideMimeType(), statusCode: statusCode(), abort: abort(), state: state(), always: always(), catch: catch(), 8 more… }

how do i solve this.

korzo
@korzo
Aug 17 2017 21:28
@Burinson I had once this problem before and if I remember it correctly, I solved it with image with position: fixed and z-index: 0
Albert Cardona II
@daddycardona
Aug 17 2017 21:34
why don't you use for var text = $('#search').value.replace( etc..
@celfInfinite
Uriel Guzmán
@Burinson
Aug 17 2017 21:35
@korzo
body {
    background-color: #333;
    background-image: url(http://i.imgur.com/9G15yHV.png);
    background-size: cover;
 background-attachment: fixed;
 background-repeat: no-repeat;
 background-position: center center;
    z-index: 0;
    position: fixed;
}
Tried this, doesn't work :(
Albert Cardona II
@daddycardona
Aug 17 2017 21:36
if you google it you might find out a replacement of the code for your issue @Burinson let me try :)
Albert Cardona II
@daddycardona
Aug 17 2017 21:41
@korzo I was literally looking at that post lol
korzo
@korzo
Aug 17 2017 21:42
@Burinson @daddycardona I had this link im my notes so I suppose it worked
Albert Cardona II
@daddycardona
Aug 17 2017 21:42
LOL
I see a lot of different ones but I am going to suggest a s5 or greater phone LOL
Stephen James
@sjames1958gm
Aug 17 2017 21:54
@celfInfinite add origin=* to your URL to circumvent CORS
Margaret
@Margaret2
Aug 17 2017 21:57

@daddycardona
re: your question from last night about where the e comes from

arr.map((e,i)=> .....)

the answer is that the function used inside of .map() can take 3 arguments: the element in the array, the index of the element, and the array itself. So sometimes it's good to use the letters (e, i, a) to remember what each one stands for.

Albert Cardona II
@daddycardona
Aug 17 2017 22:01
@Margaret2 I figured that out it was from the arr I looked up the method and stared at your code for a long time. How come it works only reverse? that threw me in a loop I tried to unloop it and changed the letter "M" around but no joy. You are a gifted programmer ;)
I even used arr.map(function(e,i) instead of ((e,i) =>
Margaret
@Margaret2
Aug 17 2017 22:02
@daddycardona my guess is it only works in reverse because of the way i ordered the characters for 4 and 9, but i'm not 100% sure - and thank you :smile: :smile:
CamperBot
@camperbot
Aug 17 2017 22:02
margaret2 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 316 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Aug 17 2017 22:03
I got brownie points from the master of javascript yay LOL
Margaret
@Margaret2
Aug 17 2017 22:03
:joy:
Albert Cardona II
@daddycardona
Aug 17 2017 22:05
So @Margaret2 I reversed the order of 4 and 9 from the checks inside and was like wow, the funny thing is that I saw the hint's solution, they had 3 of them and only the basic one worked lmao
Margaret
@Margaret2
Aug 17 2017 22:05
the other ones didn't work?? :scream:
Albert Cardona II
@daddycardona
Aug 17 2017 22:06
yeah I clicked the run snippet or code and put in 36 and it was like mmmcv instead of xxxvi
Margaret
@Margaret2
Aug 17 2017 22:07
oh wow
Albert Cardona II
@daddycardona
Aug 17 2017 22:08
XCVII that is what the second solution, the intermediate solution put for 36
XCVII this is from the third solution lol
Margaret
@Margaret2
Aug 17 2017 22:09
:( :( wow... i wanna go try it now :smile:
Albert Cardona II
@daddycardona
Aug 17 2017 22:09
LOL
Margaret
@Margaret2
Aug 17 2017 22:12
@daddycardona oh, you know what, it's not that it doesn't work, it's that REPL won't let you run it with different values unless you fork it, so it just keeps outputting the same thing
:P that really sucks why would they do that...
Albert Cardona II
@daddycardona
Aug 17 2017 22:12
oh lmao lol
@Margaret2 doesn't matter your solution by far is the best I seen so far and haves the least amount of actual code
I am trying to fix it without reverse but I just can't seem to do that lol
Margaret
@Margaret2
Aug 17 2017 22:15
haha thanks :D i was noticing it actually looks similar to the 3rd solution
Albert Cardona II
@daddycardona
Aug 17 2017 22:16
yeah but they still had more lines of code and they use reverse too lol
so since I looked at many different codes I don't understand the how the while loop was able to xxx if they are iterating through the indexes of the decimals I was so confused on that but oh well
Razvan
@razvanlikespizza
Aug 17 2017 22:27
How to make my website stop resizing to a certain width? Uhmm...Any ideas?
Albert Cardona II
@daddycardona
Aug 17 2017 22:28
you must have it background-size: cover
Margaret
@Margaret2
Aug 17 2017 22:28
also try giving elements a min-width
Albert Cardona II
@daddycardona
Aug 17 2017 22:29
and max-width
BryanS
@BSISJ7
Aug 17 2017 22:31

When I remove a recipe component from my recipes array, the its parent component does not update. this.setState should re-render the component right? For some reason all the recipes remain in the parent component even if they are removed from they array.

removeRecipie(index){
    var getRec = this.state.recipies;
    for(var x = 0; x < this.state.recipies.length; x++){
      if(Number(this.state.recipies[x]["props"]["index"]) === Number(index)){
        getRec.splice(x, 1);
      }
    }
    this.setState({recipies: getRec});
  }

Codepen Link: https://codepen.io/bsisj7/pen/vJePLg?editors=0011

Albert Cardona II
@daddycardona
Aug 17 2017 22:33
console.log this maybe it is not what you think it is just a selection
Razvan
@razvanlikespizza
Aug 17 2017 22:35
@daddycardona @Margaret2 Trying...:3
Albert Cardona II
@daddycardona
Aug 17 2017 22:36
I always do all my projects on vscode first because when I console log something here i get confused but I see 0 and null at the bottom
BryanS
@BSISJ7
Aug 17 2017 22:42
Unfortunately it says the log is too large to display.
Albert Cardona II
@daddycardona
Aug 17 2017 22:45
inspect the elment you just have an array mainwindow @BSISJ7
and the second one gives me null or 0 or both when you click the x that is @BSISJ7
@BSISJ7 those are error codes I don't know react yet so I can't help you like I want too this is the error I get when I add a recepi Uncaught Error: Minified React error #119
BryanS
@BSISJ7
Aug 17 2017 22:57
@daddycardona Are you're referring to this.setState({recipies: getRec}); is giving you the 0/null value?
Albert Cardona II
@daddycardona
Aug 17 2017 22:59
yes but like I said I don't know reat so I was confused with that more importantly when I was looking at your code every time i console log.this or even this.state or even this.state.index what I got in return was mainwindow{props etc..
removeRecipie(){ this.props.removeRecipie(this.state.index); }
in that section I put a console log this MainWindow {props: {…}, context: {…}, refs: {…}, updater: {…}, state: {…}, …}
it dont matter what i put
Gersho
@Gersho
Aug 17 2017 23:03
hello chat !
BryanS
@BSISJ7
Aug 17 2017 23:04
Hello @Gersho
Gersho
@Gersho
Aug 17 2017 23:05
https://codepen.io/Gersho/pen/YxWLBJ
should be it i think, but i'm open to design suggestions
cowCrazy
@cowCrazy
Aug 17 2017 23:07
@Gersho really unique and cool design!!! I like it
Gersho
@Gersho
Aug 17 2017 23:07
@cowCrazy it changes color in pause mode too ;)
set it to 1 min 1 min if you want to see it (you can hold down mouse to scroll time faster)
BryanS
@BSISJ7
Aug 17 2017 23:08
@daddycardona That's odd, maybe it only works in codepen then. I can get the state and index value normally, but I have to put this in a foreach loop to see what is in it.
cowCrazy
@cowCrazy
Aug 17 2017 23:10
@Gersho exactly what I did ;)
Gersho
@Gersho
Aug 17 2017 23:11
guess it's ready to submit then
Albert Cardona II
@daddycardona
Aug 17 2017 23:13
@BSISJ7 this is what i get when I clik th elink they give me https://facebook.github.io/react/docs/error-decoder.html?invariant=119
BryanS
@BSISJ7
Aug 17 2017 23:13
@Gersho Looks very good, though I think you might need a timer.
Gersho
@Gersho
Aug 17 2017 23:13
a timer ?
Albert Cardona II
@daddycardona
Aug 17 2017 23:14
blob
BryanS
@BSISJ7
Aug 17 2017 23:15
@Gersho Sorry, alarm sound. I'm not sure if that's actually required or not though.
Gersho
@Gersho
Aug 17 2017 23:15
it's not, but it's a good idea (2 actually, one for start of break, one for get back to work)
any good place to look for open sound already hosted ?
BryanS
@BSISJ7
Aug 17 2017 23:17
@daddycardona Thanks a lot, it was my ref in the recipe component that was stopping it from working.
CamperBot
@camperbot
Aug 17 2017 23:17
bsisj7 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @daddycardona |http://www.freecodecamp.com/daddycardona
Mike
@MikeJSchorah
Aug 17 2017 23:17
How do you shrink an image in GIMP so it uploads as being shrunk?
Mike Boardley
@Boardley
Aug 17 2017 23:18
Sweet. Brownie points.
I like Brownie points
Albert Cardona II
@daddycardona
Aug 17 2017 23:18
so happy I could help @BSISJ7 :)
Albert Cardona II
@daddycardona
Aug 17 2017 23:22
you can use windows sounds lol
I just like brownies @Boardley
Mike
@MikeJSchorah
Aug 17 2017 23:23
apart from fooling around in GIMP 1,000,000 times
Gersho
@Gersho
Aug 17 2017 23:25
@BSISJ7 they both offer download, but i was looking for something a bit like cdnjs and font libraries, a bit like the sounds from the simon game
Albert Cardona II
@daddycardona
Aug 17 2017 23:29
put links to a song
I use a song to wake up :)
BryanS
@BSISJ7
Aug 17 2017 23:31
@MikeJSchorah scale image isn't working?
Albert Cardona II
@daddycardona
Aug 17 2017 23:31
well now that I completed the roman numerals by looking at all the codes out there then incorporated the one that was easiest for me to understand I am trying to figure out how to say hasOwnProperty(withKeys) of two arrays LOL
BryanS
@BSISJ7
Aug 17 2017 23:33
@Gersho Unfortunately I don't know about any.
Gersho
@Gersho
Aug 17 2017 23:33
isn't hasOwnProperty a method for objects ?
(as in, not for arrays)
Albert Cardona II
@daddycardona
Aug 17 2017 23:33
that is what I meant lol
ahhh its an array of objects
Well at leat the first one ins an array of objects and the second one is an object
Gersho
@Gersho
Aug 17 2017 23:34
what's the challenge name ?
Mike
@MikeJSchorah
Aug 17 2017 23:37
@BSISJ7 Never does. I always need to adjust the canvas size constantly and whatnot.
Albert Cardona II
@daddycardona
Aug 17 2017 23:39
Wherefore art thou
@Gersho
but I am about to go lose some weight by playing basketball see you all later ;) ]
BryanS
@BSISJ7
Aug 17 2017 23:44
Take care @daddycardona.
Seems good?
cowCrazy
@cowCrazy
Aug 17 2017 23:52
@ericmiller777 this StarCraft addiction.... I was there once ;) yup look good :)
Eric Miller
@ericmiller777
Aug 17 2017 23:53
@cowCrazy actually that's the channels recommended from freeCodeCamp except one
I plan to change them later
Gersho
@Gersho
Aug 17 2017 23:53
feels weird to have the top banner react on mouse over when it can't be clicked, but looks nice !
cowCrazy
@cowCrazy
Aug 17 2017 23:53
yup I know..... it is almost always live
Eric Miller
@ericmiller777
Aug 17 2017 23:54
@Gersho oh I planned to have it link to twitch, I forgot