Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Nazar
@IsaakNazar
.links:hover {
  transition: background  .3s ease-in-out;
  background: rgba(0, 0, 0, 0.8);
}
Matt
@DaftlyPunkish
Now I'm getting "compChoice" is not a function
Here's my pen
Tom
@moT01
ease in-out means the transition will start slow and end slow @IsaakNazar
you didnt put it in brackets
Nazar
@IsaakNazar
@moT01 there is on the code works only ease in
Matt
@DaftlyPunkish
Oops, forgot to save iut
it*
Refresh it
@DaftlyPunkish
you need to return from the function
return compChoice
so when you call compPicker()
it will give you compChoice
or whatever you return from that function
making any sense?
Matt
@DaftlyPunkish
It does
I'm just trying to figure out how to apply that to my function
Tom
@moT01
@IsaakNazar ease-in-out does not mean the transition will fade in, then also fade out - it means that the speed of the transtion will start slow (ease-in) and end slow (ease-out)
Matt
@DaftlyPunkish
I'm still getting an error
function compPicker() {
var compChoice = options[Math.floor(Math.random() * 9)];
return compChoice();
}
Tom
@moT01
compChoice is a variable, not a function
Harut
@harut-g
Who is familiar with mongoose?
Matt
@DaftlyPunkish
Oh!
function compPicker() {
var compChoice = options[Math.floor(Math.random() * 9)];
console.log(compChoice);
}
Thank you!
Tom
@moT01
you could shorten it to return options[Math.floor.....9]
the dots not meaning dots -but the rest of what you had
@harut-g somewhat
Matt
@DaftlyPunkish
How would I apply that to the compchoice var?
Tom
@moT01
dont need it anymore
Harut
@harut-g
@moT01 have you experience with it?
Tom
@moT01
function compPicker() {
return options[Math.floor(Math.random() * 9)];
}
then if you console.log(compPicker()) elsewhere - you will get your random things
@harut-g somewhat
Matt
@DaftlyPunkish
I'm starting to think my logic is going to require way too much code and be ridiculously messy. I'm going to have to write an if/else statement for each choice and for each result the compPicker returns
Harut
@harut-g
@moT01 I have two create method on model, which saves the data. And I need to send some data when two methods is done, can you help me with it?
Tom
@moT01
@IsaakNazar move the transtion to the .links
and it will work both ways
Matt
@DaftlyPunkish
Plus all the if statements for all the win variables
Tom
@moT01
@harut-g do you have the code somewhere?
Harut
@harut-g
This message was deleted
                Facility.create(filesJson['facilities'], (err, result) => {
                   if (err) throw err;
                });

                People.create(filesJson['people'], (err, result) => {
                    if (err) throw err;
                });
@moT01 I need to send response when these two methods are done
Tom
@moT01
node?
express
Harut
@harut-g
@moT01 yes
Tom
@moT01
here's some code i've used
newBook.save().then(() => {
             books.find().then(r => {
res.send([r,message]);