These are chat archives for FreeCodeCamp/Help

17th
Jan 2018
Moisés
@moisesAlc
Jan 17 2018 02:10
hello, guys. I'm stunned to see that the exercises I already made are marked as unmade. And I can see my history of inputs for that particular exercise. But it happened to all that I already did. Someone knows what is this?
Manish Giri
@Manish-Giri
Jan 17 2018 02:12
@moisesAlc what do you mean "marked as unmade"
Moisés
@moisesAlc
Jan 17 2018 02:12
@Manish-Giri thanks for responding, it is not "checked"
CamperBot
@camperbot
Jan 17 2018 02:12
moisesalc sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6802 | @manish-giri |http://www.freecodecamp.org/manish-giri
Moisés
@moisesAlc
Jan 17 2018 02:13
@Manish-Giri I'll upload a picture and post it here
Manish Giri
@Manish-Giri
Jan 17 2018 02:13
@moisesAlc can you name such an exercise
okay
Moisés
@moisesAlc
Jan 17 2018 02:15
https://ibb.co/dKAN2R if you scroll down a little you will see the exercises not checked
Manish Giri
@Manish-Giri
Jan 17 2018 02:17
do you mean on the "map"?
Moisés
@moisesAlc
Jan 17 2018 02:17
yes
Redoing them will take me some days, I guess that's what I'm going to do
Manish Giri
@Manish-Giri
Jan 17 2018 02:18
maybe sign out and sign in back again?
you shouldn't need to redo them, at the very least, all the challenges that you've solved should be available on your profile here, irrespective of what appears checked on the map
Moisés
@moisesAlc
Jan 17 2018 02:20
I'm trying signin out and in again
Manish Giri
@Manish-Giri
Jan 17 2018 02:20
if the map is still not checked after signing in again, create an issue here, and describe the problem.
Moisés
@moisesAlc
Jan 17 2018 02:22
thanks, now I can't even sign in again... will try with another browsers. I'll follow your advice about the issue, many thanks! @Manish-Giri
CamperBot
@camperbot
Jan 17 2018 02:22
moisesalc sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
api offline
Manish Giri
@Manish-Giri
Jan 17 2018 02:22
@moisesAlc cool, good luck!
Claudio Restifo
@Marmiz
Jan 17 2018 02:23
@Manish-Giri :wave:
Kyle Holm
@thekholm80
Jan 17 2018 02:23
@Marmiz :wave:
Manish Giri
@Manish-Giri
Jan 17 2018 02:23
@Marmiz :wave:
Claudio Restifo
@Marmiz
Jan 17 2018 02:26
@thekholm80 :wave: lurking in the shadow, i see
:shipit:
Manish Giri
@Manish-Giri
Jan 17 2018 02:28
@thekholm80 @Marmiz what it's like here
Kyle Holm
@thekholm80
Jan 17 2018 02:30
I'm very sneaky
@Manish-Giri that guy has issues
Claudio Restifo
@Marmiz
Jan 17 2018 02:32
slightly different here in thailand
:sunny:
Manish Giri
@Manish-Giri
Jan 17 2018 02:33
i'm guessing that's a Jeep
Kyle Holm
@thekholm80
Jan 17 2018 02:33
looks like it
Manish Giri
@Manish-Giri
Jan 17 2018 02:33
if he has the money to buy a Jeep SUV, surely he can get some snow tires
instead of cussing on the street
lol
Kyle Holm
@thekholm80
Jan 17 2018 02:33
I think me mostly needs a lesson on how to drive in the snow
and maybe some zanex
Manish Giri
@Manish-Giri
Jan 17 2018 02:34
Moral of the story "Don't yell at your wheels. They can't hear you."
lotusdocker
@lotusdocker
Jan 17 2018 05:02
i can't writ code
Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
VaseJS
@VaseJS
Jan 17 2018 05:04
@lotusdocker you’re writing server code?
a1c4pon3
@a1c4pon3
Jan 17 2018 05:05
hey guys, does anybody have any idea whats this file " C:\xeldr "
Manish Giri
@Manish-Giri
Jan 17 2018 05:09
it's a virus
a1c4pon3
@a1c4pon3
Jan 17 2018 05:10
do u have any idea what kind of virus and how can i remove it ?
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:10
no clue what it is, I use linux and linux never has vira
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:11
no clue what it is, I use linux and linux never has vira
Installing Windows..
Virus detected! Virus detected!
Kyle Holm
@thekholm80
Jan 17 2018 05:12
dang, you're up late Bob
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:12
It's 6 AM in the morning for me, lol
Kyle Holm
@thekholm80
Jan 17 2018 05:12
that's really late
a1c4pon3
@a1c4pon3
Jan 17 2018 05:12
danng goodmorning to you
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:12
6:12 am here
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:12
That's not late, that's early
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:13
got like two hours of sleep.. that's all i need to stay alert the rest of the day
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:13
Though I think I'm close ato 42 hours without sleep now, lol
Kyle Holm
@thekholm80
Jan 17 2018 05:13
yikes
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:14
I tell everyone I go to sleep. End up watching a serie, then a movie, then code some.. damn its morning again
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:14
ahh life!
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:15
Ah well. Perks of having DSPS.. if I dont take meds I can stay awake for a very long time
Kyle Holm
@thekholm80
Jan 17 2018 05:15
i would have a psychotic break if I tried that
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:15
ever tried that sleep 20 min every 4 hours?
Kyle Holm
@thekholm80
Jan 17 2018 05:16
that sounds horrible
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:16
yeah, kinda hoping for other to try it and review it
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:16
Couldn't try it if I wanted it to
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:16
but if it works it is perfect for coders imo
Kyle Holm
@thekholm80
Jan 17 2018 05:17
I think Kramer on Seinfeld tried it
you can imagine how it worked out for him
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:17
I miss Kramer
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:17
Without meds, it takes a couple of days before I'm able to sleep. And if I take my meds, I'll be knocked out for at least 7 - 8 hours
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:17
he pulled that show together nicely
remember when he want to Florida or something, Seinfeld turned on tv and there was Kramer rollerskating as if it was an amazing coincidence.
Kyle Holm
@thekholm80
Jan 17 2018 05:19
lol
polyphasic sleep, that's what it's called
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:20
oh yeah
Kyle Holm
@thekholm80
Jan 17 2018 05:20
i'm trying to figure out which seinfeld episode it was lol
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:20
Anyway, it won't work. Even though you'll be able to rest enough to stay awake every 4 hours, you'll eventually start cracking up because your body needs at least 2 hours to enter the REM state of sleep. There have been experiments before that proved that humans can't do without for a long time. They had to stop the experiments, but continued them on mice. They eventually died even though no physical cause of death could be found
Kyle Holm
@thekholm80
Jan 17 2018 05:21

