Multithreading Problem - Not understanding how the concept of printf implemented in concurrency - multithreading

Im struggling a problem in multithreading which I have two threads running over one printf ; and I don't know how exactly those four cases that's already explained in that video are correct?! could anyone please illustrate more about them? appreciated for any help to understand why what's explained here to that problem is correct !
I'm attaching down the video of the problem:
enter link description here
Appreciated for any help for how those 4 cases of the problem are correct .

Related

CE/ which approach should i do for this case?

ive been learning tutorials and i now understand how to find address for such as damage, speed, xp and others
but if you take a look at the video below (basically its to find a guy with medal)
https://i.imgur.com/82bEMTH.mp4
some guy uploaded an explanation video of how to do it(the link below)
i guess
but i really dont understand since all i can do is changing the value(that has numbers)
https://i.imgur.com/OiHMdQE.mp4
so my question is is this (the explanation video above) doable in CE
and if so, what value should i look for? i would appreciate any tips!

Python - why are 2 completely different strings the same

So, recently I was working on a programming challenge I made for myself and when I was playing around with strings and I managed to come across this.
"/|||||\\" in "//|||||\ "
This, for some reason, returned True and I have no idea why.
Thanks in advance!

S3 NodeJS -ListObjects always returns 0

The code for this question is already here:
Does writing to S3(aws-sdk nodeJS) conflict with listing objects in a bucket?
Please be sympathetic, I've been on this problem for days and I'm a complete rookie. I am trying to poll for a list of objects(haveFilesBeenWrittenToBucket method) and then read the file when there are objects (readFile method). If I place a breakpont on the callback(items) in the haveFilesBeenWrittenToBucket, everything works fine. If I don't, I always get 'number of items 0' written out to the console. It is not predictable exactly when the stuff will be written to S3, but it should be within a minute. There appears to be a race condition, and I would be very grateful if anyone could help me out here. I'm desperate for ideas. Thanks so much.
P.S. I was advised to make this a separate question to the one asked in the link.
In the end, I was barking up the wrong tree- my error had nothing to do with node.

What does mean --[[ in NodeJS?

I'm googling for a long time but there are no explanation of my problem. When I input in NodeJS interpreter --[[ then it does not allow me do something else. Is it a bug or it's a feature which I can use? How? Could someone explain me this? Thanks for advance.
The interpreter is waiting for you to close the two arrays you opened with [[ and will keep accepting input until you close both with ]], at which point it will correctly crash because you cannot subtract (--) from an array.

Two lines segment intersection step by step

I am studying algorithm and math and I came up to "Intersection of two line segment". I searched a good code and explanation about it but with no luck I didn't understand how it works step by step. I read this page and #Gareth explained it well Here's the link . I am very confused. I Have a example like this one p=(11,11), r=(-12,-12), q=(0,0), s=(0,10). My question is how will I apply it to #gareth's expanation. :-(, I am not really good in math so for now I need help.
Any help would be highly appreciated. Thank you guys. Hope there is someone would help me understand this.

Resources