These are chat archives for FreeCodeCamp/Help

21st
Feb 2018
AJEET SINGH
@imajeet
Feb 21 2018 01:51 UTC

data = '[{"name":"John","guest":"3","status":"true"},
{"name":"Mike","guest":"5","status":"false"},
{"name":"Jenny","guest":"2","status":"false"}]';

Hi, anyone could help me to find the error. This is JSON string, but i found some validation error in string.

Stephen James
@sjames1958gm
Feb 21 2018 02:00 UTC
@imajeet I gave to JSON.parse and no error
AJEET SINGH
@imajeet
Feb 21 2018 02:04 UTC
json.JPG

@imajeet I gave to JSON.parse and no error

Hi Stephen, Thank you for your answer. Here you can see error.

CamperBot
@camperbot
Feb 21 2018 02:05 UTC
sorry imajeet, you can't send brownie points to yourself! :sparkles: :sparkles:
AJEET SINGH
@imajeet
Feb 21 2018 02:51 UTC
@sjames1958gm ..sorry stephen. I was making mistake. Now it is okay. Thank you
CamperBot
@camperbot
Feb 21 2018 02:51 UTC
imajeet sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9001 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Jill Lee
@jill-lee
Feb 21 2018 03:59 UTC
@DarrenfJ thanks! :)
CamperBot
@camperbot
Feb 21 2018 03:59 UTC
jill-lee sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2398 | @darrenfj |http://www.freecodecamp.org/darrenfj
BuntyBru
@BuntyBru
Feb 21 2018 05:37 UTC
@sjames1958gm
I got a job
Claudio Restifo
@Marmiz
Feb 21 2018 05:43 UTC
:clap: :clap: :clap:
a celebration is in order!
BuntyBru
@BuntyBru
Feb 21 2018 06:27 UTC
:)
Its not directly related to development but gradually
YEAH
Now aiming to be above average backend developer in coming 4 months
Ai rui 艾瑞
@aisolae
Feb 21 2018 06:39 UTC
ok, i am frustrated
i need help with bootstrap, i can't seem to figure our why the image wont go full screen even after using width and height
i am working locally, so ignore the boostrap links
Fabien SHAN
@X140hu4
Feb 21 2018 06:50 UTC
@aisolae Use your browser's developer tool
You can set the backgorund image to the body or the html
Ai rui 艾瑞
@aisolae
Feb 21 2018 06:54 UTC
yeah, i tried the body and it works but i don't need it at the body
i need it for the header section alone
Fabien SHAN
@X140hu4
Feb 21 2018 06:56 UTC
If you use the developer tool and check for the body's style
You will notice something
@aisolae Did you find what I am talking about?
Ai rui 艾瑞
@aisolae
Feb 21 2018 07:02 UTC
i am still looking for it
Fabien SHAN
@X140hu4
Feb 21 2018 07:03 UTC
What's the margin on the body element?
Fabien SHAN
@X140hu4
Feb 21 2018 07:09 UTC
Don't look at your CSS. There is nothing wrong there :) It's the browser's default HTML styling
Ai rui 艾瑞
@aisolae
Feb 21 2018 07:12 UTC
yeah
that's the default setting
you confused me
Fabien SHAN
@X140hu4
Feb 21 2018 07:13 UTC
You need to set the margin of the body to 0
Ai rui 艾瑞
@aisolae
Feb 21 2018 07:14 UTC
o margin is the default by browser
Fabien SHAN
@X140hu4
Feb 21 2018 07:18 UTC
For the height you need to have either width: 100% on section or the bckground image on the body
height 100% sorry
Ai rui 艾瑞
@aisolae
Feb 21 2018 07:23 UTC
my height is 100% already
got the problem, the main needs to go 100%
thanks
hensn5250
@hensn5250
Feb 21 2018 07:25 UTC
Hello all
@X140hu4 think you could give me a hand on some CSS?
I'm trying to transition some text to make them move horizonatally within a div.
The issue is the text is from a pseudo-element
When the image is hovered,the text appears at the bottom(hello world...).
Fabien SHAN
@X140hu4
Feb 21 2018 07:31 UTC
@hensn5250 Watch day 5 here: https://javascript30.com
I think it is what you are looking for
hensn5250
@hensn5250
Feb 21 2018 07:32 UTC
Sure. I'll check it out.
Fabien SHAN
@X140hu4
Feb 21 2018 07:34 UTC
It requires some JS. It may be possible doing it with pure CSS but I don't have time to explore now ^^;
hensn5250
@hensn5250
Feb 21 2018 07:51 UTC
@X140hu4 I wasn't able to watch the vid at that site. It looks to be about flexbox though. As far as using JS, you can't use JS on pseudo-elements, as far as I know.
... Oh ok. Well, thanks anyway.
CamperBot
@camperbot
Feb 21 2018 07:51 UTC
hensn5250 sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 327 | @x140hu4 |http://www.freecodecamp.org/x140hu4
Fabien SHAN
@X140hu4
Feb 21 2018 07:52 UTC
@hensn5250 You can use JS to add/delete styles from elements
You could maybe have one element that disappears on hover and another that has a transform instead of using pseudo elements?
hensn5250
@hensn5250
Feb 21 2018 07:57 UTC
Yes that would work. The only thing is changing it now would break a lot of the existing code in my project
I'm about 95% done. Just needed to add that one feature to satisfy a the last user story.
Will work at it another time. Later.
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 21 2018 08:38 UTC
@sjames1958gm thanks
CamperBot
@camperbot
Feb 21 2018 08:38 UTC
ahmadabdolsaheb sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9002 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Feb 21 2018 10:59 UTC
@BuntyBru congrats on the job
Alvin Meng
@alvinmeng1993
Feb 21 2018 11:24 UTC
v
BuntyBru
@BuntyBru
Feb 21 2018 11:45 UTC
Thanks @sjames1958gm
CamperBot
@camperbot
Feb 21 2018 11:45 UTC
buntybru sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9003 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
BuntyBru
@BuntyBru
Feb 21 2018 11:45 UTC
😊
Stephen James
@sjames1958gm
Feb 21 2018 12:41 UTC
@BuntyBru $$ :)
Joelvh1990
@Joelvh1990
Feb 21 2018 15:12 UTC
Stuck on Increment a number with Javascript using myVar++; and ++myVar;
Daniel
@dkapexhiu
Feb 21 2018 15:55 UTC