lol it didn't work out well for Kramer

After Kramer falls asleep on her during a make-out session, she thinks that he's dead and calls some mobster-type friends of hers to "get rid" of him. Kramer is subsequently dumped into the Hudson River in a sack, waking him up after he falls into the water.

Alexander Køpke
@alexanderkopke
Jan 17 2018 05:21
yeah better not to mess with sleep.. it can kill, no doubt about it
LMAO!
Darren
@DarrenfJ
Jan 17 2018 05:23
evening fCC
Kyle Holm
@thekholm80
Jan 17 2018 05:23
@DarrenfJ :wave:
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:23
It's morning here
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:24
somehow I wish things like that would happen to me.. would make a great story to tell my friends.. instead I have to tell them about netflix epis that I watched, courses I'm taking.. good sheet but not a crowd pleaser
oh hi ya Darren!
Kyle Holm
@thekholm80
Jan 17 2018 05:24
@alexanderkopke I know what you mean
Darren
@DarrenfJ
Jan 17 2018 05:24
hi guys :D
and morning @bjorno43
Kyle Holm
@thekholm80
Jan 17 2018 05:25
there was a Seinfeld about Kramer getting to tell Kramer stories, too
I watch too much tv
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:25
Evening to you @DarrenfJ
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:26
we all do
according to the war of art, the resistance makes us watch tv, play games, etc instead of important stuff. Good book.
Kyle Holm
@thekholm80
Jan 17 2018 05:30
circus and bread
Darren
@DarrenfJ
Jan 17 2018 05:30
clay and puppets
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:30
yup
beer and ice cream.. nah your's was better
speaking bread. need breakfast.. Have a nice day, evening, night! :wave:
Darren
@DarrenfJ
Jan 17 2018 05:32
i could go for some beer and icecream...
@alexanderkopke have a good one AK :D
Alexander Køpke
@alexanderkopke
Jan 17 2018 05:33
thanks
Bjorn van de Peut
@bjorno43
Jan 17 2018 05:33
I've got both. But I think you'll be a lot cheaper of just buying em xD
Cya around @alexanderkopke
Happy-Ferret
@Happy-Ferret
Jan 17 2018 08:49

