These are chat archives for FreeCodeCamp/Help

11th
Feb 2018
Corentin Whyte
@CorySW
Feb 11 2018 00:20 UTC
Currently trying stuff with react bootstrap and this is what happened and I can't figure out what I did wrong
Warning: Failed prop type: In order to properly initialize the PanelGroup in a way that is accessible to assistive technologies (such as screen readers) an `id` or a `generateChildId` prop to PanelGroup is required
Stephen James
@sjames1958gm
Feb 11 2018 00:43 UTC
@CorySW You need id= or generateChildId= to your PanelGroup
Corentin Whyte
@CorySW
Feb 11 2018 01:12 UTC
oh okay thanks a lot @sjames1958gm
CamperBot
@camperbot
Feb 11 2018 01:12 UTC
corysw sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8960 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Jeremy Cherer
@JavaLavaMT
Feb 11 2018 02:26 UTC
Screen Shot 2018-02-10 at 7.25.28 PM.png
So I am having one hell of a time fully understanding how this worked. As far as I understand is looks for numbers that match in arr1 to fullArr or arr2 to fullArry. But it is is filtering those numbers out shouldn’t it return null since fullArr is just arr1 and arry2 combined?
Kyle Holm
@thekholm80
Feb 11 2018 02:34 UTC

the filter method you're using will remove any item that returns true. you are saying "arr1 does not include item OR arr2 does not include item" and the way the || logical operator works:

when used with Boolean values, || returns true if either operand is true

the important bit is the !
which means "not"
@JavaLavaMT
Gersho
@Gersho
Feb 11 2018 02:35 UTC
i was in the middle of typing something but you're making more sense than me i'll let you handle it :P
Kyle Holm
@thekholm80
Feb 11 2018 02:35 UTC
@Gersho lol i erased what I typed like 4 times because i was confusing myself
Gersho
@Gersho
Feb 11 2018 02:36 UTC
D:
also isn't that one of the early algo challenge ? or did they turn it into a lesson ?
Kyle Holm
@thekholm80
Feb 11 2018 02:37 UTC
i don't recall
Kyle Holm
@thekholm80
Feb 11 2018 02:38 UTC
@Gersho looks like it's an Intermediate Algorithm challenge
lol
Gersho
@Gersho
Feb 11 2018 02:38 UTC
@JavaLavaMT if you don't understand it, you should rewrite it in a way that makes sense to you
oh ? i can't look at the solution i had for it
it's empty
Kyle Holm
@thekholm80
Feb 11 2018 02:40 UTC
seems like someone mentioned that the other day
Jeremy Cherer
@JavaLavaMT
Feb 11 2018 02:40 UTC
@Gersho thank you!
CamperBot
@camperbot
Feb 11 2018 02:40 UTC
javalavamt sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 593 | @gersho |http://www.freecodecamp.org/gersho
Jeremy Cherer
@JavaLavaMT
Feb 11 2018 02:40 UTC
@thekholm80 thank you!
CamperBot
@camperbot
Feb 11 2018 02:40 UTC
javalavamt sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1690 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Feb 11 2018 02:40 UTC
:+1:
Gersho
@Gersho
Feb 11 2018 02:42 UTC

seems like someone mentioned that the other day

how am i gonna do next time someones asks for help ? my first reflex is going see how i done it >.>

also, i hate my internet, i'm getting dc every 3 mins >.>
Kyle Holm
@thekholm80
Feb 11 2018 02:42 UTC
check the forum for other people's answers? >.<
Gersho
@Gersho
Feb 11 2018 02:43 UTC
well at least you didn't tell me to actually try and think :P
Kyle Holm
@thekholm80
Feb 11 2018 02:43 UTC
i know better than that!
Grant Clark
@kwdzr3
Feb 11 2018 04:26 UTC
anyone still up here that can help me with some basic JS?
Grant Clark
@kwdzr3
Feb 11 2018 04:34 UTC
found the problem - there was no comma separating the objects in a complex array
Jacob Fines
@jfines
Feb 11 2018 04:48 UTC
I can't finger our why this isn't working .. https://ideone.com/VrXVPu
Anyone?
Yeah, I got nuthinn
Jacob Fines
@jfines
Feb 11 2018 05:20 UTC
peace out ya'all
Sweet Coding :)
@SweetCodingInc
Feb 11 2018 08:50 UTC

