These are chat archives for FreeCodeCamp/Help

21st
May 2018
Bashir Harrell
@bookofbash
May 21 2018 00:03 UTC
On the master tree of a project, everything is up to date, but git push origin master is not working at all
Does anyone know what this could be?
Bashir Harrell
@bookofbash
May 21 2018 00:15 UTC
been trying to get this for hours
Stephen James
@sjames1958gm
May 21 2018 00:28 UTC
@bookofbash How is it not working? any errors?
Bashir Harrell
@bookofbash
May 21 2018 00:28 UTC
I finally got an error, im going to check it out
HoopsFTWGG
@HoopsFTWGG
May 21 2018 00:46 UTC
@mstellaluna done
mstellaluna
@mstellaluna
May 21 2018 00:47 UTC
@HoopsFTWGG thank you
CamperBot
@camperbot
May 21 2018 00:47 UTC
mstellaluna sends brownie points to @hoopsftwgg :sparkles: :thumbsup: :sparkles:
api offline
Bashir Harrell
@bookofbash
May 21 2018 00:54 UTC
@sjames1958gm I figured it out, thanks!
CamperBot
@camperbot
May 21 2018 00:54 UTC
bookofbash sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9250 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
May 21 2018 00:54 UTC
@bookofbash
Ai rui 艾瑞
@aisolae
May 21 2018 02:11 UTC
const DISH: Dish[] =[
{
name: 'Uthappizza',
image: '/assets/images/uthappizza.png',
category: 'mains',
label: 'Hot',
price: '4.99',
description: 'A unique combination of Indian Uthappam (pancake) and Italian pizza, topped with Cerignola olives, ripe vine cherry tomatoes, Vidalia onion, Guntur chillies and Buffalo Paneer.',
comments: [
{
rating: 5,
comment: "Imagine all the eatables, living in conFusion!",
author: "John Lemon",
date: "2012-10-16T17:57:28.556094Z"
},
{
rating: 4,
comment: "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
author: "Paul McVites",
date: "2014-09-05T17:57:28.556094Z"
},
{
rating: 3,
comment: "Eat it, just eat it!",
author: "Michael Jaikishan",
date: "2015-02-13T17:57:28.556094Z"
},
{
rating: 4,
comment: "Ultimate, Reaching for the stars!",
author: "Ringo Starry",
date: "2013-12-02T17:57:28.556094Z"
},
{
rating: 2,
comment: "It's your birthday, we're gonna party!",
author: "25 Cent",
date: "2011-12-02T17:57:28.556094Z"
}
]
}
];
sorry guys, i tried the code format but it’s not working
i am trying to access all the properties of the objects comments
mstellaluna
@mstellaluna
May 21 2018 02:15 UTC
@aisolae have you tried to ask in the QA section for this coursera program?
Ai rui 艾瑞
@aisolae
May 21 2018 02:15 UTC
Yeah, i did but couldn’t get anything positive
else i won’t be asking here
mstellaluna
@mstellaluna
May 21 2018 02:17 UTC
i last did this course 2 years ago, look like its been updated since. is this at the angular part yet.. sorry i really don't remember
Moisés Man
@moigithub
May 21 2018 02:18 UTC

using a jsonformatter like http://jsbeautifier.org/ helps...

soo u have an array of objects.. each object have a comments field (which is an array of objects too)
let allCommentsOfFirstObj = data[0].comments;

Ai rui 艾瑞
@aisolae
May 21 2018 02:19 UTC
yeah
it’s the angular part
and that’s angular 6
@moigithub i can’t change the code else it would affect other thing
so, am stuck with looking for solution to this
@mstellaluna how was your overall experi
experience with it
mstellaluna
@mstellaluna
May 21 2018 02:22 UTC
@aisolae I stopped before I reached the node section, there were too many problems in the version of the course I had. I took it when it was angular 1
Ai rui 艾瑞
@aisolae
May 21 2018 02:22 UTC
oh
problem with version control
it’s a disadvantage
mstellaluna
@mstellaluna
May 21 2018 02:24 UTC
if I remember correctly you need to access this with the {{ }} in the HTML to grab the data out of the controller
I'm not familiar with angular 6
Ai rui 艾瑞
@aisolae
May 21 2018 02:28 UTC
yeah
i need the knowledge of javascript to solve it
everything i uses gives me a different solutions
results i mean
i have 2 hrs left to submit
i hate the deadlines on it
Claudio Restifo
@Marmiz
May 21 2018 02:31 UTC
ain't it just a ngFor="dish in Dish" how you loop in Angular?
mstellaluna
@mstellaluna
May 21 2018 02:31 UTC
@aisolae I would try with what @moigithub suggested
@Marmiz I don't remember tbh
Claudio Restifo
@Marmiz
May 21 2018 02:33 UTC
@mstellaluna nver used angular, but for what I recall the looping in more similar to Vue (where you have a for loop tag) than react where you actually just write a map function
Ai rui 艾瑞
@aisolae
May 21 2018 02:34 UTC
<mat-card>
<mat-card-header>
<mat-card-title>
<h3>Comments</h3>
</mat-card-title>
<mat-card-content>
<mat-list>
<mat-list-item *ngIf="dish in Dish">
{{selectedDish.comments}}
</mat-list-item>
</mat-list>
</mat-card-content>
</mat-card-header>
</mat-card>
Claudio Restifo
@Marmiz
May 21 2018 02:34 UTC
found in the docs
Moisés Man
@moigithub
May 21 2018 02:34 UTC
quick googling should get u a basic example
mstellaluna
@mstellaluna
May 21 2018 02:35 UTC
I don't normally suggest cheating but you can actually find other people's work on github
@Marmiz possibly ...
I think its ng-repeat
Moisés Man
@moigithub
May 21 2018 02:37 UTC
<table>
   <tr *ngFor="let item of lista">
        <td>{{item}}</td>
   </tr>