Any git gurus in here?

I'm looking for a way to efficiently pull changes based on a specific reference file.
I e a way to provide a file name and then only pull in the commits related to that file (full commits though. Not just the changes for that file but all related files in the same commit).

Sweet Coding :)
@SweetCodingInc
Jan 17 2018 09:57
@Happy-Ferret Pulling changes related to specific file goes against git philosophy
you can, however, checkout a particular commit hash
like git checkout <commit hash>
you can find commit hash from commits section on the github repo in question
Aditya
@ezioda004
Jan 17 2018 10:07
Can do git log too for the hash I believe
Muhammed Hafiz
@zifahm
Jan 17 2018 10:10
i need arr=["hello,hi,welcome"] to arr=["hello", "hi", "welcome"] ?
anybody can help?
Aditya
@ezioda004
Jan 17 2018 10:13
@zifahm arr = arr.join("").split(",")
Muhammed Hafiz
@zifahm
Jan 17 2018 10:14
@ezioda004 thanks
CamperBot
@camperbot
Jan 17 2018 10:14
zifahm sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
Jan 17 2018 10:54
@giorgimikadze Like this?
let d = new Date();
    const magic = () => d.getDate();
giorgimikadze
@giorgimikadze
Jan 17 2018 11:08
         https://beta.freecodecamp.org/en/challenges/es6/write-arrow-functions-with-parameters
Stephen James
@sjames1958gm
Jan 17 2018 11:35
@giorgimikadze Is there a question with that challenge?
giorgimikadze
@giorgimikadze
Jan 17 2018 11:40

@sjames1958gm Rewrite the myConcat function which appends contents of arr2 to arr1 so that the function uses arrow function syntax.
var myConcat = function(arr1, arr2) {
"use strict";
return arr1.concat(arr2);
};

User did replace var keyword.
myConcat should be a constant variable (by using const).
myConcat should be a function
myConcat() returns the correct array
function keyword was not used.