@jfines This is the problem

this.get = function(value) { return value; }

It should be

this.get = function(value) { return this[value]; }
Igor
@flipmotion
Feb 11 2018 12:34 UTC
Hi, is non profit project has benefits?
Of searching job or something?
Mohammad Aziz
@iAziz786
Feb 11 2018 13:02 UTC
What is the most effective way to understand new codebase?
Fabien SHAN
@X140hu4
Feb 11 2018 13:54 UTC
@iAziz786 What do you mean by new codebase
VaseJS
@VaseJS
Feb 11 2018 14:00 UTC
@iAziz786 start reading
:D
Gersho
@Gersho
Feb 11 2018 15:00 UTC
Hello everyone !
Stephen James
@sjames1958gm
Feb 11 2018 17:14 UTC
@Gersho Hello
Gersho
@Gersho
Feb 11 2018 17:16 UTC
:wave: @sjames1958gm
Daniel
@dkapexhiu
Feb 11 2018 18:39 UTC
hello! someone has tried knockout.js? i am trying to build a google maps with markers on it, but the markers are not showing. what i have done wrong on this file: https://1drv.ms/u/s!AnCh8ExBS54OjJQ-hZxPhFrHxfPimg
Manish Giri
@Manish-Giri
Feb 11 2018 18:40 UTC
does anyone know how you can get the return type of your data to show up in chrome dev tools console
like if you type
var h = {a: 1, b: 2}
then h
you'll get back - {a: 1, b: 2}
Gersho
@Gersho
Feb 11 2018 18:41 UTC
return type ? you mean the data type of the data returned ?
Manish Giri
@Manish-Giri
Feb 11 2018 18:41 UTC
earlier it used to be Object { a: 0, b: 1 }
Daniel
@dkapexhiu
Feb 11 2018 18:42 UTC
put a breakpoint on it with google chrome tools and then reload the page with chrome tools opened and then see in sources tab
Gersho
@Gersho
Feb 11 2018 18:42 UTC
something like console logging a stringify of the data ?
Manish Giri
@Manish-Giri
Feb 11 2018 18:43 UTC
not really, the object itself..it used to show what the type of the data was, like Object, Array, Function, etc
Gersho
@Gersho
Feb 11 2018 18:43 UTC
typeof ?
Manish Giri
@Manish-Giri
Feb 11 2018 18:43 UTC
now it's just the data
Gersho
@Gersho
Feb 11 2018 18:44 UTC
so like console logging the typeof, but you'd want it by default in the chrome console
Manish Giri
@Manish-Giri
Feb 11 2018 18:44 UTC
yup
that used to happen normally, I think they've changed something
Gersho
@Gersho
Feb 11 2018 18:45 UTC
if that was present in earlier version maybe try looking at the about:config (or whatever is equivalent is, i don't use chrome)
Manish Giri
@Manish-Giri
Feb 11 2018 18:45 UTC
lemme get a screenshot
Gersho
@Gersho
Feb 11 2018 18:45 UTC
and there's probably a ticket about it somewhere, for something like that it would be surprising if you were the only one annoyed by that
it's ok i see what you mean, in firefox it's written as > Object and you can click it to see whatever is inside
well at least it was last time i checked
Manish Giri
@Manish-Giri
Feb 11 2018 18:47 UTC
yup
firefox shows it
Gersho
@Gersho
Feb 11 2018 18:47 UTC
i don't use the dev tools nearly enougth, i should get to speed on that too >.>
Stephen James
@sjames1958gm
Feb 11 2018 18:48 UTC
@Manish-Giri I am guessing they "improved" it
but try looking at the config page, maybe there's a setting for it
Manish Giri
@Manish-Giri
Feb 11 2018 18:52 UTC
@sjames1958gm lol
Screen Shot 2018-02-11 at 1.52.20 PM.png
this is how it was a while back
even though this prints from a console.log from the code, and not in the console itself, but don't think that should make a difference
Linh Nguyen My
@pinglinh
Feb 11 2018 19:22 UTC
hello has anyone done the redux part of beta freecodecamp?
Kelechi Chinaka
@ke1echi
Feb 11 2018 20:24 UTC
:wave: everyone
Gersho
@Gersho
Feb 11 2018 20:27 UTC
:wave: @kelechy
Kelechi Chinaka
@ke1echi
Feb 11 2018 20:29 UTC
did u find a fix @Manish-Giri .. i think they changed it
:wave: @Gersho how it been
Manish Giri
@Manish-Giri
Feb 11 2018 20:36 UTC
@kelechy :wave:
nope, I couldn't find anything
Kelechi Chinaka
@ke1echi
Feb 11 2018 20:39 UTC
what chrome version are you on @Manish-Giri
Manish Giri
@Manish-Giri
Feb 11 2018 20:39 UTC
Version 64.0.3282.140
Mads
@m-schou
Feb 11 2018 20:52 UTC
var count = 0;

function cc(card) {
  // Only change code below this line
  switch(card) {
    case 2: 
    case 3:
    case 4:
    case 5:
    case 6:
     count += 1;
     break;
    case 7:
    case 8:
    case 9:
     count += 0;
     break;
    case 10:
    case "J":
    case "Q":
    case "K":
    case "A":
     count -= 1;

  }

  return count + (count > 0 ? "Bet" : "Hold");
  // Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
Whats wrong? hmmm
Screen Shot 2018-02-11 at 21.54.13.png
Kyle Holm
@thekholm80
Feb 11 2018 21:01 UTC
@m-schou i'm guessing your return looks more like 5Bet or 0Hold?
formatting is important
Daniel
@dkapexhiu
Feb 11 2018 21:25 UTC
why everytime i try to access location in this api/json it shows me NaN?
[
    {
        "id": "2",
        "title": "Rogner Hotel",
        "short": "rogner",
        "category": "shtepi",
        "location": "{lat: 41.3239934, lng: 19.822973}"
    },
    {
        "id": "4",
        "title": "ETC",
        "short": "etc",
        "category": "biznese",
        "location": "{lat: 41.3239934, lng: 19.822973}"
    }
]
Manish Giri
@Manish-Giri
Feb 11 2018 21:26 UTC
what's the code
Gersho
@Gersho
Feb 11 2018 21:27 UTC
i bet he's trying to access the object part without addressing the array part
Daniel
@dkapexhiu
Feb 11 2018 21:28 UTC
the code is json
Manish Giri
@Manish-Giri
Feb 11 2018 21:28 UTC
var duh = [
    {
        "id": "2",
        "title": "Rogner Hotel",
        "short": "rogner",
        "category": "shtepi",
        "location": "{lat: 41.3239934, lng: 19.822973}"
    },
    {
        "id": "4",
        "title": "ETC",
        "short": "etc",
        "category": "biznese",
        "location": "{lat: 41.3239934, lng: 19.822973}"
    }
];

duh.forEach(obj => console.log(obj.location));
works for me
Daniel
@dkapexhiu
Feb 11 2018 21:28 UTC
it shows me NaN everytime i need to access location
Manish Giri
@Manish-Giri
Feb 11 2018 21:29 UTC
maybe you're trying to perform a Math operation on the co-ords before parsing it to int
Gersho
@Gersho
Feb 11 2018 21:29 UTC
the location is an object
Kyle Holm
@thekholm80
Feb 11 2018 21:29 UTC
trying to debug code without seeing the code is hard
Gersho
@Gersho
Feb 11 2018 21:31 UTC
@thekholm80 working out computer problems over the phone isn't fun enough so we step up ;)
Kyle Holm
@thekholm80
Feb 11 2018 21:31 UTC
lol
Daniel
@dkapexhiu
Feb 11 2018 21:32 UTC
i am doing this for locations api:
locations
        .map(each => {
            each.location = {lat: parseFloat(each.location.lat), lng: parseFloat(each.location.lng)};
            console.log(each.location);
            each.title = String(each.title);
            each.short = String(each.short);
            each.category = String(each.category);
            return each;
        })
        .forEach(function (placeItem) {
        self.placeList.push(new Place(placeItem));
    });
even taking of parseFloat it shows me NaN for location
Gersho
@Gersho
Feb 11 2018 21:35 UTC
i know i said earlier that location is a object, but isn't it a string ? meanling you can't parseFloat(each.location.lat) because each.location.lat does not exist, only each.location
Mads
@m-schou
Feb 11 2018 21:35 UTC
@thekholm80 What you mean it looks like 5Bet or 0Hold? What should i change? Hmmm
Kyle Holm
@thekholm80
Feb 11 2018 21:35 UTC
@m-schou look at your return
@Gersho you're right, it's a quoted string. maybe parseJSON?
err json.parse
crap, i can't remember
Manish Giri
@Manish-Giri
Feb 11 2018 21:36 UTC
lol
Mads
@m-schou
Feb 11 2018 21:37 UTC
i see now
Gersho
@Gersho
Feb 11 2018 21:37 UTC
i couldn't remember either what was the opposite of stringify, hence why i stopped my reasoning there :p
Kyle Holm
@thekholm80
Feb 11 2018 21:37 UTC
lol
Mads
@m-schou
Feb 11 2018 21:37 UTC
@thekholm80 I see now thank, amazing you can spot that so fast..
CamperBot
@camperbot
Feb 11 2018 21:37 UTC
m-schou sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1691 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Feb 11 2018 21:37 UTC
@m-schou happy to help
Kelechi Chinaka
@ke1echi
Feb 11 2018 21:39 UTC
what are you working on now? @Manish-Giri
Gersho
@Gersho
Feb 11 2018 21:40 UTC
sunday is not for working !
Kelechi Chinaka
@ke1echi
Feb 11 2018 21:40 UTC
i could not write cs50 credit today, maybe tomoro @Gersho
Gersho
@Gersho
Feb 11 2018 21:40 UTC
like i said, it is sunday
Kelechi Chinaka
@ke1echi
Feb 11 2018 21:40 UTC
everyday is a good day to write code :smile:
Gersho
@Gersho
Feb 11 2018 21:41 UTC
on that note, i'm going back to watching some starcraft 2
Kyle Holm
@thekholm80
Feb 11 2018 21:41 UTC
watching?
not playing?
Manish Giri
@Manish-Giri
Feb 11 2018 21:41 UTC
@kelechy the dungeon crawler game
Gersho
@Gersho
Feb 11 2018 21:41 UTC
i'm way too bad to play it :P
Manish Giri
@Manish-Giri
Feb 11 2018 21:41 UTC
and redux (part of a react course on udemy)
and of course, angular
Kyle Holm
@thekholm80
Feb 11 2018 21:41 UTC
that's why i only play single player games @Gersho lol
Kelechi Chinaka
@ke1echi
Feb 11 2018 21:42 UTC
building it with react or vanilla js? @Manish-Giri
Gersho
@Gersho
Feb 11 2018 21:42 UTC
and lazy too, sc2 you need to try hard even for easy stuff xD
Kyle Holm
@thekholm80
Feb 11 2018 21:42 UTC
i miss original starcraft
Gersho
@Gersho
Feb 11 2018 21:42 UTC
@thekholm80 haha same here
Daniel
@dkapexhiu
Feb 11 2018 21:42 UTC
so what should i use instead of parseFloat?
Gersho
@Gersho
Feb 11 2018 21:42 UTC
as a player i always prefered command & conquer, but sc2 is cool to watch
Kyle Holm
@thekholm80
Feb 11 2018 21:43 UTC
@dkapexhiu JSON.parse()
Manish Giri
@Manish-Giri
Feb 11 2018 21:44 UTC
@dkapexhiu you could use regex
here, in your .map()
.map(each => {
            console.log(each.location);
            let [loc1,loc2] = each.location.match(/\d+\.\d+/g);
            console.log(+loc1, +loc2);
this will get you the co-ords in numeric form
41.3239934
19.822973
@kelechy as of now, I'm trying to understand the game itself, once I figure that out, maybe in angular(1)
Kelechi Chinaka
@ke1echi
Feb 11 2018 21:46 UTC
o cool @Manish-Giri
Daniel
@dkapexhiu
Feb 11 2018 21:47 UTC
thanks @Manish-Giri
CamperBot
@camperbot
Feb 11 2018 21:47 UTC
dkapexhiu sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6808 | @manish-giri |http://www.freecodecamp.org/manish-giri
Daniel
@dkapexhiu
Feb 11 2018 21:48 UTC
how can i structure it to be like {lat: 41.3239934, lng: 19.822973}?
Gersho
@Gersho
Feb 11 2018 21:49 UTC
parse it like Kyle said
Kyle Holm
@thekholm80
Feb 11 2018 21:49 UTC
lol
Daniel
@dkapexhiu
Feb 11 2018 21:50 UTC
with JSON.parse? an example?
Manish Giri
@Manish-Giri
Feb 11 2018 21:50 UTC
I got an unexpected token error when I tried to .parse it
strange
chrome is annoying me today
Kyle Holm
@thekholm80
Feb 11 2018 21:52 UTC
hmm, i think proper json requires keys to be quoted
Manish Giri
@Manish-Giri
Feb 11 2018 21:52 UTC
yup
Altin Rrahmani
@DevKosov
Feb 11 2018 21:58 UTC
Hi everyone
Kyle Holm
@thekholm80
Feb 11 2018 21:59 UTC
@DevKosov hey, the drupal guy
having any luck?
Altin Rrahmani
@DevKosov
Feb 11 2018 21:59 UTC
not at all lol
i am working on it
Kyle Holm
@thekholm80
Feb 11 2018 22:00 UTC
someday i want to learn python then django
i'm sure it will suck
(to learn, not use lol)
Altin Rrahmani
@DevKosov
Feb 11 2018 22:00 UTC
*understands
Kyle Holm
@thekholm80
Feb 11 2018 22:01 UTC
have you used php before?
Altin Rrahmani
@DevKosov
Feb 11 2018 22:01 UTC
i know it a bit
Kyle Holm
@thekholm80
Feb 11 2018 22:01 UTC
that helps I bet
Altin Rrahmani
@DevKosov
Feb 11 2018 22:01 UTC
but definitely not an expert
Kyle Holm
@thekholm80
Feb 11 2018 22:02 UTC
we need @RuinIsProbablyTaken , she's a php expert
Daniel
@dkapexhiu
Feb 11 2018 22:03 UTC
now i am getting this error:
Qb {message: "not a LatLng or LatLngLiteral: not an Object", name: "InvalidValueError", stack: "Error↵    at new Qb (https://maps.googleapis.com/m…ocalhost:3000/js/app.js:48:22)↵    at <anonymous>"}
message
:
"not a LatLng or LatLngLiteral: not an Object"
name
:
"InvalidValueError"
and this error:
InvalidValueError: setPosition: not a LatLng or LatLngLiteral: not an Object
Altin Rrahmani
@DevKosov
Feb 11 2018 22:07 UTC
Yesterday i created a simple page loader with css and i put the body overflow hidden while it's loading and it works really well in chrome and Safari, today i tried it in Edge and internet explorer but no luck. I thought i could get some help in here https://codepen.io/DevKosov/pen/bLWYyj
the overflow stays hidden in Edge and IE
Kyle Holm
@thekholm80
Feb 11 2018 22:08 UTC
can't you just put a note on your page that says something like "it's 2018, please use chrome or FF"?
Altin Rrahmani
@DevKosov
Feb 11 2018 22:09 UTC
thought about it
Kyle Holm
@thekholm80
Feb 11 2018 22:09 UTC
lol
sorry I'm so out of practice on CSS I don't think i could help
Altin Rrahmani
@DevKosov
Feb 11 2018 22:09 UTC
no worries ;)
Ken Haduch
@khaduch
Feb 11 2018 22:16 UTC
@DevKosov - have you checked the website https://caniuse.com to see if the feature that you're trying to use is supported in those browsers?
Altin Rrahmani
@DevKosov
Feb 11 2018 22:20 UTC
@khaduch overflow is supported in both
thanks anyway ;)@khaduch
CamperBot
@camperbot
Feb 11 2018 22:20 UTC
devkosov sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3728 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Feb 11 2018 22:23 UTC
@DevKosov - well, I haven't done anything yet - I'm trying Edge on windows 10 - it is strange how it doesn't work? I'm looking to see if anything pops out at me?
Daniel
@dkapexhiu
Feb 11 2018 22:30 UTC

excuse me, how to convert this:

var pos = {
            lat: position.coords.latitude,
            lng: position.coords.longitude
        };

into an object?

Manish Giri
@Manish-Giri
Feb 11 2018 22:30 UTC
isn't it already an object
Daniel
@dkapexhiu
Feb 11 2018 22:32 UTC
then why do i get this error: InvalidValueError: setPosition: not a LatLng or LatLngLiteral: not an Object when try: infoWindow.setPosition(pos);
Manish Giri
@Manish-Giri
Feb 11 2018 22:34 UTC
typeof pos
should tell you what it is
Daniel
@dkapexhiu
Feb 11 2018 22:38 UTC
thank you.. i have tried even with console.log(pos) but it shows me only the errors and not the values
Ken Haduch
@khaduch
Feb 11 2018 22:38 UTC
@DevKosov - according to this note: https://stackoverflow.com/questions/31067847/animate-the-overflow-property the overflow property is not animatable? Also according to this: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties, overflow is not listed as a property that can be animated. The stackoverflow link mentions using some JS code to do it? I don't know if there is a reason why it works in other browsers and not in the microsoft browsers?
Manish Giri
@Manish-Giri
Feb 11 2018 22:41 UTC
@khaduch :wave:
hope things are well your end
Ken Haduch
@khaduch
Feb 11 2018 22:47 UTC
@Manish-Giri - hello - how are you doing these days?
Altin Rrahmani
@DevKosov
Feb 11 2018 22:48 UTC
@khaduch thank you man! it's weird that it works in chrome
CamperBot
@camperbot
Feb 11 2018 22:48 UTC
devkosov sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
api offline
Nick Cleary
@Hijerboa
Feb 11 2018 23:34 UTC
Hey, does anyone know where to find a good tutorial to learn the necessary css to make the simon game?
Bjorn van de Peut
@bjorno43
Feb 11 2018 23:39 UTC
@Hijerboa I don't think you need a lot of CSS for a Simon game. I think Javascript is much more important
All you need is 4 buttons with different colors. Then highlight those buttons on click or when the game plays the next challenge
Nick Cleary
@Hijerboa
Feb 11 2018 23:41 UTC
@bjorno43 that is true...but if you want it to look half way decent...
Bjorn van de Peut
@bjorno43
Feb 11 2018 23:42 UTC
True. But you can learn all you want about CSS, it doesn't make you a good designer. You'll need to use Photoshop or some other graphic tool. Design what you want the end result to look like. Then translate that to CSS and images if needed
Though I would strongly advise you to learn Bootstrap here: https://www.w3schools.com/bootstrap/bootstrap_get_started.asp Bootstrap will make sure your end result is responsive. Meaning that your players can play on any devise they like. Like a mobile phone or tablet
Nick Cleary
@Hijerboa
Feb 11 2018 23:46 UTC
@bjorno43 alrighty thanks mate
CamperBot
@camperbot
Feb 11 2018 23:46 UTC
hijerboa sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @bjorno43 |http://www.freecodecamp.org/bjorno43