Update
This commit is contained in:
parent
484f66449a
commit
4f2dab65c3
5 changed files with 1806 additions and 1804 deletions
144
exercises.md
144
exercises.md
|
@ -109,41 +109,43 @@ Here are some questions to test your LRS related knowledge :D Questions here are
|
|||
8. Bob has written a program and then committed [suicide](suicide.md) because Alice sued him for sexual harassment. His program is now [unmaintained](maintenance.md). Bob's program uses 10 libraries. The probability that the API of one such library will be [updated](update_culture.md) and changed in any given year is 5%. If this happens, Bob's program will stop working. During the next 5 years what is the probability of his program breaking?
|
||||
9. What will the following C (C99) snippet print out? `int x = 2; putchar('a' + ((1 == 3 > 2) + ++x));`
|
||||
10. Order the following software by the date of the release of their 1.0 version from oldest to newest: [TempleOS](temple_os.md), [MS DOS](dos.md), original [Unix](unix.md), [Linux](linux.md), [Windows](windows.md). Also point out which one stands out from others and why.
|
||||
11. If you're running in a race and overtake the guy who's currently in third place, what place will you be in?
|
||||
12. When multiplying two *N* bit numbers (unsigned integers, direct representation), what is the minimum number of bits we will need to store their product? Prove it.
|
||||
13. We have two gears, each of same size and same number of teeth. Gear A is fixed in place, it can't move or rotate, gear B runs around gear A so that it keeps touching it (and therefore rotates along the way) until it gets to the place where it started. How many revolutions around its own axis (from your stationary point of view) has gear B made?
|
||||
14. What's the worst socioeconomic system in the world? You don't even have to say why because that would take too long.
|
||||
15. Manually convert the [binary](binary.md) numeral 10110000000010110101 to hexadecimal.
|
||||
16. Why do astronauts on the ISS feel weightlessness?
|
||||
17. How would you compute the circumference of a circle with radius *r* without using floating point? Consider just the approximate value of pi ~= 3.14, i.e. write the formula multiplying *2 * r* by 3.14 only using whole numbers (of course the result will be rounded to whole number too).
|
||||
18. Name at least five licenses commonly used for [FOSS](foss.md) programs, five text editors/IDEs commonly used for programming and five operating systems whose source code is mostly free-licensed (none of these is allowed to be using the same or forked kernel of any other).
|
||||
19. What is the minimum number of [bits](bit.md) that will allow us to represent 12345678910111213 distinct values?
|
||||
20. Give at least one example of [analog](analog.md) electronic device and one of [digital](digital.md) mechanical device.
|
||||
21. Transitive [relation](relation.md) is such that if element *A* is in relation with *B* and *B* is in relation with *C*, then also *A* is in relation with *C*. Give one real life example of transitive relation and one real life example of relation that is NOT transitive.
|
||||
22. Is physical violence ever justified?
|
||||
23. Find a normalized (having length 1) [normal](normal.md) ([vector](vector.md) that's perpendicular to surface) of the [triangle](triangle.md) defined by vertices *A = {1,2,3}*, *B = {5,5,1}* and *C = {1,5,2}*. (Orientation doesn't matter. Geometric, not [sexual](gay.md).)
|
||||
24. Why will (in a typical programming language such as C) an infinite [recursion](recursion.md) crash the program but infinite loop generally won't?
|
||||
25. Answer yes/no to following: Is base-three number 2101 greater than base-seven number 206? Is using [gemini](gemini.md) a good idea when [gopher](gopher.md) exists? Is there any [triangle](triangle.md) (in Euclidean geometry) whose one side is longer than the sum of lengths of its other two sides?
|
||||
26. There are two walls 2 meters apart, the right wall is moving left by the speed 0.1 m/s, the left wall is moving right by the same speed 0.1 m/s. There is a fly in the middle between the walls, flying by speed 1 m/s. It is flying towards one wall, then when it reaches it it turns around and flies towards the other wall etc. When the walls completely close in, what distance would the fly have traveled? (There is a simple solution.)
|
||||
27. Solve these [anagrams](anagram.md): *no cure sir*, *come piss ron*, *ginger*, *nicer shops*, *fog tag*, *trek now*.
|
||||
28. At what times, with precision to seconds, do clock hands overlap (just compute AM, PM is the same)?
|
||||
29. In 3D computer [graphics](graphics.md) what's the difference between [shading](shading.md) and drawing [shadows](shadow.md)?
|
||||
30. Can we say that the traditional feed forward [neural networks](neural_network.md) are [Turing complete](turing_complete.md)? Explain why or why not.
|
||||
31. Wicw mx uum yvfe bbt uhmtf ok?
|
||||
32. 8 bit binary value 10000101 will be interpreted as number 133 under unsigned, direct representation, but what number will it represent in [two's complement](twos_complement.md) representation?
|
||||
33. What is the *Big O* time [complexity](complexity.md) of worst case scenario for [binary search](binary_search.md)?
|
||||
34. Does the statement "10 does not equal 10" logically [imply](implication.md) that intelligent alien life exists?
|
||||
35. Consider a function *f(x) = sqrt(1 - x^2)* with *x* belonging to <-1,1>. Convert it to [polar coordinates](polar_coordinates.md), i.e. write function *g(angle)* that for given *angle* (in [radians](radian.md)) returns distance from origin and specify for which values of *angle* the function is defined.
|
||||
36. What is the principle of [asymmetric cryptography](asymmetric_cryptography.md) and why is it called *asymmetric*?
|
||||
37. What is the main reason for [Earth](earth.md) having seasons (summer, winter, ...)?
|
||||
38. Name at least three [x86](x86.md) [assembly](assembly.md) instructions and shortly explain what they do.
|
||||
39. Point out what's highly unusual or uncommon about this paragraph. That is find a quality of this paragraph that you wouldn't normally think to find if you took a random paragraph from, say, a random book in your library, or in similar work. It's not that difficult.
|
||||
40. WARNING: VERY HARD. There are two integers, both greater than 1 and smaller than 100. *P* knows their product, *S* knows their sum. They have this conversation: *P* says: I don't know the numbers. *S* says: I know you don't, I don't know them either. *P* says: now I know them. *S* says: now I know them too. What are the numbers? To solve this you are allowed to use a programming language, pen and paper etc. { Holy shit this took me like a whole day. ~drummyfish }
|
||||
41. Compare advantages and disadvantages of [hash](hash.md) tables vs binary [trees](tree.md) for storing text strings, especially in regards to searching the string database.
|
||||
42. A woman gave birth to two sons in the span of a single hour, i.e. they are of the same age, but they aren't twins. How is this possible?
|
||||
43. Name at least two TCP/IP or OSI [network](network.md) layers: about each shortly explain its purpose, addressing and at least one protocol of this layer.
|
||||
44. We know [HTTPS](https.md) is shit because it's [encrypted](encryption.md) and requires [certificates](certificate.md). Explain what these certificates are, why HTTPS needs them, how their absence could be "abused" and who issues them.
|
||||
45. Did you enjoy this quiz?
|
||||
11. Please manually evaluate the following expression: (log2(64) - cos(0)) * (6! + 123) / (1 / 19).
|
||||
12. If you're running in a race and overtake the guy who's currently in third place, what place will you be in?
|
||||
13. When multiplying two *N* bit numbers (unsigned integers, direct representation), what is the minimum number of bits we will need to store their product? Prove it.
|
||||
14. We have two gears, each of same size and same number of teeth. Gear A is fixed in place, it can't move or rotate, gear B runs around gear A so that it keeps touching it (and therefore rotates along the way) until it gets to the place where it started. How many revolutions around its own axis (from your stationary point of view) has gear B made?
|
||||
15. What's the worst socioeconomic system in the world? You don't even have to say why because that would take too long.
|
||||
16. Manually convert the [binary](binary.md) numeral 10110000000010110101 to hexadecimal.
|
||||
17. Why do astronauts on the ISS feel weightlessness?
|
||||
18. How would you compute the circumference of a circle with radius *r* without using floating point? Consider just the approximate value of pi ~= 3.14, i.e. write the formula multiplying *2 * r* by 3.14 only using whole numbers (of course the result will be rounded to whole number too).
|
||||
19. Name at least five licenses commonly used for [FOSS](foss.md) programs, five text editors/IDEs commonly used for programming and five operating systems whose source code is mostly free-licensed (none of these is allowed to be using the same or forked kernel of any other).
|
||||
20. What is the minimum number of [bits](bit.md) that will allow us to represent 12345678910111213 distinct values?
|
||||
21. Give at least one example of [analog](analog.md) electronic device and one of [digital](digital.md) mechanical device.
|
||||
22. Transitive [relation](relation.md) is such that if element *A* is in relation with *B* and *B* is in relation with *C*, then also *A* is in relation with *C*. Give one real life example of transitive relation and one real life example of relation that is NOT transitive.
|
||||
23. Is physical violence ever justified?
|
||||
24. Find a normalized (having length 1) [normal](normal.md) ([vector](vector.md) that's perpendicular to surface) of the [triangle](triangle.md) defined by vertices *A = {1,2,3}*, *B = {5,5,1}* and *C = {1,5,2}*. (Orientation doesn't matter. Geometric, not [sexual](gay.md).)
|
||||
25. Why will (in a typical programming language such as C) an infinite [recursion](recursion.md) crash the program but infinite loop generally won't?
|
||||
26. Answer yes/no to following: Is base-three number 2101 greater than base-seven number 206? Is using [gemini](gemini.md) a good idea when [gopher](gopher.md) exists? Is there any [triangle](triangle.md) (in Euclidean geometry) whose one side is longer than the sum of lengths of its other two sides?
|
||||
27. There are two walls 2 meters apart, the right wall is moving left by the speed 0.1 m/s, the left wall is moving right by the same speed 0.1 m/s. There is a fly in the middle between the walls, flying by speed 1 m/s. It is flying towards one wall, then when it reaches it it turns around and flies towards the other wall etc. When the walls completely close in, what distance would the fly have traveled? (There is a simple solution.)
|
||||
28. Solve these [anagrams](anagram.md): *no cure sir*, *come piss ron*, *ginger*, *nicer shops*, *fog tag*, *trek now*.
|
||||
29. At what times, with precision to seconds, do clock hands overlap (just compute AM, PM is the same)?
|
||||
30. In 3D computer [graphics](graphics.md) what's the difference between [shading](shading.md) and drawing [shadows](shadow.md)?
|
||||
31. Can we say that the traditional feed forward [neural networks](neural_network.md) are [Turing complete](turing_complete.md)? Explain why or why not.
|
||||
32. Wicw mx uum yvfe bbt uhmtf ok?
|
||||
33. 8 bit binary value 10000101 will be interpreted as number 133 under unsigned, direct representation, but what number will it represent in [two's complement](twos_complement.md) representation?
|
||||
34. What is the *Big O* time [complexity](complexity.md) of worst case scenario for [binary search](binary_search.md)?
|
||||
35. Does the statement "10 does not equal 10" logically [imply](implication.md) that intelligent alien life exists?
|
||||
36. Consider a function *f(x) = sqrt(1 - x^2)* with *x* belonging to <-1,1>. Convert it to [polar coordinates](polar_coordinates.md), i.e. write function *g(angle)* that for given *angle* (in [radians](radian.md)) returns distance from origin and specify for which values of *angle* the function is defined.
|
||||
37. What is the principle of [asymmetric cryptography](asymmetric_cryptography.md) and why is it called *asymmetric*?
|
||||
38. What is the main reason for [Earth](earth.md) having seasons (summer, winter, ...)?
|
||||
39. Name at least three [x86](x86.md) [assembly](assembly.md) instructions and shortly explain what they do.
|
||||
40. Point out what's highly unusual or uncommon about this paragraph. That is find a quality of this paragraph that you wouldn't normally think to find if you took a random paragraph from, say, a random book in your library, or in similar work. It's not that difficult.
|
||||
41. WARNING: VERY HARD. There are two integers, both greater than 1 and smaller than 100. *P* knows their product, *S* knows their sum. They have this conversation: *P* says: I don't know the numbers. *S* says: I know you don't, I don't know them either. *P* says: now I know them. *S* says: now I know them too. What are the numbers? To solve this you are allowed to use a programming language, pen and paper etc. { Holy shit this took me like a whole day. ~drummyfish }
|
||||
42. Compare advantages and disadvantages of [hash](hash.md) tables vs binary [trees](tree.md) for storing text strings, especially in regards to searching the string database.
|
||||
43. A woman gave birth to two sons in the span of a single hour, i.e. they are of the same age, but they aren't twins. How is this possible?
|
||||
44. Name at least two TCP/IP or OSI [network](network.md) layers: about each shortly explain its purpose, addressing and at least one protocol of this layer.
|
||||
45. We know [HTTPS](https.md) is shit because it's [encrypted](encryption.md) and requires [certificates](certificate.md). Explain what these certificates are, why HTTPS needs them, how their absence could be "abused" and who issues them.
|
||||
46. We have two barrels, one with water, one with wine, each having the same amount of liquid. We take a cup, fill it with water from the water barrel, pour it over to the wine barrel, mix it up, and then we fill the same cup with this mixture of water and wine from this barrel and pour it back to the water barrel. Both barrels now have the same amount of liquid again, but the liquids are mixed. What percentage of water is in the water barrel and what percentage of wine is in the wine barrel? Find a general formula for a cup of any size.
|
||||
47. Did you enjoy this quiz?
|
||||
|
||||
### Answers
|
||||
|
||||
|
@ -157,41 +159,43 @@ Here are some questions to test your LRS related knowledge :D Questions here are
|
|||
8. The probability of program breaking is 1 minus probability of it not breaking. For a program to NOT break during one year, all libraries have to stay unchanged (probability 0.95 for each one): that's 0.95 * 0.95 * 0.95 * ... = 0.95^10. Similarly the probability of it not breaking during 5 years is (0.95^10)^5, so the probability of the program breaking in 5 years is around 92%.
|
||||
9. `e`
|
||||
10. Original Unix (around 1970), MS DOS (1981), Windows (1985), Linux (1998), TempleOS (2007). Linux stands out because it's not an operating system, it's a kernel.
|
||||
11. third
|
||||
12. *2 * N*. We can multiply the greatest values: *(2^N - 1) * (2^N - 1) = 2^(2 * N) - 2^(N + 1) + 1*; The greatest term *2^(2 * N)* in binary is 1 with *2 * N* zeros after it, subtracting *(2^(N + 1) - 1)* will always definitely shorten this number by at least one bit (1000... minus anything non-zero will shorten the number). So at most we will need *2 * N* bits for the result, but we can't use fewer because for example 11 * 11 = 1001 -- in this case fewer than 2 * 2 = 4 bits wouldn't suffice. So in general we need *2 * N* bits.
|
||||
13. two (try it, see coin rotation paradox)
|
||||
14. [capitalism](capitalism.md)
|
||||
15. B00B5
|
||||
16. It's not because of the distance from the [Earth](earth.md), the force of gravity is practically the same there (from the Earth's perspective they're really not significantly far away, even the Moon still feels Earth's gravity very strongly so that it doesn't fly away). It's because they are orbiting the Earth, the path they are taking makes them constantly be in a kind of free fall while also preventing them from hitting the Earth (similarly to a comet who is kind of falling towards the Earth but just narrowly misses it, the orbital path of ISS is just much closer to being a circle than an ellipse). I.e. they feel the same kind of weightlessness you will feel in an elevator that's falling down.
|
||||
17. *(2 * r * 314) / 100*
|
||||
18. [GPL](gpl.md), LGPL, AGPL, [MIT](mit.md), BSD, Apache, [CC0](cc0.md), unlicense, zlib, WTFPL, ...; [vim](vim.md), [emacs](emacs.md), [Acme](acme.md), Geany, vi, Notepad++, Neovim, Kate, nano, gedit, ...; [Debian](debian.md), 9front, [OpenBSD](openbsd.md), [FreeDOS](freedos.md), [Haiku](haiku.md), [Minix](minix.md), ReactOS, [GNU](gnu.md)/[Hurd](hurd.md), V6 [Unix](unix.md), FreeRTOS, ...
|
||||
19. The number is *N* such that 2^N = 12345678910111213, rounded up, that is ceil(log2(12345678910111213)) = 54.
|
||||
20. amplifier, voltmeter, analog hardware for [neural networks](neural_net.md), ...; abacus, mechanical calculators such as Curta, Turing machine made of wood, ...
|
||||
21. transitive: e.g. "is older than", "weights the same as", "is descendant of", ... NOT transitive: e.g. "is in love with", "share at least one interest", "is (direct) parent of", ...
|
||||
22. no
|
||||
23. We can use [cross product](cross_product.md) to find a vector perpendicular to two vectors, so we can take e.g. vectors *U = B - A = {4,3,-2}* and *V = C - A = {0,3,-1}*; their cross product is *UxV = {3,4,12} = n* (just look up the formula for cross product). This is the normal, to normalize it we'll first compute its length, i.e. *|n| = sqrt(3^2 + 4^2 + 12^2) = 13* and then divide each component of *n* by this length, i.e. we finally get *n0 = {3/13,4/13,12/13}*. As a check we can compute [dot product](dot_product.md) of this normal with both *U* and *V* and we should get 0 in both cases (meaning the vectors are perpendicular).
|
||||
24. Infinite loop just performs jumps back to some previous program instruction which can be repeated indefinitely, so unless there is something inside the loop that will lead to a crash after many repetitions, an infinite loop will just make the program run forever. With recursion, however, every successive recursive call allocates a new call frame on the call stack (so that the program knows where to return from the function) which will lead to running out of stack memory and to [stack overflow](stack_overflow.md).
|
||||
25. no, no, no
|
||||
26. The walls will collide in 10 seconds during which the fly has been constantly flying with the speed 1 m/s, so it traveled 10 meters.
|
||||
27. *[recursion](recursion.md)*, *[compression](compression.md)*, *[nigger](nigger.md)*, *[censorship](censorship.md)*, *[faggot](faggot.md)*, *[network](network.md)*.
|
||||
28. 1:5:27, 2:10:54, 3:16:21, 4:21:49, 5:27:16, 6:32:43, 7:38:10, 8:43:38, 9:49:05, 10:54:32, 12:00:00, you can compute it by making equations for position of the hour and minute hand depending on time, setting them equal and solving, i.e. you get something like *tm / (60 * 12) = (tm / 60) - (tm // 60)* (where *//* is integer division and *tm* is time in minutes); you will find the times are those when minute hand is at multiples of 60 / 11 minues (5:27), i.e. there are 11 such times around the circle and they are evenly spaced.
|
||||
29. Shading is the process of computing surface color of 3D objects, typically depending on the object's material and done by GPU programs called [shaders](shader.md); shading involves for example applying textures, normal mapping and mainly lighting -- though it can make pixels lighter and darker, e.g. depending on surface normal, it only applies local models of light, i.e. doesn't compute true shadows cast by other objects. On the other hand computing shadows uses some method that works with the scene as a whole to compute true shadowing of objects by other objects.
|
||||
30. We can't really talk about Turing completeness of plain neural networks, they cannot be Turing complete because they just transform fixed length input into fixed length output -- a Turing complete model of computation must be able to operate with arbitrarily large input and output. In theory we can replace any neural network with logic circuit or even just plain lookup table. Significance of neural networks doesn't lie in their computational power but rather in their efficiency, i.e. a relatively small and simple neural network may replace what would otherwise be an enormously large and complicated circuit.
|
||||
31. two (or txq); The cipher offsets each letter by its position.
|
||||
32. The number will be negative because the highest (leftmost) bit is 1; to convert a negative number to positive (and vice versa) in two's complement we flip all bits and add 1, i.e. 10000101 -> 01111010 + 1 -> 01111011 which is 123; the original value therefore represents -123.
|
||||
33. *log2(n)*; Binary search works by splitting the data in half, then moving inside the half which contains the searched item, recursively splitting that one in half again and so on -- for this the algorithm will perform at worst as many steps as how many times we can divide the data in halves which is what base 2 logarithm tells us.
|
||||
34. Yes, a false statement implies anything.
|
||||
35. The function plot is a half circle, so expression in polar coordinates is quite simple: *g(alpha) = 1*, *alpha* belongs to interval <0, pi>.
|
||||
36. The main difference against symmetric cryptography is we have two keys instead of one, one (private) for encrypting and one (public) for decrypting -- neither key can be used for the other task. Therefore encryption and decryption processes differ greatly (while in symmetric cryptography it's essentially the same, using the same key, just in reversed way), the problem looks different in one direction that the other, hence it is called *asymmetric*.
|
||||
37. It's not the distance from the Sun (the distance doesn't change that much and it also wouldn't explain why opposite hemispheres have opposite seasons) but the tilted Earth axis -- the tilt changes the maximum height to which the Sun rises above any specific spot and so the angle under which it shines on the that spot; the [cosine](cos.md) of this angle says how much energy the place gets from the Sun (similarly to how we use cosine to determine how much light is reflected off of a surface in [shaders](shader.md)).
|
||||
38. For example: MOV (moves values between memory locations or registers), JNE (jump if not equal, jumps to another instruction if comparison resulted in non-equality), ADD (adds values in memory or registers), CMP (compares two values and sets the flags register), RET (returns from procedure, pops return address and jumps there) etc.
|
||||
39. There is no letter "e", one of the most common letters in English and other languages -- this is very unlikely to happen by chance.
|
||||
40. 4 and 13, solution: make a table, columns are first integer, rows are second (remember, both *P* and *S* can be making their own table like this too). Cross out whole bottom triangle (symmetric values). *P* doesn't know the numbers, so cross out all combinations of two primes (he would know such numbers as they have only a unique product). *S* knew *P* didn't know the numbers, so the sum also mustn't be a sum of two primes (if the sum could be written as a prime plus prime, *S* couldn't have known that *P* didn't know the numbers, the numbers may have been those two primes and *P* would have known them). This means you can cross out all such numbers -- these are all bottom-left-to-top-right diagonals that go through at least one already crossed out number (combination of primes), as these diagonal have constant sum. Now *P* has a table like this with relatively few numbers left -- if he now leaves in only the numbers that make the product he knows, he'll very likely be left with only one combination of numbers -- there are still many combinations like this, but only the situation when the numbers are set to be 4 and 13 allows *S* to also deduce the numbers after *P* declares he knows the numbers -- this is because *S* knows the combination lies on one specific constant-sum diagonal and 4-13 lie on the only diagonal that in this situation has a unique product within the reduced table. So with some other combinations *P* could deduce the numbers too, but only with 4-13 *S* can finally say he knows them too.
|
||||
41. Hash table will only allow efficient searching of exact matches while binary tree will also allow efficient searching e.g. for all strings starting with some prefix. On the other hand hash table may be faster, in ideal case searching for the match in constant time, but this will depend on the quality of implementation (hash function, number of hash bits, ...), in worst case hash table can degenerate to a mere list. Binary trees will generally be a bit slower, with logarithmic time, but here we'll also have to ensure good implementation, especially balancing the tree -- badly implemented tree may also degenerate to a list.
|
||||
42. They are two of triplets (or quadruplets, ...).
|
||||
43. For example: application layer (highest level layer, concerned with applications communicating with each other, addressing by ports, protocols: HTTP, Gopher, FTP, DNS, SSH, ...), transport layer (middle level layer, concerned with delivering data over a potentially unreliable channel, implements establishment of connection, handshakes, reliable delivery, delivering in correct order etc., protocols: TCP, UDP, ...), network layer (below transport layer, concerned with delivering packets over a network, implements routing, forwarding etc., addressing by IP addresses, i.e. numerical machine addresses, protocols: IPv4, IPv6, ...), OSI physical layer (lowest level layer, concerned with sending bits between two directly connected devices, works with frequencies, electronic circuits etc., no addressing, protocols: ethernet, USB, Bluetooth, ...), ...
|
||||
44. Certificate is a file that contains the domain's public key (needed to communicate using asymmetric cryptography) that is [digitally signed](digital_signature.md) by some "trusted authority", a business that declares itself to be trusted and lets itself be paid for cryptographically confirming that public keys belong to specific servers. Without certificates a [man in the middle](man_in_the_middle.md) "attack" could be performed in which a middle man could sneakily swap a public key that's being transmitted for his own public key which would then allow him to listen to the unencrypted communication.
|
||||
45. yes
|
||||
11. 80085
|
||||
12. third
|
||||
13. *2 * N*. We can multiply the greatest values: *(2^N - 1) * (2^N - 1) = 2^(2 * N) - 2^(N + 1) + 1*; The greatest term *2^(2 * N)* in binary is 1 with *2 * N* zeros after it, subtracting *(2^(N + 1) - 1)* will always definitely shorten this number by at least one bit (1000... minus anything non-zero will shorten the number). So at most we will need *2 * N* bits for the result, but we can't use fewer because for example 11 * 11 = 1001 -- in this case fewer than 2 * 2 = 4 bits wouldn't suffice. So in general we need *2 * N* bits.
|
||||
14. two (try it, see coin rotation paradox)
|
||||
15. [capitalism](capitalism.md)
|
||||
16. B00B5
|
||||
17. It's not because of the distance from the [Earth](earth.md), the force of gravity is practically the same there (from the Earth's perspective they're really not significantly far away, even the Moon still feels Earth's gravity very strongly so that it doesn't fly away). It's because they are orbiting the Earth, the path they are taking makes them constantly be in a kind of free fall while also preventing them from hitting the Earth (similarly to a comet who is kind of falling towards the Earth but just narrowly misses it, the orbital path of ISS is just much closer to being a circle than an ellipse). I.e. they feel the same kind of weightlessness you will feel in an elevator that's falling down.
|
||||
18. *(2 * r * 314) / 100*
|
||||
19. [GPL](gpl.md), LGPL, AGPL, [MIT](mit.md), BSD, Apache, [CC0](cc0.md), unlicense, zlib, WTFPL, ...; [vim](vim.md), [emacs](emacs.md), [Acme](acme.md), Geany, vi, Notepad++, Neovim, Kate, nano, gedit, ...; [Debian](debian.md), 9front, [OpenBSD](openbsd.md), [FreeDOS](freedos.md), [Haiku](haiku.md), [Minix](minix.md), ReactOS, [GNU](gnu.md)/[Hurd](hurd.md), V6 [Unix](unix.md), FreeRTOS, ...
|
||||
20. The number is *N* such that 2^N = 12345678910111213, rounded up, that is ceil(log2(12345678910111213)) = 54.
|
||||
21. amplifier, voltmeter, analog hardware for [neural networks](neural_net.md), ...; abacus, mechanical calculators such as Curta, Turing machine made of wood, ...
|
||||
22. transitive: e.g. "is older than", "weights the same as", "is descendant of", ... NOT transitive: e.g. "is in love with", "share at least one interest", "is (direct) parent of", ...
|
||||
23. no
|
||||
24. We can use [cross product](cross_product.md) to find a vector perpendicular to two vectors, so we can take e.g. vectors *U = B - A = {4,3,-2}* and *V = C - A = {0,3,-1}*; their cross product is *UxV = {3,4,12} = n* (just look up the formula for cross product). This is the normal, to normalize it we'll first compute its length, i.e. *|n| = sqrt(3^2 + 4^2 + 12^2) = 13* and then divide each component of *n* by this length, i.e. we finally get *n0 = {3/13,4/13,12/13}*. As a check we can compute [dot product](dot_product.md) of this normal with both *U* and *V* and we should get 0 in both cases (meaning the vectors are perpendicular).
|
||||
25. Infinite loop just performs jumps back to some previous program instruction which can be repeated indefinitely, so unless there is something inside the loop that will lead to a crash after many repetitions, an infinite loop will just make the program run forever. With recursion, however, every successive recursive call allocates a new call frame on the call stack (so that the program knows where to return from the function) which will lead to running out of stack memory and to [stack overflow](stack_overflow.md).
|
||||
26. no, no, no
|
||||
27. The walls will collide in 10 seconds during which the fly has been constantly flying with the speed 1 m/s, so it traveled 10 meters.
|
||||
28. *[recursion](recursion.md)*, *[compression](compression.md)*, *[nigger](nigger.md)*, *[censorship](censorship.md)*, *[faggot](faggot.md)*, *[network](network.md)*.
|
||||
29. 1:5:27, 2:10:54, 3:16:21, 4:21:49, 5:27:16, 6:32:43, 7:38:10, 8:43:38, 9:49:05, 10:54:32, 12:00:00, you can compute it by making equations for position of the hour and minute hand depending on time, setting them equal and solving, i.e. you get something like *tm / (60 * 12) = (tm / 60) - (tm // 60)* (where *//* is integer division and *tm* is time in minutes); you will find the times are those when minute hand is at multiples of 60 / 11 minues (5:27), i.e. there are 11 such times around the circle and they are evenly spaced.
|
||||
30. Shading is the process of computing surface color of 3D objects, typically depending on the object's material and done by GPU programs called [shaders](shader.md); shading involves for example applying textures, normal mapping and mainly lighting -- though it can make pixels lighter and darker, e.g. depending on surface normal, it only applies local models of light, i.e. doesn't compute true shadows cast by other objects. On the other hand computing shadows uses some method that works with the scene as a whole to compute true shadowing of objects by other objects.
|
||||
31. We can't really talk about Turing completeness of plain neural networks, they cannot be Turing complete because they just transform fixed length input into fixed length output -- a Turing complete model of computation must be able to operate with arbitrarily large input and output. In theory we can replace any neural network with logic circuit or even just plain lookup table. Significance of neural networks doesn't lie in their computational power but rather in their efficiency, i.e. a relatively small and simple neural network may replace what would otherwise be an enormously large and complicated circuit.
|
||||
32. two (or txq); The cipher offsets each letter by its position.
|
||||
33. The number will be negative because the highest (leftmost) bit is 1; to convert a negative number to positive (and vice versa) in two's complement we flip all bits and add 1, i.e. 10000101 -> 01111010 + 1 -> 01111011 which is 123; the original value therefore represents -123.
|
||||
34. *log2(n)*; Binary search works by splitting the data in half, then moving inside the half which contains the searched item, recursively splitting that one in half again and so on -- for this the algorithm will perform at worst as many steps as how many times we can divide the data in halves which is what base 2 logarithm tells us.
|
||||
35. Yes, a false statement implies anything.
|
||||
36. The function plot is a half circle, so expression in polar coordinates is quite simple: *g(alpha) = 1*, *alpha* belongs to interval <0, pi>.
|
||||
37. The main difference against symmetric cryptography is we have two keys instead of one, one (private) for encrypting and one (public) for decrypting -- neither key can be used for the other task. Therefore encryption and decryption processes differ greatly (while in symmetric cryptography it's essentially the same, using the same key, just in reversed way), the problem looks different in one direction that the other, hence it is called *asymmetric*.
|
||||
38. It's not the distance from the Sun (the distance doesn't change that much and it also wouldn't explain why opposite hemispheres have opposite seasons) but the tilted Earth axis -- the tilt changes the maximum height to which the Sun rises above any specific spot and so the angle under which it shines on the that spot; the [cosine](cos.md) of this angle says how much energy the place gets from the Sun (similarly to how we use cosine to determine how much light is reflected off of a surface in [shaders](shader.md)).
|
||||
39. For example: MOV (moves values between memory locations or registers), JNE (jump if not equal, jumps to another instruction if comparison resulted in non-equality), ADD (adds values in memory or registers), CMP (compares two values and sets the flags register), RET (returns from procedure, pops return address and jumps there) etc.
|
||||
40. There is no letter "e", one of the most common letters in English and other languages -- this is very unlikely to happen by chance.
|
||||
41. 4 and 13, solution: make a table, columns are first integer, rows are second (remember, both *P* and *S* can be making their own table like this too). Cross out whole bottom triangle (symmetric values). *P* doesn't know the numbers, so cross out all combinations of two primes (he would know such numbers as they have only a unique product). *S* knew *P* didn't know the numbers, so the sum also mustn't be a sum of two primes (if the sum could be written as a prime plus prime, *S* couldn't have known that *P* didn't know the numbers, the numbers may have been those two primes and *P* would have known them). This means you can cross out all such numbers -- these are all bottom-left-to-top-right diagonals that go through at least one already crossed out number (combination of primes), as these diagonal have constant sum. Now *P* has a table like this with relatively few numbers left -- if he now leaves in only the numbers that make the product he knows, he'll very likely be left with only one combination of numbers -- there are still many combinations like this, but only the situation when the numbers are set to be 4 and 13 allows *S* to also deduce the numbers after *P* declares he knows the numbers -- this is because *S* knows the combination lies on one specific constant-sum diagonal and 4-13 lie on the only diagonal that in this situation has a unique product within the reduced table. So with some other combinations *P* could deduce the numbers too, but only with 4-13 *S* can finally say he knows them too.
|
||||
42. Hash table will only allow efficient searching of exact matches while binary tree will also allow efficient searching e.g. for all strings starting with some prefix. On the other hand hash table may be faster, in ideal case searching for the match in constant time, but this will depend on the quality of implementation (hash function, number of hash bits, ...), in worst case hash table can degenerate to a mere list. Binary trees will generally be a bit slower, with logarithmic time, but here we'll also have to ensure good implementation, especially balancing the tree -- badly implemented tree may also degenerate to a list.
|
||||
43. They are two of triplets (or quadruplets, ...).
|
||||
44. For example: application layer (highest level layer, concerned with applications communicating with each other, addressing by ports, protocols: HTTP, Gopher, FTP, DNS, SSH, ...), transport layer (middle level layer, concerned with delivering data over a potentially unreliable channel, implements establishment of connection, handshakes, reliable delivery, delivering in correct order etc., protocols: TCP, UDP, ...), network layer (below transport layer, concerned with delivering packets over a network, implements routing, forwarding etc., addressing by IP addresses, i.e. numerical machine addresses, protocols: IPv4, IPv6, ...), OSI physical layer (lowest level layer, concerned with sending bits between two directly connected devices, works with frequencies, electronic circuits etc., no addressing, protocols: ethernet, USB, Bluetooth, ...), ...
|
||||
45. Certificate is a file that contains the domain's public key (needed to communicate using asymmetric cryptography) that is [digitally signed](digital_signature.md) by some "trusted authority", a business that declares itself to be trusted and lets itself be paid for cryptographically confirming that public keys belong to specific servers. Without certificates a [man in the middle](man_in_the_middle.md) "attack" could be performed in which a middle man could sneakily swap a public key that's being transmitted for his own public key which would then allow him to listen to the unencrypted communication.
|
||||
46. Let's say both barrels hold 1 unit of liquid volume at the beginning, *n* is the portion of one barrel we'll be pouring over (e.g. *n = 4* means 1/4th of a barrel), *x* is water, *y* is wine. At beginning we have the following in respective barrels: *x* and *y*. After first pour over we have: *x - x/n* and *y + x/n*. After pour back we'll have: *x - x/n + (y + x/n)/(n+1)* and *y + x/n - (y + x/n)/(n+1)*. Note: the division by *n + 1* is important, dividing by *n* would be an error (we are taking away a part of barrel that is over its original capacity). Now we can just simplify the expressions to see the amount of water and wine in each barrel, i.e. we'll get: *x * (1 - 1/n + 1/(n^2+n)) + y * 1/(n+1)* and *x * (1/n - 1/(n^2+n)) + y * (1 - 1/(n+1))*. So for example amount of water in the first barrel is *1 - 1/n + 1/(n^2+n)* which simplifies to *n/(n+1)* -- that is also the exact amount of wine in the other barrel (*1 - 1/(n+1)* simplifies to the same expression). So the answer is there is *n/(n+1)* of the barrel's original liquid (and 1 minus that of the other). Logically we see the purity of each barrel has to be the same just because of the conservation laws.
|
||||
47. yes
|
||||
|
||||
## Other
|
||||
|
||||
|
|
2
lgbt.md
2
lgbt.md
|
@ -8,6 +8,8 @@ LGBT is related to the concept of equality in a similar way in which crusade war
|
|||
|
||||
Note that **not all gay people support LGBT**, even though LGBT wants you to think so and media treat e.g. the terms *gay* and *LGBT* as synonyms (this is part of [propaganda](propaganda.md), either conscious or subconscious). The relationship gay-LGBT is the same as e.g. the relationship White-WhitePride or German-Nazi: Nazis were a German minority that wanted to [fight](fight_culture.md) for more privileges for Germans of their own race (as they felt oppressed by other nations and races such as Jews), LGBT is a gay minority who wants to [fight](fight_culture.md) for more privileges for gay people (because they feel oppressed by straight people). LGBT isn't just about being gay but about approving of a very specific ideology that doesn't automatically come with being gay. LGBT frequently comments on issues that go beyond simply being gay (or whatever), for example LGBT openly stated disapproval of certain other orientation (e.g. [pedophilia](pedophilia.md)) and refuses to admit homosexuality is a disorder, which aren't necessarily stances someone has to take when simply being gay.
|
||||
|
||||
**LGBT is greatly embraced by [capitalism](capitalism.md)** as it serves it well, it creates more conflict and [competition](competition.md) that business feeds on, new areas of [bullshit](bullshit.md) business (gay movies, gay music, gay books, gay games, gay speakers, gay merchandise, antidepressants for people that are depressed for not being gay enough, ...), attention grabbing potential (LOOK LOOK AT OUR AD, WE SUPPORT GAYS), political capital to be mined (CEO wants more money and power so he wants to get into politics? Starting a gay supporting party is an awesome tool.) etcetc. Indeed, as of 2024 literally every ad you see is woke and gay, capitalism just loves this new "rebel movement".
|
||||
|
||||
**LGBT is a cult** that managed to actually get mainstream and embraced by the ruling powers ([states](state.md) and [corporations](corporation.md)) -- their [pseudoscience](soyence.md), called "[gender studies](gender_studies.md)", is not unlike the hilarious "science" of Ancient Aliens, the LGBT theories are not unlike the Nazi theories about underground Jewish societies secretly ruling the world. Just like some see everything a work of aliens or Jews, LGBT sees a secret gender oppression in everything, in 100 years old child cartoons, in primitive video games like [pacman](pacman.md), in colors of the butterfly wings, everything has a secret straight cis male oppression message embedded within it. If you ever wondered what it would look like if Scientology took over the world or if Nazis won the world war^([Hitler comparison committed but rightfully so]), you don't have to wonder anymore, it's right here (chances are just that you don't see it just as you wouldn't see Scientology as weird if you grew up in a culture completely controlled by it).
|
||||
|
||||
Gay fascists furthermore live off of attention so they love to wear bizarre clothes in all existing AND nonexisting [colors](color.md) at once, further combined with ugly hairstyles and [tattoos](tattoo.md) so that they literally look like clowns from mental asylum or that creepy McDonald's mascot. They also love to show their genitalia in the streets -- though they are pedophobes, they think it's a peer reviewed fact that it's natural for a child to see mommy have threesome with her frens.
|
||||
|
|
3392
random_page.md
3392
random_page.md
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -3,9 +3,9 @@
|
|||
This is an autogenerated article holding stats about this wiki.
|
||||
|
||||
- number of articles: 577
|
||||
- number of commits: 780
|
||||
- total size of all texts in bytes: 3689720
|
||||
- total number of lines of article texts: 28424
|
||||
- number of commits: 781
|
||||
- total size of all texts in bytes: 3693000
|
||||
- total number of lines of article texts: 28432
|
||||
- number of script lines: 262
|
||||
- occurences of the word "person": 8
|
||||
- occurences of the word "nigger": 73
|
||||
|
@ -35,60 +35,68 @@ longest articles:
|
|||
|
||||
top 50 5+ letter words:
|
||||
|
||||
- which (2108)
|
||||
- which (2111)
|
||||
- there (1601)
|
||||
- people (1388)
|
||||
- other (1153)
|
||||
- example (1122)
|
||||
- example (1123)
|
||||
- software (1043)
|
||||
- number (1011)
|
||||
- number (1015)
|
||||
- about (959)
|
||||
- program (853)
|
||||
- their (792)
|
||||
- because (742)
|
||||
- their (795)
|
||||
- because (749)
|
||||
- called (734)
|
||||
- computer (721)
|
||||
- would (719)
|
||||
- language (712)
|
||||
- being (694)
|
||||
- would (720)
|
||||
- language (713)
|
||||
- being (696)
|
||||
- simple (691)
|
||||
- things (680)
|
||||
- things (681)
|
||||
- numbers (678)
|
||||
- without (641)
|
||||
- without (642)
|
||||
- function (636)
|
||||
- programming (633)
|
||||
- something (629)
|
||||
- these (598)
|
||||
- programming (634)
|
||||
- something (631)
|
||||
- these (599)
|
||||
- however (597)
|
||||
- different (591)
|
||||
- world (562)
|
||||
- different (592)
|
||||
- world (563)
|
||||
- system (551)
|
||||
- should (540)
|
||||
- games (536)
|
||||
- point (525)
|
||||
- doesn (523)
|
||||
- doesn (525)
|
||||
- society (521)
|
||||
- though (496)
|
||||
- though (498)
|
||||
- memory (495)
|
||||
- while (489)
|
||||
- drummyfish (488)
|
||||
- using (486)
|
||||
- using (487)
|
||||
- technology (474)
|
||||
- still (467)
|
||||
- course (465)
|
||||
- similar (462)
|
||||
- simply (447)
|
||||
- simply (448)
|
||||
- possible (447)
|
||||
- https (437)
|
||||
- https (439)
|
||||
- really (415)
|
||||
- computers (411)
|
||||
- extremely (408)
|
||||
- always (405)
|
||||
- actually (398)
|
||||
- value (399)
|
||||
|
||||
latest changes:
|
||||
|
||||
```
|
||||
Date: Thu Apr 25 20:58:19 2024 +0200
|
||||
exercises.md
|
||||
fail_ab.md
|
||||
human_language.md
|
||||
lmao.md
|
||||
random_page.md
|
||||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
Date: Wed Apr 24 21:09:47 2024 +0200
|
||||
ancap.md
|
||||
exercises.md
|
||||
|
@ -104,30 +112,18 @@ Date: Wed Apr 24 16:12:06 2024 +0200
|
|||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
Date: Wed Apr 24 15:10:32 2024 +0200
|
||||
bbs.md
|
||||
bytebeat.md
|
||||
capitalism.md
|
||||
css.md
|
||||
culture.md
|
||||
exercises.md
|
||||
human_language.md
|
||||
jesus.md
|
||||
main.md
|
||||
political_correctness.md
|
||||
random_page.md
|
||||
trolling.md
|
||||
```
|
||||
|
||||
most wanted pages:
|
||||
|
||||
- [data_type](data_type.md) (14)
|
||||
- [irl](irl.md) (12)
|
||||
- [embedded](embedded.md) (12)
|
||||
- [cli](cli.md) (11)
|
||||
- [buddhism](buddhism.md) (11)
|
||||
- [array](array.md) (11)
|
||||
- [quake](quake.md) (10)
|
||||
- [lisp](lisp.md) (10)
|
||||
- [irl](irl.md) (10)
|
||||
- [tree](tree.md) (9)
|
||||
- [meme](meme.md) (9)
|
||||
- [gpl](gpl.md) (9)
|
||||
|
|
Loading…
Reference in a new issue