Stephen James
@sjames1958gm
Jan 17 2018 11:42
@giorgimikadze What have you tried?
The example const doubler = (item) => item * 2; is given and should be used for guidance
giorgimikadze
@giorgimikadze
Jan 17 2018 11:44
@sjames1958gm const myConcat = (arr1, arr2)
=> arr1.concat(arr2);
Stephen James
@sjames1958gm
Jan 17 2018 11:47
@giorgimikadze If that is on two lines you will have a problem the => needs to be on the same line as the (arr1,arr2)
giorgimikadze
@giorgimikadze
Jan 17 2018 11:47
@sjames1958gm oh thanks a lot
Stephen James
@sjames1958gm
Jan 17 2018 11:51
@giorgimikadze :+1:
There should have been a red circle indicating a syntax error - reading and trying to understand those will help in the long run
Fabien SHAN
@X140hu4
Jan 17 2018 12:16
Hello ! I have a question regarding deletion of documents with mongoose. I have a document called List that has a property cards. The property has an array containing ID's of another document (Card). I manage to delete the List document but I am not able to delete the subdocuments in the array cards...
router.delete('/list/:id', function(req, res, next){  
  List.findByIdAndRemove({_id: req.params.id}).then(function(list){
    res.send(list);
  });
});
Sweet Coding :)
@SweetCodingInc
Jan 17 2018 12:17
@X140hu4 just to confirm if I understood correctly, along with deleting the List document, you also want to delete the documents (assuming they are in same collection) whose Ids are present in cards array?
Fabien SHAN
@X140hu4
Jan 17 2018 12:17
Yes!
Fabien SHAN
@X140hu4
Jan 17 2018 12:25
I tried to put a Card.findByIdAndRemove(...) in a loop but I don't seem to be able to pass the id of the card in the query
Stephen James
@sjames1958gm
Jan 17 2018 12:27
@X140hu4 You are fetching the ids from the List and using those to delete the Cards? Before deleting the List?
Fabien SHAN
@X140hu4
Jan 17 2018 12:30
The List document already contains an array with the ids. So I would get them using list.cards, each element in the array is the ID of the related cards
I want to delete the cards then the list, otherwise the cards will remain and pollute the db
Like a rm folder -r :)
Fabien SHAN
@X140hu4
Jan 17 2018 12:41
Any ideas? :(
Sweet Coding :)
@SweetCodingInc
Jan 17 2018 12:51
@X140hu4 Sorry. was away...
First: Find your List by Id
then retrieve your cards array
then iterate over this cards array. While iterating, findByIdAndRemove each of the id
when it's done, then remove your lIst
if you remove list first, you'll lose access to the cards array as well
so it has to be deleted after all the documents with matching ids from cards array are deleted
Fabien SHAN
@X140hu4
Jan 17 2018 13:00
@SweetCodingInc Oh managed to delete the cards :)
Now I have to find at what point to remove the list
Sweet Coding :)
@SweetCodingInc
Jan 17 2018 13:01
@X140hu4 : :+1:
You can use something like async foreach to correctly detect when all the async calls are complete
Fabien SHAN
@X140hu4
Jan 17 2018 13:09
@SweetCodingInc Ok managed doing it!
Thanks :)
Sweet Coding :)
@SweetCodingInc
Jan 17 2018 13:09
@X140hu4 :+1:
Fabien SHAN
@X140hu4
Jan 17 2018 13:10
@SweetCodingInc Thanks!
CamperBot
@camperbot
Jan 17 2018 13:10
x140hu4 sends brownie points to @sweetcodinginc :sparkles: :thumbsup: :sparkles:
:cookie: 193 | @sweetcodinginc |http://www.freecodecamp.org/sweetcodinginc
Hordieiev Kostiantyn
@plasteelin
Jan 17 2018 13:40
Hi,campers! Can anyone help?
I complete the section "Front End Development Certification" but I don't see certificate in my profile. How much time must pass?
VaseJS
@VaseJS
Jan 17 2018 13:59
@plasteelin oh, you are a rare one. you should be helping us!
Hordieiev Kostiantyn
@plasteelin
Jan 17 2018 14:11
@VaseJS thx, but i never speak English that help))....Only with dictionary))
CamperBot
@camperbot
Jan 17 2018 14:11
plasteelin sends brownie points to @vasejs :sparkles: :thumbsup: :sparkles:
:cookie: 453 | @vasejs |http://www.freecodecamp.org/vasejs
ehutchllew
@ehutchllew
Jan 17 2018 14:42
@plasteelin I can't remember how long mine took to show up, but if my memory serves me, it did take a bit.
LydaTech
@lydatech
Jan 17 2018 14:48
@plasteelin someone need to verify the projects so it depends on how fast it is reviewed
Hordieiev Kostiantyn
@plasteelin
Jan 17 2018 14:51
@lydatech ,@ehutchllew Thanks)
CamperBot
@camperbot
Jan 17 2018 14:51
plasteelin sends brownie points to @lydatech and @ehutchllew :sparkles: :thumbsup: :sparkles:
:cookie: 365 | @ehutchllew |http://www.freecodecamp.org/ehutchllew
:star2: 2607 | @lydatech |http://www.freecodecamp.org/lydatech
Kaz Baig
@kbaig
Jan 17 2018 15:10
:wave:
Aleksandar Sasa Bozic
@dexy122
Jan 17 2018 15:44
Hey guys, I have a question. I started FCC a long time ago and stopped. I now want to start all over again. If I delete my account and create it again with the same email, would I start everything from the beginning?
Actually, forget it. It seems to have restarted on it's own.
Kaz Baig
@kbaig
Jan 17 2018 15:46
@dexy122 good luck!
Muhammed Hafiz
@zifahm
Jan 17 2018 16:31
Could anyone tell me why is this not rendering
https://codepen.io/m_zifah/pen/MrPZZO?editors=0011
console doesnt give any errors, i tried without the map and it works fine
artbohr
@artbohr
Jan 17 2018 16:50

@zifahm some of the errors I see , you are lacking the constructor

constructor(props) {
    super(props);

    this.state = { };

  }

also you have one className written as ClassName should be className