</table>
Claudio Restifo
@Marmiz
May 21 2018 02:39 UTC
^
mstellaluna
@mstellaluna
May 21 2018 02:39 UTC
@moigithub thanks
CamperBot
@camperbot
May 21 2018 02:39 UTC
mstellaluna sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3757 | @moigithub |http://www.freecodecamp.org/moigithub
Ai rui 艾瑞
@aisolae
May 21 2018 02:40 UTC
Ok, will try that
Claudio Restifo
@Marmiz
May 21 2018 02:40 UTC
then if you want the comments simply loop over item.comments
Moisés Man
@moigithub
May 21 2018 02:42 UTC
or.. probably need a nested loop
Ai rui 艾瑞
@aisolae
May 21 2018 03:04 UTC
not working, however. i checked how others did it on github and it seems they are more advance and will have to go through it again
i do know i am on the right track, in their case they created different service for each rather than putting it together like it did
Ai rui 艾瑞
@aisolae
May 21 2018 03:15 UTC
thanks guys
logging out
klay
@klaaay
May 21 2018 06:33 UTC
你的p元素应该包含文本"View more ",注意more后面有一个空格。
这个为什么一直报错
Hugo
@chuan9027
May 21 2018 15:10 UTC
Import a Google Font -导入谷歌字体卡住了 求解决 谷歌能上 就是下面的 Monospace 字体出问题
May Kittens Devour Your Soul
@diomed
May 21 2018 15:13 UTC
doesnt link above help you?
thank you
@diomed can i help me?
May Kittens Devour Your Soul
@diomed
May 21 2018 15:16 UTC
mstellaluna
@mstellaluna
May 21 2018 15:18 UTC
@chuan9027 what's the issue you are having with that challenge?
Hugo
@chuan9027
May 21 2018 15:18 UTC
@diomed Here not my question。
May Kittens Devour Your Soul
@diomed
May 21 2018 15:18 UTC
show your code
Hugo
@chuan9027
May 21 2018 15:19 UTC
@diomed Hold on.
@diomed

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster">

