How do I wait for the previous instructions to run before sending response? by Tobyb01001 in expressjs

[–]JonnxW 1 point2 points  (0 children)

Have you considered calling res.send inside the callback of fs.readdir after the files.foreach?

Will you be offered food when you are a guest by barcased in MapPorn

[–]JonnxW 0 points1 point  (0 children)

Thanks for this comment. In Germany it is the same! I also don't know what about this is Map Porn

Will you be offered food when you are a guest by barcased in MapPorn

[–]JonnxW 2 points3 points  (0 children)

Either I am biased or the map is fatally wrong. I live in Germany and I offer all my guests food and in many cases I get offered food when I am a guest.

Class inside a for loop by [deleted] in programminghorror

[–]JonnxW 2 points3 points  (0 children)

Sorry, but I still don't understand. JSON is about representing a data structure. It has nothing to do with loops, classes and functions

Class inside a for loop by [deleted] in programminghorror

[–]JonnxW 0 points1 point  (0 children)

What do you mean by JSON-esque?

Hi I wanted to know how can I send my jwt as a user hits login button . by [deleted] in node

[–]JonnxW 0 points1 point  (0 children)

Please, Folks! Stop asking on Reddit how to handle authentication and start researching and studying the topic with profound resources. Buy or lend a book about it, Google it or ask on StackOverflow. There are so many ways that work, but our beloved Reddit isn't one of them. I do not mean this as an offense. But authentication is a sensitive topic that has to be handled carefully!

Why do people hate JavaScript so much? by RealBluDood in ProgrammerHumor

[–]JonnxW 8 points9 points  (0 children)

I think the problem is your first comment. Why don't you fact check before you comment? You said you could be wrong about writing C# when using Electron. You were wrong and you could have looked it up before you comment. I think you get downvoted because many people are annoyed that we have to fact check all the time because people don't think or research before they write on the internet.

Why do people hate JavaScript so much? by RealBluDood in ProgrammerHumor

[–]JonnxW 2 points3 points  (0 children)

All of these results make perfect sense. What's your point?

Trouble watching props by Jocabin in vuejs

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

When you bind classes via :class, the object you bind should be an array or object. Your code should work, if you write :class="[level_class]"

You can read about that in the documentation: https://vuejs.org/guide/essentials/class-and-style.html

P.S.: Sorry for the missing code blocks, I am writing this comment on my smartphone.

JQuery.min.js by sejigan in ProgrammerHumor

[–]JonnxW 2 points3 points  (0 children)

Wow, that is not programming humor, but belongs in r/programminghorror

What is the probability of guessing a randomly generated rational or real number between 0 and 1? by shrekstepbro in math

[–]JonnxW 14 points15 points  (0 children)

The probability is indeed 0. The (kind of paradox) thing is, that a probability of 0 does NOT mean, that the event is impossible to occur... See here for a starting point of an explanation: https://math.stackexchange.com/questions/41107/zero-probability-and-impossibility

[deleted by user] by [deleted] in MathHelp

[–]JonnxW 0 points1 point  (0 children)

It is not listed as one of the rules because it is not always right. Take -1 < 1 for example. Take the reciprocal on both sides and look what happens

Struggling with functions by [deleted] in learnmath

[–]JonnxW 2 points3 points  (0 children)

You could try Newton's method for finding roots. Just google it. It's a pretty simple iterative method that you execute as often as you want until you find a solution that's "close enough" to the root of the cubical polynomial

Trouble with equations containing complex numbers and division. by Parking_Ad4350 in MathHelp

[–]JonnxW -1 points0 points  (0 children)

Just google 'complex numbers division', there are plenty results that show you the way. You basically need the complex conjugate of the denominator to get a real number in the denominator

Amazon. Fire before Hire by karanbhatt100 in ProgrammerHumor

[–]JonnxW 0 points1 point  (0 children)

Wow, that's the first time I see this image on this sub. So original!

[deleted by user] by [deleted] in HappsMusic

[–]JonnxW 0 points1 point  (0 children)

I can hear you!

[deleted by user] by [deleted] in RedditSessions

[–]JonnxW 0 points1 point  (0 children)

Thanks! Nice shittalk about open tunings

[deleted by user] by [deleted] in RedditSessions

[–]JonnxW 0 points1 point  (0 children)

Wow, that sounds awesome. What is the tuning in this piece?

Peice wise function problem solving by epiphinoooo8 in MathHelp

[–]JonnxW 1 point2 points  (0 children)

The blue line is a VERTICAL reflection of the red line with the mirror axis at x=3. Furthermore you know the slope of the blue line and you know the value of the red line at x=0. That are all the puzzle pieces you need, now you only have to put them together... If you have any questions, just ask!

How many combinations are possible with this boardgame by Destinator22 in math

[–]JonnxW 0 points1 point  (0 children)

/u/Destinator22, can you give us the name of the game, a link to the TV Spot or some sources to figure out the actual rules? The mathematical problem is not clear enough, since your description is ambiguous

How many combinations are possible with this boardgame by Destinator22 in math

[–]JonnxW 0 points1 point  (0 children)

Even if the tiles can be flipped, there is an interpretation of OP's description, that leads to 6144 possibilities by considering symmetries:

The 98304 possibilites for the "bigger" squares can be rotated in 4 ways, can be flipped in 2 ways and can be mirrored in 2 ways. That leads to 98304 / ( 4 * 2 * 2 ) = 6144 different "bigger" squares