Darren
@DarrenfJ
Jan 17 2018 16:51
morning fCC
Muhammed Hafiz
@zifahm
Jan 17 2018 16:52
@artbohr i thought u could do without the constructor too, all the bind this stuff can be avoided right?
@artbohr it wouldnt render when it had a map in there , i removed the map and it renders properly
there was no console error too
Kyle Holm
@thekholm80
Jan 17 2018 16:57
@DarrenfJ :wave:
Ken Haduch
@khaduch
Jan 17 2018 16:58
@DarrenfJ @thekholm80 - hello to you and everyone.... :wavy_dash: :wave: :wavy_dash:
Kyle Holm
@thekholm80
Jan 17 2018 16:58
@khaduch good morning
artbohr
@artbohr
Jan 17 2018 17:00
@thekholm80 @DarrenfJ @khaduch :wave:
Ken Haduch
@khaduch
Jan 17 2018 17:00
@artbohr :wavy_dash: :wave: :wavy_dash:
Kyle Holm
@thekholm80
Jan 17 2018 17:01
@artbohr g'morning
artbohr
@artbohr
Jan 17 2018 17:04
@zifahm well, that's the way I see people build the state, can't tell why exactly, because I didn't go in to the details, but I think it's the correct way if you have a component which hold state, you put the state inside the constructor with super(props) , maybe people can correct me here, I would like also to learn the details ^^
Muhammed Hafiz
@zifahm
Jan 17 2018 17:10
yeah i refactored it and its still the same
maybe there is something wrong with map in codepen
artbohr
@artbohr
Jan 17 2018 17:13

@zifahm I think that's the only correct way to initiate a state in ES6, in ES5 it was

var TodoApp = React.createClass({ 
  propTypes: {
    title: PropTypes.string.isRequired
  },
  getInitialState () { 
    return {
      items: []
    }; 
  }
});

now in ES6 when you create your component with class TodoApp extends React.Component

you use this structure

class TodoApp extends React.Component {
  constructor () {
    super()
    this.state = {
      items: []
    }
  }
});
@zifahm map works perfectly fine in codepen, you should try to debug your code with smaller chunks, try doing a simpler map
Muhammed Hafiz
@zifahm
Jan 17 2018 17:18
sorry guys i was missing a return in the map
Tychro van den Broeke
@tychro
Jan 17 2018 19:12
does anyone know how to get the time and date in JS linked to my HTML?
Kaz Baig
@kbaig
Jan 17 2018 19:13
@tychro could you explain in a little bit more detail? Do you mean using JS to add a computed time to the DOM?
Tychro van den Broeke
@tychro
Jan 17 2018 19:15
i want to get the time and date on a website (time and date in JS) and want it linked with my HTML
Gersho
@Gersho
Jan 17 2018 19:23
""linked"" ? please specify
Tychro van den Broeke
@tychro
Jan 17 2018 19:26
like you link an CSS to youre HTML
Gersho
@Gersho
Jan 17 2018 19:27
and what would linking the time would be like for html ?
anyway for the time thing, look the doc for Javascript Date.
Kyle Holm
@thekholm80
Jan 17 2018 21:22
so much quiet
Kaz Baig
@kbaig
Jan 17 2018 21:23
shhhhhhh
Kaz Baig
@kbaig
Jan 17 2018 21:30
We're napping
Gersho
@Gersho
Jan 17 2018 21:37
my housekeeping is over tomorrow so i was cleaning
Kyle Holm
@thekholm80
Jan 17 2018 21:38
probably a good idea
Gersho
@Gersho
Jan 17 2018 21:39
considering the damage the dog has done, yeah
Tychro van den Broeke
@tychro
Jan 17 2018 21:39
well, oops haha
Gersho
@Gersho
Jan 17 2018 21:40
did you solve your issue ?
Tychro van den Broeke
@tychro
Jan 17 2018 21:41
yeah i get the date but it doesn't link it to my html
but tomorrow is another day so yeah
Gersho
@Gersho
Jan 17 2018 21:41
you'll have to define "link" because it makes no sense to me
Tychro van den Broeke
@tychro
Jan 17 2018 21:42
connected*
coneected to my html
like that?
Gersho
@Gersho
Jan 17 2018 21:43
you want to display the time to the user ? or something like that ? try to clarify what your aim is (defining your issue is important in general, as it allows you to google it :p )
Tychro van den Broeke
@tychro
Jan 17 2018 21:44
@Gersho yes that
@thekholm80 i can do it in html but need to do it in anther JS doc
Kyle Holm
@thekholm80
Jan 17 2018 21:45
@tychro sorry mate you're going to have to show some kind of example because I think we're all lost
Tychro van den Broeke
@tychro
Jan 17 2018 21:45
it's for an project for school
Gersho
@Gersho
Jan 17 2018 21:46
here's the few steps you should follow then
get the time via the Date method and store it in a variable
put that variable as text in your html
Tychro van den Broeke
@tychro
Jan 17 2018 21:46
so difficult to explain stuff in another lang
Gersho
@Gersho
Jan 17 2018 21:47
easiest would be jquery i guess ? but vanilla is ok too
Tychro van den Broeke
@tychro
Jan 17 2018 21:47
@Gersho i can try that
Kyle Holm
@thekholm80
Jan 17 2018 21:47
this is showing the time in html using javascript
Gersho
@Gersho
Jan 17 2018 21:47