<style>
.red-text {
color: red;
font-family:Lobster;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>

May Kittens Devour Your Soul
@diomed
May 21 2018 15:21 UTC
@chuan9027 h2
mstellaluna
@mstellaluna
May 21 2018 15:21 UTC
@chuan9027 you need to apply the lobster font to the h2 element
Norvin Burrus
@ndburrus
May 21 2018 15:21 UTC
@chuan9027 add a space after font-family:, before Lobster;
May Kittens Devour Your Soul
@diomed
May 21 2018 15:21 UTC
not in .red-text :x:
h2 :ballot_box_with_check:
@ndburrus he must give it to h2 element
Hugo
@chuan9027
May 21 2018 15:22 UTC
I tyr.
May Kittens Devour Your Soul
@diomed
May 21 2018 15:23 UTC
@chuan9027 who is this on your avatar?
[name???] :arrow_up:
Hugo
@chuan9027
May 21 2018 15:25 UTC
I @diomed i do't no
it's form avatar
May Kittens Devour Your Soul
@diomed
May 21 2018 15:26 UTC
ok
Hugo
@chuan9027
May 21 2018 15:27 UTC
@diomed @ndburrus @mstellaluna

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster">

<style>
.red-text {
color: red;
font-family:Lobster;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

Or wrong
mstellaluna
@mstellaluna
May 21 2018 15:29 UTC
@chuan9027 you need to create the h2 CSS class and take out font-family: lobster from the .red-text class and add it to the `h2
Hugo
@chuan9027
May 21 2018 15:30 UTC
It prompts font "Monospace" error
mstellaluna
@mstellaluna
May 21 2018 15:31 UTC
<style>
  .red-text {
    color: red;
  }

  p {
    font-size: 16px;
    font-family: monospace;
  }

  h2 {font-family: Lobster;}
</style>
Hugo
@chuan9027
May 21 2018 15:33 UTC
@mstellaluna thank you
CamperBot
@camperbot
May 21 2018 15:33 UTC
chuan9027 sends brownie points to @mstellaluna :sparkles: :thumbsup: :sparkles:
:cookie: 664 | @mstellaluna |http://www.freecodecamp.org/mstellaluna
Hugo
@chuan9027
May 21 2018 15:33 UTC
Problem solved.
You're very ill
May Kittens Devour Your Soul
@diomed
May 21 2018 15:36 UTC
what do I have? cancer?
Hugo
@chuan9027
May 21 2018 15:38 UTC
why do you say?
May Kittens Devour Your Soul
@diomed
May 21 2018 15:39 UTC
Hugo
@chuan9027
May 21 2018 15:41 UTC
yes ,I agree
May Kittens Devour Your Soul
@diomed
May 21 2018 15:45 UTC
title really speaks to me at the moment
Hugo
@chuan9027
May 21 2018 15:49 UTC
OK ! I should be sleeping.
May Kittens Devour Your Soul
@diomed
May 21 2018 15:50 UTC
ok. good night
Hugo
@chuan9027
May 21 2018 15:51 UTC
good night too !
@diomed Can you add friends here?
May Kittens Devour Your Soul
@diomed
May 21 2018 15:52 UTC
no
Hugo
@chuan9027
May 21 2018 15:53 UTC
it's too bad.
Hopper Kremer
@hopperkremer
May 21 2018 18:07 UTC
Hi guys, I'm working on a Twitter bot with Node.js using this JSON: https://raw.githubusercontent.com/Bowserinator/Periodic-Table-JSON/master/PeriodicTableJSON.json
Is there a way to get all direct image links from the spectral_img field?
Christopher McCormack
@cmccormack
May 21 2018 18:11 UTC
@hopperkremer you want to gather them all into another array maybe?
Hopper Kremer
@hopperkremer
May 21 2018 18:12 UTC
Sure
Christopher McCormack
@cmccormack
May 21 2018 18:13 UTC
@hopperkremer maybe something like
const images = jsonResponse.elements.map(item => item.spectral_img)
just making up a name for your json response object, of course :)
Christopher McCormack
@cmccormack
May 21 2018 18:13 UTC
This will map over the elments array in your json response and return only the spectral_img property value in the new array
ah
sorry misunderstood
Hopper Kremer
@hopperkremer
May 21 2018 18:16 UTC
That's ok, I didn't explain clearly at first. @cmccormack thanks anyway
CamperBot
@camperbot
May 21 2018 18:16 UTC
hopperkremer sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1462 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
May 21 2018 18:20 UTC
@hopperkremer you may have to use the wikipedia api to do a followup query for the Media object, but i'm not 100% sure
Hopper Kremer
@hopperkremer
May 21 2018 18:20 UTC
Ahh, ok. I'll look into it
Manuel Reyes
@Androbat
May 21 2018 19:22 UTC
What's up guys!
Who in here has played in linux with playonlinux?
Joseph
@revisualize
May 21 2018 22:16 UTC
Hello.
anthonygallina1
@anthonygallina1
May 21 2018 22:30 UTC
Hello
LOL looking maybe pipe?
Rakshit Sinha
@sinharaksh1t
May 21 2018 22:41 UTC
Looks like Colt Steele sent you here :p
I'm almost reaching that stage on the course!
Marco Ramos
@TheMarco77
May 21 2018 23:07 UTC
ANyonw using beta.freecodecamp?
Joseph
@revisualize
May 21 2018 23:12 UTC
@TheMarco77 Not me.
@TheMarco77 I've played around with a few lessons but, I haven't saved my results.
Marco Ramos
@TheMarco77
May 21 2018 23:13 UTC
Ok cool!
Joseph
@revisualize
May 21 2018 23:23 UTC
@TheMarco77 Why do you ask?
1LifeLess
@1LifeLess
May 21 2018 23:25 UTC
Hi, is there a way in JS to convert to upper case a few variable at once without the need to create a temp local variable? something that equivalent to C# string format?
obj[key] = string.format(var1 + var2 + var3).ToUpper()
Joseph
@revisualize
May 21 2018 23:34 UTC
@1LifeLess hmm
@1LifeLess Strings in JS are immutable.
@1LifeLess So, you can do var1 = var1.toUpperCase();
1LifeLess
@1LifeLess
May 21 2018 23:36 UTC
@revisualize i guess i'll have to use it that way
var temp = var1 + var2 + va3
temp = temp.toUpper()
Joseph
@revisualize
May 21 2018 23:37 UTC
@1LifeLess .toUpperCase(); but, yeah.
1LifeLess
@1LifeLess
May 21 2018 23:39 UTC
yeah, used to C# syntax
Stephen James
@sjames1958gm
May 21 2018 23:43 UTC
@1LifeLess ("abc" + "def" + "red").toUpperCase() This works, so I assume substituting variables would
Yep