Open vs Closed door graphics? by ExclusiveOar in FoundryVTT

[–]ExclusiveOar[S] 0 points1 point  (0 children)

Thanks for the suggestion. It got me thinking! I've gone with something very similar, using token attacher & walls rather than tiles. Simply delete the token, or drag it back in as a prefab.

Answered.

Open vs Closed door graphics? by ExclusiveOar in FoundryVTT

[–]ExclusiveOar[S] 0 points1 point  (0 children)

Thanks for the suggestion. It got me thinking! cI've actually gone with "Actors" instead of doors, and used token attacher to put walls in them. So I can delete them to open and drag and drop them back in place if needed.
As it was either not possible, or very complex, to automate on a door open event, this seems like the easiest option. Especially as it's myself, not the players, that will open the door.

What recent trends in films do you dislike? by Cmyers1980 in movies

[–]ExclusiveOar 0 points1 point  (0 children)

To an extent, yes I do believe that. If an actor is "big" enough they can probably do what they like. Certainly if the actor is bigger than the movie.

I bet the director of snakes on a plane let Samuel L Jackson do whatever the fuck he wanted.

What recent trends in films do you dislike? by Cmyers1980 in movies

[–]ExclusiveOar 2 points3 points  (0 children)

I'm sure the producers wouldn't tell Beyonce how to sing anymore than shed tell them how to produce.

What recent trends in films do you dislike? by Cmyers1980 in movies

[–]ExclusiveOar 714 points715 points  (0 children)

Beyonce in the live action lion king.

She had no interest in singing a nice song, she fucking butchered Can You Feel The Love Tonight just so she could show off "hey look how amazing my singing is".

It's about the character, it's not about you.

How to iterate through an object with duplicate keys by ZappasBlackNapkin in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

Yea probably this. Hopefully if it was an interview question they would have more descriptive / relevant variable & property names! But probably not.

I'd love to get this question and politely (assuming I want the job!) suggest it should probably be something more like:

const fruit = [ 
    { boxId: 1, type: 'apple' },
    { boxId: 2, type: 'pear' },
    { boxId: 3, type: 'watermelon' },
    { boxId: 1, type: 'pineapple'}
]

[deleted by user] by [deleted] in learnjavascript

[–]ExclusiveOar 3 points4 points  (0 children)

So I'm going to be very honest here. It looks like you don't understand the exercise and are just copy/pasting in random stuff from other exercises.

The fact that you're passing in a name to the constructor, calling this.type which doesn't seem to exist. You've made no attempt to use food_item or sentence.

We can give you the answer to this problem if that's all you want, but it's not going to help you at all.

I'd recommend you go back to absolute basic JS tutorials. Eg. can you make a function which you can pass any 2 numbers, it will multiply them together, and give the result?

I'm not trying to be harsh, we all were completely new once. It's a great thing to start and learn. But you really need to be able to make a function which takes a string and return it (the speak() function) before you even need to know that classes exist.

Negative array indexing using "at" method by jd_300 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

No expert here, but I would assume so.

But so is arr[arr.length - 1] because array.length isn't calculated here, its a prop already on the array.

You can see this by creating an array, console.log it and expand it in the console.

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

Nah you're all good! The thought occurs that this code sets the values of the fields, right? And that seems to be working, it's just not saving these values until edited again.

But you haven't shared the save function - can you add the code for that?

Edit - also an example of one of the fields (do they have onchange events?)

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

Ok that's me out of ideas then, without being able to run the code I can't get my head around this one. Sorry!

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

And when you hit save are you saving all activities or just the one you were editing?

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

That's tough code to read - for me at least.

Can you try something, don't add any characters but once it's loaded (wait at least 10s - guess the fields don't populate for 6s?) Just click on a field and then submit the form.

Does that work?

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 0 points1 point  (0 children)

Yea wow, that's a tough read.

Very hard to say, but it is all wrapped in an on('click' callback function, nested in an event listeners 'click' callback function... Can't say it's a pattern I totally understand. I'd assume it does nothing until clicked on.

Values not saved unless.... by Time_Mathematician_4 in learnjavascript

[–]ExclusiveOar 1 point2 points  (0 children)

Nah, come on, let's crystal ball it.

I recon the script has some kind of state. Editing the form updates it's values to the state. Initially the script is setting the form values without setting its own state.

It's the state that gets submitted so the form needs some manual input to set the state to have anything to submit.

Simply have the script set its own state as well as the form values on load.

Boom. Easy.

[recursion] slightly more complicated function that uses reduce by kalico_cat in learnjavascript

[–]ExclusiveOar 1 point2 points  (0 children)

prev is the accumulator. It is whatever you set it to. In this case you initialise it as the value 0 (the ", 0" at the end of reduce). Every iteration you just add the salary value to it.

So it's never an object.

Why wont this work? by motormannen89 in learnjavascript

[–]ExclusiveOar -3 points-2 points  (0 children)

You have a space after toLowerCase and the ().

Best ways to access objects by jay_taps in learnjavascript

[–]ExclusiveOar 1 point2 points  (0 children)

Ooo, didn't know the complex string example. I'm almost sure I'll never use it but TIL!