@thekholm80 i can do it in html but need to do it in anther JS doc

you can get time in html ?_?

Tychro van den Broeke
@tychro
Jan 17 2018 21:48
i know but i need to do it in JS
<script>
var Datum = new Date(),
dag = Datum.getDate(),
maand = Datum.getMonth() + 1,
jaar = Datum.getFullYear();
document.write(dag + "/" + maand + "/" + jaar)
</script>
is that right?
Gersho
@Gersho
Jan 17 2018 21:49

i know but i need to do it in JS

that was a question, i didn't know you could do that in html

Kyle Holm
@thekholm80
Jan 17 2018 21:49
pretty close
Tychro van den Broeke
@tychro
Jan 17 2018 21:50
@Gersho ohw haha
@thekholm80 what's wrong with it?
Gersho
@Gersho
Jan 17 2018 21:50
don't you need Date.now() at some point ?
Tychro van den Broeke
@tychro
Jan 17 2018 21:51
where
Kaz Baig
@kbaig
Jan 17 2018 21:52
Date.now doesn't give a human readable format I think
construction a new Date with no params gives a date representing the moment it was called
Tychro van den Broeke
@tychro
Jan 17 2018 21:53
yeah that's what i want
Kyle Holm
@thekholm80
Jan 17 2018 21:53
i use var now = new Date() and then var time = now.toLocaleTimeString()
Gersho
@Gersho
Jan 17 2018 21:53

Date.now doesn't give a human readable format I think

yeah but you can get the values after with getYear and stuff
also you can try http://momentjs.com/docs

Kyle Holm
@thekholm80
Jan 17 2018 21:54
Tychro van den Broeke
@tychro
Jan 17 2018 21:55
you know what, i'll do this tomorrow cuz i don't have the energy for it anymore so yeah
couple weeks worked till midnight and don't want to do that now so i think i'll just go to sleep
Gersho
@Gersho
Jan 17 2018 21:57
let time = moment();
 $("#display").html(time.format("HH:mm"));
assuming jquery + momentJS
@tychro copy paste the stuff we said somewhere before going to sleep ;)
Tychro van den Broeke
@tychro
Jan 17 2018 21:58
yeah and tomorrow i'll look what is useble
Gersho
@Gersho
Jan 17 2018 21:58
:)
Tychro van den Broeke
@tychro
Jan 17 2018 21:59
@Gersho but only that?
only that piece of code or?
Gersho
@Gersho
Jan 17 2018 21:59
haven't used moment() in a while and copied stuff from one of my project so i might be missing something
Tychro van den Broeke
@tychro
Jan 17 2018 22:00
okay
figure that out tomorrow
thx
Gersho
@Gersho
Jan 17 2018 22:01
  let total = 0;
    {% for item in data %}
    total += moment.duration("{{ item }}")._milliseconds;
    {% endfor %}
    total /= 60000;
    total = total.toFixed();
    let time = moment().add(total, 'minutes');
    $("#display").html(total+"minutes");
    $("#time").html(time.format("HH:mm"));
    $("#command").html("{{ blocus }}");
