These are chat archives for FreeCodeCamp/Help

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

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
@imajeet I gave to JSON.parse and no error
AJEET SINGH
@imajeet
Feb 21 2018 02:04
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
sorry imajeet, you can't send brownie points to yourself! :sparkles: :sparkles:
AJEET SINGH
@imajeet
Feb 21 2018 02:51
@sjames1958gm ..sorry stephen. I was making mistake. Now it is okay. Thank you
CamperBot
@camperbot
Feb 21 2018 02:51
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
@DarrenfJ thanks! :)
CamperBot
@camperbot
Feb 21 2018 03:59
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
@sjames1958gm
I got a job
Claudio Restifo
@Marmiz
Feb 21 2018 05:43
:clap: :clap: :clap:
a celebration is in order!
BuntyBru
@BuntyBru
Feb 21 2018 06:27
:)
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
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
@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
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
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
i am still looking for it
Fabien SHAN
@X140hu4
Feb 21 2018 07:03
What's the margin on the body element?
Fabien SHAN
@X140hu4
Feb 21 2018 07:09
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
yeah
that's the default setting
you confused me
Fabien SHAN
@X140hu4
Feb 21 2018 07:13
You need to set the margin of the body to 0
Ai rui 艾瑞
@aisolae
Feb 21 2018 07:14
o margin is the default by browser
Fabien SHAN
@X140hu4
Feb 21 2018 07:18
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
my height is 100% already
got the problem, the main needs to go 100%
thanks
hensn5250
@hensn5250
Feb 21 2018 07:25
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
@hensn5250 Watch day 5 here: https://javascript30.com
I think it is what you are looking for
hensn5250
@hensn5250
Feb 21 2018 07:32
Sure. I'll check it out.
Fabien SHAN
@X140hu4
Feb 21 2018 07:34
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
@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
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
@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
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
@sjames1958gm thanks
CamperBot
@camperbot
Feb 21 2018 08:38
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
@BuntyBru congrats on the job
Alvin Meng
@alvinmeng1993
Feb 21 2018 11:24
v
BuntyBru
@BuntyBru
Feb 21 2018 11:45
Thanks @sjames1958gm
CamperBot
@camperbot
Feb 21 2018 11:45
buntybru sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9003 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
BuntyBru
@BuntyBru
Feb 21 2018 11:45
😊
Stephen James
@sjames1958gm
Feb 21 2018 12:41
@BuntyBru $$ :)
Joelvh1990
@Joelvh1990
Feb 21 2018 15:12
Stuck on Increment a number with Javascript using myVar++; and ++myVar;
Daniel
@dkapexhiu
Feb 21 2018 15:55

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
what is placeList()?
Shouldn't it be an array reference?
Daniel
@dkapexhiu
Feb 21 2018 15:57
yes it is an array
Fabien SHAN
@X140hu4
Feb 21 2018 15:59
Did you try without the parenthesis?
Daniel
@dkapexhiu
Feb 21 2018 16:00
what do you mean? where?
Fabien SHAN
@X140hu4
Feb 21 2018 16:01
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
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
If its working, doesnt mean it is correct. Have you tried without parenthesis?
Daniel
@dkapexhiu
Feb 21 2018 16:06
no
anyway does it exist a way to fix the problem i wrote before? @X140hu4
Fabien SHAN
@X140hu4
Feb 21 2018 16:11
Can you show it on codepen maybe?
Daniel
@dkapexhiu
Feb 21 2018 16:16
i need to prepare it.. wait a second
Daniel
@dkapexhiu
Feb 21 2018 16:25
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
ko is knockout?
I can't really help here... My best guess so far is the array()
Daniel
@dkapexhiu
Feb 21 2018 16:37
yes is knockout.. ok thank you anyway
Tom
@moT01
Feb 21 2018 16:44
@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
the problem is in line 148 that does not show markers
Daniel
@dkapexhiu
Feb 21 2018 16:58
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

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
@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
Thanks @sjames1958gm
CamperBot
@camperbot
Feb 21 2018 22:27
jon-nova sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9011 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm