These are chat archives for FreeCodeCamp/HelpJavaScript

15th
Feb 2018
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:01
morning people, I some help
cjlynch12
@cjlynch12
Feb 15 2018 00:01
@Hoxtygen whats up?
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:03
I have a question which i tried giving solution to but its not working for larger value.... Here's the question and my solution
// The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?

function primeFactor () {
  // body... 
  var container = []
  for (var i = 0; i <= 600851475143; i++) {
    if (600851475143 % i === 0) {
      container.push(i)
    }
  }
  return container.reduce(function (x, y) {
    return (x > y) ? x : y
  })
}
Jason Luboff
@JLuboff
Feb 15 2018 00:03
...how long does that take to run?
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:04
@JLuboff long enough that i have never been able to get an output
Jason Luboff
@JLuboff
Feb 15 2018 00:04
:D
cjlynch12
@cjlynch12
Feb 15 2018 00:04
lol that's the problem
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:05
@JLuboff @cjlynch12 works for smaller vallues though
cjlynch12
@cjlynch12
Feb 15 2018 00:05
yeah, you'll wanna swap the long hard coded val for something that only goes as high as the number that is passed to the primeFactor function
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:07
@cjlynch12 I tried that but I failed, reason why i hard coded the value thinking it would pass me. same ol same old
@cjlynch12 here's my original code before hardcoding the value
function primeFactor (value) {
  // body... 
  var container = []
  for (var i = 0; i <= value; i++) {
    if (value % i === 0) {
      container.push(i)
    }
  }
  return container.reduce(function (x, y) {
    return (x > y) ? x : y
  })
}
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:13
any idea why it's not passing, or could it be the logic is wrong?
cjlynch12
@cjlynch12
Feb 15 2018 00:14
logic is a little off, try this:
-Create a function that generates the numbers from 1 to num and check if they are prime along the way.
-Declare the variables that will be needed.
-Start with 2, if it has not been marked and added to the sieve array then it is a prime and we add it to the prime array.
-Add the others to the sieve array.
-Return the primes
-Loop through the returned array and add all the elements to then return the final value.
there's a bunch of solutions, but those are the pseudo code steps
Stephen James
@sjames1958gm
Feb 15 2018 00:33
@Hoxtygen The problem is you are pushing non-primes to the array. You are pushing all factors not just prime ones.
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:38
@sjames1958gm now I'm getting to understand the question
@sjames1958gm prime factors, not all factors.....
Stephen James
@sjames1958gm
Feb 15 2018 00:39
@Hoxtygen That is what I guessed from the function name
Idowu Wasiu
@Hoxtygen
Feb 15 2018 00:52
@cjlynch12 going by your pseudocode, i came up with this
function prime (num) {
  var placeholder = [];
  var container = [];
  // body... 
  for (var i = 2; i < num; i++) {
    if (isPrime(i)) {
      // statement
      placeholder.push(i)
    }
  }
  //return placeholder;
  for (var i = 0; i < placeholder.length; i++) {
    if (num % placeholder[i] === 0) {
      // statement
      container.push(placeholder[i]);
    }
  }
  return container.reduce(function (x, y) {
    /* body... */      
     return (x > y) ? x : y;
  });

  function isPrime(x) {
    //var placeholder = [];
    // body... 
    for (var i = 2; i < x; i++) { //loop through the parameter but one less than it
        if (x % i === 0) { //if each of the parameter value divides x without any remainder
            return false; //it's not a prime number
        }
    }
    return true; // if there's a remainder, its a prime number
  }
}
Stephen James
@sjames1958gm
Feb 15 2018 00:59
@Hoxtygen You could check for factor in the first loop and drop the second loop.
What is the purpose of the reduce? Are you supposed to find the largest prime factor?
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:00
@sjames1958gm yes, looking for the largest primefactor
Stephen James
@sjames1958gm
Feb 15 2018 01:00
@Hoxtygen Then it would just be the last one found in the first loop?
cjlynch12
@cjlynch12
Feb 15 2018 01:00
^
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:01
@sjames1958gm that should be it
cjlynch12
@cjlynch12
Feb 15 2018 01:01
are you trying to find the largest primefactor or to sum all the prime numbers between 0 and the num provided? Sorry I thought you were doing the FCC sum all primes challenge
if it's just the largest primefactor then do what @sjames1958gm said
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:02
@cjlynch12 na, the largest... not FCC, it's project euler challenge
cjlynch12
@cjlynch12
Feb 15 2018 01:02
ahh got cha, my mistake. well you have all the code there just gotta return the right part :)
Stephen James
@sjames1958gm
Feb 15 2018 01:03
    var answer = num;
    for (var i = 2; i < num; i++) {
        if (num % i === 0 && isPrime(i)) {
          answer =  i
        }
    }
    return answer;
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:03
@sjames1958gm @cjlynch12 thank you guys, i knew i needed to talk to someone
CamperBot
@camperbot
Feb 15 2018 01:03
hoxtygen sends brownie points to @sjames1958gm and @cjlynch12 :sparkles: :thumbsup: :sparkles:
:star2: 8977 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
:cookie: 427 | @cjlynch12 |http://www.freecodecamp.org/cjlynch12
Stephen James
@sjames1958gm
Feb 15 2018 01:04
@Hoxtygen :+1:
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:07
@sjames1958gm @cjlynch12 and sorry to bother you guys, ive got another one... got confused halfway on this one.............the question is a bit long please bear with me
the question
The prime numbers are not regularly spaced. For example from 2 to 3 the gap is 1. From 3 to 5 the gap is 2. 
From 7 to 11 it is 4. Between 2 and 50 we have the following pairs of 2-gaps primes: 
3-5, 5-7, 11-13, 17-19, 29-31, 41-43

A prime gap of length n is a run of n-1 consecutive composite numbers between two successive primes 
(see: http://mathworld.wolfram.com/PrimeGaps.html).

We will write a function gap with parameters:

g (integer >= 2) which indicates the gap we are looking for

m (integer > 2) which gives the start of the search (m inclusive)

n (integer >= m) which gives the end of the search (n inclusive)

In the example above gap(2, 3, 50) will return [3, 5] or (3, 5) or {3, 5} which is the first pair 
between 3 and 50 with a 2-gap.

So this function should return the first pair of two prime numbers spaced with a gap of g between the limits
 m, n if these numbers exist otherwise nil or null or None or Nothing (depending on the language).

In C++ return in such a case {0, 0}. In F# return [||]. In Kotlin return []

#Examples: gap(2, 5, 7) --> [5, 7] or (5, 7) or {5, 7}

gap(2, 5, 5) --> nil. In C++ {0, 0}. In F# [||]. In Kotlin return[]`

gap(4, 130, 200) --> [163, 167] or (163, 167) or {163, 167}

([193, 197] is also such a 4-gap primes between 130 and 200 but it's not the first pair)
Stephen James
@sjames1958gm
Feb 15 2018 01:10
@Hoxtygen You want to search from m to n for prime numbers and find the first two where the difference is g
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:10
@sjames1958gm yes
my halfway solution
function gap (x, y, z) {
    var container = [];
    for (var i = y; i < z; i++) {
        if (isPrime(i)) {
            // statement
            container.push(i);
        }
    }
    return container// i got stuck here, not sure how to do the subtraction to get the desired result
    // i mean getting the values in the container to subtract each other out 


    unction isPrime(x) {
    var placeholder = [];
    // body... 
    for (var i = 2; i < x; i++) { //loop through the parameter but one less than it
        if (x % i === 0) { //if each of the parameter value divides x without any remainder
            return false; //it's not a prime number
        }
    }
    return true; // if there's a remainder, its a prime number
}
}
Stephen James
@sjames1958gm
Feb 15 2018 01:14
start with the second number and compare to the previous until the gap is found or you run out of numbers
container[1] - gap === container[0]
or
container[1] - container[0] === gap
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:16
@sjames1958gm one problem down, how do i get the two values that produces gap?
Stephen James
@sjames1958gm
Feb 15 2018 01:17
@Hoxtygen What does that container array hold?
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:19
@sjames1958gm it will hold the prime numbers between y and z, if the subtraction of any two of the prime numbers produces x , i want to return the two numbers
@sjames1958gm want to return the first instance of the two numbers that produces x
Stephen James
@sjames1958gm
Feb 15 2018 01:21
@Hoxtygen I would start with i = 1 and compare container[i] with container[i - 1] and return those two numbers if the gap matches
Idowu Wasiu
@Hoxtygen
Feb 15 2018 01:23
@sjames1958gm thanks man, you've been of great help... need to go offline and complete the problems, I need to sleep a happy man tonight
CamperBot
@camperbot
Feb 15 2018 01:23
hoxtygen sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Stephen James
@sjames1958gm
Feb 15 2018 01:24
@Hoxtygen :sleepy:
:)
Adam Faraj
@adamfaraj
Feb 15 2018 01:52
i have input checkboxes that i want to display divs depending on what checkboxes are clicked
Brad
@bradtaniguchi
Feb 15 2018 01:53
@adamfaraj probably need to hide/show the divs when the checkboxes are clicked.
Adam Faraj
@adamfaraj
Feb 15 2018 01:54
image.png
image.png
so if i have all 4 checkboxes checked, only the right 2 divs should be displayed
i'm able to put the checked checboxes into an array, and have the certifications in another array
i tried to this (divArray.includes(checkboxArray)
Adam Faraj
@adamfaraj
Feb 15 2018 01:59
but i keep getting false, even if the divArray does have an element from the checkbox Array
i hope i'm making sense
Brad
@bradtaniguchi
Feb 15 2018 02:00
I feel like includes is not working between the divArray and the checkboxArray, whats in the checkbox array? booleans?
same with the divArray
Adam Faraj
@adamfaraj
Feb 15 2018 02:01
@bradtaniguchi checkboxArray = ["Commercial Pro", "Residential Pro"]
essentially, things that are checked
divArray = ["Installation Pro", "Residential Pro", "Service Pro"]
Brad
@bradtaniguchi
Feb 15 2018 02:02
@adamfaraj Alright, so your original includes check sees if the ENTIRE checkbox array exists in the divArray, which is doesn't thus its false
You need to check each item individually using a loop or something
Adam Faraj
@adamfaraj
Feb 15 2018 02:03
if Commercial is checked, that Div shouldn't be displayed. and it also shouldn't be displayed if Residential Is checked, because div doesn't have commercial in its array
Brad
@bradtaniguchi
Feb 15 2018 02:03
That sort of logic is left to you, where you need to make multiple include checks, for each string
Amit Patel
@AmitP88
Feb 15 2018 02:06
hey guys, I'm trying to optimize my tribute page using Google Pagespeed Insights and I need a little help. How do I eliminate render-blocking CSS when using bootstrap's CDN? I clicked on the suggested link but the info wasn't that helpful in this scenario
ps.png
Brad
@bradtaniguchi
Feb 15 2018 02:08
@AmitP88 They MIGHT be talking about the defer or async attribute
shoot sorry thats for scripts, your talking about css links right
Amit Patel
@AmitP88
Feb 15 2018 02:08
@bradtaniguchi yeah
Brad
@bradtaniguchi
Feb 15 2018 02:10
@AmitP88 Are you loading the css at the top of the page? It might be referring to that, but I'm not too sure.
IE in the head
Adam Faraj
@adamfaraj
Feb 15 2018 02:10
what order are you linking your stuff?

<head>
css stuff
</head>

<body>
....
<script></script>
</body>

Amit Patel
@AmitP88
Feb 15 2018 02:11
@bradtaniguchi yeah, it's in the head:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <!--   Bootstrap v.3.3.7 CSS CDN   -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link rel="stylesheet" href="./styles.css">
        <title>Tribute Page - Siddhartha Gautama (Buddha)</title>
    </head>
    <body>
Brad
@bradtaniguchi
Feb 15 2018 02:14
@AmitP88 You could try to ghetto move the css requests to the bottom of the body (like the javascript), or you could load the css dynamically using JS. Since HTML supports defer loading of HTML, but it doesn't for CSS you have to do some sorta work around in a way
Amit Patel
@AmitP88
Feb 15 2018 02:16
@bradtaniguchi hmmmm, i'll try moving it to the bottom and see if it makes any difference
@adamfaraj thanks for the link, i'll check it out
CamperBot
@camperbot
Feb 15 2018 02:16
amitp88 sends brownie points to @adamfaraj :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @adamfaraj |http://www.freecodecamp.org/adamfaraj
Adam Faraj
@adamfaraj
Feb 15 2018 02:18
@bradtaniguchi
for (i = 0; i < $dealers.length; i++) {

            for (j = 0; j < eventData.certifications.length; j++) {

                var dealerCertArray = $dealers.eq(i).attr('data-certifications').split(",");
                console.log(eventData.certifications);
                console.log(dealerCertArray);
                console.log(dealerCertArray.includes(eventData.certifications[j]));
i think this worked
got false for my first iteration
checkboxArray = ["Commercial Pro"]
divArray = ["Installation Pro", "Residential Pro", "Service Pro"]
false
then got true for my second iteration
Amit Patel
@AmitP88
Feb 15 2018 02:20
@bradtaniguchi after some googling, I think I'll have to download the bootstrap files, compress the css, then pagespeed it again
Adam Faraj
@adamfaraj
Feb 15 2018 02:20
checkboxArray = ["Commercial Pro"]
divArray = ["Installation Pro", "Commercial Pro", "Residential Pro", "Service Pro"]
true
woo
@AmitP88 look into media queries as well. at least, thats what is says
Amit Patel
@AmitP88
Feb 15 2018 02:21
@adamfaraj oh yeah, I know about media queries. I just wanted to utilize Bootstrap just for the Tribute project to show that I can use it
Adam Faraj
@adamfaraj
Feb 15 2018 02:22
@AmitP88 how long have you been coding?
Amit Patel
@AmitP88
Feb 15 2018 02:22
@adamfaraj I've been coding off and on since 2015, but this year I've decided to get serious about it
Adam Faraj
@adamfaraj
Feb 15 2018 02:24
@AmitP88 ok. just wondering. i used to use Bootstrap as a crutch, but when my senior web dev mentor told me to try to make my own stuff from scratch, it really helped me learn faster
Brad
@bradtaniguchi
Feb 15 2018 02:24
@adamfaraj good, in this case I wouldn't use for loops, Id use .forEach, just to prevent potential off by 1 errors and clean up the global namespace
Adam Faraj
@adamfaraj
Feb 15 2018 02:25
@bradtaniguchi wait
it's buggy
Amit Patel
@AmitP88
Feb 15 2018 02:25
@adamfaraj yeah, my dev friend told me to do that too, to be more tool agnostic. So I figured I could just use Bootstrap just for the Tribute page to show that I know how to use it, then for the rest of the FCC projects just make it responsive from scratch
Adam Faraj
@adamfaraj
Feb 15 2018 02:25
@AmitP88 thumbs up
Amit Patel
@AmitP88
Feb 15 2018 02:26
@adamfaraj thanks
CamperBot
@camperbot
Feb 15 2018 02:26
amitp88 sends brownie points to @adamfaraj :sparkles: :thumbsup: :sparkles:
api offline
Adam Faraj
@adamfaraj
Feb 15 2018 02:28
@bradtaniguchi
checkArray = ["Residential Pro", "Commercial Pro"]
divArray = ["Installation Pro", "Residential Pro", "Service Pro"]
true
just because divArray has "Residential" it returns true. but it doesn't have Commercial, so I want it to return false
Brad
@bradtaniguchi
Feb 15 2018 02:31

@adamfaraj You need to expand your logic for your use case. IE:

if (divArray.includes('Residential Pro') && divArray.includes('Commercial Pro')) {
  //do stuff
}

I think you made 1 to many loops, the inner loop is going to deep, you need to more or less do it manually
Unless you use some data structure to abstract your use case

Adam Faraj
@adamfaraj
Feb 15 2018 02:31
@bradtaniguchi i could use .every()?
Brad
@bradtaniguchi
Feb 15 2018 02:32
@adamfaraj Yea, probably. I'm having a tough time understanding the use case (when to show/hide what) so it's hard for me to give more explicit advice.
Adam Faraj
@adamfaraj
Feb 15 2018 02:34
image.png
Ayush Bahuguna
@relentless-coder
Feb 15 2018 02:34
Hey, everyone, need help with this garbage code of mine https://codepen.io/ayushb/pen/gvGYPj
I am trying to build a loader, the concept is that the red div first grows to a certain width and then gets reduced to zero, and all the while the margin if it isn't greater than 650 keeps on increasing
Adam Faraj
@adamfaraj
Feb 15 2018 02:35
@bradtaniguchi see how the left div is displayed, even though i have all the checkboxed checked. it shouldn't be displayed, because it does not have "Commercial" in its array
Ayush Bahuguna
@relentless-coder
Feb 15 2018 02:35
but the issue is, after growing the div immediately gets reduced to zero, I was hoping if i could get it to reduce in regular decrements
Brad
@bradtaniguchi
Feb 15 2018 02:36
@adamfaraj What left div?
Adam Faraj
@adamfaraj
Feb 15 2018 02:37
aqua experts
Brad
@bradtaniguchi
Feb 15 2018 02:39
So commercial is checked at the top, but commercial is not shown in the bottem left card and that is wrong, right?
Under what circumstances is it to be shown?
Adam Faraj
@adamfaraj
Feb 15 2018 02:39
correct
only if ALL the checkboxArray elements are in the divArray elements
like a subset
abraham anak agung
@padunk
Feb 15 2018 02:41
@adamfaraj have you done tic tac toe project? i think it almost the same
Adam Faraj
@adamfaraj
Feb 15 2018 02:41
@padunk i haven't
Brad
@bradtaniguchi
Feb 15 2018 02:41
@adamfaraj Using .every in this case would work. I'm sure you could do something more complicated with a better datastructure. (you mention subset, and using the Set object would work here aswell)
abraham anak agung
@padunk
Feb 15 2018 02:42
@adamfaraj just use simple for loop and includes can work too
Brad
@bradtaniguchi
Feb 15 2018 02:42
var showCommercial = checkboxArray.every((checkbox) => divArray.includes(checkbox));
@padunk Are you a Metallica fan, I ask cuse your avatar looks like their Logo from afar haha
abraham anak agung
@padunk
Feb 15 2018 02:43
@bradtaniguchi yes... :metal: hahaha
Brad
@bradtaniguchi
Feb 15 2018 02:44
@padunk haha alright, I love Metallica haha
abraham anak agung
@padunk
Feb 15 2018 02:46
@bradtaniguchi yeah, but never got to their concert...that's in my wishlist :smile:
Brad
@bradtaniguchi
Feb 15 2018 02:47
@padunk Its pretty awesome, I was able to go to the last one that was near me. It defiantly something to keep an eye out for haha
abraham anak agung
@padunk
Feb 15 2018 02:50
@bradtaniguchi yeah. i hope someday if they make one here, i must go...
Adam Faraj
@adamfaraj
Feb 15 2018 04:18
@bradtaniguchi still here?
Adam Faraj
@adamfaraj
Feb 15 2018 04:42
can anyone tell me why this:
!arr1.some(val => arr2.indexOf(val) == -1)
doesn't equal the same as this:
arr1.some(val => arr2.indexOf(val) >= 0)
abraham anak agung
@padunk
Feb 15 2018 04:44
@adamfaraj the first look for -1 that means val is not in arr.2
the latter is val is in arr2
Adam Faraj
@adamfaraj
Feb 15 2018 04:45
even with the "!" in front of arr1 in the first?
it's the "!" that's throwing me off
abraham anak agung
@padunk
Feb 15 2018 04:49
@adamfaraj sorry i missed that ! !arr1.some(val => !arr2.indexOf(val) == -1); will same as the latter one
i want to explain it. but gtg, sorry
Claudio Restifo
@Marmiz
Feb 15 2018 05:20

@adamfaraj
some test if at least one element pass the callback.

so for example

arr1 = [1,2];  arr2=[1,3]

arr1.some(val => arr2.indexOf(val) == -1) // return true because at least one number is not present (2)
//therefore
!arr1.some(val => arr2.indexOf(val) == -1) // return false.

//on the other hand
arr1.some(val => arr2.indexOf(val) >= 0) // return true since 1 is in common.

Your two comparison works if the two arrays don't have ANY number in common. As soon as one is, it won't be in sync.
Makes sense?

Adam Faraj
@adamfaraj
Feb 15 2018 05:23
@Marmiz why wouldn't arr1.some(val => arr2.indexOf(val) == -1) return false, since some() tests whether at least one element in the array passes the test
Adam Faraj
@adamfaraj
Feb 15 2018 05:33
@Marmiz wait, got it. had to reread it
Claudio Restifo
@Marmiz
Feb 15 2018 05:35
@adamfaraj I know it's not written clear but one has the ! in front, like you did :)
aRtoo
@artoodeeto
Feb 15 2018 06:54
is there a better solution on this one? feel like my solution is long.
function squareDigits(num){
may the code be with you
return parseInt(num.toString().split('').map( (num) => num*num).join('').replace(',',''),10);
}

squareDigits(9119); //return 811181
Sweet Coding :)
@SweetCodingInc
Feb 15 2018 07:00
@artoodeeto return num*num ?
Gersho
@Gersho
Feb 15 2018 07:07
no he squares the digits not the number
why is the replace necessary ?
Sweet Coding :)
@SweetCodingInc
Feb 15 2018 07:23
ah! I see
Markus Kiili
@Masd925
Feb 15 2018 07:33
@artoodeeto Fine solution if you remove the replace.
Gersho
@Gersho
Feb 15 2018 07:35
you removed your attempt before i was done reading :P
Markus Kiili
@Masd925
Feb 15 2018 07:48
It was effectively the same solution.
Sweet Coding :)
@SweetCodingInc
Feb 15 2018 07:55
@artoodeeto
function squareDigits(num){
  return +num.toString().split('').map(n => n*n).join('');
}

squareDigits(9119); // 811181
Jason Luboff
@JLuboff
Feb 15 2018 16:06
Morning
Tom
@moT01
Feb 15 2018 16:06
:hatched_chick:
Jason Luboff
@JLuboff
Feb 15 2018 16:07
Whats up?
Tom
@moT01
Feb 15 2018 16:07
nothing, i made a fish tank https://s.codepen.io/moT01/pen/NyvvWX
Jason Luboff
@JLuboff
Feb 15 2018 16:08
Thats pretty neat
Tom
@moT01
Feb 15 2018 16:08
its not bad
ive been forced to come into some of these chat rooms i never used to hang out in - cause the other ones are so dead
Jason Luboff
@JLuboff
Feb 15 2018 16:10
Not like this one is super active either :(
cjlynch12
@cjlynch12
Feb 15 2018 16:10
hey there's dozens of us!
Tom
@moT01
Feb 15 2018 16:11
yea, they're all pretty quiet
Kaz Baig
@kbaig
Feb 15 2018 16:11
fistfuls
Jason Luboff
@JLuboff
Feb 15 2018 16:11
@cjlynch12 dozens divided through the day haha
Tom
@moT01
Feb 15 2018 16:12
data viz has 2 messages in 7 days
Kaz Baig
@kbaig
Feb 15 2018 16:12
it's def the most ded
cjlynch12
@cjlynch12
Feb 15 2018 16:12
the main chat is pretty active but usually way off topic
Jason Luboff
@JLuboff
Feb 15 2018 16:13
BTW... started using bitbucket becuase they offer free private repo's (thanks @cmccormack !) and really liking it. I still prefer github's layout but the free private repo's on bitbucket are great!
Tom
@moT01
Feb 15 2018 16:13
i think it might pick up when beta comes out - since theres a link to the chats on the main page
Jason Luboff
@JLuboff
Feb 15 2018 16:13
Ya...if beta ever comes out..
It's been in beta for over a year..
Tom
@moT01
Feb 15 2018 16:13
if
well over a year
cjlynch12
@cjlynch12
Feb 15 2018 16:14
it will get released eventually - it's a pretty big undertaking
Tom
@moT01
Feb 15 2018 16:14
it is
and we all know its volunteer work - and free - so we cant really complain
diomed @diomed still complains a lot
Jason Luboff
@JLuboff
Feb 15 2018 16:16
I can complain if I want to :P
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:17
isn't open source based on complaining?
Tom
@moT01
Feb 15 2018 16:17
i didnt say that - howd you do that - no name showed up
Jason Luboff
@JLuboff
Feb 15 2018 16:18
You still tagged him
khaduch @khaduch - like this you mean?
Jason Luboff
@JLuboff
Feb 15 2018 16:18
Ya.. I forget how to do that
Ken Haduch
@khaduch
Feb 15 2018 16:18
@moT01 - just use the /me to post your comment...
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:18
I dont know why you people drag me into your sick little games
Tom
@moT01
Feb 15 2018 16:18
sneaky
moT01 @moT01 comment here
JLuboff @JLuboff Thats right...like this
Tom
@moT01
Feb 15 2018 16:19
ha
Ken Haduch
@khaduch
Feb 15 2018 16:19
if you just type a / it will show a list of shortcuts.
diomed @diomed thinks he's been busted, so he moseys outta here :runner:
kbaig @kbaig me irl
Tom
@moT01
Feb 15 2018 16:21
/ @diomed says he left but still lingers
hmm
moT01 @moT01 is a rookie
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:22
u n00b
Tom
@moT01
Feb 15 2018 16:23
so i cant do it with other peoples names i take it
Blauelf
@Blauelf
Feb 15 2018 16:23
The /me worked the same way in mIRC, too (is IRC, and mIRC, still a thing?)
Gulsvi
@gulsvi
Feb 15 2018 16:23
image.png
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:23
@Blauelf it's still a thing. I see some people who claim that they connect to this via IRC lol
Christopher McCormack
@cmccormack
Feb 15 2018 16:23
:wave:
Gulsvi
@gulsvi
Feb 15 2018 16:23
Maybe test them out in another room? https://gitter.im/FreeCodeCamp/camperbotPlayground :)
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:24
Has anyone used Youtube API?
Gulsvi
@gulsvi
Feb 15 2018 16:24
Yes @mbosnjak01
Jason Luboff
@JLuboff
Feb 15 2018 16:24
@cmccormack :wave:
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:24
@gulsvi JS api?
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:24
bilo kuda Matej svuda :smile:
Blauelf
@Blauelf
Feb 15 2018 16:24
@diomed An IRC gitter gateway? How would that work? Gitter doesn't allow for anonymous users, does it?
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:24
svuda sam ja XD
Gulsvi
@gulsvi
Feb 15 2018 16:24
@mbosnjak01 What is your question?
Or, are you just curious if anyone uses their API?
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:25
heck, I don't know how they manage that @Blauelf it's a mistery to me
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:25
@gulsvi just wanted to know a difference between Yotube JS API and Youtube Apps script API
since both are written in JS
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:25
I guess they just never did update to gitter
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:25
and also what would be better to use
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:25
:joy:
Gulsvi
@gulsvi
Feb 15 2018 16:25
@mbosnjak01 I haven't heard of the YouTube Apps Script API
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:26
sec
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:26
@Blauelf if smth is in yarn do I have to install dependencies via yarn, or can I use gulp, for example
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:27
Apps script is also JS ... xD so I'm not sure which one to use, Apps script or JS
May Kittens Devour Your Soul
@diomed
Feb 15 2018 16:27
shhhhh... send link , dont be afraid
Gulsvi
@gulsvi
Feb 15 2018 16:27
@mbosnjak01 It looks like the Apps Script API is for embedding in Google Apps, like Google Docs
The standard JS API is for Web Applications
So, if you wanted to create a YouTube plugin/extension for Google Docs, you could use the Apps Script API
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:28
alright so ... i'm avoiding that. thanks for the quick explanation @gulsvi
CamperBot
@camperbot
Feb 15 2018 16:28
mbosnjak01 sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2606 | @gulsvi |http://www.freecodecamp.org/gulsvi
Matej Bošnjak
@mbosnjak01
Feb 15 2018 16:29
erm, would you know if browser cache from one pc can be transfered to another device(laptop,pc)? xD
Blauelf
@Blauelf
Feb 15 2018 16:35
If you transplant the profile (depending on browser), that might work.
Ronique Ricketts
@RoniqueRicketts
Feb 15 2018 20:58
how do I pass this challenge. I am not sure what they are asking for
cjlynch12
@cjlynch12
Feb 15 2018 21:01
Copy all contents of arr1 into another array arr2 using the spread operator.
Jason Luboff
@JLuboff
Feb 15 2018 21:01
I didn't read the instructions but I passsed! whooo! :P
Ronique Ricketts
@RoniqueRicketts
Feb 15 2018 21:02
I tried a few thigns but it didn't work
@cjlynch12 I figure as much.
Jason Luboff
@JLuboff
Feb 15 2018 21:03
The spread operator will "spread" out an array
so I can "spread" into another array within [ ]
Muhammad Hasham
@MohammadHasham
Feb 15 2018 21:23
@JLuboff you were right
the _id's are being self genereated now and it works
@JLuboff thanks
CamperBot
@camperbot
Feb 15 2018 21:24
mohammadhasham sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 2331 | @jluboff |http://www.freecodecamp.org/jluboff
Jason Luboff
@JLuboff
Feb 15 2018 21:24
:+1:
@sjames1958gm Thats what I had done..but way to give the answer away! :P
Stephen James
@sjames1958gm
Feb 15 2018 21:26
@JLuboff my bad
@RoniqueRicketts What have you tried - assuming you didn't see what I posted :)
Jason Luboff
@JLuboff
Feb 15 2018 21:26
hehehe
Kaz Baig
@kbaig
Feb 15 2018 21:38
good ol' spread and rest operators
I felt proud of myself last week for finding a good reason to use const { x, y, ...z } = obj;
Jason Luboff
@JLuboff
Feb 15 2018 21:42
Think I finally have my app closing SQL connections properly
Kaz Baig
@kbaig
Feb 15 2018 21:43
Oh there was also const [, a, b] = arr;
Jason Luboff
@JLuboff
Feb 15 2018 21:44
To those who use Themes for their IDE/Text Editor.. whats your prefered dark syntax theme?
Ronique Ricketts
@RoniqueRicketts
Feb 15 2018 21:44
@sjames1958gm no I didn't
Jason Luboff
@JLuboff
Feb 15 2018 21:45
I've been using Nord Atom for Atom but finding I need a bit more contrast between items
Markus Kiili
@Masd925
Feb 15 2018 21:45
@JLuboff Which database?
Jason Luboff
@JLuboff
Feb 15 2018 21:45
@Masd925 Microsoft SQL
@Masd925 Using mssql npm package via node
Markus Kiili
@Masd925
Feb 15 2018 21:46
@JLuboff That must mean SQL Server?
Jason Luboff
@JLuboff
Feb 15 2018 21:46
Si
(Yes)
Markus Kiili
@Masd925
Feb 15 2018 21:49
@JLuboff I was just shocked that my bus departure app also shows trains. That is a bug!
Jason Luboff
@JLuboff
Feb 15 2018 21:50
@Masd925 That is a feature!
Markus Kiili
@Masd925
Feb 15 2018 21:50
@JLuboff I thought about that feature but thought that it was impossible/too hard.
Jason Luboff
@JLuboff
Feb 15 2018 21:52
Well sounds like it was too easy ;)
Markus Kiili
@Masd925
Feb 15 2018 21:52
Now it is actually somewhat useful app :joy:
Jason Luboff
@JLuboff
Feb 15 2018 21:52
Haha
How's your wife (or is it girlfriend?) doing after the train incident?
Markus Kiili
@Masd925
Feb 15 2018 21:53
Still at hospital.
Jason Luboff
@JLuboff
Feb 15 2018 21:54
Wow, really?
Markus Kiili
@Masd925
Feb 15 2018 21:56
They still have to do some operations, but seems to be healing ok.
Jason Luboff
@JLuboff
Feb 15 2018 22:03
Glad to hear she is healing
So does that mean you're stuck taking care of the kids?
Markus Kiili
@Masd925
Feb 15 2018 22:08
@JLuboff Yes. Also a big interview next week. Have to figure out how to get the app hosted somewhere. Maybe github pages.
Something to show them.
Coding part of the interview will be JS, thank god.
Jason Luboff
@JLuboff
Feb 15 2018 22:12
Best of luck
AbrisM
@AbrisM
Feb 15 2018 22:22
Its good to be single :)