i have this in my project and it displays the current time + the total listed earlier
so removing total should give the current hour
(don't mind the {% %} parts it's not JS)
Tychro van den Broeke
@tychro
Jan 17 2018 22:02
i'll try that then
Albert Cardona II
@daddycardona
Jan 17 2018 22:03
What up everyone been at school last few days it is awesoe :)
Gersho
@Gersho
Jan 17 2018 22:03
:clap:
yo
Kyle Holm
@thekholm80
Jan 17 2018 22:04
@daddycardona :wave:
Albert Cardona II
@daddycardona
Jan 17 2018 22:04
gersho what you writing it in
not as hard as I thought it would be but I am only on DC modules
Gersho
@Gersho
Jan 17 2018 22:04
the {% %} ? that's django
Albert Cardona II
@daddycardona
Jan 17 2018 22:04
I didn't know DJango knew how to code even though there was no computers in his time frame lol
hi
Kyle Holm
@thekholm80
Jan 17 2018 22:05
Django the immortal
Albert Cardona II
@daddycardona
Jan 17 2018 22:05
so I did not try anthing else with my calculator because I needed rest lol
Gersho
@Gersho
Jan 17 2018 22:05
i think more of the one piece character xD
Albert Cardona II
@daddycardona
Jan 17 2018 22:06
is one piece an anime
Gersho
@Gersho
Jan 17 2018 22:06
yes
best selling manga of all time actually
Albert Cardona II
@daddycardona
Jan 17 2018 22:06
that is what my son likes
is that the pirate anime
Gersho
@Gersho
Jan 17 2018 22:06
i'm just hoping he's not watching the 4kids version
yes it is
my tribute page is on the creator xD
Olapri
@Olapri
Jan 17 2018 22:08
Hello. Pls tell what to do to move the picture to the centre?
Albert Cardona II
@daddycardona
Jan 17 2018 22:09
yeah he watches the ones that is speaking japanese subtitles and other stuff too :)
Gersho
@Gersho
Jan 17 2018 22:09
good son !
@Olapri have you tried centering the whole div ?
Olapri
@Olapri
Jan 17 2018 22:11
@Gersho I have tried to move the row, the column... I don't get it ((
Gersho
@Gersho
Jan 17 2018 22:12
try using the text-align: center; CSS, but not directly on the image, put another div around it, so the image is considered the text of the div
Olapri
@Olapri
Jan 17 2018 22:14
also tried((
Kaz Baig
@kbaig
Jan 17 2018 22:16
Udemy really needs to stop trying to sell me Bootstrap and Node courses
Kyle Holm
@thekholm80
Jan 17 2018 22:17
@kbaig maybe they know something you don't?
Albert Cardona II
@daddycardona
Jan 17 2018 22:17
lol
I don't know @Olapri
I was like try margin: auto;
Kaz Baig
@kbaig
Jan 17 2018 22:21
@thekholm80 well yeah because I refuse to learn bootstrap
I had had enough of it by the time I got to the second front end cert project
Kyle Holm
@thekholm80
Jan 17 2018 22:22
@kbaig if you learn it, all your dreams will come true
you'll be taller, smarter, the ladies will find you irresistible
Kaz Baig
@kbaig
Jan 17 2018 22:22
I don't need to attract ladies anymore. I already won that game :D
Could do with a couple IQ points tho
Gersho
@Gersho
Jan 17 2018 22:33

you'll be taller

ehh, no thanks already troublesome as it is

Kyle Holm
@thekholm80
Jan 17 2018 22:34
@Gersho not you, Bootstrap doesn't work like that
only @kbaig
Albert Cardona II
@daddycardona
Jan 17 2018 22:34
@Olapri I took out the <div class = 'rows' and <div class = 'col-x etc.. and just kept thumb nail and put that .thumbnail{ margin:auto;}
Olapri
@Olapri
Jan 17 2018 22:35
@daddycardona oh, thanks.. it is great. Is it not default that container has the width 100% ?
CamperBot
@camperbot
Jan 17 2018 22:35
olapri sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 515 | @daddycardona |http://www.freecodecamp.org/daddycardona
Albert Cardona II
@daddycardona
Jan 17 2018 22:35
yeah I just realized you were making a div that was not needed I done this before :)
Olapri
@Olapri
Jan 17 2018 22:37
@daddycardona - Is "thumbnail" used like this to have white spaces on both sides around the picture?
Gersho
@Gersho
Jan 17 2018 22:38
i use col1 col10 col1
Kaz Baig
@kbaig
Jan 17 2018 22:39
@thekholm80 as a brown man, I'd be okay with being a bit taller than my genetics allow
Albert Cardona II
@daddycardona
Jan 17 2018 22:39
you can use it like this I just do what I saw on other sites and it worked on mine lol you can use padding to make white space make thumbnail 85% and all that does the same LOL ;)
Olapri
@Olapri
Jan 17 2018 22:39
@daddycardona I supposed and was trying to do so that ""thumbnail" has white space only beneath the picture.
Gersho
@Gersho
Jan 17 2018 22:39