hi! someone can tell me why this function:

//different icons for different categories
    self.placeList().forEach(function (placeItem) {

    var category = placeItem.category();
    console.log(category);

    function makeMarkerIcon(icons) {
        var markerImage = new google.maps.MarkerImage(
            'https://maps.google.com/mapfiles/kml/shapes/'+icons[category].icon,
            new google.maps.Size(21, 34),
            new google.maps.Point(0, 0),
            new google.maps.Point(10, 34),
            new google.maps.Size(21, 34)
        );
        return markerImage;
    }
    });

is not found when called here:
self.defaultIcon = makeMarkerIcon(icons);

Fabien SHAN
@X140hu4
Feb 21 2018 15:56 UTC
what is placeList()?
Shouldn't it be an array reference?
Daniel
@dkapexhiu
Feb 21 2018 15:57 UTC
yes it is an array
Fabien SHAN
@X140hu4
Feb 21 2018 15:59 UTC
Did you try without the parenthesis?
Daniel
@dkapexhiu
Feb 21 2018 16:00 UTC
what do you mean? where?
Fabien SHAN
@X140hu4
Feb 21 2018 16:01 UTC
You shouldn't have () after placeList. Syntactically it means 'Call the function placeList'
var arr = [1,2,3,4];
arr().splice('');
For example will return TypeError
Daniel
@dkapexhiu
Feb 21 2018 16:03 UTC
actually it works when i iterate through an array
but when i call the function in line 143 it shows me not found
Fabien SHAN
@X140hu4
Feb 21 2018 16:05 UTC
If its working, doesnt mean it is correct. Have you tried without parenthesis?
Daniel
@dkapexhiu
Feb 21 2018 16:06 UTC
no
anyway does it exist a way to fix the problem i wrote before? @X140hu4
Fabien SHAN
@X140hu4
Feb 21 2018 16:11 UTC
Can you show it on codepen maybe?
Daniel
@dkapexhiu
Feb 21 2018 16:16 UTC
i need to prepare it.. wait a second
Daniel
@dkapexhiu
Feb 21 2018 16:25 UTC
this is what i prepared for now because it doesnt support knockout.js: https://codepen.io/dkapexhiu/pen/YeLObd
Fabien SHAN
@X140hu4
Feb 21 2018 16:33 UTC
ko is knockout?
I can't really help here... My best guess so far is the array()
Daniel
@dkapexhiu
Feb 21 2018 16:37 UTC
yes is knockout.. ok thank you anyway
@dkapexhiu whats the problem?
i used this link for knockout - seems to be working https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js
Daniel
@dkapexhiu
Feb 21 2018 16:50 UTC
the problem is in line 148 that does not show markers
Daniel
@dkapexhiu
Feb 21 2018 16:58 UTC
i guess it needs to show the sidebar because the places are in json file
João Novaes Barreiros
@Jon-Nova
Feb 21 2018 21:26 UTC

Hey everyone
I'm having trouble with the "Regular Expressions: Reuse Patterns Using Capture Groups"
My answer :

let repeatNum = "42 42 42";
let reRegex = /(\d+)\s\1\s\1/; // Change this line
let result = reRegex.test(repeatNum);

the only test that has not passed:
Your regex should not match "42 42 42 42"

Stephen James
@sjames1958gm
Feb 21 2018 22:10 UTC
@Jon-Nova You need to anchor your regex to the start ^ and end $ of the string so no trailing characters can be accepted
João Novaes Barreiros
@Jon-Nova
Feb 21 2018 22:27 UTC
Thanks @sjames1958gm
CamperBot
@camperbot
Feb 21 2018 22:27 UTC
jon-nova sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9011 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm