This commit is contained in:
Miloslav Ciz 2025-03-27 21:46:32 +01:00
parent a8a9ce5cfc
commit 3fe12a0939
17 changed files with 1991 additions and 1979 deletions

View file

@ -534,9 +534,10 @@ Bear in mind this is not a school test that's supposed to decide if you get to a
124. The ISS orbits 400 km above [Earth](earth.md) surface. The Earth radius is 6378 km. How far away (from the ISS) is the Earth's horizon?
125. Write the hexadecimal values of a pure green color in 24 bit RGB, [RGB565](rgb565.md) and [RGB332](rgb332.md) formats.
126. You're a [gigachad](gigachad.md) currently headed to a bar from a concert of three cute Thai singers. Entering the bar you see the singers sitting at the bar. From Internet you know two are [transsexual](transsexual.md) and one is a biological women, but because Asians look all the same you don't know which is which -- of course you want to get laid by the real woman while avoiding a chick with penis because that's [gay](gay.md). You can't ask them about this as such questions are forbidden and you'd get [cancelled](cancel_culture.md), so you randomly choose one of them and start hitting on her. Suddenly one of their Asian friends comes who is visibly gay and enjoys cock, he slaps one of the other chicks' ass and they leave together, so you know that chick was a tranny. Taking into account [probability](probability.md), should you keep hitting on your current chick or rather switch to hitting on the other one that's now left from the pair? Or does it not matter? Explain your reasoning.
127. Someone wants to kill you in a very special way: he [magically](magic.md) shrinks you so that you're just 2 cm tall and puts you in a blender, but doesn't put the lid on as he's convinced you can't escape. The blender will be turned on in one minute. What do you do?
128. When a download manager is about to start downloading a file whose size is known, it usually reserves the whole space that will be needed for the file on the disk beforehand by creating a file of that size, into which it subsequently writes the data as it's downloaded. What is the main reason for doing this? Why doesn't the program simply create an empty file and then keep appending data to it as it gets downloaded?
129. Did you enjoy this quiz?
127. Given an equation *x + N = 2^x*, find *N* such that there is exactly one solution.
128. Someone wants to kill you in a very special way: he [magically](magic.md) shrinks you so that you're just 2 cm tall and puts you in a blender, but doesn't put the lid on as he's convinced you can't escape. The blender will be turned on in one minute. What do you do?
129. When a download manager is about to start downloading a file whose size is known, it usually reserves the whole space that will be needed for the file on the disk beforehand by creating a file of that size, into which it subsequently writes the data as it's downloaded. What is the main reason for doing this? Why doesn't the program simply create an empty file and then keep appending data to it as it gets downloaded?
130. Did you enjoy this quiz?
### Answers
@ -667,9 +668,10 @@ sin(x) / cos(x) - log2(2) = tg(x) - 1*, so we get *tg(x) >= 1*. So that will hol
124. Draw the shit on paper: draw a ball (Earth) and a point above it (ISS), then draw a tangent line from the point to the ball. Then draw a line from the ball center to the ISS and from the ball center to where the tangent line touches that ball (the horizon). Obviously there's a right angle at the tangent line touch point, so we have a right triangle. One side is the Earth radius and the longest side is the radius plus the orbit height. From this we compute the remaining side as *sqrt((6378 + 400)^2 - 6378^2)*, which gives us approx. 2293 km.
125. 24 bit RGB is easy: 00ff00. For 565 we want a 16 bit value whose upper and lower 5 bits are zero, with the middle bits being ones, i.e. 0000011111100000 in binary, which is 07e0 in hexadecimal. Similarly for 332 we get 1c.
126. This is a variant of the [Monty Hall](monty_hall.md) problem, the correct thing is to switch, reasoning being as follows: Initially you pick a chick at random, giving you higher probability (2/3) of choosing a tranny. Now if you chose a tranny, then once the other tranny is eliminated, the biological chick is the one you are NOT hitting on now, so you should switch. Of course if you picked the biological one at start, you will now switch to a tranny, but this is the less likely scenario.
127. Apparently the expected answer is this: just jump out of the blender. How? If you're so small, you can jump much higher, just like bugs can, as physics on such a small scale functions differently (which is why for example elephants can't jump at all while a cat can jump to a height many times its own height).
128. It prevents [fragmentation](fragmentation.md), especially with large files. Creating a small file and then appenging to it by small chunks will more likely lead to the file not fitting to the preallocated space and having to be split and scattered all over the disk.
129. yes
127. Plotting the right hand side, *2^x*, and seeing that the left hand side, *x + N*, is a 45 degree line shifted up/down by *N*, we see we are looking for *N* that will shift the line up so that it touches the curve in exactly one point, i.e. be its TANGENT. This means the [derivatives](derivative.md) of the line and the curve must be the same at that point. Derivative of *x + N* is 1 everywhere, so we want to find where the derivative of the right hand side equals 1, i.e. solving *(2^x)' = 2^x * log(2) = 1*, which gives us *x = log2(1/log(2)) ~= 0.528. Substituting to the original equation gives us *N ~= 0.913*.
128. Apparently the expected answer is this: just jump out of the blender. How? If you're so small, you can jump much higher, just like bugs can, as physics on such a small scale functions differently (which is why for example elephants can't jump at all while a cat can jump to a height many times its own height).
129. It prevents [fragmentation](fragmentation.md), especially with large files. Creating a small file and then appenging to it by small chunks will more likely lead to the file not fitting to the preallocated space and having to be split and scattered all over the disk.
130. yes
## Other