@thekholm80 as a brown man, I'd be okay with being a bit taller than my genetics allow

i'm half caucasian half arabic, 1m91

Kyle Holm
@thekholm80
Jan 17 2018 22:40
that's like 6' 3"
Kaz Baig
@kbaig
Jan 17 2018 22:40
yikes
I'm like 5'9.5"
Kyle Holm
@thekholm80
Jan 17 2018 22:41
lol love the "and a half"
Gersho
@Gersho
Jan 17 2018 22:41
i'm not 12 i'm 12,5
Kaz Baig
@kbaig
Jan 17 2018 22:41
My dad's the tallest in the family at 5'10" while my girlfriend is the shortest in hers at 5'11"
Hey man every little bit counts at this height
Gersho
@Gersho
Jan 17 2018 22:42
i'd trade a few centimeters for a few kilos
Kyle Holm
@thekholm80
Jan 17 2018 22:42
my dad is 6' 4" and my mom is 5' 2", bit of a genetic lottery here
Albert Cardona II
@daddycardona
Jan 17 2018 22:42
oh you can use <figcaption> @Olapri
Gersho
@Gersho
Jan 17 2018 22:42
does he have hair ?
Kyle Holm
@thekholm80
Jan 17 2018 22:42
my dad?
Gersho
@Gersho
Jan 17 2018 22:42
yes
your mom too why not ?
Kyle Holm
@thekholm80
Jan 17 2018 22:42
not so much, less than me
Albert Cardona II
@daddycardona
Jan 17 2018 22:42
my parents are small 5 4 and 5
Olapri
@Olapri
Jan 17 2018 22:42
@daddycardona If I make 85% for "thumbnail" the picture is moving again to the left :)
Albert Cardona II
@daddycardona
Jan 17 2018 22:42
my dad haves more hair than me lol
Gersho
@Gersho
Jan 17 2018 22:43
that dosn't sound too hard
Albert Cardona II
@daddycardona
Jan 17 2018 22:43
it should be centered
Olapri
@Olapri
Jan 17 2018 22:45
it is centered. but it is moving to the left @daddycardona
Albert Cardona II
@daddycardona
Jan 17 2018 22:45
did you spell width properly
I don't get that issue
Olapri
@Olapri
Jan 17 2018 22:47
is <figcaption> the same as "<div class="caption">"?
yes... properly.. look... again moving to the left: https://codepen.io/ololpri/pen/vWojBW
Aditya
@ezioda004
Jan 17 2018 22:49
@Olapri Center like this?
https://codepen.io/ezioda004/pen/MrzaqY
Kaz Baig
@kbaig
Jan 17 2018 22:51
@Olapri You could choose to style a div with class caption or style figcaption elements and it visually wouldn't matter. The difference comes in the semantics of the markup
Olapri
@Olapri
Jan 17 2018 22:55
@kbaig @ezioda004 @daddycardona thanks men. I suppose I ve fixed it. Just margin-left: auto;
margin-right: auto; ..... finally :clap:
CamperBot
@camperbot
Jan 17 2018 22:55
olapri sends brownie points to @kbaig and @ezioda004 and @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @ezioda004 |http://www.freecodecamp.org/ezioda004
:cookie: 535 | @kbaig |http://www.freecodecamp.org/kbaig
api offline
Aditya
@ezioda004
Jan 17 2018 22:57
Anyone familiar with SVGs that can give me a good resource?
Albert Cardona II
@daddycardona
Jan 17 2018 22:57
you welcome @Olapri I also think since you put center in everything might of messed something up I basically did this to make it smooter but same thing as before https://codepen.io/AlThePal/pen/baQVwx
I can probably find a tutorial on youtube for you @ezida04
@ezioda004
Aditya
@ezioda004
Jan 17 2018 23:00
I'll take it, couldnt find a good one yet
Albert Cardona II
@daddycardona
Jan 17 2018 23:03
let me look :)
@ezioda004
Aditya
@ezioda004
Jan 17 2018 23:06
@daddycardona Thanks man, appreciate it!
CamperBot
@camperbot
Jan 17 2018 23:06
ezioda004 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 516 | @daddycardona |http://www.freecodecamp.org/daddycardona
Albert Cardona II
@daddycardona
Jan 17 2018 23:07
Yup :)